@fox-js/fox 3.0.1-1 → 3.0.1-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/libs/index.d.ts CHANGED
@@ -1597,7 +1597,7 @@ declare function isEqual(x: any, y: any): boolean;
1597
1597
  declare function request(args: any): Promise<any>;
1598
1598
  /**
1599
1599
  * 取消ajax请求
1600
- * @param args
1600
+ * @param id
1601
1601
  */
1602
1602
  declare function cancel(id: any): boolean;
1603
1603
 
package/libs/index.js CHANGED
@@ -1 +1 @@
1
- import{ref as e,effectScope as t,watch as r,shallowRef as n,getCurrentInstance as i,onUnmounted as s,shallowReactive as o,defineComponent as l,inject as a,provide as u,h}from"vue";const c=Array.isArray,f=e=>"[object Map]"===x(e),p=e=>"[object Set]"===x(e),d=e=>e instanceof Date,y=e=>"function"==typeof e,m=e=>"string"==typeof e,g=e=>"symbol"==typeof e,v=e=>null!==e&&"object"==typeof e,w=e=>v(e)&&y(e.then)&&y(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>"[object Object]"===x(e),R="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function A(e){return e.__esModule||R&&"Module"===e[Symbol.toStringTag]}const E="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]");function C(...e){let t=void 0!==e[0]&&null!==e[0]?e[0]:{},r=1,n=e.length,i=!1;for("boolean"==typeof t&&(i=t,t=e[r]??{},r++),"object"!=typeof t&&(t={});r<n;r++)if(null!==e[r]&&void 0!==e[r]){let n=e[r];for(let e in n){let r=t[e],s=n[e];if(r!==s)if(!0===i&&s&&"object"==typeof s){let n;n=Array.isArray(s)?r&&Array.isArray(r)?r:[]:r&&"object"==typeof r?r:{},t[e]=C(i,n,s)}else void 0!==s&&(t[e]=s)}}return t}function j(e,t,r=!1){if(r){if("object"!=typeof t)return{};"object"!=typeof e&&(e={});for(let n in t){let i=e[n],s=t[n];if(i!==s)if("object"==typeof s){if(!Array.isArray(s)&&!S(s))continue;i=j(i,s,r),e[n]=i}else{if("function"==typeof s)continue;e[n]=s}}const n=Object.getOwnPropertySymbols(t);for(let i of n){let n=e[i],s=t[i];if(n!==s)if("object"==typeof s){if(!Array.isArray(s)&&!S(s))continue;n=j(n,s,r),e[i]=n}else{if("function"==typeof s)continue;e[i]=s}}}else C(!0,e,t);return e}const T=class{static get(){let e=++T.seed;return e>=Number.MAX_VALUE&&(T.seed=0),e}};let P=T;P.seed=(new Date).getTime();const $=E?Promise.resolve():null;function O(e,...t){null!==$?t&&t.length>0?$.then((()=>{e(t)})):$.then(e):t&&t.length>0?setTimeout((()=>{e(t)})):setTimeout(e)}function q(e){return null!=e&&("boolean"==typeof e?e:"string"==typeof e?"true"===e.toLocaleLowerCase():Boolean(e))}function F(e){return"number"==typeof e?e:Number(e)}const k={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function _(e){let t=Object.prototype.toString.call(e);return null==e?String(e):k[t]||"object"}function M(e){return e&&"object"==typeof e&&"setInterval"in e}function N(e){let t=!!e&&"length"in e&&e.length,r=_(e);return"function"!==r&&!M(e)&&("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e)}function K(e,t){let r=+t.length,n=0,i=e.length;for(;n<r;n++)e[i++]=t[n];return e.length=i,e}function I(e,t=[]){let r=t;return null!=e&&(N(Object(e))?K(r,"string"==typeof e?[e]:e):r.push(e)),r}function L(e,t,r){if(N(e))Reflect.apply([].forEach,e,[t]);else for(let n in e)if(r&&e.hasOwnProperty(n)){if(!1===Reflect.apply(t,e,[e[n]]))break}else if(!1===Reflect.apply(t,e,[e[n]]))break;return e}function D(e,t){if(e==t)return!0;if(void 0===e||void 0===t)return!1;let r=_(e);if(r!==_(t))return!1;if("object"===r){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++){let i=r[n];if(!D(e[i],t[i]))return!1}return!0}if("array"===r){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){if(!D(e[r],t[r]))return!1}return!0}return!1}var H,B,U;const V=Symbol("idKey"),W=Symbol("valueKey"),J=Symbol("childrenKey"),z=Symbol("growKey");class G{constructor(t){this[H]=!0,this[B]=e(),this[U]=new Map,this[V]=t}}H=z,B=W,U=J;class X{get(e,t){if("value"==t)return e[W].value;if("grow"===t)return e[z];let r=e[J].get(t);return r?Q(r):e[z]?(r=Y(t),r[z]=e[z],e[J].set(t,r),Q(r)):void 0}set(e,t,r){return"value"==t?(e[W].value=r,!0):"grow"===t?(e[z]=q(r),!0):null==r?(e[J].delete(t),!0):(console.error(`illegal property:${t}`),!1)}deleteProperty(e,t){return"value"===t||"grow"==t?(console.error(`can not delete property:${String(t)}`),!1):(e[J].delete(t),!0)}}function Y(e){let t=new G(e);return Reflect.set(t,"__proxy__",new Proxy(t,new X)),t}function Q(e){return Reflect.get(e,"__proxy__")}class Z extends G{constructor(){super("__root__")}put(...e){let t=e.length;if(t<2)return console.error("参数至少包括一个(key, value)"),!1;let r=this;for(let n=0;n<t-1;n++){let t,i=e[n];r[J].has(i)?t=r[J].get(i):(t=Y(i),r[J].set(i,t)),r=t}return r[W].value=e[t-1],!0}get(...e){let t=e.length;if(0===t)return;let r=this;for(let n=0;n<t;n++){let t=e[n];if(!r[J].has(t))return;r=r[J].get(t)}return r[W].value}remove(...e){let t=e.length;if(0==t)return!1;let r=this;for(let n=0;n<t-1;n++){let t=e[n];if(!r[J].has(t))return!1;r=r[J].get(t)}let n=e[t-1];return!!r[J].has(n)&&(r[J].delete(n),!0)}contains(...e){let t=e.length;if(0==t)return!1;let r=this;for(let n=0;n<t-1;n++){let t=e[n];if(!r[J].has(t))return!1;r=r[J].get(t)}let n=e[t-1];return r[J].has(n)}clear(){this[J].clear()}}const ee=["put","get","contains","remove","clear"];function te(e){return ee.includes(e)}class re{get(e,t){if("value"==t)return e[W].value;if("grow"===t)return e[z];if(t===J)return e[J];if("string"==typeof t&&te(t))return e[t];let r=String(t),n=e[J].get(r);return n?Q(n):e[z]?(n=Y(r),n[z]=e[z],e[J].set(r,n),Q(n)):void 0}set(e,t,r){return"value"==t?(e[W].value=r,!0):"grow"===t?(e[z]=q(r),!0):!te(t)&&(null==r?(e[J].delete(t),!0):(console.error(`illegal property:${t}`),!1))}deleteProperty(e,t){return"value"===t||"grow"==t?(console.error(`can not delete property:${String(t)}`),!1):(e[J].delete(t),!0)}}let ne=new Proxy(Z,{construct:(e,...t)=>Q(function(){let e=new Z,t=new re,r=new Proxy(e,t),n={put:(...t)=>Reflect.apply(e.put,e,t),get:(...t)=>Reflect.apply(e.get,e,t),remove:(...t)=>Reflect.apply(e.remove,e,t),contains:(...t)=>Reflect.apply(e.contains,e,t),clear:()=>Reflect.apply(e.clear,e,[])};return Object.assign(n,r),Reflect.set(e,"__proxy__",r),e}())});function ie(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var i=1,s="";if("?"===e[l=r+1])throw new TypeError('Pattern cannot start with "?" at '+l);for(;l<e.length;)if("\\"!==e[l]){if(")"===e[l]){if(0==--i){l++;break}}else if("("===e[l]&&(i++,"?"!==e[l+1]))throw new TypeError("Capturing groups are not allowed at "+l);s+=e[l++]}else s+=e[l++]+e[l++];if(i)throw new TypeError("Unbalanced pattern at "+r);if(!s)throw new TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:s}),r=l}else{for(var o="",l=r+1;l<e.length;){var a=e.charCodeAt(l);if(!(a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||95===a))break;o+=e[l++]}if(!o)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:o}),r=l}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,i=void 0===n?"./":n,s="[^"+le(t.delimiter||"/#?")+"]+?",o=[],l=0,a=0,u="",h=function(e){if(a<r.length&&r[a].type===e)return r[a++].value},c=function(e){var t=h(e);if(void 0!==t)return t;var n=r[a],i=n.type,s=n.index;throw new TypeError("Unexpected "+i+" at "+s+", expected "+e)},f=function(){for(var e,t="";e=h("CHAR")||h("ESCAPED_CHAR");)t+=e;return t};a<r.length;){var p=h("CHAR"),d=h("NAME"),y=h("PATTERN");if(d||y){var m=p||"";-1===i.indexOf(m)&&(u+=m,m=""),u&&(o.push(u),u=""),o.push({name:d||l++,prefix:m,suffix:"",pattern:y||s,modifier:h("MODIFIER")||""})}else{var g=p||h("ESCAPED_CHAR");if(g)u+=g;else if(u&&(o.push(u),u=""),h("OPEN")){m=f();var v=h("NAME")||"",w=h("PATTERN")||"",b=f();c("CLOSE"),o.push({name:v||(w?l++:""),pattern:v&&!w?s:w,prefix:m,suffix:b,modifier:h("MODIFIER")||""})}else c("END")}}return o}function se(e,t){return function(e,t){void 0===t&&(t={});var r=ae(t),n=t.encode,i=void 0===n?function(e){return e}:n,s=t.validate,o=void 0===s||s,l=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:"+e.pattern+")$",r)}));return function(t){for(var r="",n=0;n<e.length;n++){var s=e[n];if("string"!=typeof s){var a=t?t[s.name]:void 0,u="?"===s.modifier||"*"===s.modifier,h="*"===s.modifier||"+"===s.modifier;if(Array.isArray(a)){if(!h)throw new TypeError('Expected "'+s.name+'" to not repeat, but got an array');if(0===a.length){if(u)continue;throw new TypeError('Expected "'+s.name+'" to not be empty')}for(var c=0;c<a.length;c++){var f=i(a[c],s);if(o&&!l[n].test(f))throw new TypeError('Expected all "'+s.name+'" to match "'+s.pattern+'", but got "'+f+'"');r+=s.prefix+f+s.suffix}}else if("string"!=typeof a&&"number"!=typeof a){if(!u){var p=h?"an array":"a string";throw new TypeError('Expected "'+s.name+'" to be '+p)}}else{f=i(String(a),s);if(o&&!l[n].test(f))throw new TypeError('Expected "'+s.name+'" to match "'+s.pattern+'", but got "'+f+'"');r+=s.prefix+f+s.suffix}}else r+=s}return r}}(ie(e,t),t)}function oe(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,i=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var s=n[0],o=n.index,l=Object.create(null),a=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?l[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return i(e,r)})):l[r.name]=i(n[e],r)},u=1;u<n.length;u++)a(u);return{path:s,index:o,params:l}}}(he(e,r,t),r,t)}function le(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function ae(e){return e&&e.sensitive?"":"i"}function ue(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,i=void 0!==n&&n,s=r.start,o=void 0===s||s,l=r.end,a=void 0===l||l,u=r.encode,h=void 0===u?function(e){return e}:u,c="["+le(r.endsWith||"")+"]|$",f="["+le(r.delimiter||"/#?")+"]",p=o?"^":"",d=0,y=e;d<y.length;d++){var m=y[d];if("string"==typeof m)p+=le(h(m));else{var g=le(h(m.prefix)),v=le(h(m.suffix));if(m.pattern)if(t&&t.push(m),g||v)if("+"===m.modifier||"*"===m.modifier){var w="*"===m.modifier?"?":"";p+="(?:"+g+"((?:"+m.pattern+")(?:"+v+g+"(?:"+m.pattern+"))*)"+v+")"+w}else p+="(?:"+g+"("+m.pattern+")"+v+")"+m.modifier;else p+="("+m.pattern+")"+m.modifier;else p+="(?:"+g+v+")"+m.modifier}}if(a)i||(p+=f+"?"),p+=r.endsWith?"(?="+c+")":"$";else{var b=e[e.length-1],x="string"==typeof b?f.indexOf(b[b.length-1])>-1:void 0===b;i||(p+="(?:"+f+"(?="+c+"))?"),x||(p+="(?="+f+"|"+c+")")}return new RegExp(p,ae(r))}(ie(e,r),t,r)}function he(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,i=r.exec(e.source);i;)t.push({name:i[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),i=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return he(e,t,r).source}));return new RegExp("(?:"+n.join("|")+")",ae(r))}(e,t,r):ue(e,t,r)}const ce=Symbol("sync"),fe=Symbol("resolveRoute");function pe(e){let t=!1;return function(...r){if(!t)return t=!0,Reflect.apply(e,{},r)}}class de{constructor(e,t,r,n){this.rootIndex=0,this.name=e,this.level=t,this.rootName=r,this.rootIndex=n}}class ye{constructor(e,t){this.data={},this.to=e,this.from=t}static from(e){let t=new ye(e.to,e.from),r=e.data??{};return C(!0,t.data,r),t}}class me{get fullPath(){let e=this.path??`/${this.name}`;return`${this.root??"default"}!${e}`}static clone(e,t){let r=new me;return j(r,e,t),r}static isSame(e,t){return e===t||null!=e&&null!=t&&((!e.path||e.path===t.path)&&((!e.name||e.name===t.name)&&(e.root===t.root&&e.index===t.index)))}static isSameForRouteModel(e,t){return e===t||null!=e&&null!=t&&((!e.path||e.path==t.path)&&(!e.name||e.name==t.name))}static from(e){let t=new me;if(null==e)return t;let r=t;for(let t in e){let n=e[t];r[t]=n}const n=Object.getOwnPropertySymbols(e);if(Array.isArray(n)&&n.length>0)for(let t of n)r[t]=e[t];return t}}class ge{constructor(e,t,r,n){this.id=P.get(),this.name=e,this.src=t,"function"!=typeof t&&(this.component=t),this.props=r,this.meta=n}get isResolved(){return void 0!==this.component}resolve(){return function(e){let t=e.src;return new Promise(((r,n)=>{const i=pe((t=>{A(t)&&(t=t.default),e.component=t,console.debug("success load async module"),r()})),s=pe((e=>{console.debug("reject load async module"),n(e)}));let o;try{o=t(i,s)}catch(e){s(e)}if(o)if("function"==typeof o.then)o.then(i,s);else{const e=o.component;e&&"function"==typeof e.then&&e.then(i,s)}}))}(this)}}class ve{constructor(){this.models=[]}}class we{constructor(){this.layers=[]}}var be,xe,Se,Re,Ae,Ee;(xe=be||(be={}))[xe.Push=0]="Push",xe[xe.Replace=1]="Replace",xe[xe.Put=2]="Put",xe[xe.Append=3]="Append",xe[xe.Open=4]="Open",(Re=Se||(Se={}))[Re.Part=0]="Part",Re[Re.All=1]="All";const Ce=Symbol("rootKey"),je=Symbol("rootNodeKey"),Te=Symbol("parentNodeKey"),Pe=Symbol("nameKey");class $e{constructor(e,t,r=0,n=!0){this.instance=null,this.active=!0,this.index=0,this.route=e,this.model=t,this.index=r,this.active=n}}class Oe{constructor(e,t,r){this.scope=null,this[Ae]=null,this[Ee]=null,this[Pe]=e,this[Ce]=t,r&&(this[je]=r)}set compensation(e){null!==this.scope&&this.scope.stop(),this.scope=t(),this.scope.run((()=>{r(this.slots,(()=>{let t=!1;try{t=e()}catch(e){console.error(e)}t&&null!==this.scope&&(this.scope.stop(),this.scope=null)}))}))}get slots(){return null==this._slots&&(this._slots=n([])),this._slots}get empty(){return null==this._slots||0==this._slots.value.length}get name(){return this[Pe]}}Ae=je,Ee=Te;class qe{constructor(e,t,r){this.view=e,this.index=t,this.level=r}static include(e,t){for(let r=0;r<e.length;r++){let n=e[r];if(n.view===t.view&&(-1==t.index||n.index===t.index)&&n.level===t.level)return!0}return!1}}class Fe{constructor(){this.views=[]}}class ke{constructor(){this.layers=[]}}class _e{}class Me{constructor(){this.forbidTime=300,this.submitRecorder=new _e}isSameRoute(e,t){return null!=e&&null!=t&&(e.name===t.name&&e.path===t.path&&e.root===t.root)}acquire(e){let t=(new Date).getTime();if(!(this.isSameRoute(e,this.submitRecorder.route)&&this.submitRecorder.time&&t-this.submitRecorder.time<=this.forbidTime))return this.submitRecorder.route=e,this.submitRecorder.time=t,t;this.submitRecorder.time=t}release(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}}const Ne=void 0!==typeof window,Ke=window,Ie=window.document;function Le(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent?e.attachEvent(`on${t}`,r):e[`on${t}`]=r}function De(e,t,r){e.removeEventListener?e.removeEventListener(t,r):e.detachEvent?e.detachEvent(`on${t}`,r):e[`on${t}`]=null}let He=function(){let e=Ke.location,t=`${e.protocol}//${e.host}`;return t+=function(e){let t=e,r=t.lastIndexOf("/");return r>0&&r<t.length-1?t=t.substring(0,r+1):0===r&&-1!==t.indexOf(".")?t="/":-1===r&&(t=-1==t.indexOf(".")?`/${t}/`:"/"),0!==t.indexOf("/")&&(t=`/${t}`),t}(e.pathname),t}();const Be={method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},mode:"cors",credentials:"same-origin",cache:"default",redirect:"follow",keepalive:!0},Ue=new Map;async function Ve(e){let{id:t,method:r="POST",url:n,headers:i={},data:s,processData:o=!0,timeout:l=-1}=e;if(t&&Ue.has(t))throw new Error("resubmit");r=r.toUpperCase();let{contentType:a="application/json; charset=UTF-8"}=i,u=C(!0,{...Be},{method:r,headers:i});if("GET"===r?n=function(e,t,r="text"){if(null==t)return e;let n="";if(0===(r=r.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded")||0===r.indexOf("application/json"))if("object"==typeof t)for(let e in t){let r=t[e];if(Array.isArray(r))for(let t=0;t<r.length;t++){let i=`${encodeURIComponent(e)}=${encodeURIComponent(r[t])}`;n.length>0&&(n+="&"),n+=i}else{let t=`${encodeURIComponent(e)}=${encodeURIComponent(r)}`;n.length>0&&(n+="&"),n+=t}}else n=t;else n=t;return n.length>0&&(e=-1===e.indexOf("?")?`${e}?${n}`:`${e}&${n}`),e}(n,s,a):(o&&(s=function(e,t="text"){let r="";if(0===(t=t.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded"))if("object"==typeof e)for(let t in e){let n=e[t];if(Array.isArray(n))for(let e=0;e<n.length;e++){let i=`${encodeURIComponent(t)}=${encodeURIComponent(n[e])}`;r.length>0&&(r+="&"),r+=i}else{let e=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`;r.length>0&&(r+="&"),r+=e}}else r=e;else r=0===t.indexOf("text")?"object"==typeof e?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"==typeof e?JSON.stringify(e):e;return r}(s,a)),u.body=s),t||l>0){t||(t=`fetch_${P.get()}`);const e=new AbortController;u.signal=e.signal;let r={timer:null,controller:e};if(l>0){const e=setTimeout((()=>{r.timer&&r.controller.abort()}),l);r.timer=e}Ue.set(t,r)}try{let e,r=await fetch(n,u),i={};r.headers.forEach(((e,t)=>{i[e]=t}));let s=i["content-type"]??"";return e=-1!==s.indexOf("application/json")?await r.json():-1!=s.indexOf("text")?await r.text():await r.blob(),{ok:r.ok,status:r.status,statusText:r.statusText,headers:i,data:e,response:r}}catch(e){throw e}finally{if(t){let e=Ue.get(t);e&&(e.timer&&(clearTimeout(e.timer),e.timer=null),Ue.delete(t))}}}function We(e){let t=Ue.get(e);return!!t&&(t.timer&&(clearTimeout(t.timer),t.timer=null),t.controller.abort(),Ue.delete(e),!0)}class Je{constructor(){this.cache=new Map}async get(e,t=-1){if(this.cache.has(e)){return this.cache.get(e)}let r=await Ve({url:e,method:"GET",timeout:t,heaaders:{"content-type":"text/plain"}});if(r.ok)return this.cache.set(e,r.data),r.data;throw Error(r.statusText)}remove(e){this.cache.delete(e)}}var ze,Ge,Xe,Ye,Qe,Ze,et,tt,rt,nt,it,st;(Ge=ze||(ze={}))[Ge.Loading=0]="Loading",Ge[Ge.Loaded=1]="Loaded",Ge[Ge.Defining=2]="Defining",Ge[Ge.Defined=3]="Defined";class ot{}class lt{constructor(){this.register=new Map}get(e){return this.register.get(e)}put(e,t){this.register.set(e,t)}remove(e){let t=this.register.get(e);return this.register.delete(e),t}contains(e){return this.register.has(e)}clear(){this.register.clear()}}(st=it||(it={})).Busy="Busy",st.Free="Free",st.Reject="Reject",st.Exception="Exception",st.Finished="Finished";const at=Symbol("chainKey"),ut=Symbol("cursorKey"),ht=Symbol("$persistentModeKey"),ct=Symbol("statusKey"),ft=Symbol("argsKey"),pt=Symbol("exArgsKey"),dt=Symbol("successFnsKey"),yt=Symbol("errorFnsKey"),mt=Symbol("sessionKey"),gt=Symbol("_go");class vt{constructor(e,t=!1){this[Xe]=[],this[Ye]=0,this[Qe]=!1,this[Ze]=it.Free,this[et]=[],this[tt]=[],this[rt]=[],this[nt]=[],this[mt]=e,this[ht]=t}get session(){return this[mt]}[(Xe=at,Ye=ut,Qe=ht,Ze=ct,et=ft,tt=pt,rt=dt,nt=yt,gt)](e,...t){let r=this[ct];if(this[ct]=it.Busy,this[ut]+=e,this[ut]<0&&(this[ut]=0),this[ft]=t,r===it.Exception||r===it.Reject){let e=[{session:this[mt]},...this[pt]];for(;this[yt].length>0;)try{let t=this[yt].shift();"function"==typeof t&&O((()=>{Reflect.apply(t,{},e)}))}catch(e){console.error(e.message,e)}return this[ct]=r,this[at]=[],this[ut]=0,this}if(r===it.Finished||this[ut]>=this[at].length){let e=[{session:this[mt]},...this[ft]];for(;this[dt].length>0;){let t=this[dt].shift();"function"==typeof t&&O((()=>{Reflect.apply(t,{},e)}))}return this[ct]=it.Free,this}if(this[ut]>=this[at].length)return this[ct]=it.Free,this;let n=this[at][this[ut]];this[ht]||(this[at].splice(0,this[ut]+1),this[ut]=-1);let i=this[ut]+1;try{let e=!1,t={go:(t,...r)=>{e||(e=!0,Reflect.apply(this[gt],this,[t,...r]))},resolve:(...t)=>{e||(e=!0,Reflect.apply(this[gt],this,[1,...t]))},reject:(...t)=>{e||(e=!0,Reflect.apply(this.reject,this,[...t]))},insert:t=>{e||(this[at].splice(i,0,t),i++)},session:this[mt]};O((()=>{Reflect.apply(n,{},[t,...this[ft]])}))}catch(e){this.throw(e)}return this}go(e,...t){return Reflect.apply(this[gt],this,[e,...t])}finish(...e){return this[ct]=it.Finished,this[ft]=e,Reflect.apply(this[gt],this,[0])}reject(...e){return this[ct]=it.Reject,this[pt]=e,Reflect.apply(this[gt],this,[0])}throw(...e){return this[ct]=it.Exception,this[pt]=e,Reflect.apply(this[gt],this,[0])}reset(...e){this[ct]=it.Busy,this[ft]=e,this[at]=[],this[ut]=0;let t=[{session:this[mt]},...this[ft]];for(;this[dt].length>0;){let e=this[dt].shift();O((()=>{Reflect.apply(e,this,t)}))}return this[ct]=it.Free,this}post(e){return this[ct]===it.Reject||this[ct]===it.Exception?this:(Array.isArray(e)?this[at]=[...this[at],...e]:this[at].push(e),this[ct]===it.Busy||Reflect.apply(this[gt],this,[0,...this[ft]]),this)}wait(e,t){return e&&"function"==typeof e&&this[dt].push(e),t&&"function"==typeof t&&this[yt].push(t),this[ct]===it.Busy||Reflect.apply(this[gt],this,[0,...this[ft]]),this}exception(e){return e&&"function"==typeof e&&this[yt].push(e),this[ct]===it.Busy?this:Reflect.apply(this[gt],this,[0,...this[ft]])}isFinish(){return this[ct]==it.Reject||this[ct]==it.Free&&this[ut]>=this[at].length}}class wt{constructor(e={}){this.moduleManager=new lt,this.resource=new Je,this.head=Ie.head||Ie.getElementsByTagName("head")[0]||Ie.documentElement,this.isOldWebKit=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/(\d+).*/,"$1")<536,this.options=e,this.options.paths||(this.options.paths={}),this.options.alias||(this.options.alias={})}set query(e){this._query=e}get query(){return this._query}ensure(...e){let t=[],r=e.length-1,n={};"object"==typeof e[r]&&(Object.assign(n,e[r]),r--);let i=null;"function"==typeof e[r]&&(i=e[r],r--);for(let n=0;n<=r;n++)if(Array.isArray(e[n])){let r=e[n];for(let e=0;e<r.length;e++)void 0!==r[e]&&t.push(this.resolvePath(r[e]))}else{let r=e[n].split(",");for(let e=0;e<r.length;e++)void 0!==r[e]&&t.push(this.resolvePath(r[e]))}let s=new xt(t.length,((e,t)=>{if(s.isOK())try{"function"==typeof i&&Reflect.apply(i,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof i&&Reflect.apply(i,{},[])}catch(e){console.error(e.message,e)}})),o=new vt;for(let e=0;e<t.length;e++){let r=new St(e,t[e],n,s);this.mount(o,r)}return this}remove(...e){let t=[],r=e.length-1,n={};"object"==typeof e[r]&&(Object.assign(n,e[r]),r--);let i=null;"function"==typeof e[r]&&(i=e[r],r--);for(let n=0;n<=r;n++)if(Array.isArray(e[n])){let r=e[n];for(let e=0;e<r.length;e++)void 0!==r[e]&&t.push(this.resolvePath(r[e]))}else{let r=e[n].split(",");for(let e=0;e<r.length;e++)void 0!==r[e]&&t.push(this.resolvePath(r[e]))}return t.forEach((e=>{this.unmount(e,n)})),"function"==typeof i&&Reflect.apply(i,{},[]),this}mount(e,t){if(this.isNaturePath(t.src,"js")){let r=t.params.jsPoint;return r||(r=this.head),void this.mountJS(e,t,r)}if(this.isNaturePath(t.src,"css")){let r=t.params.cssPoint;return r||(r=this.head),void this.mountCSS(e,t,r)}if(this.isNaturePath(t.src,"html")){let r=t.params.htmlPoint;return r||(r=Ie.body),void this.mountHTML(e,t,r)}let r=this.getFileNamePostfix(t.src);if("js"===r||0===r.length){let r=t.params.jsPoint;return r||(r=this.head),void this.mountJS(e,t,r)}if("css"===r){let r=t.params.cssPoint;return r||(r=this.head),void this.mountCSS(e,t,r)}{let r=t.params.htmlPoint;return r||(r=Ie.body),void this.mountHTML(e,t,r)}}mountHTML(e,t,r){e.post((e=>{let n=t.params.timeout??this.options.timeout??3e4,i=t.src;this.resource.get(i,n).then((n=>{r.innerHTML=n,t.progress.work(!0,t.index,n),e.resolve()}),(r=>{console.error(r),t.progress.work(!1,t.index,null),e.reject()}))}))}mountCSS(e,t,r){e.post((e=>{let n=t.src,i=Ie.createElement("link"),s="onload"in i;if(this.isOldWebKit||!s){let n={timeout:this.options.time||3e3,time:0,isOldWebKit:this.isOldWebKit,success:()=>{t.progress.work(!0,t.index,t.src),e.resolve()},error:()=>{try{r.removeChild(i)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((()=>{bt(i,n)}),1)}else i.onload=()=>{i.onload=i.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},i.onerror=()=>{try{r.removeChild(i)}catch(e){console.error(e.message,e)}i.onload=i.onerror=null,t.progress.work(!1,t.index,null),e.reject()};let o=Ie.getElementById(n);o&&o.parentNode&&o.parentNode.removeChild(o),i.rel="stylesheet",i.type="text/css",i.id=n,i.href=n,r.appendChild(i)}))}mountJS(e,t,r){e.post((e=>{let n=t.src,i=this.moduleManager.get(n);if(i&&(i.status==ze.Defined||i.status==ze.Loaded)){if(i.exports)return t.progress.work(!0,t.index,i.exports),void e.resolve();if(document.querySelector(`script[src='${n}`))return t.progress.work(!0,t.index,i.exports),void e.resolve()}i=new ot,i.id=n,i.src=n,i.status=ze.Loading,this.moduleManager.put(n,i);let s=Ie.createElement("script");if("onload"in s)s.onload=()=>{s.onload=s.onerror=null,i.status==ze.Loading&&(i.status=ze.Loaded,t.progress.work(!0,t.index,n)),e.resolve()},s.onerror=()=>{try{r.removeChild(s)}catch(e){console.error(e.message,e)}s.onload=s.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{let r=s;r.onreadystatechange=()=>{/loaded|complete/.test(r.readyState)&&(r.onreadystatechange=null,i.status==ze.Loading&&(i.status=ze.Loaded,t.progress.work(!0,t.index,n)),e.resolve())}}s.defer=!0,s.src=n,Ke.define=this.createDefine(i,t),r.appendChild(s)}))}unmount(e,t={}){let r=this.getFileNamePostfix(e);if("js"===r||0===r.length){let t=Ie.querySelector(`script[src="${e}"]`);return t&&t.parentNode&&t.parentNode.removeChild(t),void this.moduleManager.remove(e)}if("css"!==r){this.resource.remove(e);let r=t.htmlPoint;return r||(r=Ie.body),void(r.innerHTML="")}{let t=Ie.querySelector(`style[href="${e}"]`);t&&t.parentNode&&t.parentNode.removeChild(t)}}trimEmptyElement(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r].trim();0!==n.length&&t.push(n)}return t}createDefine(e,t){let r=this,n=function(...n){let i,s,o;e.status=ze.Defining;let l=n.length;1===l?(o=n[0],i=void 0):2===l?(o=n[1],Array.isArray(n[0])?(s=r.trimEmptyElement(n[0]),i=void 0):s=void 0):(i=n[0],s=r.trimEmptyElement(n[1]),o=n[2]),i&&(e.id=i,r.options.alias[i]=e.src),s&&s.length>0?r.ensure(s,((...r)=>{e.exports="function"==typeof o?Reflect.apply(o,e,r):o,e.status=ze.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof o?Reflect.apply(o,e,[]):o,e.status=ze.Defined,t.progress.work(!0,t.index,e.exports))};return n.amd=!0,n}resolvePath(e){try{if(this.isNaturePath(e,"all"))return e;e=this.parserPath(e,!0);let t=this.getFileNamePostfix(e);t=t.toLowerCase();let r=this.createSearch(this.query);return-1==e.indexOf("?")?("js"!==t&&"css"!==t&&"html"!==t&&(e+=".js"),r.length>0&&(e+=`?${r}`)):r.length>0&&(e+=`&${r}`),e}catch(t){throw console.error(`resolve path[${e}] fail`,t),t}}createSearch(e){let t="";if(e){for(let r in e){let n=`${e[r]}`;t+=`${encodeURIComponent(r)}=${encodeURIComponent(n)}&`}t.length>0&&(t=t.substring(0,t.length-1))}return t}getFileNamePostfix(e){let t=e.lastIndexOf("?");-1==t&&(t=e.length);let r=e.lastIndexOf(".",t);return-1==r?"":e.substring(r+1,t)}isNaturePath(e,t){if(null==this.options.nature)return!1;if("all"===t||"js"===t){let t=this.options.nature.js;if(void 0!==t)for(let r=0;r<t.length;r++){let n=t[r];if(0===e.indexOf(n))return!0}}if("all"===t||"css"===t){let t=this.options.nature.css;if(void 0!==t)for(let r=0;r<t.length;r++){let n=t[r];if(0===e.indexOf(n))return!0}}if("all"===t||"html"===t){let t=this.options.nature.html;if(void 0!==t)for(let r=0;r<t.length;r++){let n=t[r];if(0===e.indexOf(n))return!0}}return!1}parserPath(e,t){if(0==e.indexOf("http://"))return e;if(0==e.indexOf("https://"))return e;if(0==e.indexOf("file:///"))return e;if(0==e.indexOf("/")){return He+e.slice(1)}if(0==e.indexOf("./")){return He+e.slice(2)}if(t){let t=this.options.alias[e];if(!t){let r=e.indexOf("/");if(-1==r)t=e;else{let n=e.slice(0,r),i=this.options.paths[n];t=i?i+e.slice(r):e}}return this.parserPath(t,!1)}return He+e}}function bt(e,t){let r=e.sheet,n=!1;if(t.isOldWebKit)r&&(n=!0);else if(r)try{r.cssRules&&(n=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(n=!0)}setTimeout((()=>{t.time+=20,n?t.success():t.time>t.timeout?t.error():bt(e,t)}),20)}class xt{constructor(e,t){this.size=e,this.callback=t,this.status=!0,this.values=[],this.lastIndex=-1}work(e,t,r){if(this.status=e,!0===this.status&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(r)),0===this.size||!1===this.status)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(e){console.error(e.message,e)}}isOK(){return this.status}}class St{constructor(e,t,r,n){this.index=e,this.src=t,this.params=r,this.progress=n}}const Rt=Symbol("_notifyChange"),At=Symbol("_generateLocation"),Et=Symbol("_setHashRecorder");class Ct{constructor(e,t){this.currentRoute=e,this.routes=t}}class jt{constructor(e="",t=!0,r=!1,n="/"){this.traceless=!1,this.query=e,this.hashMonitor=t,this.traceless=r,this.defaultPath=n}init(){if(!this.hashMonitor)return;if(this.historyChange)return;this.historyChange=()=>{if(!this.hashMonitor)return;let e=Ke.history.state;this[Rt](e)},Le(Ke,"popstate",this.historyChange);let e=this.getHash()||this.defaultPath,t=Ke.sessionStorage.getItem(e);if(t){let e=JSON.parse(t);this[Rt](e)}else{let t,r=e.indexOf("!");t=-1!=r?e.substring(r+1):e;let n=new me;n.path=t,n.query=this.getSearch(),this[Rt]([n])}}destroy(){this.historyChange&&De(Ke,"popstate",this.historyChange)}[Et](e,t){if(this.hashMonitor)try{this.lastHash&&Ke.sessionStorage.removeItem(this.lastHash);let r=JSON.stringify(t);Ke.sessionStorage.setItem(e,r),this.lastHash=e}catch(e){console.error(e.message)}}listen(e){this.changeHandle=e}[Rt](e){"function"==typeof this.changeHandle&&this.changeHandle(e)}go(e){Ke.history.go(e)}push(e){let t=this[At](e.currentRoute);this.traceless||Ke.history.pushState(e.routes,"",t),this[Et](e.currentRoute.fullPath,e.routes)}replace(e){let t=this[At](e.currentRoute);this.traceless||Ke.history.replaceState(e.routes,"",t),this[Et](e.currentRoute.fullPath,e.routes)}[At](e){let t;if(e.query){let r="";if("object"==typeof e.query)for(let t in e.query){let n=encodeURIComponent(e.query[t]),i=`${encodeURIComponent(t)}=${n}`;r.length>0&&(r+="&"),r+=i}else r=e.query;this.query?(t=`${this.query}&${r}`,"?"!==t.charAt(0)&&(t=`?${t}`)):t=`?${r}`}const r=Ke.location;let n;return n=t?`${r.origin}${r.pathname}${t}#${e.fullPath}`:`${r.origin}${r.pathname}#${e.fullPath}`,n}getHash(){let e=Ke.location.hash,t=e.indexOf("#");if(-1!=t){return e.substring(t+1)}return null}getSearch(){return Ke.location.search}}var Tt,Pt,$t,Ot,qt,Ft,kt,_t,Mt,Nt,Kt,It,Lt,Dt,Ht;const Bt=Symbol("_constructRouteModel"),Ut=Symbol("_findRouteModel"),Vt=Symbol("_findRootView"),Wt=Symbol("_getFirstView"),Jt=Symbol("_removeView"),zt=Symbol("_buildPage"),Gt=Symbol("_resolveComponent"),Xt=Symbol("_update"),Yt=Symbol("_merge"),Qt=Symbol("ignoreHistoryChangeOnceKey"),Zt=Symbol("_handleHistoryChange"),er=Symbol("_handleRouteUpdated"),tr=Symbol("routeUpdatedCallback"),rr=Symbol("currentRoutes"),nr=Symbol("current"),ir=Symbol("_addRouteRecorder"),sr=Symbol("_removeRouteRecorder"),or=Symbol("_cloneRouteRecorder"),lr=Symbol("_hanldeError"),ar=Symbol("errorCallback"),ur=Symbol("registerKey"),hr=Symbol("notFoundKey"),cr=Symbol("forestKey"),fr=Symbol("historyKey"),pr=Symbol("beforeFiltersKey"),dr=Symbol("afterFiltersKey"),yr=Symbol("destroyFiltersKey"),mr=Symbol("mainDispatcherKey"),gr=Symbol("initKey"),vr=Symbol("requireKey"),wr=Symbol("_createNextFn"),br=Symbol("_start"),xr=Symbol("_before"),Sr=Symbol("_after"),Rr=Symbol("_destroy"),Ar=Symbol("_load"),Er=Symbol("_unload"),Cr=Symbol("_loadDependency"),jr=Symbol("resolvedModulesKey"),Tr=Symbol("resolveDependencyKey"),Pr=Symbol("routerGuardKey");class $r{constructor(t){this[Tt]=new Array,this[Pt]=new ke,this[$t]=new Array,this[Ot]=null,this[qt]=null,this[Ft]=new Array,this[kt]=new Array,this[_t]=new Array,this[Mt]=new vt,this[Nt]=new Map,this[Kt]=new Me,this[It]=!1,this[Lt]=e(null),this[Dt]=new wt,this[Ht]=!1,this.options=t??{};let r=this.options.routes||[];this.addRoutes(r),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),this[fr]=new jt(this.options.query,this.options.hashMonitor,this.options.traceless,this.options.defaultPath),this[fr]?.listen((e=>{if("string"==typeof e){let t=this[fe](e);t&&this[Zt]([t])}else this[Zt](e)}))}get require(){return this[vr]}get current(){return this[nr].value}[(Tt=ur,Pt=cr,$t=rr,Ot=ar,qt=tr,Ft=pr,kt=dr,_t=yr,Mt=mr,Nt=jr,Kt=Pr,It=gr,Lt=nr,Dt=vr,lr)](e="error",t){if(t&&"function"==typeof t.error)try{t.error(e)}catch(e){}if("function"==typeof this[ar])try{this[ar](e,t)}catch(e){}console.error(e)}init(){!0!==this[gr]&&(this[fr]?.init(),this[gr]=!0)}[(Ht=Qt,Zt)](e){if(this[Qt])this[Qt]=!1;else try{if(!e){let e=[...this[rr]].reverse();return this[Er](e),void Ke.location.reload()}let t=null,r=[],n=[],i=0;for(;i<e.length&&i<this[rr].length&&me.isSame(e[i],this[rr][i]);i++)e[i].opsType===be.Open&&!0===e[i].active&&e[i].active!==this[rr][i].active&&(t=e[i]);if(i<e.length&&(r=e.slice(i)),i<this[rr].length&&(n=this[rr].slice(i).reverse()),0==n.length&&0==r.length)return void(null!==t&&this.restore([t]));if(n.length>0){if(this[Er](n)){if(r.length>0)return void this.restore(r);null!==t&&this.restore([t])}}else this.restore(r)}catch(e){this[lr](e)}}[er](e){if(e)this[nr].value=e;else{let e=this[rr].length;this[nr].value=e>0?this[rr][e-1]:null}if("function"==typeof this[tr])try{this[tr](this[nr].value)}catch(e){}}[ir](e,t=-1){t<0||t>=this[rr].length?this[rr].push(e):this[rr].splice(t,0,e)}[or](){let e=[];for(let t of this[rr]){let r=me.clone(t,!0);e.push(r)}return e}[sr](e){if(null==this[rr])return;let t=-1;for(let r=0;r<this[rr].length;r++)if(me.isSame(this[rr][r],e)){t=r;break}if(-1!=t){let e=this[rr][t];this[rr].splice(t,1),this[Rr](e,e.session)}}set hashMonitor(e){this[fr]&&(this[fr].hashMonitor=e)}get hashMonitor(){return!!this[fr]&&this[fr].hashMonitor}set traceless(e){this[fr]&&(this[fr].traceless=e)}get traceless(){return!!this[fr]&&this[fr].traceless}onRouteUpdated(e){this[tr]=e}onError(e){this[ar]=e}beforeEach(e){this[pr].push(e)}removeBeforeEach(e){let t=this[pr].indexOf(e);return-1!==t&&(this[pr].splice(t,1),!0)}afterEach(e){this[dr].push(e)}removeAfterEach(e){let t=this[dr].indexOf(e);return-1!==t&&(this[dr].splice(t,1),!0)}destroyEach(e){this[yr].push(e)}removeDestroyEach(e){let t=this[yr].indexOf(e);return-1!==t&&(this[yr].splice(t,1),!0)}setResolveDependency(e){this[Tr]=e}addRoutes(e){for(let t of e)this.addRoute(t)}addRoute(e,t=-1){let r=this[Bt](e);if(-1==t)this[ur]=[...this[ur],...r];else for(let e=r.length-1;e>=0;e--)this[ur].splice(t,0,r[e])}removeRoute(e){let t=this[fe](e);if(null===t)return console.warn("route格式错误",e),!1;for(let e=0;e<this[ur].length;e++){let r=this[ur][e];if(t?.path&&r.path===t.path)return this[ur].splice(e,1),!0;if(t?.name&&r.name===t.name)return this[ur].splice(e,1),!0}return!1}hasRoute(e){let t=this[fe](e);return null===t?(console.warn("route格式错误",e),!1):-1!==this[ur].findIndex((e=>!(!t?.path||e.path!==t.path)||(!(!t?.name||e.name!==t.name)||void 0)))}setNotFoundRoute(e){let t=this[Bt](e);this[hr]=t[0]}getRoutes(){return[...this[ur]]}[Bt](e){let t=e.path??"";t.length>0&&"/"!==t.charAt(0)&&(t=`/${t}`);let r=e.components??(e.component&&{"":e.component});if(null==r){let r=new we;return r.path=t,r.redirect=e.redirect,[r]}let n=[];for(let t in r){let i=r[t];0===t.length&&(t="default");let s=new ge(t,i,e.props,e.meta);n.push(s)}let i=!1,s=[];if(e.children)for(let r of e.children){let e=this[Bt](r);for(let r of e){let e=new we;e.name=r.name,r.path&&r.path.length>0?e.path="/"!==t?`${t}${r.path}`:r.path:(i=!0,e.path=t);let o=new ve;o.models=[...n],e.layers=[o,...r.layers],s.push(e)}}if(!i){let r=new ve;r.models=n;let i=new we;i.name=e.name,i.path=t,i.layers=[r],s.splice(0,0,i)}return s}[Ut](e){let t=e.route;try{for(let r of this[ur]){if(t.path&&r.path){let n=r.match;n||(n=r.match=oe(r.path));let i=n(t.path);if(!i)continue;if(r.redirect){let n=new me;C(!0,n,t),n.path=r.redirect;let i={route:n,find:void 0};return!!this[Ut](i)&&(e.route=i.route,e.find=i.find,!0)}if(t.params=t.params??{},C(!0,t.params,i.params),t.query){let e=t.query;if("string"==typeof e){let r={},n=e.split("&");for(let e of n){let t=e.split("=");if(2!==t.length)continue;let n=decodeURIComponent(t[0].trim()),i=decodeURIComponent(t[1].trim());r[n]=i}C(!0,t.params,r)}else"object"==typeof e&&C(!0,t.params,e)}return e.find=r,!0}if(t.name===r.name){t.params=t.params??{};let n=se(r.path);return t.path=n(t.params),e.find=r,!0}}}catch(e){console.error(e.message,e),"function"==typeof t.error&&t.error(e.message)}return!1}[fe](e){let t=null;if(Array.isArray(e))if(t=new me,"object"==typeof e[0])t=me.from(e[0]);else for(let r=0;r<e.length;r++)0===r?"/"===e[r].charAt(0)?t.path=e[r]:t.name=e[r]:1===r?t.params=e[r]:2===r?t.root=e[r]:3===r&&C(!1,t,e[r]);else"object"==typeof e?t=me.from(e):"string"==typeof e&&(t=new me,"/"==e.charAt(0)?t.path=e:t.name=e);if(t){if(t.path){let e=t.path.indexOf("?");-1!==e&&e<t.path.length-1&&(t.query=t.path.substring(e+1),t.path=t.path.substring(0,e))}t.root=t.root??"default",t.opsType=t.opsType??this.options.defaultOperationType??be.Push}return t}push(...e){let t=this[fe](e);return t?(t.opsType=t.opsType||be.Push,this.to(t)):(this[lr]("resolve route fail",t),this)}put(...e){let t=this[fe](e);return t?(t.opsType=be.Put,this.to(t)):(this[lr]("resolve route fail",t),this)}replace(...e){let t=this[fe](e);return t?(t.opsType=be.Replace,this.to(t)):(this[lr]("resolve route fail",t),this)}append(...e){let t=this[fe](e);return t?(t.opsType=be.Append,this.to(t)):(this[lr]("resolve route fail",t),this)}remove(e){return new Promise((t=>{this[mr].post((r=>{try{if(0===this[rr].length)return r.resolve(),void t(!1);let n,i=-1,s=[];if(e){if(e.root)n=e.root;else{n=this[rr][0].root??"default"}if(e.all)for(let e=this[rr].length-1;e>0;e--){let t=this[rr][e];t.opsType===be.Append&&t.root===n&&(s.splice(0,0,t),i=e-1)}else if(e.until)for(let t=this[rr].length-1;t>0;t--){let r=this[rr][t];if(r.opsType===be.Append&&r.root===n){if("/"===e.until.charAt(0)&&e.until===r.path){i=t;break}if(e.until===r.name){i=t;break}s.splice(0,0,r)}}}else{n="default";let e=this[Wt](this[cr]);e&&(n=e.name);for(let e=this[rr].length-1;e>0;e--){let t=this[rr][e];if(t.opsType===be.Append&&t.root===n){s.push(t),i=e-1;break}}}if(0===s.length){let e="can not find route";return console.warn(e),r.resolve(e),void t(!1)}let o=0;if(this[rr].forEach((e=>{e.opsType!==be.Put&&o++})),this[Er](s)){let e=0;this[rr].forEach((t=>{t.opsType!==be.Put&&e++}));let n=o-e;this[Qt]=!0,this.back(n),r.resolve(),t(!0)}}catch(e){this[lr](e),r.resolve(),t(!1)}}))}))}open(...e){let t=this[fe](e);return t?(t.opsType=be.Open,this.to(t)):(this[lr]("resolve route fail",t),this)}close(e){return this[mr].post((t=>{try{let r=this[fe](e);if(!r)return void t.reject("resolve route fail");let n=[];for(let e=0;e<this[rr].length;e++){let t=this[rr][e];if(t.root===r.root){if(r.path&&r.path===t.path){n.push(t);break}if(r.name&&r.name===t.name){n.push(t);break}}}if(0===n.length)return void t.resolve();if(this[Er](n)){let e=me.clone(r,!0);const t=new Ct(e,this[or]());this[fr]?.replace(t),this[er]()}t.resolve()}catch(e){this[lr](e),t.resolve()}})),this}to(...e){let t=this[fe](e);if(!t)return this[lr]("resolve route fail",t),this;let r=this[Pr].acquire(t);return null==r?(this[lr]("route forbid",t),this):(this[mr].post((e=>{try{let n=this[br](t);this[xr](n),!n.session?.routeModel&&this[Tr]&&this[Cr](n),this[Ar](n),this[Sr](n),n.wait(((n,i)=>{let s=n.session.to;try{let e=me.clone(s,!0);const t=new Ct(e,this[or]());s.opsType===be.Replace?this[fr]?.replace(t):this[fr]?.push(t)}catch(e){console.error(e.message,e)}if(this[Pr].release(r),this[er](s),"function"==typeof t.success)try{Reflect.apply(t.success,{},[])}catch(e){console.error(e.message,e)}e.resolve()}),((n,i)=>{this[Pr].release(r),this[lr](i,t),e.resolve()}))}catch(n){this[Pr].release(r),this[lr](n,t),e.resolve()}})),this)}back(e=1){this[fr]?.go(-e)}[wr](e){return(t,r)=>{if("boolean"==typeof t)t?e.resolve():e.reject(r);else if(t){let r=this[fe](t);if(r){let t=e.session.to;r.success=t.success,r.error=t.error,e.session.to=r,e.session.routeModel=null,e.resolve()}else e.reject("route resolve fail")}else e.resolve()}}[br](e){let t=this[rr].length>0?this[rr][0]:void 0,r=new ye(e,t),n={route:e,find:null};return this[Ut](n),n.find&&(r.routeModel=n.find,e.matched=function(e){let t=[];return e.layers.forEach((e=>{null!=e.models&&null!=e.models&&e.models.forEach((e=>{if(null!=e&&null!=e)if("object"==typeof e.meta){let r=C(!0,{},e.meta);t.push(r)}else e.meta&&t.push(e.meta)}))})),t}(n.find),Array.isArray(e.matched)&&e.matched.length>0&&(e.meta=n.find.layers[0].models[0].meta)),new vt(r)}[xr](e){for(let t of this[pr])e.post((e=>{let r=this[wr](e);Reflect.apply(t,{},[e.session.to,e.session.from,r,e.session])}))}[Sr](e){e.post((e=>{for(let t of this[dr])try{Reflect.apply(t,{},[e.session.to,e.session.from,e.session])}catch(e){console.error(e.message,e)}e.resolve()}))}[Rr](e,t){for(let r of this[yr])try{Reflect.apply(r,{},[e,t])}catch(e){console.error(e.message,e)}"function"==typeof e.destroy&&Reflect.apply(e.destroy,e,[])}[Cr](e){let t=e.session,r=Reflect.apply(this[Tr],this,[t?.to]);if(null==r)return;Array.isArray(r)||(r=[r]);let n=[];for(let e of r)this[jr].has(e)||n.push(e);0!==n.length&&e.post((e=>{this[vr].ensure(n,((...t)=>{if(t){for(let e of t){if(!e)continue;let t;t=A(e)?e.default:e,Array.isArray(t)&&this.addRoutes(t)}for(let e of n)this[jr].set(e,!0);e.resolve()}else e.reject()}))}))}[Ar](e){e.post((e=>{let t=e.session.to,r=e.session.routeModel;if(null==r){let n={route:t,find:null};if(this[Ut](n))r=n.find,e.session.routeModel=r;else{if(!this[hr])return void e.reject(`not find route model, path:${t.path??t.name}`);r=this[hr]}}let n=ye.from(e.session);this[zt](t,r,n).then((t=>{this[cr],e.resolve()}),(t=>{e.reject(t)}))}))}[Er](e){if(0==e.length)return!0;let t=this[cr],r=[];for(let n of e){let e=this[Vt](t,n);null!=e&&r.push({...e,route:n})}if(0==r.length){let e="can not find view index";return this[lr](e),!1}for(let e of r.reverse())this[Jt](t,{x:e.x,y:e.y},[e.route.index??0],!0);return!0}[Vt](e,t){let r,n=t.root??"default";for(let t=0;t<e.layers.length;t++){let i=e.layers[t];for(let e=i.views.length-1;e>=0;e--){let s=i.views[e];if(s[Ce]&&s[Pe]===n)return r={x:e,y:t},r}}return null}[Wt](e){if(e.layers.length>0&&e.layers[0].views.length>0){return e.layers[0].views[0]}return null}[Jt](e,t,r=null,n=!0){if(t.y>=e.layers.length)return;if(t.x>=e.layers[t.y].views.length)return;let i=e.layers[t.y].views[t.x],s=!1,o=[],l=!1,a=i.slots.value;for(let e=a.length-1;e>=0;e--){let n=a[e];null!=r&&-1==r.indexOf(n.index)||(n.route&&i[Ce]&&(this[sr](n.route),!0===n.active&&n.route.opsType==be.Append&&(l=!0)),o.push(new qe(i,n.index,t.y)),a.splice(e,1))}if(0==a.length)n?i.slots.value=[...a]:e.layers[t.y].views.splice(t.x,1);else{if(l){let e=a[a.length-1];e.active=!0,e.route&&(e.route.active=e.active)}i.slots.value=[...a]}0==e.layers[t.y].views.length&&(s=!0);let u=t.y+1;for(;u<e.layers.length;u++){let t=e.layers[u].views,r=[];for(let n=t.length-1;(s||o.length>0)&&n>=0;n--){let i=t[n];if(i[Te]&&(s||qe.include(o,i[Te]))){let t=i.slots.value;for(let e=t.length-1;e>=0;e--){let n=t[e];n.route&&i[Ce]&&this[sr](n.route),r.push(new qe(i,n.index,u)),t.splice(e,1)}e.layers[u].views.splice(n,1)}}o=r,0==e.layers[u].views.length&&(s=!0)}}restore(e){if(e&&0!=this[ur].length){return new Promise(((t,r)=>{for(let t=0;t<e.length;t++){let r=e[t];this[mr].post((e=>{let t=this[br](r);this[xr](t),!t.session?.routeModel&&this[Tr]&&this[Cr](t),this[Ar](t),this[Sr](t),t.wait(((t,r)=>{e.resolve()}),((t,r)=>{this[lr](r),e.resolve()}))}))}this[mr].post((e=>{e.resolve(),t()}))}))}{let e=this[cr];if(e.layers.length>0){let t=e.layers[0].views;t.length>0&&(t[0].slots.value=[])}return this[rr]=[],this[er](),Promise.resolve()}}[zt](e,t,r){let n=e.updateType??Se.Part;return this[Gt](t).then((()=>{this[Xt](t,e,r,n)}))}[Gt](e){let t=[];for(let r=0;r<e.layers.length;r++){let n=e.layers[r];for(let e=0;e<n.models.length;e++){let r=n.models[e];r.isResolved||t.push(r.resolve())}}return t.length>0?Promise.all(t):Promise.resolve()}[Xt](e,t,r,n){if(1!==e.layers[0].models.length)return Promise.reject("illegal route structure(multil root node)");const i=e.layers[0].models[0];let s,o,l=this[cr],a=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(l),u=t.root??"default";a||n!=Se.Part||(s=this[Vt](l,t));let h=0;if(null==s||null==s)if(a||n===Se.All){if(0==l.layers[0].views.length){let e=t.root??"default";o=new Oe(e,!0,null),l.layers[0].views=[o]}else o=l.layers[0].views[0];s={x:0,y:0}}else{let e=t.slot;if(!e)return Promise.reject("can not rebuild view(because not route slot)");let r,n=e.level;if(n>l.layers.length)return Promise.reject("can not insert view(override level)");if(e.rootName){let t=l.layers[n-1];for(let i of t.views){if(i[Ce]&&i.name===e.rootName){r=new qe(i,e.rootIndex??0,n-1);break}if(i[je]&&i[je].view.name===e.rootName&&i[je].index===e.rootIndex){r=i[je];break}}}if(!r)return Promise.reject("can not insert view(not find root node ref)");o=new Oe(u,!0,r),l.layers[n].views.push(o),s={x:l.layers[n].views.length-1,y:n}}else o=l.layers[s.y].views[s.x];if(h=s.y,o[Ce]=!0,t.opsType===be.Append){t.index=P.get();let r=o.slots.value;if(r.length>0){let e=r[r.length-1];e.active=!1,e.route&&(e.route.active=e.active)}let n=new $e(t,i,t.index,!0);o.slots.value=[...r,n];let s=h+1,a=1,u=new qe(o,t.index,h);this[Yt](l,s,e,a,u)}else if(t.opsType===be.Open){let r=o.slots.value,n=!1;for(let e of r){if(null!==e.route&&me.isSameForRouteModel(e.route,t)){if(1==e.active)return t.index=e.index,t.active=e.active,e.route=t,Promise.resolve();e.active=!0,n=!0,t.index=e.index,t.active=e.active,e.route=t,this[sr](e.route)}else e.active=!1;e.route&&(e.route.active=e.active)}if(!n){t.index=P.get(),t.active=!0;let n=new $e(t,i,t.index,!0);r.push(n);let s=h+1,a=1,u=new qe(o,t.index,h);this[Yt](l,s,e,a,u)}o.slots.value=[...r]}else{let r=o.slots.value;if(0==r.length){t.index=P.get(),o.slots.value=[new $e(t,i,t.index)];let r=h+1,n=1,s=new qe(o,t.index,h);this[Yt](l,r,e,n,s)}else{let n=r[0];if(n.model!==i){this[Jt](l,s,null,!0),t.index=P.get(),o.slots.value=[new $e(t,i,t.index)];let r=h+1,n=1,a=new qe(o,t.index,h);this[Yt](l,r,e,n,a)}else{null!==n.route&&this[sr](n.route);let i=[];for(let e=1;e<r.length;e++)i.push(r[e].index);i.length>0&&this[Jt](l,s,i,!0),t.index=n.index,n.route=t;let a=[new qe(o,t.index,h)],u=h+1,c=1,f=new qe(o,t.index,h);for(;a.length>0&&u<l.layers.length&&c<e.layers.length;u++,c++){let t=[];for(let e=0;e<l.layers[u].views.length;e++){let r=l.layers[u].views[e];r[Te]&&qe.include(a,r[Te])&&t.unshift(e)}let r=[];for(let n of t){let t,i=l.layers[u].views[n],s=e.layers[c].models;for(let e=0;e<s.length;e++)if(i.name===s[e].name){t=s[e];break}if(t){let s=i.slots.value;if(0==s.length){let r=0;i.slots.value=[new $e(null,t,r)];let n=u+1,s=c+1;this[Yt](l,n,e,s,f)}else{let o=s[0];if(o.model!==t){this[Jt](l,{x:n,y:u},null,!0),i.slots.value=[new $e(null,t,0)];let r=u+1,s=c+1;this[Yt](l,r,e,s,f)}else{i[Ce]&&null!==o.route&&this[sr](o.route);let e=[];for(let t=1;t<s.length;t++)e.push(s[t].index);e.length>0&&this[Jt](l,{x:n,y:u},e,!0),r.push(new qe(i,o.index,u))}}i[Ce]=!1}else this[Jt](l,{x:n,y:u},null,!1)}a=r}this[Yt](l,u,e,c,f)}}}if(o&&o[je]){let e=o[je];e&&(t.slot=new de(u,h,e?.view.name,e?.index??0))}r.to=void 0,r.routeModel=void 0,t.session=r,this[ir](t)}[Yt](e,t,r,n,i){let s=n,o=t;for(;o<e.layers.length&&s<r.layers.length;o++,s++){let t=e.layers[o].views;for(let e of r.layers[s].models){let r=new Oe(e.name,!1,i),n=new $e(null,e);r.slots.value=[n],t.push(r)}}for(;s<r.layers.length;s++){let t=new Fe;t.views=[];for(let e of r.layers[s].models){let r=new Oe(e.name,!1,i),n=new $e(null,e);r.slots.value=[n],t.views.push(r)}e.layers.push(t)}}[ce](e,t,r,n,i,s){if(t<0||t>this[cr].layers.length)return null;if(t<this[cr].layers.length){let o=this[cr].layers[t],l=null;for(let a of o.views){let o=!1;if(null!==r?(o=a.name===e&&a[je]?.view===r,o&&-1!==n&&(o=a[je]?.index===n)):o=a.name===e,o){null!==i&&(a[Te]={view:i,index:s,level:t-1}),l=a;break}}if(null!==l)return l}let o=null,l=null;null!==i&&(o=i[Ce]?{view:i,index:s,level:t-1}:i[je],l={view:i,index:s,level:t-1});let a=new Oe(e,!0,o);if(a[Te]=l,t==this[cr].layers.length){let e=new Fe;e.views=[a],this[cr].layers.push(e)}else this[cr].layers[t].views.push(a);return a}}var Or,qr,Fr;(Fr=qr||(qr={}))[Fr.limitless=0]="limitless",Fr[Fr.once=1]="once";const kr=Symbol("registerKey");class _r{constructor(e,t){this.callback=e,this.policy=t}}class Mr{constructor(){this[Or]=new Map}on(e,t,r=!1){let n=this[kr].get(e);n||(n=new Array,this[kr].set(e,n));let i=new _r(t,!0===r?1:0);return n.push(i),this}off(e,t){if(!t)return this[kr].delete(e),this;let r=this[kr].get(e);if(r)for(let e=0;e<r.length;e++){if(r[e].callback===t){r.splice(e,1);break}}return this}bind(e,t,r=!1){return this.on(e,t,r)}unbind(e,t){return this.off(e,t)}once(e,t){return this.on(e,t,!0)}all(...e){let t=e.length;if(t<1)return this;let r=e[t-1];if("function"!=typeof r)return console.error("callback can not benn empty"),this;let n=t-1,i=new Array(n),s=[].splice.call(e,0,n);for(let e=0;e<s.length;e++)this.once(s[e],(t=>{i[e]=t,n-=1,0==n&&Reflect.apply(r,{},i)}));return this}emit(e,...t){let r=this[kr].get(e);if(!r)return this;for(let e=0;e<r.length;){let n=r[e];if(1==n.policy?r.splice(e,1):e++,"function"==typeof n.callback)try{O((()=>{Reflect.apply(n.callback,{},t)}))}catch(e){console.error(e.message,e)}}return this}trigger(e,...t){return Reflect.apply(this.emit,this,[e,...t])}}var Nr;Or=kr;const Kr=Symbol("registerKey");class Ir{constructor(){this[Nr]=new Map}set(e,t){this[Kr].set(e,t)}get(e){return this[Kr].get(e)}has(e){return this[Kr].has(e)}delete(e){return this[Kr].delete(e)}}Nr=Kr;const Lr=Symbol("lc");function Dr(e,t=!1){let r=e,n=r[Lr];if(!n){if(!t)return null;n=new Ir,r[Lr]=n}return n}function Hr(e,t){let r=e;for(;null!==r;){let e=r[Lr];if(e&&e.has(t))return e.get(t);r=r.$parent}return null}function Br(e){if(Array.isArray(e.children)&&e.children.length>0){let t=e.children[0];if(null!=t&&null!=t.component&&null!=t.component.proxy)return Dr(t.component.proxy,!1)}return null}const Ur=Symbol("hooksKey");function Vr(e,t){let r=e.get(Ur);if(null!=r)for(let e=r.length-1;e>=0;e--){let n=r[e];if(n.type===t)try{Reflect.apply(n.hook,n.target,[])}catch(e){console.error(e.message,e)}}}var Wr,Jr;(Jr=Wr||(Wr={})).DEACTIVATED="da",Jr.ACTIVATED="a";class zr{constructor(e,t,r){this.target=r,this.hook=t,this.type=e}}function Gr(e){return(t,r)=>{let n;if(r)n=r;else{let e=i();if(null==e||null==e.proxy)return void console.error("can not get currrent instance or proxy");n=e.proxy}let o=Hr(n,Ur);null!=o?(s((()=>{!function(e,t,r,n){let i=-1;for(let s=0;s<e.length;s++){let o=e[s];if(o.type===t&&o.hook===r&&o.target===n){i=s;break}}-1!=i&&e.splice(i,1)}(o,e,t,n)})),function(e,t,r,n){let i=new zr(t,r,n);e.push(i)}(o,e,t,n)):console.warn("can not get hooks context")}}let Xr=Gr(Wr.ACTIVATED),Yr=Gr(Wr.DEACTIVATED);const Qr=Symbol("routeKey");function Zr(e,t){let r=e.get(Qr);if(r){let e={path:"",name:"",params:{},index:-1,session:{}};Object.assign(e,t),Object.assign(r,e)}else r=function(){let e=new me;return e.path="",e.name="",e.params={},e.index=-1,o(e)}(),Object.assign(r,t),e.set(Qr,r)}function en(e){let t=Hr(e,Qr);return null!=t?t:null}const tn=Symbol("rk"),rn=Symbol("vd"),nn=Symbol("rv"),sn=Symbol("rvi"),on=Symbol("pv"),ln=Symbol("pvi");function an(e,t=!1){let r=null;return r=t?e.showFromClass??e.enterFromClass:e.enterFromClass,r||(r=e.transitionName,r?t?`${r}-show-from`:`${r}-enter-from`:null)}function un(e,t=!1){let r=null;return r=t?e.showActiveClass??e.enterActiveClass:e.enterActiveClass,r||(r=e.transitionName,r?t?`${r}-show-active`:`${r}-enter-active`:null)}function hn(e){let t,r=e.duration;return"object"==typeof r?t={enter:r.enter??-1,leave:r.leave??-1,show:r.show??-1,hide:r.hide??-1}:("string"==typeof r&&(r=0==r.length?-1:Number(r)),t={enter:r,leave:r,show:r,hide:r}),t}function cn(e,t){e.classList.contains(t)||e.classList.add(t)}function fn(e,t){e.classList.remove(t)}const pn=Ne&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;function dn(e){pn(e)}function yn(e,t,...r){y(t)&&(null==e&&(e={}),Reflect.apply(t,e,r))}function mn(e,t,r,n=-1,i,s,o,l){if(y(s)){if(void 0!==i&&i>=0)return void setTimeout((()=>{Reflect.apply(s,e,[t,r,n]),y(l)&&Reflect.apply(l,e,[])}),i);let o=["animationend","transitionend"],a=i=>{o.forEach((e=>{De(t,e,a)})),Reflect.apply(s,e,[t,r,n]),l&&Reflect.apply(l,e,[])};o.forEach((e=>{Le(t,e,a)}))}if(y(o)){let i="animationcancel",s=l=>{Reflect.apply(o,e,[t,r,n]),De(t,i,s)};Le(t,i,s)}}function gn(e){return null!==e&&(e.opsType===be.Append||e.opsType===be.Open)}function vn(e,t,r,n,i={},s,o=-1){if(t&&(r||gn(s))){let e=an(i,r);e&&cn(n,e);let t=un(i,r);t&&cn(n,t)}else{yn(e,function(e,t=!1){let r=null;return r=t?e.onBeforeShow??e.onBeforeEnter:e.onBeforeEnter,r}(i,r),[n,s,o])}}function wn(e,t,r,n,i={},s,o,l,a){if(gn(o)||r)if(t){let t=an(i,r),u=un(i,r),h=function(e,t=!1){let r=null;return r=t?e.showToClass??e.enterToClass:e.enterToClass,r||(r=e.transitionName,r?t?`${r}-show-to`:`${r}-enter-to`:null)}(i,r);dn(h?()=>{mn(e,n,o,l,s,(()=>{u&&fn(n,u),h&&fn(n,h),y(a)&&a(e,a,[n])})),t&&fn(n,t),h&&cn(n,h)}:()=>{t&&fn(n,t),u&&fn(n,u),y(a)&&a(e,a,[n])})}else{let t=function(e,t=!1){let r=null;return r=t?e.onShow??e.onEnter:e.onEnter,r}(i,r),s=function(e,t=!1){let r=null;return r=t?e.onAfterShow??e.onAfterEnter:e.onAfterEnter,r}(i,r),u=function(e,t=!1){let r=null;return r=t?e.onShowCancelled??e.onEnterCancelled:e.onEnterCancelled,r}(i,r),h=t=>{!t&&y(s)?yn(e,s,[n,o,l]):y(u)&&yn(e,u,[n,o,l]),y(a)&&a(e,a,[n])};y(t)?yn(e,t,[n,h,o,l]):h()}else y(a)&&a(e,a,[n])}function bn(e,t,r,n,i={},s,o,l,a,u){if(gn(l)||r)if(t){let t=function(e,t=!1){let r=null;return r=t?e.hideFromClass??e.leaveFromClass:e.leaveFromClass,r||(r=e.transitionName,r?t?`${r}-hide-from`:`${r}-leave-from`:null)}(i,r),h=function(e,t=!1){let r=null;return r=t?e.hideActiveClass??e.leaveActiveClass:e.leaveActiveClass,r||(r=e.transitionName,r?t?`${r}-hide-active`:`${r}-leave-active`:null)}(i,r),c=function(e,t=!1){let r=null;return r=t?e.hideToClass??e.leaveToClass:e.leaveToClass,r||(r=e.transitionName,r?t?`${r}-hide-to`:`${r}-leave-to`:null)}(i,r);t&&cn(n,t),h&&cn(n,h),dn(c?()=>{mn(e,n,l,a,s,(()=>{h&&fn(n,h),c&&fn(n,c),y(u)&&yn(e,u,[n]),!r&&y(o)&&o()})),t&&fn(n,t),c&&cn(n,c)}:()=>{t&&fn(n,t),h&&fn(n,h),y(u)&&yn(e,u,[n]),!r&&y(o)&&o()})}else{let t=function(e,t=!1){let r=null;return r=t?e.onHide??e.onLeave:e.onLeave,r}(i,r),s=function(e,t=!1){let r=null;return r=t?e.onAfterHide??e.onAfterLeave:e.onAfterLeave,r}(i,r),h=function(e,t=!1){let r=null;return r=t?e.onHideCancelled??e.onLeaveCancelled:e.onLeaveCancelled,r}(i,r),c=t=>{!t&&y(s)?(yn(e,s,[n,l,a]),y(u)&&yn(e,u,[n]),!r&&y(o)&&o()):y(h)&&(yn(e,h,[n,l,a]),y(u)&&yn(e,u,[n]))};y(t)?yn(e,t,[n,c,l,a]):c()}else!r&&y(o)&&o()}function xn(e,t={},r,n=-1){let i=q(t.css),s=t.mode??"default",o=hn(t);return{mode:s,persisted:!1,beforeEnter:s=>{vn(e,i,!1,s,t,r,n)},enter:s=>{wn(e,i,!1,s,t,o.enter,r,n)},leave:(s,l)=>{bn(e,i,!1,s,t,o.leave,l,r,n)},clone:i=>xn(e,t,r,n)}}function Sn(e){return e.el}function Rn(e,t,r={},n,i,s,o){if(s){let s=Sn(t);if(null==s)return;let l=q(r.css),a=hn(r);vn(e,l,!0,s,r,n,i),wn(e,l,!0,s,r,a.show,n,i,(t=>{y(o)&&yn(e,o,[t])}))}else y(o)&&yn(e,o,[])}function An(e,t,r={},n,i,s,o){if(s){let s=Sn(t);if(null==s)return;let l=q(r.css),a=hn(r);bn(e,l,!0,s,r,a.hide,null,n,i,(t=>{y(o)&&yn(e,o,[t])}))}else y(o)&&yn(e,o,[])}function En(e,t,r){return"function"==typeof e?Reflect.apply(e,{},[t,r]):e}class Cn{constructor(e,t){this.node=e,this.state=t}}let jn=l({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,required:!1,default:"default"},modelSlot:{type:[Object],required:!1},multi:{type:Boolean,required:!1,default:!1},tag:{type:[String,Object,Function],required:!1,default:"div"},viewTag:{type:[String,Object,Function],required:!1,default:"div"},viewTagProps:{type:[Object,Function],required:!1,default:()=>({})},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewDeactiveClass:{type:[String,Function],required:!1},css:{type:[Boolean,String],required:!1,default:!0},transition:{type:[Boolean,String],required:!1,default:!1},transitionName:{type:String,required:!1},enterFromClass:{type:String,required:!1},enterActiveClass:{type:String,required:!1},enterToClass:{type:String,required:!1},leaveFromClass:{type:String,required:!1},leaveActiveClass:{type:String,required:!1},leaveToClass:{type:String,required:!1},showFromClass:{type:String,required:!1},showActiveClass:{type:String,required:!1},showToClass:{type:String,required:!1},hideFromClass:{type:String,required:!1},hideActiveClass:{type:String,required:!1},hideToClass:{type:String,required:!1},onBeforeEnter:{type:Function,required:!1},onEnter:{type:Function,required:!1},onAfterEnter:{type:Function,required:!1},onEnterCancelled:{type:Function,required:!1},onBeforeLeave:{type:Function,required:!1},onLeave:{type:Function,required:!1},onAfterLeave:{type:Function,required:!1},onLeaveCancelled:{type:Function,required:!1},onBeforeShow:{type:Function,required:!1},onShow:{type:Function,required:!1},onAfterShow:{type:Function,required:!1},onShowCancelled:{type:Function,required:!1},onBeforeHide:{type:Function,required:!1},onHide:{type:Function,required:!1},onAfterHide:{type:Function,required:!1},onHideCancelled:{type:Function,required:!1}},setup(e,t){let r=i();if(null===r||null===r.proxy)return void console.error("instance or instance.proxy not exist");const n=!0===e.multi,o=a(tn,null),l=a(rn,0),c=a(nn,null),f=a(sn,-1);let p=!1,d=null;const y=e.modelSlot;if(y){u(rn,l+1),u(sn,y.index),u(ln,y.index);let e=y.route;if(!e)return void console.warn("child view render error, route not exist");let t=Dr(r.proxy,!0);!function(e){let t=e.get(Ur);t||(t=[],e.set(Ur,t))}(t),Zr(t,e)}else{if(null==o)return void console.error("router is not been injected");let t=e.name,i=a(on,null),s=a(ln,0);if(d=o[ce](t,l,c,f,i,s),null===d)return;u(on,d);if(!0===d[Ce]&&u(nn,d),n)p=q(e.transition??!0);else{p=q(e.transition??!1),u(sn,-1),u(rn,l+1),u(ln,-1);let t=d.slots.value;if(t.length>0){let e=t[0].route;if(e){Zr(Dr(r.proxy,!0),e)}}else{let e=Dr(r.proxy,!0);d.compensation=()=>{let t=d.slots.value;if(t.length>0){let r=t[0].route;return r&&Zr(e,r),!0}return!1}}}}let m=new Map;return s((()=>{m&&m.clear()})),()=>{if(n){let n=new Map,i=[],s=d?.slots.value,o=[];for(let t=0;t<s.length;t++){let l=s[t],a=`${e.name}-${l.index}`,u=h(jn,{modelSlot:l}),c={},f=En(e.viewClass,l.route,t);"string"==typeof f&&f.length>0&&(c[f]=!0);let d=En(e.viewActiveClass,l.route,t),y=En(e.viewDeactiveClass,l.route,t),g=m.get(a);if("string"==typeof d&&d.length>0&&(c[d]=l.active),"string"==typeof y&&y.length>0&&(c[y]=!l.active),g&&l.active!==g.state){let n=g.node;l.active?o.unshift((()=>{Rn(r,n,e,l.route,t,p,(()=>{let e=Br(n);null!=e&&Vr(e,Wr.ACTIVATED)}))})):o.push((()=>{An(r,n,e,l.route,t,p,(()=>{let e=Br(n);null!=e&&Vr(e,Wr.DEACTIVATED)}))}))}let v={class:c,key:a},w=En(e.viewTagProps,l.route,t);null!==w&&"object"==typeof w&&C(!0,v,w),l.route?.viewTagAttrs&&"object"==typeof l.route?.viewTagAttrs&&C(!0,v,l.route.viewTagAttrs);let b=En(e.viewTag,l.route,t),x=h(b,v,{default:()=>[u]});if(n.set(a,new Cn(x,l.active)),p){let n=xn(r,e,l.route,t);x.transition=n}i.push(x)}m=n,function(e,t={}){dn((()=>{for(let r=0;r<e.length;r++)Reflect.apply(e[r],t,[])}))}(o,r);let l=En(e.tag,null,-1),a={};return Object.assign(a,t.attrs),h(l,a,{default:()=>i})}if(null!=y){let e=y.model,t={};return e.props&&("object"==typeof e.props?C(!1,t,e.props):!0===e.props&&"object"==typeof y.route?.params&&C(!1,t,y.route?.params)),h(e.component,t)}{let t=d.slots.value;if(t.length>0){let n=t[0],i=n.model,s={};i.props&&("object"==typeof i.props?C(!1,s,i.props):!0===i.props&&"object"==typeof n.route?.params&&C(!1,s,n.route?.params));let o=h(i.component,s);if(p){let t=xn(r,e,n.route,-1);o.transition=t}return o}}}}});function Tn(e,t){return"function"==typeof e?Reflect.apply(e,{},[t]):e}let Pn=l({name:"RouterLink",inheritAttrs:!1,props:{tag:{type:[String,Object,Function],required:!1,default:"a"},to:{type:[String,Object,Function],required:!0},activeClass:{type:[String,Function],required:!1,default:"fox-router-link-active"},exact:{type:[String,Boolean,Function],required:!1},exactActiveClass:{type:[String,Function],required:!1,default:"fox-router-link-exact-active"},event:{type:[String,Function],required:!1,default:"onClick"}},setup(e,t){const r=a(tn,null);return()=>{let n=Tn(e.to,null),i=Tn(e.tag,n);if(null==i)return void console.warn("can not resolve link tag");let s=null,o=null;null!==r&&(s=r[fe](n),o=r.current);let l={},a=Tn(e.activeClass,s);if("string"==typeof a&&a.length>0&&(l[a]=function(e,t){return!!(null!=e&&null!=t&&(e.path&&t.path&&t.path.startsWith(e.path)||e.name&&e.name==t.name))}(s,o)),!0===Tn(e.exact,s)){let t=Tn(e.exactActiveClass,s);"string"==typeof t&&t.length>0&&(l[t]=function(e,t){return!!(null!=e&&null!=t&&(e===t||e.path&&e.path===t.path||e.name&&e.name===t.name))}(s,o))}let u={class:l};C(!0,u,t.attrs);let c=Tn(e.event,s);if("string"==typeof c){const e=e=>{null!=r?null!=s?function(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||null!=e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}(e)&&r.to(s):console.warn("route is not been resolved"):console.warn("router is not been injectd")};u[c]=e}return h(i,u,t.slots)}}}),$n={get each(){return L},get type(){return _},get isFunction(){return y},get isArray(){return c},get isArrayLike(){return N},get makeArray(){return I},get merge(){return K},get isWindow(){return M},get isPlainObject(){return S},get isEqual(){return D}};const On=Symbol("fk"),qn=Symbol("fbk"),Fn=Symbol("fepk");function kn(e={}){const t=new $r(e),r=new ne,n=new Mr,i={...$n,get router(){return t},get bus(){return r},get Bus(){return ne},get eventproxy(){return n},get EventProxy(){return Mr},get EventChain(){return vt},get require(){return t.require},get request(){return Ve},get extend(){return C},get clone(){return j},install(e){e.provide(tn,t),e.provide(On,i),e.provide(qn,r),e.provide(Fn,n),e.component("fox-router-view",jn),e.component("fox-router-link",Pn),Reflect.defineProperty(e.config.globalProperties,"$fox",{get:()=>i}),Reflect.defineProperty(e.config.globalProperties,"$router",{get:()=>t}),Reflect.defineProperty(e.config.globalProperties,"$bus",{get:()=>r}),Reflect.defineProperty(e.config.globalProperties,"$bus",{get:()=>r}),Reflect.defineProperty(e.config.globalProperties,"$eventProxy",{get:()=>n}),e.config.globalProperties.$fox_on=function(e,t,r=!1){n.on(e,t,r)},e.config.globalProperties.$fox_off=function(e,t){n.off(e,t)},e.config.globalProperties.$fox_once=function(e,t){n.once(e,t)},e.config.globalProperties.$fox_all=function(...e){let t=n;Reflect.apply(t.all,t,e)},e.config.globalProperties.$fox_trigger=function(e,...t){let r=n;Reflect.apply(r.trigger,r,[e,...t])},e.config.globalProperties.$fox_emit=function(e,...t){let r=n;Reflect.apply(r.trigger,r,[e,...t])},e.mixin({computed:{$route(){return en(this)}},created(){t.init()}})}};return i}function _n(e){if(e){return e.$router}return a(tn)}function Mn(e){if(!e){e=i()?.proxy??void 0}return e?en(e):null}function Nn(e){if(e){return e.$fox}return a(On)}function Kn(e){if(e){return e.$bus}return a(qn)}function In(e){if(e){return e.$eventProxy}return a(Fn)}function Ln(e){const t=_n(),r=(t,r,n)=>{try{Reflect.apply(e,{},[t,r])}catch(e){console.error(e)}n()};t.beforeEach(r),s((()=>{t.removeBeforeEach(r)}))}function Dn(e){const t=_n(),r=(t,r,n)=>{try{Reflect.apply(e,{},[t,r])}catch(e){console.error(e)}n()};t.afterEach(r),s((()=>{t.removeAfterEach(r)}))}export{ne as Bus,vt as EventChain,Mr as EventProxy,me as Route,$r as Router,We as cancel,j as clone,kn as createFox,C as extend,qn as foxBusKey,Fn as foxEventProxyKey,On as foxKey,c as isArray,d as isDate,A as isESModule,D as isEqual,y as isFunction,f as isMap,v as isObject,S as isPlainObject,w as isPromise,p as isSet,m as isString,g as isSymbol,Dn as onAfterRouteUpdate,Ln as onBeforeRouteUpdate,Xr as onFoxActivated,Yr as onFoxDeactivated,Ve as request,q as toBoolean,F as toNumber,x as toTypeString,Kn as useBus,In as useEventProxy,Nn as useFox,Mn as useRoute,_n as useRouter};
1
+ import{ref as e,effectScope as t,watch as r,shallowRef as n,getCurrentInstance as o,onUnmounted as s,shallowReactive as i,defineComponent as l,inject as a,provide as u,h as c}from"vue";const h=Array.isArray,f=e=>"[object Map]"===x(e),p=e=>"[object Set]"===x(e),d=e=>e instanceof Date,y=e=>"function"==typeof e,m=e=>"string"==typeof e,g=e=>"symbol"==typeof e,v=e=>null!==e&&"object"==typeof e,b=e=>v(e)&&y(e.then)&&y(e.catch),w=Object.prototype.toString,x=e=>w.call(e),S=e=>"[object Object]"===x(e),R="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function A(e){return e.__esModule||R&&"Module"===e[Symbol.toStringTag]}const C="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]");function E(...e){let t=void 0!==e[0]&&null!==e[0]?e[0]:{},r=1,n=e.length,o=!1;for("boolean"==typeof t&&(o=t,t=e[r]??{},r++),"object"!=typeof t&&(t={});r<n;r++)if(null!==e[r]&&void 0!==e[r]){let n=e[r];for(let e in n){let r=t[e],s=n[e];if(r!==s)if(!0===o&&s&&"object"==typeof s){let n;n=Array.isArray(s)?r&&Array.isArray(r)?r:[]:r&&"object"==typeof r?r:{},t[e]=E(o,n,s)}else void 0!==s&&(t[e]=s)}}return t}function j(e,t,r=!1){if(r){if("object"!=typeof t)return{};"object"!=typeof e&&(e={});for(let n in t){let o=e[n],s=t[n];if(o!==s)if("object"==typeof s){if(!Array.isArray(s)&&!S(s))continue;o=j(o,s,r),e[n]=o}else{if("function"==typeof s)continue;e[n]=s}}const n=Object.getOwnPropertySymbols(t);for(let o of n){let n=e[o],s=t[o];if(n!==s)if("object"==typeof s){if(!Array.isArray(s)&&!S(s))continue;n=j(n,s,r),e[o]=n}else{if("function"==typeof s)continue;e[o]=s}}}else E(!0,e,t);return e}class P{static seed=(new Date).getTime();static get(){let e=++P.seed;return e>=Number.MAX_VALUE&&(P.seed=0),e}}const T=C?Promise.resolve():null;function O(e,...t){null!==T?t&&t.length>0?T.then((()=>{e(t)})):T.then(e):t&&t.length>0?setTimeout((()=>{e(t)})):setTimeout(e)}function $(e){return null!=e&&("boolean"==typeof e?e:"string"==typeof e?"true"===e.toLocaleLowerCase():Boolean(e))}function q(e){return"number"==typeof e?e:Number(e)}const F={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Object]":"object"};function k(e){let t=Object.prototype.toString.call(e);return null==e?String(e):F[t]||"object"}function _(e){return e&&"object"==typeof e&&"setInterval"in e}function M(e){let t=!!e&&"length"in e&&e.length,r=k(e);return"function"!==r&&!_(e)&&("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e)}function N(e,t){let r=+t.length,n=0,o=e.length;for(;n<r;n++)e[o++]=t[n];return e.length=o,e}function K(e,t=[]){let r=t;return null!=e&&(M(Object(e))?N(r,"string"==typeof e?[e]:e):r.push(e)),r}function L(e,t,r){if(M(e))Reflect.apply([].forEach,e,[t]);else for(let n in e)if(r&&e.hasOwnProperty(n)){if(!1===Reflect.apply(t,e,[e[n]]))break}else if(!1===Reflect.apply(t,e,[e[n]]))break;return e}function I(e,t){if(e==t)return!0;if(void 0===e||void 0===t)return!1;let r=k(e);if(r!==k(t))return!1;if("object"===r){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n<r.length;n++){let o=r[n];if(!I(e[o],t[o]))return!1}return!0}if("array"===r){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){if(!I(e[r],t[r]))return!1}return!0}return!1}const D=Symbol("idKey"),H=Symbol("valueKey"),U=Symbol("childrenKey"),B=Symbol("growKey");class W{[B]=!0;[D];[H]=e();[U]=new Map;constructor(e){this[D]=e}}class V{get(e,t){if("value"==t)return e[H].value;if("grow"===t)return e[B];let r=e[U].get(t);return r?z(r):e[B]?(r=J(t),r[B]=e[B],e[U].set(t,r),z(r)):void 0}set(e,t,r){return"value"==t?(e[H].value=r,!0):"grow"===t?(e[B]=$(r),!0):null==r?(e[U].delete(t),!0):(console.error(`illegal property:${t}`),!1)}deleteProperty(e,t){return"value"===t||"grow"==t?(console.error(`can not delete property:${String(t)}`),!1):(e[U].delete(t),!0)}}function J(e){let t=new W(e);return Reflect.set(t,"__proxy__",new Proxy(t,new V)),t}function z(e){return Reflect.get(e,"__proxy__")}class G extends W{constructor(){super("__root__")}put(...e){let t=e.length;if(t<2)return console.error("参数至少包括一个(key, value)"),!1;let r=this;for(let n=0;n<t-1;n++){let t,o=e[n];r[U].has(o)?t=r[U].get(o):(t=J(o),r[U].set(o,t)),r=t}return r[H].value=e[t-1],!0}get(...e){let t=e.length;if(0===t)return;let r=this;for(let n=0;n<t;n++){let t=e[n];if(!r[U].has(t))return;r=r[U].get(t)}return r[H].value}remove(...e){let t=e.length;if(0==t)return!1;let r=this;for(let n=0;n<t-1;n++){let t=e[n];if(!r[U].has(t))return!1;r=r[U].get(t)}let n=e[t-1];return!!r[U].has(n)&&(r[U].delete(n),!0)}contains(...e){let t=e.length;if(0==t)return!1;let r=this;for(let n=0;n<t-1;n++){let t=e[n];if(!r[U].has(t))return!1;r=r[U].get(t)}let n=e[t-1];return r[U].has(n)}clear(){this[U].clear()}}const X=["put","get","contains","remove","clear"];function Y(e){return X.includes(e)}class Q{get(e,t){if("value"==t)return e[H].value;if("grow"===t)return e[B];if(t===U)return e[U];if("string"==typeof t&&Y(t))return e[t];let r=String(t),n=e[U].get(r);return n?z(n):e[B]?(n=J(r),n[B]=e[B],e[U].set(r,n),z(n)):void 0}set(e,t,r){return"value"==t?(e[H].value=r,!0):"grow"===t?(e[B]=$(r),!0):!Y(t)&&(null==r?(e[U].delete(t),!0):(console.error(`illegal property:${t}`),!1))}deleteProperty(e,t){return"value"===t||"grow"==t?(console.error(`can not delete property:${String(t)}`),!1):(e[U].delete(t),!0)}}let Z=new Proxy(G,{construct:(e,...t)=>z(function(){let e=new G,t=new Q,r=new Proxy(e,t),n={put:(...t)=>Reflect.apply(e.put,e,t),get:(...t)=>Reflect.apply(e.get,e,t),remove:(...t)=>Reflect.apply(e.remove,e,t),contains:(...t)=>Reflect.apply(e.contains,e,t),clear:()=>Reflect.apply(e.clear,e,[])};return Object.assign(n,r),Reflect.set(e,"__proxy__",r),e}())});function ee(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,s="";if("?"===e[l=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(l));for(;l<e.length;)if("\\"!==e[l]){if(")"===e[l]){if(0==--o){l++;break}}else if("("===e[l]&&(o++,"?"!==e[l+1]))throw new TypeError("Capturing groups are not allowed at ".concat(l));s+=e[l++]}else s+=e[l++]+e[l++];if(o)throw new TypeError("Unbalanced pattern at ".concat(r));if(!s)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:s}),r=l}else{for(var i="",l=r+1;l<e.length;){var a=e.charCodeAt(l);if(!(a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||95===a))break;i+=e[l++]}if(!i)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:i}),r=l}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,s="[^".concat(ne(t.delimiter||"/#?"),"]+?"),i=[],l=0,a=0,u="",c=function(e){if(a<r.length&&r[a].type===e)return r[a++].value},h=function(e){var t=c(e);if(void 0!==t)return t;var n=r[a],o=n.type,s=n.index;throw new TypeError("Unexpected ".concat(o," at ").concat(s,", expected ").concat(e))},f=function(){for(var e,t="";e=c("CHAR")||c("ESCAPED_CHAR");)t+=e;return t};a<r.length;){var p=c("CHAR"),d=c("NAME"),y=c("PATTERN");if(d||y){var m=p||"";-1===o.indexOf(m)&&(u+=m,m=""),u&&(i.push(u),u=""),i.push({name:d||l++,prefix:m,suffix:"",pattern:y||s,modifier:c("MODIFIER")||""})}else{var g=p||c("ESCAPED_CHAR");if(g)u+=g;else if(u&&(i.push(u),u=""),c("OPEN")){m=f();var v=c("NAME")||"",b=c("PATTERN")||"",w=f();h("CLOSE"),i.push({name:v||(b?l++:""),pattern:v&&!b?s:b,prefix:m,suffix:w,modifier:c("MODIFIER")||""})}else h("END")}}return i}function te(e,t){return function(e,t){void 0===t&&(t={});var r=oe(t),n=t.encode,o=void 0===n?function(e){return e}:n,s=t.validate,i=void 0===s||s,l=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:".concat(e.pattern,")$"),r)}));return function(t){for(var r="",n=0;n<e.length;n++){var s=e[n];if("string"!=typeof s){var a=t?t[s.name]:void 0,u="?"===s.modifier||"*"===s.modifier,c="*"===s.modifier||"+"===s.modifier;if(Array.isArray(a)){if(!c)throw new TypeError('Expected "'.concat(s.name,'" to not repeat, but got an array'));if(0===a.length){if(u)continue;throw new TypeError('Expected "'.concat(s.name,'" to not be empty'))}for(var h=0;h<a.length;h++){var f=o(a[h],s);if(i&&!l[n].test(f))throw new TypeError('Expected all "'.concat(s.name,'" to match "').concat(s.pattern,'", but got "').concat(f,'"'));r+=s.prefix+f+s.suffix}}else if("string"!=typeof a&&"number"!=typeof a){if(!u){var p=c?"an array":"a string";throw new TypeError('Expected "'.concat(s.name,'" to be ').concat(p))}}else{f=o(String(a),s);if(i&&!l[n].test(f))throw new TypeError('Expected "'.concat(s.name,'" to match "').concat(s.pattern,'", but got "').concat(f,'"'));r+=s.prefix+f+s.suffix}}else r+=s}return r}}(ee(e,t),t)}function re(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var s=n[0],i=n.index,l=Object.create(null),a=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?l[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):l[r.name]=o(n[e],r)},u=1;u<n.length;u++)a(u);return{path:s,index:i,params:l}}}(ie(e,r,t),r,t)}function ne(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function oe(e){return e&&e.sensitive?"":"i"}function se(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,s=r.start,i=void 0===s||s,l=r.end,a=void 0===l||l,u=r.encode,c=void 0===u?function(e){return e}:u,h=r.delimiter,f=void 0===h?"/#?":h,p=r.endsWith,d="[".concat(ne(void 0===p?"":p),"]|$"),y="[".concat(ne(f),"]"),m=i?"^":"",g=0,v=e;g<v.length;g++){var b=v[g];if("string"==typeof b)m+=ne(c(b));else{var w=ne(c(b.prefix)),x=ne(c(b.suffix));if(b.pattern)if(t&&t.push(b),w||x)if("+"===b.modifier||"*"===b.modifier){var S="*"===b.modifier?"?":"";m+="(?:".concat(w,"((?:").concat(b.pattern,")(?:").concat(x).concat(w,"(?:").concat(b.pattern,"))*)").concat(x,")").concat(S)}else m+="(?:".concat(w,"(").concat(b.pattern,")").concat(x,")").concat(b.modifier);else"+"===b.modifier||"*"===b.modifier?m+="((?:".concat(b.pattern,")").concat(b.modifier,")"):m+="(".concat(b.pattern,")").concat(b.modifier);else m+="(?:".concat(w).concat(x,")").concat(b.modifier)}}if(a)o||(m+="".concat(y,"?")),m+=r.endsWith?"(?=".concat(d,")"):"$";else{var R=e[e.length-1],A="string"==typeof R?y.indexOf(R[R.length-1])>-1:void 0===R;o||(m+="(?:".concat(y,"(?=").concat(d,"))?")),A||(m+="(?=".concat(y,"|").concat(d,")"))}return new RegExp(m,oe(r))}(ee(e,r),t,r)}function ie(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return ie(e,t,r).source}));return new RegExp("(?:".concat(n.join("|"),")"),oe(r))}(e,t,r):se(e,t,r)}const le=Symbol("sync"),ae=Symbol("resolveRoute");function ue(e){let t=!1;return function(...r){if(!t)return t=!0,Reflect.apply(e,{},r)}}class ce{name;level;rootName;rootIndex=0;constructor(e,t,r,n){this.name=e,this.level=t,this.rootName=r,this.rootIndex=n}}class he{to;routeModel;from;data={};constructor(e,t){this.to=e,this.from=t}static from(e){let t=new he(e.to,e.from),r=e.data??{};return E(!0,t.data,r),t}}class fe{path;get fullPath(){let e=this.path??`/${this.name}`;return`${this.root??"default"}!${e}`}name;root;params;query;matched;meta;success;error;destroy;opsType;updateType;viewTagAttrs;index;active;slot;session;static clone(e,t){let r=new fe;return j(r,e,t),r}static isSame(e,t){return e===t||null!=e&&null!=t&&((!e.path||e.path===t.path)&&((!e.name||e.name===t.name)&&(e.root===t.root&&e.index===t.index)))}static isSameForRouteModel(e,t){return e===t||null!=e&&null!=t&&((!e.path||e.path==t.path)&&(!e.name||e.name==t.name))}static from(e){let t=new fe;if(null==e)return t;let r=t;for(let t in e){let n=e[t];r[t]=n}const n=Object.getOwnPropertySymbols(e);if(Array.isArray(n)&&n.length>0)for(let t of n)r[t]=e[t];return t}}class pe{id;name;props;meta;src;component;constructor(e,t,r,n){this.id=P.get(),this.name=e,this.src=t,"function"!=typeof t&&(this.component=t),this.props=r,this.meta=n}get isResolved(){return void 0!==this.component}resolve(){return function(e){let t=e.src;return new Promise(((r,n)=>{const o=ue((t=>{A(t)&&(t=t.default),e.component=t,console.debug("success load async module"),r()})),s=ue((e=>{console.debug("reject load async module"),n(e)}));let i;try{i=t(o,s)}catch(e){s(e)}if(i)if("function"==typeof i.then)i.then(o,s);else{const e=i.component;e&&"function"==typeof e.then&&e.then(o,s)}}))}(this)}}class de{models=[]}class ye{path;match;redirect;name;layers=[]}var me=(e=>(e[e.Push=0]="Push",e[e.Replace=1]="Replace",e[e.Put=2]="Put",e[e.Append=3]="Append",e[e.Open=4]="Open",e))(me||{}),ge=(e=>(e[e.Part=0]="Part",e[e.All=1]="All",e))(ge||{});const ve=Symbol("rootKey"),be=Symbol("rootNodeKey"),we=Symbol("parentNodeKey"),xe=Symbol("nameKey");class Se{instance=null;model;route;active=!0;index=0;constructor(e,t,r=0,n=!0){this.route=e,this.model=t,this.index=r,this.active=n}}class Re{scope=null;set compensation(e){null!==this.scope&&this.scope.stop(),this.scope=t(),this.scope.run((()=>{r(this.slots,(()=>{let t=!1;try{t=e()}catch(e){console.error(e)}t&&null!==this.scope&&(this.scope.stop(),this.scope=null)}))}))}_slots;get slots(){return null==this._slots&&(this._slots=n([])),this._slots}get empty(){return null==this._slots||0==this._slots.value.length}[xe];[ve];[be]=null;[we]=null;get name(){return this[xe]}constructor(e,t,r){this[xe]=e,this[ve]=t,r&&(this[be]=r)}}class Ae{view;index;level;constructor(e,t,r){this.view=e,this.index=t,this.level=r}static include(e,t){for(let r=0;r<e.length;r++){let n=e[r];if(n.view===t.view&&(-1==t.index||n.index===t.index)&&n.level===t.level)return!0}return!1}}class Ce{views=[]}class Ee{layers=[]}class je{time;route}class Pe{forbidTime=300;submitRecorder=new je;isSameRoute(e,t){return null!=e&&null!=t&&(e.name===t.name&&e.path===t.path&&e.root===t.root)}acquire(e){let t=(new Date).getTime();if(!(this.isSameRoute(e,this.submitRecorder.route)&&this.submitRecorder.time&&t-this.submitRecorder.time<=this.forbidTime))return this.submitRecorder.route=e,this.submitRecorder.time=t,t;this.submitRecorder.time=t}release(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}}const Te=void 0!==typeof window,Oe=window,$e=window.document;function qe(e,t,r){e.addEventListener?e.addEventListener(t,r,!1):e.attachEvent?e.attachEvent(`on${t}`,r):e[`on${t}`]=r}function Fe(e,t,r){e.removeEventListener?e.removeEventListener(t,r):e.detachEvent?e.detachEvent(`on${t}`,r):e[`on${t}`]=null}let ke=function(){let e=Oe.location,t=`${e.protocol}//${e.host}`;return t+=function(e){let t=e,r=t.lastIndexOf("/");return r>0&&r<t.length-1?t=t.substring(0,r+1):0===r&&-1!==t.indexOf(".")?t="/":-1===r&&(t=-1==t.indexOf(".")?`/${t}/`:"/"),0!==t.indexOf("/")&&(t=`/${t}`),t}(e.pathname),t}();const _e={method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},mode:"cors",credentials:"same-origin",cache:"default",redirect:"follow",keepalive:!0},Me=new Map;async function Ne(e){let{id:t,method:r="POST",url:n,headers:o={},data:s,processData:i=!0,timeout:l=-1}=e;if(t&&Me.has(t))throw new Error("resubmit");r=r.toUpperCase();let{contentType:a="application/json; charset=UTF-8"}=o,u=E(!0,{..._e},{method:r,headers:o});if("GET"===r?n=function(e,t,r="text"){if(null==t)return e;let n="";if(0===(r=r.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded")||0===r.indexOf("application/json"))if("object"==typeof t)for(let e in t){let r=t[e];if(Array.isArray(r))for(let t=0;t<r.length;t++){let o=`${encodeURIComponent(e)}=${encodeURIComponent(r[t])}`;n.length>0&&(n+="&"),n+=o}else{let t=`${encodeURIComponent(e)}=${encodeURIComponent(r)}`;n.length>0&&(n+="&"),n+=t}}else n=t;else n=t;return n.length>0&&(e=-1===e.indexOf("?")?`${e}?${n}`:`${e}&${n}`),e}(n,s,a):(i&&(s=function(e,t="text"){let r="";if(0===(t=t.trim().toLowerCase()).indexOf("application/x-www-form-urlencoded"))if("object"==typeof e)for(let t in e){let n=e[t];if(Array.isArray(n))for(let e=0;e<n.length;e++){let o=`${encodeURIComponent(t)}=${encodeURIComponent(n[e])}`;r.length>0&&(r+="&"),r+=o}else{let e=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`;r.length>0&&(r+="&"),r+=e}}else r=e;else r=0===t.indexOf("text")?"object"==typeof e?JSON.stringify(e):e:0===t.indexOf("application/json")&&"object"==typeof e?JSON.stringify(e):e;return r}(s,a)),u.body=s),t||l>0){t||(t=`fetch_${P.get()}`);const e=new AbortController;u.signal=e.signal;let r={timer:null,controller:e};if(l>0){const e=setTimeout((()=>{r.timer&&r.controller.abort()}),l);r.timer=e}Me.set(t,r)}try{let e,r=await fetch(n,u),o={};r.headers.forEach(((e,t)=>{o[e]=t}));let s=o["content-type"]??"";return e=-1!==s.indexOf("application/json")?await r.json():-1!=s.indexOf("text")?await r.text():await r.blob(),{ok:r.ok,status:r.status,statusText:r.statusText,headers:o,data:e,response:r}}catch(e){throw e}finally{if(t){let e=Me.get(t);e&&(e.timer&&(clearTimeout(e.timer),e.timer=null),Me.delete(t))}}}function Ke(e){let t=Me.get(e);return!!t&&(t.timer&&(clearTimeout(t.timer),t.timer=null),t.controller.abort(),Me.delete(e),!0)}class Le{cache=new Map;constructor(){}async get(e,t=-1){if(this.cache.has(e)){return this.cache.get(e)}let r=await Ne({url:e,method:"GET",timeout:t,heaaders:{"content-type":"text/plain"}});if(r.ok)return this.cache.set(e,r.data),r.data;throw Error(r.statusText)}remove(e){this.cache.delete(e)}}var Ie=(e=>(e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined",e))(Ie||{});class De{exports;status;id;src}class He{register=new Map;constructor(){}get(e){return this.register.get(e)}put(e,t){this.register.set(e,t)}remove(e){let t=this.register.get(e);return this.register.delete(e),t}contains(e){return this.register.has(e)}clear(){this.register.clear()}}const Ue=Symbol("chainKey"),Be=Symbol("cursorKey"),We=Symbol("$persistentModeKey"),Ve=Symbol("statusKey"),Je=Symbol("argsKey"),ze=Symbol("exArgsKey"),Ge=Symbol("successFnsKey"),Xe=Symbol("errorFnsKey"),Ye=Symbol("sessionKey"),Qe=Symbol("_go");class Ze{[Ue]=[];[Be]=0;[We]=!1;[Ve]="Free";[Je]=[];[ze]=[];[Ge]=[];[Xe]=[];[Ye];get session(){return this[Ye]}constructor(e,t=!1){this[Ye]=e,this[We]=t}[Qe](e,...t){let r=this[Ve];if(this[Ve]="Busy",this[Be]+=e,this[Be]<0&&(this[Be]=0),this[Je]=t,"Exception"===r||"Reject"===r){let e=[{session:this[Ye]},...this[ze]];for(;this[Xe].length>0;)try{let t=this[Xe].shift();"function"==typeof t&&O((()=>{Reflect.apply(t,{},e)}))}catch(e){console.error(e.message,e)}return this[Ve]=r,this[Ue]=[],this[Be]=0,this}if("Finished"===r||this[Be]>=this[Ue].length){let e=[{session:this[Ye]},...this[Je]];for(;this[Ge].length>0;){let t=this[Ge].shift();"function"==typeof t&&O((()=>{Reflect.apply(t,{},e)}))}return this[Ve]="Free",this}if(this[Be]>=this[Ue].length)return this[Ve]="Free",this;let n=this[Ue][this[Be]];this[We]||(this[Ue].splice(0,this[Be]+1),this[Be]=-1);let o=this[Be]+1;try{let e=!1,t={go:(t,...r)=>{e||(e=!0,Reflect.apply(this[Qe],this,[t,...r]))},resolve:(...t)=>{e||(e=!0,Reflect.apply(this[Qe],this,[1,...t]))},reject:(...t)=>{e||(e=!0,Reflect.apply(this.reject,this,[...t]))},insert:t=>{e||(this[Ue].splice(o,0,t),o++)},session:this[Ye]};O((()=>{Reflect.apply(n,{},[t,...this[Je]])}))}catch(e){this.throw(e)}return this}go(e,...t){return Reflect.apply(this[Qe],this,[e,...t])}finish(...e){return this[Ve]="Finished",this[Je]=e,Reflect.apply(this[Qe],this,[0])}reject(...e){return this[Ve]="Reject",this[ze]=e,Reflect.apply(this[Qe],this,[0])}throw(...e){return this[Ve]="Exception",this[ze]=e,Reflect.apply(this[Qe],this,[0])}reset(...e){this[Ve]="Busy",this[Je]=e,this[Ue]=[],this[Be]=0;let t=[{session:this[Ye]},...this[Je]];for(;this[Ge].length>0;){let e=this[Ge].shift();O((()=>{Reflect.apply(e,this,t)}))}return this[Ve]="Free",this}post(e){return"Reject"===this[Ve]||"Exception"===this[Ve]?this:(Array.isArray(e)?this[Ue]=[...this[Ue],...e]:this[Ue].push(e),"Busy"===this[Ve]||Reflect.apply(this[Qe],this,[0,...this[Je]]),this)}wait(e,t){return e&&"function"==typeof e&&this[Ge].push(e),t&&"function"==typeof t&&this[Xe].push(t),"Busy"===this[Ve]||Reflect.apply(this[Qe],this,[0,...this[Je]]),this}exception(e){return e&&"function"==typeof e&&this[Xe].push(e),"Busy"===this[Ve]?this:Reflect.apply(this[Qe],this,[0,...this[Je]])}isFinish(){return"Reject"==this[Ve]||"Free"==this[Ve]&&this[Be]>=this[Ue].length}}class et{head;isOldWebKit;moduleManager=new He;resource=new Le;options;_query;set query(e){this._query=e}get query(){return this._query}constructor(e={}){this.head=$e.head||$e.getElementsByTagName("head")[0]||$e.documentElement,this.isOldWebKit=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/(\d+).*/,"$1")<536,this.options=e,this.options.paths||(this.options.paths={}),this.options.alias||(this.options.alias={})}ensure(...e){let t=[],r=e.length-1,n={};"object"==typeof e[r]&&(Object.assign(n,e[r]),r--);let o=null;"function"==typeof e[r]&&(o=e[r],r--);for(let n=0;n<=r;n++)if(Array.isArray(e[n])){let r=e[n];for(let e=0;e<r.length;e++)void 0!==r[e]&&t.push(this.resolvePath(r[e]))}else{let r=e[n].split(",");for(let e=0;e<r.length;e++)void 0!==r[e]&&t.push(this.resolvePath(r[e]))}let s=new rt(t.length,((e,t)=>{if(s.isOK())try{"function"==typeof o&&Reflect.apply(o,{},t)}catch(e){console.error(e.message,e)}else try{console.error(e),"function"==typeof o&&Reflect.apply(o,{},[])}catch(e){console.error(e.message,e)}})),i=new Ze;for(let e=0;e<t.length;e++){let r=new nt(e,t[e],n,s);this.mount(i,r)}return this}remove(...e){let t=[],r=e.length-1,n={};"object"==typeof e[r]&&(Object.assign(n,e[r]),r--);let o=null;"function"==typeof e[r]&&(o=e[r],r--);for(let n=0;n<=r;n++)if(Array.isArray(e[n])){let r=e[n];for(let e=0;e<r.length;e++)void 0!==r[e]&&t.push(this.resolvePath(r[e]))}else{let r=e[n].split(",");for(let e=0;e<r.length;e++)void 0!==r[e]&&t.push(this.resolvePath(r[e]))}return t.forEach((e=>{this.unmount(e,n)})),"function"==typeof o&&Reflect.apply(o,{},[]),this}mount(e,t){if(this.isNaturePath(t.src,"js")){let r=t.params.jsPoint;return r||(r=this.head),void this.mountJS(e,t,r)}if(this.isNaturePath(t.src,"css")){let r=t.params.cssPoint;return r||(r=this.head),void this.mountCSS(e,t,r)}if(this.isNaturePath(t.src,"html")){let r=t.params.htmlPoint;return r||(r=$e.body),void this.mountHTML(e,t,r)}let r=this.getFileNamePostfix(t.src);if("js"===r||0===r.length){let r=t.params.jsPoint;return r||(r=this.head),void this.mountJS(e,t,r)}if("css"===r){let r=t.params.cssPoint;return r||(r=this.head),void this.mountCSS(e,t,r)}{let r=t.params.htmlPoint;return r||(r=$e.body),void this.mountHTML(e,t,r)}}mountHTML(e,t,r){e.post((e=>{let n=t.params.timeout??this.options.timeout??3e4,o=t.src;this.resource.get(o,n).then((n=>{r.innerHTML=n,t.progress.work(!0,t.index,n),e.resolve()}),(r=>{console.error(r),t.progress.work(!1,t.index,null),e.reject()}))}))}mountCSS(e,t,r){e.post((e=>{let n=t.src,o=$e.createElement("link"),s="onload"in o;if(this.isOldWebKit||!s){let n={timeout:this.options.time||3e3,time:0,isOldWebKit:this.isOldWebKit,success:()=>{t.progress.work(!0,t.index,t.src),e.resolve()},error:()=>{try{r.removeChild(o)}catch(e){console.error(e.message,e)}t.progress.work(!1,t.index,null),e.resolve()}};setTimeout((()=>{tt(o,n)}),1)}else o.onload=()=>{o.onload=o.onerror=null,t.progress.work(!0,t.index,t.src),e.resolve()},o.onerror=()=>{try{r.removeChild(o)}catch(e){console.error(e.message,e)}o.onload=o.onerror=null,t.progress.work(!1,t.index,null),e.reject()};let i=$e.getElementById(n);i&&i.parentNode&&i.parentNode.removeChild(i),o.rel="stylesheet",o.type="text/css",o.id=n,o.href=n,r.appendChild(o)}))}mountJS(e,t,r){e.post((e=>{let n=t.src,o=this.moduleManager.get(n);if(o&&(o.status==Ie.Defined||o.status==Ie.Loaded)){if(o.exports)return t.progress.work(!0,t.index,o.exports),void e.resolve();if(document.querySelector(`script[src='${n}`))return t.progress.work(!0,t.index,o.exports),void e.resolve()}o=new De,o.id=n,o.src=n,o.status=Ie.Loading,this.moduleManager.put(n,o);let s=$e.createElement("script");if("onload"in s)s.onload=()=>{s.onload=s.onerror=null,o.status==Ie.Loading&&(o.status=Ie.Loaded,t.progress.work(!0,t.index,n)),e.resolve()},s.onerror=()=>{try{r.removeChild(s)}catch(e){console.error(e.message,e)}s.onload=s.onerror=null,t.progress.work(!1,t.index,null),e.reject()};else{let r=s;r.onreadystatechange=()=>{/loaded|complete/.test(r.readyState)&&(r.onreadystatechange=null,o.status==Ie.Loading&&(o.status=Ie.Loaded,t.progress.work(!0,t.index,n)),e.resolve())}}s.defer=!0,s.src=n,Oe.define=this.createDefine(o,t),r.appendChild(s)}))}unmount(e,t={}){let r=this.getFileNamePostfix(e);if("js"===r||0===r.length){let t=$e.querySelector(`script[src="${e}"]`);return t&&t.parentNode&&t.parentNode.removeChild(t),void this.moduleManager.remove(e)}if("css"!==r){this.resource.remove(e);let r=t.htmlPoint;return r||(r=$e.body),void(r.innerHTML="")}{let t=$e.querySelector(`style[href="${e}"]`);t&&t.parentNode&&t.parentNode.removeChild(t)}}trimEmptyElement(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r].trim();0!==n.length&&t.push(n)}return t}createDefine(e,t){let r=this,n=function(...n){let o,s,i;e.status=Ie.Defining;let l=n.length;1===l?(i=n[0],o=void 0):2===l?(i=n[1],Array.isArray(n[0])?(s=r.trimEmptyElement(n[0]),o=void 0):s=void 0):(o=n[0],s=r.trimEmptyElement(n[1]),i=n[2]),o&&(e.id=o,r.options.alias[o]=e.src),s&&s.length>0?r.ensure(s,((...r)=>{e.exports="function"==typeof i?Reflect.apply(i,e,r):i,e.status=Ie.Defined,t.progress.work(!0,t.index,e.exports)})):(e.exports="function"==typeof i?Reflect.apply(i,e,[]):i,e.status=Ie.Defined,t.progress.work(!0,t.index,e.exports))};return n.amd=!0,n}resolvePath(e){try{if(this.isNaturePath(e,"all"))return e;e=this.parserPath(e,!0);let t=this.getFileNamePostfix(e);t=t.toLowerCase();let r=this.createSearch(this.query);return-1==e.indexOf("?")?("js"!==t&&"css"!==t&&"html"!==t&&(e+=".js"),r.length>0&&(e+=`?${r}`)):r.length>0&&(e+=`&${r}`),e}catch(t){throw console.error(`resolve path[${e}] fail`,t),t}}createSearch(e){let t="";if(e){for(let r in e){let n=`${e[r]}`;t+=`${encodeURIComponent(r)}=${encodeURIComponent(n)}&`}t.length>0&&(t=t.substring(0,t.length-1))}return t}getFileNamePostfix(e){let t=e.lastIndexOf("?");-1==t&&(t=e.length);let r=e.lastIndexOf(".",t);return-1==r?"":e.substring(r+1,t)}isNaturePath(e,t){if(null==this.options.nature)return!1;if("all"===t||"js"===t){let t=this.options.nature.js;if(void 0!==t)for(let r=0;r<t.length;r++){let n=t[r];if(0===e.indexOf(n))return!0}}if("all"===t||"css"===t){let t=this.options.nature.css;if(void 0!==t)for(let r=0;r<t.length;r++){let n=t[r];if(0===e.indexOf(n))return!0}}if("all"===t||"html"===t){let t=this.options.nature.html;if(void 0!==t)for(let r=0;r<t.length;r++){let n=t[r];if(0===e.indexOf(n))return!0}}return!1}parserPath(e,t){if(0==e.indexOf("http://"))return e;if(0==e.indexOf("https://"))return e;if(0==e.indexOf("file:///"))return e;if(0==e.indexOf("/")){return ke+e.slice(1)}if(0==e.indexOf("./")){return ke+e.slice(2)}if(t){let t=this.options.alias[e];if(!t){let r=e.indexOf("/");if(-1==r)t=e;else{let n=e.slice(0,r),o=this.options.paths[n];t=o?o+e.slice(r):e}}return this.parserPath(t,!1)}return ke+e}}function tt(e,t){let r=e.sheet,n=!1;if(t.isOldWebKit)r&&(n=!0);else if(r)try{r.cssRules&&(n=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(n=!0)}setTimeout((()=>{t.time+=20,n?t.success():t.time>t.timeout?t.error():tt(e,t)}),20)}class rt{callback;values;status;size;lastIndex;constructor(e,t){this.size=e,this.callback=t,this.status=!0,this.values=[],this.lastIndex=-1}work(e,t,r){if(this.status=e,!0===this.status&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(r)),0===this.size||!1===this.status)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(e){console.error(e.message,e)}}isOK(){return this.status}}class nt{index;src;params;progress;constructor(e,t,r,n){this.index=e,this.src=t,this.params=r,this.progress=n}}const ot=Symbol("_notifyChange"),st=Symbol("_generateLocation"),it=Symbol("_setHashRecorder");class lt{currentRoute;routes;constructor(e,t){this.currentRoute=e,this.routes=t}}class at{query;changeHandle;historyChange;hashMonitor;traceless=!1;defaultPath;lastHash;constructor(e="",t=!0,r=!1,n="/"){this.query=e,this.hashMonitor=t,this.traceless=r,this.defaultPath=n}init(){if(!this.hashMonitor)return;if(this.historyChange)return;this.historyChange=()=>{if(!this.hashMonitor)return;let e=Oe.history.state;this[ot](e)},qe(Oe,"popstate",this.historyChange);let e=this.getHash()||this.defaultPath,t=Oe.sessionStorage.getItem(e);if(t){let e=JSON.parse(t);this[ot](e)}else{let t,r=e.indexOf("!");t=-1!=r?e.substring(r+1):e;let n=new fe;n.path=t,n.query=this.getSearch(),this[ot]([n])}}destroy(){this.historyChange&&Fe(Oe,"popstate",this.historyChange)}[it](e,t){if(this.hashMonitor)try{this.lastHash&&Oe.sessionStorage.removeItem(this.lastHash);let r=JSON.stringify(t);Oe.sessionStorage.setItem(e,r),this.lastHash=e}catch(e){console.error(e.message)}}listen(e){this.changeHandle=e}[ot](e){"function"==typeof this.changeHandle&&this.changeHandle(e)}go(e){Oe.history.go(e)}push(e){let t=this[st](e.currentRoute);this.traceless||Oe.history.pushState(e.routes,"",t),this[it](e.currentRoute.fullPath,e.routes)}replace(e){let t=this[st](e.currentRoute);this.traceless||Oe.history.replaceState(e.routes,"",t),this[it](e.currentRoute.fullPath,e.routes)}[st](e){let t;if(e.query){let r="";if("object"==typeof e.query)for(let t in e.query){let n=encodeURIComponent(e.query[t]),o=`${encodeURIComponent(t)}=${n}`;r.length>0&&(r+="&"),r+=o}else r=e.query;this.query?(t=`${this.query}&${r}`,"?"!==t.charAt(0)&&(t=`?${t}`)):t=`?${r}`}const r=Oe.location;let n;return n=t?`${r.origin}${r.pathname}${t}#${e.fullPath}`:`${r.origin}${r.pathname}#${e.fullPath}`,n}getHash(){let e=Oe.location.hash,t=e.indexOf("#");if(-1!=t){return e.substring(t+1)}return null}getSearch(){return Oe.location.search}}const ut=Symbol("_constructRouteModel"),ct=Symbol("_findRouteModel"),ht=Symbol("_findRootView"),ft=Symbol("_getFirstView"),pt=Symbol("_removeView"),dt=Symbol("_buildPage"),yt=Symbol("_resolveComponent"),mt=Symbol("_update"),gt=Symbol("_merge"),vt=Symbol("ignoreHistoryChangeOnceKey"),bt=Symbol("_handleHistoryChange"),wt=Symbol("_handleRouteUpdated"),xt=Symbol("routeUpdatedCallback"),St=Symbol("currentRoutes"),Rt=Symbol("current"),At=Symbol("_addRouteRecorder"),Ct=Symbol("_removeRouteRecorder"),Et=Symbol("_cloneRouteRecorder"),jt=Symbol("_hanldeError"),Pt=Symbol("errorCallback"),Tt=Symbol("registerKey"),Ot=Symbol("notFoundKey"),$t=Symbol("forestKey"),qt=Symbol("historyKey"),Ft=Symbol("beforeFiltersKey"),kt=Symbol("afterFiltersKey"),_t=Symbol("destroyFiltersKey"),Mt=Symbol("mainDispatcherKey"),Nt=Symbol("initKey"),Kt=Symbol("requireKey"),Lt=Symbol("_createNextFn"),It=Symbol("_start"),Dt=Symbol("_before"),Ht=Symbol("_after"),Ut=Symbol("_destroy"),Bt=Symbol("_load"),Wt=Symbol("_unload"),Vt=Symbol("_loadDependency"),Jt=Symbol("resolvedModulesKey"),zt=Symbol("resolveDependencyKey"),Gt=Symbol("routerGuardKey");class Xt{[Tt]=new Array;[Ot];[$t]=new Ee;[qt];[St]=new Array;[Pt]=null;[xt]=null;[Ft]=new Array;[kt]=new Array;[_t]=new Array;[Mt]=new Ze;[Jt]=new Map;[zt]=null;[Gt]=new Pe;[Nt]=!1;[Rt]=e(null);[Kt]=new et;get require(){return this[Kt]}get current(){return this[Rt].value}options;constructor(e){this.options=e??{};let t=this.options.routes||[];this.addRoutes(t),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),this[qt]=new at(this.options.query,this.options.hashMonitor,this.options.traceless,this.options.defaultPath),this[qt]?.listen((e=>{if("string"==typeof e){let t=this[ae](e);t&&this[bt]([t])}else this[bt](e)}))}[jt](e="error",t){if(t&&"function"==typeof t.error)try{t.error(e)}catch(e){}if("function"==typeof this[Pt])try{this[Pt](e,t)}catch(e){}console.error(e)}init(){!0!==this[Nt]&&(this[qt]?.init(),this[Nt]=!0)}[vt]=!1;[bt](e){if(this[vt])this[vt]=!1;else try{if(!e){let e=[...this[St]].reverse();return this[Wt](e),void Oe.location.reload()}let t=null,r=[],n=[],o=0;for(;o<e.length&&o<this[St].length&&fe.isSame(e[o],this[St][o]);o++)e[o].opsType===me.Open&&!0===e[o].active&&e[o].active!==this[St][o].active&&(t=e[o]);if(o<e.length&&(r=e.slice(o)),o<this[St].length&&(n=this[St].slice(o).reverse()),0==n.length&&0==r.length)return void(null!==t&&this.restore([t]));if(n.length>0){if(this[Wt](n)){if(r.length>0)return void this.restore(r);null!==t&&this.restore([t])}}else this.restore(r)}catch(e){this[jt](e)}}[wt](e){if(e)this[Rt].value=e;else{let e=this[St].length;this[Rt].value=e>0?this[St][e-1]:null}if("function"==typeof this[xt])try{this[xt](this[Rt].value)}catch(e){}}[At](e,t=-1){t<0||t>=this[St].length?this[St].push(e):this[St].splice(t,0,e)}[Et](){let e=[];for(let t of this[St]){let r=fe.clone(t,!0);e.push(r)}return e}[Ct](e){if(null==this[St])return;let t=-1;for(let r=0;r<this[St].length;r++)if(fe.isSame(this[St][r],e)){t=r;break}if(-1!=t){let e=this[St][t];this[St].splice(t,1),this[Ut](e,e.session)}}set hashMonitor(e){this[qt]&&(this[qt].hashMonitor=e)}get hashMonitor(){return!!this[qt]&&this[qt].hashMonitor}set traceless(e){this[qt]&&(this[qt].traceless=e)}get traceless(){return!!this[qt]&&this[qt].traceless}onRouteUpdated(e){this[xt]=e}onError(e){this[Pt]=e}beforeEach(e){this[Ft].push(e)}removeBeforeEach(e){let t=this[Ft].indexOf(e);return-1!==t&&(this[Ft].splice(t,1),!0)}afterEach(e){this[kt].push(e)}removeAfterEach(e){let t=this[kt].indexOf(e);return-1!==t&&(this[kt].splice(t,1),!0)}destroyEach(e){this[_t].push(e)}removeDestroyEach(e){let t=this[_t].indexOf(e);return-1!==t&&(this[_t].splice(t,1),!0)}setResolveDependency(e){this[zt]=e}addRoutes(e){for(let t of e)this.addRoute(t)}addRoute(e,t=-1){let r=this[ut](e);if(-1==t)this[Tt]=[...this[Tt],...r];else for(let e=r.length-1;e>=0;e--)this[Tt].splice(t,0,r[e])}removeRoute(e){let t=this[ae](e);if(null===t)return console.warn("route格式错误",e),!1;for(let e=0;e<this[Tt].length;e++){let r=this[Tt][e];if(t?.path&&r.path===t.path)return this[Tt].splice(e,1),!0;if(t?.name&&r.name===t.name)return this[Tt].splice(e,1),!0}return!1}hasRoute(e){let t=this[ae](e);return null===t?(console.warn("route格式错误",e),!1):-1!==this[Tt].findIndex((e=>!(!t?.path||e.path!==t.path)||(!(!t?.name||e.name!==t.name)||void 0)))}setNotFoundRoute(e){let t=this[ut](e);this[Ot]=t[0]}getRoutes(){return[...this[Tt]]}[ut](e){let t=e.path??"";t.length>0&&"/"!==t.charAt(0)&&(t=`/${t}`);let r=e.components??(e.component&&{"":e.component});if(null==r){let r=new ye;return r.path=t,r.redirect=e.redirect,[r]}let n=[];for(let t in r){let o=r[t];0===t.length&&(t="default");let s=new pe(t,o,e.props,e.meta);n.push(s)}let o=!1,s=[];if(e.children)for(let r of e.children){let e=this[ut](r);for(let r of e){let e=new ye;e.name=r.name,r.path&&r.path.length>0?e.path="/"!==t?`${t}${r.path}`:r.path:(o=!0,e.path=t);let i=new de;i.models=[...n],e.layers=[i,...r.layers],s.push(e)}}if(!o){let r=new de;r.models=n;let o=new ye;o.name=e.name,o.path=t,o.layers=[r],s.splice(0,0,o)}return s}[ct](e){let t=e.route;try{for(let r of this[Tt]){if(t.path&&r.path){let n=r.match;n||(n=r.match=re(r.path));let o=n(t.path);if(!o)continue;if(r.redirect){let n=new fe;E(!0,n,t),n.path=r.redirect;let o={route:n,find:void 0};return!!this[ct](o)&&(e.route=o.route,e.find=o.find,!0)}if(t.params=t.params??{},E(!0,t.params,o.params),t.query){let e=t.query;if("string"==typeof e){let r={},n=e.split("&");for(let e of n){let t=e.split("=");if(2!==t.length)continue;let n=decodeURIComponent(t[0].trim()),o=decodeURIComponent(t[1].trim());r[n]=o}E(!0,t.params,r)}else"object"==typeof e&&E(!0,t.params,e)}return e.find=r,!0}if(t.name===r.name){t.params=t.params??{};let n=te(r.path);return t.path=n(t.params),e.find=r,!0}}}catch(e){console.error(e.message,e),"function"==typeof t.error&&t.error(e.message)}return!1}[ae](e){let t=null;if(Array.isArray(e))if(t=new fe,"object"==typeof e[0])t=fe.from(e[0]);else for(let r=0;r<e.length;r++)0===r?"/"===e[r].charAt(0)?t.path=e[r]:t.name=e[r]:1===r?t.params=e[r]:2===r?t.root=e[r]:3===r&&E(!1,t,e[r]);else"object"==typeof e?t=fe.from(e):"string"==typeof e&&(t=new fe,"/"==e.charAt(0)?t.path=e:t.name=e);if(t){if(t.path){let e=t.path.indexOf("?");-1!==e&&e<t.path.length-1&&(t.query=t.path.substring(e+1),t.path=t.path.substring(0,e))}t.root=t.root??"default",t.opsType=t.opsType??this.options.defaultOperationType??me.Push}return t}push(...e){let t=this[ae](e);return t?(t.opsType=t.opsType||me.Push,this.to(t)):(this[jt]("resolve route fail",t),this)}put(...e){let t=this[ae](e);return t?(t.opsType=me.Put,this.to(t)):(this[jt]("resolve route fail",t),this)}replace(...e){let t=this[ae](e);return t?(t.opsType=me.Replace,this.to(t)):(this[jt]("resolve route fail",t),this)}append(...e){let t=this[ae](e);return t?(t.opsType=me.Append,this.to(t)):(this[jt]("resolve route fail",t),this)}remove(e){return new Promise((t=>{this[Mt].post((r=>{try{if(0===this[St].length)return r.resolve(),void t(!1);let n,o=-1,s=[];if(e){if(e.root)n=e.root;else{n=this[St][0].root??"default"}if(e.all)for(let e=this[St].length-1;e>0;e--){let t=this[St][e];t.opsType===me.Append&&t.root===n&&(s.splice(0,0,t),o=e-1)}else if(e.until)for(let t=this[St].length-1;t>0;t--){let r=this[St][t];if(r.opsType===me.Append&&r.root===n){if("/"===e.until.charAt(0)&&e.until===r.path){o=t;break}if(e.until===r.name){o=t;break}s.splice(0,0,r)}}}else{n="default";let e=this[ft](this[$t]);e&&(n=e.name);for(let e=this[St].length-1;e>0;e--){let t=this[St][e];if(t.opsType===me.Append&&t.root===n){s.push(t),o=e-1;break}}}if(0===s.length){let e="can not find route";return console.warn(e),r.resolve(e),void t(!1)}let i=0;if(this[St].forEach((e=>{e.opsType!==me.Put&&i++})),this[Wt](s)){let e=0;this[St].forEach((t=>{t.opsType!==me.Put&&e++}));let n=i-e;this[vt]=!0,this.back(n),r.resolve(),t(!0)}}catch(e){this[jt](e),r.resolve(),t(!1)}}))}))}open(...e){let t=this[ae](e);return t?(t.opsType=me.Open,this.to(t)):(this[jt]("resolve route fail",t),this)}close(e){return this[Mt].post((t=>{try{let r=this[ae](e);if(!r)return void t.reject("resolve route fail");let n=[];for(let e=0;e<this[St].length;e++){let t=this[St][e];if(t.root===r.root){if(r.path&&r.path===t.path){n.push(t);break}if(r.name&&r.name===t.name){n.push(t);break}}}if(0===n.length)return void t.resolve();if(this[Wt](n)){let e=fe.clone(r,!0);const t=new lt(e,this[Et]());this[qt]?.replace(t),this[wt]()}t.resolve()}catch(e){this[jt](e),t.resolve()}})),this}to(...e){let t=this[ae](e);if(!t)return this[jt]("resolve route fail",t),this;let r=this[Gt].acquire(t);return null==r?(this[jt]("route forbid",t),this):(this[Mt].post((e=>{try{let n=this[It](t);this[Dt](n),!n.session?.routeModel&&this[zt]&&this[Vt](n),this[Bt](n),this[Ht](n),n.wait(((n,o)=>{let s=n.session.to;try{let e=fe.clone(s,!0);const t=new lt(e,this[Et]());s.opsType===me.Replace?this[qt]?.replace(t):this[qt]?.push(t)}catch(e){console.error(e.message,e)}if(this[Gt].release(r),this[wt](s),"function"==typeof t.success)try{Reflect.apply(t.success,{},[])}catch(e){console.error(e.message,e)}e.resolve()}),((n,o)=>{this[Gt].release(r),this[jt](o,t),e.resolve()}))}catch(n){this[Gt].release(r),this[jt](n,t),e.resolve()}})),this)}back(e=1){this[qt]?.go(-e)}[Lt](e){return(t,r)=>{if("boolean"==typeof t)t?e.resolve():e.reject(r);else if(t){let r=this[ae](t);if(r){let t=e.session.to;r.success=t.success,r.error=t.error,e.session.to=r,e.session.routeModel=null,e.resolve()}else e.reject("route resolve fail")}else e.resolve()}}[It](e){let t=this[St].length>0?this[St][0]:void 0,r=new he(e,t),n={route:e,find:null};return this[ct](n),n.find&&(r.routeModel=n.find,e.matched=function(e){let t=[];return e.layers.forEach((e=>{null!=e.models&&null!=e.models&&e.models.forEach((e=>{if(null!=e&&null!=e)if("object"==typeof e.meta){let r=E(!0,{},e.meta);t.push(r)}else e.meta&&t.push(e.meta)}))})),t}(n.find),Array.isArray(e.matched)&&e.matched.length>0&&(e.meta=n.find.layers[0].models[0].meta)),new Ze(r)}[Dt](e){for(let t of this[Ft])e.post((e=>{let r=this[Lt](e);Reflect.apply(t,{},[e.session.to,e.session.from,r,e.session])}))}[Ht](e){e.post((e=>{for(let t of this[kt])try{Reflect.apply(t,{},[e.session.to,e.session.from,e.session])}catch(e){console.error(e.message,e)}e.resolve()}))}[Ut](e,t){for(let r of this[_t])try{Reflect.apply(r,{},[e,t])}catch(e){console.error(e.message,e)}"function"==typeof e.destroy&&Reflect.apply(e.destroy,e,[])}[Vt](e){let t=e.session,r=Reflect.apply(this[zt],this,[t?.to]);if(null==r)return;Array.isArray(r)||(r=[r]);let n=[];for(let e of r)this[Jt].has(e)||n.push(e);0!==n.length&&e.post((e=>{this[Kt].ensure(n,((...t)=>{if(t){for(let e of t){if(!e)continue;let t;t=A(e)?e.default:e,Array.isArray(t)&&this.addRoutes(t)}for(let e of n)this[Jt].set(e,!0);e.resolve()}else e.reject()}))}))}[Bt](e){e.post((e=>{let t=e.session.to,r=e.session.routeModel;if(null==r){let n={route:t,find:null};if(this[ct](n))r=n.find,e.session.routeModel=r;else{if(!this[Ot])return void e.reject(`not find route model, path:${t.path??t.name}`);r=this[Ot]}}let n=he.from(e.session);this[dt](t,r,n).then((t=>{this[$t],e.resolve()}),(t=>{e.reject(t)}))}))}[Wt](e){if(0==e.length)return!0;let t=this[$t],r=[];for(let n of e){let e=this[ht](t,n);null!=e&&r.push({...e,route:n})}if(0==r.length){let e="can not find view index";return this[jt](e),!1}for(let e of r.reverse())this[pt](t,{x:e.x,y:e.y},[e.route.index??0],!0);return!0}[ht](e,t){let r,n=t.root??"default";for(let t=0;t<e.layers.length;t++){let o=e.layers[t];for(let e=o.views.length-1;e>=0;e--){let s=o.views[e];if(s[ve]&&s[xe]===n)return r={x:e,y:t},r}}return null}[ft](e){if(e.layers.length>0&&e.layers[0].views.length>0){return e.layers[0].views[0]}return null}[pt](e,t,r=null,n=!0){if(t.y>=e.layers.length)return;if(t.x>=e.layers[t.y].views.length)return;let o=e.layers[t.y].views[t.x],s=!1,i=[],l=!1,a=o.slots.value;for(let e=a.length-1;e>=0;e--){let n=a[e];null!=r&&-1==r.indexOf(n.index)||(n.route&&o[ve]&&(this[Ct](n.route),!0===n.active&&n.route.opsType==me.Append&&(l=!0)),i.push(new Ae(o,n.index,t.y)),a.splice(e,1))}if(0==a.length)n?o.slots.value=[...a]:e.layers[t.y].views.splice(t.x,1);else{if(l){let e=a[a.length-1];e.active=!0,e.route&&(e.route.active=e.active)}o.slots.value=[...a]}0==e.layers[t.y].views.length&&(s=!0);let u=t.y+1;for(;u<e.layers.length;u++){let t=e.layers[u].views,r=[];for(let n=t.length-1;(s||i.length>0)&&n>=0;n--){let o=t[n];if(o[we]&&(s||Ae.include(i,o[we]))){let t=o.slots.value;for(let e=t.length-1;e>=0;e--){let n=t[e];n.route&&o[ve]&&this[Ct](n.route),r.push(new Ae(o,n.index,u)),t.splice(e,1)}e.layers[u].views.splice(n,1)}}i=r,0==e.layers[u].views.length&&(s=!0)}}restore(e){if(e&&0!=this[Tt].length){return new Promise(((t,r)=>{for(let t=0;t<e.length;t++){let r=e[t];this[Mt].post((e=>{let t=this[It](r);this[Dt](t),!t.session?.routeModel&&this[zt]&&this[Vt](t),this[Bt](t),this[Ht](t),t.wait(((t,r)=>{e.resolve()}),((t,r)=>{this[jt](r),e.resolve()}))}))}this[Mt].post((e=>{e.resolve(),t()}))}))}{let e=this[$t];if(e.layers.length>0){let t=e.layers[0].views;t.length>0&&(t[0].slots.value=[])}return this[St]=[],this[wt](),Promise.resolve()}}[dt](e,t,r){let n=e.updateType??ge.Part;return this[yt](t).then((()=>{this[mt](t,e,r,n)}))}[yt](e){let t=[];for(let r=0;r<e.layers.length;r++){let n=e.layers[r];for(let e=0;e<n.models.length;e++){let r=n.models[e];r.isResolved||t.push(r.resolve())}}return t.length>0?Promise.all(t):Promise.resolve()}[mt](e,t,r,n){if(1!==e.layers[0].models.length)return Promise.reject("illegal route structure(multil root node)");const o=e.layers[0].models[0];let s,i,l=this[$t],a=function(e){return 0==e.layers.length||0==e.layers[0].views.length}(l),u=t.root??"default";a||n!=ge.Part||(s=this[ht](l,t));let c=0;if(null==s||null==s)if(a||n===ge.All){if(0==l.layers[0].views.length){let e=t.root??"default";i=new Re(e,!0,null),l.layers[0].views=[i]}else i=l.layers[0].views[0];s={x:0,y:0}}else{let e=t.slot;if(!e)return Promise.reject("can not rebuild view(because not route slot)");let r,n=e.level;if(n>l.layers.length)return Promise.reject("can not insert view(override level)");if(e.rootName){let t=l.layers[n-1];for(let o of t.views){if(o[ve]&&o.name===e.rootName){r=new Ae(o,e.rootIndex??0,n-1);break}if(o[be]&&o[be].view.name===e.rootName&&o[be].index===e.rootIndex){r=o[be];break}}}if(!r)return Promise.reject("can not insert view(not find root node ref)");i=new Re(u,!0,r),l.layers[n].views.push(i),s={x:l.layers[n].views.length-1,y:n}}else i=l.layers[s.y].views[s.x];if(c=s.y,i[ve]=!0,t.opsType===me.Append){t.index=P.get();let r=i.slots.value;if(r.length>0){let e=r[r.length-1];e.active=!1,e.route&&(e.route.active=e.active)}let n=new Se(t,o,t.index,!0);i.slots.value=[...r,n];let s=c+1,a=1,u=new Ae(i,t.index,c);this[gt](l,s,e,a,u)}else if(t.opsType===me.Open){let r=i.slots.value,n=!1;for(let e of r){if(null!==e.route&&fe.isSameForRouteModel(e.route,t)){if(1==e.active)return t.index=e.index,t.active=e.active,e.route=t,Promise.resolve();e.active=!0,n=!0,t.index=e.index,t.active=e.active,e.route=t,this[Ct](e.route)}else e.active=!1;e.route&&(e.route.active=e.active)}if(!n){t.index=P.get(),t.active=!0;let n=new Se(t,o,t.index,!0);r.push(n);let s=c+1,a=1,u=new Ae(i,t.index,c);this[gt](l,s,e,a,u)}i.slots.value=[...r]}else{let r=i.slots.value;if(0==r.length){t.index=P.get(),i.slots.value=[new Se(t,o,t.index)];let r=c+1,n=1,s=new Ae(i,t.index,c);this[gt](l,r,e,n,s)}else{let n=r[0];if(n.model!==o){this[pt](l,s,null,!0),t.index=P.get(),i.slots.value=[new Se(t,o,t.index)];let r=c+1,n=1,a=new Ae(i,t.index,c);this[gt](l,r,e,n,a)}else{null!==n.route&&this[Ct](n.route);let o=[];for(let e=1;e<r.length;e++)o.push(r[e].index);o.length>0&&this[pt](l,s,o,!0),t.index=n.index,n.route=t;let a=[new Ae(i,t.index,c)],u=c+1,h=1,f=new Ae(i,t.index,c);for(;a.length>0&&u<l.layers.length&&h<e.layers.length;u++,h++){let t=[];for(let e=0;e<l.layers[u].views.length;e++){let r=l.layers[u].views[e];r[we]&&Ae.include(a,r[we])&&t.unshift(e)}let r=[];for(let n of t){let t,o=l.layers[u].views[n],s=e.layers[h].models;for(let e=0;e<s.length;e++)if(o.name===s[e].name){t=s[e];break}if(t){let s=o.slots.value;if(0==s.length){let r=0;o.slots.value=[new Se(null,t,r)];let n=u+1,s=h+1;this[gt](l,n,e,s,f)}else{let i=s[0];if(i.model!==t){this[pt](l,{x:n,y:u},null,!0),o.slots.value=[new Se(null,t,0)];let r=u+1,s=h+1;this[gt](l,r,e,s,f)}else{o[ve]&&null!==i.route&&this[Ct](i.route);let e=[];for(let t=1;t<s.length;t++)e.push(s[t].index);e.length>0&&this[pt](l,{x:n,y:u},e,!0),r.push(new Ae(o,i.index,u))}}o[ve]=!1}else this[pt](l,{x:n,y:u},null,!1)}a=r}this[gt](l,u,e,h,f)}}}if(i&&i[be]){let e=i[be];e&&(t.slot=new ce(u,c,e?.view.name,e?.index??0))}r.to=void 0,r.routeModel=void 0,t.session=r,this[At](t)}[gt](e,t,r,n,o){let s=n,i=t;for(;i<e.layers.length&&s<r.layers.length;i++,s++){let t=e.layers[i].views;for(let e of r.layers[s].models){let r=new Re(e.name,!1,o),n=new Se(null,e);r.slots.value=[n],t.push(r)}}for(;s<r.layers.length;s++){let t=new Ce;t.views=[];for(let e of r.layers[s].models){let r=new Re(e.name,!1,o),n=new Se(null,e);r.slots.value=[n],t.views.push(r)}e.layers.push(t)}}[le](e,t,r,n,o,s){if(t<0||t>this[$t].layers.length)return null;if(t<this[$t].layers.length){let i=this[$t].layers[t],l=null;for(let a of i.views){let i=!1;if(null!==r?(i=a.name===e&&a[be]?.view===r,i&&-1!==n&&(i=a[be]?.index===n)):i=a.name===e,i){null!==o&&(a[we]={view:o,index:s,level:t-1}),l=a;break}}if(null!==l)return l}let i=null,l=null;null!==o&&(i=o[ve]?{view:o,index:s,level:t-1}:o[be],l={view:o,index:s,level:t-1});let a=new Re(e,!0,i);if(a[we]=l,t==this[$t].layers.length){let e=new Ce;e.views=[a],this[$t].layers.push(e)}else this[$t].layers[t].views.push(a);return a}}const Yt=Symbol("registerKey");class Qt{policy;callback;constructor(e,t){this.callback=e,this.policy=t}}class Zt{[Yt]=new Map;constructor(){}on(e,t,r=!1){let n=this[Yt].get(e);n||(n=new Array,this[Yt].set(e,n));let o=new Qt(t,!0===r?1:0);return n.push(o),this}off(e,t){if(!t)return this[Yt].delete(e),this;let r=this[Yt].get(e);if(r)for(let e=0;e<r.length;e++){if(r[e].callback===t){r.splice(e,1);break}}return this}bind(e,t,r=!1){return this.on(e,t,r)}unbind(e,t){return this.off(e,t)}once(e,t){return this.on(e,t,!0)}all(...e){let t=e.length;if(t<1)return this;let r=e[t-1];if("function"!=typeof r)return console.error("callback can not benn empty"),this;let n=t-1,o=new Array(n),s=[].splice.call(e,0,n);for(let e=0;e<s.length;e++)this.once(s[e],(t=>{o[e]=t,n-=1,0==n&&Reflect.apply(r,{},o)}));return this}emit(e,...t){let r=this[Yt].get(e);if(!r)return this;for(let e=0;e<r.length;){let n=r[e];if(1==n.policy?r.splice(e,1):e++,"function"==typeof n.callback)try{O((()=>{Reflect.apply(n.callback,{},t)}))}catch(e){console.error(e.message,e)}}return this}trigger(e,...t){return Reflect.apply(this.emit,this,[e,...t])}}const er=Symbol("registerKey");class tr{[er]=new Map;constructor(){}set(e,t){this[er].set(e,t)}get(e){return this[er].get(e)}has(e){return this[er].has(e)}delete(e){return this[er].delete(e)}}const rr=Symbol("lc");function nr(e,t=!1){let r=e,n=r[rr];if(!n){if(!t)return null;n=new tr,r[rr]=n}return n}function or(e,t){let r=e;for(;null!==r;){let e=r[rr];if(e&&e.has(t))return e.get(t);r=r.$parent}return null}function sr(e){if(Array.isArray(e.children)&&e.children.length>0){let t=e.children[0];if(null!=t&&null!=t.component&&null!=t.component.proxy)return nr(t.component.proxy,!1)}return null}const ir=Symbol("hooksKey");function lr(e,t){let r=e.get(ir);if(null!=r)for(let e=r.length-1;e>=0;e--){let n=r[e];if(n.type===t)try{Reflect.apply(n.hook,n.target,[])}catch(e){console.error(e.message,e)}}}var ar=(e=>(e.DEACTIVATED="da",e.ACTIVATED="a",e))(ar||{});class ur{type;hook;target;constructor(e,t,r){this.target=r,this.hook=t,this.type=e}}function cr(e){return(t,r)=>{let n;if(r)n=r;else{let e=o();if(null==e||null==e.proxy)return void console.error("can not get currrent instance or proxy");n=e.proxy}let i=or(n,ir);null!=i?(s((()=>{!function(e,t,r,n){let o=-1;for(let s=0;s<e.length;s++){let i=e[s];if(i.type===t&&i.hook===r&&i.target===n){o=s;break}}-1!=o&&e.splice(o,1)}(i,e,t,n)})),function(e,t,r,n){let o=new ur(t,r,n);e.push(o)}(i,e,t,n)):console.warn("can not get hooks context")}}let hr=cr("a"),fr=cr("da");const pr=Symbol("routeKey");function dr(e,t){let r=e.get(pr);if(r){let e={path:"",name:"",params:{},index:-1,session:{}};Object.assign(e,t),Object.assign(r,e)}else r=function(){let e=new fe;return e.path="",e.name="",e.params={},e.index=-1,i(e)}(),Object.assign(r,t),e.set(pr,r)}function yr(e){let t=or(e,pr);return null!=t?t:null}const mr=Symbol("rk"),gr=Symbol("vd"),vr=Symbol("rv"),br=Symbol("rvi"),wr=Symbol("pv"),xr=Symbol("pvi");function Sr(e,t=!1){let r=null;return r=t?e.showFromClass??e.enterFromClass:e.enterFromClass,r||(r=e.transitionName,r?t?`${r}-show-from`:`${r}-enter-from`:null)}function Rr(e,t=!1){let r=null;return r=t?e.showActiveClass??e.enterActiveClass:e.enterActiveClass,r||(r=e.transitionName,r?t?`${r}-show-active`:`${r}-enter-active`:null)}function Ar(e){let t,r=e.duration;return"object"==typeof r?t={enter:r.enter??-1,leave:r.leave??-1,show:r.show??-1,hide:r.hide??-1}:("string"==typeof r&&(r=0==r.length?-1:Number(r)),t={enter:r,leave:r,show:r,hide:r}),t}function Cr(e,t){e.classList.contains(t)||e.classList.add(t)}function Er(e,t){e.classList.remove(t)}const jr=Te&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;function Pr(e){jr(e)}function Tr(e,t,...r){y(t)&&(null==e&&(e={}),Reflect.apply(t,e,r))}function Or(e,t,r,n=-1,o,s,i,l){if(y(s)){if(void 0!==o&&o>=0)return void setTimeout((()=>{Reflect.apply(s,e,[t,r,n]),y(l)&&Reflect.apply(l,e,[])}),o);let i=["animationend","transitionend"],a=o=>{i.forEach((e=>{Fe(t,e,a)})),Reflect.apply(s,e,[t,r,n]),l&&Reflect.apply(l,e,[])};i.forEach((e=>{qe(t,e,a)}))}if(y(i)){let o="animationcancel",s=l=>{Reflect.apply(i,e,[t,r,n]),Fe(t,o,s)};qe(t,o,s)}}function $r(e){return null!==e&&(e.opsType===me.Append||e.opsType===me.Open)}function qr(e,t,r,n,o={},s,i=-1){if(t&&(r||$r(s))){let e=Sr(o,r);e&&Cr(n,e);let t=Rr(o,r);t&&Cr(n,t)}else{Tr(e,function(e,t=!1){let r=null;return r=t?e.onBeforeShow??e.onBeforeEnter:e.onBeforeEnter,r}(o,r),[n,s,i])}}function Fr(e,t,r,n,o={},s,i,l,a){if($r(i)||r)if(t){let t=Sr(o,r),u=Rr(o,r),c=function(e,t=!1){let r=null;return r=t?e.showToClass??e.enterToClass:e.enterToClass,r||(r=e.transitionName,r?t?`${r}-show-to`:`${r}-enter-to`:null)}(o,r);Pr(c?()=>{Or(e,n,i,l,s,(()=>{u&&Er(n,u),c&&Er(n,c),y(a)&&a(e,a,[n])})),t&&Er(n,t),c&&Cr(n,c)}:()=>{t&&Er(n,t),u&&Er(n,u),y(a)&&a(e,a,[n])})}else{let t=function(e,t=!1){let r=null;return r=t?e.onShow??e.onEnter:e.onEnter,r}(o,r),s=function(e,t=!1){let r=null;return r=t?e.onAfterShow??e.onAfterEnter:e.onAfterEnter,r}(o,r),u=function(e,t=!1){let r=null;return r=t?e.onShowCancelled??e.onEnterCancelled:e.onEnterCancelled,r}(o,r),c=t=>{!t&&y(s)?Tr(e,s,[n,i,l]):y(u)&&Tr(e,u,[n,i,l]),y(a)&&a(e,a,[n])};y(t)?Tr(e,t,[n,c,i,l]):c()}else y(a)&&a(e,a,[n])}function kr(e,t,r,n,o={},s,i,l,a,u){if($r(l)||r)if(t){let t=function(e,t=!1){let r=null;return r=t?e.hideFromClass??e.leaveFromClass:e.leaveFromClass,r||(r=e.transitionName,r?t?`${r}-hide-from`:`${r}-leave-from`:null)}(o,r),c=function(e,t=!1){let r=null;return r=t?e.hideActiveClass??e.leaveActiveClass:e.leaveActiveClass,r||(r=e.transitionName,r?t?`${r}-hide-active`:`${r}-leave-active`:null)}(o,r),h=function(e,t=!1){let r=null;return r=t?e.hideToClass??e.leaveToClass:e.leaveToClass,r||(r=e.transitionName,r?t?`${r}-hide-to`:`${r}-leave-to`:null)}(o,r);t&&Cr(n,t),c&&Cr(n,c),Pr(h?()=>{Or(e,n,l,a,s,(()=>{c&&Er(n,c),h&&Er(n,h),y(u)&&Tr(e,u,[n]),!r&&y(i)&&i()})),t&&Er(n,t),h&&Cr(n,h)}:()=>{t&&Er(n,t),c&&Er(n,c),y(u)&&Tr(e,u,[n]),!r&&y(i)&&i()})}else{let t=function(e,t=!1){let r=null;return r=t?e.onHide??e.onLeave:e.onLeave,r}(o,r),s=function(e,t=!1){let r=null;return r=t?e.onAfterHide??e.onAfterLeave:e.onAfterLeave,r}(o,r),c=function(e,t=!1){let r=null;return r=t?e.onHideCancelled??e.onLeaveCancelled:e.onLeaveCancelled,r}(o,r),h=t=>{!t&&y(s)?(Tr(e,s,[n,l,a]),y(u)&&Tr(e,u,[n]),!r&&y(i)&&i()):y(c)&&(Tr(e,c,[n,l,a]),y(u)&&Tr(e,u,[n]))};y(t)?Tr(e,t,[n,h,l,a]):h()}else!r&&y(i)&&i()}function _r(e,t={},r,n=-1){let o=$(t.css),s=t.mode??"default",i=Ar(t);return{mode:s,persisted:!1,beforeEnter:s=>{qr(e,o,!1,s,t,r,n)},enter:s=>{Fr(e,o,!1,s,t,i.enter,r,n)},leave:(s,l)=>{kr(e,o,!1,s,t,i.leave,l,r,n)},clone:o=>_r(e,t,r,n)}}function Mr(e){return e.el}function Nr(e,t,r={},n,o,s,i){if(s){let s=Mr(t);if(null==s)return;let l=$(r.css),a=Ar(r);qr(e,l,!0,s,r,n,o),Fr(e,l,!0,s,r,a.show,n,o,(t=>{y(i)&&Tr(e,i,[t])}))}else y(i)&&Tr(e,i,[])}function Kr(e,t,r={},n,o,s,i){if(s){let s=Mr(t);if(null==s)return;let l=$(r.css),a=Ar(r);kr(e,l,!0,s,r,a.hide,null,n,o,(t=>{y(i)&&Tr(e,i,[t])}))}else y(i)&&Tr(e,i,[])}function Lr(e,t,r){return"function"==typeof e?Reflect.apply(e,{},[t,r]):e}function Ir(e,t){if(!e)return null;const r=e(t);return 1===r.length?r[0]:r}class Dr{node;state;constructor(e,t){this.node=e,this.state=t}}const Hr=l({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,required:!1,default:"default"},modelSlot:{type:[Object],required:!1},multi:{type:Boolean,required:!1,default:!1},tag:{type:[String,Object,Function],required:!1,default:"div"},viewTag:{type:[String,Object,Function],required:!1,default:"div"},viewTagProps:{type:[Object,Function],required:!1,default:()=>({})},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewDeactiveClass:{type:[String,Function],required:!1},css:{type:[Boolean,String],required:!1,default:!0},transition:{type:[Boolean,String],required:!1,default:!1},transitionName:{type:String,required:!1},enterFromClass:{type:String,required:!1},enterActiveClass:{type:String,required:!1},enterToClass:{type:String,required:!1},leaveFromClass:{type:String,required:!1},leaveActiveClass:{type:String,required:!1},leaveToClass:{type:String,required:!1},showFromClass:{type:String,required:!1},showActiveClass:{type:String,required:!1},showToClass:{type:String,required:!1},hideFromClass:{type:String,required:!1},hideActiveClass:{type:String,required:!1},hideToClass:{type:String,required:!1},onBeforeEnter:{type:Function,required:!1},onEnter:{type:Function,required:!1},onAfterEnter:{type:Function,required:!1},onEnterCancelled:{type:Function,required:!1},onBeforeLeave:{type:Function,required:!1},onLeave:{type:Function,required:!1},onAfterLeave:{type:Function,required:!1},onLeaveCancelled:{type:Function,required:!1},onBeforeShow:{type:Function,required:!1},onShow:{type:Function,required:!1},onAfterShow:{type:Function,required:!1},onShowCancelled:{type:Function,required:!1},onBeforeHide:{type:Function,required:!1},onHide:{type:Function,required:!1},onAfterHide:{type:Function,required:!1},onHideCancelled:{type:Function,required:!1}},setup(e,t){const r=o();if(null===r||null===r.proxy)return void console.error("instance or instance.proxy not exist");const n=!0===e.multi,i=a(mr,null),l=a(gr,0),h=a(vr,null),f=a(br,-1);let p=!1,d=null;const y=e.modelSlot;if(y){u(gr,l+1),u(br,y.index),u(xr,y.index);const e=y.route;if(!e)return void console.warn("child view render error, route not exist");const t=nr(r.proxy,!0);!function(e){let t=e.get(ir);t||(t=[],e.set(ir,t))}(t),dr(t,e)}else{if(null==i)return void console.error("router is not been injected");const t=e.name,o=a(wr,null),s=a(xr,0);if(d=i[le](t,l,h,f,o,s),null===d)return;u(wr,d);if(!0===d[ve]&&u(vr,d),n)p=$(e.transition??!0);else{p=$(e.transition??!1),u(br,-1),u(gr,l+1),u(xr,-1);const t=d.slots.value;if(t.length>0){const e=t[0].route;if(e){dr(nr(r.proxy,!0),e)}}else{const e=nr(r.proxy,!0);d.compensation=()=>{const t=d.slots.value;if(t.length>0){const r=t[0].route;return r&&dr(e,r),!0}return!1}}}}const m={value:new Map};return s((()=>{m.value&&m.value.clear()})),()=>{if(n){const n=new Map,o=[],s=d?.slots.value,i=[];for(let l=0;l<s.length;l++){const a=s[l],u=`${e.name}-${a.index}`,h={modelSlot:a};let f;f=t.slots.default?c(Hr,h,{default:t.slots.default}):c(Hr,h);const d={},y=Lr(e.viewClass,a.route,l);"string"==typeof y&&y.length>0&&(d[y]=!0);const g=Lr(e.viewActiveClass,a.route,l),v=Lr(e.viewDeactiveClass,a.route,l),b=m.value.get(u);if("string"==typeof g&&g.length>0&&(d[g]=a.active),"string"==typeof v&&v.length>0&&(d[v]=!a.active),b&&a.active!==b.state){const t=b.node;a.active?i.unshift((()=>{Nr(r,t,e,a.route,l,p,(()=>{let e=sr(t);null!=e&&lr(e,ar.ACTIVATED)}))})):i.push((()=>{Kr(r,t,e,a.route,l,p,(()=>{let e=sr(t);null!=e&&lr(e,ar.DEACTIVATED)}))}))}const w={class:d,key:u},x=Lr(e.viewTagProps,a.route,l);null!==x&&"object"==typeof x&&E(!0,w,x),a.route?.viewTagAttrs&&"object"==typeof a.route?.viewTagAttrs&&E(!0,w,a.route.viewTagAttrs);const S=Lr(e.viewTag,a.route,l),R=c(S,w,{default:()=>[f]});if(n.set(u,new Dr(R,a.active)),p){const t=_r(r,e,a.route,l);R.transition=t}o.push(R)}m.value=n,function(e,t={}){Pr((()=>{for(let r=0;r<e.length;r++)Reflect.apply(e[r],t,[])}))}(i,r);const l=Lr(e.tag,null,-1),a={};return Object.assign(a,t.attrs),c(l,a,{default:()=>o})}if(null!=y){const e=y.model,r={};e.props&&("object"==typeof e.props?E(!1,r,e.props):!0===e.props&&"object"==typeof y.route?.params&&E(!1,r,y.route?.params));const n=c(e.component,r);return Ir(t.slots.default,{Component:n,route:y.route})??n}{const n=d.slots.value;if(n.length>0){const o=n[0],s=o.model,i={};s.props&&("object"==typeof s.props?E(!1,i,s.props):!0===s.props&&"object"==typeof o.route?.params&&E(!1,i,o.route?.params));const l=c(s.component,i);if(p){const t=_r(r,e,o.route,-1);l.transition=t}return Ir(t.slots.default,{Component:l,route:o.route})??l}return Ir(t.slots.fallback,{})}}}});function Ur(e,t){return"function"==typeof e?Reflect.apply(e,{},[t]):e}let Br=l({name:"RouterLink",inheritAttrs:!1,props:{tag:{type:[String,Object,Function],required:!1,default:"a"},to:{type:[String,Object,Function],required:!0},activeClass:{type:[String,Function],required:!1,default:"fox-router-link-active"},exact:{type:[String,Boolean,Function],required:!1},exactActiveClass:{type:[String,Function],required:!1,default:"fox-router-link-exact-active"},event:{type:[String,Function],required:!1,default:"onClick"}},setup(e,t){const r=a(mr,null);return()=>{let n=Ur(e.to,null),o=Ur(e.tag,n);if(null==o)return void console.warn("can not resolve link tag");let s=null,i=null;null!==r&&(s=r[ae](n),i=r.current);let l={},a=Ur(e.activeClass,s);if("string"==typeof a&&a.length>0&&(l[a]=function(e,t){return!!(null!=e&&null!=t&&(e.path&&t.path&&t.path.startsWith(e.path)||e.name&&e.name==t.name))}(s,i)),!0===Ur(e.exact,s)){let t=Ur(e.exactActiveClass,s);"string"==typeof t&&t.length>0&&(l[t]=function(e,t){return!!(null!=e&&null!=t&&(e===t||e.path&&e.path===t.path||e.name&&e.name===t.name))}(s,i))}let u={class:l};E(!0,u,t.attrs);let h=Ur(e.event,s);if("string"==typeof h){const e=e=>{null!=r?null!=s?function(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||null!=e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}(e)&&r.to(s):console.warn("route is not been resolved"):console.warn("router is not been injectd")};u[h]=e}return c(o,u,t.slots)}}}),Wr={get each(){return L},get type(){return k},get isFunction(){return y},get isArray(){return h},get isArrayLike(){return M},get makeArray(){return K},get merge(){return N},get isWindow(){return _},get isPlainObject(){return S},get isEqual(){return I}};const Vr=Symbol("fk"),Jr=Symbol("fbk"),zr=Symbol("fepk");function Gr(e={}){const t=new Xt(e),r=new Z,n=new Zt,o={...Wr,get router(){return t},get bus(){return r},get Bus(){return Z},get eventproxy(){return n},get EventProxy(){return Zt},get EventChain(){return Ze},get require(){return t.require},get request(){return Ne},get extend(){return E},get clone(){return j},install(e){e.provide(mr,t),e.provide(Vr,o),e.provide(Jr,r),e.provide(zr,n),e.component("fox-router-view",Hr),e.component("fox-router-link",Br),Reflect.defineProperty(e.config.globalProperties,"$fox",{get:()=>o}),Reflect.defineProperty(e.config.globalProperties,"$router",{get:()=>t}),Reflect.defineProperty(e.config.globalProperties,"$bus",{get:()=>r}),Reflect.defineProperty(e.config.globalProperties,"$bus",{get:()=>r}),Reflect.defineProperty(e.config.globalProperties,"$eventProxy",{get:()=>n}),e.config.globalProperties.$fox_on=function(e,t,r=!1){n.on(e,t,r)},e.config.globalProperties.$fox_off=function(e,t){n.off(e,t)},e.config.globalProperties.$fox_once=function(e,t){n.once(e,t)},e.config.globalProperties.$fox_all=function(...e){let t=n;Reflect.apply(t.all,t,e)},e.config.globalProperties.$fox_trigger=function(e,...t){let r=n;Reflect.apply(r.trigger,r,[e,...t])},e.config.globalProperties.$fox_emit=function(e,...t){let r=n;Reflect.apply(r.trigger,r,[e,...t])},e.mixin({computed:{$route(){return yr(this)}},created(){t.init()}})}};return o}function Xr(e){if(e){return e.$router}return a(mr)}function Yr(e){if(!e){e=o()?.proxy??void 0}return e?yr(e):null}function Qr(e){if(e){return e.$fox}return a(Vr)}function Zr(e){if(e){return e.$bus}return a(Jr)}function en(e){if(e){return e.$eventProxy}return a(zr)}function tn(e){const t=Xr(),r=(t,r,n)=>{try{Reflect.apply(e,{},[t,r])}catch(e){console.error(e)}n()};t.beforeEach(r),s((()=>{t.removeBeforeEach(r)}))}function rn(e){const t=Xr(),r=(t,r,n)=>{try{Reflect.apply(e,{},[t,r])}catch(e){console.error(e)}n()};t.afterEach(r),s((()=>{t.removeAfterEach(r)}))}export{Z as Bus,Ze as EventChain,Zt as EventProxy,fe as Route,Xt as Router,Ke as cancel,j as clone,Gr as createFox,E as extend,Jr as foxBusKey,zr as foxEventProxyKey,Vr as foxKey,h as isArray,d as isDate,A as isESModule,I as isEqual,y as isFunction,f as isMap,v as isObject,S as isPlainObject,b as isPromise,p as isSet,m as isString,g as isSymbol,rn as onAfterRouteUpdate,tn as onBeforeRouteUpdate,hr as onFoxActivated,fr as onFoxDeactivated,Ne as request,$ as toBoolean,q as toNumber,x as toTypeString,Zr as useBus,en as useEventProxy,Qr as useFox,Yr as useRoute,Xr as useRouter};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fox-js/fox",
3
- "version": "3.0.1-1",
3
+ "version": "3.0.1-2",
4
4
  "description": "Fox Router and commons Utils",
5
5
  "author": "jiangcheng",
6
6
  "keywords": [