resuxjs 0.3.10 → 0.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/dist/bin.d.ts +1 -2
- package/dist/bin.js +4 -0
- package/dist/bin.js.map +1 -1
- package/dist/build/index.d.ts +28 -0
- package/dist/build/index.js +51 -0
- package/dist/build/index.js.map +1 -0
- package/dist/cli.d.ts +15 -5
- package/dist/cli.js +2648 -3668
- package/dist/cli.js.map +1 -1
- package/dist/compiler/adapter.d.ts +14 -11
- package/dist/compiler/adapter.js +68 -93
- package/dist/compiler/adapter.js.map +1 -1
- package/dist/compiler/dev-warnings.d.ts +8 -5
- package/dist/compiler/dev-warnings.js +248 -321
- package/dist/compiler/dev-warnings.js.map +1 -1
- package/dist/compiler/directives.d.ts +3 -0
- package/dist/compiler/directives.js +124 -150
- package/dist/compiler/directives.js.map +1 -1
- package/dist/compiler/implementation.d.ts +96 -93
- package/dist/compiler/implementation.js +2967 -3430
- package/dist/compiler/index.d.ts +14 -11
- package/dist/compiler/index.js +68 -93
- package/dist/compiler/index.js.map +1 -1
- package/dist/core/config.d.ts +12 -5
- package/dist/core/config.js +42 -25
- package/dist/core/config.js.map +1 -1
- package/dist/core/hooks.d.ts +127 -126
- package/dist/core/hooks.js +45 -55
- package/dist/core/hooks.js.map +1 -1
- package/dist/core/index.d.ts +5 -4
- package/dist/core/index.js +5 -5
- package/dist/core/module-container.d.ts +76 -74
- package/dist/core/module-container.js +181 -186
- package/dist/core/module-container.js.map +1 -1
- package/dist/core/resux.d.ts +15 -12
- package/dist/core/resux.js +17 -13
- package/dist/core/resux.js.map +1 -1
- package/dist/create-bin.d.ts +1 -2
- package/dist/create-bin.js +4 -0
- package/dist/create-bin.js.map +1 -1
- package/dist/create.d.ts +3 -0
- package/dist/create.js +499 -638
- package/dist/create.js.map +1 -1
- package/dist/deploy/cloudflare.d.ts +4 -1
- package/dist/deploy/cloudflare.js +30 -34
- package/dist/deploy/cloudflare.js.map +1 -1
- package/dist/deploy/common.d.ts +6 -4
- package/dist/deploy/common.js +118 -188
- package/dist/deploy/common.js.map +1 -1
- package/dist/deploy/framework-runtime.d.ts +3 -0
- package/dist/deploy/framework-runtime.js +43 -48
- package/dist/deploy/framework-runtime.js.map +1 -1
- package/dist/deploy/index.d.ts +4 -1
- package/dist/deploy/index.js +58 -80
- package/dist/deploy/index.js.map +1 -1
- package/dist/deploy/netlify.d.ts +4 -1
- package/dist/deploy/netlify.js +40 -41
- package/dist/deploy/netlify.js.map +1 -1
- package/dist/deploy/node.d.ts +4 -1
- package/dist/deploy/node.js +24 -19
- package/dist/deploy/node.js.map +1 -1
- package/dist/deploy/production-report.d.ts +3 -0
- package/dist/deploy/production-report.js +14 -14
- package/dist/deploy/production-report.js.map +1 -1
- package/dist/deploy/runtime-dependencies.d.ts +3 -0
- package/dist/deploy/runtime-dependencies.js +158 -220
- package/dist/deploy/runtime-dependencies.js.map +1 -1
- package/dist/deploy/static.d.ts +4 -1
- package/dist/deploy/static.js +16 -14
- package/dist/deploy/static.js.map +1 -1
- package/dist/deploy/types.d.ts +25 -22
- package/dist/deploy/types.js +0 -1
- package/dist/deploy/vercel.d.ts +4 -1
- package/dist/deploy/vercel.js +137 -188
- package/dist/deploy/vercel.js.map +1 -1
- package/dist/fonts/index.d.ts +15 -11
- package/dist/fonts/index.js +114 -134
- package/dist/fonts/index.js.map +1 -1
- package/dist/globals.d.ts +79 -78
- package/dist/globals.js +0 -1
- package/dist/halal-core/ai/classifyProject.d.ts +4 -1
- package/dist/halal-core/ai/classifyProject.js +81 -95
- package/dist/halal-core/ai/classifyProject.js.map +1 -1
- package/dist/halal-core/ai/classifyRuntimeContent.d.ts +5 -2
- package/dist/halal-core/ai/classifyRuntimeContent.js +77 -95
- package/dist/halal-core/ai/classifyRuntimeContent.js.map +1 -1
- package/dist/halal-core/ai/createProjectSummary.d.ts +38 -35
- package/dist/halal-core/ai/createProjectSummary.js +38 -39
- package/dist/halal-core/ai/createProjectSummary.js.map +1 -1
- package/dist/halal-core/ai/halalClassifierPrompt.d.ts +3 -0
- package/dist/halal-core/ai/halalClassifierPrompt.js +5 -1
- package/dist/halal-core/ai/halalClassifierPrompt.js.map +1 -1
- package/dist/halal-core/ai/redactSensitiveData.d.ts +3 -0
- package/dist/halal-core/ai/redactSensitiveData.js +82 -110
- package/dist/halal-core/ai/redactSensitiveData.js.map +1 -1
- package/dist/halal-core/ai/validateAiResponse.d.ts +4 -1
- package/dist/halal-core/ai/validateAiResponse.js +58 -85
- package/dist/halal-core/ai/validateAiResponse.js.map +1 -1
- package/dist/halal-core/cli/check.d.ts +3 -0
- package/dist/halal-core/cli/check.js +28 -30
- package/dist/halal-core/cli/check.js.map +1 -1
- package/dist/halal-core/cli/explain.d.ts +3 -0
- package/dist/halal-core/cli/explain.js +27 -31
- package/dist/halal-core/cli/explain.js.map +1 -1
- package/dist/halal-core/cli/report.d.ts +3 -0
- package/dist/halal-core/cli/report.js +14 -10
- package/dist/halal-core/cli/report.js.map +1 -1
- package/dist/halal-core/cli/submitReview.d.ts +3 -0
- package/dist/halal-core/cli/submitReview.js +13 -9
- package/dist/halal-core/cli/submitReview.js.map +1 -1
- package/dist/halal-core/cli/verifyReview.d.ts +3 -0
- package/dist/halal-core/cli/verifyReview.js +18 -15
- package/dist/halal-core/cli/verifyReview.js.map +1 -1
- package/dist/halal-core/config.d.ts +30 -27
- package/dist/halal-core/config.js +76 -118
- package/dist/halal-core/config.js.map +1 -1
- package/dist/halal-core/crypto/integrity.d.ts +6 -3
- package/dist/halal-core/crypto/integrity.js +64 -87
- package/dist/halal-core/crypto/integrity.js.map +1 -1
- package/dist/halal-core/enforce.d.ts +3 -0
- package/dist/halal-core/enforce.js +92 -105
- package/dist/halal-core/enforce.js.map +1 -1
- package/dist/halal-core/index.d.ts +20 -16
- package/dist/halal-core/index.js +18 -19
- package/dist/halal-core/lifecycle.d.ts +3 -0
- package/dist/halal-core/lifecycle.js +15 -13
- package/dist/halal-core/lifecycle.js.map +1 -1
- package/dist/halal-core/policy.d.ts +4 -1
- package/dist/halal-core/policy.js +6 -2
- package/dist/halal-core/policy.js.map +1 -1
- package/dist/halal-core/report/formatBrowserOverlay.d.ts +4 -1
- package/dist/halal-core/report/formatBrowserOverlay.js +10 -8
- package/dist/halal-core/report/formatBrowserOverlay.js.map +1 -1
- package/dist/halal-core/report/formatTerminalReport.d.ts +4 -1
- package/dist/halal-core/report/formatTerminalReport.js +27 -37
- package/dist/halal-core/report/formatTerminalReport.js.map +1 -1
- package/dist/halal-core/report/generateHalalReport.d.ts +7 -4
- package/dist/halal-core/report/generateHalalReport.js +26 -26
- package/dist/halal-core/report/generateHalalReport.js.map +1 -1
- package/dist/halal-core/report/signReport.d.ts +4 -1
- package/dist/halal-core/report/signReport.js +16 -12
- package/dist/halal-core/report/signReport.js.map +1 -1
- package/dist/halal-core/report/verifyReport.d.ts +9 -6
- package/dist/halal-core/report/verifyReport.js +51 -41
- package/dist/halal-core/report/verifyReport.js.map +1 -1
- package/dist/halal-core/review/createReviewRequest.d.ts +4 -1
- package/dist/halal-core/review/createReviewRequest.js +21 -17
- package/dist/halal-core/review/createReviewRequest.js.map +1 -1
- package/dist/halal-core/review/reviewPolicy.d.ts +3 -0
- package/dist/halal-core/review/reviewPolicy.js +19 -17
- package/dist/halal-core/review/reviewPolicy.js.map +1 -1
- package/dist/halal-core/review/signedReviewFile.d.ts +11 -8
- package/dist/halal-core/review/signedReviewFile.js +24 -22
- package/dist/halal-core/review/signedReviewFile.js.map +1 -1
- package/dist/halal-core/review/verifyReviewApproval.d.ts +9 -6
- package/dist/halal-core/review/verifyReviewApproval.js +68 -62
- package/dist/halal-core/review/verifyReviewApproval.js.map +1 -1
- package/dist/halal-core/rules/adultContentRules.d.ts +3 -0
- package/dist/halal-core/rules/adultContentRules.js +23 -23
- package/dist/halal-core/rules/adultContentRules.js.map +1 -1
- package/dist/halal-core/rules/alcoholDrugVapeRules.d.ts +3 -0
- package/dist/halal-core/rules/alcoholDrugVapeRules.js +22 -22
- package/dist/halal-core/rules/alcoholDrugVapeRules.js.map +1 -1
- package/dist/halal-core/rules/childSafetyRules.d.ts +3 -0
- package/dist/halal-core/rules/childSafetyRules.js +19 -19
- package/dist/halal-core/rules/childSafetyRules.js.map +1 -1
- package/dist/halal-core/rules/coreCategories.d.ts +7 -4
- package/dist/halal-core/rules/coreCategories.js +237 -110
- package/dist/halal-core/rules/coreCategories.js.map +1 -1
- package/dist/halal-core/rules/cyberAbuseRules.d.ts +3 -0
- package/dist/halal-core/rules/cyberAbuseRules.js +27 -27
- package/dist/halal-core/rules/cyberAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/defaultBlockedRules.d.ts +21 -18
- package/dist/halal-core/rules/defaultBlockedRules.js +158 -199
- package/dist/halal-core/rules/defaultBlockedRules.js.map +1 -1
- package/dist/halal-core/rules/dependencyRules.d.ts +8 -5
- package/dist/halal-core/rules/dependencyRules.js +50 -56
- package/dist/halal-core/rules/dependencyRules.js.map +1 -1
- package/dist/halal-core/rules/endpointRules.d.ts +6 -3
- package/dist/halal-core/rules/endpointRules.js +21 -23
- package/dist/halal-core/rules/endpointRules.js.map +1 -1
- package/dist/halal-core/rules/environmentalHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/environmentalHarmRules.js +17 -17
- package/dist/halal-core/rules/environmentalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/financeRibaRules.d.ts +3 -0
- package/dist/halal-core/rules/financeRibaRules.js +20 -20
- package/dist/halal-core/rules/financeRibaRules.js.map +1 -1
- package/dist/halal-core/rules/gamblingRules.d.ts +3 -0
- package/dist/halal-core/rules/gamblingRules.js +22 -22
- package/dist/halal-core/rules/gamblingRules.js.map +1 -1
- package/dist/halal-core/rules/generalHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/generalHarmRules.js +15 -15
- package/dist/halal-core/rules/generalHarmRules.js.map +1 -1
- package/dist/halal-core/rules/healthHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/healthHarmRules.js +19 -19
- package/dist/halal-core/rules/healthHarmRules.js.map +1 -1
- package/dist/halal-core/rules/keywordRules.d.ts +11 -8
- package/dist/halal-core/rules/keywordRules.js +90 -39
- package/dist/halal-core/rules/keywordRules.js.map +1 -1
- package/dist/halal-core/rules/privacyAbuseRules.d.ts +3 -0
- package/dist/halal-core/rules/privacyAbuseRules.js +21 -21
- package/dist/halal-core/rules/privacyAbuseRules.js.map +1 -1
- package/dist/halal-core/rules/scamFraudRules.d.ts +3 -0
- package/dist/halal-core/rules/scamFraudRules.js +29 -29
- package/dist/halal-core/rules/scamFraudRules.js.map +1 -1
- package/dist/halal-core/rules/selfHarmRules.d.ts +3 -0
- package/dist/halal-core/rules/selfHarmRules.js +17 -17
- package/dist/halal-core/rules/selfHarmRules.js.map +1 -1
- package/dist/halal-core/rules/violenceExtremismRules.d.ts +3 -0
- package/dist/halal-core/rules/violenceExtremismRules.js +30 -30
- package/dist/halal-core/rules/violenceExtremismRules.js.map +1 -1
- package/dist/halal-core/runtime/guard.d.ts +17 -14
- package/dist/halal-core/runtime/guard.js +162 -183
- package/dist/halal-core/runtime/guard.js.map +1 -1
- package/dist/halal-core/runtime/index.d.ts +5 -4
- package/dist/halal-core/runtime/index.js +4 -5
- package/dist/halal-core/runtime/reviewedMemory.d.ts +4 -1
- package/dist/halal-core/runtime/reviewedMemory.js +74 -110
- package/dist/halal-core/runtime/reviewedMemory.js.map +1 -1
- package/dist/halal-core/runtime/serializeRuntimeContent.d.ts +10 -7
- package/dist/halal-core/runtime/serializeRuntimeContent.js +132 -156
- package/dist/halal-core/runtime/serializeRuntimeContent.js.map +1 -1
- package/dist/halal-core/runtime/types.d.ts +44 -41
- package/dist/halal-core/runtime/types.js +0 -1
- package/dist/halal-core/scanner/scanApiRoutes.d.ts +3 -0
- package/dist/halal-core/scanner/scanApiRoutes.js +32 -36
- package/dist/halal-core/scanner/scanApiRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanComponents.d.ts +3 -0
- package/dist/halal-core/scanner/scanComponents.js +12 -13
- package/dist/halal-core/scanner/scanComponents.js.map +1 -1
- package/dist/halal-core/scanner/scanContent.d.ts +5 -2
- package/dist/halal-core/scanner/scanContent.js +193 -263
- package/dist/halal-core/scanner/scanContent.js.map +1 -1
- package/dist/halal-core/scanner/scanDependencies.d.ts +3 -0
- package/dist/halal-core/scanner/scanDependencies.js +16 -15
- package/dist/halal-core/scanner/scanDependencies.js.map +1 -1
- package/dist/halal-core/scanner/scanDomains.d.ts +5 -2
- package/dist/halal-core/scanner/scanDomains.js +12 -12
- package/dist/halal-core/scanner/scanDomains.js.map +1 -1
- package/dist/halal-core/scanner/scanEnvNames.d.ts +3 -0
- package/dist/halal-core/scanner/scanEnvNames.js +23 -26
- package/dist/halal-core/scanner/scanEnvNames.js.map +1 -1
- package/dist/halal-core/scanner/scanMetadata.d.ts +6 -3
- package/dist/halal-core/scanner/scanMetadata.js +20 -29
- package/dist/halal-core/scanner/scanMetadata.js.map +1 -1
- package/dist/halal-core/scanner/scanPages.d.ts +3 -0
- package/dist/halal-core/scanner/scanPages.js +12 -15
- package/dist/halal-core/scanner/scanPages.js.map +1 -1
- package/dist/halal-core/scanner/scanProject.d.ts +15 -10
- package/dist/halal-core/scanner/scanProject.js +43 -49
- package/dist/halal-core/scanner/scanProject.js.map +1 -1
- package/dist/halal-core/scanner/scanRoutes.d.ts +3 -0
- package/dist/halal-core/scanner/scanRoutes.js +32 -39
- package/dist/halal-core/scanner/scanRoutes.js.map +1 -1
- package/dist/halal-core/scanner/scanTranslations.d.ts +3 -0
- package/dist/halal-core/scanner/scanTranslations.js +21 -29
- package/dist/halal-core/scanner/scanTranslations.js.map +1 -1
- package/dist/halal-core/status.d.ts +14 -11
- package/dist/halal-core/status.js +0 -1
- package/dist/halal-core/tamper/verifyCoreIntegrity.d.ts +3 -0
- package/dist/halal-core/tamper/verifyCoreIntegrity.js +26 -24
- package/dist/halal-core/tamper/verifyCoreIntegrity.js.map +1 -1
- package/dist/halal-core/tamper/verifyLifecycleHooks.d.ts +3 -0
- package/dist/halal-core/tamper/verifyLifecycleHooks.js +13 -12
- package/dist/halal-core/tamper/verifyLifecycleHooks.js.map +1 -1
- package/dist/halal-core/tamper/verifyReportSignature.d.ts +6 -3
- package/dist/halal-core/tamper/verifyReportSignature.js +20 -14
- package/dist/halal-core/tamper/verifyReportSignature.js.map +1 -1
- package/dist/halal.d.ts +20 -1
- package/dist/halal.js +18 -2
- package/dist/i18n/index.d.ts +34 -31
- package/dist/i18n/index.js +219 -288
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/shared.d.ts +18 -15
- package/dist/i18n/shared.js +204 -266
- package/dist/i18n/shared.js.map +1 -1
- package/dist/icons/index.d.ts +143 -139
- package/dist/icons/index.js +322 -273
- package/dist/icons/index.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -2
- package/dist/kit/index.d.ts +9 -6
- package/dist/kit/index.js +45 -43
- package/dist/kit/index.js.map +1 -1
- package/dist/nitro-server/index.d.ts +7 -4
- package/dist/nitro-server/index.js +6 -2
- package/dist/nitro-server/index.js.map +1 -1
- package/dist/node.d.ts +6 -3
- package/dist/node.js +88 -116
- package/dist/node.js.map +1 -1
- package/dist/reactivity/computed.d.ts +6 -3
- package/dist/reactivity/computed.js +46 -53
- package/dist/reactivity/computed.js.map +1 -1
- package/dist/reactivity/effect.d.ts +8 -5
- package/dist/reactivity/effect.js +105 -146
- package/dist/reactivity/effect.js.map +1 -1
- package/dist/reactivity/index.d.ts +8 -8
- package/dist/reactivity/index.js +7 -8
- package/dist/reactivity/reactive.d.ts +3 -0
- package/dist/reactivity/reactive.js +93 -133
- package/dist/reactivity/reactive.js.map +1 -1
- package/dist/reactivity/readonly.d.ts +2 -1
- package/dist/reactivity/readonly.js +2 -2
- package/dist/reactivity/ref.d.ts +15 -15
- package/dist/reactivity/ref.js +73 -81
- package/dist/reactivity/ref.js.map +1 -1
- package/dist/reactivity/scheduler.d.ts +3 -1
- package/dist/reactivity/scheduler.js +67 -69
- package/dist/reactivity/scheduler.js.map +1 -1
- package/dist/reactivity/types.d.ts +17 -14
- package/dist/reactivity/types.js +0 -1
- package/dist/reactivity/utils.d.ts +7 -4
- package/dist/reactivity/utils.js +25 -24
- package/dist/reactivity/utils.js.map +1 -1
- package/dist/reactivity/watch.d.ts +4 -2
- package/dist/reactivity/watch.js +75 -103
- package/dist/reactivity/watch.js.map +1 -1
- package/dist/runtime/core.d.ts +31 -0
- package/dist/runtime/core.js +156 -0
- package/dist/runtime/core.js.map +1 -0
- package/dist/runtime/index.d.ts +487 -461
- package/dist/runtime/index.js +4129 -5254
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/reactivity.d.ts +7 -0
- package/dist/runtime/reactivity.js +6 -0
- package/dist/runtime/resume.d.ts +79 -0
- package/dist/runtime/resume.js +482 -0
- package/dist/runtime/resume.js.map +1 -0
- package/dist/runtime/router.d.ts +20 -0
- package/dist/runtime/router.js +60 -0
- package/dist/runtime/router.js.map +1 -0
- package/dist/runtime/streaming.d.ts +24 -0
- package/dist/runtime/streaming.js +200 -0
- package/dist/runtime/streaming.js.map +1 -0
- package/dist/security/media-fetch.d.ts +32 -0
- package/dist/security/media-fetch.js +301 -0
- package/dist/security/media-fetch.js.map +1 -0
- package/dist/security/path-boundary.d.ts +7 -0
- package/dist/security/path-boundary.js +70 -0
- package/dist/security/path-boundary.js.map +1 -0
- package/dist/ui/index.d.ts +1580 -1576
- package/dist/ui/index.js +975 -674
- package/dist/ui/index.js.map +1 -1
- package/dist/vite-builder/index.d.ts +6 -3
- package/dist/vite-builder/index.js +6 -2
- package/dist/vite-builder/index.js.map +1 -1
- package/package.json +46 -86
- package/dist/compiler/implementation.js.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/deploy/types.js.map +0 -1
- package/dist/globals.js.map +0 -1
- package/dist/halal-core/index.js.map +0 -1
- package/dist/halal-core/runtime/index.js.map +0 -1
- package/dist/halal-core/runtime/types.js.map +0 -1
- package/dist/halal-core/status.js.map +0 -1
- package/dist/halal.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/reactivity/index.js.map +0 -1
- package/dist/reactivity/readonly.js.map +0 -1
- package/dist/reactivity/types.js.map +0 -1
package/dist/icons/index.js
CHANGED
|
@@ -1,286 +1,335 @@
|
|
|
1
|
-
import { defineComponent, h, computed, ref, onMounted, onUnmounted, watch } from "vue";
|
|
2
|
-
import { defineResuxModule } from "../kit/index.js";
|
|
3
1
|
import { useRuntimeConfig } from "../runtime/index.js";
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { defineResuxModule } from "../kit/index.js";
|
|
3
|
+
import { computed, defineComponent, h, onMounted, onUnmounted, ref, watch } from "vue";
|
|
4
|
+
//#region src/icons/index.ts
|
|
5
|
+
function defineIconCollections(collections) {
|
|
6
|
+
return { collections };
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
8
|
+
const iconRegistry = {
|
|
9
|
+
"material-symbols:call": { path: "M6.62 10.79a15.15 15.15 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.11-.27c1.12.37 2.33.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.26 1.02l-2.2 2.2z" },
|
|
10
|
+
"call": { path: "M6.62 10.79a15.15 15.15 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.11-.27c1.12.37 2.33.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.26 1.02l-2.2 2.2z" },
|
|
11
|
+
"material-symbols:mail": { path: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z" },
|
|
12
|
+
"material-symbols-light:mail-outline-sharp": { path: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z" },
|
|
13
|
+
"material-symbols:mail-outline": { path: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z" },
|
|
14
|
+
"mail": { path: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5l-8-5V6l8 5l8-5v2z" },
|
|
15
|
+
"material-symbols:location-on-outline-rounded": { path: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5z" },
|
|
16
|
+
"location": { path: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5s-1.12 2.5-2.5 2.5z" },
|
|
17
|
+
"material-symbols:warning": { path: "M1 21h22L12 2L1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" },
|
|
18
|
+
"warning": { path: "M1 21h22L12 2L1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" },
|
|
19
|
+
"material-symbols:error": { path: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" },
|
|
20
|
+
"error": { path: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" },
|
|
21
|
+
"material-symbols:close": { path: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z" },
|
|
22
|
+
"close": { path: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z" },
|
|
23
|
+
"material-symbols:add": { path: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" },
|
|
24
|
+
"add": { path: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" },
|
|
25
|
+
"material-symbols:keyboard-arrow-down": { path: "m12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8L18 9.4z" },
|
|
26
|
+
"arrow-down": { path: "m12 15.4l-6-6L7.4 8l4.6 4.6L16.6 8L18 9.4z" },
|
|
27
|
+
"mdi:facebook": { path: "M12 2.04C6.5 2.04 2 6.53 2 12.06C2 17.06 5.66 21.21 10.44 21.96V14.96H7.9V12.06H10.44V9.85C10.44 7.34 11.93 5.96 14.22 5.96C15.31 5.96 16.45 6.15 16.45 6.15V8.62H15.19C13.95 8.62 13.56 9.39 13.56 10.18V12.06H16.34L15.89 14.96H13.56V21.96A10 10 0 0 0 22 12.06C22 6.53 17.5 2.04 12 2.04Z" },
|
|
28
|
+
"mdi:facebook-box": { path: "M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3h-1.8v-2.2h1.8V9.3c0-1.8 1.1-2.8 2.7-2.8c.8 0 1.5.1 1.7.1v2h-1.2c-.9 0-1 .4-1 1v1.3h2.2l-.3 2.2h-1.9v5.3h-2.2z" },
|
|
29
|
+
"facebook": { path: "M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3h-1.8v-2.2h1.8V9.3c0-1.8 1.1-2.8 2.7-2.8c.8 0 1.5.1 1.7.1v2h-1.2c-.9 0-1 .4-1 1v1.3h2.2l-.3 2.2h-1.9v5.3h-2.2z" },
|
|
30
|
+
"mingcute:instagram-fill": { path: "M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1-5 5H8a5 5 0 0 1-5-5V8a5 5 0 0 1 5-5zm-4 5a4 4 0 1 0 0 8a4 4 0 0 0 0-8m0 2a2 2 0 1 1 0 4a2 2 0 0 1 0-4m4.5-3.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2" },
|
|
31
|
+
"instagram": { path: "M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1-5 5H8a5 5 0 0 1-5-5V8a5 5 0 0 1 5-5zm-4 5a4 4 0 1 0 0 8a4 4 0 0 0 0-8m0 2a2 2 0 1 1 0 4a2 2 0 0 1 0-4m4.5-3.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2" },
|
|
32
|
+
"cib:linkedin": { path: "M27.26 27.271h-4.733v-7.427c0-1.771-.037-4.047-2.475-4.047c-2.468 0-2.844 1.921-2.844 3.916v7.557h-4.739V11.999h4.552v2.083h.061c.636-1.203 2.183-2.468 4.491-2.468c4.801 0 5.692 3.161 5.692 7.271v8.385zM7.115 9.912a2.75 2.75 0 0 1-2.751-2.756a2.753 2.753 0 1 1 2.751 2.756m2.374 17.359H4.74V12h4.749zM29.636 0H2.36C1.057 0 0 1.031 0 2.307v27.387c0 1.276 1.057 2.307 2.36 2.307h27.271c1.301 0 2.369-1.031 2.369-2.307V2.307C32 1.031 30.932 0 29.636 0z" },
|
|
33
|
+
"lineicons:linkedin": { path: "M27.26 27.271h-4.733v-7.427c0-1.771-.037-4.047-2.475-4.047c-2.468 0-2.844 1.921-2.844 3.916v7.557h-4.739V11.999h4.552v2.083h.061c.636-1.203 2.183-2.468 4.491-2.468c4.801 0 5.692 3.161 5.692 7.271v8.385zM7.115 9.912a2.75 2.75 0 0 1-2.751-2.756a2.753 2.753 0 1 1 2.751 2.756m2.374 17.359H4.74V12h4.749zM29.636 0H2.36C1.057 0 0 1.031 0 2.307v27.387c0 1.276 1.057 2.307 2.36 2.307h27.271c1.301 0 2.369-1.031 2.369-2.307V2.307C32 1.031 30.932 0 29.636 0z" },
|
|
34
|
+
"linkedin": { path: "M27.26 27.271h-4.733v-7.427c0-1.771-.037-4.047-2.475-4.047c-2.468 0-2.844 1.921-2.844 3.916v7.557h-4.739V11.999h4.552v2.083h.061c.636-1.203 2.183-2.468 4.491-2.468c4.801 0 5.692 3.161 5.692 7.271v8.385zM7.115 9.912a2.75 2.75 0 0 1-2.751-2.756a2.753 2.753 0 1 1 2.751 2.756m2.374 17.359H4.74V12h4.749zM29.636 0H2.36C1.057 0 0 1.031 0 2.307v27.387c0 1.276 1.057 2.307 2.36 2.307h27.271c1.301 0 2.369-1.031 2.369-2.307V2.307C32 1.031 30.932 0 29.636 0z" },
|
|
35
|
+
"uil:youtube": { path: "M23 9.71a8.5 8.5 0 0 0-.91-4.13a2.92 2.92 0 0 0-1.72-1A78 78 0 0 0 12 4.27a79 79 0 0 0-8.34.3a2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48 48 0 0 0 0 6.48a9.6 9.6 0 0 0 .3 2a3.14 3.14 0 0 0 .71 1.36a2.86 2.86 0 0 0 1.49.78a45 45 0 0 0 6.5.33c3.5.05 6.57 0 10.2-.28a2.9 2.9 0 0 0 1.53-.78a2.5 2.5 0 0 0 .61-1a10.6 10.6 0 0 0 .52-3.4c.04-.56.04-3.94.04-4.54M9.74 14.85V8.66l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08" },
|
|
36
|
+
"youtube": { path: "M23 9.71a8.5 8.5 0 0 0-.91-4.13a2.92 2.92 0 0 0-1.72-1A78 78 0 0 0 12 4.27a79 79 0 0 0-8.34.3a2.87 2.87 0 0 0-1.46.74c-.9.83-1 2.25-1.1 3.45a48 48 0 0 0 0 6.48a9.6 9.6 0 0 0 .3 2a3.14 3.14 0 0 0 .71 1.36a2.86 2.86 0 0 0 1.49.78a45 45 0 0 0 6.5.33c3.5.05 6.57 0 10.2-.28a2.9 2.9 0 0 0 1.53-.78a2.5 2.5 0 0 0 .61-1a10.6 10.6 0 0 0 .52-3.4c.04-.56.04-3.94.04-4.54M9.74 14.85V8.66l5.92 3.11c-1.66.92-3.85 1.96-5.92 3.08" },
|
|
37
|
+
"line-md:twitter-x": { path: "M18.244 2.25h3.308l-7.227 8.26l8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" },
|
|
38
|
+
"twitter": { path: "M18.244 2.25h3.308l-7.227 8.26l8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" },
|
|
39
|
+
"ic:baseline-whatsapp": { path: "M12.04 2c-5.46 0-9.91 4.45-9.91 9.91c0 1.75.46 3.45 1.32 4.95L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21c5.46 0 9.91-4.45 9.91-9.91c0-2.65-1.03-5.14-2.9-7.01A9.816 9.816 0 0 0 12.04 2zm.01 1.67c4.55 0 8.25 3.7 8.25 8.25c0 4.55-3.7 8.25-8.25 8.25c-1.47 0-2.88-.39-4.12-1.12l-.3-.18l-3.07.81l.82-2.99l-.19-.31A8.204 8.204 0 0 1 3.8 11.92c0-4.55 3.7-8.25 8.25-8.25z" },
|
|
40
|
+
"streamline:interface-validation-check-circle-checkmark-addition-circle-success-check-validation-add-form": { path: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" },
|
|
41
|
+
"ph:check-circle-thin": { path: "M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2zm0 19a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9zm4.53-11.47a.5.5 0 0 1 0 .71l-5 5a.5.5 0 0 1-.71 0l-2.5-2.5a.5.5 0 1 1 .71-.71L11.17 14.4l4.65-4.65a.5.5 0 0 1 .71 0z" },
|
|
42
|
+
"solar:check-circle-linear": { path: "M12 2a10 10 0 1 0 10 10A10.011 10.011 0 0 0 12 2zm0 19a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9zm4.53-11.47a.5.5 0 0 1 0 .71l-5 5a.5.5 0 0 1-.71 0l-2.5-2.5a.5.5 0 1 1 .71-.71L11.17 14.4l4.65-4.65a.5.5 0 0 1 .71 0z" },
|
|
43
|
+
"lucide-lab:flower-lotus": { path: "M12 21c-4.418 0-8-3.582-8-8c0-3.5 3.5-7 8-11c4.5 4 8 7.5 8 11c0 4.418-3.582 8-8 8z" },
|
|
44
|
+
"solar:leaf-outline": { path: "M12 21c-4.418 0-8-3.582-8-8c0-3.5 3.5-7 8-11c4.5 4 8 7.5 8 11c0 4.418-3.582 8-8 8z" },
|
|
45
|
+
"solar:command-linear": { path: "M8.5 5A3.5 3.5 0 0 0 5 8.5v.5A3.5 3.5 0 0 0 8.5 12.5H9v-1h-.5A2.5 2.5 0 0 1 6 9v-.5A2.5 2.5 0 0 1 8.5 6H9V5h-.5zm7 0H15v1h.5a2.5 2.5 0 0 1 2.5 2.5v.5a2.5 2.5 0 0 1-2.5 2.5H15v1h.5a3.5 3.5 0 0 0 3.5-3.5v-.5A3.5 3.5 0 0 0 15.5 5z" },
|
|
46
|
+
"gg:mouse": { path: "M12 5a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V6a1 1 0 0 0-1-1M4 8a8 8 0 1 1 16 0v8a8 8 0 1 1-16 0zm14 0v8a6 6 0 0 1-12 0V8a6 6 0 1 1 12 0" },
|
|
47
|
+
"mouse": { path: "M12 5a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0V6a1 1 0 0 0-1-1M4 8a8 8 0 1 1 16 0v8a8 8 0 1 1-16 0zm14 0v8a6 6 0 0 1-12 0V8a6 6 0 1 1 12 0" },
|
|
48
|
+
"iconoir:flash": { path: "M13 10V3L5 14h6v7l8-11z" },
|
|
49
|
+
"flash": { path: "M13 10V3L5 14h6v7l8-11z" },
|
|
50
|
+
"hugeicons:search-01": { path: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z" },
|
|
51
|
+
"search": { path: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16a6.471 6.471 0 0 0 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z" },
|
|
52
|
+
"solar:info-circle-outline": { path: "M12 17.75a.75.75 0 0 0 .75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75M12 7a1 1 0 1 1 0 2a1 1 0 0 1 0-2M1.25 12C1.25 6.063 6.063 1.25 12 1.25S22.75 6.063 22.75 12S17.937 22.75 12 22.75S1.25 17.937 1.25 12M12 2.75a9.25 9.25 0 1 0 0 18.5a9.25 9.25 0 0 0 0-18.5" },
|
|
53
|
+
"ic:sharp-tag-faces": { path: "M12.01 2C6.49 2 2.02 6.48 2.02 12s4.47 10 9.99 10c5.53 0 10.01-4.48 10.01-10S17.54 2 12.01 2m.01 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8m3.5-9c.83 0 1.5-.67 1.5-1.5S16.35 8 15.52 8s-1.5.67-1.5 1.5s.67 1.5 1.5 1.5m-7 0c.83 0 1.5-.67 1.5-1.5S9.35 8 8.52 8s-1.5.67-1.5 1.5s.67 1.5 1.5 1.5m3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.91c.8 2.04 2.78 3.5 5.11 3.5" },
|
|
54
|
+
"hamburger": { path: "M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z" },
|
|
55
|
+
"svg-spinners:ring-resize": { path: "M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm0 18a8 8 0 1 1 8-8 8 8 0 0 1-8 8z" }
|
|
55
56
|
};
|
|
56
|
-
if (typeof globalThis !== "undefined")
|
|
57
|
-
globalThis.__RESUX_ICON_REGISTRY__ = iconRegistry;
|
|
58
|
-
}
|
|
57
|
+
if (typeof globalThis !== "undefined") globalThis.__RESUX_ICON_REGISTRY__ = iconRegistry;
|
|
59
58
|
const DEFAULT_ICON_API_PROVIDER = "https://api.iconify.design";
|
|
60
|
-
const
|
|
61
|
-
const
|
|
59
|
+
const ICON_FETCH_TIMEOUT_MS = 1e4;
|
|
60
|
+
const ICON_FETCH_MAX_BYTES = 262144;
|
|
61
|
+
const ICON_FETCH_CACHE_MAX_ENTRIES = 256;
|
|
62
|
+
const ICON_FETCH_MAX_IN_FLIGHT = 32;
|
|
63
|
+
const ICON_FETCH_QUEUE_MAX_ENTRIES = 512;
|
|
64
|
+
const pendingFetches = /* @__PURE__ */ new Map();
|
|
65
|
+
const fetchedIconCache = /* @__PURE__ */ new Map();
|
|
66
|
+
const iconFetchQueue = [];
|
|
67
|
+
let activeIconFetches = 0;
|
|
62
68
|
function stripTrailingSlashes(value) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
let end = value.length;
|
|
70
|
+
while (end > 0 && value.charCodeAt(end - 1) === 47) end -= 1;
|
|
71
|
+
return value.slice(0, end);
|
|
72
|
+
}
|
|
73
|
+
function normalizeIconApiProvider(value) {
|
|
74
|
+
const raw = typeof value === "string" ? stripTrailingSlashes(value.trim()) : "";
|
|
75
|
+
if (!raw) return DEFAULT_ICON_API_PROVIDER;
|
|
76
|
+
if (raw.startsWith("//")) return DEFAULT_ICON_API_PROVIDER;
|
|
77
|
+
if (raw.startsWith("/")) return raw;
|
|
78
|
+
try {
|
|
79
|
+
const url = new URL(raw);
|
|
80
|
+
if (url.protocol === "https:" || url.protocol === "http:") return stripTrailingSlashes(url.toString());
|
|
81
|
+
} catch {}
|
|
82
|
+
return DEFAULT_ICON_API_PROVIDER;
|
|
83
|
+
}
|
|
84
|
+
async function readBoundedIconSvg(response) {
|
|
85
|
+
const rawLength = response.headers?.get?.("content-length");
|
|
86
|
+
if (rawLength) {
|
|
87
|
+
const contentLength = Number(rawLength);
|
|
88
|
+
if (Number.isFinite(contentLength) && contentLength > ICON_FETCH_MAX_BYTES) return null;
|
|
89
|
+
}
|
|
90
|
+
if (!response.body?.getReader) {
|
|
91
|
+
const text = await response.text();
|
|
92
|
+
return new TextEncoder().encode(text).byteLength <= ICON_FETCH_MAX_BYTES ? text : null;
|
|
93
|
+
}
|
|
94
|
+
const reader = response.body.getReader();
|
|
95
|
+
const decoder = new TextDecoder();
|
|
96
|
+
let totalBytes = 0;
|
|
97
|
+
let text = "";
|
|
98
|
+
try {
|
|
99
|
+
while (true) {
|
|
100
|
+
const { done, value } = await reader.read();
|
|
101
|
+
if (done) break;
|
|
102
|
+
totalBytes += value.byteLength;
|
|
103
|
+
if (totalBytes > ICON_FETCH_MAX_BYTES) {
|
|
104
|
+
await reader.cancel().catch(() => void 0);
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
text += decoder.decode(value, { stream: true });
|
|
108
|
+
}
|
|
109
|
+
text += decoder.decode();
|
|
110
|
+
return text;
|
|
111
|
+
} finally {
|
|
112
|
+
reader.releaseLock();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function readFetchedIcon(cacheKey) {
|
|
116
|
+
const cached = fetchedIconCache.get(cacheKey);
|
|
117
|
+
if (!cached) return void 0;
|
|
118
|
+
fetchedIconCache.delete(cacheKey);
|
|
119
|
+
fetchedIconCache.set(cacheKey, cached);
|
|
120
|
+
return cached;
|
|
121
|
+
}
|
|
122
|
+
function rememberFetchedIcon(cacheKey, data) {
|
|
123
|
+
fetchedIconCache.delete(cacheKey);
|
|
124
|
+
fetchedIconCache.set(cacheKey, data);
|
|
125
|
+
while (fetchedIconCache.size > ICON_FETCH_CACHE_MAX_ENTRIES) {
|
|
126
|
+
const oldestKey = fetchedIconCache.keys().next().value;
|
|
127
|
+
if (oldestKey === void 0) break;
|
|
128
|
+
fetchedIconCache.delete(oldestKey);
|
|
129
|
+
}
|
|
68
130
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if (url.protocol === "https:" || url.protocol === "http:") {
|
|
83
|
-
return stripTrailingSlashes(url.toString());
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
// Fall back to the public provider for malformed values.
|
|
88
|
-
}
|
|
89
|
-
return DEFAULT_ICON_API_PROVIDER;
|
|
131
|
+
function runWithIconFetchSlot(task) {
|
|
132
|
+
if (activeIconFetches >= ICON_FETCH_MAX_IN_FLIGHT && iconFetchQueue.length >= ICON_FETCH_QUEUE_MAX_ENTRIES) return Promise.resolve(null);
|
|
133
|
+
return new Promise((resolve) => {
|
|
134
|
+
const run = () => {
|
|
135
|
+
activeIconFetches += 1;
|
|
136
|
+
task().then(resolve, () => resolve(null)).finally(() => {
|
|
137
|
+
activeIconFetches = Math.max(0, activeIconFetches - 1);
|
|
138
|
+
iconFetchQueue.shift()?.();
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
if (activeIconFetches < ICON_FETCH_MAX_IN_FLIGHT) run();
|
|
142
|
+
else iconFetchQueue.push(run);
|
|
143
|
+
});
|
|
90
144
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
})
|
|
138
|
-
.catch(() => null)
|
|
139
|
-
.finally(() => {
|
|
140
|
-
pendingFetches.delete(cacheKey);
|
|
141
|
-
});
|
|
142
|
-
pendingFetches.set(cacheKey, fetchPromise);
|
|
143
|
-
return fetchPromise;
|
|
145
|
+
function fetchIconifyIcon(name, apiProvider = DEFAULT_ICON_API_PROVIDER) {
|
|
146
|
+
const normalized = String(name || "").trim().toLowerCase();
|
|
147
|
+
if (!normalized || normalized.length > 256) return Promise.resolve(null);
|
|
148
|
+
if (iconRegistry[normalized]) return Promise.resolve(iconRegistry[normalized]);
|
|
149
|
+
const parts = normalized.split(":");
|
|
150
|
+
if (parts.length !== 2 || !parts[0] || !parts[1]) return Promise.resolve(null);
|
|
151
|
+
const provider = normalizeIconApiProvider(apiProvider);
|
|
152
|
+
const cacheKey = provider + "::" + normalized;
|
|
153
|
+
const cached = readFetchedIcon(cacheKey);
|
|
154
|
+
if (cached) return Promise.resolve(cached);
|
|
155
|
+
const pending = pendingFetches.get(cacheKey);
|
|
156
|
+
if (pending) return pending;
|
|
157
|
+
const prefix = parts[0];
|
|
158
|
+
const iconName = parts[1];
|
|
159
|
+
const url = provider + "/" + encodeURIComponent(prefix) + "/" + encodeURIComponent(iconName) + ".svg";
|
|
160
|
+
const fetchPromise = runWithIconFetchSlot(async () => {
|
|
161
|
+
const controller = typeof AbortController === "function" ? new AbortController() : null;
|
|
162
|
+
const timeout = setTimeout(() => controller?.abort(), ICON_FETCH_TIMEOUT_MS);
|
|
163
|
+
try {
|
|
164
|
+
const response = await fetch(url, controller ? { signal: controller.signal } : void 0);
|
|
165
|
+
if (!response.ok) return null;
|
|
166
|
+
const svgText = await readBoundedIconSvg(response);
|
|
167
|
+
if (!svgText) return null;
|
|
168
|
+
const viewBox = readSvgAttribute(svgText, "viewBox") || "0 0 24 24";
|
|
169
|
+
const paths = [...svgText.matchAll(/<path\b[^>]*>/gi)].slice(0, 128).map((match) => ({
|
|
170
|
+
d: readSvgAttribute(match[0], "d").slice(0, 65536),
|
|
171
|
+
opacity: readSvgAttribute(match[0], "opacity") || void 0
|
|
172
|
+
})).filter((entry) => Boolean(entry.d));
|
|
173
|
+
if (!paths.length) return null;
|
|
174
|
+
const data = {
|
|
175
|
+
path: paths[0].d,
|
|
176
|
+
paths,
|
|
177
|
+
viewBox
|
|
178
|
+
};
|
|
179
|
+
rememberFetchedIcon(cacheKey, data);
|
|
180
|
+
return data;
|
|
181
|
+
} catch {
|
|
182
|
+
return null;
|
|
183
|
+
} finally {
|
|
184
|
+
clearTimeout(timeout);
|
|
185
|
+
}
|
|
186
|
+
}).finally(() => {
|
|
187
|
+
pendingFetches.delete(cacheKey);
|
|
188
|
+
});
|
|
189
|
+
pendingFetches.set(cacheKey, fetchPromise);
|
|
190
|
+
return fetchPromise;
|
|
144
191
|
}
|
|
145
192
|
function readSvgAttribute(source, name) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
193
|
+
const escapedName = name.replace(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
|
|
194
|
+
const match = new RegExp(String.raw`\b${escapedName}\s*=\s*(?:"([^"]*)"|'([^']*)')`, "i").exec(source);
|
|
195
|
+
return (match?.[1] ?? match?.[2] ?? "").trim();
|
|
149
196
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
197
|
+
const Icon = defineComponent({
|
|
198
|
+
name: "ResuxIcon",
|
|
199
|
+
props: {
|
|
200
|
+
name: {
|
|
201
|
+
type: String,
|
|
202
|
+
required: true
|
|
203
|
+
},
|
|
204
|
+
size: {
|
|
205
|
+
type: [String, Number],
|
|
206
|
+
default: "1.25rem"
|
|
207
|
+
},
|
|
208
|
+
mode: {
|
|
209
|
+
type: String,
|
|
210
|
+
default: "svg"
|
|
211
|
+
},
|
|
212
|
+
lazy: {
|
|
213
|
+
type: Boolean,
|
|
214
|
+
default: false
|
|
215
|
+
},
|
|
216
|
+
loading: {
|
|
217
|
+
type: String,
|
|
218
|
+
default: "eager"
|
|
219
|
+
},
|
|
220
|
+
apiProvider: {
|
|
221
|
+
type: String,
|
|
222
|
+
default: ""
|
|
223
|
+
},
|
|
224
|
+
class: {
|
|
225
|
+
type: String,
|
|
226
|
+
default: ""
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
setup(props, { attrs }) {
|
|
230
|
+
const iconRef = ref(null);
|
|
231
|
+
const isVisible = ref(false);
|
|
232
|
+
const iconName = computed(() => String(props.name || "").trim().toLowerCase());
|
|
233
|
+
const configuredProvider = (useRuntimeConfig().public?.icons)?.apiProvider;
|
|
234
|
+
const apiProvider = computed(() => normalizeIconApiProvider(props.apiProvider || configuredProvider));
|
|
235
|
+
const dynamicData = ref(null);
|
|
236
|
+
const isLazy = computed(() => props.lazy || props.loading === "lazy");
|
|
237
|
+
const iconData = computed(() => {
|
|
238
|
+
if (iconRegistry[iconName.value]) return iconRegistry[iconName.value];
|
|
239
|
+
if (dynamicData.value) return dynamicData.value;
|
|
240
|
+
return {
|
|
241
|
+
path: "M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10zm0-2a8 8 0 1 1 0-16 8 8 0 0 1 0 16z",
|
|
242
|
+
opacity: ".35",
|
|
243
|
+
viewBox: "0 0 24 24"
|
|
244
|
+
};
|
|
245
|
+
});
|
|
246
|
+
let requestRevision = 0;
|
|
247
|
+
const loadDynamicIcon = () => {
|
|
248
|
+
const requestedName = iconName.value;
|
|
249
|
+
const requestedProvider = apiProvider.value;
|
|
250
|
+
const revision = ++requestRevision;
|
|
251
|
+
if (iconRegistry[requestedName]) return;
|
|
252
|
+
fetchIconifyIcon(requestedName, requestedProvider).then((result) => {
|
|
253
|
+
if (result && revision === requestRevision && requestedName === iconName.value && requestedProvider === apiProvider.value) dynamicData.value = result;
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
let observer = null;
|
|
257
|
+
onMounted(() => {
|
|
258
|
+
if (isLazy.value && typeof window !== "undefined" && "IntersectionObserver" in window) {
|
|
259
|
+
observer = new IntersectionObserver((entries) => {
|
|
260
|
+
if (entries.some((entry) => entry.isIntersecting)) {
|
|
261
|
+
isVisible.value = true;
|
|
262
|
+
loadDynamicIcon();
|
|
263
|
+
if (observer && iconRef.value) observer.unobserve(iconRef.value);
|
|
264
|
+
}
|
|
265
|
+
}, { rootMargin: "100px" });
|
|
266
|
+
if (iconRef.value) observer.observe(iconRef.value);
|
|
267
|
+
} else {
|
|
268
|
+
isVisible.value = true;
|
|
269
|
+
loadDynamicIcon();
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
onUnmounted(() => {
|
|
273
|
+
requestRevision += 1;
|
|
274
|
+
if (observer) observer.disconnect();
|
|
275
|
+
});
|
|
276
|
+
watch([iconName, apiProvider], () => {
|
|
277
|
+
dynamicData.value = null;
|
|
278
|
+
if (!isLazy.value || isVisible.value) loadDynamicIcon();
|
|
279
|
+
});
|
|
280
|
+
const sizeValue = computed(() => typeof props.size === "number" ? `${props.size}px` : String(props.size || "").trim() || "1.25rem");
|
|
281
|
+
return () => {
|
|
282
|
+
const data = iconData.value;
|
|
283
|
+
return h("svg", {
|
|
284
|
+
ref: iconRef,
|
|
285
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
286
|
+
viewBox: data.viewBox || "0 0 24 24",
|
|
287
|
+
width: sizeValue.value,
|
|
288
|
+
height: sizeValue.value,
|
|
289
|
+
fill: "currentColor",
|
|
290
|
+
class: ["inline-block shrink-0 align-middle", props.class].filter(Boolean).join(" "),
|
|
291
|
+
style: {
|
|
292
|
+
width: sizeValue.value,
|
|
293
|
+
height: sizeValue.value
|
|
294
|
+
},
|
|
295
|
+
"aria-hidden": "true",
|
|
296
|
+
"data-icon-name": props.name,
|
|
297
|
+
"data-icon-lazy": isLazy.value ? "true" : "false",
|
|
298
|
+
...attrs
|
|
299
|
+
}, (data.paths?.length ? data.paths : [{
|
|
300
|
+
d: data.path || "",
|
|
301
|
+
opacity: data.opacity
|
|
302
|
+
}]).map((entry, index) => h("path", {
|
|
303
|
+
key: index,
|
|
304
|
+
d: entry.d,
|
|
305
|
+
fillRule: "evenodd",
|
|
306
|
+
clipRule: "evenodd",
|
|
307
|
+
opacity: entry.opacity || "1"
|
|
308
|
+
})));
|
|
309
|
+
};
|
|
310
|
+
}
|
|
259
311
|
});
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
apiProvider: normalizeIconApiProvider(options.apiProvider),
|
|
280
|
-
lazy: options.lazy === true
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
|
-
}
|
|
312
|
+
const ResuxIcon = Icon;
|
|
313
|
+
var icons_default = defineResuxModule({
|
|
314
|
+
defaults: {
|
|
315
|
+
collections: [],
|
|
316
|
+
component: "Icon",
|
|
317
|
+
mode: "svg",
|
|
318
|
+
apiProvider: DEFAULT_ICON_API_PROVIDER,
|
|
319
|
+
lazy: false
|
|
320
|
+
},
|
|
321
|
+
setup(options, resux) {
|
|
322
|
+
const collections = Array.isArray(options.collections) ? [...new Set(options.collections.map((entry) => String(entry).trim()).filter(Boolean))] : [];
|
|
323
|
+
resux.extendRuntimeConfig({ public: { icons: {
|
|
324
|
+
component: typeof options.component === "string" ? options.component : "Icon",
|
|
325
|
+
collections,
|
|
326
|
+
mode: options.mode || "svg",
|
|
327
|
+
apiProvider: normalizeIconApiProvider(options.apiProvider),
|
|
328
|
+
lazy: options.lazy === true
|
|
329
|
+
} } });
|
|
330
|
+
}
|
|
285
331
|
});
|
|
332
|
+
//#endregion
|
|
333
|
+
export { Icon, ResuxIcon, icons_default as default, defineIconCollections, fetchIconifyIcon, iconRegistry, normalizeIconApiProvider };
|
|
334
|
+
|
|
286
335
|
//# sourceMappingURL=index.js.map
|