@fox-js/fox 3.1.1-3 → 3.1.1-31
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.cjs.js +1 -3
- package/libs/index.esm.d.ts +1005 -148
- package/libs/index.esm.js +2459 -4122
- package/libs/index.umd.js +1 -3
- package/libs/style.css +2 -1
- package/package.json +5 -5
package/libs/index.umd.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
(function(d,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],w):(d=typeof globalThis<"u"?globalThis:d||self,w(d.Fox={},d.Vue))})(this,function(d,w){"use strict";/*!
|
|
2
|
-
* fox v3.1.0 Thu Apr 25 2024 00:11:27 GMT+0800 (中国标准时间)
|
|
3
|
-
*/const ue=typeof window<"u",_=function(){return window},Ue=function(){return window.document};function os(s){let e=s,t=e.lastIndexOf("/");return t>0&&t<e.length-1?e=e.substring(0,t+1):t===0&&e.indexOf(".")!==-1?e="/":t===-1&&(e.indexOf(".")==-1?e=`/${e}/`:e="/"),e.indexOf("/")!==0&&(e=`/${e}`),e}function pt(){if(!ue)return"/";let s=_().location,e=`${s.protocol}//${s.host}`;return e+=os(s.pathname),e}function ke(s,e,t,r=!1){s.addEventListener?s.addEventListener(e,t,r):s.attachEvent?s.attachEvent(`on${e}`,t):s[`on${e}`]=t}function Be(s,e,t){s.removeEventListener?s.removeEventListener(e,t):s.detachEvent?s.detachEvent(`on${e}`,t):s[`on${e}`]=null}const Ve=(s,e,t)=>{e=e??{bubbles:!1,cancelable:!1,detail:void 0};const r=document.createEvent("Events");let n=!0,i=!0;for(let a in e)a==="bubbles"?n=!!e[a]:a==="cancelable"?i=!!e[a]:r[a]=e[a];r.initEvent(s,n,i),(t??document).dispatchEvent(r)},ls=Array.isArray,as=s=>We(s)==="[object Map]",us=s=>We(s)==="[object Set]",fs=s=>s instanceof Date,x=s=>typeof s=="function",cs=s=>typeof s=="string",hs=s=>typeof s=="symbol",nr=s=>s!==null&&typeof s=="object",ys=s=>nr(s)&&x(s.then)&&x(s.catch),Ce=s=>s==null,ds=Object.prototype.toString,We=s=>ds.call(s),ir=s=>We(s)==="[object Object]",ms=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function gt(s){return s.__esModule||ms&&s[Symbol.toStringTag]==="Module"}const ps=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function K(...s){let e=s[0]!==void 0&&s[0]!==null?s[0]:{},t=1,r=s.length,n=!1;for(typeof e=="boolean"&&(n=e,e=s[t]??{},t++),typeof e!="object"&&(e={});t<r;t++)if(s[t]!==null&&s[t]!==void 0){let i=s[t];for(let o in i){let a=e[o],l=i[o];if(a!==l)if(n===!0&&l&&typeof l=="object"){let u;Array.isArray(l)?u=a&&Array.isArray(a)?a:[]:u=a&&typeof a=="object"?a:{},e[o]=K(n,u,l)}else l!==void 0&&(e[o]=l)}}return e}function ze(s,e,t=!1){if(!t)K(!0,s,e);else{if(typeof e!="object")return{};typeof s!="object"&&(s={});for(let r of Reflect.ownKeys(e)){let n=s[r],i=e[r];if(n!==i)if(typeof i=="object"){if(!Array.isArray(i)&&!ir(i))continue;n=ze(n,i,t),s[r]=n}else{if(typeof i=="function")continue;s[r]=i}}}return s}class ne{static seed=new Date().getTime();static get(){let e=++ne.seed;return e>=Number.MAX_VALUE&&(ne.seed=0),e}}const vt=ps?Promise.resolve():null;function Fe(s,...e){vt!==null?e&&e.length>0?vt.then(()=>{s(e)}):vt.then(s):e&&e.length>0?setTimeout(()=>{s(e)}):setTimeout(s)}function wt(s){return s==null?!1:typeof s=="boolean"?s:typeof s=="string"?s.toLocaleLowerCase()==="true":!!s}function gs(s){return typeof s=="number"?s:Number(s)}const vs={"[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 bt(s){let t=Object.prototype.toString.call(s);return s==null?String(s):vs[t]||"object"}function Rt(s,e){if(s==e)return!0;if(s===void 0||e===void 0)return!1;let t=bt(s),r=bt(e);if(t!==r)return!1;if(t==="object"){let n=Object.keys(s),i=Object.keys(e);if(n.length!==i.length)return!1;for(let o=0;o<n.length;o++){let a=n[o],l=s[a],u=e[a];if(!Rt(l,u))return!1}return!0}else if(t==="array"){if(s.length!==e.length)return!1;for(let n=0;n<s.length;n++){let i=s[n],o=e[n];if(!Rt(i,o))return!1}return!0}return!1}const or=s=>{const e={};for(let t of Reflect.ownKeys(s)){let r=s[t];r&&!Array.isArray(r)&&typeof r=="object"&&(r=or(r)),typeof t=="symbol"?e[String(t)]=r:e[t]=r}return e},ws=/^Symbol\((.*)\)$/,lr=s=>{const e={};for(let t of Reflect.ownKeys(s)){let r=s[t];r&&!Array.isArray(r)&&typeof r=="object"&&(r=lr(r));const n=ws.exec(t);if(n&&n[1]){const i=Symbol.for(n[1]);e[i]=r}else e[t]=r}return e};function ar(s,e){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{t=null,Reflect.apply(s,null,[...r])},e)}}const ur=Symbol("idKey"),fe=Symbol("valueKey"),P=Symbol("childrenKey"),J=Symbol("growKey");class fr{[J]=!0;[ur];[fe]=w.ref();[P]=new Map;constructor(e){this[ur]=e}}class bs{get(e,t){if(t=="value")return e[fe].value;if(t==="grow")return e[J];let r=e[P].get(t);if(r)return Ae(r);if(e[J])return r=xt(t),r[J]=e[J],e[P].set(t,r),Ae(r)}set(e,t,r){return t=="value"?(e[fe].value=r,!0):t==="grow"?(e[J]=wt(r),!0):r==null?(e[P].delete(t),!0):(console.error(`illegal property:${t}`),!1)}deleteProperty(e,t){return t==="value"||t=="grow"?(console.error(`can not delete property:${String(t)}`),!1):(e[P].delete(t),!0)}}const St="__proxy__";function xt(s){const e=new fr(s);return Reflect.set(e,St,new Proxy(e,new bs)),e}function Ae(s){return Reflect.get(s,St)}let Rs=class{name="";persistPolicy="memory";storage;initFlag=!1;state={};constructor(e={},t){if(e.persistPolicy&&e.persistPolicy!=="memory"&&Ce(e.name))throw new Error("name can not be empty, where persistPolicy is not memory.");this.name=e.name??"",this.persistPolicy=e.persistPolicy??"memory",this.storage=e.storage,t&&typeof t=="object"&&Object.assign(this.state,t)}init(e){this.restore(e),this.initFlag=!0}getStorage(){if(!this.persistPolicy)return null;let e=null;if(this.persistPolicy==="custom")e=this.storage;else if(ue){const t=_();e=this.persistPolicy==="session"?t.sessionStorage:t.localStorage}return e}saveState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null||!this.state)return;const t=`_bus_${this.name}`,r=JSON.stringify(this.state??{});e.setItem(t,r)}removeState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null||!this.state)return;const t=`_bus_${this.name}`;e.removeItem(t)}restore(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null)return;const r=`_bus_${this.name}`,n=t.getItem(r);if(n){const i=JSON.parse(n);Object.assign(this.state,i),Reflect.ownKeys(this.state).forEach(a=>{if(typeof a!="string")return;const l=this.state[a],u=a.split(/\//g);u.push(l),Reflect.apply(e.put,e,u)})}}put(e){if(this.initFlag&&this.persistPolicy!=="memory")try{const t=e.length,r=e.slice(0,t-1).join("/"),n=e[t-1];this.state[r]=n,this.saveState()}catch(t){console.error(t)}}remove(e){if(this.initFlag&&this.persistPolicy!=="memory")try{const t=e.length,r=e.slice(0,t-1).join("/"),n={};Reflect.ownKeys(this.state).forEach(o=>{typeof o=="string"&&(o===r||o.startsWith(r)||(n[o]=this.state[o]))}),this.state=n,this.saveState()}catch(t){console.error(t)}}clear(){if(this.initFlag)try{this.state={},this.removeState()}catch(e){console.error(e)}}};class cr extends fr{_persistHandler;constructor(e={},t){super("__root__"),this._persistHandler=new Rs(e,t),this._persistHandler.init(this)}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 i=e[n],o;r[P].has(i)?o=r[P].get(i):(o=xt(i),r[P].set(i,o)),r=o}return r[fe].value=e[t-1],this._persistHandler.put(e),!0}get(...e){let t=e.length;if(t===0)return;let r=this;for(let n=0;n<t;n++){let i=e[n];if(r[P].has(i))r=r[P].get(i);else return}return r[fe].value}remove(...e){let t=e.length;if(t==0)return!1;let r=this;for(let i=0;i<t-1;i++){const o=e[i];if(r[P].has(o))r=r[P].get(o);else return!1}const n=e[t-1];return r[P].has(n)?(r[P].delete(n),this._persistHandler.remove(e),!0):!1}contains(...e){const t=e.length;if(t==0)return!1;let r=this;for(let i=0;i<t-1;i++){let o=e[i];if(r[P].has(o))r=r[P].get(o);else return!1}const n=e[t-1];return r[P].has(n)}clear(){this[P].clear(),this._persistHandler.clear()}}const Ss=["put","get","contains","remove","clear","_persistHandler"];function hr(s){return Ss.includes(s)}class xs{get(e,t){if(t=="value")return e[fe].value;if(t==="grow")return e[J];if(t===P)return e[P];if(typeof t=="string"&&hr(t))return e[t];const r=String(t);let n=e[P].get(r);if(n)return Ae(n);if(e[J])return n=xt(r),n[J]=e[J],e[P].set(r,n),Ae(n)}set(e,t,r){return t=="value"?(e[fe].value=r,!0):t==="grow"?(e[J]=wt(r),!0):hr(t)?!1:r==null?(e[P].delete(t),!0):(console.error(`illegal property:${t}`),!1)}deleteProperty(e,t){return t==="value"||t=="grow"?(console.error(`can not delete property:${String(t)}`),!1):(e[P].delete(t),!0)}}function Ps(s,e){const t=new cr(s,e),r=new xs,n=new Proxy(t,r);return Reflect.set(t,St,n),t}const Pt=new Proxy(cr,{construct(s,e){const t=e[0]??{},r=e[1],n=Ps(t,r);return Ae(n)}}),Et=s=>!s||typeof s!="object"?!0:Reflect.ownKeys(s).length===0;class yr{name="";persistPolicy="memory";storage;constructor(e={}){if(e.persistPolicy&&e.persistPolicy!=="memory"&&Ce(e.name))throw new Error("name can not be empty, where persistPolicy is not memory.");this.name=e.name??"",this.persistPolicy=e.persistPolicy??"memory",this.storage=e.storage}getStorage(){if(!this.persistPolicy)return null;let e=null;if(this.persistPolicy==="custom")e=this.storage;else if(ue){const t=_();e=this.persistPolicy==="session"?t.sessionStorage:t.localStorage}return e}saveState(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null||Et(e))return;const r=`_state_${this.name}`,n=JSON.stringify(e??{});t.setItem(r,n)}removeState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null)return;const t=`_state_${this.name}`;e.removeItem(t)}restore(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null)return;const r=`_state_${this.name}`,n=t.getItem(r);if(n){const i=JSON.parse(n);Object.assign(e,i)}}}function dr(s,e,t){const r=new yr(t);r.restore(e);const n=l=>{const u=w.toRaw(l),f={};for(let c in u){const h=u[c];Ce(h)||(f[c]=h)}Et(f)?r.removeState():r.saveState(f)};let i=null;if(t&&t.debounce===!1)i=n;else{const l=t&&t.debounceDelay?t.debounceDelay:250;i=ar(n,l)}const o=s?w.shallowReactive(e):w.reactive(e);return w.effectScope().run(()=>{w.watch(o,l=>{const u=w.toRaw(l);i(u)})}),o}function Es(s,e){return dr(!1,s,e)}function Cs(s,e){return dr(!0,s,e)}function Fs(s,e){const t=new yr(e);t.restore(s);const r=a=>{const l=w.toRaw(a),u={};for(let f in l){const c=l[f];Ce(c)||(u[f]=c)}Et(u)?t.removeState():t.saveState(u)};let n=null;if(e&&e.debounce===!1)n=r;else{const a=e&&e.debounceDelay?e.debounceDelay:250;n=ar(r,a)}const i={get(a,l){return a[l]},set(a,l,u){return a[l]=u,n(a),!0}};return new Proxy(s,i)}function As(s,e){return Fs(s,e)}const Z="default",mr=Symbol("sync"),N=Symbol("resolveRoute");function pr(s){let e=!1;return function(...t){if(!e)return e=!0,Reflect.apply(s,{},t)}}function Ts(s){let e=s.src;return new Promise((t,r)=>{const n=pr(a=>{gt(a)&&(a=a.default),s.component=a,console.debug("success load async module"),t()}),i=pr(a=>{console.debug("reject load async module"),r(a)});let o;try{o=e(n,i)}catch(a){i(a)}if(o)if(typeof o.then=="function")o.then(n,i);else{const a=o.component;a&&typeof a.then=="function"&&a.then(n,i)}})}class _s{name;level;rootName;rootIndex=0;constructor(e,t,r,n){this.name=e,this.level=t,this.rootName=r,this.rootIndex=n}}class Je{to;routeModel;from;data={};constructor(e,t){this.to=e,this.from=t}static from(e){let t=new Je(e.to,e.from),r=e.data??{};return K(!0,t.data,r),t}}class E{path;get fullPath(){const e=this.path??`/${this.name}`;return`${this.root??Z}!${e}`}alias;name;root;params;query;traceless;template;matched;meta;success;error;destroy;opsType;updateType;historyUpdatePolicy;viewTagAttrs;index;active;slot;session;static clone(e,t){let r=new E;return ze(r,e,t),r}static isSame(e,t){return e===t?!0:!(e==null||t==null||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?!0:!(e==null||t==null||e.path&&e.path!=t.path||e.name&&e.name!=t.name)}static from(e){let t=new E;if(e==null)return t;let r=t;for(let i in e){let o=e[i];r[i]=o}const n=Object.getOwnPropertySymbols(e);if(Array.isArray(n)&&n.length>0)for(let i of n)r[i]=e[i];return t}}class Ks{id;name;props;meta;src;component;constructor(e,t,r,n){this.id=ne.get(),this.name=e,this.src=t,typeof t!="function"&&(this.component=t),this.props=r,this.meta=n}get isResolved(){return this.component!==void 0}resolve(){return Ts(this)}}class gr{models=[]}class Ct{path;match;redirect;name;layers=[]}var j=(s=>(s[s.Push=0]="Push",s[s.Replace=1]="Replace",s[s.Put=2]="Put",s[s.Append=3]="Append",s[s.Open=4]="Open",s))(j||{});const vr="FoxBeforeEnter",wr="FoxEnter",br="FoxLeave",Rr="FoxLeave",Ge="FoxLeaveEnd",k=Symbol("chainKey"),H=Symbol("cursorKey"),Ft=Symbol("$persistentModeKey"),$=Symbol("statusKey"),ee=Symbol("argsKey"),Qe=Symbol("exArgsKey"),pe=Symbol("successFnsKey"),Te=Symbol("errorFnsKey"),ie=Symbol("sessionKey"),te=Symbol("_go");class _e{[k]=[];[H]=0;[Ft]=!1;[$]="Free";[ee]=[];[Qe]=[];[pe]=[];[Te]=[];[ie];get session(){return this[ie]}constructor(e,t=!1){this[ie]=e,this[Ft]=t}[te](e,...t){let r=this[$];if(this[$]="Busy",this[H]+=e,this[H]<0&&(this[H]=0),this[ee]=t,r==="Exception"||r==="Reject"){let a=[{session:this[ie]},...this[Qe]];for(;this[Te].length>0;)try{let l=this[Te].shift();typeof l=="function"&&Fe(()=>{Reflect.apply(l,{},a)})}catch(l){console.error(l.message,l)}return this[$]=r,this[k]=[],this[H]=0,this}else if(r==="Finished"||this[H]>=this[k].length){let a=[{session:this[ie]},...this[ee]];for(;this[pe].length>0;){let l=this[pe].shift();typeof l=="function"&&Fe(()=>{Reflect.apply(l,{},a)})}return this[$]="Free",this}if(this[H]>=this[k].length)return this[$]="Free",this;let n=this[k][this[H]];this[Ft]||(this[k].splice(0,this[H]+1),this[H]=-1);let i=this[H]+1;try{let o=!1,a={go:(l,...u)=>{o||(o=!0,Reflect.apply(this[te],this,[l,...u]))},resolve:(...l)=>{o||(o=!0,Reflect.apply(this[te],this,[1,...l]))},reject:(...l)=>{o||(o=!0,Reflect.apply(this.reject,this,[...l]))},insert:l=>{o||(this[k].splice(i,0,l),i++)},session:this[ie]};Fe(()=>{Reflect.apply(n,{},[a,...this[ee]])})}catch(o){this.throw(o)}return this}go(e,...t){return Reflect.apply(this[te],this,[e,...t])}finish(...e){return this[$]="Finished",this[ee]=e,Reflect.apply(this[te],this,[0])}reject(...e){return this[$]="Reject",this[Qe]=e,Reflect.apply(this[te],this,[0])}throw(...e){return this[$]="Exception",this[Qe]=e,Reflect.apply(this[te],this,[0])}reset(...e){this[$]="Busy",this[ee]=e,this[k]=[],this[H]=0;let r=[{session:this[ie]},...this[ee]];for(;this[pe].length>0;){let n=this[pe].shift();Fe(()=>{Reflect.apply(n,this,r)})}return this[$]="Free",this}post(e){return this[$]==="Reject"||this[$]==="Exception"?this:(Array.isArray(e)?this[k]=[...this[k],...e]:this[k].push(e),this[$]==="Busy"?this:(Reflect.apply(this[te],this,[0,...this[ee]]),this))}wait(e,t){return e&&typeof e=="function"&&this[pe].push(e),t&&typeof t=="function"&&this[Te].push(t),this[$]==="Busy"?this:(Reflect.apply(this[te],this,[0,...this[ee]]),this)}exception(e){return e&&typeof e=="function"&&this[Te].push(e),this[$]==="Busy"?this:Reflect.apply(this[te],this,[0,...this[ee]])}isFinish(){return this[$]=="Reject"||this[$]=="Free"&&this[H]>=this[k].length}}const ge=Symbol("registerKey");class $s{policy;callback;constructor(e,t){this.callback=e,this.policy=t}}class At{[ge]=new Map;constructor(){}on(e,t,r=!1){let n=this[ge].get(e);n||(n=new Array,this[ge].set(e,n));let i=r===!0?1:0,o=new $s(t,i);return n.push(o),this}off(e,t){if(!t)return this[ge].delete(e),this;let r=this[ge].get(e);if(r){for(let n=0;n<r.length;n++)if(r[n].callback===t){r.splice(n,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(typeof r!="function")return console.error("callback can not benn empty"),this;let n=t-1,i=new Array(n),o=[].splice.call(e,0,n);for(let a=0;a<o.length;a++)this.once(o[a],l=>{i[a]=l,n-=1,n==0&&Reflect.apply(r,{},i)});return this}emit(e,...t){let r=this[ge].get(e);if(!r)return this;for(let n=0;n<r.length;){let i=r[n];if(i.policy==1?r.splice(n,1):n++,typeof i.callback=="function")try{Fe(()=>{Reflect.apply(i.callback,{},t)})}catch(o){console.error(o.message,o)}}return this}trigger(e,...t){return Reflect.apply(this.emit,this,[e,...t])}}const Ke=Symbol("registerKey");class js{[Ke]=new Map;constructor(){}set(e,t){this[Ke].set(e,t)}get(e){return this[Ke].get(e)}has(e){return this[Ke].has(e)}delete(e){return this[Ke].delete(e)}}const ce=Symbol("lc");function Xe(s,e=!1){let t=s;if(Reflect.has(t,ce))return t[ce];if(e){const r=new js;return t[ce]=r,r}return null}function Sr(s,e=!1){let t=null,r=s;for(;r&&!(Reflect.has(r,ce)&&(t=r[ce],t));)r=r.$parent;if(!t&&e){const n=s;n&&n.$parent&&(t=Xe(n.$parent,e))}return t}function Tt(s,e){let t=s;for(;t;){if(Reflect.has(t,ce)){const r=t[ce];if(r.has(e))return r.get(e)}t=t.$parent}return null}function qs(s,e,t){Sr(s,!0)?.set(e,t)}function Os(s,e){Sr(s,!0)?.delete(e)}function xr(s){if(Array.isArray(s.children)&&s.children.length>0){let e=s.children[0];if(e!=null&&e.component!=null&&e.component.proxy!=null)return Xe(e.component.proxy,!1)}return null}const Ye=Symbol("hooksKey");function Ls(s){let e=s.get(Ye);e||(e=[],s.set(Ye,e))}function Pr(s,e){let t=s.get(Ye);if(t!=null)for(let r=t.length-1;r>=0;r--){let n=t[r];if(n.type===e)try{Reflect.apply(n.hook,n.target,[])}catch(i){console.error(i.message,i)}}}var _t=(s=>(s.DEACTIVATED="da",s.ACTIVATED="a",s))(_t||{});class Ms{type;hook;target;constructor(e,t,r){this.target=r,this.hook=t,this.type=e}}function Is(s,e,t,r){let n=new Ms(e,t,r);return s.push(n),!0}function Ns(s,e,t,r){let n=-1;for(let i=0;i<s.length;i++){let o=s[i];if(o.type===e&&o.hook===t&&o.target===r){n=i;break}}return n!=-1?(s.splice(n,1),!0):!1}function Er(s){return(e,t)=>{let r;if(t)r=t;else{const i=w.getCurrentInstance();if(i==null||i.proxy==null){console.error("can not get current instance or proxy");return}r=i.proxy}const n=Tt(r,Ye);if(n==null){console.warn("hooks context not found");return}w.onUnmounted(()=>{Ns(n,s,e,r)}),Is(n,s,e,r)}}const Hs=Er("a"),Ds=Er("da"),Cr=Symbol("routeKey");function Fr(s,e){s.set(Cr,e)}function Kt(s){let e=Tt(s,Cr);return typeof e=="function"?e():e??null}const Ze=Symbol("rk"),$t=Symbol("vd"),Ar=Symbol("rv"),jt=Symbol("rvi"),Tr=Symbol("pv"),qt=Symbol("pvi");function Us(s){for(var e=[],t=0;t<s.length;){var r=s[t];if(r==="*"||r==="+"||r==="?"){e.push({type:"MODIFIER",index:t,value:s[t++]});continue}if(r==="\\"){e.push({type:"ESCAPED_CHAR",index:t++,value:s[t++]});continue}if(r==="{"){e.push({type:"OPEN",index:t,value:s[t++]});continue}if(r==="}"){e.push({type:"CLOSE",index:t,value:s[t++]});continue}if(r===":"){for(var n="",i=t+1;i<s.length;){var o=s.charCodeAt(i);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){n+=s[i++];continue}break}if(!n)throw new TypeError("Missing parameter name at ".concat(t));e.push({type:"NAME",index:t,value:n}),t=i;continue}if(r==="("){var a=1,l="",i=t+1;if(s[i]==="?")throw new TypeError('Pattern cannot start with "?" at '.concat(i));for(;i<s.length;){if(s[i]==="\\"){l+=s[i++]+s[i++];continue}if(s[i]===")"){if(a--,a===0){i++;break}}else if(s[i]==="("&&(a++,s[i+1]!=="?"))throw new TypeError("Capturing groups are not allowed at ".concat(i));l+=s[i++]}if(a)throw new TypeError("Unbalanced pattern at ".concat(t));if(!l)throw new TypeError("Missing pattern at ".concat(t));e.push({type:"PATTERN",index:t,value:l}),t=i;continue}e.push({type:"CHAR",index:t,value:s[t++]})}return e.push({type:"END",index:t,value:""}),e}function _r(s,e){e===void 0&&(e={});for(var t=Us(s),r=e.prefixes,n=r===void 0?"./":r,i="[^".concat(ve(e.delimiter||"/#?"),"]+?"),o=[],a=0,l=0,u="",f=function(T){if(l<t.length&&t[l].type===T)return t[l++].value},c=function(T){var F=f(T);if(F!==void 0)return F;var A=t[l],X=A.type,D=A.index;throw new TypeError("Unexpected ".concat(X," at ").concat(D,", expected ").concat(T))},h=function(){for(var T="",F;F=f("CHAR")||f("ESCAPED_CHAR");)T+=F;return T};l<t.length;){var y=f("CHAR"),m=f("NAME"),g=f("PATTERN");if(m||g){var p=y||"";n.indexOf(p)===-1&&(u+=p,p=""),u&&(o.push(u),u=""),o.push({name:m||a++,prefix:p,suffix:"",pattern:g||i,modifier:f("MODIFIER")||""});continue}var v=y||f("ESCAPED_CHAR");if(v){u+=v;continue}u&&(o.push(u),u="");var b=f("OPEN");if(b){var p=h(),q=f("NAME")||"",S=f("PATTERN")||"",O=h();c("CLOSE"),o.push({name:q||(S?a++:""),pattern:q&&!S?i:S,prefix:p,suffix:O,modifier:f("MODIFIER")||""});continue}c("END")}return o}function ks(s,e){return Bs(_r(s,e),e)}function Bs(s,e){e===void 0&&(e={});var t=Ot(e),r=e.encode,n=r===void 0?function(l){return l}:r,i=e.validate,o=i===void 0?!0:i,a=s.map(function(l){if(typeof l=="object")return new RegExp("^(?:".concat(l.pattern,")$"),t)});return function(l){for(var u="",f=0;f<s.length;f++){var c=s[f];if(typeof c=="string"){u+=c;continue}var h=l?l[c.name]:void 0,y=c.modifier==="?"||c.modifier==="*",m=c.modifier==="*"||c.modifier==="+";if(Array.isArray(h)){if(!m)throw new TypeError('Expected "'.concat(c.name,'" to not repeat, but got an array'));if(h.length===0){if(y)continue;throw new TypeError('Expected "'.concat(c.name,'" to not be empty'))}for(var g=0;g<h.length;g++){var p=n(h[g],c);if(o&&!a[f].test(p))throw new TypeError('Expected all "'.concat(c.name,'" to match "').concat(c.pattern,'", but got "').concat(p,'"'));u+=c.prefix+p+c.suffix}continue}if(typeof h=="string"||typeof h=="number"){var p=n(String(h),c);if(o&&!a[f].test(p))throw new TypeError('Expected "'.concat(c.name,'" to match "').concat(c.pattern,'", but got "').concat(p,'"'));u+=c.prefix+p+c.suffix;continue}if(!y){var v=m?"an array":"a string";throw new TypeError('Expected "'.concat(c.name,'" to be ').concat(v))}}return u}}function Vs(s,e){var t=[],r=Kr(s,t,e);return Ws(r,t,e)}function Ws(s,e,t){t===void 0&&(t={});var r=t.decode,n=r===void 0?function(i){return i}:r;return function(i){var o=s.exec(i);if(!o)return!1;for(var a=o[0],l=o.index,u=Object.create(null),f=function(h){if(o[h]===void 0)return"continue";var y=e[h-1];y.modifier==="*"||y.modifier==="+"?u[y.name]=o[h].split(y.prefix+y.suffix).map(function(m){return n(m,y)}):u[y.name]=n(o[h],y)},c=1;c<o.length;c++)f(c);return{path:a,index:l,params:u}}}function ve(s){return s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Ot(s){return s&&s.sensitive?"":"i"}function zs(s,e){if(!e)return s;for(var t=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,n=t.exec(s.source);n;)e.push({name:n[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),n=t.exec(s.source);return s}function Js(s,e,t){var r=s.map(function(n){return Kr(n,e,t).source});return new RegExp("(?:".concat(r.join("|"),")"),Ot(t))}function Gs(s,e,t){return Qs(_r(s,t),e,t)}function Qs(s,e,t){t===void 0&&(t={});for(var r=t.strict,n=r===void 0?!1:r,i=t.start,o=i===void 0?!0:i,a=t.end,l=a===void 0?!0:a,u=t.encode,f=u===void 0?function(D){return D}:u,c=t.delimiter,h=c===void 0?"/#?":c,y=t.endsWith,m=y===void 0?"":y,g="[".concat(ve(m),"]|$"),p="[".concat(ve(h),"]"),v=o?"^":"",b=0,q=s;b<q.length;b++){var S=q[b];if(typeof S=="string")v+=ve(f(S));else{var O=ve(f(S.prefix)),T=ve(f(S.suffix));if(S.pattern)if(e&&e.push(S),O||T)if(S.modifier==="+"||S.modifier==="*"){var F=S.modifier==="*"?"?":"";v+="(?:".concat(O,"((?:").concat(S.pattern,")(?:").concat(T).concat(O,"(?:").concat(S.pattern,"))*)").concat(T,")").concat(F)}else v+="(?:".concat(O,"(").concat(S.pattern,")").concat(T,")").concat(S.modifier);else S.modifier==="+"||S.modifier==="*"?v+="((?:".concat(S.pattern,")").concat(S.modifier,")"):v+="(".concat(S.pattern,")").concat(S.modifier);else v+="(?:".concat(O).concat(T,")").concat(S.modifier)}}if(l)n||(v+="".concat(p,"?")),v+=t.endsWith?"(?=".concat(g,")"):"$";else{var A=s[s.length-1],X=typeof A=="string"?p.indexOf(A[A.length-1])>-1:A===void 0;n||(v+="(?:".concat(p,"(?=").concat(g,"))?")),X||(v+="(?=".concat(p,"|").concat(g,")"))}return new RegExp(v,Ot(t))}function Kr(s,e,t){return s instanceof RegExp?zs(s,e):Array.isArray(s)?Js(s,e,t):Gs(s,e,t)}var et=(s=>(s[s.Part=0]="Part",s[s.All=1]="All",s))(et||{});const G=Symbol("rootKey"),Q=Symbol("rootNodeKey"),he=Symbol("parentNodeKey"),tt=Symbol("nameKey");class oe{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 $e{_slots;get slots(){return this._slots==null&&(this._slots=w.shallowRef([])),this._slots}get empty(){return this._slots==null||this._slots.value.length==0}[tt];[G];[Q]=null;[he]=null;get name(){return this[tt]}constructor(e,t,r){this[tt]=e,this[G]=t,r&&(this[Q]=r)}}class B{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&&(t.index==-1||n.index===t.index)&&n.level===t.level)return!0}return!1}}class Lt{views=[]}class Xs{layers=[]}class Ys{time;route}class Zs{forbidTime=300;submitRecorder=new Ys;isSameRoute(e,t){return e==null||t==null?!1: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){this.submitRecorder.time=t;return}return this.submitRecorder.route=e,this.submitRecorder.time=t,t}release(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}}const we=Symbol("_notifyChange");class $r{currentRoute;routes;constructor(e,t){this.currentRoute=e,this.routes=t}}const ye=Symbol("historyChangeConsumerKey"),jr=Symbol("_navigateFirstRoute"),rt=Symbol("_getRouteMark"),Mt=Symbol("_getUrlSearch"),It=Symbol("_generateLocation"),st=Symbol("_setRouteMarkRecorder"),je=Symbol("beforeRestoreFiltersKey"),qr=Symbol("_beforeRestore"),Or="Symbol(_fox_restore_point)";function qe(s,...e){return typeof s=="function"?Reflect.apply(s,null,[...e]):s}function Lr(s){if(!Array.isArray(s))return!1;if(s.length===0)return!0;const e=s[0];return!!(Reflect.has(e,"path")&&Reflect.has(e,"root"))}class Mr{base;storage;mode;query;firstNavigate=!0;historyMonitor;traceless=!1;changeHandler;historyChange;[ye]=!1;[je]=new Array;backTimeout=320;constructor(e="hash",t="",r="",n=!0,i=!0,o=!1,a,l){this.mode=e,this.base=t,this.query=r,this.firstNavigate=n,this.historyMonitor=i,this.traceless=o,this.storage=a??_().sessionStorage,this.backTimeout=l??320}init(e=!0){const t=_();return typeof this.historyChange!="function"&&(this.historyChange=()=>{if(typeof this[ye]=="function"){const r=this[ye]();if(this[ye]=!1,r)return}else if(this[ye]===!0){this[ye]=!1;return}if(qe(this.historyMonitor)){const r=t.history.state;this[we](r);try{let n=[];if(typeof r=="string"?n=JSON.parse(r):n=r,Array.isArray(n)&&n.length>0){const i=this[rt]()??"/";this[st](i,n)}}catch{}}}),ke(t,"popstate",this.historyChange),this.firstNavigate&&e&&this[jr](),Promise.resolve()}destroy(){if(this.historyChange){const e=_();Be(e,"popstate",this.historyChange)}}[qr](e,t,r,n){for(let i of this[je])try{const o=Reflect.apply(i,{},[e,t,r,n]);if(o===!1)return o}catch(o){console.error(o.message,o)}return!0}beforeRestoreEach(e){this[je].push(e)}removeBeforeRestoreEach(e){const t=this[je].indexOf(e);return t!==-1?(this[je].splice(t,1),!0):!1}[jr](){const e=this[rt]()??"/",t=this.storage.getItem(Or);if(t)try{const o=JSON.parse(t);if(o.mark===e&&Array.isArray(o.routes)&&o.routes.length>0){const a=o.routes.filter((l,u)=>(l.params=l.params?lr(l.params):{},this[qr](l,u,e,o.routes)));if(a.length>0){const l=this[Mt](),u=a.length-1;a[u].query=l||a[u].query,this[we](a);return}}}catch{}const r=e.indexOf("!");let n;r!=-1?n=e.substring(r+1):n=e;const i=new E;i.path=n,i.query=this[Mt](),this[we]([i])}[st](e,t){try{t.forEach(i=>{i.params=i.params?or(i.params):{}});const n=JSON.stringify({mark:e,routes:t});this.storage.setItem(Or,n)}catch(r){console.error(r.message,r)}}setRestorePoint(e){const t=this[rt]()??"/";this[st](t,e)}[we](e){typeof this.changeHandler=="function"&&this.changeHandler(e)}[rt](){const e=_();if(this.mode==="path"){let t=e.location.pathname;return this.base&&t.indexOf(this.base)===0&&(t=t.substring(this.base.length)),t}else{const t=e.location.hash,r=t.indexOf("#");if(r!=-1)return t.substring(r+1)}return null}[Mt](){let t=_().location.search;return t.length>0&&t.indexOf("?")===0&&(t=t.substring(1)),t}listen(e){this.changeHandler=e}go(e,t=!1){const r=_();this[ye]=t,r.history.go(e)}goBack(e,t){const r=_(),n=r.history.state;if(Lr(n)&&n.length>0){let i=!1;for(let f=n.length-1;f>=0;f--){const c=E.from(n[f]);if(!(c.historyUpdatePolicy==="traceless"||qe(this.traceless,c))&&E.isSame(c,e)){i=!0;break}}if(!i){t();return}const o=this.backTimeout;let a=null;const l=()=>{r.history.go(-1),a=setTimeout(l,o)},u=()=>{clearTimeout(a);const c=_().history.state;if(Lr(c)&&c.length>0){let h=c.length;const y=c[h-1],m=E.from(y);if(E.isSame(m,e))return t(),!0;if(h>0){let g=!1;for(let p=h-1;p>=0;p--){const v=E.from(c[p]);if(!(v.traceless===!0||qe(this.traceless,v))&&E.isSame(v,e)){g=!0;break}}return g?(setTimeout(()=>{a=setTimeout(l,o),this.go(-1,u)},0),!0):(t(),!0)}}return t(),!0};a=setTimeout(l,o),this.go(-1,u)}else t()}setRouteMark(e){const t=e.currentRoute.fullPath;this[st](t,e.routes)}push(e){const t=this[It](e.currentRoute);e.currentRoute.historyUpdatePolicy!=="traceless"&&!qe(this.traceless,e.currentRoute)&&_().history.pushState(e.routes,"",t),this.setRouteMark(e)}replace(e){const t=this[It](e.currentRoute);(e.currentRoute.historyUpdatePolicy!=="traceless"||!qe(this.traceless,e.currentRoute))&&_().history.replaceState(e.routes,"",t),this.setRouteMark(e)}[It](e){const t=_();let r="";if(e.query){let a="";if(typeof e.query=="object")for(let l of Reflect.ownKeys(e.query)){let u=encodeURIComponent(e.query[l]),f=`${encodeURIComponent(String(l))}=${u}`;a.length>0&&(a+="&"),a+=f}else a=e.query;this.query?(r=a.length>0?`${this.query}&${a}`:this.query,r.length>0&&r.charAt(0)!=="?"&&(r=`?${r}`)):a.length>0&&(r=`?${a}`)}const n=t.location;let i=e.alias??e.fullPath;i.startsWith(Z)&&(i=i.substring(Z.length+1));let o;return r?this.mode=="path"?i.indexOf("/")===0?o=`${this.base}${i}${r}`:o=`${this.base}/${i}${r}`:o=`${n.pathname}${r}#${i}`:this.mode=="path"?i.indexOf("/")===0?o=`${this.base}${i}`:o=`${this.base}/${i}`:o=`${n.pathname}#${i}`,`${n.origin}${o}`}}function en(s=!0,e=null,t="",r=!0,n=!1,i){return e!==null&&(e=_().location.pathname),e&&e.endsWith("/")&&(e=e.substring(0,e.length-1)),new Mr("path",e??"",t,s,r,n,i)}function Ir(s=!0,e="",t=!0,r=!1,n){return new Mr("hash","",e,s,t,r,n)}class tn{maxSize=50;cursor=-1;queue=[];changeHandler;base;historyMonitor=!1;traceless=!1;constructor(e,t=50){this.base=e,this.maxSize=t}init(e=!0){return Promise.resolve()}destroy(){this.queue=[]}beforeRestoreEach(e){}removeBeforeRestoreEach(e){return!1}listen(e){this.changeHandler=e}[we](e){typeof this.changeHandler=="function"&&this.changeHandler(e)}go(e,t=!1){if(this.queue.length==0||this.cursor<=0)return;let r=this.cursor+e;if(r<0?r=0:r>this.queue.length-1&&(r=this.queue.length-1),r!=this.cursor){this.cursor=r;let n=!1;if(typeof t=="function"?n=t():n=t,!n){const i=this.queue[r];this[we](i.routes)}}}goBack(e,t){if(this.queue.length==0||this.cursor<=0)return;let r=0;if(e===null)r=this.cursor+1;else for(let n=this.cursor;n>=0;n--){const i=this.queue[n];if(E.isSame(i.currentRoute,e))break;r++}if(r===0){t();return}this.go(-r,()=>(t(),!0))}setRouteMark(e){}push(e){this.queue.length>=this.maxSize&&this.queue.splice(0,1),this.queue.push(e),this.cursor=this.queue.length-1}replace(e){let t=this.queue.length-this.cursor;this.queue.splice(this.cursor,t),this.queue[this.cursor]=e}setRestorePoint(e){}}function Nr(s="",e=50){return new tn(s,e)}function Mn(s){}const nt=Symbol("_constructRouteModel"),it=Symbol("_findRouteModel"),Nt=Symbol("_findRootView"),Hr=Symbol("_getFirstView"),de=Symbol("_removeView"),Dr=Symbol("_buildPage"),Ur=Symbol("_resolveComponent"),kr=Symbol("_update"),le=Symbol("_merge"),Ht=Symbol("_handleHistoryChange"),ot=Symbol("_handleRouteUpdated"),lt=Symbol("routeUpdatedCallback"),R=Symbol("currentRoutes"),be=Symbol("current"),Br=Symbol("_addRouteRecorder"),Oe=Symbol("_removeRouteRecorder"),at=Symbol("_cloneRouteRecorder"),L=Symbol("_handleError"),ut=Symbol("errorCallback"),V=Symbol("registerKey"),ft=Symbol("notFoundKey"),Dt=Symbol("notFoundPathKey"),W=Symbol("forestKey"),C=Symbol("historyKey"),Le=Symbol("beforeFiltersKey"),Me=Symbol("afterFiltersKey"),Ie=Symbol("destroyFiltersKey"),Ut=Symbol("propsFilterKey"),Re=Symbol("mainDispatcherKey"),kt=Symbol("initKey"),me=Symbol("readyKey"),Bt=Symbol("readyHandlersKey"),ct=Symbol("_markReady"),Vr=Symbol("_createNextFn"),Vt=Symbol("_start"),Wt=Symbol("_before"),zt=Symbol("_after"),Wr=Symbol("_destroy"),Jt=Symbol("_load"),Ne=Symbol("_unload"),He=Symbol("routerGuardKey");function rn(s){return s.layers.length==0||s.layers[0].views.length==0}function sn(s){let e=[];return s.layers.forEach(t=>{t.models==null||t.models==null||t.models.forEach(r=>{if(!(r==null||r==null))if(typeof r.meta=="object"){let n=K(!0,{},r.meta);e.push(n)}else r.meta&&e.push(r.meta)})}),e}class nn{[V]=new Array;[ft];[Dt]="*";[me]=!1;[Bt]=[];[W]=new Xs;[C];[R]=new Array;[ut]=null;[lt]=null;[Le]=new Array;[Me]=new Array;[Ie]=new Array;[Ut]=null;[Re]=new _e;[He]=new Zs;[kt]=!1;[be]=w.ref(null);get current(){return this[be].value}options;constructor(e){this.options=e??{},this.options.notFoundPath&&this.setNotFoundPath(this.options.notFoundPath);let t=this.options.routes||[];this.addRoutes(t),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),e.history?this[C]=e.history:this[C]=ue?Ir():Nr(),this[C]?.listen(async r=>{let n=!0;try{if(typeof r=="string"){const i=this[N](r);i&&await this[Ht]([i])}else await this[Ht](r)}catch(i){console.error(i.message,i),n=!1}this[me]===!1&&this[ct](n)})}[L](e="error",t){if(t&&typeof t.error=="function")try{t.error(e)}catch{}if(typeof this[ut]=="function")try{this[ut](e,t)}catch{}console.error(e)}init(){this[kt]!==!0&&(this[C]?.init(!this[me]),this[kt]=!0)}isReady(){return this[me]?Promise.resolve():new Promise((e,t)=>{this[Bt].push([e,t])})}[ct](e){this[me]=!0,this[Bt].forEach(([t,r])=>{try{e?t():r()}catch(n){console.error(n.message,n)}})}[Ht](e){try{if(!e){let o=[...this[R]].reverse();return this[Ne](o),ue&&_().location.reload(),Promise.resolve()}let t=null,r=[],n=[],i=0;for(;i<e.length&&i<this[R].length&&E.isSame(e[i],this[R][i]);i++)e[i].active===!0&&e[i].active!==this[R][i].active&&(t=e[i]);if(i<e.length&&(r=e.slice(i)),i<this[R].length&&(n=this[R].slice(i).reverse()),n.length===0&&r.length===0){if(t!==null)return this.restore([t])}else if(n.length>0){if(this[Ne](n)){if(r.length>0)return this.restore(r);if(t!==null)return this.restore([t])}}else return this.restore(r)}catch(t){this[L](t)}return Promise.resolve()}[ot](e){if(e)this[be].value=e;else{let t=this[R].length;t>0?this[be].value=this[R][t-1]:this[be].value=null}if(typeof this[lt]=="function")try{this[lt](this[be].value)}catch{}}[Br](e){if(e.opsType===j.Open){let t=!1;const r=this[R].length-1;for(let n=r;n>=0;n--){const i=this[R][n];if(e.root==i.root){if(e.path===i.path){this[R].splice(n,1,e),t=!0;continue}e.active&&(i.active=!1)}}t||this[R].push(e)}else this[R].push(e)}[at](){let e=[];for(let t of this[R]){let r=E.clone(t,!0);e.push(r)}return e}[Oe](e){if(!this[R])return;let t=-1;for(let r=0;r<this[R].length;r++)if(E.isSame(this[R][r],e)){t=r;break}if(t!=-1){let r=this[R][t];this[R].splice(t,1),this[Wr](r,r.session)}}set historyMonitor(e){this[C]&&(this[C].historyMonitor=e)}get historyMonitor(){return this[C]?this[C].historyMonitor:!1}set traceless(e){this[C]&&(this[C].traceless=e)}get traceless(){return this[C]?this[C].traceless:!1}set propsFilter(e){this[Ut]=e}get propsFilter(){return this[Ut]}setRestorePoint(){const e=this[at]();this[C]?.setRestorePoint(e)}onRouteUpdated(e){this[lt]=e}onError(e){this[ut]=e}beforeEach(e){this[Le].push(e)}removeBeforeEach(e){const t=this[Le].indexOf(e);return t!==-1?(this[Le].splice(t,1),!0):!1}afterEach(e){this[Me].push(e)}removeAfterEach(e){const t=this[Me].indexOf(e);return t!==-1?(this[Me].splice(t,1),!0):!1}destroyEach(e){this[Ie].push(e)}removeDestroyEach(e){const t=this[Ie].indexOf(e);return t!==-1?(this[Ie].splice(t,1),!0):!1}beforeRestoreEach(e){this[C]?.beforeRestoreEach(e)}removeBeforeRestoreEach(e){return this[C]?.removeBeforeRestoreEach(e)??!1}addRoutes(e){for(let t of e)this.addRoute(t)}addRoute(e,t=-1){if(e.path===this[Dt]){this.setNotFoundRoute(e);return}const r=this[nt](e);if(t==-1)this[V]=[...this[V],...r];else for(let n=r.length-1;n>=0;n--)this[V].splice(t,0,r[n])}removeRoute(e){const t=this[N](e);if(t===null)return console.warn("route格式错误",e),!1;for(let r=0;r<this[V].length;r++){const n=this[V][r];if(t?.path&&n.path===t.path)return this[V].splice(r,1),!0;if(t?.name&&n.name===t.name)return this[V].splice(r,1),!0}return!1}hasRoute(e){const t=this[N](e);return t===null?(console.warn("route格式错误",e),!1):this[V].findIndex(n=>{if(t?.path&&n.path===t.path||t?.name&&n.name===t.name)return!0})!==-1}setNotFoundPath(e){this[Dt]=e}setNotFoundRoute(e){const t=this[nt](e);this[ft]=t[0]}getRoutes(){return[...this[V]]}[nt](e){let t=e.path??"";t.length>0&&t.charAt(0)!=="/"&&(t=`/${t}`);let r=e.components??(e.component&&{"":e.component});if(r==null){const a=new Ct;return a.path=t,a.redirect=e.redirect,[a]}let n=[];for(let a in r){let l=r[a];a.length===0&&(a=Z);let u=new Ks(a,l,e.props,e.meta);n.push(u)}let i=!1,o=[];if(e.children)for(let a of e.children){let l=this[nt](a);for(let u of l){let f=new Ct;f.name=u.name,u.path&&u.path.length>0?t!=="/"?f.path=`${t}${u.path}`:f.path=u.path:(i=!0,f.path=t);let c=new gr;c.models=[...n],f.layers=[c,...u.layers],o.push(f)}}if(!i){const a=new gr;a.models=n;const l=new Ct;l.name=e.name,l.path=t,l.layers=[a],o.splice(0,0,l)}return o}[it](e){const t=e.route;try{for(let r of this[V]){const n=t.template??t.path,i=t.template??t.name;if(n&&r.path){let o=r.match;o||(o=r.match=Vs(r.path));const a=o(n);if(!a)continue;if(r.redirect){const l=new E;K(!0,l,t),l.path=r.redirect;const u={route:l,find:void 0};return this[it](u)?(e.route=u.route,e.find=u.find,t.template&&e.find&&(e.find={...e.find},e.find.path=t.path),!0):!1}if(t.params=t.params??{},K(!0,t.params,a.params),t.query){const l=t.query;if(typeof l=="string"){const u={},f=l.split("&");for(let c of f){const h=c.split("=");if(h.length!==2)continue;const y=decodeURIComponent(h[0].trim()),m=decodeURIComponent(h[1].trim());u[y]=m}K(!0,t.params,u)}else typeof l=="object"&&K(!0,t.params,l)}return e.find=r,t.template&&e.find&&(e.find={...e.find},e.find.path=t.path),!0}else if(i===r.name){t.params=t.params??{};const o=ks(r.path);return t.path=o(t.params),e.find=r,t.template&&e.find&&(e.find={...e.find},e.find.name=t.name),!0}}}catch(r){console.error(r.message,r),typeof t.error=="function"&&t.error(r.message)}return!1}[N](e){let t=null;if(Array.isArray(e))if(t=new E,typeof e[0]=="object")t=E.from(e[0]);else for(let r=0;r<e.length;r++)r===0?e[r].charAt(0)==="/"?t.path=e[r]:t.name=e[r]:r===1?t.params=e[r]:r===2?t.root=e[r]:r===3&&K(!1,t,e[r]);else typeof e=="object"?t=E.from(e):typeof e=="string"&&(t=new E,e.charAt(0)=="/"?t.path=e:t.name=e);if(t){if(t.path){let r=t.path.indexOf("?");r!==-1&&r<t.path.length-1&&(t.query=t.path.substring(r+1),t.path=t.path.substring(0,r))}t.root=t.root??Z,t.opsType=t.opsType??this.options.defaultOperationType??j.Push,t.traceless&&!t.historyUpdatePolicy&&(t.historyUpdatePolicy="traceless")}return t}push(...e){const t=this[N](e);return t?(t.opsType=j.Push,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[L]("resolve route fail",t),this)}put(...e){const t=this[N](e);return t?(t.opsType=j.Put,t.historyUpdatePolicy=t.historyUpdatePolicy??"traceless",this.to(t)):(this[L]("resolve route fail",t),this)}replace(...e){const t=this[N](e);return t?(t.opsType=j.Replace,t.historyUpdatePolicy=t.historyUpdatePolicy??"replace",this.to(t)):(this[L]("resolve route fail",t),this)}append(...e){const t=this[N](e);return t?(t.opsType=j.Append,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[L]("resolve route fail",t),this)}remove(e,t){return new Promise(r=>{this[Re].post(n=>{try{if(this[R].length===0){n.resolve(),r(!1);return}let i=-1,o,a=[];if(e){if(e.root?o=e.root:o=this[R][0].root??Z,e.all)for(let u=this[R].length-1;u>0;u--){let f=this[R][u];f.opsType===j.Append&&f.root===o&&(a.splice(0,0,f),i=u-1)}else if(e.until)for(let u=this[R].length-1;u>0;u--){let f=this[R][u];if(f.opsType===j.Append&&f.root===o){if(e.until.charAt(0)==="/"&&e.until===f.path){i=u;break}else if(e.until===f.name){i=u;break}a.splice(0,0,f)}}}else{o=Z;let u=this[Hr](this[W]);u&&(o=u.name);for(let f=this[R].length-1;f>0;f--){let c=this[R][f];if(c.opsType===j.Append&&c.root===o){a.push(c),i=f-1;break}}}if(a.length===0){let u="can not find route";console.warn(u),n.resolve(u),r(!1);return}let l=null;if(i!==-1&&(l=this[R][i]),this[Ne](a)){if(t===!1)return n.resolve(),r(!0),!0;const u=()=>(n.resolve(),r(!0),!0),f=this[R].length;if(l&&E.isSame(l,this[R][f-1])){this[C]?.goBack(l,u);return}u()}}catch(i){this[L](i),n.resolve(),r(!1)}})})}open(...e){let t=this[N](e);return t?(t.opsType=j.Open,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[L]("resolve route fail",t),this)}close(e){return this[Re].post(t=>{try{let r=this[N](e);if(!r){t.reject("resolve route fail");return}let n=[];for(let i=0;i<this[R].length;i++){let o=this[R][i];if(o.root===r.root){if(!r.path&&!r.name){n.push(o);continue}if(r.path&&r.path===o.path){n.push(o);break}else if(r.name&&r.name===o.name){n.push(o);break}}}if(n.length===0){t.resolve();return}this[Ne](n)&&this[ot](),t.resolve()}catch(r){this[L](r),t.resolve()}}),this}to(...e){let t=this[N](e);if(!t)return this[L]("resolve route fail",t),this;let r=this[He].acquire(t);return r==null?(this[L]("route forbid",t),this):(this[Re].post(n=>{try{let i=this[Vt](t);this[Wt](i),this[Jt](i),this[zt](i),i.wait((o,a)=>{const l=o.session.to;if(o.session.updateResult&&o.session.updateResult.status==="success")try{let u=E.clone(l,!0);const f=new $r(u,this[at]());l.historyUpdatePolicy==="replace"?this[C]?.replace(f):l.historyUpdatePolicy==="traceless"?this[C]?.setRouteMark(f):this[C]?.push(f)}catch(u){console.error(u.message,u)}if(this[He].release(r),this[ot](l),typeof t.success=="function")try{Reflect.apply(t.success,{},[])}catch(u){console.error(u.message,u)}this[me]===!1&&this[ct](!0),n.resolve()},(o,a)=>{this[He].release(r),a!==null&&this[L](a,t),this[me]===!1&&this[ct](!1),n.resolve()})}catch(i){this[He].release(r),this[L](i,t),n.resolve()}}),this)}back(e=1){this[C]?.go(-e,!1)}[Vr](e){return(t,r)=>{if(typeof t=="boolean")e.session.redirect=!1,t?e.resolve():e.reject(r??null);else if(t){const n=this[N](t);if(n){const i=e.session.to;n.success=i.success,n.error=i.error,e.session.to=n,e.session.redirect=!0,e.session.routeModel=null,e.resolve()}else e.session.redirect=!1,e.reject("route resolve fail")}else e.session.redirect=!1,e.resolve()}}[Vt](e){let t=this[R].length>0?this[R][0]:void 0,r=new Je(e,t),n={route:e,find:null};return this[it](n),n.find&&(r.routeModel=n.find,e.matched=sn(n.find),Array.isArray(e.matched)&&e.matched.length>0&&(e.meta=n.find.layers[0].models[0].meta)),new _e(r)}[Wt](e){for(let t of this[Le])e.post(r=>{const n=this[Vr](r);Reflect.apply(t,{},[r.session.to,r.session.from,n,r.session])})}[zt](e){e.post(t=>{for(let r of this[Me])try{Reflect.apply(r,{},[t.session.to,t.session.from,t.session])}catch(n){console.error(n.message,n)}t.resolve()})}[Wr](e,t){for(let r of this[Ie])try{Reflect.apply(r,{},[e,t])}catch(n){console.error(n.message,n)}typeof e.destroy=="function"&&Reflect.apply(e.destroy,e,[])}[Jt](e){e.post(t=>{let r=t.session.to,n=t.session.routeModel;if(n==null){let o={route:r,find:null};if(this[it](o))n=o.find,t.session.routeModel=n;else if(this[ft])n=this[ft];else{t.reject(`not find route model, path:${r.path??r.name}`);return}}let i=Je.from(t.session);this[Dr](r,n,i).then(o=>{this[W],t.session.updateResult=o??{status:"success",message:""},t.resolve()},o=>{t.reject(o)})})}[Ne](e){if(e.length==0)return!0;let t=this[W],r=[];for(let n of e){let i=this[Nt](t,n);i!=null&&r.push({...i,route:n})}if(r.length==0)return this[L]("can not find view index"),!1;for(let n of r.reverse())this[de](t,{x:n.x,y:n.y},[n.route.index??0],!0);return!0}[Nt](e,t){const r=t.root??Z;let n;for(let i=0;i<e.layers.length;i++){const o=e.layers[i];for(let a=o.views.length-1;a>=0;a--){const l=o.views[a];if(l[G]&&l[tt]===r)return n={x:a,y:i},n}}return null}[Hr](e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}[de](e,t,r=null,n=!0){if(t.y>=e.layers.length||t.x>=e.layers[t.y].views.length)return;let i=e.layers[t.y].views[t.x],o=!1,a=[],l=!1,u=[...i.slots.value];for(let c=u.length-1;c>=0;c--){let h=u[c];(!r||r.indexOf(h.index)!=-1)&&(h.route&&i[G]&&(this[Oe](h.route),h.active===!0&&h.route.opsType==j.Append&&(l=!0)),a.push(new B(i,h.index,t.y)),u.splice(c,1))}if(u.length==0)n?i.slots.value=u:e.layers[t.y].views.splice(t.x,1);else{if(l){let c=u.length-1,h=u[c];h.active=!0,h.route&&(h.route.active=h.active)}i.slots.value=u}e.layers[t.y].views.length==0&&(o=!0);let f=t.y+1;for(;f<e.layers.length;f++){let c=e.layers[f].views,h=[];for(let y=c.length-1;(o||a.length>0)&&y>=0;y--){let m=c[y];if(m[he]&&(o||B.include(a,m[he]))){let g=m.slots.value;for(let p=g.length-1;p>=0;p--){let v=g[p];v.route&&m[G]&&this[Oe](v.route),h.push(new B(m,v.index,f)),g.splice(p,1)}e.layers[f].views.splice(y,1)}}a=h,e.layers[f].views.length==0&&(o=!0)}}restore(e){if(!e||this[V].length==0){let t=this[W];if(t.layers.length>0){let r=t.layers[0].views;r.length>0&&(r[0].slots.value=[])}return this[R]=[],this[ot](),Promise.resolve()}else return new Promise((r,n)=>{let i=null,o=!1;for(let a=0;a<e.length;a++){const l=e[a];this[Re].post(u=>{const f=this[Vt](l);this[Wt](f),this[Jt](f),this[zt](f),f.wait((c,h)=>{i=c.session.to,o=c.session.redirect,u.resolve()},(c,h)=>{i=null,h!==null&&this[L](h),u.resolve()})})}this[Re].post(a=>{if(i&&o===!0){const l=E.clone(i,!0),u=new $r(l,this[at]());this[C]?.replace(u)}a.resolve(),r()})})}[Dr](e,t,r){const n=e.updateType??et.Part;return this[Ur](t).then(()=>{const o=this[kr](t,e,r,n);if(o.status==="error")throw Error(o.message);return o})}[Ur](e){let t=[];for(let r=0;r<e.layers.length;r++){let n=e.layers[r];for(let i=0;i<n.models.length;i++){let o=n.models[i];o.isResolved||t.push(o.resolve())}}return t.length>0?Promise.all(t):Promise.resolve()}[kr](e,t,r,n){if(e.layers[0].models.length!==1)return{status:"error",message:"illegal route structure(multi root node)"};const i=e.layers[0].models[0];let o=this[W],a=rn(o),l=t.root??Z,u;!a&&n==et.Part&&(u=this[Nt](o,t));let f,c=0;if(u==null||u==null)if(a||n===et.All){if(o.layers.length==0&&(o.layers[0]=new Lt),o.layers[0].views.length==0){let h=t.root??Z;f=new $e(h,!0,null),o.layers[0].views=[f]}else f=o.layers[0].views[0];u={x:0,y:0}}else{let h=t.slot;if(!h)return{status:"error",message:"can not rebuild view(because not route slot)"};let y=h.level;if(y>o.layers.length)return{status:"error",message:"can not insert view(override level)"};let m;if(h.rootName){let g=o.layers[y-1];for(let p of g.views){if(p[G]&&p.name===h.rootName){m=new B(p,h.rootIndex??0,y-1);break}if(p[Q]&&p[Q].view.name===h.rootName&&p[Q].index===h.rootIndex){m=p[Q];break}}}if(!m)return{status:"error",message:"can not insert view(not find root node ref)"};f=new $e(l,!0,m),o.layers[y].views.push(f),u={x:o.layers[y].views.length-1,y}}else f=o.layers[u.y].views[u.x];if(c=u.y,f[G]=!0,t.opsType===j.Append){t.index=t.index??ne.get(),t.active=!0;let h=f.slots.value;if(h.length>0){let v=h[h.length-1];v.active=!1,v.route&&(v.route.active=v.active)}let y=new oe(t,i,t.index,!0);f.slots.value=[...h,y];let m=c+1,g=1,p=new B(f,t.index,c);this[le](o,m,e,g,p)}else if(t.opsType===j.Open){let h=f.slots.value;const y=t.active??!0;let m=!1;for(let g of h){if(g.route!==null&&E.isSameForRouteModel(g.route,t)){if(g.active===y)return t.index=g.index,t.active=y,g.route=t,{status:"no-change",message:""};g.active=y,m=!0,t.index=g.index,t.active=y,g.route=t}else y&&(g.active=!1);g.route&&(g.route.active=g.active)}if(!m){t.index=t.index??ne.get(),t.active=y;let g=new oe(t,i,t.index,y);h.push(g);let p=c+1,v=1,b=new B(f,t.index,c);this[le](o,p,e,v,b)}f.slots.value=[...h]}else{let h=f.slots.value;if(h.length==0){t.index=t.index??ne.get(),t.active=!0,f.slots.value=[new oe(t,i,t.index)];let y=c+1,m=1,g=new B(f,t.index,c);this[le](o,y,e,m,g)}else{let y=h[0];if(y.model!==i){this[de](o,u,null,!0),t.index=t.index??ne.get(),t.active=!0,f.slots.value=[new oe(t,i,t.index)];let m=c+1,g=1,p=new B(f,t.index,c);this[le](o,m,e,g,p)}else{y.route!==null&&this[Oe](y.route);let m=!1;const g=t.active??!0;y.active!==g&&(y.active=g,m=!0),t.active=g,t.index=y.index,y.route=t;let p=[];for(let O=1;O<h.length;O++)p.push(h[O].index);p.length>0?this[de](o,u,p,!0):m&&(f.slots.value=[...h]);let v=[new B(f,t.index,c)],b=c+1,q=1,S=new B(f,t.index,c);for(;v.length>0&&b<o.layers.length&&q<e.layers.length;b++,q++){let O=[];for(let F=0;F<o.layers[b].views.length;F++){let A=o.layers[b].views[F];A[he]&&B.include(v,A[he])&&O.unshift(F)}let T=[];for(let F of O){let A=o.layers[b].views[F],X=e.layers[q].models,D;for(let U=0;U<X.length;U++)if(A.name===X[U].name){D=X[U];break}if(!D)this[de](o,{x:F,y:b},null,!1);else{let U=A.slots.value;if(U.length==0){let re=0;A.slots.value=[new oe(null,D,re)];let Y=b+1,se=q+1;this[le](o,Y,e,se,S)}else{let re=U[0];if(re.model!==D){this[de](o,{x:F,y:b},null,!0),A.slots.value=[new oe(null,D,0)];let Y=b+1,se=q+1;this[le](o,Y,e,se,S)}else{A[G]&&re.route!==null&&this[Oe](re.route);let Y=[];for(let se=1;se<U.length;se++)Y.push(U[se].index);Y.length>0&&this[de](o,{x:F,y:b},Y,!0),T.push(new B(A,re.index,b))}}A[G]=!1}}v=T}this[le](o,b,e,q,S)}}}if(f&&f[Q]){let h=f[Q];h&&(t.slot=new _s(l,c,h?.view.name,h?.index??0))}return r.to=void 0,r.routeModel=void 0,t.session=r,this[Br](t),{status:"success",message:""}}[le](e,t,r,n,i){let o=n,a=t;for(;a<e.layers.length&&o<r.layers.length;a++,o++){let l=e.layers[a].views;for(let u of r.layers[o].models){let f=new $e(u.name,!1,i),c=new oe(null,u);f.slots.value=[c],l.push(f)}}for(;o<r.layers.length;o++){let l=new Lt;l.views=[];for(let u of r.layers[o].models){let f=new $e(u.name,!1,i),c=new oe(null,u);f.slots.value=[c],l.views.push(f)}e.layers.push(l)}}[mr](e,t,r,n,i,o){if(t<0||t>this[W].layers.length)return null;if(t<this[W].layers.length){let f=this[W].layers[t],c=null;for(let h of f.views){let y=!1;if(r!==null?(y=h.name===e&&h[Q]?.view===r,y&&n!==-1&&(y=h[Q]?.index===n)):y=h.name===e,!!y){i!==null&&(h[he]={view:i,index:o,level:t-1}),c=h;break}}if(c!==null)return c}let a=null,l=null;i!==null&&(i[G]?a={view:i,index:o,level:t-1}:a=i[Q],l={view:i,index:o,level:t-1});let u=new $e(e,!0,a);if(u[he]=l,t==this[W].layers.length){let f=new Lt;f.views=[u],this[W].layers.push(f)}else this[W].layers[t].views.push(u);return u}}const on="fox-router-view",ln="fox-router-link";function zr(s,e=!1){let t=null;return e?t=s.showFromClass??s.enterFromClass:t=s.enterFromClass,t||(t=s.transitionName,t?e?`${t}-show-from`:`${t}-enter-from`:null)}function Jr(s,e=!1){let t=null;return e?t=s.showActiveClass??s.enterActiveClass:t=s.enterActiveClass,t||(t=s.transitionName,t?e?`${t}-show-active`:`${t}-enter-active`:null)}function an(s,e=!1){let t=null;return e?t=s.showToClass??s.enterToClass:t=s.enterToClass,t||(t=s.transitionName,t?e?`${t}-show-to`:`${t}-enter-to`:null)}function Gr(s,e=!1){let t=null;return e?t=s.hideFromClass??s.leaveFromClass:t=s.leaveFromClass,t||(t=s.transitionName,t?e?`${t}-hide-from`:`${t}-leave-from`:null)}function Qr(s,e=!1){let t=null;return e?t=s.hideActiveClass??s.leaveActiveClass:t=s.leaveActiveClass,t||(t=s.transitionName,t?e?`${t}-hide-active`:`${t}-leave-active`:null)}function un(s,e=!1){let t=null;return e?t=s.hideToClass??s.leaveToClass:t=s.leaveToClass,t||(t=s.transitionName,t?e?`${t}-hide-to`:`${t}-leave-to`:null)}function fn(s,e=!1){let t=null;return e?t=s.beforeShow??s.beforeEnter:t=s.beforeEnter,t}function cn(s,e=!1){let t=null;return e?t=s.show??s.enter:t=s.enter,t}function hn(s,e=!1){let t=null;return e?t=s.afterShow??s.afterEnter:t=s.afterEnter,t}function yn(s,e=!1){let t=null;return e?t=s.showCancelled??s.enterCancelled:t=s.enterCancelled,t}function dn(s,e=!1){let t=null;return e?t=s.beforeHide??s.beforeLeave:t=s.beforeLeave,t}function mn(s,e=!1){let t=null;return e?t=s.hide??s.leave:t=s.leave,t}function pn(s,e=!1){let t=null;return e?t=s.afterHide??s.afterLeave:t=s.afterLeave,t}function gn(s,e=!1){let t=null;return e?t=s.hideCancelled??s.leaveCancelled:t=s.leaveCancelled,t}function Gt(s){let e,t=s.duration;return typeof t=="object"?e={enter:t.enter??-1,leave:t.leave??-1,show:t.show??-1,hide:t.hide??-1}:(typeof t=="string"&&(t=t.length==0?-1:Number(t)),e={enter:t,leave:t,show:t,hide:t}),e}function Se(s,e){s.classList.contains(e)||s.classList.add(e)}function xe(s,e){s.classList.remove(e)}const vn=ue&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;function ht(s){vn(s)}function M(s,e,t){x(e)&&(s==null&&(s={}),Reflect.apply(e,s,t))}function Xr(s,e,t,r=-1,n,i,o,a){if(x(i)){if(n!==void 0&&n>=0){setTimeout(()=>{Reflect.apply(i,s,[e,t,r]),x(a)&&Reflect.apply(a,s,[])},n);return}const l=["animationend","transitionend",Ge],u=f=>{const c=f.target||f.srcElement,h=f.currentTarget;c===h&&(l.forEach(y=>{Be(e,y,u)}),Reflect.apply(i,s,[e,t,r]))};l.forEach(f=>{ke(e,f,u)})}if(x(o)){const l="animationcancel",u=f=>{const c=f.target||f.srcElement,h=f.currentTarget;c===h&&(Be(e,l,u),Reflect.apply(o,s,[e,t,r]))};ke(e,l,u)}}function yt(s){return!ue||s===null?!1:s.opsType===j.Append||s.opsType===j.Open}function Yr(s,e,t,r={},n,i=-1){if(e||yt(n)){const o=zr(r,e);o&&Se(t,o);const a=Jr(r,e);a&&Se(t,a);const l=fn(r,e);M(s,l,[t,e,n,i])}}function Zr(s,e,t,r={},n,i,o,a){if(!yt(i)&&!e){x(a)&&a(s,a,[t]);return}const l=zr(r,e),u=Jr(r,e),f=an(r,e),c=cn(r,e),h=hn(r,e),y=yn(r,e);if(!l&&!u&&!f&&!c){x(a)&&a(s,a,[t]);return}ht(()=>{Xr(s,t,i,o,n,()=>{u&&xe(t,u),f&&xe(t,f),x(h)&&M(s,h,[t,e,i,o]),x(a)&&a(s,a,[t])},()=>{x(y)&&M(s,y,[t,e,i,o])}),l&&xe(t,l),f&&Se(t,f),x(c)&&M(s,c,[t,e,i,o])})}function es(s,e,t,r={},n,i=-1){if(e||yt(n)){const o=Gr(r,e);o&&Se(t,o);const a=Qr(r,e);a&&Se(t,a);const l=dn(r,e);M(s,l,[t,e,n,i])}}function ts(s,e,t,r={},n,i,o,a,l){if(!yt(o)&&!e){!e&&x(i)&&i();return}const u=Gr(r,e),f=Qr(r,e),c=un(r,e),h=mn(r,e),y=pn(r,e),m=gn(r,e);if(!u&&!f&&!c&&!h){!e&&x(i)&&i();return}ht(()=>{Xr(s,t,o,a,n,()=>{f&&xe(t,f),c&&xe(t,c),x(y)&&M(s,y,[t,e,o,a]),x(l)&&M(s,l,[t]),!e&&x(i)&&i()},()=>{x(m)&&M(s,m,[t,e,o,a]),x(l)&&M(s,l,[t]),!e&&x(i)&&i()}),u&&xe(t,u),c&&Se(t,c),x(h)&&M(s,h,[t,e,o,a])})}function Qt(s,e={},t,r=-1){const n=e.mode??"default",i=Gt(e);return{mode:n,persisted:!1,beforeEnter:a=>{Yr(s,!1,a,e,t,r)},enter:a=>{Zr(s,!1,a,e,i.enter,t,r)},leave:(a,l)=>{es(s,!1,a,e,t,r),ts(s,!1,a,e,i.leave,l,t,r)},clone:a=>Qt(s,e,t,r)}}function rs(s){return s.el}function wn(s,e,t={},r,n,i,o){if(i===!0){const a=rs(e);if(a==null)return;const l=Gt(t);Yr(s,!0,a,t,r,n),Zr(s,!0,a,t,l.show,r,n,u=>{x(o)&&M(s,o,[u])})}else x(o)&&M(s,o,[])}function bn(s,e,t={},r,n,i,o){if(i===!0){const a=rs(e);if(a==null)return;const l=Gt(t);es(s,!0,a,t,r,n),ts(s,!0,a,t,l.hide,null,r,n,u=>{x(o)&&M(s,o,[u])})}else x(o)&&M(s,o,[])}function Rn(s,e={}){ht(()=>{for(let t=0;t<s.length;t++)Reflect.apply(s[t],e,[])})}function ss(s,e={},t,r=-1){return{mode:e.mode??"default",persisted:!1,beforeEnter:o=>{Ve(vr,{},o)},enter:o=>{Ve(wr,{},o)},leave:(o,a)=>{Ve(br,{},o),ht(()=>{const l=u=>{const f=u.target||u.srcElement,c=u.currentTarget;f===c&&(Be(o,Ge,l),a&&Reflect.apply(a,s,[]))};ke(o,Ge,l),Ve(Rr,{},o)})},clone:o=>ss(s,e,t,r)}}function ae(s,e,t){return typeof s=="function"?Reflect.apply(s,{},[e,t]):s}function Xt(s,e){if(!s)return null;const t=s(e);return t.length===1?t[0]:t}function Pe(s,e){return typeof e=="function"?e(s):s}class Sn{node;state;constructor(e,t){this.node=e,this.state=t}}const Yt=w.defineComponent({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(){return{}}},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewInactiveClass:{type:[String,Function],required:!1},transition:{type:[Boolean,String,Function],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},beforeEnter:{type:Function,required:!1},enter:{type:Function,required:!1},afterEnter:{type:Function,required:!1},enterCancelled:{type:Function,required:!1},beforeLeave:{type:Function,required:!1},leave:{type:Function,required:!1},afterLeave:{type:Function,required:!1},leaveCancelled:{type:Function,required:!1},beforeShow:{type:Function,required:!1},show:{type:Function,required:!1},afterShow:{type:Function,required:!1},showCancelled:{type:Function,required:!1},beforeHide:{type:Function,required:!1},hide:{type:Function,required:!1},afterHide:{type:Function,required:!1},hideCancelled:{type:Function,required:!1}},setup(s,e){const t=w.getCurrentInstance();if(t===null||t.proxy===null){console.error("instance or instance.proxy not exist");return}const r=s.multi===!0,n=w.inject(Ze,null),i=w.inject($t,0),o=w.inject(Ar,null),a=w.inject(jt,-1);let l=null;const u=s.modelSlot;if(u){if(w.provide($t,i+1),w.provide(jt,u.index),w.provide(qt,u.index),!u.route){console.warn("child view render error, route not exist");return}const h=Xe(t.proxy,!0);Ls(h),Fr(h,()=>u.route??null)}else{if(n==null){console.error("router is not been injected");return}const c=s.name,h=w.inject(Tr,null),y=w.inject(qt,0);if(l=n[mr](c,i,o,a,h,y),l===null)return;w.provide(Tr,l);const m=l[G]===!0;if(m&&w.provide(Ar,l),!r&&(w.provide(jt,-1),w.provide($t,i+1),w.provide(qt,-1),m)){const g=Xe(t.proxy,!0);Fr(g,()=>{const p=l.slots.value;return p.length>0?p[0].route:null})}}const f={value:new Map};return w.onUnmounted(()=>{f.value&&f.value.clear()}),()=>{if(r){const c=new Map,h=[],y=l?.slots.value,m=[];for(let v=0;v<y.length;v++){const b=y[v],q=`${s.name}_${b.index}`,S=ae(s.transition,b.route,v)??!0,O={modelSlot:b};let T;e.slots.default?T=w.h(Yt,O,{default:e.slots.default}):T=w.h(Yt,O);const F={},A=ae(s.viewClass,b.route,v);typeof A=="string"&&A.length>0&&(F[A]=!0);const X=ae(s.viewActiveClass,b.route,v),D=ae(s.viewInactiveClass,b.route,v),U=f.value.get(q);if(typeof X=="string"&&X.length>0&&(F[X]=b.active),typeof D=="string"&&D.length>0&&(F[D]=!b.active),U&&b.active!==U.state){const z=U.node;b.active?m.unshift(()=>{const sr=()=>{let De=xr(z);De!=null&&Pr(De,_t.ACTIVATED)};wn(t,z,s,b.route,v,S,sr)}):m.push(()=>{const sr=()=>{const De=xr(z);De!=null&&Pr(De,_t.DEACTIVATED)};bn(t,z,s,b.route,v,S,sr)})}const re={class:F,key:q},Y=ae(s.viewTagProps,b.route,v);if(Y!==null&&typeof Y=="object"){const z=Pe(Y,n?.propsFilter);K(!0,re,z)}if(b.route?.viewTagAttrs&&typeof b.route?.viewTagAttrs=="object"){const z=Pe(b.route.viewTagAttrs,n?.propsFilter);K(!0,re,z)}const se=ae(s.viewTag,b.route,v),mt=w.h(se,re,{default:()=>[T]});if(c.set(q,new Sn(mt,b.active)),f.value.delete(q),S===!0){const z=Qt(t,s,b.route,v);mt.transition=z}else if(S==="custom"){const z=ss(t,s,b.route,v);mt.transition=z}h.push(mt)}f.value=c,Rn(m,t);const g=ae(s.tag,null,-1),p={};return Object.assign(p,e.attrs),w.h(g,p,{default:()=>h})}else if(u!=null){const c=u.model,h={};if(c.props){if(typeof c.props=="object"){const m=Pe(c.props,n?.propsFilter);K(!1,h,m)}else if(c.props===!0&&typeof u.route?.params=="object"){const m=Pe(u.route.params,n?.propsFilter);K(!1,h,m)}}const y=w.h(c.component,h);return Xt(e.slots.default,{Component:y,route:u.route})??y}else{const c=l.slots.value;if(c.length>0){const h=c[0],y=h.route??(t.proxy&&Kt(t.proxy))??null,m=h.model,g={};if(m.props){if(typeof m.props=="object"){const b=Pe(m.props,n?.propsFilter);K(!1,g,b)}else if(m.props===!0&&typeof y?.params=="object"){const b=Pe(y.params,n?.propsFilter);K(!1,g,b)}}const p=w.h(m.component,g);if(ae(s.transition,y,-1)??!0){const b=Qt(t,s,y,-1);p.transition=b}return Xt(e.slots.default,{Component:p,route:y})??p}else return Xt(e.slots.fallback,{})}}}});function xn(s){if(!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)&&!s.defaultPrevented&&!(s.button!=null&&s.button!==0)){if(s.currentTarget&&s.currentTarget.getAttribute){const e=s.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return s.preventDefault&&s.preventDefault(),!0}}function Pn(s,e){return s==null||e==null?!1:!!(s===e||s.path&&s.path===e.path||s.name&&s.name===e.name)}function En(s,e){return s==null||e==null?!1:!!(s.path&&e.path&&e.path.startsWith(s.path)||s.name&&s.name==e.name)}function Ee(s,e){return typeof s=="function"?Reflect.apply(s,{},[e]):s}let Cn=w.defineComponent({name:"RouterLink",inheritAttrs:!1,props:{tag:{type:[String,Object,Function],required:!1,default:"a"},to:{type:[String,Object,Function],required:!0},root:{type:String},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(s,e){const t=w.inject(Ze,null);return()=>{let r=Ee(s.to,null),n=Ee(s.tag,r);if(n==null){console.warn("can not resolve link tag");return}let i=null,o=null;t!==null&&(i=t[N](r),s.root&&(i.root=s.root),o=t.current);let a={},l=Ee(s.activeClass,i);if(typeof l=="string"&&l.length>0&&(a[l]=En(i,o)),Ee(s.exact,i)===!0){let h=Ee(s.exactActiveClass,i);typeof h=="string"&&h.length>0&&(a[h]=Pn(i,o))}let f={class:a};(n==="a"||n==="A")&&(f.href=i?.path??i?.name??"#"),K(!0,f,e.attrs);let c=Ee(s.event,i);if(typeof c=="string"){const h=y=>{if(t==null){console.warn("router is not been injected");return}if(i==null){console.warn("route is not been resolved");return}xn(y)&&t.to(i)};f[c]=h}return w.h(n,f,e.slots)}}});var I=(s=>(s[s.Loading=0]="Loading",s[s.Loaded=1]="Loaded",s[s.Defining=2]="Defining",s[s.Defined=3]="Defined",s))(I||{}),dt=(s=>(s[s.normal=0]="normal",s[s.factory=1]="factory",s))(dt||{});class Fn{register=new Map;constructor(){}get(e){return this.register.get(e)??null}set(e,t){this.register.set(e,t)}remove(e){let t=this.register.get(e);return this.register.delete(e),t??null}has(e){return this.register.has(e)}clear(){this.register.clear()}}class ns{moduleManager=new Fn;options={paths:{},alias:{},nature:[],timeout:3e3};set paths(e){this.options.paths=e}get paths(){return this.options.paths}set alias(e){this.options.alias=e}get alias(){return this.options.alias}set naturePaths(e){this.options.nature=e}get naturePaths(){return this.options.nature}set timeout(e){this.options.timeout=e}get timeout(){return this.options.timeout}_query;set query(e){this._query=e}get query(){return this._query}get head(){return Ue().head}constructor(){}setModule(e,t){const r={id:e,src:"",status:I.Defined};typeof t=="function"?(r.exports=t,r.type=dt.factory):r.exports=t,this.moduleManager.set(e,r)}removeModule(e){this.moduleManager.remove(e)}ensure(...e){const t=[];let r=e.length-1;const n={};typeof e[r]=="object"&&(Object.assign(n,e[r]),r--);let i=null;typeof e[r]=="function"&&(i=e[r],r--);for(let l=0;l<=r;l++)if(Array.isArray(e[l])){let u=e[l];for(let f=0;f<u.length;f++)u[f]&&t.push(this.resolvePath(u[f]))}else if(typeof e[l]=="string"){let u=e[l].split(",");for(let f=0;f<u.length;f++)u[f]&&t.push(this.resolvePath(u[f]))}const o=new An(t.length,(l,u)=>{if(o.isOK())try{typeof i=="function"&&Reflect.apply(i,{},u)}catch(f){console.error(f.message,f)}else try{console.error(l),typeof i=="function"&&Reflect.apply(i,{},[])}catch(f){console.error(f.message,f)}}),a=new _e;for(let l=0;l<t.length;l++){const u=new Tn(l,t[l],n,o);this.mount(a,u)}return this}remove(...e){let t=[],r=e.length-1,n={};typeof e[r]=="object"&&(Object.assign(n,e[r]),r--);let i=null;typeof e[r]=="function"&&(i=e[r],r--);for(let o=0;o<=r;o++)if(Array.isArray(e[o])){let a=e[o];for(let l=0;l<a.length;l++)a[l]&&t.push(this.resolvePath(a[l]))}else{let a=e[o].split(",");for(let l=0;l<a.length;l++)a[l]&&t.push(this.resolvePath(a[l]))}return t.forEach(o=>{this.unmount(o,n)}),typeof i=="function"&&Reflect.apply(i,{},[]),this}mount(e,t){if(t.src==="exports"){e.post(n=>{t.progress.work(!0,t.index,"exports"),n.resolve()});return}else if(t.src==="module"){e.post(n=>{t.progress.work(!0,t.index,"module"),n.resolve()});return}if(this.isNaturePath(t.src)){let n=t.params.jsPoint;n||(n=this.head),this.mountJS(e,t,n);return}else if(this.isNaturePath(t.src)){let n=t.params.cssPoint;n||(n=this.head),this.mountCSS(e,t,n);return}let r=this.getFileNamePostfix(t.src);if(r==="js"||r.length===0){let n=t.params.jsPoint;n||(n=this.head),this.mountJS(e,t,n);return}else if(r==="css"){let n=t.params.cssPoint;n||(n=this.head),this.mountCSS(e,t,n);return}}mountCSS(e,t,r){e.post(n=>{const i=t.src,o=this.moduleManager.get(i);if(o&&(o.status==I.Defined||o.status==I.Loaded)&&o.exports){o.type===dt.factory&&typeof o.exports=="function"?t.progress.work(!0,t.index,o.exports()):t.progress.work(!0,t.index,o.exports),n.resolve();return}const a=Ue(),l=a.createElement("link");if(Reflect.has(l,"onload"))l.onload=()=>{l.onload=null,l.onerror=null,t.progress.work(!0,t.index,t.src),n.resolve()},l.onerror=()=>{try{r.removeChild(l)}catch(c){console.error(c.message,c)}l.onload=null,l.onerror=null,t.progress.work(!1,t.index,null),n.reject()};else{const c={timeout:this.options.timeout??3e3,time:0,success:()=>{t.progress.work(!0,t.index,t.src),n.resolve()},error:()=>{try{r.removeChild(l)}catch(h){console.error(h.message,h)}t.progress.work(!1,t.index,null),n.resolve()}};setTimeout(()=>{is(l,c)},1)}let f=a.getElementById(i);f&&f.parentNode&&f.parentNode.removeChild(f),l.rel="stylesheet",l.type="text/css",l.id=i,l.href=i,r.appendChild(l)})}mountJS(e,t,r){e.post(n=>{const i=t.src;let o=this.moduleManager.get(i);if(o&&(o.status==I.Defined||o.status==I.Loaded)){if(o.exports){o.type===dt.factory&&typeof o.exports=="function"?t.progress.work(!0,t.index,o.exports()):t.progress.work(!0,t.index,o.exports),n.resolve();return}if(document.querySelector(`script[src='${i}`)){t.progress.work(!0,t.index,o.exports),n.resolve();return}}o={id:i,src:i,status:I.Loading},this.moduleManager.set(i,o);const l=Ue().createElement("script");if("onload"in l)l.onload=()=>{l.onload=null,l.onerror=null,o.status===I.Loading&&(o.status=I.Loaded,t.progress.work(!0,t.index,i)),n.resolve()},l.onerror=()=>{try{r.removeChild(l)}catch(c){console.error(c.message,c)}l.onload=null,l.onerror=null,this.moduleManager.remove(i),t.progress.work(!1,t.index,null),n.resolve()};else{const c=l;c.onreadystatechange=()=>{/loaded|complete/.test(c.readyState)&&(c.onreadystatechange=null,o.status==I.Loading&&(o.status=I.Loaded,t.progress.work(!0,t.index,i)),n.resolve())}}l.defer=!0,l.src=i;const f=_();f.define=this.createDefine(o,t),r.appendChild(l)})}unmount(e,t={}){const r=Ue(),n=this.getFileNamePostfix(e);if(n==="js"||n.length===0){const i=r.querySelector(`script[src="${e}"]`);i&&i.parentNode&&i.parentNode.removeChild(i),this.moduleManager.remove(e);return}else if(n==="css"){const i=r.querySelector(`style[href="${e}"]`);i&&i.parentNode&&i.parentNode.removeChild(i);return}}trimEmptyElement(e){let t=[];for(let r=0;r<e.length;r++){if(e[r]===void 0||e[r]===null)continue;const n=e[r].trim();n.length!==0&&t.push(n)}return t}createDefine(e,t){const r=this,n=function(...i){e.status=I.Defining;let o,a,l,u=i.length;u===1?(l=i[0],o=void 0):u===2?(l=i[1],Array.isArray(i[0])?(a=r.trimEmptyElement(i[0]),o=void 0):a=void 0):(o=i[0],a=r.trimEmptyElement(i[1]),l=i[2]),o&&(e.id=o,r.options.alias[o]=e.src),a&&a.length>0?r.ensure(a,(...f)=>{const c=f.map(h=>h==="exports"?((!e.exports||typeof e.exports!="object")&&(e.exports={}),e.exports):h==="module"?e:h);if(typeof l=="function"){const h=Reflect.apply(l,e,c);h&&typeof h=="object"&&(e.exports=h)}else e.exports=l;e.status=I.Defined,t.progress.work(!0,t.index,e.exports)}):(typeof l=="function"?e.exports=Reflect.apply(l,e,[]):e.exports=l,e.status=I.Defined,t.progress.work(!0,t.index,e.exports))};return n.amd=!0,n}resolvePath(e){try{if(e==="exports"||e==="module"||this.isNaturePath(e))return e;e=this.parserPath(e,!0);let t=this.getFileNamePostfix(e);t=t.toLowerCase();let r=this.createSearch(this.query);return e.indexOf("?")==-1?(t!=="js"&&t!=="css"&&(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("?");t==-1&&(t=e.length);let r=e.lastIndexOf(".",t);return r==-1?"":e.substring(r+1,t)}isNaturePath(e){if(!this.options.nature)return!1;if(typeof this.options.nature=="function")return this.options.nature(e);const t=this.options.nature;if(t&&Array.isArray(t))for(let r=0;r<t.length;r++){const n=t[r];if(e.indexOf(n)===0)return!0}return!1}parserPath(e,t){if(e.indexOf("http://")==0||e.indexOf("https://")==0||e.indexOf("file:///")==0)return e;if(e.indexOf("/")==0)return`${pt()}${e.slice(1)}`;if(e.indexOf("./")==0)return`${pt()}${e.slice(2)}`;if(e.indexOf("//")==0)return`${_().location.protocol}${e}`;if(t){let n=this.options.alias[e];if(!n){let i=e.indexOf("/");if(i==-1)n=e;else{let o=e.slice(0,i),a=this.options.paths[o];a?n=a+e.slice(i):n=e}}return this.parserPath(n,!1)}return`${pt()}${e}`}}function is(s,e){let t=s.sheet,r=!1;if(e.isOldWebKit)t&&(r=!0);else if(t)try{t.cssRules&&(r=!0)}catch(n){n.name==="NS_ERROR_DOM_SECURITY_ERR"&&(r=!0)}setTimeout(()=>{e.time+=20,r?e.success():e.timeout>e.timeout?e.error():is(s,e)},20)}class An{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,this.status===!0&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values.push(r)),this.size===0||this.status===!1)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(n){console.error(n.message,n)}}isOK(){return this.status}}class Tn{index;src;params;progress;constructor(e,t,r,n){this.index=e,this.src=t,this.params=r,this.progress=n}}const Zt=Symbol("fk"),er=Symbol("fbk"),tr=Symbol("fepk");function _n(s={}){const e=new nn(s),t=new Pt,r=new At,n=new ns,i={get router(){return e},get bus(){return t},get Bus(){return Pt},get EventProxy(){return At},get eventproxy(){return r},get EventChain(){return _e},get Require(){return ns},get require(){return n},get extend(){return K},get clone(){return ze},get isESModule(){return gt},install(o){o.provide(Ze,e),o.provide(Zt,i),o.provide(er,t),o.provide(tr,r),o.component(on,Yt),o.component(ln,Cn),Reflect.defineProperty(o.config.globalProperties,"$fox",{get(){return i}}),Reflect.defineProperty(o.config.globalProperties,"$router",{get(){return e}}),Reflect.defineProperty(o.config.globalProperties,"$bus",{get(){return t}}),Reflect.defineProperty(o.config.globalProperties,"$bus",{get(){return t}}),Reflect.defineProperty(o.config.globalProperties,"$eventProxy",{get(){return r}}),o.config.globalProperties.$fox_on=function(a,l,u=!1){r.on(a,l,u)},o.config.globalProperties.$fox_off=function(a,l){r.off(a,l)},o.config.globalProperties.$fox_once=function(a,l){r.once(a,l)},o.config.globalProperties.$fox_all=function(...a){let l=r;Reflect.apply(l.all,l,a)},o.config.globalProperties.$fox_trigger=function(a,...l){let u=r;Reflect.apply(u.trigger,u,[a,...l])},o.config.globalProperties.$fox_emit=function(a,...l){let u=r;Reflect.apply(u.trigger,u,[a,...l])},o.mixin({computed:{$route(){return Kt(this)}}}),e.init()}};return i}function rr(s){return s?s.$router:w.inject(Ze)}function Kn(s){return s||(s=w.getCurrentInstance()?.proxy??void 0),s?Kt(s):null}function $n(s){return s?s.$fox:w.inject(Zt)}function jn(s){return s?s.$bus:w.inject(er)}function qn(s){return s?s.$eventProxy:w.inject(tr)}function On(s){const e=rr(),t=(r,n,i)=>{try{Reflect.apply(s,{},[r,n])}catch(o){console.error(o)}i()};e.beforeEach(t),w.onUnmounted(()=>{e.removeBeforeEach(t)})}function Ln(s){const e=rr(),t=(r,n,i)=>{try{Reflect.apply(s,{},[r,n])}catch(o){console.error(o)}i()};e.afterEach(t),w.onUnmounted(()=>{e.removeAfterEach(t)})}d.Bus=Pt,d.EventChain=_e,d.EventProxy=At,d.FoxBeforeEnter=vr,d.FoxBeforeLeave=br,d.FoxEnter=wr,d.FoxLeave=Rr,d.FoxLeaveEnd=Ge,d.OperationType=j,d.Route=E,d.clone=ze,d.createFox=_n,d.createMemoryHistory=Nr,d.createWebHashHistory=Ir,d.createWebHistory=en,d.deleteContextValue=Os,d.extend=K,d.foxBusKey=er,d.foxEventProxyKey=tr,d.foxKey=Zt,d.injectContextValue=Tt,d.isArray=ls,d.isDate=fs,d.isESModule=gt,d.isEqual=Rt,d.isFunction=x,d.isMap=as,d.isNil=Ce,d.isObject=nr,d.isPlainObject=ir,d.isPromise=ys,d.isSet=us,d.isString=cs,d.isSymbol=hs,d.onAfterRouteUpdate=Ln,d.onBeforeRouteUpdate=On,d.onFoxActivated=Hs,d.onFoxInactivated=Ds,d.provideContextValue=qs,d.rawState=As,d.reactiveState=Es,d.sessionKey=ie,d.shallowReactiveState=Cs,d.toBoolean=wt,d.toNumber=gs,d.toTypeString=We,d.typeOf=bt,d.useBus=jn,d.useEventProxy=qn,d.useFox=$n,d.useRoute=Kn,d.useRouter=rr,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(m,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],y):(m=typeof globalThis<"u"?globalThis:m||self,y(m.Fox={},m.Vue))})(this,function(m,y){Object.defineProperty(m,Symbol.toStringTag,{value:"Module"});var ce=typeof window<"u",_=function(){return window},Be=function(){return window.document};function Ue(e,t,r,s=!1){e.addEventListener?e.addEventListener(t,r,s):e.attachEvent?e.attachEvent(`on${t}`,r):e[`on${t}`]=r}function vt(e,t,r){e.removeEventListener?e.removeEventListener(t,r):e.detachEvent?e.detachEvent(`on${t}`,r):e[`on${t}`]=null}var Ve=(e,t,r)=>{t=t??{bubbles:!1,cancelable:!1,detail:void 0};const s=document.createEvent("Events");let i=!0,n=!0;for(let o in t)o==="bubbles"?i=!!t[o]:o==="cancelable"?n=!!t[o]:s[o]=t[o];s.initEvent(e,i,n),(r??document).dispatchEvent(s)},pt=Array.isArray,ys=e=>We(e)==="[object Map]",ds=e=>We(e)==="[object Set]",ms=e=>e instanceof Date,S=e=>typeof e=="function",vs=e=>typeof e=="string",ps=e=>typeof e=="symbol",or=e=>e!==null&&typeof e=="object",gs=e=>or(e)&&S(e.then)&&S(e.catch),he=e=>e==null,ws=Object.prototype.toString,We=e=>ws.call(e),lr=e=>We(e)==="[object Object]",bs=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol";function ze(e){return e.__esModule||bs&&e[Symbol.toStringTag]==="Module"}var Rs=typeof Promise<"u"&&Promise.toString().indexOf("[native code]")!==-1;function A(...e){let t=e[0]!==void 0&&e[0]!==null?e[0]:{},r=1,s=e.length,i=!1;for(typeof t=="boolean"&&(i=t,t=e[r]??{},r++),typeof t!="object"&&(t={});r<s;r++)if(e[r]!==null&&e[r]!==void 0){let n=e[r];for(let o in n){let l=t[o],a=n[o];if(l!==a)if(i===!0&&a&&typeof a=="object"){let u;Array.isArray(a)?u=l&&Array.isArray(l)?l:[]:u=l&&typeof l=="object"?l:{},t[o]=A(i,u,a)}else a!==void 0&&(t[o]=a)}}return t}function ar(e,t,r=!1){if(typeof t!="object")return{};typeof e!="object"&&(e={});for(let s of Reflect.ownKeys(t)){let i=e[s],n=t[s];if(i!==n)if(typeof n=="object"){if(!Array.isArray(n)&&!lr(n))continue;i=ar(i,n,r),e[s]=i}else{if(typeof n=="function")continue;e[s]=n}}return e}var Se=class ir{static seed=new Date().getTime();static get(){let t=++ir.seed;return t>=Number.MAX_VALUE&&(ir.seed=0),t}},gt=Rs?Promise.resolve():null;function xe(e,...t){gt!==null?t&&t.length>0?gt.then(()=>{e(t)}):gt.then(e):t&&t.length>0?setTimeout(()=>{e(t)}):setTimeout(e)}function wt(e){return e==null?!1:typeof e=="boolean"?e:typeof e=="string"?e.toLocaleLowerCase()==="true":!!e}function Ss(e){return typeof e=="number"?e:Number(e)}var xs={"[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 bt(e){let t=Object.prototype.toString.call(e);return e==null?String(e):xs[t]||"object"}function Rt(e,t){if(e==t)return!0;if(e===void 0||t===void 0)return!1;let r=bt(e);if(r!==bt(t))return!1;if(r==="object"){let s=Object.keys(e),i=Object.keys(t);if(s.length!==i.length)return!1;for(let n=0;n<s.length;n++){let o=s[n],l=e[o],a=t[o];if(!Rt(l,a))return!1}return!0}else if(r==="array"){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s++){let i=e[s],n=t[s];if(!Rt(i,n))return!1}return!0}return!1}var ur=e=>{const t={};for(let r of Reflect.ownKeys(e)){let s=e[r];s&&!Array.isArray(s)&&typeof s=="object"&&(s=ur(s)),typeof r=="symbol"?t[String(r)]=s:t[r]=s}return t},Ps=/^Symbol\((.*)\)$/,fr=e=>{const t={};for(let r of Reflect.ownKeys(e)){let s=e[r];s&&!Array.isArray(s)&&typeof s=="object"&&(s=fr(s));const i=Ps.exec(r);if(i&&i[1]){const n=Symbol.for(i[1]);t[n]=s}else t[r]=s}return t};function cr(e,t){let r=null;return function(...s){r&&clearTimeout(r),r=setTimeout(()=>{r=null,Reflect.apply(e,null,[...s])},t)}}var hr=Symbol("idKey"),se=Symbol("valueKey"),P=Symbol("childrenKey"),N=Symbol("growKey"),yr=class{[N]=!0;[hr];[se]=(0,y.ref)();[P]=new Map;constructor(e){this[hr]=e}},Fs=class{get(e,t){if(t=="value")return e[se].value;if(t==="grow")return e[N];let r=e[P].get(t);if(r)return Pe(r);if(e[N])return r=xt(t),r[N]=e[N],e[P].set(t,r),Pe(r)}set(e,t,r){return t=="value"?(e[se].value=r,!0):t==="grow"?(e[N]=wt(r),!0):r==null?(e[P].delete(t),!0):(console.error(`[Fox]illegal property:${t}`),!1)}deleteProperty(e,t){return t==="value"||t=="grow"?(console.error(`[Fox]can not delete property:${String(t)}`),!1):(e[P].delete(t),!0)}},St="__proxy__";function xt(e){const t=new yr(e);return Reflect.set(t,St,new Proxy(t,new Fs)),t}function Pe(e){return Reflect.get(e,St)}var Cs=class{name="";persistPolicy="memory";storage;initFlag=!1;state={};constructor(e={},t){if(e.persistPolicy&&e.persistPolicy!=="memory"&&he(e.name))throw new Error("name can not be empty, where persistPolicy is not memory.");this.name=e.name??"",this.persistPolicy=e.persistPolicy??"memory",this.storage=e.storage,t&&typeof t=="object"&&Object.assign(this.state,t)}init(e){this.restore(e),this.initFlag=!0}getStorage(){if(!this.persistPolicy||this.persistPolicy==="memory")return null;let e=null;if(this.persistPolicy==="custom")e=this.storage;else if(ce){const t=_();e=this.persistPolicy==="session"?t.sessionStorage:t.localStorage}return e}saveState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null||!this.state)return;const t=`_bus_${this.name}`,r=JSON.stringify(this.state??{});e.setItem(t,r)}removeState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null||!this.state)return;const t=`_bus_${this.name}`;e.removeItem(t)}restore(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null)return;const r=`_bus_${this.name}`,s=t.getItem(r);if(s){const i=JSON.parse(s);Object.assign(this.state,i),Reflect.ownKeys(this.state).forEach(n=>{if(typeof n!="string")return;const o=this.state[n],l=n.split(/\//g);l.push(o),Reflect.apply(e.put,e,l)})}}put(e){if(this.initFlag&&this.persistPolicy!=="memory")try{const t=e.length,r=e.slice(0,t-1).join("/"),s=e[t-1];this.state[r]=s,this.saveState()}catch(t){console.error(t)}}remove(e){if(this.initFlag&&this.persistPolicy!=="memory")try{const t=e.length,r=e.slice(0,t-1).join("/"),s={};Reflect.ownKeys(this.state).forEach(i=>{typeof i=="string"&&(i===r||i.startsWith(r)||(s[i]=this.state[i]))}),this.state=s,this.saveState()}catch(t){console.error(t)}}clear(){if(this.initFlag)try{this.state={},this.removeState()}catch(e){console.error(e)}}},dr=class extends yr{_persistHandler;constructor(e={},t){super("__root__"),this._persistHandler=new Cs(e,t),this._persistHandler.init(this)}put(...e){let t=e.length;if(t<2)return console.error("[Fox]参数至少包括一个(key, value)"),!1;let r=this;for(let s=0;s<t-1;s++){let i=e[s],n;r[P].has(i)?n=r[P].get(i):(n=xt(i),r[P].set(i,n)),r=n}return r[se].value=e[t-1],this._persistHandler.put(e),!0}get(...e){let t=e.length;if(t===0)return;let r=this;for(let s=0;s<t;s++){let i=e[s];if(r[P].has(i))r=r[P].get(i);else return}return r[se].value}remove(...e){let t=e.length;if(t==0)return!1;let r=this;for(let i=0;i<t-1;i++){const n=e[i];if(r[P].has(n))r=r[P].get(n);else return!1}const s=e[t-1];return r[P].has(s)?(r[P].delete(s),this._persistHandler.remove(e),!0):!1}contains(...e){const t=e.length;if(t==0)return!1;let r=this;for(let i=0;i<t-1;i++){let n=e[i];if(r[P].has(n))r=r[P].get(n);else return!1}const s=e[t-1];return r[P].has(s)}clear(){this[P].clear(),this._persistHandler.clear()}},Es=["put","get","contains","remove","clear","_persistHandler"];function mr(e){return Es.includes(e)}var _s=class{get(e,t){if(t=="value")return e[se].value;if(t==="grow")return e[N];if(t===P)return e[P];if(typeof t=="string"&&mr(t))return e[t];const r=String(t);let s=e[P].get(r);if(s)return Pe(s);if(e[N])return s=xt(r),s[N]=e[N],e[P].set(r,s),Pe(s)}set(e,t,r){return t=="value"?(e[se].value=r,!0):t==="grow"?(e[N]=wt(r),!0):mr(t)?!1:r==null?(e[P].delete(t),!0):(console.error(`[Fox]illegal property:${t}`),!1)}deleteProperty(e,t){return t==="value"||t=="grow"?(console.error(`[Fox]can not delete property:${String(t)}`),!1):(e[P].delete(t),!0)}};function As(e,t){const r=new dr(e,t),s=new _s,i=new Proxy(r,s);return Reflect.set(r,St,i),r}var Pt=new Proxy(dr,{construct(e,t){const r=t[0]??{},s=t[1];return Pe(As(r,s))}}),Ft=new WeakMap,Ct=e=>!e||typeof e!="object"?!0:Reflect.ownKeys(e).length===0,vr=class{name="";persistPolicy="memory";storage;constructor(e={}){if(e.persistPolicy&&e.persistPolicy!=="memory"&&he(e.name))throw new Error("name can not be empty, where persistPolicy is not memory.");this.name=e.name??"",this.persistPolicy=e.persistPolicy??"memory",this.storage=e.storage}getStorage(){if(!this.persistPolicy||this.persistPolicy==="memory")return null;let e=null;if(this.persistPolicy==="custom")e=this.storage;else if(ce){const t=_();e=this.persistPolicy==="session"?t.sessionStorage:t.localStorage}return e}saveState(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null||Ct(e))return;const r=`_state_${this.name}`,s=JSON.stringify(e??{});t.setItem(r,s)}removeState(){if(!this.persistPolicy||this.persistPolicy==="memory")return;let e=this.getStorage();if(e===null)return;const t=`_state_${this.name}`;e.removeItem(t)}restore(e){if(!this.persistPolicy||this.persistPolicy==="memory")return;let t=this.getStorage();if(t===null)return;const r=`_state_${this.name}`,s=t.getItem(r);if(s){const i=JSON.parse(s);Object.assign(e,i)}}};function pr(e,t,r){const s=new vr(r);s.restore(t);const i=a=>{const u=(0,y.toRaw)(a),f={};for(let c in u){const h=u[c];he(h)||(f[c]=h)}Ct(f)?s.removeState():s.saveState(f)};let n=null;r&&r.debounce===!1?n=i:n=cr(i,r&&r.debounceDelay?r.debounceDelay:250);const o=e?(0,y.shallowReactive)(t):(0,y.reactive)(t),l=(0,y.effectScope)(!0);return l.run(()=>{(0,y.watch)(o,a=>{const u=(0,y.toRaw)(a);n(u)})}),Ft.set(o,l),o}function js(e,t){return pr(!1,e,t)}function qs(e,t){return pr(!0,e,t)}function $s(e,t){const r=new vr(t);r.restore(e);const s=n=>{const o=(0,y.toRaw)(n),l={};for(let a in o){const u=o[a];he(u)||(l[a]=u)}Ct(l)?r.removeState():r.saveState(l)};let i=null;return t&&t.debounce===!1?i=s:i=cr(s,t&&t.debounceDelay?t.debounceDelay:250),new Proxy(e,{get(n,o){return n[o]},set(n,o,l){return n[o]=l,i(n),!0}})}function Ks(e,t){return $s(e,t)}function Ts(e){const t=Ft.get(e);t&&(Ft.delete(e),t.stop())}var Je=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),ks={type:0,value:""},Ls=/[a-zA-Z0-9_]/;function Ms(e){if(!e)return[[]];if(e==="/")return[[ks]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(d){throw new Error(`ERR (${r})/"${u}": ${d}`)}let r=0,s=r;const i=[];let n;function o(){n&&i.push(n),n=[]}let l=0,a,u="",f="";function c(){u&&(r===0?n.push({type:0,value:u}):r===1||r===2||r===3?(n.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),n.push({type:1,value:u,regexp:f,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),u="")}function h(){u+=a}for(;l<e.length;){if(a=e[l++],a==="\\"&&r!==2){s=r,r=4;continue}switch(r){case 0:a==="/"?(u&&c(),o()):a===":"?(c(),r=1):h();break;case 4:h(),r=s;break;case 1:a==="("?r=2:Ls.test(a)?h():(c(),r=0,a!=="*"&&a!=="?"&&a!=="+"&&l--);break;case 2:a===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+a:r=3:f+=a;break;case 3:c(),r=0,a!=="*"&&a!=="?"&&a!=="+"&&l--,f="";break;default:t("Unknown state");break}}return r===2&&t(`Unfinished custom RegExp for param "${u}"`),c(),o(),i}var gr="[^/]+?",Is={sensitive:!1,strict:!1,start:!0,end:!0},Os=/[.+*?^${}()[\]/\\]/g;function Ds(e,t){const r=A(!0,{},Is,t),s=[];let i=r.start?"^":"";const n=[];for(const u of e){const f=u.length?[]:[90];r.strict&&!u.length&&(i+="/");for(let c=0;c<u.length;c++){const h=u[c];let d=40+(r.sensitive?.25:0);if(h.type===Je.Static)c||(i+="/"),i+=h.value.replace(Os,"\\$&"),d+=40;else if(h.type===Je.Param){const{value:v,repeatable:p,optional:R,regexp:b}=h;n.push({name:v,repeatable:p,optional:R});const g=b||gr;if(g!==gr){d+=10;try{new RegExp(`(${g})`)}catch(L){throw new Error(`Invalid custom RegExp for param "${v}" (${g}): `+L.message)}}let K=p?`((?:${g})(?:/(?:${g}))*)`:`(${g})`;c||(K=R&&u.length<2?`(?:/${K})`:"/"+K),R&&(K+="?"),i+=K,d+=20,R&&(d+=-8),p&&(d+=-20),g===".*"&&(d+=-50)}f.push(d)}s.push(f)}if(r.strict&&r.end){const u=s.length-1;s[u][s[u].length-1]+=.7000000000000001}r.strict||(i+="/?"),r.end?i+="$":r.strict&&!i.endsWith("/")&&(i+="(?:/|$)");const o=new RegExp(i,r.sensitive?"":"i");function l(u){const f=u.match(o),c={};if(!f)return null;for(let h=1;h<f.length;h++){const d=f[h]||"",v=n[h-1];c[v.name]=d&&v.repeatable?d.split("/"):d}return c}function a(u){let f="",c=!1;for(const h of e){(!c||!f.endsWith("/"))&&(f+="/"),c=!1;for(const d of h)if(d.type===Je.Static)f+=d.value;else if(d.type===Je.Param){const{value:v,repeatable:p,optional:R}=d,b=v in u?u[v]:"";if(pt(b)&&!p)throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);const g=pt(b)?b.join("/"):b;if(!g)if(R)h.length<2&&(f.endsWith("/")?f=f.slice(0,-1):c=!0);else throw new Error(`Missing required param "${v}"`);f+=g}}return f||"/"}return{re:o,score:s,keys:n,parse:l,stringify:a}}function Hs(e,t){const r=Ds(Ms(e),t);return function(s){const i=r.parse(s);return i?{path:s,params:i}:null}}var wr="default",br=Symbol("sync"),T=Symbol("normalizeRoute");function Rr(e){let t=!1;return function(...r){if(!t)return t=!0,Reflect.apply(e,{},r)}}function Ns(e){let t=e.src;return new Promise((r,s)=>{const i=Rr(l=>{ze(l)&&(l=l.default),e.component=l,console.debug("success load async module"),r()}),n=Rr(l=>{`${l}`,console.debug("reject load async module"),s(l)});let o;try{o=t(i,n)}catch(l){n(l)}if(o)if(typeof o.then=="function")o.then(i,n);else{const l=o.component;l&&typeof l.then=="function"&&l.then(i,n)}})}var Bs=class{name;level;rootName;rootIndex=0;constructor(e,t,r,s){this.name=e,this.level=t,this.rootName=r,this.rootIndex=s}},Ge=class hs{to;routeModel;from;data={};constructor(t,r){this.to=t,this.from=r}static from(t){const r=new hs(t.to,t.from),s=t.data??{};return A(!0,r.data,s),r}static clear(t){for(let r in t)t[r]=void 0}},x=class nr{path;get fullPath(){const t=this.path??`${this.name}`;return`${this.root??"default"}!${t}`}alias;name;root;params;query;traceless;template;matched;meta;success;error;destroy;opsType;updateType;historyUpdatePolicy;viewTagAttrs;index;active;slot;static clone(t,r){let s=new nr;return ar(s,t,r),s}static isSame(t,r){return!t||!r?!1:t===r?!0:t.root!==r.root||t.index!==r.index?!1:t.path&&r.path&&t.path===r.path?!0:!!(t.name&&r.name&&t.name===r.name)}static isSamePathForRoute(t,r){return!t||!r?!1:t===r||t.path&&r.path&&t.path===r.path?!0:!!(t.name&&r.name&&t.name===r.name)}static from(t){let r=new nr;if(t==null)return r;let s=r;for(let n in t)s[n]=t[n];const i=Object.getOwnPropertySymbols(t);if(Array.isArray(i)&&i.length>0)for(let n of i)s[n]=t[n];return r}},Us=class{id;name;props;src;component;constructor(e,t,r){this.id=Se.get(),this.name=e,this.src=t,typeof t!="function"&&(this.component=t),this.props=r}get isResolved(){return this.component!==void 0}resolve(){return Ns(this)}},Sr=class{models=[]},Et=class{path;match;redirect;name;meta;matchedRoutes;layers=[]},C=(function(e){return 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})({}),_t=(function(e){return e[e.Part=0]="Part",e[e.All=1]="All",e})({}),B=Symbol("rootKey"),U=Symbol("rootNodeKey"),ie=Symbol("parentNodeKey"),Xe=Symbol("nameKey"),Y=class{model;route;active=!0;index=0;constructor(e,t,r=0,s=!0){this.route=e,this.model=t,this.index=r,this.active=s}},Fe=class{_slots;get slots(){return this._slots==null&&(this._slots=(0,y.shallowRef)([])),this._slots}get empty(){return this._slots==null||this._slots.value.length==0}[Xe];[B];[U]=null;[ie]=null;get name(){return this[Xe]}constructor(e,t,r){this[Xe]=e,this[B]=t,r&&(this[U]=r)}},O=class{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 s=e[r];if(s.view===t.view&&(t.index==-1||s.index===t.index)&&s.level===t.level)return!0}return!1}},At=class{views=[]},Vs=class{layers=[]},Ws=class{time;route},zs=class{forbidTime=300;submitRecorder=new Ws;isSameRoute(e,t){return e==null||t==null?!1: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){this.submitRecorder.time=t;return}return this.submitRecorder.route=e,this.submitRecorder.time=t,t}release(e){this.submitRecorder.time===e&&(this.submitRecorder.route=void 0)}},D=Symbol("chainKey"),k=Symbol("cursorKey"),jt=Symbol("$persistentModeKey"),E=Symbol("statusKey"),J=Symbol("argsKey"),Qe=Symbol("exArgsKey"),ye=Symbol("successFnsKey"),Ce=Symbol("errorFnsKey"),ne=Symbol("sessionKey"),G=Symbol("_go"),Ee=class{[D]=[];[k]=0;[jt]=!1;[E]="Free";[J]=[];[Qe]=[];[ye]=[];[Ce]=[];[ne];get session(){return this[ne]}constructor(e,t=!1){this[ne]=e,this[jt]=t}[G](e,...t){let r=this[E];if(this[E]="Busy",this[k]+=e,this[k]<0&&(this[k]=0),this[J]=t,r==="Exception"||r==="Reject"){let n=[{session:this[ne]},...this[Qe]];for(;this[Ce].length>0;)try{let o=this[Ce].shift();typeof o=="function"&&xe(()=>{Reflect.apply(o,{},n)})}catch(o){console.error(o.message,o)}return this[E]=r,this[D]=[],this[k]=0,this}else if(r==="Finished"||this[k]>=this[D].length){let n=[{session:this[ne]},...this[J]];for(;this[ye].length>0;){let o=this[ye].shift();typeof o=="function"&&xe(()=>{Reflect.apply(o,{},n)})}return this[E]="Free",this}if(this[k]>=this[D].length)return this[E]="Free",this;let s=this[D][this[k]];this[jt]||(this[D].splice(0,this[k]+1),this[k]=-1);let i=this[k]+1;try{let n=!1,o={go:(l,...a)=>{n||(n=!0,Reflect.apply(this[G],this,[l,...a]))},resolve:(...l)=>{n||(n=!0,Reflect.apply(this[G],this,[1,...l]))},reject:(...l)=>{n||(n=!0,Reflect.apply(this.reject,this,[...l]))},insert:l=>{n||(this[D].splice(i,0,l),i++)},session:this[ne]};xe(()=>{Reflect.apply(s,{},[o,...this[J]])})}catch(n){this.throw(n)}return this}go(e,...t){return Reflect.apply(this[G],this,[e,...t])}finish(...e){return this[E]="Finished",this[J]=e,Reflect.apply(this[G],this,[0])}reject(...e){return this[E]="Reject",this[Qe]=e,Reflect.apply(this[G],this,[0])}throw(...e){return this[E]="Exception",this[Qe]=e,Reflect.apply(this[G],this,[0])}reset(...e){this[E]="Busy",this[J]=e,this[D]=[],this[k]=0;let t=[{session:this[ne]},...this[J]];for(;this[ye].length>0;){let r=this[ye].shift();xe(()=>{Reflect.apply(r,this,t)})}return this[E]="Free",this}post(e){return this[E]==="Reject"||this[E]==="Exception"?this:(Array.isArray(e)?this[D]=[...this[D],...e]:this[D].push(e),this[E]==="Busy"?this:(Reflect.apply(this[G],this,[0,...this[J]]),this))}wait(e,t){return e&&typeof e=="function"&&this[ye].push(e),t&&typeof t=="function"&&this[Ce].push(t),this[E]==="Busy"?this:(Reflect.apply(this[G],this,[0,...this[J]]),this)}exception(e){return e&&typeof e=="function"&&this[Ce].push(e),this[E]==="Busy"?this:Reflect.apply(this[G],this,[0,...this[J]])}isFinish(){return this[E]=="Reject"||this[E]=="Free"&&this[k]>=this[D].length}},de=Symbol("_notifyChange"),qt=class{currentRoute;routes;constructor(e,t){this.currentRoute=e,this.routes=t}},oe=Symbol("historyChangeConsumerKey"),xr=Symbol("_navigateFirstRoute"),Ze=Symbol("_getRouteMark"),$t=Symbol("_getUrlSearch"),Kt=Symbol("_generateLocation"),Ye=Symbol("_setRouteMarkRecorder"),_e=Symbol("beforeRestoreFiltersKey"),Pr=Symbol("_beforeRestore"),Fr="Symbol(_fox_restore_point)";function et(e,...t){return typeof e=="function"?Reflect.apply(e,null,[...t]):e}function Cr(e){if(!Array.isArray(e))return!1;if(e.length===0)return!0;const t=e[0];return!!((Reflect.has(t,"path")||Reflect.has(t,"name"))&&Reflect.has(t,"root"))}var Er=class{base;storage;mode;query;firstNavigate=!0;historyMonitor;traceless=!1;changeHandler;historyChange;[oe]=!1;[_e]=new Array;backTimeout=320;constructor(e="hash",t="",r="",s=!0,i=!0,n=!1,o,l){this.mode=e,this.base=t,this.query=r,this.firstNavigate=s,this.historyMonitor=i,this.traceless=n,this.storage=o??_().sessionStorage,this.backTimeout=l??320}init(e=!0){const t=_();return typeof this.historyChange!="function"&&(this.historyChange=()=>{if(typeof this[oe]=="function"){const r=this[oe]();if(this[oe]=!1,r)return}else if(this[oe]===!0){this[oe]=!1;return}if(et(this.historyMonitor)){const r=t.history.state;this[de](r);try{let s=[];if(typeof r=="string"?s=JSON.parse(r):s=r,Array.isArray(s)&&s.length>0){const i=this[Ze]()??"/";this[Ye](i,s)}}catch{}}}),Ue(t,"popstate",this.historyChange),this.firstNavigate&&e&&this[xr](),Promise.resolve()}destroy(){this.historyChange&&vt(_(),"popstate",this.historyChange)}[Pr](e,t,r,s){for(let i of this[_e])try{const n=Reflect.apply(i,{},[e,t,r,s]);if(n===!1)return n}catch(n){console.error(n.message,n)}return!0}beforeRestoreEach(e){this[_e].push(e)}removeBeforeRestoreEach(e){const t=this[_e].indexOf(e);return t!==-1?(this[_e].splice(t,1),!0):!1}[xr](){const e=this[Ze]()??"/",t=this.storage.getItem(Fr);if(t)try{const n=JSON.parse(t);if(n.mark===e&&Array.isArray(n.routes)&&n.routes.length>0){const o=n.routes.filter((l,a)=>(l.params=l.params?fr(l.params):{},this[Pr](l,a,e,n.routes)));if(o.length>0){const l=this[$t](),a=o.length-1;o[a].query=l||o[a].query,this[de](o);return}}}catch{}const r=e.indexOf("!");let s;r!=-1?s=e.substring(r+1):s=e;const i=new x;i.path=s,i.query=this[$t](),this[de]([i])}[Ye](e,t){try{t.forEach(s=>{s.params=s.params?ur(s.params):{}});const r=JSON.stringify({mark:e,routes:t});this.storage.setItem(Fr,r)}catch(r){console.error(r.message,r)}}setRestorePoint(e){const t=this[Ze]()??"/";this[Ye](t,e)}[de](e){typeof this.changeHandler=="function"&&this.changeHandler(e)}[Ze](){const e=_();if(this.mode==="path"){let t=e.location.pathname;return this.base&&t.indexOf(this.base)===0&&(t=t.substring(this.base.length)),t}else{const t=e.location.hash,r=t.indexOf("#");if(r!=-1)return t.substring(r+1)}return null}[$t](){let e=_().location.search;return e.length>0&&e.indexOf("?")===0&&(e=e.substring(1)),e}listen(e){this.changeHandler=e}go(e,t=!1){const r=_();this[oe]=t,r.history.go(e)}goBack(e,t){const r=_(),s=r.history.state;if(Cr(s)&&s.length>0){let i=!1;for(let u=s.length-1;u>=0;u--){const f=x.from(s[u]);if(x.isSame(f,e)){i=!0;break}}if(!i){t();return}const n=this.backTimeout;let o=null;const l=()=>{r.history.go(-1),o=setTimeout(l,n)},a=()=>{clearTimeout(o);const u=_().history.state;if(Cr(u)&&u.length>0){let f=u.length;const c=u[f-1],h=x.from(c);if(x.isSame(h,e))return t(),!0;if(f>0){let d=!1;for(let v=f-1;v>=0;v--){const p=x.from(u[v]);if(!(p.traceless===!0||et(this.traceless,p))&&x.isSame(p,e)){d=!0;break}}return d?(setTimeout(()=>{o=setTimeout(l,n),this.go(-1,a)},0),!0):(t(),!0)}}return t(),!0};o=setTimeout(l,n),this.go(-1,a)}else t()}setRouteMark(e){const t=e.currentRoute.fullPath;this[Ye](t,e.routes)}push(e){const t=this[Kt](e.currentRoute);e.currentRoute.historyUpdatePolicy!=="traceless"&&!et(this.traceless,e.currentRoute)&&_().history.pushState(e.routes,"",t),this.setRouteMark(e)}replace(e){const t=this[Kt](e.currentRoute);(e.currentRoute.historyUpdatePolicy!=="traceless"||!et(this.traceless,e.currentRoute))&&_().history.replaceState(e.routes,"",t),this.setRouteMark(e)}[Kt](e){const t=_();let r="";if(e.query){let o="";if(typeof e.query=="object")for(let l of Reflect.ownKeys(e.query)){let a=encodeURIComponent(e.query[l]),u=`${encodeURIComponent(String(l))}=${a}`;o.length>0&&(o+="&"),o+=u}else o=e.query;this.query?(r=o.length>0?`${this.query}&${o}`:this.query,r.length>0&&r.charAt(0)!=="?"&&(r=`?${r}`)):o.length>0&&(r=`?${o}`)}const s=t.location;let i=e.alias??e.fullPath;i.startsWith("default")&&(i=i.substring(wr.length+1));let n;return r?this.mode=="path"?i.indexOf("/")===0?n=`${this.base}${i}${r}`:n=`${this.base}/${i}${r}`:n=`${s.pathname}${r}#${i}`:this.mode=="path"?i.indexOf("/")===0?n=`${this.base}${i}`:n=`${this.base}/${i}`:n=`${s.pathname}#${i}`,`${s.origin}${n}`}};function Js(e=!0,t=null,r="",s=!0,i=!1,n){return t!==null&&(t=_().location.pathname),t&&t.endsWith("/")&&(t=t.substring(0,t.length-1)),new Er("path",t??"",r,e,s,i,n)}function _r(e=!0,t="",r=!0,s=!1,i){return new Er("hash","",t,e,r,s,i)}var Gs=class{maxSize=50;cursor=-1;queue=[];changeHandler;base;historyMonitor=!1;traceless=!1;constructor(e,t=50){this.base=e,this.maxSize=t}init(e=!0){return Promise.resolve()}destroy(){this.queue=[]}beforeRestoreEach(e){}removeBeforeRestoreEach(e){return!1}listen(e){this.changeHandler=e}[de](e){typeof this.changeHandler=="function"&&this.changeHandler(e)}go(e,t=!1){if(this.queue.length==0||this.cursor<=0)return;let r=this.cursor+e;if(r<0?r=0:r>this.queue.length-1&&(r=this.queue.length-1),r!=this.cursor){this.cursor=r;let s=!1;if(typeof t=="function"?s=t():s=t,!s){const i=this.queue[r];this[de](i.routes)}}}goBack(e,t){if(this.queue.length==0||this.cursor<=0)return;let r=0;if(e===null)r=this.cursor+1;else for(let s=this.cursor;s>=0;s--){const i=this.queue[s];if(x.isSame(i.currentRoute,e))break;r++}if(r===0){t();return}this.go(-r,()=>(t(),!0))}setRouteMark(e){}push(e){this.queue.length>=this.maxSize&&this.queue.splice(0,1),this.queue.push(e),this.cursor=this.queue.length-1}replace(e){let t=this.queue.length-this.cursor;this.queue.splice(this.cursor,t),this.queue[this.cursor]=e}setRestorePoint(e){}};function Ar(e="",t=50){return new Gs(e,t)}function Oi(e){}var tt=Symbol("_constructRouteModel"),rt=Symbol("_findRouteModel"),Tt=Symbol("_findRootView"),Xs=Symbol("_getFirstView"),le=Symbol("_removeView"),jr=Symbol("_buildPage"),qr=Symbol("_resolveComponent"),$r=Symbol("_update"),ee=Symbol("_merge"),kt=Symbol("_handleHistoryChange"),ae=Symbol("_handleRouteUpdated"),st=Symbol("routeUpdatedCallback"),Ae=Symbol("currentRoute"),w=Symbol("currentRoutes"),it=Symbol("routeSessionCacheKey"),Kr=Symbol("_addRouteRecorder"),je=Symbol("_removeRouteRecorder"),qe=Symbol("_cloneRouteRecorder"),q=Symbol("_handleError"),nt=Symbol("errorCallback"),H=Symbol("registerKey"),ot=Symbol("notFoundKey"),Lt=Symbol("notFoundPathKey"),V=Symbol("forestKey"),F=Symbol("historyKey"),$e=Symbol("beforeFiltersKey"),Ke=Symbol("afterFiltersKey"),Te=Symbol("destroyFiltersKey"),Mt=Symbol("propsFilterKey"),me=Symbol("mainDispatcherKey"),lt=Symbol("initKey"),ue=Symbol("readyKey"),at=Symbol("readyHandlersKey"),ut=Symbol("_markReady"),Tr=Symbol("_createNextFn"),It=Symbol("_start"),Ot=Symbol("_before"),Dt=Symbol("_after"),kr=Symbol("_destroy"),Ht=Symbol("_load"),ke=Symbol("_unload"),Le=Symbol("routerGuardKey");function Qs(e){return e.layers.length==0||e.layers[0].views.length==0}var Lr=class{[H]=new Array;[ot];[Lt]="*";[ue]=!1;[at]=[];[V]=new Vs;[F];[w]=new Array;[Ae]=(0,y.shallowRef)(null);[it]=new WeakMap;[nt]=null;[st]=null;[$e]=new Array;[Ke]=new Array;[Te]=new Array;[Mt]=null;[me]=new Ee;[Le]=new zs;[lt]=!1;get currentRoute(){return(0,y.readonly)(this[Ae])}options;constructor(e){this.options=e??{},this.options.notFoundPath&&this.setNotFoundPath(this.options.notFoundPath);let t=this.options.routes||[];this.addRoutes(t),this.options.notFound&&this.setNotFoundRoute(this.options.notFound),e.history?this[F]=e.history:this[F]=ce?_r():Ar(),this[F]?.listen(async r=>{let s=!0;try{if(typeof r=="string"){const i=this[T](r);i&&await this[kt]([i])}else await this[kt](r)}catch(i){console.error(i.message,i),s=!1}this[ue]===!1&&this[ut](s)})}[q](e="error",t){if(t&&typeof t.error=="function")try{t.error(e)}catch{}if(typeof this[nt]=="function")try{this[nt](e,t)}catch{}console.error(e)}init(){this[lt]!==!0&&(this[F]?.init(!this[ue]),this[lt]=!0)}destroy(){this[F]?.destroy(),this[lt]=!1}isReady(){return this[ue]?Promise.resolve():new Promise((e,t)=>{this[at].push([e,t])})}[ut](e){this[ue]=!0,this[at].forEach(([t,r])=>{try{e?t():r()}catch(s){console.error(s.message,s)}}),this[at]=[]}[kt](e){try{if(!e){let n=[...this[w]].reverse();return this[ke](n),ce&&_().location.reload(),Promise.resolve()}let t=null,r=[],s=[],i=0;for(;i<e.length&&i<this[w].length&&x.isSame(e[i],this[w][i]);i++)e[i].active===!0&&e[i].active!==this[w][i].active&&(t=e[i]);if(i<e.length)r=e.slice(i);else if(i===e.length)for(;i<this[w].length&&this[w][i].historyUpdatePolicy==="traceless";i++)r.push(this[w][i]),t=e[i];if(i<this[w].length&&(s=this[w].slice(i).reverse()),s.length===0&&r.length===0){if(t!==null)return this.restore([t])}else if(s.length>0){if(this[ke](s)){if(r.length>0)return this.restore(r);if(t!==null)return this.restore([t])}}else return this.restore(r)}catch(t){this[q](t)}return Promise.resolve()}[ae](e=null){if(this[Ae].value=e,typeof this[st]=="function")try{this[st](e)}catch{}}[Kr](e,t){if(e.opsType===C.Open){let r=!1;const s=this[w].length-1;for(let i=s;i>=0;i--){const n=this[w][i];if(e.root==n.root){if(e.path===n.path){this[w].splice(i,1,e),r=!0;continue}e.active&&(n.active=!1)}}r||this[w].push(e)}else this[w].push(e);this[it].set(e,t),this[ae](e)}[qe](){let e=[];for(let t of this[w]){let r=x.clone(t,!0);e.push(r)}return e}[je](e){if(!this[w]){this[ae](null);return}let t=-1;for(let r=0;r<this[w].length;r++)if(x.isSame(this[w][r],e)){t=r;break}if(t!=-1){const r=this[w][t];this[w].splice(t,1);const s=this[it].get(r);if(this[it].delete(r),this[kr](r,s),r.opsType===C.Append){const i=this[w].length-1;this[ae](this[w][i]??null)}else this[Ae].value&&x.isSame(this[Ae].value,e)&&this[ae](null)}else this[ae](null)}set historyMonitor(e){this[F]&&(this[F].historyMonitor=e)}get historyMonitor(){return this[F]?this[F].historyMonitor:!1}set traceless(e){this[F]&&(this[F].traceless=e)}get traceless(){return this[F]?.traceless??!1}set propsFilter(e){this[Mt]=e}get propsFilter(){return this[Mt]}setRestorePoint(){const e=this[qe]();this[F]?.setRestorePoint(e)}onRouteUpdated(e){this[st]=e}onError(e){this[nt]=e}beforeEach(e){this[$e].push(e)}removeBeforeEach(e){const t=this[$e].indexOf(e);return t!==-1?(this[$e].splice(t,1),!0):!1}afterEach(e){this[Ke].push(e)}removeAfterEach(e){const t=this[Ke].indexOf(e);return t!==-1?(this[Ke].splice(t,1),!0):!1}destroyEach(e){this[Te].push(e)}removeDestroyEach(e){const t=this[Te].indexOf(e);return t!==-1?(this[Te].splice(t,1),!0):!1}beforeRestoreEach(e){this[F]?.beforeRestoreEach(e)}removeBeforeRestoreEach(e){return this[F]?.removeBeforeRestoreEach(e)??!1}addRoutes(e){for(let t of e)this.addRoute(t)}addRoute(e,t=-1){if(e.path===this[Lt]){this.setNotFoundRoute(e);return}const r=this[tt](e);if(t==-1)this[H]=[...this[H],...r];else for(let s=r.length-1;s>=0;s--)this[H].splice(t,0,r[s])}removeRoute(e){const t=this[T](e);if(t===null)return console.warn("[Fox]Illegal routing format",e),!1;for(let r=0;r<this[H].length;r++){const s=this[H][r];if(t?.path&&s.path===t.path)return this[H].splice(r,1),!0;if(t?.name&&s.name===t.name)return this[H].splice(r,1),!0}return!1}hasRoute(e){const t=this[T](e);return t===null?(console.warn("[Fox]Illegal routing format",e),!1):this[H].findIndex(r=>{if(t?.path&&r.path===t.path||t?.name&&r.name===t.name)return!0})!==-1}setNotFoundPath(e){this[Lt]=e}setNotFoundRoute(e){const t=this[tt](e);this[ot]=t[0]}getRoutes(){return[...this[H]]}[tt](e){let t=e.path??"";t.length>0&&t.charAt(0)!=="/"&&(t=`/${t}`);let r=e.components??(e.component&&{"":e.component});if(!r){const l=new Et;return l.path=t,l.redirect=e.redirect,[l]}const s=new x;s.path=t,s.name=e.name,s.meta=e.meta;let i=[];for(let l in r){const a=r[l];l.length===0&&(l=wr);const u=new Us(l,a,e.props);i.push(u)}let n=!1,o=[];if(e.children)for(let l of e.children){const a=this[tt](l);for(let u of a){let f=new Et;f.name=u.name,u.path&&u.path.length>0?t!=="/"?f.path=`${t}${u.path}`:f.path=u.path:(n=!0,f.path=t);let c=new Sr;c.models=[...i],f.layers=[c,...u.layers],f.matchedRoutes=[s,...u.matchedRoutes??[]],o.push(f)}}if(!n){const l=new Sr;l.models=i;const a=new Et;a.name=e.name,a.path=t,a.matchedRoutes=[s],a.layers=[l],o.splice(0,0,a)}return o}[rt](e){const t=e.route;try{for(let r of this[H]){const s=t.path?t.template??t.path:null,i=t.name?t.template??t.name:null;if(s&&r.path){let n=r.match;n||(n=r.match=Hs(r.path));const o=n(s);if(!o)continue;if(r.redirect){const l=new x;A(!0,l,t),l.path=r.redirect;const a={route:l,find:void 0};return this[rt](a)?(e.route=a.route,e.find=a.find,t.template&&e.find&&(e.find={...e.find},e.find.path=t.path),!0):!1}if(t.params=t.params??{},A(!0,t.params,o.params),t.query){const l=t.query;if(typeof l=="string"){const a={},u=l.split("&");for(let f of u){const c=f.split("=");if(c.length!==2)continue;const h=decodeURIComponent(c[0].trim());a[h]=decodeURIComponent(c[1].trim())}A(!0,t.params,a)}else typeof l=="object"&&A(!0,t.params,l)}return e.find=r,t.template&&e.find&&(e.find={...e.find},e.find.path=t.path),!0}else if(i===r.name)return e.find=r,t.template&&e.find&&(e.find={...e.find},e.find.name=t.name),!0}}catch(r){console.error(r.message,r),typeof t.error=="function"&&t.error(r.message)}return!1}[T](e){let t=null;if(Array.isArray(e))if(t=new x,typeof e[0]=="object")t=x.from(e[0]);else for(let r=0;r<e.length;r++)r===0?e[r].charAt(0)==="/"?t.path=e[r]:t.name=e[r]:r===1?t.params=e[r]:r===2?t.root=e[r]:r===3&&A(!1,t,e[r]);else typeof e=="object"?t=x.from(e):typeof e=="string"&&(t=new x,e.charAt(0)=="/"?t.path=e:t.name=e);if(t){if(t.path){let r=t.path.indexOf("?");r!==-1&&r<t.path.length-1&&(t.query=t.path.substring(r+1),t.path=t.path.substring(0,r))}t.root=t.root??"default",t.opsType=t.opsType??this.options.defaultOperationType??C.Push,t.traceless&&!t.historyUpdatePolicy&&(t.historyUpdatePolicy="traceless")}return t}push(...e){const t=this[T](e);return t?(t.opsType=C.Push,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[q]("resolve route fail",t),this)}put(...e){const t=this[T](e);return t?(t.opsType=C.Put,t.historyUpdatePolicy=t.historyUpdatePolicy??"traceless",this.to(t)):(this[q]("resolve route fail",t),this)}replace(...e){const t=this[T](e);return t?(t.opsType=C.Replace,t.historyUpdatePolicy=t.historyUpdatePolicy??"replace",this.to(t)):(this[q]("resolve route fail",t),this)}append(...e){const t=this[T](e);return t?(t.opsType=C.Append,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[q]("resolve route fail",t),this)}remove(e,t){return new Promise(r=>{this[me].post(s=>{try{if(this[w].length===0){s.resolve(),r(!1);return}let i=-1,n=null,o=[],l=this[w].length-1,a=l!==-1?this[w][l]:null;if(e){if(n=e.root??"default",e.all)for(let f=l;f>0;f--){const c=this[w][f];if(c.opsType===C.Append){const h=c.root??"default";if(n&&n!==h)continue;o.splice(0,0,c),i=f-1}}else if(e.until)for(let f=l;f>0;f--){let c=this[w][f];if(c.opsType===C.Append&&c.root===n){if(e.until.charAt(0)==="/"&&e.until===c.path){i=f;break}else if(e.until===c.name){i=f;break}o.splice(0,0,c)}}else if(e.to)for(let f=l;f>0;f--){const c=this[w][f];if(c.opsType===C.Append){const h=c.root??"default";if(n&&n!==h)continue;if(o.splice(0,0,c),e.to.charAt(0)==="/"&&e.to===c.path){i=f-1;break}else if(e.to===c.name){i=f-1;break}}}}else for(let f=l;f>0;f--){let c=this[w][f];if(c.opsType===C.Append){o.push(c),i=f-1;break}}if(i===-1||o.length===0){const f="[Fox]can not find route";console.warn(f),s.resolve(f),r(!1);return}const u=i!==-1?this[w][i]:null;if(this[ke](o)){if(t===!1)return s.resolve(),r(!0),!0;const f=()=>(s.resolve(),r(!0),!0),c=this[w].length;if(u&&x.isSame(u,this[w][c-1])){if(a?.historyUpdatePolicy==="traceless"){const h=new qt(x.clone(u,!0),this[qe]());this[F]?.replace(h),f()}else this[F]?.goBack(u,f);return}f()}}catch(i){this[q](i),s.resolve(),r(!1)}})})}open(...e){const t=this[T](e);return t?(t.opsType=C.Open,t.historyUpdatePolicy=t.historyUpdatePolicy??"push",this.to(t)):(this[q]("resolve route fail",t),this)}close(e){return this[me].post(t=>{try{let r=this[T](e);if(!r){t.reject("resolve route fail");return}let s=[];for(let i=0;i<this[w].length;i++){let n=this[w][i];if(n.root===r.root){if(!r.path&&!r.name){s.push(n);continue}if(r.path&&r.path===n.path){s.push(n);break}else if(r.name&&r.name===n.name){s.push(n);break}}}if(s.length===0){t.resolve();return}this[ke](s),t.resolve()}catch(r){this[q](r),t.resolve()}}),this}to(...e){const t=this[T](e);if(!t)return this[q]("resolve route fail",t),this;const r=this[Le].acquire(t);return r==null?(this[q]("route forbid",t),this):(this[me].post(s=>{try{let i=this[It](t);this[Ot](i),this[Ht](i),this[Dt](i),i.wait((n,o)=>{const l=n.session.to;if(n.session.updateResult&&n.session.updateResult.status==="success")try{const a=new qt(x.clone(l,!0),this[qe]());l.historyUpdatePolicy==="replace"?this[F]?.replace(a):l.historyUpdatePolicy==="traceless"?this[F]?.setRouteMark(a):this[F]?.push(a)}catch(a){console.error(a.message,a)}if(Ge.clear(n.session),this[Le].release(r),typeof t.success=="function")try{Reflect.apply(t.success,{},[])}catch(a){console.error(a.message,a)}this[ue]===!1&&this[ut](!0),i=null,s.resolve()},(n,o)=>{this[Le].release(r),o!==null&&this[q](o,t),this[ue]===!1&&this[ut](!1),Ge.clear(n.session),i=null,s.resolve()})}catch(i){this[Le].release(r),this[q](i,t),s.resolve()}}),this)}back(e=1){this[F]?.go(-e,!1)}[Tr](e){return(t,r)=>{if(typeof t=="boolean")e.session.redirect=!1,t?e.resolve():e.reject(r??null);else if(t){const s=this[T](t);if(s){const i=e.session.to;s.success=i.success,s.error=i.error,e.session.to=s,e.session.redirect=!0,e.session.routeModel=null,e.resolve()}else e.session.redirect=!1,e.reject("route resolve fail")}else e.session.redirect=!1,e.resolve()}}[It](e){const t=new Ge(e,this[w].length>0?this[w][this[w].length-1]:void 0),r={route:e,find:null};if(this[rt](r),r.find){t.routeModel=r.find,e.matched=r.find.matchedRoutes??[];const s={};if(Array.isArray(r.find?.matchedRoutes))for(let i=0;i<r.find.matchedRoutes.length;i++){const n=r.find.matchedRoutes[i];n.meta&&typeof n.meta=="object"&&Object.assign(s,n.meta)}e.meta&&typeof e.meta=="object"&&Object.assign(s,e.meta),e.meta=s}return new Ee(t)}[Ot](e){for(let t of this[$e])e.post(r=>{const s=this[Tr](r);Reflect.apply(t,{},[r.session.to,r.session.from,s,r.session])})}[Dt](e){e.post(t=>{for(let r of this[Ke])try{Reflect.apply(r,{},[t.session.to,t.session.from,t.session])}catch(s){console.error(s.message,s)}t.resolve()})}[kr](e,t){for(let r of this[Te])try{Reflect.apply(r,{},[e,t])}catch(s){console.error(s.message,s)}typeof e.destroy=="function"&&Reflect.apply(e.destroy,e,[])}[Ht](e){e.post(t=>{const r=t.session.to;let s=t.session.routeModel;if(s==null){let n={route:r,find:null};if(this[rt](n))s=n.find,t.session.routeModel=s;else if(this[ot])s=this[ot];else{t.reject(`not find route model, path:${r.path??r.name}`);return}}const i=Ge.from(t.session);this[jr](r,s,i).then(n=>{this[V],t.session.updateResult=n??{status:"success",message:""},t.resolve()},n=>{t.reject(n)})})}[ke](e){if(e.length==0)return!0;let t=this[V],r=[];for(let s of e){let i=this[Tt](t,s);i!=null&&r.push({...i,route:s})}if(r.length==0)return this[q]("can not find view index"),!1;for(let s of r.reverse())this[le](t,{x:s.x,y:s.y},[s.route.index??0],!0);return!0}[Tt](e,t){const r=t.root??"default";let s;for(let i=0;i<e.layers.length;i++){const n=e.layers[i];for(let o=n.views.length-1;o>=0;o--){const l=n.views[o];if(l[B]&&l[Xe]===r)return s={x:o,y:i},s}}return null}[Xs](e){return e.layers.length>0&&e.layers[0].views.length>0?e.layers[0].views[0]:null}[le](e,t,r=null,s=!0){if(t.y>=e.layers.length||t.x>=e.layers[t.y].views.length)return;let i=e.layers[t.y].views[t.x],n=!1,o=[],l=!1,a=[...i.slots.value];for(let f=a.length-1;f>=0;f--){let c=a[f];(!r||r.indexOf(c.index)!=-1)&&(c.route&&i[B]&&(this[je](c.route),c.active===!0&&c.route.opsType==C.Append&&(l=!0)),o.push(new O(i,c.index,t.y)),a.splice(f,1))}if(a.length==0)s?i.slots.value=a:e.layers[t.y].views.splice(t.x,1);else{if(l){let f=a[a.length-1];f.active=!0,f.route&&(f.route.active=f.active)}i.slots.value=a}e.layers[t.y].views.length==0&&(n=!0);let u=t.y+1;for(;u<e.layers.length;u++){let f=e.layers[u].views,c=[];for(let h=f.length-1;(n||o.length>0)&&h>=0;h--){let d=f[h];if(d[ie]&&(n||O.include(o,d[ie]))){let v=d.slots.value;for(let p=v.length-1;p>=0;p--){let R=v[p];R.route&&d[B]&&this[je](R.route),c.push(new O(d,R.index,u)),v.splice(p,1)}e.layers[u].views.splice(h,1)}}o=c,e.layers[u].views.length==0&&(n=!0)}}restore(e){if(!e||this[H].length==0){let t=this[V];if(t.layers.length>0){let r=t.layers[0].views;r.length>0&&(r[0].slots.value=[])}return this[w]=[],this[ae](null),Promise.resolve()}else return new Promise((t,r)=>{let s=null,i=!1;for(let n=0;n<e.length;n++){const o=e[n];this[me].post(l=>{const a=this[It](o);this[Ot](a),this[Ht](a),this[Dt](a),a.wait((u,f)=>{s=u.session.to,i=u.session.redirect,l.resolve()},(u,f)=>{s=null,f!==null&&this[q](f),l.resolve()})})}this[me].post(n=>{if(s&&i===!0){const o=new qt(x.clone(s,!0),this[qe]());this[F]?.replace(o)}n.resolve(),t()})})}async[jr](e,t,r){const s=e.updateType??_t.Part;await this[qr](t);const i=this[$r](t,e,r,s);if(i.status==="error")throw Error(i.message);return i}[qr](e){let t=[];for(let r=0;r<e.layers.length;r++){let s=e.layers[r];for(let i=0;i<s.models.length;i++){let n=s.models[i];n.isResolved||t.push(n.resolve())}}return t.length>0?Promise.all(t):Promise.resolve()}[$r](e,t,r,s){if(e.layers[0].models.length!==1)return{status:"error",message:"illegal route structure(multi root node)"};const i=e.layers[0].models[0];let n=this[V],o=Qs(n),l=t.root??"default",a;!o&&s==_t.Part&&(a=this[Tt](n,t));let u,f=0;if(a==null||a==null)if(o||s===_t.All)n.layers.length==0&&(n.layers[0]=new At),n.layers[0].views.length==0?(u=new Fe(t.root??"default",!0,null),n.layers[0].views=[u]):u=n.layers[0].views[0],a={x:0,y:0};else{let c=t.slot;if(!c)return{status:"error",message:"can not rebuild view(because not route slot)"};let h=c.level;if(h>n.layers.length)return{status:"error",message:"can not insert view(override level)"};let d;if(c.rootName){let v=n.layers[h-1];for(let p of v.views){if(p[B]&&p.name===c.rootName){d=new O(p,c.rootIndex??0,h-1);break}if(p[U]&&p[U].view.name===c.rootName&&p[U].index===c.rootIndex){d=p[U];break}}}if(!d)return{status:"error",message:"can not insert view(not find root node ref)"};u=new Fe(l,!0,d),n.layers[h].views.push(u),a={x:n.layers[h].views.length-1,y:h}}else u=n.layers[a.y].views[a.x];if(f=a.y,u[B]=!0,t.opsType===C.Append){t.index=t.index??Se.get(),t.active=!0;let c=u.slots.value;if(c.length>0){let R=c[c.length-1];R.active=!1,R.route&&(R.route.active=R.active)}let h=new Y(t,i,t.index,!0);u.slots.value=[...c,h];let d=f+1,v=1,p=new O(u,t.index,f);this[ee](n,d,e,v,p)}else if(t.opsType===C.Open){let c=u.slots.value;const h=t.active??!0;let d=!1;for(let v of c){if(v.route!==null&&x.isSamePathForRoute(v.route,t)){if(v.active===h)return t.index=v.index,t.active=h,v.route=t,{status:"noChange",message:""};v.active=h,d=!0,t.index=v.index,t.active=h,v.route=t}else h&&(v.active=!1);v.route&&(v.route.active=v.active)}if(!d){t.index=t.index??Se.get(),t.active=h;let v=new Y(t,i,t.index,h);c.push(v);let p=f+1,R=1,b=new O(u,t.index,f);this[ee](n,p,e,R,b)}u.slots.value=[...c]}else{let c=u.slots.value;if(c.length==0){t.index=t.index??Se.get(),t.active=!0,u.slots.value=[new Y(t,i,t.index)];let h=f+1,d=1,v=new O(u,t.index,f);this[ee](n,h,e,d,v)}else{let h=c[0];if(h.model!==i){this[le](n,a,null,!0),t.index=t.index??Se.get(),t.active=!0,u.slots.value=[new Y(t,i,t.index)];let d=f+1,v=1,p=new O(u,t.index,f);this[ee](n,d,e,v,p)}else{h.route!==null&&this[je](h.route);let d=!1;const v=t.active??!0;h.active!==v&&(h.active=v,d=!0),t.active=v,t.index=h.index,h.route=t;let p=[];for(let L=1;L<c.length;L++)p.push(c[L].index);p.length>0?this[le](n,a,p,!0):d&&(u.slots.value=[...c]);let R=[new O(u,t.index,f)],b=f+1,g=1,K=new O(u,t.index,f);for(;R.length>0&&b<n.layers.length&&g<e.layers.length;b++,g++){let L=[];for(let M=0;M<n.layers[b].views.length;M++){let $=n.layers[b].views[M];$[ie]&&O.include(R,$[ie])&&L.unshift(M)}let He=[];for(let M of L){let $=n.layers[b].views[M],fe=e.layers[g].models,Z;for(let I=0;I<fe.length;I++)if($.name===fe[I].name){Z=fe[I];break}if(!Z)this[le](n,{x:M,y:b},null,!1);else{let I=$.slots.value;if(I.length==0){let Q=0;$.slots.value=[new Y(null,Z,Q)];let W=b+1,z=g+1;this[ee](n,W,e,z,K)}else{let Q=I[0];if(Q.model!==Z){this[le](n,{x:M,y:b},null,!0),$.slots.value=[new Y(null,Z,0)];let W=b+1,z=g+1;this[ee](n,W,e,z,K)}else{$[B]&&Q.route!==null&&this[je](Q.route);let W=[];for(let z=1;z<I.length;z++)W.push(I[z].index);W.length>0&&this[le](n,{x:M,y:b},W,!0),He.push(new O($,Q.index,b))}}$[B]=!1}}R=He}this[ee](n,b,e,g,K)}}}if(u&&u[U]){let c=u[U];c&&(t.slot=new Bs(l,f,c?.view.name,c?.index??0))}return r.to=void 0,r.routeModel=void 0,this[Kr](t,r),{status:"success",message:""}}[ee](e,t,r,s,i){let n=s,o=t;for(;o<e.layers.length&&n<r.layers.length;o++,n++){let l=e.layers[o].views;for(let a of r.layers[n].models){let u=new Fe(a.name,!1,i),f=new Y(null,a);u.slots.value=[f],l.push(u)}}for(;n<r.layers.length;n++){let l=new At;l.views=[];for(let a of r.layers[n].models){let u=new Fe(a.name,!1,i),f=new Y(null,a);u.slots.value=[f],l.views.push(u)}e.layers.push(l)}}[br](e,t,r,s,i,n){if(t<0||t>this[V].layers.length)return null;if(t<this[V].layers.length){let u=this[V].layers[t],f=null;for(let c of u.views){let h=!1;if(r!==null?(h=c.name===e&&c[U]?.view===r,h&&s!==-1&&(h=c[U]?.index===s)):h=c.name===e,!!h){i!==null&&(c[ie]={view:i,index:n,level:t-1}),f=c;break}}if(f!==null)return f}let o=null,l=null;i!==null&&(i[B]?o={view:i,index:n,level:t-1}:o=i[U],l={view:i,index:n,level:t-1});let a=new Fe(e,!0,o);if(a[ie]=l,t==this[V].layers.length){let u=new At;u.views=[a],this[V].layers.push(u)}else this[V].layers[t].views.push(a);return a}},Me=Symbol("rk"),Nt=Symbol("vd"),Mr=Symbol("rv"),Bt=Symbol("rvi"),Ir=Symbol("pv"),Ut=Symbol("pvi"),Ie=Symbol("registerKey"),Vt=Symbol("parentKey"),Wt=Symbol("lc"),Zs=class{[Ie]=new Map;[Vt]=null;get parent(){return this[Vt]?.deref()??null}set parent(e){this[Vt]=e?new WeakRef(e):null}constructor(){}set(e,t){this[Ie].set(e,t)}get(e){return this[Ie].get(e)}has(e){return this[Ie].has(e)}delete(e){return this[Ie].delete(e)}},te=new WeakMap,Oe=[];function ft(e,t=!1){let r=e?te.get(e)??null:null;if(t&&!r){r=new Zs,e&&te.set(e,r),(0,y.onScopeDispose)(()=>{e&&te.delete(e)});const s=(0,y.inject)(Wt);s&&(r.parent=s),(0,y.provide)(Wt,r)}return r}function De(e){let t=e?te.get(e)??null:null;if(!t&&(0,y.hasInjectionContext)()&&(t=(0,y.inject)(Wt,null)),!t&&Oe.length>0){const r=Oe.length-1;t=Oe[r]}return t}async function Or(e,t){Oe.push(e);try{return await t()}finally{Oe.pop()}}function Ys(e){const t=(0,y.getCurrentScope)();if(!t)return!1;const r=De();if(!r)return!1;if(te.set(t,r),Array.isArray(e))for(let s=0;s<e.length;s++)e[s]&&typeof e[s]=="object"&&te.set(e[s],r);return(0,y.onScopeDispose)(()=>{if(te.delete(t),Array.isArray(e))for(let s=0;s<e.length;s++)e[s]&&typeof e[s]=="object"&&te.delete(e[s])}),!0}function zt(e,t){const r=De(e);if(!r)return null;let s=r;for(;s&&!s.has(t);)s=s.parent;return s?.get(t)??null}function ei(e,t,r){De(e)?.set(t,r)}function ti(e,t,r){De(e)?.delete(t)}var ct=Symbol("hooksKey");function ri(e){let t=e.get(ct);t||(t=[],e.set(ct,t))}function Dr(e,t){const r=e.get(ct);r!=null&&Or(e,async()=>{for(let s=r.length-1;s>=0;s--){let i=r[s];if(i.type===t)try{await Reflect.apply(i.hook,null,[])}catch(n){console.error(n.message,n)}}})}var Hr=(function(e){return e.INACTIVATED="ia",e.ACTIVATED="a",e})({}),si=class{type;hook;constructor(e,t){this.hook=t,this.type=e}};function ii(e,t,r){const s=new si(t,r);return e.push(s),!0}function ni(e,t,r){let s=-1;for(let i=0;i<e.length;i++){const n=e[i];if(n.type===t&&n.hook===r){s=i;break}}return s!=-1?(e.splice(s,1),!0):!1}function Nr(e){return t=>{const r=zt(null,ct);r&&((0,y.onScopeDispose)(()=>{ni(r,e,t)}),ii(r,e,t))}}var oi=function(e){(0,y.onActivated)(e),Nr("a")(e)},li=function(e){(0,y.onDeactivated)(e),Nr("ia")(e)},Br=Symbol("routeKey");function Ur(e,t){e.set(Br,t)}function Vr(e){const t=zt(e??null,Br);return typeof t=="function"?t():t}var Wr="FoxBeforeEnter",zr="FoxEnter",Jr="FoxLeave",Gr="FoxLeave",ht="FoxLeaveEnd";function Xr(e,t=!1){let r=null;return t?r=e.showFromClass??e.enterFromClass:r=e.enterFromClass,r||(r=e.transitionName,r?t?`${r}-show-from`:`${r}-enter-from`:null)}function Qr(e,t=!1){let r=null;return t?r=e.showActiveClass??e.enterActiveClass:r=e.enterActiveClass,r||(r=e.transitionName,r?t?`${r}-show-active`:`${r}-enter-active`:null)}function ai(e,t=!1){let r=null;return t?r=e.showToClass??e.enterToClass:r=e.enterToClass,r||(r=e.transitionName,r?t?`${r}-show-to`:`${r}-enter-to`:null)}function Zr(e,t=!1){let r=null;return t?r=e.hideFromClass??e.leaveFromClass:r=e.leaveFromClass,r||(r=e.transitionName,r?t?`${r}-hide-from`:`${r}-leave-from`:null)}function Yr(e,t=!1){let r=null;return t?r=e.hideActiveClass??e.leaveActiveClass:r=e.leaveActiveClass,r||(r=e.transitionName,r?t?`${r}-hide-active`:`${r}-leave-active`:null)}function ui(e,t=!1){let r=null;return t?r=e.hideToClass??e.leaveToClass:r=e.leaveToClass,r||(r=e.transitionName,r?t?`${r}-hide-to`:`${r}-leave-to`:null)}function fi(e,t=!1){let r=null;return t?r=e.beforeShow??e.beforeEnter:r=e.beforeEnter,r}function ci(e,t=!1){let r=null;return t?r=e.show??e.enter:r=e.enter,r}function hi(e,t=!1){let r=null;return t?r=e.afterShow??e.afterEnter:r=e.afterEnter,r}function yi(e,t=!1){let r=null;return t?r=e.showCancelled??e.enterCancelled:r=e.enterCancelled,r}function di(e,t=!1){let r=null;return t?r=e.beforeHide??e.beforeLeave:r=e.beforeLeave,r}function mi(e,t=!1){let r=null;return t?r=e.hide??e.leave:r=e.leave,r}function vi(e,t=!1){let r=null;return t?r=e.afterHide??e.afterLeave:r=e.afterLeave,r}function pi(e,t=!1){let r=null;return t?r=e.hideCancelled??e.leaveCancelled:r=e.leaveCancelled,r}function Jt(e){let t,r=e.transitionDuration;return typeof r=="object"?t={enter:r.enter??-1,leave:r.leave??-1,show:r.show??-1,hide:r.hide??-1}:(typeof r=="string"&&(r=r.length==0?-1:Number(r)),t={enter:r,leave:r,show:r,hide:r}),t}function ve(e,t){e.classList.contains(t)||e.classList.add(t)}function pe(e,t){e.classList.remove(t)}var gi=ce&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout;function yt(e){gi(e)}function j(e,t){S(e)&&Reflect.apply(e,null,t)}function es(e,t,r=-1,s,i,n){let o=[];const l=()=>{for(let a of o)vt(e,a.type,a.listener);o=[]};if(S(i)){if(s!==void 0&&s>=0){setTimeout(()=>{Reflect.apply(i,null,[e,t,r])},s);return}const a=["animationend","transitionend",ht],u=f=>{(f.target||f.srcElement)===f.currentTarget&&(l(),Reflect.apply(i,null,[e,t,r]))};a.forEach(f=>{Ue(e,f,u),o.push({type:f,listener:u})})}if(S(n)){const a="animationcancel",u=f=>{(f.target||f.srcElement)===f.currentTarget&&(l(),Reflect.apply(n,null,[e,t,r]))};Ue(e,a,u),o.push({type:a,listener:u})}}function dt(e){return!ce||e===null?!1:e.opsType===C.Append||e.opsType===C.Open}function ts(e,t,r={},s,i=-1){if(e||dt(s)){const n=Xr(r,e);n&&ve(t,n);const o=Qr(r,e);o&&ve(t,o),j(fi(r,e),[t,e,s,i])}}function rs(e,t,r={},s,i,n,o){if(!dt(i)&&!e){S(o)&&o(o,[t]);return}const l=Xr(r,e),a=Qr(r,e),u=ai(r,e),f=ci(r,e),c=hi(r,e),h=yi(r,e);if(!l&&!a&&!u&&!f){S(o)&&o(o,[t]);return}yt(()=>{es(t,i,n,s,()=>{a&&pe(t,a),u&&pe(t,u),S(c)&&j(c,[t,e,i,n]),S(o)&&o(o,[t])},()=>{S(h)&&j(h,[t,e,i,n])}),l&&pe(t,l),u&&ve(t,u),S(f)&&j(f,[t,e,i,n])})}function ss(e,t,r={},s,i=-1){if(e||dt(s)){const n=Zr(r,e);n&&ve(t,n);const o=Yr(r,e);o&&ve(t,o),j(di(r,e),[t,e,s,i])}}function is(e,t,r={},s,i,n,o,l){if(!dt(n)&&!e){S(l)&&j(l,[t]),!e&&S(i)&&i();return}const a=Zr(r,e),u=Yr(r,e),f=ui(r,e),c=mi(r,e),h=vi(r,e),d=pi(r,e);if(!a&&!u&&!f&&!c){S(l)&&j(l,[t]),!e&&S(i)&&i();return}yt(()=>{es(t,n,o,s,()=>{try{u&&pe(t,u),f&&pe(t,f),S(h)&&j(h,[t,e,n,o]),S(l)&&j(l,[t])}finally{!e&&S(i)&&i()}},()=>{try{S(d)&&j(d,[t,e,n,o]),S(l)&&j(l,[t])}finally{!e&&S(i)&&i()}}),a&&pe(t,a),f&&ve(t,f),S(c)&&j(c,[t,e,n,o])})}function Gt(e,t={},r,s=-1){const i=t.mode??"default",n=Jt(t);return{mode:i,persisted:!1,beforeEnter:o=>{ts(!1,o,t,r,s)},enter:o=>{rs(!1,o,t,n.enter,r,s)},leave:(o,l)=>{ss(!1,o,t,r,s),is(!1,o,t,n.leave,l,r,s,()=>{e.transition=null})},clone:o=>Gt(e,t,r,s)}}function ns(e){return e.el}function wi(e,t={},r,s,i,n){if(i===!0){const o=ns(e);if(o==null)return;const l=Jt(t);ts(!0,o,t,r,s),rs(!0,o,t,l.show,r,s,a=>{S(n)&&j(n,[a])})}else S(n)&&j(n,[])}function bi(e,t={},r,s,i,n){if(i===!0){const o=ns(e);if(o==null)return;const l=Jt(t);ss(!0,o,t,r,s),is(!0,o,t,l.hide,null,r,s,a=>{S(n)&&j(n,[a])})}else S(n)&&j(n,[])}function Ri(e){yt(()=>{for(let t=0;t<e.length;t++)Reflect.apply(e[t],null,[])})}function os(e,t={},r,s=-1){return{mode:t.mode??"default",persisted:!1,beforeEnter:i=>{Ve(Wr,{},i)},enter:i=>{Ve(zr,{},i)},leave:(i,n)=>{Ve(Jr,{},i),yt(()=>{const o=l=>{(l.target||l.srcElement)===l.currentTarget&&(vt(i,ht,o),n&&Reflect.apply(n,null,[]),e.transition=null)};Ue(i,ht,o),Ve(Gr,{},i)})},clone:i=>os(e,t,r,s)}}function re(e,t,r){return typeof e=="function"?Reflect.apply(e,{},[t,r]):e}function Xt(e,t){if(!e)return null;const r=e(t);return r.length===1?r[0]:r}function ge(e,t){return typeof t=="function"?t(e):e}var Si=class{node;state;constructor(e,t){this.node=e,this.state=t}},mt=(0,y.defineComponent)({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(){return{}}},viewClass:{type:[String,Function],required:!1},viewActiveClass:{type:[String,Function],required:!1},viewInactiveClass:{type:[String,Function],required:!1},transition:{type:[Boolean,String,Function],required:!1,default:!1},transitionName:{type:String,required:!1},transitionDuration:{type:[String,Number,Object],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},beforeEnter:{type:Function,required:!1},enter:{type:Function,required:!1},afterEnter:{type:Function,required:!1},enterCancelled:{type:Function,required:!1},beforeLeave:{type:Function,required:!1},leave:{type:Function,required:!1},afterLeave:{type:Function,required:!1},leaveCancelled:{type:Function,required:!1},beforeShow:{type:Function,required:!1},show:{type:Function,required:!1},afterShow:{type:Function,required:!1},showCancelled:{type:Function,required:!1},beforeHide:{type:Function,required:!1},hide:{type:Function,required:!1},afterHide:{type:Function,required:!1},hideCancelled:{type:Function,required:!1}},setup(e,t){const r=(0,y.getCurrentScope)(),s=e.multi===!0,i=(0,y.inject)(Me,null),n=(0,y.inject)(Nt,0),o=(0,y.inject)(Mr,null),l=(0,y.inject)(Bt,-1);let a=null,u=e.modelSlot??null;if(u){if((0,y.provide)(Nt,n+1),(0,y.provide)(Bt,u.index),(0,y.provide)(Ut,u.index),!u.route){console.warn("[Fox]child view render error, route not exist");return}const c=ft(u,!0);c&&(ri(c),Ur(c,()=>u?.route??null))}else{if(i==null){console.error("[Fox]router is not been injected");return}const c=e.name,h=(0,y.inject)(Ir,null),d=(0,y.inject)(Ut,0);if(a=i[br](c,n,o,l,h,d),a===null)return;(0,y.provide)(Ir,a);const v=a[B]===!0;if(v&&(0,y.provide)(Mr,a),!s&&((0,y.provide)(Bt,-1),(0,y.provide)(Nt,n+1),(0,y.provide)(Ut,-1),v&&r)){const p=ft(r,!0);p&&Ur(p,()=>{const R=a?.slots.value??[];return R.length>0?R[0].route:null})}}const f={value:new Map};return(0,y.onScopeDispose)(()=>{if(f.value&&f.value.clear(),u){const c=u;c.route=null,c.model=null,c.instance=null,u=null}}),()=>{if(s){const c=new Map,h=[],d=a?.slots.value,v=[];for(let b=0;b<d.length;b++){const g=d[b],K=`${e.name}_${g.index}`,L=re(e.transition,g.route,b)??!0,He={modelSlot:g};let M;t.slots.default?M=(0,y.h)(mt,He,{default:t.slots.default}):M=(0,y.h)(mt,He);const $={},fe=re(e.viewClass,g.route,b);typeof fe=="string"&&fe.length>0&&($[fe]=!0);const Z=re(e.viewActiveClass,g.route,b),I=re(e.viewInactiveClass,g.route,b),Q=f.value.get(K);if(typeof Z=="string"&&Z.length>0&&($[Z]=g.active),typeof I=="string"&&I.length>0&&($[I]=!g.active),Q&&g.active!==Q.state){const cs=Q.node;g.active?v.unshift(()=>{const sr=()=>{const Ne=ft(g);Ne!=null&&Dr(Ne,Hr.ACTIVATED)};wi(cs,e,g.route,b,L,sr)}):v.push(()=>{const sr=()=>{const Ne=ft(g);Ne!=null&&Dr(Ne,Hr.INACTIVATED)};bi(cs,e,g.route,b,L,sr)})}const W={class:$,key:K},z=re(e.viewTagProps,g.route,b);z!==null&&typeof z=="object"&&A(!0,W,ge(z,i?.propsFilter)),g.route?.viewTagAttrs&&typeof g.route?.viewTagAttrs=="object"&&A(!0,W,ge(g.route.viewTagAttrs,i?.propsFilter));const Re=(0,y.h)(re(e.viewTag,g.route,b),W,{default:()=>[M]});c.set(K,new Si(Re,g.active)),f.value.delete(K),L===!0?Re.transition=Gt(Re,e,g.route,b):L==="custom"&&(Re.transition=os(Re,e,g.route,b)),h.push(Re)}f.value=c,Ri(v);const p=re(e.tag,null,-1),R={};return Object.assign(R,t.attrs),(0,y.h)(p,R,{default:()=>h})}else if(u!=null){const c=u.model,h={};c.props&&(typeof c.props=="object"?A(!1,h,ge(c.props,i?.propsFilter)):c.props===!0&&typeof u.route?.params=="object"&&A(!1,h,ge(u.route.params,i?.propsFilter)));const d=(0,y.h)(c.component,h);return Xt(t.slots.default,{Component:d,route:u.route})??d}else{const c=a?.slots.value??[];if(c.length>0){const h=c[0],d=h.route,v=h.model,p={};v.props&&(typeof v.props=="object"?A(!1,p,ge(v.props,i?.propsFilter)):v.props===!0&&typeof d?.params=="object"&&A(!1,p,ge(d.params,i?.propsFilter)));const R=(0,y.h)(v.component,p);return(re(e.transition,d,-1)??!0)&&(R.transition=Gt(R,e,d,-1)),Xt(t.slots.default,{Component:R,route:d})??R}else return Xt(t.slots.fallback,{})}}}});function xi(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!=null&&e.button!==0)){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}}function Pi(e,t){return e==null||t==null?!1:!!(e.path&&t.path&&t.path.startsWith(e.path)||e.name&&e.name==t.name)}function we(e,t){return typeof e=="function"?Reflect.apply(e,{},[t]):e}var ls=(0,y.defineComponent)({name:"RouterLink",inheritAttrs:!1,props:{tag:{type:[String,Object,Function],required:!1,default:"a"},to:{type:[String,Object,Function],required:!0},root:{type:String},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=(0,y.inject)(Me,null);return()=>{let s=we(e.to,null),i=we(e.tag,s);if(i==null){console.warn("[Fox]can not resolve link tag");return}let n=null,o=null;r!==null&&(n=r[T](s),e.root&&(n.root=e.root),o=r.currentRoute.value);let l={},a=we(e.activeClass,n);if(typeof a=="string"&&a.length>0&&(l[a]=Pi(n,o)),we(e.exact,n)===!0){let c=we(e.exactActiveClass,n);typeof c=="string"&&c.length>0&&(l[c]=x.isSamePathForRoute(n,o))}let u={class:l};(i==="a"||i==="A")&&(u.href=n?.path??n?.name??"#"),A(!0,u,t.attrs);const f=we(e.event,n);if(typeof f=="string"){const c=h=>{if(r==null){console.warn("[Fox]router is not been injected");return}if(n==null){console.warn("[Fox]route is not been resolved");return}xi(h)&&r.to(n)};u[f]=c}return(0,y.h)(i,u,t.slots)}}}),be=Symbol("registerKey"),Fi=class{policy;callback;constructor(e,t){this.callback=e,this.policy=t}},Qt=class{[be]=new Map;constructor(){}on(e,t,r=!1){let s=this[be].get(e);s||(s=new Array,this[be].set(e,s));let i=new Fi(t,r===!0?1:0);return s.push(i),this}off(e,t){if(!t)return this[be].delete(e),this;let r=this[be].get(e);if(r){for(let s=0;s<r.length;s++)if(r[s].callback===t){r.splice(s,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(typeof r!="function")return console.error("[Fox]callback can not be empty"),this;let s=t-1,i=new Array(s),n=[].splice.call(e,0,s);for(let o=0;o<n.length;o++)this.once(n[o],l=>{i[o]=l,s-=1,s==0&&Reflect.apply(r,{},i)});return this}emit(e,...t){let r=this[be].get(e);if(!r)return this;for(let s=0;s<r.length;){let i=r[s];if(i.policy==1?r.splice(s,1):s++,typeof i.callback=="function")try{xe(()=>{Reflect.apply(i.callback,{},t)})}catch(n){console.error(n.message,n)}}return this}trigger(e,...t){return Reflect.apply(this.emit,this,[e,...t])}},Ci="FoxRouterView",Ei="FoxRouterLink",X=(function(e){return e[e.Loading=0]="Loading",e[e.Loaded=1]="Loaded",e[e.Defining=2]="Defining",e[e.Defined=3]="Defined",e})({});function _i(e){return e==1||e===3}var as=(function(e){return e[e.normal=0]="normal",e[e.factory=1]="factory",e})({}),Ai=class{register=new Map;regExpRegisters=[];constructor(){}get(e){let t=this.register.get(e)??null;return t||(t=this.regExpRegisters.find(r=>r.pattern?.test(e))?.module??null),t}has(e){return!!this.get(e)}set(e,t){if(typeof e=="string")this.register.set(e,t);else if(e instanceof RegExp){const r=this.regExpRegisters.find(s=>(s.pattern?.source??"")===(e?.source??""));r?r.module=t:this.regExpRegisters.push({pattern:e,module:t})}}remove(e){if(typeof e=="string"){const t=this.register.get(e);return this.register.delete(e),t??null}else if(e instanceof RegExp){const t=this.regExpRegisters.findIndex(r=>(r.pattern?.source??"")===(e?.source??""));if(t!==-1){const r=this.regExpRegisters[t].module??null;return this.regExpRegisters.splice(t,1),r}}return null}clear(){this.register.clear(),this.regExpRegisters=[]}},Zt=["require","exports","module"];async function ji(e){return await new Function("url","return import(url)")(e)}var us=class{moduleManager=new Ai;_alias={};set alias(e){this._alias=e}get alias(){return this._alias}_resourceParser;set resourceParser(e){this._resourceParser=e}get resourceParser(){return this._resourceParser}_timeout;set timeout(e){this._timeout=e}get timeout(){return this._timeout}_query;set query(e){this._query=e}get query(){return this._query}get head(){return Be().head}_cssMountPoint=null;set cssMountPoint(e){this._cssMountPoint=e}get cssMountPoint(){return this._cssMountPoint}_jsMountPoint=null;set jsMountPoint(e){this._jsMountPoint=e}get jsMountPoint(){return this._jsMountPoint}setModule(e,t){const r={id:typeof e=="string"?e:e?.source,src:"",status:X.Loaded};typeof t=="function"?(r.exports=t,r.type=as.factory):r.exports=t,this.moduleManager.set(e,r)}removeModule(e){this.moduleManager.remove(e)}getModuleExports(e){const t=this.moduleManager.get(e);return t&&_i(t.status)?t.type===as.factory&&typeof t.exports=="function"?t.exports():t.exports:null}exposeRequire(e="__foxRequire",t,r){const s=t??_();return s&&typeof s=="object"?(s[e]=i=>{const n=this.getModuleExports(i);return r&&!n&&console.error(`[Fox] module:${i}, not found!`),n},!0):!1}resloveResource(e){if(typeof e=="string"){if(Zt.includes(e))return e;if(e=this.alias?.[e]??e,typeof this.resourceParser=="function"){const r=this.resloveResource(e);if(!r)return r}const t=this.getResourcePathSuffix(e);if(t==="mjs")return{path:e,type:"js",format:"es"};if(t==="js")return{path:e,type:"js",format:"umd"};if(t==="css")return{path:e,type:"css"}}return e}ensure(...e){return new Promise((t,r)=>{if(e.length<=0){r("args is empty");return}const s=[];let i=e.length-1,n=null;typeof e[i]=="function"&&(n=e[i],i--);for(let a=0;a<=i;a++)if(Array.isArray(e[a])){const u=e[a];for(let f=0;f<u.length;f++){const c=this.resloveResource(u[f]);s.push(c)}}else if(typeof e[a]=="string"){const u=this.resloveResource(e[a]);s.push(u)}const o=new qi(s.length,(a,u)=>{if(o.isOK())try{typeof n=="function"&&Reflect.apply(n,{},u),t(u)}catch(f){console.error(f),r(f)}else try{console.error(a),typeof n=="function"&&Reflect.apply(n,{},[]),r(a)}catch(f){console.error(f),r(f)}}),l=new Ee;for(let a=0;a<s.length;a++){const u=new $i(a,s[a],o);this.mount(l,u)}return this})}remove(...e){return new Promise((t,r)=>{if(e.length<=0){r("args is empty");return}const s=[];let i=e.length-1,n=null;typeof e[i]=="function"&&(n=e[i],i--);for(let o=0;o<=i;o++)if(Array.isArray(e[o])){const l=e[o];for(let a=0;a<l.length;a++){const u=this.resloveResource(l[a]);s.push(u)}}else if(typeof e[o]=="string"){const l=this.resloveResource(e[o]);s.push(l)}for(let o=0;o<s.length;o++)try{this.unmount(s[o])}catch(l){console.error(l)}typeof n=="function"&&Reflect.apply(n,{},[!0]),t(!0)})}mount(e,t){if(!t.resource){e.post(s=>{t.progress.work(!1,t.index,null),s.resolve()});return}if(typeof t.resource=="string"){if(Zt.includes(t.resource)){e.post(i=>{t.progress.work(!0,t.index,t.resource),i.resolve()});return}const s=this.getModuleExports(t.resource);if(s){e.post(i=>{t.progress.work(!0,t.index,s),i.resolve()});return}}const r=t.resource;if(r.type==="js")if(r.format==="es")this.mountCJS(e,t);else{const s=this.jsMountPoint??this.head;this.mountJS(e,t,s)}else{const s=this.cssMountPoint??this.head;this.mountCSS(e,t,s)}}mountCSS(e,t,r){e.post(s=>{const i=t.resource,n=this.getModuleExports(i.path);if(n){t.progress.work(!0,t.index,n),s.resolve();return}const o=Be(),l=o.createElement("link"),a="onload"in l;a&&(l.onload=()=>{l.onload=null,l.onerror=null,t.progress.work(!0,t.index,i.path),s.resolve()},l.onerror=()=>{try{r.removeChild(l)}catch(c){console.error(c)}l.onload=null,l.onerror=null,t.progress.work(!1,t.index,null),s.reject()});const u=this.constructResourceUri(i.path),f=o.getElementById(i.path);f&&f.parentNode&&f.parentNode.removeChild(f),l.rel="stylesheet",l.type="text/css",l.id=i.path,l.href=u,r.appendChild(l),a||(t.progress.work(!0,t.index,i.path),s.resolve())})}mountJS(e,t,r){e.post(s=>{const i=t.resource,n=this.getModuleExports(i.path);if(n){t.progress.work(!0,t.index,n),s.resolve();return}const o={id:i.path,src:i.path,status:X.Loading};this.moduleManager.set(i.path,o);const l=Be().createElement("script");if("onload"in l)l.onload=()=>{l.onload=null,l.onerror=null,o.status===X.Loading&&(o.status=X.Loaded,t.progress.work(!0,t.index,i.path)),s.resolve()},l.onerror=()=>{try{r.removeChild(l)}catch(h){console.error(h)}l.onload=null,l.onerror=null,this.moduleManager.remove(i.path),t.progress.work(!1,t.index,null),s.resolve()};else{const h=l;h.onreadystatechange=()=>{/loaded|complete/.test(h.readyState)&&(h.onreadystatechange=null,o.status==X.Loading&&(o.status=X.Loaded,t.progress.work(!0,t.index,i.path)),s.resolve())}}const a=this.constructResourceUri(i.path);l.defer=!0,l.src=a;const u=_(),f=this.createRequireLoad();u.__require=u.__require??u.require,u.require=f;const c=this.createDefine(o,f,t);u.__define=u.__define??u.define,u.define=c,typeof t.progress.finalCallback!="function"&&(t.progress.finalCallback=function(){u.require=u.__require,u.__require=void 0,u.define=u.__define,u.__define=void 0}),r.appendChild(l)})}mountCJS(e,t){e.post(async r=>{const s=t.resource,i=this.getModuleExports(s.path);if(i){t.progress.work(!0,t.index,i),r.resolve();return}try{let n=await ji(s.path);if(ze(n)&&(n=n.default??n),he(n)){t.progress.work(!1,t.index,n),r.resolve();return}const o={id:s.path,src:s.path,status:X.Loaded,exports:n};this.moduleManager.set(s.path,o),t.progress.work(!0,t.index,n),r.resolve()}catch(n){console.error(n),t.progress.work(!1,t.index,null),r.resolve()}})}unmount(e){let t="",r="";typeof e=="string"?(this.moduleManager.remove(e),r=this.getResourcePathSuffix(e),t=e):(this.moduleManager.remove(e.path),r=e.type==="css"?"css":e.format??"",t=e.path);const s=Be();if(r==="umd"){let i=s.getElementById(t);i||(i=s.querySelector(`script[src="${t}"]`)),i&&i.remove()}else if(r==="css"){let i=s.getElementById(t);if(!i){const n=this.constructResourceUri(t);i=s.querySelector(`link[href="${n}"]`)}i&&i.remove()}}trimEmptyElement(e){const t=[];for(let r=0;r<e.length;r++){let s=e[r];s!=null&&(s=s.trim(),s.length!==0&&t.push(s))}return t}createDefine(e,t,r){const s=this,i=function(...n){e.status=X.Defining;let o,l,a,u=n.length;if(u===1?(a=n[0],o=void 0):u===2?(a=n[1],Array.isArray(n[0])?(l=s.trimEmptyElement(n[0]),o=void 0):l=void 0):(o=n[0],l=s.trimEmptyElement(n[1]),a=n[2]),o&&(e.id=o,typeof s._alias=="object"&&(s._alias[o]=e.src)),l&&l.length>0)s.ensure(l,(...f)=>{try{const c=f.map(h=>h==="exports"?(e.exports||(e.exports={}),e.exports):h==="module"?e:h==="require"?t:h);if(typeof a=="function"){const h=Reflect.apply(a,e,c);h&&(typeof h=="object"?(e.exports=e.exports??{},Object.assign(e.exports,h)):typeof h=="function"&&(e.exports=h))}else e.exports=a;e.status=X.Defined,r.progress.work(!0,r.index,e.exports)}catch(c){console.error(c),r.progress.work(!1,r.index,[])}});else{if(typeof a=="function"){const f=Reflect.apply(a,e,[]);f&&(typeof f=="object"?(e.exports=e.exports??{},Object.assign(e.exports,f)):typeof f=="function"&&(e.exports=f))}else e.exports=a;e.status=X.Defined,r.progress.work(!0,r.index,e.exports)}};return i.amd=!0,i}createRequireLoad(){return e=>(e=this._alias?.[e]??e,this.getModuleExports(e))}constructResourceUri(e){try{if(Zt.includes(e)||!this.query)return e;const t=this.createSearch(this.query);return e.indexOf("?")==-1?e+=`?${t}`:t.length>0&&(e+=`&${t}`),e}catch(t){throw console.error(`[Fox]resolve path[${e}] fail`,t),t}}createSearch(e){let t="";if(e&&typeof e=="object"){for(let r in e){let s=`${e[r]}`;t+=`${encodeURIComponent(r)}=${encodeURIComponent(s)}&`}t.length>0&&(t=t.substring(0,t.length-1))}return t}getResourcePathSuffix(e){let t=e.lastIndexOf("?");t==-1&&(t=e.length);let r=e.lastIndexOf(".",t);return r==-1?"":e.substring(r+1,t)}},qi=class{finalCallback;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,this.status===!0&&(this.lastIndex!==t&&this.size--,this.lastIndex=t,this.values[t]=r),this.size===0||this.status===!1)try{Reflect.apply(this.callback,this,[this.status,this.values])}catch(s){console.error(s.message,s)}finally{typeof this.finalCallback=="function"&&(Reflect.apply(this.finalCallback,null,[]),this.finalCallback=null)}}isOK(){return this.status}},$i=class{index;resource;progress;constructor(e,t,r){this.index=e,this.resource=t,this.progress=r}},Yt=Symbol("fk"),er=Symbol("fbk"),tr=Symbol("fepk");function Ki(e={}){const t=new Lr(e),r=new Pt,s=new Qt,i=new us,n={get router(){return t},get bus(){return r},get Bus(){return Pt},get EventProxy(){return Qt},get eventproxy(){return s},get EventChain(){return Ee},get Require(){return us},get require(){return i},get isESModule(){return ze},install(o,l={}){o.provide(Me,t),o.provide(Yt,n),o.provide(er,r),o.provide(tr,s),l.install!==!1&&(o.component(Ci,mt),o.component(Ei,ls)),l.optionsApi!==!1&&(Reflect.defineProperty(o.config.globalProperties,"$fox",{get(){return n}}),Reflect.defineProperty(o.config.globalProperties,"$router",{get(){return t}}),Reflect.defineProperty(o.config.globalProperties,"$bus",{get(){return r}}),Reflect.defineProperty(o.config.globalProperties,"$bus",{get(){return r}}),Reflect.defineProperty(o.config.globalProperties,"$eventProxy",{get(){return s}}),o.config.globalProperties.$fox_on=function(a,u,f=!1){s.on(a,u,f)},o.config.globalProperties.$fox_off=function(a,u){s.off(a,u)},o.config.globalProperties.$fox_once=function(a,u){s.once(a,u)},o.config.globalProperties.$fox_all=function(...a){let u=s;Reflect.apply(u.all,u,a)},o.config.globalProperties.$fox_trigger=function(a,...u){let f=s;Reflect.apply(f.trigger,f,[a,...u])},o.config.globalProperties.$fox_emit=function(a,...u){let f=s;Reflect.apply(f.trigger,f,[a,...u])},o.mixin({computed:{$route(){return fs(this)}}})),t.init()}};return n}function rr(e){return(0,y.hasInjectionContext)()?(0,y.inject)(Me,null):e?e.$?.appContext?.provides?.[Me]??null:null}function fs(e){let t=Vr(e);if(!t&&e&&!(0,y.hasInjectionContext)()){let r=e;for(r=r.$parent;r&&(t=Vr(r),!t);)r=r.$parent}return t}function Ti(e){return(0,y.hasInjectionContext)()?(0,y.inject)(Yt,null):e?e.$?.appContext?.provides?.[Yt]??null:null}function ki(e){return(0,y.hasInjectionContext)()?(0,y.inject)(er,null):e?e.$?.appContext?.provides?.[er]??null:null}function Li(e){return(0,y.hasInjectionContext)()?(0,y.inject)(tr,null):e?e.$?.appContext?.provides?.[tr]??null:null}function Mi(e){const t=rr();if(!t){console.error("[Fox]router is not exist.");return}const r=(s,i,n)=>{try{Reflect.apply(e,{},[s,i])}catch(o){console.error(o)}n()};t?.beforeEach(r),(0,y.onScopeDispose)(()=>{t?.removeBeforeEach(r)})}function Ii(e){const t=rr();if(!t){console.error("[Fox]router is not exist.");return}const r=(s,i,n)=>{try{Reflect.apply(e,{},[s,i])}catch(o){console.error(o)}n()};t?.afterEach(r),(0,y.onScopeDispose)(()=>{t?.removeAfterEach(r)})}m.Bus=Pt,m.EventChain=Ee,m.EventProxy=Qt,m.FoxBeforeEnter=Wr,m.FoxBeforeLeave=Jr,m.FoxEnter=zr,m.FoxLeave=Gr,m.FoxLeaveEnd=ht,m.OperationType=C,m.Route=x,m.Router=Lr,m.RouterLink=ls,m.RouterView=mt,m.bindLifecycleContextToCurrentScope=Ys,m.createFox=Ki,m.createMemoryHistory=Ar,m.createWebHashHistory=_r,m.createWebHistory=Js,m.deleteContextValue=ti,m.destroyState=Ts,m.extend=A,m.injectContextValue=zt,m.injectLifecycleContext=De,m.isArray=pt,m.isDate=ms,m.isESModule=ze,m.isEqual=Rt,m.isFunction=S,m.isMap=ys,m.isNil=he,m.isObject=or,m.isPlainObject=lr,m.isPromise=gs,m.isSet=ds,m.isString=vs,m.isSymbol=ps,m.onAfterRouteUpdate=Ii,m.onBeforeRouteUpdate=Mi,m.onFoxActivated=oi,m.onFoxInactivated=li,m.provideContextValue=ei,m.rawState=Ks,m.reactiveState=js,m.shallowReactiveState=qs,m.toBoolean=wt,m.toNumber=Ss,m.toTypeString=We,m.typeOf=bt,m.useBus=ki,m.useEventProxy=Li,m.useFox=Ti,m.useRoute=fs,m.useRouter=rr,m.withLifecycleContext=Or});
|
package/libs/style.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
.fox-views.fox-views-window{display:block}.fox-views.fox-views-window .fox-view{box-sizing:border-box;z-index:100;width:100%;position:fixed;top:0;left:0}.fox-views.fox-card-views{box-sizing:border-box;width:100%;height:100%;position:relative}.fox-views.fox-card-views .fox-card-view{width:100%}.fox-views.fox-card-views .fox-card-view-active{z-index:1}.fox-views.fox-card-views .fox-card-view-inactive{z-index:0;display:none}.fox-views .fox-view-trans-enter-to{z-index:120;animation:.33s fox-view-in-slide-right}.fox-views .fox-view-trans-leave-to{z-index:120;animation:.32s fox-view-out-slide-right}.fox-views .fox-view-trans-show-to{z-index:110;animation:.3s fox-view-show-slide-right}.fox-views .fox-view-trans-hide-to{z-index:110;animation:.32s fox-view-hide-slide-left}@keyframes fox-view-in-slide-right{0%{transform:translate(103%)}to{transform:translate(0%)}}@keyframes fox-view-out-slide-right{0%{transform:translate(0%)}to{transform:translate(103%)}}@keyframes fox-view-hide-slide-left{0%{transform:translate(0%)}to{transform:translate(-30%)}}@keyframes fox-view-show-slide-right{0%{transform:translate(-30%)}to{transform:translate(0%)}}
|
|
2
|
+
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fox-js/fox",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.1.1-
|
|
4
|
+
"version": "3.1.1-31",
|
|
5
5
|
"description": "Fox Router and commons Utils",
|
|
6
6
|
"author": "jiangcheng",
|
|
7
7
|
"keywords": [
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"style": "./dist/style.css",
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
|
+
"types": "./libs/index.esm.d.ts",
|
|
19
20
|
"import": "./libs/index.esm.js",
|
|
20
21
|
"require": "./libs/index.umd.js"
|
|
21
22
|
},
|
|
@@ -25,11 +26,10 @@
|
|
|
25
26
|
"files": [
|
|
26
27
|
"libs"
|
|
27
28
|
],
|
|
28
|
-
"publishConfig": {
|
|
29
|
-
"access": "public"
|
|
30
|
-
},
|
|
29
|
+
"publishConfig": {},
|
|
31
30
|
"scripts": {
|
|
32
|
-
"publish:next": "npm version prerelease && npm publish --tag next"
|
|
31
|
+
"publish:next": "npm version prerelease && npm publish --tag next",
|
|
32
|
+
"publish:vapor": "npm version prerelease && npm publish --tag vapor"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {},
|
|
35
35
|
"repository": ""
|