nuxt-intlayer 6.1.6 → 7.0.0-canary.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/dist/cjs/_virtual/rolldown_runtime.cjs +40 -0
- package/dist/cjs/index.cjs +7 -25
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/module.cjs +73 -93
- package/dist/cjs/module.cjs.map +1 -1
- package/dist/cjs/node_modules/.bun/@babel_parser@7.28.4/node_modules/@babel/parser/lib/index.cjs +12494 -0
- package/dist/cjs/node_modules/.bun/@babel_parser@7.28.4/node_modules/@babel/parser/lib/index.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.cjs +2353 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.cjs +4751 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/index.cjs +18 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/index.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.cjs +660 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.cjs +442 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/index.cjs +18 -0
- package/dist/cjs/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/index.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.cjs +22 -0
- package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.cjs +1457 -0
- package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/index.cjs +18 -0
- package/dist/cjs/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/index.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.cjs +870 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.cjs +4204 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/index.cjs +18 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/index.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.cjs +1373 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.cjs +1270 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/index.cjs +18 -0
- package/dist/cjs/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/index.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.cjs +44 -0
- package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.prod.cjs +491 -0
- package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.prod.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/index.cjs +18 -0
- package/dist/cjs/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/index.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode.cjs +474 -0
- package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode_codepoint.cjs +82 -0
- package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode_codepoint.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-html.cjs +18 -0
- package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-html.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-xml.cjs +18 -0
- package/dist/cjs/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-xml.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.cjs +255 -0
- package/dist/cjs/node_modules/.bun/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.cjs +103 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.cjs +76 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.cjs +44 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.cjs +71 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.cjs +80 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.cjs +92 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.cjs +791 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.cjs +298 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.cjs +296 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/util.cjs +355 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/util.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.cjs +20 -0
- package/dist/cjs/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/native.cjs +10 -0
- package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/native.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/rng.cjs +18 -0
- package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/rng.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/stringify.cjs +11 -0
- package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/stringify.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/v4.cjs +28 -0
- package/dist/cjs/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/v4.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.cjs +65 -0
- package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.prod.cjs +55 -0
- package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.prod.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index.cjs +18 -0
- package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index.cjs.map +1 -0
- package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index2.cjs +15 -0
- package/dist/cjs/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index2.cjs.map +1 -0
- package/dist/cjs/packages/@intlayer/dictionaries-entry/dist/esm/index.cjs +25 -0
- package/dist/cjs/packages/@intlayer/dictionaries-entry/dist/esm/index.cjs.map +1 -0
- package/dist/cjs/packages/@intlayer/editor/dist/esm/compareUrls.cjs +36 -0
- package/dist/cjs/packages/@intlayer/editor/dist/esm/compareUrls.cjs.map +1 -0
- package/dist/cjs/packages/@intlayer/editor/dist/esm/messagesKeys.cjs +19 -0
- package/dist/cjs/packages/@intlayer/editor/dist/esm/messagesKeys.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/client/installIntlayer.cjs +31 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/client/installIntlayer.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/communicator.cjs +39 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/communicator.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/createSharedComposable.cjs +17 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/createSharedComposable.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/dictionariesRecord.cjs +38 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/dictionariesRecord.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/editedContent.cjs +46 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/editedContent.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/editorEnabled.cjs +44 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/editorEnabled.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/focusDictionary.cjs +38 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/focusDictionary.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/installIntlayerEditor.cjs +26 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/installIntlayerEditor.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/useCrossFrameMessageListener.cjs +35 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/useCrossFrameMessageListener.cjs.map +1 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/useCrossFrameState.cjs +57 -0
- package/dist/cjs/packages/vue-intlayer/dist/esm/editor/useCrossFrameState.cjs.map +1 -0
- package/dist/cjs/runtime/html-lang.cjs +18 -32
- package/dist/cjs/runtime/html-lang.cjs.map +1 -1
- package/dist/cjs/runtime/intlayer-plugin.cjs +34 -38
- package/dist/cjs/runtime/intlayer-plugin.cjs.map +1 -1
- package/dist/esm/_virtual/rolldown_runtime.mjs +38 -0
- package/dist/esm/index.mjs +6 -4
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/module.mjs +62 -63
- package/dist/esm/module.mjs.map +1 -1
- package/dist/esm/node_modules/.bun/@babel_parser@7.28.4/node_modules/@babel/parser/lib/index.mjs +12491 -0
- package/dist/esm/node_modules/.bun/@babel_parser@7.28.4/node_modules/@babel/parser/lib/index.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs +2350 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.mjs +4748 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/index.mjs +15 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-core@3.5.22/node_modules/@vue/compiler-core/index.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs +657 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.mjs +439 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/index.mjs +15 -0
- package/dist/esm/node_modules/.bun/@vue_compiler-dom@3.5.22/node_modules/@vue/compiler-dom/index.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs +19 -0
- package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.mjs +1454 -0
- package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs +1312 -0
- package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/index.mjs +15 -0
- package/dist/esm/node_modules/.bun/@vue_reactivity@3.5.22/node_modules/@vue/reactivity/index.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs +867 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.mjs +4201 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs +995 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/index.mjs +15 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/index.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs +1370 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.mjs +1267 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/index.mjs +15 -0
- package/dist/esm/node_modules/.bun/@vue_runtime-dom@3.5.22/node_modules/@vue/runtime-dom/index.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.mjs +41 -0
- package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.prod.mjs +488 -0
- package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.cjs.prod.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.esm-bundler.mjs +77 -0
- package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/dist/shared.esm-bundler.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/index.mjs +15 -0
- package/dist/esm/node_modules/.bun/@vue_shared@3.5.22/node_modules/@vue/shared/index.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode.mjs +471 -0
- package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode_codepoint.mjs +79 -0
- package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/decode_codepoint.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-html.mjs +15 -0
- package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-html.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-xml.mjs +15 -0
- package/dist/esm/node_modules/.bun/entities@4.5.0/node_modules/entities/lib/generated/decode-data-xml.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs +252 -0
- package/dist/esm/node_modules/.bun/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs +100 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs +73 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs +41 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs +68 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs +77 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs +89 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs +788 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs +295 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs +293 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs +352 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs +17 -0
- package/dist/esm/node_modules/.bun/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/native.mjs +7 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/native.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/rng.mjs +14 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/rng.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/stringify.mjs +10 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/stringify.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/v4.mjs +28 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist/v4.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/native.mjs +8 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/native.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/rng.mjs +16 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/rng.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/stringify.mjs +10 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/stringify.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/v4.mjs +28 -0
- package/dist/esm/node_modules/.bun/uuid@13.0.0/node_modules/uuid/dist-node/v4.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.mjs +62 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.prod.mjs +52 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.cjs.prod.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.runtime.esm-bundler.mjs +12 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/dist/vue.runtime.esm-bundler.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index.mjs +15 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index.mjs.map +1 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index2.mjs +10 -0
- package/dist/esm/node_modules/.bun/vue@3.5.22_e72aefb0f8d0b841/node_modules/vue/index2.mjs.map +1 -0
- package/dist/esm/packages/@intlayer/dictionaries-entry/dist/esm/index.mjs +20 -0
- package/dist/esm/packages/@intlayer/dictionaries-entry/dist/esm/index.mjs.map +1 -0
- package/dist/esm/packages/@intlayer/editor/dist/esm/compareUrls.mjs +35 -0
- package/dist/esm/packages/@intlayer/editor/dist/esm/compareUrls.mjs.map +1 -0
- package/dist/esm/packages/@intlayer/editor/dist/esm/messagesKeys.mjs +18 -0
- package/dist/esm/packages/@intlayer/editor/dist/esm/messagesKeys.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/client/installIntlayer.mjs +28 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/client/installIntlayer.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/communicator.mjs +38 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/communicator.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/createSharedComposable.mjs +18 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/createSharedComposable.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/dictionariesRecord.mjs +40 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/dictionariesRecord.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/editedContent.mjs +46 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/editedContent.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/editorEnabled.mjs +44 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/editorEnabled.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/focusDictionary.mjs +40 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/focusDictionary.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/installIntlayerEditor.mjs +24 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/installIntlayerEditor.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/useCrossFrameMessageListener.mjs +37 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/useCrossFrameMessageListener.mjs.map +1 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/useCrossFrameState.mjs +59 -0
- package/dist/esm/packages/vue-intlayer/dist/esm/editor/useCrossFrameState.mjs.map +1 -0
- package/dist/esm/runtime/html-lang.mjs +11 -9
- package/dist/esm/runtime/html-lang.mjs.map +1 -1
- package/dist/esm/runtime/intlayer-plugin.mjs +28 -15
- package/dist/esm/runtime/intlayer-plugin.mjs.map +1 -1
- package/dist/types/index.d.ts +2 -3
- package/dist/types/module.d.ts +6 -2
- package/dist/types/module.d.ts.map +1 -1
- package/dist/types/runtime/html-lang.d.ts +3 -1
- package/dist/types/runtime/html-lang.d.ts.map +1 -1
- package/dist/types/runtime/intlayer-plugin.d.ts +3 -1
- package/dist/types/runtime/intlayer-plugin.d.ts.map +1 -1
- package/package.json +37 -43
- package/LICENSE +0 -202
- package/dist/types/index.d.ts.map +0 -1
|
@@ -0,0 +1,1270 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_index = require('../../../../../@vue_shared@3.5.22/node_modules/@vue/shared/index.cjs');
|
|
3
|
+
const require_index$1 = require('../../../../../@vue_runtime-core@3.5.22/node_modules/@vue/runtime-core/index.cjs');
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.bun/@vue+runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js
|
|
6
|
+
var require_runtime_dom_cjs_prod = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.bun/@vue+runtime-dom@3.5.22/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js": ((exports) => {
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
var runtimeCore = require_index$1.require_runtime_core();
|
|
9
|
+
var shared = require_index.require_shared();
|
|
10
|
+
let policy = void 0;
|
|
11
|
+
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
12
|
+
if (tt) try {
|
|
13
|
+
policy = /* @__PURE__ */ tt.createPolicy("vue", { createHTML: (val) => val });
|
|
14
|
+
} catch (e) {}
|
|
15
|
+
const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
|
|
16
|
+
const svgNS = "http://www.w3.org/2000/svg";
|
|
17
|
+
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
18
|
+
const doc = typeof document !== "undefined" ? document : null;
|
|
19
|
+
const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
|
|
20
|
+
const nodeOps = {
|
|
21
|
+
insert: (child, parent, anchor) => {
|
|
22
|
+
parent.insertBefore(child, anchor || null);
|
|
23
|
+
},
|
|
24
|
+
remove: (child) => {
|
|
25
|
+
const parent = child.parentNode;
|
|
26
|
+
if (parent) parent.removeChild(child);
|
|
27
|
+
},
|
|
28
|
+
createElement: (tag, namespace, is, props) => {
|
|
29
|
+
const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
|
|
30
|
+
if (tag === "select" && props && props.multiple != null) el.setAttribute("multiple", props.multiple);
|
|
31
|
+
return el;
|
|
32
|
+
},
|
|
33
|
+
createText: (text) => doc.createTextNode(text),
|
|
34
|
+
createComment: (text) => doc.createComment(text),
|
|
35
|
+
setText: (node, text) => {
|
|
36
|
+
node.nodeValue = text;
|
|
37
|
+
},
|
|
38
|
+
setElementText: (el, text) => {
|
|
39
|
+
el.textContent = text;
|
|
40
|
+
},
|
|
41
|
+
parentNode: (node) => node.parentNode,
|
|
42
|
+
nextSibling: (node) => node.nextSibling,
|
|
43
|
+
querySelector: (selector) => doc.querySelector(selector),
|
|
44
|
+
setScopeId(el, id) {
|
|
45
|
+
el.setAttribute(id, "");
|
|
46
|
+
},
|
|
47
|
+
insertStaticContent(content, parent, anchor, namespace, start, end) {
|
|
48
|
+
const before = anchor ? anchor.previousSibling : parent.lastChild;
|
|
49
|
+
if (start && (start === end || start.nextSibling)) while (true) {
|
|
50
|
+
parent.insertBefore(start.cloneNode(true), anchor);
|
|
51
|
+
if (start === end || !(start = start.nextSibling)) break;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
templateContainer.innerHTML = unsafeToTrustedHTML(namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content);
|
|
55
|
+
const template = templateContainer.content;
|
|
56
|
+
if (namespace === "svg" || namespace === "mathml") {
|
|
57
|
+
const wrapper = template.firstChild;
|
|
58
|
+
while (wrapper.firstChild) template.appendChild(wrapper.firstChild);
|
|
59
|
+
template.removeChild(wrapper);
|
|
60
|
+
}
|
|
61
|
+
parent.insertBefore(template, anchor);
|
|
62
|
+
}
|
|
63
|
+
return [before ? before.nextSibling : parent.firstChild, anchor ? anchor.previousSibling : parent.lastChild];
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const TRANSITION = "transition";
|
|
67
|
+
const ANIMATION = "animation";
|
|
68
|
+
const vtcKey = Symbol("_vtc");
|
|
69
|
+
const DOMTransitionPropsValidators = {
|
|
70
|
+
name: String,
|
|
71
|
+
type: String,
|
|
72
|
+
css: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: true
|
|
75
|
+
},
|
|
76
|
+
duration: [
|
|
77
|
+
String,
|
|
78
|
+
Number,
|
|
79
|
+
Object
|
|
80
|
+
],
|
|
81
|
+
enterFromClass: String,
|
|
82
|
+
enterActiveClass: String,
|
|
83
|
+
enterToClass: String,
|
|
84
|
+
appearFromClass: String,
|
|
85
|
+
appearActiveClass: String,
|
|
86
|
+
appearToClass: String,
|
|
87
|
+
leaveFromClass: String,
|
|
88
|
+
leaveActiveClass: String,
|
|
89
|
+
leaveToClass: String
|
|
90
|
+
};
|
|
91
|
+
const TransitionPropsValidators = /* @__PURE__ */ shared.extend({}, runtimeCore.BaseTransitionPropsValidators, DOMTransitionPropsValidators);
|
|
92
|
+
const decorate$1 = (t) => {
|
|
93
|
+
t.displayName = "Transition";
|
|
94
|
+
t.props = TransitionPropsValidators;
|
|
95
|
+
return t;
|
|
96
|
+
};
|
|
97
|
+
const Transition = /* @__PURE__ */ decorate$1((props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots));
|
|
98
|
+
const callHook = (hook, args = []) => {
|
|
99
|
+
if (shared.isArray(hook)) hook.forEach((h2) => h2(...args));
|
|
100
|
+
else if (hook) hook(...args);
|
|
101
|
+
};
|
|
102
|
+
const hasExplicitCallback = (hook) => {
|
|
103
|
+
return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
|
|
104
|
+
};
|
|
105
|
+
function resolveTransitionProps(rawProps) {
|
|
106
|
+
const baseProps = {};
|
|
107
|
+
for (const key in rawProps) if (!(key in DOMTransitionPropsValidators)) baseProps[key] = rawProps[key];
|
|
108
|
+
if (rawProps.css === false) return baseProps;
|
|
109
|
+
const { name = "v", type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps;
|
|
110
|
+
const durations = normalizeDuration(duration);
|
|
111
|
+
const enterDuration = durations && durations[0];
|
|
112
|
+
const leaveDuration = durations && durations[1];
|
|
113
|
+
const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps;
|
|
114
|
+
const finishEnter = (el, isAppear, done, isCancelled) => {
|
|
115
|
+
el._enterCancelled = isCancelled;
|
|
116
|
+
removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
117
|
+
removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
|
|
118
|
+
done && done();
|
|
119
|
+
};
|
|
120
|
+
const finishLeave = (el, done) => {
|
|
121
|
+
el._isLeaving = false;
|
|
122
|
+
removeTransitionClass(el, leaveFromClass);
|
|
123
|
+
removeTransitionClass(el, leaveToClass);
|
|
124
|
+
removeTransitionClass(el, leaveActiveClass);
|
|
125
|
+
done && done();
|
|
126
|
+
};
|
|
127
|
+
const makeEnterHook = (isAppear) => {
|
|
128
|
+
return (el, done) => {
|
|
129
|
+
const hook = isAppear ? onAppear : onEnter;
|
|
130
|
+
const resolve = () => finishEnter(el, isAppear, done);
|
|
131
|
+
callHook(hook, [el, resolve]);
|
|
132
|
+
nextFrame(() => {
|
|
133
|
+
removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
|
|
134
|
+
addTransitionClass(el, isAppear ? appearToClass : enterToClass);
|
|
135
|
+
if (!hasExplicitCallback(hook)) whenTransitionEnds(el, type, enterDuration, resolve);
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
return shared.extend(baseProps, {
|
|
140
|
+
onBeforeEnter(el) {
|
|
141
|
+
callHook(onBeforeEnter, [el]);
|
|
142
|
+
addTransitionClass(el, enterFromClass);
|
|
143
|
+
addTransitionClass(el, enterActiveClass);
|
|
144
|
+
},
|
|
145
|
+
onBeforeAppear(el) {
|
|
146
|
+
callHook(onBeforeAppear, [el]);
|
|
147
|
+
addTransitionClass(el, appearFromClass);
|
|
148
|
+
addTransitionClass(el, appearActiveClass);
|
|
149
|
+
},
|
|
150
|
+
onEnter: makeEnterHook(false),
|
|
151
|
+
onAppear: makeEnterHook(true),
|
|
152
|
+
onLeave(el, done) {
|
|
153
|
+
el._isLeaving = true;
|
|
154
|
+
const resolve = () => finishLeave(el, done);
|
|
155
|
+
addTransitionClass(el, leaveFromClass);
|
|
156
|
+
if (!el._enterCancelled) {
|
|
157
|
+
forceReflow(el);
|
|
158
|
+
addTransitionClass(el, leaveActiveClass);
|
|
159
|
+
} else {
|
|
160
|
+
addTransitionClass(el, leaveActiveClass);
|
|
161
|
+
forceReflow(el);
|
|
162
|
+
}
|
|
163
|
+
nextFrame(() => {
|
|
164
|
+
if (!el._isLeaving) return;
|
|
165
|
+
removeTransitionClass(el, leaveFromClass);
|
|
166
|
+
addTransitionClass(el, leaveToClass);
|
|
167
|
+
if (!hasExplicitCallback(onLeave)) whenTransitionEnds(el, type, leaveDuration, resolve);
|
|
168
|
+
});
|
|
169
|
+
callHook(onLeave, [el, resolve]);
|
|
170
|
+
},
|
|
171
|
+
onEnterCancelled(el) {
|
|
172
|
+
finishEnter(el, false, void 0, true);
|
|
173
|
+
callHook(onEnterCancelled, [el]);
|
|
174
|
+
},
|
|
175
|
+
onAppearCancelled(el) {
|
|
176
|
+
finishEnter(el, true, void 0, true);
|
|
177
|
+
callHook(onAppearCancelled, [el]);
|
|
178
|
+
},
|
|
179
|
+
onLeaveCancelled(el) {
|
|
180
|
+
finishLeave(el);
|
|
181
|
+
callHook(onLeaveCancelled, [el]);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function normalizeDuration(duration) {
|
|
186
|
+
if (duration == null) return null;
|
|
187
|
+
else if (shared.isObject(duration)) return [NumberOf(duration.enter), NumberOf(duration.leave)];
|
|
188
|
+
else {
|
|
189
|
+
const n = NumberOf(duration);
|
|
190
|
+
return [n, n];
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function NumberOf(val) {
|
|
194
|
+
return shared.toNumber(val);
|
|
195
|
+
}
|
|
196
|
+
function addTransitionClass(el, cls) {
|
|
197
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
|
|
198
|
+
(el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
|
|
199
|
+
}
|
|
200
|
+
function removeTransitionClass(el, cls) {
|
|
201
|
+
cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
|
|
202
|
+
const _vtc = el[vtcKey];
|
|
203
|
+
if (_vtc) {
|
|
204
|
+
_vtc.delete(cls);
|
|
205
|
+
if (!_vtc.size) el[vtcKey] = void 0;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function nextFrame(cb) {
|
|
209
|
+
requestAnimationFrame(() => {
|
|
210
|
+
requestAnimationFrame(cb);
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
let endId = 0;
|
|
214
|
+
function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
|
|
215
|
+
const id = el._endId = ++endId;
|
|
216
|
+
const resolveIfNotStale = () => {
|
|
217
|
+
if (id === el._endId) resolve();
|
|
218
|
+
};
|
|
219
|
+
if (explicitTimeout != null) return setTimeout(resolveIfNotStale, explicitTimeout);
|
|
220
|
+
const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
|
|
221
|
+
if (!type) return resolve();
|
|
222
|
+
const endEvent = type + "end";
|
|
223
|
+
let ended = 0;
|
|
224
|
+
const end = () => {
|
|
225
|
+
el.removeEventListener(endEvent, onEnd);
|
|
226
|
+
resolveIfNotStale();
|
|
227
|
+
};
|
|
228
|
+
const onEnd = (e) => {
|
|
229
|
+
if (e.target === el && ++ended >= propCount) end();
|
|
230
|
+
};
|
|
231
|
+
setTimeout(() => {
|
|
232
|
+
if (ended < propCount) end();
|
|
233
|
+
}, timeout + 1);
|
|
234
|
+
el.addEventListener(endEvent, onEnd);
|
|
235
|
+
}
|
|
236
|
+
function getTransitionInfo(el, expectedType) {
|
|
237
|
+
const styles = window.getComputedStyle(el);
|
|
238
|
+
const getStyleProperties = (key) => (styles[key] || "").split(", ");
|
|
239
|
+
const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
|
|
240
|
+
const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
|
|
241
|
+
const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
|
|
242
|
+
const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
|
|
243
|
+
const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
|
|
244
|
+
const animationTimeout = getTimeout(animationDelays, animationDurations);
|
|
245
|
+
let type = null;
|
|
246
|
+
let timeout = 0;
|
|
247
|
+
let propCount = 0;
|
|
248
|
+
if (expectedType === TRANSITION) {
|
|
249
|
+
if (transitionTimeout > 0) {
|
|
250
|
+
type = TRANSITION;
|
|
251
|
+
timeout = transitionTimeout;
|
|
252
|
+
propCount = transitionDurations.length;
|
|
253
|
+
}
|
|
254
|
+
} else if (expectedType === ANIMATION) {
|
|
255
|
+
if (animationTimeout > 0) {
|
|
256
|
+
type = ANIMATION;
|
|
257
|
+
timeout = animationTimeout;
|
|
258
|
+
propCount = animationDurations.length;
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
timeout = Math.max(transitionTimeout, animationTimeout);
|
|
262
|
+
type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
|
|
263
|
+
propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
|
|
264
|
+
}
|
|
265
|
+
const hasTransform = type === TRANSITION && /\b(?:transform|all)(?:,|$)/.test(getStyleProperties(`${TRANSITION}Property`).toString());
|
|
266
|
+
return {
|
|
267
|
+
type,
|
|
268
|
+
timeout,
|
|
269
|
+
propCount,
|
|
270
|
+
hasTransform
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
function getTimeout(delays, durations) {
|
|
274
|
+
while (delays.length < durations.length) delays = delays.concat(delays);
|
|
275
|
+
return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
|
|
276
|
+
}
|
|
277
|
+
function toMs(s) {
|
|
278
|
+
if (s === "auto") return 0;
|
|
279
|
+
return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
|
|
280
|
+
}
|
|
281
|
+
function forceReflow(el) {
|
|
282
|
+
return (el ? el.ownerDocument : document).body.offsetHeight;
|
|
283
|
+
}
|
|
284
|
+
function patchClass(el, value, isSVG) {
|
|
285
|
+
const transitionClasses = el[vtcKey];
|
|
286
|
+
if (transitionClasses) value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
|
|
287
|
+
if (value == null) el.removeAttribute("class");
|
|
288
|
+
else if (isSVG) el.setAttribute("class", value);
|
|
289
|
+
else el.className = value;
|
|
290
|
+
}
|
|
291
|
+
const vShowOriginalDisplay = Symbol("_vod");
|
|
292
|
+
const vShowHidden = Symbol("_vsh");
|
|
293
|
+
const vShow = {
|
|
294
|
+
name: "show",
|
|
295
|
+
beforeMount(el, { value }, { transition }) {
|
|
296
|
+
el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
|
|
297
|
+
if (transition && value) transition.beforeEnter(el);
|
|
298
|
+
else setDisplay(el, value);
|
|
299
|
+
},
|
|
300
|
+
mounted(el, { value }, { transition }) {
|
|
301
|
+
if (transition && value) transition.enter(el);
|
|
302
|
+
},
|
|
303
|
+
updated(el, { value, oldValue }, { transition }) {
|
|
304
|
+
if (!value === !oldValue) return;
|
|
305
|
+
if (transition) if (value) {
|
|
306
|
+
transition.beforeEnter(el);
|
|
307
|
+
setDisplay(el, true);
|
|
308
|
+
transition.enter(el);
|
|
309
|
+
} else transition.leave(el, () => {
|
|
310
|
+
setDisplay(el, false);
|
|
311
|
+
});
|
|
312
|
+
else setDisplay(el, value);
|
|
313
|
+
},
|
|
314
|
+
beforeUnmount(el, { value }) {
|
|
315
|
+
setDisplay(el, value);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
function setDisplay(el, value) {
|
|
319
|
+
el.style.display = value ? el[vShowOriginalDisplay] : "none";
|
|
320
|
+
el[vShowHidden] = !value;
|
|
321
|
+
}
|
|
322
|
+
function initVShowForSSR() {
|
|
323
|
+
vShow.getSSRProps = ({ value }) => {
|
|
324
|
+
if (!value) return { style: { display: "none" } };
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
const CSS_VAR_TEXT = Symbol("");
|
|
328
|
+
function useCssVars(getter) {}
|
|
329
|
+
const displayRE = /(?:^|;)\s*display\s*:/;
|
|
330
|
+
function patchStyle(el, prev, next) {
|
|
331
|
+
const style = el.style;
|
|
332
|
+
const isCssString = shared.isString(next);
|
|
333
|
+
let hasControlledDisplay = false;
|
|
334
|
+
if (next && !isCssString) {
|
|
335
|
+
if (prev) if (!shared.isString(prev)) {
|
|
336
|
+
for (const key in prev) if (next[key] == null) setStyle(style, key, "");
|
|
337
|
+
} else for (const prevStyle of prev.split(";")) {
|
|
338
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
339
|
+
if (next[key] == null) setStyle(style, key, "");
|
|
340
|
+
}
|
|
341
|
+
for (const key in next) {
|
|
342
|
+
if (key === "display") hasControlledDisplay = true;
|
|
343
|
+
setStyle(style, key, next[key]);
|
|
344
|
+
}
|
|
345
|
+
} else if (isCssString) {
|
|
346
|
+
if (prev !== next) {
|
|
347
|
+
const cssVarText = style[CSS_VAR_TEXT];
|
|
348
|
+
if (cssVarText) next += ";" + cssVarText;
|
|
349
|
+
style.cssText = next;
|
|
350
|
+
hasControlledDisplay = displayRE.test(next);
|
|
351
|
+
}
|
|
352
|
+
} else if (prev) el.removeAttribute("style");
|
|
353
|
+
if (vShowOriginalDisplay in el) {
|
|
354
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
355
|
+
if (el[vShowHidden]) style.display = "none";
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
const importantRE = /\s*!important$/;
|
|
359
|
+
function setStyle(style, name, val) {
|
|
360
|
+
if (shared.isArray(val)) val.forEach((v) => setStyle(style, name, v));
|
|
361
|
+
else {
|
|
362
|
+
if (val == null) val = "";
|
|
363
|
+
if (name.startsWith("--")) style.setProperty(name, val);
|
|
364
|
+
else {
|
|
365
|
+
const prefixed = autoPrefix(style, name);
|
|
366
|
+
if (importantRE.test(val)) style.setProperty(shared.hyphenate(prefixed), val.replace(importantRE, ""), "important");
|
|
367
|
+
else style[prefixed] = val;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
const prefixes = [
|
|
372
|
+
"Webkit",
|
|
373
|
+
"Moz",
|
|
374
|
+
"ms"
|
|
375
|
+
];
|
|
376
|
+
const prefixCache = {};
|
|
377
|
+
function autoPrefix(style, rawName) {
|
|
378
|
+
const cached = prefixCache[rawName];
|
|
379
|
+
if (cached) return cached;
|
|
380
|
+
let name = runtimeCore.camelize(rawName);
|
|
381
|
+
if (name !== "filter" && name in style) return prefixCache[rawName] = name;
|
|
382
|
+
name = shared.capitalize(name);
|
|
383
|
+
for (let i = 0; i < prefixes.length; i++) {
|
|
384
|
+
const prefixed = prefixes[i] + name;
|
|
385
|
+
if (prefixed in style) return prefixCache[rawName] = prefixed;
|
|
386
|
+
}
|
|
387
|
+
return rawName;
|
|
388
|
+
}
|
|
389
|
+
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
390
|
+
function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) {
|
|
391
|
+
if (isSVG && key.startsWith("xlink:")) if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
392
|
+
else el.setAttributeNS(xlinkNS, key, value);
|
|
393
|
+
else if (value == null || isBoolean && !shared.includeBooleanAttr(value)) el.removeAttribute(key);
|
|
394
|
+
else el.setAttribute(key, isBoolean ? "" : shared.isSymbol(value) ? String(value) : value);
|
|
395
|
+
}
|
|
396
|
+
function patchDOMProp(el, key, value, parentComponent, attrName) {
|
|
397
|
+
if (key === "innerHTML" || key === "textContent") {
|
|
398
|
+
if (value != null) el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
const tag = el.tagName;
|
|
402
|
+
if (key === "value" && tag !== "PROGRESS" && !tag.includes("-")) {
|
|
403
|
+
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
404
|
+
const newValue = value == null ? el.type === "checkbox" ? "on" : "" : String(value);
|
|
405
|
+
if (oldValue !== newValue || !("_value" in el)) el.value = newValue;
|
|
406
|
+
if (value == null) el.removeAttribute(key);
|
|
407
|
+
el._value = value;
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
let needRemove = false;
|
|
411
|
+
if (value === "" || value == null) {
|
|
412
|
+
const type = typeof el[key];
|
|
413
|
+
if (type === "boolean") value = shared.includeBooleanAttr(value);
|
|
414
|
+
else if (value == null && type === "string") {
|
|
415
|
+
value = "";
|
|
416
|
+
needRemove = true;
|
|
417
|
+
} else if (type === "number") {
|
|
418
|
+
value = 0;
|
|
419
|
+
needRemove = true;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
try {
|
|
423
|
+
el[key] = value;
|
|
424
|
+
} catch (e) {}
|
|
425
|
+
needRemove && el.removeAttribute(attrName || key);
|
|
426
|
+
}
|
|
427
|
+
function addEventListener(el, event, handler, options) {
|
|
428
|
+
el.addEventListener(event, handler, options);
|
|
429
|
+
}
|
|
430
|
+
function removeEventListener(el, event, handler, options) {
|
|
431
|
+
el.removeEventListener(event, handler, options);
|
|
432
|
+
}
|
|
433
|
+
const veiKey = Symbol("_vei");
|
|
434
|
+
function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
435
|
+
const invokers = el[veiKey] || (el[veiKey] = {});
|
|
436
|
+
const existingInvoker = invokers[rawName];
|
|
437
|
+
if (nextValue && existingInvoker) existingInvoker.value = nextValue;
|
|
438
|
+
else {
|
|
439
|
+
const [name, options] = parseName(rawName);
|
|
440
|
+
if (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(nextValue, instance), options);
|
|
441
|
+
else if (existingInvoker) {
|
|
442
|
+
removeEventListener(el, name, existingInvoker, options);
|
|
443
|
+
invokers[rawName] = void 0;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
const optionsModifierRE = /(?:Once|Passive|Capture)$/;
|
|
448
|
+
function parseName(name) {
|
|
449
|
+
let options;
|
|
450
|
+
if (optionsModifierRE.test(name)) {
|
|
451
|
+
options = {};
|
|
452
|
+
let m;
|
|
453
|
+
while (m = name.match(optionsModifierRE)) {
|
|
454
|
+
name = name.slice(0, name.length - m[0].length);
|
|
455
|
+
options[m[0].toLowerCase()] = true;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return [name[2] === ":" ? name.slice(3) : shared.hyphenate(name.slice(2)), options];
|
|
459
|
+
}
|
|
460
|
+
let cachedNow = 0;
|
|
461
|
+
const p = /* @__PURE__ */ Promise.resolve();
|
|
462
|
+
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
463
|
+
function createInvoker(initialValue, instance) {
|
|
464
|
+
const invoker = (e) => {
|
|
465
|
+
if (!e._vts) e._vts = Date.now();
|
|
466
|
+
else if (e._vts <= invoker.attached) return;
|
|
467
|
+
runtimeCore.callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5, [e]);
|
|
468
|
+
};
|
|
469
|
+
invoker.value = initialValue;
|
|
470
|
+
invoker.attached = getNow();
|
|
471
|
+
return invoker;
|
|
472
|
+
}
|
|
473
|
+
function patchStopImmediatePropagation(e, value) {
|
|
474
|
+
if (shared.isArray(value)) {
|
|
475
|
+
const originalStop = e.stopImmediatePropagation;
|
|
476
|
+
e.stopImmediatePropagation = () => {
|
|
477
|
+
originalStop.call(e);
|
|
478
|
+
e._stopped = true;
|
|
479
|
+
};
|
|
480
|
+
return value.map((fn) => (e2) => !e2._stopped && fn && fn(e2));
|
|
481
|
+
} else return value;
|
|
482
|
+
}
|
|
483
|
+
const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
|
|
484
|
+
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
485
|
+
const isSVG = namespace === "svg";
|
|
486
|
+
if (key === "class") patchClass(el, nextValue, isSVG);
|
|
487
|
+
else if (key === "style") patchStyle(el, prevValue, nextValue);
|
|
488
|
+
else if (shared.isOn(key)) {
|
|
489
|
+
if (!shared.isModelListener(key)) patchEvent(el, key, prevValue, nextValue, parentComponent);
|
|
490
|
+
} else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
|
|
491
|
+
patchDOMProp(el, key, nextValue);
|
|
492
|
+
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
493
|
+
} else if (el._isVueCE && (/[A-Z]/.test(key) || !shared.isString(nextValue))) patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key);
|
|
494
|
+
else {
|
|
495
|
+
if (key === "true-value") el._trueValue = nextValue;
|
|
496
|
+
else if (key === "false-value") el._falseValue = nextValue;
|
|
497
|
+
patchAttr(el, key, nextValue, isSVG);
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
function shouldSetAsProp(el, key, value, isSVG) {
|
|
501
|
+
if (isSVG) {
|
|
502
|
+
if (key === "innerHTML" || key === "textContent") return true;
|
|
503
|
+
if (key in el && isNativeOn(key) && shared.isFunction(value)) return true;
|
|
504
|
+
return false;
|
|
505
|
+
}
|
|
506
|
+
if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") return false;
|
|
507
|
+
if (key === "form") return false;
|
|
508
|
+
if (key === "list" && el.tagName === "INPUT") return false;
|
|
509
|
+
if (key === "type" && el.tagName === "TEXTAREA") return false;
|
|
510
|
+
if (key === "width" || key === "height") {
|
|
511
|
+
const tag = el.tagName;
|
|
512
|
+
if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") return false;
|
|
513
|
+
}
|
|
514
|
+
if (isNativeOn(key) && shared.isString(value)) return false;
|
|
515
|
+
return key in el;
|
|
516
|
+
}
|
|
517
|
+
const REMOVAL = {};
|
|
518
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
519
|
+
function defineCustomElement(options, extraOptions, _createApp) {
|
|
520
|
+
let Comp = runtimeCore.defineComponent(options, extraOptions);
|
|
521
|
+
if (shared.isPlainObject(Comp)) Comp = shared.extend({}, Comp, extraOptions);
|
|
522
|
+
class VueCustomElement extends VueElement {
|
|
523
|
+
constructor(initialProps) {
|
|
524
|
+
super(Comp, initialProps, _createApp);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
VueCustomElement.def = Comp;
|
|
528
|
+
return VueCustomElement;
|
|
529
|
+
}
|
|
530
|
+
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ ((options, extraOptions) => {
|
|
531
|
+
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
532
|
+
});
|
|
533
|
+
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {};
|
|
534
|
+
var VueElement = class VueElement extends BaseClass {
|
|
535
|
+
constructor(_def, _props = {}, _createApp = createApp) {
|
|
536
|
+
super();
|
|
537
|
+
this._def = _def;
|
|
538
|
+
this._props = _props;
|
|
539
|
+
this._createApp = _createApp;
|
|
540
|
+
this._isVueCE = true;
|
|
541
|
+
/**
|
|
542
|
+
* @internal
|
|
543
|
+
*/
|
|
544
|
+
this._instance = null;
|
|
545
|
+
/**
|
|
546
|
+
* @internal
|
|
547
|
+
*/
|
|
548
|
+
this._app = null;
|
|
549
|
+
/**
|
|
550
|
+
* @internal
|
|
551
|
+
*/
|
|
552
|
+
this._nonce = this._def.nonce;
|
|
553
|
+
this._connected = false;
|
|
554
|
+
this._resolved = false;
|
|
555
|
+
this._numberProps = null;
|
|
556
|
+
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
557
|
+
this._ob = null;
|
|
558
|
+
if (this.shadowRoot && _createApp !== createApp) this._root = this.shadowRoot;
|
|
559
|
+
else if (_def.shadowRoot !== false) {
|
|
560
|
+
this.attachShadow(shared.extend({}, _def.shadowRootOptions, { mode: "open" }));
|
|
561
|
+
this._root = this.shadowRoot;
|
|
562
|
+
} else this._root = this;
|
|
563
|
+
}
|
|
564
|
+
connectedCallback() {
|
|
565
|
+
if (!this.isConnected) return;
|
|
566
|
+
if (!this.shadowRoot && !this._resolved) this._parseSlots();
|
|
567
|
+
this._connected = true;
|
|
568
|
+
let parent = this;
|
|
569
|
+
while (parent = parent && (parent.parentNode || parent.host)) if (parent instanceof VueElement) {
|
|
570
|
+
this._parent = parent;
|
|
571
|
+
break;
|
|
572
|
+
}
|
|
573
|
+
if (!this._instance) if (this._resolved) this._mount(this._def);
|
|
574
|
+
else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
|
|
575
|
+
this._pendingResolve = void 0;
|
|
576
|
+
this._resolveDef();
|
|
577
|
+
});
|
|
578
|
+
else this._resolveDef();
|
|
579
|
+
}
|
|
580
|
+
_setParent(parent = this._parent) {
|
|
581
|
+
if (parent) {
|
|
582
|
+
this._instance.parent = parent._instance;
|
|
583
|
+
this._inheritParentContext(parent);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
_inheritParentContext(parent = this._parent) {
|
|
587
|
+
if (parent && this._app) Object.setPrototypeOf(this._app._context.provides, parent._instance.provides);
|
|
588
|
+
}
|
|
589
|
+
disconnectedCallback() {
|
|
590
|
+
this._connected = false;
|
|
591
|
+
runtimeCore.nextTick(() => {
|
|
592
|
+
if (!this._connected) {
|
|
593
|
+
if (this._ob) {
|
|
594
|
+
this._ob.disconnect();
|
|
595
|
+
this._ob = null;
|
|
596
|
+
}
|
|
597
|
+
this._app && this._app.unmount();
|
|
598
|
+
if (this._instance) this._instance.ce = void 0;
|
|
599
|
+
this._app = this._instance = null;
|
|
600
|
+
if (this._teleportTargets) {
|
|
601
|
+
this._teleportTargets.clear();
|
|
602
|
+
this._teleportTargets = void 0;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
_processMutations(mutations) {
|
|
608
|
+
for (const m of mutations) this._setAttr(m.attributeName);
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* resolve inner component definition (handle possible async component)
|
|
612
|
+
*/
|
|
613
|
+
_resolveDef() {
|
|
614
|
+
if (this._pendingResolve) return;
|
|
615
|
+
for (let i = 0; i < this.attributes.length; i++) this._setAttr(this.attributes[i].name);
|
|
616
|
+
this._ob = new MutationObserver(this._processMutations.bind(this));
|
|
617
|
+
this._ob.observe(this, { attributes: true });
|
|
618
|
+
const resolve = (def, isAsync = false) => {
|
|
619
|
+
this._resolved = true;
|
|
620
|
+
this._pendingResolve = void 0;
|
|
621
|
+
const { props, styles } = def;
|
|
622
|
+
let numberProps;
|
|
623
|
+
if (props && !shared.isArray(props)) for (const key in props) {
|
|
624
|
+
const opt = props[key];
|
|
625
|
+
if (opt === Number || opt && opt.type === Number) {
|
|
626
|
+
if (key in this._props) this._props[key] = shared.toNumber(this._props[key]);
|
|
627
|
+
(numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
this._numberProps = numberProps;
|
|
631
|
+
this._resolveProps(def);
|
|
632
|
+
if (this.shadowRoot) this._applyStyles(styles);
|
|
633
|
+
this._mount(def);
|
|
634
|
+
};
|
|
635
|
+
const asyncDef = this._def.__asyncLoader;
|
|
636
|
+
if (asyncDef) this._pendingResolve = asyncDef().then((def) => {
|
|
637
|
+
def.configureApp = this._def.configureApp;
|
|
638
|
+
resolve(this._def = def, true);
|
|
639
|
+
});
|
|
640
|
+
else resolve(this._def);
|
|
641
|
+
}
|
|
642
|
+
_mount(def) {
|
|
643
|
+
this._app = this._createApp(def);
|
|
644
|
+
this._inheritParentContext();
|
|
645
|
+
if (def.configureApp) def.configureApp(this._app);
|
|
646
|
+
this._app._ceVNode = this._createVNode();
|
|
647
|
+
this._app.mount(this._root);
|
|
648
|
+
const exposed = this._instance && this._instance.exposed;
|
|
649
|
+
if (!exposed) return;
|
|
650
|
+
for (const key in exposed) if (!shared.hasOwn(this, key)) Object.defineProperty(this, key, { get: () => runtimeCore.unref(exposed[key]) });
|
|
651
|
+
}
|
|
652
|
+
_resolveProps(def) {
|
|
653
|
+
const { props } = def;
|
|
654
|
+
const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {});
|
|
655
|
+
for (const key of Object.keys(this)) if (key[0] !== "_" && declaredPropKeys.includes(key)) this._setProp(key, this[key]);
|
|
656
|
+
for (const key of declaredPropKeys.map(shared.camelize)) Object.defineProperty(this, key, {
|
|
657
|
+
get() {
|
|
658
|
+
return this._getProp(key);
|
|
659
|
+
},
|
|
660
|
+
set(val) {
|
|
661
|
+
this._setProp(key, val, true, true);
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
_setAttr(key) {
|
|
666
|
+
if (key.startsWith("data-v-")) return;
|
|
667
|
+
const has = this.hasAttribute(key);
|
|
668
|
+
let value = has ? this.getAttribute(key) : REMOVAL;
|
|
669
|
+
const camelKey = shared.camelize(key);
|
|
670
|
+
if (has && this._numberProps && this._numberProps[camelKey]) value = shared.toNumber(value);
|
|
671
|
+
this._setProp(camelKey, value, false, true);
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* @internal
|
|
675
|
+
*/
|
|
676
|
+
_getProp(key) {
|
|
677
|
+
return this._props[key];
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* @internal
|
|
681
|
+
*/
|
|
682
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
683
|
+
if (val !== this._props[key]) {
|
|
684
|
+
if (val === REMOVAL) delete this._props[key];
|
|
685
|
+
else {
|
|
686
|
+
this._props[key] = val;
|
|
687
|
+
if (key === "key" && this._app) this._app._ceVNode.key = val;
|
|
688
|
+
}
|
|
689
|
+
if (shouldUpdate && this._instance) this._update();
|
|
690
|
+
if (shouldReflect) {
|
|
691
|
+
const ob = this._ob;
|
|
692
|
+
if (ob) {
|
|
693
|
+
this._processMutations(ob.takeRecords());
|
|
694
|
+
ob.disconnect();
|
|
695
|
+
}
|
|
696
|
+
if (val === true) this.setAttribute(shared.hyphenate(key), "");
|
|
697
|
+
else if (typeof val === "string" || typeof val === "number") this.setAttribute(shared.hyphenate(key), val + "");
|
|
698
|
+
else if (!val) this.removeAttribute(shared.hyphenate(key));
|
|
699
|
+
ob && ob.observe(this, { attributes: true });
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
_update() {
|
|
704
|
+
const vnode = this._createVNode();
|
|
705
|
+
if (this._app) vnode.appContext = this._app._context;
|
|
706
|
+
render(vnode, this._root);
|
|
707
|
+
}
|
|
708
|
+
_createVNode() {
|
|
709
|
+
const baseProps = {};
|
|
710
|
+
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
711
|
+
const vnode = runtimeCore.createVNode(this._def, shared.extend(baseProps, this._props));
|
|
712
|
+
if (!this._instance) vnode.ce = (instance) => {
|
|
713
|
+
this._instance = instance;
|
|
714
|
+
instance.ce = this;
|
|
715
|
+
instance.isCE = true;
|
|
716
|
+
const dispatch = (event, args) => {
|
|
717
|
+
this.dispatchEvent(new CustomEvent(event, shared.isPlainObject(args[0]) ? shared.extend({ detail: args }, args[0]) : { detail: args }));
|
|
718
|
+
};
|
|
719
|
+
instance.emit = (event, ...args) => {
|
|
720
|
+
dispatch(event, args);
|
|
721
|
+
if (shared.hyphenate(event) !== event) dispatch(shared.hyphenate(event), args);
|
|
722
|
+
};
|
|
723
|
+
this._setParent();
|
|
724
|
+
};
|
|
725
|
+
return vnode;
|
|
726
|
+
}
|
|
727
|
+
_applyStyles(styles, owner) {
|
|
728
|
+
if (!styles) return;
|
|
729
|
+
if (owner) {
|
|
730
|
+
if (owner === this._def || this._styleChildren.has(owner)) return;
|
|
731
|
+
this._styleChildren.add(owner);
|
|
732
|
+
}
|
|
733
|
+
const nonce = this._nonce;
|
|
734
|
+
for (let i = styles.length - 1; i >= 0; i--) {
|
|
735
|
+
const s = document.createElement("style");
|
|
736
|
+
if (nonce) s.setAttribute("nonce", nonce);
|
|
737
|
+
s.textContent = styles[i];
|
|
738
|
+
this.shadowRoot.prepend(s);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Only called when shadowRoot is false
|
|
743
|
+
*/
|
|
744
|
+
_parseSlots() {
|
|
745
|
+
const slots = this._slots = {};
|
|
746
|
+
let n;
|
|
747
|
+
while (n = this.firstChild) {
|
|
748
|
+
const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
|
|
749
|
+
(slots[slotName] || (slots[slotName] = [])).push(n);
|
|
750
|
+
this.removeChild(n);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* Only called when shadowRoot is false
|
|
755
|
+
*/
|
|
756
|
+
_renderSlots() {
|
|
757
|
+
const outlets = this._getSlots();
|
|
758
|
+
const scopeId = this._instance.type.__scopeId;
|
|
759
|
+
for (let i = 0; i < outlets.length; i++) {
|
|
760
|
+
const o = outlets[i];
|
|
761
|
+
const slotName = o.getAttribute("name") || "default";
|
|
762
|
+
const content = this._slots[slotName];
|
|
763
|
+
const parent = o.parentNode;
|
|
764
|
+
if (content) for (const n of content) {
|
|
765
|
+
if (scopeId && n.nodeType === 1) {
|
|
766
|
+
const id = scopeId + "-s";
|
|
767
|
+
const walker = document.createTreeWalker(n, 1);
|
|
768
|
+
n.setAttribute(id, "");
|
|
769
|
+
let child;
|
|
770
|
+
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
771
|
+
}
|
|
772
|
+
parent.insertBefore(n, o);
|
|
773
|
+
}
|
|
774
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
775
|
+
parent.removeChild(o);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* @internal
|
|
780
|
+
*/
|
|
781
|
+
_getSlots() {
|
|
782
|
+
const roots = [this];
|
|
783
|
+
if (this._teleportTargets) roots.push(...this._teleportTargets);
|
|
784
|
+
return roots.reduce((res, i) => {
|
|
785
|
+
res.push(...Array.from(i.querySelectorAll("slot")));
|
|
786
|
+
return res;
|
|
787
|
+
}, []);
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* @internal
|
|
791
|
+
*/
|
|
792
|
+
_injectChildStyle(comp) {
|
|
793
|
+
this._applyStyles(comp.styles, comp);
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* @internal
|
|
797
|
+
*/
|
|
798
|
+
_removeChildStyle(comp) {}
|
|
799
|
+
};
|
|
800
|
+
function useHost(caller) {
|
|
801
|
+
const instance = runtimeCore.getCurrentInstance();
|
|
802
|
+
const el = instance && instance.ce;
|
|
803
|
+
if (el) return el;
|
|
804
|
+
return null;
|
|
805
|
+
}
|
|
806
|
+
function useShadowRoot() {
|
|
807
|
+
const el = useHost();
|
|
808
|
+
return el && el.shadowRoot;
|
|
809
|
+
}
|
|
810
|
+
function useCssModule(name = "$style") {
|
|
811
|
+
{
|
|
812
|
+
const instance = runtimeCore.getCurrentInstance();
|
|
813
|
+
if (!instance) return shared.EMPTY_OBJ;
|
|
814
|
+
const modules = instance.type.__cssModules;
|
|
815
|
+
if (!modules) return shared.EMPTY_OBJ;
|
|
816
|
+
const mod = modules[name];
|
|
817
|
+
if (!mod) return shared.EMPTY_OBJ;
|
|
818
|
+
return mod;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
const positionMap = /* @__PURE__ */ new WeakMap();
|
|
822
|
+
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
823
|
+
const moveCbKey = Symbol("_moveCb");
|
|
824
|
+
const enterCbKey = Symbol("_enterCb");
|
|
825
|
+
const decorate = (t) => {
|
|
826
|
+
delete t.props.mode;
|
|
827
|
+
return t;
|
|
828
|
+
};
|
|
829
|
+
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
830
|
+
name: "TransitionGroup",
|
|
831
|
+
props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, {
|
|
832
|
+
tag: String,
|
|
833
|
+
moveClass: String
|
|
834
|
+
}),
|
|
835
|
+
setup(props, { slots }) {
|
|
836
|
+
const instance = runtimeCore.getCurrentInstance();
|
|
837
|
+
const state = runtimeCore.useTransitionState();
|
|
838
|
+
let prevChildren;
|
|
839
|
+
let children;
|
|
840
|
+
runtimeCore.onUpdated(() => {
|
|
841
|
+
if (!prevChildren.length) return;
|
|
842
|
+
const moveClass = props.moveClass || `${props.name || "v"}-move`;
|
|
843
|
+
if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
|
|
844
|
+
prevChildren = [];
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
prevChildren.forEach(callPendingCbs);
|
|
848
|
+
prevChildren.forEach(recordPosition);
|
|
849
|
+
const movedChildren = prevChildren.filter(applyTranslation);
|
|
850
|
+
forceReflow(instance.vnode.el);
|
|
851
|
+
movedChildren.forEach((c) => {
|
|
852
|
+
const el = c.el;
|
|
853
|
+
const style = el.style;
|
|
854
|
+
addTransitionClass(el, moveClass);
|
|
855
|
+
style.transform = style.webkitTransform = style.transitionDuration = "";
|
|
856
|
+
const cb = el[moveCbKey] = (e) => {
|
|
857
|
+
if (e && e.target !== el) return;
|
|
858
|
+
if (!e || e.propertyName.endsWith("transform")) {
|
|
859
|
+
el.removeEventListener("transitionend", cb);
|
|
860
|
+
el[moveCbKey] = null;
|
|
861
|
+
removeTransitionClass(el, moveClass);
|
|
862
|
+
}
|
|
863
|
+
};
|
|
864
|
+
el.addEventListener("transitionend", cb);
|
|
865
|
+
});
|
|
866
|
+
prevChildren = [];
|
|
867
|
+
});
|
|
868
|
+
return () => {
|
|
869
|
+
const rawProps = runtimeCore.toRaw(props);
|
|
870
|
+
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
871
|
+
let tag = rawProps.tag || runtimeCore.Fragment;
|
|
872
|
+
prevChildren = [];
|
|
873
|
+
if (children) for (let i = 0; i < children.length; i++) {
|
|
874
|
+
const child = children[i];
|
|
875
|
+
if (child.el && child.el instanceof Element) {
|
|
876
|
+
prevChildren.push(child);
|
|
877
|
+
runtimeCore.setTransitionHooks(child, runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
878
|
+
positionMap.set(child, child.el.getBoundingClientRect());
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : [];
|
|
882
|
+
for (let i = 0; i < children.length; i++) {
|
|
883
|
+
const child = children[i];
|
|
884
|
+
if (child.key != null) runtimeCore.setTransitionHooks(child, runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
885
|
+
}
|
|
886
|
+
return runtimeCore.createVNode(tag, null, children);
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
function callPendingCbs(c) {
|
|
891
|
+
const el = c.el;
|
|
892
|
+
if (el[moveCbKey]) el[moveCbKey]();
|
|
893
|
+
if (el[enterCbKey]) el[enterCbKey]();
|
|
894
|
+
}
|
|
895
|
+
function recordPosition(c) {
|
|
896
|
+
newPositionMap.set(c, c.el.getBoundingClientRect());
|
|
897
|
+
}
|
|
898
|
+
function applyTranslation(c) {
|
|
899
|
+
const oldPos = positionMap.get(c);
|
|
900
|
+
const newPos = newPositionMap.get(c);
|
|
901
|
+
const dx = oldPos.left - newPos.left;
|
|
902
|
+
const dy = oldPos.top - newPos.top;
|
|
903
|
+
if (dx || dy) {
|
|
904
|
+
const s = c.el.style;
|
|
905
|
+
s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
|
|
906
|
+
s.transitionDuration = "0s";
|
|
907
|
+
return c;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
function hasCSSTransform(el, root, moveClass) {
|
|
911
|
+
const clone = el.cloneNode();
|
|
912
|
+
const _vtc = el[vtcKey];
|
|
913
|
+
if (_vtc) _vtc.forEach((cls) => {
|
|
914
|
+
cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
|
|
915
|
+
});
|
|
916
|
+
moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
|
|
917
|
+
clone.style.display = "none";
|
|
918
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
919
|
+
container.appendChild(clone);
|
|
920
|
+
const { hasTransform } = getTransitionInfo(clone);
|
|
921
|
+
container.removeChild(clone);
|
|
922
|
+
return hasTransform;
|
|
923
|
+
}
|
|
924
|
+
const getModelAssigner = (vnode) => {
|
|
925
|
+
const fn = vnode.props["onUpdate:modelValue"] || false;
|
|
926
|
+
return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn;
|
|
927
|
+
};
|
|
928
|
+
function onCompositionStart(e) {
|
|
929
|
+
e.target.composing = true;
|
|
930
|
+
}
|
|
931
|
+
function onCompositionEnd(e) {
|
|
932
|
+
const target = e.target;
|
|
933
|
+
if (target.composing) {
|
|
934
|
+
target.composing = false;
|
|
935
|
+
target.dispatchEvent(new Event("input"));
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
const assignKey = Symbol("_assign");
|
|
939
|
+
const vModelText = {
|
|
940
|
+
created(el, { modifiers: { lazy, trim, number } }, vnode) {
|
|
941
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
942
|
+
const castToNumber = number || vnode.props && vnode.props.type === "number";
|
|
943
|
+
addEventListener(el, lazy ? "change" : "input", (e) => {
|
|
944
|
+
if (e.target.composing) return;
|
|
945
|
+
let domValue = el.value;
|
|
946
|
+
if (trim) domValue = domValue.trim();
|
|
947
|
+
if (castToNumber) domValue = shared.looseToNumber(domValue);
|
|
948
|
+
el[assignKey](domValue);
|
|
949
|
+
});
|
|
950
|
+
if (trim) addEventListener(el, "change", () => {
|
|
951
|
+
el.value = el.value.trim();
|
|
952
|
+
});
|
|
953
|
+
if (!lazy) {
|
|
954
|
+
addEventListener(el, "compositionstart", onCompositionStart);
|
|
955
|
+
addEventListener(el, "compositionend", onCompositionEnd);
|
|
956
|
+
addEventListener(el, "change", onCompositionEnd);
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
mounted(el, { value }) {
|
|
960
|
+
el.value = value == null ? "" : value;
|
|
961
|
+
},
|
|
962
|
+
beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
|
|
963
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
964
|
+
if (el.composing) return;
|
|
965
|
+
const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? shared.looseToNumber(el.value) : el.value;
|
|
966
|
+
const newValue = value == null ? "" : value;
|
|
967
|
+
if (elValue === newValue) return;
|
|
968
|
+
if (document.activeElement === el && el.type !== "range") {
|
|
969
|
+
if (lazy && value === oldValue) return;
|
|
970
|
+
if (trim && el.value.trim() === newValue) return;
|
|
971
|
+
}
|
|
972
|
+
el.value = newValue;
|
|
973
|
+
}
|
|
974
|
+
};
|
|
975
|
+
const vModelCheckbox = {
|
|
976
|
+
deep: true,
|
|
977
|
+
created(el, _, vnode) {
|
|
978
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
979
|
+
addEventListener(el, "change", () => {
|
|
980
|
+
const modelValue = el._modelValue;
|
|
981
|
+
const elementValue = getValue(el);
|
|
982
|
+
const checked = el.checked;
|
|
983
|
+
const assign = el[assignKey];
|
|
984
|
+
if (shared.isArray(modelValue)) {
|
|
985
|
+
const index = shared.looseIndexOf(modelValue, elementValue);
|
|
986
|
+
const found = index !== -1;
|
|
987
|
+
if (checked && !found) assign(modelValue.concat(elementValue));
|
|
988
|
+
else if (!checked && found) {
|
|
989
|
+
const filtered = [...modelValue];
|
|
990
|
+
filtered.splice(index, 1);
|
|
991
|
+
assign(filtered);
|
|
992
|
+
}
|
|
993
|
+
} else if (shared.isSet(modelValue)) {
|
|
994
|
+
const cloned = new Set(modelValue);
|
|
995
|
+
if (checked) cloned.add(elementValue);
|
|
996
|
+
else cloned.delete(elementValue);
|
|
997
|
+
assign(cloned);
|
|
998
|
+
} else assign(getCheckboxValue(el, checked));
|
|
999
|
+
});
|
|
1000
|
+
},
|
|
1001
|
+
mounted: setChecked,
|
|
1002
|
+
beforeUpdate(el, binding, vnode) {
|
|
1003
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
1004
|
+
setChecked(el, binding, vnode);
|
|
1005
|
+
}
|
|
1006
|
+
};
|
|
1007
|
+
function setChecked(el, { value, oldValue }, vnode) {
|
|
1008
|
+
el._modelValue = value;
|
|
1009
|
+
let checked;
|
|
1010
|
+
if (shared.isArray(value)) checked = shared.looseIndexOf(value, vnode.props.value) > -1;
|
|
1011
|
+
else if (shared.isSet(value)) checked = value.has(vnode.props.value);
|
|
1012
|
+
else {
|
|
1013
|
+
if (value === oldValue) return;
|
|
1014
|
+
checked = shared.looseEqual(value, getCheckboxValue(el, true));
|
|
1015
|
+
}
|
|
1016
|
+
if (el.checked !== checked) el.checked = checked;
|
|
1017
|
+
}
|
|
1018
|
+
const vModelRadio = {
|
|
1019
|
+
created(el, { value }, vnode) {
|
|
1020
|
+
el.checked = shared.looseEqual(value, vnode.props.value);
|
|
1021
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
1022
|
+
addEventListener(el, "change", () => {
|
|
1023
|
+
el[assignKey](getValue(el));
|
|
1024
|
+
});
|
|
1025
|
+
},
|
|
1026
|
+
beforeUpdate(el, { value, oldValue }, vnode) {
|
|
1027
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
1028
|
+
if (value !== oldValue) el.checked = shared.looseEqual(value, vnode.props.value);
|
|
1029
|
+
}
|
|
1030
|
+
};
|
|
1031
|
+
const vModelSelect = {
|
|
1032
|
+
deep: true,
|
|
1033
|
+
created(el, { value, modifiers: { number } }, vnode) {
|
|
1034
|
+
const isSetModel = shared.isSet(value);
|
|
1035
|
+
addEventListener(el, "change", () => {
|
|
1036
|
+
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? shared.looseToNumber(getValue(o)) : getValue(o));
|
|
1037
|
+
el[assignKey](el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]);
|
|
1038
|
+
el._assigning = true;
|
|
1039
|
+
runtimeCore.nextTick(() => {
|
|
1040
|
+
el._assigning = false;
|
|
1041
|
+
});
|
|
1042
|
+
});
|
|
1043
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
1044
|
+
},
|
|
1045
|
+
mounted(el, { value }) {
|
|
1046
|
+
setSelected(el, value);
|
|
1047
|
+
},
|
|
1048
|
+
beforeUpdate(el, _binding, vnode) {
|
|
1049
|
+
el[assignKey] = getModelAssigner(vnode);
|
|
1050
|
+
},
|
|
1051
|
+
updated(el, { value }) {
|
|
1052
|
+
if (!el._assigning) setSelected(el, value);
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
function setSelected(el, value) {
|
|
1056
|
+
const isMultiple = el.multiple;
|
|
1057
|
+
const isArrayValue = shared.isArray(value);
|
|
1058
|
+
if (isMultiple && !isArrayValue && !shared.isSet(value)) return;
|
|
1059
|
+
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
1060
|
+
const option = el.options[i];
|
|
1061
|
+
const optionValue = getValue(option);
|
|
1062
|
+
if (isMultiple) if (isArrayValue) {
|
|
1063
|
+
const optionType = typeof optionValue;
|
|
1064
|
+
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
1065
|
+
else option.selected = shared.looseIndexOf(value, optionValue) > -1;
|
|
1066
|
+
} else option.selected = value.has(optionValue);
|
|
1067
|
+
else if (shared.looseEqual(getValue(option), value)) {
|
|
1068
|
+
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
|
|
1073
|
+
}
|
|
1074
|
+
function getValue(el) {
|
|
1075
|
+
return "_value" in el ? el._value : el.value;
|
|
1076
|
+
}
|
|
1077
|
+
function getCheckboxValue(el, checked) {
|
|
1078
|
+
const key = checked ? "_trueValue" : "_falseValue";
|
|
1079
|
+
return key in el ? el[key] : checked;
|
|
1080
|
+
}
|
|
1081
|
+
const vModelDynamic = {
|
|
1082
|
+
created(el, binding, vnode) {
|
|
1083
|
+
callModelHook(el, binding, vnode, null, "created");
|
|
1084
|
+
},
|
|
1085
|
+
mounted(el, binding, vnode) {
|
|
1086
|
+
callModelHook(el, binding, vnode, null, "mounted");
|
|
1087
|
+
},
|
|
1088
|
+
beforeUpdate(el, binding, vnode, prevVNode) {
|
|
1089
|
+
callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
|
|
1090
|
+
},
|
|
1091
|
+
updated(el, binding, vnode, prevVNode) {
|
|
1092
|
+
callModelHook(el, binding, vnode, prevVNode, "updated");
|
|
1093
|
+
}
|
|
1094
|
+
};
|
|
1095
|
+
function resolveDynamicModel(tagName, type) {
|
|
1096
|
+
switch (tagName) {
|
|
1097
|
+
case "SELECT": return vModelSelect;
|
|
1098
|
+
case "TEXTAREA": return vModelText;
|
|
1099
|
+
default: switch (type) {
|
|
1100
|
+
case "checkbox": return vModelCheckbox;
|
|
1101
|
+
case "radio": return vModelRadio;
|
|
1102
|
+
default: return vModelText;
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
function callModelHook(el, binding, vnode, prevVNode, hook) {
|
|
1107
|
+
const fn = resolveDynamicModel(el.tagName, vnode.props && vnode.props.type)[hook];
|
|
1108
|
+
fn && fn(el, binding, vnode, prevVNode);
|
|
1109
|
+
}
|
|
1110
|
+
function initVModelForSSR() {
|
|
1111
|
+
vModelText.getSSRProps = ({ value }) => ({ value });
|
|
1112
|
+
vModelRadio.getSSRProps = ({ value }, vnode) => {
|
|
1113
|
+
if (vnode.props && shared.looseEqual(vnode.props.value, value)) return { checked: true };
|
|
1114
|
+
};
|
|
1115
|
+
vModelCheckbox.getSSRProps = ({ value }, vnode) => {
|
|
1116
|
+
if (shared.isArray(value)) {
|
|
1117
|
+
if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) return { checked: true };
|
|
1118
|
+
} else if (shared.isSet(value)) {
|
|
1119
|
+
if (vnode.props && value.has(vnode.props.value)) return { checked: true };
|
|
1120
|
+
} else if (value) return { checked: true };
|
|
1121
|
+
};
|
|
1122
|
+
vModelDynamic.getSSRProps = (binding, vnode) => {
|
|
1123
|
+
if (typeof vnode.type !== "string") return;
|
|
1124
|
+
const modelToUse = resolveDynamicModel(vnode.type.toUpperCase(), vnode.props && vnode.props.type);
|
|
1125
|
+
if (modelToUse.getSSRProps) return modelToUse.getSSRProps(binding, vnode);
|
|
1126
|
+
};
|
|
1127
|
+
}
|
|
1128
|
+
const systemModifiers = [
|
|
1129
|
+
"ctrl",
|
|
1130
|
+
"shift",
|
|
1131
|
+
"alt",
|
|
1132
|
+
"meta"
|
|
1133
|
+
];
|
|
1134
|
+
const modifierGuards = {
|
|
1135
|
+
stop: (e) => e.stopPropagation(),
|
|
1136
|
+
prevent: (e) => e.preventDefault(),
|
|
1137
|
+
self: (e) => e.target !== e.currentTarget,
|
|
1138
|
+
ctrl: (e) => !e.ctrlKey,
|
|
1139
|
+
shift: (e) => !e.shiftKey,
|
|
1140
|
+
alt: (e) => !e.altKey,
|
|
1141
|
+
meta: (e) => !e.metaKey,
|
|
1142
|
+
left: (e) => "button" in e && e.button !== 0,
|
|
1143
|
+
middle: (e) => "button" in e && e.button !== 1,
|
|
1144
|
+
right: (e) => "button" in e && e.button !== 2,
|
|
1145
|
+
exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
|
|
1146
|
+
};
|
|
1147
|
+
const withModifiers = (fn, modifiers) => {
|
|
1148
|
+
const cache = fn._withMods || (fn._withMods = {});
|
|
1149
|
+
const cacheKey = modifiers.join(".");
|
|
1150
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
|
|
1151
|
+
for (let i = 0; i < modifiers.length; i++) {
|
|
1152
|
+
const guard = modifierGuards[modifiers[i]];
|
|
1153
|
+
if (guard && guard(event, modifiers)) return;
|
|
1154
|
+
}
|
|
1155
|
+
return fn(event, ...args);
|
|
1156
|
+
}));
|
|
1157
|
+
};
|
|
1158
|
+
const keyNames = {
|
|
1159
|
+
esc: "escape",
|
|
1160
|
+
space: " ",
|
|
1161
|
+
up: "arrow-up",
|
|
1162
|
+
left: "arrow-left",
|
|
1163
|
+
right: "arrow-right",
|
|
1164
|
+
down: "arrow-down",
|
|
1165
|
+
delete: "backspace"
|
|
1166
|
+
};
|
|
1167
|
+
const withKeys = (fn, modifiers) => {
|
|
1168
|
+
const cache = fn._withKeys || (fn._withKeys = {});
|
|
1169
|
+
const cacheKey = modifiers.join(".");
|
|
1170
|
+
return cache[cacheKey] || (cache[cacheKey] = ((event) => {
|
|
1171
|
+
if (!("key" in event)) return;
|
|
1172
|
+
const eventKey = shared.hyphenate(event.key);
|
|
1173
|
+
if (modifiers.some((k) => k === eventKey || keyNames[k] === eventKey)) return fn(event);
|
|
1174
|
+
}));
|
|
1175
|
+
};
|
|
1176
|
+
const rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps);
|
|
1177
|
+
let renderer;
|
|
1178
|
+
let enabledHydration = false;
|
|
1179
|
+
function ensureRenderer() {
|
|
1180
|
+
return renderer || (renderer = runtimeCore.createRenderer(rendererOptions));
|
|
1181
|
+
}
|
|
1182
|
+
function ensureHydrationRenderer() {
|
|
1183
|
+
renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions);
|
|
1184
|
+
enabledHydration = true;
|
|
1185
|
+
return renderer;
|
|
1186
|
+
}
|
|
1187
|
+
const render = ((...args) => {
|
|
1188
|
+
ensureRenderer().render(...args);
|
|
1189
|
+
});
|
|
1190
|
+
const hydrate = ((...args) => {
|
|
1191
|
+
ensureHydrationRenderer().hydrate(...args);
|
|
1192
|
+
});
|
|
1193
|
+
const createApp = ((...args) => {
|
|
1194
|
+
const app = ensureRenderer().createApp(...args);
|
|
1195
|
+
const { mount } = app;
|
|
1196
|
+
app.mount = (containerOrSelector) => {
|
|
1197
|
+
const container = normalizeContainer(containerOrSelector);
|
|
1198
|
+
if (!container) return;
|
|
1199
|
+
const component = app._component;
|
|
1200
|
+
if (!shared.isFunction(component) && !component.render && !component.template) component.template = container.innerHTML;
|
|
1201
|
+
if (container.nodeType === 1) container.textContent = "";
|
|
1202
|
+
const proxy = mount(container, false, resolveRootNamespace(container));
|
|
1203
|
+
if (container instanceof Element) {
|
|
1204
|
+
container.removeAttribute("v-cloak");
|
|
1205
|
+
container.setAttribute("data-v-app", "");
|
|
1206
|
+
}
|
|
1207
|
+
return proxy;
|
|
1208
|
+
};
|
|
1209
|
+
return app;
|
|
1210
|
+
});
|
|
1211
|
+
const createSSRApp = ((...args) => {
|
|
1212
|
+
const app = ensureHydrationRenderer().createApp(...args);
|
|
1213
|
+
const { mount } = app;
|
|
1214
|
+
app.mount = (containerOrSelector) => {
|
|
1215
|
+
const container = normalizeContainer(containerOrSelector);
|
|
1216
|
+
if (container) return mount(container, true, resolveRootNamespace(container));
|
|
1217
|
+
};
|
|
1218
|
+
return app;
|
|
1219
|
+
});
|
|
1220
|
+
function resolveRootNamespace(container) {
|
|
1221
|
+
if (container instanceof SVGElement) return "svg";
|
|
1222
|
+
if (typeof MathMLElement === "function" && container instanceof MathMLElement) return "mathml";
|
|
1223
|
+
}
|
|
1224
|
+
function normalizeContainer(container) {
|
|
1225
|
+
if (shared.isString(container)) return document.querySelector(container);
|
|
1226
|
+
return container;
|
|
1227
|
+
}
|
|
1228
|
+
let ssrDirectiveInitialized = false;
|
|
1229
|
+
const initDirectivesForSSR = () => {
|
|
1230
|
+
if (!ssrDirectiveInitialized) {
|
|
1231
|
+
ssrDirectiveInitialized = true;
|
|
1232
|
+
initVModelForSSR();
|
|
1233
|
+
initVShowForSSR();
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
exports.Transition = Transition;
|
|
1237
|
+
exports.TransitionGroup = TransitionGroup;
|
|
1238
|
+
exports.VueElement = VueElement;
|
|
1239
|
+
exports.createApp = createApp;
|
|
1240
|
+
exports.createSSRApp = createSSRApp;
|
|
1241
|
+
exports.defineCustomElement = defineCustomElement;
|
|
1242
|
+
exports.defineSSRCustomElement = defineSSRCustomElement;
|
|
1243
|
+
exports.hydrate = hydrate;
|
|
1244
|
+
exports.initDirectivesForSSR = initDirectivesForSSR;
|
|
1245
|
+
exports.render = render;
|
|
1246
|
+
exports.useCssModule = useCssModule;
|
|
1247
|
+
exports.useCssVars = useCssVars;
|
|
1248
|
+
exports.useHost = useHost;
|
|
1249
|
+
exports.useShadowRoot = useShadowRoot;
|
|
1250
|
+
exports.vModelCheckbox = vModelCheckbox;
|
|
1251
|
+
exports.vModelDynamic = vModelDynamic;
|
|
1252
|
+
exports.vModelRadio = vModelRadio;
|
|
1253
|
+
exports.vModelSelect = vModelSelect;
|
|
1254
|
+
exports.vModelText = vModelText;
|
|
1255
|
+
exports.vShow = vShow;
|
|
1256
|
+
exports.withKeys = withKeys;
|
|
1257
|
+
exports.withModifiers = withModifiers;
|
|
1258
|
+
Object.keys(runtimeCore).forEach(function(k) {
|
|
1259
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k];
|
|
1260
|
+
});
|
|
1261
|
+
}) });
|
|
1262
|
+
|
|
1263
|
+
//#endregion
|
|
1264
|
+
Object.defineProperty(exports, 'default', {
|
|
1265
|
+
enumerable: true,
|
|
1266
|
+
get: function () {
|
|
1267
|
+
return require_runtime_dom_cjs_prod();
|
|
1268
|
+
}
|
|
1269
|
+
});
|
|
1270
|
+
//# sourceMappingURL=runtime-dom.cjs.prod.cjs.map
|