@aevantec/litevue 0.5.17 → 0.6.1
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 +2 -1
- package/dist/litevue-devtools.iife.js +1 -1
- package/dist/litevue-devtools.mjs +1 -1
- package/dist/litevue-devtools.umd.js +1 -1
- package/dist/litevue-plugins.dev.iife.js +63 -47
- package/dist/litevue-plugins.dev.mjs +63 -47
- package/dist/litevue-plugins.iife.js +1 -1
- package/dist/litevue-plugins.mjs +1 -1
- package/dist/litevue-plugins.umd.js +1 -1
- package/dist/litevue.dev.iife.js +28 -21
- package/dist/litevue.dev.mjs +28 -21
- package/dist/litevue.iife.js +1 -1
- package/dist/litevue.mjs +1 -1
- package/dist/litevue.umd.js +1 -1
- package/dist/plugins/collapse.iife.js +1 -1
- package/dist/plugins/collapse.mjs +1 -1
- package/dist/plugins/collapse.umd.js +1 -1
- package/dist/plugins/focus.iife.js +1 -1
- package/dist/plugins/focus.mjs +1 -1
- package/dist/plugins/focus.umd.js +1 -1
- package/dist/plugins/mask.iife.js +1 -1
- package/dist/plugins/mask.mjs +1 -1
- package/dist/plugins/mask.umd.js +1 -1
- package/dist/plugins/morph.dev.iife.js +24 -5
- package/dist/plugins/morph.dev.mjs +24 -5
- package/dist/plugins/morph.iife.js +1 -1
- package/dist/plugins/morph.mjs +1 -1
- package/dist/plugins/morph.umd.js +1 -1
- package/dist/plugins/navigate.dev.iife.js +26 -20
- package/dist/plugins/navigate.dev.mjs +26 -20
- package/dist/plugins/navigate.iife.js +1 -1
- package/dist/plugins/navigate.mjs +1 -1
- package/dist/plugins/navigate.umd.js +1 -1
- package/dist/plugins/persist.dev.iife.js +6 -8
- package/dist/plugins/persist.dev.mjs +6 -8
- package/dist/plugins/persist.iife.js +1 -1
- package/dist/plugins/persist.mjs +1 -1
- package/dist/plugins/persist.umd.js +1 -1
- package/dist/plugins/popover.iife.js +1 -1
- package/dist/plugins/popover.mjs +1 -1
- package/dist/plugins/popover.umd.js +1 -1
- package/dist/plugins/transition.iife.js +1 -1
- package/dist/plugins/transition.mjs +1 -1
- package/dist/plugins/transition.umd.js +1 -1
- package/dist/types/devtools-panel/values.d.mts +6 -0
- package/dist/types/devtools-panel/values.d.ts +6 -0
- package/dist/types/directives/index.d.mts +2 -0
- package/dist/types/directives/index.d.ts +2 -0
- package/dist/types/plugins/focus/index.d.mts +1 -1
- package/dist/types/plugins/focus/index.d.ts +1 -1
- package/dist/types/plugins/morph/index.d.mts +6 -0
- package/dist/types/plugins/morph/index.d.ts +6 -0
- package/dist/types/scheduler.d.mts +1 -1
- package/dist/types/scheduler.d.ts +1 -1
- package/package.json +10 -10
package/dist/litevue.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}var t=()=>{},n=Object.assign,s=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},r=Object.prototype.hasOwnProperty,i=(e,t)=>r.call(e,t),o=Array.isArray,c=e=>"[object Date]"===p(e),l=e=>"string"==typeof e,a=e=>"symbol"==typeof e,u=e=>null!==e&&"object"==typeof e,f=Object.prototype.toString,p=e=>f.call(e),d=e=>l(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,h=e=>{const t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))},v=/-(\w)/g,m=/* @__PURE__ */h(e=>e.replace(v,(e,t)=>t?t.toUpperCase():"")),g=/\B([A-Z])/g,_=/* @__PURE__ */h(e=>e.replace(g,"-$1").toLowerCase()),y=(e,t)=>!Object.is(e,t);function b(e){if(o(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=l(s)?O(s):b(s);if(r)for(const e in r)t[e]=r[e]}return t}if(l(e)||u(e))return e}var w,x=/;(?![^(]*\))/g,$=/:([^]+)/,k=/\/\*[^]*?\*\//g;function O(e){const t={};return e.replace(k,"").split(x).forEach(e=>{if(e){const n=e.split($);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function S(e){let t="";if(l(e))t=e;else if(o(e))for(let n=0;n<e.length;n++){const s=S(e[n]);s&&(t+=s+" ")}else if(u(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function E(e,t){if(e===t)return!0;let n=c(e),s=c(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=a(e),s=a(t),n||s)return e===t;if(n=o(e),s=o(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=E(e[s],t[s]);return n}(e,t);if(n=u(e),s=u(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!E(e[n],t[n]))return!1}}return String(e)===String(t)}function L(e,t){return e.findIndex(e=>E(e,t))}function j(e,t=void 0){t&&t.active&&t.effects.push(e)}var A=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,j(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,V();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(T(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),z()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=C,t=w;try{return C=!0,w=this,this._runnings++,N(this),this.fn()}finally{P(this),this._runnings--,w=t,C=e}}stop(){this.active&&(N(this),P(this),this.onStop&&this.onStop(),this.active=!1)}};function T(e){return e.value}function N(e){e._trackId++,e._depsLength=0}function P(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)R(e.deps[t],e);e.deps.length=e._depsLength}}function R(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function I(e,s){e.effect instanceof A&&(e=e.effect.fn);const r=new A(e,t,()=>{r.dirty&&r.run()});s&&(n(r,s),s.scope&&j(r,s.scope)),s&&s.lazy||r.run();const i=r.run.bind(r);return i.effect=r,i}var C=!0,M=0,W=[];function V(){W.push(C),C=!1}function z(){const e=W.pop();C=void 0===e||e}function B(){M++}function K(){for(M--;!M&&F.length;)F.shift()()}function D(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&R(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var F=[];function q(e,t,n){B();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&F.push(s.scheduler)))}K()}var U=(e,t)=>{const n=/* @__PURE__ */new Map;return n.cleanup=e,n.computed=t,n},H=/* @__PURE__ */new WeakMap,J=Symbol("");function Z(e,t,n){if(C&&w){let t=H.get(e);t||H.set(e,t=/* @__PURE__ */new Map);let s=t.get(n);s||t.set(n,s=U(()=>t.delete(n))),D(w,s)}}function G(e,t,n,s,r,i){const c=H.get(e);if(!c)return;let l=[];if("length"===n&&o(e)){const e=Number(s);c.forEach((t,n)=>{("length"===n||!a(n)&&n>=e)&&l.push(t)})}else switch(void 0!==n&&l.push(c.get(n)),t){case"add":o(e)?d(n)&&l.push(c.get("length")):l.push(c.get(J));break;case"delete":o(e)||l.push(c.get(J))}B();for(const o of l)o&&q(o,4);K()}var Q=/* @__PURE__ */e("__proto__,__v_isRef,__isVue"),X=new Set(/* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(a)),Y=/* @__PURE__ */ee();function ee(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=ve(this);for(let t=0,r=this.length;t<r;t++)Z(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(ve)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){V(),B();const n=ve(this)[t].apply(this,e);return K(),z(),n}}),e}function te(e){a(e)||(e=String(e));const t=ve(this);return Z(t,0,e),t.hasOwnProperty(e)}var ne=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?ue:ae:r?le:ce).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const c=o(e);if(!s){if(c&&i(Y,t))return Reflect.get(Y,t,n);if("hasOwnProperty"===t)return te}const l=Reflect.get(e,t,n);return(a(t)?X.has(t):Q(t))?l:(s||Z(e,0,t),r?l:ye(l)?c&&d(t)?l:l.value:u(l)?s?function(e){return de(e,!0,oe,null,ae)}(l):pe(l):l)}},se=class extends ne{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=he(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||he(n)||(r=ve(r),n=ve(n)),!o(e)&&ye(r)&&!ye(n))return!t&&(r.value=n,!0)}const c=o(e)&&d(t)?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,s);return e===ve(s)&&(c?y(n,r)&&G(e,"set",t,n):G(e,"add",t,n)),l}deleteProperty(e,t){const n=i(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&G(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return a(t)&&X.has(t)||Z(e,0,t),n}ownKeys(e){return Z(e,0,o(e)?"length":J),Reflect.ownKeys(e)}},re=class extends ne{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ie=/* @__PURE__ */new se,oe=/* @__PURE__ */new re,ce=/* @__PURE__ */new WeakMap,le=/* @__PURE__ */new WeakMap,ae=/* @__PURE__ */new WeakMap,ue=/* @__PURE__ */new WeakMap;function fe(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>p(e).slice(8,-1))(e))}function pe(e){return he(e)?e:de(e,!1,ie,null,ce)}function de(e,t,n,s,r){if(!u(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=fe(e);if(0===o)return e;const c=new Proxy(e,2===o?s:n);return r.set(e,c),c}function he(e){return!(!e||!e.__v_isReadonly)}function ve(e){const t=e&&e.__v_raw;return t?ve(t):e}var me=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new A(()=>e(this._value),()=>_e(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=ve(this);var t,n;return e._cacheable&&!e.effect.dirty||!y(e._value,e._value=e.effect.run())||_e(e,4),t=e,C&&w&&(t=ve(t),D(w,null!=(n=t.dep)?n:t.dep=U(()=>t.dep=void 0,t instanceof me?t:void 0))),e.effect._dirtyLevel>=2&&_e(e,2),e._value}set value(e){this._setter(e)}};function ge(e,n,s=!1){let r,i;const o="function"==typeof e;return o?(r=e,i=t):(r=e.get,i=e.set),new me(r,i,o||!i,s)}function _e(e,t=4,n,s){const r=(e=ve(e)).dep;r&&q(r,t)}function ye(e){return!(!e||!0!==e.__v_isRef)}var be=/* @__PURE__ */new Map,we=/* @__PURE__ */new Map,xe=/* @__PURE__ */new Map,$e=/* @__PURE__ */new Map,ke=/* @__PURE__ */new Set,Oe=[],Se=!1,Ee=()=>Se||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,Le={"scope:mount":/* @__PURE__ */new Set,"scope:unmount":/* @__PURE__ */new Set,"store:register":/* @__PURE__ */new Set,"plugin:install":/* @__PURE__ */new Set,flush:/* @__PURE__ */new Set},je=(e,...t)=>{Le[e].forEach(e=>e(...t))},Ae=(e,n,s,r)=>Ee()?t:(be.set(e,n),s&&we.set(e,s),r&&xe.set(e,r),je("scope:mount",e,n),()=>{be.delete(e)&&(we.delete(e),xe.delete(e),je("scope:unmount",e))}),Te={scopes:be,exps:we,names:xe,stores:$e,components:ke,plugins:Oe,getScopeByName(e){for(const[t,n]of xe)if(n===e)return be.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=be.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(Le[e].add(t),()=>Le[e].delete(t)),off(e,t){Le[e].delete(t)}},Ne=()=>{Se=!0,be.clear(),we.clear(),xe.clear(),$e.clear(),ke.clear(),Oe.length=0;for(const e in Le)Le[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Te&&delete window.__LITE_VUE__};"undefined"==typeof window||Ee()||(window.__LITE_VUE__=Te);var Pe,Re=[],Ie=(e,t)=>{for(const s of[...Re])try{s(e,t)}catch(n){}Re.length||console.error(e)},Ce=/* @__PURE__ */new WeakSet,Me=e=>{Ce.add(e),e.effect&&function(e){e.effect.stop()}(e)},We=!1,Ve=0,ze=/* @__PURE__ */new Set,Be=Promise.resolve(),Ke=e=>Be.then(e),De=e=>(e.i=Ve++,e),Fe=e=>{e.i??De(e),ze.add(e),We||(We=!0,Ke(qe))},qe=()=>{const e=/* @__PURE__ */new Map;for(;ze.size;)for(const n of[...ze].sort((e,t)=>e.i-t.i)){if(ze.delete(n),Ce.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)Ie(Error("update loop"),{phase:"effect"});else try{n()}catch(t){Ie(t,{phase:"effect"})}}We=!1,Le.flush.size&&!Ee()&&je("flush")},Ue=0,He=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++Ue}`)},Je=e=>(t,n,r)=>{const i="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let o,c=!1;const l=e.effect(()=>{const e=i(),t=o;if(o=e,c?y(e,t):r?.immediate){V();try{n(e,t)}finally{z()}}c=!0});return()=>{Me(l),s(e.effects,l)}},Ze=/^(spellcheck|draggable|translate|form|list|type)$/,Ge=/^(readonly|novalidate|formnovalidate|allowfullscreen|playsinline)$/,Qe=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let i;s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=m(s)),Xe(e,s,n,i);else{for(const t in n)Xe(e,t,n[t],i&&i[t]);for(const t in i)n&&t in n||Xe(e,t,null,i[t])}i="[object Object]"===p(n)?{...n}:n,s||(e.__bound=i)})},Xe=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",S(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=Ye(n),i=Ye(s);for(const e in r)tt(t,e,r[e]);for(const e in i)null==r[e]&&tt(t,e,"");"_vod"in e&&(("display"in r||"display"in i)&&(e._vod=t.display),e._vsh&&(t.display="none")),t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Ze.test(t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:(Ge.test(t)&&(n=n||""===n?"":null),null!=n?e.setAttribute(t,n):e.removeAttribute(t)):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},Ye=e=>l(e=b(e))?O(e):e||{},et=/\s*!important$/,tt=(e,t,n)=>{o(n)?n.forEach(n=>tt(e,t,n)):t.startsWith("--")?e.setProperty(t,n):et.test(n)?e.setProperty(_(t),n.replace(et,""),"important"):e[t]=n},nt=Object.create(null),st=0,rt=e=>e.replace(/^return\(([^]*)\)$/,"$1"),it=(e,t,n,s)=>ot(e,`return(${t})`,n,s),ot=(e,t,n,s)=>{let r=nt[t];r||(++st>1e3&&(nt=Object.create(null),st=1),r=nt[t]=ct(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(i){Ie(i,{phase:"expression",expression:s?.expression??rt(t),source:s?.source,el:s?.el??n,scope:e})}},ct=(e,n,s)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(r){return Ie(r,{phase:"compile",expression:s?.expression??rt(e),source:s?.source,el:s?.el??n}),t}},lt=Object.create(null),at=0,ut=/^\s*(async\s*)?(\([^)]*?\)|[\w$]+)\s*=>|^\s*(async\s+)?function\b/,ft=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,pt=["ctrl","shift","alt","meta"],dt={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>pt.some(n=>e[`${n}Key`]&&!t[n])},ht={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},vt=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,mt=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const i=/\bawait\b/.test(n)?"async ":"";let o,c=ft.test(n)||ut.test(n)?t(`(e => (${n})(e))`):(e=>{const t=lt[e];if(void 0!==t)return t;++at>1e3&&(lt=Object.create(null),at=1);try{return new Function(`return (${e})`),lt[e]=!0}catch{return lt[e]=!1}})(n)?t(`(${i}$event => (${n}))`):t(`(${i}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return Ke(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(o),o=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!vt.test(e)||e in ht);c=s=>{if(!r.outside||!e.contains(s.target)){if("key"in s&&n.length){const e=_(s.key);if(!n.some(t=>t===e||ht[t]===e))return}for(const e in r){const t=dt[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return r.once&&l.removeEventListener(a,c,r),t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,{...r,once:!1}),()=>{clearTimeout(o),l.removeEventListener(a,c,r)}},gt=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=_t(t())})},_t=e=>null==e?"":u(e)?JSON.stringify(e,null,2):String(e),yt=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},bt=e=>"_value"in e?e._value:e.value,wt=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},xt=e=>{e.target.composing=!0},$t=e=>{const t=e.target;t.composing&&(t.composing=!1,kt(t,"input"))},kt=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},Ot=/* @__PURE__ */new WeakMap,St=e=>{const t=Pe;return Pe=e,t},Et=(e,t=Pe)=>{if(!t)return;const n=Ot.get(t);n?n.push(e):Ot.set(t,[e])},Lt=e=>{const t=Ot.get(e);if(t){Ot.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;Lt(n),n=e}},jt={bind:Qe,on:mt,show:({el:e,get:t,effect:n})=>{e._vod="none"==e.style.display?"":e.style.display,n(()=>{e._vsh=!t(),e.style.display=e._vsh?"none":e._vod})},text:gt,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const i=e.type,c=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===i,lazy:u,fill:f}=r||{},p=e=>a?(e=>{const t=parseFloat(e);return isNaN(t)?e:t})(e):e,d=[],h=(t,n)=>d.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));let v,m,g=!1;if("SELECT"===e.tagName){const t=e;h("change",v=()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>p(bt(e)));c(t.multiple?e:e[0])}),m=()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],i=bt(r);if(s)r.selected=o(e)&&L(e,i)>-1;else if(E(bt(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)}}else if("checkbox"===i)h("change",v=()=>{const t=n(),s=e.checked;if(o(t)){const n=bt(e),r=L(t,n),i=-1!==r;if(s&&!i)c(t.concat(n));else if(!s&&i){const e=[...t];e.splice(r,1),c(e)}}else c(wt(e,s))}),m=()=>{const t=n();o(t)?e.checked=L(t,bt(e))>-1:e.checked=E(t,wt(e,!0))};else if("radio"===i)h("change",v=()=>c(bt(e))),m=()=>{e.checked=E(n(),bt(e))};else{g=!0;const t=e=>p(l?e.trim():e);v=()=>c(t(e.value));let s,i=c;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;i=t=>{clearTimeout(s),s=setTimeout(c,e,t)},d.push(()=>clearTimeout(s))}}h("compositionstart",xt),h("compositionend",$t),h(u?"change":"input",()=>{e.composing||i(t(e.value))}),l&&h("change",()=>{e.value=e.value.trim()}),m=()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)}}if(f){const t=n();null!=t&&""!==t||!e.value||"radio"===i&&!e.checked||v()}const _=s(m);if(!g){const t=new MutationObserver(()=>_());t.observe(e,{attributes:!0,childList:!0,subtree:!0}),d.push(()=>t.disconnect())}return()=>d.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;const i=Dt;return Ke(()=>{if(!r)return;const o=St(e);try{qt(i,()=>s(()=>ot(t.scope,n,e,{source:"v-effect",el:e})))}finally{St(o)}}),()=>{r=!1}}},At=(e,t,n)=>{const r=new Comment("v-if");e.before(r);const i=[{exp:t.trim()||"0",el:e}];let o,c;for(;(o=e.nextElementSibling)&&(c=null,""===yt(o,"v-else")||null!=(c=yt(o,"v-else-if")));)o.remove(),i.push({exp:null==c?c:c.trim()||"0",el:o});const l=e.nextSibling;let a;e.remove(),St(r);let u=-1;const f=()=>{var e,t;a&&(r.parentNode||a.el.before(r),e=d,t=a.el,s(Ot.get(t)||[],e),a.remove(),a=void 0)};let p;const d=()=>Me(p);return p=n.effect(()=>{for(let e=0;e<i.length;e++){const{exp:t,el:s}=i[e];if(!t||it(n.scope,t,s,{source:"v-if",el:s})){if(e!==u){f();const t=r.parentNode;a=new rn(s,n),a.insert(t,r),Et(d,a.el),a.el.parentNode===t&&r.remove(),u=e}return}}u=-1,f()}),Et(d,r),l},Tt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Nt=/,([^,}\]]*)(?:,([^,}\]]*))?$/,Pt=/^\(|\)$/g,Rt=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,It=(e,t,n)=>{const s=t.match(Tt);if(!s)return;const r=e.nextSibling,i=new Text("");e.replaceWith(i);const c=()=>i.parentNode;St(i);const l=s[2].trim();let a,f,p,d,h=s[1].trim().replace(Pt,"").trim(),v=!1,m="key",g=e.getAttribute(m)||e.getAttribute(m=":key")||e.getAttribute(m="v-bind:key");g&&(e.removeAttribute(m),"key"===m&&(g=JSON.stringify(g))),(d=h.match(Nt))&&(h=h.replace(Nt,"").trim(),f=d[1].trim(),d[2]&&(p=d[2].trim())),(d=h.match(Rt))&&(a=d[1].split(",").map(e=>e.trim()),v="["===h[0]);let _,y,b,w=!1;const x=(t,s,r,i)=>{const o={};a?a.forEach((e,t)=>o[e]=s?.[v?t:e]):o[h]=s,i?(f&&(o[f]=i),p&&(o[p]=r)):f&&(o[f]=r);const c=g?it(Object.setPrototypeOf(o,n.scope),g,e,{source:":key",el:e}):r;return t.set(c,r),{data:o,key:c}},$=(t,s)=>{const r=new rn(e,nn(n,t.data));return r.key=t.key,r.insert(c(),s),r};return n.effect(()=>{const t=it(n.scope,l,e,{source:"v-for",el:e}),s=b;if([y,b]=(e=>{const t=/* @__PURE__ */new Map,n=[];if(o(e))for(let s=0;s<e.length;s++)n.push(x(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push(x(t,s+1,s));else if(u(e)){let s=0;for(const r in e)n.push(x(t,e[r],s++,r))}return[n,t]})(t),w){for(let r=0;r<_.length;r++){const e=_[r].key;b.has(e)&&s.get(e)===r||_[r].remove()}const e=[];let t,n=y.length;for(;n--;){const r=y[n],o=s.get(r.key);s.delete(r.key);const l=t?t.el:i;let a;null==o?a=$(r,l):(a=_[o],Object.assign(a.ctx.scope,r.data),o!==n&&(a.end||a.el).nextSibling!==l&&a.insert(c(),l)),e[n]=t=a}_=e}else _=y.map(e=>$(e,i)),w=!0}),r},Ct=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{let r;return s(()=>{const s=n();t[s]=e,r&&s!==r&&delete t[r],r=s}),()=>{r&&delete t[r]}},Mt=["visible","idle","interaction"],Wt=["[v-scope]",...Mt.map(e=>`[v-scope\\.${e}]`)].join(","),Vt=["pointerdown","keydown","focusin"],zt=(e,n,r,i)=>{const o=Mt.find(t=>e.hasAttribute(`v-scope.${t}`));if(!o)return!1;const c=`v-scope.${o}`,l=((e,n,s)=>{let r=!1;const i=()=>{r||(r=!0,o(),s())};let o=t;if("visible"===n&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&i()});t.observe(e),o=()=>t.disconnect()}else if("interaction"!==n){const e=window.requestIdleCallback,t=e?e(i):setTimeout(i);o=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of Vt)e.addEventListener(t,i);o=()=>{for(const t of Vt)e.removeEventListener(t,i)}}return()=>{r=!0,o()}})(e,o,()=>{e.hasAttribute(c)&&(e.setAttribute("v-scope",e.getAttribute(c)),e.removeAttribute(c),r(e,n,i))});return n.cleanups.push(l),Et(()=>{s(n.cleanups,l),l()}),!0},Bt=/^(?:v-|:|@)/,Kt=/\.([\w-]+)/g,Dt=!1,Ft=(e,t,n)=>{e.cleanups.push(t),Et(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},qt=(e,t)=>{const n=Dt;Dt=e;try{t()}finally{Dt=n}},Ut=(e,t,n)=>qt(n,()=>Ht(e,t)),Ht=(e,t)=>{const n=St(e);try{return Jt(e,t)}finally{St(n)}},Jt=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(!n.hasAttributes())return Zt(n,t);if(n.hasAttribute("v-pre"))return;if(zt(n,t,Ut,Dt))return;let s;if(yt(n,"v-cloak"),null!=(s=yt(n,"v-if")))return At(n,s,t);if(s=yt(n,"v-for"))return It(n,s,t);const r=yt(n,"v-name");let i;if(s=yt(n,"v-teleport")){const e=Xt(s,n,"v-teleport");if(e){i=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),Ft(t,()=>{Lt(n),n.remove()},s)}}if((s=yt(n,"v-scope"))||""===s){const e=(s?it(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=nn(t,e),n.__ctx=t;const i=Ae(n,t.scope,s||void 0,r||void 0);Ft(t,()=>{i(),delete n.__ctx}),e.$template&&Yt(n,e.$template)}const o=Dt;null!=yt(n,"v-once")&&(Dt=!0),(s=yt(n,"ref"))&&Qt(n,Ct,`"${s}"`,t),Zt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])Bt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Gt(n,e,l,t));for(const[e,l]of c)Gt(n,e,l,t);return Dt=o,i}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])){let s,r=[],i=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(i,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),i=s.index+s[0].length}i<n.length&&r.push(JSON.stringify(n.slice(i))),Qt(e,gt,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Zt(e,t)},Zt=(e,t)=>{let n=e.firstChild;for(;n;)n=Ht(n,t)||n.nextSibling},Gt=(e,t,n,s)=>{let r,i,o;const c=t;if(":"===(t=t.replace(Kt,(e,t)=>((o||(o={}))[t]=!0,"")))[0])r=Qe,i=t.slice(1);else if("@"===t[0])r=mt,i=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=jt[n]||s.dirs[n],i=e>0?t.slice(e+1):void 0}r&&(r===Qe&&"ref"===i&&(r=Ct),Qt(e,r,n,s,i,o,c),e.removeAttribute(c))},Qt=(e,t,n,s,r,i,o,c)=>{const l={source:o,el:e,expression:c},a=t=>Ie(t,{phase:"handler",source:o,el:e,expression:n,scope:s.scope}),u=t=>{const r=it(s.scope,t??n,e,l);return t&&"function"==typeof r?(...t)=>{const n=St(e);try{const e=r(...t);return e instanceof Promise&&e.catch(a),e}catch(s){a(s)}finally{St(n)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:i})}catch(p){return void Ie(p,{phase:"directive",source:o,el:e,expression:n})}f&&Ft(s,f)},Xt=(e,t,n)=>{try{return document.querySelector(e)}catch(s){Ie(s,{phase:"directive",source:n,el:t,expression:e})}},Yt=(e,t)=>{if("#"===t[0]){const n=Xt(t,e,"v-scope");if(!(n instanceof HTMLTemplateElement))return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},en=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:pe({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(Dt){const t=()=>qt(!0,e);return Fe(t),t}const n=De(I(e,{scheduler:()=>Fe(n),lazy:!0}));return t.effects.push(n),Et(()=>{Me(n),s(t.effects,n)}),n(),n}};return t},tn=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),nn=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),tn(s,"$refs",Object.create(n.$refs));const r=pe(new Proxy(s,{set:(e,t,s,o)=>o!==r||i(e,t)?Reflect.set(e,t,s,o):Reflect.set(n,t,s)})),o={...e,scope:r};return tn(s,"$watch",Je(o)),tn(s,"$id",He()),sn(r,s),o},sn=(e,t=e)=>{for(const n of Object.keys(t)){const s=Object.getOwnPropertyDescriptor(t,n).value;"function"==typeof s&&(e[n]=s.bind(e))}},rn=class{get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=en(t),Ht(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,Et(()=>this.discard(),this.el))}remove(){this.parentCtx&&s(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),Lt(n),n!==this.end);)n=t}else e.removeChild(this.template),Lt(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&s(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(Me),this.ctx.cleanups.splice(0).forEach(e=>e())}},on=pe(Object.create(null)),cn=(e,t)=>(void 0!==t&&(on[e]=t,"function"==typeof on[e].init&&on[e].init(),((e,t)=>{Ee()||($e.set(e,t),je("store:register",e,t))})(e,on[e])),on[e]),ln=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),an=e=>{const t=en();if("function"==typeof e&&(e=e()),e&&(t.scope=pe(e),sn(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(ln(n)+"([^]+?)"+ln(s),"g")}tn(t.scope,"$s",_t),tn(t.scope,"$nextTick",Ke),tn(t.scope,"$refs",Object.create(null)),tn(t.scope,"$store",on),tn(t.scope,"$watch",Je(t)),tn(t.scope,"$id",He()),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let r=[];const i=[],o=/* @__PURE__ */new Set,c=[],l=[],a={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Ee()||ke.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Re.push(n),()=>{const e=Re.indexOf(n);e>-1&&Re.splice(e,1)});var n;return l.push(t),()=>{const e=l.indexOf(t);e>-1&&l.splice(e,1),t()}},use(e,t){if(!o.has(e)){o.add(e);const n=("function"==typeof e?e:e.install)(a,t);"function"==typeof n&&c.push(n)}return a},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(Wt)?[e]:[...e.querySelectorAll(Wt)].filter(e=>!e.matches(`:where(${Wt}) *`)),n.length||(n=[e]),t.walk??=Ht,t.dispose??=Lt;for(const i of n){const e=i.getAttribute("v-name"),n=new rn(i,t,!0);i.__ctx??=n.ctx,Te.scopes.has(i)||i.matches(Wt)||n.ctx.cleanups.push(Ae(i,n.ctx.scope,void 0,e||void 0)),r.push(n),Et(()=>s(r,n),i),n.ctx.cleanups.push(()=>delete i.__ctx)}return this},unmount(e){if(null==e)return r.forEach(e=>e.teardown()),r=[],t.effects.splice(0).forEach(Me),i.splice(0).forEach(e=>e()),c.splice(0).forEach(e=>{try{e()}catch(t){Ie(t,{phase:"teardown",source:"plugin"})}}),o.clear(),void l.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const s=[];for(const t of r){const e=t.template;n.contains(e)?t.teardown():s.push(t)}r=s}};return a},un=e=>{const t=I(e,{scheduler:()=>Fe(t),lazy:!0});t.i=1/0;try{t()}catch(n){throw Me(t),n}return()=>Me(t)},fn=document.currentScript;fn&&fn.hasAttribute("init")&&an().mount();export{ge as computed,an as createApp,Te as devtools,Ne as disableDevtools,Ke as nextTick,pe as reactive,cn as store,un as watchEffect};
|
|
1
|
+
function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}var t=()=>{},n=Object.assign,s=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},r=Object.prototype.hasOwnProperty,i=(e,t)=>r.call(e,t),o=Array.isArray,c=e=>"[object Date]"===d(e),l=e=>"function"==typeof e,a=e=>"string"==typeof e,u=e=>"symbol"==typeof e,f=e=>null!==e&&"object"==typeof e,p=Object.prototype.toString,d=e=>p.call(e),h=e=>a(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,v=e=>{const t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))},m=/-(\w)/g,g=/* @__PURE__ */v(e=>e.replace(m,(e,t)=>t?t.toUpperCase():"")),_=/\B([A-Z])/g,y=/* @__PURE__ */v(e=>e.replace(_,"-$1").toLowerCase()),b=(e,t)=>!Object.is(e,t);function w(e){if(o(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=a(s)?O(s):w(s);if(r)for(const e in r)t[e]=r[e]}return t}if(a(e)||f(e))return e}var x,$=/;(?![^(]*\))/g,k=/:([^]+)/,S=/\/\*[^]*?\*\//g;function O(e){const t={};return e.replace(S,"").split($).forEach(e=>{if(e){const n=e.split(k);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function E(e){let t="";if(a(e))t=e;else if(o(e))for(let n=0;n<e.length;n++){const s=E(e[n]);s&&(t+=s+" ")}else if(f(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function L(e,t){if(e===t)return!0;let n=c(e),s=c(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=u(e),s=u(t),n||s)return e===t;if(n=o(e),s=o(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=L(e[s],t[s]);return n}(e,t);if(n=f(e),s=f(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!L(e[n],t[n]))return!1}}return String(e)===String(t)}function j(e,t){return e.findIndex(e=>L(e,t))}function T(e,t=void 0){t&&t.active&&t.effects.push(e)}var A=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,T(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,z();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(N(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),B()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=M,t=x;try{return M=!0,x=this,this._runnings++,P(this),this.fn()}finally{R(this),this._runnings--,x=t,M=e}}stop(){this.active&&(P(this),R(this),this.onStop&&this.onStop(),this.active=!1)}};function N(e){return e.value}function P(e){e._trackId++,e._depsLength=0}function R(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)I(e.deps[t],e);e.deps.length=e._depsLength}}function I(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function C(e,s){e.effect instanceof A&&(e=e.effect.fn);const r=new A(e,t,()=>{r.dirty&&r.run()});s&&(n(r,s),s.scope&&T(r,s.scope)),s&&s.lazy||r.run();const i=r.run.bind(r);return i.effect=r,i}var M=!0,W=0,V=[];function z(){V.push(M),M=!1}function B(){const e=V.pop();M=void 0===e||e}function K(){W++}function D(){for(W--;!W&&q.length;)q.shift()()}function F(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&I(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var q=[];function H(e,t,n){K();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&q.push(s.scheduler)))}D()}var U=(e,t)=>{const n=/* @__PURE__ */new Map;return n.cleanup=e,n.computed=t,n},J=/* @__PURE__ */new WeakMap,Z=Symbol("");function G(e,t,n){if(M&&x){let t=J.get(e);t||J.set(e,t=/* @__PURE__ */new Map);let s=t.get(n);s||t.set(n,s=U(()=>t.delete(n))),F(x,s)}}function Q(e,t,n,s,r,i){const c=J.get(e);if(!c)return;let l=[];if("length"===n&&o(e)){const e=Number(s);c.forEach((t,n)=>{("length"===n||!u(n)&&n>=e)&&l.push(t)})}else switch(void 0!==n&&l.push(c.get(n)),t){case"add":o(e)?h(n)&&l.push(c.get("length")):l.push(c.get(Z));break;case"delete":o(e)||l.push(c.get(Z))}K();for(const o of l)o&&H(o,4);D()}var X=/* @__PURE__ */e("__proto__,__v_isRef,__isVue"),Y=new Set(/* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(u)),ee=/* @__PURE__ */te();function te(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=me(this);for(let t=0,r=this.length;t<r;t++)G(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(me)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){z(),K();const n=me(this)[t].apply(this,e);return D(),B(),n}}),e}function ne(e){u(e)||(e=String(e));const t=me(this);return G(t,0,e),t.hasOwnProperty(e)}var se=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?fe:ue:r?ae:le).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const c=o(e);if(!s){if(c&&i(ee,t))return Reflect.get(ee,t,n);if("hasOwnProperty"===t)return ne}const l=Reflect.get(e,t,n);return(u(t)?Y.has(t):X(t))?l:(s||G(e,0,t),r?l:be(l)?c&&h(t)?l:l.value:f(l)?s?function(e){return he(e,!0,ce,null,ue)}(l):de(l):l)}},re=class extends se{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=ve(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||ve(n)||(r=me(r),n=me(n)),!o(e)&&be(r)&&!be(n))return!t&&(r.value=n,!0)}const c=o(e)&&h(t)?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,s);return e===me(s)&&(c?b(n,r)&&Q(e,"set",t,n):Q(e,"add",t,n)),l}deleteProperty(e,t){const n=i(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&Q(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return u(t)&&Y.has(t)||G(e,0,t),n}ownKeys(e){return G(e,0,o(e)?"length":Z),Reflect.ownKeys(e)}},ie=class extends se{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},oe=/* @__PURE__ */new re,ce=/* @__PURE__ */new ie,le=/* @__PURE__ */new WeakMap,ae=/* @__PURE__ */new WeakMap,ue=/* @__PURE__ */new WeakMap,fe=/* @__PURE__ */new WeakMap;function pe(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>d(e).slice(8,-1))(e))}function de(e){return ve(e)?e:he(e,!1,oe,null,le)}function he(e,t,n,s,r){if(!f(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=pe(e);if(0===o)return e;const c=new Proxy(e,2===o?s:n);return r.set(e,c),c}function ve(e){return!(!e||!e.__v_isReadonly)}function me(e){const t=e&&e.__v_raw;return t?me(t):e}var ge=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new A(()=>e(this._value),()=>ye(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=me(this);var t,n;return e._cacheable&&!e.effect.dirty||!b(e._value,e._value=e.effect.run())||ye(e,4),t=e,M&&x&&(t=me(t),F(x,null!=(n=t.dep)?n:t.dep=U(()=>t.dep=void 0,t instanceof ge?t:void 0))),e.effect._dirtyLevel>=2&&ye(e,2),e._value}set value(e){this._setter(e)}};function _e(e,n,s=!1){let r,i;const o=l(e);return o?(r=e,i=t):(r=e.get,i=e.set),new ge(r,i,o||!i,s)}function ye(e,t=4,n,s){const r=(e=me(e)).dep;r&&H(r,t)}function be(e){return!(!e||!0!==e.__v_isRef)}var we=/* @__PURE__ */new Map,xe=/* @__PURE__ */new Map,$e=/* @__PURE__ */new Map,ke=/* @__PURE__ */new Map,Se=/* @__PURE__ */new Set,Oe=[],Ee=!1,Le=()=>Ee||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,je={"scope:mount":/* @__PURE__ */new Set,"scope:unmount":/* @__PURE__ */new Set,"store:register":/* @__PURE__ */new Set,"plugin:install":/* @__PURE__ */new Set,flush:/* @__PURE__ */new Set},Te=(e,...t)=>{je[e].forEach(e=>e(...t))},Ae=(e,n,s,r)=>Le()?t:(we.set(e,n),s&&xe.set(e,s),r&&$e.set(e,r),Te("scope:mount",e,n),()=>{we.delete(e)&&(xe.delete(e),$e.delete(e),Te("scope:unmount",e))}),Ne={scopes:we,exps:xe,names:$e,stores:ke,components:Se,plugins:Oe,getScopeByName(e){for(const[t,n]of $e)if(n===e)return we.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=we.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(je[e].add(t),()=>je[e].delete(t)),off(e,t){je[e].delete(t)}},Pe=()=>{Ee=!0,we.clear(),xe.clear(),$e.clear(),ke.clear(),Se.clear(),Oe.length=0;for(const e in je)je[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Ne&&delete window.__LITE_VUE__};"undefined"==typeof window||Le()||(window.__LITE_VUE__=Ne);var Re,Ie=[],Ce=(e,t)=>{for(const s of[...Ie])try{s(e,t)}catch(n){}Ie.length||console.error(e)},Me=/* @__PURE__ */new WeakSet,We=e=>{Me.add(e),e.effect&&function(e){e.effect.stop()}(e)},Ve=!1,ze=0,Be=/* @__PURE__ */new Set,Ke=Promise.resolve(),De=e=>Ke.then(e),Fe=e=>(e.i=ze++,e),qe=e=>{e.i??Fe(e),Be.add(e),Ve||(Ve=!0,De(He))},He=()=>{const e=/* @__PURE__ */new Map;for(;Be.size;)for(const n of[...Be].sort((e,t)=>e.i-t.i)){if(Be.delete(n),Me.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)Ce(Error("update loop"),{phase:"effect"});else try{n()}catch(t){Ce(t,{phase:"effect"})}}Ve=!1,je.flush.size&&!Le()&&Te("flush")},Ue=0,Je=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++Ue}`)},Ze=e=>(t,n,r)=>{const i="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let o,c=!1;const l=e.effect(()=>{const e=i(),t=o;if(o=e,c?b(e,t):r?.immediate){z();try{n(e,t)}finally{B()}}c=!0});return()=>{We(l),s(e.effects,l)}},Ge=/^(spellcheck|draggable|translate|form|list|type)$/,Qe=/^(img|video|canvas|source)(width|height)$/,Xe=/^(readonly|novalidate|formnovalidate|allowfullscreen|playsinline)$/,Ye=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let i={};s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=g(s)),(n!==i||f(n))&&et(e,s,n,i);else{for(const t in n)et(e,t,n[t],i&&i[t]);for(const t in i)n&&t in n||et(e,t,null,i[t])}i="[object Object]"===d(n)?{...n}:n,s||(e.__bound=i)})},et=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",E(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=tt(n),i=tt(s);for(const e in r)st(t,e,r[e]);for(const e in i)null==r[e]&&st(t,e,"");"_vod"in e&&(("display"in r||"display"in i)&&(e._vod=t.display),e._vsh&&(t.display="none")),t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Ge.test(t)||Qe.test(e.localName+t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:(Xe.test(t)&&(n=n||""===n?"":null),null!=n?e.setAttribute(t,n):e.removeAttribute(t)):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},tt=e=>a(e=w(e))?O(e):e||{},nt=/\s*!important$/,st=(e,t,n)=>{o(n)?n.forEach(n=>st(e,t,n)):t.startsWith("--")?e.setProperty(t,n):nt.test(n)?e.setProperty(y(t),n.replace(nt,""),"important"):e[t]=n},rt=Object.create(null),it=0,ot=e=>e.replace(/^return\(([^]*)\)$/,"$1"),ct=(e,t,n,s)=>lt(e,`return(${t})`,n,s),lt=(e,t,n,s)=>{let r=rt[t];r||(++it>1e3&&(rt=Object.create(null),it=1),r=rt[t]=at(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(i){Ce(i,{phase:"expression",expression:s?.expression??ot(t),source:s?.source,el:s?.el??n,scope:e})}},at=(e,n,s)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(r){return Ce(r,{phase:"compile",expression:s?.expression??ot(e),source:s?.source,el:s?.el??n}),t}},ut=Object.create(null),ft=0,pt=/^\s*(async\s*)?(\([^)]*?\)|[\w$]+)\s*=>|^\s*(async\s+)?function\b/,dt=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ht=["ctrl","shift","alt","meta"],vt={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>ht.some(n=>e[`${n}Key`]&&!t[n])},mt={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},gt=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,_t=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const i=/\bawait\b/.test(n)?"async ":"";let o,c=dt.test(n)||pt.test(n)?t(`(e => (${n})(e))`):(e=>{const t=ut[e];if(void 0!==t)return t;++ft>1e3&&(ut=Object.create(null),ft=1);try{return new Function(`return (${e})`),ut[e]=!0}catch{return ut[e]=!1}})(n)?t(`(${i}$event => (${n}))`):t(`(${i}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return De(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(o),o=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!gt.test(e)||e in mt);c=s=>{if(!r.outside||!e.contains(s.target)){if(n.length&&("key"in s||s.type.startsWith("key"))){const e=y(s.key||"");if(!n.some(t=>t===e||mt[t]===e))return}for(const e in r){const t=vt[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return r.once&&l.removeEventListener(a,c,r),t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,{...r,once:!1}),()=>{clearTimeout(o),l.removeEventListener(a,c,r)}},yt=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=bt(t())})},bt=e=>null==e?"":o(e)||f(e)&&(e.toString===p||!l(e.toString))?JSON.stringify(e,null,2):String(e),wt=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},xt=e=>"_value"in e?e._value:e.value,$t=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},kt=e=>{e.target.composing=!0},St=e=>{const t=e.target;t.composing&&(t.composing=!1,Ot(t,"input"))},Ot=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},Et=/* @__PURE__ */new WeakMap,Lt=e=>{const t=Re;return Re=e,t},jt=(e,t=Re)=>{if(!t)return;const n=Et.get(t);n?n.push(e):Et.set(t,[e])},Tt=e=>{const t=Et.get(e);if(t){Et.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;Tt(n),n=e}},At={bind:Ye,on:_t,show:({el:e,get:t,effect:n})=>{e._vod="none"==e.style.display?"":e.style.display,n(()=>{e._vsh=!t(),e.style.display=e._vsh?"none":e._vod})},text:yt,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const i=e.type,c=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===i,lazy:u,fill:f}=r||{},p=e=>a?(e=>{const t=parseFloat(e);return isNaN(t)?e:t})(e):e,d=[],h=(t,n)=>d.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));let v,m,g=!1;if("SELECT"===e.tagName){const t=e;h("change",v=()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>p(xt(e)));c(t.multiple?e:e[0])}),m=()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],i=xt(r);if(s)r.selected=o(e)&&j(e,i)>-1;else if(L(xt(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)}}else if("checkbox"===i)h("change",v=()=>{const t=n(),s=e.checked;if(o(t)){const n=xt(e),r=j(t,n),i=-1!==r;if(s&&!i)c(t.concat(n));else if(!s&&i){const e=[...t];e.splice(r,1),c(e)}}else c($t(e,s))}),m=()=>{const t=n();o(t)?e.checked=j(t,xt(e))>-1:e.checked=L(t,$t(e,!0))};else if("radio"===i)h("change",v=()=>c(xt(e))),m=()=>{e.checked=L(n(),xt(e))};else{g=!0;const t=e=>p(l?e.trim():e);v=()=>c(t(e.value));let s,i=c;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;i=t=>{clearTimeout(s),s=setTimeout(c,e,t)},d.push(()=>clearTimeout(s))}}h("compositionstart",kt),h("compositionend",St),h(u?"change":"input",()=>{e.composing||i(t(e.value))}),l&&h("change",()=>{e.value=e.value.trim()}),m=()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)}}if(f){const t=n();null!=t&&""!==t||!e.value||"radio"===i&&!e.checked||v()}const _=s(m);if(!g){const t=new MutationObserver(()=>_());t.observe(e,{attributes:!0,childList:!0,subtree:!0}),d.push(()=>t.disconnect())}return()=>d.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;const i=qt;return De(()=>{if(!r)return;const o=Lt(e);try{Ut(i,()=>s(()=>lt(t.scope,n,e,{source:"v-effect",el:e})))}finally{Lt(o)}}),()=>{r=!1}}},Nt=(e,t,n)=>{const r=new Comment("v-if");e.before(r);const i=[{exp:t.trim()||"0",el:e}];let o,c;for(;(o=e.nextElementSibling)&&(c=null,""===wt(o,"v-else")||null!=(c=wt(o,"v-else-if")));)o.remove(),i.push({exp:null==c?c:c.trim()||"0",el:o});const l=e.nextSibling;let a;e.remove(),Lt(r);let u=-1;const f=()=>{var e,t;a&&(r.parentNode||a.el.before(r),e=d,t=a.el,s(Et.get(t)||[],e),a.remove(),a=void 0)};let p;const d=()=>We(p);return p=n.effect(()=>{for(let e=0;e<i.length;e++){const{exp:t,el:s}=i[e];if(!t||ct(n.scope,t,s,{source:"v-if",el:s})){if(e!==u){f();const t=r.parentNode;a=new cn(s,n),a.insert(t,r),jt(d,a.el),a.el.parentNode===t&&r.remove(),u=e}return}}u=-1,f()}),jt(d,r),l},Pt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Rt=/,([^,}\]]*)(?:,([^,}\]]*))?$/,It=/^\(|\)$/g,Ct=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,Mt=(e,t,n)=>{const s=t.match(Pt);if(!s)return;const r=e.nextSibling,i=new Text("");e.replaceWith(i);const c=()=>i.parentNode;Lt(i);const l=s[2].trim();let u,p,d,h,v=s[1].trim().replace(It,"").trim(),m=!1,g="key",_=e.getAttribute(g)||e.getAttribute(g=":key")||e.getAttribute(g="v-bind:key");_&&(e.removeAttribute(g),"key"===g&&(_=JSON.stringify(_))),(h=v.match(Rt))&&(v=v.replace(Rt,"").trim(),p=h[1].trim(),h[2]&&(d=h[2].trim())),(h=v.match(Ct))&&(u=h[1].split(",").map(e=>e.trim()),m="["===v[0]);let y,b,w,x=!1;const $=(t,s,r,i)=>{const o={};u?u.forEach((e,t)=>o[e]=s?.[m?t:e]):o[v]=s,i?(p&&(o[p]=i),d&&(o[d]=r)):p&&(o[p]=r);const c=_?ct(Object.setPrototypeOf(o,n.scope),_,e,{source:":key",el:e}):r;return t.set(c,r),{data:o,key:c}},k=(t,s)=>{const r=new cn(e,rn(n,t.data));return r.key=t.key,r.insert(c(),s),r};return n.effect(()=>{const t=ct(n.scope,l,e,{source:"v-for",el:e}),s=w;if([b,w]=(e=>{const t=/* @__PURE__ */new Map,n=[];if(o(e)||a(e))for(let s=0;s<e.length;s++)n.push($(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push($(t,s+1,s));else if(f(e)){let s=0;for(const r in e)n.push($(t,e[r],s++,r))}return[n,t]})(t),x){for(let r=0;r<y.length;r++){const e=y[r].key;w.has(e)&&s.get(e)===r||y[r].remove()}const e=[];let t,n=b.length;for(;n--;){const r=b[n],o=s.get(r.key);s.delete(r.key);const l=t?t.el:i;let a;null==o?a=k(r,l):(a=y[o],Object.assign(a.ctx.scope,r.data),o!==n&&(a.end||a.el).nextSibling!==l&&a.insert(c(),l)),e[n]=t=a}y=e}else y=b.map(e=>k(e,i)),x=!0}),r},Wt=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{const r=me(t);let i;return s(()=>{const s=n();t[s]=e,i&&s!==i&&r[i]===e&&delete t[i],i=s}),()=>{r[i]===e&&delete t[i]}},Vt=["visible","idle","interaction"],zt=["[v-scope]",...Vt.map(e=>`[v-scope\\.${e}]`)].join(","),Bt=["pointerdown","keydown","focusin"],Kt=(e,n,r,i)=>{const o=Vt.find(t=>e.hasAttribute(`v-scope.${t}`));if(!o)return!1;const c=`v-scope.${o}`,l=((e,n,s)=>{let r=!1;const i=()=>{r||(r=!0,o(),s())};let o=t;if("visible"===n&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&i()});t.observe(e),o=()=>t.disconnect()}else if("interaction"!==n){const e=window.requestIdleCallback,t=e?e(i):setTimeout(i);o=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of Bt)e.addEventListener(t,i);o=()=>{for(const t of Bt)e.removeEventListener(t,i)}}return()=>{r=!0,o()}})(e,o,()=>{e.hasAttribute(c)&&(e.setAttribute("v-scope",e.getAttribute(c)),e.removeAttribute(c),r(e,n,i))});return n.cleanups.push(l),jt(()=>{s(n.cleanups,l),l()}),!0},Dt=/^(?:v-|:|@)/,Ft=/\.([\w-]+)/g,qt=!1,Ht=(e,t,n)=>{e.cleanups.push(t),jt(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},Ut=(e,t)=>{const n=qt;qt=e;try{t()}finally{qt=n}},Jt=(e,t,n)=>Ut(n,()=>Zt(e,t)),Zt=(e,t)=>{const n=Lt(e);try{return Gt(e,t)}finally{Lt(n)}},Gt=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(!n.hasAttributes())return Qt(n,t);if(n.hasAttribute("v-pre"))return;if(Kt(n,t,Jt,qt))return;let s;if(wt(n,"v-cloak"),null!=(s=wt(n,"v-if")))return Nt(n,s,t);if(s=wt(n,"v-for"))return Mt(n,s,t);const r=wt(n,"v-name");let i;if(s=wt(n,"v-teleport")){const e=en(s,n,"v-teleport");if(e){i=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),Ht(t,()=>{Tt(n),n.remove()},s)}}if((s=wt(n,"v-scope"))||""===s){const e=(s?ct(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=rn(t,e),n.__ctx=t;const i=Ae(n,t.scope,s||void 0,r||void 0);Ht(t,()=>{i(),delete n.__ctx}),e.$template&&tn(n,e.$template)}const o=qt;null!=wt(n,"v-once")&&(qt=!0),(s=wt(n,"ref"))&&Yt(n,Wt,`"${s}"`,t),Qt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])Dt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Xt(n,e,l,t));for(const[e,l]of c)Xt(n,e,l,t);return qt=o,i}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])&&!(e.parentNode instanceof HTMLScriptElement)){let s,r=[],i=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(i,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),i=s.index+s[0].length}i<n.length&&r.push(JSON.stringify(n.slice(i))),Yt(e,yt,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Qt(e,t)},Qt=(e,t)=>{let n=e.firstChild;for(;n;)n=Zt(n,t)||n.nextSibling},Xt=(e,t,n,s)=>{let r,o,c;const l=t;if(":"===(t=t.replace(Ft,(e,t)=>((c||(c={}))[t]=!0,"")))[0])r=Ye,o=t.slice(1);else if("@"===t[0])r=_t,o=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=i(At,n)?At[n]:i(s.dirs,n)?s.dirs[n]:void 0,o=e>0?t.slice(e+1):void 0}r&&(r===Ye&&"ref"===o&&(r=Wt),Yt(e,r,n,s,o,c,l),e.removeAttribute(l))},Yt=(e,t,n,s,r,i,o,c)=>{const l={source:o,el:e,expression:c},a=t=>Ce(t,{phase:"handler",source:o,el:e,expression:n,scope:s.scope}),u=t=>{const r=ct(s.scope,t??n,e,l);return t&&"function"==typeof r?(...t)=>{const n=Lt(e);try{const e=r(...t);return e instanceof Promise&&e.catch(a),e}catch(s){a(s)}finally{Lt(n)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:i})}catch(p){return void Ce(p,{phase:"directive",source:o,el:e,expression:n})}f&&Ht(s,f)},en=(e,t,n)=>{try{return document.querySelector(e)}catch(s){Ce(s,{phase:"directive",source:n,el:t,expression:e})}},tn=(e,t)=>{if("#"===t[0]){const n=en(t,e,"v-scope");if(!(n instanceof HTMLTemplateElement))return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},nn=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:de({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(qt){const t=()=>Ut(!0,e);return qe(t),t}const n=Fe(C(e,{scheduler:()=>qe(n),lazy:!0}));return t.effects.push(n),jt(()=>{We(n),s(t.effects,n)}),n(),n}};return t},sn=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),rn=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),sn(s,"$refs",Object.create(n.$refs));const r=de(new Proxy(s,{set:(e,t,s,o)=>o!==r||i(e,t)?Reflect.set(e,t,s,o):Reflect.set(n,t,s)})),o={...e,scope:r};return sn(s,"$watch",Ze(o)),sn(s,"$id",Je()),on(r,s),o},on=(e,t=e)=>{for(const n of Object.keys(t)){const s=Object.getOwnPropertyDescriptor(t,n).value;"function"==typeof s&&(e[n]=s.bind(e))}},cn=class{get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=nn(t),Zt(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,jt(()=>this.discard(),this.el))}remove(){this.parentCtx&&s(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),Tt(n),n!==this.end);)n=t}else e.removeChild(this.template),Tt(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&s(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(We),this.ctx.cleanups.splice(0).forEach(e=>e())}},ln=de(Object.create(null)),an=(e,t)=>(void 0!==t&&(ln[e]=t,"function"==typeof ln[e].init&&ln[e].init(),((e,t)=>{Le()||(ke.set(e,t),Te("store:register",e,t))})(e,ln[e])),ln[e]),un=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),fn=e=>{const t=nn();if("function"==typeof e&&(e=e()),e&&(t.scope=de(e),on(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(un(n)+"([^]+?)"+un(s),"g")}sn(t.scope,"$s",bt),sn(t.scope,"$nextTick",De),sn(t.scope,"$refs",Object.create(null)),sn(t.scope,"$store",ln),sn(t.scope,"$watch",Ze(t)),sn(t.scope,"$id",Je()),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let r=[];const i=[],o=/* @__PURE__ */new Set,c=[],l=[],a={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Le()||Se.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Ie.push(n),()=>{const e=Ie.indexOf(n);e>-1&&Ie.splice(e,1)});var n;return l.push(t),()=>{const e=l.indexOf(t);e>-1&&l.splice(e,1),t()}},use(e,t){if(!o.has(e)){o.add(e);const n="function"==typeof e?e(a,t):e.install(a,t);"function"==typeof n&&c.push(n)}return a},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(zt)?[e]:[...e.querySelectorAll(zt)].filter(e=>!e.matches(`:where(${zt}) *`)),n.length||(n=[e]),t.walk??=Zt,t.dispose??=Tt;for(const i of n){const e=i.getAttribute("v-name"),n=new cn(i,t,!0);i.__ctx??=n.ctx,Ne.scopes.has(i)||i.matches(zt)||n.ctx.cleanups.push(Ae(i,n.ctx.scope,void 0,e||void 0)),r.push(n),jt(()=>s(r,n),i),n.ctx.cleanups.push(()=>delete i.__ctx)}return this},unmount(e){if(null==e)return r.forEach(e=>e.teardown()),r=[],t.effects.splice(0).forEach(We),i.splice(0).forEach(e=>e()),c.splice(0).forEach(e=>{try{e()}catch(t){Ce(t,{phase:"teardown",source:"plugin"})}}),o.clear(),void l.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const s=[];for(const t of r){const e=t.template;n.contains(e)?t.teardown():s.push(t)}r=s}};return a},pn=e=>{const t=C(e,{scheduler:()=>qe(t),lazy:!0});t.i=1/0;try{t()}catch(n){throw We(t),n}return()=>We(t)},dn=document.currentScript;dn&&dn.hasAttribute("init")&&fn().mount();export{_e as computed,fn as createApp,Ne as devtools,Pe as disableDevtools,De as nextTick,de as reactive,an as store,pn as watchEffect};
|
package/dist/litevue.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVue={})}(this,function(e){function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n=()=>{},s=Object.assign,r=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},o=Object.prototype.hasOwnProperty,i=(e,t)=>o.call(e,t),c=Array.isArray,l=e=>"[object Date]"===d(e),a=e=>"string"==typeof e,u=e=>"symbol"==typeof e,f=e=>null!==e&&"object"==typeof e,p=Object.prototype.toString,d=e=>p.call(e),h=e=>a(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,v=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},m=/-(\w)/g,g=v(e=>e.replace(m,(e,t)=>t?t.toUpperCase():"")),y=/\B([A-Z])/g,_=v(e=>e.replace(y,"-$1").toLowerCase()),b=(e,t)=>!Object.is(e,t);function w(e){if(c(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=a(s)?S(s):w(s);if(r)for(const e in r)t[e]=r[e]}return t}if(a(e)||f(e))return e}var x,$=/;(?![^(]*\))/g,k=/:([^]+)/,O=/\/\*[^]*?\*\//g;function S(e){const t={};return e.replace(O,"").split($).forEach(e=>{if(e){const n=e.split(k);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function E(e){let t="";if(a(e))t=e;else if(c(e))for(let n=0;n<e.length;n++){const s=E(e[n]);s&&(t+=s+" ")}else if(f(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function L(e,t){if(e===t)return!0;let n=l(e),s=l(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=u(e),s=u(t),n||s)return e===t;if(n=c(e),s=c(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=L(e[s],t[s]);return n}(e,t);if(n=f(e),s=f(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!L(e[n],t[n]))return!1}}return String(e)===String(t)}function j(e,t){return e.findIndex(e=>L(e,t))}function T(e,t=void 0){t&&t.active&&t.effects.push(e)}var A=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,T(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,z();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(N(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),B()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=M,t=x;try{return M=!0,x=this,this._runnings++,P(this),this.fn()}finally{R(this),this._runnings--,x=t,M=e}}stop(){this.active&&(P(this),R(this),this.onStop&&this.onStop(),this.active=!1)}};function N(e){return e.value}function P(e){e._trackId++,e._depsLength=0}function R(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)I(e.deps[t],e);e.deps.length=e._depsLength}}function I(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function C(e,t){e.effect instanceof A&&(e=e.effect.fn);const r=new A(e,n,()=>{r.dirty&&r.run()});t&&(s(r,t),t.scope&&T(r,t.scope)),t&&t.lazy||r.run();const o=r.run.bind(r);return o.effect=r,o}var M=!0,V=0,W=[];function z(){W.push(M),M=!1}function B(){const e=W.pop();M=void 0===e||e}function D(){V++}function K(){for(V--;!V&&q.length;)q.shift()()}function F(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&I(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var q=[];function U(e,t,n){D();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&q.push(s.scheduler)))}K()}var H=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},J=new WeakMap,Z=Symbol("");function G(e,t,n){if(M&&x){let t=J.get(e);t||J.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=H(()=>t.delete(n))),F(x,s)}}function Q(e,t,n,s,r,o){const i=J.get(e);if(!i)return;let l=[];if("length"===n&&c(e)){const e=Number(s);i.forEach((t,n)=>{("length"===n||!u(n)&&n>=e)&&l.push(t)})}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":c(e)?h(n)&&l.push(i.get("length")):l.push(i.get(Z));break;case"delete":c(e)||l.push(i.get(Z))}D();for(const c of l)c&&U(c,4);K()}var X=t("__proto__,__v_isRef,__isVue"),Y=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(u)),ee=te();function te(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=me(this);for(let t=0,r=this.length;t<r;t++)G(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(me)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){z(),D();const n=me(this)[t].apply(this,e);return K(),B(),n}}),e}function ne(e){u(e)||(e=String(e));const t=me(this);return G(t,0,e),t.hasOwnProperty(e)}var se=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?fe:ue:r?ae:le).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=c(e);if(!s){if(o&&i(ee,t))return Reflect.get(ee,t,n);if("hasOwnProperty"===t)return ne}const l=Reflect.get(e,t,n);return(u(t)?Y.has(t):X(t))?l:(s||G(e,0,t),r?l:_e(l)?o&&h(t)?l:l.value:f(l)?s?function(e){return he(e,!0,ce,null,ue)}(l):de(l):l)}},re=class extends se{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=ve(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||ve(n)||(r=me(r),n=me(n)),!c(e)&&_e(r)&&!_e(n))return!t&&(r.value=n,!0)}const o=c(e)&&h(t)?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,s);return e===me(s)&&(o?b(n,r)&&Q(e,"set",t,n):Q(e,"add",t,n)),l}deleteProperty(e,t){const n=i(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&Q(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return u(t)&&Y.has(t)||G(e,0,t),n}ownKeys(e){return G(e,0,c(e)?"length":Z),Reflect.ownKeys(e)}},oe=class extends se{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ie=new re,ce=new oe,le=new WeakMap,ae=new WeakMap,ue=new WeakMap,fe=new WeakMap;function pe(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>d(e).slice(8,-1))(e))}function de(e){return ve(e)?e:he(e,!1,ie,null,le)}function he(e,t,n,s,r){if(!f(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=pe(e);if(0===i)return e;const c=new Proxy(e,2===i?s:n);return r.set(e,c),c}function ve(e){return!(!e||!e.__v_isReadonly)}function me(e){const t=e&&e.__v_raw;return t?me(t):e}var ge=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new A(()=>e(this._value),()=>ye(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=me(this);var t,n;return e._cacheable&&!e.effect.dirty||!b(e._value,e._value=e.effect.run())||ye(e,4),t=e,M&&x&&(t=me(t),F(x,null!=(n=t.dep)?n:t.dep=H(()=>t.dep=void 0,t instanceof ge?t:void 0))),e.effect._dirtyLevel>=2&&ye(e,2),e._value}set value(e){this._setter(e)}};function ye(e,t=4,n,s){const r=(e=me(e)).dep;r&&U(r,t)}function _e(e){return!(!e||!0!==e.__v_isRef)}var be=new Map,we=new Map,xe=new Map,$e=new Map,ke=new Set,Oe=[],Se=!1,Ee=()=>Se||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,Le={"scope:mount":new Set,"scope:unmount":new Set,"store:register":new Set,"plugin:install":new Set,flush:new Set},je=(e,...t)=>{Le[e].forEach(e=>e(...t))},Te=(e,t,s,r)=>Ee()?n:(be.set(e,t),s&&we.set(e,s),r&&xe.set(e,r),je("scope:mount",e,t),()=>{be.delete(e)&&(we.delete(e),xe.delete(e),je("scope:unmount",e))}),Ae={scopes:be,exps:we,names:xe,stores:$e,components:ke,plugins:Oe,getScopeByName(e){for(const[t,n]of xe)if(n===e)return be.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=be.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(Le[e].add(t),()=>Le[e].delete(t)),off(e,t){Le[e].delete(t)}};"undefined"==typeof window||Ee()||(window.__LITE_VUE__=Ae);var Ne,Pe=[],Re=(e,t)=>{for(const s of[...Pe])try{s(e,t)}catch(n){}Pe.length||console.error(e)},Ie=new WeakSet,Ce=e=>{Ie.add(e),e.effect&&function(e){e.effect.stop()}(e)},Me=!1,Ve=0,We=new Set,ze=Promise.resolve(),Be=e=>ze.then(e),De=e=>(e.i=Ve++,e),Ke=e=>{e.i??De(e),We.add(e),Me||(Me=!0,Be(Fe))},Fe=()=>{const e=new Map;for(;We.size;)for(const n of[...We].sort((e,t)=>e.i-t.i)){if(We.delete(n),Ie.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)Re(Error("update loop"),{phase:"effect"});else try{n()}catch(t){Re(t,{phase:"effect"})}}Me=!1,Le.flush.size&&!Ee()&&je("flush")},qe=0,Ue=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++qe}`)},He=e=>(t,n,s)=>{const o="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let i,c=!1;const l=e.effect(()=>{const e=o(),t=i;if(i=e,c?b(e,t):s?.immediate){z();try{n(e,t)}finally{B()}}c=!0});return()=>{Ce(l),r(e.effects,l)}},Je=/^(spellcheck|draggable|translate|form|list|type)$/,Ze=/^(readonly|novalidate|formnovalidate|allowfullscreen|playsinline)$/,Ge=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let o;s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=g(s)),Qe(e,s,n,o);else{for(const t in n)Qe(e,t,n[t],o&&o[t]);for(const t in o)n&&t in n||Qe(e,t,null,o[t])}o="[object Object]"===d(n)?{...n}:n,s||(e.__bound=o)})},Qe=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",E(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=Xe(n),o=Xe(s);for(const e in r)et(t,e,r[e]);for(const e in o)null==r[e]&&et(t,e,"");"_vod"in e&&(("display"in r||"display"in o)&&(e._vod=t.display),e._vsh&&(t.display="none")),t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Je.test(t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:(Ze.test(t)&&(n=n||""===n?"":null),null!=n?e.setAttribute(t,n):e.removeAttribute(t)):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},Xe=e=>a(e=w(e))?S(e):e||{},Ye=/\s*!important$/,et=(e,t,n)=>{c(n)?n.forEach(n=>et(e,t,n)):t.startsWith("--")?e.setProperty(t,n):Ye.test(n)?e.setProperty(_(t),n.replace(Ye,""),"important"):e[t]=n},tt=Object.create(null),nt=0,st=e=>e.replace(/^return\(([^]*)\)$/,"$1"),rt=(e,t,n,s)=>ot(e,`return(${t})`,n,s),ot=(e,t,n,s)=>{let r=tt[t];r||(++nt>1e3&&(tt=Object.create(null),nt=1),r=tt[t]=it(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(o){Re(o,{phase:"expression",expression:s?.expression??st(t),source:s?.source,el:s?.el??n,scope:e})}},it=(e,t,s)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(r){return Re(r,{phase:"compile",expression:s?.expression??st(e),source:s?.source,el:s?.el??t}),n}},ct=Object.create(null),lt=0,at=/^\s*(async\s*)?(\([^)]*?\)|[\w$]+)\s*=>|^\s*(async\s+)?function\b/,ut=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ft=["ctrl","shift","alt","meta"],pt={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>ft.some(n=>e[`${n}Key`]&&!t[n])},dt={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},ht=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,vt=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const o=/\bawait\b/.test(n)?"async ":"";let i,c=ut.test(n)||at.test(n)?t(`(e => (${n})(e))`):(e=>{const t=ct[e];if(void 0!==t)return t;++lt>1e3&&(ct=Object.create(null),lt=1);try{return new Function(`return (${e})`),ct[e]=!0}catch{return ct[e]=!1}})(n)?t(`(${o}$event => (${n}))`):t(`(${o}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return Be(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(i),i=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!ht.test(e)||e in dt);c=s=>{if(!r.outside||!e.contains(s.target)){if("key"in s&&n.length){const e=_(s.key);if(!n.some(t=>t===e||dt[t]===e))return}for(const e in r){const t=pt[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return r.once&&l.removeEventListener(a,c,r),t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,{...r,once:!1}),()=>{clearTimeout(i),l.removeEventListener(a,c,r)}},mt=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=gt(t())})},gt=e=>null==e?"":f(e)?JSON.stringify(e,null,2):String(e),yt=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},_t=e=>"_value"in e?e._value:e.value,bt=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},wt=e=>{e.target.composing=!0},xt=e=>{const t=e.target;t.composing&&(t.composing=!1,$t(t,"input"))},$t=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},kt=new WeakMap,Ot=e=>{const t=Ne;return Ne=e,t},St=(e,t=Ne)=>{if(!t)return;const n=kt.get(t);n?n.push(e):kt.set(t,[e])},Et=e=>{const t=kt.get(e);if(t){kt.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;Et(n),n=e}},Lt={bind:Ge,on:vt,show:({el:e,get:t,effect:n})=>{e._vod="none"==e.style.display?"":e.style.display,n(()=>{e._vsh=!t(),e.style.display=e._vsh?"none":e._vod})},text:mt,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const o=e.type,i=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===o,lazy:u,fill:f}=r||{},p=e=>a?(e=>{const t=parseFloat(e);return isNaN(t)?e:t})(e):e,d=[],h=(t,n)=>d.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));let v,m,g=!1;if("SELECT"===e.tagName){const t=e;h("change",v=()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>p(_t(e)));i(t.multiple?e:e[0])}),m=()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],o=_t(r);if(s)r.selected=c(e)&&j(e,o)>-1;else if(L(_t(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)}}else if("checkbox"===o)h("change",v=()=>{const t=n(),s=e.checked;if(c(t)){const n=_t(e),r=j(t,n),o=-1!==r;if(s&&!o)i(t.concat(n));else if(!s&&o){const e=[...t];e.splice(r,1),i(e)}}else i(bt(e,s))}),m=()=>{const t=n();c(t)?e.checked=j(t,_t(e))>-1:e.checked=L(t,bt(e,!0))};else if("radio"===o)h("change",v=()=>i(_t(e))),m=()=>{e.checked=L(n(),_t(e))};else{g=!0;const t=e=>p(l?e.trim():e);v=()=>i(t(e.value));let s,o=i;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;o=t=>{clearTimeout(s),s=setTimeout(i,e,t)},d.push(()=>clearTimeout(s))}}h("compositionstart",wt),h("compositionend",xt),h(u?"change":"input",()=>{e.composing||o(t(e.value))}),l&&h("change",()=>{e.value=e.value.trim()}),m=()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)}}if(f){const t=n();null!=t&&""!==t||!e.value||"radio"===o&&!e.checked||v()}const y=s(m);if(!g){const t=new MutationObserver(()=>y());t.observe(e,{attributes:!0,childList:!0,subtree:!0}),d.push(()=>t.disconnect())}return()=>d.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;const o=Dt;return Be(()=>{if(!r)return;const i=Ot(e);try{Ft(o,()=>s(()=>ot(t.scope,n,e,{source:"v-effect",el:e})))}finally{Ot(i)}}),()=>{r=!1}}},jt=(e,t,n)=>{const s=new Comment("v-if");e.before(s);const o=[{exp:t.trim()||"0",el:e}];let i,c;for(;(i=e.nextElementSibling)&&(c=null,""===yt(i,"v-else")||null!=(c=yt(i,"v-else-if")));)i.remove(),o.push({exp:null==c?c:c.trim()||"0",el:i});const l=e.nextSibling;let a;e.remove(),Ot(s);let u=-1;const f=()=>{var e,t;a&&(s.parentNode||a.el.before(s),e=d,t=a.el,r(kt.get(t)||[],e),a.remove(),a=void 0)};let p;const d=()=>Ce(p);return p=n.effect(()=>{for(let e=0;e<o.length;e++){const{exp:t,el:r}=o[e];if(!t||rt(n.scope,t,r,{source:"v-if",el:r})){if(e!==u){f();const t=s.parentNode;a=new sn(r,n),a.insert(t,s),St(d,a.el),a.el.parentNode===t&&s.remove(),u=e}return}}u=-1,f()}),St(d,s),l},Tt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,At=/,([^,}\]]*)(?:,([^,}\]]*))?$/,Nt=/^\(|\)$/g,Pt=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,Rt=(e,t,n)=>{const s=t.match(Tt);if(!s)return;const r=e.nextSibling,o=new Text("");e.replaceWith(o);const i=()=>o.parentNode;Ot(o);const l=s[2].trim();let a,u,p,d,h=s[1].trim().replace(Nt,"").trim(),v=!1,m="key",g=e.getAttribute(m)||e.getAttribute(m=":key")||e.getAttribute(m="v-bind:key");g&&(e.removeAttribute(m),"key"===m&&(g=JSON.stringify(g))),(d=h.match(At))&&(h=h.replace(At,"").trim(),u=d[1].trim(),d[2]&&(p=d[2].trim())),(d=h.match(Pt))&&(a=d[1].split(",").map(e=>e.trim()),v="["===h[0]);let y,_,b,w=!1;const x=(t,s,r,o)=>{const i={};a?a.forEach((e,t)=>i[e]=s?.[v?t:e]):i[h]=s,o?(u&&(i[u]=o),p&&(i[p]=r)):u&&(i[u]=r);const c=g?rt(Object.setPrototypeOf(i,n.scope),g,e,{source:":key",el:e}):r;return t.set(c,r),{data:i,key:c}},$=(t,s)=>{const r=new sn(e,tn(n,t.data));return r.key=t.key,r.insert(i(),s),r};return n.effect(()=>{const t=rt(n.scope,l,e,{source:"v-for",el:e}),s=b;if([_,b]=(e=>{const t=new Map,n=[];if(c(e))for(let s=0;s<e.length;s++)n.push(x(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push(x(t,s+1,s));else if(f(e)){let s=0;for(const r in e)n.push(x(t,e[r],s++,r))}return[n,t]})(t),w){for(let r=0;r<y.length;r++){const e=y[r].key;b.has(e)&&s.get(e)===r||y[r].remove()}const e=[];let t,n=_.length;for(;n--;){const r=_[n],c=s.get(r.key);s.delete(r.key);const l=t?t.el:o;let a;null==c?a=$(r,l):(a=y[c],Object.assign(a.ctx.scope,r.data),c!==n&&(a.end||a.el).nextSibling!==l&&a.insert(i(),l)),e[n]=t=a}y=e}else y=_.map(e=>$(e,o)),w=!0}),r},It=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{let r;return s(()=>{const s=n();t[s]=e,r&&s!==r&&delete t[r],r=s}),()=>{r&&delete t[r]}},Ct=["visible","idle","interaction"],Mt=["[v-scope]",...Ct.map(e=>`[v-scope\\.${e}]`)].join(","),Vt=["pointerdown","keydown","focusin"],Wt=(e,t,s,o)=>{const i=Ct.find(t=>e.hasAttribute(`v-scope.${t}`));if(!i)return!1;const c=`v-scope.${i}`,l=((e,t,s)=>{let r=!1;const o=()=>{r||(r=!0,i(),s())};let i=n;if("visible"===t&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&o()});t.observe(e),i=()=>t.disconnect()}else if("interaction"!==t){const e=window.requestIdleCallback,t=e?e(o):setTimeout(o);i=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of Vt)e.addEventListener(t,o);i=()=>{for(const t of Vt)e.removeEventListener(t,o)}}return()=>{r=!0,i()}})(e,i,()=>{e.hasAttribute(c)&&(e.setAttribute("v-scope",e.getAttribute(c)),e.removeAttribute(c),s(e,t,o))});return t.cleanups.push(l),St(()=>{r(t.cleanups,l),l()}),!0},zt=/^(?:v-|:|@)/,Bt=/\.([\w-]+)/g,Dt=!1,Kt=(e,t,n)=>{e.cleanups.push(t),St(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},Ft=(e,t)=>{const n=Dt;Dt=e;try{t()}finally{Dt=n}},qt=(e,t,n)=>Ft(n,()=>Ut(e,t)),Ut=(e,t)=>{const n=Ot(e);try{return Ht(e,t)}finally{Ot(n)}},Ht=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(!n.hasAttributes())return Jt(n,t);if(n.hasAttribute("v-pre"))return;if(Wt(n,t,qt,Dt))return;let s;if(yt(n,"v-cloak"),null!=(s=yt(n,"v-if")))return jt(n,s,t);if(s=yt(n,"v-for"))return Rt(n,s,t);const r=yt(n,"v-name");let o;if(s=yt(n,"v-teleport")){const e=Qt(s,n,"v-teleport");if(e){o=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),Kt(t,()=>{Et(n),n.remove()},s)}}if((s=yt(n,"v-scope"))||""===s){const e=(s?rt(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=tn(t,e),n.__ctx=t;const o=Te(n,t.scope,s||void 0,r||void 0);Kt(t,()=>{o(),delete n.__ctx}),e.$template&&Xt(n,e.$template)}const i=Dt;null!=yt(n,"v-once")&&(Dt=!0),(s=yt(n,"ref"))&&Gt(n,It,`"${s}"`,t),Jt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])zt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Zt(n,e,l,t));for(const[e,l]of c)Zt(n,e,l,t);return Dt=i,o}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])){let s,r=[],o=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(o,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),o=s.index+s[0].length}o<n.length&&r.push(JSON.stringify(n.slice(o))),Gt(e,mt,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Jt(e,t)},Jt=(e,t)=>{let n=e.firstChild;for(;n;)n=Ut(n,t)||n.nextSibling},Zt=(e,t,n,s)=>{let r,o,i;const c=t;if(":"===(t=t.replace(Bt,(e,t)=>((i||(i={}))[t]=!0,"")))[0])r=Ge,o=t.slice(1);else if("@"===t[0])r=vt,o=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=Lt[n]||s.dirs[n],o=e>0?t.slice(e+1):void 0}r&&(r===Ge&&"ref"===o&&(r=It),Gt(e,r,n,s,o,i,c),e.removeAttribute(c))},Gt=(e,t,n,s,r,o,i,c)=>{const l={source:i,el:e,expression:c},a=t=>Re(t,{phase:"handler",source:i,el:e,expression:n,scope:s.scope}),u=t=>{const r=rt(s.scope,t??n,e,l);return t&&"function"==typeof r?(...t)=>{const n=Ot(e);try{const e=r(...t);return e instanceof Promise&&e.catch(a),e}catch(s){a(s)}finally{Ot(n)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:o})}catch(p){return void Re(p,{phase:"directive",source:i,el:e,expression:n})}f&&Kt(s,f)},Qt=(e,t,n)=>{try{return document.querySelector(e)}catch(s){Re(s,{phase:"directive",source:n,el:t,expression:e})}},Xt=(e,t)=>{if("#"===t[0]){const n=Qt(t,e,"v-scope");if(!(n instanceof HTMLTemplateElement))return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},Yt=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:de({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(Dt){const t=()=>Ft(!0,e);return Ke(t),t}const n=De(C(e,{scheduler:()=>Ke(n),lazy:!0}));return t.effects.push(n),St(()=>{Ce(n),r(t.effects,n)}),n(),n}};return t},en=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),tn=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),en(s,"$refs",Object.create(n.$refs));const r=de(new Proxy(s,{set:(e,t,s,o)=>o!==r||i(e,t)?Reflect.set(e,t,s,o):Reflect.set(n,t,s)})),o={...e,scope:r};return en(s,"$watch",He(o)),en(s,"$id",Ue()),nn(r,s),o},nn=(e,t=e)=>{for(const n of Object.keys(t)){const s=Object.getOwnPropertyDescriptor(t,n).value;"function"==typeof s&&(e[n]=s.bind(e))}},sn=class{get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=Yt(t),Ut(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,St(()=>this.discard(),this.el))}remove(){this.parentCtx&&r(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),Et(n),n!==this.end);)n=t}else e.removeChild(this.template),Et(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&r(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(Ce),this.ctx.cleanups.splice(0).forEach(e=>e())}},rn=de(Object.create(null)),on=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),cn=e=>{const t=Yt();if("function"==typeof e&&(e=e()),e&&(t.scope=de(e),nn(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(on(n)+"([^]+?)"+on(s),"g")}en(t.scope,"$s",gt),en(t.scope,"$nextTick",Be),en(t.scope,"$refs",Object.create(null)),en(t.scope,"$store",rn),en(t.scope,"$watch",He(t)),en(t.scope,"$id",Ue()),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let s=[];const o=[],i=new Set,c=[],l=[],a={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Ee()||ke.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Pe.push(n),()=>{const e=Pe.indexOf(n);e>-1&&Pe.splice(e,1)});var n;return l.push(t),()=>{const e=l.indexOf(t);e>-1&&l.splice(e,1),t()}},use(e,t){if(!i.has(e)){i.add(e);const n=("function"==typeof e?e:e.install)(a,t);"function"==typeof n&&c.push(n)}return a},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(Mt)?[e]:[...e.querySelectorAll(Mt)].filter(e=>!e.matches(`:where(${Mt}) *`)),n.length||(n=[e]),t.walk??=Ut,t.dispose??=Et;for(const o of n){const e=o.getAttribute("v-name"),n=new sn(o,t,!0);o.__ctx??=n.ctx,Ae.scopes.has(o)||o.matches(Mt)||n.ctx.cleanups.push(Te(o,n.ctx.scope,void 0,e||void 0)),s.push(n),St(()=>r(s,n),o),n.ctx.cleanups.push(()=>delete o.__ctx)}return this},unmount(e){if(null==e)return s.forEach(e=>e.teardown()),s=[],t.effects.splice(0).forEach(Ce),o.splice(0).forEach(e=>e()),c.splice(0).forEach(e=>{try{e()}catch(t){Re(t,{phase:"teardown",source:"plugin"})}}),i.clear(),void l.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const r=[];for(const t of s){const e=t.template;n.contains(e)?t.teardown():r.push(t)}s=r}};return a},ln=document.currentScript;ln&&ln.hasAttribute("init")&&cn().mount(),e.computed=function(e,t,s=!1){let r,o;const i="function"==typeof e;return i?(r=e,o=n):(r=e.get,o=e.set),new ge(r,o,i||!o,s)},e.createApp=cn,e.devtools=Ae,e.disableDevtools=()=>{Se=!0,be.clear(),we.clear(),xe.clear(),$e.clear(),ke.clear(),Oe.length=0;for(const e in Le)Le[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Ae&&delete window.__LITE_VUE__},e.nextTick=Be,e.reactive=de,e.store=(e,t)=>(void 0!==t&&(rn[e]=t,"function"==typeof rn[e].init&&rn[e].init(),((e,t)=>{Ee()||($e.set(e,t),je("store:register",e,t))})(e,rn[e])),rn[e]),e.watchEffect=e=>{const t=C(e,{scheduler:()=>Ke(t),lazy:!0});t.i=1/0;try{t()}catch(n){throw Ce(t),n}return()=>Ce(t)}});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVue={})}(this,function(e){function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n=()=>{},s=Object.assign,r=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},o=Object.prototype.hasOwnProperty,i=(e,t)=>o.call(e,t),c=Array.isArray,l=e=>"[object Date]"===h(e),a=e=>"function"==typeof e,u=e=>"string"==typeof e,f=e=>"symbol"==typeof e,p=e=>null!==e&&"object"==typeof e,d=Object.prototype.toString,h=e=>d.call(e),v=e=>u(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,m=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},g=/-(\w)/g,y=m(e=>e.replace(g,(e,t)=>t?t.toUpperCase():"")),_=/\B([A-Z])/g,b=m(e=>e.replace(_,"-$1").toLowerCase()),w=(e,t)=>!Object.is(e,t);function x(e){if(c(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=u(s)?E(s):x(s);if(r)for(const e in r)t[e]=r[e]}return t}if(u(e)||p(e))return e}var $,k=/;(?![^(]*\))/g,S=/:([^]+)/,O=/\/\*[^]*?\*\//g;function E(e){const t={};return e.replace(O,"").split(k).forEach(e=>{if(e){const n=e.split(S);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function L(e){let t="";if(u(e))t=e;else if(c(e))for(let n=0;n<e.length;n++){const s=L(e[n]);s&&(t+=s+" ")}else if(p(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function j(e,t){if(e===t)return!0;let n=l(e),s=l(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=f(e),s=f(t),n||s)return e===t;if(n=c(e),s=c(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=j(e[s],t[s]);return n}(e,t);if(n=p(e),s=p(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!j(e[n],t[n]))return!1}}return String(e)===String(t)}function T(e,t){return e.findIndex(e=>j(e,t))}function A(e,t=void 0){t&&t.active&&t.effects.push(e)}var N=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,A(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,B();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(P(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),D()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=W,t=$;try{return W=!0,$=this,this._runnings++,R(this),this.fn()}finally{I(this),this._runnings--,$=t,W=e}}stop(){this.active&&(R(this),I(this),this.onStop&&this.onStop(),this.active=!1)}};function P(e){return e.value}function R(e){e._trackId++,e._depsLength=0}function I(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)M(e.deps[t],e);e.deps.length=e._depsLength}}function M(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function C(e,t){e.effect instanceof N&&(e=e.effect.fn);const r=new N(e,n,()=>{r.dirty&&r.run()});t&&(s(r,t),t.scope&&A(r,t.scope)),t&&t.lazy||r.run();const o=r.run.bind(r);return o.effect=r,o}var W=!0,V=0,z=[];function B(){z.push(W),W=!1}function D(){const e=z.pop();W=void 0===e||e}function K(){V++}function F(){for(V--;!V&&H.length;)H.shift()()}function q(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&M(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var H=[];function U(e,t,n){K();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&H.push(s.scheduler)))}F()}var J=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Z=new WeakMap,G=Symbol("");function Q(e,t,n){if(W&&$){let t=Z.get(e);t||Z.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=J(()=>t.delete(n))),q($,s)}}function X(e,t,n,s,r,o){const i=Z.get(e);if(!i)return;let l=[];if("length"===n&&c(e)){const e=Number(s);i.forEach((t,n)=>{("length"===n||!f(n)&&n>=e)&&l.push(t)})}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":c(e)?v(n)&&l.push(i.get("length")):l.push(i.get(G));break;case"delete":c(e)||l.push(i.get(G))}K();for(const c of l)c&&U(c,4);F()}var Y=t("__proto__,__v_isRef,__isVue"),ee=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(f)),te=ne();function ne(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=ge(this);for(let t=0,r=this.length;t<r;t++)Q(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(ge)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){B(),K();const n=ge(this)[t].apply(this,e);return F(),D(),n}}),e}function se(e){f(e)||(e=String(e));const t=ge(this);return Q(t,0,e),t.hasOwnProperty(e)}var re=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?pe:fe:r?ue:ae).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=c(e);if(!s){if(o&&i(te,t))return Reflect.get(te,t,n);if("hasOwnProperty"===t)return se}const l=Reflect.get(e,t,n);return(f(t)?ee.has(t):Y(t))?l:(s||Q(e,0,t),r?l:be(l)?o&&v(t)?l:l.value:p(l)?s?function(e){return ve(e,!0,le,null,fe)}(l):he(l):l)}},oe=class extends re{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=me(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||me(n)||(r=ge(r),n=ge(n)),!c(e)&&be(r)&&!be(n))return!t&&(r.value=n,!0)}const o=c(e)&&v(t)?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,s);return e===ge(s)&&(o?w(n,r)&&X(e,"set",t,n):X(e,"add",t,n)),l}deleteProperty(e,t){const n=i(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&X(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return f(t)&&ee.has(t)||Q(e,0,t),n}ownKeys(e){return Q(e,0,c(e)?"length":G),Reflect.ownKeys(e)}},ie=class extends re{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ce=new oe,le=new ie,ae=new WeakMap,ue=new WeakMap,fe=new WeakMap,pe=new WeakMap;function de(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>h(e).slice(8,-1))(e))}function he(e){return me(e)?e:ve(e,!1,ce,null,ae)}function ve(e,t,n,s,r){if(!p(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=de(e);if(0===i)return e;const c=new Proxy(e,2===i?s:n);return r.set(e,c),c}function me(e){return!(!e||!e.__v_isReadonly)}function ge(e){const t=e&&e.__v_raw;return t?ge(t):e}var ye=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new N(()=>e(this._value),()=>_e(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=ge(this);var t,n;return e._cacheable&&!e.effect.dirty||!w(e._value,e._value=e.effect.run())||_e(e,4),t=e,W&&$&&(t=ge(t),q($,null!=(n=t.dep)?n:t.dep=J(()=>t.dep=void 0,t instanceof ye?t:void 0))),e.effect._dirtyLevel>=2&&_e(e,2),e._value}set value(e){this._setter(e)}};function _e(e,t=4,n,s){const r=(e=ge(e)).dep;r&&U(r,t)}function be(e){return!(!e||!0!==e.__v_isRef)}var we=new Map,xe=new Map,$e=new Map,ke=new Map,Se=new Set,Oe=[],Ee=!1,Le=()=>Ee||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,je={"scope:mount":new Set,"scope:unmount":new Set,"store:register":new Set,"plugin:install":new Set,flush:new Set},Te=(e,...t)=>{je[e].forEach(e=>e(...t))},Ae=(e,t,s,r)=>Le()?n:(we.set(e,t),s&&xe.set(e,s),r&&$e.set(e,r),Te("scope:mount",e,t),()=>{we.delete(e)&&(xe.delete(e),$e.delete(e),Te("scope:unmount",e))}),Ne={scopes:we,exps:xe,names:$e,stores:ke,components:Se,plugins:Oe,getScopeByName(e){for(const[t,n]of $e)if(n===e)return we.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=we.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(je[e].add(t),()=>je[e].delete(t)),off(e,t){je[e].delete(t)}};"undefined"==typeof window||Le()||(window.__LITE_VUE__=Ne);var Pe,Re=[],Ie=(e,t)=>{for(const s of[...Re])try{s(e,t)}catch(n){}Re.length||console.error(e)},Me=new WeakSet,Ce=e=>{Me.add(e),e.effect&&function(e){e.effect.stop()}(e)},We=!1,Ve=0,ze=new Set,Be=Promise.resolve(),De=e=>Be.then(e),Ke=e=>(e.i=Ve++,e),Fe=e=>{e.i??Ke(e),ze.add(e),We||(We=!0,De(qe))},qe=()=>{const e=new Map;for(;ze.size;)for(const n of[...ze].sort((e,t)=>e.i-t.i)){if(ze.delete(n),Me.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)Ie(Error("update loop"),{phase:"effect"});else try{n()}catch(t){Ie(t,{phase:"effect"})}}We=!1,je.flush.size&&!Le()&&Te("flush")},He=0,Ue=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++He}`)},Je=e=>(t,n,s)=>{const o="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let i,c=!1;const l=e.effect(()=>{const e=o(),t=i;if(i=e,c?w(e,t):s?.immediate){B();try{n(e,t)}finally{D()}}c=!0});return()=>{Ce(l),r(e.effects,l)}},Ze=/^(spellcheck|draggable|translate|form|list|type)$/,Ge=/^(img|video|canvas|source)(width|height)$/,Qe=/^(readonly|novalidate|formnovalidate|allowfullscreen|playsinline)$/,Xe=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let o={};s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=y(s)),(n!==o||p(n))&&Ye(e,s,n,o);else{for(const t in n)Ye(e,t,n[t],o&&o[t]);for(const t in o)n&&t in n||Ye(e,t,null,o[t])}o="[object Object]"===h(n)?{...n}:n,s||(e.__bound=o)})},Ye=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",L(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=et(n),o=et(s);for(const e in r)nt(t,e,r[e]);for(const e in o)null==r[e]&&nt(t,e,"");"_vod"in e&&(("display"in r||"display"in o)&&(e._vod=t.display),e._vsh&&(t.display="none")),t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Ze.test(t)||Ge.test(e.localName+t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:(Qe.test(t)&&(n=n||""===n?"":null),null!=n?e.setAttribute(t,n):e.removeAttribute(t)):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},et=e=>u(e=x(e))?E(e):e||{},tt=/\s*!important$/,nt=(e,t,n)=>{c(n)?n.forEach(n=>nt(e,t,n)):t.startsWith("--")?e.setProperty(t,n):tt.test(n)?e.setProperty(b(t),n.replace(tt,""),"important"):e[t]=n},st=Object.create(null),rt=0,ot=e=>e.replace(/^return\(([^]*)\)$/,"$1"),it=(e,t,n,s)=>ct(e,`return(${t})`,n,s),ct=(e,t,n,s)=>{let r=st[t];r||(++rt>1e3&&(st=Object.create(null),rt=1),r=st[t]=lt(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(o){Ie(o,{phase:"expression",expression:s?.expression??ot(t),source:s?.source,el:s?.el??n,scope:e})}},lt=(e,t,s)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(r){return Ie(r,{phase:"compile",expression:s?.expression??ot(e),source:s?.source,el:s?.el??t}),n}},at=Object.create(null),ut=0,ft=/^\s*(async\s*)?(\([^)]*?\)|[\w$]+)\s*=>|^\s*(async\s+)?function\b/,pt=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,dt=["ctrl","shift","alt","meta"],ht={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>dt.some(n=>e[`${n}Key`]&&!t[n])},vt={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},mt=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,gt=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const o=/\bawait\b/.test(n)?"async ":"";let i,c=pt.test(n)||ft.test(n)?t(`(e => (${n})(e))`):(e=>{const t=at[e];if(void 0!==t)return t;++ut>1e3&&(at=Object.create(null),ut=1);try{return new Function(`return (${e})`),at[e]=!0}catch{return at[e]=!1}})(n)?t(`(${o}$event => (${n}))`):t(`(${o}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return De(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(i),i=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!mt.test(e)||e in vt);c=s=>{if(!r.outside||!e.contains(s.target)){if(n.length&&("key"in s||s.type.startsWith("key"))){const e=b(s.key||"");if(!n.some(t=>t===e||vt[t]===e))return}for(const e in r){const t=ht[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return r.once&&l.removeEventListener(a,c,r),t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,{...r,once:!1}),()=>{clearTimeout(i),l.removeEventListener(a,c,r)}},yt=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=_t(t())})},_t=e=>null==e?"":c(e)||p(e)&&(e.toString===d||!a(e.toString))?JSON.stringify(e,null,2):String(e),bt=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},wt=e=>"_value"in e?e._value:e.value,xt=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},$t=e=>{e.target.composing=!0},kt=e=>{const t=e.target;t.composing&&(t.composing=!1,St(t,"input"))},St=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},Ot=new WeakMap,Et=e=>{const t=Pe;return Pe=e,t},Lt=(e,t=Pe)=>{if(!t)return;const n=Ot.get(t);n?n.push(e):Ot.set(t,[e])},jt=e=>{const t=Ot.get(e);if(t){Ot.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;jt(n),n=e}},Tt={bind:Xe,on:gt,show:({el:e,get:t,effect:n})=>{e._vod="none"==e.style.display?"":e.style.display,n(()=>{e._vsh=!t(),e.style.display=e._vsh?"none":e._vod})},text:yt,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const o=e.type,i=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===o,lazy:u,fill:f}=r||{},p=e=>a?(e=>{const t=parseFloat(e);return isNaN(t)?e:t})(e):e,d=[],h=(t,n)=>d.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));let v,m,g=!1;if("SELECT"===e.tagName){const t=e;h("change",v=()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>p(wt(e)));i(t.multiple?e:e[0])}),m=()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],o=wt(r);if(s)r.selected=c(e)&&T(e,o)>-1;else if(j(wt(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)}}else if("checkbox"===o)h("change",v=()=>{const t=n(),s=e.checked;if(c(t)){const n=wt(e),r=T(t,n),o=-1!==r;if(s&&!o)i(t.concat(n));else if(!s&&o){const e=[...t];e.splice(r,1),i(e)}}else i(xt(e,s))}),m=()=>{const t=n();c(t)?e.checked=T(t,wt(e))>-1:e.checked=j(t,xt(e,!0))};else if("radio"===o)h("change",v=()=>i(wt(e))),m=()=>{e.checked=j(n(),wt(e))};else{g=!0;const t=e=>p(l?e.trim():e);v=()=>i(t(e.value));let s,o=i;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;o=t=>{clearTimeout(s),s=setTimeout(i,e,t)},d.push(()=>clearTimeout(s))}}h("compositionstart",$t),h("compositionend",kt),h(u?"change":"input",()=>{e.composing||o(t(e.value))}),l&&h("change",()=>{e.value=e.value.trim()}),m=()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)}}if(f){const t=n();null!=t&&""!==t||!e.value||"radio"===o&&!e.checked||v()}const y=s(m);if(!g){const t=new MutationObserver(()=>y());t.observe(e,{attributes:!0,childList:!0,subtree:!0}),d.push(()=>t.disconnect())}return()=>d.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;const o=Ft;return De(()=>{if(!r)return;const i=Et(e);try{Ht(o,()=>s(()=>ct(t.scope,n,e,{source:"v-effect",el:e})))}finally{Et(i)}}),()=>{r=!1}}},At=(e,t,n)=>{const s=new Comment("v-if");e.before(s);const o=[{exp:t.trim()||"0",el:e}];let i,c;for(;(i=e.nextElementSibling)&&(c=null,""===bt(i,"v-else")||null!=(c=bt(i,"v-else-if")));)i.remove(),o.push({exp:null==c?c:c.trim()||"0",el:i});const l=e.nextSibling;let a;e.remove(),Et(s);let u=-1;const f=()=>{var e,t;a&&(s.parentNode||a.el.before(s),e=d,t=a.el,r(Ot.get(t)||[],e),a.remove(),a=void 0)};let p;const d=()=>Ce(p);return p=n.effect(()=>{for(let e=0;e<o.length;e++){const{exp:t,el:r}=o[e];if(!t||it(n.scope,t,r,{source:"v-if",el:r})){if(e!==u){f();const t=s.parentNode;a=new on(r,n),a.insert(t,s),Lt(d,a.el),a.el.parentNode===t&&s.remove(),u=e}return}}u=-1,f()}),Lt(d,s),l},Nt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Pt=/,([^,}\]]*)(?:,([^,}\]]*))?$/,Rt=/^\(|\)$/g,It=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,Mt=(e,t,n)=>{const s=t.match(Nt);if(!s)return;const r=e.nextSibling,o=new Text("");e.replaceWith(o);const i=()=>o.parentNode;Et(o);const l=s[2].trim();let a,f,d,h,v=s[1].trim().replace(Rt,"").trim(),m=!1,g="key",y=e.getAttribute(g)||e.getAttribute(g=":key")||e.getAttribute(g="v-bind:key");y&&(e.removeAttribute(g),"key"===g&&(y=JSON.stringify(y))),(h=v.match(Pt))&&(v=v.replace(Pt,"").trim(),f=h[1].trim(),h[2]&&(d=h[2].trim())),(h=v.match(It))&&(a=h[1].split(",").map(e=>e.trim()),m="["===v[0]);let _,b,w,x=!1;const $=(t,s,r,o)=>{const i={};a?a.forEach((e,t)=>i[e]=s?.[m?t:e]):i[v]=s,o?(f&&(i[f]=o),d&&(i[d]=r)):f&&(i[f]=r);const c=y?it(Object.setPrototypeOf(i,n.scope),y,e,{source:":key",el:e}):r;return t.set(c,r),{data:i,key:c}},k=(t,s)=>{const r=new on(e,sn(n,t.data));return r.key=t.key,r.insert(i(),s),r};return n.effect(()=>{const t=it(n.scope,l,e,{source:"v-for",el:e}),s=w;if([b,w]=(e=>{const t=new Map,n=[];if(c(e)||u(e))for(let s=0;s<e.length;s++)n.push($(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push($(t,s+1,s));else if(p(e)){let s=0;for(const r in e)n.push($(t,e[r],s++,r))}return[n,t]})(t),x){for(let r=0;r<_.length;r++){const e=_[r].key;w.has(e)&&s.get(e)===r||_[r].remove()}const e=[];let t,n=b.length;for(;n--;){const r=b[n],c=s.get(r.key);s.delete(r.key);const l=t?t.el:o;let a;null==c?a=k(r,l):(a=_[c],Object.assign(a.ctx.scope,r.data),c!==n&&(a.end||a.el).nextSibling!==l&&a.insert(i(),l)),e[n]=t=a}_=e}else _=b.map(e=>k(e,o)),x=!0}),r},Ct=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{const r=ge(t);let o;return s(()=>{const s=n();t[s]=e,o&&s!==o&&r[o]===e&&delete t[o],o=s}),()=>{r[o]===e&&delete t[o]}},Wt=["visible","idle","interaction"],Vt=["[v-scope]",...Wt.map(e=>`[v-scope\\.${e}]`)].join(","),zt=["pointerdown","keydown","focusin"],Bt=(e,t,s,o)=>{const i=Wt.find(t=>e.hasAttribute(`v-scope.${t}`));if(!i)return!1;const c=`v-scope.${i}`,l=((e,t,s)=>{let r=!1;const o=()=>{r||(r=!0,i(),s())};let i=n;if("visible"===t&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&o()});t.observe(e),i=()=>t.disconnect()}else if("interaction"!==t){const e=window.requestIdleCallback,t=e?e(o):setTimeout(o);i=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of zt)e.addEventListener(t,o);i=()=>{for(const t of zt)e.removeEventListener(t,o)}}return()=>{r=!0,i()}})(e,i,()=>{e.hasAttribute(c)&&(e.setAttribute("v-scope",e.getAttribute(c)),e.removeAttribute(c),s(e,t,o))});return t.cleanups.push(l),Lt(()=>{r(t.cleanups,l),l()}),!0},Dt=/^(?:v-|:|@)/,Kt=/\.([\w-]+)/g,Ft=!1,qt=(e,t,n)=>{e.cleanups.push(t),Lt(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},Ht=(e,t)=>{const n=Ft;Ft=e;try{t()}finally{Ft=n}},Ut=(e,t,n)=>Ht(n,()=>Jt(e,t)),Jt=(e,t)=>{const n=Et(e);try{return Zt(e,t)}finally{Et(n)}},Zt=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(!n.hasAttributes())return Gt(n,t);if(n.hasAttribute("v-pre"))return;if(Bt(n,t,Ut,Ft))return;let s;if(bt(n,"v-cloak"),null!=(s=bt(n,"v-if")))return At(n,s,t);if(s=bt(n,"v-for"))return Mt(n,s,t);const r=bt(n,"v-name");let o;if(s=bt(n,"v-teleport")){const e=Yt(s,n,"v-teleport");if(e){o=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),qt(t,()=>{jt(n),n.remove()},s)}}if((s=bt(n,"v-scope"))||""===s){const e=(s?it(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=sn(t,e),n.__ctx=t;const o=Ae(n,t.scope,s||void 0,r||void 0);qt(t,()=>{o(),delete n.__ctx}),e.$template&&en(n,e.$template)}const i=Ft;null!=bt(n,"v-once")&&(Ft=!0),(s=bt(n,"ref"))&&Xt(n,Ct,`"${s}"`,t),Gt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])Dt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Qt(n,e,l,t));for(const[e,l]of c)Qt(n,e,l,t);return Ft=i,o}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])&&!(e.parentNode instanceof HTMLScriptElement)){let s,r=[],o=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(o,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),o=s.index+s[0].length}o<n.length&&r.push(JSON.stringify(n.slice(o))),Xt(e,yt,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Gt(e,t)},Gt=(e,t)=>{let n=e.firstChild;for(;n;)n=Jt(n,t)||n.nextSibling},Qt=(e,t,n,s)=>{let r,o,c;const l=t;if(":"===(t=t.replace(Kt,(e,t)=>((c||(c={}))[t]=!0,"")))[0])r=Xe,o=t.slice(1);else if("@"===t[0])r=gt,o=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=i(Tt,n)?Tt[n]:i(s.dirs,n)?s.dirs[n]:void 0,o=e>0?t.slice(e+1):void 0}r&&(r===Xe&&"ref"===o&&(r=Ct),Xt(e,r,n,s,o,c,l),e.removeAttribute(l))},Xt=(e,t,n,s,r,o,i,c)=>{const l={source:i,el:e,expression:c},a=t=>Ie(t,{phase:"handler",source:i,el:e,expression:n,scope:s.scope}),u=t=>{const r=it(s.scope,t??n,e,l);return t&&"function"==typeof r?(...t)=>{const n=Et(e);try{const e=r(...t);return e instanceof Promise&&e.catch(a),e}catch(s){a(s)}finally{Et(n)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:o})}catch(p){return void Ie(p,{phase:"directive",source:i,el:e,expression:n})}f&&qt(s,f)},Yt=(e,t,n)=>{try{return document.querySelector(e)}catch(s){Ie(s,{phase:"directive",source:n,el:t,expression:e})}},en=(e,t)=>{if("#"===t[0]){const n=Yt(t,e,"v-scope");if(!(n instanceof HTMLTemplateElement))return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},tn=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:he({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(Ft){const t=()=>Ht(!0,e);return Fe(t),t}const n=Ke(C(e,{scheduler:()=>Fe(n),lazy:!0}));return t.effects.push(n),Lt(()=>{Ce(n),r(t.effects,n)}),n(),n}};return t},nn=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),sn=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),nn(s,"$refs",Object.create(n.$refs));const r=he(new Proxy(s,{set:(e,t,s,o)=>o!==r||i(e,t)?Reflect.set(e,t,s,o):Reflect.set(n,t,s)})),o={...e,scope:r};return nn(s,"$watch",Je(o)),nn(s,"$id",Ue()),rn(r,s),o},rn=(e,t=e)=>{for(const n of Object.keys(t)){const s=Object.getOwnPropertyDescriptor(t,n).value;"function"==typeof s&&(e[n]=s.bind(e))}},on=class{get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=tn(t),Jt(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,Lt(()=>this.discard(),this.el))}remove(){this.parentCtx&&r(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),jt(n),n!==this.end);)n=t}else e.removeChild(this.template),jt(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&r(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(Ce),this.ctx.cleanups.splice(0).forEach(e=>e())}},cn=he(Object.create(null)),ln=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),an=e=>{const t=tn();if("function"==typeof e&&(e=e()),e&&(t.scope=he(e),rn(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(ln(n)+"([^]+?)"+ln(s),"g")}nn(t.scope,"$s",_t),nn(t.scope,"$nextTick",De),nn(t.scope,"$refs",Object.create(null)),nn(t.scope,"$store",cn),nn(t.scope,"$watch",Je(t)),nn(t.scope,"$id",Ue()),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let s=[];const o=[],i=new Set,c=[],l=[],a={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Le()||Se.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Re.push(n),()=>{const e=Re.indexOf(n);e>-1&&Re.splice(e,1)});var n;return l.push(t),()=>{const e=l.indexOf(t);e>-1&&l.splice(e,1),t()}},use(e,t){if(!i.has(e)){i.add(e);const n="function"==typeof e?e(a,t):e.install(a,t);"function"==typeof n&&c.push(n)}return a},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(Vt)?[e]:[...e.querySelectorAll(Vt)].filter(e=>!e.matches(`:where(${Vt}) *`)),n.length||(n=[e]),t.walk??=Jt,t.dispose??=jt;for(const o of n){const e=o.getAttribute("v-name"),n=new on(o,t,!0);o.__ctx??=n.ctx,Ne.scopes.has(o)||o.matches(Vt)||n.ctx.cleanups.push(Ae(o,n.ctx.scope,void 0,e||void 0)),s.push(n),Lt(()=>r(s,n),o),n.ctx.cleanups.push(()=>delete o.__ctx)}return this},unmount(e){if(null==e)return s.forEach(e=>e.teardown()),s=[],t.effects.splice(0).forEach(Ce),o.splice(0).forEach(e=>e()),c.splice(0).forEach(e=>{try{e()}catch(t){Ie(t,{phase:"teardown",source:"plugin"})}}),i.clear(),void l.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const r=[];for(const t of s){const e=t.template;n.contains(e)?t.teardown():r.push(t)}s=r}};return a},un=document.currentScript;un&&un.hasAttribute("init")&&an().mount(),e.computed=function(e,t,s=!1){let r,o;const i=a(e);return i?(r=e,o=n):(r=e.get,o=e.set),new ye(r,o,i||!o,s)},e.createApp=an,e.devtools=Ne,e.disableDevtools=()=>{Ee=!0,we.clear(),xe.clear(),$e.clear(),ke.clear(),Se.clear(),Oe.length=0;for(const e in je)je[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Ne&&delete window.__LITE_VUE__},e.nextTick=De,e.reactive=he,e.store=(e,t)=>(void 0!==t&&(cn[e]=t,"function"==typeof cn[e].init&&cn[e].init(),((e,t)=>{Le()||(ke.set(e,t),Te("store:register",e,t))})(e,cn[e])),cn[e]),e.watchEffect=e=>{const t=C(e,{scheduler:()=>Fe(t),lazy:!0});t.i=1/0;try{t()}catch(n){throw Ce(t),n}return()=>Ce(t)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var LiteVueCollapse=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});return e.collapse=e=>{e.directive("collapse",({el:e,get:t,effect:i,modifiers:l})=>{const
|
|
1
|
+
var LiteVueCollapse=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});return e.collapse=e=>{e.directive("collapse",({el:e,get:t,effect:i,modifiers:l})=>{const o=e;let s=250;for(const f in l||{}){const e=/^duration-(\d+)$/.exec(f);e&&(s=+e[1])}const n=["overflow","height","transition","visibility"],r=n.map(e=>o.style[e]);let c;o.style.overflow="hidden";let a=0;const h=new Set,d=(e,t)=>{const i=setTimeout(()=>{h.delete(i),e()},t);h.add(i)};return i(()=>{const e=!!t();if(e===c)return;const i=++a;var l;l=!e,o.style.visibility=l?"hidden":r[3],null==c?d(()=>{o.style.transition=`height ${s}ms ease, visibility ${s}ms`}):(o.style.height=o.scrollHeight+"px",e?d(()=>{i===a&&(o.style.height="")},s):o.offsetHeight),e||(o.style.height="0px"),c=e}),()=>{h.forEach(clearTimeout),n.forEach((e,t)=>o.style[e]=r[t])}})},e}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=e=>{e.directive("collapse",({el:e,get:t,effect:i,modifiers:s})=>{const l=e;let o=250;for(const f in s||{}){const e=/^duration-(\d+)$/.exec(f);e&&(o=+e[1])}const
|
|
1
|
+
var e=e=>{e.directive("collapse",({el:e,get:t,effect:i,modifiers:s})=>{const l=e;let o=250;for(const f in s||{}){const e=/^duration-(\d+)$/.exec(f);e&&(o=+e[1])}const n=["overflow","height","transition","visibility"],r=n.map(e=>l.style[e]);let c;l.style.overflow="hidden";let h=0;const a=/* @__PURE__ */new Set,d=(e,t)=>{const i=setTimeout(()=>{a.delete(i),e()},t);a.add(i)};return i(()=>{const e=!!t();if(e===c)return;const i=++h;var s;s=!e,l.style.visibility=s?"hidden":r[3],null==c?d(()=>{l.style.transition=`height ${o}ms ease, visibility ${o}ms`}):(l.style.height=l.scrollHeight+"px",e?d(()=>{i===h&&(l.style.height="")},o):l.offsetHeight),e||(l.style.height="0px"),c=e}),()=>{a.forEach(clearTimeout),n.forEach((e,t)=>l.style[e]=r[t])}})};export{e as collapse};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueCollapse={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.collapse=e=>{e.directive("collapse",({el:e,get:t,effect:i,modifiers:o})=>{const
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueCollapse={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.collapse=e=>{e.directive("collapse",({el:e,get:t,effect:i,modifiers:o})=>{const l=e;let s=250;for(const a in o||{}){const e=/^duration-(\d+)$/.exec(a);e&&(s=+e[1])}const n=["overflow","height","transition","visibility"],f=n.map(e=>l.style[e]);let r;l.style.overflow="hidden";let c=0;const d=new Set,h=(e,t)=>{const i=setTimeout(()=>{d.delete(i),e()},t);d.add(i)};return i(()=>{const e=!!t();if(e===r)return;const i=++c;var o;o=!e,l.style.visibility=o?"hidden":f[3],null==r?h(()=>{l.style.transition=`height ${s}ms ease, visibility ${s}ms`}):(l.style.height=l.scrollHeight+"px",e?h(()=>{i===c&&(l.style.height="")},s):l.offsetHeight),e||(l.style.height="0px"),r=e}),()=>{d.forEach(clearTimeout),n.forEach((e,t)=>l.style[e]=f[t])}})}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var LiteVueFocus=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=[],n=(e,t,n)=>"radio"!==e.type||!e.name||e===(n.find(t=>"radio"===t.type&&t.name===e.name&&t.checked)||n.find(t=>"radio"===t.type&&t.name===e.name));return e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:i})=>{let o=!
|
|
1
|
+
var LiteVueFocus=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=[],n=(e,t,n)=>"radio"!==e.type||!e.name||e===(n.find(t=>"radio"===t.type&&t.name===e.name&&t.checked)||n.find(t=>"radio"===t.type&&t.name===e.name));return e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:i})=>{let r=!0,o=!1;return n(()=>{o!==(o=!!t())&&Promise.resolve().then(()=>{r&&o&&(e.focus(),i?.select&&e.select&&e.select())})}),()=>{r=!1}}),e.directive("trap",({el:e,get:i,effect:r})=>{let o=!1,c=null;const s=()=>[...e.querySelectorAll("a[href],area[href],button,input:not([type=hidden]),select,textarea,summary,iframe,audio[controls],video[controls],[contenteditable],[tabindex]")].filter(e=>e.tabIndex>=0&&!e.matches(":disabled,[inert] *")&&!1!==e.checkVisibility?.({visibilityProperty:!0})).filter(n),a=n=>{if("Tab"!==n.key||t.at(-1)!==a)return;const i=s();if(!i.length)return void n.preventDefault();const r=i[0],o=i[i.length-1],c=document.activeElement;e.contains(c)?!n.shiftKey||c!==r&&c!==e?n.shiftKey||c!==o||(n.preventDefault(),r.focus()):(n.preventDefault(),o.focus()):(n.preventDefault(),r.focus())},l=()=>{o=!1,t.splice(t.indexOf(a),1),document.removeEventListener("keydown",a,!0),c&&c.focus&&c.focus()};return r(()=>{const n=!!i();n&&!o?(o=!0,c=document.activeElement,t.push(a),document.addEventListener("keydown",a,!0),Promise.resolve().then(()=>{o&&(s()[0]||e).focus()})):!n&&o&&l()}),()=>{o&&l()}})},e}({});
|
package/dist/plugins/focus.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=[],t=(e,t,n)=>"radio"!==e.type||!e.name||e===(n.find(t=>"radio"===t.type&&t.name===e.name&&t.checked)||n.find(t=>"radio"===t.type&&t.name===e.name)),n=n=>{n.directive("focus",({el:e,get:t,effect:n,modifiers:i})=>{let r=!0;return n(()=>{
|
|
1
|
+
var e=[],t=(e,t,n)=>"radio"!==e.type||!e.name||e===(n.find(t=>"radio"===t.type&&t.name===e.name&&t.checked)||n.find(t=>"radio"===t.type&&t.name===e.name)),n=n=>{n.directive("focus",({el:e,get:t,effect:n,modifiers:i})=>{let r=!0,o=!1;return n(()=>{o!==(o=!!t())&&Promise.resolve().then(()=>{r&&o&&(e.focus(),i?.select&&e.select&&e.select())})}),()=>{r=!1}}),n.directive("trap",({el:n,get:i,effect:r})=>{let o=!1,c=null;const s=()=>[...n.querySelectorAll("a[href],area[href],button,input:not([type=hidden]),select,textarea,summary,iframe,audio[controls],video[controls],[contenteditable],[tabindex]")].filter(e=>e.tabIndex>=0&&!e.matches(":disabled,[inert] *")&&!1!==e.checkVisibility?.({visibilityProperty:!0})).filter(t),a=t=>{if("Tab"!==t.key||e.at(-1)!==a)return;const i=s();if(!i.length)return void t.preventDefault();const r=i[0],o=i[i.length-1],c=document.activeElement;n.contains(c)?!t.shiftKey||c!==r&&c!==n?t.shiftKey||c!==o||(t.preventDefault(),r.focus()):(t.preventDefault(),o.focus()):(t.preventDefault(),r.focus())},l=()=>{o=!1,e.splice(e.indexOf(a),1),document.removeEventListener("keydown",a,!0),c&&c.focus&&c.focus()};return r(()=>{const t=!!i();t&&!o?(o=!0,c=document.activeElement,e.push(a),document.addEventListener("keydown",a,!0),Promise.resolve().then(()=>{o&&(s()[0]||n).focus()})):!t&&o&&l()}),()=>{o&&l()}})};export{n as focus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueFocus={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=[],n=(e,t,n)=>"radio"!==e.type||!e.name||e===(n.find(t=>"radio"===t.type&&t.name===e.name&&t.checked)||n.find(t=>"radio"===t.type&&t.name===e.name));e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:o})=>{let i=!0;return n(()=>{
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueFocus={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=[],n=(e,t,n)=>"radio"!==e.type||!e.name||e===(n.find(t=>"radio"===t.type&&t.name===e.name&&t.checked)||n.find(t=>"radio"===t.type&&t.name===e.name));e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:o})=>{let i=!0,r=!1;return n(()=>{r!==(r=!!t())&&Promise.resolve().then(()=>{i&&r&&(e.focus(),o?.select&&e.select&&e.select())})}),()=>{i=!1}}),e.directive("trap",({el:e,get:o,effect:i})=>{let r=!1,c=null;const f=()=>[...e.querySelectorAll("a[href],area[href],button,input:not([type=hidden]),select,textarea,summary,iframe,audio[controls],video[controls],[contenteditable],[tabindex]")].filter(e=>e.tabIndex>=0&&!e.matches(":disabled,[inert] *")&&!1!==e.checkVisibility?.({visibilityProperty:!0})).filter(n),s=n=>{if("Tab"!==n.key||t.at(-1)!==s)return;const o=f();if(!o.length)return void n.preventDefault();const i=o[0],r=o[o.length-1],c=document.activeElement;e.contains(c)?!n.shiftKey||c!==i&&c!==e?n.shiftKey||c!==r||(n.preventDefault(),i.focus()):(n.preventDefault(),r.focus()):(n.preventDefault(),i.focus())},l=()=>{r=!1,t.splice(t.indexOf(s),1),document.removeEventListener("keydown",s,!0),c&&c.focus&&c.focus()};return i(()=>{const n=!!o();n&&!r?(r=!0,c=document.activeElement,t.push(s),document.addEventListener("keydown",s,!0),Promise.resolve().then(()=>{r&&(f()[0]||e).focus()})):!n&&r&&l()}),()=>{r&&l()}})}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var LiteVueMask=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},n=(e,n)=>{let
|
|
1
|
+
var LiteVueMask=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},n=(e,n,r)=>{let i="",l="",a=0;for(let s=0;s<n.length;s++){const r=t[n[s]];if(r){for(;a<e.length&&!r.test(e[a]);)a++;if(a>=e.length)return i;i+=l+e[a++],l=""}else l+=n[s],e[a]===n[s]&&a++}return r?i+l:i};return e.mask=e=>{e.directive("mask",({el:e,exp:r})=>{const i=e,l=e=>{const{value:l,selectionStart:a}=i,s=n(l,r,!e?.inputType?.startsWith("del"));if(s===l)return!1;if(i.value=s,null!=a&&document.activeElement===i){let e=n(l.slice(0,a),r).length;for(;e<s.length&&!t[r[e]];)e++;i.setSelectionRange(e,e)}return!0};e.addEventListener("input",l),l();let a=!0;return Promise.resolve().then(()=>{a&&l()&&(e.dispatchEvent(new Event("input")),e.dispatchEvent(new Event("change")))}),()=>{a=!1,e.removeEventListener("input",l)}})},e}({});
|
package/dist/plugins/mask.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},t=(t,n)=>{let
|
|
1
|
+
var e={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},t=(t,n,r)=>{let l="",i="",s=0;for(let a=0;a<n.length;a++){const r=e[n[a]];if(r){for(;s<t.length&&!r.test(t[s]);)s++;if(s>=t.length)return l;l+=i+t[s++],i=""}else i+=n[a],t[s]===n[a]&&s++}return r?l+i:l},n=n=>{n.directive("mask",({el:n,exp:r})=>{const l=n,i=n=>{const{value:i,selectionStart:s}=l,a=t(i,r,!n?.inputType?.startsWith("del"));if(a===i)return!1;if(l.value=a,null!=s&&document.activeElement===l){let n=t(i.slice(0,s),r).length;for(;n<a.length&&!e[r[n]];)n++;l.setSelectionRange(n,n)}return!0};n.addEventListener("input",i),i();let s=!0;return Promise.resolve().then(()=>{s&&i()&&(n.dispatchEvent(new Event("input")),n.dispatchEvent(new Event("change")))}),()=>{s=!1,n.removeEventListener("input",i)}})};export{n as mask};
|
package/dist/plugins/mask.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueMask={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},n=(e,n)=>{let
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueMask={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},n=(e,n,i)=>{let l="",o="",r=0;for(let s=0;s<n.length;s++){const i=t[n[s]];if(i){for(;r<e.length&&!i.test(e[r]);)r++;if(r>=e.length)return l;l+=o+e[r++],o=""}else o+=n[s],e[r]===n[s]&&r++}return i?l+o:l};e.mask=e=>{e.directive("mask",({el:e,exp:i})=>{const l=e,o=e=>{const{value:o,selectionStart:r}=l,s=n(o,i,!e?.inputType?.startsWith("del"));if(s===o)return!1;if(l.value=s,null!=r&&document.activeElement===l){let e=n(o.slice(0,r),i).length;for(;e<s.length&&!t[i[e]];)e++;l.setSelectionRange(e,e)}return!0};e.addEventListener("input",o),o();let r=!0;return Promise.resolve().then(()=>{r&&o()&&(e.dispatchEvent(new Event("input")),e.dispatchEvent(new Event("change")))}),()=>{r=!1,e.removeEventListener("input",o)}})}});
|
|
@@ -6,7 +6,7 @@ var LiteVueMorph = (function(exports) {
|
|
|
6
6
|
* logs an unknown-directive error, and registering one would have the walker
|
|
7
7
|
* strip it, leaving nothing for the next morph. Matches `data-morph-skip`.
|
|
8
8
|
*/
|
|
9
|
-
var preserved = (node, opts) => node.nodeType === 1 && (node.hasAttribute("data-morph-preserve") || !!opts.preserve?.(node));
|
|
9
|
+
var preserved = (node, opts) => node.nodeType === 1 && (node.hasAttribute("data-morph-preserve") || node.__marker || !!opts.preserve?.(node));
|
|
10
10
|
var dirRE = /^(?:v-|:|@)/;
|
|
11
11
|
var bindRE = /^(?::|v-bind:)/;
|
|
12
12
|
var clientStyleRE = /^v-(?!scope|on:)/;
|
|
@@ -71,8 +71,23 @@ var LiteVueMorph = (function(exports) {
|
|
|
71
71
|
for (let c = to.firstElementChild; c; c = c.nextElementSibling) if (isBlockRoot(c)) return true;
|
|
72
72
|
return false;
|
|
73
73
|
};
|
|
74
|
-
var
|
|
74
|
+
var FIELD_PROPS = [
|
|
75
|
+
"Value",
|
|
76
|
+
"Checked",
|
|
77
|
+
"Selected"
|
|
78
|
+
];
|
|
79
|
+
var syncValues = (from, to, owned) => {
|
|
80
|
+
const ctl = boundAttrs(to.closest("select") || to);
|
|
81
|
+
if (owned.has("*") || ctl.has("*") || ctl.has("value")) return;
|
|
82
|
+
for (const name of FIELD_PROPS) {
|
|
83
|
+
const prop = name.toLowerCase();
|
|
84
|
+
const init = "default" + name;
|
|
85
|
+
if (!owned.has(prop) && init in from && from[prop] !== to[init]) from[prop] = to[init];
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
var patchAttrs = (from, to, values) => {
|
|
75
89
|
const owned = boundAttrs(to);
|
|
90
|
+
if (values) syncValues(from, to, owned);
|
|
76
91
|
const bound = Object(from.__bound);
|
|
77
92
|
for (const { name, value } of to.attributes) {
|
|
78
93
|
if (dirRE.test(name) || owned.has(name) || name in bound) continue;
|
|
@@ -93,6 +108,7 @@ var LiteVueMorph = (function(exports) {
|
|
|
93
108
|
if (from.nodeType === 3 || from.nodeType === 8) {
|
|
94
109
|
const data = to.data;
|
|
95
110
|
if (isInterpolation(data, ctx)) return;
|
|
111
|
+
if (!from.data) return replaceNode(from, to, ctx, opts);
|
|
96
112
|
if (from.data !== data) from.data = data;
|
|
97
113
|
return;
|
|
98
114
|
}
|
|
@@ -101,8 +117,9 @@ var LiteVueMorph = (function(exports) {
|
|
|
101
117
|
const b = to;
|
|
102
118
|
if (a.tagName !== b.tagName) return replaceNode(from, to, ctx, opts);
|
|
103
119
|
if (opts.skip?.(a, b) || a.hasAttribute("data-morph-skip")) return;
|
|
104
|
-
patchAttrs(a, b);
|
|
105
|
-
if (
|
|
120
|
+
patchAttrs(a, b, opts.values);
|
|
121
|
+
if (a.tagName == "TEMPLATE") a.innerHTML = b.innerHTML;
|
|
122
|
+
if (!ownsChildren(b) && !a.__ctx?.scope.$template) patchChildren(a, b, a.__ctx || ctx, opts);
|
|
106
123
|
};
|
|
107
124
|
var replaceNode = (from, to, ctx, opts) => {
|
|
108
125
|
if (preserved(from, opts)) return;
|
|
@@ -119,6 +136,7 @@ var LiteVueMorph = (function(exports) {
|
|
|
119
136
|
* copy of the core into the plugins bundle.
|
|
120
137
|
*/
|
|
121
138
|
var mountNew = (node, ctx) => {
|
|
139
|
+
if (node.parentElement?.closest("[v-scope\\.visible],[v-scope\\.idle],[v-scope\\.interaction]")) return;
|
|
122
140
|
const target = ctx || nearestCtx(node.parentNode);
|
|
123
141
|
target?.walk?.(node, target);
|
|
124
142
|
};
|
|
@@ -143,7 +161,8 @@ var LiteVueMorph = (function(exports) {
|
|
|
143
161
|
while (newChild) {
|
|
144
162
|
const nextNew = newChild.nextSibling;
|
|
145
163
|
const wantKey = keyOf(newChild);
|
|
146
|
-
if (
|
|
164
|
+
if (oldChild?.data === "" && newChild.hasAttribute?.("v-teleport")) oldChild = oldChild.nextSibling;
|
|
165
|
+
else if (wantKey != null) {
|
|
147
166
|
const match = keyed.get(wantKey);
|
|
148
167
|
if (match) {
|
|
149
168
|
if (match === oldChild) oldChild = oldChild.nextSibling;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* logs an unknown-directive error, and registering one would have the walker
|
|
5
5
|
* strip it, leaving nothing for the next morph. Matches `data-morph-skip`.
|
|
6
6
|
*/
|
|
7
|
-
var preserved = (node, opts) => node.nodeType === 1 && (node.hasAttribute("data-morph-preserve") || !!opts.preserve?.(node));
|
|
7
|
+
var preserved = (node, opts) => node.nodeType === 1 && (node.hasAttribute("data-morph-preserve") || node.__marker || !!opts.preserve?.(node));
|
|
8
8
|
var dirRE = /^(?:v-|:|@)/;
|
|
9
9
|
var bindRE = /^(?::|v-bind:)/;
|
|
10
10
|
var clientStyleRE = /^v-(?!scope|on:)/;
|
|
@@ -69,8 +69,23 @@ var ownsChildren = (to) => {
|
|
|
69
69
|
for (let c = to.firstElementChild; c; c = c.nextElementSibling) if (isBlockRoot(c)) return true;
|
|
70
70
|
return false;
|
|
71
71
|
};
|
|
72
|
-
var
|
|
72
|
+
var FIELD_PROPS = [
|
|
73
|
+
"Value",
|
|
74
|
+
"Checked",
|
|
75
|
+
"Selected"
|
|
76
|
+
];
|
|
77
|
+
var syncValues = (from, to, owned) => {
|
|
78
|
+
const ctl = boundAttrs(to.closest("select") || to);
|
|
79
|
+
if (owned.has("*") || ctl.has("*") || ctl.has("value")) return;
|
|
80
|
+
for (const name of FIELD_PROPS) {
|
|
81
|
+
const prop = name.toLowerCase();
|
|
82
|
+
const init = "default" + name;
|
|
83
|
+
if (!owned.has(prop) && init in from && from[prop] !== to[init]) from[prop] = to[init];
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var patchAttrs = (from, to, values) => {
|
|
73
87
|
const owned = boundAttrs(to);
|
|
88
|
+
if (values) syncValues(from, to, owned);
|
|
74
89
|
const bound = Object(from.__bound);
|
|
75
90
|
for (const { name, value } of to.attributes) {
|
|
76
91
|
if (dirRE.test(name) || owned.has(name) || name in bound) continue;
|
|
@@ -91,6 +106,7 @@ var patchNode = (from, to, ctx, opts) => {
|
|
|
91
106
|
if (from.nodeType === 3 || from.nodeType === 8) {
|
|
92
107
|
const data = to.data;
|
|
93
108
|
if (isInterpolation(data, ctx)) return;
|
|
109
|
+
if (!from.data) return replaceNode(from, to, ctx, opts);
|
|
94
110
|
if (from.data !== data) from.data = data;
|
|
95
111
|
return;
|
|
96
112
|
}
|
|
@@ -99,8 +115,9 @@ var patchNode = (from, to, ctx, opts) => {
|
|
|
99
115
|
const b = to;
|
|
100
116
|
if (a.tagName !== b.tagName) return replaceNode(from, to, ctx, opts);
|
|
101
117
|
if (opts.skip?.(a, b) || a.hasAttribute("data-morph-skip")) return;
|
|
102
|
-
patchAttrs(a, b);
|
|
103
|
-
if (
|
|
118
|
+
patchAttrs(a, b, opts.values);
|
|
119
|
+
if (a.tagName == "TEMPLATE") a.innerHTML = b.innerHTML;
|
|
120
|
+
if (!ownsChildren(b) && !a.__ctx?.scope.$template) patchChildren(a, b, a.__ctx || ctx, opts);
|
|
104
121
|
};
|
|
105
122
|
var replaceNode = (from, to, ctx, opts) => {
|
|
106
123
|
if (preserved(from, opts)) return;
|
|
@@ -117,6 +134,7 @@ var replaceNode = (from, to, ctx, opts) => {
|
|
|
117
134
|
* copy of the core into the plugins bundle.
|
|
118
135
|
*/
|
|
119
136
|
var mountNew = (node, ctx) => {
|
|
137
|
+
if (node.parentElement?.closest("[v-scope\\.visible],[v-scope\\.idle],[v-scope\\.interaction]")) return;
|
|
120
138
|
const target = ctx || nearestCtx(node.parentNode);
|
|
121
139
|
target?.walk?.(node, target);
|
|
122
140
|
};
|
|
@@ -141,7 +159,8 @@ var patchChildren = (from, to, ctx, opts) => {
|
|
|
141
159
|
while (newChild) {
|
|
142
160
|
const nextNew = newChild.nextSibling;
|
|
143
161
|
const wantKey = keyOf(newChild);
|
|
144
|
-
if (
|
|
162
|
+
if (oldChild?.data === "" && newChild.hasAttribute?.("v-teleport")) oldChild = oldChild.nextSibling;
|
|
163
|
+
else if (wantKey != null) {
|
|
145
164
|
const match = keyed.get(wantKey);
|
|
146
165
|
if (match) {
|
|
147
166
|
if (match === oldChild) oldChild = oldChild.nextSibling;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var LiteVueMorph=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=(e,t)=>1===e.nodeType&&(e.hasAttribute("data-morph-preserve")||!!t.preserve?.(e)),n=/^(?:v-|:|@)/,
|
|
1
|
+
var LiteVueMorph=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=(e,t)=>1===e.nodeType&&(e.hasAttribute("data-morph-preserve")||e.__marker||!!t.preserve?.(e)),n=/^(?:v-|:|@)/,o=/^(?::|v-bind:)/,r=/^v-(?!scope|on:)/,i=["id","data-key","data-id"],s=e=>{for(const t of i){const n=e.getAttribute(t);if(null!=n)return t+"="+n}return null},a=e=>{for(let t=e;t;t=t.parentElement)if(t.__ctx)return t.__ctx},l=e=>e.__ctx||[...e.children||[]].map(l).find(Boolean),d=(e,t)=>(t||l(e))?.dispose?.(e),c=e=>{const t=new Set;e.matches("details,dialog")&&t.add("open");for(const{name:n}of e.attributes)o.test(n)?t.add(n.replace(o,"").split(".")[0]):"v-model"===n?(t.add("value"),t.add("checked")):"v-bind"===n?t.add("*"):r.test(n)&&t.add("style");return t},u=e=>e.hasAttribute("v-for")||e.hasAttribute("v-if")||e.hasAttribute("v-else")||e.hasAttribute("v-else-if"),f=["Value","Checked","Selected"],h=(e,t,o)=>{const r=c(t);o&&((e,t,n)=>{const o=c(t.closest("select")||t);if(!(n.has("*")||o.has("*")||o.has("value")))for(const r of f){const o=r.toLowerCase(),i="default"+r;!n.has(o)&&i in e&&e[o]!==t[i]&&(e[o]=t[i])}})(e,t,r);const i=Object(e.__bound);for(const{name:s,value:a}of t.attributes)n.test(s)||r.has(s)||s in i||e.getAttribute(s)!==a&&e.setAttribute(s,a);for(const{name:n}of[...e.attributes])r.has("*")||r.has(n)||t.hasAttribute(n)||e.removeAttribute(n)},p=(e,t,n,o)=>{if(e.nodeType!==t.nodeType)return m(e,t,n,o);if(3===e.nodeType||8===e.nodeType){const r=t.data;if(((e,t)=>e.includes(t?t.delimiters[0]:"{{"))(r,n))return;return e.data?void(e.data!==r&&(e.data=r)):m(e,t,n,o)}if(1!==e.nodeType)return;const r=e,i=t;if(r.tagName!==i.tagName)return m(e,t,n,o);o.skip?.(r,i)||r.hasAttribute("data-morph-skip")||(h(r,i,o.values),"TEMPLATE"==r.tagName&&(r.innerHTML=i.innerHTML),(e=>{if(e.hasAttribute("v-text")||e.hasAttribute("v-html")||e.hasAttribute("v-pre")||e.hasAttribute("v-once")||u(e))return!0;for(let t=e.firstElementChild;t;t=t.nextElementSibling)if(u(t))return!0;return!1})(i)||r.__ctx?.scope.$template||v(r,i,r.__ctx||n,o))},m=(e,n,o,r)=>{if(t(e,r))return;const i=n.cloneNode(!0);!1!==r.beforeNodeAdded?.(i)&&(d(e,o),e.parentNode.replaceChild(i,e),r.afterNodeRemoved?.(e),b(i,o))},b=(e,t)=>{if(e.parentElement?.closest("[v-scope\\.visible],[v-scope\\.idle],[v-scope\\.interaction]"))return;const n=t||a(e.parentNode);n?.walk?.(e,n)},v=(e,n,o,r)=>{const i=r.key||s,a=new Map;for(let t=e.firstChild;t;t=t.nextSibling)if(1===t.nodeType){const e=i(t);if(null==e)continue;a.set(e,t)}const l=e=>e&&1===e.nodeType?i(e):null;let c=e.firstChild,u=n.firstChild;const f=t=>{const n=t.cloneNode(!0);!1!==r.beforeNodeAdded?.(n)&&(e.insertBefore(n,c),b(n,o))};for(;u;){const n=u.nextSibling,i=l(u);if(""===c?.data&&u.hasAttribute?.("v-teleport"))c=c.nextSibling;else if(null!=i){const t=a.get(i);t?(t===c?c=c.nextSibling:e.insertBefore(t,c),a.delete(i),p(t,u,o,r)):f(u)}else if(c&&null==l(c)){if(t(c,r)&&!t(u,r)){c=c.nextSibling;continue}const e=c.nextSibling;p(c,u,o,r),c=e}else f(u);u=n}for(;c;){const n=c.nextSibling;t(c,r)||(d(c,o),e.removeChild(c),r.afterNodeRemoved?.(c)),c=n}},g=(e,t,n={})=>{let o;if("string"==typeof t){const n=document.createElement("template");n.innerHTML=t.trim();const r=n.content;o=1===r.childNodes.length&&r.firstElementChild?r.firstElementChild:(()=>{const t=e.cloneNode(!1);return t.appendChild(r),t})()}else o=t;if(o){const t=()=>{const t=A();p(e,o,a(e),n),t()};n.transition&&document.startViewTransition?document.startViewTransition(t):t()}return e},A=()=>{const e=document.activeElement;if(!e||e===document.body)return()=>{};const t=e;let n=null,o=null;try{n=t.selectionStart,o=t.selectionEnd}catch{}return()=>{if(e!==document.activeElement&&e.isConnected&&(e.focus(),null!==n))try{t.setSelectionRange(n,o)}catch{}}};return e.morph=g,e.morphPlugin=e=>{e.scope.$morph=g},e}({});
|