mirror of
https://github.com/searxng/searxng.git
synced 2026-10-25 05:44:14 +00:00
[upd] web-client (simple): Bump the minor group across 1 directory with 6 updates (#5128)
* [upd] web-client (simple): Bump the minor group across 1 directory with 6 updates Bumps the minor group with 6 updates in the /client/simple directory: | Package | From | To | | --- | --- | --- | | [@biomejs/biome](https://github.com/biomejs/biome/tree/HEAD/packages/@biomejs/biome) | `2.1.3` | `2.2.0` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `24.2.0` | `24.3.0` | | [browserslist](https://github.com/browserslist/browserslist) | `4.25.1` | `4.25.2` | | [edge.js](https://github.com/edge-js/edge) | `6.2.1` | `6.3.0` | | [stylelint](https://github.com/stylelint/stylelint) | `16.23.0` | `16.23.1` | | [vite-bundle-analyzer](https://github.com/nonzzz/vite-bundle-analyzer) | `1.1.0` | `1.2.1` | Updates `@biomejs/biome` from 2.1.3 to 2.2.0 - [Release notes](https://github.com/biomejs/biome/releases) - [Changelog](https://github.com/biomejs/biome/blob/main/packages/@biomejs/biome/CHANGELOG.md) - [Commits](https://github.com/biomejs/biome/commits/@biomejs/biome@2.2.0/packages/@biomejs/biome) Updates `@types/node` from 24.2.0 to 24.3.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `browserslist` from 4.25.1 to 4.25.2 - [Release notes](https://github.com/browserslist/browserslist/releases) - [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md) - [Commits](https://github.com/browserslist/browserslist/compare/4.25.1...4.25.2) Updates `edge.js` from 6.2.1 to 6.3.0 - [Release notes](https://github.com/edge-js/edge/releases) - [Changelog](https://github.com/edge-js/edge/blob/6.x/CHANGELOG.md) - [Commits](https://github.com/edge-js/edge/compare/v6.2.1...v6.3.0) Updates `stylelint` from 16.23.0 to 16.23.1 - [Release notes](https://github.com/stylelint/stylelint/releases) - [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md) - [Commits](https://github.com/stylelint/stylelint/compare/16.23.0...16.23.1) Updates `vite-bundle-analyzer` from 1.1.0 to 1.2.1 - [Release notes](https://github.com/nonzzz/vite-bundle-analyzer/releases) - [Changelog](https://github.com/nonzzz/vite-bundle-analyzer/blob/master/CHANGELOG.md) - [Commits](https://github.com/nonzzz/vite-bundle-analyzer/compare/v1.1.0...v1.2.1) --- updated-dependencies: - dependency-name: "@biomejs/biome" dependency-version: 2.2.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: "@types/node" dependency-version: 24.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: browserslist dependency-version: 4.25.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor - dependency-name: edge.js dependency-version: 6.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor - dependency-name: stylelint dependency-version: 16.23.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor - dependency-name: vite-bundle-analyzer dependency-version: 1.2.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor ... Signed-off-by: dependabot[bot] <support@github.com> * [fix] themes/simple: recreate lock * [fix] themes/simple: promote from nursery - noAwaitInLoop - noBitwiseOperators - noConstantBinaryExpression - noGlobalDirnameFilename - noImplicitCoercion - noUnassignedVariables - noUselessBackrefInRegex - noUselessEscapeInString - useAdjacentGetterSetter - useConsistentObjectDefinition - useConsistentResponse - useIndexOf - useIterableCallbackReturn - useJsonImportAttribute - useNumericSeparators - useObjectSpread - useParseIntRadix - useReadonlyClassProperties - useSingleJsDocAsterisk - useUnifiedTypeSignature * [fix] themes/simple: build static --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ivan Gabaldon <igabaldon@inetol.net>
This commit is contained in:
1 parent
5f364ad999
commit
9bb04e288d
17 files changed
+253
-236
No files matched your search
+26
-31
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.1.3/schema.json",
|
||||
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
|
||||
"files": {
|
||||
"includes": ["**", "!dist/**", "!node_modules/**"],
|
||||
"includes": ["**", "!dist", "!node_modules"],
|
||||
"ignoreUnknown": true
|
||||
},
|
||||
"vcs": {
|
||||
@@ -31,49 +31,29 @@
|
||||
"recommended": true,
|
||||
"complexity": {
|
||||
"noForEach": "error",
|
||||
"noImplicitCoercions": "error",
|
||||
"useSimplifiedLogicExpression": "error"
|
||||
},
|
||||
"correctness": {
|
||||
"noGlobalDirnameFilename": "error",
|
||||
"noUndeclaredVariables": {
|
||||
"level": "error",
|
||||
"options": {
|
||||
"checkTypes": true
|
||||
}
|
||||
},
|
||||
"useImportExtensions": "error"
|
||||
"useImportExtensions": "error",
|
||||
"useJsonImportAttributes": "error",
|
||||
"useSingleJsDocAsterisk": "error"
|
||||
},
|
||||
"nursery": {
|
||||
"noAwaitInLoop": "warn",
|
||||
"noBitwiseOperators": "warn",
|
||||
"noConstantBinaryExpression": "warn",
|
||||
"noGlobalDirnameFilename": "warn",
|
||||
"noImplicitCoercion": "warn",
|
||||
"noMisusedPromises": "warn",
|
||||
"noUnassignedVariables": "warn",
|
||||
"noUselessBackrefInRegex": "warn",
|
||||
"noUselessEscapeInString": "warn",
|
||||
"noUselessUndefined": "warn",
|
||||
"useAdjacentGetterSetter": "warn",
|
||||
"useConsistentObjectDefinition": {
|
||||
"level": "warn",
|
||||
"options": {
|
||||
"syntax": "explicit"
|
||||
}
|
||||
},
|
||||
"useConsistentResponse": "warn",
|
||||
"useExhaustiveSwitchCases": "warn",
|
||||
"useExplicitType": "warn",
|
||||
"useIndexOf": "warn",
|
||||
"useIterableCallbackReturn": "warn",
|
||||
"useJsonImportAttribute": "warn",
|
||||
"useNumericSeparators": "warn",
|
||||
"useObjectSpread": "warn",
|
||||
"useParseIntRadix": "warn",
|
||||
"useReadonlyClassProperties": "warn",
|
||||
"useSingleJsDocAsterisk": "warn",
|
||||
"useUnifiedTypeSignature": "warn"
|
||||
"useExplicitType": "warn"
|
||||
},
|
||||
"performance": {
|
||||
"noAwaitInLoops": "error",
|
||||
"noBarrelFile": "error",
|
||||
"noDelete": "error",
|
||||
"noNamespaceImport": "error",
|
||||
@@ -121,22 +101,37 @@
|
||||
"accessibility": "explicit"
|
||||
}
|
||||
},
|
||||
"useConsistentObjectDefinitions": {
|
||||
"level": "error",
|
||||
"options": {
|
||||
"syntax": "explicit"
|
||||
}
|
||||
},
|
||||
"useDefaultSwitchClause": "error",
|
||||
"useExplicitLengthCheck": "error",
|
||||
"useForOf": "error",
|
||||
"useGroupedAccessorPairs": "error",
|
||||
"useNumberNamespace": "error",
|
||||
"useNumericSeparators": "error",
|
||||
"useObjectSpread": "error",
|
||||
"useReadonlyClassProperties": "error",
|
||||
"useShorthandAssign": "error",
|
||||
"useSingleVarDeclarator": "error",
|
||||
"useThrowNewError": "error",
|
||||
"useThrowOnlyError": "error",
|
||||
"useTrimStartEnd": "error"
|
||||
"useTrimStartEnd": "error",
|
||||
"useUnifiedTypeSignatures": "error"
|
||||
},
|
||||
"suspicious": {
|
||||
"noAlert": "error",
|
||||
"noBitwiseOperators": "error",
|
||||
"noConstantBinaryExpressions": "error",
|
||||
"noEmptyBlockStatements": "error",
|
||||
"noEvolvingTypes": "error",
|
||||
"noUnassignedVariables": "error",
|
||||
"noVar": "error",
|
||||
"useNumberToFixedDigitsArgument": "error"
|
||||
"useNumberToFixedDigitsArgument": "error",
|
||||
"useStaticResponseMethods": "error"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Generated
+181
-175
@@ -15,22 +15,22 @@
|
||||
"swiped-events": "1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.1.3",
|
||||
"@types/node": "~24.2.0",
|
||||
"browserslist": "~4.25.0",
|
||||
"@biomejs/biome": "2.2.0",
|
||||
"@types/node": "~24.3.0",
|
||||
"browserslist": "~4.25.2",
|
||||
"browserslist-to-esbuild": "~2.1.0",
|
||||
"edge.js": "~6.2.0",
|
||||
"edge.js": "~6.3.0",
|
||||
"less": "~4.4.0",
|
||||
"lightningcss": "~1.30.0",
|
||||
"sharp": "~0.34.0",
|
||||
"sort-package-json": "~3.4.0",
|
||||
"stylelint": "~16.23.0",
|
||||
"stylelint": "~16.23.1",
|
||||
"stylelint-config-standard-less": "~3.0.0",
|
||||
"stylelint-prettier": "~5.0.0",
|
||||
"svgo": "~4.0.0",
|
||||
"typescript": "~5.9.0",
|
||||
"vite": "npm:rolldown-vite@7.0.12",
|
||||
"vite-bundle-analyzer": "~1.1.0"
|
||||
"vite": "npm:rolldown-vite@7.1.3",
|
||||
"vite-bundle-analyzer": "~1.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
@@ -59,9 +59,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/biome": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.1.3.tgz",
|
||||
"integrity": "sha512-KE/tegvJIxTkl7gJbGWSgun7G6X/n2M6C35COT6ctYrAy7SiPyNvi6JtoQERVK/VRbttZfgGq96j2bFmhmnH4w==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.2.0.tgz",
|
||||
"integrity": "sha512-3On3RSYLsX+n9KnoSgfoYlckYBoU6VRM22cw1gB4Y0OuUVSYd/O/2saOJMrA4HFfA1Ff0eacOvMN1yAAvHtzIw==",
|
||||
"dev": true,
|
||||
"license": "MIT OR Apache-2.0",
|
||||
"bin": {
|
||||
@@ -75,20 +75,20 @@
|
||||
"url": "https://opencollective.com/biome"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@biomejs/cli-darwin-arm64": "2.1.3",
|
||||
"@biomejs/cli-darwin-x64": "2.1.3",
|
||||
"@biomejs/cli-linux-arm64": "2.1.3",
|
||||
"@biomejs/cli-linux-arm64-musl": "2.1.3",
|
||||
"@biomejs/cli-linux-x64": "2.1.3",
|
||||
"@biomejs/cli-linux-x64-musl": "2.1.3",
|
||||
"@biomejs/cli-win32-arm64": "2.1.3",
|
||||
"@biomejs/cli-win32-x64": "2.1.3"
|
||||
"@biomejs/cli-darwin-arm64": "2.2.0",
|
||||
"@biomejs/cli-darwin-x64": "2.2.0",
|
||||
"@biomejs/cli-linux-arm64": "2.2.0",
|
||||
"@biomejs/cli-linux-arm64-musl": "2.2.0",
|
||||
"@biomejs/cli-linux-x64": "2.2.0",
|
||||
"@biomejs/cli-linux-x64-musl": "2.2.0",
|
||||
"@biomejs/cli-win32-arm64": "2.2.0",
|
||||
"@biomejs/cli-win32-x64": "2.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-darwin-arm64": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.1.3.tgz",
|
||||
"integrity": "sha512-LFLkSWRoSGS1wVUD/BE6Nlt2dSn0ulH3XImzg2O/36BoToJHKXjSxzPEMAqT9QvwVtk7/9AQhZpTneERU9qaXA==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.2.0.tgz",
|
||||
"integrity": "sha512-zKbwUUh+9uFmWfS8IFxmVD6XwqFcENjZvEyfOxHs1epjdH3wyyMQG80FGDsmauPwS2r5kXdEM0v/+dTIA9FXAg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -103,9 +103,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-darwin-x64": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.1.3.tgz",
|
||||
"integrity": "sha512-Q/4OTw8P9No9QeowyxswcWdm0n2MsdCwWcc5NcKQQvzwPjwuPdf8dpPPf4r+x0RWKBtl1FLiAUtJvBlri6DnYw==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.2.0.tgz",
|
||||
"integrity": "sha512-+OmT4dsX2eTfhD5crUOPw3RPhaR+SKVspvGVmSdZ9y9O/AgL8pla6T4hOn1q+VAFBHuHhsdxDRJgFCSC7RaMOw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -120,9 +120,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-arm64": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.1.3.tgz",
|
||||
"integrity": "sha512-2hS6LgylRqMFmAZCOFwYrf77QMdUwJp49oe8PX/O8+P2yKZMSpyQTf3Eo5ewnsMFUEmYbPOskafdV1ds1MZMJA==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.2.0.tgz",
|
||||
"integrity": "sha512-6eoRdF2yW5FnW9Lpeivh7Mayhq0KDdaDMYOJnH9aT02KuSIX5V1HmWJCQQPwIQbhDh68Zrcpl8inRlTEan0SXw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -137,9 +137,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-arm64-musl": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.1.3.tgz",
|
||||
"integrity": "sha512-KXouFSBnoxAWZYDQrnNRzZBbt5s9UJkIm40hdvSL9mBxSSoxRFQJbtg1hP3aa8A2SnXyQHxQfpiVeJlczZt76w==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.2.0.tgz",
|
||||
"integrity": "sha512-egKpOa+4FL9YO+SMUMLUvf543cprjevNc3CAgDNFLcjknuNMcZ0GLJYa3EGTCR2xIkIUJDVneBV3O9OcIlCEZQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -154,9 +154,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-x64": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.1.3.tgz",
|
||||
"integrity": "sha512-NxlSCBhLvQtWGagEztfAZ4WcE1AkMTntZV65ZvR+J9jp06+EtOYEBPQndA70ZGhHbEDG57bR6uNvqkd1WrEYVA==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.2.0.tgz",
|
||||
"integrity": "sha512-5UmQx/OZAfJfi25zAnAGHUMuOd+LOsliIt119x2soA2gLggQYrVPA+2kMUxR6Mw5M1deUF/AWWP2qpxgH7Nyfw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -171,9 +171,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-x64-musl": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.1.3.tgz",
|
||||
"integrity": "sha512-KaLAxnROouzIWtl6a0Y88r/4hW5oDUJTIqQorOTVQITaKQsKjZX4XCUmHIhdEk8zMnaiLZzRTAwk1yIAl+mIew==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.2.0.tgz",
|
||||
"integrity": "sha512-I5J85yWwUWpgJyC1CcytNSGusu2p9HjDnOPAFG4Y515hwRD0jpR9sT9/T1cKHtuCvEQ/sBvx+6zhz9l9wEJGAg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -188,9 +188,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-win32-arm64": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.1.3.tgz",
|
||||
"integrity": "sha512-V9CUZCtWH4u0YwyCYbQ3W5F4ZGPWp2C2TYcsiWFNNyRfmOW1j/TY/jAurl33SaRjgZPO5UUhGyr9m6BN9t84NQ==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.2.0.tgz",
|
||||
"integrity": "sha512-n9a1/f2CwIDmNMNkFs+JI0ZjFnMO0jdOyGNtihgUNFnlmd84yIYY2KMTBmMV58ZlVHjgmY5Y6E1hVTnSRieggA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -205,9 +205,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-win32-x64": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.1.3.tgz",
|
||||
"integrity": "sha512-dxy599q6lgp8ANPpR8sDMscwdp9oOumEsVXuVCVT9N2vAho8uYXlCz53JhxX6LtJOXaE73qzgkGQ7QqvFlMC0g==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.2.0.tgz",
|
||||
"integrity": "sha512-Nawu5nHjP/zPKTIryh2AavzTc/KEg4um/MxWdXW0A6P/RZOyIpa7+QSjeXwAwX/utJGaCoXRPWtF3m5U/bB3Ww==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -814,9 +814,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/wasm-runtime": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.1.tgz",
|
||||
"integrity": "sha512-KVlQ/jgywZpixGCKMNwxStmmbYEMyokZpCf2YuIChhfJA2uqfAKNEM8INz7zzTo55iEXfBhIIs3VqYyqzDLj8g==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.0.3.tgz",
|
||||
"integrity": "sha512-rZxtMsLwjdXkMUGC3WwsPwLNVqVqnTJT6MNIB6e+5fhMcSCPP0AOsNWuMQ5mdCq6HNjs/ZeWAEchpqeprqBD2Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
@@ -865,9 +865,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@oxc-project/runtime": {
|
||||
"version": "0.78.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/runtime/-/runtime-0.78.0.tgz",
|
||||
"integrity": "sha512-jOU7sDFMyq5ShGJC21UobalVzqcdtWGfySVp8ELvKoVLzMpLHb4kv1bs9VKxaP8XC7Z9hlAXwEKVhCTN+j21aQ==",
|
||||
"version": "0.82.2",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/runtime/-/runtime-0.82.2.tgz",
|
||||
"integrity": "sha512-cYxcj5CPn/vo5QSpCZcYzBiLidU5+GlFSqIeNaMgBDtcVRBsBJHZg3pHw999W6nHamFQ1EHuPPByB26tjaJiJw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -875,9 +875,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@oxc-project/types": {
|
||||
"version": "0.78.0",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.78.0.tgz",
|
||||
"integrity": "sha512-8FvExh0WRWN1FoSTjah1xa9RlavZcJQ8/yxRbZ7ElmSa2Ij5f5Em7MvRbSthE6FbwC6Wh8iAw0Gpna7QdoqLGg==",
|
||||
"version": "0.82.2",
|
||||
"resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.82.2.tgz",
|
||||
"integrity": "sha512-WMGSwd9FsNBs/WfqIOH0h3k1LBdjZJQGYjGnC+vla/fh6HUsu5HzGPerRljiq1hgMQ6gs031YJR12VyP57b/hQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
@@ -960,9 +960,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-android-arm64": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-4j7QBitb/WMT1fzdJo7BsFvVNaFR5WCQPdf/RPDHEsgQIYwBaHaL47KTZxncGFQDD1UAKN3XScJ0k7LAsZfsvg==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-xhDQXKftRkEULIxCddrKMR8y0YO/Y+6BKk/XrQP2B29YjV2wr8DByoEz+AHX9BfLHb2srfpdN46UquBW2QXWpQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -974,9 +974,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-arm64": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-4vWFTe1o5LXeitI2lW8qMGRxxwrH/LhKd2HDLa/QPhdxohvdnfKyDZWN96XUhDyje2bHFCFyhMs3ak2lg2mJFA==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-7lhhY08v5ZtRq8JJQaJ49fnJombAPnqllKKCDLU/UvaqNAOEyTGC8J1WVOLC4EA4zbXO5U3CCRgVGyAFNH2VtQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -988,9 +988,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-darwin-x64": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-MxrfodqImbsDFFFU/8LxyFPZjt7s4ht8g2Zb76EmIQ+xlmit46L9IzvWiuMpEaSJ5WbnjO7fCDWwakMGyJJ+Dw==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-U2iGjcDV7NWyYyhap8YuY0nwrLX6TvX/9i7gBtdEMPm9z3wIUVGNMVdGlA43uqg7xDpRGpEqGnxbeDgiEwYdnA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1002,9 +1002,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-freebsd-x64": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-c/TQXcATKoO8qE1bCjCOkymZTu7yVUAxBSNLp42Q97XHCb0Cu9v6MjZpB6c7Hq9NQ9NzW44uglak9D/r77JeDw==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-gd6ASromVHFLlzrjJWMG5CXHkS7/36DEZ8HhvGt2NN8eZALCIuyEx8HMMLqvKA7z4EAztVkdToVrdxpGMsKZxw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1016,9 +1016,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm-gnueabihf": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-Vxci4xylM11zVqvrmezAaRjGBDyOlMRtlt7TDgxaBmSYLuiokXbZpD8aoSuOyjUAeN0/tmWItkxNGQza8UWGNQ==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-xmeLfkfGthuynO1EpCdyTVr0r4G+wqvnKCuyR6rXOet+hLrq5HNAC2XtP/jU2TB4Bc6aiLYxl868B8CGtFDhcw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -1030,9 +1030,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-gnu": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-iEBEdSs25Ol0lXyVNs763f7YPAIP0t1EAjoXME81oJ94DesJslaLTj71Rn1shoMDVA+dfkYA286w5uYnOs9ZNA==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-cHGp8yfHL4pes6uaLbO5L58ceFkUK4efd8iE86jClD1QPPDLKiqEXJCFYeuK3OfODuF5EBOmf0SlcUZNEYGdmw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1044,9 +1044,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-musl": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-Ny684Sn1X8c+gGLuDlxkOuwiEE3C7eEOqp1/YVBzQB4HO7U/b4n7alvHvShboOEY5DP1fFUjq6Z+sBLYlCIZbQ==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-wZ1t7JAvVeFgskH1L9y7c47ITitPytpL0s8FmAT8pVfXcaTmS58ZyoXT+y6cz8uCkQnETjrX3YezTGI18u3ecg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1057,24 +1057,10 @@
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-arm64-ohos": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-ohos/-/binding-linux-arm64-ohos-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-6moyULHDPKwt5RDEV72EqYw5n+s46AerTwtEBau5wCsZd1wuHS1L9z6wqhKISXAFTK9sneN0TEjvYKo+sgbbiA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"openharmony"
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-gnu": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-p0yoPdoGg5Ow2YZKKB5Ypbn58i7u4XFk3PvMkriFnEcgtVk40c5u7miaX7jH0JdzahyXVBJ/KT5yEpJrzQn8yg==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-cDndWo3VEYbm7yeujOV6Ie2XHz0K8YX/R/vbNmMo03m1QwtBKKvbYNSyJb3B9+8igltDjd8zNM9mpiNNrq/ekQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1086,9 +1072,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-linux-x64-musl": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-sM/KhCrsT0YdHX10mFSr0cvbfk1+btG6ftepAfqhbcDfhi0s65J4dTOxGmklJnJL9i1LXZ8WA3N4wmnqsfoK8Q==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-bl7uzi6es/l6LT++NZcBpiX43ldLyKXCPwEZGY1rZJ99HQ7m1g3KxWwYCcGxtKjlb2ExVvDZicF6k+96vxOJKg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1099,10 +1085,24 @@
|
||||
"linux"
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-openharmony-arm64": {
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-TrgzQanpLgcmmzolCbYA9BPZgF1gYxkIGZhU/HROnJPsq67gcyaYw/JBLioqQLjIwMipETkn25YY799D2OZzJA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"openharmony"
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-wasm32-wasi": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-i3kD5OWs8PQP0V+JW3TFyCLuyjuNzrB45em0g84Jc+gvnDsGVlzVjMNPo7txE/yT8CfE90HC/lDs3ry9FvaUyw==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-z0LltdUfvoKak9SuaLz/M9AVSg+RTOZjFksbZXzC6Svl1odyW4ai21VHhZy3m2Faeeb/rl/9efVLayj+qYEGxw==",
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
],
|
||||
@@ -1110,16 +1110,16 @@
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@napi-rs/wasm-runtime": "^1.0.1"
|
||||
"@napi-rs/wasm-runtime": "^1.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-arm64-msvc": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-q7mrYln30V35VrCqnBVQQvNPQm8Om9HC59I3kMYiOWogvJobzSPyO+HA1MP363+Qgwe39I2I1nqBKPOtWZ33AQ==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-CpvOHyqDNOYx9riD4giyXQDIu72bWRU2Dwt1xFSPlBudk6NumK0OJl6Ch+LPnkp5podQHcQg0mMauAXPVKct7g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -1131,9 +1131,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-ia32-msvc": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-nUqGBt39XTpbBEREEnyKofdP3uz+SN/x2884BH+N3B2NjSUrP6NXwzltM35C0wKK42hX/nthRrwSgj715m99Jw==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-/tNTvZTWHz6HiVuwpR3zR0kGIyCNb+/tFhnJmti+Aw2fAXs3l7Aj0DcXd0646eFKMX8L2w5hOW9H08FXTUkN0g==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -1145,9 +1145,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/binding-win32-x64-msvc": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-lbnvUwAXIVWSXAeZrCa4b1KvV/DW0rBnMHuX0T7I6ey1IsXZ90J37dEgt3j48Ex1Cw1E+5H7VDNP2gyOX8iu3w==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-Bb2qK3z7g2mf4zaKRvkohHzweaP1lLbaoBmXZFkY6jJWMm0Z8Pfnh8cOoRlH1IVM1Ufbo8ZZ1WXp1LbOpRMtXw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -1159,9 +1159,9 @@
|
||||
]
|
||||
},
|
||||
"node_modules/@rolldown/pluginutils": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-whXaSoNUFiyDAjkUF8OBpOm77Szdbk5lGNqFe6CbVbJFrhCCPinCbRA3NjawwlNHla1No7xvXXh+CpSxnPfUEw==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-she25NCG6NoEPC/SEB4pHs5STcnfI4VBFOzjeI63maSPrWME5J2XC8ogrBgp8NaE/xzj28/kbpSaebiMvFRj+w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -1311,9 +1311,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "24.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.0.tgz",
|
||||
"integrity": "sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==",
|
||||
"version": "24.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz",
|
||||
"integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1464,9 +1464,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.25.1",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz",
|
||||
"integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==",
|
||||
"version": "4.25.2",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.2.tgz",
|
||||
"integrity": "sha512-0si2SJK3ooGzIawRu61ZdPCO1IncZwS8IzuX73sPZsXW6EQ/w/DAfPyKI8l1ETTCr2MnvqWitmlCUxgdul45jA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -1484,8 +1484,8 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"caniuse-lite": "^1.0.30001726",
|
||||
"electron-to-chromium": "^1.5.173",
|
||||
"caniuse-lite": "^1.0.30001733",
|
||||
"electron-to-chromium": "^1.5.199",
|
||||
"node-releases": "^2.0.19",
|
||||
"update-browserslist-db": "^1.1.3"
|
||||
},
|
||||
@@ -1526,14 +1526,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cacheable": {
|
||||
"version": "1.10.3",
|
||||
"resolved": "https://registry.npmjs.org/cacheable/-/cacheable-1.10.3.tgz",
|
||||
"integrity": "sha512-M6p10iJ/VT0wT7TLIGUnm958oVrU2cUK8pQAVU21Zu7h8rbk/PeRtRWrvHJBql97Bhzk3g1N6+2VKC+Rjxna9Q==",
|
||||
"version": "1.10.4",
|
||||
"resolved": "https://registry.npmjs.org/cacheable/-/cacheable-1.10.4.tgz",
|
||||
"integrity": "sha512-Gd7ccIUkZ9TE2odLQVS+PDjIvQCdJKUlLdJRVvZu0aipj07Qfx+XIej7hhDrKGGoIxV5m5fT/kOJNJPQhQneRg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"hookified": "^1.10.0",
|
||||
"keyv": "^5.4.0"
|
||||
"hookified": "^1.11.0",
|
||||
"keyv": "^5.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/callsites": {
|
||||
@@ -1547,9 +1547,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001731",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001731.tgz",
|
||||
"integrity": "sha512-lDdp2/wrOmTRWuoB5DpfNkC0rJDU8DqRa6nYL6HK6sytw70QMopt/NIc/9SM7ylItlBWfACXk0tEn37UWM/+mg==",
|
||||
"version": "1.0.30001735",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001735.tgz",
|
||||
"integrity": "sha512-EV/laoX7Wq2J9TQlyIXRxTJqIw4sxfXS4OYgudGxBYRuTv0q7AM6yMEpU/Vo1I94thg9U6EZ2NfZx9GJq83u7w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -1962,9 +1962,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/edge.js": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/edge.js/-/edge.js-6.2.1.tgz",
|
||||
"integrity": "sha512-me875zh6YA0V429hywgQIpHgMvQkondv5XHaP6EsL2yIBpLcBWCl7Ba1cai0SwYhp8iD0IyV3KjpxLrnW7S2Ag==",
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/edge.js/-/edge.js-6.3.0.tgz",
|
||||
"integrity": "sha512-Xm7XW6J2+6cvfRK6AJEKV5hBF230iCvwQRg5wattg+RAzQ6tRwWSe4gqCsvvCaHt4xp10xkm8+ZdhApF1FVCzA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1986,9 +1986,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.197",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.197.tgz",
|
||||
"integrity": "sha512-m1xWB3g7vJ6asIFz+2pBUbq3uGmfmln1M9SSvBe4QIFWYrRHylP73zL/3nMjDmwz8V+1xAXQDfBd6+HPW0WvDQ==",
|
||||
"version": "1.5.204",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.204.tgz",
|
||||
"integrity": "sha512-s9VbBXWxfDrl67PlO4avwh0/GU2vcwx8Fph3wlR8LJl7ySGYId59EFE17VWVcuC3sLWNPENm6Z/uGqKbkPCcXA==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
@@ -2145,13 +2145,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/file-entry-cache": {
|
||||
"version": "10.1.3",
|
||||
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-10.1.3.tgz",
|
||||
"integrity": "sha512-D+w75Ub8T55yor7fPgN06rkCAUbAYw2vpxJmmjv/GDAcvCnv9g7IvHhIZoxzRZThrXPFI2maeY24pPbtyYU7Lg==",
|
||||
"version": "10.1.4",
|
||||
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-10.1.4.tgz",
|
||||
"integrity": "sha512-5XRUFc0WTtUbjfGzEwXc42tiGxQHBmtbUG1h9L2apu4SulCGN3Hqm//9D6FAolf8MYNL7f/YlJl9vy08pj5JuA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"flat-cache": "^6.1.12"
|
||||
"flat-cache": "^6.1.13"
|
||||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
@@ -2168,15 +2168,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/flat-cache": {
|
||||
"version": "6.1.12",
|
||||
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.12.tgz",
|
||||
"integrity": "sha512-U+HqqpZPPXP5d24bWuRzjGqVqUcw64k4nZAbruniDwdRg0H10tvN7H6ku1tjhA4rg5B9GS3siEvwO2qjJJ6f8Q==",
|
||||
"version": "6.1.13",
|
||||
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.13.tgz",
|
||||
"integrity": "sha512-gmtS2PaUjSPa4zjObEIn4WWliKyZzYljgxODBfxugpK6q6HU9ClXzgCJ+nlcPKY9Bt090ypTOLIFWkV0jbKFjw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cacheable": "^1.10.3",
|
||||
"cacheable": "^1.10.4",
|
||||
"flatted": "^3.3.3",
|
||||
"hookified": "^1.10.0"
|
||||
"hookified": "^1.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/flatted": {
|
||||
@@ -3445,35 +3445,35 @@
|
||||
}
|
||||
},
|
||||
"node_modules/rolldown": {
|
||||
"version": "1.0.0-beta.30",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-beta.30.tgz",
|
||||
"integrity": "sha512-H/LmDTUPlm65hWOTjXvd1k0qrGinNi8LrG3JsHVm6Oit7STg0upBmgoG5PZUHbAnGTHr0MLoLyzjmH261lIqSg==",
|
||||
"version": "1.0.0-beta.33",
|
||||
"resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-beta.33.tgz",
|
||||
"integrity": "sha512-mgu118ZuRguC8unhPCbdZbyRbjQfEMiWqlojBA5aRIncBelRaBomnHNpGKYkYWeK7twRz5Cql30xgqqrA3Xelw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@oxc-project/runtime": "=0.78.0",
|
||||
"@oxc-project/types": "=0.78.0",
|
||||
"@rolldown/pluginutils": "1.0.0-beta.30",
|
||||
"@oxc-project/runtime": "=0.82.2",
|
||||
"@oxc-project/types": "=0.82.2",
|
||||
"@rolldown/pluginutils": "1.0.0-beta.33",
|
||||
"ansis": "^4.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"rolldown": "bin/cli.mjs"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@rolldown/binding-android-arm64": "1.0.0-beta.30",
|
||||
"@rolldown/binding-darwin-arm64": "1.0.0-beta.30",
|
||||
"@rolldown/binding-darwin-x64": "1.0.0-beta.30",
|
||||
"@rolldown/binding-freebsd-x64": "1.0.0-beta.30",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.30",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.30",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.30",
|
||||
"@rolldown/binding-linux-arm64-ohos": "1.0.0-beta.30",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.30",
|
||||
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.30",
|
||||
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.30",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.30",
|
||||
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.30",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.30"
|
||||
"@rolldown/binding-android-arm64": "1.0.0-beta.33",
|
||||
"@rolldown/binding-darwin-arm64": "1.0.0-beta.33",
|
||||
"@rolldown/binding-darwin-x64": "1.0.0-beta.33",
|
||||
"@rolldown/binding-freebsd-x64": "1.0.0-beta.33",
|
||||
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.33",
|
||||
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.33",
|
||||
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.33",
|
||||
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.33",
|
||||
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.33",
|
||||
"@rolldown/binding-openharmony-arm64": "1.0.0-beta.33",
|
||||
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.33",
|
||||
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.33",
|
||||
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.33",
|
||||
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.33"
|
||||
}
|
||||
},
|
||||
"node_modules/run-parallel": {
|
||||
@@ -3778,9 +3778,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/stylelint": {
|
||||
"version": "16.23.0",
|
||||
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.23.0.tgz",
|
||||
"integrity": "sha512-69T5aS2LUY306ekt1Q1oaSPwz/jaG9HjyMix3UMrai1iEbuOafBe2Dh8xlyczrxFAy89qcKyZWWtc42XLx3Bbw==",
|
||||
"version": "16.23.1",
|
||||
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.23.1.tgz",
|
||||
"integrity": "sha512-dNvDTsKV1U2YtiUDfe9d2gp902veFeo3ecCWdGlmLm2WFrAV0+L5LoOj/qHSBABQwMsZPJwfC4bf39mQm1S5zw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -4055,11 +4055,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tinyglobby/node_modules/fdir": {
|
||||
"version": "6.4.6",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
|
||||
"integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
@@ -4170,9 +4173,9 @@
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"name": "rolldown-vite",
|
||||
"version": "7.0.12",
|
||||
"resolved": "https://registry.npmjs.org/rolldown-vite/-/rolldown-vite-7.0.12.tgz",
|
||||
"integrity": "sha512-Gr40FRnE98FwPJcMwcJgBwP6U7Qxw/VEtDsFdFjvGUTdgI/tTmF7z7dbVo/ajItM54G+Zo9w5BIrUmat6MbuWQ==",
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/rolldown-vite/-/rolldown-vite-7.1.3.tgz",
|
||||
"integrity": "sha512-J22JlCJQbIRxR6KGwpf76Uq3R4wk6avQHCijXGPsXsbVpPt+Uavg5M5dvzP7XdlAKL8uZE5Xof9j4Y9yu+cxxg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -4180,7 +4183,7 @@
|
||||
"lightningcss": "^1.30.1",
|
||||
"picomatch": "^4.0.3",
|
||||
"postcss": "^8.5.6",
|
||||
"rolldown": "1.0.0-beta.30",
|
||||
"rolldown": "1.0.0-beta.33",
|
||||
"tinyglobby": "^0.2.14"
|
||||
},
|
||||
"bin": {
|
||||
@@ -4245,9 +4248,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite-bundle-analyzer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/vite-bundle-analyzer/-/vite-bundle-analyzer-1.1.0.tgz",
|
||||
"integrity": "sha512-f/9m+6S5yPOHf/QS00rLOkyQ0icZeF67roM3O5LZZMPTOZFU1bHJTptNHCKMJc2yxXzj0Hunwcetrc+vM2LEQQ==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/vite-bundle-analyzer/-/vite-bundle-analyzer-1.2.1.tgz",
|
||||
"integrity": "sha512-dpJMQBnVjieMirpHILmgGsZAWU8fGyqK3ckj6O48wdy3fARlH7Mnz7BfYFUsd3ZdbuXjsYe7t5I/q2zsMOd5ig==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
@@ -4255,11 +4258,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vite/node_modules/fdir": {
|
||||
"version": "6.4.6",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz",
|
||||
"integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==",
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
||||
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"picomatch": "^3 || ^4"
|
||||
},
|
||||
|
||||
@@ -31,21 +31,21 @@
|
||||
"swiped-events": "1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.1.3",
|
||||
"@types/node": "~24.2.0",
|
||||
"browserslist": "~4.25.0",
|
||||
"@biomejs/biome": "2.2.0",
|
||||
"@types/node": "~24.3.0",
|
||||
"browserslist": "~4.25.2",
|
||||
"browserslist-to-esbuild": "~2.1.0",
|
||||
"edge.js": "~6.2.0",
|
||||
"edge.js": "~6.3.0",
|
||||
"less": "~4.4.0",
|
||||
"lightningcss": "~1.30.0",
|
||||
"sharp": "~0.34.0",
|
||||
"sort-package-json": "~3.4.0",
|
||||
"stylelint": "~16.23.0",
|
||||
"stylelint": "~16.23.1",
|
||||
"stylelint-config-standard-less": "~3.0.0",
|
||||
"stylelint-prettier": "~5.0.0",
|
||||
"svgo": "~4.0.0",
|
||||
"typescript": "~5.9.0",
|
||||
"vite": "npm:rolldown-vite@7.0.12",
|
||||
"vite-bundle-analyzer": "~1.1.0"
|
||||
"vite": "npm:rolldown-vite@7.1.3",
|
||||
"vite-bundle-analyzer": "~1.2.1"
|
||||
}
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"autocomplete.min.js","names":["qInput: HTMLInputElement","query: string","res: Response","timeoutId: number","autocomplete: HTMLElement | null","autocompleteList: HTMLUListElement | null","event: KeyboardEvent"],"sources":["../../../../../client/simple/src/js/main/autocomplete.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { assertElement, http, listen, settings } from \"../core/toolkit.ts\";\n\nconst fetchResults = async (qInput: HTMLInputElement, query: string): Promise<void> => {\n try {\n let res: Response;\n\n if (settings.method === \"GET\") {\n res = await http(\"GET\", `./autocompleter?q=${query}`);\n } else {\n res = await http(\"POST\", \"./autocompleter\", { body: new URLSearchParams({ q: query }) });\n }\n\n const results = await res.json();\n\n const autocomplete = document.querySelector<HTMLElement>(\".autocomplete\");\n assertElement(autocomplete);\n\n const autocompleteList = document.querySelector<HTMLUListElement>(\".autocomplete ul\");\n assertElement(autocompleteList);\n\n autocomplete.classList.add(\"open\");\n autocompleteList.replaceChildren();\n\n // show an error message that no result was found\n if (results?.[1]?.length === 0) {\n const noItemFoundMessage = Object.assign(document.createElement(\"li\"), {\n className: \"no-item-found\",\n textContent: settings.translations?.no_item_found ?? \"No results found\"\n });\n autocompleteList.append(noItemFoundMessage);\n return;\n }\n\n const fragment = new DocumentFragment();\n\n for (const result of results[1]) {\n const li = Object.assign(document.createElement(\"li\"), { textContent: result });\n\n listen(\"mousedown\", li, () => {\n qInput.value = result;\n\n const form = document.querySelector<HTMLFormElement>(\"#search\");\n form?.submit();\n\n autocomplete.classList.remove(\"open\");\n });\n\n fragment.append(li);\n }\n\n autocompleteList.append(fragment);\n } catch (error) {\n console.error(\"Error fetching autocomplete results:\", error);\n }\n};\n\nconst qInput = document.getElementById(\"q\") as HTMLInputElement | null;\nassertElement(qInput);\n\nlet timeoutId: number;\n\nlisten(\"input\", qInput, () => {\n clearTimeout(timeoutId);\n\n const query = qInput.value;\n const minLength = settings.autocomplete_min ?? 2;\n\n if (query.length < minLength) return;\n\n timeoutId = window.setTimeout(async () => {\n if (query === qInput.value) {\n await fetchResults(qInput, query);\n }\n }, 300);\n});\n\nconst autocomplete: HTMLElement | null = document.querySelector<HTMLElement>(\".autocomplete\");\nconst autocompleteList: HTMLUListElement | null = document.querySelector<HTMLUListElement>(\".autocomplete ul\");\nif (autocompleteList) {\n listen(\"keyup\", qInput, (event: KeyboardEvent) => {\n const listItems = [...autocompleteList.children] as HTMLElement[];\n\n const currentIndex = listItems.findIndex((item) => item.classList.contains(\"active\"));\n let newCurrentIndex = -1;\n\n switch (event.key) {\n case \"ArrowUp\": {\n const currentItem = listItems[currentIndex];\n if (currentItem && currentIndex >= 0) {\n currentItem.classList.remove(\"active\");\n }\n // we need to add listItems.length to the index calculation here because the JavaScript modulos\n // operator doesn't work with negative numbers\n newCurrentIndex = (currentIndex - 1 + listItems.length) % listItems.length;\n break;\n }\n case \"ArrowDown\": {\n const currentItem = listItems[currentIndex];\n if (currentItem && currentIndex >= 0) {\n currentItem.classList.remove(\"active\");\n }\n newCurrentIndex = (currentIndex + 1) % listItems.length;\n break;\n }\n case \"Tab\":\n case \"Enter\":\n if (autocomplete) {\n autocomplete.classList.remove(\"open\");\n }\n break;\n default:\n break;\n }\n\n if (newCurrentIndex !== -1) {\n const selectedItem = listItems[newCurrentIndex];\n if (selectedItem) {\n selectedItem.classList.add(\"active\");\n\n if (!selectedItem.classList.contains(\"no-item-found\")) {\n const qInput = document.getElementById(\"q\") as HTMLInputElement | null;\n if (qInput) {\n qInput.value = selectedItem.textContent ?? \"\";\n }\n }\n }\n }\n });\n}\n"],"mappings":"+DAIA,MAAM,EAAe,MAAOA,EAA0BC,IAAiC,CACrF,GAAI,CACF,IAAIC,EAKF,EAHE,EAAS,SAAW,MAChB,MAAM,EAAK,MAAO,CAAC,kBAAkB,EAAE,GAAO,CAAC,CAE/C,MAAM,EAAK,OAAQ,kBAAmB,CAAE,KAAM,IAAI,gBAAgB,CAAE,EAAG,CAAO,EAAG,EAAC,CAG1F,IAAM,EAAU,MAAM,EAAI,MAAM,CAE1B,EAAe,SAAS,cAA2B,gBAAgB,CACzE,EAAc,EAAa,CAE3B,IAAM,EAAmB,SAAS,cAAgC,mBAAmB,CAOrF,GANA,EAAc,EAAiB,CAE/B,EAAa,UAAU,IAAI,OAAO,CAClC,EAAiB,iBAAiB,CAG9B,IAAU,IAAI,SAAW,EAAG,CAC9B,IAAM,EAALine truncated
|
||||
{"version":3,"file":"autocomplete.min.js","names":["res: Response","timeoutId: number","autocomplete: HTMLElement | null","autocompleteList: HTMLUListElement | null"],"sources":["../../../../../client/simple/src/js/main/autocomplete.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { assertElement, http, listen, settings } from \"../core/toolkit.ts\";\n\nconst fetchResults = async (qInput: HTMLInputElement, query: string): Promise<void> => {\n try {\n let res: Response;\n\n if (settings.method === \"GET\") {\n res = await http(\"GET\", `./autocompleter?q=${query}`);\n } else {\n res = await http(\"POST\", \"./autocompleter\", { body: new URLSearchParams({ q: query }) });\n }\n\n const results = await res.json();\n\n const autocomplete = document.querySelector<HTMLElement>(\".autocomplete\");\n assertElement(autocomplete);\n\n const autocompleteList = document.querySelector<HTMLUListElement>(\".autocomplete ul\");\n assertElement(autocompleteList);\n\n autocomplete.classList.add(\"open\");\n autocompleteList.replaceChildren();\n\n // show an error message that no result was found\n if (results?.[1]?.length === 0) {\n const noItemFoundMessage = Object.assign(document.createElement(\"li\"), {\n className: \"no-item-found\",\n textContent: settings.translations?.no_item_found ?? \"No results found\"\n });\n autocompleteList.append(noItemFoundMessage);\n return;\n }\n\n const fragment = new DocumentFragment();\n\n for (const result of results[1]) {\n const li = Object.assign(document.createElement(\"li\"), { textContent: result });\n\n listen(\"mousedown\", li, () => {\n qInput.value = result;\n\n const form = document.querySelector<HTMLFormElement>(\"#search\");\n form?.submit();\n\n autocomplete.classList.remove(\"open\");\n });\n\n fragment.append(li);\n }\n\n autocompleteList.append(fragment);\n } catch (error) {\n console.error(\"Error fetching autocomplete results:\", error);\n }\n};\n\nconst qInput = document.getElementById(\"q\") as HTMLInputElement | null;\nassertElement(qInput);\n\nlet timeoutId: number;\n\nlisten(\"input\", qInput, () => {\n clearTimeout(timeoutId);\n\n const query = qInput.value;\n const minLength = settings.autocomplete_min ?? 2;\n\n if (query.length < minLength) return;\n\n timeoutId = window.setTimeout(async () => {\n if (query === qInput.value) {\n await fetchResults(qInput, query);\n }\n }, 300);\n});\n\nconst autocomplete: HTMLElement | null = document.querySelector<HTMLElement>(\".autocomplete\");\nconst autocompleteList: HTMLUListElement | null = document.querySelector<HTMLUListElement>(\".autocomplete ul\");\nif (autocompleteList) {\n listen(\"keyup\", qInput, (event: KeyboardEvent) => {\n const listItems = [...autocompleteList.children] as HTMLElement[];\n\n const currentIndex = listItems.findIndex((item) => item.classList.contains(\"active\"));\n let newCurrentIndex = -1;\n\n switch (event.key) {\n case \"ArrowUp\": {\n const currentItem = listItems[currentIndex];\n if (currentItem && currentIndex >= 0) {\n currentItem.classList.remove(\"active\");\n }\n // we need to add listItems.length to the index calculation here because the JavaScript modulos\n // operator doesn't work with negative numbers\n newCurrentIndex = (currentIndex - 1 + listItems.length) % listItems.length;\n break;\n }\n case \"ArrowDown\": {\n const currentItem = listItems[currentIndex];\n if (currentItem && currentIndex >= 0) {\n currentItem.classList.remove(\"active\");\n }\n newCurrentIndex = (currentIndex + 1) % listItems.length;\n break;\n }\n case \"Tab\":\n case \"Enter\":\n if (autocomplete) {\n autocomplete.classList.remove(\"open\");\n }\n break;\n default:\n break;\n }\n\n if (newCurrentIndex !== -1) {\n const selectedItem = listItems[newCurrentIndex];\n if (selectedItem) {\n selectedItem.classList.add(\"active\");\n\n if (!selectedItem.classList.contains(\"no-item-found\")) {\n const qInput = document.getElementById(\"q\") as HTMLInputElement | null;\n if (qInput) {\n qInput.value = selectedItem.textContent ?? \"\";\n }\n }\n }\n }\n });\n}\n"],"mappings":"+DAIA,MAAM,EAAe,MAAO,EAA0B,IAAiC,CACrF,GAAI,CACF,IAAIA,EAEJ,AAGE,EAHE,EAAS,SAAW,MAChB,MAAM,EAAK,MAAO,qBAAqB,KAEvC,MAAM,EAAK,OAAQ,kBAAmB,CAAE,KAAM,IAAI,gBAAgB,CAAE,EAAG,EAAO,EAAG,EAGzF,IAAM,EAAU,MAAM,EAAI,OAEpB,EAAe,SAAS,cAA2B,iBACzD,EAAc,GAEd,IAAM,EAAmB,SAAS,cAAgC,oBAOlE,GANA,EAAc,GAEd,EAAa,UAAU,IAAI,QAC3B,EAAiB,kBAGb,IAAU,IAAI,SAAW,EAAG,CAC9B,IAAM,EAAqB,OAAO,OAAO,SAAS,cAAc,MAAO,CACrE,UAAW,gBACX,YAAa,EAAS,cAAc,eAAiB,mBACtD,EACD,EAAiB,OAAO,GACxB,MACD,CAED,IAAM,EAAW,IAAI,iBAErB,IAALine truncated
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"infinite_scroll.min.js","names":["onlyImages: boolean","callback: () => void","resultsElement: HTMLElement | null","intersectionObserveOptions: IntersectionObserverInit","observer: IntersectionObserver","entries: IntersectionObserverEntry[]","initialObservedElement: HTMLElement | null"],"sources":["../../../../../client/simple/src/js/main/infinite_scroll.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { assertElement, http, settings } from \"../core/toolkit.ts\";\n\nconst newLoadSpinner = (): HTMLDivElement => {\n return Object.assign(document.createElement(\"div\"), {\n className: \"loader\"\n });\n};\n\nconst loadNextPage = async (onlyImages: boolean, callback: () => void): Promise<void> => {\n const searchForm = document.querySelector<HTMLFormElement>(\"#search\");\n assertElement(searchForm);\n\n const form = document.querySelector<HTMLFormElement>(\"#pagination form.next_page\");\n assertElement(form);\n\n const action = searchForm.getAttribute(\"action\");\n if (!action) {\n throw new Error(\"Form action not defined\");\n }\n\n const paginationElement = document.querySelector<HTMLElement>(\"#pagination\");\n assertElement(paginationElement);\n\n paginationElement.replaceChildren(newLoadSpinner());\n\n try {\n const res = await http(\"POST\", action, { body: new FormData(form) });\n const nextPage = await res.text();\n if (!nextPage) return;\n\n const nextPageDoc = new DOMParser().parseFromString(nextPage, \"text/html\");\n const articleList = nextPageDoc.querySelectorAll<HTMLElement>(\"#urls article\");\n const nextPaginationElement = nextPageDoc.querySelector<HTMLElement>(\"#pagination\");\n\n document.querySelector(\"#pagination\")?.remove();\n\n const urlsElement = document.querySelector<HTMLElement>(\"#urls\");\n if (!urlsElement) {\n throw new Error(\"URLs element not found\");\n }\n\n if (articleList.length > 0 && !onlyImages) {\n // do not add <hr> element when there are only images\n urlsElement.appendChild(document.createElement(\"hr\"));\n }\n\n urlsElement.append(...Array.from(articleList));\n\n if (nextPaginationElement) {\n const results = document.querySelector<HTMLElement>(\"#results\");\n results?.appendChild(nextPaginationElement);\n callback();\n }\n } catch (error) {\n console.error(\"Error loading next page:\", error);\n\n const errorElement = Object.assign(document.createElement(\"div\"), {\n textContent: settings.translations?.error_loading_next_page ?? \"Error loading next page\",\n className: \"dialog-error\"\n });\n errorElement.setAttribute(\"role\", \"alert\");\n document.querySelector(\"#pagination\")?.replaceChildren(errorElement);\n }\n};\n\nconst resultsElement: HTMLElement | null = document.getElementById(\"results\");\nif (!resultsElement) {\n throw new Error(\"Results element not found\");\n}\n\nconst onlyImages: boolean = resultsElement.classList.contains(\"only_template_images\");\nconst observedSelector = \"article.result:last-child\";\n\nconst intersectionObserveOptions: IntersectionObserverInit = {\n rootMargin: \"320px\"\n};\n\nconst observer: IntersectionObserver = new IntersectionObserver((entries: IntersectionObserverEntry[]) => {\n const [paginationEntry] = entries;\n\n if (paginationEntry?.isIntersecting) {\n observer.unobserve(paginationEntry.target);\n\n loadNextPage(onlyImages, () => {\n const nextObservedElement = document.querySelector<HTMLElement>(observedSelector);\n if (nextObservedElement) {\n observer.observe(nextObservedElement);\n }\n }).then(() => {\n // wait until promise is resolved\n });\n }\n}, intersectionObserveOptions);\n\nconst initialObservedElement: HTMLElement | null = document.querySelector<HTMLElement>(observedSelector);\nif (initialObservedElement) {\n observer.observe(initialObservedElement);\n}\n"],"mappings":"wDAIA,MAAM,EAAiB,IACd,OAAO,OAAO,SAAS,cAAc,MAAM,CAAE,CAClD,UAAW,QACZ,EAAC,CAGE,EAAe,MAAOA,EAAqBC,IAAwC,CACvF,IAAM,EAAa,SAAS,cAA+B,UAAU,CACrE,EAAc,EAAW,CAEzB,IAAM,EAAO,SAAS,cAA+B,6BAA6B,CAClF,EAAc,EAAK,CAEnB,IAAM,EAAS,EAAW,aAAa,SAAS,CAChD,GAAI,CAAC,EACH,MAAU,MAAM,0BAAA,CAGlB,IAAM,EAAoB,SAAS,cAA2B,cAAc,CAC5E,EAAc,EAAkB,CAEhC,EAAkB,gBAAgB,GAAgB,CAAC,CAEnD,GAAI,CACF,IAAM,EAAM,MAAM,EAAK,OAAQ,EAAQ,CAAE,KAAM,IAAI,SAAS,EAAO,EAAC,CAC9D,EAAW,MAAM,EAAI,MAAM,CACjC,GAAI,CAAC,EAAU,OAEf,IAAM,EAAc,IAAI,YAAY,gBAAgB,EAAU,YAAY,CACpE,EAAc,EAAY,iBAA8B,gBAAgB,CACxE,EAAwB,EAAY,cAA2B,cAAc,CAEnF,SAAS,cAAc,cAAc,EAAE,QAAQ,CAE/C,IAAM,EAAc,SAAS,cAA2B,QAAQ,CAChE,GAAI,CAAC,EACH,MAAU,MAAM,yBAAA,CAUlB,GAPI,EAAY,OAAS,GAAK,CAAC,GAE7B,EAAY,YAAY,SAAS,cAAc,KAAK,CAAC,CAGvD,EAAY,OAAO,GAAG,MAAM,KAAK,EAAY,CAAC,CAE1C,EAAuB,CACzB,IAAM,EAAU,SAAS,cAA2B,WAAW,CAC/D,GAAS,YAAY,EAAsB,CAC3C,GAAU,AACX,CACF,OAAQ,EAAO,CACd,QAAQ,MAAM,2BAA4B,EAAM,CAEhD,IAAM,EAAe,OAAO,OAAO,SAAS,cAAc,MAAM,CAAE,CAChE,YAAa,EAAS,cAAc,yBAA2B,0BAC/D,UAAW,cACZ,EAAC,CACF,EAAa,aAAa,OAAQ,QAALine truncated
|
||||
{"version":3,"file":"infinite_scroll.min.js","names":["resultsElement: HTMLElement | null","onlyImages: boolean","intersectionObserveOptions: IntersectionObserverInit","observer: IntersectionObserver","initialObservedElement: HTMLElement | null"],"sources":["../../../../../client/simple/src/js/main/infinite_scroll.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { assertElement, http, settings } from \"../core/toolkit.ts\";\n\nconst newLoadSpinner = (): HTMLDivElement => {\n return Object.assign(document.createElement(\"div\"), {\n className: \"loader\"\n });\n};\n\nconst loadNextPage = async (onlyImages: boolean, callback: () => void): Promise<void> => {\n const searchForm = document.querySelector<HTMLFormElement>(\"#search\");\n assertElement(searchForm);\n\n const form = document.querySelector<HTMLFormElement>(\"#pagination form.next_page\");\n assertElement(form);\n\n const action = searchForm.getAttribute(\"action\");\n if (!action) {\n throw new Error(\"Form action not defined\");\n }\n\n const paginationElement = document.querySelector<HTMLElement>(\"#pagination\");\n assertElement(paginationElement);\n\n paginationElement.replaceChildren(newLoadSpinner());\n\n try {\n const res = await http(\"POST\", action, { body: new FormData(form) });\n const nextPage = await res.text();\n if (!nextPage) return;\n\n const nextPageDoc = new DOMParser().parseFromString(nextPage, \"text/html\");\n const articleList = nextPageDoc.querySelectorAll<HTMLElement>(\"#urls article\");\n const nextPaginationElement = nextPageDoc.querySelector<HTMLElement>(\"#pagination\");\n\n document.querySelector(\"#pagination\")?.remove();\n\n const urlsElement = document.querySelector<HTMLElement>(\"#urls\");\n if (!urlsElement) {\n throw new Error(\"URLs element not found\");\n }\n\n if (articleList.length > 0 && !onlyImages) {\n // do not add <hr> element when there are only images\n urlsElement.appendChild(document.createElement(\"hr\"));\n }\n\n urlsElement.append(...Array.from(articleList));\n\n if (nextPaginationElement) {\n const results = document.querySelector<HTMLElement>(\"#results\");\n results?.appendChild(nextPaginationElement);\n callback();\n }\n } catch (error) {\n console.error(\"Error loading next page:\", error);\n\n const errorElement = Object.assign(document.createElement(\"div\"), {\n textContent: settings.translations?.error_loading_next_page ?? \"Error loading next page\",\n className: \"dialog-error\"\n });\n errorElement.setAttribute(\"role\", \"alert\");\n document.querySelector(\"#pagination\")?.replaceChildren(errorElement);\n }\n};\n\nconst resultsElement: HTMLElement | null = document.getElementById(\"results\");\nif (!resultsElement) {\n throw new Error(\"Results element not found\");\n}\n\nconst onlyImages: boolean = resultsElement.classList.contains(\"only_template_images\");\nconst observedSelector = \"article.result:last-child\";\n\nconst intersectionObserveOptions: IntersectionObserverInit = {\n rootMargin: \"320px\"\n};\n\nconst observer: IntersectionObserver = new IntersectionObserver((entries: IntersectionObserverEntry[]) => {\n const [paginationEntry] = entries;\n\n if (paginationEntry?.isIntersecting) {\n observer.unobserve(paginationEntry.target);\n\n loadNextPage(onlyImages, () => {\n const nextObservedElement = document.querySelector<HTMLElement>(observedSelector);\n if (nextObservedElement) {\n observer.observe(nextObservedElement);\n }\n }).then(() => {\n // wait until promise is resolved\n });\n }\n}, intersectionObserveOptions);\n\nconst initialObservedElement: HTMLElement | null = document.querySelector<HTMLElement>(observedSelector);\nif (initialObservedElement) {\n observer.observe(initialObservedElement);\n}\n"],"mappings":"wDAIA,MAAM,MACG,OAAO,OAAO,SAAS,cAAc,OAAQ,CAClD,UAAW,SACZ,EAGG,EAAe,MAAO,EAAqB,IAAwC,CACvF,IAAM,EAAa,SAAS,cAA+B,WAC3D,EAAc,GAEd,IAAM,EAAO,SAAS,cAA+B,8BACrD,EAAc,GAEd,IAAM,EAAS,EAAW,aAAa,UACvC,GAAI,CAAC,EACH,MAAU,MAAM,2BAGlB,IAAM,EAAoB,SAAS,cAA2B,eAC9D,EAAc,GAEd,EAAkB,gBAAgB,KAElC,GAAI,CACF,IAAM,EAAM,MAAM,EAAK,OAAQ,EAAQ,CAAE,KAAM,IAAI,SAAS,GAAO,EAC7D,EAAW,MAAM,EAAI,OAC3B,GAAI,CAAC,EAAU,OAEf,IAAM,EAAc,IAAI,YAAY,gBAAgB,EAAU,aACxD,EAAc,EAAY,iBAA8B,iBACxD,EAAwB,EAAY,cAA2B,eAErE,SAAS,cAAc,gBAAgB,SAEvC,IAAM,EAAc,SAAS,cAA2B,SACxD,GAAI,CAAC,EACH,MAAU,MAAM,0BAUlB,GAPI,EAAY,OAAS,GAAK,CAAC,GAE7B,EAAY,YAAY,SAAS,cAAc,OAGjD,EAAY,OAAO,GAAG,MAAM,KAAK,IAE7B,EAAuB,CACzB,IAAM,EAAU,SAAS,cAA2B,YACpD,GAAS,YAAY,GACrB,GACD,CACF,OAAQ,EAAO,CACd,QAAQ,MAAM,2BAA4B,GAE1C,IAAM,EAAe,OAAO,OAAO,SAAS,cAAc,OAAQ,CAChE,YAAa,EAAS,cAAc,yBAA2B,0BAC/D,UAAW,eACZ,EACD,EAAa,aAAa,OAAQ,SAClC,SAAS,cAAc,gBAAgB,gBAAgB,EACxD,CACF,EAEKA,EAAqC,SAAS,eAAe,WACnE,GAAI,CAAC,EACH,MAAU,MAAM,6BAGlB,MAAMC,EAAsB,EAAe,UAAU,SAAS,wBACxD,EAAmB,4BAEnBC,EAAuD,CAC3D,WAAY,QACb,CAEKC,EAAiC,IAAI,qBAAsB,GAAyC,CACxG,GAAM,CAAC,EAAgB,CAAG,EAEtB,Line truncated
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
import{c as e,e as t,f as n,g as r}from"./searxng.core.min.js";const i={Escape:{key:`ESC`,fun:e=>f(e),des:`remove focus from the focused input`,cat:`Control`},c:{key:`c`,fun:()=>S(),des:`copy url of the selected result to the clipboard`,cat:`Results`},h:{key:`h`,fun:()=>x(o),des:`toggle help window`,cat:`Other`},i:{key:`i`,fun:()=>v(),des:`focus on the search input`,cat:`Control`},n:{key:`n`,fun:()=>m(),des:`go to next page`,cat:`Results`},o:{key:`o`,fun:()=>y(!1),des:`open search result`,cat:`Results`},p:{key:`p`,fun:()=>h(),des:`go to previous page`,cat:`Results`},r:{key:`r`,fun:()=>d(),des:`reload page from the server`,cat:`Control`},t:{key:`t`,fun:()=>y(!0),des:`open the result in a new tab`,cat:`Results`}},a={default:{ArrowLeft:{key:`←`,fun:()=>u(`up`)(),des:`select previous search result`,cat:`Results`},ArrowRight:{key:`→`,fun:()=>u(`down`)(),des:`select next search result`,cat:`Results`},...i},vim:{b:{key:`b`,fun:()=>g(-window.innerHeight),des:`scroll one page up`,cat:`Navigation`},d:{key:`d`,fun:()=>g(window.innerHeight/2),des:`scroll half a page down`,cat:`Navigation`},f:{key:`f`,fun:()=>g(window.innerHeight),des:`scroll one page down`,cat:`Navigation`},g:{key:`g`,fun:()=>_(-document.body.scrollHeight,`top`),des:`scroll to the top of the page`,cat:`Navigation`},j:{key:`j`,fun:()=>u(`down`)(),des:`select next search result`,cat:`Results`},k:{key:`k`,fun:()=>u(`up`)(),des:`select previous search result`,cat:`Results`},u:{key:`u`,fun:()=>g(-window.innerHeight/2),des:`scroll half a page up`,cat:`Navigation`},v:{key:`v`,fun:()=>_(document.body.scrollHeight,`bottom`),des:`scroll to the bottom of the page`,cat:`Navigation`},y:{key:`y`,fun:()=>S(),des:`copy url of the selected result to the clipboard`,cat:`Results`},...i}},o=r.hotkeys&&r.hotkeys in a?a[r.hotkeys]:a.default,s=e=>{let t=e?.closest(`.detail, .result`);return t?.classList.contains(`detail`)??!1},c=e=>e?.closest(`.result`)??void 0,l=e=>e?.classList.contains(`result-images`)??!1,u=e=>(t,r)=>{let i=e,a=document.querySelector(`.result[data-vim-selected]`);if(!a){if(a=document.querySelector(`.result`),!a)return;(e===`down`||e===`up`)&&(i=a)}let o=Array.from(document.querySelectorAll(`.result`)),s;if(typeof i!=`string`)s=i;else switch(i){case`visible`:{let e=document.documentElement.scrollTop||document.body.scrollTop,t=e+document.documentElement.clientHeight;for(let n of o){let r=n.offsetTop,i=r+n.clientHeight;if(i<=t&&r>e){s=n;break}}break}case`down`:s=o[o.indexOf(a)+1]||a;break;case`up`:s=o[o.indexOf(a)-1]||a;break;case`bottom`:s=o.at(-1);break;case`top`:default:s=o[0]}if(s){if(a.removeAttribute(`data-vim-selected`),s.setAttribute(`data-vim-selected`,`true`),!r){let e=s.querySelector(`h3 a`)||s.querySelector(`a`);e?.focus()}t||n.scrollPageToSelected?.()}},d=()=>{document.location.reload()},f=e=>{let t=e.target,r=t?.tagName?.toLowerCase();document.activeElement&&(r===`input`||r===`select`||r===`textarea`)?document.activeElement.blur():n.closeDetail?.()},p=e=>{let t=document.querySelector(e);t&&t.click()},m=()=>{p(`nav#pagination .next_page button[type="submit"]`)},h=()=>{p(`nav#pagination .previous_page button[type="submit"]`)};n.scrollPageToSelected=()=>{let e=document.querySelector(`.result[data-vim-selected]`);if(!e)return;let t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,r=e.offsetTop,i=r+e.clientHeight,a=120;if(!e.previousElementSibling&&i<n){window.scroll(window.scrollX,0);return}if(t>r-a)window.scroll(window.scrollX,r-a);else{let e=t+n;e<i+a&&window.scroll(window.scrollX,i-n+a)}};const g=e=>{window.scrollBy(0,e),u(`visible`)()},_=(e,t)=>{window.scrollTo(0,e),u(t)()},v=()=>{window.scrollTo(0,0);let e=document.querySelector(`#q`);if(e&&(e.focus(),e.setSelectionRange)){let t=e.value.length;e.setSelectionRange(t,t)}},y=e=>{let t=document.querySelector(`.result[data-vim-selected] h3 a`);if(t||=document.querySelector(`.result[data-vim-selected] > a`),!t)return;let n=t.getAttribute(`href`);n&&(e?window.open(n):window.location.href=n)},b=(e,t)=>{let n={};for(let e of Object.values(t)){let t=e.cat;n[t]??=[],n[t].push(e)}let r=Object.keys(n).sort((e,t)=>(n[t]?.length??0)-(n[e]?.length??0)),i=`<a href="#" class="close" aria-label="close" title="close">×</a>`;i+=`<h3>How to navigate SearXNG with hotkeys</h3>`,i+=`<table>`;for(let[e,t]of r.entries()){let a=n[t];if(!a||a.length===0)continue;let o=e%2==0,s=e===r.length-1;o&&(i+=`<tr>`),i+=`<td>`,i+=`<h4>${t}</h4>`,i+=`<ul class="list-unstyled">`;for(let e of a)i+=`<li><kbd>${e.key}</kbd> ${e.des}</li>`;i+=`</ul>`,i+=`</td>`,(!o||s)&&(i+=`</tr>`)}i+=`</table>`,e.innerHTML=i},x=e=>{let t=document.querySelector(`#vim-hotkeys-help`);if(t)t.classList.toggle(`invisible`);else{t=Object.assign(document.createElement(`div`),{id:`vim-hotkeys-help`,className:`dialog-modal`}),b(t,e);let n=document.getElementsByTagName(`body`)[0];n&&n.appendChild(t)}},S=async()=>{let t=document.querySelector(`.result[data-vim-selected] h3 a`);e(t);let n=t.getAttribute(`href`Line truncated
|
||||
import{c as e,e as t,f as n,g as r}from"./searxng.core.min.js";const i={Escape:{key:`ESC`,fun:e=>f(e),des:`remove focus from the focused input`,cat:`Control`},c:{key:`c`,fun:()=>S(),des:`copy url of the selected result to the clipboard`,cat:`Results`},h:{key:`h`,fun:()=>x(o),des:`toggle help window`,cat:`Other`},i:{key:`i`,fun:()=>v(),des:`focus on the search input`,cat:`Control`},n:{key:`n`,fun:()=>m(),des:`go to next page`,cat:`Results`},o:{key:`o`,fun:()=>y(!1),des:`open search result`,cat:`Results`},p:{key:`p`,fun:()=>h(),des:`go to previous page`,cat:`Results`},r:{key:`r`,fun:()=>d(),des:`reload page from the server`,cat:`Control`},t:{key:`t`,fun:()=>y(!0),des:`open the result in a new tab`,cat:`Results`}},a={default:{ArrowLeft:{key:`←`,fun:()=>u(`up`)(),des:`select previous search result`,cat:`Results`},ArrowRight:{key:`→`,fun:()=>u(`down`)(),des:`select next search result`,cat:`Results`},...i},vim:{b:{key:`b`,fun:()=>g(-window.innerHeight),des:`scroll one page up`,cat:`Navigation`},d:{key:`d`,fun:()=>g(window.innerHeight/2),des:`scroll half a page down`,cat:`Navigation`},f:{key:`f`,fun:()=>g(window.innerHeight),des:`scroll one page down`,cat:`Navigation`},g:{key:`g`,fun:()=>_(-document.body.scrollHeight,`top`),des:`scroll to the top of the page`,cat:`Navigation`},j:{key:`j`,fun:()=>u(`down`)(),des:`select next search result`,cat:`Results`},k:{key:`k`,fun:()=>u(`up`)(),des:`select previous search result`,cat:`Results`},u:{key:`u`,fun:()=>g(-window.innerHeight/2),des:`scroll half a page up`,cat:`Navigation`},v:{key:`v`,fun:()=>_(document.body.scrollHeight,`bottom`),des:`scroll to the bottom of the page`,cat:`Navigation`},y:{key:`y`,fun:()=>S(),des:`copy url of the selected result to the clipboard`,cat:`Results`},...i}},o=r.hotkeys&&r.hotkeys in a?a[r.hotkeys]:a.default,s=e=>{let t=e?.closest(`.detail, .result`);return t?.classList.contains(`detail`)??!1},c=e=>e?.closest(`.result`)??void 0,l=e=>e?.classList.contains(`result-images`)??!1,u=e=>(t,r)=>{let i=e,a=document.querySelector(`.result[data-vim-selected]`);if(!a){if(a=document.querySelector(`.result`),!a)return;(e===`down`||e===`up`)&&(i=a)}let o=Array.from(document.querySelectorAll(`.result`)),s;if(typeof i!=`string`)s=i;else switch(i){case`visible`:{let e=document.documentElement.scrollTop||document.body.scrollTop,t=e+document.documentElement.clientHeight;for(let n of o){let r=n.offsetTop,i=r+n.clientHeight;if(i<=t&&r>e){s=n;break}}break}case`down`:s=o[o.indexOf(a)+1]||a;break;case`up`:s=o[o.indexOf(a)-1]||a;break;case`bottom`:s=o.at(-1);break;case`top`:default:s=o[0]}if(s){if(a.removeAttribute(`data-vim-selected`),s.setAttribute(`data-vim-selected`,`true`),!r){let e=s.querySelector(`h3 a`)||s.querySelector(`a`);e?.focus()}t||n.scrollPageToSelected?.()}},d=()=>{document.location.reload()},f=e=>{let t=e.target,r=t?.tagName?.toLowerCase();document.activeElement&&(r===`input`||r===`select`||r===`textarea`)?document.activeElement.blur():n.closeDetail?.()},p=e=>{let t=document.querySelector(e);t&&t.click()},m=()=>{p(`nav#pagination .next_page button[type="submit"]`)},h=()=>{p(`nav#pagination .previous_page button[type="submit"]`)};n.scrollPageToSelected=()=>{let e=document.querySelector(`.result[data-vim-selected]`);if(!e)return;let t=document.documentElement.scrollTop||document.body.scrollTop,n=document.documentElement.clientHeight,r=e.offsetTop,i=r+e.clientHeight;if(!e.previousElementSibling&&i<n){window.scroll(window.scrollX,0);return}if(t>r-120)window.scroll(window.scrollX,r-120);else{let e=t+n;e<i+120&&window.scroll(window.scrollX,i-n+120)}};const g=e=>{window.scrollBy(0,e),u(`visible`)()},_=(e,t)=>{window.scrollTo(0,e),u(t)()},v=()=>{window.scrollTo(0,0);let e=document.querySelector(`#q`);if(e&&(e.focus(),e.setSelectionRange)){let t=e.value.length;e.setSelectionRange(t,t)}},y=e=>{let t=document.querySelector(`.result[data-vim-selected] h3 a`);if(t||=document.querySelector(`.result[data-vim-selected] > a`),!t)return;let n=t.getAttribute(`href`);n&&(e?window.open(n):window.location.href=n)},b=(e,t)=>{let n={};for(let e of Object.values(t)){let t=e.cat;n[t]??=[],n[t].push(e)}let r=Object.keys(n).sort((e,t)=>(n[t]?.length??0)-(n[e]?.length??0)),i=`<a href="#" class="close" aria-label="close" title="close">×</a>`;i+=`<h3>How to navigate SearXNG with hotkeys</h3>`,i+=`<table>`;for(let[e,t]of r.entries()){let a=n[t];if(!a||a.length===0)continue;let o=e%2==0,s=e===r.length-1;o&&(i+=`<tr>`),i+=`<td>`,i+=`<h4>${t}</h4>`,i+=`<ul class="list-unstyled">`;for(let e of a)i+=`<li><kbd>${e.key}</kbd> ${e.des}</li>`;i+=`</ul>`,i+=`</td>`,(!o||s)&&(i+=`</tr>`)}i+=`</table>`,e.innerHTML=i},x=e=>{let t=document.querySelector(`#vim-hotkeys-help`);if(t)t.classList.toggle(`invisible`);else{t=Object.assign(document.createElement(`div`),{id:`vim-hotkeys-help`,className:`dialog-modal`}),b(t,e);let n=document.getElementsByTagName(`body`)[0];n&&n.appendChild(t)}},S=async()=>{let t=document.querySelector(`.result[data-vim-selected] h3 a`);e(t);let n=t.getAttribute(`hre
Line truncated
|
||||
//# sourceMappingURL=keyboard.min.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"keyboard.min.js","names":["baseKeyBinding: Record<string, KeyBinding>","event: KeyboardEvent","keyBindingLayouts: Record<KeyBindingLayout, Record<string, KeyBinding>>","keyBindings: Record<string, KeyBinding>","element?: HTMLElement","resultElement?: HTMLElement","which: HighlightResultElement | HTMLElement","noScroll?: boolean","keepFocus?: boolean","next: HTMLElement | undefined","css_selector: string","amount: number","position: number","nav: HighlightResultElement","newTab: boolean","divElement: HTMLElement","keyBindings: typeof baseKeyBinding","categories: Record<string, KeyBinding[]>","event: PointerEvent","event: FocusEvent"],"sources":["../../../../../client/simple/src/js/main/keyboard.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { assertElement, listen, mutable, settings } from \"../core/toolkit.ts\";\n\nexport type KeyBindingLayout = \"default\" | \"vim\";\n\ntype KeyBinding = {\n key: string;\n fun: (event: KeyboardEvent) => void;\n des: string;\n cat: string;\n};\n\ntype HighlightResultElement = \"down\" | \"up\" | \"visible\" | \"bottom\" | \"top\";\n\n/* common base for layouts */\nconst baseKeyBinding: Record<string, KeyBinding> = {\n Escape: {\n key: \"ESC\",\n fun: (event: KeyboardEvent) => removeFocus(event),\n des: \"remove focus from the focused input\",\n cat: \"Control\"\n },\n c: {\n key: \"c\",\n fun: () => copyURLToClipboard(),\n des: \"copy url of the selected result to the clipboard\",\n cat: \"Results\"\n },\n h: {\n key: \"h\",\n fun: () => toggleHelp(keyBindings),\n des: \"toggle help window\",\n cat: \"Other\"\n },\n i: {\n key: \"i\",\n fun: () => searchInputFocus(),\n des: \"focus on the search input\",\n cat: \"Control\"\n },\n n: {\n key: \"n\",\n fun: () => GoToNextPage(),\n des: \"go to next page\",\n cat: \"Results\"\n },\n o: {\n key: \"o\",\n fun: () => openResult(false),\n des: \"open search result\",\n cat: \"Results\"\n },\n p: {\n key: \"p\",\n fun: () => GoToPreviousPage(),\n des: \"go to previous page\",\n cat: \"Results\"\n },\n r: {\n key: \"r\",\n fun: () => reloadPage(),\n des: \"reload page from the server\",\n cat: \"Control\"\n },\n t: {\n key: \"t\",\n fun: () => openResult(true),\n des: \"open the result in a new tab\",\n cat: \"Results\"\n }\n};\n\nconst keyBindingLayouts: Record<KeyBindingLayout, Record<string, KeyBinding>> = {\n // SearXNG layout\n default: {\n ArrowLeft: {\n key: \"←\",\n fun: () => highlightResult(\"up\")(),\n des: \"select previous search result\",\n cat: \"Results\"\n },\n ArrowRight: {\n key: \"→\",\n fun: () => highlightResult(\"down\")(),\n des: \"select next search result\",\n cat: \"Results\"\n },\n ...baseKeyBinding\n },\n\n // Vim-like keyboard layout\n vim: {\n b: {\n key: \"b\",\n fun: () => scrollPage(-window.innerHeight),\n des: \"scroll one page up\",\n cat: \"Navigation\"\n },\n d: {\n key: \"d\",\n fun: () => scrollPage(window.innerHeight / 2),\n des: \"scroll half a page down\",\n cat: \"Navigation\"\n },\n f: {\n key: \"f\",\n fun: () => scrollPage(window.innerHeight),\n des: \"scroll one page down\",\n cat: \"Navigation\"\n },\n g: {\n key: \"g\",\n fun: () => scrollPageTo(-document.body.scrollHeight, \"top\"),\n des: \"scroll to the top of the page\",\n cat: \"Navigation\"\n },\n j: {\n key: \"j\",\n fun: () => highlightResult(\"down\")(),\n des: \"select next search result\",\n cat: \"Results\"\n },\n k: {\n key: \"k\",\n fun: () => highlightResult(\"up\")(),\n des: \"select previous search result\",\n cat: \"Results\"\n },\n u: {\n key: \"u\",\n fun: () => scrollPage(-window.innerHeight / 2),\n des: \"scroll half a page up\",\n cat: \"Navigation\"\n },\n v: {\n key: \"v\",\n fun: () => scrollPageTo(document.body.scrollHeight, \"bottom\"),\n des: \"scroll to the bottom of the page\",\n cat: \"Navigation\"\n },\n y: {\n key: \"y\",\n fun: () => copyURLToClipboard(),\n des: \"copy url of the selected result to the clipboard\",\n cat: \"Results\"\n },\n ...baseKeyBinding\n }\n};\n\nconst keyBindings: Record<string, KeyBinding> =\n settings.hotkeys && settings.hotkeys in keyBindingLayouts\n ? keyBindingLayouts[settings.hotkeys]\n : keyBindingLayouts.default;\n\nconst isElementInDetail = (element?: HTMLElement): boolean => {\n const ancestor = element?.closest(\".detail, .result\");\n return ancestor?.classList.contains(\"detail\") ?? false;\n};\n\nconst getResultElement = (element?: HTMLElement): HTMLElement | undefined => {\n return element?.closest(\".result\") ?? undefined;\n};\n\nconst isImageResult = (resultElement?: HTMLine truncated
|
||||
{"version":3,"file":"keyboard.min.js","names":["baseKeyBinding: Record<string, KeyBinding>","keyBindingLayouts: Record<KeyBindingLayout, Record<string, KeyBinding>>","keyBindings: Record<string, KeyBinding>","next: HTMLElement | undefined","categories: Record<string, KeyBinding[]>"],"sources":["../../../../../client/simple/src/js/main/keyboard.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { assertElement, listen, mutable, settings } from \"../core/toolkit.ts\";\n\nexport type KeyBindingLayout = \"default\" | \"vim\";\n\ntype KeyBinding = {\n key: string;\n fun: (event: KeyboardEvent) => void;\n des: string;\n cat: string;\n};\n\ntype HighlightResultElement = \"down\" | \"up\" | \"visible\" | \"bottom\" | \"top\";\n\n/* common base for layouts */\nconst baseKeyBinding: Record<string, KeyBinding> = {\n Escape: {\n key: \"ESC\",\n fun: (event: KeyboardEvent) => removeFocus(event),\n des: \"remove focus from the focused input\",\n cat: \"Control\"\n },\n c: {\n key: \"c\",\n fun: () => copyURLToClipboard(),\n des: \"copy url of the selected result to the clipboard\",\n cat: \"Results\"\n },\n h: {\n key: \"h\",\n fun: () => toggleHelp(keyBindings),\n des: \"toggle help window\",\n cat: \"Other\"\n },\n i: {\n key: \"i\",\n fun: () => searchInputFocus(),\n des: \"focus on the search input\",\n cat: \"Control\"\n },\n n: {\n key: \"n\",\n fun: () => GoToNextPage(),\n des: \"go to next page\",\n cat: \"Results\"\n },\n o: {\n key: \"o\",\n fun: () => openResult(false),\n des: \"open search result\",\n cat: \"Results\"\n },\n p: {\n key: \"p\",\n fun: () => GoToPreviousPage(),\n des: \"go to previous page\",\n cat: \"Results\"\n },\n r: {\n key: \"r\",\n fun: () => reloadPage(),\n des: \"reload page from the server\",\n cat: \"Control\"\n },\n t: {\n key: \"t\",\n fun: () => openResult(true),\n des: \"open the result in a new tab\",\n cat: \"Results\"\n }\n};\n\nconst keyBindingLayouts: Record<KeyBindingLayout, Record<string, KeyBinding>> = {\n // SearXNG layout\n default: {\n ArrowLeft: {\n key: \"←\",\n fun: () => highlightResult(\"up\")(),\n des: \"select previous search result\",\n cat: \"Results\"\n },\n ArrowRight: {\n key: \"→\",\n fun: () => highlightResult(\"down\")(),\n des: \"select next search result\",\n cat: \"Results\"\n },\n ...baseKeyBinding\n },\n\n // Vim-like keyboard layout\n vim: {\n b: {\n key: \"b\",\n fun: () => scrollPage(-window.innerHeight),\n des: \"scroll one page up\",\n cat: \"Navigation\"\n },\n d: {\n key: \"d\",\n fun: () => scrollPage(window.innerHeight / 2),\n des: \"scroll half a page down\",\n cat: \"Navigation\"\n },\n f: {\n key: \"f\",\n fun: () => scrollPage(window.innerHeight),\n des: \"scroll one page down\",\n cat: \"Navigation\"\n },\n g: {\n key: \"g\",\n fun: () => scrollPageTo(-document.body.scrollHeight, \"top\"),\n des: \"scroll to the top of the page\",\n cat: \"Navigation\"\n },\n j: {\n key: \"j\",\n fun: () => highlightResult(\"down\")(),\n des: \"select next search result\",\n cat: \"Results\"\n },\n k: {\n key: \"k\",\n fun: () => highlightResult(\"up\")(),\n des: \"select previous search result\",\n cat: \"Results\"\n },\n u: {\n key: \"u\",\n fun: () => scrollPage(-window.innerHeight / 2),\n des: \"scroll half a page up\",\n cat: \"Navigation\"\n },\n v: {\n key: \"v\",\n fun: () => scrollPageTo(document.body.scrollHeight, \"bottom\"),\n des: \"scroll to the bottom of the page\",\n cat: \"Navigation\"\n },\n y: {\n key: \"y\",\n fun: () => copyURLToClipboard(),\n des: \"copy url of the selected result to the clipboard\",\n cat: \"Results\"\n },\n ...baseKeyBinding\n }\n};\n\nconst keyBindings: Record<string, KeyBinding> =\n settings.hotkeys && settings.hotkeys in keyBindingLayouts\n ? keyBindingLayouts[settings.hotkeys]\n : keyBindingLayouts.default;\n\nconst isElementInDetail = (element?: HTMLElement): boolean => {\n const ancestor = element?.closest(\".detail, .result\");\n return ancestor?.classList.contains(\"detail\") ?? false;\n};\n\nconst getResultElement = (element?: HTMLElement): HTMLElement | undefined => {\n return element?.closest(\".result\") ?? undefined;\n};\n\nconst isImageResult = (resultElement?: HTMLElement): boolean => {\n return resultElement?.classList.contains(\"result-images\") ?? false;\n};\n\nconst highlightResult =\n (which: HighlightResultElement | HTMLElement) =>\n (noScroll?: boolean, keepFocus?: boolean): void => {\n let effectiveWhich = which;\n let current = document.querySelector<HTMLElement>(\".result[data-vim-selected]\");\n if (!current) {\Line truncated
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"mappings":";iDAIA,EAAO,QAAS,oBAAqB,eAAmCA,EAAc,CACpF,EAAM,gBAAgB,CACtB,KAAK,UAAU,OAAO,mBAAmB,CAEzC,GAAM,CACJ,OACA,QACA,YACA,cACA,MACA,eACA,QACA,SACA,OACA,SACA,aACA,UACA,UACA,QACD,sBAfK,CACJ,OACA,QACA,YACA,cACA,MACA,eACA,QACA,SACA,OACA,SACA,aACA,UACA,UACA,QACD,CAAG,MAAM,OAAO,sBAdf,OACA,QACA,YACA,cACA,MACA,eACA,QACA,SACA,OACA,SACA,aACA,UACA,UACA,oBAEF,mBAAO,uBAEP,GAAM,CAAE,cAAe,EAAQ,SAAQ,SAAQ,aAAY,CAAG,KAAK,QAE7D,EAAM,OAAO,WAAW,GAAU,IAAI,CACtC,EAAM,OAAO,WAAW,GAAU,IAAI,CACtC,EAAO,IAAI,EAAK,CAAE,QAAS,GAAI,eAAgB,EAAO,GACtD,EAAM,IAAI,EAAM,CACZ,SACR,OAAQ,CAAC,IAAI,EAAU,CAAE,OAAQ,IAAI,EAAI,CAAE,QAAS,EAAI,EAAG,EAAE,EACvD,MACP,GAED,GAAI,CACF,IAAM,EAAe,IAAI,EAAa,CACpC,SAAU,CACR,IAAI,EAAQ,CACV,SAAU,IAAI,EAAM,EAAW,CAAC,EAAK,CAAI,EAAC,CAC3C,EACF,CACF,GAEK,EAAc,IAAI,EAAY,CAClC,OAAQ,EACR,MAAO,IAAI,EAAM,CACf,MAAO,IAAI,EAAO,CAChB,OAAQ,EACR,KAAM,IAAI,EAAK,CAAE,MAAO,SAAW,EACpC,EACF,EACF,GAED,EAAI,SAAS,EAAY,CAC1B,MAAQ,EAAO,CACd,QAAQ,MAAM,iCAAkC,EAAM,CAGxD,GAAI,EACF,GAAI,CACF,IAAM,EAAY,IAAI,EAAa,CACjC,SAAU,IAAI,IAAU,aAAa,KAAK,MAAM,EAAW,CAAE,CAC3D,eAAgB,YAChB,kBAAmB,WACpB,EAAC,CACH,EAEK,EAAW,IAAI,EAAY,CAC/B,OAAQ,EACR,MAAO,IAAI,EAAM,CACf,OAAQ,IAAI,EAAO,CAAE,MAAO,UAAW,MAAO,CAAG,GACjD,KAAM,IAAI,EAAK,CAAE,MAAO,WAAa,EACtC,EACF,GAED,EAAI,SAAS,EAAS,CAEtB,EAAK,IAAI,EAAU,WAAW,CAAE,CAAE,QAAS,CAAC,GAAI,GAAI,GAAI,EAAG,CAAE,EAAC,CAC/D,MAAQ,EAAO,CACd,QAAQ,MAAM,kCAAmC,EAAM,CAG5D,EAAC","names":["event: Event"],"ignoreList":[],"sources":["../../../../../client/simple/src/js/main/mapresult.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { listen } from \"../core/toolkit.ts\";\n\nlisten(\"click\", \".searxng_init_map\", async function (this: HTMLElement, event: Event) {\n event.preventDefault();\n this.classList.remove(\"searxng_init_map\");\n\n const {\n View,\n OlMap,\n TileLayer,\n VectorLayer,\n OSM,\n VectorSource,\n Style,\n Stroke,\n Fill,\n Circle,\n fromLonLat,\n GeoJSON,\n Feature,\n Point\n } = await import(\"../pkg/ol.ts\");\n import(\"ol/ol.css\");\n\n const { leafletTarget: target, mapLon, mapLat, mapGeojson } = this.dataset;\n\n const lon = Number.parseFloat(mapLon || \"0\");\n const lat = Number.parseFloat(mapLat || \"0\");\n const view = new View({ maxZoom: 16, enableRotation: false });\n const map = new OlMap({\n target: target,\n layers: [new TileLayer({ source: new OSM({ maxZoom: 16 }) })],\n view: view\n });\n\n try {\n const markerSource = new VectorSource({\n features: [\n new Feature({\n geometry: new Point(fromLonLat([lon, lat]))\n })\n ]\n });\n\n const markerLayer = new VectorLayer({\n source: markerSource,\n style: new Style({\n image: new Circle({\n radius: 6,\n fill: new Fill({ color: \"#3050ff\" })\n })\n })\n });\n\n map.addLayer(markerLayer);\n } catch (error) {\n console.error(\"Failed to create marker layer:\", error);\n }\n\n if (mapGeojson) {\n try {\n const geoSource = new VectorSource({\n features: new GeoJSON().readFeatures(JSON.parse(mapGeojson), {\n dataProjection: \"EPSG:4326\",\n featureProjection: \"EPSG:3857\"\n })\n });\n\n const geoLayer = new VectorLayer({\n source: geoSource,\n style: new Style({\n stroke: new Stroke({ color: \"#3050ff\", width: 2 }),\n fill: new Fill({ color: \"#3050ff33\" })\n })\n });\n\n map.addLayer(geoLayer);\n\n view.fit(geoSource.getExtent(), { padding: [20, 20, 20, 20] });\n } catch (error) {\n console.error(\"Failed to create GeoJSON layer:\", error);\n }\n }\n});\n"],"file":"js/mapresult.min.js"}
|
||||
{"version":3,"mappings":";iDAIA,EAAO,QAAS,oBAAqB,eAAmC,EAAc,CACpF,EAAM,iBACN,KAAK,UAAU,OAAO,oBAEtB,GAAM,CACJ,OACA,QACA,YACA,cACA,MACA,eACA,QACA,SACA,OACA,SACA,aACA,UACA,UACA,QACD,sBAfK,CACJ,OACA,QACA,YACA,cACA,MACA,eACA,QACA,SACA,OACA,SACA,aACA,UACA,UACA,QACD,CAAG,MAAM,OAAO,sBAdf,OACA,QACA,YACA,cACA,MACA,eACA,QACA,SACA,OACA,SACA,aACA,UACA,UACA,cAEF,yBAAO,uBAEP,GAAM,CAAE,cAAe,EAAQ,SAAQ,SAAQ,aAAY,CAAG,KAAK,QAE7D,EAAM,OAAO,WAAW,GAAU,KAClC,EAAM,OAAO,WAAW,GAAU,KAClC,EAAO,IAAI,EAAK,CAAE,QAAS,GAAI,eAAgB,GAAO,EACtD,EAAM,IAAI,EAAM,CACZ,SACR,OAAQ,CAAC,IAAI,EAAU,CAAE,OAAQ,IAAI,EAAI,CAAE,QAAS,GAAI,EAAG,EAAE,CACvD,OACP,EAED,GAAI,CACF,IAAM,EAAe,IAAI,EAAa,CACpC,SAAU,CACR,IAAI,EAAQ,CACV,SAAU,IAAI,EAAM,EAAW,CAAC,EAAK,EAAI,GAC1C,EACF,CACF,EAEK,EAAc,IAAI,EAAY,CAClC,OAAQ,EACR,MAAO,IAAI,EAAM,CACf,MAAO,IAAI,EAAO,CAChB,OAAQ,EACR,KAAM,IAAI,EAAK,CAAE,MAAO,UAAW,EACpC,EACF,EACF,EAED,EAAI,SAAS,EACd,OAAQ,EAAO,CACd,QAAQ,MAAM,iCAAkC,EACjD,CAED,GAAI,EACF,GAAI,CACF,IAAM,EAAY,IAAI,EAAa,CACjC,SAAU,IAAI,IAAU,aAAa,KAAK,MAAM,GAAa,CAC3D,eAAgB,YAChB,kBAAmB,YACpB,EACF,EAEK,EAAW,IAAI,EAAY,CAC/B,OAAQ,EACR,MAAO,IAAI,EAAM,CACf,OAAQ,IAAI,EAAO,CAAE,MAAO,UAAW,MAAO,EAAG,EACjD,KAAM,IAAI,EAAK,CAAE,MAAO,YAAa,EACtC,EACF,EAED,EAAI,SAAS,GAEb,EAAK,IAAI,EAAU,YAAa,CAAE,QAAS,CAAC,GAAI,GAAI,GAAI,GAAG,CAAE,CAC9D,OAAQ,EAAO,CACd,QAAQ,MAAM,kCAAmC,EAClD,CAEJ","names":[],"ignoreList":[],"sources":["../../../../../client/simple/src/js/main/mapresult.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { listen } from \"../core/toolkit.ts\";\n\nlisten(\"click\", \".searxng_init_map\", async function (this: HTMLElement, event: Event) {\n event.preventDefault();\n this.classList.remove(\"searxng_init_map\");\n\n const {\n View,\n OlMap,\n TileLayer,\n VectorLayer,\n OSM,\n VectorSource,\n Style,\n Stroke,\n Fill,\n Circle,\n fromLonLat,\n GeoJSON,\n Feature,\n Point\n } = await import(\"../pkg/ol.ts\");\n import(\"ol/ol.css\");\n\n const { leafletTarget: target, mapLon, mapLat, mapGeojson } = this.dataset;\n\n const lon = Number.parseFloat(mapLon || \"0\");\n const lat = Number.parseFloat(mapLat || \"0\");\n const view = new View({ maxZoom: 16, enableRotation: false });\n const map = new OlMap({\n target: target,\n layers: [new TileLayer({ source: new OSM({ maxZoom: 16 }) })],\n view: view\n });\n\n try {\n const markerSource = new VectorSource({\n features: [\n new Feature({\n geometry: new Point(fromLonLat([lon, lat]))\n })\n ]\n });\n\n const markerLayer = new VectorLayer({\n source: markerSource,\n style: new Style({\n image: new Circle({\n radius: 6,\n fill: new Fill({ color: \"#3050ff\" })\n })\n })\n });\n\n map.addLayer(markerLayer);\n } catch (error) {\n console.error(\"Failed to create marker layer:\", error);\n }\n\n if (mapGeojson) {\n try {\n const geoSource = new VectorSource({\n features: new GeoJSON().readFeatures(JSON.parse(mapGeojson), {\n dataProjection: \"EPSG:4326\",\n featureProjection: \"EPSG:3857\"\n })\n });\n\n const geoLayer = new VectorLayer({\n source: geoSource,\n style: new Style({\n stroke: new Stroke({ color: \"#3050ff\", width: 2 }),\n fill: new Fill({ color: \"#3050ff33\" })\n })\n });\n\n map.addLayer(geoLayer);\n\n view.fit(geoSource.getExtent(), { padding: [20, 20, 20, 20] });\n } catch (error) {\n console.error(\"Failed to create GeoJSON layer:\", error);\n }\n }\n});\n"],"file":"js/mapresult.min.js"}
|
||||
+7
-7
@@ -1,8 +1,8 @@
|
||||
var e={ADD:`add`,REMOVE:`remove`},t={PROPERTYCHANGE:`propertychange`},n={CHANGE:`change`,ERROR:`error`,BLUR:`blur`,CLEAR:`clear`,CONTEXTMENU:`contextmenu`,CLICK:`click`,DBLCLICK:`dblclick`,DRAGENTER:`dragenter`,DRAGOVER:`dragover`,DROP:`drop`,FOCUS:`focus`,KEYDOWN:`keydown`,KEYPRESS:`keypress`,LOAD:`load`,RESIZE:`resize`,TOUCHMOVE:`touchmove`,WHEEL:`wheel`},r=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}},i=r;function a(e,t,n){let r,i;n||=o;let a=0,s=e.length,c=!1;for(;a<s;)r=a+(s-a>>1),i=+n(e[r],t),i<0?a=r+1:(s=r,c=!i);return c?a:~a}function o(e,t){return e>t?1:e<t?-1:0}function s(e,t){return e<t?1:e>t?-1:0}function c(e,t,n){if(e[0]<=t)return 0;let r=e.length;if(t<=e[r-1])return r-1;if(typeof n==`function`){for(let i=1;i<r;++i){let r=e[i];if(r===t)return i;if(r<t)return n(t,e[i-1],r)>0?i-1:i}return r-1}if(n>0){for(let n=1;n<r;++n)if(e[n]<t)return n-1;return r-1}if(n<0){for(let n=1;n<r;++n)if(e[n]<=t)return n;return r-1}for(let n=1;n<r;++n){if(e[n]==t)return n;if(e[n]<t)return e[n-1]-t<t-e[n]?n-1:n}return r-1}function l(e,t,n){for(;t<n;){let r=e[t];e[t]=e[n],e[n]=r,++t,--n}}function u(e,t){let n=Array.isArray(t)?t:[t],r=n.length;for(let t=0;t<r;t++)e[e.length]=n[t]}function d(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function f(e,t,n){let r=t||o;return e.every(function(t,i){if(i===0)return!0;let a=r(e[i-1],t);return!(a>0||n&&a===0)})}function p(){return!0}function m(){return!1}function h(){}function g(e){let t,n,r;return function(){let i=Array.prototype.slice.call(arguments);return(!n||this!==r||!d(i,n))&&(r=this,n=i,t=e.apply(this,arguments)),t}}function _(e){function t(){let t;try{t=e()}catch(e){return Promise.reject(e)}return t instanceof Promise?t:Promise.resolve(t)}return t()}function v(e){for(let t in e)delete e[t]}function y(e){let t;for(t in e)return!1;return!t}var b=class{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},x=b,S=class extends i{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;let n=this.listeners_||={},r=n[e]||(n[e]=[]);r.includes(t)||r.push(t)}dispatchEvent(e){let t=typeof e==`string`,n=t?e:e.type,r=this.listeners_&&this.listeners_[n];if(!r)return;let i=t?new x(e):e;i.target||=this.eventTarget_||this;let a=this.dispatching_||={},o=this.pendingRemovals_||={};n in a||(a[n]=0,o[n]=0),++a[n];let s;for(let e=0,t=r.length;e<t;++e)if(s=`handleEvent`in r[e]?r[e].handleEvent(i):r[e].call(this,i),s===!1||i.propagationStopped){s=!1;break}if(--a[n]===0){let e=o[n];for(delete o[n];e--;)this.removeEventListener(n,h);delete a[n]}return s}disposeInternal(){this.listeners_&&v(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,t){if(!this.listeners_)return;let n=this.listeners_[e];if(!n)return;let r=n.indexOf(t);r!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(n[r]=h,++this.pendingRemovals_[e]):(n.splice(r,1),n.length===0&&delete this.listeners_[e]))}},C=S;function w(e,t,n,r,i){if(i){let i=n;n=function(a){return e.removeEventListener(t,n),i.call(r??this,a)}}else r&&r!==e&&(n=n.bind(r));let a={target:e,type:t,listener:n};return e.addEventListener(t,n),a}function T(e,t,n,r){return w(e,t,n,r,!0)}function E(e){e&&e.target&&(e.target.removeEventListener(e.type,e.listener),v(e))}var D=class extends C{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(n.CHANGE)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){let n=e.length,r=Array(n);for(let i=0;i<n;++i)r[i]=w(this,e[i],t);return r}return w(this,e,t)}onceInternal(e,t){let n;if(Array.isArray(e)){let r=e.length;n=Array(r);for(let i=0;i<r;++i)n[i]=T(this,e[i],t)}else n=T(this,e,t);return t.ol_key=n,n}unInternal(e,t){let n=t.ol_key;if(n)O(n);else if(Array.isArray(e))for(let n=0,r=e.length;n<r;++n)this.removeEventListener(e[n],t);else this.removeEventListener(e,t)}};D.prototype.on,D.prototype.once,D.prototype.un;function O(e){if(Array.isArray(e))for(let t=0,n=e.length;t<n;++t)E(e[t]);else E(e)}var k=D;function A(){throw Error(`Unimplemented abstract method.`)}let j=0;function M(e){return e.ol_uid||=String(++j)}var ee=class extends x{constructor(e,t,n){super(e),this.key=t,this.oldValue=n}},te=class extends k{constructor(e){super(),this.on,this.once,this.un,M(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let t;return this.values_&&this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.Line truncated
|
||||
`).reduce((t,n)=>Math.max(t,za(e,n)),0);return n[t]=r,r}function Va(e,t){let n=[],r=[],i=[],a=0,o=0,s=0,c=0;for(let l=0,u=t.length;l<=u;l+=2){let d=t[l];if(d===`
|
||||
`||l===u){a=Math.max(a,o),i.push(o),o=0,s+=c,c=0;continue}let f=t[l+1]||e.font,p=za(f,d);n.push(p),o+=p;let m=La(f);r.push(m),c=Math.max(c,m)}return{width:a,height:s,widths:n,heights:r,lineWidths:i}}function Ha(e,t,n,r,i,a,o,s,c,l,u){e.save(),n!==1&&(e.globalAlpha===void 0?e.globalAlpha=e=>e.globalAlpha*=n:e.globalAlpha*=n),t&&e.transform.apply(e,t),r.contextInstructions?(e.translate(c,l),e.scale(u[0],u[1]),Ua(r,e)):u[0]<0||u[1]<0?(e.translate(c,l),e.scale(u[0],u[1]),e.drawImage(r,i,a,o,s,0,0,o,s)):e.drawImage(r,i,a,o,s,c,l,o*u[0],s*u[1]),e.restore()}function Ua(e,t){let n=e.contextInstructions;for(let e=0,r=n.length;e<r;e+=2)Array.isArray(n[e+1])?t[n[e]].apply(t,n[e+1]):t[n[e]]=n[e+1]}var Wa=class extends ua{constructor(e,t,n,r,i,a,o){super(),this.context_=e,this.pixelRatio_=t,this.extent_=n,this.transform_=r,this.transformRotation_=r?$e(Math.atan2(r[1],r[0]),10):0,this.viewRotation_=i,this.squaredTolerance_=a,this.userTransform_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_=``,this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Un()}drawImages_(e,t,n,r){if(!this.image_)return;let i=Qn(e,t,n,r,this.transform_,this.pixelCoordinates_),a=this.context_,o=this.tmpLocalTransform_,s=a.globalAlpha;this.imageOpacity_!=1&&(a.globalAlpha=s*this.imageOpacity_);let c=this.imageRotation_;this.transformRotation_===0&&(c-=this.viewRotation_),this.imageRotateWithView_&&(c+=this.viewRotation_);for(let e=0,t=i.length;e<t;e+=2){let t=i[e]-this.imageAnchorX_,n=i[e+1]-this.imageAnchorY_;if(c!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){let e=t+this.imageAnchorX_,r=n+this.imageAnchorY_;Gn(o,e,r,1,1,c,-e,-r),a.save(),a.transform.apply(a,o),a.translate(e,r),a.scale(this.imageScale_[0],this.imageScale_[1]),a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),a.restore()}else a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,t,n,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(a.globalAlpha=s)}drawText_(e,t,n,r){if(!this.textState_||this.text_===``)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);let i=Qn(e,t,n,r,this.transform_,this.pixelCoordinates_),a=this.context_,o=this.textRotation_;for(this.transformRotation_===0&&(o-=this.viewRotation_),this.textRotateWithView_&&(o+=this.viewRotation_);t<n;t+=r){let e=i[t]+this.textOffsetX_,n=i[t+1]+this.textOffsetY_;o!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(a.save(),a.translate(e-this.textOffsetX_,n-this.textOffsetY_),a.rotate(o),a.translate(this.textOffsetX_,this.textOffsetY_),a.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&a.strokeText(this.text_,0,0),this.textFillState_&&a.fillText(this.text_,0,0),a.restore()):(this.textStrokeState_&&a.strokeText(this.text_,e,n),this.textFillState_&&a.fillText(this.text_,e,n))}}moveToLineTo_(e,t,n,r,i){let a=this.context_,o=Qn(e,t,n,r,this.transform_,this.pixelCoordinates_);a.moveTo(o[0],o[1]);let s=o.length;i&&(s-=2);for(let e=2;e<s;e+=2)a.lineTo(o[e],o[e+1]);return i&&a.closePath(),n}drawRings_(e,t,n,r){for(let i=0,a=n.length;i<a;++i)t=this.moveToLineTo_(e,t,n[i],r,!0);return t}drawCircle(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),ze(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);let t=lr(e,this.transform_,this.pixelCoordinates_),n=t[2]-t[0],r=t[3]-t[1],i=Math.sqrt(n*n+r*r),a=this.context_;a.beginPath(),a.arc(t[0],t[1],i,0,2*Math.PI),this.fillState_&&a.fill(),this.strokeState_&&a.stroke()}this.text_!==``&&this.drawText_(e.getCenter(),0,2,2)}}setStyle(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}setTransform(e){this.transform_=e}drawGeometry(e){let t=e.getType();switch(t){case`Point`:this.drawPoint(e);break;case`LineString`:this.drawLineString(e);break;case`Polygon`:this.drawPolygon(e);break;case`MultiPoint`:this.drawMultiPoint(e);break;case`MultiLineString`:this.drawMultiLineString(e);break;case`MultiPolygon`:this.drawMultiPolygon(e);break;case`GeometryCollection`:this.drawGeometryCollection(e);break;case`Circle`:this.dr
Line truncated
|
||||
`,``),e.push(t,``),e}function rc(e,t,n){return n%2==0&&(e+=t),e}var ic=class{constructor(e,t,n,r,i){this.overlaps=n,this.pixelRatio=t,this.resolution=e,this.alignAndScaleFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=Un(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=i?new qs:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,t,n,r){let i=e+t+n+r;if(this.labels_[i])return this.labels_[i];let a=r?this.strokeStates[r]:null,o=n?this.fillStates[n]:null,s=this.textStates[t],c=this.pixelRatio,l=[s.scale[0]*c,s.scale[1]*c],u=s.justify?zs[s.justify]:tc(Array.isArray(e)?e[0]:e,s.textAlign||Ea),d=r&&a.lineWidth?a.lineWidth:0,f=Array.isArray(e)?e:String(e).split(`
|
||||
`).reduce(nc,[]),{width:p,height:m,widths:h,heights:g,lineWidths:_}=Va(s,f),v=p+d,y=[],b=(v+2)*l[0],x=(m+d)*l[1],S={width:b<0?Math.floor(b):Math.ceil(b),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:y};(l[0]!=1||l[1]!=1)&&y.push(`scale`,l),r&&(y.push(`strokeStyle`,a.strokeStyle),y.push(`lineWidth`,d),y.push(`lineCap`,a.lineCap),y.push(`lineJoin`,a.lineJoin),y.push(`miterLimit`,a.miterLimit),y.push(`setLineDash`,[a.lineDash]),y.push(`lineDashOffset`,a.lineDashOffset)),n&&y.push(`fillStyle`,o.fillStyle),y.push(`textBaseline`,`middle`),y.push(`textAlign`,`center`);let C=.5-u,w=u*v+C*d,T=[],E=[],D=0,O=0,k=0,A=0,j;for(let e=0,t=f.length;e<t;e+=2){let t=f[e];if(t===`
|
||||
`){O+=D,D=0,w=u*v+C*d,++A;continue}let i=f[e+1]||s.font;i!==j&&(r&&T.push(`font`,i),n&&E.push(`font`,i),j=i),D=Math.max(D,g[k]);let a=[t,w+C*h[k]+u*(h[k]-_[A]),.5*(d+D)+O];w+=h[k],r&&T.push(`strokeText`,a),n&&E.push(`fillText`,a),++k}return Array.prototype.push.apply(y,T),Array.prototype.push.apply(y,E),this.labels_[i]=S,S}replayTextBackground_(e,t,n,r,i,a,o){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,i),e.lineTo.apply(e,t),a&&(this.alignAndScaleFill_=a[2],e.fillStyle=a[1],this.fill_(e)),o&&(this.setStrokeStyle_(e,o),e.stroke())}calculateImageOrLabelDimensions_(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){o*=d[0],s*=d[1];let g=n-o,_=r-s,v=i+c>e?e-c:i,y=a+l>t?t-l:a,b=p[3]+v*d[0]+p[1],x=p[0]+y*d[1]+p[2],S=g-p[3],C=_-p[0];(m||u!==0)&&(Ys[0]=S,Qs[0]=S,Ys[1]=C,Xs[1]=C,Xs[0]=S+b,Zs[0]=Xs[0],Zs[1]=C+x,Qs[1]=Zs[1]);let w;return u===0?ye(Math.min(S,S+b),Math.min(C,C+x),Math.max(S,S+b),Math.max(C,C+x),Js):(w=Gn(Un(),n,r,1,1,u,-n,-r),B(w,Ys),B(w,Xs),B(w,Zs),B(w,Qs),ye(Math.min(Ys[0],Xs[0],Zs[0],Qs[0]),Math.min(Ys[1],Xs[1],Zs[1],Qs[1]),Math.max(Ys[0],Xs[0],Zs[0],Qs[0]),Math.max(Ys[1],Xs[1],Zs[1],Qs[1]),Js)),f&&(g=Math.round(g),_=Math.round(_)),{drawImageX:g,drawImageY:_,drawImageW:v,drawImageH:y,originX:c,originY:l,declutterBox:{minX:Js[0],minY:Js[1],maxX:Js[2],maxY:Js[3],value:h},canvasTransform:w,scale:d}}replayImageOrLabel_(e,t,n,r,i,a,o){let s=!!(a||o),c=r.declutterBox,l=o?o[2]*r.scale[0]/2:0,u=c.minX-l<=t[0]&&c.maxX+l>=0&&c.minY-l<=t[1]&&c.maxY+l>=0;return u&&(s&&this.replayTextBackground_(e,Ys,Xs,Zs,Qs,a,o),Ha(e,r.canvasTransform,i,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(e){let t=this.alignAndScaleFill_;if(t){let n=B(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;e.save(),e.translate(n[0]%r,n[1]%r),t!==1&&e.scale(t,t),e.rotate(this.viewRotation_)}e.fill(),t&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],t[1]&&(e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6]))}drawLabelWithPointPlacement_(e,t,n,r){let i=this.textStates[t],a=this.createLabel(e,t,r,n),o=this.strokeStates[n],s=this.pixelRatio,c=tc(Array.isArray(e)?e[0]:e,i.textAlign||Ea),l=zs[i.textBaseline||Da],u=o&&o.lineWidth?o.lineWidth:0,d=a.width/s-2*i.scale[0],f=c*d+2*(.5-c)*u,p=l*a.height/s+2*(.5-l)*u;return{label:a,anchorX:f,anchorY:p}}execute_(e,t,n,r,i,a,o,s){let c=this.zIndexContext_,l;this.pixelCoordinates_&&d(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||=[],l=Qn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Wn(this.renderedTransform_,n));let u=0,f=r.length,p=0,m,h,g,_,v,y,b,x,S,C,w,T,E,D=0,O=0,k=this.coordinateCache_,A=this.viewRotation_,j=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,M={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:A},ee=this.instructions!=r||this.overlaps?0:200,te,ne,re,ie;for(;u<f;){let n=r[u],d=n[0];switch(d){case U.BEGIN_GEOMETRY:te=n[1],ie=n[3],te.getGeometry()?o!==void 0&&!ze(o,ie.getExtent())?u=n[2]+1:++u:u=n[2],c&&(c.zIndex=n[4]);break;case U.BEGIN_PATH:D>ee&&(this.fill_(e),D=0),O>ee&&(e.stroke(),O=0),!D&&!O&&(e.beginPath(),v=NaN,y=NaN),++u;break;case U.CIRCLE:p=n[1];let r=l[p],d=l[p+1],f=l[p+2],ae=l[p+3],oe=f-r,N=ae-d,se=Math.sqrt(oe*oe+N*N);e.moveTo(r+se,d),e.arc(r,d,se,0,2*Math.PI,!0),++u;break;case U.CLOSE_PATH:e.closePath(),++u;break;case U.CUSTOM:p=n[1],m=n[2];let ce=n[3],le=n[4],P=n[5];M.geometry=ce,M.feature=te,u in k||(k[u]=[]);let ue=k[u];P?P(l,p,m,2,ue):(ue[0]=l[p],ue[1]=l[p+1],ue.length=2),c&&(c.zIndex=n[6]),le(ue,M),++u;break;case U.DRAW_IMAGE:p=n[1],m=n[2],S=n[3],h=n[4],g=n[5];let de=n[6],fe=n[7],pe=n[8],me=n[9],he=n[10],ge=n[11],_e=n[12],ve=n[13];_=n[14]||`declutter`;let F=n[15];if(!S&&n.length>=20){C=n[19],w=n[20],T=n[21],E=n[22];let e=this.drawLabelWithPointPlacement_(C,w,T,E);S=e.label,n[3]=S;let t=n[23];h=(e.anchorX-t)*this.pixelRatio,n[4]=h;let r=n[24];g=(e.anchorY-r)*this.pixelRatio,n[5]=g,de=S.height,n[6]=de,ve=S.width,n[13]=ve}let ye;n.length>25&&(ye=n[25]);let be,xe,Se;n.length>17?(be=n[16],xe=n[17],Se=n[18]):(be=Oa,xe=null,Se=null),he&&j?ge+=A:!he&&!j&&(ge-=A);let Ce=0;for(;p<m;p+=2){if(ye&&ye[Ce++]<ve/this.pixelRatio)continue;let n=this.calculateImageOrLabelDimensions_(S.width,S.height,l[p],l[p+1],ve,de,h,g,pe,me,ge,_e,i,be,!!xe||!!Se,te),r=[e,t,S,n,fe,xe,Se];if(s){let e,t,i;if(F){let n=m-p;if(!F[n]){F[n]={args:r,declutterMode:_};continue}let a=F[n];e=a.args,t=a.declutterMode,delete F[n],i=$s(e)}let a,o;if(e&&(t!==`declutter`||!s.collides(i))&&(a=!0),(_!==`declutter`||!s.collides(n.declutterBox))&&(o=!0),t===`declutter`&&_===`declutter`){let e=a&&o;a=e,o=e}a&&(t!==`none`&&s.insert(i),this.replayImageOrLabel_.apply(this,e)),o&&(_!==`none`&&s.insert(n.declutterBox),this.replayImageOrLabel_.apply(this,r))}else this.replayImageOrLabel_.apply(this,r)}++u;break;case U.DRAW_CHARS:let we=n[1],Te=n[2],Ee=n[3],De=n[4];E=n[5];let Oe=n[6],ke=n[7],Ae=n[8];T=n[9];let je=n[10];
Line truncated
|
||||
`);this.generateTileUrlFunction_?this.setTileUrlFunction(lm(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,n){}},gm=hm,_m=class extends gm{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:vm,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate===void 0?!0:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin===void 0?null:e.crossOrigin,this.tileClass=e.tileClass===void 0?Ku:e.tileClass,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!kn(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=`:disable-interpolation`),e}getTileGridForProjection(e){let t=this.getProjection();if(this.tileGrid&&(!t||kn(t,e)))return this.tileGrid;let n=M(e);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Yp(e)),this.tileGridForProjection[n]}createTile_(e,t,r,i,a,o){let s=[e,t,r],c=this.getTileCoordForTileUrlFunction(s,a),l=c?this.tileUrlFunction(c,i,a):void 0,u=new this.tileClass(s,l===void 0?Q.EMPTY:Q.IDLE,l===void 0?``:l,this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(n.CHANGE,this.handleTileChange.bind(this)),u}getTile(e,t,n,r,i){let a=this.getProjection();if(!a||!i||kn(a,i))return this.getTileInternal(e,t,n,r,a||i);let o=[e,t,n],s=this.getKey(),c=this.getTileGridForProjection(a),l=this.getTileGridForProjection(i),u=this.getTileCoordForTileUrlFunction(o,i),d=new Ep(a,c,i,l,o,u,this.getTilePixelRatio(r),this.getGutter(),(e,t,n,r)=>this.getTileInternal(e,t,n,r,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return d.key=s,d}getTileInternal(e,t,n,r,i){let a=this.getKey();return this.createTile_(e,t,n,r,i,a)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,t){let n=z(e);if(n){let e=M(n);e in this.tileGridForProjection||(this.tileGridForProjection[e]=t)}}};function vm(e,t){e.getImage().src=t}var ym=_m,bm=class extends ym{constructor(e){e||={};let t=e.projection===void 0?`EPSG:3857`:e.projection,n=e.tileGrid===void 0?Qp({extent:tm(t),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize}):e.tileGrid;super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:t,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX===void 0?!0:e.wrapX,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter===void 0?0:e.gutter}getGutter(){return this.gutter_}},xm=bm;const Sm=`© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.`;var Cm=class extends xm{constructor(e){e||={};let t;t=e.attributions===void 0?[Sm]:e.attributions;let n=e.crossOrigin===void 0?`anonymous`:e.crossOrigin,r=e.url===void 0?`https://tile.openstreetmap.org/{z}/{x}/{y}.png`:e.url;super({attributions:t,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:n,interpolate:e.interpolate,maxZoom:e.maxZoom===void 0?19:e.maxZoom,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:r,wrapX:e.wrapX,zDirection:e.zDirection})}},wm=Cm;export{ps as Circle,le as Feature,es as Fill,op as GeoJSON,wm as OSM,Of as OlMap,Lr as Point,ns as Stroke,ys as Style,Wp as TileLayer,Vu as VectorLayer,Qo as VectorSource,Au as View,F as createEmpty,On as fromLonLat};
|
||||
var e={ADD:`add`,REMOVE:`remove`},t={PROPERTYCHANGE:`propertychange`},n={CHANGE:`change`,ERROR:`error`,BLUR:`blur`,CLEAR:`clear`,CONTEXTMENU:`contextmenu`,CLICK:`click`,DBLCLICK:`dblclick`,DRAGENTER:`dragenter`,DRAGOVER:`dragover`,DROP:`drop`,FOCUS:`focus`,KEYDOWN:`keydown`,KEYPRESS:`keypress`,LOAD:`load`,RESIZE:`resize`,TOUCHMOVE:`touchmove`,WHEEL:`wheel`},r=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function i(e,t,n){let r,i;n||=a;let o=0,s=e.length,c=!1;for(;o<s;)r=o+(s-o>>1),i=+n(e[r],t),i<0?o=r+1:(s=r,c=!i);return c?o:~o}function a(e,t){return e>t?1:e<t?-1:0}function o(e,t){return e<t?1:e>t?-1:0}function s(e,t,n){if(e[0]<=t)return 0;let r=e.length;if(t<=e[r-1])return r-1;if(typeof n==`function`){for(let i=1;i<r;++i){let r=e[i];if(r===t)return i;if(r<t)return n(t,e[i-1],r)>0?i-1:i}return r-1}if(n>0){for(let n=1;n<r;++n)if(e[n]<t)return n-1;return r-1}if(n<0){for(let n=1;n<r;++n)if(e[n]<=t)return n;return r-1}for(let n=1;n<r;++n){if(e[n]==t)return n;if(e[n]<t)return e[n-1]-t<t-e[n]?n-1:n}return r-1}function c(e,t,n){for(;t<n;){let r=e[t];e[t]=e[n],e[n]=r,++t,--n}}function l(e,t){let n=Array.isArray(t)?t:[t],r=n.length;for(let t=0;t<r;t++)e[e.length]=n[t]}function u(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function d(e,t,n){let r=t||a;return e.every(function(t,i){if(i===0)return!0;let a=r(e[i-1],t);return!(a>0||n&&a===0)})}function f(){return!0}function p(){return!1}function m(){}function h(e){let t,n,r;return function(){let i=Array.prototype.slice.call(arguments);return(!n||this!==r||!u(i,n))&&(r=this,n=i,t=e.apply(this,arguments)),t}}function g(e){function t(){let t;try{t=e()}catch(e){return Promise.reject(e)}return t instanceof Promise?t:Promise.resolve(t)}return t()}function _(e){for(let t in e)delete e[t]}function v(e){let t;for(t in e)return!1;return!t}var y=class{constructor(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},b=class extends r{constructor(e){super(),this.eventTarget_=e,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(e,t){if(!e||!t)return;let n=this.listeners_||={},r=n[e]||(n[e]=[]);r.includes(t)||r.push(t)}dispatchEvent(e){let t=typeof e==`string`,n=t?e:e.type,r=this.listeners_&&this.listeners_[n];if(!r)return;let i=t?new y(e):e;i.target||=this.eventTarget_||this;let a=this.dispatching_||={},o=this.pendingRemovals_||={};n in a||(a[n]=0,o[n]=0),++a[n];let s;for(let e=0,t=r.length;e<t;++e)if(s=`handleEvent`in r[e]?r[e].handleEvent(i):r[e].call(this,i),s===!1||i.propagationStopped){s=!1;break}if(--a[n]===0){let e=o[n];for(delete o[n];e--;)this.removeEventListener(n,m);delete a[n]}return s}disposeInternal(){this.listeners_&&_(this.listeners_)}getListeners(e){return this.listeners_&&this.listeners_[e]||void 0}hasListener(e){return this.listeners_?e?e in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(e,t){if(!this.listeners_)return;let n=this.listeners_[e];if(!n)return;let r=n.indexOf(t);r!==-1&&(this.pendingRemovals_&&e in this.pendingRemovals_?(n[r]=m,++this.pendingRemovals_[e]):(n.splice(r,1),n.length===0&&delete this.listeners_[e]))}};function x(e,t,n,r,i){if(i){let i=n;n=function(a){return e.removeEventListener(t,n),i.call(r??this,a)}}else r&&r!==e&&(n=n.bind(r));let a={target:e,type:t,listener:n};return e.addEventListener(t,n),a}function S(e,t,n,r){return x(e,t,n,r,!0)}function C(e){e&&e.target&&(e.target.removeEventListener(e.type,e.listener),_(e))}var w=class extends b{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(n.CHANGE)}getRevision(){return this.revision_}onInternal(e,t){if(Array.isArray(e)){let n=e.length,r=Array(n);for(let i=0;i<n;++i)r[i]=x(this,e[i],t);return r}return x(this,e,t)}onceInternal(e,t){let n;if(Array.isArray(e)){let r=e.length;n=Array(r);for(let i=0;i<r;++i)n[i]=S(this,e[i],t)}else n=S(this,e,t);return t.ol_key=n,n}unInternal(e,t){let n=t.ol_key;if(n)T(n);else if(Array.isArray(e))for(let n=0,r=e.length;n<r;++n)this.removeEventListener(e[n],t);else this.removeEventListener(e,t)}};w.prototype.on,w.prototype.once,w.prototype.un;function T(e){if(Array.isArray(e))for(let t=0,n=e.length;t<n;++t)C(e[t]);else C(e)}function E(){throw Error(`Unimplemented abstract method.`)}let D=0;function O(e){return e.ol_uid||=String(++D)}var k=class extends y{constructor(e,t,n){super(e),this.key=t,this.oldValue=n}},A=class extends w{constructor(e){super(),this.on,this.once,this.un,O(this),this.values_=null,e!==void 0&&this.setProperties(e)}get(e){let t;return this.values_&&this.values_.hasOwnProperty(e)&&(t=this.values_[e]),t}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_Line truncated
|
||||
`).reduce((t,n)=>Math.max(t,oa(e,n)),0);return n[t]=r,r}function ca(e,t){let n=[],r=[],i=[],a=0,o=0,s=0,c=0;for(let l=0,u=t.length;l<=u;l+=2){let d=t[l];if(d===`
|
||||
`||l===u){a=Math.max(a,o),i.push(o),o=0,s+=c,c=0;continue}let f=t[l+1]||e.font,p=oa(f,d);n.push(p),o+=p;let m=ia(f);r.push(m),c=Math.max(c,m)}return{width:a,height:s,widths:n,heights:r,lineWidths:i}}function la(e,t,n,r,i,a,o,s,c,l,u){e.save(),n!==1&&(e.globalAlpha===void 0?e.globalAlpha=e=>e.globalAlpha*=n:e.globalAlpha*=n),t&&e.transform.apply(e,t),r.contextInstructions?(e.translate(c,l),e.scale(u[0],u[1]),ua(r,e)):u[0]<0||u[1]<0?(e.translate(c,l),e.scale(u[0],u[1]),e.drawImage(r,i,a,o,s,0,0,o,s)):e.drawImage(r,i,a,o,s,c,l,o*u[0],s*u[1]),e.restore()}function ua(e,t){let n=e.contextInstructions;for(let e=0,r=n.length;e<r;e+=2)Array.isArray(n[e+1])?t[n[e]].apply(t,n[e+1]):t[n[e]]=n[e+1]}var da=class extends Fi{constructor(e,t,n,r,i,a,o){super(),this.context_=e,this.pixelRatio_=t,this.extent_=n,this.transform_=r,this.transformRotation_=r?Ge(Math.atan2(r[1],r[0]),10):0,this.viewRotation_=i,this.squaredTolerance_=a,this.userTransform_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_=``,this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Cn()}drawImages_(e,t,n,r){if(!this.image_)return;let i=Mn(e,t,n,r,this.transform_,this.pixelCoordinates_),a=this.context_,o=this.tmpLocalTransform_,s=a.globalAlpha;this.imageOpacity_!=1&&(a.globalAlpha=s*this.imageOpacity_);let c=this.imageRotation_;this.transformRotation_===0&&(c-=this.viewRotation_),this.imageRotateWithView_&&(c+=this.viewRotation_);for(let e=0,t=i.length;e<t;e+=2){let t=i[e]-this.imageAnchorX_,n=i[e+1]-this.imageAnchorY_;if(c!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){let e=t+this.imageAnchorX_,r=n+this.imageAnchorY_;Tn(o,e,r,1,1,c,-e,-r),a.save(),a.transform.apply(a,o),a.translate(e,r),a.scale(this.imageScale_[0],this.imageScale_[1]),a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),a.restore()}else a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,t,n,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(a.globalAlpha=s)}drawText_(e,t,n,r){if(!this.textState_||this.text_===``)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);let i=Mn(e,t,n,r,this.transform_,this.pixelCoordinates_),a=this.context_,o=this.textRotation_;for(this.transformRotation_===0&&(o-=this.viewRotation_),this.textRotateWithView_&&(o+=this.viewRotation_);t<n;t+=r){let e=i[t]+this.textOffsetX_,n=i[t+1]+this.textOffsetY_;o!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(a.save(),a.translate(e-this.textOffsetX_,n-this.textOffsetY_),a.rotate(o),a.translate(this.textOffsetX_,this.textOffsetY_),a.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&a.strokeText(this.text_,0,0),this.textFillState_&&a.fillText(this.text_,0,0),a.restore()):(this.textStrokeState_&&a.strokeText(this.text_,e,n),this.textFillState_&&a.fillText(this.text_,e,n))}}moveToLineTo_(e,t,n,r,i){let a=this.context_,o=Mn(e,t,n,r,this.transform_,this.pixelCoordinates_);a.moveTo(o[0],o[1]);let s=o.length;i&&(s-=2);for(let e=2;e<s;e+=2)a.lineTo(o[e],o[e+1]);return i&&a.closePath(),n}drawRings_(e,t,n,r){for(let i=0,a=n.length;i<a;++i)t=this.moveToLineTo_(e,t,n[i],r,!0);return t}drawCircle(e){if(this.squaredTolerance_&&(e=e.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Me(this.extent_,e.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);let t=Hn(e,this.transform_,this.pixelCoordinates_),n=t[2]-t[0],r=t[3]-t[1],i=Math.sqrt(n*n+r*r),a=this.context_;a.beginPath(),a.arc(t[0],t[1],i,0,2*Math.PI),this.fillState_&&a.fill(),this.strokeState_&&a.stroke()}this.text_!==``&&this.drawText_(e.getCenter(),0,2,2)}}setStyle(e){this.setFillStrokeStyle(e.getFill(),e.getStroke()),this.setImageStyle(e.getImage()),this.setTextStyle(e.getText())}setTransform(e){this.transform_=e}drawGeometry(e){let t=e.getType();switch(t){case`Point`:this.drawPoint(e);break;case`LineString`:this.drawLineString(e);break;case`Polygon`:this.drawPolygon(e);break;case`MultiPoint`:this.drawMultiPoint(e);break;case`MultiLineString`:this.drawMultiLineString(e);break;case`MultiPolygon`:this.drawMultiPolygon(e);break;case`GeometryCollection`:this.drawGeometryCollection(e);break;case`Circle`:this.dr
Line truncated
|
||||
`,``),e.push(t,``),e}function Jo(e,t,n){return n%2==0&&(e+=t),e}var Yo=class{constructor(e,t,n,r,i){this.overlaps=n,this.pixelRatio=t,this.resolution=e,this.alignAndScaleFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=Cn(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=i?new Ro:null}getZIndexContext(){return this.zIndexContext_}createLabel(e,t,n,r){let i=e+t+n+r;if(this.labels_[i])return this.labels_[i];let a=r?this.strokeStates[r]:null,o=n?this.fillStates[n]:null,s=this.textStates[t],c=this.pixelRatio,l=[s.scale[0]*c,s.scale[1]*c],u=s.justify?No[s.justify]:Ko(Array.isArray(e)?e[0]:e,s.textAlign||Ji),d=r&&a.lineWidth?a.lineWidth:0,f=Array.isArray(e)?e:String(e).split(`
|
||||
`).reduce(qo,[]),{width:p,height:m,widths:h,heights:g,lineWidths:_}=ca(s,f),v=p+d,y=[],b=(v+2)*l[0],x=(m+d)*l[1],S={width:b<0?Math.floor(b):Math.ceil(b),height:x<0?Math.floor(x):Math.ceil(x),contextInstructions:y};(l[0]!=1||l[1]!=1)&&y.push(`scale`,l),r&&(y.push(`strokeStyle`,a.strokeStyle),y.push(`lineWidth`,d),y.push(`lineCap`,a.lineCap),y.push(`lineJoin`,a.lineJoin),y.push(`miterLimit`,a.miterLimit),y.push(`setLineDash`,[a.lineDash]),y.push(`lineDashOffset`,a.lineDashOffset)),n&&y.push(`fillStyle`,o.fillStyle),y.push(`textBaseline`,`middle`),y.push(`textAlign`,`center`);let C=.5-u,w=u*v+C*d,T=[],E=[],D=0,O=0,k=0,A=0,ee;for(let e=0,t=f.length;e<t;e+=2){let t=f[e];if(t===`
|
||||
`){O+=D,D=0,w=u*v+C*d,++A;continue}let i=f[e+1]||s.font;i!==ee&&(r&&T.push(`font`,i),n&&E.push(`font`,i),ee=i),D=Math.max(D,g[k]);let a=[t,w+C*h[k]+u*(h[k]-_[A]),.5*(d+D)+O];w+=h[k],r&&T.push(`strokeText`,a),n&&E.push(`fillText`,a),++k}return Array.prototype.push.apply(y,T),Array.prototype.push.apply(y,E),this.labels_[i]=S,S}replayTextBackground_(e,t,n,r,i,a,o){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,n),e.lineTo.apply(e,r),e.lineTo.apply(e,i),e.lineTo.apply(e,t),a&&(this.alignAndScaleFill_=a[2],e.fillStyle=a[1],this.fill_(e)),o&&(this.setStrokeStyle_(e,o),e.stroke())}calculateImageOrLabelDimensions_(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){o*=d[0],s*=d[1];let g=n-o,_=r-s,v=i+c>e?e-c:i,y=a+l>t?t-l:a,b=p[3]+v*d[0]+p[1],x=p[0]+y*d[1]+p[2],S=g-p[3],C=_-p[0];(m||u!==0)&&(Bo[0]=S,Uo[0]=S,Bo[1]=C,Vo[1]=C,Vo[0]=S+b,Ho[0]=Vo[0],Ho[1]=C+x,Uo[1]=Ho[1]);let w;return u===0?fe(Math.min(S,S+b),Math.min(C,C+x),Math.max(S,S+b),Math.max(C,C+x),zo):(w=Tn(Cn(),n,r,1,1,u,-n,-r),z(w,Bo),z(w,Vo),z(w,Ho),z(w,Uo),fe(Math.min(Bo[0],Vo[0],Ho[0],Uo[0]),Math.min(Bo[1],Vo[1],Ho[1],Uo[1]),Math.max(Bo[0],Vo[0],Ho[0],Uo[0]),Math.max(Bo[1],Vo[1],Ho[1],Uo[1]),zo)),f&&(g=Math.round(g),_=Math.round(_)),{drawImageX:g,drawImageY:_,drawImageW:v,drawImageH:y,originX:c,originY:l,declutterBox:{minX:zo[0],minY:zo[1],maxX:zo[2],maxY:zo[3],value:h},canvasTransform:w,scale:d}}replayImageOrLabel_(e,t,n,r,i,a,o){let s=!!(a||o),c=r.declutterBox,l=o?o[2]*r.scale[0]/2:0,u=c.minX-l<=t[0]&&c.maxX+l>=0&&c.minY-l<=t[1]&&c.maxY+l>=0;return u&&(s&&this.replayTextBackground_(e,Bo,Vo,Ho,Uo,a,o),la(e,r.canvasTransform,i,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0}fill_(e){let t=this.alignAndScaleFill_;if(t){let n=z(this.renderedTransform_,[0,0]),r=512*this.pixelRatio;e.save(),e.translate(n[0]%r,n[1]%r),t!==1&&e.scale(t,t),e.rotate(this.viewRotation_)}e.fill(),t&&e.restore()}setStrokeStyle_(e,t){e.strokeStyle=t[1],t[1]&&(e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.lineDashOffset=t[7],e.setLineDash(t[6]))}drawLabelWithPointPlacement_(e,t,n,r){let i=this.textStates[t],a=this.createLabel(e,t,r,n),o=this.strokeStates[n],s=this.pixelRatio,c=Ko(Array.isArray(e)?e[0]:e,i.textAlign||Ji),l=No[i.textBaseline||Yi],u=o&&o.lineWidth?o.lineWidth:0,d=a.width/s-2*i.scale[0],f=c*d+2*(.5-c)*u,p=l*a.height/s+2*(.5-l)*u;return{label:a,anchorX:f,anchorY:p}}execute_(e,t,n,r,i,a,o,s){let c=this.zIndexContext_,l;this.pixelCoordinates_&&u(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||=[],l=Mn(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),wn(this.renderedTransform_,n));let d=0,f=r.length,p=0,m,h,g,_,v,y,b,x,S,C,w,T,E,D=0,O=0,k=this.coordinateCache_,A=this.viewRotation_,ee=Math.round(Math.atan2(-n[1],n[0])*0xe8d4a51000)/0xe8d4a51000,j={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:A},M=this.instructions!=r||this.overlaps?0:200,N,te,ne,P;for(;d<f;){let n=r[d],u=n[0];switch(u){case U.BEGIN_GEOMETRY:N=n[1],P=n[3],N.getGeometry()?o!==void 0&&!Me(o,P.getExtent())?d=n[2]+1:++d:d=n[2],c&&(c.zIndex=n[4]);break;case U.BEGIN_PATH:D>M&&(this.fill_(e),D=0),O>M&&(e.stroke(),O=0),!D&&!O&&(e.beginPath(),v=NaN,y=NaN),++d;break;case U.CIRCLE:p=n[1];let r=l[p],u=l[p+1],f=l[p+2],re=l[p+3],ie=f-r,ae=re-u,oe=Math.sqrt(ie*ie+ae*ae);e.moveTo(r+oe,u),e.arc(r,u,oe,0,2*Math.PI,!0),++d;break;case U.CLOSE_PATH:e.closePath(),++d;break;case U.CUSTOM:p=n[1],m=n[2];let se=n[3],ce=n[4],le=n[5];j.geometry=se,j.feature=N,d in k||(k[d]=[]);let ue=k[d];le?le(l,p,m,2,ue):(ue[0]=l[p],ue[1]=l[p+1],ue.length=2),c&&(c.zIndex=n[6]),ce(ue,j),++d;break;case U.DRAW_IMAGE:p=n[1],m=n[2],S=n[3],h=n[4],g=n[5];let de=n[6],fe=n[7],pe=n[8],me=n[9],he=n[10],ge=n[11],_e=n[12],ve=n[13];_=n[14]||`declutter`;let ye=n[15];if(!S&&n.length>=20){C=n[19],w=n[20],T=n[21],E=n[22];let e=this.drawLabelWithPointPlacement_(C,w,T,E);S=e.label,n[3]=S;let t=n[23];h=(e.anchorX-t)*this.pixelRatio,n[4]=h;let r=n[24];g=(e.anchorY-r)*this.pixelRatio,n[5]=g,de=S.height,n[6]=de,ve=S.width,n[13]=ve}let be;n.length>25&&(be=n[25]);let xe,Se,Ce;n.length>17?(xe=n[16],Se=n[17],Ce=n[18]):(xe=Xi,Se=null,Ce=null),he&&ee?ge+=A:!he&&!ee&&(ge-=A);let we=0;for(;p<m;p+=2){if(be&&be[we++]<ve/this.pixelRatio)continue;let n=this.calculateImageOrLabelDimensions_(S.width,S.height,l[p],l[p+1],ve,de,h,g,pe,me,ge,_e,i,xe,!!Se||!!Ce,N),r=[e,t,S,n,fe,Se,Ce];if(s){let e,t,i;if(ye){let n=m-p;if(!ye[n]){ye[n]={args:r,declutterMode:_};continue}let a=ye[n];e=a.args,t=a.declutterMode,delete ye[n],i=Wo(e)}let a,o;if(e&&(t!==`declutter`||!s.collides(i))&&(a=!0),(_!==`declutter`||!s.collides(n.declutterBox))&&(o=!0),t===`declutter`&&_===`declutter`){let e=a&&o;a=e,o=e}a&&(t!==`none`&&s.insert(i),this.replayImageOrLabel_.apply(this,e)),o&&(_!==`none`&&s.insert(n.declutterBox),this.replayImageOrLabel_.apply(this,r))}else this.replayImageOrLabel_.apply(this,r)}++d;break;case U.DRAW_CHARS:let Te=n[1],Ee=n[2],De=n[3],Oe=n[4];E=n[5];let F=n[6],ke=n[7],Ae=n[8]
Line truncated
|
||||
`);this.generateTileUrlFunction_?this.setTileUrlFunction(Kd(e,this.tileGrid),t):this.setKey(t)}tileUrlFunction(e,t,n){}},Qd=class extends Zd{constructor(e){super({attributions:e.attributions,cacheSize:e.cacheSize,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:$d,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:e.interpolate===void 0?!0:e.interpolate,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.crossOrigin=e.crossOrigin===void 0?null:e.crossOrigin,this.tileClass=e.tileClass===void 0?bl:e.tileClass,this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(e){return this.getProjection()&&e&&!dn(this.getProjection(),e)?0:this.getGutter()}getGutter(){return 0}getKey(){let e=super.getKey();return this.getInterpolate()||(e+=`:disable-interpolation`),e}getTileGridForProjection(e){let t=this.getProjection();if(this.tileGrid&&(!t||dn(t,e)))return this.tileGrid;let n=O(e);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Md(e)),this.tileGridForProjection[n]}createTile_(e,t,r,i,a,o){let s=[e,t,r],c=this.getTileCoordForTileUrlFunction(s,a),l=c?this.tileUrlFunction(c,i,a):void 0,u=new this.tileClass(s,l===void 0?Q.EMPTY:Q.IDLE,l===void 0?``:l,this.crossOrigin,this.tileLoadFunction,this.tileOptions);return u.key=o,u.addEventListener(n.CHANGE,this.handleTileChange.bind(this)),u}getTile(e,t,n,r,i){let a=this.getProjection();if(!a||!i||dn(a,i))return this.getTileInternal(e,t,n,r,a||i);let o=[e,t,n],s=this.getKey(),c=this.getTileGridForProjection(a),l=this.getTileGridForProjection(i),u=this.getTileCoordForTileUrlFunction(o,i),d=new hd(a,c,i,l,o,u,this.getTilePixelRatio(r),this.getGutter(),(e,t,n,r)=>this.getTileInternal(e,t,n,r,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return d.key=s,d}getTileInternal(e,t,n,r,i){let a=this.getKey();return this.createTile_(e,t,n,r,i,a)}setRenderReprojectionEdges(e){this.renderReprojectionEdges_!=e&&(this.renderReprojectionEdges_=e,this.changed())}setTileGridForProjection(e,t){let n=R(e);if(n){let e=O(n);e in this.tileGridForProjection||(this.tileGridForProjection[e]=t)}}};function $d(e,t){e.getImage().src=t}var ef=class extends Qd{constructor(e){e||={};let t=e.projection===void 0?`EPSG:3857`:e.projection,n=e.tileGrid===void 0?Fd({extent:Rd(t),maxResolution:e.maxResolution,maxZoom:e.maxZoom,minZoom:e.minZoom,tileSize:e.tileSize}):e.tileGrid;super({attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:e.interpolate,projection:t,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX===void 0?!0:e.wrapX,transition:e.transition,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.gutter_=e.gutter===void 0?0:e.gutter}getGutter(){return this.gutter_}},tf=class extends ef{constructor(e){e||={};let t;t=e.attributions===void 0?[`© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.`]:e.attributions;let n=e.crossOrigin===void 0?`anonymous`:e.crossOrigin,r=e.url===void 0?`https://tile.openstreetmap.org/{z}/{x}/{y}.png`:e.url;super({attributions:t,attributionsCollapsible:!1,cacheSize:e.cacheSize,crossOrigin:n,interpolate:e.interpolate,maxZoom:e.maxZoom===void 0?19:e.maxZoom,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,transition:e.transition,url:r,wrapX:e.wrapX,zDirection:e.zDirection})}};export{go as Circle,te as Feature,co as Fill,Lu as GeoJSON,tf as OSM,Tu as OlMap,pr as Point,lo as Stroke,_o as Style,kd as TileLayer,vl as VectorLayer,so as VectorSource,al as View,de as createEmpty,un as fromLonLat};
|
||||
//# sourceMappingURL=ol.min.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"ol.min.js","names":["extend","equals","arrayEquals","Disposable","Event","EventTarget","EventType","Event","Observable","ObjectEventType","Property","Event","BaseObject","CollectionEventType","BaseObject","clone","EventType","coordinates","Relationship","isEmpty","intersects","wrapX","equals","scale","wrapX","RADIUS","EXTENT","Projection","METERS_PER_UNIT","Projection","PROJECTIONS","cache","get","add","add","get","fromLonLat","a2","Projection","makeUTMTransforms","makeUTMProjection","disable","addProj","addTransformFunc","getProj","makeProjection","projection","toEPSG4326","getTransformFunc","makeTransforms","equals","EPSG3857_PROJECTIONS","EPSG4326_PROJECTIONS","transform","toString","fromString","equivalent","transform","rotate","scale","tmpTransform","createTransform","BaseObject","transform","clone","extent","getProjection","scale","composeTransform","Geometry","coordinates","rotate","scale","transform","linearRingss","squaredDx","tmpPoint","squaredDistance","coordinates","coordinates","squaredDistance","SimpleGeometry","coordinates","linearRingArea","SimpleGeometry","coordinates","squaredDistance","squaredDx","forEachSegment","reverseCoordinates","SimpleGeometry","coordinates","linearRing","extend","linearRingsArea","Point","LinearRing","linearRings","isEmpty","SimpleGeometry","coordinates","extend","forEachSegment","canvasPool","EventType","getCacheKey","ImageState","EventTarget","ImageState","EventType","get","iconImageCache","iconCache","ImageState","getIconImage","BaseObject","cache","transform","scale","context","VectorContext","transform","createTransform","composeTransform","equals","transform","loading","ImageState","xhr","all","Geometry","EventType","SimpleGeometry","coordinates","ends","extend","layout","LineString","SimpleGeometry","coordinates","extend","squaredDistance","squaredDx","Point","SimpleGeometry","coordinates","extend","linearRingssArea","linearRingssCenter","MultiPoint","Polygon","createTransform","linearRingssCenter","extend","transform","getProjection","scale","composeTransform","intersects","level","extend","RBush","RBush_","BaseObject","getProjection","self","Event","Source","allStrategy","RBush","Collection","VectorEventType","RenderFeature","EventType","ObjectEventType","CollectionEventType","extend","getIconImage","ImageState","scale","ImageStyle","ImageState","scale","iconImageCache","IconImage","add","RegularShape","scale","Fill","Stroke","CircleStyle","Fill","scale","VectorContext","coordinates","Relationship","CanvasInstruction","fillInstruction","equals","CanvasBuilder","CanvasInstruction","CanvasBuilder","CanvasInstruction","CanvasBuilder","CanvasInstruction","coordinates","CanvasBuilder","coordinates","p1","p2","p3","CanvasInstruction","scale","PolygonBuilder","Builder","ImageBuilder","LineStringBuilder","TextBuilder","scale","measureAndCacheTextWidth","cache","rotate","render","createTransform","ZIndexContext","scale","text","p1","p2","p3","p4","fillInstruction","strokeInstruction","transform","composeTransform","applyTransform","intersects","equals","transformSetFromArray","CanvasInstruction","render","i","ii","createTransform","transform","Executor","composeTransform","i","result","context","ImageStyle","scale","ImageState","getIconImage","image","EventType","transforms","CanvasImmediateRenderer","Icon","i","geometry","Event","Observable","ImageState","EventType","canvasPool","LayerRenderer","createTransform","transform","equals","equivalent","applyTransform","composeTransform","toTransformString","RenderEvent","RenderEventType","ZIndexContext","CanvasLayerRenderer","ViewHint","transform","canvasPool","render","RenderEventType","intersectsExtent","transforms","userProjection","getSquaredRenderTolerance","defaultRenderOrder","wrapCoordinateX","wrapExtentX","equals","CanvasBuilderGroup","getRenderTolerance","extent","userExtent","ExecutorGroup","colorFromString","context","always","context","Style","Fill","Stroke","Text","Icon","RegularShape","Circle","none","BaseObject","ViewProperty","ViewHint","rotateCoordinate","addCoordinate","isEmpty","polygonFromExtent","userProjection","equals","centerNone","rotationNone","coordinatesEqual","BaseObject","LayerProperty","BaseLayer","LayerProperty","EventType","View","layerState","RenderEventType","Property","Layer","toStyleFunction","Style","BaseVectorLayer","CanvasVectorLayerRenderer","EventTarget","EventType","TileState","Tile","TileState","Event","MapEvent","EventType","Target","PointerEventType","EventType","MapBrowserEvent","MapBrowserEventType","newEvent","PriorityQueue","EventType","TileState","BaseObject","MapEventType","Control","EventType","equals","Control","EventType","transform","contains","Control","EventType","Collection","Zoom","Rotate","Attribution","BaseObject","InteractionProperty","Interaction","MapBrowserEventType","Interaction","MapBrowserEventType","PointerInteraction","centroid","centroidFromPointers","map","scaleCoordinate","rotateCoordinate","PointerInteraction","Disposable",Line truncated
|
||||
{"version":3,"file":"ol.min.js","names":["extend","equals","arrayEquals","Event","EventTarget","EventType","Event","ObjectEventType","Property","Event","CollectionEventType","clone","EventType","coordinates","Relationship","isEmpty","intersects","wrapX","equals","scale","wrapX","RADIUS","EXTENT","METERS_PER_UNIT","PROJECTIONS","cache","get","add","add","get","fromLonLat","a2","makeUTMTransforms","makeUTMProjection","disable","getProj","makeProjection","projection","toEPSG4326","getTransformFunc","makeTransforms","equals","EPSG3857_PROJECTIONS","EPSG4326_PROJECTIONS","transform","toString","fromString","equivalent","transform","rotate","scale","tmpTransform","createTransform","transform","clone","extent","getProjection","scale","coordinates","transform","linearRingss","squaredDx","squaredDistance","tmpPoint","coordinates","coordinates","squaredDistance","coordinates","linearRingArea","coordinates","squaredDistance","squaredDx","forEachSegment","coordinates","linearRing","linearRingsArea","linearRings","isEmpty","coordinates","forEachSegment","canvasPool","EventType","getCacheKey","ImageState","EventTarget","ImageState","EventType","get","iconImageCache","iconCache","ImageState","cache","transform","scale","transform","createTransform","equals","loading","ImageState","transform","xhr","all","EventType","coordinates","ends","layout","coordinates","squaredDistance","squaredDx","coordinates","linearRingssArea","linearRingssCenter","createTransform","linearRingssCenter","getProjection","scale","transform","intersects","level","extend","RBush","RBush_","getProjection","self","Event","allStrategy","RBush","VectorEventType","EventType","ObjectEventType","CollectionEventType","getIconImage","ImageState","scale","ImageState","scale","iconImageCache","add","scale","scale","coordinates","Relationship","CanvasInstruction","fillInstruction","equals","CanvasInstruction","CanvasInstruction","CanvasInstruction","coordinates","coordinates","p1","p2","p3","CanvasInstruction","scale","PolygonBuilder","Builder","ImageBuilder","LineStringBuilder","TextBuilder","scale","measureAndCacheTextWidth","cache","render","createTransform","scale","text","p1","p2","p3","p4","fillInstruction","strokeInstruction","transform","composeTransform","intersects","applyTransform","equals","CanvasInstruction","render","i","ii","createTransform","transform","composeTransform","i","result","context","scale","ImageState","getIconImage","image","EventType","i","geometry","transforms","Event","ImageState","EventType","canvasPool","createTransform","equals","equivalent","transform","toTransformString","RenderEventType","composeTransform","ViewHint","transform","canvasPool","render","RenderEventType","intersectsExtent","transforms","userProjection","getSquaredRenderTolerance","defaultRenderOrder","wrapExtentX","equals","CanvasBuilderGroup","getRenderTolerance","extent","userExtent","colorFromString","context","always","context","Circle","none","ViewProperty","ViewHint","isEmpty","polygonFromExtent","userProjection","equals","centerNone","rotationNone","coordinatesEqual","LayerProperty","LayerProperty","EventType","layerState","RenderEventType","Property","toStyleFunction","EventTarget","EventType","TileState","TileState","Event","EventType","PointerEventType","EventType","MapBrowserEventType","newEvent","EventType","TileState","MapEventType","EventType","equals","EventType","transform","contains","EventType","InteractionProperty","MapBrowserEventType","MapBrowserEventType","centroid","centroidFromPointers","map","coordinates","Event","EventType","Key","EventType","EventType","centroidFromPointers","centroidFromPointers","defaults","Event","CollectionEventType","ObjectEventType","EventType","wrapX","coordinates","callback","iconImageCache","ObjectEventType","RenderEventType","createTransform","defaultControls","defaultInteractions","MapProperty","CollectionEventType","applyTransform","PointerEventType","EventType","ViewHint","RenderEventType","MapEventType","MapBrowserEventType","ObjectEventType","isEmpty","equalsExtent","equals","createOrUpdate","getProjection","equivalentProjection","transform","coordinates","Geometry","getProjection","coordinates","geometry","TileState","self","width","height","xPos","yPos","source","applyMatrix","TileState","renderReprojected","EventType","state","createOrUpdate","createTileCoord","cacheSize","applyTransform","TileState","dx","dy","i","frameState","cacheSize","TileProperty","createOrUpdateTileRange","scale","createOrUpdateTileCoord","getProjection","tileCoordHash","getTileGridForProjection","scaleSize","Event","TileState","TileEventType","getTileGridForProjection","TileState","EventType","z","x","y","pixelRatio","render","getProjection"],"sources":["../../../../../client/simple/node_modules/ol/CollectionEventType.js","../../../../../client/simple/node_modules/ol/ObjectEventType.js","../../../../../client/simple/node_modules/ol/events/EventType.js","../../../../../client/simple/node_modules/ol/Disposable.js","../../../..Line truncated
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"preferences.min.js","names":["engineDescriptions: Record<string, [string, string]> | undefined","enable: boolean","engineToggles: NodeListOf<HTMLInputElement>","engineElements: NodeListOf<HTMLElement>","enableAllEngines: NodeListOf<HTMLElement>","disableAllEngines: NodeListOf<HTMLElement>","copyHashButton: HTMLElement | null","event: Event"],"sources":["../../../../../client/simple/src/js/main/preferences.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { http, listen, settings } from \"../core/toolkit.ts\";\n\nlet engineDescriptions: Record<string, [string, string]> | undefined;\n\nconst loadEngineDescriptions = async (): Promise<void> => {\n if (engineDescriptions) return;\n try {\n const res = await http(\"GET\", \"engine_descriptions.json\");\n engineDescriptions = await res.json();\n } catch (error) {\n console.error(\"Error fetching engineDescriptions:\", error);\n }\n if (!engineDescriptions) return;\n\n for (const [engine_name, [description, source]] of Object.entries(engineDescriptions)) {\n const elements = document.querySelectorAll<HTMLElement>(`[data-engine-name=\"${engine_name}\"] .engine-description`);\n const sourceText = ` (<i>${settings.translations?.Source}: ${source}</i>)`;\n\n for (const element of elements) {\n element.innerHTML = description + sourceText;\n }\n }\n};\n\nconst toggleEngines = (enable: boolean, engineToggles: NodeListOf<HTMLInputElement>): void => {\n for (const engineToggle of engineToggles) {\n // check if element visible, so that only engines of the current category are modified\n if (engineToggle.offsetParent) {\n engineToggle.checked = !enable;\n }\n }\n};\n\nconst engineElements: NodeListOf<HTMLElement> = document.querySelectorAll<HTMLElement>(\"[data-engine-name]\");\nfor (const engineElement of engineElements) {\n listen(\"mouseenter\", engineElement, loadEngineDescriptions);\n}\n\nconst engineToggles: NodeListOf<HTMLInputElement> = document.querySelectorAll<HTMLInputElement>(\n \"tbody input[type=checkbox][class~=checkbox-onoff]\"\n);\n\nconst enableAllEngines: NodeListOf<HTMLElement> = document.querySelectorAll<HTMLElement>(\".enable-all-engines\");\nfor (const engine of enableAllEngines) {\n listen(\"click\", engine, () => toggleEngines(true, engineToggles));\n}\n\nconst disableAllEngines: NodeListOf<HTMLElement> = document.querySelectorAll<HTMLElement>(\".disable-all-engines\");\nfor (const engine of disableAllEngines) {\n listen(\"click\", engine, () => toggleEngines(false, engineToggles));\n}\n\nconst copyHashButton: HTMLElement | null = document.querySelector<HTMLElement>(\"#copy-hash\");\nif (copyHashButton) {\n listen(\"click\", copyHashButton, async (event: Event) => {\n event.preventDefault();\n\n const { copiedText, hash } = copyHashButton.dataset;\n if (!(copiedText && hash)) return;\n\n try {\n await navigator.clipboard.writeText(hash);\n copyHashButton.innerText = copiedText;\n } catch (error) {\n console.error(\"Failed to copy hash:\", error);\n }\n });\n}\n"],"mappings":"wDAIA,IAAIA,EAEJ,MAAM,EAAyB,SAA2B,CACpD,MACJ,IAAI,CACF,IAAM,EAAM,MAAM,EAAK,MAAO,2BAA2B,CACzD,EAAqB,MAAM,EAAI,MAAM,AACtC,OAAQ,EAAO,CACd,QAAQ,MAAM,qCAAsC,EAAM,AAC3D,CACI,KAEL,IAAK,GAAM,CAAC,EAAa,CAAC,EAAa,EAAO,CAAC,GAAI,OAAO,QAAQ,EAAmB,CAAE,CACrF,IAAM,EAAW,SAAS,iBAA8B,CAAC,mBAAmB,EAAE,EAAY,sBAAsB,CAAC,CAAC,CAC5G,EAAa,CAAC,KAAK,EAAE,EAAS,cAAc,OAAO,OAAO,EAAE,EAAO,KAAK,CAAC,CAE/E,IAAK,IAAM,KAAW,EACpB,EAAQ,UAAY,EAAc,CAErC,CAVA,CAWF,EAEK,EAAgB,CAACC,EAAiBC,IAAsD,CAC5F,IAAK,IAAM,KAAgB,EAErB,EAAa,eACf,EAAa,QAAU,CAAC,EAG7B,EAEKC,EAA0C,SAAS,iBAA8B,qBAAqB,CAC5G,IAAK,IAAM,KAAiB,EAC1B,EAAO,aAAc,EAAe,EAAuB,CAG7D,MAAMD,EAA8C,SAAS,iBAC3D,oDACD,CAEKE,EAA4C,SAAS,iBAA8B,sBAAsB,CAC/G,IAAK,IAAM,KAAU,EACnB,EAAO,QAAS,EAAQ,IAAM,EAAc,GAAM,EAAc,CAAC,CAGnE,MAAMC,EAA6C,SAAS,iBAA8B,uBAAuB,CACjH,IAAK,IAAM,KAAU,EACnB,EAAO,QAAS,EAAQ,IAAM,EAAc,GAAO,EAAc,CAAC,CAGpE,MAAMC,EAAqC,SAAS,cAA2B,aAAa,CACxF,GACF,EAAO,QAAS,EAAgB,MAAOC,GAAiB,CACtD,EAAM,gBAAgB,CAEtB,GAAM,CAAE,aAAY,OAAM,CAAG,EAAe,QACtC,MAAc,EAEpB,GAAI,CACF,MAAM,UAAU,UAAU,UAAU,EAAK,CACzC,EAAe,UAAY,CAC5B,OAAQ,EAAO,CACd,QAAQ,MAAM,uBAAwB,EAAM,AAC7C,CACF,EAAC"}
|
||||
{"version":3,"file":"preferences.min.js","names":["engineDescriptions: Record<string, [string, string]> | undefined","engineElements: NodeListOf<HTMLElement>","engineToggles: NodeListOf<HTMLInputElement>","enableAllEngines: NodeListOf<HTMLElement>","disableAllEngines: NodeListOf<HTMLElement>","copyHashButton: HTMLElement | null"],"sources":["../../../../../client/simple/src/js/main/preferences.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { http, listen, settings } from \"../core/toolkit.ts\";\n\nlet engineDescriptions: Record<string, [string, string]> | undefined;\n\nconst loadEngineDescriptions = async (): Promise<void> => {\n if (engineDescriptions) return;\n try {\n const res = await http(\"GET\", \"engine_descriptions.json\");\n engineDescriptions = await res.json();\n } catch (error) {\n console.error(\"Error fetching engineDescriptions:\", error);\n }\n if (!engineDescriptions) return;\n\n for (const [engine_name, [description, source]] of Object.entries(engineDescriptions)) {\n const elements = document.querySelectorAll<HTMLElement>(`[data-engine-name=\"${engine_name}\"] .engine-description`);\n const sourceText = ` (<i>${settings.translations?.Source}: ${source}</i>)`;\n\n for (const element of elements) {\n element.innerHTML = description + sourceText;\n }\n }\n};\n\nconst toggleEngines = (enable: boolean, engineToggles: NodeListOf<HTMLInputElement>): void => {\n for (const engineToggle of engineToggles) {\n // check if element visible, so that only engines of the current category are modified\n if (engineToggle.offsetParent) {\n engineToggle.checked = !enable;\n }\n }\n};\n\nconst engineElements: NodeListOf<HTMLElement> = document.querySelectorAll<HTMLElement>(\"[data-engine-name]\");\nfor (const engineElement of engineElements) {\n listen(\"mouseenter\", engineElement, loadEngineDescriptions);\n}\n\nconst engineToggles: NodeListOf<HTMLInputElement> = document.querySelectorAll<HTMLInputElement>(\n \"tbody input[type=checkbox][class~=checkbox-onoff]\"\n);\n\nconst enableAllEngines: NodeListOf<HTMLElement> = document.querySelectorAll<HTMLElement>(\".enable-all-engines\");\nfor (const engine of enableAllEngines) {\n listen(\"click\", engine, () => toggleEngines(true, engineToggles));\n}\n\nconst disableAllEngines: NodeListOf<HTMLElement> = document.querySelectorAll<HTMLElement>(\".disable-all-engines\");\nfor (const engine of disableAllEngines) {\n listen(\"click\", engine, () => toggleEngines(false, engineToggles));\n}\n\nconst copyHashButton: HTMLElement | null = document.querySelector<HTMLElement>(\"#copy-hash\");\nif (copyHashButton) {\n listen(\"click\", copyHashButton, async (event: Event) => {\n event.preventDefault();\n\n const { copiedText, hash } = copyHashButton.dataset;\n if (!(copiedText && hash)) return;\n\n try {\n await navigator.clipboard.writeText(hash);\n copyHashButton.innerText = copiedText;\n } catch (error) {\n console.error(\"Failed to copy hash:\", error);\n }\n });\n}\n"],"mappings":"wDAIA,IAAIA,EAEJ,MAAM,EAAyB,SAA2B,CACpD,MACJ,IAAI,CACF,IAAM,EAAM,MAAM,EAAK,MAAO,4BAC9B,EAAqB,MAAM,EAAI,MAChC,OAAQ,EAAO,CACd,QAAQ,MAAM,qCAAsC,EACrD,CACI,KAEL,IAAK,GAAM,CAAC,EAAa,CAAC,EAAa,EAAO,CAAC,GAAI,OAAO,QAAQ,GAAqB,CACrF,IAAM,EAAW,SAAS,iBAA8B,sBAAsB,EAAY,yBACpF,EAAa,QAAQ,EAAS,cAAc,OAAO,SAAS,EAAO,OAEzE,IAAK,IAAM,KAAW,EACpB,EAAQ,UAAY,EAAc,CAErC,CAVA,CAWF,EAEK,GAAiB,EAAiB,IAAsD,CAC5F,IAAK,IAAM,KAAgB,EAErB,EAAa,eACf,EAAa,QAAU,CAAC,EAG7B,EAEKC,EAA0C,SAAS,iBAA8B,sBACvF,IAAK,IAAM,KAAiB,EAC1B,EAAO,aAAc,EAAe,GAGtC,MAAMC,EAA8C,SAAS,iBAC3D,qDAGIC,EAA4C,SAAS,iBAA8B,uBACzF,IAAK,IAAM,KAAU,EACnB,EAAO,QAAS,MAAc,EAAc,GAAM,IAGpD,MAAMC,EAA6C,SAAS,iBAA8B,wBAC1F,IAAK,IAAM,KAAU,EACnB,EAAO,QAAS,MAAc,EAAc,GAAO,IAGrD,MAAMC,EAAqC,SAAS,cAA2B,cAC3E,GACF,EAAO,QAAS,EAAgB,KAAO,IAAiB,CACtD,EAAM,iBAEN,GAAM,CAAE,aAAY,OAAM,CAAG,EAAe,QACtC,MAAc,EAEpB,GAAI,CACF,MAAM,UAAU,UAAU,UAAU,GACpC,EAAe,UAAY,CAC5B,OAAQ,EAAO,CACd,QAAQ,MAAM,uBAAwB,EACvC,CACF"}
|
||||
+1
-1
@@ -7,5 +7,5 @@ import{c as e,e as t,f as n,g as r}from"./searxng.core.min.js";
|
||||
* @author John Doherty <www.johndoherty.info>
|
||||
* @license MIT
|
||||
*/
|
||||
(function(e,t){"use strict";typeof e.CustomEvent!=`function`&&(e.CustomEvent=function(e,n){n||={bubbles:!1,cancelable:!1,detail:void 0};var r=t.createEvent(`CustomEvent`);return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r},e.CustomEvent.prototype=e.Event.prototype),t.addEventListener(`touchstart`,u,!1),t.addEventListener(`touchmove`,d,!1),t.addEventListener(`touchend`,l,!1);var n=null,r=null,i=null,a=null,o=null,s=null,c=0;function l(e){if(s===e.target){var l=parseInt(f(s,`data-swipe-threshold`,`20`),10),u=f(s,`data-swipe-unit`,`px`),d=parseInt(f(s,`data-swipe-timeout`,`500`),10),p=Date.now()-o,m=``,h=e.changedTouches||e.touches||[];if(u===`vh`&&(l=Math.round(l/100*t.documentElement.clientHeight)),u===`vw`&&(l=Math.round(l/100*t.documentElement.clientWidth)),Math.abs(i)>Math.abs(a)?Math.abs(i)>l&&p<d&&(m=i>0?`swiped-left`:`swiped-right`):Math.abs(a)>l&&p<d&&(m=a>0?`swiped-up`:`swiped-down`),m!==``){var g={dir:m.replace(/swiped-/,``),touchType:(h[0]||{}).touchType||`direct`,fingers:c,xStart:parseInt(n,10),xEnd:parseInt((h[0]||{}).clientX||-1,10),yStart:parseInt(r,10),yEnd:parseInt((h[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent(`swiped`,{bubbles:!0,cancelable:!0,detail:g})),s.dispatchEvent(new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:g}))}n=null,r=null,o=null}}function u(e){e.target.getAttribute(`data-swipe-ignore`)!==`true`&&(s=e.target,o=Date.now(),n=e.touches[0].clientX,r=e.touches[0].clientY,i=0,a=0,c=e.touches.length)}function d(e){if(!(!n||!r)){var t=e.touches[0].clientX,o=e.touches[0].clientY;i=n-t,a=r-o}}function f(e,n,r){for(;e&&e!==t.documentElement;){var i=e.getAttribute(n);if(i)return i;e=e.parentNode}return r}})(window,document);let i;const a=e=>{i&&clearTimeout(i);let t=e.querySelector(`.result-images-source img`);if(!t)return;let n=e.querySelector(`.image_thumbnail`);if(n){if(n.src===`${r.theme_static_path}/img/img_load_error.svg`)return;t.onerror=()=>{t.src=n.src},t.src=n.src}let a=t.getAttribute(`data-src`);a&&(i=setTimeout(()=>{t.src=a,t.removeAttribute(`data-src`)},1e3))},o=document.querySelectorAll(`#urls img.image_thumbnail`);for(let e of o)e.complete&&e.naturalWidth===0&&(e.src=`${r.theme_static_path}/img/img_load_error.svg`),e.onerror=()=>{e.src=`${r.theme_static_path}/img/img_load_error.svg`};const s=document.querySelector(`#search_url button#copy_url`);s?.style.setProperty(`display`,`block`),n.selectImage=e=>{let t=document.getElementById(`results`);t?.classList.add(`image-detail-open`),window.location.hash=`#image-viewer`,n.scrollPageToSelected?.(),e&&a(e)},n.closeDetail=()=>{let e=document.getElementById(`results`);e?.classList.remove(`image-detail-open`),window.location.hash===`#image-viewer`&&window.history.back(),n.scrollPageToSelected?.()},t(`click`,`.btn-collapse`,function(){let t=this.getAttribute(`data-btn-text-collapsed`),n=this.getAttribute(`data-btn-text-not-collapsed`),r=this.getAttribute(`data-target`);if(!(r&&t&&n))return;let i=document.querySelector(r);e(i);let a=this.classList.contains(`collapsed`),o=a?n:t,s=a?t:n;this.innerHTML=this.innerHTML.replace(s,o),this.classList.toggle(`collapsed`),i.classList.toggle(`invisible`)}),t(`click`,`.media-loader`,function(){let t=this.getAttribute(`data-target`);if(!t)return;let n=document.querySelector(`${t} > iframe`);e(n);let r=n.getAttribute(`src`);if(!r){let e=n.getAttribute(`data-src`);e&&n.setAttribute(`src`,e)}}),t(`click`,`#copy_url`,async function(){let t=this.parentElement?.querySelector(`pre`);e(t),await navigator.clipboard.writeText(t.innerText);let n=this.dataset.copiedText;n&&(this.innerText=n)}),t(`click`,`.result-detail-close`,e=>{e.preventDefault(),n.closeDetail?.()}),t(`click`,`.result-detail-previous`,e=>{e.preventDefault(),n.selectPrevious?.(!1)}),t(`click`,`.result-detail-next`,e=>{e.preventDefault(),n.selectNext?.(!1)}),window.addEventListener(`hashchange`,()=>{window.location.hash!==`#image-viewer`&&n.closeDetail?.()});const c=document.querySelectorAll(`.swipe-horizontal`);for(let e of c)t(`swiped-left`,e,()=>{n.selectNext?.(!1)}),t(`swiped-right`,e,()=>{n.selectPrevious?.(!1)});window.addEventListener(`scroll`,()=>{let e=document.getElementById(`backToTop`),t=document.getElementById(`results`);if(e&&t){let e=document.documentElement.scrollTop||document.body.scrollTop,n=e>=100;t.classList.toggle(`scrolling`,n)}},!0);
|
||||
(function(e,t){typeof e.CustomEvent!=`function`&&(e.CustomEvent=function(e,n){n||={bubbles:!1,cancelable:!1,detail:void 0};var r=t.createEvent(`CustomEvent`);return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r},e.CustomEvent.prototype=e.Event.prototype),t.addEventListener(`touchstart`,u,!1),t.addEventListener(`touchmove`,d,!1),t.addEventListener(`touchend`,l,!1);var n=null,r=null,i=null,a=null,o=null,s=null,c=0;function l(e){if(s===e.target){var l=parseInt(f(s,`data-swipe-threshold`,`20`),10),u=f(s,`data-swipe-unit`,`px`),d=parseInt(f(s,`data-swipe-timeout`,`500`),10),p=Date.now()-o,m=``,h=e.changedTouches||e.touches||[];if(u===`vh`&&(l=Math.round(l/100*t.documentElement.clientHeight)),u===`vw`&&(l=Math.round(l/100*t.documentElement.clientWidth)),Math.abs(i)>Math.abs(a)?Math.abs(i)>l&&p<d&&(m=i>0?`swiped-left`:`swiped-right`):Math.abs(a)>l&&p<d&&(m=a>0?`swiped-up`:`swiped-down`),m!==``){var g={dir:m.replace(/swiped-/,``),touchType:(h[0]||{}).touchType||`direct`,fingers:c,xStart:parseInt(n,10),xEnd:parseInt((h[0]||{}).clientX||-1,10),yStart:parseInt(r,10),yEnd:parseInt((h[0]||{}).clientY||-1,10)};s.dispatchEvent(new CustomEvent(`swiped`,{bubbles:!0,cancelable:!0,detail:g})),s.dispatchEvent(new CustomEvent(m,{bubbles:!0,cancelable:!0,detail:g}))}n=null,r=null,o=null}}function u(e){e.target.getAttribute(`data-swipe-ignore`)!==`true`&&(s=e.target,o=Date.now(),n=e.touches[0].clientX,r=e.touches[0].clientY,i=0,a=0,c=e.touches.length)}function d(e){if(!(!n||!r)){var t=e.touches[0].clientX,o=e.touches[0].clientY;i=n-t,a=r-o}}function f(e,n,r){for(;e&&e!==t.documentElement;){var i=e.getAttribute(n);if(i)return i;e=e.parentNode}return r}})(window,document);let i;const a=e=>{i&&clearTimeout(i);let t=e.querySelector(`.result-images-source img`);if(!t)return;let n=e.querySelector(`.image_thumbnail`);if(n){if(n.src===`${r.theme_static_path}/img/img_load_error.svg`)return;t.onerror=()=>{t.src=n.src},t.src=n.src}let a=t.getAttribute(`data-src`);a&&(i=setTimeout(()=>{t.src=a,t.removeAttribute(`data-src`)},1e3))},o=document.querySelectorAll(`#urls img.image_thumbnail`);for(let e of o)e.complete&&e.naturalWidth===0&&(e.src=`${r.theme_static_path}/img/img_load_error.svg`),e.onerror=()=>{e.src=`${r.theme_static_path}/img/img_load_error.svg`};const s=document.querySelector(`#search_url button#copy_url`);s?.style.setProperty(`display`,`block`),n.selectImage=e=>{let t=document.getElementById(`results`);t?.classList.add(`image-detail-open`),window.location.hash=`#image-viewer`,n.scrollPageToSelected?.(),e&&a(e)},n.closeDetail=()=>{let e=document.getElementById(`results`);e?.classList.remove(`image-detail-open`),window.location.hash===`#image-viewer`&&window.history.back(),n.scrollPageToSelected?.()},t(`click`,`.btn-collapse`,function(){let t=this.getAttribute(`data-btn-text-collapsed`),n=this.getAttribute(`data-btn-text-not-collapsed`),r=this.getAttribute(`data-target`);if(!(r&&t&&n))return;let i=document.querySelector(r);e(i);let a=this.classList.contains(`collapsed`),o=a?n:t,s=a?t:n;this.innerHTML=this.innerHTML.replace(s,o),this.classList.toggle(`collapsed`),i.classList.toggle(`invisible`)}),t(`click`,`.media-loader`,function(){let t=this.getAttribute(`data-target`);if(!t)return;let n=document.querySelector(`${t} > iframe`);e(n);let r=n.getAttribute(`src`);if(!r){let e=n.getAttribute(`data-src`);e&&n.setAttribute(`src`,e)}}),t(`click`,`#copy_url`,async function(){let t=this.parentElement?.querySelector(`pre`);e(t),await navigator.clipboard.writeText(t.innerText);let n=this.dataset.copiedText;n&&(this.innerText=n)}),t(`click`,`.result-detail-close`,e=>{e.preventDefault(),n.closeDetail?.()}),t(`click`,`.result-detail-previous`,e=>{e.preventDefault(),n.selectPrevious?.(!1)}),t(`click`,`.result-detail-next`,e=>{e.preventDefault(),n.selectNext?.(!1)}),window.addEventListener(`hashchange`,()=>{window.location.hash!==`#image-viewer`&&n.closeDetail?.()});const c=document.querySelectorAll(`.swipe-horizontal`);for(let e of c)t(`swiped-left`,e,()=>{n.selectNext?.(!1)}),t(`swiped-right`,e,()=>{n.selectPrevious?.(!1)});window.addEventListener(`scroll`,()=>{let e=document.getElementById(`backToTop`),t=document.getElementById(`results`);if(e&&t){let e=document.documentElement.scrollTop||document.body.scrollTop,n=e>=100;t.classList.toggle(`scrolling`,n)}},!0);
|
||||
//# sourceMappingURL=results.min.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"results.min.js","names":["window","document","imgTimeoutID: number","resultElement: HTMLElement","imageThumbnails: NodeListOf<HTMLImageElement>","copyUrlButton: HTMLButtonElement | null","event: Event","swipeHorizontal: NodeListOf<HTMLElement>"],"sources":["../../../../../client/simple/node_modules/swiped-events/src/swiped-events.js","../../../../../client/simple/src/js/main/results.ts"],"sourcesContent":["/*!\n * swiped-events.js - v@version@\n * Pure JavaScript swipe events\n * https://github.com/john-doherty/swiped-events\n * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element\n * @author John Doherty <www.johndoherty.info>\n * @license MIT\n */\n(function (window, document) {\n\n 'use strict';\n\n // patch CustomEvent to allow constructor creation (IE/Chrome)\n if (typeof window.CustomEvent !== 'function') {\n\n window.CustomEvent = function (event, params) {\n\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n window.CustomEvent.prototype = window.Event.prototype;\n }\n\n document.addEventListener('touchstart', handleTouchStart, false);\n document.addEventListener('touchmove', handleTouchMove, false);\n document.addEventListener('touchend', handleTouchEnd, false);\n\n var xDown = null;\n var yDown = null;\n var xDiff = null;\n var yDiff = null;\n var timeDown = null;\n var startEl = null;\n var touchCount = 0;\n\n /**\n * Fires swiped event if swipe detected on touchend\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchEnd(e) {\n\n // if the user released on a different target, cancel!\n if (startEl !== e.target) return;\n\n var swipeThreshold = parseInt(getNearestAttribute(startEl, 'data-swipe-threshold', '20'), 10); // default 20 units\n var swipeUnit = getNearestAttribute(startEl, 'data-swipe-unit', 'px'); // default px\n var swipeTimeout = parseInt(getNearestAttribute(startEl, 'data-swipe-timeout', '500'), 10); // default 500ms\n var timeDiff = Date.now() - timeDown;\n var eventType = '';\n var changedTouches = e.changedTouches || e.touches || [];\n\n if (swipeUnit === 'vh') {\n swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientHeight); // get percentage of viewport height in pixels\n }\n if (swipeUnit === 'vw') {\n swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientWidth); // get percentage of viewport height in pixels\n }\n\n if (Math.abs(xDiff) > Math.abs(yDiff)) { // most significant\n if (Math.abs(xDiff) > swipeThreshold && timeDiff < swipeTimeout) {\n if (xDiff > 0) {\n eventType = 'swiped-left';\n }\n else {\n eventType = 'swiped-right';\n }\n }\n }\n else if (Math.abs(yDiff) > swipeThreshold && timeDiff < swipeTimeout) {\n if (yDiff > 0) {\n eventType = 'swiped-up';\n }\n else {\n eventType = 'swiped-down';\n }\n }\n\n if (eventType !== '') {\n\n var eventData = {\n dir: eventType.replace(/swiped-/, ''),\n touchType: (changedTouches[0] || {}).touchType || 'direct',\n fingers: touchCount, // Number of fingers used\n xStart: parseInt(xDown, 10),\n xEnd: parseInt((changedTouches[0] || {}).clientX || -1, 10),\n yStart: parseInt(yDown, 10),\n yEnd: parseInt((changedTouches[0] || {}).clientY || -1, 10)\n };\n\n // fire `swiped` event event on the element that started the swipe\n startEl.dispatchEvent(new CustomEvent('swiped', { bubbles: true, cancelable: true, detail: eventData }));\n\n // fire `swiped-dir` event on the element that started the swipe\n startEl.dispatchEvent(new CustomEvent(eventType, { bubbles: true, cancelable: true, detail: eventData }));\n }\n\n // reset values\n xDown = null;\n yDown = null;\n timeDown = null;\n }\n /**\n * Records current location on touchstart event\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchStart(e) {\n\n // if the element has data-swipe-ignore=\"true\" we stop listening for swipe events\n if (e.target.getAttribute('data-swipe-ignore') === 'true') return;\n\n startEl = e.target;\n\n timeDown = Date.now();\n xDown = e.touches[Line truncated
|
||||
{"version":3,"file":"results.min.js","names":["window","document","imgTimeoutID: number","imageThumbnails: NodeListOf<HTMLImageElement>","copyUrlButton: HTMLButtonElement | null","swipeHorizontal: NodeListOf<HTMLElement>"],"sources":["../../../../../client/simple/node_modules/swiped-events/src/swiped-events.js","../../../../../client/simple/src/js/main/results.ts"],"sourcesContent":["/*!\n * swiped-events.js - v@version@\n * Pure JavaScript swipe events\n * https://github.com/john-doherty/swiped-events\n * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element\n * @author John Doherty <www.johndoherty.info>\n * @license MIT\n */\n(function (window, document) {\n\n 'use strict';\n\n // patch CustomEvent to allow constructor creation (IE/Chrome)\n if (typeof window.CustomEvent !== 'function') {\n\n window.CustomEvent = function (event, params) {\n\n params = params || { bubbles: false, cancelable: false, detail: undefined };\n\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n window.CustomEvent.prototype = window.Event.prototype;\n }\n\n document.addEventListener('touchstart', handleTouchStart, false);\n document.addEventListener('touchmove', handleTouchMove, false);\n document.addEventListener('touchend', handleTouchEnd, false);\n\n var xDown = null;\n var yDown = null;\n var xDiff = null;\n var yDiff = null;\n var timeDown = null;\n var startEl = null;\n var touchCount = 0;\n\n /**\n * Fires swiped event if swipe detected on touchend\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchEnd(e) {\n\n // if the user released on a different target, cancel!\n if (startEl !== e.target) return;\n\n var swipeThreshold = parseInt(getNearestAttribute(startEl, 'data-swipe-threshold', '20'), 10); // default 20 units\n var swipeUnit = getNearestAttribute(startEl, 'data-swipe-unit', 'px'); // default px\n var swipeTimeout = parseInt(getNearestAttribute(startEl, 'data-swipe-timeout', '500'), 10); // default 500ms\n var timeDiff = Date.now() - timeDown;\n var eventType = '';\n var changedTouches = e.changedTouches || e.touches || [];\n\n if (swipeUnit === 'vh') {\n swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientHeight); // get percentage of viewport height in pixels\n }\n if (swipeUnit === 'vw') {\n swipeThreshold = Math.round((swipeThreshold / 100) * document.documentElement.clientWidth); // get percentage of viewport height in pixels\n }\n\n if (Math.abs(xDiff) > Math.abs(yDiff)) { // most significant\n if (Math.abs(xDiff) > swipeThreshold && timeDiff < swipeTimeout) {\n if (xDiff > 0) {\n eventType = 'swiped-left';\n }\n else {\n eventType = 'swiped-right';\n }\n }\n }\n else if (Math.abs(yDiff) > swipeThreshold && timeDiff < swipeTimeout) {\n if (yDiff > 0) {\n eventType = 'swiped-up';\n }\n else {\n eventType = 'swiped-down';\n }\n }\n\n if (eventType !== '') {\n\n var eventData = {\n dir: eventType.replace(/swiped-/, ''),\n touchType: (changedTouches[0] || {}).touchType || 'direct',\n fingers: touchCount, // Number of fingers used\n xStart: parseInt(xDown, 10),\n xEnd: parseInt((changedTouches[0] || {}).clientX || -1, 10),\n yStart: parseInt(yDown, 10),\n yEnd: parseInt((changedTouches[0] || {}).clientY || -1, 10)\n };\n\n // fire `swiped` event event on the element that started the swipe\n startEl.dispatchEvent(new CustomEvent('swiped', { bubbles: true, cancelable: true, detail: eventData }));\n\n // fire `swiped-dir` event on the element that started the swipe\n startEl.dispatchEvent(new CustomEvent(eventType, { bubbles: true, cancelable: true, detail: eventData }));\n }\n\n // reset values\n xDown = null;\n yDown = null;\n timeDown = null;\n }\n /**\n * Records current location on touchstart event\n * @param {object} e - browser event object\n * @returns {void}\n */\n function handleTouchStart(e) {\n\n // if the element has data-swipe-ignore=\"true\" we stop listening for swipe events\n if (e.target.getAttribute('data-swipe-ignore') === 'true') return;\n\n startEl = e.target;\n\n timeDown = Date.now();\n xDown = e.touches[0].clientX;\n yDown = e.touches[0].clLine truncated
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"file":"search.min.js","names":["qInput: HTMLInputElement","cs: HTMLElement","event: MouseEvent","isMobile: boolean","isResultsPage: boolean","categoryButtons: HTMLButtonElement[]","form: HTMLFormElement | null","event: Event"],"sources":["../../../../../client/simple/src/js/main/search.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { assertElement, listen, settings } from \"../core/toolkit.ts\";\n\nconst submitIfQuery = (qInput: HTMLInputElement): void => {\n if (qInput.value.length > 0) {\n const search = document.getElementById(\"search\") as HTMLFormElement | null;\n search?.submit();\n }\n};\n\nconst updateClearButton = (qInput: HTMLInputElement, cs: HTMLElement): void => {\n cs.classList.toggle(\"empty\", qInput.value.length === 0);\n};\n\nconst createClearButton = (qInput: HTMLInputElement): void => {\n const cs = document.getElementById(\"clear_search\");\n assertElement(cs);\n\n updateClearButton(qInput, cs);\n\n listen(\"click\", cs, (event: MouseEvent) => {\n event.preventDefault();\n qInput.value = \"\";\n qInput.focus();\n updateClearButton(qInput, cs);\n });\n\n listen(\"input\", qInput, () => updateClearButton(qInput, cs), { passive: true });\n};\n\nconst qInput = document.getElementById(\"q\") as HTMLInputElement | null;\nassertElement(qInput);\n\nconst isMobile: boolean = window.matchMedia(\"(max-width: 50em)\").matches;\nconst isResultsPage: boolean = document.querySelector(\"main\")?.id === \"main_results\";\n\n// focus search input on large screens\nif (!(isMobile || isResultsPage)) {\n qInput.focus();\n}\n\ncreateClearButton(qInput);\n\n// Additionally to searching when selecting a new category, we also\n// automatically start a new search request when the user changes a search\n// filter (safesearch, time range or language) (this requires JavaScript\n// though)\nif (\n settings.search_on_category_select &&\n // If .search_filters is undefined (invisible) we are on the homepage and\n // hence don't have to set any listeners\n document.querySelector(\".search_filters\")\n) {\n const safesearchElement = document.getElementById(\"safesearch\");\n if (safesearchElement) {\n listen(\"change\", safesearchElement, () => submitIfQuery(qInput));\n }\n\n const timeRangeElement = document.getElementById(\"time_range\");\n if (timeRangeElement) {\n listen(\"change\", timeRangeElement, () => submitIfQuery(qInput));\n }\n\n const languageElement = document.getElementById(\"language\");\n if (languageElement) {\n listen(\"change\", languageElement, () => submitIfQuery(qInput));\n }\n}\n\nconst categoryButtons: HTMLButtonElement[] = [\n ...document.querySelectorAll<HTMLButtonElement>(\"button.category_button\")\n];\nfor (const button of categoryButtons) {\n listen(\"click\", button, (event: MouseEvent) => {\n if (event.shiftKey) {\n event.preventDefault();\n button.classList.toggle(\"selected\");\n return;\n }\n\n // deselect all other categories\n for (const categoryButton of categoryButtons) {\n categoryButton.classList.toggle(\"selected\", categoryButton === button);\n }\n });\n}\n\nconst form: HTMLFormElement | null = document.querySelector<HTMLFormElement>(\"#search\");\nassertElement(form);\n\n// override form submit action to update the actually selected categories\nlisten(\"submit\", form, (event: Event) => {\n event.preventDefault();\n\n const categoryValuesInput = document.querySelector<HTMLInputElement>(\"#selected-categories\");\n if (categoryValuesInput) {\n const categoryValues = categoryButtons\n .filter((button) => button.classList.contains(\"selected\"))\n .map((button) => button.name.replace(\"category_\", \"\"));\n\n categoryValuesInput.value = categoryValues.join(\",\");\n }\n\n form.submit();\n});\n"],"mappings":"wDAIA,MAAM,EAAgB,AAACA,GAAmC,CACxD,GAAI,EAAO,MAAM,OAAS,EAAG,CAC3B,IAAM,EAAS,SAAS,eAAe,SAAS,CAChD,GAAQ,QAAQ,AACjB,CACF,EAEK,EAAoB,CAACA,EAA0BC,IAA0B,CAC7E,EAAG,UAAU,OAAO,QAAS,EAAO,MAAM,SAAW,EAAE,AACxD,EAEK,EAAoB,AAACD,GAAmC,CAC5D,IAAM,EAAK,SAAS,eAAe,eAAe,CAClD,EAAc,EAAG,CAEjB,EAAkB,EAAQ,EAAG,CAE7B,EAAO,QAAS,EAAI,AAACE,GAAsB,CACzC,EAAM,gBAAgB,CACtB,EAAO,MAAQ,GACf,EAAO,OAAO,CACd,EAAkB,EAAQ,EAAG,AAC9B,EAAC,CAEF,EAAO,QAAS,EAAQ,IAAM,EAAkB,EAAQ,EAAG,CAAE,CAAE,QAAS,EAAM,EAAC,AAChF,EAEK,EAAS,SAAS,eAAe,IAAI,CAC3C,EAAc,EAAO,CAErB,MAAMC,EAAoB,OAAO,WAAW,oBAAoB,CAAC,QAC3DC,EAAyB,SAAS,cAAc,OAAO,EAAE,KAAO,eAatE,GAVM,GAAY,GAChB,EAAO,OAAO,CAGhB,EAAkB,EAAO,CAOvB,EAAS,2BAGT,SAAS,cAAc,kBAAkB,CACzC,CACA,IAAM,EAAoB,SAAS,eAAe,aAAa,CAC3D,GACF,EAAO,SAAU,EAAmB,IAAM,EAAc,EAAO,CAAC,CAGlE,IAAM,EAAmB,SAAS,eAAe,aAAa,CAC1D,GACF,EAAO,SAAU,EAAkB,IAAM,EAAc,EAAO,CAAC,CAGjE,IAAM,EAAkB,SAAS,eAAe,WAAW,CACvD,GACF,EAAO,SAAU,EAAiB,IAAM,EAAc,EAAO,CAAC,AAEjE,CAED,MAAMC,EAAuC,CAC3C,GAAG,SAAS,iBAAoC,yBAAyB,AAC1E,EACD,IAAK,IAAM,KAAU,EACnB,EAAO,QAAS,EAAQ,AAACH,GAAsB,CAC7C,GAAI,EAAM,SAAU,CAClB,EAAM,gBAAgB,CACtB,EAAO,UAAU,OAAO,WAAW,CACnC,MACD,CAGD,IAAK,IAAM,KAAkB,EAC3B,Line truncated
|
||||
{"version":3,"file":"search.min.js","names":["isMobile: boolean","isResultsPage: boolean","categoryButtons: HTMLButtonElement[]","form: HTMLFormElement | null"],"sources":["../../../../../client/simple/src/js/main/search.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport { assertElement, listen, settings } from \"../core/toolkit.ts\";\n\nconst submitIfQuery = (qInput: HTMLInputElement): void => {\n if (qInput.value.length > 0) {\n const search = document.getElementById(\"search\") as HTMLFormElement | null;\n search?.submit();\n }\n};\n\nconst updateClearButton = (qInput: HTMLInputElement, cs: HTMLElement): void => {\n cs.classList.toggle(\"empty\", qInput.value.length === 0);\n};\n\nconst createClearButton = (qInput: HTMLInputElement): void => {\n const cs = document.getElementById(\"clear_search\");\n assertElement(cs);\n\n updateClearButton(qInput, cs);\n\n listen(\"click\", cs, (event: MouseEvent) => {\n event.preventDefault();\n qInput.value = \"\";\n qInput.focus();\n updateClearButton(qInput, cs);\n });\n\n listen(\"input\", qInput, () => updateClearButton(qInput, cs), { passive: true });\n};\n\nconst qInput = document.getElementById(\"q\") as HTMLInputElement | null;\nassertElement(qInput);\n\nconst isMobile: boolean = window.matchMedia(\"(max-width: 50em)\").matches;\nconst isResultsPage: boolean = document.querySelector(\"main\")?.id === \"main_results\";\n\n// focus search input on large screens\nif (!(isMobile || isResultsPage)) {\n qInput.focus();\n}\n\ncreateClearButton(qInput);\n\n// Additionally to searching when selecting a new category, we also\n// automatically start a new search request when the user changes a search\n// filter (safesearch, time range or language) (this requires JavaScript\n// though)\nif (\n settings.search_on_category_select &&\n // If .search_filters is undefined (invisible) we are on the homepage and\n // hence don't have to set any listeners\n document.querySelector(\".search_filters\")\n) {\n const safesearchElement = document.getElementById(\"safesearch\");\n if (safesearchElement) {\n listen(\"change\", safesearchElement, () => submitIfQuery(qInput));\n }\n\n const timeRangeElement = document.getElementById(\"time_range\");\n if (timeRangeElement) {\n listen(\"change\", timeRangeElement, () => submitIfQuery(qInput));\n }\n\n const languageElement = document.getElementById(\"language\");\n if (languageElement) {\n listen(\"change\", languageElement, () => submitIfQuery(qInput));\n }\n}\n\nconst categoryButtons: HTMLButtonElement[] = [\n ...document.querySelectorAll<HTMLButtonElement>(\"button.category_button\")\n];\nfor (const button of categoryButtons) {\n listen(\"click\", button, (event: MouseEvent) => {\n if (event.shiftKey) {\n event.preventDefault();\n button.classList.toggle(\"selected\");\n return;\n }\n\n // deselect all other categories\n for (const categoryButton of categoryButtons) {\n categoryButton.classList.toggle(\"selected\", categoryButton === button);\n }\n });\n}\n\nconst form: HTMLFormElement | null = document.querySelector<HTMLFormElement>(\"#search\");\nassertElement(form);\n\n// override form submit action to update the actually selected categories\nlisten(\"submit\", form, (event: Event) => {\n event.preventDefault();\n\n const categoryValuesInput = document.querySelector<HTMLInputElement>(\"#selected-categories\");\n if (categoryValuesInput) {\n const categoryValues = categoryButtons\n .filter((button) => button.classList.contains(\"selected\"))\n .map((button) => button.name.replace(\"category_\", \"\"));\n\n categoryValuesInput.value = categoryValues.join(\",\");\n }\n\n form.submit();\n});\n"],"mappings":"wDAIA,MAAM,EAAiB,GAAmC,CACxD,GAAI,EAAO,MAAM,OAAS,EAAG,CAC3B,IAAM,EAAS,SAAS,eAAe,UACvC,GAAQ,QACT,CACF,EAEK,GAAqB,EAA0B,IAA0B,CAC7E,EAAG,UAAU,OAAO,QAAS,EAAO,MAAM,SAAW,EACtD,EAEK,EAAqB,GAAmC,CAC5D,IAAM,EAAK,SAAS,eAAe,gBACnC,EAAc,GAEd,EAAkB,EAAQ,GAE1B,EAAO,QAAS,EAAK,GAAsB,CACzC,EAAM,iBACN,EAAO,MAAQ,GACf,EAAO,QACP,EAAkB,EAAQ,EAC3B,GAED,EAAO,QAAS,MAAc,EAAkB,EAAQ,GAAK,CAAE,QAAS,GAAM,CAC/E,EAEK,EAAS,SAAS,eAAe,KACvC,EAAc,GAEd,MAAMA,EAAoB,OAAO,WAAW,qBAAqB,QAC3DC,EAAyB,SAAS,cAAc,SAAS,KAAO,eAatE,GAVM,GAAY,GAChB,EAAO,QAGT,EAAkB,GAOhB,EAAS,2BAGT,SAAS,cAAc,mBACvB,CACA,IAAM,EAAoB,SAAS,eAAe,cAC9C,GACF,EAAO,SAAU,MAAyB,EAAc,IAG1D,IAAM,EAAmB,SAAS,eAAe,cAC7C,GACF,EAAO,SAAU,MAAwB,EAAc,IAGzD,IAAM,EAAkB,SAAS,eAAe,YAC5C,GACF,EAAO,SAAU,MAAuB,EAAc,GAEzD,CAED,MAAMC,EAAuC,CAC3C,GAAG,SAAS,iBAAoC,0BACjD,CACD,IAAK,IAAM,KAAU,EACnB,EAAO,QAAS,EAAS,GAAsB,CAC7C,GAAI,EAAM,SAAU,CAClB,EAAM,iBACN,EAAO,UAAU,OAAO,YACxB,MACD,CAGD,IAAK,IAAM,KAAkB,EAC3B,EAAe,UAAU,OAAO,WAAY,IAAmB,EAElE,GAGH,MAAMC,EAA+B,SAAS,cAA+B,WAC7E,EAAc,GAGd,EAAO,SAAU,EAAO,GAAiB,CACvC,EAAM,iBAEN,IAAM,EAAsB,SAAS,cAAgC,wBACrE,GAAI,EAAqB,CACvB,IAAM,EAAiB,EACpB,OAAQ,GAAW,EAAO,UAAU,SAAS,aAC7C,IAAK,GAAW,EAAO,KAAK,QAAQ,YAAa,KAEpD,EAAoB,MAAQ,EAAe,KAAK,IACjD,CAED,EAAK,QACN"}
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
const e={index:`index`,results:`results`,preferences:`preferences`,unknown:`unknown`},t={closeDetail:void 0,scrollPageToSelected:void 0,selectImage:void 0,selectNext:void 0,selectPrevious:void 0},n=()=>{let t=document.querySelector(`meta[name="endpoint"]`)?.getAttribute(`content`);return t&&t in e?t:e.unknown},r=()=>{let e=document.querySelector(`script[client_settings]`)?.getAttribute(`client_settings`);if(!e)return{};try{return JSON.parse(atob(e))}catch(e){return console.error(`Failed to load client_settings:`,e),{}}},i=e=>{if(!e)throw Error(`Bad assertion: DOM element not found`)},a=async(e,t,n)=>{let r=new AbortController,i=setTimeout(()=>r.abort(),n?.timeout??3e4),a=await fetch(t,{body:n?.body,method:e,signal:r.signal}).finally(()=>clearTimeout(i));if(!a.ok)throw Error(a.statusText);return a},o=(e,t,n,r)=>{if(typeof t!=`string`){t.addEventListener(e,n,r);return}document.addEventListener(e,e=>{for(let r of e.composedPath())if(r instanceof HTMLElement&&r.matches(t)){try{n.call(r,e)}catch(e){console.error(e)}break}},r)},s=(e,t)=>{for(let e of t?.on??[])if(!e)return;document.readyState===`loading`?o(`DOMContentLoaded`,document,e,{once:!0}):e()},c=n(),l=r(),u=`modulepreload`,d=function(e){return`/static/themes/simple/`+e},f={},p=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=d(t,n),t in f)return;f[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``,o=!!n;if(o)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let s=document.createElement(`link`);if(s.rel=r?`stylesheet`:u,r||(s.as=`script`),s.crossOrigin=``,s.href=t,a&&s.setAttribute(`nonce`,a),document.head.appendChild(s),r)return new Promise((e,n)=>{s.addEventListener(`load`,e),s.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[]){if(e.status!==`rejected`)continue;i(e.reason)}return e().catch(i)})};s(()=>{p(()=>import(`./keyboard.min.js`),[]),p(()=>import(`./search.min.js`),[]),l.autocomplete&&p(()=>import(`./autocomplete.min.js`),[])},{on:[c===e.index]}),s(()=>{p(()=>import(`./keyboard.min.js`),[]),p(()=>import(`./mapresult.min.js`),[]),p(()=>import(`./results.min.js`),[]),p(()=>import(`./search.min.js`),[]),l.infinite_scroll&&p(()=>import(`./infinite_scroll.min.js`),[]),l.autocomplete&&p(()=>import(`./autocomplete.min.js`),[])},{on:[c===e.results]}),s(()=>{p(()=>import(`./preferences.min.js`),[])},{on:[c===e.preferences]}),o(`click`,`.close`,function(){this.parentNode?.classList.add(`invisible`)});export{p as b,i as c,a as d,o as e,t as f,l as g};
|
||||
const e={index:`index`,results:`results`,preferences:`preferences`,unknown:`unknown`},t={closeDetail:void 0,scrollPageToSelected:void 0,selectImage:void 0,selectNext:void 0,selectPrevious:void 0},n=()=>{let t=document.querySelector(`meta[name="endpoint"]`)?.getAttribute(`content`);return t&&t in e?t:e.unknown},r=()=>{let e=document.querySelector(`script[client_settings]`)?.getAttribute(`client_settings`);if(!e)return{};try{return JSON.parse(atob(e))}catch(e){return console.error(`Failed to load client_settings:`,e),{}}},i=e=>{if(!e)throw Error(`Bad assertion: DOM element not found`)},a=async(e,t,n)=>{let r=new AbortController,i=setTimeout(()=>r.abort(),n?.timeout??3e4),a=await fetch(t,{body:n?.body,method:e,signal:r.signal}).finally(()=>clearTimeout(i));if(!a.ok)throw Error(a.statusText);return a},o=(e,t,n,r)=>{if(typeof t!=`string`){t.addEventListener(e,n,r);return}document.addEventListener(e,e=>{for(let r of e.composedPath())if(r instanceof HTMLElement&&r.matches(t)){try{n.call(r,e)}catch(e){console.error(e)}break}},r)},s=(e,t)=>{for(let e of t?.on??[])if(!e)return;document.readyState===`loading`?o(`DOMContentLoaded`,document,e,{once:!0}):e()},c=n(),l=r(),u=function(e){return`/static/themes/simple/`+e},d={},f=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=u(t,n),t in d)return;d[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``,o=!!n;if(o)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let s=document.createElement(`link`);if(s.rel=r?`stylesheet`:`modulepreload`,r||(s.as=`script`),s.crossOrigin=``,s.href=t,a&&s.setAttribute(`nonce`,a),document.head.appendChild(s),r)return new Promise((e,n)=>{s.addEventListener(`load`,e),s.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[]){if(e.status!==`rejected`)continue;i(e.reason)}return e().catch(i)})};s(()=>{f(()=>import(`./keyboard.min.js`),[]),f(()=>import(`./search.min.js`),[]),l.autocomplete&&f(()=>import(`./autocomplete.min.js`),[])},{on:[c===e.index]}),s(()=>{f(()=>import(`./keyboard.min.js`),[]),f(()=>import(`./mapresult.min.js`),[]),f(()=>import(`./results.min.js`),[]),f(()=>import(`./search.min.js`),[]),l.infinite_scroll&&f(()=>import(`./infinite_scroll.min.js`),[]),l.autocomplete&&f(()=>import(`./autocomplete.min.js`),[])},{on:[c===e.results]}),s(()=>{f(()=>import(`./preferences.min.js`),[])},{on:[c===e.preferences]}),o(`click`,`.close`,function(){this.parentNode?.classList.add(`invisible`)});export{f as b,i as c,a as d,o as e,t as f,l as g};
|
||||
//# sourceMappingURL=searxng.core.min.js.map
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"mappings":"AAsCA,MAAa,EAAY,CACvB,MAAO,QACP,QAAS,UACT,YAAa,cACb,QAAS,SACV,EAEY,EAAU,CACrB,YAAa,OACb,qBAAsB,OACtB,YAAa,OACb,WAAY,OACZ,eAAgB,MACjB,EAEK,EAAc,IAAqB,CACvC,IAAM,EAAe,SAAS,cAAc,wBAAwB,EAAE,aAAa,UAAU,CAM7F,OAJI,GAAgB,KAAgB,EAC3B,EAGF,EAAU,OAClB,EAEK,EAAc,IAAgB,CAClC,IAAM,EAAW,SAAS,cAAc,0BAA0B,EAAE,aAAa,kBAAkB,CACnG,GAAI,CAAC,EAAU,MAAO,CAAE,EAExB,GAAI,CACF,OAAO,KAAK,MAAM,KAAK,EAAS,CAAC,CAClC,MAAQ,EAAO,CAEd,OADA,QAAQ,MAAM,kCAAmC,EAAM,CAChD,CAAE,CACV,CACF,EAEYA,EAA+B,CAACC,EAAiE,CAC5G,GAAI,CAAC,EACH,MAAU,MAAM,wCAEnB,CAEY,EAAO,MAAOC,EAAgBC,EAAmBC,IAA6C,CACzG,IAAM,EAAa,IAAI,gBACjB,EAAY,WAAW,IAAM,EAAW,OAAO,CAAE,GAAS,SAAW,IAAO,CAE5E,EAAM,MAAM,MAAM,EAAK,CAC3B,KAAM,GAAS,KACP,SACR,OAAQ,EAAW,MACpB,EAAC,CAAC,QAAQ,IAAM,aAAa,EAAU,CAAC,CACzC,GAAI,CAAC,EAAI,GACP,MAAU,MAAM,EAAI,YAGtB,OAAO,CACR,EAEY,EAAS,CACpBC,EACAC,EACAC,EACAC,IACS,CACT,GAAI,OAAO,GAAW,SAAU,CAC9B,EAAO,iBAAiB,EAAM,EAA2B,EAAQ,CACjE,MACD,CAED,SAAS,iBACP,EACA,CAACC,EAAiB,CAChB,IAAK,IAAM,KAAQ,EAAM,cAAc,CACrC,GAAI,aAAgB,aAAe,EAAK,QAAQ,EAAO,CAAE,CACvD,GAAI,CACF,EAAS,KAAK,EAAW,EAA6B,CACvD,MAAQ,EAAO,CACd,QAAQ,MAAM,EAAM,CAEtB,KACD,CAEJ,EACD,EACD,CACF,CAEY,EAAQ,CAACC,EAAsBC,IAAiC,CAC3E,IAAK,IAAM,KAAa,GAAS,IAAM,CAAE,EACvC,GAAI,CAAC,EACH,OAIA,SAAS,aAAe,UAG1B,EAAO,mBAAoB,SAAU,EAAU,CAAE,KAAM,EAAM,EAAC,CAF9D,GAAU,CAIb,CAEYC,EAA0B,GAAa,CACvCC,EAAqB,GAAa,8rCCzI/C,EACE,IAAM,OACJ,OAAO,+BACP,OAAO,uBAEH,EAAS,oBACX,OAAO,6BAEV,CACD,CAAE,GAAI,CAAC,IAAa,EAAU,KAAM,CAAE,EACvC,CAED,EACE,IAAM,OACJ,OAAO,+BACP,OAAO,gCACP,OAAO,8BACP,OAAO,uBAEH,EAAS,uBACX,OAAO,gCAGL,EAAS,oBACX,OAAO,6BAEV,CACD,CAAE,GAAI,CAAC,IAAa,EAAU,OAAQ,CAAE,EACzC,CAED,EACE,IAAM,OACJ,OAAO,4BACR,CACD,CAAE,GAAI,CAAC,IAAa,EAAU,WAAY,CAAE,EAC7C,CCnCD,EAAO,QAAS,SAAU,UAA6B,CACpD,KAAK,YAA4B,UAAU,IAAI,YAAY,CAC7D,CAAC","names":["assertElement: AssertElement","element?: HTMLElement | null","method: string","url: string | URL","options?: HTTPOptions","type: string | K","target: string | Document | E","listener: (this: E, event: DocumentEventMap[K]) => void | Promise<void>","options?: AddEventListenerOptions","event: Event","callback: () => void","options?: ReadyOptions","endpoint: EndpointsKeys","settings: Settings"],"ignoreList":[],"sources":["../../../../../client/simple/src/js/core/toolkit.ts","../../../../../client/simple/src/js/core/router.ts","../../../../../client/simple/src/js/core/listener.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport type { KeyBindingLayout } from \"../main/keyboard.ts\";\n\n// synced with searx/webapp.py get_client_settings\ntype Settings = {\n advanced_search?: boolean;\n autocomplete?: string;\n autocomplete_min?: number;\n doi_resolver?: string;\n favicon_resolver?: string;\n hotkeys?: KeyBindingLayout;\n infinite_scroll?: boolean;\n method?: \"GET\" | \"POST\";\n query_in_title?: boolean;\n results_on_new_tab?: boolean;\n safesearch?: 0 | 1 | 2;\n search_on_category_select?: boolean;\n theme?: string;\n theme_static_path?: string;\n translations?: Record<string, string>;\n url_formatting?: \"pretty\" | \"full\" | \"host\";\n};\n\ntype HTTPOptions = {\n body?: BodyInit;\n timeout?: number;\n};\n\ntype ReadyOptions = {\n // all values must be truthy for the callback to be executed\n on?: (boolean | undefined)[];\n};\n\ntype AssertElement = (element?: HTMLElement | null) => asserts element is HTMLElement;\n\nexport type EndpointsKeys = keyof typeof Endpoints;\n\nexport const Endpoints = {\n index: \"index\",\n results: \"results\",\n preferences: \"preferences\",\n unknown: \"unknown\"\n} as const;\n\nexport const mutable = {\n closeDetail: undefined as (() => void) | undefined,\n scrollPageToSelected: undefined as (() => void) | undefined,\n selectImage: undefined as ((resultElement: HTMLElement) => void) | undefined,\n selectNext: undefined as ((openDetailView?: boolean) => void) | undefined,\n selectPrevious: undefined as ((openDetailView?: boolean) => void) | undefined\n};\n\nconst getEndpoint = (): EndpointsKeys => {\n const metaEndpoint = document.querySelector('meta[name=\"endpoint\"]')?.getAttribute(\"content\");\n\n if (metaEndpoint && metaEndpoint in Endpoints) {\n return metaEndpoint as EndpointsKeys;\n }\n\n return Endpoints.unknown;\n};\n\nconst getSettings = (): Settings => {\n const settings = document.querySelector(\"script[client_settings]\")?.getAttribute(\"client_settings\");\n if (!settings) return {};\n\n try {\n return JSON.parse(atob(settings));\n } catch (error) {\n console.error(\"Failed to load client_settings:\", error);\n return {};\n }\n};\n\nexport const assertElement: AssertElement = (element?: HTMLElement | null): asserts element is HTMLElement => {\n if (!element) {\n throw new Error(\"Bad assertion: DOM element not found\");\n }\n};\n\nexport const http = async (method: string, url: string | URL, options?: HTTPOptions): Promise<Response> => {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), options?.timeout ?Line truncated
|
||||
{"version":3,"mappings":"AAsCA,MAAa,EAAY,CACvB,MAAO,QACP,QAAS,UACT,YAAa,cACb,QAAS,UACV,CAEY,EAAU,CACrB,YAAa,OACb,qBAAsB,OACtB,YAAa,OACb,WAAY,OACZ,eAAgB,OACjB,CAEK,MAAmC,CACvC,IAAM,EAAe,SAAS,cAAc,0BAA0B,aAAa,WAMnF,OAJI,GAAgB,KAAgB,EAC3B,EAGF,EAAU,OAClB,EAEK,MAA8B,CAClC,IAAM,EAAW,SAAS,cAAc,4BAA4B,aAAa,mBACjF,GAAI,CAAC,EAAU,MAAO,EAAE,CAExB,GAAI,CACF,OAAO,KAAK,MAAM,KAAK,GACxB,OAAQ,EAAO,CAEd,OADA,QAAQ,MAAM,kCAAmC,GAC1C,EAAE,CAEZ,EAEYA,EAAgC,GAAiE,CAC5G,GAAI,CAAC,EACH,MAAU,MAAM,uCAEnB,EAEY,EAAO,MAAO,EAAgB,EAAmB,IAA6C,CACzG,IAAM,EAAa,IAAI,gBACjB,EAAY,eAAiB,EAAW,QAAS,GAAS,SAAW,KAErE,EAAM,MAAM,MAAM,EAAK,CAC3B,KAAM,GAAS,KACP,SACR,OAAQ,EAAW,OACpB,EAAE,YAAc,aAAa,IAC9B,GAAI,CAAC,EAAI,GACP,MAAU,MAAM,EAAI,YAGtB,OAAO,CACR,EAEY,GACX,EACA,EACA,EACA,IACS,CACT,GAAI,OAAO,GAAW,SAAU,CAC9B,EAAO,iBAAiB,EAAM,EAA2B,GACzD,MACD,CAED,SAAS,iBACP,EACC,GAAiB,CAChB,IAAK,IAAM,KAAQ,EAAM,eACvB,GAAI,aAAgB,aAAe,EAAK,QAAQ,GAAS,CACvD,GAAI,CACF,EAAS,KAAK,EAAW,EAC1B,OAAQ,EAAO,CACd,QAAQ,MAAM,EACf,CACD,KACD,CAEJ,EACD,EAEH,EAEY,GAAS,EAAsB,IAAiC,CAC3E,IAAK,IAAM,KAAa,GAAS,IAAM,EAAE,CACvC,GAAI,CAAC,EACH,OAIA,SAAS,aAAe,UAG1B,EAAO,mBAAoB,SAAU,EAAU,CAAE,KAAM,GAAM,EAF7D,GAIH,EAEYC,EAA0B,IAC1BC,EAAqB,6rCCzIlC,MACQ,CACJ,aAAO,yBACP,aAAO,uBAEH,EAAS,cACX,aAAO,4BAEV,EACD,CAAE,GAAI,CAAC,IAAa,EAAU,MAAM,CAAE,EAGxC,MACQ,CACJ,aAAO,yBACP,aAAO,0BACP,aAAO,wBACP,aAAO,uBAEH,EAAS,iBACX,aAAO,gCAGL,EAAS,cACX,aAAO,4BAEV,EACD,CAAE,GAAI,CAAC,IAAa,EAAU,QAAQ,CAAE,EAG1C,MACQ,CACJ,aAAO,2BACR,EACD,CAAE,GAAI,CAAC,IAAa,EAAU,YAAY,CAAE,EClC9C,EAAO,QAAS,SAAU,UAA6B,CACpD,KAAK,YAA4B,UAAU,IAAI,YACjD","names":["assertElement: AssertElement","endpoint: EndpointsKeys","settings: Settings"],"ignoreList":[],"sources":["../../../../../client/simple/src/js/core/toolkit.ts","../../../../../client/simple/src/js/core/router.ts","../../../../../client/simple/src/js/core/listener.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport type { KeyBindingLayout } from \"../main/keyboard.ts\";\n\n// synced with searx/webapp.py get_client_settings\ntype Settings = {\n advanced_search?: boolean;\n autocomplete?: string;\n autocomplete_min?: number;\n doi_resolver?: string;\n favicon_resolver?: string;\n hotkeys?: KeyBindingLayout;\n infinite_scroll?: boolean;\n method?: \"GET\" | \"POST\";\n query_in_title?: boolean;\n results_on_new_tab?: boolean;\n safesearch?: 0 | 1 | 2;\n search_on_category_select?: boolean;\n theme?: string;\n theme_static_path?: string;\n translations?: Record<string, string>;\n url_formatting?: \"pretty\" | \"full\" | \"host\";\n};\n\ntype HTTPOptions = {\n body?: BodyInit;\n timeout?: number;\n};\n\ntype ReadyOptions = {\n // all values must be truthy for the callback to be executed\n on?: (boolean | undefined)[];\n};\n\ntype AssertElement = (element?: HTMLElement | null) => asserts element is HTMLElement;\n\nexport type EndpointsKeys = keyof typeof Endpoints;\n\nexport const Endpoints = {\n index: \"index\",\n results: \"results\",\n preferences: \"preferences\",\n unknown: \"unknown\"\n} as const;\n\nexport const mutable = {\n closeDetail: undefined as (() => void) | undefined,\n scrollPageToSelected: undefined as (() => void) | undefined,\n selectImage: undefined as ((resultElement: HTMLElement) => void) | undefined,\n selectNext: undefined as ((openDetailView?: boolean) => void) | undefined,\n selectPrevious: undefined as ((openDetailView?: boolean) => void) | undefined\n};\n\nconst getEndpoint = (): EndpointsKeys => {\n const metaEndpoint = document.querySelector('meta[name=\"endpoint\"]')?.getAttribute(\"content\");\n\n if (metaEndpoint && metaEndpoint in Endpoints) {\n return metaEndpoint as EndpointsKeys;\n }\n\n return Endpoints.unknown;\n};\n\nconst getSettings = (): Settings => {\n const settings = document.querySelector(\"script[client_settings]\")?.getAttribute(\"client_settings\");\n if (!settings) return {};\n\n try {\n return JSON.parse(atob(settings));\n } catch (error) {\n console.error(\"Failed to load client_settings:\", error);\n return {};\n }\n};\n\nexport const assertElement: AssertElement = (element?: HTMLElement | null): asserts element is HTMLElement => {\n if (!element) {\n throw new Error(\"Bad assertion: DOM element not found\");\n }\n};\n\nexport const http = async (method: string, url: string | URL, options?: HTTPOptions): Promise<Response> => {\n const controller = new AbortController();\n const timeoutId = setTimeout(() => controller.abort(), options?.timeout ?? 30_000);\n\n const res = await fetch(url, {\n body: options?.body,\n method: method,\n signal: controller.signal\n }).finally(() => clearTimeout(timeoutId));\n if (!res.ok) {\n throw new Error(res.statusText);\n }\n\n return res;\n};\n\nexport const listen = <K extends keyof DocumentEventMap, E extends HTMLElement>(\n type: string | K,\n target: string | Document | E,\n listener: (this: E, event: DocumentEventMap[K]) => void | Promise<void>,\n options?: AddEventListenerOptions\n): void => {\n Line truncated
|
||||
@@ -1,7 +1,11 @@
|
||||
{
|
||||
"node_modules/ol/ol.css": {
|
||||
"file": "css/ol.min.css",
|
||||
"src": "node_modules/ol/ol.css"
|
||||
"names": [
|
||||
"ol.css"
|
||||
],
|
||||
"src": "node_modules/ol/ol.css",
|
||||
"isEntry": true
|
||||
},
|
||||
"src/js/core/index.ts": {
|
||||
"file": "js/searxng.core.min.js",
|
||||
@@ -92,14 +96,26 @@
|
||||
},
|
||||
"src/less/rss.less": {
|
||||
"file": "css/rss.min.css",
|
||||
"src": "src/less/rss.less"
|
||||
"names": [
|
||||
"rss.css"
|
||||
],
|
||||
"src": "src/less/rss.less",
|
||||
"isEntry": true
|
||||
},
|
||||
"src/less/style-ltr.less": {
|
||||
"file": "css/searxng-ltr.min.css",
|
||||
"src": "src/less/style-ltr.less"
|
||||
"names": [
|
||||
"searxng-ltr.css"
|
||||
],
|
||||
"src": "src/less/style-ltr.less",
|
||||
"isEntry": true
|
||||
},
|
||||
"src/less/style-rtl.less": {
|
||||
"file": "css/searxng-rtl.min.css",
|
||||
"src": "src/less/style-rtl.less"
|
||||
"names": [
|
||||
"searxng-rtl.css"
|
||||
],
|
||||
"src": "src/less/style-rtl.less",
|
||||
"isEntry": true
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user