@cdlab996/lowcode-vue2 0.0.0-stage → 2.0.0
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/LICENSE +21 -0
- package/README.md +68 -2
- package/dist/designer.d.mts +2 -0
- package/dist/designer.mjs +1 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.mjs +57 -0
- package/dist/renderer.umd.js +21 -0
- package/dist/runtime-CMXJQT1X.d.mts +3 -0
- package/dist/runtime-D8ykZofb.mjs +208 -0
- package/dist/runtime.d.mts +3 -0
- package/dist/runtime.mjs +2 -0
- package/dist/simulator.css +108 -0
- package/dist/simulator.umd.js +27 -0
- package/package.json +66 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023, cdLab996
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,69 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @cdlab996/lowcode-vue2
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
LowCode Engine renderer and designer simulator for **Vue 2.7**: the Vue 2.7
|
|
4
|
+
adapter on top of [`@cdlab996/lowcode-vue-core`](../core), re-exporting the
|
|
5
|
+
core API with the adapter installed. Same API as `@cdlab996/lowcode-vue3`;
|
|
6
|
+
only the peer Vue and vue-router versions differ.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pnpm add @cdlab996/lowcode-vue2 vue vue-router@3
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Entries
|
|
13
|
+
|
|
14
|
+
| Entry | Content |
|
|
15
|
+
| ----------------------- | ---------------------------------------------------------------------- |
|
|
16
|
+
| `.` | full API, including the designer simulator (needs vue-router) |
|
|
17
|
+
| `./runtime` | renderer only, no vue-router |
|
|
18
|
+
| `./designer` | `setupDesignerEnvironment` for the designer page (no Vue import) |
|
|
19
|
+
| `dist/renderer.umd.js` | browser bundle of `./runtime` as `window.LCVueRenderer`, no vue-router |
|
|
20
|
+
| `dist/simulator.umd.js` | designer canvas bundle, vue-router 3.6 included |
|
|
21
|
+
| `dist/simulator.css` | canvas styles |
|
|
22
|
+
|
|
23
|
+
Both UMD bundles inline the core and read Vue from `window.Vue`.
|
|
24
|
+
|
|
25
|
+
## Render a schema
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import {
|
|
29
|
+
buildComponents,
|
|
30
|
+
getAdapter,
|
|
31
|
+
Renderer,
|
|
32
|
+
} from '@cdlab996/lowcode-vue2/runtime'
|
|
33
|
+
|
|
34
|
+
// libraryMap: package name -> UMD global (`packages[].library` of the assets)
|
|
35
|
+
// componentsMap: component name -> its entry in the schema's `componentsMap`
|
|
36
|
+
const components = buildComponents(libraryMap, componentsMap)
|
|
37
|
+
|
|
38
|
+
getAdapter().mount(
|
|
39
|
+
Renderer,
|
|
40
|
+
{ schema, components }, // schema: a Page / Block / Component root
|
|
41
|
+
document.getElementById('app')!,
|
|
42
|
+
)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`buildComponents` reads the libraries from `window`, so load the material
|
|
46
|
+
scripts first (`AssetLoader` does it from the asset `urls`).
|
|
47
|
+
[`apps/designer/src/preview.ts`](../../../apps/designer/src/preview.ts) is a
|
|
48
|
+
complete preview page.
|
|
49
|
+
|
|
50
|
+
Renderer props: `schema`, `components`, `scope`, `designMode`, `device`,
|
|
51
|
+
`locale`, `messages`, `props` (values for `initProps`),
|
|
52
|
+
`requestHandlersMap`, `getNode`, `onCompGetCtx`, `onRuntimeScope`.
|
|
53
|
+
|
|
54
|
+
## Designer
|
|
55
|
+
|
|
56
|
+
- Designer page: `setupDesignerEnvironment(project, { vue: '<Vue 2.7 runtime URL>' })`
|
|
57
|
+
from `@cdlab996/lowcode-vue2/designer`, then give the engine
|
|
58
|
+
`dist/simulator.umd.js` and `dist/simulator.css` as `simulatorUrl`.
|
|
59
|
+
- Preview page: load Vue and `dist/renderer.umd.js`; the API is
|
|
60
|
+
`window.LCVueRenderer`.
|
|
61
|
+
|
|
62
|
+
## Peer dependencies
|
|
63
|
+
|
|
64
|
+
`vue` ^2.7.16 and `vue-router` ^3.6.5 (the simulator's in-memory router; the
|
|
65
|
+
`./runtime` entry does not import it).
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
[MIT](https://github.com/wuchendi/lowcode-engine-vue/blob/main/LICENSE)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { setupDesignerEnvironment } from "@cdlab996/lowcode-vue-core/designer";
|
package/dist/index.d.mts
ADDED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { n as vue2Adapter, t as runtime_exports } from "./runtime-D8ykZofb.mjs";
|
|
2
|
+
import Vue from "vue";
|
|
3
|
+
import VueRouter, { RouterView } from "vue-router";
|
|
4
|
+
export * from "@cdlab996/lowcode-vue-core";
|
|
5
|
+
// src/router.ts
|
|
6
|
+
function createMemoryRouter() {
|
|
7
|
+
Vue.use(VueRouter);
|
|
8
|
+
const routes = /* @__PURE__ */ new Map();
|
|
9
|
+
const router = new VueRouter({ mode: "abstract" });
|
|
10
|
+
const toConfig = (route) => ({
|
|
11
|
+
name: route.name,
|
|
12
|
+
path: route.path,
|
|
13
|
+
component: route.component,
|
|
14
|
+
props: route.props
|
|
15
|
+
});
|
|
16
|
+
const rebuild = () => {
|
|
17
|
+
router.matcher = new VueRouter({ mode: "abstract" }).matcher;
|
|
18
|
+
for (const route of routes.values()) router.addRoute(toConfig(route));
|
|
19
|
+
};
|
|
20
|
+
return {
|
|
21
|
+
raw: router,
|
|
22
|
+
get currentRouteName() {
|
|
23
|
+
return router.currentRoute.name;
|
|
24
|
+
},
|
|
25
|
+
addRoute(route) {
|
|
26
|
+
const replaced = routes.has(route.name);
|
|
27
|
+
routes.set(route.name, route);
|
|
28
|
+
if (replaced) rebuild();
|
|
29
|
+
else router.addRoute(toConfig(route));
|
|
30
|
+
},
|
|
31
|
+
removeRoute(name) {
|
|
32
|
+
if (routes.delete(name)) rebuild();
|
|
33
|
+
},
|
|
34
|
+
getRouteNames: () => [...routes.keys()],
|
|
35
|
+
replace(name) {
|
|
36
|
+
router.replace({ name }).catch(() => {});
|
|
37
|
+
},
|
|
38
|
+
guard({ query, onBlocked }) {
|
|
39
|
+
return router.beforeEach((to, _from, next) => {
|
|
40
|
+
if (!to.matched.length) {
|
|
41
|
+
next(false);
|
|
42
|
+
onBlocked();
|
|
43
|
+
} else {
|
|
44
|
+
Object.assign(to.query, query());
|
|
45
|
+
next();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const vue2RouterAdapter = {
|
|
52
|
+
RouterView,
|
|
53
|
+
createMemoryRouter
|
|
54
|
+
};
|
|
55
|
+
// src/index.ts
|
|
56
|
+
(0, runtime_exports.setRouterAdapter)(vue2RouterAdapter);
|
|
57
|
+
export { vue2Adapter, vue2RouterAdapter };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.LCVueRenderer={},e.Vue))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e};t=((e,t,i)=>(i=e==null?{}:n(o(e)),l(r(i,`default`,{value:e,enumerable:!0}),e)))(t,1);let u=Symbol(`scopedSlot`);function d(e){return e[u]=!0,e}let f=e=>!!e[u];function p(e){if(!e)return[];let{default:t,...n}=e;return[t,...Object.values(n)].flatMap(e=>e&&e()||[])}let m=null,h=null;function g(e){m=e}function _(e){h=e}function v(){if(!h)throw Error(`[lowcode-vue] no router adapter installed: the simulator needs the full @cdlab996/lowcode-vue2 / @cdlab996/lowcode-vue3 entry`);return h}function y(){if(!m)throw Error(`[lowcode-vue] no Vue adapter installed: import @cdlab996/lowcode-vue2 or @cdlab996/lowcode-vue3`);return m}function b(){let e=window,t=e.__rendererContext;return t||(t=Symbol(`__rendererContext`),e.__rendererContext=t),t}function x(){let e=b();return(0,t.inject)(e,()=>{var e,n;let r=(e=(n=(0,t.getCurrentInstance)())==null?void 0:n.proxy)==null?{}:e;return{components:S(r,`components`,{}),designMode:S(r,`designMode`,`live`),getNode:S(r,`getNode`,()=>null),triggerCompGetCtx:S(r,`triggerCompGetCtx`,()=>void 0)}},!0)}function S(e,t,n){return e[t]||e[`__${t}`]||n}let C={__scope:{type:Object,default:void 0},__schema:{type:Object,required:!0},__designMode:{type:String,default:`live`},__components:{type:Object,required:!0},__locale:{type:String,default:void 0},__messages:{type:Object,default:()=>({})},__getNode:{type:Function,required:!0},__triggerCompGetCtx:{type:Function,required:!0},__requestHandlersMap:{type:Object,default:void 0},__onRuntimeScope:{type:Function,default:void 0}};function w(e){return e?Array.isArray(e)?e:[e]:[]}var T;(function(e){e.Initial=`init`,e.Loading=`loading`,e.Loaded=`loaded`,e.Error=`error`})(T||(T={}));var E=/*#__PURE__*/ function(e){return e[e.Environment=1]=`Environment`,e[e.Library=2]=`Library`,e[e.Theme=3]=`Theme`,e[e.Runtime=4]=`Runtime`,e[e.Components=5]=`Components`,e[e.App=6]=`App`,e}({}),D=[E.Environment,E.Library,E.Theme,E.Runtime,E.Components,E.App],O=/*#__PURE__*/ function(e){return e.JSUrl=`jsUrl`,e.CSSUrl=`cssUrl`,e.CSSText=`cssText`,e.JSText=`jsText`,e.Bundle=`bundle`,e}({}),k=/*#__PURE__*/ function(e){return e.Render=`render`,e.Serilize=`serilize`,e.Save=`save`,e.Clone=`clone`,e.Init=`init`,e.Upgrade=`upgrade`,e}({}),ee=/* @__PURE__ */ c(((e,t)=>{
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/
|
|
7
|
+
var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=/* @__PURE__ */ new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch(e){return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),te=/* @__PURE__ */ c((e=>{
|
|
8
|
+
/** @license React v16.14.0
|
|
9
|
+
* react.production.min.js
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the MIT license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
var t=ee();typeof Symbol==`function`&&Symbol.for;function n(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var r={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},i={};function a(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(n(85));this.updater.enqueueSetState(this,e,t,`setState`)},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function o(){}o.prototype=a.prototype;function s(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}var c=s.prototype=new o;c.constructor=s,t(c,a.prototype),c.isPureReactComponent=!0}));(/* @__PURE__ */ c(((e,t)=>{t.exports=te()})))();function A(e){return e==null}function j(e){return typeof e==`string`}function M(e){return typeof e==`function`}function N(e){return!A(e)&&typeof e==`object`}function P(e){return Object.prototype.toString.call(e)===`[object Object]`}function ne(e){return N(e)&&M(e.then)}function re(e){return N(e)&&!!e.__esModule}function ie(e){return/\.css$/.test(e)}function ae(e){return N(e)&&e.nodeType===Node.ELEMENT_NODE}function F(e){return e.replace(/-(\w)/g,(e,t)=>t.toUpperCase())}function oe(e){return e.charAt(0).toLowerCase()+e.slice(1)}function se(){let e={},t=new Promise((t,n)=>{e.resolve=t,e.reject=n});return e.promise=()=>t,e}function ce(e){let t=document.createElement(`script`);t.text=e,document.head.appendChild(t),document.head.removeChild(t)}function le(e){let t=document.createElement(`script`);t.onload=r,t.onerror=r;let n=se();function r(e){t.onload=null,t.onerror=null,typeof e!=`string`&&e.type===`load`?n.resolve():n.reject()}return t.src=e,t.async=!1,document.head.appendChild(t),n.promise()}function I(e){"@babel/helpers - typeof";return I=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},I(e)}function ue(e,t){if(I(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(I(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function de(e){var t=ue(e,`string`);return I(t)==`symbol`?t:t+``}function L(e,t,n){return(t=de(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fe(e){return N(e)&&!!e.type}function pe(e){return N(e)&&e.type===O.Bundle}function me(e,t,n,r){return t?{type:e,content:t,level:n,id:r}:null}function he(e,t,n,r){for(let i of n)R(e,t,i,r)}function R(e,t,n,r){if(!n)return;if(Array.isArray(n))return he(e,t,n,r);if(pe(n)){if(n.assets){Array.isArray(n.assets)?he(e,t,n.assets,n.level||r):R(e,t,n.assets,n.level||r);return}return}fe(n)||(n=me(ie(n)?O.CSSUrl:O.JSUrl,n,r));let i=n.level||r;i&&E[i]!=null||(i=E.App),n.level=i,n.type===O.CSSUrl||n.type===O.CSSText?t[i].push(n):e[i].push(n)}var ge=class{constructor(e,t){L(this,`lastContent`,void 0),L(this,`lastUrl`,void 0),L(this,`placeholder`,void 0),L(this,`id`,void 0),L(this,`level`,void 0),this.level=e,t&&(this.id=t);let n=null;if(t&&(n=document.head.querySelector(`style[data-id="${t}"]`)),!n){n=document.createTextNode(``);let t=document.head.querySelector(`meta[level="${e}"]`);t?document.head.insertBefore(n,t):document.head.appendChild(n)}this.placeholder=n}applyText(e){if(this.lastContent===e)return;this.lastContent=e,this.lastUrl=void 0;let t=document.createElement(`style`);t.setAttribute(`type`,`text/css`),this.id&&t.setAttribute(`data-id`,this.id),t.appendChild(document.createTextNode(e)),document.head.insertBefore(t,this.placeholder.parentNode===document.head?this.placeholder.nextSibling:null),document.head.removeChild(this.placeholder),this.placeholder=t}applyUrl(e){if(this.lastUrl===e)return;this.lastContent=void 0,this.lastUrl=e;let t=document.createElement(`link`);t.onload=r,t.onerror=r;let n=se();function r(e){t.onload=null,t.onerror=null,typeof e!=`string`&&e.type===`load`?n.resolve():n.reject()}return t.href=e,t.rel=`stylesheet`,this.id&&t.setAttribute(`data-id`,this.id),document.head.insertBefore(t,this.placeholder.parentNode===document.head?this.placeholder.nextSibling:null),document.head.removeChild(this.placeholder),this.placeholder=t,n.promise()}},_e=class{constructor(){L(this,`stylePoints`,/* @__PURE__ */ new Map)}async load(e){let t={},n={};D.forEach(e=>{t[e]=[],n[e]=[]}),R(n,t,e);let r=t[E.Environment].concat(t[E.Library],t[E.Theme],t[E.Runtime],t[E.App]),i=n[E.Environment].concat(n[E.Library],n[E.Theme],n[E.Runtime],n[E.App]);await Promise.all(r.map(({content:e,level:t,type:n,id:r})=>this.loadStyle(e,t,n===O.CSSUrl,r))),await Promise.all(i.map(({content:e,type:t})=>this.loadScript(e,t===O.JSUrl)))}loadStyle(e,t,n,r){if(!e)return;let i;return r?(i=this.stylePoints.get(r),i||(i=new ge(t,r),this.stylePoints.set(r,i))):i=new ge(t),n?i.applyUrl(e):i.applyText(e)}loadScript(e,t){if(e)return t?le(e):ce(e)}async loadAsyncLibrary(e){let t=window,n=[],r=[];for(let i in e)e[i].async&&(n.push(t[e[i].library]),r.push(e[i].library));await Promise.all(n).then(e=>{e.length>0&&e.map((e,n)=>(t[r[n]]=e,e))})}};function ve(e,t){e.onSimulatorHostReady(e=>{let n=[{type:`jsText`,content:`window.__is_simulator_env__=true;window.__VUE_DEVTOOLS_GLOBAL_HOOK__=window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;`},{type:`jsUrl`,content:t.vue,id:`vue`}];e.set(`environment`,n)})}let ye=/[A-Za-z0-9_$]/,be=/[A-Za-z_$]/,xe=/[0-9]/,Se=/* @__PURE__ */ new Set([`return`,`typeof`,`case`,`in`,`of`,`delete`,`void`,`instanceof`,`new`,`throw`,`do`,`else`,`yield`,`await`]);function Ce(e,t){let n=e.length,r=``,i=0,a=!0,o=[],s=t=>{r+=e.slice(i,t),i=t},c=()=>{let t=i;for(;t<n;){let n=e[t];if(n===`\\`)t+=2;else if(n==="`")return s(t+1),!1;else if(n===`$`&&e[t+1]===`{`)return s(t+2),o.push(0),!0;else t++}return s(n),!1};for(;i<n;){let l=e[i],u=e[i+1];if(l===`/`&&u===`/`){let t=e.indexOf(`
|
|
17
|
+
`,i);s(t===-1?n:t)}else if(l===`/`&&u===`*`){let t=e.indexOf(`*/`,i+2);s(t===-1?n:t+2)}else if(l===`/`&&a){let t=i+1,r=!1;for(;t<n&&e[t]!==`
|
|
18
|
+
`;){let n=e[t];if(n===`\\`)t++;else if(n===`[`)r=!0;else if(n===`]`)r=!1;else if(n===`/`&&!r)break;t++}for(t++;t<n&&ye.test(e[t]);)t++;s(Math.min(t,n)),a=!1}else if(l===`"`||l===`'`){let t=i+1;for(;t<n&&e[t]!==l&&e[t]!==`
|
|
19
|
+
`;)e[t]===`\\`&&t++,t++;s(Math.min(t+1,n)),a=!1}else if(l==="`")i++,r+=l,a=c();else if(l===`}`&&o.length>0&&o[o.length-1]===0)o.pop(),i++,r+=l,a=c();else if(be.test(l)||xe.test(l)){let o=i+1;for(;o<n&&ye.test(e[o]);)o++;let s=e.slice(i,o);i=o,s===`this`?(r+=t,a=!1):(r+=s,a=Se.has(s))}else l===`{`&&o.length>0?o[o.length-1]++:l===`}`&&o.length>0&&o[o.length-1]--,/\s/.test(l)||(a=l!==`)`&&l!==`]`&&l!==`}`),r+=l,i++}return r}let we=`__self`,Te=/* @__PURE__ */ new Map,Ee=/* @__PURE__ */ new Map;function De(){try{return window.parent!==window&&window.parent.location.host===window.location.host}catch(e){return!1}}function Oe(){if(!De())return;let e=window.parent.__newFunc;return typeof e==`function`?e:void 0}function ke(e){let t=Oe(),n=t?Ee:Te,r=n.get(e);if(!r){let i=`var ${we} = arguments[0];\nwith (arguments[0] || {}) { return ${Ce(e,we)}\n}`;r=t?t(i):Function(i),n.set(e,r)}return r}function Ae(e,t){return ke(e).call(t,t)}function je(){return Te.size+Ee.size}function Me(){Te.clear(),Ee.clear()}function Ne(e){return e==null?``:typeof e==`string`?e:Array.isArray(e)||typeof e==`object`&&(e.toString===Object.prototype.toString||typeof e.toString!=`function`)?JSON.stringify(e,null,2):String(e)}function Pe(e,t){let n=t&&t.cache?t.cache:We,r=t&&t.serializer?t.serializer:He;return(t&&t.strategy?t.strategy:ze)(e,{cache:n,serializer:r})}function Fe(e){return e==null||typeof e==`number`||typeof e==`boolean`}function Ie(e,t,n,r){let i=Fe(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function Le(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function Re(e,t,n,r,i){return n.bind(t,e,r,i)}function ze(e,t){let n=e.length===1?Ie:Le;return Re(e,this,n,t.cache.create(),t.serializer)}function Be(e,t){return Re(e,this,Le,t.cache.create(),t.serializer)}function Ve(e,t){return Re(e,this,Ie,t.cache.create(),t.serializer)}let He=function(){return JSON.stringify(arguments)};var Ue=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}};let We={create:function(){return new Ue}},Ge={variadic:Be,monadic:Ve},Ke=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function qe(e){let t={};return e.replace(Ke,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}let Je=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Ye(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(Je).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function Xe(e){return e.replace(/^(.*?)-/,``)}let Ze=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Qe=/^(@+)?(\+|#+)?[rs]?$/g,$e=/(\*)(0+)|(#+)(0+)|(0+)/g,et=/^(0+)$/;function tt(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(Qe,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function nt(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function rt(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!et.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function it(e){return nt(e)||{}}function at(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:t.style=`unit`,t.unit=Xe(n.options[0]);continue;case`unit`:t.style=`unit`,t.unit=n.options[0];continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...it(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...it(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace($e,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(et.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(Ze.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(Ze,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,...tt(e)});continue}if(Qe.test(n.stem)){t={...t,...tt(n.stem)};continue}let e=nt(n.stem);e&&(t={...t,...e});let r=rt(n.stem);r&&(t={...t,...r})}return t}let ot=/* @__PURE__ */ function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function st(e){return e.type===0}function ct(e){return e.type===1}function lt(e){return e.type===2}function ut(e){return e.type===3}function dt(e){return e.type===4}function ft(e){return e.type===5}function pt(e){return e.type===6}function mt(e){return e.type===7}function ht(e){return e.type===8}function gt(e){return!!(e&&typeof e==`object`&&e.type===0)}function _t(e){return!!(e&&typeof e==`object`&&e.type===1)}let vt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,yt=/([^\t-\r -\/:-@\[-\^`\{-~\x85\xA0-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u1680\u2000-\u200A\u2010-\u2029\u202F-\u203E\u2041-\u2053\u2055-\u205F\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3000-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]*)/g,z={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`H`,`h`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`H`,`h`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HT:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`H`,`h`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`hB`,`hb`,`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`H`,`h`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function bt(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`j`){let a=0;for(;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;let o=1+(a&1),s=a<2?1:3+(a>>1),c=xt(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else n+=i===`J`?`H`:i}return n}function xt(e){let t=e.hourCycle;if(t===void 0){var n,r,i;let a=e;t=(n=(r=a.getHourCycles)==null?void 0:r.call(a)[0])==null?(i=a.hourCycles)==null?void 0:i[0]:n}if(t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let a=e.language,o;return a!==`root`&&(o=e.maximize().region),(z[`${a}-${o}`]||z[o||``]||z[a||``]||z[`${a}-001`]||z[`001`])[0].charAt(0)}let St=RegExp(`^${vt.source}*`),Ct=RegExp(`${vt.source}*$`);function B(e,t){return{start:e,end:t}}let wt=!!Object.fromEntries,Tt=!!String.prototype.trimStart,Et=!!String.prototype.trimEnd,Dt=wt?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},Ot=Tt?function(e){return e.trimStart()}:function(e){return e.replace(St,``)},kt=Et?function(e){return e.trimEnd()}:function(e){return e.replace(Ct,``)},At=jt();function jt(){try{var e;let t=/* @__PURE__ */ RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);if(((e=t.exec(`a `))==null?void 0:e[1])===`a`)return t}catch(e){}return yt}function Mt(e,t){var n;return At.lastIndex=t,(n=At.exec(e)[1])==null?``:n}function Nt(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r<e.length;){let i=e.charCodeAt(r);switch(i){case 35:case 39:case 60:case 123:case 125:return null}if(i===10)t++,n=1,r++;else if(n++,i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);r+=t>=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var Pt=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons,this.captureEscapes=!!t.captureEscapes}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=Nt(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,...this.captureEscapes&&{rawValue:this.message},location:B(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:B(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,B(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Ft(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:B(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(`</`)){if(this.isEOF()||!Ft(this.char()))return this.error(23,B(o,this.clonePosition()));let e=this.clonePosition();return r===this.parseTagName()?(this.bumpSpace(),this.bumpIf(`>`)?{val:{type:8,value:r,children:a,location:B(n,this.clonePosition())},err:null}:this.error(23,B(o,this.clonePosition()))):this.error(26,B(e,this.clonePosition()))}return this.error(27,B(n,this.clonePosition()))}return this.error(23,B(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&Lt(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a)r+=a;else break}let i=B(n,this.clonePosition());return{val:{type:0,value:r,location:i,...this.captureEscapes&&{rawValue:this.message.slice(n.offset,this.offset())}},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!It(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39){if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,B(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,B(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,B(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,B(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:B(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,B(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,B(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=Mt(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:B(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,B(i,o));case`number`:case`date`:case`time`:{var s;this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=kt(n.val);if(r.length===0)return this.error(6,B(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:B(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=B(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=Ot(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=bt(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?qe(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:(s=e==null?void 0:e.style)==null?null:s},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,B(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,B(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=B(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:Dt(c.val),location:u},err:null}:{val:{type:6,value:n,options:Dt(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,B(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,B(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,B(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=Ye(e)}catch(e){return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?at(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=/* @__PURE__ */ new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=B(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,B(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:B(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,B(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,B(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=B(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){let t=this.offset();if(this.message.slice(t,t+e.length)===e){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){let t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Rt(this.char());)this.bump()}peek(){var e;if(this.isEOF())return null;let t=this.char(),n=this.offset();return(e=this.message.charCodeAt(n+(t>=65536?2:1)))==null?null:e}};function Ft(e){return e>=97&&e<=122||e>=65&&e<=90}function It(e){return Ft(e)||e===47}function Lt(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Rt(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function zt(e){e.forEach(e=>{if(delete e.location,ft(e)||pt(e))for(let t in e.options)delete e.options[t].location,zt(e.options[t].value);else lt(e)&>(e.style)||(ut(e)||dt(e))&&_t(e.style)?delete e.style.location:ht(e)&&zt(e.children)})}function Bt(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new Pt(e,t).parse();if(n.err){let e=SyntaxError(ot[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t!=null&&t.captureLocation||zt(n.val),n.val}var V,H=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},Vt=class extends H{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},Ht=class extends H{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},Ut=class extends H{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function Wt(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function Gt(e){return typeof e==`function`}function U(e,t,n,r,i,a,o){if(e.length===1&&st(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(st(c)){s.push({type:0,value:c.value});continue}if(mt(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new Ut(e,o);let l=i[e];if(ct(c))l&&typeof l!=`string`&&typeof l!=`number`&&typeof l!=`bigint`||(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});else if(ut(c)){let e=typeof c.style==`string`?r.date[c.style]:_t(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)})}else if(dt(c)){let e=typeof c.style==`string`?r.time[c.style]:_t(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)})}else if(lt(c)){let e=typeof c.style==`string`?r.number[c.style]:gt(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)})}else{if(ht(c)){let{children:e,value:l}=c,u=i[l];if(!Gt(u))throw new Ht(l,`function`,o);let d=u(U(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(ft(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new Vt(c.value,l,Object.keys(c.options),o);s.push(...U(a.value,t,n,r,i))}else if(pt(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new H(`Intl.PluralRules is not available in this environment.
|
|
20
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
21
|
+
`,`MISSING_INTL_API`,o);let e=typeof l==`bigint`?Number(l):l,r=n.getPluralRules(t,{type:c.pluralType}).select(e-(c.offset||0));a=(Object.prototype.hasOwnProperty.call(c.options,r)?c.options[r]:void 0)||c.options.other}if(!a)throw new Vt(c.value,l,Object.keys(c.options),o);let u=typeof l==`bigint`?Number(l):l;s.push(...U(a.value,t,n,r,i,u-(c.offset||0)))}}}return Wt(s)}function Kt(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function qt(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=Kt(e[r],t[r]),n),{...e}):e}function Jt(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function Yt(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:Pe((...e)=>new Intl.NumberFormat(...e),{cache:Jt(e.number),strategy:Ge.variadic}),getDateTimeFormat:Pe((...e)=>new Intl.DateTimeFormat(...e),{cache:Jt(e.dateTime),strategy:Ge.variadic}),getPluralRules:Pe((...e)=>new Intl.PluralRules(...e),{cache:Jt(e.pluralRules),strategy:Ge.variadic})}}var Xt=(V=class e{constructor(t,n=e.defaultLocale,r,i){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=(e=>{let t=this.formatToParts(e);if(t.length===1)return t[0].value;let n=t.reduce((e,t)=>(!e.length||t.type!==0||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e),[]);return n.length<=1?n[0]||``:n}),this.formatToParts=(e=>U(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message)),this.resolvedOptions=()=>{var e;return{locale:((e=this.resolvedLocale)==null?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}},this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");let{...n}=i||{};this.ast=e.__parse(t,{...n,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=qt(e.formats,r),this.formatters=i&&i.formatters||Yt(this.formatterCache)}static get defaultLocale(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale}},V.memoizedDefaultLocale=null,V.resolveLocale=e=>{if(Intl.Locale===void 0)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])},V.__parse=Bt,V.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}},V);function Zt(e,t={},n=`zh-CN`,r={}){return!r||!r[n]||!r[n][e]?``:new Xt(r[n][e],n).format(t)}function W(e){return N(e)&&e.type===`JSExpression`&&e.extType!==`function`}function G(e){return N(e)&&(e.type===`JSFunction`||e.type===`JSExpression`&&e.extType===`function`)}function K(e){return N(e)&&e.type===`JSSlot`}function Qt(e){return N(e)&&e.type===`i18n`}function $t(e){return typeof e==`string`}function en(e){return N(e)&&`componentName`in e&&!e.isNode}let tn={JSEXPRESSION:`JSExpression`,JSFUNCTION:`JSFunction`,JSSLOT:`JSSlot`,JSBLOCK:`JSBlock`,I18N:`i18n`};function nn(e,t){return q({type:tn.JSEXPRESSION,value:`this.i18n(${JSON.stringify(e.key)})`},t)}function q(e,t){try{let n=Ae((e.value||``).trim(),t);return G(e)&&t&&typeof n==`function`?n.bind(t):n}catch(n){console.warn(`parseExpression.error`,n,e,t);return}}function J(e,t){if(W(e)||G(e))return q(e,t);if(Qt(e))return nn(e,t);if(j(e))return e.trim();if(Array.isArray(e))return e.map(e=>J(e,t));if(M(e))return e.bind(t);if(P(e)){if(!e)return e;let n={};return Object.keys(e).forEach(r=>{r.startsWith(`__`)||(n[r]=J(e[r],t))}),n}return e}function Y(e,t){let n={};return w(t).forEach((t,r)=>{n[t]=e[r]}),n}function rn(e){return N(e)&&e.componentName===`Component`}function an(e){if(rn(e))return`devMode`in e?void 0:e;let t=N(e)?e.componentsTree:void 0,n=Array.isArray(t)?t[0]:void 0;return rn(n)?n:void 0}let on=/^[a-z][a-z0-9-]*$/;function X(e){return typeof e==`string`?window[e]||(on.test(e)?y().wrapTag(e):void 0):e}function sn(e,t){let n=t.length;if(n<1||!e)return e;let r=0,i;for(;r<n;){let a=t[r],o;try{i=e[a]}catch(e){o=e,i=null}if(r===0&&i==null&&a==="default"){if(o)return n===1?e:null;i=e}else if(i==null)return null;e=i,r++}return i}function cn(e,t,n){if(!n)return X(t);let r=n.exportName||n.componentName||t,i=X(e[n.package]||r),a=n.exportName&&n.subName?n.subName.split(`.`):[];return n.destructuring?a.unshift(r):re(i)&&a.unshift(`default`),sn(i,a)}function ln(e){let t=y(),n=window;for(let r of Object.values(e)){let e=n[r],i=N(e)?e.directives:void 0;if(N(i))for(let[e,n]of Object.entries(i))n&&t.registerDirective(e,n)}}function un(e,t,n){let r=y();ln(e);let i={};return Object.keys(t).forEach(a=>{let o=t[a],s=an(o);if(s){if(n){let e=n(s);e&&(i[a]=e)}}else if(r.isComponent(o))i[a]=r.normalizeComponent(o);else{let t=cn(e,a,o);t&&(i[a]=t.functional?r.wrapTag(t):r.normalizeComponent(t))}}),i}function dn(e,t){return t.filter(e=>e&&e.name).reduce((t,n)=>{let{name:r,content:i,type:a}=n;if(a===`npm`){let{package:n,exportName:a,destructuring:o}=i==null?{}:i;if(e[n]){let i=X(e[n]);i&&(t[r]=o&&a?i[a]:i)}}else a===`function`&&(t[r]=G(i)?Function(`return ${i.value}`)():n.content);return t},{})}let fn=(e,t)=>!!e&&typeof e==`object`&&e.type===t,pn=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.componentName==`string`;function mn(e){return Array.isArray(e)?e.every(mn):typeof e==`string`||fn(e,`JSExpression`)||pn(e)}let hn=e=>e==null?[]:Array.isArray(e)?e:[e];function gn(e){var t;let n={},r={},i=hn(e.children);for(let[a,o]of Object.entries((t=e.props)==null?{}:t))if(fn(o,`JSSlot`)){let e=o,t=a===`children`?`default`:a;e.value&&(r[t]={params:e.params,children:e.value})}else a===`className`?n.class=o:a===`children`&&mn(o)?i=hn(o):n[a]=o;return{props:n,slots:r,children:r.default?[]:i}}let _n=e=>e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()),vn=e=>e&&e[0].toLowerCase()+e.slice(1),yn=e=>/^on[A-Z]/.test(e);function bn(e){var t;let n=(t=e.match(/^onUpdate:?([\w-]+)$/))==null?void 0:t[1];return n?`onUpdate:${vn(_n(n))}`:e}function xn(e){let t=e.match(/^v-model(?::([\w-]+))?$/);return t?t[1]?{arg:vn(_n(t[1]))}:{}:null}function Sn(e){let t=[`item`,`index`];return Array.isArray(e.loopArgs)&&e.loopArgs.forEach((e,n)=>{n<2&&typeof e==`string`&&e&&(t[n]=e)}),t}function Cn(e,t){return t?e.map(e=>({dataHandler:t,...e})):e}function wn(e,t){let n=gn(e),r={default:n.children};for(let[e,t]of Object.entries(n.slots))r[e]={componentName:`Slot`,params:t.params,children:t.children};if(t){var i;for(let[n,a]of Object.entries((i=e.props)==null?{}:i)){let e=K(a)?t.getProp(n):null;e!=null&&e.slotNode&&(r[n]=e.slotNode.export(k.Render))}}return{props:n.props,slots:r}}function Tn(e,t,n){var r,i,a;return{...wn(e,t),loop:e.loop,loopArgs:Sn(e),condition:(r=e.condition)==null||r,hidden:n?(i=e.hidden)!=null&&i:!1,locked:(a=t==null?void 0:t.isLocked)!=null&&a}}let En=[`___isLocked___`,`___hidden___`,`___condition___`,`___loop___`,`___loopArgs___`];function Dn(e,t,n){y().set(e,t,n)}function Z(e,t){y().del(e,t)}function On(e,t,n){let r=t===`className`?`class`:t;t in e.slots&&Z(e.slots,t),Dn(e.props,r,n)}function kn(e,t,n){t in e.props&&Z(e.props,t),A(n)?Z(e.slots,t):Dn(e.slots,t,n)}function An(e,t,n){var r;let{prop:i,newValue:a,oldValue:o}=n,s=n.key,c=(r=i==null?void 0:i.path)==null?[]:r,l=c[0];if(c.length!==1){if(l===`___loopArgs___`){let t=[...e.loopArgs];t[Number(s)]=a,e.loopArgs=t}else l&&!En.includes(l)&&On(e,l,t.getPropValue(l))}else if(s){if(s===`___isLocked___`)e.locked=!!a;else if(s===`___hidden___`)e.hidden=!!a;else if(s===`___condition___`)e.condition=a;else if(s===`___loop___`)e.loop=a;else if(s===`___loopArgs___`){let t=[...e.loopArgs];w(a).forEach((e,n)=>{t[n]=e}),e.loopArgs=t}else if(s===`children`){var u;Z(e.props,s),kn(e,`default`,K(a)?i==null||(u=i.slotNode)==null?void 0:u.export(k.Render):A(a)?void 0:w(a))}else if(K(a)){var d;kn(e,s,i==null||(d=i.slotNode)==null?void 0:d.export(k.Render))}else A(a)&&K(o)?kn(e,s,void 0):On(e,s,a)}}function jn(){let e=/* @__PURE__ */ new Map,n=[],r=/* @__PURE__ */ new Map;return{get(r){let i=e.get(r);if(i)return i;let a=Tn(r.export(k.Render),r,!0),o=(0,t.shallowReactive)({...a,props:(0,t.shallowReactive)(a.props),slots:(0,t.shallowReactive)(a.slots)});return e.set(r,o),n.push(r.onChildrenChange(()=>{let e=r.export(k.Render);Dn(o.slots,`default`,w(e.children))}),r.onPropChange(e=>An(o,r,e))),o},keyOf(t,n){let i=r.get(t);return i?(i.node!==n&&(e.delete(i.node),i.node=n,i.generation+=1),i.generation?`${t}:${i.generation}`:t):(r.set(t,{node:n,generation:0}),t)},dispose(){for(let e of n)e==null||e();n.length=0,e.clear(),r.clear()}}}let Mn=Symbol(`LEAF_STORE`);function Nn(){let e=(0,t.inject)(Mn,null);if(e)return e;let n=jn();return(0,t.provide)(Mn,n),(0,t.onUnmounted)(()=>n.dispose()),n}let Pn=/* @__PURE__ */ new WeakSet;function Fn(e){Pn.add(e)}function Q(e){for(let t=e;t;t=Object.getPrototypeOf(t))if(Pn.has(t))return!0;return!1}function In(e){return!e||!N(e)?!1:Q(e)?!0:Object.keys(e).length>0}function Ln(...e){let n=[];if(e.flat().forEach(e=>{In(e)&&n.push(e)}),n.length<=1)return n[0];let[r,...i]=n;return i.reduce((e,n)=>{if(Q(n)){if(Q(e))return n;{let t=e;e=n,n=t}}let r=Object.getOwnPropertyDescriptors(n);return e=Object.create(e,r),(0,t.isProxy)(n)?(0,t.reactive)(e):e},r)}function Rn(e){let n=null,r=()=>{var e;n==null||(e=n.parentElement)==null||e.removeChild(n),n=null};(0,t.watch)(()=>{var t,n;return[(t=e.__schema)==null?void 0:t.id,(n=e.__schema)==null?void 0:n.css]},([e,t])=>{n&&n.getAttribute(`data-id`)!==(e==null?null:e)&&r(),e&&(n=document.querySelector(`style[data-id="${e}"]`)),t?(n||(n=document.createElement(`style`),e&&n.setAttribute(`data-id`,e),(document.head||document.getElementsByTagName(`head`)[0]).appendChild(n)),n.innerHTML!==t&&(n.innerHTML=t)):n&&r()},{immediate:!0}),(0,t.onBeforeUnmount)(r)}function zn(e){let t=[];return Object.keys(e).forEach(n=>{let r=e[n];r!=null&&r!==``&&(typeof r==`object`?t.push(`${n}=${encodeURIComponent(JSON.stringify(r))}`):t.push(`${n}=${encodeURIComponent(String(r))}`))}),t.join(`&`)}function Bn(e,t){if(!t)return e;let n=zn(t);return n?e.indexOf(`?`)>0?`${e}&${n}`:`${e}?${n}`:e}function Vn(e,t){for(let n in e)if(n.toLowerCase()===t)return[e[n],n];return[]}function Hn(e){return[`arrayBuffer`,`blob`,`formData`,`json`,`text`].includes(e)}function Un(e){let t=new FormData;for(let n in e){let r=e[n];r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}let Wn={"application/json":e=>JSON.stringify(e),"multipart/form-data":e=>P(e)?Un(e):e,"application/x-www-form-urlencoded":e=>zn(e)};function Gn(e,t){let n=Object.keys(Wn).find(t=>e.includes(t));return n?Wn[n](t):t}var $=class extends Error{constructor(e,t,n){super(e),this.code=t,this.data=n}},Kn=class{constructor(e,t){this.code=e,this.data=t}};async function qn(e){let{uri:t,method:n=`GET`,timeout:r,params:i={},headers:a={},responseType:o=`json`}=e,s,c={Accept:`application/json`,...a},l={method:n,headers:c};if(n===`GET`||n===`DELETE`||n===`OPTIONS`)s=Bn(t,i);else{s=t;let[e,n]=Vn(c,`content-type`);e===void 0&&(c[`Content-Type`]=`application/json`),l.body=Gn(e==null?`application/json`:e,i),e===`multipart/form-data`&&n&&delete c[n]}let u;if(r){let e=new AbortController;l.signal=e.signal,u=setTimeout(()=>e.abort(),r)}try{let e=await fetch(s,l),t=e.status;if(t>=200&&t<300){if(t===204)return new Kn(t,null);if(!Hn(o))throw new $(`invalid response type: ${o}`,-1);return new Kn(t,await e[o]())}let n;try{n=await e.json()}catch(e){n=void 0}throw new $(e.statusText,t,n)}finally{clearTimeout(u)}}let Jn=0;function Yn(e){let{uri:t,params:n={},timeout:r,jsonpCallback:i=`callback`,jsonpCallbackFunction:a=`__lowcode_jsonp_${Date.now()}_${Jn++}`}=e,o=window;return new Promise((e,s)=>{let c=document.createElement(`script`),l,u=()=>{clearTimeout(l),c.remove(),Reflect.deleteProperty(o,a)};o[a]=t=>{u(),e(new Kn(200,t))},c.onerror=()=>{u(),s(new $(`JSONP request to ${t} failed`,-1))},r&&(l=setTimeout(()=>{u(),s(new $(`JSONP request to ${t}: timeout`,-1))},r)),c.src=Bn(t,{...n,[i]:a}),document.head.appendChild(c)})}let Xn=e=>e,Zn=()=>void 0,Qn=()=>!0;function $n(e,n,r){let i=(0,t.shallowRef)(),a=(0,t.shallowRef)(),o=(0,t.ref)(`init`),s=(0,t.computed)(()=>o.value===`loading`),c=(0,t.computed)(()=>!!J(e.isInit,r)),{willFetch:l,shouldFetch:u,dataHandler:d,errorHandler:f}=e,p={willFetch:l?J(l,r):Xn,shouldFetch:u?J(u,r):Qn,dataHandler:d?J(d,r):e=>e.data,errorHandler:f?J(f,r):Zn};return(0,t.reactive)({data:i,error:a,loading:s,status:o,isInit:c,load:async(t,s={})=>{try{let{type:a,options:c,id:l}=e,{headers:u,assignToScope:d=!0,...f}=s;if(!n)throw Error(`unsupported data source type: ${a}`);if(!(M(p.shouldFetch)?p.shouldFetch():typeof p.shouldFetch!=`boolean`||p.shouldFetch))return;let{params:m,headers:h,...g}=J(c==null?{}:c,r);o.value=`loading`;let _=await n(p.willFetch({...g,...f,headers:{...h,...u},params:P(m)&&P(t)?{...m,...t}:t==null?m:t}),r);o.value=`loaded`;let v=p.dataHandler(_);return i.value=v,v!==void 0&&d&&(r[l]=v),v}catch(e){throw o.value=`error`,a.value=e,p.errorHandler(e),e}}})}let er={fetch:e=>qn(e),jsonp:e=>Yn(e)};function tr(e,t){var n;let r=e==null?`fetch`:e;return Object.keys(t).includes(r)?t[r]:(n=er[r])==null?null:n}function nr({list:e=[],dataHandler:t},n,r){let i={},a={};return Cn(e,t).forEach(e=>{let t=$n(e,tr(e.type,r==null?{}:r),n),o=(e,n)=>{let r={assignToScope:!1,...n};return t.load(e,r)};i[e.id]=o,a[e.id]=t}),{dataSource:i,dataSourceMap:a,reloadDataSource:(e,t,n)=>{if(e){let r=a[e];if(!r)throw Error(`dataSource not found, id: `+e);return r.load(t,n)}let r=Object.keys(a).map(e=>a[e]).filter(e=>e.isInit).map(e=>e.load());return Promise.all(r)}}}function rr(e,n,r,i){var a;let{__schema:o}=e,{dataSource:s,dataSourceMap:c,reloadDataSource:l}=nr((a=o.dataSource)==null?{list:[],dataHandler:void 0}:a,n,e.__requestHandlersMap);for(let e of Object.keys(c))e in r||(r[e]=(0,t.ref)());return i({dataSource:s,dataSourceMap:c,reloadDataSource:l}),()=>{l().catch(()=>{})}}let ir=[`initModule`,`initProps`,`initEmits`,`initData`,`initComputed`,`initWatch`,`initProvide`,`initInject`];function ar(e,t){let n={options:{}};if(!N(e))return n;for(let[r,i]of Object.entries(e)){let e=J(i,t);ir.includes(r)?n.options[r]=e:M(e)&&(n[r]=e.bind(t))}return n}let or={};function sr(e,t){let n=e.options.initModule;if(!M(n))return;let r=n(or,window);if(N(r))for(let[e,n]of Object.entries(r))e in t||Reflect.set(t,e,n)}function cr(e,t,n){var r;let i=(r=e.setup)==null?void 0:r.call(e,t,n);return ne(i)?i.then(e=>N(e)?e:{}):N(i)?i:{}}function lr(e,t){let n=e.options.initData,r=M(n)?n.call(t):n;return P(r)?r:{}}function ur(e,n){let r=e.options.initComputed,i={};if(!P(r))return i;for(let[e,a]of Object.entries(r))if(M(a))i[e]=(0,t.computed)(()=>a.call(n));else if(P(a)&&M(a.get)){let{get:r,set:o}=a;i[e]=(0,t.computed)({get:()=>r.call(n),set:e=>o==null?void 0:o.call(n,e)})}return i}function dr(e){let n=e.options.initInject,r={};if(Array.isArray(n))for(let e of n)j(e)&&(r[e]=e);else P(n)&&Object.assign(r,n);let i={};for(let[e,n]of Object.entries(r))if(P(n)){var a;let r=(a=n.from)==null?e:a;i[e]=`default`in n?(0,t.inject)(r,n.default,!0):(0,t.inject)(r)}else i[e]=(0,t.inject)(n);return i}function fr(e,n){let r=e.options.initProvide,i=M(r)?r.call(n):r;if(N(i))for(let e of Reflect.ownKeys(i))(0,t.provide)(e,Reflect.get(i,e))}function pr(e,t){return M(e)?e.bind(t):j(e)&&M(t[e])?t[e]:null}function mr(e,n,r){let i=r.split(`.`),a=()=>{let e=n;for(let n of i){if(!N(e))return;e=(0,t.unref)(e[n])}return e};if(Array.isArray(e)){for(let t of e)mr(t,n,r);return}let o=pr(P(e)?e.handler:e,n);if(!o){console.warn(`[lowcode-vue]: invalid watch handler for "${r}"`,e);return}let s=P(e)?{deep:!!e.deep,immediate:!!e.immediate}:{};(0,t.watch)(a,o,s)}function hr(e,t){let n=e.options.initWatch;if(P(n))for(let[e,r]of Object.entries(n))mr(r,t,e)}let gr={beforeMount:t.onBeforeMount,mounted:t.onMounted,beforeUpdate:t.onBeforeUpdate,updated:t.onUpdated,activated:t.onActivated,deactivated:t.onDeactivated,beforeUnmount:t.onBeforeUnmount,unmounted:t.onUnmounted,beforeDestroy:t.onBeforeUnmount,destroyed:t.onUnmounted,errorCaptured:t.onErrorCaptured,renderTracked:t.onRenderTracked,renderTriggered:t.onRenderTriggered,serverPrefetch:t.onServerPrefetch,componentDidMount:t.onMounted,componentDidCatch:t.onErrorCaptured,shouldComponentUpdate:t.onBeforeUpdate,componentWillUnmount:t.onBeforeUnmount};function _r(e){return e in gr||e===`beforeCreate`||e===`created`}function vr(e,t){for(let n=t;n;n=n.$parent){let t=e.find(e=>e.instances.default===n);if(t)return t}}function yr(e){var n,r;let i=(n=(r=(0,t.getCurrentInstance)())==null?void 0:r.proxy)==null?null:n,a=i==null?void 0:i.$router;if(!i||!a)return;let o=a.beforeEach((t,n,r)=>{let a=vr(n.matched,i),o=a&&(t.matched.includes(a)?e.beforeRouteUpdate:e.beforeRouteLeave);o?o.call(i,t,n,r):r()});(0,t.onBeforeUnmount)(o)}function br(e){for(let[t,n]of Object.entries(gr)){let r=e[t];r&&n(r)}let{beforeRouteUpdate:t,beforeRouteLeave:n}=e;(t||n)&&yr({beforeRouteUpdate:t,beforeRouteLeave:n})}function xr(e,t){var n;let r=(n=J(e,t))==null?{}:n;Object.assign(t,r)}let Sr=[`i18n`,`currentLocale`],Cr=Symbol(`SCOPE_VERSION`);function wr(){var e;return(e=(0,t.inject)(Cr,null))==null?(0,t.ref)(0):e}function Tr(e,n){return{add:r=>{for(let i of Object.keys(r)){let a=r[i];Reflect.set((0,t.isRef)(a)?n:e,i,a)}},remove:r=>{for(let i of Object.keys(r))Reflect.deleteProperty((0,t.isRef)(r[i])?n:e,i)}}}function Er(e,n){let r=(0,t.ref)(0);(0,t.provide)(Cr,r);let i=null;(0,t.watch)(()=>({...e.__scope}),e=>{let t={};for(let n of Object.keys(e))Sr.includes(n)||(t[n]=e[n]);let a=i;if(a){let e={};for(let n of Object.keys(a))n in t||(e[n]=a[n]);n.remove(e)}n.add(t),a&&r.value++,i=t},{immediate:!0});let a=(t,n)=>{let{__locale:r,__messages:i}=e;return Zt(t,n,r,i)},o=(0,t.computed)(()=>e.__locale);return n.add({i18n:a,currentLocale:o}),r}function Dr(e,n){var r;let i=(r=J(e))==null?{}:r;return(0,t.toRefs)((0,t.reactive)({...i,...n}))}function Or(e,n){for(let[r,i]of Object.entries(n))(0,t.isRef)(i)?Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get:()=>i.value,set:e=>i.value=e}):Reflect.set(e,r,i)}function kr(e,n){var r,i,a;let o=y(),s=(r=e.__schema)==null?{}:r,c=(0,t.getCurrentInstance)().proxy;Fn(c);let l=ar(s.lifeCycles,c),u=()=>{};o.onCreated(()=>{var e;hr(l,c),u(),(e=l.created)==null||e.call(l)}),sr(l,c),(i=l.beforeCreate)==null||i.call(l);let d={},f=(0,t.ref)(!0),p=cr(l,e,n);p instanceof Promise?(f.value=!1,p.then(e=>{Or(c,e),f.value=!0})):Object.assign(d,p);for(let[e,n]of Object.entries(dr(l)))(0,t.isRef)(n)||!M(n)?d[e]=n:Reflect.set(c,e,n);xr(s.methods,c),Object.assign(d,Dr(s.state,lr(l,c))),Object.assign(d,ur(l,c)),fr(l,c),br(l),Rn(e);let m=Tr(c,d),h=Er(e,m);return u=rr(e,c,d,m.add),(a=e.__onRuntimeScope)==null||a.call(e,c),{scope:c,bindings:d,ready:f,scopeVersion:h}}function Ar(e,n=x(),r=wr()){let i=y(),{getNode:a,designMode:o}=n,s=Nn(),c=o===`design`,l=e=>{let t=c&&e.id?a(e.id):null;return t?s.get(t):Tn(e,null,c)},u=(0,t.computed)(()=>l(e.schema)),f=e=>{for(let t=e;t;t=t.parent)if(s.get(t).locked)return!0;return!1},p=/* @__PURE__ */ new Map,m=(e,t)=>{let r=p.get(e);if(!r){let a={schema:t,props:{ref:e=>{e&&n.triggerCompGetCtx(a.schema,e)},...i.unmountedHook(()=>{p.delete(e),n.triggerCompGetCtx(a.schema,null)})}};p.set(e,a),r=a}return r.schema=t,r.props},h=(t,o,u,d=e.scope)=>{var f;let p=Ln(d,o);if(j(t))return i.text(t);if(W(t)){let e=q(t,p);return i.text(Ne(e))}let h=t;if(u||(u=n.components[h.componentName]),!u)return i.h(`div`,null,{default:()=>[i.text(`component not found: ${h.componentName}`)]});let g=c&&h.id?a(h.id):null,_=g&&h.id?s.keyOf(h.id,g):h.id,v=l(h),{hidden:y,condition:x,loop:S,loopArgs:w}=v;if(y||(typeof x==`boolean`?!x:!J(x,p)))return null;let T=u,E=(e,t)=>{r.value;let n={scope:t,node:g,comp:T},a=c&&e!==void 0?m(e,h):void 0,o=C(v.slots,n);return i.h(T,{...b(v.props,n,a),key:e},Object.keys(o).length?o:void 0)};if(!S)return E(_,p);let D=J(S,p);if(!Array.isArray(D))return!A(D)&&console.warn(`[vue-renderer]: loop must be array`,D),null;let O=(f=p.__loopRefOffset)==null?0:f,[k,ee]=w;return D.map((e,t)=>E(`${_}-${t}`,Ln(p,{[k]:e,[ee]:t,__loopScope:!0,__loopRefIndex:O+t,__loopRefOffset:D.length*t})))},g=(e,t,n)=>{if(W(e)||G(e))return q(e,t);if(K(e)){let a,o;if(n!=null&&n.slotNode){var r;o=n.slotNode.export(k.Render),a=(r=o.params)==null?[]:r}else{var i;o=w(e.value),a=(i=e.params)==null?[]:i}return(...e)=>{let n=Y(e,a),r=[];return w(o).forEach(e=>{r.push(...w(h(e,n,void 0,t)))}),r}}if(Array.isArray(e))return e.map((e,r)=>g(e,t,n==null?void 0:n.get(r)));if(e&&N(e)){let r={};return Object.keys(e).forEach(i=>{if(i.startsWith(`__`))return;let a=e[i],o=n==null?void 0:n.get(i);r[i]=g(a,t,o)}),r}return e},_=(e,n,r)=>{if(j(e)){let r=e,a=null;return e=>{let o=i.refsOf(n);if(A(n.__loopRefIndex))o[r]=e,r in n&&(n[r]=e);else{let i=o[r];if(!Array.isArray(i))i=o[r]=[],r in n&&(i=n[r]=i);else if(r in n){let e=n[r];i=!Array.isArray(e)||(0,t.toRaw)(e)!==i?n[r]=i:e}if(A(e)){let e=i.indexOf(a);e>=0&&i.splice(e,1)}else i[n.__loopRefIndex]=e}a=e}}{let t=g(e,n,r);return j(t)?_(t,n,r):t}},v=(e,t,n,r)=>{let a=xn(t);if(t.startsWith(`v-model`)){if(!a)return e;let t,o;if(a.arg)t=a.arg,o=`onUpdate:${t}`;else{let e=i.modelOf(r);t=e.prop,o=`on${e.event[0].toUpperCase()}${e.event.slice(1)}`}if(W(n)){let t={type:`JSFunction`,value:`function ($event) {${n.value} = $event}`};e[o]=o in e?w(e[o]).concat(t):t}e[t]=n}else if(yn(t)&&G(n))t=bn(t),e[t]=t in e?w(e[t]).concat(n):n;else if(t===`ref`&&`ref`in e){let t=n,r=e.ref;e.ref=M(r)&&M(t)?(...e)=>{t(...e),r(...e)}:[r,t].filter(M).pop()}else e[t]=n},b=(e,t,n)=>{let r={};Object.keys(e).forEach(n=>{v(r,n,e[n],t.comp)});let i={};return Object.keys(r).forEach(e=>{var n;let a=r[e],o=(n=t.node)==null?void 0:n.getProp(e);i[e]=e===`ref`?_(a,t.scope,o):g(a,t.scope,o)}),n&&Object.keys(n).forEach(e=>{v(i,e,n[e],t.comp)}),i},S=(e,t)=>(...n)=>{let r=e(...n);if(!r.length){let e=f(t),n={"lc-container-locked":e,"lc-container-placeholder":!0},a=e?`锁定元素及子元素无法编辑`:`拖拽组件或模板到这里`;r.push(i.h(`div`,{class:n},{default:()=>[i.text(a)]}))}return r},C=(e,t)=>{let{node:n,scope:r}=t;return Object.keys(e).reduce((t,i)=>{let a=e[i],o=i==="default";if(A(a)||o&&!(n!=null&&n.isContainer())&&Array.isArray(a)&&a.length===0)return t;let s;s=Array.isArray(a)?()=>a.flatMap(e=>w(h(e,null,void 0,r))):a.id?(...e)=>{var t;return w(h(a,Y(e,(t=a.params)==null?[]:t),void 0,r))}:(...e)=>{var t;let n=Y(e,(t=a.params)==null?[]:t);return w(a.children).flatMap(e=>w(h(e,n,void 0,r)))};let l=Array.isArray(a)?[]:a.params;return l!=null&&l.length&&d(s),t[i]=o&&c&&n!=null&&n.isContainer()?S(s,n):s,t},{})};return{state:u,renderComp:h,buildProps:b,buildSlots:C}}function jr(e,n){let{scope:r,bindings:i,ready:a,scopeVersion:o}=kr(e,n),s={comp:null,scope:r,get schema(){return e.__schema}},c=b(),l=(0,t.computed)(()=>{var t;return(t=e.__designMode)==null?`live`:t}),u=(0,t.computed)(()=>e.__components),d=(0,t.reactive)({designMode:l,components:u,getNode:t=>{var n,r;return(n=(r=e.__getNode)==null?void 0:r.call(e,t))==null?null:n},triggerCompGetCtx:(0,t.computed)(()=>e.__triggerCompGetCtx)});return(0,t.provide)(c,d),{scope:r,bindings:i,ready:a,scopeVersion:o,designModeRef:l,componentsRef:u,...Ar(s,d,o)}}let Mr=/* @__PURE__ */ new WeakMap;function Nr(e){return(0,t.defineComponent)({name:e.name,props:C,__renderer__:!0,setup(n,r){var i;let a=n,{renderComp:o,componentsRef:s,bindings:c,ready:l,scopeVersion:u}=jr(a,r),d=(0,t.getCurrentInstance)().proxy,f=e.root(s.value);return(i=e.reportSelf)!=null&&i.call(e,f)&&(0,t.onMounted)(()=>a.__triggerCompGetCtx(a.__schema,d)),Mr.set(d,()=>{var e;if(u.value,!l.value)return null;let t=o(a.__schema,null,f);return Array.isArray(t)?(e=t[0])==null?null:e:t}),c},render(){var e,n,r;let i=(e=(0,t.getCurrentInstance)())==null?void 0:e.proxy;return(n=(r=Mr.get(i))==null?void 0:r())==null?null:n}})}let Pr=(0,t.defineComponent)({name:`Page`,setup(e,{slots:t}){return()=>y().h(`div`,{class:`lc-page`,style:{height:`100%`}},t)}}),Fr=Nr({name:`PageRenderer`,root:e=>e.Page||Pr}),Ir=Nr({name:`BlockRenderer`,root:e=>e.Block||y().Fragment,reportSelf:e=>e===y().Fragment}),Lr=Nr({name:`ComponentRenderer`,root:e=>e.Component||y().Fragment,reportSelf:e=>e===y().Fragment}),Rr={PageRenderer:Fr,BlockRenderer:Ir,ComponentRenderer:Lr};var zr=class{constructor(){L(this,`renderers`,{...Rr}),L(this,`configProvider`,null)}setConfigProvider(e){this.configProvider=e}getConfigProvider(){return this.configProvider}setRenderers(e){this.renderers=e}getRenderers(){return this.renderers}};let Br=new zr;function Vr(e){var t;let n=(t=e.listeners)==null?{}:t;return Object.fromEntries(Object.entries(n).map(([e,t])=>[`on${e[0].toUpperCase()}${e.slice(1)}`,t]))}function Hr(e){if(!P(e))return;let{type:t,value:n}=e;if(!(t!==`JSExpression`&&t!==`JSFunction`||!j(n)))try{return Ae(n)}catch(e){return}}function Ur(e){var t;let n=(t=e.lifeCycles)==null?{}:t,r={},i=Hr(n.initProps);if(Array.isArray(i))for(let e of i)j(e)&&(r[e]=null);else if(P(i))for(let[e,t]of Object.entries(i))r[e]=P(t)?t:M(t)||Array.isArray(t)?{type:t}:null;let a=Hr(n.initEmits);return{props:r,emits:Array.isArray(a)?a.filter(j):P(a)?Object.keys(a):[]}}let Wr=/* @__PURE__ */ new WeakMap;function Gr(e,n){var r;let i=(r=n.lifeCycles)==null?{}:r;if(!i.initProps&&!i.initEmits)return e;let a=JSON.stringify([n.id,i.initProps,i.initEmits]),o=Wr.get(e);o||Wr.set(e,o=/* @__PURE__ */ new Map);let s=o.get(a);if(s)return s;let{props:c,emits:l}=Ur(n),{_Ctor:u,...d}=e,f=(0,t.defineComponent)({...d,props:{...d.props,...c},emits:l});return o.set(a,f),f}let Kr={scope:{type:Object,default:void 0},schema:{type:Object,required:!0},components:{type:Object,required:!0},designMode:{type:String,default:`live`},device:{type:String,default:void 0},locale:{type:String,default:void 0},messages:{type:Object,default:()=>({})},props:{type:Object,default:void 0},getNode:{type:Function,default:void 0},onCompGetCtx:{type:Function,default:void 0},requestHandlersMap:{type:Object,default:void 0},onRuntimeScope:{type:Function,default:void 0}},qr=(0,t.defineComponent)({name:`LowCodeRenderer`,inheritAttrs:!1,props:Kr,setup(e,n){let r=e,i=y(),a=e=>{var t,n;return(t=(n=r.getNode)==null?void 0:n.call(r,e))==null?null:t},o=(e,t)=>{var n;return(n=r.onCompGetCtx)==null?void 0:n.call(r,e,t)},s=(0,t.computed)(()=>{let e={...Br.getRenderers()};for(let[t,n]of Object.entries(r.components))e[t]=i.normalizeComponent(n);return e}),c=()=>{let e=s.value,{schema:t}=r;if(!t)return null;let{componentName:c}=t,l=e[c]||e[`${c}Renderer`];return l&&!l.__renderer__&&(l=Rr[`${c}Renderer`]),l?i.h(Gr(l,t),{...n.attrs,...Vr(n),...r.props,key:t.__ctx?`${t.__ctx.lceKey}_${t.__ctx.idx||`0`}`:t.id,__scope:r.scope,__schema:t,__locale:r.locale,__messages:r.messages,__components:e,__designMode:r.designMode,__getNode:a,__triggerCompGetCtx:o,__requestHandlersMap:r.requestHandlersMap,__onRuntimeScope:r.onRuntimeScope}):null};return()=>{let e=Br.getConfigProvider();return e?i.h(e,{device:r.device,locale:r.locale},{default:()=>[c()].filter(Boolean)}):c()}}});function Jr(e,n){let r=y(),{props:i}=Ur(e);return(0,t.markRaw)((0,t.defineComponent)({name:e.fileName||e.componentName,inheritAttrs:!1,props:Object.keys(i),setup(t,i){return()=>r.h(qr,{...i.attrs,...Vr(i),...n(),schema:e,props:{...t}})}}))}function Yr(e,t){return Object.assign(e,t)}Yr((0,t.defineComponent)({name:`Leaf`,setup(e,{slots:t}){let{h:n,PassThrough:r}=y();return()=>n(r,null,t)}}),{displayName:`Leaf`,componentMetadata:{componentName:`Leaf`,configure:{props:[{name:`children`,setter:`StringSetter`}],supports:!1}}}),Yr((0,t.defineComponent)({name:`Page`,setup(e,{slots:t}){return()=>y().h(`div`,{class:`lc-page`},t)}}),{displayName:`Page`,componentMetadata:{componentName:`Page`,configure:{supports:{style:!0,className:!0},component:{isContainer:!0,disableBehaviors:`*`}}}}),Yr((0,t.defineComponent)({name:`LcSlot`,setup(e,{slots:t}){return()=>y().h(`div`,{class:`lc-container`},t)}}),{displayName:`Slot`,componentMetadata:{componentName:`Slot`,configure:{props:[{name:`___title`,title:`插槽标题`,setter:`StringSetter`,defaultValue:`插槽容器`},{name:`___params`,title:`插槽入参`,setter:{componentName:`ArraySetter`,props:{itemSetter:{componentName:`StringSetter`,props:{placeholder:`参数名称`}}}}}],component:{isContainer:!0,disableBehaviors:`*`},supports:!1}}});let Xr={type:Object,required:!0},Zr=(0,t.defineComponent)({name:`Layout`,props:{simulator:Xr},setup(e,{slots:t}){let{h:n}=y();return()=>{var r;let{simulator:i}=e,{layout:a,getComponent:o}=i,s=(r=a==null?void 0:a.Component)==null?a!=null&&a.componentName?o(a.componentName):null:r;return s?n(s,{...a.props,simulator:i,key:`layout`},t):n(`div`,null,t)}}});(0,t.defineComponent)({name:`SimulatorRendererView`,props:{simulator:Xr},setup(e){let{h:t}=y(),{RouterView:n}=v();return()=>t(Zr,{simulator:e.simulator},{default:()=>[t(n)]})}}),(0,t.defineComponent)({name:`DocumentView`,props:{simulator:Xr,documentInstance:{type:Object,required:!0}},setup(e){let{h:t}=y();return()=>{let{documentInstance:n,simulator:r}=e;if(!r.autoRender)return null;let{schema:i,scope:a,messages:o,key:s}=n;return t(qr,{key:s,scope:a,schema:i,messages:o,locale:r.locale,device:r.device,components:r.components,designMode:r.designMode,requestHandlersMap:r.requestHandlersMap,getNode:e=>n.getNode(e),onCompGetCtx:(e,t)=>n.mountInstance(e.id,t)})}}}),new class{constructor(){L(this,`states`,/* @__PURE__ */ new Set)}setDragging(e){e?this.addState(`dragging`):this.removeState(`dragging`)}setXResizing(e){e?this.addState(`x-resizing`):this.removeState(`x-resizing`)}setYResizing(e){e?this.addState(`y-resizing`):this.removeState(`y-resizing`)}setCopy(e){e?this.addState(`copy`):this.removeState(`copy`)}isCopy(){return this.states.has(`copy`)}release(){for(let e of this.states)this.removeState(e)}addState(e){this.states.has(e)||(this.states.add(e),document.documentElement.classList.add(`lc-cursor-${e}`))}removeState(e){this.states.has(e)&&(this.states.delete(e),document.documentElement.classList.remove(`lc-cursor-${e}`))}};let Qr=/^v-([\w-]+)(:\w+)?((\.\w+)*)$/,$r=/^on[A-Z]/,ei=[`attrs`,`domProps`,`nativeOn`];function ti(e,t){if(!e||typeof e==`string`)return;let n=typeof e==`function`?e.options:void 0;return(n==null?e:n)[t]}function ni(e){let t=ti(e,`props`);if(!t)return/* @__PURE__ */ new Set;let n=Array.isArray(t)?t:Object.keys(t);return new Set(n.map(e=>F(e)))}function ri(e,t){let n=e.match(Qr);return{name:n[1],rawName:e,value:t,arg:n[2],directives:(n[3]||``).split(`.`).filter(e=>!!e).reduce((e,t)=>(e[t]=!0,e),{})}}function ii(e,t,n){let r=ni(e),i={},a={},o={},s=[],c={on:i,props:a,attrs:o,directives:s};if(Object.keys(t).forEach(e=>{let n=t[e];if(!ei.includes(e)){if(e===`key`||e===`ref`||e===`class`||e===`style`)c[e]=n;else if(r.has(F(e)))a[F(e)]=n;else if($r.test(e)){let t=e.slice(2);i[t[0].toLowerCase()+t.slice(1)]=n}else Qr.test(e)?s.push(ri(e,n)):typeof n==`function`||typeof n==`object`&&n||(o[e]=n)}}),ei.forEach(e=>{let n=t[e];Object.prototype.toString.call(n)===`[object Object]`&&(c[e]={...c[e],...n})}),n){let e={};Object.keys(n).forEach(t=>{let r=n[t];typeof r==`function`&&(r.proxy=!0,e[t]=r)}),Object.keys(e).length>0&&(c.scopedSlots=e)}return c}function ai(e,n,r){let i=n==null?{}:n;if(typeof e==`string`)return(0,t.h)(e,ii(e,i),p(r));let{default:a,...o}=r==null?{}:r;return a&&!f(a)?(0,t.h)(e,ii(e,i,o),a()):(0,t.h)(e,ii(e,i,r))}function oi(e){return(0,t.defineComponent)({setup(n,{attrs:r,listeners:i,slots:a}){return()=>(0,t.h)(e,{attrs:{...r},on:i},p(a))}})}let si={version:2,h:ai,text:e=>t.default.prototype._v(e),Fragment:(0,t.defineComponent)({name:`Fragment`,setup(e,{slots:n}){return()=>{var e;return(0,t.h)(`div`,(e=n.default)==null?void 0:e.call(n))}}}),PassThrough:{name:`PassThrough`,functional:!0,render(e,t){var n,r,i;return(n=(r=(i=t.scopedSlots).default)==null?void 0:r.call(i,{}))==null?[]:n}},set:(e,n,r)=>{(0,t.set)(e,n,r)},del:(e,n)=>(0,t.del)(e,n),registerDirective:(e,n)=>{t.default.directive(e,n)},isComponent:e=>typeof e==`function`||!!e&&typeof e==`object`&&(`render`in e||`setup`in e||`template`in e),normalizeComponent:e=>{var t;return(t=e.extendOptions)==null?e:t},wrapTag:oi,modelOf(e){var t,n;let r=ti(e,`model`);return{prop:(t=r==null?void 0:r.prop)==null?`value`:t,event:(n=r==null?void 0:r.event)==null?`input`:n}},unmountedHook:e=>({"onHook:destroyed":e}),refsOf:e=>e.$refs,onCreated(e){var n;let r=(0,t.getCurrentInstance)().proxy;r.$options.created=[...(n=r.$options.created)==null?[]:n,e]},instanceId:e=>e._uid,isAlive:e=>!e._isDestroyed,domNodesOf(e){let t=e.$el;return!t||t.nodeType===8||t.nodeType===3&&!t.nodeValue?null:[t]},mount(e,n,r,i){let a=new t.default({router:i==null?void 0:i.raw,render:t=>t(e,{props:n})}).$mount(r);return{unmount:()=>a.$destroy()}}};g(si),e.AssetLoader=_e,e.BlockRenderer=Ir,e.ComponentRenderer=Lr,e.EXPRESSION_TYPE=tn,e.PageRenderer=Fr,e.RENDERER_COMPS=Rr,e.Renderer=qr,e.RendererConfig=zr,e.StylePoint=ge,e.accessLibrary=X,e.assetItem=me,e.buildComponents=un,e.buildUtils=dn,e.camelize=F,e.clearExpressionCache=Me,e.componentSchemaOf=an,e.createDefer=se,e.declaredOptions=Ur,e.ensureArray=w,e.evaluateExpression=Ae,e.evaluateScript=ce,e.findComponent=cn,e.getAdapter=y,e.getExpressionCacheSize=je,e.getI18n=Zt,e.getRendererContextKey=b,e.getRouterAdapter=v,e.getSubComponent=sn,e.inSameDomain=De,e.isAssetBundle=pe,e.isAssetItem=fe,e.isCSSUrl=ie,e.isComponentSchema=rn,e.isDOMText=$t,e.isESModule=re,e.isElement=ae,e.isFunction=M,e.isI18nData=Qt,e.isJSExpression=W,e.isJSFunction=G,e.isJSSlot=K,e.isLifecycleKey=_r,e.isNil=A,e.isNodeSchema=en,e.isObject=N,e.isPlainObject=P,e.isPromise=ne,e.isRuntimeScope=Q,e.isScopedSlot=f,e.isString=j,e.loadScript=le,e.lowCodeComponent=Jr,e.lowerFirst=oe,e.markScopedSlot=d,e.mergeScope=Ln,e.parseExpression=q,e.parseI18n=nn,e.parseSchema=J,e.parseSlotScope=Y,e.rendererConfig=Br,e.rendererProps=C,e.rewriteThis=Ce,e.schemaComponent=Gr,e.setAdapter=g,e.setRouterAdapter=_,e.setupDesignerEnvironment=ve,e.slotChildren=p,e.toDisplayString=Ne,e.useLeaf=Ar,e.useRenderer=jr,e.useRendererContext=x,e.vue2Adapter=si});
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import Vue, { defineComponent, del, getCurrentInstance, h as h$1, set } from "vue";
|
|
2
|
+
import { setAdapter } from "@cdlab996/lowcode-vue-core/runtime";
|
|
3
|
+
import { camelize, isScopedSlot, slotChildren } from "@cdlab996/lowcode-vue-core";
|
|
4
|
+
// \0rolldown/runtime.js
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __exportAll = (all, flags) => {
|
|
10
|
+
let target = Object.setPrototypeOf({}, null);
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
if (!(flags & 1)) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
+
return flags & 2 ? target : Object.preventExtensions(target);
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
|
+
key = keys[i];
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
22
|
+
get: ((k) => from[k]).bind(null, key),
|
|
23
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
+
// src/vnode-data.ts
|
|
30
|
+
const DIRECTIVE = /^v-([\w-]+)(:\w+)?((\.\w+)*)$/;
|
|
31
|
+
const EVENT = /^on[A-Z]/;
|
|
32
|
+
const PASS_THROUGH = [
|
|
33
|
+
"attrs",
|
|
34
|
+
"domProps",
|
|
35
|
+
"nativeOn"
|
|
36
|
+
];
|
|
37
|
+
/**
|
|
38
|
+
* Reads an option from a component: `comp.options[name]` for a Vue.extend
|
|
39
|
+
* constructor, else `comp[name]`.
|
|
40
|
+
*/
|
|
41
|
+
function getComponentOption(comp, name) {
|
|
42
|
+
if (!comp || typeof comp === "string") return void 0;
|
|
43
|
+
const options = typeof comp === "function" ? comp.options : void 0;
|
|
44
|
+
return (options !== null && options !== void 0 ? options : comp)[name];
|
|
45
|
+
}
|
|
46
|
+
function getDeclaredProps(comp) {
|
|
47
|
+
const declared = getComponentOption(comp, "props");
|
|
48
|
+
if (!declared) return /* @__PURE__ */ new Set();
|
|
49
|
+
const names = Array.isArray(declared) ? declared : Object.keys(declared);
|
|
50
|
+
return new Set(names.map((name) => camelize(name)));
|
|
51
|
+
}
|
|
52
|
+
function toDirective(key, value) {
|
|
53
|
+
const match = key.match(DIRECTIVE);
|
|
54
|
+
return {
|
|
55
|
+
name: match[1],
|
|
56
|
+
rawName: key,
|
|
57
|
+
value,
|
|
58
|
+
arg: match[2],
|
|
59
|
+
directives: (match[3] || "").split(".").filter((s) => !!s).reduce((p, c) => {
|
|
60
|
+
p[c] = true;
|
|
61
|
+
return p;
|
|
62
|
+
}, {})
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Converts the renderer's flat, Vue 3 style props into Vue 2 VNodeData.
|
|
67
|
+
*
|
|
68
|
+
* - `key` / `ref` / `class` / `style` map to the same-named fields;
|
|
69
|
+
* - keys declared as props by `comp` map to `props`;
|
|
70
|
+
* - `onXxx` / `onUpdate:xxx` map to `on` (`xxx` / `update:xxx`);
|
|
71
|
+
* - `v-xxx[:arg][.mod]` keys map to `directives`;
|
|
72
|
+
* - everything else maps to `attrs`, except functions and non-null objects
|
|
73
|
+
* which are never written as DOM attributes;
|
|
74
|
+
* - plain-object `attrs` / `domProps` / `nativeOn` merge into the same-named
|
|
75
|
+
* fields, winning over generated entries;
|
|
76
|
+
* - every slot (including `default`) maps to `scopedSlots`, marked as
|
|
77
|
+
* `proxy` so it is exposed on `$slots` as well.
|
|
78
|
+
*/
|
|
79
|
+
function toVNodeData(comp, flatProps, slots) {
|
|
80
|
+
const declared = getDeclaredProps(comp);
|
|
81
|
+
const on = {};
|
|
82
|
+
const props = {};
|
|
83
|
+
const attrs = {};
|
|
84
|
+
const directives = [];
|
|
85
|
+
const data = {
|
|
86
|
+
on,
|
|
87
|
+
props,
|
|
88
|
+
attrs,
|
|
89
|
+
directives
|
|
90
|
+
};
|
|
91
|
+
Object.keys(flatProps).forEach((key) => {
|
|
92
|
+
const value = flatProps[key];
|
|
93
|
+
if (PASS_THROUGH.includes(key)) return;
|
|
94
|
+
if (key === "key" || key === "ref" || key === "class" || key === "style") data[key] = value;
|
|
95
|
+
else if (declared.has(camelize(key))) props[camelize(key)] = value;
|
|
96
|
+
else if (EVENT.test(key)) {
|
|
97
|
+
const name = key.slice(2);
|
|
98
|
+
on[name[0].toLowerCase() + name.slice(1)] = value;
|
|
99
|
+
} else if (DIRECTIVE.test(key)) directives.push(toDirective(key, value));
|
|
100
|
+
else if (typeof value !== "function" && (value === null || typeof value !== "object")) attrs[key] = value;
|
|
101
|
+
});
|
|
102
|
+
PASS_THROUGH.forEach((key) => {
|
|
103
|
+
const value = flatProps[key];
|
|
104
|
+
if (Object.prototype.toString.call(value) === "[object Object]") data[key] = {
|
|
105
|
+
...data[key],
|
|
106
|
+
...value
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
if (slots) {
|
|
110
|
+
const scopedSlots = {};
|
|
111
|
+
Object.keys(slots).forEach((name) => {
|
|
112
|
+
const slot = slots[name];
|
|
113
|
+
if (typeof slot === "function") {
|
|
114
|
+
slot.proxy = true;
|
|
115
|
+
scopedSlots[name] = slot;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
if (Object.keys(scopedSlots).length > 0) data.scopedSlots = scopedSlots;
|
|
119
|
+
}
|
|
120
|
+
return data;
|
|
121
|
+
}
|
|
122
|
+
// src/adapter.ts
|
|
123
|
+
function h(type, props, slots) {
|
|
124
|
+
const data = props !== null && props !== void 0 ? props : {};
|
|
125
|
+
if (typeof type === "string") return h$1(type, toVNodeData(type, data), slotChildren(slots));
|
|
126
|
+
const { default: defaultSlot, ...named } = slots !== null && slots !== void 0 ? slots : {};
|
|
127
|
+
if (defaultSlot && !isScopedSlot(defaultSlot)) return h$1(type, toVNodeData(type, data, named), defaultSlot());
|
|
128
|
+
return h$1(type, toVNodeData(type, data, slots));
|
|
129
|
+
}
|
|
130
|
+
/** Renders a native tag or functional component; slots become children. */
|
|
131
|
+
function wrapTag(tag) {
|
|
132
|
+
return defineComponent({ setup(_props, { attrs, listeners, slots }) {
|
|
133
|
+
return () => h$1(tag, {
|
|
134
|
+
attrs: { ...attrs },
|
|
135
|
+
on: listeners
|
|
136
|
+
}, slotChildren(slots));
|
|
137
|
+
} });
|
|
138
|
+
}
|
|
139
|
+
const vue2Adapter = {
|
|
140
|
+
version: 2,
|
|
141
|
+
h,
|
|
142
|
+
text: (value) => Vue.prototype._v(value),
|
|
143
|
+
Fragment: defineComponent({
|
|
144
|
+
name: "Fragment",
|
|
145
|
+
setup(_props, { slots }) {
|
|
146
|
+
return () => {
|
|
147
|
+
var _slots$default;
|
|
148
|
+
return h$1("div", (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots));
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}),
|
|
152
|
+
PassThrough: {
|
|
153
|
+
name: "PassThrough",
|
|
154
|
+
functional: true,
|
|
155
|
+
render(_h, ctx) {
|
|
156
|
+
var _ctx$scopedSlots$defa, _ctx$scopedSlots$defa2, _ctx$scopedSlots;
|
|
157
|
+
return (_ctx$scopedSlots$defa = (_ctx$scopedSlots$defa2 = (_ctx$scopedSlots = ctx.scopedSlots).default) === null || _ctx$scopedSlots$defa2 === void 0 ? void 0 : _ctx$scopedSlots$defa2.call(_ctx$scopedSlots, {})) !== null && _ctx$scopedSlots$defa !== void 0 ? _ctx$scopedSlots$defa : [];
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
set: (target, key, value) => {
|
|
161
|
+
set(target, key, value);
|
|
162
|
+
},
|
|
163
|
+
del: (target, key) => del(target, key),
|
|
164
|
+
registerDirective: (name, directive) => {
|
|
165
|
+
Vue.directive(name, directive);
|
|
166
|
+
},
|
|
167
|
+
isComponent: (value) => typeof value === "function" || !!value && typeof value === "object" && ("render" in value || "setup" in value || "template" in value),
|
|
168
|
+
normalizeComponent: (component) => {
|
|
169
|
+
var _extendOptions;
|
|
170
|
+
return (_extendOptions = component.extendOptions) !== null && _extendOptions !== void 0 ? _extendOptions : component;
|
|
171
|
+
},
|
|
172
|
+
wrapTag,
|
|
173
|
+
modelOf(component) {
|
|
174
|
+
var _model$prop, _model$event;
|
|
175
|
+
const model = getComponentOption(component, "model");
|
|
176
|
+
return {
|
|
177
|
+
prop: (_model$prop = model === null || model === void 0 ? void 0 : model.prop) !== null && _model$prop !== void 0 ? _model$prop : "value",
|
|
178
|
+
event: (_model$event = model === null || model === void 0 ? void 0 : model.event) !== null && _model$event !== void 0 ? _model$event : "input"
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
unmountedHook: (callback) => ({ "onHook:destroyed": callback }),
|
|
182
|
+
refsOf: (instance) => instance.$refs,
|
|
183
|
+
onCreated(callback) {
|
|
184
|
+
var _vm$$options$created;
|
|
185
|
+
const vm = getCurrentInstance().proxy;
|
|
186
|
+
vm.$options.created = [...(_vm$$options$created = vm.$options.created) !== null && _vm$$options$created !== void 0 ? _vm$$options$created : [], callback];
|
|
187
|
+
},
|
|
188
|
+
instanceId: (instance) => instance._uid,
|
|
189
|
+
isAlive: (instance) => !instance._isDestroyed,
|
|
190
|
+
domNodesOf(instance) {
|
|
191
|
+
const el = instance.$el;
|
|
192
|
+
if (!el || el.nodeType === 8 || el.nodeType === 3 && !el.nodeValue) return null;
|
|
193
|
+
return [el];
|
|
194
|
+
},
|
|
195
|
+
mount(root, props, el, router) {
|
|
196
|
+
const vm = new Vue({
|
|
197
|
+
router: router === null || router === void 0 ? void 0 : router.raw,
|
|
198
|
+
render: (create) => create(root, { props })
|
|
199
|
+
}).$mount(el);
|
|
200
|
+
return { unmount: () => vm.$destroy() };
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
// src/runtime.ts
|
|
204
|
+
var runtime_exports = /* @__PURE__ */ __exportAll({ vue2Adapter: () => vue2Adapter }, 2);
|
|
205
|
+
import * as import__cdlab996_lowcode_vue_core_runtime from "@cdlab996/lowcode-vue-core/runtime";
|
|
206
|
+
__reExport(runtime_exports, import__cdlab996_lowcode_vue_core_runtime);
|
|
207
|
+
setAdapter(vue2Adapter);
|
|
208
|
+
export { vue2Adapter as n, runtime_exports as t };
|
package/dist/runtime.mjs
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
body,
|
|
2
|
+
html {
|
|
3
|
+
display: block;
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
background: white;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
html.engine-design-mode {
|
|
10
|
+
padding-bottom: 0;
|
|
11
|
+
}
|
|
12
|
+
html.engine-cursor-move,
|
|
13
|
+
html.engine-cursor-move * {
|
|
14
|
+
cursor: grabbing !important;
|
|
15
|
+
}
|
|
16
|
+
html.engine-cursor-copy,
|
|
17
|
+
html.engine-cursor-copy * {
|
|
18
|
+
cursor: copy !important;
|
|
19
|
+
}
|
|
20
|
+
html.engine-cursor-ew-resize,
|
|
21
|
+
html.engine-cursor-ew-resize * {
|
|
22
|
+
cursor: ew-resize !important;
|
|
23
|
+
}
|
|
24
|
+
html.lc-cursor-dragging,
|
|
25
|
+
html.lc-cursor-dragging * {
|
|
26
|
+
cursor: move !important;
|
|
27
|
+
}
|
|
28
|
+
html.lc-cursor-x-resizing,
|
|
29
|
+
html.lc-cursor-x-resizing * {
|
|
30
|
+
cursor: col-resize;
|
|
31
|
+
}
|
|
32
|
+
html.lc-cursor-y-resizing,
|
|
33
|
+
html.lc-cursor-y-resizing * {
|
|
34
|
+
cursor: row-resize;
|
|
35
|
+
}
|
|
36
|
+
html.lc-cursor-copy,
|
|
37
|
+
html.lc-cursor-copy * {
|
|
38
|
+
cursor: copy !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
::-webkit-scrollbar {
|
|
42
|
+
width: 5px;
|
|
43
|
+
height: 5px;
|
|
44
|
+
}
|
|
45
|
+
::-webkit-scrollbar-thumb {
|
|
46
|
+
background-color: rgb(0 0 0 / 30%);
|
|
47
|
+
border-radius: 5px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.lc-container {
|
|
51
|
+
height: 100%;
|
|
52
|
+
}
|
|
53
|
+
.lc-container:empty {
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
min-width: 140px;
|
|
57
|
+
height: 66px;
|
|
58
|
+
max-height: 100%;
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
color: #a7b1bd;
|
|
61
|
+
text-align: center;
|
|
62
|
+
background: #f2f3f5;
|
|
63
|
+
outline: 1px dashed rgb(31 56 88 / 20%);
|
|
64
|
+
outline-offset: -1px !important;
|
|
65
|
+
}
|
|
66
|
+
.lc-container:empty::before {
|
|
67
|
+
z-index: 1;
|
|
68
|
+
width: 100%;
|
|
69
|
+
font-size: 14px;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
content: "\62D6\62FD\7EC4\4EF6\6216\6A21\677F\5230\8FD9\91CC";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.lc-container-placeholder {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
min-height: 60px;
|
|
81
|
+
color: rgb(167 177 189);
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
background-color: rgb(240 240 240);
|
|
84
|
+
border: 1px dotted;
|
|
85
|
+
}
|
|
86
|
+
.lc-container-placeholder.lc-container-locked {
|
|
87
|
+
background: #eccfcf;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
body.engine-document::after,
|
|
91
|
+
body.engine-document::before {
|
|
92
|
+
display: table;
|
|
93
|
+
content: "";
|
|
94
|
+
}
|
|
95
|
+
body.engine-document::after {
|
|
96
|
+
clear: both;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.engine-live-editing {
|
|
100
|
+
outline: none;
|
|
101
|
+
box-shadow: 0 0 0 2px rgb(102 188 92);
|
|
102
|
+
cursor: text;
|
|
103
|
+
user-select: text;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
#app {
|
|
107
|
+
height: 100vh;
|
|
108
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.LCVueRenderer={},e.Vue))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e};t=((e,t,i)=>(i=e==null?{}:n(o(e)),l(r(i,`default`,{value:e,enumerable:!0}),e)))(t,1);
|
|
2
|
+
/*!
|
|
3
|
+
* vue-router v3.6.5
|
|
4
|
+
* (c) 2022 Evan You
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
function u(e,t){for(var n in t)e[n]=t[n];return e}var d=/[!'()*]/g,f=function(e){return`%`+e.charCodeAt(0).toString(16)},p=/%2C/g,m=function(e){return encodeURIComponent(e).replace(d,f).replace(p,`,`)};function h(e){try{return decodeURIComponent(e)}catch(e){}return e}function g(e,t,n){t===void 0&&(t={});var r=n||v,i;try{i=r(e||``)}catch(e){i={}}for(var a in t){var o=t[a];i[a]=Array.isArray(o)?o.map(_):_(o)}return i}var _=function(e){return e==null||typeof e==`object`?e:String(e)};function v(e){var t={};return e=e.trim().replace(/^(\?|#|&)/,``),e&&e.split(`&`).forEach(function(e){var n=e.replace(/\+/g,` `).split(`=`),r=h(n.shift()),i=n.length>0?h(n.join(`=`)):null;t[r]===void 0?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]}),t}function y(e){var t=e?Object.keys(e).map(function(t){var n=e[t];if(n===void 0)return``;if(n===null)return m(t);if(Array.isArray(n)){var r=[];return n.forEach(function(e){e!==void 0&&(e===null?r.push(m(t)):r.push(m(t)+`=`+m(e)))}),r.join(`&`)}return m(t)+`=`+m(n)}).filter(function(e){return e.length>0}).join(`&`):null;return t?`?`+t:``}var b=/\/?$/;function x(e,t,n,r){var i=r&&r.options.stringifyQuery,a=t.query||{};try{a=S(a)}catch(e){}var o={name:t.name||e&&e.name,meta:e&&e.meta||{},path:t.path||`/`,hash:t.hash||``,query:a,params:t.params||{},fullPath:T(t,i),matched:e?w(e):[]};return n&&(o.redirectedFrom=T(n,i)),Object.freeze(o)}function S(e){if(Array.isArray(e))return e.map(S);if(e&&typeof e==`object`){var t={};for(var n in e)t[n]=S(e[n]);return t}return e}var C=x(null,{path:`/`});function w(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function T(e,t){var n=e.path,r=e.query;r===void 0&&(r={});var i=e.hash;return i===void 0&&(i=``),(n||`/`)+(t||y)(r)+i}function ee(e,t,n){return t===C?e===t:t?e.path&&t.path?e.path.replace(b,``)===t.path.replace(b,``)&&(n||e.hash===t.hash&&E(e.query,t.query)):e.name&&t.name?e.name===t.name&&(n||e.hash===t.hash&&E(e.query,t.query)&&E(e.params,t.params)):!1:!1}function E(e,t){if(e===void 0&&(e={}),t===void 0&&(t={}),!e||!t)return e===t;var n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every(function(n,i){var a=e[n];if(r[i]!==n)return!1;var o=t[n];return a==null||o==null?a===o:typeof a==`object`&&typeof o==`object`?E(a,o):String(a)===String(o)})}function te(e,t){return e.path.replace(b,`/`).indexOf(t.path.replace(b,`/`))===0&&(!t.hash||e.hash===t.hash)&&D(e.query,t.query)}function D(e,t){for(var n in t)if(!(n in e))return!1;return!0}function O(e){for(var t=0;t<e.matched.length;t++){var n=e.matched[t];for(var r in n.instances){var i=n.instances[r],a=n.enteredCbs[r];if(i&&a){delete n.enteredCbs[r];for(var o=0;o<a.length;o++)i._isBeingDestroyed||a[o](i)}}}}var ne={name:`RouterView`,functional:!0,props:{name:{type:String,default:`default`}},render:function(e,t){var n=t.props,r=t.children,i=t.parent,a=t.data;a.routerView=!0;for(var o=i.$createElement,s=n.name,c=i.$route,l=i._routerViewCache||(i._routerViewCache={}),d=0,f=!1;i&&i._routerRoot!==i;){var p=i.$vnode?i.$vnode.data:{};p.routerView&&d++,p.keepAlive&&i._directInactive&&i._inactive&&(f=!0),i=i.$parent}if(a.routerViewDepth=d,f){var m=l[s],h=m&&m.component;return h?(m.configProps&&re(h,a,m.route,m.configProps),o(h,a,r)):o()}var g=c.matched[d],_=g&&g.components[s];if(!g||!_)return l[s]=null,o();l[s]={component:_},a.registerRouteInstance=function(e,t){var n=g.instances[s];(t&&n!==e||!t&&n===e)&&(g.instances[s]=t)},(a.hook||(a.hook={})).prepatch=function(e,t){g.instances[s]=t.componentInstance},a.hook.init=function(e){e.data.keepAlive&&e.componentInstance&&e.componentInstance!==g.instances[s]&&(g.instances[s]=e.componentInstance),O(c)};var v=g.props&&g.props[s];return v&&(u(l[s],{route:c,configProps:v}),re(_,a,c,v)),o(_,a,r)}};function re(e,t,n,r){var i=t.props=ie(n,r);if(i){i=t.props=u({},i);var a=t.attrs=t.attrs||{};for(var o in i)e.props&&o in e.props||(a[o]=i[o],delete i[o])}}function ie(e,t){switch(typeof t){case`undefined`:return;case`object`:return t;case`function`:return t(e);case`boolean`:return t?e.params:void 0}}function ae(e,t,n){var r=e.charAt(0);if(r===`/`)return e;if(r===`?`||r===`#`)return t+e;var i=t.split(`/`);n&&i[i.length-1]||i.pop();for(var a=e.replace(/^\//,``).split(`/`),o=0;o<a.length;o++){var s=a[o];s===`..`?i.pop():s!==`.`&&i.push(s)}return i[0]!==``&&i.unshift(``),i.join(`/`)}function oe(e){var t=``,n=``,r=e.indexOf(`#`);r>=0&&(t=e.slice(r),e=e.slice(0,r));var i=e.indexOf(`?`);return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{path:e,query:n,hash:t}}function k(e){return e.replace(/\/(?:\s*\/)+/g,`/`)}var se=Array.isArray||function(e){return Object.prototype.toString.call(e)==`[object Array]`},A=Ee,ce=pe,le=me,ue=_e,de=Te,fe=/* @__PURE__ */ RegExp(`(\\\\.)|([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))`,`g`);function pe(e,t){for(var n=[],r=0,i=0,a=``,o=t&&t.delimiter||`/`,s;(s=fe.exec(e))!=null;){var c=s[0],l=s[1],u=s.index;if(a+=e.slice(i,u),i=u+c.length,l)a+=l[1];else{var d=e[i],f=s[2],p=s[3],m=s[4],h=s[5],g=s[6],_=s[7];a&&(n.push(a),a=``);var v=f!=null&&d!=null&&d!==f,y=g===`+`||g===`*`,b=g===`?`||g===`*`,x=s[2]||o,S=m||h;n.push({name:p||r++,prefix:f||``,delimiter:x,optional:b,repeat:y,partial:v,asterisk:!!_,pattern:S?ye(S):_?`.*`:`[^`+ve(x)+`]+?`})}}return i<e.length&&(a+=e.substr(i)),a&&n.push(a),n}function me(e,t){return _e(pe(e,t),t)}function he(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return`%`+e.charCodeAt(0).toString(16).toUpperCase()})}function ge(e){return encodeURI(e).replace(/[?#]/g,function(e){return`%`+e.charCodeAt(0).toString(16).toUpperCase()})}function _e(e,t){for(var n=Array(e.length),r=0;r<e.length;r++)typeof e[r]==`object`&&(n[r]=RegExp(`^(?:`+e[r].pattern+`)$`,xe(t)));return function(t,r){for(var i=``,a=t||{},o=(r||{}).pretty?he:encodeURIComponent,s=0;s<e.length;s++){var c=e[s];if(typeof c==`string`)i+=c;else{var l=a[c.name],u;if(l==null){if(c.optional){c.partial&&(i+=c.prefix);continue}throw TypeError(`Expected "`+c.name+`" to be defined`)}if(se(l)){if(!c.repeat)throw TypeError(`Expected "`+c.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(l.length===0){if(c.optional)continue;throw TypeError(`Expected "`+c.name+`" to not be empty`)}for(var d=0;d<l.length;d++){if(u=o(l[d]),!n[s].test(u))throw TypeError(`Expected all "`+c.name+`" to match "`+c.pattern+'", but received `'+JSON.stringify(u)+"`");i+=(d===0?c.prefix:c.delimiter)+u}}else{if(u=c.asterisk?ge(l):o(l),!n[s].test(u))throw TypeError(`Expected "`+c.name+`" to match "`+c.pattern+`", but received "`+u+`"`);i+=c.prefix+u}}}return i}}function ve(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,`\\$1`)}function ye(e){return e.replace(/([=!:$\/()])/g,`\\$1`)}function be(e,t){return e.keys=t,e}function xe(e){return e&&e.sensitive?``:`i`}function Se(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return be(e,t)}function Ce(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(Ee(e[i],t,n).source);return be(RegExp(`(?:`+r.join(`|`)+`)`,xe(n)),t)}function we(e,t,n){return Te(pe(e,n),t,n)}function Te(e,t,n){se(t)||(n=t||n,t=[]),n=n||{};for(var r=n.strict,i=n.end!==!1,a=``,o=0;o<e.length;o++){var s=e[o];if(typeof s==`string`)a+=ve(s);else{var c=ve(s.prefix),l=`(?:`+s.pattern+`)`;t.push(s),s.repeat&&(l+=`(?:`+c+l+`)*`),l=s.optional?s.partial?c+`(`+l+`)?`:`(?:`+c+`(`+l+`))?`:c+`(`+l+`)`,a+=l}}var u=ve(n.delimiter||`/`),d=a.slice(-u.length)===u;return r||(a=(d?a.slice(0,-u.length):a)+`(?:`+u+`(?=$))?`),a+=i?`$`:r&&d?``:`(?=`+u+`|$)`,be(RegExp(`^`+a,xe(n)),t)}function Ee(e,t,n){return se(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?Se(e,t):se(e)?Ce(e,t,n):we(e,t,n)}A.parse=ce,A.compile=le,A.tokensToFunction=ue,A.tokensToRegExp=de;var De=Object.create(null);function Oe(e,t,n){t=t||{};try{var r=De[e]||(De[e]=A.compile(e));return typeof t.pathMatch==`string`&&(t[0]=t.pathMatch),r(t,{pretty:!0})}catch(e){return``}finally{delete t[0]}}function ke(e,t,n,r){var i=typeof e==`string`?{path:e}:e;if(i._normalized)return i;if(i.name){i=u({},e);var a=i.params;return a&&typeof a==`object`&&(i.params=u({},a)),i}if(!i.path&&i.params&&t){i=u({},i),i._normalized=!0;var o=u(u({},t.params),i.params);if(t.name)i.name=t.name,i.params=o;else if(t.matched.length){var s=t.matched[t.matched.length-1].path;i.path=Oe(s,o,`path `+t.path)}return i}var c=oe(i.path||``),l=t&&t.path||`/`,d=c.path?ae(c.path,l,n||i.append):l,f=g(c.query,i.query,r&&r.options.parseQuery),p=i.hash||c.hash;return p&&p.charAt(0)!==`#`&&(p=`#`+p),{_normalized:!0,path:d,query:f,hash:p}}var Ae=[String,Object],je=[String,Array],Me=function(){},Ne={name:`RouterLink`,props:{to:{type:Ae,required:!0},tag:{type:String,default:`a`},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:`page`},event:{type:je,default:`click`}},render:function(e){var t=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),a=i.location,o=i.route,s=i.href,c={},l=n.options.linkActiveClass,d=n.options.linkExactActiveClass,f=l==null?`router-link-active`:l,p=d==null?`router-link-exact-active`:d,m=this.activeClass==null?f:this.activeClass,h=this.exactActiveClass==null?p:this.exactActiveClass,g=o.redirectedFrom?x(null,ke(o.redirectedFrom),null,n):o;c[h]=ee(r,g,this.exactPath),c[m]=this.exact||this.exactPath?c[h]:te(r,g);var _=c[h]?this.ariaCurrentValue:null,v=function(e){Pe(e)&&(t.replace?n.replace(a,Me):n.push(a,Me))},y={click:Pe};Array.isArray(this.event)?this.event.forEach(function(e){y[e]=v}):y[this.event]=v;var b={class:c},S=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:s,route:o,navigate:v,isActive:c[m],isExactActive:c[h]});if(S){if(S.length===1)return S[0];if(S.length>1||!S.length)return S.length===0?e():e(`span`,{},S)}if(this.tag===`a`)b.on=y,b.attrs={href:s,"aria-current":_};else{var C=Fe(this.$slots.default);if(C){C.isStatic=!1;var w=C.data=u({},C.data);for(var T in w.on=w.on||{},w.on){var E=w.on[T];T in y&&(w.on[T]=Array.isArray(E)?E:[E])}for(var D in y)D in w.on?w.on[D].push(y[D]):w.on[D]=v;var O=C.data.attrs=u({},C.data.attrs);O.href=s,O[`aria-current`]=_}else b.on=y}return e(this.tag,b,this.$slots.default)}};function Pe(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Fe(e){if(e){for(var t,n=0;n<e.length;n++)if(t=e[n],t.tag===`a`||t.children&&(t=Fe(t.children)))return t}}var Ie;function Le(e){if(!(Le.installed&&Ie===e)){Le.installed=!0,Ie=e;var t=function(e){return e!==void 0},n=function(e,n){var r=e.$options._parentVnode;t(r)&&t(r=r.data)&&t(r=r.registerRouteInstance)&&r(e,n)};e.mixin({beforeCreate:function(){t(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,`_route`,this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,n(this,this)},destroyed:function(){n(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component(`RouterView`,ne),e.component(`RouterLink`,Ne);var r=e.config.optionMergeStrategies;r.beforeRouteEnter=r.beforeRouteLeave=r.beforeRouteUpdate=r.created}}var Re=typeof window<`u`;function ze(e,t,n,r,i){var a=t||[],o=n||Object.create(null),s=r||Object.create(null);e.forEach(function(e){Be(a,o,s,e,i)});for(var c=0,l=a.length;c<l;c++)a[c]===`*`&&(a.push(a.splice(c,1)[0]),l--,c--);return{pathList:a,pathMap:o,nameMap:s}}function Be(e,t,n,r,i,a){var o=r.path,s=r.name,c=r.pathToRegexpOptions||{},l=He(o,i,c.strict);typeof r.caseSensitive==`boolean`&&(c.sensitive=r.caseSensitive);var u={path:l,regex:Ve(l,c),components:r.components||{default:r.component},alias:r.alias?typeof r.alias==`string`?[r.alias]:r.alias:[],instances:{},enteredCbs:{},name:s,parent:i,matchAs:a,redirect:r.redirect,beforeEnter:r.beforeEnter,meta:r.meta||{},props:r.props==null?{}:r.components?r.props:{default:r.props}};if(r.children&&r.children.forEach(function(r){Be(e,t,n,r,u,a?k(a+`/`+r.path):void 0)}),t[u.path]||(e.push(u.path),t[u.path]=u),r.alias!==void 0)for(var d=Array.isArray(r.alias)?r.alias:[r.alias],f=0;f<d.length;++f){var p=d[f];Be(e,t,n,{path:p,children:r.children},i,u.path||`/`)}s&&(n[s]||(n[s]=u))}function Ve(e,t){return A(e,[],t)}function He(e,t,n){return n||(e=e.replace(/\/$/,``)),e[0]===`/`||t==null?e:k(t.path+`/`+e)}function Ue(e,t){var n=ze(e),r=n.pathList,i=n.pathMap,a=n.nameMap;function o(e){ze(e,r,i,a)}function s(e,t){var n=typeof e==`object`?void 0:a[e];ze([t||e],r,i,a,n),n&&n.alias.length&&ze(n.alias.map(function(e){return{path:e,children:[t]}}),r,i,a,n)}function c(){return r.map(function(e){return i[e]})}function l(e,n,o){var s=ke(e,n,!1,t),c=s.name;if(c){var l=a[c];if(!l)return f(null,s);var u=l.regex.keys.filter(function(e){return!e.optional}).map(function(e){return e.name});if(typeof s.params!=`object`&&(s.params={}),n&&typeof n.params==`object`)for(var d in n.params)!(d in s.params)&&u.indexOf(d)>-1&&(s.params[d]=n.params[d]);return s.path=Oe(l.path,s.params,`named route "`+c+`"`),f(l,s,o)}if(s.path){s.params={};for(var p=0;p<r.length;p++){var m=i[r[p]];if(We(m.regex,s.path,s.params))return f(m,s,o)}}return f(null,s)}function u(e,n){var r=e.redirect,i=typeof r==`function`?r(x(e,n,null,t)):r;if(typeof i==`string`&&(i={path:i}),!i||typeof i!=`object`)return f(null,n);var o=i,s=o.name,c=o.path,u=n.query,d=n.hash,p=n.params;if(u=o.hasOwnProperty(`query`)?o.query:u,d=o.hasOwnProperty(`hash`)?o.hash:d,p=o.hasOwnProperty(`params`)?o.params:p,s)return a[s],l({_normalized:!0,name:s,query:u,hash:d,params:p},void 0,n);if(c){var m=Ge(c,e);return l({_normalized:!0,path:Oe(m,p,`redirect route with path "`+m+`"`),query:u,hash:d},void 0,n)}return f(null,n)}function d(e,t,n){var r=l({_normalized:!0,path:Oe(n,t.params,`aliased route with path "`+n+`"`)});if(r){var i=r.matched,a=i[i.length-1];return t.params=r.params,f(a,t)}return f(null,t)}function f(e,n,r){return e&&e.redirect?u(e,r||n):e&&e.matchAs?d(e,n,e.matchAs):x(e,n,r,t)}return{match:l,addRoute:s,getRoutes:c,addRoutes:o}}function We(e,t,n){var r=t.match(e);if(!r)return!1;if(!n)return!0;for(var i=1,a=r.length;i<a;++i){var o=e.keys[i-1];o&&(n[o.name||`pathMatch`]=typeof r[i]==`string`?h(r[i]):r[i])}return!0}function Ge(e,t){return ae(e,t.parent?t.parent.path:`/`,!0)}var Ke=Re&&window.performance&&window.performance.now?window.performance:Date;function qe(){return Ke.now().toFixed(3)}var Je=qe();function Ye(){return Je}function Xe(e){return Je=e}var Ze=Object.create(null);function Qe(){`scrollRestoration`in window.history&&(window.history.scrollRestoration=`manual`);var e=window.location.protocol+`//`+window.location.host,t=window.location.href.replace(e,``),n=u({},window.history.state);return n.key=Ye(),window.history.replaceState(n,``,t),window.addEventListener(`popstate`,et),function(){window.removeEventListener(`popstate`,et)}}function j(e,t,n,r){if(e.app){var i=e.options.scrollBehavior;i&&e.app.$nextTick(function(){var a=tt(),o=i.call(e,t,n,r?a:null);o&&(typeof o.then==`function`?o.then(function(e){st(e,a)}).catch(function(e){}):st(o,a))})}}function $e(){var e=Ye();e&&(Ze[e]={x:window.pageXOffset,y:window.pageYOffset})}function et(e){$e(),e.state&&e.state.key&&Xe(e.state.key)}function tt(){var e=Ye();if(e)return Ze[e]}function nt(e,t){var n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:r.left-n.left-t.x,y:r.top-n.top-t.y}}function rt(e){return M(e.x)||M(e.y)}function it(e){return{x:M(e.x)?e.x:window.pageXOffset,y:M(e.y)?e.y:window.pageYOffset}}function at(e){return{x:M(e.x)?e.x:0,y:M(e.y)?e.y:0}}function M(e){return typeof e==`number`}var ot=/^#\d/;function st(e,t){var n=typeof e==`object`;if(n&&typeof e.selector==`string`){var r=ot.test(e.selector)?document.getElementById(e.selector.slice(1)):document.querySelector(e.selector);if(r){var i=e.offset&&typeof e.offset==`object`?e.offset:{};i=at(i),t=nt(r,i)}else rt(e)&&(t=it(e))}else n&&rt(e)&&(t=it(e));t&&(`scrollBehavior`in document.documentElement.style?window.scrollTo({left:t.x,top:t.y,behavior:e.behavior}):window.scrollTo(t.x,t.y))}var N=Re&&(function(){var e=window.navigator.userAgent;return(e.indexOf(`Android 2.`)!==-1||e.indexOf(`Android 4.0`)!==-1)&&e.indexOf(`Mobile Safari`)!==-1&&e.indexOf(`Chrome`)===-1&&e.indexOf(`Windows Phone`)===-1?!1:window.history&&typeof window.history.pushState==`function`})();function ct(e,t){$e();var n=window.history;try{if(t){var r=u({},n.state);r.key=Ye(),n.replaceState(r,``,e)}else n.pushState({key:Xe(qe())},``,e)}catch(n){window.location[t?`replace`:`assign`](e)}}function lt(e){ct(e,!0)}var P={redirected:2,aborted:4,cancelled:8,duplicated:16};function ut(e,t){return mt(e,t,P.redirected,`Redirected when going from "`+e.fullPath+`" to "`+gt(t)+`" via a navigation guard.`)}function dt(e,t){var n=mt(e,t,P.duplicated,`Avoided redundant navigation to current location: "`+e.fullPath+`".`);return n.name=`NavigationDuplicated`,n}function ft(e,t){return mt(e,t,P.cancelled,`Navigation cancelled from "`+e.fullPath+`" to "`+t.fullPath+`" with a new navigation.`)}function pt(e,t){return mt(e,t,P.aborted,`Navigation aborted from "`+e.fullPath+`" to "`+t.fullPath+`" via a navigation guard.`)}function mt(e,t,n,r){var i=Error(r);return i._isRouter=!0,i.from=e,i.to=t,i.type=n,i}var ht=[`params`,`query`,`hash`];function gt(e){if(typeof e==`string`)return e;if(`path`in e)return e.path;var t={};return ht.forEach(function(n){n in e&&(t[n]=e[n])}),JSON.stringify(t,null,2)}function _t(e){return Object.prototype.toString.call(e).indexOf(`Error`)>-1}function vt(e,t){return _t(e)&&e._isRouter&&(t==null||e.type===t)}function yt(e,t,n){var r=function(i){i>=e.length?n():e[i]?t(e[i],function(){r(i+1)}):r(i+1)};r(0)}function bt(e){return function(t,n,r){var i=!1,a=0,o=null;xt(e,function(e,t,n,s){if(typeof e==`function`&&e.cid===void 0){i=!0,a++;var c=Tt(function(t){wt(t)&&(t=t.default),e.resolved=typeof t==`function`?t:Ie.extend(t),n.components[s]=t,a--,a<=0&&r()}),l=Tt(function(e){var t=`Failed to resolve async component `+s+`: `+e;o||(o=_t(e)?e:Error(t),r(o))}),u;try{u=e(c,l)}catch(e){l(e)}if(u){if(typeof u.then==`function`)u.then(c,l);else{var d=u.component;d&&typeof d.then==`function`&&d.then(c,l)}}}}),i||r()}}function xt(e,t){return St(e.map(function(e){return Object.keys(e.components).map(function(n){return t(e.components[n],e.instances[n],e,n)})}))}function St(e){return Array.prototype.concat.apply([],e)}var Ct=typeof Symbol==`function`&&typeof Symbol.toStringTag==`symbol`;function wt(e){return e.__esModule||Ct&&e[Symbol.toStringTag]===`Module`}function Tt(e){var t=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!t)return t=!0,e.apply(this,n)}}var F=function(e,t){this.router=e,this.base=Et(t),this.current=C,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};F.prototype.listen=function(e){this.cb=e},F.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},F.prototype.onError=function(e){this.errorCbs.push(e)},F.prototype.transitionTo=function(e,t,n){var r=this,i;try{i=this.router.match(e,this.current)}catch(e){throw this.errorCbs.forEach(function(t){t(e)}),e}var a=this.current;this.confirmTransition(i,function(){r.updateRoute(i),t&&t(i),r.ensureURL(),r.router.afterHooks.forEach(function(e){e&&e(i,a)}),r.ready||(r.ready=!0,r.readyCbs.forEach(function(e){e(i)}))},function(e){n&&n(e),e&&!r.ready&&(vt(e,P.redirected)&&a===C||(r.ready=!0,r.readyErrorCbs.forEach(function(t){t(e)})))})},F.prototype.confirmTransition=function(e,t,n){var r=this,i=this.current;this.pending=e;var a=function(e){!vt(e)&&_t(e)&&(r.errorCbs.length?r.errorCbs.forEach(function(t){t(e)}):console.error(e)),n&&n(e)},o=e.matched.length-1,s=i.matched.length-1;if(ee(e,i)&&o===s&&e.matched[o]===i.matched[s])return this.ensureURL(),e.hash&&j(this.router,i,e,!1),a(dt(i,e));var c=Dt(this.current.matched,e.matched),l=c.updated,u=c.deactivated,d=c.activated,f=[].concat(At(u),this.router.beforeHooks,jt(l),d.map(function(e){return e.beforeEnter}),bt(d)),p=function(t,n){if(r.pending!==e)return a(ft(i,e));try{t(e,i,function(t){t===!1?(r.ensureURL(!0),a(pt(i,e))):_t(t)?(r.ensureURL(!0),a(t)):typeof t==`string`||typeof t==`object`&&(typeof t.path==`string`||typeof t.name==`string`)?(a(ut(i,e)),typeof t==`object`&&t.replace?r.replace(t):r.push(t)):n(t)})}catch(e){a(e)}};yt(f,p,function(){yt(Nt(d).concat(r.router.resolveHooks),p,function(){if(r.pending!==e)return a(ft(i,e));r.pending=null,t(e),r.router.app&&r.router.app.$nextTick(function(){O(e)})})})},F.prototype.updateRoute=function(e){this.current=e,this.cb&&this.cb(e)},F.prototype.setupListeners=function(){},F.prototype.teardown=function(){this.listeners.forEach(function(e){e()}),this.listeners=[],this.current=C,this.pending=null};function Et(e){if(!e){if(Re){var t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^https?:\/\/[^\/]+/,``)}else e=`/`}return e.charAt(0)!==`/`&&(e=`/`+e),e.replace(/\/$/,``)}function Dt(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n<r&&e[n]===t[n];n++);return{updated:t.slice(0,n),activated:t.slice(n),deactivated:e.slice(n)}}function Ot(e,t,n,r){var i=xt(e,function(e,r,i,a){var o=kt(e,t);if(o)return Array.isArray(o)?o.map(function(e){return n(e,r,i,a)}):n(o,r,i,a)});return St(r?i.reverse():i)}function kt(e,t){return typeof e!=`function`&&(e=Ie.extend(e)),e.options[t]}function At(e){return Ot(e,`beforeRouteLeave`,Mt,!0)}function jt(e){return Ot(e,`beforeRouteUpdate`,Mt)}function Mt(e,t){if(t)return function(){return e.apply(t,arguments)}}function Nt(e){return Ot(e,`beforeRouteEnter`,function(e,t,n,r){return Pt(e,n,r)})}function Pt(e,t,n){return function(r,i,a){return e(r,i,function(e){typeof e==`function`&&(t.enteredCbs[n]||(t.enteredCbs[n]=[]),t.enteredCbs[n].push(e)),a(e)})}}var Ft=/* @__PURE__ */ function(e){function t(t,n){e.call(this,t,n),this._startLocation=It(this.base)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router,n=t.options.scrollBehavior,r=N&&n;r&&this.listeners.push(Qe());var i=function(){var n=e.current,i=It(e.base);(e.current!==C||i!==e._startLocation)&&e.transitionTo(i,function(e){r&&j(t,e,n,!0)})};window.addEventListener(`popstate`,i),this.listeners.push(function(){window.removeEventListener(`popstate`,i)})}},t.prototype.go=function(e){window.history.go(e)},t.prototype.push=function(e,t,n){var r=this,i=this.current;this.transitionTo(e,function(e){ct(k(r.base+e.fullPath)),j(r.router,e,i,!1),t&&t(e)},n)},t.prototype.replace=function(e,t,n){var r=this,i=this.current;this.transitionTo(e,function(e){lt(k(r.base+e.fullPath)),j(r.router,e,i,!1),t&&t(e)},n)},t.prototype.ensureURL=function(e){if(It(this.base)!==this.current.fullPath){var t=k(this.base+this.current.fullPath);e?ct(t):lt(t)}},t.prototype.getCurrentLocation=function(){return It(this.base)},t}(F);function It(e){var t=window.location.pathname,n=t.toLowerCase(),r=e.toLowerCase();return e&&(n===r||n.indexOf(k(r+`/`))===0)&&(t=t.slice(e.length)),(t||`/`)+window.location.search+window.location.hash}var Lt=/* @__PURE__ */ function(e){function t(t,n,r){e.call(this,t,n),r&&Rt(this.base)||zt()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router.options.scrollBehavior,n=N&&t;n&&this.listeners.push(Qe());var r=function(){var t=e.current;zt()&&e.transitionTo(Bt(),function(r){n&&j(e.router,r,t,!0),N||Ut(r.fullPath)})},i=N?`popstate`:`hashchange`;window.addEventListener(i,r),this.listeners.push(function(){window.removeEventListener(i,r)})}},t.prototype.push=function(e,t,n){var r=this,i=this.current;this.transitionTo(e,function(e){Ht(e.fullPath),j(r.router,e,i,!1),t&&t(e)},n)},t.prototype.replace=function(e,t,n){var r=this,i=this.current;this.transitionTo(e,function(e){Ut(e.fullPath),j(r.router,e,i,!1),t&&t(e)},n)},t.prototype.go=function(e){window.history.go(e)},t.prototype.ensureURL=function(e){var t=this.current.fullPath;Bt()!==t&&(e?Ht(t):Ut(t))},t.prototype.getCurrentLocation=function(){return Bt()},t}(F);function Rt(e){var t=It(e);if(!/^\/#/.test(t))return window.location.replace(k(e+`/#`+t)),!0}function zt(){var e=Bt();return e.charAt(0)===`/`||(Ut(`/`+e),!1)}function Bt(){var e=window.location.href,t=e.indexOf(`#`);return t<0?``:(e=e.slice(t+1),e)}function Vt(e){var t=window.location.href,n=t.indexOf(`#`);return(n>=0?t.slice(0,n):t)+`#`+e}function Ht(e){N?ct(Vt(e)):window.location.hash=e}function Ut(e){N?lt(Vt(e)):window.location.replace(Vt(e))}var Wt=/* @__PURE__ */ function(e){function t(t,n){e.call(this,t,n),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(e,t,n){var r=this;this.transitionTo(e,function(e){r.stack=r.stack.slice(0,r.index+1).concat(e),r.index++,t&&t(e)},n)},t.prototype.replace=function(e,t,n){var r=this;this.transitionTo(e,function(e){r.stack=r.stack.slice(0,r.index).concat(e),t&&t(e)},n)},t.prototype.go=function(e){var t=this,n=this.index+e;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){var e=t.current;t.index=n,t.updateRoute(r),t.router.afterHooks.forEach(function(t){t&&t(r,e)})},function(e){vt(e,P.duplicated)&&(t.index=n)})}},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:`/`},t.prototype.ensureURL=function(){},t}(F),I=function(e){e===void 0&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Ue(e.routes||[],this);var t=e.mode||`hash`;switch(this.fallback=t===`history`&&!N&&e.fallback!==!1,this.fallback&&(t=`hash`),Re||(t=`abstract`),this.mode=t,t){case`history`:this.history=new Ft(this,e.base);break;case`hash`:this.history=new Lt(this,e.base,this.fallback);break;case`abstract`:this.history=new Wt(this,e.base)}},Gt={currentRoute:{configurable:!0}};I.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},Gt.currentRoute.get=function(){return this.history&&this.history.current},I.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once(`hook:destroyed`,function(){var n=t.apps.indexOf(e);n>-1&&t.apps.splice(n,1),t.app===e&&(t.app=t.apps[0]||null),t.app||t.history.teardown()}),!this.app){this.app=e;var n=this.history;if(n instanceof Ft||n instanceof Lt){var r=function(e){var r=n.current,i=t.options.scrollBehavior;N&&i&&`fullPath`in e&&j(t,e,r,!1)},i=function(e){n.setupListeners(),r(e)};n.transitionTo(n.getCurrentLocation(),i,i)}n.listen(function(e){t.apps.forEach(function(t){t._route=e})})}},I.prototype.beforeEach=function(e){return qt(this.beforeHooks,e)},I.prototype.beforeResolve=function(e){return qt(this.resolveHooks,e)},I.prototype.afterEach=function(e){return qt(this.afterHooks,e)},I.prototype.onReady=function(e,t){this.history.onReady(e,t)},I.prototype.onError=function(e){this.history.onError(e)},I.prototype.push=function(e,t,n){var r=this;if(!t&&!n&&typeof Promise<`u`)return new Promise(function(t,n){r.history.push(e,t,n)});this.history.push(e,t,n)},I.prototype.replace=function(e,t,n){var r=this;if(!t&&!n&&typeof Promise<`u`)return new Promise(function(t,n){r.history.replace(e,t,n)});this.history.replace(e,t,n)},I.prototype.go=function(e){this.history.go(e)},I.prototype.back=function(){this.go(-1)},I.prototype.forward=function(){this.go(1)},I.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map(function(e){return Object.keys(e.components).map(function(t){return e.components[t]})})):[]},I.prototype.resolve=function(e,t,n){t=t||this.history.current;var r=ke(e,t,n,this),i=this.match(r,t),a=i.redirectedFrom||i.fullPath,o=this.history.base;return{location:r,route:i,href:Jt(o,a,this.mode),normalizedTo:r,resolved:i}},I.prototype.getRoutes=function(){return this.matcher.getRoutes()},I.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==C&&this.history.transitionTo(this.history.getCurrentLocation())},I.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==C&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(I.prototype,Gt);var Kt=I;function qt(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function Jt(e,t,n){var r=n===`hash`?`#`+t:t;return e?k(e+`/`+r):r}I.install=Le,I.version=`3.6.5`,I.isNavigationFailure=vt,I.NavigationFailureType=P,I.START_LOCATION=C,Re&&window.Vue&&window.Vue.use(I);function Yt(){t.default.use(Kt);let e=/* @__PURE__ */ new Map,n=new Kt({mode:`abstract`}),r=e=>({name:e.name,path:e.path,component:e.component,props:e.props}),i=()=>{n.matcher=new Kt({mode:`abstract`}).matcher;for(let t of e.values())n.addRoute(r(t))};return{raw:n,get currentRouteName(){return n.currentRoute.name},addRoute(t){let a=e.has(t.name);e.set(t.name,t),a?i():n.addRoute(r(t))},removeRoute(t){e.delete(t)&&i()},getRouteNames:()=>[...e.keys()],replace(e){n.replace({name:e}).catch(()=>{})},guard({query:e,onBlocked:t}){return n.beforeEach((n,r,i)=>{n.matched.length?(Object.assign(n.query,e()),i()):(i(!1),t())})}}}let Xt={RouterView:ne,createMemoryRouter:Yt},Zt=Symbol(`scopedSlot`);function Qt(e){return e[Zt]=!0,e}let $t=e=>!!e[Zt];function en(e){if(!e)return[];let{default:t,...n}=e;return[t,...Object.values(n)].flatMap(e=>e&&e()||[])}let tn=null,nn=null;function rn(e){tn=e}function an(e){nn=e}function on(){if(!nn)throw Error(`[lowcode-vue] no router adapter installed: the simulator needs the full @cdlab996/lowcode-vue2 / @cdlab996/lowcode-vue3 entry`);return nn}function L(){if(!tn)throw Error(`[lowcode-vue] no Vue adapter installed: import @cdlab996/lowcode-vue2 or @cdlab996/lowcode-vue3`);return tn}function sn(){let e=window,t=e.__rendererContext;return t||(t=Symbol(`__rendererContext`),e.__rendererContext=t),t}function cn(){let e=sn();return(0,t.inject)(e,()=>{var e,n;let r=(e=(n=(0,t.getCurrentInstance)())==null?void 0:n.proxy)==null?{}:e;return{components:ln(r,`components`,{}),designMode:ln(r,`designMode`,`live`),getNode:ln(r,`getNode`,()=>null),triggerCompGetCtx:ln(r,`triggerCompGetCtx`,()=>void 0)}},!0)}function ln(e,t,n){return e[t]||e[`__${t}`]||n}let un={__scope:{type:Object,default:void 0},__schema:{type:Object,required:!0},__designMode:{type:String,default:`live`},__components:{type:Object,required:!0},__locale:{type:String,default:void 0},__messages:{type:Object,default:()=>({})},__getNode:{type:Function,required:!0},__triggerCompGetCtx:{type:Function,required:!0},__requestHandlersMap:{type:Object,default:void 0},__onRuntimeScope:{type:Function,default:void 0}};function R(e){return e?Array.isArray(e)?e:[e]:[]}var dn;(function(e){e.Initial=`init`,e.Loading=`loading`,e.Loaded=`loaded`,e.Error=`error`})(dn||(dn={}));var z=/*#__PURE__*/ function(e){return e[e.Environment=1]=`Environment`,e[e.Library=2]=`Library`,e[e.Theme=3]=`Theme`,e[e.Runtime=4]=`Runtime`,e[e.Components=5]=`Components`,e[e.App=6]=`App`,e}({}),fn=[z.Environment,z.Library,z.Theme,z.Runtime,z.Components,z.App],B=/*#__PURE__*/ function(e){return e.JSUrl=`jsUrl`,e.CSSUrl=`cssUrl`,e.CSSText=`cssText`,e.JSText=`jsText`,e.Bundle=`bundle`,e}({}),V=/*#__PURE__*/ function(e){return e.Render=`render`,e.Serilize=`serilize`,e.Save=`save`,e.Clone=`clone`,e.Init=`init`,e.Upgrade=`upgrade`,e}({}),pn=/* @__PURE__ */ c(((e,t)=>{
|
|
8
|
+
/*
|
|
9
|
+
object-assign
|
|
10
|
+
(c) Sindre Sorhus
|
|
11
|
+
@license MIT
|
|
12
|
+
*/
|
|
13
|
+
var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=/* @__PURE__ */ new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch(e){return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),mn=/* @__PURE__ */ c((e=>{
|
|
14
|
+
/** @license React v16.14.0
|
|
15
|
+
* react.production.min.js
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
var t=pn();typeof Symbol==`function`&&Symbol.for;function n(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var r={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},i={};function a(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(n(85));this.updater.enqueueSetState(this,e,t,`setState`)},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function o(){}o.prototype=a.prototype;function s(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||r}var c=s.prototype=new o;c.constructor=s,t(c,a.prototype),c.isPureReactComponent=!0}));(/* @__PURE__ */ c(((e,t)=>{t.exports=mn()})))();function H(e){return e==null}function U(e){return typeof e==`string`}function W(e){return typeof e==`function`}function G(e){return!H(e)&&typeof e==`object`}function K(e){return Object.prototype.toString.call(e)===`[object Object]`}function hn(e){return G(e)&&W(e.then)}function gn(e){return G(e)&&!!e.__esModule}function _n(e){return/\.css$/.test(e)}function vn(e){return G(e)&&e.nodeType===Node.ELEMENT_NODE}function yn(e){return e.replace(/-(\w)/g,(e,t)=>t.toUpperCase())}function bn(e){return e.charAt(0).toLowerCase()+e.slice(1)}function xn(){let e={},t=new Promise((t,n)=>{e.resolve=t,e.reject=n});return e.promise=()=>t,e}function Sn(e){let t=document.createElement(`script`);t.text=e,document.head.appendChild(t),document.head.removeChild(t)}function Cn(e){let t=document.createElement(`script`);t.onload=r,t.onerror=r;let n=xn();function r(e){t.onload=null,t.onerror=null,typeof e!=`string`&&e.type===`load`?n.resolve():n.reject()}return t.src=e,t.async=!1,document.head.appendChild(t),n.promise()}function wn(e){"@babel/helpers - typeof";return wn=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},wn(e)}function Tn(e,t){if(wn(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(wn(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function En(e){var t=Tn(e,`string`);return wn(t)==`symbol`?t:t+``}function q(e,t,n){return(t=En(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dn(e){return G(e)&&!!e.type}function On(e){return G(e)&&e.type===B.Bundle}function kn(e,t,n,r){return t?{type:e,content:t,level:n,id:r}:null}function An(e,t,n,r){for(let i of n)jn(e,t,i,r)}function jn(e,t,n,r){if(!n)return;if(Array.isArray(n))return An(e,t,n,r);if(On(n)){if(n.assets){Array.isArray(n.assets)?An(e,t,n.assets,n.level||r):jn(e,t,n.assets,n.level||r);return}return}Dn(n)||(n=kn(_n(n)?B.CSSUrl:B.JSUrl,n,r));let i=n.level||r;i&&z[i]!=null||(i=z.App),n.level=i,n.type===B.CSSUrl||n.type===B.CSSText?t[i].push(n):e[i].push(n)}var Mn=class{constructor(e,t){q(this,`lastContent`,void 0),q(this,`lastUrl`,void 0),q(this,`placeholder`,void 0),q(this,`id`,void 0),q(this,`level`,void 0),this.level=e,t&&(this.id=t);let n=null;if(t&&(n=document.head.querySelector(`style[data-id="${t}"]`)),!n){n=document.createTextNode(``);let t=document.head.querySelector(`meta[level="${e}"]`);t?document.head.insertBefore(n,t):document.head.appendChild(n)}this.placeholder=n}applyText(e){if(this.lastContent===e)return;this.lastContent=e,this.lastUrl=void 0;let t=document.createElement(`style`);t.setAttribute(`type`,`text/css`),this.id&&t.setAttribute(`data-id`,this.id),t.appendChild(document.createTextNode(e)),document.head.insertBefore(t,this.placeholder.parentNode===document.head?this.placeholder.nextSibling:null),document.head.removeChild(this.placeholder),this.placeholder=t}applyUrl(e){if(this.lastUrl===e)return;this.lastContent=void 0,this.lastUrl=e;let t=document.createElement(`link`);t.onload=r,t.onerror=r;let n=xn();function r(e){t.onload=null,t.onerror=null,typeof e!=`string`&&e.type===`load`?n.resolve():n.reject()}return t.href=e,t.rel=`stylesheet`,this.id&&t.setAttribute(`data-id`,this.id),document.head.insertBefore(t,this.placeholder.parentNode===document.head?this.placeholder.nextSibling:null),document.head.removeChild(this.placeholder),this.placeholder=t,n.promise()}},Nn=class{constructor(){q(this,`stylePoints`,/* @__PURE__ */ new Map)}async load(e){let t={},n={};fn.forEach(e=>{t[e]=[],n[e]=[]}),jn(n,t,e);let r=t[z.Environment].concat(t[z.Library],t[z.Theme],t[z.Runtime],t[z.App]),i=n[z.Environment].concat(n[z.Library],n[z.Theme],n[z.Runtime],n[z.App]);await Promise.all(r.map(({content:e,level:t,type:n,id:r})=>this.loadStyle(e,t,n===B.CSSUrl,r))),await Promise.all(i.map(({content:e,type:t})=>this.loadScript(e,t===B.JSUrl)))}loadStyle(e,t,n,r){if(!e)return;let i;return r?(i=this.stylePoints.get(r),i||(i=new Mn(t,r),this.stylePoints.set(r,i))):i=new Mn(t),n?i.applyUrl(e):i.applyText(e)}loadScript(e,t){if(e)return t?Cn(e):Sn(e)}async loadAsyncLibrary(e){let t=window,n=[],r=[];for(let i in e)e[i].async&&(n.push(t[e[i].library]),r.push(e[i].library));await Promise.all(n).then(e=>{e.length>0&&e.map((e,n)=>(t[r[n]]=e,e))})}};function Pn(e,t){e.onSimulatorHostReady(e=>{let n=[{type:`jsText`,content:`window.__is_simulator_env__=true;window.__VUE_DEVTOOLS_GLOBAL_HOOK__=window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;`},{type:`jsUrl`,content:t.vue,id:`vue`}];e.set(`environment`,n)})}let Fn=/[A-Za-z0-9_$]/,In=/[A-Za-z_$]/,Ln=/[0-9]/,Rn=/* @__PURE__ */ new Set([`return`,`typeof`,`case`,`in`,`of`,`delete`,`void`,`instanceof`,`new`,`throw`,`do`,`else`,`yield`,`await`]);function zn(e,t){let n=e.length,r=``,i=0,a=!0,o=[],s=t=>{r+=e.slice(i,t),i=t},c=()=>{let t=i;for(;t<n;){let n=e[t];if(n===`\\`)t+=2;else if(n==="`")return s(t+1),!1;else if(n===`$`&&e[t+1]===`{`)return s(t+2),o.push(0),!0;else t++}return s(n),!1};for(;i<n;){let l=e[i],u=e[i+1];if(l===`/`&&u===`/`){let t=e.indexOf(`
|
|
23
|
+
`,i);s(t===-1?n:t)}else if(l===`/`&&u===`*`){let t=e.indexOf(`*/`,i+2);s(t===-1?n:t+2)}else if(l===`/`&&a){let t=i+1,r=!1;for(;t<n&&e[t]!==`
|
|
24
|
+
`;){let n=e[t];if(n===`\\`)t++;else if(n===`[`)r=!0;else if(n===`]`)r=!1;else if(n===`/`&&!r)break;t++}for(t++;t<n&&Fn.test(e[t]);)t++;s(Math.min(t,n)),a=!1}else if(l===`"`||l===`'`){let t=i+1;for(;t<n&&e[t]!==l&&e[t]!==`
|
|
25
|
+
`;)e[t]===`\\`&&t++,t++;s(Math.min(t+1,n)),a=!1}else if(l==="`")i++,r+=l,a=c();else if(l===`}`&&o.length>0&&o[o.length-1]===0)o.pop(),i++,r+=l,a=c();else if(In.test(l)||Ln.test(l)){let o=i+1;for(;o<n&&Fn.test(e[o]);)o++;let s=e.slice(i,o);i=o,s===`this`?(r+=t,a=!1):(r+=s,a=Rn.has(s))}else l===`{`&&o.length>0?o[o.length-1]++:l===`}`&&o.length>0&&o[o.length-1]--,/\s/.test(l)||(a=l!==`)`&&l!==`]`&&l!==`}`),r+=l,i++}return r}let Bn=`__self`,Vn=/* @__PURE__ */ new Map,Hn=/* @__PURE__ */ new Map;function Un(){try{return window.parent!==window&&window.parent.location.host===window.location.host}catch(e){return!1}}function Wn(){if(!Un())return;let e=window.parent.__newFunc;return typeof e==`function`?e:void 0}function Gn(e){let t=Wn(),n=t?Hn:Vn,r=n.get(e);if(!r){let i=`var ${Bn} = arguments[0];\nwith (arguments[0] || {}) { return ${zn(e,Bn)}\n}`;r=t?t(i):Function(i),n.set(e,r)}return r}function Kn(e,t){return Gn(e).call(t,t)}function qn(){return Vn.size+Hn.size}function Jn(){Vn.clear(),Hn.clear()}function Yn(e){return e==null?``:typeof e==`string`?e:Array.isArray(e)||typeof e==`object`&&(e.toString===Object.prototype.toString||typeof e.toString!=`function`)?JSON.stringify(e,null,2):String(e)}function Xn(e,t){let n=t&&t.cache?t.cache:or,r=t&&t.serializer?t.serializer:ir;return(t&&t.strategy?t.strategy:tr)(e,{cache:n,serializer:r})}function Zn(e){return e==null||typeof e==`number`||typeof e==`boolean`}function Qn(e,t,n,r){let i=Zn(r)?r:n(r),a=t.get(i);return a===void 0&&(a=e.call(this,r),t.set(i,a)),a}function $n(e,t,n){let r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return a===void 0&&(a=e.apply(this,r),t.set(i,a)),a}function er(e,t,n,r,i){return n.bind(t,e,r,i)}function tr(e,t){let n=e.length===1?Qn:$n;return er(e,this,n,t.cache.create(),t.serializer)}function nr(e,t){return er(e,this,$n,t.cache.create(),t.serializer)}function rr(e,t){return er(e,this,Qn,t.cache.create(),t.serializer)}let ir=function(){return JSON.stringify(arguments)};var ar=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}};let or={create:function(){return new ar}},sr={variadic:nr,monadic:rr},cr=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function lr(e){let t={};return e.replace(cr,e=>{let n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-3];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}let ur=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function dr(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);let t=e.split(ur).filter(e=>e.length>0),n=[];for(let e of t){let t=e.split(`/`);if(t.length===0)throw Error(`Invalid number skeleton`);let[r,...i]=t;for(let e of i)if(e.length===0)throw Error(`Invalid number skeleton`);n.push({stem:r,options:i})}return n}function fr(e){return e.replace(/^(.*?)-/,``)}let pr=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,mr=/^(@+)?(\+|#+)?[rs]?$/g,hr=/(\*)(0+)|(#+)(0+)|(0+)/g,gr=/^(0+)$/;function _r(e){let t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(mr,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function vr(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function yr(e){let t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){let n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!gr.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function br(e){return vr(e)||{}}function xr(e){let t={};for(let n of e){switch(n.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=n.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:t.style=`unit`,t.unit=fr(n.options[0]);continue;case`unit`:t.style=`unit`,t.unit=n.options[0];continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t={...t,notation:`scientific`,...n.options.reduce((e,t)=>({...e,...br(t)}),{})};continue;case`engineering`:t={...t,notation:`engineering`,...n.options.reduce((e,t)=>({...e,...br(t)}),{})};continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(n.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(n.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);n.options[0].replace(hr,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else if(i&&a)throw Error(`We currently do not support maximum integer digits`);else if(o)throw Error(`We currently do not support exact integer digits`);return``});continue}if(gr.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(pr.test(n.stem)){if(n.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);n.stem.replace(pr,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});let e=n.options[0];e===`w`?t={...t,trailingZeroDisplay:`stripIfInteger`}:e&&(t={...t,..._r(e)});continue}if(mr.test(n.stem)){t={...t,..._r(n.stem)};continue}let e=vr(n.stem);e&&(t={...t,...e});let r=yr(n.stem);r&&(t={...t,...r})}return t}let Sr=/* @__PURE__ */ function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`,e}({});function Cr(e){return e.type===0}function wr(e){return e.type===1}function Tr(e){return e.type===2}function Er(e){return e.type===3}function Dr(e){return e.type===4}function Or(e){return e.type===5}function kr(e){return e.type===6}function Ar(e){return e.type===7}function jr(e){return e.type===8}function Mr(e){return!!(e&&typeof e==`object`&&e.type===0)}function Nr(e){return!!(e&&typeof e==`object`&&e.type===1)}let Pr=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Fr=/([^\t-\r -\/:-@\[-\^`\{-~\x85\xA0-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u1680\u2000-\u200A\u2010-\u2029\u202F-\u203E\u2041-\u2053\u2055-\u205F\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3000-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]*)/g,Ir={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`H`,`h`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`H`,`h`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GS:[`H`,`h`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HT:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`H`,`h`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`hB`,`hb`,`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`H`,`h`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ku-SY":[`H`,`hB`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function Lr(e,t){let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`j`){let a=0;for(;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;let o=1+(a&1),s=a<2?1:3+(a>>1),c=Rr(t);for((c==`H`||c==`k`)&&(s=0);s-->0;)n+=`a`;for(;o-->0;)n=c+n}else n+=i===`J`?`H`:i}return n}function Rr(e){let t=e.hourCycle;if(t===void 0){var n,r,i;let a=e;t=(n=(r=a.getHourCycles)==null?void 0:r.call(a)[0])==null?(i=a.hourCycles)==null?void 0:i[0]:n}if(t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}let a=e.language,o;return a!==`root`&&(o=e.maximize().region),(Ir[`${a}-${o}`]||Ir[o||``]||Ir[a||``]||Ir[`${a}-001`]||Ir[`001`])[0].charAt(0)}let zr=RegExp(`^${Pr.source}*`),Br=RegExp(`${Pr.source}*$`);function J(e,t){return{start:e,end:t}}let Vr=!!Object.fromEntries,Hr=!!String.prototype.trimStart,Ur=!!String.prototype.trimEnd,Wr=Vr?Object.fromEntries:function(e){let t={};for(let[n,r]of e)t[n]=r;return t},Gr=Hr?function(e){return e.trimStart()}:function(e){return e.replace(zr,``)},Kr=Ur?function(e){return e.trimEnd()}:function(e){return e.replace(Br,``)},qr=Jr();function Jr(){try{var e;let t=/* @__PURE__ */ RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`);if(((e=t.exec(`a `))==null?void 0:e[1])===`a`)return t}catch(e){}return Fr}function Yr(e,t){var n;return qr.lastIndex=t,(n=qr.exec(e)[1])==null?``:n}function Xr(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r<e.length;){let i=e.charCodeAt(r);switch(i){case 35:case 39:case 60:case 123:case 125:return null}if(i===10)t++,n=1,r++;else if(n++,i>=55296&&i<=56319&&r+1<e.length){let t=e.charCodeAt(r+1);r+=t>=56320&&t<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var Zr=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons,this.captureEscapes=!!t.captureEscapes}parse(){if(this.offset()!==0)throw Error(`parser can only be used once`);if(this.message.length>0){let e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){let e=Xr(this.message);if(e){let t=this.clonePosition();return this.position=e,{val:[{type:0,value:this.message,...this.captureEscapes&&{rawValue:this.message},location:J(t,this.clonePosition())}],err:null}}}}return this.parseMessage(0,``,!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){let i=this.char();if(i===123){let t=this.parseArgument(e,n);if(t.err)return t;r.push(t.val)}else if(i===125&&e>0)break;else if(i===35&&(t===`plural`||t===`selectordinal`)){let e=this.clonePosition();this.bump(),r.push({type:7,location:J(e,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,J(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&Qr(this.peek()||0)){let n=this.parseTag(e,t);if(n.err)return n;r.push(n.val)}else{let n=this.parseLiteral(e,t);if(n.err)return n;r.push(n.val)}}return{val:r,err:null}}parseTag(e,t){let n=this.clonePosition();this.bump();let r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:0,value:`<${r}/>`,location:J(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){let i=this.parseMessage(e+1,t,!0);if(i.err)return i;let a=i.val,o=this.clonePosition();if(this.bumpIf(`</`)){if(this.isEOF()||!Qr(this.char()))return this.error(23,J(o,this.clonePosition()));let e=this.clonePosition();return r===this.parseTagName()?(this.bumpSpace(),this.bumpIf(`>`)?{val:{type:8,value:r,children:a,location:J(n,this.clonePosition())},err:null}:this.error(23,J(o,this.clonePosition()))):this.error(26,J(e,this.clonePosition()))}return this.error(27,J(n,this.clonePosition()))}return this.error(23,J(n,this.clonePosition()))}parseTagName(){let e=this.offset();for(this.bump();!this.isEOF()&&ei(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){let n=this.clonePosition(),r=``;for(;;){let n=this.tryParseQuote(t);if(n){r+=n;continue}let i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}let a=this.tryParseLeftAngleBracket();if(a)r+=a;else break}let i=J(n,this.clonePosition());return{val:{type:0,value:r,location:i,...this.captureEscapes&&{rawValue:this.message.slice(n.offset,this.offset())}},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!$r(this.peek()||0))?(this.bump(),`<`):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();let t=[this.char()];for(this.bump();!this.isEOF();){let e=this.char();if(e===39){if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}}else t.push(e);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;let n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){let n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,J(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,J(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,J(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,J(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:J(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,J(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,J(n,this.clonePosition()))}}parseIdentifierIfPossible(){let e=this.clonePosition(),t=this.offset(),n=Yr(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:J(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(4,J(i,o));case`number`:case`date`:case`time`:{var s;this.bumpSpace();let e=null;if(this.bumpIf(`,`)){this.bumpSpace();let t=this.clonePosition(),n=this.parseSimpleArgStyleIfPossible();if(n.err)return n;let r=Kr(n.val);if(r.length===0)return this.error(6,J(this.clonePosition(),this.clonePosition()));e={style:r,styleLocation:J(t,this.clonePosition())}}let t=this.tryParseArgumentClose(r);if(t.err)return t;let i=J(r,this.clonePosition());if(e&&e.style.startsWith(`::`)){let t=Gr(e.style.slice(2));if(a===`number`){let r=this.parseNumberSkeletonFromString(t,e.styleLocation);return r.err?r:{val:{type:2,value:n,location:i,style:r.val},err:null}}{if(t.length===0)return this.error(10,i);let r=t;this.locale&&(r=Lr(t,this.locale));let o={type:1,pattern:r,location:e.styleLocation,parsedOptions:this.shouldParseSkeletons?lr(r):{}};return{val:{type:a===`date`?3:4,value:n,location:i,style:o},err:null}}}return{val:{type:a===`number`?2:a===`date`?3:4,value:n,location:i,style:(s=e==null?void 0:e.style)==null?null:s},err:null}}case`plural`:case`selectordinal`:case`select`:{let i=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(12,J(i,{...i}));this.bumpSpace();let o=this.parseIdentifierIfPossible(),s=0;if(a!==`select`&&o.value===`offset`){if(!this.bumpIf(`:`))return this.error(13,J(this.clonePosition(),this.clonePosition()));this.bumpSpace();let e=this.tryParseDecimalInteger(13,14);if(e.err)return e;this.bumpSpace(),o=this.parseIdentifierIfPossible(),s=e.val}let c=this.tryParsePluralOrSelectOptions(e,a,t,o);if(c.err)return c;let l=this.tryParseArgumentClose(r);if(l.err)return l;let u=J(r,this.clonePosition());return a===`select`?{val:{type:5,value:n,options:Wr(c.val),location:u},err:null}:{val:{type:6,value:n,options:Wr(c.val),offset:s,pluralType:a===`plural`?`cardinal`:`ordinal`,location:u},err:null}}default:return this.error(5,J(i,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,J(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0,t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let e=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(11,J(e,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=dr(e)}catch(e){return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?xr(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let i=!1,a=[],o=/* @__PURE__ */ new Set,{value:s,location:c}=r;for(;;){if(s.length===0){let e=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){let t=this.tryParseDecimalInteger(16,19);if(t.err)return t;c=J(e,this.clonePosition()),s=this.message.slice(e.offset,this.offset())}else break}if(o.has(s))return this.error(t===`select`?21:20,c);s===`other`&&(i=!0),this.bumpSpace();let r=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?17:18,J(this.clonePosition(),this.clonePosition()));let l=this.parseMessage(e+1,t,n);if(l.err)return l;let u=this.tryParseArgumentClose(r);if(u.err)return u;a.push([s,{value:l.val,location:J(r,this.clonePosition())}]),o.add(s),this.bumpSpace(),{value:s,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t===`select`?15:16,J(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(22,J(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);let i=!1,a=0;for(;!this.isEOF();){let e=this.char();if(e>=48&&e<=57)i=!0,a=a*10+(e-48),this.bump();else break}let o=J(r,this.clonePosition());return i?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);let t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;let e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){let t=this.offset();if(this.message.slice(t,t+e.length)===e){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){let t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){let t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&ti(this.char());)this.bump()}peek(){var e;if(this.isEOF())return null;let t=this.char(),n=this.offset();return(e=this.message.charCodeAt(n+(t>=65536?2:1)))==null?null:e}};function Qr(e){return e>=97&&e<=122||e>=65&&e<=90}function $r(e){return Qr(e)||e===47}function ei(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function ti(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ni(e){e.forEach(e=>{if(delete e.location,Or(e)||kr(e))for(let t in e.options)delete e.options[t].location,ni(e.options[t].value);else Tr(e)&&Mr(e.style)||(Er(e)||Dr(e))&&Nr(e.style)?delete e.style.location:jr(e)&&ni(e.children)})}function ri(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};let n=new Zr(e,t).parse();if(n.err){let e=SyntaxError(Sr[n.err.kind]);throw e.location=n.err.location,e.originalMessage=n.err.message,e}return t!=null&&t.captureLocation||ni(n.val),n.val}var Y,ii=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},ai=class extends ii{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join(`", "`)}"`,`INVALID_VALUE`,r)}},oi=class extends ii{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,`INVALID_VALUE`,n)}},si=class extends ii{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,`MISSING_VALUE`,t)}};function ci(e){return e.length<2?e:e.reduce((e,t)=>{let n=e[e.length-1];return!n||n.type!==0||t.type!==0?e.push(t):n.value+=t.value,e},[])}function li(e){return typeof e==`function`}function ui(e,t,n,r,i,a,o){if(e.length===1&&Cr(e[0]))return[{type:0,value:e[0].value}];let s=[];for(let c of e){if(Cr(c)){s.push({type:0,value:c.value});continue}if(Ar(c)){typeof a==`number`&&s.push({type:0,value:n.getNumberFormat(t).format(a)});continue}let{value:e}=c;if(!(i&&e in i))throw new si(e,o);let l=i[e];if(wr(c))l&&typeof l!=`string`&&typeof l!=`number`&&typeof l!=`bigint`||(l=typeof l==`string`||typeof l==`number`||typeof l==`bigint`?String(l):``),s.push({type:typeof l==`string`?0:1,value:l});else if(Er(c)){let e=typeof c.style==`string`?r.date[c.style]:Nr(c.style)?c.style.parsedOptions:void 0;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)})}else if(Dr(c)){let e=typeof c.style==`string`?r.time[c.style]:Nr(c.style)?c.style.parsedOptions:r.time.medium;s.push({type:0,value:n.getDateTimeFormat(t,e).format(l)})}else if(Tr(c)){let e=typeof c.style==`string`?r.number[c.style]:Mr(c.style)?c.style.parsedOptions:void 0;if(e&&e.scale){let t=e.scale||1;if(typeof l==`bigint`){if(!Number.isInteger(t))throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(t)}else l*=t}s.push({type:0,value:n.getNumberFormat(t,e).format(l)})}else{if(jr(c)){let{children:e,value:l}=c,u=i[l];if(!li(u))throw new oi(l,`function`,o);let d=u(ui(e,t,n,r,i,a).map(e=>e.value));Array.isArray(d)||(d=[d]),s.push(...d.map(e=>({type:typeof e==`string`?0:1,value:e})))}if(Or(c)){let e=l,a=(Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0)||c.options.other;if(!a)throw new ai(c.value,l,Object.keys(c.options),o);s.push(...ui(a.value,t,n,r,i))}else if(kr(c)){let e=`=${l}`,a=Object.prototype.hasOwnProperty.call(c.options,e)?c.options[e]:void 0;if(!a){if(!Intl.PluralRules)throw new ii(`Intl.PluralRules is not available in this environment.
|
|
26
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
27
|
+
`,`MISSING_INTL_API`,o);let e=typeof l==`bigint`?Number(l):l,r=n.getPluralRules(t,{type:c.pluralType}).select(e-(c.offset||0));a=(Object.prototype.hasOwnProperty.call(c.options,r)?c.options[r]:void 0)||c.options.other}if(!a)throw new ai(c.value,l,Object.keys(c.options),o);let u=typeof l==`bigint`?Number(l):l;s.push(...ui(a.value,t,n,r,i,u-(c.offset||0)))}}}return ci(s)}function di(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function fi(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=di(e[r],t[r]),n),{...e}):e}function pi(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function mi(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:Xn((...e)=>new Intl.NumberFormat(...e),{cache:pi(e.number),strategy:sr.variadic}),getDateTimeFormat:Xn((...e)=>new Intl.DateTimeFormat(...e),{cache:pi(e.dateTime),strategy:sr.variadic}),getPluralRules:Xn((...e)=>new Intl.PluralRules(...e),{cache:pi(e.pluralRules),strategy:sr.variadic})}}var hi=(Y=class e{constructor(t,n=e.defaultLocale,r,i){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=(e=>{let t=this.formatToParts(e);if(t.length===1)return t[0].value;let n=t.reduce((e,t)=>(!e.length||t.type!==0||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e),[]);return n.length<=1?n[0]||``:n}),this.formatToParts=(e=>ui(this.ast,this.locales,this.formatters,this.formats,e,void 0,this.message)),this.resolvedOptions=()=>{var e;return{locale:((e=this.resolvedLocale)==null?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}},this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");let{...n}=i||{};this.ast=e.__parse(t,{...n,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=fi(e.formats,r),this.formatters=i&&i.formatters||mi(this.formatterCache)}static get defaultLocale(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale}},Y.memoizedDefaultLocale=null,Y.resolveLocale=e=>{if(Intl.Locale===void 0)return;let t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])},Y.__parse=ri,Y.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}},Y);function gi(e,t={},n=`zh-CN`,r={}){return!r||!r[n]||!r[n][e]?``:new hi(r[n][e],n).format(t)}function X(e){return G(e)&&e.type===`JSExpression`&&e.extType!==`function`}function Z(e){return G(e)&&(e.type===`JSFunction`||e.type===`JSExpression`&&e.extType===`function`)}function Q(e){return G(e)&&e.type===`JSSlot`}function _i(e){return G(e)&&e.type===`i18n`}function vi(e){return typeof e==`string`}function yi(e){return G(e)&&`componentName`in e&&!e.isNode}let bi={JSEXPRESSION:`JSExpression`,JSFUNCTION:`JSFunction`,JSSLOT:`JSSlot`,JSBLOCK:`JSBlock`,I18N:`i18n`};function xi(e,t){return Si({type:bi.JSEXPRESSION,value:`this.i18n(${JSON.stringify(e.key)})`},t)}function Si(e,t){try{let n=Kn((e.value||``).trim(),t);return Z(e)&&t&&typeof n==`function`?n.bind(t):n}catch(n){console.warn(`parseExpression.error`,n,e,t);return}}function $(e,t){if(X(e)||Z(e))return Si(e,t);if(_i(e))return xi(e,t);if(U(e))return e.trim();if(Array.isArray(e))return e.map(e=>$(e,t));if(W(e))return e.bind(t);if(K(e)){if(!e)return e;let n={};return Object.keys(e).forEach(r=>{r.startsWith(`__`)||(n[r]=$(e[r],t))}),n}return e}function Ci(e,t){let n={};return R(t).forEach((t,r)=>{n[t]=e[r]}),n}function wi(e){return G(e)&&e.componentName===`Component`}function Ti(e){if(wi(e))return`devMode`in e?void 0:e;let t=G(e)?e.componentsTree:void 0,n=Array.isArray(t)?t[0]:void 0;return wi(n)?n:void 0}let Ei=/^[a-z][a-z0-9-]*$/;function Di(e){return typeof e==`string`?window[e]||(Ei.test(e)?L().wrapTag(e):void 0):e}function Oi(e,t){let n=t.length;if(n<1||!e)return e;let r=0,i;for(;r<n;){let a=t[r],o;try{i=e[a]}catch(e){o=e,i=null}if(r===0&&i==null&&a==="default"){if(o)return n===1?e:null;i=e}else if(i==null)return null;e=i,r++}return i}function ki(e,t,n){if(!n)return Di(t);let r=n.exportName||n.componentName||t,i=Di(e[n.package]||r),a=n.exportName&&n.subName?n.subName.split(`.`):[];return n.destructuring?a.unshift(r):gn(i)&&a.unshift(`default`),Oi(i,a)}function Ai(e){let t=L(),n=window;for(let r of Object.values(e)){let e=n[r],i=G(e)?e.directives:void 0;if(G(i))for(let[e,n]of Object.entries(i))n&&t.registerDirective(e,n)}}function ji(e,t,n){let r=L();Ai(e);let i={};return Object.keys(t).forEach(a=>{let o=t[a],s=Ti(o);if(s){if(n){let e=n(s);e&&(i[a]=e)}}else if(r.isComponent(o))i[a]=r.normalizeComponent(o);else{let t=ki(e,a,o);t&&(i[a]=t.functional?r.wrapTag(t):r.normalizeComponent(t))}}),i}function Mi(e,t){return t.filter(e=>e&&e.name).reduce((t,n)=>{let{name:r,content:i,type:a}=n;if(a===`npm`){let{package:n,exportName:a,destructuring:o}=i==null?{}:i;if(e[n]){let i=Di(e[n]);i&&(t[r]=o&&a?i[a]:i)}}else a===`function`&&(t[r]=Z(i)?Function(`return ${i.value}`)():n.content);return t},{})}let Ni=(e,t)=>!!e&&typeof e==`object`&&e.type===t,Pi=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&typeof e.componentName==`string`;function Fi(e){return Array.isArray(e)?e.every(Fi):typeof e==`string`||Ni(e,`JSExpression`)||Pi(e)}let Ii=e=>e==null?[]:Array.isArray(e)?e:[e];function Li(e){var t;let n={},r={},i=Ii(e.children);for(let[a,o]of Object.entries((t=e.props)==null?{}:t))if(Ni(o,`JSSlot`)){let e=o,t=a===`children`?`default`:a;e.value&&(r[t]={params:e.params,children:e.value})}else a===`className`?n.class=o:a===`children`&&Fi(o)?i=Ii(o):n[a]=o;return{props:n,slots:r,children:r.default?[]:i}}let Ri=e=>e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()),zi=e=>e&&e[0].toLowerCase()+e.slice(1),Bi=e=>/^on[A-Z]/.test(e);function Vi(e){var t;let n=(t=e.match(/^onUpdate:?([\w-]+)$/))==null?void 0:t[1];return n?`onUpdate:${zi(Ri(n))}`:e}function Hi(e){let t=e.match(/^v-model(?::([\w-]+))?$/);return t?t[1]?{arg:zi(Ri(t[1]))}:{}:null}function Ui(e){let t=[`item`,`index`];return Array.isArray(e.loopArgs)&&e.loopArgs.forEach((e,n)=>{n<2&&typeof e==`string`&&e&&(t[n]=e)}),t}function Wi(e,t){return t?e.map(e=>({dataHandler:t,...e})):e}function Gi(e,t){let n=Li(e),r={default:n.children};for(let[e,t]of Object.entries(n.slots))r[e]={componentName:`Slot`,params:t.params,children:t.children};if(t){var i;for(let[n,a]of Object.entries((i=e.props)==null?{}:i)){let e=Q(a)?t.getProp(n):null;e!=null&&e.slotNode&&(r[n]=e.slotNode.export(V.Render))}}return{props:n.props,slots:r}}function Ki(e,t,n){var r,i,a;return{...Gi(e,t),loop:e.loop,loopArgs:Ui(e),condition:(r=e.condition)==null||r,hidden:n?(i=e.hidden)!=null&&i:!1,locked:(a=t==null?void 0:t.isLocked)!=null&&a}}let qi=[`___isLocked___`,`___hidden___`,`___condition___`,`___loop___`,`___loopArgs___`];function Ji(e,t,n){L().set(e,t,n)}function Yi(e,t){L().del(e,t)}function Xi(e,t,n){let r=t===`className`?`class`:t;t in e.slots&&Yi(e.slots,t),Ji(e.props,r,n)}function Zi(e,t,n){t in e.props&&Yi(e.props,t),H(n)?Yi(e.slots,t):Ji(e.slots,t,n)}function Qi(e,t,n){var r;let{prop:i,newValue:a,oldValue:o}=n,s=n.key,c=(r=i==null?void 0:i.path)==null?[]:r,l=c[0];if(c.length!==1){if(l===`___loopArgs___`){let t=[...e.loopArgs];t[Number(s)]=a,e.loopArgs=t}else l&&!qi.includes(l)&&Xi(e,l,t.getPropValue(l))}else if(s){if(s===`___isLocked___`)e.locked=!!a;else if(s===`___hidden___`)e.hidden=!!a;else if(s===`___condition___`)e.condition=a;else if(s===`___loop___`)e.loop=a;else if(s===`___loopArgs___`){let t=[...e.loopArgs];R(a).forEach((e,n)=>{t[n]=e}),e.loopArgs=t}else if(s===`children`){var u;Yi(e.props,s),Zi(e,`default`,Q(a)?i==null||(u=i.slotNode)==null?void 0:u.export(V.Render):H(a)?void 0:R(a))}else if(Q(a)){var d;Zi(e,s,i==null||(d=i.slotNode)==null?void 0:d.export(V.Render))}else H(a)&&Q(o)?Zi(e,s,void 0):Xi(e,s,a)}}function $i(){let e=/* @__PURE__ */ new Map,n=[],r=/* @__PURE__ */ new Map;return{get(r){let i=e.get(r);if(i)return i;let a=Ki(r.export(V.Render),r,!0),o=(0,t.shallowReactive)({...a,props:(0,t.shallowReactive)(a.props),slots:(0,t.shallowReactive)(a.slots)});return e.set(r,o),n.push(r.onChildrenChange(()=>{let e=r.export(V.Render);Ji(o.slots,`default`,R(e.children))}),r.onPropChange(e=>Qi(o,r,e))),o},keyOf(t,n){let i=r.get(t);return i?(i.node!==n&&(e.delete(i.node),i.node=n,i.generation+=1),i.generation?`${t}:${i.generation}`:t):(r.set(t,{node:n,generation:0}),t)},dispose(){for(let e of n)e==null||e();n.length=0,e.clear(),r.clear()}}}let ea=Symbol(`LEAF_STORE`);function ta(){let e=(0,t.inject)(ea,null);if(e)return e;let n=$i();return(0,t.provide)(ea,n),(0,t.onUnmounted)(()=>n.dispose()),n}let na=/* @__PURE__ */ new WeakSet;function ra(e){na.add(e)}function ia(e){for(let t=e;t;t=Object.getPrototypeOf(t))if(na.has(t))return!0;return!1}function aa(e){return!e||!G(e)?!1:ia(e)?!0:Object.keys(e).length>0}function oa(...e){let n=[];if(e.flat().forEach(e=>{aa(e)&&n.push(e)}),n.length<=1)return n[0];let[r,...i]=n;return i.reduce((e,n)=>{if(ia(n)){if(ia(e))return n;{let t=e;e=n,n=t}}let r=Object.getOwnPropertyDescriptors(n);return e=Object.create(e,r),(0,t.isProxy)(n)?(0,t.reactive)(e):e},r)}function sa(e){let n=null,r=()=>{var e;n==null||(e=n.parentElement)==null||e.removeChild(n),n=null};(0,t.watch)(()=>{var t,n;return[(t=e.__schema)==null?void 0:t.id,(n=e.__schema)==null?void 0:n.css]},([e,t])=>{n&&n.getAttribute(`data-id`)!==(e==null?null:e)&&r(),e&&(n=document.querySelector(`style[data-id="${e}"]`)),t?(n||(n=document.createElement(`style`),e&&n.setAttribute(`data-id`,e),(document.head||document.getElementsByTagName(`head`)[0]).appendChild(n)),n.innerHTML!==t&&(n.innerHTML=t)):n&&r()},{immediate:!0}),(0,t.onBeforeUnmount)(r)}function ca(e){let t=[];return Object.keys(e).forEach(n=>{let r=e[n];r!=null&&r!==``&&(typeof r==`object`?t.push(`${n}=${encodeURIComponent(JSON.stringify(r))}`):t.push(`${n}=${encodeURIComponent(String(r))}`))}),t.join(`&`)}function la(e,t){if(!t)return e;let n=ca(t);return n?e.indexOf(`?`)>0?`${e}&${n}`:`${e}?${n}`:e}function ua(e,t){for(let n in e)if(n.toLowerCase()===t)return[e[n],n];return[]}function da(e){return[`arrayBuffer`,`blob`,`formData`,`json`,`text`].includes(e)}function fa(e){let t=new FormData;for(let n in e){let r=e[n];r instanceof Blob?t.append(n,r):t.append(n,String(r))}return t}let pa={"application/json":e=>JSON.stringify(e),"multipart/form-data":e=>K(e)?fa(e):e,"application/x-www-form-urlencoded":e=>ca(e)};function ma(e,t){let n=Object.keys(pa).find(t=>e.includes(t));return n?pa[n](t):t}var ha=class extends Error{constructor(e,t,n){super(e),this.code=t,this.data=n}},ga=class{constructor(e,t){this.code=e,this.data=t}};async function _a(e){let{uri:t,method:n=`GET`,timeout:r,params:i={},headers:a={},responseType:o=`json`}=e,s,c={Accept:`application/json`,...a},l={method:n,headers:c};if(n===`GET`||n===`DELETE`||n===`OPTIONS`)s=la(t,i);else{s=t;let[e,n]=ua(c,`content-type`);e===void 0&&(c[`Content-Type`]=`application/json`),l.body=ma(e==null?`application/json`:e,i),e===`multipart/form-data`&&n&&delete c[n]}let u;if(r){let e=new AbortController;l.signal=e.signal,u=setTimeout(()=>e.abort(),r)}try{let e=await fetch(s,l),t=e.status;if(t>=200&&t<300){if(t===204)return new ga(t,null);if(!da(o))throw new ha(`invalid response type: ${o}`,-1);return new ga(t,await e[o]())}let n;try{n=await e.json()}catch(e){n=void 0}throw new ha(e.statusText,t,n)}finally{clearTimeout(u)}}let va=0;function ya(e){let{uri:t,params:n={},timeout:r,jsonpCallback:i=`callback`,jsonpCallbackFunction:a=`__lowcode_jsonp_${Date.now()}_${va++}`}=e,o=window;return new Promise((e,s)=>{let c=document.createElement(`script`),l,u=()=>{clearTimeout(l),c.remove(),Reflect.deleteProperty(o,a)};o[a]=t=>{u(),e(new ga(200,t))},c.onerror=()=>{u(),s(new ha(`JSONP request to ${t} failed`,-1))},r&&(l=setTimeout(()=>{u(),s(new ha(`JSONP request to ${t}: timeout`,-1))},r)),c.src=la(t,{...n,[i]:a}),document.head.appendChild(c)})}let ba=e=>e,xa=()=>void 0,Sa=()=>!0;function Ca(e,n,r){let i=(0,t.shallowRef)(),a=(0,t.shallowRef)(),o=(0,t.ref)(`init`),s=(0,t.computed)(()=>o.value===`loading`),c=(0,t.computed)(()=>!!$(e.isInit,r)),{willFetch:l,shouldFetch:u,dataHandler:d,errorHandler:f}=e,p={willFetch:l?$(l,r):ba,shouldFetch:u?$(u,r):Sa,dataHandler:d?$(d,r):e=>e.data,errorHandler:f?$(f,r):xa};return(0,t.reactive)({data:i,error:a,loading:s,status:o,isInit:c,load:async(t,s={})=>{try{let{type:a,options:c,id:l}=e,{headers:u,assignToScope:d=!0,...f}=s;if(!n)throw Error(`unsupported data source type: ${a}`);if(!(W(p.shouldFetch)?p.shouldFetch():typeof p.shouldFetch!=`boolean`||p.shouldFetch))return;let{params:m,headers:h,...g}=$(c==null?{}:c,r);o.value=`loading`;let _=await n(p.willFetch({...g,...f,headers:{...h,...u},params:K(m)&&K(t)?{...m,...t}:t==null?m:t}),r);o.value=`loaded`;let v=p.dataHandler(_);return i.value=v,v!==void 0&&d&&(r[l]=v),v}catch(e){throw o.value=`error`,a.value=e,p.errorHandler(e),e}}})}let wa={fetch:e=>_a(e),jsonp:e=>ya(e)};function Ta(e,t){var n;let r=e==null?`fetch`:e;return Object.keys(t).includes(r)?t[r]:(n=wa[r])==null?null:n}function Ea({list:e=[],dataHandler:t},n,r){let i={},a={};return Wi(e,t).forEach(e=>{let t=Ca(e,Ta(e.type,r==null?{}:r),n),o=(e,n)=>{let r={assignToScope:!1,...n};return t.load(e,r)};i[e.id]=o,a[e.id]=t}),{dataSource:i,dataSourceMap:a,reloadDataSource:(e,t,n)=>{if(e){let r=a[e];if(!r)throw Error(`dataSource not found, id: `+e);return r.load(t,n)}let r=Object.keys(a).map(e=>a[e]).filter(e=>e.isInit).map(e=>e.load());return Promise.all(r)}}}function Da(e,n,r,i){var a;let{__schema:o}=e,{dataSource:s,dataSourceMap:c,reloadDataSource:l}=Ea((a=o.dataSource)==null?{list:[],dataHandler:void 0}:a,n,e.__requestHandlersMap);for(let e of Object.keys(c))e in r||(r[e]=(0,t.ref)());return i({dataSource:s,dataSourceMap:c,reloadDataSource:l}),()=>{l().catch(()=>{})}}let Oa=[`initModule`,`initProps`,`initEmits`,`initData`,`initComputed`,`initWatch`,`initProvide`,`initInject`];function ka(e,t){let n={options:{}};if(!G(e))return n;for(let[r,i]of Object.entries(e)){let e=$(i,t);Oa.includes(r)?n.options[r]=e:W(e)&&(n[r]=e.bind(t))}return n}let Aa={};function ja(e,t){let n=e.options.initModule;if(!W(n))return;let r=n(Aa,window);if(G(r))for(let[e,n]of Object.entries(r))e in t||Reflect.set(t,e,n)}function Ma(e,t,n){var r;let i=(r=e.setup)==null?void 0:r.call(e,t,n);return hn(i)?i.then(e=>G(e)?e:{}):G(i)?i:{}}function Na(e,t){let n=e.options.initData,r=W(n)?n.call(t):n;return K(r)?r:{}}function Pa(e,n){let r=e.options.initComputed,i={};if(!K(r))return i;for(let[e,a]of Object.entries(r))if(W(a))i[e]=(0,t.computed)(()=>a.call(n));else if(K(a)&&W(a.get)){let{get:r,set:o}=a;i[e]=(0,t.computed)({get:()=>r.call(n),set:e=>o==null?void 0:o.call(n,e)})}return i}function Fa(e){let n=e.options.initInject,r={};if(Array.isArray(n))for(let e of n)U(e)&&(r[e]=e);else K(n)&&Object.assign(r,n);let i={};for(let[e,n]of Object.entries(r))if(K(n)){var a;let r=(a=n.from)==null?e:a;i[e]=`default`in n?(0,t.inject)(r,n.default,!0):(0,t.inject)(r)}else i[e]=(0,t.inject)(n);return i}function Ia(e,n){let r=e.options.initProvide,i=W(r)?r.call(n):r;if(G(i))for(let e of Reflect.ownKeys(i))(0,t.provide)(e,Reflect.get(i,e))}function La(e,t){return W(e)?e.bind(t):U(e)&&W(t[e])?t[e]:null}function Ra(e,n,r){let i=r.split(`.`),a=()=>{let e=n;for(let n of i){if(!G(e))return;e=(0,t.unref)(e[n])}return e};if(Array.isArray(e)){for(let t of e)Ra(t,n,r);return}let o=La(K(e)?e.handler:e,n);if(!o){console.warn(`[lowcode-vue]: invalid watch handler for "${r}"`,e);return}let s=K(e)?{deep:!!e.deep,immediate:!!e.immediate}:{};(0,t.watch)(a,o,s)}function za(e,t){let n=e.options.initWatch;if(K(n))for(let[e,r]of Object.entries(n))Ra(r,t,e)}let Ba={beforeMount:t.onBeforeMount,mounted:t.onMounted,beforeUpdate:t.onBeforeUpdate,updated:t.onUpdated,activated:t.onActivated,deactivated:t.onDeactivated,beforeUnmount:t.onBeforeUnmount,unmounted:t.onUnmounted,beforeDestroy:t.onBeforeUnmount,destroyed:t.onUnmounted,errorCaptured:t.onErrorCaptured,renderTracked:t.onRenderTracked,renderTriggered:t.onRenderTriggered,serverPrefetch:t.onServerPrefetch,componentDidMount:t.onMounted,componentDidCatch:t.onErrorCaptured,shouldComponentUpdate:t.onBeforeUpdate,componentWillUnmount:t.onBeforeUnmount};function Va(e){return e in Ba||e===`beforeCreate`||e===`created`}function Ha(e,t){for(let n=t;n;n=n.$parent){let t=e.find(e=>e.instances.default===n);if(t)return t}}function Ua(e){var n,r;let i=(n=(r=(0,t.getCurrentInstance)())==null?void 0:r.proxy)==null?null:n,a=i==null?void 0:i.$router;if(!i||!a)return;let o=a.beforeEach((t,n,r)=>{let a=Ha(n.matched,i),o=a&&(t.matched.includes(a)?e.beforeRouteUpdate:e.beforeRouteLeave);o?o.call(i,t,n,r):r()});(0,t.onBeforeUnmount)(o)}function Wa(e){for(let[t,n]of Object.entries(Ba)){let r=e[t];r&&n(r)}let{beforeRouteUpdate:t,beforeRouteLeave:n}=e;(t||n)&&Ua({beforeRouteUpdate:t,beforeRouteLeave:n})}function Ga(e,t){var n;let r=(n=$(e,t))==null?{}:n;Object.assign(t,r)}let Ka=[`i18n`,`currentLocale`],qa=Symbol(`SCOPE_VERSION`);function Ja(){var e;return(e=(0,t.inject)(qa,null))==null?(0,t.ref)(0):e}function Ya(e,n){return{add:r=>{for(let i of Object.keys(r)){let a=r[i];Reflect.set((0,t.isRef)(a)?n:e,i,a)}},remove:r=>{for(let i of Object.keys(r))Reflect.deleteProperty((0,t.isRef)(r[i])?n:e,i)}}}function Xa(e,n){let r=(0,t.ref)(0);(0,t.provide)(qa,r);let i=null;(0,t.watch)(()=>({...e.__scope}),e=>{let t={};for(let n of Object.keys(e))Ka.includes(n)||(t[n]=e[n]);let a=i;if(a){let e={};for(let n of Object.keys(a))n in t||(e[n]=a[n]);n.remove(e)}n.add(t),a&&r.value++,i=t},{immediate:!0});let a=(t,n)=>{let{__locale:r,__messages:i}=e;return gi(t,n,r,i)},o=(0,t.computed)(()=>e.__locale);return n.add({i18n:a,currentLocale:o}),r}function Za(e,n){var r;let i=(r=$(e))==null?{}:r;return(0,t.toRefs)((0,t.reactive)({...i,...n}))}function Qa(e,n){for(let[r,i]of Object.entries(n))(0,t.isRef)(i)?Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get:()=>i.value,set:e=>i.value=e}):Reflect.set(e,r,i)}function $a(e,n){var r,i,a;let o=L(),s=(r=e.__schema)==null?{}:r,c=(0,t.getCurrentInstance)().proxy;ra(c);let l=ka(s.lifeCycles,c),u=()=>{};o.onCreated(()=>{var e;za(l,c),u(),(e=l.created)==null||e.call(l)}),ja(l,c),(i=l.beforeCreate)==null||i.call(l);let d={},f=(0,t.ref)(!0),p=Ma(l,e,n);p instanceof Promise?(f.value=!1,p.then(e=>{Qa(c,e),f.value=!0})):Object.assign(d,p);for(let[e,n]of Object.entries(Fa(l)))(0,t.isRef)(n)||!W(n)?d[e]=n:Reflect.set(c,e,n);Ga(s.methods,c),Object.assign(d,Za(s.state,Na(l,c))),Object.assign(d,Pa(l,c)),Ia(l,c),Wa(l),sa(e);let m=Ya(c,d),h=Xa(e,m);return u=Da(e,c,d,m.add),(a=e.__onRuntimeScope)==null||a.call(e,c),{scope:c,bindings:d,ready:f,scopeVersion:h}}function eo(e,n=cn(),r=Ja()){let i=L(),{getNode:a,designMode:o}=n,s=ta(),c=o===`design`,l=e=>{let t=c&&e.id?a(e.id):null;return t?s.get(t):Ki(e,null,c)},u=(0,t.computed)(()=>l(e.schema)),d=e=>{for(let t=e;t;t=t.parent)if(s.get(t).locked)return!0;return!1},f=/* @__PURE__ */ new Map,p=(e,t)=>{let r=f.get(e);if(!r){let a={schema:t,props:{ref:e=>{e&&n.triggerCompGetCtx(a.schema,e)},...i.unmountedHook(()=>{f.delete(e),n.triggerCompGetCtx(a.schema,null)})}};f.set(e,a),r=a}return r.schema=t,r.props},m=(t,o,u,d=e.scope)=>{var f;let m=oa(d,o);if(U(t))return i.text(t);if(X(t)){let e=Si(t,m);return i.text(Yn(e))}let h=t;if(u||(u=n.components[h.componentName]),!u)return i.h(`div`,null,{default:()=>[i.text(`component not found: ${h.componentName}`)]});let g=c&&h.id?a(h.id):null,_=g&&h.id?s.keyOf(h.id,g):h.id,y=l(h),{hidden:x,condition:S,loop:C,loopArgs:w}=y;if(x||(typeof S==`boolean`?!S:!$(S,m)))return null;let T=u,ee=(e,t)=>{r.value;let n={scope:t,node:g,comp:T},a=c&&e!==void 0?p(e,h):void 0,o=b(y.slots,n);return i.h(T,{...v(y.props,n,a),key:e},Object.keys(o).length?o:void 0)};if(!C)return ee(_,m);let E=$(C,m);if(!Array.isArray(E))return!H(E)&&console.warn(`[vue-renderer]: loop must be array`,E),null;let te=(f=m.__loopRefOffset)==null?0:f,[D,O]=w;return E.map((e,t)=>ee(`${_}-${t}`,oa(m,{[D]:e,[O]:t,__loopScope:!0,__loopRefIndex:te+t,__loopRefOffset:E.length*t})))},h=(e,t,n)=>{if(X(e)||Z(e))return Si(e,t);if(Q(e)){let a,o;if(n!=null&&n.slotNode){var r;o=n.slotNode.export(V.Render),a=(r=o.params)==null?[]:r}else{var i;o=R(e.value),a=(i=e.params)==null?[]:i}return(...e)=>{let n=Ci(e,a),r=[];return R(o).forEach(e=>{r.push(...R(m(e,n,void 0,t)))}),r}}if(Array.isArray(e))return e.map((e,r)=>h(e,t,n==null?void 0:n.get(r)));if(e&&G(e)){let r={};return Object.keys(e).forEach(i=>{if(i.startsWith(`__`))return;let a=e[i],o=n==null?void 0:n.get(i);r[i]=h(a,t,o)}),r}return e},g=(e,n,r)=>{if(U(e)){let r=e,a=null;return e=>{let o=i.refsOf(n);if(H(n.__loopRefIndex))o[r]=e,r in n&&(n[r]=e);else{let i=o[r];if(!Array.isArray(i))i=o[r]=[],r in n&&(i=n[r]=i);else if(r in n){let e=n[r];i=!Array.isArray(e)||(0,t.toRaw)(e)!==i?n[r]=i:e}if(H(e)){let e=i.indexOf(a);e>=0&&i.splice(e,1)}else i[n.__loopRefIndex]=e}a=e}}{let t=h(e,n,r);return U(t)?g(t,n,r):t}},_=(e,t,n,r)=>{let a=Hi(t);if(t.startsWith(`v-model`)){if(!a)return e;let t,o;if(a.arg)t=a.arg,o=`onUpdate:${t}`;else{let e=i.modelOf(r);t=e.prop,o=`on${e.event[0].toUpperCase()}${e.event.slice(1)}`}if(X(n)){let t={type:`JSFunction`,value:`function ($event) {${n.value} = $event}`};e[o]=o in e?R(e[o]).concat(t):t}e[t]=n}else if(Bi(t)&&Z(n))t=Vi(t),e[t]=t in e?R(e[t]).concat(n):n;else if(t===`ref`&&`ref`in e){let t=n,r=e.ref;e.ref=W(r)&&W(t)?(...e)=>{t(...e),r(...e)}:[r,t].filter(W).pop()}else e[t]=n},v=(e,t,n)=>{let r={};Object.keys(e).forEach(n=>{_(r,n,e[n],t.comp)});let i={};return Object.keys(r).forEach(e=>{var n;let a=r[e],o=(n=t.node)==null?void 0:n.getProp(e);i[e]=e===`ref`?g(a,t.scope,o):h(a,t.scope,o)}),n&&Object.keys(n).forEach(e=>{_(i,e,n[e],t.comp)}),i},y=(e,t)=>(...n)=>{let r=e(...n);if(!r.length){let e=d(t),n={"lc-container-locked":e,"lc-container-placeholder":!0},a=e?`锁定元素及子元素无法编辑`:`拖拽组件或模板到这里`;r.push(i.h(`div`,{class:n},{default:()=>[i.text(a)]}))}return r},b=(e,t)=>{let{node:n,scope:r}=t;return Object.keys(e).reduce((t,i)=>{let a=e[i],o=i==="default";if(H(a)||o&&!(n!=null&&n.isContainer())&&Array.isArray(a)&&a.length===0)return t;let s;s=Array.isArray(a)?()=>a.flatMap(e=>R(m(e,null,void 0,r))):a.id?(...e)=>{var t;return R(m(a,Ci(e,(t=a.params)==null?[]:t),void 0,r))}:(...e)=>{var t;let n=Ci(e,(t=a.params)==null?[]:t);return R(a.children).flatMap(e=>R(m(e,n,void 0,r)))};let l=Array.isArray(a)?[]:a.params;return l!=null&&l.length&&Qt(s),t[i]=o&&c&&n!=null&&n.isContainer()?y(s,n):s,t},{})};return{state:u,renderComp:m,buildProps:v,buildSlots:b}}function to(e,n){let{scope:r,bindings:i,ready:a,scopeVersion:o}=$a(e,n),s={comp:null,scope:r,get schema(){return e.__schema}},c=sn(),l=(0,t.computed)(()=>{var t;return(t=e.__designMode)==null?`live`:t}),u=(0,t.computed)(()=>e.__components),d=(0,t.reactive)({designMode:l,components:u,getNode:t=>{var n,r;return(n=(r=e.__getNode)==null?void 0:r.call(e,t))==null?null:n},triggerCompGetCtx:(0,t.computed)(()=>e.__triggerCompGetCtx)});return(0,t.provide)(c,d),{scope:r,bindings:i,ready:a,scopeVersion:o,designModeRef:l,componentsRef:u,...eo(s,d,o)}}let no=/* @__PURE__ */ new WeakMap;function ro(e){return(0,t.defineComponent)({name:e.name,props:un,__renderer__:!0,setup(n,r){var i;let a=n,{renderComp:o,componentsRef:s,bindings:c,ready:l,scopeVersion:u}=to(a,r),d=(0,t.getCurrentInstance)().proxy,f=e.root(s.value);return(i=e.reportSelf)!=null&&i.call(e,f)&&(0,t.onMounted)(()=>a.__triggerCompGetCtx(a.__schema,d)),no.set(d,()=>{var e;if(u.value,!l.value)return null;let t=o(a.__schema,null,f);return Array.isArray(t)?(e=t[0])==null?null:e:t}),c},render(){var e,n,r;let i=(e=(0,t.getCurrentInstance)())==null?void 0:e.proxy;return(n=(r=no.get(i))==null?void 0:r())==null?null:n}})}let io=(0,t.defineComponent)({name:`Page`,setup(e,{slots:t}){return()=>L().h(`div`,{class:`lc-page`,style:{height:`100%`}},t)}}),ao=ro({name:`PageRenderer`,root:e=>e.Page||io}),oo=ro({name:`BlockRenderer`,root:e=>e.Block||L().Fragment,reportSelf:e=>e===L().Fragment}),so=ro({name:`ComponentRenderer`,root:e=>e.Component||L().Fragment,reportSelf:e=>e===L().Fragment}),co={PageRenderer:ao,BlockRenderer:oo,ComponentRenderer:so};var lo=class{constructor(){q(this,`renderers`,{...co}),q(this,`configProvider`,null)}setConfigProvider(e){this.configProvider=e}getConfigProvider(){return this.configProvider}setRenderers(e){this.renderers=e}getRenderers(){return this.renderers}};let uo=new lo;function fo(e){var t;let n=(t=e.listeners)==null?{}:t;return Object.fromEntries(Object.entries(n).map(([e,t])=>[`on${e[0].toUpperCase()}${e.slice(1)}`,t]))}function po(e){if(!K(e))return;let{type:t,value:n}=e;if(!(t!==`JSExpression`&&t!==`JSFunction`||!U(n)))try{return Kn(n)}catch(e){return}}function mo(e){var t;let n=(t=e.lifeCycles)==null?{}:t,r={},i=po(n.initProps);if(Array.isArray(i))for(let e of i)U(e)&&(r[e]=null);else if(K(i))for(let[e,t]of Object.entries(i))r[e]=K(t)?t:W(t)||Array.isArray(t)?{type:t}:null;let a=po(n.initEmits);return{props:r,emits:Array.isArray(a)?a.filter(U):K(a)?Object.keys(a):[]}}let ho=/* @__PURE__ */ new WeakMap;function go(e,n){var r;let i=(r=n.lifeCycles)==null?{}:r;if(!i.initProps&&!i.initEmits)return e;let a=JSON.stringify([n.id,i.initProps,i.initEmits]),o=ho.get(e);o||ho.set(e,o=/* @__PURE__ */ new Map);let s=o.get(a);if(s)return s;let{props:c,emits:l}=mo(n),{_Ctor:u,...d}=e,f=(0,t.defineComponent)({...d,props:{...d.props,...c},emits:l});return o.set(a,f),f}let _o={scope:{type:Object,default:void 0},schema:{type:Object,required:!0},components:{type:Object,required:!0},designMode:{type:String,default:`live`},device:{type:String,default:void 0},locale:{type:String,default:void 0},messages:{type:Object,default:()=>({})},props:{type:Object,default:void 0},getNode:{type:Function,default:void 0},onCompGetCtx:{type:Function,default:void 0},requestHandlersMap:{type:Object,default:void 0},onRuntimeScope:{type:Function,default:void 0}},vo=(0,t.defineComponent)({name:`LowCodeRenderer`,inheritAttrs:!1,props:_o,setup(e,n){let r=e,i=L(),a=e=>{var t,n;return(t=(n=r.getNode)==null?void 0:n.call(r,e))==null?null:t},o=(e,t)=>{var n;return(n=r.onCompGetCtx)==null?void 0:n.call(r,e,t)},s=(0,t.computed)(()=>{let e={...uo.getRenderers()};for(let[t,n]of Object.entries(r.components))e[t]=i.normalizeComponent(n);return e}),c=()=>{let e=s.value,{schema:t}=r;if(!t)return null;let{componentName:c}=t,l=e[c]||e[`${c}Renderer`];return l&&!l.__renderer__&&(l=co[`${c}Renderer`]),l?i.h(go(l,t),{...n.attrs,...fo(n),...r.props,key:t.__ctx?`${t.__ctx.lceKey}_${t.__ctx.idx||`0`}`:t.id,__scope:r.scope,__schema:t,__locale:r.locale,__messages:r.messages,__components:e,__designMode:r.designMode,__getNode:a,__triggerCompGetCtx:o,__requestHandlersMap:r.requestHandlersMap,__onRuntimeScope:r.onRuntimeScope}):null};return()=>{let e=uo.getConfigProvider();return e?i.h(e,{device:r.device,locale:r.locale},{default:()=>[c()].filter(Boolean)}):c()}}});function yo(e,n){let r=L(),{props:i}=mo(e);return(0,t.markRaw)((0,t.defineComponent)({name:e.fileName||e.componentName,inheritAttrs:!1,props:Object.keys(i),setup(t,i){return()=>r.h(vo,{...i.attrs,...fo(i),...n(),schema:e,props:{...t}})}}))}function bo(e,t){return Object.assign(e,t)}let xo=bo((0,t.defineComponent)({name:`Leaf`,setup(e,{slots:t}){let{h:n,PassThrough:r}=L();return()=>n(r,null,t)}}),{displayName:`Leaf`,componentMetadata:{componentName:`Leaf`,configure:{props:[{name:`children`,setter:`StringSetter`}],supports:!1}}}),So=bo((0,t.defineComponent)({name:`Page`,setup(e,{slots:t}){return()=>L().h(`div`,{class:`lc-page`},t)}}),{displayName:`Page`,componentMetadata:{componentName:`Page`,configure:{supports:{style:!0,className:!0},component:{isContainer:!0,disableBehaviors:`*`}}}}),Co=bo((0,t.defineComponent)({name:`LcSlot`,setup(e,{slots:t}){return()=>L().h(`div`,{class:`lc-container`},t)}}),{displayName:`Slot`,componentMetadata:{componentName:`Slot`,configure:{props:[{name:`___title`,title:`插槽标题`,setter:`StringSetter`,defaultValue:`插槽容器`},{name:`___params`,title:`插槽入参`,setter:{componentName:`ArraySetter`,props:{itemSetter:{componentName:`StringSetter`,props:{placeholder:`参数名称`}}}}}],component:{isContainer:!0,disableBehaviors:`*`},supports:!1}}});function wo(){return window.LCSimulatorHost}let To={type:Object,required:!0},Eo=(0,t.defineComponent)({name:`Layout`,props:{simulator:To},setup(e,{slots:t}){let{h:n}=L();return()=>{var r;let{simulator:i}=e,{layout:a,getComponent:o}=i,s=(r=a==null?void 0:a.Component)==null?a!=null&&a.componentName?o(a.componentName):null:r;return s?n(s,{...a.props,simulator:i,key:`layout`},t):n(`div`,null,t)}}}),Do=(0,t.defineComponent)({name:`SimulatorRendererView`,props:{simulator:To},setup(e){let{h:t}=L(),{RouterView:n}=on();return()=>t(Eo,{simulator:e.simulator},{default:()=>[t(n)]})}}),Oo=(0,t.defineComponent)({name:`DocumentView`,props:{simulator:To,documentInstance:{type:Object,required:!0}},setup(e){let{h:t}=L();return()=>{let{documentInstance:n,simulator:r}=e;if(!r.autoRender)return null;let{schema:i,scope:a,messages:o,key:s}=n;return t(vo,{key:s,scope:a,schema:i,messages:o,locale:r.locale,device:r.device,components:r.components,designMode:r.designMode,requestHandlersMap:r.requestHandlersMap,getNode:e=>n.getNode(e),onCompGetCtx:(e,t)=>n.mountInstance(e.id,t)})}}}),ko=Symbol(`_LCDocId`),Ao=Symbol(`_LCNodeId`),jo=Symbol(`_LCVueInstance`),Mo=Symbol(`_LCVueCompRecord`);var No=class{constructor(e,t,n){this.did=e,this.nid=t,this.cid=n,q(this,Mo,!0)}};function Po(e){return G(e)&&ko in e}function Fo(e){return G(e)&&Mo in e}function Io(e){return{docId:e[ko],nodeId:e[Ao],instance:e[jo]}}function Lo(e,t){let n=e;n[ko]=t.docId,n[Ao]=t.nodeId,n[jo]=t.instance}function Ro(e,t){return document.contains(e)?Bo(e,t):(console.warn(`当前元素已经不存在`,e),null)}function zo(e,t){for(;e;){let n=e.$el;if(n&&Po(n)){let{nodeId:e,docId:r,instance:i}=Io(n);if(!t||t===e)return{docId:r,nodeId:e,instance:new No(r,e,L().instanceId(i))}}e=e.$parent}return null}function Bo(e,t){for(;e;){if(Po(e)){let{nodeId:n,docId:r,instance:i}=Io(e);if(!t||t===n)return{docId:r,nodeId:n,instance:new No(r,n,L().instanceId(i))}}e=e.parentElement}return null}let Vo=new class{constructor(){q(this,`states`,/* @__PURE__ */ new Set)}setDragging(e){e?this.addState(`dragging`):this.removeState(`dragging`)}setXResizing(e){e?this.addState(`x-resizing`):this.removeState(`x-resizing`)}setYResizing(e){e?this.addState(`y-resizing`):this.removeState(`y-resizing`)}setCopy(e){e?this.addState(`copy`):this.removeState(`copy`)}isCopy(){return this.states.has(`copy`)}release(){for(let e of this.states)this.removeState(e)}addState(e){this.states.has(e)||(this.states.add(e),document.documentElement.classList.add(`lc-cursor-${e}`))}removeState(e){this.states.has(e)&&(this.states.delete(e),document.documentElement.classList.remove(`lc-cursor-${e}`))}};function Ho(e,t){if(G(e)&&G(t)){let n=Object.assign({},e);return Object.keys(t).forEach(r=>{Reflect.set(n,r,Ho(e[r],t[r]))}),n}return t==null?e:t}let Uo;function Wo(e){return e.parentNode?vn(e)?[e.getBoundingClientRect()]:(Uo!=null||(Uo=document.createRange()),Uo.selectNode(e),Array.from(Uo.getClientRects())):[]}let Go=!0,Ko=e=>Go?null:(e.preventDefault(),e.stopPropagation(),!1);function qo(){return document.addEventListener(`selectstart`,Ko,!0),document.addEventListener(`dragstart`,Ko,!0),()=>{document.removeEventListener(`selectstart`,Ko,!0),document.removeEventListener(`dragstart`,Ko,!0)}}function Jo(e){Go=e}let Yo={Slot:Co,Leaf:xo,Page:So};function Xo(e,n,r){let i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Map,o=(0,t.ref)(Date.now()),s=(0,t.computed)(()=>{var t;return o.value,(t=e.export(V.Render))==null?{fileName:`/`,componentName:`Page`}:t}),c=L(),l=e=>c.isAlive(e),u=(e,t,n)=>{let i=n?n.map(n=>new No(e,t,c.instanceId(n))):null;r.setInstance(e,t,i)},d=e=>a.get(e),f=(t,n)=>{let r=e.id;if(n==null){let e=i.get(t);if(e){for(let t of e.filter(e=>!l(e)))a.delete(c.instanceId(t));e=e.filter(l),e.length>0?(i.set(t,e),u(r,t,e)):(i.delete(t),u(r,t,null))}return}let o=n.$el;if(!o)return;let s=Io(o).nodeId;s&&s!==t&&p(s,n),Lo(o,{nodeId:t,docId:r,instance:n});let d=i.get(t);if(d){let e=d.length;d=d.filter(l);let t=d.length!==e;if(d.includes(n)||(d.push(n),t=!0),!t)return}else d=[n];a.set(c.instanceId(n),n),i.set(t,d),u(r,t,d)},p=(t,n)=>{let r=i.get(t);if(r){let i=r.indexOf(n);if(i>-1){let[n]=r.splice(i,1);a.delete(c.instanceId(n)),u(e.id,t,r)}}};return(0,t.reactive)({id:(0,t.computed)(()=>e.id),path:(0,t.computed)(()=>{let{fileName:t}=e;return t.startsWith(`/`)?t:`/${t}`}),key:(0,t.computed)(()=>`${e.id}:${o.value}`),scope:(0,t.computed)(()=>{var e;let t=s.value,{utils:i,constants:a,...o}=n.appHelper;return{utils:{...i,...Mi(r.libraryMap,(e=Reflect.get(t,`utils`))==null?[]:e)},constants:{...a,...Reflect.get(t,`constants`)},...o}}),schema:s,document:(0,t.computed)(()=>e),messages:(0,t.computed)(()=>Ho(n.i18n,Reflect.get(s.value,`i18n`))),instancesMap:(0,t.computed)(()=>i),getNode:t=>t?e.getNode(t):null,mountInstance:f,unmountInstance:p,getComponentInstance:d,rerender:()=>{o.value=Date.now()}})}function Zo(){let e=new URLSearchParams(window.parent.location.search);return Object.fromEntries(e.entries())}function Qo(e=wo()){let n=L(),r=new Nn,i=(0,t.shallowRef)({}),a=(0,t.shallowRef)(`default`),o=(0,t.shallowRef)(),s=(0,t.shallowRef)(e.autoRender),c=(0,t.shallowRef)(`design`),l=(0,t.shallowRef)({}),u=(0,t.shallowRef)({}),d=(0,t.shallowRef)({}),f=(0,t.shallowRef)({}),p=(0,t.shallowRef)([]),m=(0,t.reactive)({i18n:{},appHelper:{utils:{},constants:{}}}),h=[];h.push(qo());let g=/* @__PURE__ */ new Map;function _(){u.value={...Yo,...ji(l.value,d.value,y.createComponent)}}let v=on().createMemoryRouter();h.push(v.guard({query:Zo,onBlocked:()=>console.warn(`编辑态不允许路由跳转`)}));let y=(0,t.reactive)({config:(0,t.markRaw)(uo),router:(0,t.markRaw)(v),app:null,layout:i,device:a,locale:o,designMode:c,libraryMap:l,components:u,autoRender:s,componentsMap:d,documentInstances:p,requestHandlersMap:f,isSimulatorRenderer:!0});return y.getComponent=e=>{let t=e.split(`.`),n=[];for(;t.length>0;){let r=u.value[e];if(r)return Oi(r,n);let i=t.pop();if(!i)break;n.unshift(i),e=t.join(`.`)}return null},y.getClosestNodeInstance=(e,t)=>{if(Fo(e)){var n;let{cid:r,did:i}=e,a=g.get(i),o=(n=a==null?void 0:a.getComponentInstance(r))==null?null:n;return o&&zo(o,t)}return Ro(e,t)},y.findDOMNodes=e=>{if(e){let{did:t,cid:r}=e,i=g.get(t),a=i==null?void 0:i.getComponentInstance(r);return a?n.domNodesOf(a):null}return null},y.getClientRects=e=>Wo(e),y.setNativeSelection=e=>Jo(e),y.setDraggingState=e=>Vo.setDragging(e),y.setCopyState=e=>Vo.setCopy(e),y.clearState=()=>Vo.release(),y.createComponent=e=>yo(e,()=>({components:u.value,designMode:`live`,device:a.value,locale:o.value,messages:m.i18n})),y.load=e=>r.load(e),y.loadAsyncLibrary=async e=>{await r.loadAsyncLibrary(e),_()},y.rerender=()=>{for(let e of p.value)e.rerender()},y.dispose=()=>{var e;(e=y.app)==null||e.unmount();for(let e of h)e()},y.getCurrentDocument=()=>{let t=e.project.currentDocument,n=p.value;return t?n.find(e=>e.id===t.id):void 0},y.run=()=>{if(y.app)return;let r=document.getElementById(`app`);r||(r=document.createElement(`div`),document.body.appendChild(r),r.id=`app`),document.documentElement.classList.add(`engine-page`),document.body.classList.add(`engine-document`),y.app=(0,t.markRaw)(n.mount(Do,{simulator:y},r,v)),e.project.setRendererReady(y)},h.push(e.connect(y,()=>{var t,n;i.value=(t=(n=e.project.get(`config`))==null?void 0:n.layout)==null?{}:t,(l.value!==e.libraryMap||d.value!==e.designer.componentsMap)&&(l.value=e.libraryMap||{},d.value=e.designer.componentsMap,_()),o.value=e.locale,a.value=e.device,c.value=e.designMode,f.value=e.requestHandlersMap})),h.push(e.autorun(()=>{let t=new Set(e.project.documents.map(e=>e.id));for(let e of[...g.keys()])t.has(e)||(g.delete(e),v.removeRoute(e));p.value=e.project.documents.map(t=>{let n=g.get(t.id);if(!n){let r=Xo(t,m,e);n=r,g.set(t.id,r),v.addRoute({name:r.id,path:r.path,component:Oo,props:()=>({documentInstance:r,simulator:y})})}return n});let n=y.getCurrentDocument();n&&n.id!==v.currentRouteName&&v.replace(n.id)})),e.componentsConsumer.consume(async e=>{e&&(await r.load(e),_())}),e.injectionConsumer.consume(t=>{if(t.appHelper){let{utils:n,constants:r,...i}=t.appHelper;Object.assign(m.appHelper,{utils:Array.isArray(n)?Mi(e.libraryMap,n):n==null?{}:n,constants:r==null?{}:r,...i})}}),e.i18nConsumer.consume(e=>{var t;m.i18n=(t=e)==null?{}:t}),y}function $o(e){let t=window,n=Qo(e);return t.SimulatorRenderer=n,t.addEventListener(`beforeunload`,()=>{t.LCSimulatorHost=null,t.SimulatorRenderer=null,n.dispose()}),n}let es=/^v-([\w-]+)(:\w+)?((\.\w+)*)$/,ts=/^on[A-Z]/,ns=[`attrs`,`domProps`,`nativeOn`];function rs(e,t){if(!e||typeof e==`string`)return;let n=typeof e==`function`?e.options:void 0;return(n==null?e:n)[t]}function is(e){let t=rs(e,`props`);if(!t)return/* @__PURE__ */ new Set;let n=Array.isArray(t)?t:Object.keys(t);return new Set(n.map(e=>yn(e)))}function as(e,t){let n=e.match(es);return{name:n[1],rawName:e,value:t,arg:n[2],directives:(n[3]||``).split(`.`).filter(e=>!!e).reduce((e,t)=>(e[t]=!0,e),{})}}function os(e,t,n){let r=is(e),i={},a={},o={},s=[],c={on:i,props:a,attrs:o,directives:s};if(Object.keys(t).forEach(e=>{let n=t[e];if(!ns.includes(e)){if(e===`key`||e===`ref`||e===`class`||e===`style`)c[e]=n;else if(r.has(yn(e)))a[yn(e)]=n;else if(ts.test(e)){let t=e.slice(2);i[t[0].toLowerCase()+t.slice(1)]=n}else es.test(e)?s.push(as(e,n)):typeof n==`function`||typeof n==`object`&&n||(o[e]=n)}}),ns.forEach(e=>{let n=t[e];Object.prototype.toString.call(n)===`[object Object]`&&(c[e]={...c[e],...n})}),n){let e={};Object.keys(n).forEach(t=>{let r=n[t];typeof r==`function`&&(r.proxy=!0,e[t]=r)}),Object.keys(e).length>0&&(c.scopedSlots=e)}return c}function ss(e,n,r){let i=n==null?{}:n;if(typeof e==`string`)return(0,t.h)(e,os(e,i),en(r));let{default:a,...o}=r==null?{}:r;return a&&!$t(a)?(0,t.h)(e,os(e,i,o),a()):(0,t.h)(e,os(e,i,r))}function cs(e){return(0,t.defineComponent)({setup(n,{attrs:r,listeners:i,slots:a}){return()=>(0,t.h)(e,{attrs:{...r},on:i},en(a))}})}let ls={version:2,h:ss,text:e=>t.default.prototype._v(e),Fragment:(0,t.defineComponent)({name:`Fragment`,setup(e,{slots:n}){return()=>{var e;return(0,t.h)(`div`,(e=n.default)==null?void 0:e.call(n))}}}),PassThrough:{name:`PassThrough`,functional:!0,render(e,t){var n,r,i;return(n=(r=(i=t.scopedSlots).default)==null?void 0:r.call(i,{}))==null?[]:n}},set:(e,n,r)=>{(0,t.set)(e,n,r)},del:(e,n)=>(0,t.del)(e,n),registerDirective:(e,n)=>{t.default.directive(e,n)},isComponent:e=>typeof e==`function`||!!e&&typeof e==`object`&&(`render`in e||`setup`in e||`template`in e),normalizeComponent:e=>{var t;return(t=e.extendOptions)==null?e:t},wrapTag:cs,modelOf(e){var t,n;let r=rs(e,`model`);return{prop:(t=r==null?void 0:r.prop)==null?`value`:t,event:(n=r==null?void 0:r.event)==null?`input`:n}},unmountedHook:e=>({"onHook:destroyed":e}),refsOf:e=>e.$refs,onCreated(e){var n;let r=(0,t.getCurrentInstance)().proxy;r.$options.created=[...(n=r.$options.created)==null?[]:n,e]},instanceId:e=>e._uid,isAlive:e=>!e._isDestroyed,domNodesOf(e){let t=e.$el;return!t||t.nodeType===8||t.nodeType===3&&!t.nodeValue?null:[t]},mount(e,n,r,i){let a=new t.default({router:i==null?void 0:i.raw,render:t=>t(e,{props:n})}).$mount(r);return{unmount:()=>a.$destroy()}}};rn(ls),an(Xt),$o(),e.AssetLoader=Nn,e.BlockRenderer=oo,e.ComponentRenderer=so,e.EXPRESSION_TYPE=bi,e.PageRenderer=ao,e.RENDERER_COMPS=co,e.Renderer=vo,e.RendererConfig=lo,e.StylePoint=Mn,e.accessLibrary=Di,e.assetItem=kn,e.buildComponents=ji,e.buildUtils=Mi,e.camelize=yn,e.clearExpressionCache=Jn,e.componentSchemaOf=Ti,e.createDefer=xn,e.createDocumentInstance=Xo,e.createSimulatorRenderer=Qo,e.declaredOptions=mo,e.ensureArray=R,e.evaluateExpression=Kn,e.evaluateScript=Sn,e.findComponent=ki,e.getAdapter=L,e.getExpressionCacheSize=qn,e.getI18n=gi,e.getRendererContextKey=sn,e.getRouterAdapter=on,e.getSubComponent=Oi,e.inSameDomain=Un,e.installSimulatorRenderer=$o,e.isAssetBundle=On,e.isAssetItem=Dn,e.isCSSUrl=_n,e.isComponentSchema=wi,e.isDOMText=vi,e.isESModule=gn,e.isElement=vn,e.isFunction=W,e.isI18nData=_i,e.isJSExpression=X,e.isJSFunction=Z,e.isJSSlot=Q,e.isLifecycleKey=Va,e.isNil=H,e.isNodeSchema=yi,e.isObject=G,e.isPlainObject=K,e.isPromise=hn,e.isRuntimeScope=ia,e.isScopedSlot=$t,e.isString=U,e.loadScript=Cn,e.lowCodeComponent=yo,e.lowerFirst=bn,e.markScopedSlot=Qt,e.mergeScope=oa,e.parseExpression=Si,e.parseI18n=xi,e.parseSchema=$,e.parseSlotScope=Ci,e.rendererConfig=uo,e.rendererProps=un,e.rewriteThis=zn,e.schemaComponent=go,e.setAdapter=rn,e.setRouterAdapter=an,e.setupDesignerEnvironment=Pn,e.slotChildren=en,e.toDisplayString=Yn,e.useLeaf=eo,e.useRenderer=to,e.useRendererContext=cn,e.vue2Adapter=ls,e.vue2RouterAdapter=Xt});
|
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdlab996/lowcode-vue2",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"description": "LowCode Engine renderer and designer simulator for Vue 2.7.",
|
|
6
|
+
"author": "wudi <wuchendi96@gmail.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/wuchendi/lowcode-engine-vue/tree/main/packages/renderer/vue2",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/wuchendi/lowcode-engine-vue.git",
|
|
12
|
+
"directory": "packages/renderer/vue2"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/wuchendi/lowcode-engine-vue/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"vue",
|
|
19
|
+
"lowcode",
|
|
20
|
+
"lowcode-engine"
|
|
21
|
+
],
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.mts",
|
|
25
|
+
"default": "./dist/index.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./runtime": {
|
|
28
|
+
"types": "./dist/runtime.d.mts",
|
|
29
|
+
"default": "./dist/runtime.mjs"
|
|
30
|
+
},
|
|
31
|
+
"./designer": {
|
|
32
|
+
"types": "./dist/designer.d.mts",
|
|
33
|
+
"default": "./dist/designer.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./simulator.css": "./dist/simulator.css",
|
|
36
|
+
"./dist/*": "./dist/*"
|
|
37
|
+
},
|
|
38
|
+
"main": "./dist/index.mjs",
|
|
39
|
+
"module": "./dist/index.mjs",
|
|
40
|
+
"types": "./dist/index.d.mts",
|
|
41
|
+
"unpkg": "./dist/renderer.umd.js",
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"README.md"
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@cdlab996/lowcode-vue-core": "2.0.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"vue": "^2.7.16",
|
|
51
|
+
"vue-router": "^3.6.5"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@alilc/lowcode-designer": "^1.3.4",
|
|
55
|
+
"@cdlab996/lowcode-tsconfig": "1.0.0",
|
|
56
|
+
"tsdown": "^0.23.7",
|
|
57
|
+
"vue": "2.7.16",
|
|
58
|
+
"vue-router": "3.6.5"
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public",
|
|
62
|
+
"registry": "https://registry.npmjs.org/"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "tsdown",
|
|
66
|
+
"dev": "tsdown --watch",
|
|
67
|
+
"lint:type": "tsc -p ./tsconfig.json --noEmit"
|
|
68
|
+
}
|
|
6
69
|
}
|