vue-stack-tabs 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +255 -538
- package/dist/iframe-child.html +75 -0
- package/dist/src/lib/hooks/tabPanel/evict.d.ts +45 -7
- package/dist/src/lib/hooks/tabPanel/state.d.ts +2 -3
- package/dist/src/lib/hooks/useTabActions.d.ts +2 -2
- package/dist/src/lib/hooks/useTabPanel.d.ts +6 -4
- package/dist/src/lib/hooks/useTabRouter.d.ts +5 -5
- package/dist/src/lib/model/TabModel.d.ts +13 -3
- package/dist/src/lib/utils/tabInfoEncoder.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/vue-stack-tabs.css +1 -1
- package/dist/vue-stack-tabs.es.js +1290 -1481
- package/dist/vue-stack-tabs.umd.js +1 -1
- package/package.json +1 -1
- package/src/lib/StackTabs.vue +17 -20
- package/src/lib/assets/style/stackTab.scss +2 -0
- package/src/lib/hooks/tabPanel/evict.ts +61 -14
- package/src/lib/hooks/tabPanel/scroll.ts +6 -2
- package/src/lib/hooks/tabPanel/state.ts +1 -1
- package/src/lib/hooks/useTabPanel.tsx +310 -61
- package/src/lib/hooks/useTabRouter.ts +146 -31
- package/src/lib/model/TabModel.ts +18 -15
- package/src/lib/nuxt/runtime/plugin.client.ts +1 -3
- package/src/lib/utils/tabInfoEncoder.spec.ts +5 -15
- package/src/lib/utils/tabInfoEncoder.ts +7 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(N,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],o):(N=typeof globalThis<"u"?globalThis:N||self,o(N["vue-stack-tabs"]={},N.Vue,N.vueRouter))})(this,(function(N,o,ke){"use strict";const an=Object.freeze(Object.defineProperty({__proto__:null,default:{VueStackTab:{close:"close",closeLeft:"close left",closeRight:"close right",closeOthers:"close others",closeAll:"close all",reload:"reload",reloadAll:"reload all",maximum:"maximum",restore:"restore",undefined:"undefined",loading:"loading",openInNewWindow:"Open in new window"}}},Symbol.toStringTag,{value:"Module"})),cn=Object.freeze(Object.defineProperty({__proto__:null,default:{VueStackTab:{close:"关闭",closeLeft:"关闭左侧",closeRight:"关闭右侧",closeOthers:"关闭其他",closeAll:"关闭所有",reload:"刷新",reloadAll:"刷新所有",maximum:"最大化",restore:"还原",undefined:"未命名",loading:"加载中",openInNewWindow:"在新窗口打开"}}},Symbol.toStringTag,{value:"Module"}));const ln=["__proto__","prototype","constructor"];function fn(e){const t=typeof e;return e!==null&&(t==="object"||t==="function")}function dn(e){return!(Array.isArray(e)?e.length:Object.keys(e).length)}function un(e){return!e.some(t=>ln.indexOf(t)!==-1)}function hn(e){const t=e.split("."),n=[];for(let s=0;s<t.length;s++){let r=t[s];for(;r[r.length-1]==="\\"&&t[s+1]!==void 0;)r=r.slice(0,-1)+".",r+=t[++s];n.push(r)}return un(n)?n:[]}function rt(e,t){if(!fn(e))return"";const n=hn(t);if(n.length===0)return"";let s=Object.assign({},e);for(let r=0;r<n.length;r++){if(typeof s[n[r]]=="string")return s[n[r]];if(s=s[n[r]],s==null){if(r!==n.length-1)return"";break}}return""}function pn(e,t){if(Array.isArray(t)){const n={},s=[...e.matchAll(/{(.+?)}/g)];return s&&s.forEach((r,i)=>{t[i]&&(n[r[1]]=t[i])}),n}return t}function bn(e,t){for(const n in t)e=e.replace(`{${n}}`,String(t[n]));return e}function it(e,t){return Object.keys(t).forEach(n=>{t[n]instanceof Object&&n in e&&(t[n]={...t[n],...it(e[n],t[n])})}),{...e||{},...t}}const mn=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",at=(e=>mn?Symbol(e):"_vt_"+e)("i18n");function he(){return o.inject(at)}function gn(e){const t=Object.assign({locale:"en",fallbackLocale:"en",messages:{}},e),n=o.ref(t.locale),s=o.reactive({});return Object.entries(t.messages).forEach(([r,i])=>{s[r]=i}),{t(r,i){if(!r)return"";const a=typeof i=="string"&&i?i:n.value;let f=rt(s[a],r)||rt(s[t.fallbackLocale],r);if(i&&typeof i!="string"){const c=pn(f,i);dn(c)||(f=bn(f,c))}return f||r},current:o.readonly(n),options:o.readonly(e||{}),install(r){const i=this;r.config.globalProperties.$t=i.t,r.provide(at,i)},changeLocale(r){n.value=r},setLocaleMessage(r,i){s[r]=it(o.toRaw(s[r]||{}),i)},getLocaleMessage(r){return s[r]||{}}}}const yn=()=>{const e=Object.assign({"./lang/en.ts":an,"./lang/zh-CN.ts":cn});function t(r,i){for(const a in r){const f=r[a];if(f?.default){const c=a.substring(a.lastIndexOf("/")+1,a.lastIndexOf(".")),l=i[c];i[c]=l?{...l,...f.default}:f.default}}}const n=()=>{const r={};return t(e,r),r};return{getI18n:r=>{const i={...n()};if(r)for(const a of r)i[a.locale]=a.messages;return gn({locale:"zh-CN",fallbackLocale:"en",messages:i})}}},ct=({wrap:e,left:t=0,top:n=0,smooth:s=!0})=>{e&&(e.scrollTo?e.scrollTo({left:t,top:n,behavior:s?"smooth":"auto"}):(e.scrollLeft=t,e.scrollTop=n))};function vn({el:e,wrap:t,block:n="start",inline:s="nearest"}){const r=t&&typeof t=="object"&&"value"in t?t.value:t;if(!(!e||!r))if(e.scrollIntoView)e.scrollIntoView({behavior:"smooth",block:n,inline:s});else{const{offsetLeft:i,offsetTop:a}=e;let f,c;n==="center"?c=a+(e.clientHeight-r.clientHeight)/2:c=a,s==="center"?f=i+(e.clientWidth-r.clientWidth)/2:f=i,ct({wrap:r,left:f,top:c})}}const Pe=(e=".stack-tab__container *")=>{const t=Array.from(document.querySelectorAll(e)).map(n=>+window.getComputedStyle(n).zIndex||0);return t.length?Math.max(...t.filter(n=>n<9e4))+1:1};function lt(e){return!!(e&&/^(javascript|data):/i.test(e))}function ft(e){if(!e||!/^https?:\/\//i.test(e))return!1;try{const t=typeof window<"u"?window.location:{origin:"http://localhost"};return new URL(e,t.origin).origin!==t.origin}catch{return!0}}function $e(e){const[t,n]=e.split("?");if(!n)return{path:t??"",query:{}};const s={};for(const r of n.split("&")){const[i,a]=r.split("=");i!=null&&a!=null&&a!==""&&(s[i]=a)}return{path:t??"",query:s}}var Y=(e=>(e.WHEEL="wheel",e.BUTTON="button",e.BOTH="both",e))(Y||{});class xe{items;constructor(t){if(this.items=new Map,t)for(const n of t)this.push(n)}push(t){this.items.set(this.items.size,t)}pop(){if(this.isEmpty())return;const t=this.items.get(this.items.size-1);return this.items.delete(this.items.size-1),t}peek(){if(!this.isEmpty())return this.items.get(this.items.size-1)}isEmpty(){return this.items.size===0}size(){return this.items.size}clear(){this.items.clear()}list(){return Array.from(this.items.values())}toString(){if(this.isEmpty())return"";let t="";return this.items.forEach((n,s)=>{t=`${t}${s===0?"":", "}${n}`}),t}toJSON(){return Array.from(this.items.values())}}function Tn(e,t,n){var s={},r=s.noTrailing,i=r===void 0?!1:r,a=s.noLeading,f=a===void 0?!1:a,c=s.debounceMode,l=c===void 0?void 0:c,m,h=!1,b=0;function I(){m&&clearTimeout(m)}function O(A){var y=A||{},E=y.upcomingOnly,_=E===void 0?!1:E;I(),h=!_}function M(){for(var A=arguments.length,y=new Array(A),E=0;E<A;E++)y[E]=arguments[E];var _=this,p=Date.now()-b;if(h)return;function k(){b=Date.now(),t.apply(_,y)}function d(){m=void 0}!f&&l&&!m&&k(),I(),l===void 0&&p>e?f?(b=Date.now(),i||(m=setTimeout(l?d:k,e))):k():i!==!0&&(m=setTimeout(l?d:k,l===void 0?e-p:e))}return M.cancel=O,M}function We(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ue(e,t,n=".",s){if(!We(t))return Ue(e,{},n,s);const r=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const a=e[i];a!=null&&(s&&s(r,i,a,n)||(Array.isArray(a)&&Array.isArray(r[i])?r[i]=[...a,...r[i]]:We(a)&&We(r[i])?r[i]=Ue(a,r[i],(n?`${n}.`:"")+i.toString(),s):r[i]=a))}return r}function wn(e){return(...t)=>t.reduce((n,s)=>Ue(n,s,"",e),{})}const q=wn(),dt="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Ee=32,kn=16,ut=10,ht=0xffffffffffff;var se;(function(e){e.Base32IncorrectEncoding="B32_ENC_INVALID",e.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",e.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",e.EncodeTimeNegative="ENC_TIME_NEG",e.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",e.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",e.PRNGDetectFailure="PRNG_DETECT",e.ULIDInvalid="ULID_INVALID",e.Unexpected="UNEXPECTED",e.UUIDInvalid="UUID_INVALID"})(se||(se={}));class pe extends Error{constructor(t,n){super(`${n} (${t})`),this.name="ULIDError",this.code=t}}function xn(e){const t=Math.floor(e()*Ee)%Ee;return dt.charAt(t)}function En(e){const t=_n(),n=t&&(t.crypto||t.msCrypto)||null;if(typeof n?.getRandomValues=="function")return()=>{const s=new Uint8Array(1);return n.getRandomValues(s),s[0]/256};if(typeof n?.randomBytes=="function")return()=>n.randomBytes(1).readUInt8()/256;throw new pe(se.PRNGDetectFailure,"Failed to find a reliable PRNG")}function _n(){return On()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function Sn(e,t){let n="";for(;e>0;e--)n=xn(t)+n;return n}function An(e,t=ut){if(isNaN(e))throw new pe(se.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>ht)throw new pe(se.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${ht}: ${e}`);if(e<0)throw new pe(se.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new pe(se.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let n,s="";for(let r=t;r>0;r--)n=e%Ee,s=dt.charAt(n)+s,e=(e-n)/Ee;return s}function On(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function _e(e,t){const n=En(),s=Date.now();return An(s,ut)+Sn(kn,n)}var Fe={exports:{}},pt;function In(){return pt||(pt=1,(function(e){var t=(function(){var n=String.fromCharCode,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function a(c,l){if(!i[c]){i[c]={};for(var m=0;m<c.length;m++)i[c][c.charAt(m)]=m}return i[c][l]}var f={compressToBase64:function(c){if(c==null)return"";var l=f._compress(c,6,function(m){return s.charAt(m)});switch(l.length%4){default:case 0:return l;case 1:return l+"===";case 2:return l+"==";case 3:return l+"="}},decompressFromBase64:function(c){return c==null?"":c==""?null:f._decompress(c.length,32,function(l){return a(s,c.charAt(l))})},compressToUTF16:function(c){return c==null?"":f._compress(c,15,function(l){return n(l+32)})+" "},decompressFromUTF16:function(c){return c==null?"":c==""?null:f._decompress(c.length,16384,function(l){return c.charCodeAt(l)-32})},compressToUint8Array:function(c){for(var l=f.compress(c),m=new Uint8Array(l.length*2),h=0,b=l.length;h<b;h++){var I=l.charCodeAt(h);m[h*2]=I>>>8,m[h*2+1]=I%256}return m},decompressFromUint8Array:function(c){if(c==null)return f.decompress(c);for(var l=new Array(c.length/2),m=0,h=l.length;m<h;m++)l[m]=c[m*2]*256+c[m*2+1];var b=[];return l.forEach(function(I){b.push(n(I))}),f.decompress(b.join(""))},compressToEncodedURIComponent:function(c){return c==null?"":f._compress(c,6,function(l){return r.charAt(l)})},decompressFromEncodedURIComponent:function(c){return c==null?"":c==""?null:(c=c.replace(/ /g,"+"),f._decompress(c.length,32,function(l){return a(r,c.charAt(l))}))},compress:function(c){return f._compress(c,16,function(l){return n(l)})},_compress:function(c,l,m){if(c==null)return"";var h,b,I={},O={},M="",A="",y="",E=2,_=3,p=2,k=[],d=0,w=0,g;for(g=0;g<c.length;g+=1)if(M=c.charAt(g),Object.prototype.hasOwnProperty.call(I,M)||(I[M]=_++,O[M]=!0),A=y+M,Object.prototype.hasOwnProperty.call(I,A))y=A;else{if(Object.prototype.hasOwnProperty.call(O,y)){if(y.charCodeAt(0)<256){for(h=0;h<p;h++)d=d<<1,w==l-1?(w=0,k.push(m(d)),d=0):w++;for(b=y.charCodeAt(0),h=0;h<8;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1}else{for(b=1,h=0;h<p;h++)d=d<<1|b,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=0;for(b=y.charCodeAt(0),h=0;h<16;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1}E--,E==0&&(E=Math.pow(2,p),p++),delete O[y]}else for(b=I[y],h=0;h<p;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1;E--,E==0&&(E=Math.pow(2,p),p++),I[A]=_++,y=String(M)}if(y!==""){if(Object.prototype.hasOwnProperty.call(O,y)){if(y.charCodeAt(0)<256){for(h=0;h<p;h++)d=d<<1,w==l-1?(w=0,k.push(m(d)),d=0):w++;for(b=y.charCodeAt(0),h=0;h<8;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1}else{for(b=1,h=0;h<p;h++)d=d<<1|b,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=0;for(b=y.charCodeAt(0),h=0;h<16;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1}E--,E==0&&(E=Math.pow(2,p),p++),delete O[y]}else for(b=I[y],h=0;h<p;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1;E--,E==0&&(E=Math.pow(2,p),p++)}for(b=2,h=0;h<p;h++)d=d<<1|b&1,w==l-1?(w=0,k.push(m(d)),d=0):w++,b=b>>1;for(;;)if(d=d<<1,w==l-1){k.push(m(d));break}else w++;return k.join("")},decompress:function(c){return c==null?"":c==""?null:f._decompress(c.length,32768,function(l){return c.charCodeAt(l)})},_decompress:function(c,l,m){var h=[],b=4,I=4,O=3,M="",A=[],y,E,_,p,k,d,w,g={val:m(0),position:l,index:1};for(y=0;y<3;y+=1)h[y]=y;for(_=0,k=Math.pow(2,2),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;switch(_){case 0:for(_=0,k=Math.pow(2,8),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;w=n(_);break;case 1:for(_=0,k=Math.pow(2,16),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;w=n(_);break;case 2:return""}for(h[3]=w,E=w,A.push(w);;){if(g.index>c)return"";for(_=0,k=Math.pow(2,O),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;switch(w=_){case 0:for(_=0,k=Math.pow(2,8),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;h[I++]=n(_),w=I-1,b--;break;case 1:for(_=0,k=Math.pow(2,16),d=1;d!=k;)p=g.val&g.position,g.position>>=1,g.position==0&&(g.position=l,g.val=m(g.index++)),_|=(p>0?1:0)*d,d<<=1;h[I++]=n(_),w=I-1,b--;break;case 2:return A.join("")}if(b==0&&(b=Math.pow(2,O),O++),h[w])M=h[w];else if(w===I)M=E+E.charAt(0);else return null;A.push(M),h[I++]=E+M.charAt(0),b--,E=M,b==0&&(b=Math.pow(2,O),O++)}}};return f})();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(Fe)),Fe.exports}var bt=In();const Mn=new TextEncoder,Cn=new TextDecoder("utf-8",{ignoreBOM:!0}),mt={encode:e=>Mn.encode(e),decode:e=>Cn.decode(e)},gt=(()=>{const t=[..."0123456789abcdef"],n=new Array(256);for(let s=0;s<256;s++)n[s]=`${t[s>>>4&15]}${t[s&15]}`;return n})(),Bn=(()=>{const e={};for(let t=0;t<256;t++){const n=gt[t],s=n[0],r=s.toUpperCase(),i=n[1],a=i.toUpperCase();e[n]=t,e[`${s}${a}`]=t,e[`${r}${i}`]=t,e[`${r}${a}`]=t}return e})(),He={encode:e=>{let t="";for(let n=0,s=e.length;n<s;n++)t+=gt[e[n]];return t},encodeStr:e=>He.encode(mt.encode(e)),decode:e=>{const t=e.length/2,n=new Uint8Array(t);for(let s=0;s<t;s++)n[s]=Bn[e.slice(s*2,s*2+2)];return n},decodeStr:e=>mt.decode(He.decode(e)),is:e=>!(e.length%2||!/^[a-fA-F0-9]*$/.test(e))};function Rn(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ge(e,t=""){if(!Number.isSafeInteger(e)||e<0){const n=t&&`"${t}" `;throw new Error(`${n}expected integer >= 0, got ${e}`)}}function be(e,t,n=""){const s=Rn(e),r=e?.length,i=t!==void 0;if(!s||i&&r!==t){const a=n&&`"${n}" `,f=i?` of length ${t}`:"",c=s?`length=${r}`:`type=${typeof e}`;throw new Error(a+"expected Uint8Array"+f+", got "+c)}return e}function qe(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function yt(e,t){be(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function Ln(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function Se(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Ae(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Oe(e,t){return e<<32-t|e>>>t}const vt=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Tt(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Nn=vt?e=>e:e=>Tt(e);function zn(e){for(let t=0;t<e.length;t++)e[t]=Tt(e[t]);return e}const D=vt?e=>e:zn;function Vn(e,t={}){const n=(r,i)=>e(i).update(r).digest(),s=e(void 0);return n.outputLen=s.outputLen,n.blockLen=s.blockLen,n.create=r=>e(r),Object.assign(n,t),Object.freeze(n)}const Dn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ie=BigInt(2**32-1),wt=BigInt(32);function kt(e,t=!1){return t?{h:Number(e&Ie),l:Number(e>>wt&Ie)}:{h:Number(e>>wt&Ie)|0,l:Number(e&Ie)|0}}function J(e,t,n,s,r){return e=e+t+r|0,s=Oe(s^e,16),n=n+s|0,t=Oe(t^n,12),{a:e,b:t,c:n,d:s}}function Q(e,t,n,s,r){return e=e+t+r|0,s=Oe(s^e,8),n=n+s|0,t=Oe(t^n,7),{a:e,b:t,c:n,d:s}}class Pn{buffer;buffer32;finished=!1;destroyed=!1;length=0;pos=0;blockLen;outputLen;constructor(t,n){Ge(t),Ge(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=Se(this.buffer)}update(t){qe(this),be(t);const{blockLen:n,buffer:s,buffer32:r}=this,i=t.length,a=t.byteOffset,f=t.buffer;for(let c=0;c<i;){this.pos===n&&(D(r),this.compress(r,0,!1),D(r),this.pos=0);const l=Math.min(n-this.pos,i-c),m=a+c;if(l===n&&!(m%4)&&c+l<i){const h=new Uint32Array(f,m,Math.floor((i-c)/4));D(h);for(let b=0;c+n<i;b+=r.length,c+=n)this.length+=n,this.compress(h,b,!1);D(h);continue}s.set(t.subarray(c,c+l),this.pos),this.pos+=l,this.length+=l,c+=l}return this}digestInto(t){qe(this),yt(t,this);const{pos:n,buffer32:s}=this;this.finished=!0,Ae(this.buffer.subarray(n)),D(s),this.compress(s,0,!0),D(s);const r=Se(t);this.get().forEach((i,a)=>r[a]=Nn(i))}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}_cloneInto(t){const{buffer:n,length:s,finished:r,destroyed:i,outputLen:a,pos:f}=this;return t||=new this.constructor({dkLen:a}),t.set(...this.get()),t.buffer.set(n),t.destroyed=i,t.finished=r,t.length=s,t.pos=f,t.outputLen=a,t}clone(){return this._cloneInto()}}function xt(e,t,n,s,r,i,a,f,c,l,m,h,b,I,O,M,A,y,E,_){let p=0;for(let k=0;k<s;k++)({a:r,b:c,c:b,d:A}=J(r,c,b,A,n[t+e[p++]])),{a:r,b:c,c:b,d:A}=Q(r,c,b,A,n[t+e[p++]]),{a:i,b:l,c:I,d:y}=J(i,l,I,y,n[t+e[p++]]),{a:i,b:l,c:I,d:y}=Q(i,l,I,y,n[t+e[p++]]),{a,b:m,c:O,d:E}=J(a,m,O,E,n[t+e[p++]]),{a,b:m,c:O,d:E}=Q(a,m,O,E,n[t+e[p++]]),{a:f,b:h,c:M,d:_}=J(f,h,M,_,n[t+e[p++]]),{a:f,b:h,c:M,d:_}=Q(f,h,M,_,n[t+e[p++]]),{a:r,b:l,c:O,d:_}=J(r,l,O,_,n[t+e[p++]]),{a:r,b:l,c:O,d:_}=Q(r,l,O,_,n[t+e[p++]]),{a:i,b:m,c:M,d:A}=J(i,m,M,A,n[t+e[p++]]),{a:i,b:m,c:M,d:A}=Q(i,m,M,A,n[t+e[p++]]),{a,b:h,c:b,d:y}=J(a,h,b,y,n[t+e[p++]]),{a,b:h,c:b,d:y}=Q(a,h,b,y,n[t+e[p++]]),{a:f,b:c,c:I,d:E}=J(f,c,I,E,n[t+e[p++]]),{a:f,b:c,c:I,d:E}=Q(f,c,I,E,n[t+e[p++]]);return{v0:r,v1:i,v2:a,v3:f,v4:c,v5:l,v6:m,v7:h,v8:b,v9:I,v10:O,v11:M,v12:A,v13:y,v14:E,v15:_}}const U={CHUNK_START:1,CHUNK_END:2,PARENT:4,ROOT:8,KEYED_HASH:16,DERIVE_KEY_CONTEXT:32,DERIVE_KEY_MATERIAL:64},j=Dn.slice(),Et=(()=>{const e=Array.from({length:16},(s,r)=>r),t=s=>[2,6,3,10,7,0,4,13,1,11,12,5,9,14,15,8].map(r=>s[r]),n=[];for(let s=0,r=e;s<7;s++,r=t(r))n.push(...r);return Uint8Array.from(n)})();class je extends Pn{chunkPos=0;chunksDone=0;flags=0;IV;state;stack=[];posOut=0;bufferOut32=new Uint32Array(16);bufferOut;chunkOut=0;enableXOF=!0;constructor(t={},n=0){super(64,t.dkLen===void 0?32:t.dkLen);const{key:s,context:r}=t,i=r!==void 0;if(s!==void 0){if(i)throw new Error('Only "key" or "context" can be specified at same time');be(s,32,"key");const a=s.slice();this.IV=Se(a),D(this.IV),this.flags=n|U.KEYED_HASH}else if(i){be(r,void 0,"context");const a=r,f=new je({dkLen:32},U.DERIVE_KEY_CONTEXT).update(a).digest();this.IV=Se(f),D(this.IV),this.flags=n|U.DERIVE_KEY_MATERIAL}else this.IV=j.slice(),this.flags=n;this.state=this.IV.slice(),this.bufferOut=Ln(this.bufferOut32)}get(){return[]}set(){}b2Compress(t,n,s,r=0){const{state:i,pos:a}=this,{h:f,l:c}=kt(BigInt(t),!0),{v0:l,v1:m,v2:h,v3:b,v4:I,v5:O,v6:M,v7:A,v8:y,v9:E,v10:_,v11:p,v12:k,v13:d,v14:w,v15:g}=xt(Et,r,s,7,i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],j[0],j[1],j[2],j[3],f,c,a,n);i[0]=l^y,i[1]=m^E,i[2]=h^_,i[3]=b^p,i[4]=I^k,i[5]=O^d,i[6]=M^w,i[7]=A^g}compress(t,n=0,s=!1){let r=this.flags;if(this.chunkPos||(r|=U.CHUNK_START),(this.chunkPos===15||s)&&(r|=U.CHUNK_END),s||(this.pos=this.blockLen),this.b2Compress(this.chunksDone,r,t,n),this.chunkPos+=1,this.chunkPos===16||s){let i=this.state;this.state=this.IV.slice();for(let a,f=this.chunksDone+1;(s||!(f&1))&&(a=this.stack.pop());f>>=1)this.buffer32.set(a,0),this.buffer32.set(i,8),this.pos=this.blockLen,this.b2Compress(0,this.flags|U.PARENT,this.buffer32,0),i=this.state,this.state=this.IV.slice();this.chunksDone++,this.chunkPos=0,this.stack.push(i)}this.pos=0}_cloneInto(t){t=super._cloneInto(t);const{IV:n,flags:s,state:r,chunkPos:i,posOut:a,chunkOut:f,stack:c,chunksDone:l}=this;return t.state.set(r.slice()),t.stack=c.map(m=>Uint32Array.from(m)),t.IV.set(n),t.flags=s,t.chunkPos=i,t.chunksDone=l,t.posOut=a,t.chunkOut=f,t.enableXOF=this.enableXOF,t.bufferOut32.set(this.bufferOut32),t}destroy(){this.destroyed=!0,Ae(this.state,this.buffer32,this.IV,this.bufferOut32),Ae(...this.stack)}b2CompressOut(){const{state:t,pos:n,flags:s,buffer32:r,bufferOut32:i}=this,{h:a,l:f}=kt(BigInt(this.chunkOut++));D(r);const{v0:c,v1:l,v2:m,v3:h,v4:b,v5:I,v6:O,v7:M,v8:A,v9:y,v10:E,v11:_,v12:p,v13:k,v14:d,v15:w}=xt(Et,0,r,7,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],j[0],j[1],j[2],j[3],f,a,n,s);i[0]=c^A,i[1]=l^y,i[2]=m^E,i[3]=h^_,i[4]=b^p,i[5]=I^k,i[6]=O^d,i[7]=M^w,i[8]=t[0]^A,i[9]=t[1]^y,i[10]=t[2]^E,i[11]=t[3]^_,i[12]=t[4]^p,i[13]=t[5]^k,i[14]=t[6]^d,i[15]=t[7]^w,D(r),D(i),this.posOut=0}finish(){if(this.finished)return;this.finished=!0,Ae(this.buffer.subarray(this.pos));let t=this.flags|U.ROOT;this.stack.length?(t|=U.PARENT,D(this.buffer32),this.compress(this.buffer32,0,!0),D(this.buffer32),this.chunksDone=0,this.pos=this.blockLen):t|=(this.chunkPos?0:U.CHUNK_START)|U.CHUNK_END,this.flags=t,this.b2CompressOut()}writeInto(t){qe(this,!1),be(t),this.finish();const{blockLen:n,bufferOut:s}=this;for(let r=0,i=t.length;r<i;){this.posOut>=n&&this.b2CompressOut();const a=Math.min(n-this.posOut,i-r);t.set(s.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible after digest call");return this.writeInto(t)}xof(t){return Ge(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(yt(t,this),this.finished)throw new Error("digest() was already called");return this.enableXOF=!1,this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}}const $n=Vn((e={})=>new je(e)),Ze=e=>{const t=e.iframeRefreshMode==="reload"?"R":"P",n=`${e.id}|${e.title}|${e.iframe?"Y":"N"}|${e.closable?"Y":"N"}|${e.refreshable?"Y":"N"}|${t}`;return bt.compressToEncodedURIComponent(n)},Wn=e=>{const n=bt.decompressFromEncodedURIComponent(e).split("|"),s=n[5]==="R"?"reload":"postMessage";return{id:n[0]??"",title:n[1]??"",iframe:n[2]==="Y",closable:n[3]==="Y",refreshable:n[4]==="Y",iframeRefreshMode:s}},_t=(e,t,n)=>{const s=[];for(const a in n)a.startsWith("__")||s.push({key:a,value:n[a]});s.sort((a,f)=>{let c=0;return a.key>f.key?c=1:a.key<f.key&&(c=-1),c});const r=new TextEncoder().encode(`${e}|${t}|${JSON.stringify(s)}`),i=$n(r);return He.encode(i)};function Un(e){return{all:e=e||new Map,on:function(t,n){var s=e.get(t);s?s.push(n):e.set(t,[n])},off:function(t,n){var s=e.get(t);s&&(n?s.splice(s.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var s=e.get(t);s&&s.slice().map(function(r){r(n)}),(s=e.get("*"))&&s.slice().map(function(r){r(t,n)})}}}const Fn=Un(),Hn={install(e){e.provide("tabEmitter",Fn)}},re=()=>o.inject("tabEmitter");var P=(e=>(e.PAGE_LOADING="PAGE_LOADING",e.TAB_ACTIVE="TAB_ACTIVE",e))(P||{});const Gn=o.defineComponent({__name:"PageLoading",props:{tabId:{}},setup(e){const t=e,n=re(),s=o.ref(!1),r=a=>{a.tId===t.tabId&&(s.value=a.value)},i=P.PAGE_LOADING;return n.on(i,r),o.onUnmounted(()=>{n.off(i,r)}),(a,f)=>s.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:"stack-tab-loading-mask",style:o.normalizeStyle({zIndex:o.unref(Pe)(".cache-page-wrapper *")})},[...f[0]||(f[0]=[o.createElementVNode("div",{class:"stack-tab-loading--spin turn"},null,-1)])],4)):o.createCommentVNode("",!0)}}),z=o.ref([]),fe=o.ref([]),Z=new Map,ee=new Set,K=new Set,Ke=o.ref(0),ie=o.ref([]),ae=new Map,St=o.ref(!1),qn="stacktab-active-tab",te=o.ref({});let Me=0,At=!1,Ot="";const jn=e=>{Me=e},Zn=e=>{At=e},Kn=e=>{Ot=e},Xe=e=>{ee.add(e)},me=e=>{for(const t of e.pages.list())Xe(t.id);K.add(e.id)},Xn=e=>{for(const t of e.pages.list())Xe(t.id)},ge=e=>{fe.value.includes(e)||fe.value.push(e)},It=e=>{const t=fe.value.indexOf(e);t>=0&&fe.value.splice(t,1)},Yn=e=>{e&&(ee.delete(e),It(e),Z.delete(e))},ne=()=>{if(ee.size>0){for(const e of[...ee])Yn(e);ee.clear()}},Jn=e=>{const t=ae.get(e);if(t)for(const[n,s]of t){const r=document.querySelector(n);r&&(r.scrollTop=s.top,r.scrollLeft=s.left)}},Qn=e=>{const t=ae.get(e);if(t)for(const n of t.keys()){const s=document.querySelector(n);t.set(n,{top:s?.scrollTop??0,left:s?.scrollLeft??0})}},eo=e=>{const t=ae.get(e);t&&(t.clear(),ae.delete(e))},Mt=(e,...t)=>{ae.has(e)||ae.set(e,new Map);const n=ae.get(e);for(const s of t)n.set(s,{top:0,left:0})},Ye=()=>Ot+qn,Ct=e=>{e.id&&window.sessionStorage.setItem(Ye(),JSON.stringify(e))},Bt=()=>{window.sessionStorage.removeItem(Ye())},to=e=>e==null?null:JSON.parse(e,(t,n)=>t==="pages"?new xe(n):n),Rt=o.defineComponent({name:"StackTabEmptyPlaceholder",setup(){return()=>null}}),no=e=>{const n=e.matched[e.matched.length-1]?.path??e.path,s=e.path.endsWith("/")?e.path.slice(0,-1):e.path;return n===s?s:e.path},Ce=()=>{const e=ke.useRouter(),t=re(),{t:n}=he(),s=()=>z.value.length,r=T=>{for(const x of T){const S=q(x,{id:_e(),refreshable:!0,closable:!0,iframe:!1}),B=S.id??_e();S.id=B;const L=$e(S.path),W=q(S,{closable:!0,refreshable:!0,iframe:!1}),De=_t(B,L.path,L.query),ot={id:De,tabId:B,path:L.path,query:q(L.query,{__tab:Ze(S)})},ue=new xe;ue.push(ot);const st={id:B,title:W.title??"",closable:W.closable,refreshable:W.refreshable,iframe:W.iframe,iframeRefreshMode:W.iframeRefreshMode==="reload"?"reload":"postMessage",active:!1,pages:ue};ge(De),z.value.push({...st})}const v=sessionStorage.getItem(Ye()),u=to(v);u&&!z.value.some(x=>x.id===u.id)&&(u.iframe&&u.url&&u.iframeRefreshMode===void 0&&(u.iframeRefreshMode=ft(u.url)?"reload":"postMessage"),z.value.push(u)),St.value=!0},i=T=>z.value.some(v=>v.id===T),a=()=>Me<=0||Me>0&&Me>z.value.length,f=T=>(z.value.push(T),Promise.resolve(!0)),c=T=>z.value.find(v=>v.id===T)??null,l=T=>{if(T.query.__tab)return Wn(T.query.__tab);const v={id:_e(),title:n("VueStackTab.undefined"),closable:!0,refreshable:!0,iframe:!1};return T.query.__tab=Ze(v),v},m=(T,v,u,x)=>{let S=null;for(const B of z.value)B.active=!1,B.id===T.id&&(S=B);if(S===null){const B=new xe;B.push(x);const L=v.query.__src;S={id:T.id,title:T.title,closable:T.closable,refreshable:T.refreshable,iframe:T.iframe,iframeRefreshMode:T.iframeRefreshMode??"postMessage",url:decodeURIComponent(L),active:!0,pages:B},f(S).then(()=>{t.emit(P.TAB_ACTIVE,{id:T.id,isRoute:!1})})}else S.active=!0,(S.pages.isEmpty()||S.pages.peek().id!==x.id)&&S.pages.push(x);return S},h=T=>{const v=l(T);if(K.has(v.id))return{empty:!0};const u=no(T),x=_t(v.id,u,T.query.valueOf());if(ee.has(x)){ee.delete(x);const L=Z.get(x);if(L)return{recovered:L,cacheName:x}}const S={id:x,tabId:v.id,path:T.path,query:T.query},B=m(v,T,x,S);return Ct(B),{cacheName:x,tabInfo:v,targetTab:B}},b=(T,v)=>{const{cacheName:u,tabInfo:x}=T;if(Z.has(u))return ge(u),Z.get(u);const S=o.defineComponent({name:u,components:{DynamicComponent:v},emits:["onLoaded"],setup(B,L){return o.onMounted(()=>{L.emit("onLoaded"),Mt(u,".cache-page-wrapper")}),o.onDeactivated(()=>Qn(u)),o.onActivated(()=>{L.emit("onLoaded"),Jn(u),ne(),K.clear(),I(u),v.props=null}),o.onUnmounted(()=>eo(u)),()=>o.createVNode("div",{class:"cache-page-wrapper",id:"W-"+x.id,style:[At?"overflow:auto":"overflow:hidden"]},[o.createVNode(o.resolveComponent("dynamic-component"),{tId:x.id,pId:u},null),o.createVNode(Gn,{tabId:x.id},null)])}});return Z.set(u,S),ge(u),S},I=T=>{ie.value=ie.value.filter(v=>v!==T)},O=(T,v)=>{if(!v)return Rt;const u=h(T);return"empty"in u?Rt:"recovered"in u?(ge(u.cacheName),u.recovered):b(u,v)},M=T=>{const v=c(T.id);v&&(Xn(v),ne(),v.pages.clear())},A=T=>{let v="";const u=c(T),x=z.value,S=x.findIndex(L=>L?.id===T);if(S<0)return"";const B=x[S];return B.closable?(me(B),B.pages.clear(),x.length>1&&B.active&&(v=(S===0?x[1]:x[S-1])?.id??""),x.splice(S,1),v&&t.emit(P.TAB_ACTIVE,{id:v}),u?.active||(ne(),K.clear()),v):T},y=()=>{const T=z.value;for(let x=T.length-1;x>=0;x--){const S=T[x];S?.closable&&(me(S),S.pages.clear(),T.splice(x,1))}if(T.some(x=>x.active)){ne(),K.clear();return}const u=T[T.length-1];u&&t.emit(P.TAB_ACTIVE,{id:u.id})};return{tabs:z,caches:fe,refreshKey:Ke,excludedCacheIdsForRefresh:ie,isInitialized:St,setMaxSize:jn,canAddTab:a,initialize:r,size:s,active:(T,v=!0)=>{t.emit("FORWARD");const u=c(T);if(u&&!u.active){for(const x of z.value)x.active=x.id===T;if(Ct(u),z.value=z.value.slice(),v){const x=u.pages.peek();x&&e.push({path:x.path,query:x.query})}}},destroy:()=>{z.value.length=0,ee.clear(),K.clear(),te.value={},fe.value.length=0,Z.clear(),Bt()},reset:()=>y(),addCache:ge,removeCache:It,getTab:c,addTab:f,removeTab:A,removeAllTabs:y,removeLeftTabs:T=>{const v=z.value,u=v.findIndex(S=>S?.id===T);if(u<=0)return;for(let S=u-1;S>=0;S--){const B=v[S];B?.closable&&(me(B),B.pages.clear(),v.splice(S,1))}if(v.some(S=>S.active)){ne(),K.clear();return}const x=v[0];x&&t.emit(P.TAB_ACTIVE,{id:x.id})},removeRightTabs:T=>{const v=z.value,u=v.findIndex(S=>S?.id===T);if(u<0||u>=v.length-1)return;for(let S=v.length-1;S>u;S--){const B=v[S];B?.closable&&(me(B),B.pages.clear(),v.splice(S,1))}if(v.some(S=>S.active)){ne(),K.clear();return}const x=v[v.length-1];x&&t.emit(P.TAB_ACTIVE,{id:x.id})},removeOtherTabs:T=>{const v=z.value;let u;for(let x=v.length-1;x>=0;x--){const S=v[x];S&&(S.id===T?u=S:S.closable&&(me(S),S.pages.clear(),v.splice(x,1)))}u&&!u.active?t.emit(P.TAB_ACTIVE,{id:T}):(ne(),K.clear())},hasTab:i,renewTab:M,addPage:O,addComponent:(T,v)=>Z.set(T,v),getComponent:T=>Z.get(T),removeComponent:T=>Z.delete(T),markCacheForEviction:Xe,evictMarkedCaches:ne,refreshTab:T=>{const v=c(T);if(!v?.refreshable)return;if(v.iframe){v.iframeRefreshMode==="reload"?te.value={...te.value,[T]:(te.value[T]??0)+1}:t.emit("REFRESH_IFRAME_POSTMESSAGE",T);return}const u=v.pages.peek()?.id;u&&(ie.value=[...ie.value,u],v.active&&Ke.value++)},refreshAllTabs:()=>{const T=[];for(const v of z.value)if(v?.refreshable)if(v.iframe)v.iframeRefreshMode==="reload"?te.value={...te.value,[v.id]:(te.value[v.id]??0)+1}:t.emit("REFRESH_IFRAME_POSTMESSAGE",v.id);else{const u=v.pages.peek()?.id;u&&T.push(u)}T.length>0&&(ie.value=[...ie.value,...T],Ke.value++)},iframeRefreshKeys:te,addPageScroller:Mt,setGlobalScroll:Zn,clearSession:Bt,setSessionPrefix:Kn}};let Lt;function Be(){const e=ke.useRouter(),t=re(),{active:n,hasTab:s,refreshKey:r,reset:i,canAddTab:a,renewTab:f,getTab:c,tabs:l,removeTab:m,removeAllTabs:h,refreshTab:b,refreshAllTabs:I}=Ce(),O=p=>{const k={refreshable:!0,closable:!0,iframe:!1};p.iframe&&p.iframeRefreshMode===void 0?k.iframeRefreshMode=ft(p.path??"")?"reload":"postMessage":p.iframe&&(k.iframeRefreshMode=p.iframeRefreshMode??"postMessage");const d=q(p,k);return d.id||(d.id=_e()),d},M=Tn(500,(p,k=!1)=>new Promise((d,w)=>{const g=O(p);if(s(g.id)&&!k){t.emit(P.TAB_ACTIVE,{id:g.id}),d(g.id);return}if(g.id&&k&&s(g.id)&&(f(p),c(p.id)?.active&&r.value++),!a()){w(new Error("Max Size"));return}A(p,g),d(g.id)})),A=(p,k)=>{const d=Ze(k);let w=q({__tab:d},p.query),g;if(p.iframe)w.__src=encodeURIComponent(p.path),g=Lt;else{const V=$e(p.path);g=V.path,w=q(V.query,w)}e.push({path:g,query:w})};return{openTab:M,closeTab:m,closeAllTabs:h,refreshTab:b,refreshAllTabs:I,activeTab:n,reset:i,tabs:l,setIFramePath:p=>{Lt=p},getWrapper:()=>document.getElementsByClassName("cache-page-wrapper")[0],openInNewWindow:p=>{const k=c(p);k?.iframe&&k.url&&window.open(k.url,"_blank","noopener,noreferrer")}}}const oo={class:"stack-tab__contextmenu-item"},X=o.defineComponent({__name:"ContextMenuItem",props:{icon:{},title:{}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",oo,[o.createElementVNode("div",{class:o.normalizeClass(["stack-tab__contextmenu-icon",e.icon])},null,2),o.createElementVNode("div",{style:{"margin-left":"8px"},onContextmenu:n[0]||(n[0]=o.withModifiers(()=>{},["prevent"]))},o.toDisplayString(e.title),33)]))}}),so={key:1,class:"divider div-transparent"},ro=((e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n})(o.defineComponent({__name:"index",props:{index:{},left:{default:0},top:{default:0},contextMenu:{default:()=>[]},tabItem:{},max:{}},emits:["close"],setup(e,{emit:t}){const n=e,s=t,{t:r}=he(),i=o.ref(),a=o.reactive({left:n.left,top:n.top}),{closeTab:f,closeAllTabs:c,refreshTab:l,refreshAllTabs:m,openInNewWindow:h}=Be(),{removeLeftTabs:b,removeRightTabs:I,removeOtherTabs:O}=Ce(),M=A=>{A?.(),s("close")};return o.onMounted(()=>{const A=i.value?.clientWidth??0;a.left+A>window.innerWidth&&(a.left=window.innerWidth-A-5)}),(A,y)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"menuElementRef",ref:i,class:"stack-tab__contextmenu",style:o.normalizeStyle({left:`${a.left}px`,top:`${a.top}px`,"z-index":o.unref(Pe)(".stack-tab,.stack-tab *")})},[o.createVNode(X,{icon:"stack-tab__icon-reload svg-mask",title:o.unref(r)("VueStackTab.reload"),disabled:e.tabItem.refreshable?null:"disabled",onClick:y[0]||(y[0]=E=>M(()=>o.unref(l)(e.tabItem.id)))},null,8,["title","disabled"]),o.createVNode(X,{icon:"stack-tab__icon-reload-all svg-mask",title:o.unref(r)("VueStackTab.reloadAll"),onClick:y[1]||(y[1]=E=>M(o.unref(m)))},null,8,["title"]),o.createVNode(X,{icon:"stack-tab__icon-close svg-mask",title:o.unref(r)("VueStackTab.close"),disabled:e.tabItem.closable?null:"disabled",onClick:y[2]||(y[2]=E=>M(()=>o.unref(f)(e.tabItem.id)))},null,8,["title","disabled"]),o.createVNode(X,{icon:"stack-tab__icon-close-lefts svg-mask",title:o.unref(r)("VueStackTab.closeLeft"),disabled:e.index<=0?"disabled":null,onClick:y[3]||(y[3]=E=>M(()=>o.unref(b)(e.tabItem.id)))},null,8,["title","disabled"]),o.createVNode(X,{icon:"stack-tab__icon-close-rights svg-mask",title:o.unref(r)("VueStackTab.closeRight"),disabled:e.index>=e.max-1?"disabled":null,onClick:y[4]||(y[4]=E=>M(()=>o.unref(I)(e.tabItem.id)))},null,8,["title","disabled"]),o.createVNode(X,{icon:"stack-tab__icon-close-others svg-mask",title:o.unref(r)("VueStackTab.closeOthers"),onClick:y[5]||(y[5]=E=>M(()=>o.unref(O)(e.tabItem.id)))},null,8,["title"]),o.createVNode(X,{icon:"stack-tab__icon-close-all svg-mask",title:o.unref(r)("VueStackTab.closeAll"),onClick:y[6]||(y[6]=E=>M(o.unref(c)))},null,8,["title"]),e.tabItem.iframe&&e.tabItem.url?(o.openBlock(),o.createBlock(X,{key:0,icon:"stack-tab__icon-open svg-mask",title:o.unref(r)("VueStackTab.openInNewWindow"),onClick:y[7]||(y[7]=E=>M(()=>o.unref(h)(e.tabItem.id)))},null,8,["title"])):o.createCommentVNode("",!0),e.contextMenu!==void 0&&e.contextMenu.length>0?(o.openBlock(),o.createElementBlock("div",so)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.contextMenu,(E,_)=>(o.openBlock(),o.createBlock(X,{key:_,icon:E.icon,title:E.title,disabled:E.disabled(e.tabItem)?"disabled":null,onClick:p=>M(()=>!E.disabled(e.tabItem)&&E.callback(e.tabItem.id))},null,8,["icon","title","disabled","onClick"]))),128))],4))}}),[["__scopeId","data-v-6f704637"]]),io=()=>{const e=o.reactive({item:{},index:-1,left:0,top:0,max:0}),t=o.ref(!1),n=r=>{r.target.closest?.(".stack-tab__contextmenu")||(t.value=!1,document.removeEventListener("click",n))};return o.onUnmounted(()=>{document.removeEventListener("click",n)}),{shown:t,contextMenuData:e,showContextMenu:async(r,i,a,f)=>{t.value=!1,document.removeEventListener("click",n),await o.nextTick(()=>{const{clientY:c,clientX:l}=r;t.value=!0,Object.assign(e,{item:i,index:a,top:c,left:l,max:f}),o.nextTick(()=>document.addEventListener("click",n))})}}},ao={class:"stack-tab__item-title"},co=["title"],lo=["title"],fo=o.defineComponent({__name:"TabHeaderItem",props:{item:{}},emits:["close","active"],setup(e,{emit:t}){const n=t,s=re(),{t:r}=he(),i=o.ref(),a=e,f=b=>{a.item.id===b.id&&h(b.isRoute??!0)},c=P.TAB_ACTIVE;s.on(c,f),o.onUnmounted(()=>{s.off(c,f)});const l=o.computed(()=>a.item.title||r("undefined")),m=()=>{n("close",a.item)},h=(b=!0)=>{n("active",a.item,i.value,b)};return(b,I)=>(o.openBlock(),o.createElementBlock("li",{ref_key:"tabElementRef",ref:i,class:o.normalizeClass(["stack-tab__item",{"is-active":e.item.active,"is-icon":e.item.closable}]),onClick:I[0]||(I[0]=O=>h(!0))},[o.createElementVNode("div",ao,[o.createElementVNode("div",{class:"stack-tab__item-title-content",title:l.value},o.toDisplayString(l.value),9,co)]),e.item.closable?(o.openBlock(),o.createElementBlock("div",{key:0,class:"stack-tab__icon-close-fill stack-tab__item-button",title:o.unref(r)("VueStackTab.close"),onClick:o.withModifiers(m,["stop"])},null,8,lo)):o.createCommentVNode("",!0)],2))}});var ce=[],uo=function(){return ce.some(function(e){return e.activeTargets.length>0})},ho=function(){return ce.some(function(e){return e.skippedTargets.length>0})},Nt="ResizeObserver loop completed with undelivered notifications.",po=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Nt}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Nt),window.dispatchEvent(e)},ye;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ye||(ye={}));var le=function(e){return Object.freeze(e)},bo=(function(){function e(t,n){this.inlineSize=t,this.blockSize=n,le(this)}return e})(),zt=(function(){function e(t,n,s,r){return this.x=t,this.y=n,this.width=s,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,le(this)}return e.prototype.toJSON=function(){var t=this,n=t.x,s=t.y,r=t.top,i=t.right,a=t.bottom,f=t.left,c=t.width,l=t.height;return{x:n,y:s,top:r,right:i,bottom:a,left:f,width:c,height:l}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),Je=function(e){return e instanceof SVGElement&&"getBBox"in e},Vt=function(e){if(Je(e)){var t=e.getBBox(),n=t.width,s=t.height;return!n&&!s}var r=e,i=r.offsetWidth,a=r.offsetHeight;return!(i||a||e.getClientRects().length)},Dt=function(e){var t;if(e instanceof Element)return!0;var n=(t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},mo=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ve=typeof window<"u"?window:{},Re=new WeakMap,Pt=/auto|scroll/,go=/^tb|vertical/,yo=/msie|trident/i.test(ve.navigator&&ve.navigator.userAgent),F=function(e){return parseFloat(e||"0")},de=function(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=!1),new bo((n?t:e)||0,(n?e:t)||0)},$t=le({devicePixelContentBoxSize:de(),borderBoxSize:de(),contentBoxSize:de(),contentRect:new zt(0,0,0,0)}),Wt=function(e,t){if(t===void 0&&(t=!1),Re.has(e)&&!t)return Re.get(e);if(Vt(e))return Re.set(e,$t),$t;var n=getComputedStyle(e),s=Je(e)&&e.ownerSVGElement&&e.getBBox(),r=!yo&&n.boxSizing==="border-box",i=go.test(n.writingMode||""),a=!s&&Pt.test(n.overflowY||""),f=!s&&Pt.test(n.overflowX||""),c=s?0:F(n.paddingTop),l=s?0:F(n.paddingRight),m=s?0:F(n.paddingBottom),h=s?0:F(n.paddingLeft),b=s?0:F(n.borderTopWidth),I=s?0:F(n.borderRightWidth),O=s?0:F(n.borderBottomWidth),M=s?0:F(n.borderLeftWidth),A=h+l,y=c+m,E=M+I,_=b+O,p=f?e.offsetHeight-_-e.clientHeight:0,k=a?e.offsetWidth-E-e.clientWidth:0,d=r?A+E:0,w=r?y+_:0,g=s?s.width:F(n.width)-d-k,V=s?s.height:F(n.height)-w-p,$=g+A+k+E,T=V+y+p+_,v=le({devicePixelContentBoxSize:de(Math.round(g*devicePixelRatio),Math.round(V*devicePixelRatio),i),borderBoxSize:de($,T,i),contentBoxSize:de(g,V,i),contentRect:new zt(h,c,g,V)});return Re.set(e,v),v},Ut=function(e,t,n){var s=Wt(e,n),r=s.borderBoxSize,i=s.contentBoxSize,a=s.devicePixelContentBoxSize;switch(t){case ye.DEVICE_PIXEL_CONTENT_BOX:return a;case ye.BORDER_BOX:return r;default:return i}},vo=(function(){function e(t){var n=Wt(t);this.target=t,this.contentRect=n.contentRect,this.borderBoxSize=le([n.borderBoxSize]),this.contentBoxSize=le([n.contentBoxSize]),this.devicePixelContentBoxSize=le([n.devicePixelContentBoxSize])}return e})(),Ft=function(e){if(Vt(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},To=function(){var e=1/0,t=[];ce.forEach(function(a){if(a.activeTargets.length!==0){var f=[];a.activeTargets.forEach(function(l){var m=new vo(l.target),h=Ft(l.target);f.push(m),l.lastReportedSize=Ut(l.target,l.observedBox),h<e&&(e=h)}),t.push(function(){a.callback.call(a.observer,f,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var n=0,s=t;n<s.length;n++){var r=s[n];r()}return e},Ht=function(e){ce.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Ft(r.target)>e?n.activeTargets.push(r):n.skippedTargets.push(r))})})},wo=function(){var e=0;for(Ht(e);uo();)e=To(),Ht(e);return ho()&&po(),e>0},Qe,Gt=[],ko=function(){return Gt.splice(0).forEach(function(e){return e()})},xo=function(e){if(!Qe){var t=0,n=document.createTextNode(""),s={characterData:!0};new MutationObserver(function(){return ko()}).observe(n,s),Qe=function(){n.textContent="".concat(t?t--:t++)}}Gt.push(e),Qe()},Eo=function(e){xo(function(){requestAnimationFrame(e)})},Le=0,_o=function(){return!!Le},So=250,Ao={attributes:!0,characterData:!0,childList:!0,subtree:!0},qt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],jt=function(e){return e===void 0&&(e=0),Date.now()+e},et=!1,Oo=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var n=this;if(t===void 0&&(t=So),!et){et=!0;var s=jt(t);Eo(function(){var r=!1;try{r=wo()}finally{if(et=!1,t=s-jt(),!_o())return;r?n.run(1e3):t>0?n.run(t):n.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,n=function(){return t.observer&&t.observer.observe(document.body,Ao)};document.body?n():ve.addEventListener("DOMContentLoaded",n)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),qt.forEach(function(n){return ve.addEventListener(n,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),qt.forEach(function(n){return ve.removeEventListener(n,t.listener,!0)}),this.stopped=!0)},e})(),tt=new Oo,Zt=function(e){!Le&&e>0&&tt.start(),Le+=e,!Le&&tt.stop()},Io=function(e){return!Je(e)&&!mo(e)&&getComputedStyle(e).display==="inline"},Mo=(function(){function e(t,n){this.target=t,this.observedBox=n||ye.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Ut(this.target,this.observedBox,!0);return Io(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Co=(function(){function e(t,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=n}return e})(),Ne=new WeakMap,Kt=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].target===t)return n;return-1},ze=(function(){function e(){}return e.connect=function(t,n){var s=new Co(t,n);Ne.set(t,s)},e.observe=function(t,n,s){var r=Ne.get(t),i=r.observationTargets.length===0;Kt(r.observationTargets,n)<0&&(i&&ce.push(r),r.observationTargets.push(new Mo(n,s&&s.box)),Zt(1),tt.schedule())},e.unobserve=function(t,n){var s=Ne.get(t),r=Kt(s.observationTargets,n),i=s.observationTargets.length===1;r>=0&&(i&&ce.splice(ce.indexOf(s),1),s.observationTargets.splice(r,1),Zt(-1))},e.disconnect=function(t){var n=this,s=Ne.get(t);s.observationTargets.slice().forEach(function(r){return n.unobserve(t,r.target)}),s.activeTargets.splice(0,s.activeTargets.length)},e})(),Xt=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ze.connect(this,t)}return e.prototype.observe=function(t,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Dt(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ze.observe(this,t,n)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Dt(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ze.unobserve(this,t)},e.prototype.disconnect=function(){ze.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})();const Bo=["disabled","title"],Ro={key:1,class:"stack-tab__button"},Ve=o.defineComponent({__name:"TabHeaderButton",props:{disabled:{type:Boolean,default:!1},shadow:{default:null},iconClass:{default:""},title:{default:""}},setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["stack-tab__header-button",{"stack-tab__shadow-right":e.shadow==="right","stack-tab__shadow-left":e.shadow==="left"}]),disabled:e.disabled?"disabled":null,title:e.title},["icon"in t.$slots?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["stack-tab__mask-button",e.iconClass])},null,2)),"icon"in t.$slots?(o.openBlock(),o.createElementBlock("div",Ro,[o.renderSlot(t.$slots,"icon")])):o.createCommentVNode("",!0)],10,Bo))}}),Lo=o.defineComponent({__name:"TabHeaderScroll",props:{space:{default:300},isScrollWheel:{type:Boolean,default:!0},isScrollButton:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=o.ref(null),s=o.ref(null),r=o.ref(null),i=o.ref(!1),a=o.ref(!1),f=o.ref(!1),c=o.ref(!0),l=o.ref(),m=e,h=o.reactive({clientWidth:0,scrollWidth:0,scrollLeft:0}),b=o.reactive({thumbLeft:0,startScrollLeft:0,startThumbLeft:0,startPageX:0});o.watch(h,u=>{I(u)});const I=u=>{a.value=u.scrollLeft<=10,f.value=u.clientWidth+u.scrollLeft-u.scrollWidth>=-10,c.value=u.scrollWidth!==u.clientWidth},O=o.computed(()=>h.scrollWidth>h.clientWidth),M=o.computed(()=>{if(!O.value)return 0;const{clientWidth:u,scrollWidth:x}=h;return u/x*u}),A=o.computed(()=>{if(!O.value)return 0;const{clientWidth:u,scrollWidth:x,scrollLeft:S}=h;return(u-M.value)*(S/(x-u))}),y=()=>{if(!n.value)return;const{clientWidth:u,scrollWidth:x,scrollLeft:S}=n.value;Object.assign(h,{clientWidth:u,scrollWidth:x,scrollLeft:S})},E=()=>{const u=n.value?.querySelector(".stack-tab__item.is-active");u&&!v(u)&&T(u)},_=new Xt(()=>{y(),E()}),p=new Xt(()=>{O.value||E(),y()}),k=(u,x=!0)=>{ct({wrap:n.value,left:u,top:0,smooth:x})},d=u=>{k(n.value.scrollLeft+u)},w=u=>{const x=u.deltaY<0;k(n.value.scrollLeft+(x?-m.space:m.space))},g=u=>{Object.assign(b,{startPageX:u.pageX,startScrollLeft:n.value?.scrollLeft,startThumbLeft:A.value,thumbLeft:A.value}),i.value=!0,document.addEventListener("mousemove",V),document.addEventListener("mouseup",$)},V=u=>{const{clientWidth:x,scrollWidth:S}=h;let B=b.startThumbLeft+u.pageX-b.startPageX;const L=x-M.value;B<0?B=0:B>L&&(B=L),b.thumbLeft=B,k(B*(S-x)/(x-M.value),!1),u.preventDefault()},$=()=>{i.value=!1,document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",$)};o.onMounted(()=>{_.observe(l.value);const u=n.value?.querySelector(".stack-tab__nav");p.observe(u)}),o.onUnmounted(()=>{_.disconnect(),p.disconnect()});const T=u=>{vn({el:u,wrap:n.value,block:"end",inline:"center"})},v=u=>{if(!O.value)return!0;const x=u.offsetLeft,S=n.value.scrollLeft;return!(x<S||x+u.clientWidth>S+n.value.clientWidth)};return t({scrollIntoView:T,isInView:v}),(u,x)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[c.value?(o.openBlock(),o.createBlock(Ve,{key:0,"icon-class":"stack-tab__icon-left-arrow",disabled:a.value,onClick:x[0]||(x[0]=S=>!a.value&&d(-1*e.space))},null,8,["disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"headerScroll",ref:l,class:"stack-tab__scroll",onWheelPassive:w},[o.createElementVNode("div",{ref_key:"container",ref:n,class:o.normalizeClass(["stack-tab__scroll-container",{"stack-tab__shadow-inset-left":!a.value&&f.value,"stack-tab__shadow-inset-right":!f.value&&a.value,"stack-tab__shadow-inset-all":!a.value&&!f.value}]),onScrollPassive:y},[o.renderSlot(u.$slots,"default")],34),o.withDirectives(o.createElementVNode("div",{ref_key:"bar",ref:s,class:o.normalizeClass(["stack-tab__scrollbar",{"is-dragging":i.value}])},[o.createElementVNode("div",{ref_key:"thumb",ref:r,class:o.normalizeClass(["stack-tab__scrollbar-thumb",{"is-dragging":i.value}]),style:o.normalizeStyle({width:`${M.value}px`,transform:`translateX(${A.value}px)`}),onMousedown:o.withModifiers(g,["prevent"])},null,38)],2),[[o.vShow,O.value]])],544),c.value?(o.openBlock(),o.createBlock(Ve,{key:1,"icon-class":"stack-tab__icon-right-arrow",disabled:f.value,onClick:x[1]||(x[1]=S=>!f.value&&d(e.space))},null,8,["disabled"])):o.createCommentVNode("",!0)],64))}}),No={class:"stack-tab__header"},zo=o.defineComponent({__name:"index",props:{space:{},tabScrollMode:{default:Y.BOTH},tabTransition:{default:()=>({name:"stack-tab-zoom"})},contextmenu:{type:[Boolean,Object],default:!0},max:{default:20}},emits:["active"],setup(e,{emit:t}){const{t:n}=he(),s=o.inject("maximum"),r=t,i=o.ref(),{shown:a,contextMenuData:f,showContextMenu:c}=io(),l=()=>{a.value=!1},m=e,{closeTab:h,activeTab:b,tabs:I}=Be(),O=o.computed(()=>typeof m.tabTransition=="string"?{name:m.tabTransition}:m.tabTransition),M=o.computed(()=>m.tabScrollMode===Y.BOTH||m.tabScrollMode===Y.BUTTON),A=m.tabScrollMode===Y.BOTH||m.tabScrollMode===Y.WHEEL,y=_=>{_.closable&&h(_.id),a.value=!1},E=(_,p,k)=>{i.value&&p&&o.nextTick(()=>{i.value.isInView(p)||i.value.scrollIntoView(p)}),b(_.id,k),r("active",_.id)};return(_,p)=>(o.openBlock(),o.createElementBlock("div",No,[o.renderSlot(_.$slots,"leftButton"),o.createVNode(Lo,{ref_key:"scrollContainerRef",ref:i,space:e.space,"is-scroll-wheel":o.unref(A),"is-scroll-button":M.value},{default:o.withCtx(()=>[o.createVNode(o.TransitionGroup,o.mergeProps({key:"tab-list-transition",tag:"ul",class:"stack-tab__nav"},O.value,{appear:""}),{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(I),(k,d)=>(o.openBlock(),o.createBlock(fo,{key:k.id,contextmenu:e.contextmenu,item:k,onContextmenu:o.withModifiers(w=>o.unref(c)(w,k,d,o.unref(I).length),["prevent"]),onMouseup:o.withModifiers(w=>y(k),["middle","prevent"]),onClose:y,onActive:E},null,8,["contextmenu","item","onContextmenu","onMouseup"]))),128))]),_:1},16)]),_:1},8,["space","is-scroll-wheel","is-scroll-button"]),o.renderSlot(_.$slots,"rightButton"),o.createVNode(Ve,{"icon-class":o.unref(s)?"stack-tab__icon-restore":"stack-tab__icon-fullscreen",title:o.unref(n)("VueStackTab.maximum"),onClick:p[0]||(p[0]=k=>s.value=!o.unref(s))},null,8,["icon-class","title"]),o.createVNode(o.Transition,{name:"stack-tab-zoom",appear:""},{default:o.withCtx(()=>[o.unref(a)?(o.openBlock(),o.createBlock(ro,{key:"context-menu-transition",left:o.unref(f).left,top:o.unref(f).top,"tab-item":o.unref(f).item,max:o.unref(f).max,index:o.unref(f).index,onClose:l},null,8,["left","top","tab-item","max","index"])):o.createCommentVNode("",!0)]),_:1})]))}}),Vo={class:"stack-tab__container"},Do={class:"stack-tab__iframe-wrapper"},Po={class:"stack-tab__iframe-loading"},$o={class:"stack-tab__iframe-loading-text"},Wo=["src","onLoad"],Uo=5e3,Yt=o.defineComponent({__name:"StackTabs",props:{defaultTabs:{default:()=>[]},max:{default:20},contextmenu:{type:[Boolean,Object],default:!0},pageTransition:{default:"stack-tab-swap"},pageTransitionBack:{default:"stack-tab-swap-back"},tabTransition:{default:"stack-tab-zoom"},tabScrollMode:{default:Y.BOTH},width:{default:"100%"},height:{default:"100%"},i18n:{default:"zh-CN"},space:{default:300},globalScroll:{type:Boolean,default:!1},iframePath:{},sessionPrefix:{default:""},iframeAllowedOrigins:{default:()=>[]}},emits:["onActive","onPageLoaded"],setup(e,{emit:t}){const{tabs:n,caches:s,refreshKey:r,excludedCacheIdsForRefresh:i,iframeRefreshKeys:a,destroy:f,addPage:c,initialize:l,setMaxSize:m,setGlobalScroll:h,setSessionPrefix:b}=Ce(),I=t,O=e,{changeLocale:M,t:A}=he(),y=o.ref(!1);o.provide("maximum",y);const{setIFramePath:E,openTab:_}=Be();E(O.iframePath),h(O.globalScroll),M(O.i18n);const p=(C,R)=>c(C,R),k=C=>{I("onActive",C)};m(O.max);const d=()=>{I("onPageLoaded")},w=o.ref(O.pageTransition),g=re(),V=()=>{w.value=O.pageTransition},$=()=>{w.value=O.pageTransitionBack};g.on("FORWARD",V),g.on("BACKWARD",$);const T=o.computed(()=>n.value.filter(C=>C.iframe)),v=o.reactive({}),u=o.computed(()=>T.value.filter(C=>C.active&&(C.url??"")&&!lt(C.url??"")));o.watch(u,C=>{for(const R of C)v[R.id]=!0},{immediate:!0,deep:!0});const x=C=>{const R=C.url??"";return lt(R)?"about:blank":v[C.id]?R:"about:blank"},S=C=>C.iframeRefreshMode==="reload"?`${C.id}-${a.value[C.id]??0}`:C.id,B=o.reactive({}),L=o.reactive({}),W=new Map,De=C=>{const R=W.get(C);R&&(clearTimeout(R),W.delete(C)),B[C]=!0,L[C]=!1},ot=C=>{if(B[C])return;L[C]=!0;const R=W.get(C);R&&clearTimeout(R),W.set(C,setTimeout(()=>{W.delete(C),L[C]=!1},Uo))};o.watch(u,C=>{for(const R of C)ot(R.id)},{immediate:!0,deep:!0});const ue=o.reactive({}),st=(C,R)=>{R?ue[C]=R:delete ue[C]},sn=C=>{const G=ue[C];if(G?.contentWindow)try{G.contentWindow.postMessage({type:"vue-stack-tabs:refresh"},"*")}catch{}},os=o.computed(()=>{const C=typeof window<"u"?window.location.origin:"",R=O.iframeAllowedOrigins??[];return[C,...R].filter(Boolean)}),rn=C=>{if(!os.value.includes(C.origin))return;const R=C.data;if(!R||typeof R!="object"||R.type!=="vue-stack-tabs:openTab")return;const G=R.payload;G&&typeof G=="object"&&G.title&&G.path&&_(G)};return g.on("REFRESH_IFRAME_POSTMESSAGE",sn),o.onBeforeMount(()=>{b(O.sessionPrefix),l(O.defaultTabs),window.addEventListener("message",rn)}),o.onBeforeUnmount(()=>{window.removeEventListener("message",rn),g.off("REFRESH_IFRAME_POSTMESSAGE",sn),g.off("FORWARD",V),g.off("BACKWARD",$),f()}),(C,R)=>{const G=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["stack-tab",{"stack-tab__maximum":y.value}]),style:o.normalizeStyle({width:e.width,height:e.height,"z-index":y.value?o.unref(Pe)("body *:not(.stack-tab,.stack-tab *)"):void 0})},[o.createVNode(zo,{space:e.space,"tab-transition":e.tabTransition,max:e.max,onActive:k},{leftButton:o.withCtx(()=>[o.renderSlot(C.$slots,"leftButton")]),rightButton:o.withCtx(()=>[o.renderSlot(C.$slots,"rightButton")]),_:3},8,["space","tab-transition","max"]),o.createElementVNode("div",Vo,[o.createVNode(G,null,{default:o.withCtx(({Component:oe,route:we})=>[o.createVNode(o.Transition,{name:w.value,appear:"",mode:"out-in"},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.KeepAlive,{include:o.unref(s),exclude:o.unref(i)},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(p(we,oe)),{key:`${we.fullPath}_${o.unref(r)}`,onOnLoaded:d},null,32))],1032,["include","exclude"]))]),_:2},1032,["name"])]),_:1}),o.createVNode(o.TransitionGroup,{name:e.pageTransition,tag:"div",class:"stack-tab__iframes",appear:""},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(T.value,oe=>(o.openBlock(),o.createBlock(o.Transition,{key:S(oe),name:e.pageTransition,appear:""},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",Do,[o.withDirectives(o.createElementVNode("div",Po,[o.createElementVNode("span",$o,o.toDisplayString(o.unref(A)("VueStackTab.loading")),1)],512),[[o.vShow,L[oe.id]!==!1]]),o.createElementVNode("iframe",{ref_for:!0,ref:we=>st(oe.id,we),class:"stack-tab__iframe",src:x(oe),frameborder:"0",onLoad:we=>De(oe.id)},null,40,Wo)],512),[[o.vShow,oe.active]])]),_:2},1032,["name"]))),128))]),_:1},8,["name"])])],6)}}}),nt=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const Jt=typeof TextEncoder=="function"?new TextEncoder:void 0,Te=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(e=>{let t={};return e.forEach((n,s)=>t[n]=s),t})(Te);const H=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const Fo=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Qt=typeof btoa=="function"?e=>btoa(e):nt?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,s,r,i="";const a=e.length%3;for(let f=0;f<e.length;){if((n=e.charCodeAt(f++))>255||(s=e.charCodeAt(f++))>255||(r=e.charCodeAt(f++))>255)throw new TypeError("invalid character found");t=n<<16|s<<8|r,i+=Te[t>>18&63]+Te[t>>12&63]+Te[t>>6&63]+Te[t&63]}return a?i.slice(0,a-3)+"===".substring(a):i},Ho=nt?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let s=0,r=e.length;s<r;s+=4096)n.push(H.apply(null,e.subarray(s,s+4096)));return Qt(n.join(""))},Go=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?H(192|t>>>6)+H(128|t&63):H(224|t>>>12&15)+H(128|t>>>6&63)+H(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return H(240|t>>>18&7)+H(128|t>>>12&63)+H(128|t>>>6&63)+H(128|t&63)}},qo=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,jo=e=>e.replace(qo,Go),en=nt?e=>Buffer.from(e,"utf8").toString("base64"):Jt?e=>Ho(Jt.encode(e)):e=>Qt(jo(e)),Zo=(e,t=!1)=>t?Fo(en(e)):en(e),Ko=e=>{const s=`<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1167.06 237.75"><path d="M79.24,19.73h108.91v29.7h-108.91v-29.7Z" style="fill:#79a7ff; stroke-width:0px;"/><path d="M179.24,199.67H20.26c-11.21-.07-20.26-9.17-20.26-20.38V20.39C0,9.18,9.05.07,20.26,0h59.49c3.51.07,6.34,2.9,6.41,6.42v44.36c0,3.54-2.87,6.41-6.41,6.41s-6.41-2.86-6.42-6.4V12.36H20.25c-4.13.07-7.44,3.44-7.44,7.56v159.41c0,4.13,3.31,7.49,7.44,7.56h158.98c4.13-.07,7.44-3.44,7.44-7.56V51.84c0-3.54,2.87-6.41,6.41-6.42,3.55,0,6.42,2.87,6.42,6.42v127.45c0,11.21-9.05,20.32-20.26,20.39h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M192.8,60.77c-3.66-.07-6.61-3.02-6.68-6.68v-18.23c.09-4.29-3.32-7.83-7.6-7.92h-96.43c-3.69,0-6.69-2.99-6.69-6.69s2.99-6.69,6.69-6.69h96.27c11.69.08,21.13,9.58,21.13,21.27v18.25c0,3.69-2.99,6.68-6.68,6.68h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M193.08,58.67H10.15c-3.61-.08-6.48-3.07-6.41-6.68-.08-3.62,2.79-6.61,6.4-6.69,0,0,0,0,0,0h182.93c3.62.08,6.48,3.08,6.41,6.69.07,3.61-2.79,6.6-6.41,6.68h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M137.2,58.67c-3.42.24-6.4-2.32-6.68-5.74v-28.15c.55-3.69,4-6.24,7.69-5.69,2.94.44,5.24,2.75,5.69,5.69v28.15c-.28,3.42-3.26,5.98-6.68,5.74h-.02Z" style="fill:#377dff; stroke-width:0px;"/><path d="M99.78,100.48l-12.83-22.22h-18.39l31.22,54.05,31.22-54.05h-18.39l-12.83,22.22Z" style="fill:#00d797; stroke-width:0px;"/><path d="M135.28,78.26l-35.49,61.43-35.44-61.43h-20.11l55.55,96.2,55.55-96.2s-20.06,0-20.06,0ZM313.33,59.95c0,.52-.67,1.84-2,3.95s-3.3,5.2-5.9,9.28-5.75,9.28-9.46,15.61c-3.7,6.33-7.52,13.34-11.45,21.04-4.51,8.85-7.76,15.8-9.76,20.86s-2.99,9.41-2.99,13.05c0,2.89,1.53,5.44,4.6,7.63,3.7-2.89,7.34-6.33,10.93-10.32,3.58-3.99,7.13-8.44,10.63-13.36s7.55-11.13,12.14-18.65c4.6-7.52,8.69-14.43,12.27-20.73-.17-.52-.36-1.04-.56-1.56s-.3-.95-.3-1.3c0-2.72.55-5.26,1.65-7.63,1.1-2.37,2.47-4.68,4.12-6.94s4.12-5.44,7.42-9.54c.87-1.1,1.94-1.65,3.21-1.65,2.08,0,3.12,1.33,3.12,3.99s-1.08,6.84-3.25,12.53c-2.17,5.7-5.37,12.39-9.59,20.08s-9.47,16.29-15.74,25.81c-6.28,9.51-13.37,19.45-21.3,29.8-8.04,10.47-13.79,15.7-17.26,15.7-1.97,0-4.19-1.08-6.68-3.25s-4.63-5.13-6.42-8.89-2.69-7.78-2.69-12.06c0-2.54.53-5.81,1.6-9.8s2.75-8.78,5.03-14.36,4.87-11.09,7.76-16.53c3.01-5.72,5.65-10.47,7.94-14.23,2.28-3.76,4.87-7.94,7.76-12.53,2.89-4.6,4.34-7.1,4.34-7.5,0-.87-.58-1.3-1.73-1.3-3.35,0-7.82,1.71-13.4,5.12s-12.85,8.59-21.82,15.53c-3.41,2.66-5.57,4.38-6.46,5.16s-1.34,1.43-1.34,1.95c0,.69.55,1.04,1.65,1.04.46,0,2.02-.17,4.68-.52s4.77-.52,6.33-.52c2.6,0,3.9.46,3.9,1.39,0,.81-.54,1.45-1.61,1.91-1.07.46-2.54.93-4.42,1.39s-4.44,1.1-7.68,1.91c-3.47.93-7.16,2.25-11.06,3.99-3.9,1.73-6.14,2.6-6.72,2.6-1.1,0-1.78-.4-2.04-1.21s-.39-2.14-.39-3.99c0-8.21,1.36-14.56,4.08-19.04s7.58-9.15,14.57-14.01c7.98-5.55,15.61-10.16,22.9-13.84,7.29-3.67,13.58-6.36,18.87-8.07s9.18-2.56,11.67-2.56,4.84,1.56,7.24,4.68,3.6,6.42,3.6,9.89h0ZM366.34,124.75c-8.39,11.1-14.76,19-19.13,23.68s-7.94,7.03-10.71,7.03c-2.2,0-4.22-.91-6.07-2.73-1.85-1.82-3.28-4.28-4.29-7.37s-1.52-6.4-1.52-9.93c0-2.31.22-4.39.65-6.25.43-1.85,1.26-3.89,2.47-6.12s2.82-4.64,4.81-7.24c2-2.6,4.44-5.55,7.33-8.85,1.73-2.02,3.19-3.73,4.38-5.12,1.18-1.39,2.34-2.33,3.47-2.82s2.96-.74,5.51-.74c1.85,0,3.61.25,5.29.74,1.68.49,2.52,1,2.52,1.52,0,1.04-.85,2.92-2.56,5.64s-4.45,6.03-8.24,9.93c-3.79,3.9-8.17,7.74-13.14,11.49-1.1,3.41-1.65,6.01-1.65,7.81,0,2.49.95,3.73,2.86,3.73.69,0,1.85-.59,3.47-1.78,1.62-1.18,4.35-3.47,8.2-6.85,3.84-3.38,7.3-6.38,10.37-8.98,2.25-1.97,4.87-4.9,7.85-8.8s5.39-6.84,7.24-8.8c4.28-4.51,7.2-7.44,8.76-8.8s3.06-2.04,4.51-2.04,2.33.43,2.82,1.3c.49.87.74,2.63.74,5.29,0,1.21-.12,2.2-.35,2.95s-.71,1.72-1.43,2.91-2.18,3.37-4.38,6.55-4.8,6.94-7.81,11.28c-1.66,2.38-3.09,4.93-4.25,7.59-1.21,2.75-1.82,4.81-1.82,6.2,0,3.01,1.18,4.51,3.56,4.51,1.96,0,4.25-.81,6.85-2.43s6.59-4.54,11.97-8.76v5.81c-6.77,6.25-11.77,10.79-15.01,13.62s-6.04,4.97-8.41,6.42-4.63,2.17-6.77,2.17c-4.86,0-7.29-2.89-7.29-8.67,0-2.2.72-5.16,2.17-8.89,1.44-3.73,3.79-9.12,7.03-16.18v-.02Z" style="fill:#306fff; stroke-width:0px;"/><path d="M407.71,133.77v2.17c0,3.41.84,6.07,2.52,7.98,1.68,1.91,3.87,2.86,6.59,2.86s5.77-.66,8.8-2c3.04-1.33,6.06-3.09,9.07-5.29s6.68-5.15,11.02-8.85v5.29c-6.54,7.87-12.67,13.89-18.39,18.09-5.72,4.19-11.54,6.29-17.44,6.29-5.15,0-9.22-2-12.23-5.99s-4.51-9.46-4.51-16.39c0-6.07,1.42-11.58,4.25-16.52s7.46-10.16,13.88-15.66c4.39-3.76,8.76-6.59,13.1-8.5s8.21-2.86,11.62-2.86c2.72,0,4.87.62,6.46,1.86s2.39,3.11,2.39,5.59c0,3.64-1.36,7.27-4.08,10.89s-6.87,7.2-12.45,10.76c-5.58,3.56-12.45,6.98-20.6,10.28h0ZM408.58,128.13c5.2-2.02,9.66-4.54,13.36-7.55,3.7-3.01,6.43-5.88,8.2-8.63,1.76-2.75,2.65-4.76,2.65-6.03s-.61-2-1.82-2c-1.04,0-2.73.67-5.07,2s-4.71,3.07-7.11,5.21-4.55,4.66-6.46,7.55c-1.9,2.86-3.17,6.08-3.73,9.46h-.02ZM585.37,132.9c-1.45-2.66-3.61-5.06-6.51-7.2-2.89-2.14-6.15-3.86-9.76-5.16s-7.39-2.27-11.32-2.91c-11.68-1.74-22.58-5.52-32.7-11.36-.87-.46-1.79-1.44-2.78-2.95-.98-1.5-1.47-2.95-1.47-4.34,0-5.09.85-10.19,2.56-15.31,1.71-5.12,3.89-9.12,6.55-12.01,4.28-4.8,11.98-8.99,23.12-12.58,11.13-3.58,23.67-5.38,37.6-5.38,8.33,0,14.76.64,19.3,1.91s6.81,3.24,6.81,5.9c0,4.34-.59,7.69-1.78,10.06s-2.46,3.95-3.82,4.73c-1.36.78-3.75,1.84-7.16,3.17-3.64,1.27-6.81,2.6-9.5,3.99s-4.99,2.72-6.9,3.99c-1.91,1.27-3.09,1.91-3.56,1.91-.58,0-.87-.23-.87-.69,0-.98,1.03-2.47,3.08-4.47s4.58-3.74,7.59-5.25c3.18-1.68,4.77-2.75,4.77-3.21,0-.75-1.76-1.13-5.29-1.13-10.7,0-20.59.95-29.67,2.86s-16.24,4.42-21.47,7.55c-5.23,3.12-7.85,6.3-7.85,9.54,0,2.02,1.08,3.46,3.25,4.29,2.17.84,6.95,2.24,14.36,4.21,7.4,1.97,14.02,4.22,19.86,6.77,8.38,3.59,14.6,7.32,18.65,11.19,4.05,3.88,6.07,8.21,6.07,13.01,0,3.3-.8,6.61-2.39,9.93-1.59,3.33-3.92,6.38-6.98,9.15-3.07,2.78-6.59,5.06-10.58,6.85-3.41,1.45-7.71,2.8-12.88,4.08-5.18,1.27-10.79,2.27-16.83,2.99-6.04.72-11.81,1.08-17.31,1.08-10.12,0-18.26-.95-24.42-2.86s-9.24-4.8-9.24-8.67c0-1.74,1.04-4.44,3.12-8.11s4.54-6.14,7.37-7.42c2.49-.98,4.89-1.55,7.2-1.69,2.31-.14,3.47.13,3.47.82,0,.17-.09.35-.26.52s-.38.32-.61.43c-.23.12-.46.23-.69.35-1.16.46-2.1.82-2.82,1.08-.72.26-1.3.52-1.74.78-.43.26-.65.62-.65,1.08,0,1.21,5.99,1.82,17.96,1.82,10.41,0,18.94-.38,25.59-1.13s12.52-2.11,17.61-4.08c5.09-1.97,9.71-4.68,13.88-8.15l.04.02ZM640.8,85.63h3.73c3.06-5.49,5.84-9.38,8.33-11.67,2.49-2.28,5.32-3.43,8.5-3.43s4.77.72,4.77,2.17c0,.69-1.24,2.57-3.73,5.64s-4.37,5.64-5.64,7.72c1.96.23,3.71.43,5.25.61,1.53.17,2.73.32,3.6.43-3.3,6.13-7.43,12.4-12.4,18.82l-4.08-.3c-1.1-.09-2.21-.17-3.34-.26s-2.5-.19-4.12-.3c-3.12,5.03-5.74,9.53-7.85,13.49s-3.73,7.59-4.86,10.89-1.69,6.42-1.69,9.37c0,3.99,1.59,5.99,4.77,5.99,2.2,0,5.07-1.17,8.63-3.51s8.31-5.94,14.27-10.8v5.81c-15.61,16.95-27.15,25.42-34.61,25.42-2.6,0-4.7-1.01-6.29-3.04-1.59-2.02-2.38-4.63-2.38-7.81,0-2.14.45-4.68,1.34-7.63.9-2.95,2.5-7.4,4.81-13.36-.81.69-1.58,1.37-2.3,2.04s-1.39,1.27-2,1.82-1.26,1.13-1.95,1.73c-.69.61-1.39,1.23-2.08,1.87v-5.99c6.07-5.09,13.42-14.02,22.03-26.8-.87-.06-1.68-.1-2.43-.13s-1.65-.04-2.69-.04c-3.41,0-5.96.23-7.63.69-.69.17-1.34.36-1.95.56s-1.03.3-1.26.3-.35-.17-.35-.52c0-1.91,1.18-4.77,3.56-8.59,1.91-3.24,3.72-5.64,5.42-7.2,1.71-1.56,3.79-2.62,6.25-3.17,2.46-.55,5.91-.82,10.37-.82h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M664.91,115.12c8.79-7.98,17.32-13.91,25.59-17.78s14.66-5.81,19.17-5.81c1.21,0,2.34.51,3.38,1.52,1.04,1,1.88,2.19,2.47,3.51.61,1.33.91,2.31.91,2.95,0,1.04-.41,1.81-1.21,2.3-.81.49-2.23,1.08-4.25,1.78.4.93.92,2.11,1.56,3.56s1.13,2.62,1.47,3.51c.35.9.52,1.69.52,2.39,0,1.39-1.4,3.98-4.21,7.76-2.81,3.79-4.77,6.58-5.9,8.37-1.13,1.79-1.69,3.99-1.69,6.59,0,4.28,1.96,6.42,5.9,6.42s10.38-3.79,19-11.36v5.29c-14.63,16.25-25.1,24.38-31.4,24.38-2.26,0-3.86-.74-4.81-2.21s-1.43-3.66-1.43-6.55c0-4.57,1.65-11.19,4.94-19.86-8.44,9.37-14.72,16.03-18.82,20-4.11,3.96-7.49,5.94-10.15,5.94-1.27,0-2.86-1.1-4.77-3.3-1.91-2.2-3.6-5.04-5.07-8.54-1.47-3.5-2.21-7.13-2.21-10.89,0-2.72.26-4.99.78-6.81s1.53-3.69,3.04-5.59c1.5-1.91,3.9-4.42,7.2-7.55v-.02ZM706.46,105.58c-15.04,6.88-25.75,12.72-32.14,17.52s-9.59,9.75-9.59,14.83c0,1.85.32,3.37.95,4.55.64,1.19,1.5,1.78,2.6,1.78.64,0,1.76-.4,3.38-1.21,6.07-3.58,11.62-8.25,16.66-14.01,5.03-5.75,11.07-13.58,18.13-23.46h.01Z" style="fill:#306fff; stroke-width:0px;"/><path d="M779.07,130.82v5.81c-6.19,6.07-11.23,10.79-15.14,14.14-3.9,3.35-7.55,5.96-10.93,7.81-3.38,1.85-6.69,2.78-9.93,2.78s-6.1-1.26-8.76-3.77c-2.66-2.52-4.74-5.81-6.25-9.89-1.5-4.08-2.26-8.4-2.26-12.97,0-3.93.87-7.43,2.6-10.5,1.74-3.07,5.09-7.03,10.06-11.88,5.9-5.78,11.38-10.25,16.44-13.4s9.04-4.73,11.93-4.73c2.08,0,3.85.72,5.29,2.17s2.17,3.27,2.17,5.46c0,1.85-.95,4.48-2.86,7.89-1.91,3.41-4.05,6.38-6.42,8.89-2.37,2.52-4.25,3.77-5.64,3.77-1.5,0-2.25-.81-2.25-2.43.06-.46.1-.9.13-1.3s.04-.81.04-1.21c0-.69-.25-1.08-.74-1.17s-1.08.13-1.78.65c-5.78,4.05-9.75,6.9-11.88,8.54-2.14,1.65-3.83,3.31-5.07,4.99s-1.87,3.44-1.87,5.29c0,3.41,1.1,6.19,3.3,8.33s5.06,3.21,8.59,3.21,8.02-1.4,13.14-4.21c5.12-2.8,11.15-6.9,18.09-12.27h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M844.13,130.65v5.81c-6.48,7.58-11.91,13.32-16.31,17.22s-8.07,5.86-11.02,5.86-5.39-.84-7.68-2.52c-2.29-1.68-4.34-3.99-6.16-6.94-1.82-2.95-3.98-7.05-6.46-12.32-2.95,3.64-5.61,7.04-7.98,10.19-2.37,3.15-4.02,5.25-4.94,6.29-.93,1.04-1.77,1.56-2.52,1.56-1.56,0-2.69-1-3.38-2.99-.69-2-1.04-4.9-1.04-8.72,0-5.21.62-10.22,1.87-15.05,1.24-4.83,3.04-9.53,5.38-14.1s5.35-9.5,9.02-14.79c3.67-5.29,7.79-10.83,12.36-16.61,6.3-7.98,11.74-14.5,16.31-19.56,4.57-5.06,8.54-8.88,11.93-11.45,3.38-2.57,6.2-3.86,8.46-3.86,2.78,0,4.16,1.24,4.16,3.73,0,2.14-5.12,9.85-15.35,23.12-10.24,13.27-25.16,31.39-44.76,54.35v7.46c13.13-14.05,23.69-24.49,31.71-31.31,8.01-6.82,14.21-10.24,18.61-10.24,1.79,0,3.18,1.06,4.16,3.17s1.47,4.55,1.47,7.33c0,5.67-2.43,10.92-7.29,15.74-4.86,4.83-12.32,10.37-22.38,16.61,1.74,2.6,3.27,4.5,4.6,5.68,1.33,1.19,3.01,1.78,5.03,1.78,1.79,0,3.73-.61,5.81-1.82s4.21-2.75,6.38-4.6,5.51-4.86,10.02-9.02h-.01ZM809.86,135.07c2.2-1.45,4.93-3.69,8.2-6.72,3.27-3.04,6.06-6.19,8.37-9.46s3.47-6,3.47-8.2c0-.92-.41-1.39-1.21-1.39-2.2,0-5.97,2.11-11.32,6.33-5.35,4.22-10.57,9.63-15.66,16.22,2.2,0,4.92,1.07,8.15,3.21h0ZM951.78,140.71l2.86,2.17c-.75,1.62-1.47,3.04-2.17,4.25-.69,1.21-1.53,2.69-2.52,4.42-.98,1.73-1.73,3.04-2.25,3.9-4.34,7.58-8.41,11.36-12.23,11.36-1.62,0-3.01-.64-4.16-1.91-1.16-1.27-1.73-3.01-1.73-5.2,0-3.12,1.11-7.4,3.34-12.84,2.23-5.43,5.67-12.13,10.32-20.08s10.51-16.96,17.57-27.02c7.05-10.06,15.01-20.67,23.85-31.84-5.09-.75-11.13-1.13-18.13-1.13-8.04,0-16.99.9-26.85,2.69s-18.45,3.86-25.76,6.2c-7.32,2.34-10.97,4.06-10.97,5.16,0,.41.14.68.43.82.29.15.77.26,1.43.35s1.52.19,2.56.3c6.77.93,10.15,1.97,10.15,3.12,0,.58-1.47.85-4.42.82s-6.51-.04-10.67-.04c-3.3,0-5.68-.13-7.16-.39s-2.46-.75-2.95-1.47-.74-1.84-.74-3.34c0-.98.29-3.12.87-6.42,1.1-6.13,2.79-11.04,5.07-14.75,2.28-3.7,5.78-6.72,10.5-9.06,4.71-2.34,11.2-4.21,19.47-5.59,13.88-2.37,25.36-3.56,34.44-3.56,6.71,0,12,.27,15.88.82,3.87.55,6.72,1.34,8.54,2.39,1.82,1.04,2.98,2.07,3.47,3.08s1.14,2.76,1.95,5.25l2.69,7.98c.17.52.32.94.43,1.26.12.32.22.65.3,1,.09.35.13.67.13.95,0,2.26-.51,4.28-1.52,6.07s-2.86,4.48-5.55,8.07-4.67,6.39-5.94,8.41c-14.92,24.23-25.1,42.16-30.53,53.78v.02ZM991.94,115.12c8.79-7.98,17.32-13.91,25.59-17.78s14.66-5.81,19.17-5.81c1.21,0,2.34.51,3.38,1.52,1.04,1,1.88,2.19,2.47,3.51.61,1.33.91,2.31.91,2.95,0,1.04-.41,1.81-1.21,2.3-.81.49-2.23,1.08-4.25,1.78.4.93.92,2.11,1.56,3.56s1.13,2.62,1.47,3.51c.35.9.52,1.69.52,2.39,0,1.39-1.4,3.98-4.21,7.76-2.81,3.79-4.77,6.58-5.9,8.37-1.13,1.79-1.69,3.99-1.69,6.59,0,4.28,1.96,6.42,5.9,6.42s10.38-3.79,19-11.36v5.29c-14.63,16.25-25.1,24.38-31.4,24.38-2.26,0-3.86-.74-4.81-2.21s-1.43-3.66-1.43-6.55c0-4.57,1.65-11.19,4.94-19.86-8.44,9.37-14.72,16.03-18.82,20-4.11,3.96-7.49,5.94-10.15,5.94-1.27,0-2.86-1.1-4.77-3.3-1.91-2.2-3.6-5.04-5.07-8.54-1.47-3.5-2.21-7.13-2.21-10.89,0-2.72.26-4.99.78-6.81s1.53-3.69,3.04-5.59c1.5-1.91,3.9-4.42,7.2-7.55v-.02ZM1033.49,105.58c-15.04,6.88-25.75,12.72-32.14,17.52s-9.59,9.75-9.59,14.83c0,1.85.32,3.37.95,4.55.64,1.19,1.5,1.78,2.6,1.78.64,0,1.76-.4,3.38-1.21,6.07-3.58,11.62-8.25,16.66-14.01,5.03-5.75,11.07-13.58,18.13-23.46h.01Z" style="fill:#306fff; stroke-width:0px;"/><path d="M1111.3,130.82v5.64c-6.02,3.82-10.76,5.72-14.23,5.72-1.91,0-3.93-.32-6.07-.95-5.2,6.59-9.67,11.42-13.4,14.49s-7.47,4.6-11.23,4.6c-4.34,0-7.68-2.29-10.02-6.85-2.34-4.57-3.51-10.24-3.51-17,0-9.2,2.78-19.21,8.33-30.06,5.56-10.85,12.29-21.07,20.08-30.45,7.84-9.46,15.43-17.28,22.77-23.46,7.34-6.19,12.32-9.28,14.92-9.28s3.73,1.71,3.73,5.12c0,15.15-19.43,41.58-58.29,79.29-.12,1.04-.17,3.09-.17,6.16,0,7.98,2.14,11.97,6.42,11.97,1.68,0,3.37-.68,5.07-2.04,1.71-1.36,4.32-3.95,7.85-7.76-1.39-3.12-2.08-5.44-2.08-6.94,0-3.18,1.3-6.62,3.9-10.32s5.57-6.9,8.89-9.59c3.33-2.69,5.74-4.03,7.24-4.03,2.37,0,3.56,1.71,3.56,5.12,0,2.6-.68,5.72-2.04,9.37-1.36,3.64-3.34,7.81-5.94,12.49.98.81,1.76,1.4,2.34,1.78s1.45.56,2.6.56c2.66,0,5.75-1.18,9.28-3.56v-.02ZM1067.24,117.81c3.01-2.6,6.03-5.68,9.06-9.24s7.47-9.01,13.32-16.35c5.61-7.05,10.02-12.94,13.23-17.65s5.62-8.63,7.24-11.75c1.62-3.12,2.43-5.26,2.43-6.42,0-.87-.23-1.3-.69-1.3-1.27,0-3.92,2.1-7.94,6.29-4.02,4.19-8.6,9.93-13.75,17.22-7.11,10.06-12.26,17.64-15.44,22.73-3.18,5.09-5.67,10.58-7.46,16.48h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M1110.96,133.08v-2.08c14.92-15.73,25.18-26.75,30.79-33.05,1.27-7.11,4.34-10.67,9.19-10.67,1.21,0,2.52.35,3.9,1.04l.52,1.65c-.23.69-.35,1.68-.35,2.95,0,1.1.42,3.14,1.26,6.12s1.49,5.48,1.95,7.5.69,4.31.69,6.85c0,3.82-.87,7.48-2.6,10.97-1.73,3.5-4.25,6.85-7.55,10.06-3.3,3.21-7.55,6.49-12.75,9.85,2.08.35,3.73.52,4.94.52,2.37,0,4.93-.59,7.68-1.78,2.75-1.18,5.55-2.78,8.41-4.77,2.86-2,6.2-4.58,10.02-7.76v5.81c-7.4,7.23-14.02,12.71-19.86,16.44s-10.87,5.59-15.09,5.59c-5.44,0-10.47-2.31-15.09-6.94-2.72-2.78-4.41-5.43-5.08-7.98-.67-2.54-1-5.99-1-10.32h.02ZM1143.31,119.8l-1.56-12.66c-3.59,4.05-11.25,11.83-22.99,23.33,3.47.75,5.84,1.76,7.11,3.04,1.27,1.27,3.06,3.73,5.38,7.37,3.93-1.62,6.95-3.83,9.07-6.64,2.11-2.8,3.17-6.64,3.17-11.49,0-.58-.01-1.1-.04-1.56s-.07-.92-.13-1.39h0Z" style="fill:#306fff; stroke-width:0px;"/><g style="isolation:isolate;"><text transform="translate(943.45 229.96)" style="fill:#00d797; font-family:ArialMT, Arial; font-size:24px; isolation:isolate;"><tspan x="0" y="0">version: ${e}</tspan></text></g></svg>`,a="data:image/svg+xml;base64,"+Zo(s),f="font-size: 1px; padding: "+Math.floor(100/4)+"px "+Math.floor(580/2)+"px; line-height: "+Math.floor(100/2)+"px;";window.console.log("%c+",f+`background-image: url(${a});background-size: 580px 100px;background-repeat: norepeat; color: transparent;`)},Xo="FORWARD",Yo="BACKWARD";function tn(){const e=o.getCurrentInstance(),{attrs:t,props:n}=e,s=t.tId??n.tId,r=t.pId??n.pId,i=ke.useRoute(),a=ke.useRouter(),f=re(),{getTab:c,markCacheForEviction:l,getComponent:m,addPageScroller:h}=Ce(),b=i.query.__tab;return{forward:A=>{const y=q({__tab:b},A.query);f.emit(Xo),a.push({path:A.path,query:y})},backward:(A,y)=>{const E=c(s);if(!E)return;const _=E.pages;let p=0;if(typeof A=="number")p=Math.abs(A);else{const w=$e(A);y=q(w.query,y);const g=_.list();let V=!1;for(let $=_.size()-2;$>=0;$--)if(p++,g[$]?.path===w.path){V=!0;break}if(!V)return}if(p<=0||_.size()<=p)return;for(let w=0;w<p;w++){const g=_.pop();g&&l(g.id)}const k=_.peek();if(!k)return;const d=m(k.id);if(d&&y){const g=d.components?.DynamicComponent;g?.props&&(g.props=q(y,g.props))}f.emit(Yo),a.push({path:k.path,query:k.query})},addScrollTarget:(...A)=>{h(r,...A)}}}const Jo=o.defineComponent({__name:"iframe",setup(e){return tn(),()=>{}}}),Qo=()=>{const e=re(),{attrs:t}=o.getCurrentInstance();o.onUnmounted(()=>{s()});const n=()=>{e.emit(P.PAGE_LOADING,{tId:t.tId,value:!0})},s=()=>{e.emit(P.PAGE_LOADING,{tId:t.tId,value:!1})};return{openTabLoading:n,closeTabLoading:s}},nn="vue-stack-tabs:refresh",on="vue-stack-tabs:openTab";function es(e){typeof window>"u"||!window.parent||window.parent.postMessage({type:on,payload:e},"*")}function ts(e=()=>window.location.reload()){if(typeof window>"u")return()=>{};const t=n=>{n.data?.type===nn&&e()};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}const ns={install(e,t){Ko("1.0.0"),e.component("VueStackTabs",Yt).use(Hn).use(yn().getI18n(t))}};N.IFrame=Jo,N.MSG_OPEN_TAB=on,N.MSG_REFRESH=nn,N.Stack=xe,N.StackTab=Yt,N.TabHeaderButton=Ve,N.TabScrollMode=Y,N.default=ns,N.onRefreshRequest=ts,N.postOpenTab=es,N.useTabActions=Be,N.useTabLoading=Qo,N.useTabRouter=tn,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
1
|
+
(function(N,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],n):(N=typeof globalThis<"u"?globalThis:N||self,n(N["vue-stack-tabs"]={},N.Vue,N.vueRouter))})(this,(function(N,n,ke){"use strict";const Pt=Object.freeze(Object.defineProperty({__proto__:null,default:{VueStackTab:{close:"close",closeLeft:"close left",closeRight:"close right",closeOthers:"close others",closeAll:"close all",reload:"reload",reloadAll:"reload all",maximum:"maximum",restore:"restore",undefined:"undefined",loading:"loading",openInNewWindow:"Open in new window"}}},Symbol.toStringTag,{value:"Module"})),Vt=Object.freeze(Object.defineProperty({__proto__:null,default:{VueStackTab:{close:"关闭",closeLeft:"关闭左侧",closeRight:"关闭右侧",closeOthers:"关闭其他",closeAll:"关闭所有",reload:"刷新",reloadAll:"刷新所有",maximum:"最大化",restore:"还原",undefined:"未命名",loading:"加载中",openInNewWindow:"在新窗口打开"}}},Symbol.toStringTag,{value:"Module"}));const Dt=["__proto__","prototype","constructor"];function Wt(e){const t=typeof e;return e!==null&&(t==="object"||t==="function")}function $t(e){return!(Array.isArray(e)?e.length:Object.keys(e).length)}function qt(e){return!e.some(t=>Dt.indexOf(t)!==-1)}function Ft(e){const t=e.split("."),o=[];for(let r=0;r<t.length;r++){let s=t[r];for(;s[s.length-1]==="\\"&&t[r+1]!==void 0;)s=s.slice(0,-1)+".",s+=t[++r];o.push(s)}return qt(o)?o:[]}function Ze(e,t){if(!Wt(e))return"";const o=Ft(t);if(o.length===0)return"";let r=Object.assign({},e);for(let s=0;s<o.length;s++){if(typeof r[o[s]]=="string")return r[o[s]];if(r=r[o[s]],r==null){if(s!==o.length-1)return"";break}}return""}function Ut(e,t){if(Array.isArray(t)){const o={},r=[...e.matchAll(/{(.+?)}/g)];return r&&r.forEach((s,c)=>{t[c]&&(o[s[1]]=t[c])}),o}return t}function Gt(e,t){for(const o in t)e=e.replace(`{${o}}`,String(t[o]));return e}function Xe(e,t){return Object.keys(t).forEach(o=>{t[o]instanceof Object&&o in e&&(t[o]={...t[o],...Xe(e[o],t[o])})}),{...e||{},...t}}const jt=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Ke=(e=>jt?Symbol(e):"_vt_"+e)("i18n");function he(){return n.inject(Ke)}function Ht(e){const t=Object.assign({locale:"en",fallbackLocale:"en",messages:{}},e),o=n.ref(t.locale),r=n.reactive({});return Object.entries(t.messages).forEach(([s,c])=>{r[s]=c}),{t(s,c){if(!s)return"";const d=typeof c=="string"&&c?c:o.value;let y=Ze(r[d],s)||Ze(r[t.fallbackLocale],s);if(c&&typeof c!="string"){const a=Ut(y,c);$t(a)||(y=Gt(y,a))}return y||s},current:n.readonly(o),options:n.readonly(e||{}),install(s){const c=this;s.config.globalProperties.$t=c.t,s.provide(Ke,c)},changeLocale(s){o.value=s},setLocaleMessage(s,c){r[s]=Xe(n.toRaw(r[s]||{}),c)},getLocaleMessage(s){return r[s]||{}}}}const Zt=()=>{const e=Object.assign({"./lang/en.ts":Pt,"./lang/zh-CN.ts":Vt});function t(s,c){for(const d in s){const y=s[d];if(y?.default){const a=d.substring(d.lastIndexOf("/")+1,d.lastIndexOf(".")),u=c[a];c[a]=u?{...u,...y.default}:y.default}}}const o=()=>{const s={};return t(e,s),s};return{getI18n:s=>{const c={...o()};if(s)for(const d of s)c[d.locale]=d.messages;return Ht({locale:"zh-CN",fallbackLocale:"en",messages:c})}}},Ye=({wrap:e,left:t=0,top:o=0,smooth:r=!0})=>{e&&(e.scrollTo?e.scrollTo({left:t,top:o,behavior:r?"smooth":"auto"}):(e.scrollLeft=t,e.scrollTop=o))};function Xt({el:e,wrap:t,block:o="start",inline:r="nearest"}){const s=t&&typeof t=="object"&&"value"in t?t.value:t;if(!(!e||!s))if(e.scrollIntoView)e.scrollIntoView({behavior:"smooth",block:o,inline:r});else{const{offsetLeft:c,offsetTop:d}=e;let y,a;o==="center"?a=d+(e.clientHeight-s.clientHeight)/2:a=d,r==="center"?y=c+(e.clientWidth-s.clientWidth)/2:y=c,Ye({wrap:s,left:y,top:a})}}const ze=(e=".stack-tab__container *")=>{const t=Array.from(document.querySelectorAll(e)).map(o=>+window.getComputedStyle(o).zIndex||0);return t.length?Math.max(...t.filter(o=>o<9e4))+1:1};function Je(e){return!!(e&&/^(javascript|data):/i.test(e))}function Qe(e){if(!e||!/^https?:\/\//i.test(e))return!1;try{const t=typeof window<"u"?window.location:{origin:"http://localhost"};return new URL(e,t.origin).origin!==t.origin}catch{return!0}}function Ne(e){const[t,o]=e.split("?");if(!o)return{path:t??"",query:{}};const r={};for(const s of o.split("&")){const[c,d]=s.split("=");c!=null&&d!=null&&d!==""&&(r[c]=d)}return{path:t??"",query:r}}var Q=(e=>(e.WHEEL="wheel",e.BUTTON="button",e.BOTH="both",e))(Q||{});class _e{items;constructor(t){if(this.items=new Map,t)for(const o of t)this.push(o)}push(t){this.items.set(this.items.size,t)}pop(){if(this.isEmpty())return;const t=this.items.get(this.items.size-1);return this.items.delete(this.items.size-1),t}peek(){if(!this.isEmpty())return this.items.get(this.items.size-1)}isEmpty(){return this.items.size===0}size(){return this.items.size}clear(){this.items.clear()}list(){return Array.from(this.items.values())}toJSON(){return this.list()}toString(){return this.list().toString()}}function Kt(e,t,o){var r={},s=r.noTrailing,c=s===void 0?!1:s,d=r.noLeading,y=d===void 0?!1:d,a=r.debounceMode,u=a===void 0?void 0:a,k,m=!1,v=0;function B(){k&&clearTimeout(k)}function O(C){var x=C||{},E=x.upcomingOnly,S=E===void 0?!1:E;B(),m=!S}function M(){for(var C=arguments.length,x=new Array(C),E=0;E<C;E++)x[E]=arguments[E];var S=this,w=Date.now()-v;if(m)return;function _(){v=Date.now(),t.apply(S,x)}function l(){k=void 0}!y&&u&&!k&&_(),B(),u===void 0&&w>e?y?(v=Date.now(),c||(k=setTimeout(u?l:_,e))):_():c!==!0&&(k=setTimeout(u?l:_,u===void 0?e-w:e))}return M.cancel=O,M}function Pe(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function Ve(e,t,o=".",r){if(!Pe(t))return Ve(e,{},o,r);const s=Object.assign({},t);for(const c in e){if(c==="__proto__"||c==="constructor")continue;const d=e[c];d!=null&&(r&&r(s,c,d,o)||(Array.isArray(d)&&Array.isArray(s[c])?s[c]=[...d,...s[c]]:Pe(d)&&Pe(s[c])?s[c]=Ve(d,s[c],(o?`${o}.`:"")+c.toString(),r):s[c]=d))}return s}function Yt(e){return(...t)=>t.reduce((o,r)=>Ve(o,r,"",e),{})}const X=Yt(),et="0123456789ABCDEFGHJKMNPQRSTVWXYZ",xe=32,Jt=16,tt=10,nt=0xffffffffffff;var se;(function(e){e.Base32IncorrectEncoding="B32_ENC_INVALID",e.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",e.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",e.EncodeTimeNegative="ENC_TIME_NEG",e.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",e.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",e.PRNGDetectFailure="PRNG_DETECT",e.ULIDInvalid="ULID_INVALID",e.Unexpected="UNEXPECTED",e.UUIDInvalid="UUID_INVALID"})(se||(se={}));class pe extends Error{constructor(t,o){super(`${o} (${t})`),this.name="ULIDError",this.code=t}}function Qt(e){const t=Math.floor(e()*xe)%xe;return et.charAt(t)}function en(e){const t=tn(),o=t&&(t.crypto||t.msCrypto)||null;if(typeof o?.getRandomValues=="function")return()=>{const r=new Uint8Array(1);return o.getRandomValues(r),r[0]/256};if(typeof o?.randomBytes=="function")return()=>o.randomBytes(1).readUInt8()/256;throw new pe(se.PRNGDetectFailure,"Failed to find a reliable PRNG")}function tn(){return rn()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function nn(e,t){let o="";for(;e>0;e--)o=Qt(t)+o;return o}function on(e,t=tt){if(isNaN(e))throw new pe(se.EncodeTimeValueMalformed,`Time must be a number: ${e}`);if(e>nt)throw new pe(se.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${nt}: ${e}`);if(e<0)throw new pe(se.EncodeTimeNegative,`Time must be positive: ${e}`);if(Number.isInteger(e)===!1)throw new pe(se.EncodeTimeValueMalformed,`Time must be an integer: ${e}`);let o,r="";for(let s=t;s>0;s--)o=e%xe,r=et.charAt(o)+r,e=(e-o)/xe;return r}function rn(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function me(e,t){const o=en(),r=Date.now();return on(r,tt)+nn(Jt,o)}var De={exports:{}},ot;function sn(){return ot||(ot=1,(function(e){var t=(function(){var o=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",c={};function d(a,u){if(!c[a]){c[a]={};for(var k=0;k<a.length;k++)c[a][a.charAt(k)]=k}return c[a][u]}var y={compressToBase64:function(a){if(a==null)return"";var u=y._compress(a,6,function(k){return r.charAt(k)});switch(u.length%4){default:case 0:return u;case 1:return u+"===";case 2:return u+"==";case 3:return u+"="}},decompressFromBase64:function(a){return a==null?"":a==""?null:y._decompress(a.length,32,function(u){return d(r,a.charAt(u))})},compressToUTF16:function(a){return a==null?"":y._compress(a,15,function(u){return o(u+32)})+" "},decompressFromUTF16:function(a){return a==null?"":a==""?null:y._decompress(a.length,16384,function(u){return a.charCodeAt(u)-32})},compressToUint8Array:function(a){for(var u=y.compress(a),k=new Uint8Array(u.length*2),m=0,v=u.length;m<v;m++){var B=u.charCodeAt(m);k[m*2]=B>>>8,k[m*2+1]=B%256}return k},decompressFromUint8Array:function(a){if(a==null)return y.decompress(a);for(var u=new Array(a.length/2),k=0,m=u.length;k<m;k++)u[k]=a[k*2]*256+a[k*2+1];var v=[];return u.forEach(function(B){v.push(o(B))}),y.decompress(v.join(""))},compressToEncodedURIComponent:function(a){return a==null?"":y._compress(a,6,function(u){return s.charAt(u)})},decompressFromEncodedURIComponent:function(a){return a==null?"":a==""?null:(a=a.replace(/ /g,"+"),y._decompress(a.length,32,function(u){return d(s,a.charAt(u))}))},compress:function(a){return y._compress(a,16,function(u){return o(u)})},_compress:function(a,u,k){if(a==null)return"";var m,v,B={},O={},M="",C="",x="",E=2,S=3,w=2,_=[],l=0,g=0,T;for(T=0;T<a.length;T+=1)if(M=a.charAt(T),Object.prototype.hasOwnProperty.call(B,M)||(B[M]=S++,O[M]=!0),C=x+M,Object.prototype.hasOwnProperty.call(B,C))x=C;else{if(Object.prototype.hasOwnProperty.call(O,x)){if(x.charCodeAt(0)<256){for(m=0;m<w;m++)l=l<<1,g==u-1?(g=0,_.push(k(l)),l=0):g++;for(v=x.charCodeAt(0),m=0;m<8;m++)l=l<<1|v&1,g==u-1?(g=0,_.push(k(l)),l=0):g++,v=v>>1}else{for(v=1,m=0;m<w;m++)l=l<<1|v,g==u-1?(g=0,_.push(k(l)),l=0):g++,v=0;for(v=x.charCodeAt(0),m=0;m<16;m++)l=l<<1|v&1,g==u-1?(g=0,_.push(k(l)),l=0):g++,v=v>>1}E--,E==0&&(E=Math.pow(2,w),w++),delete O[x]}else for(v=B[x],m=0;m<w;m++)l=l<<1|v&1,g==u-1?(g=0,_.push(k(l)),l=0):g++,v=v>>1;E--,E==0&&(E=Math.pow(2,w),w++),B[C]=S++,x=String(M)}if(x!==""){if(Object.prototype.hasOwnProperty.call(O,x)){if(x.charCodeAt(0)<256){for(m=0;m<w;m++)l=l<<1,g==u-1?(g=0,_.push(k(l)),l=0):g++;for(v=x.charCodeAt(0),m=0;m<8;m++)l=l<<1|v&1,g==u-1?(g=0,_.push(k(l)),l=0):g++,v=v>>1}else{for(v=1,m=0;m<w;m++)l=l<<1|v,g==u-1?(g=0,_.push(k(l)),l=0):g++,v=0;for(v=x.charCodeAt(0),m=0;m<16;m++)l=l<<1|v&1,g==u-1?(g=0,_.push(k(l)),l=0):g++,v=v>>1}E--,E==0&&(E=Math.pow(2,w),w++),delete O[x]}else for(v=B[x],m=0;m<w;m++)l=l<<1|v&1,g==u-1?(g=0,_.push(k(l)),l=0):g++,v=v>>1;E--,E==0&&(E=Math.pow(2,w),w++)}for(v=2,m=0;m<w;m++)l=l<<1|v&1,g==u-1?(g=0,_.push(k(l)),l=0):g++,v=v>>1;for(;;)if(l=l<<1,g==u-1){_.push(k(l));break}else g++;return _.join("")},decompress:function(a){return a==null?"":a==""?null:y._decompress(a.length,32768,function(u){return a.charCodeAt(u)})},_decompress:function(a,u,k){var m=[],v=4,B=4,O=3,M="",C=[],x,E,S,w,_,l,g,T={val:k(0),position:u,index:1};for(x=0;x<3;x+=1)m[x]=x;for(S=0,_=Math.pow(2,2),l=1;l!=_;)w=T.val&T.position,T.position>>=1,T.position==0&&(T.position=u,T.val=k(T.index++)),S|=(w>0?1:0)*l,l<<=1;switch(S){case 0:for(S=0,_=Math.pow(2,8),l=1;l!=_;)w=T.val&T.position,T.position>>=1,T.position==0&&(T.position=u,T.val=k(T.index++)),S|=(w>0?1:0)*l,l<<=1;g=o(S);break;case 1:for(S=0,_=Math.pow(2,16),l=1;l!=_;)w=T.val&T.position,T.position>>=1,T.position==0&&(T.position=u,T.val=k(T.index++)),S|=(w>0?1:0)*l,l<<=1;g=o(S);break;case 2:return""}for(m[3]=g,E=g,C.push(g);;){if(T.index>a)return"";for(S=0,_=Math.pow(2,O),l=1;l!=_;)w=T.val&T.position,T.position>>=1,T.position==0&&(T.position=u,T.val=k(T.index++)),S|=(w>0?1:0)*l,l<<=1;switch(g=S){case 0:for(S=0,_=Math.pow(2,8),l=1;l!=_;)w=T.val&T.position,T.position>>=1,T.position==0&&(T.position=u,T.val=k(T.index++)),S|=(w>0?1:0)*l,l<<=1;m[B++]=o(S),g=B-1,v--;break;case 1:for(S=0,_=Math.pow(2,16),l=1;l!=_;)w=T.val&T.position,T.position>>=1,T.position==0&&(T.position=u,T.val=k(T.index++)),S|=(w>0?1:0)*l,l<<=1;m[B++]=o(S),g=B-1,v--;break;case 2:return C.join("")}if(v==0&&(v=Math.pow(2,O),O++),m[g])M=m[g];else if(g===B)M=E+E.charAt(0);else return null;C.push(M),m[B++]=E+M.charAt(0),v--,E=M,v==0&&(v=Math.pow(2,O),O++)}}};return y})();e!=null?e.exports=t:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return t})})(De)),De.exports}var rt=sn();const Ee=e=>{const t=e.iframeRefreshMode==="reload"?"R":"P",o=`${e.id}|${e.title}|${e.iframe?"Y":"N"}|${e.closable?"Y":"N"}|${e.refreshable?"Y":"N"}|${t}`;return rt.compressToEncodedURIComponent(o)},an=e=>{const o=rt.decompressFromEncodedURIComponent(e).split("|"),r=o[5]==="R"?"reload":"postMessage";return{id:o[0]??"",title:o[1]??"",iframe:o[2]==="Y",closable:o[3]==="Y",refreshable:o[4]==="Y",iframeRefreshMode:r}},ee=()=>me();function cn(e){return{all:e=e||new Map,on:function(t,o){var r=e.get(t);r?r.push(o):e.set(t,[o])},off:function(t,o){var r=e.get(t);r&&(o?r.splice(r.indexOf(o)>>>0,1):e.set(t,[]))},emit:function(t,o){var r=e.get(t);r&&r.slice().map(function(s){s(o)}),(r=e.get("*"))&&r.slice().map(function(s){s(t,o)})}}}const ln=cn(),fn={install(e){e.provide("tabEmitter",ln)}},ie=()=>n.inject("tabEmitter");var $=(e=>(e.PAGE_LOADING="PAGE_LOADING",e.TAB_ACTIVE="TAB_ACTIVE",e))($||{});const dn=n.defineComponent({__name:"PageLoading",props:{tabId:{}},setup(e){const t=e,o=ie(),r=n.ref(!1),s=d=>{d.tId===t.tabId&&(r.value=d.value)},c=$.PAGE_LOADING;return o.on(c,s),n.onUnmounted(()=>{o.off(c,s)}),(d,y)=>r.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"stack-tab-loading-mask",style:n.normalizeStyle({zIndex:n.unref(ze)(".cache-page-wrapper *")})},[...y[0]||(y[0]=[n.createElementVNode("div",{class:"stack-tab-loading--spin turn"},null,-1)])],4)):n.createCommentVNode("",!0)}}),z=n.ref([]),fe=n.ref([]),K=new Map,te=new Set,Y=new Set,We=n.ref(0),ae=new Map,st=n.ref(!1),un="stacktab-active-tab",ne=n.ref({});let Se=0,it=!1,at="";const hn=e=>{Se=e},pn=e=>{it=e},mn=e=>{at=e},$e=e=>{te.add(e)},be=e=>{for(const t of e.pages.list())$e(t.id);Y.add(e.id)},bn=e=>{for(const t of e.pages.list())$e(t.id)},oe=e=>{fe.value.includes(e)||fe.value.push(e)},ct=e=>{const t=fe.value.indexOf(e);t>=0&&fe.value.splice(t,1)},ge=e=>{e&&(te.delete(e),ct(e),K.delete(e))},re=()=>{if(te.size>0){for(const e of[...te])ge(e);te.clear()}},gn=e=>{const t=ae.get(e);if(t)for(const[o,r]of t){const s=o.startsWith("#")?document.getElementById(o.slice(1)):document.querySelector(o);s&&(s.scrollTop=r.top,s.scrollLeft=r.left)}},vn=e=>{const t=ae.get(e);if(t)for(const o of t.keys()){const r=o.startsWith("#")?document.getElementById(o.slice(1)):document.querySelector(o);t.set(o,{top:r?.scrollTop??0,left:r?.scrollLeft??0})}},Tn=e=>{const t=ae.get(e);t&&(t.clear(),ae.delete(e))},lt=(e,...t)=>{ae.has(e)||ae.set(e,new Map);const o=ae.get(e);for(const r of t)o.set(r,{top:0,left:0})},qe=()=>at+un,ft=e=>{e.id&&window.sessionStorage.setItem(qe(),JSON.stringify(e))},dt=()=>{window.sessionStorage.removeItem(qe())},yn=e=>e==null?null:JSON.parse(e,(t,o)=>t==="pages"?new _e(o):o),ut=n.defineComponent({name:"StackTabEmptyPlaceholder",setup(){return()=>null}}),wn=e=>{const o=e.matched[e.matched.length-1]?.path??e.path,r=e.path.endsWith("/")?e.path.slice(0,-1):e.path;return o===r?r:e.path},Me=()=>{const e=ke.useRouter(),t=ie(),{t:o}=he(),r=()=>z.value.length,s=p=>{for(const b of p){const h=X(b,{id:me(),refreshable:!0,closable:!0,iframe:!1}),R=h.id??me();h.id=R;const L=Ne(h.path),D=X(h,{closable:!0,refreshable:!0,iframe:!1}),W=ee(),P={id:W,tabId:R,path:L.path,query:X(L.query,{__tab:Ee(h)})},q=new _e;q.push(P);const ue={id:R,title:D.title??"",closable:D.closable,refreshable:D.refreshable,iframe:D.iframe,iframeRefreshMode:D.iframeRefreshMode==="reload"?"reload":"postMessage",active:!1,pages:q};oe(W),z.value.push({...ue})}const i=sessionStorage.getItem(qe()),f=yn(i);f&&!z.value.some(b=>b.id===f.id)&&(f.iframe&&f.url&&f.iframeRefreshMode===void 0&&(f.iframeRefreshMode=Qe(f.url)?"reload":"postMessage"),f.pages&&typeof f.pages.list=="function"&&f.pages.list().forEach(h=>{h&&h.id&&oe(h.id)}),z.value.push(f)),st.value=!0},c=p=>z.value.some(i=>i.id===p),d=()=>Se<=0||Se>0&&Se>z.value.length,y=p=>(z.value.push(p),Promise.resolve(!0)),a=p=>z.value.find(i=>i.id===p)??null,u=p=>{if(p.query.__tab)return an(p.query.__tab);const i={id:me(),title:o("VueStackTab.undefined"),closable:!0,refreshable:!0,iframe:!1};return p.query.__tab=Ee(i),i},k=(p,i,f,b)=>{let h=null;for(const R of z.value)R.active=!1,R.id===p.id&&(h=R);if(h===null){const R=new _e;R.push(b);const L=i.query.__src;h={id:p.id,title:p.title,closable:p.closable,refreshable:p.refreshable,iframe:p.iframe,iframeRefreshMode:p.iframeRefreshMode??"postMessage",url:decodeURIComponent(L),active:!0,pages:R},y(h).then(()=>{t.emit($.TAB_ACTIVE,{id:p.id,isRoute:!1})})}else h.active=!0,(h.pages.isEmpty()||h.pages.peek().id!==b.id)&&h.pages.push(b);return h},m=()=>ee(),v=p=>{const i=u(p);if(Y.has(i.id))return{empty:!0};const f=wn(p);let b=i.id?a(i.id):null,h,R=null;if(b&&!b.pages.isEmpty()){const L=b.pages.peek();if(!L)throw new Error("[vue-stack-tabs] Stack is not empty but peek() returned undefined");if(L.path===f)h=L.id;else{const D=b.pages.list();let W=-1;for(let P=D.length-2;P>=0;P--){const q=D[P];if(q&&q.path===f){W=P;break}}if(W!==-1){const P=D.length-1-W;for(let ue=0;ue<P;ue++){const we=b.pages.pop();we&&ge(we.id)}const q=b.pages.peek();h=q?q.id:ee(),q||(R={id:h,tabId:i.id,path:p.path,query:p.query})}else h=ee(),R={id:h,tabId:i.id,path:p.path,query:p.query}}}else h=ee(),R={id:h,tabId:i.id,path:p.path,query:p.query};if(te.has(h)){te.delete(h);const L=K.get(h);if(L)return{recovered:L,cacheName:h}}if(R)b=k(i,p,h,R);else{for(const L of z.value)L.active=!1;b.active=!0,!h&&b&&!b.pages.isEmpty()&&(h=b.pages.peek().id)}return ft(b),{cacheName:h,tabInfo:i,targetTab:b}},B=p=>{const{cacheName:i,tabInfo:f}=p;if(K.has(i))return oe(i),K.get(i);const b=n.defineComponent({name:i,props:{vnode:{type:Object,required:!1,default:void 0}},emits:["onLoaded"],setup(h,R){const L=n.ref(null),D=()=>{try{const P=a(f.id)?.pages.peek();P&&P.id===i&&P._backParams?(L.value={...P._backParams},delete P._backParams):L.value=null}catch{L.value=null}};return n.onMounted(()=>{R.emit("onLoaded"),lt(i,`#W-${i}`),D()}),n.onDeactivated(()=>vn(i)),n.onActivated(()=>{R.emit("onLoaded"),gn(i),re(),Y.clear(),D()}),n.onUnmounted(()=>Tn(i)),()=>{const W=h.vnode,P=L.value?{_back:L.value}:{};return n.createVNode("div",{class:"cache-page-wrapper",id:`W-${i}`,style:[it?"overflow:auto":"overflow:hidden","height: 100%"]},[W?n.cloneVNode(W,{tId:f.id,pId:i,...P||{}}):null,n.createVNode(dn,{tabId:f.id},null)])}}});return K.set(i,b),oe(i),b},O=n.ref(""),M=(p,i)=>{if(!i)return ut;const f=v(p);return"empty"in f?ut:"recovered"in f?(oe(f.cacheName),O.value=f.cacheName,f.recovered):(O.value=f.cacheName,B(f))},C=p=>{const i=a(p.id);i&&(bn(i),re(),i.pages.clear())},x=p=>{let i="";const f=a(p),b=z.value,h=b.findIndex(L=>L?.id===p);if(h<0)return"";const R=b[h];return R.closable?(be(R),R.pages.clear(),b.length>1&&R.active&&(i=(h===0?b[1]:b[h-1])?.id??""),b.splice(h,1),i&&t.emit($.TAB_ACTIVE,{id:i}),f?.active||(re(),Y.clear()),i):p},E=()=>{const p=z.value;for(let b=p.length-1;b>=0;b--){const h=p[b];h?.closable&&(be(h),h.pages.clear(),p.splice(b,1))}if(p.some(b=>b.active)){re(),Y.clear();return}const f=p[p.length-1];f&&t.emit($.TAB_ACTIVE,{id:f.id})};return{tabs:z,caches:fe,refreshKey:We,activeCacheKey:O,isInitialized:st,setMaxSize:hn,canAddTab:d,initialize:s,size:r,active:(p,i=!0)=>{t.emit("FORWARD");const f=a(p);if(f&&!f.active){for(const b of z.value)b.active=b.id===p;if(ft(f),z.value=z.value.slice(),i){const b=f.pages.peek();if(b){const h=Ee({id:f.id,title:f.title,closable:f.closable,refreshable:f.refreshable,iframe:f.iframe}),R=X({__tab:h},b.query||{});e.push({path:b.path,query:R})}}}},getCacheName:m,destroy:()=>{z.value.length=0,te.clear(),Y.clear(),ne.value={},fe.value.length=0,K.clear(),dt()},reset:()=>E(),addCache:oe,removeCache:ct,getTab:a,addTab:y,removeTab:x,removeAllTabs:E,removeLeftTabs:p=>{const i=z.value,f=i.findIndex(h=>h?.id===p);if(f<=0)return;for(let h=f-1;h>=0;h--){const R=i[h];R?.closable&&(be(R),R.pages.clear(),i.splice(h,1))}if(i.some(h=>h.active)){re(),Y.clear();return}const b=i[0];b&&t.emit($.TAB_ACTIVE,{id:b.id})},removeRightTabs:p=>{const i=z.value,f=i.findIndex(h=>h?.id===p);if(f<0||f>=i.length-1)return;for(let h=i.length-1;h>f;h--){const R=i[h];R?.closable&&(be(R),R.pages.clear(),i.splice(h,1))}if(i.some(h=>h.active)){re(),Y.clear();return}const b=i[i.length-1];b&&t.emit($.TAB_ACTIVE,{id:b.id})},removeOtherTabs:p=>{const i=z.value;let f;for(let b=i.length-1;b>=0;b--){const h=i[b];h&&(h.id===p?f=h:h.closable&&(be(h),h.pages.clear(),i.splice(b,1)))}f&&!f.active?t.emit($.TAB_ACTIVE,{id:p}):(re(),Y.clear())},hasTab:c,renewTab:C,addPage:M,addComponent:(p,i)=>K.set(p,i),getComponent:p=>K.get(p),removeComponent:p=>K.delete(p),markCacheForEviction:$e,evictMarkedCaches:re,evictPageCache:ge,refreshTab:p=>{const i=a(p);if(!i?.refreshable)return;if(i.iframe){i.iframeRefreshMode==="reload"?ne.value={...ne.value,[p]:(ne.value[p]??0)+1}:t.emit("REFRESH_IFRAME_POSTMESSAGE",p);return}const f=i.pages.peek();if(!f)return;const b=f.id;ge(b),f.id=ee(),oe(f.id),i.active&&We.value++},refreshAllTabs:()=>{let p=!1;for(const i of z.value)if(i?.refreshable)if(i.iframe)i.iframeRefreshMode==="reload"?ne.value={...ne.value,[i.id]:(ne.value[i.id]??0)+1}:t.emit("REFRESH_IFRAME_POSTMESSAGE",i.id);else{const f=i.pages.peek();if(f){const b=f.id;ge(b),f.id=ee(),oe(f.id),i.active&&(p=!0)}}p&&We.value++},iframeRefreshKeys:ne,addPageScroller:lt,setGlobalScroll:pn,clearSession:dt,setSessionPrefix:mn}};let ht;function Be(){const e=ke.useRouter(),t=ie(),{active:o,hasTab:r,refreshKey:s,reset:c,canAddTab:d,renewTab:y,getTab:a,tabs:u,removeTab:k,removeAllTabs:m,refreshTab:v,refreshAllTabs:B}=Me(),O=w=>{const _={refreshable:!0,closable:!0,iframe:!1};w.iframe&&w.iframeRefreshMode===void 0?_.iframeRefreshMode=Qe(w.path??"")?"reload":"postMessage":w.iframe&&(_.iframeRefreshMode=w.iframeRefreshMode??"postMessage");const l=X(w,_);return l.id||(l.id=me()),l},M=Kt(500,(w,_=!1)=>new Promise((l,g)=>{const T=O(w);if(r(T.id)&&!_){t.emit($.TAB_ACTIVE,{id:T.id}),l(T.id);return}if(T.id&&_&&r(T.id)&&(y(w),a(w.id)?.active&&s.value++),!d()){g(new Error("Max Size"));return}C(w,T),l(T.id)})),C=(w,_)=>{const l=Ee(_);let g=X({__tab:l},w.query),T;if(w.iframe)g.__src=encodeURIComponent(w.path),T=ht;else{const V=Ne(w.path);T=V.path,g=X(V.query,g)}e.push({path:T,query:g})};return{openTab:M,closeTab:k,closeAllTabs:m,refreshTab:v,refreshAllTabs:B,activeTab:o,reset:c,tabs:u,setIFramePath:w=>{ht=w},getWrapper:()=>document.getElementsByClassName("cache-page-wrapper")[0],openInNewWindow:w=>{const _=a(w);_?.iframe&&_.url&&window.open(_.url,"_blank","noopener,noreferrer")}}}const kn={class:"stack-tab__contextmenu-item"},J=n.defineComponent({__name:"ContextMenuItem",props:{icon:{},title:{}},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("div",kn,[n.createElementVNode("div",{class:n.normalizeClass(["stack-tab__contextmenu-icon",e.icon])},null,2),n.createElementVNode("div",{style:{"margin-left":"8px"},onContextmenu:o[0]||(o[0]=n.withModifiers(()=>{},["prevent"]))},n.toDisplayString(e.title),33)]))}}),_n={key:1,class:"divider div-transparent"},xn=((e,t)=>{const o=e.__vccOpts||e;for(const[r,s]of t)o[r]=s;return o})(n.defineComponent({__name:"index",props:{index:{},left:{default:0},top:{default:0},contextMenu:{default:()=>[]},tabItem:{},max:{}},emits:["close"],setup(e,{emit:t}){const o=e,r=t,{t:s}=he(),c=n.ref(),d=n.reactive({left:o.left,top:o.top}),{closeTab:y,closeAllTabs:a,refreshTab:u,refreshAllTabs:k,openInNewWindow:m}=Be(),{removeLeftTabs:v,removeRightTabs:B,removeOtherTabs:O}=Me(),M=C=>{C?.(),r("close")};return n.onMounted(()=>{const C=c.value?.clientWidth??0;d.left+C>window.innerWidth&&(d.left=window.innerWidth-C-5)}),(C,x)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"menuElementRef",ref:c,class:"stack-tab__contextmenu",style:n.normalizeStyle({left:`${d.left}px`,top:`${d.top}px`,"z-index":n.unref(ze)(".stack-tab,.stack-tab *")})},[n.createVNode(J,{icon:"stack-tab__icon-reload svg-mask",title:n.unref(s)("VueStackTab.reload"),disabled:e.tabItem.refreshable?null:"disabled",onClick:x[0]||(x[0]=E=>M(()=>n.unref(u)(e.tabItem.id)))},null,8,["title","disabled"]),n.createVNode(J,{icon:"stack-tab__icon-reload-all svg-mask",title:n.unref(s)("VueStackTab.reloadAll"),onClick:x[1]||(x[1]=E=>M(n.unref(k)))},null,8,["title"]),n.createVNode(J,{icon:"stack-tab__icon-close svg-mask",title:n.unref(s)("VueStackTab.close"),disabled:e.tabItem.closable?null:"disabled",onClick:x[2]||(x[2]=E=>M(()=>n.unref(y)(e.tabItem.id)))},null,8,["title","disabled"]),n.createVNode(J,{icon:"stack-tab__icon-close-lefts svg-mask",title:n.unref(s)("VueStackTab.closeLeft"),disabled:e.index<=0?"disabled":null,onClick:x[3]||(x[3]=E=>M(()=>n.unref(v)(e.tabItem.id)))},null,8,["title","disabled"]),n.createVNode(J,{icon:"stack-tab__icon-close-rights svg-mask",title:n.unref(s)("VueStackTab.closeRight"),disabled:e.index>=e.max-1?"disabled":null,onClick:x[4]||(x[4]=E=>M(()=>n.unref(B)(e.tabItem.id)))},null,8,["title","disabled"]),n.createVNode(J,{icon:"stack-tab__icon-close-others svg-mask",title:n.unref(s)("VueStackTab.closeOthers"),onClick:x[5]||(x[5]=E=>M(()=>n.unref(O)(e.tabItem.id)))},null,8,["title"]),n.createVNode(J,{icon:"stack-tab__icon-close-all svg-mask",title:n.unref(s)("VueStackTab.closeAll"),onClick:x[6]||(x[6]=E=>M(n.unref(a)))},null,8,["title"]),e.tabItem.iframe&&e.tabItem.url?(n.openBlock(),n.createBlock(J,{key:0,icon:"stack-tab__icon-open svg-mask",title:n.unref(s)("VueStackTab.openInNewWindow"),onClick:x[7]||(x[7]=E=>M(()=>n.unref(m)(e.tabItem.id)))},null,8,["title"])):n.createCommentVNode("",!0),e.contextMenu!==void 0&&e.contextMenu.length>0?(n.openBlock(),n.createElementBlock("div",_n)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.contextMenu,(E,S)=>(n.openBlock(),n.createBlock(J,{key:S,icon:E.icon,title:E.title,disabled:E.disabled(e.tabItem)?"disabled":null,onClick:w=>M(()=>!E.disabled(e.tabItem)&&E.callback(e.tabItem.id))},null,8,["icon","title","disabled","onClick"]))),128))],4))}}),[["__scopeId","data-v-6f704637"]]),En=()=>{const e=n.reactive({item:{},index:-1,left:0,top:0,max:0}),t=n.ref(!1),o=s=>{s.target.closest?.(".stack-tab__contextmenu")||(t.value=!1,document.removeEventListener("click",o))};return n.onUnmounted(()=>{document.removeEventListener("click",o)}),{shown:t,contextMenuData:e,showContextMenu:async(s,c,d,y)=>{t.value=!1,document.removeEventListener("click",o),await n.nextTick(()=>{const{clientY:a,clientX:u}=s;t.value=!0,Object.assign(e,{item:c,index:d,top:a,left:u,max:y}),n.nextTick(()=>document.addEventListener("click",o))})}}},Sn={class:"stack-tab__item-title"},Mn=["title"],Bn=["title"],An=n.defineComponent({__name:"TabHeaderItem",props:{item:{}},emits:["close","active"],setup(e,{emit:t}){const o=t,r=ie(),{t:s}=he(),c=n.ref(),d=e,y=v=>{d.item.id===v.id&&m(v.isRoute??!0)},a=$.TAB_ACTIVE;r.on(a,y),n.onUnmounted(()=>{r.off(a,y)});const u=n.computed(()=>d.item.title||s("undefined")),k=()=>{o("close",d.item)},m=(v=!0)=>{o("active",d.item,c.value,v)};return(v,B)=>(n.openBlock(),n.createElementBlock("li",{ref_key:"tabElementRef",ref:c,class:n.normalizeClass(["stack-tab__item",{"is-active":e.item.active,"is-icon":e.item.closable}]),onClick:B[0]||(B[0]=O=>m(!0))},[n.createElementVNode("div",Sn,[n.createElementVNode("div",{class:"stack-tab__item-title-content",title:u.value},n.toDisplayString(u.value),9,Mn)]),e.item.closable?(n.openBlock(),n.createElementBlock("div",{key:0,class:"stack-tab__icon-close-fill stack-tab__item-button",title:n.unref(s)("VueStackTab.close"),onClick:n.withModifiers(k,["stop"])},null,8,Bn)):n.createCommentVNode("",!0)],2))}});var ce=[],Cn=function(){return ce.some(function(e){return e.activeTargets.length>0})},Rn=function(){return ce.some(function(e){return e.skippedTargets.length>0})},pt="ResizeObserver loop completed with undelivered notifications.",On=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:pt}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=pt),window.dispatchEvent(e)},ve;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ve||(ve={}));var le=function(e){return Object.freeze(e)},In=(function(){function e(t,o){this.inlineSize=t,this.blockSize=o,le(this)}return e})(),mt=(function(){function e(t,o,r,s){return this.x=t,this.y=o,this.width=r,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,le(this)}return e.prototype.toJSON=function(){var t=this,o=t.x,r=t.y,s=t.top,c=t.right,d=t.bottom,y=t.left,a=t.width,u=t.height;return{x:o,y:r,top:s,right:c,bottom:d,left:y,width:a,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),Fe=function(e){return e instanceof SVGElement&&"getBBox"in e},bt=function(e){if(Fe(e)){var t=e.getBBox(),o=t.width,r=t.height;return!o&&!r}var s=e,c=s.offsetWidth,d=s.offsetHeight;return!(c||d||e.getClientRects().length)},gt=function(e){var t;if(e instanceof Element)return!0;var o=(t=e?.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(o&&e instanceof o.Element)},Ln=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Te=typeof window<"u"?window:{},Ae=new WeakMap,vt=/auto|scroll/,zn=/^tb|vertical/,Nn=/msie|trident/i.test(Te.navigator&&Te.navigator.userAgent),G=function(e){return parseFloat(e||"0")},de=function(e,t,o){return e===void 0&&(e=0),t===void 0&&(t=0),o===void 0&&(o=!1),new In((o?t:e)||0,(o?e:t)||0)},Tt=le({devicePixelContentBoxSize:de(),borderBoxSize:de(),contentBoxSize:de(),contentRect:new mt(0,0,0,0)}),yt=function(e,t){if(t===void 0&&(t=!1),Ae.has(e)&&!t)return Ae.get(e);if(bt(e))return Ae.set(e,Tt),Tt;var o=getComputedStyle(e),r=Fe(e)&&e.ownerSVGElement&&e.getBBox(),s=!Nn&&o.boxSizing==="border-box",c=zn.test(o.writingMode||""),d=!r&&vt.test(o.overflowY||""),y=!r&&vt.test(o.overflowX||""),a=r?0:G(o.paddingTop),u=r?0:G(o.paddingRight),k=r?0:G(o.paddingBottom),m=r?0:G(o.paddingLeft),v=r?0:G(o.borderTopWidth),B=r?0:G(o.borderRightWidth),O=r?0:G(o.borderBottomWidth),M=r?0:G(o.borderLeftWidth),C=m+u,x=a+k,E=M+B,S=v+O,w=y?e.offsetHeight-S-e.clientHeight:0,_=d?e.offsetWidth-E-e.clientWidth:0,l=s?C+E:0,g=s?x+S:0,T=r?r.width:G(o.width)-l-_,V=r?r.height:G(o.height)-g-w,F=T+C+_+E,H=V+x+w+S,p=le({devicePixelContentBoxSize:de(Math.round(T*devicePixelRatio),Math.round(V*devicePixelRatio),c),borderBoxSize:de(F,H,c),contentBoxSize:de(T,V,c),contentRect:new mt(m,a,T,V)});return Ae.set(e,p),p},wt=function(e,t,o){var r=yt(e,o),s=r.borderBoxSize,c=r.contentBoxSize,d=r.devicePixelContentBoxSize;switch(t){case ve.DEVICE_PIXEL_CONTENT_BOX:return d;case ve.BORDER_BOX:return s;default:return c}},Pn=(function(){function e(t){var o=yt(t);this.target=t,this.contentRect=o.contentRect,this.borderBoxSize=le([o.borderBoxSize]),this.contentBoxSize=le([o.contentBoxSize]),this.devicePixelContentBoxSize=le([o.devicePixelContentBoxSize])}return e})(),kt=function(e){if(bt(e))return 1/0;for(var t=0,o=e.parentNode;o;)t+=1,o=o.parentNode;return t},Vn=function(){var e=1/0,t=[];ce.forEach(function(d){if(d.activeTargets.length!==0){var y=[];d.activeTargets.forEach(function(u){var k=new Pn(u.target),m=kt(u.target);y.push(k),u.lastReportedSize=wt(u.target,u.observedBox),m<e&&(e=m)}),t.push(function(){d.callback.call(d.observer,y,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var o=0,r=t;o<r.length;o++){var s=r[o];s()}return e},_t=function(e){ce.forEach(function(o){o.activeTargets.splice(0,o.activeTargets.length),o.skippedTargets.splice(0,o.skippedTargets.length),o.observationTargets.forEach(function(s){s.isActive()&&(kt(s.target)>e?o.activeTargets.push(s):o.skippedTargets.push(s))})})},Dn=function(){var e=0;for(_t(e);Cn();)e=Vn(),_t(e);return Rn()&&On(),e>0},Ue,xt=[],Wn=function(){return xt.splice(0).forEach(function(e){return e()})},$n=function(e){if(!Ue){var t=0,o=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return Wn()}).observe(o,r),Ue=function(){o.textContent="".concat(t?t--:t++)}}xt.push(e),Ue()},qn=function(e){$n(function(){requestAnimationFrame(e)})},Ce=0,Fn=function(){return!!Ce},Un=250,Gn={attributes:!0,characterData:!0,childList:!0,subtree:!0},Et=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],St=function(e){return e===void 0&&(e=0),Date.now()+e},Ge=!1,jn=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var o=this;if(t===void 0&&(t=Un),!Ge){Ge=!0;var r=St(t);qn(function(){var s=!1;try{s=Dn()}finally{if(Ge=!1,t=r-St(),!Fn())return;s?o.run(1e3):t>0?o.run(t):o.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,o=function(){return t.observer&&t.observer.observe(document.body,Gn)};document.body?o():Te.addEventListener("DOMContentLoaded",o)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Et.forEach(function(o){return Te.addEventListener(o,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),Et.forEach(function(o){return Te.removeEventListener(o,t.listener,!0)}),this.stopped=!0)},e})(),je=new jn,Mt=function(e){!Ce&&e>0&&je.start(),Ce+=e,!Ce&&je.stop()},Hn=function(e){return!Fe(e)&&!Ln(e)&&getComputedStyle(e).display==="inline"},Zn=(function(){function e(t,o){this.target=t,this.observedBox=o||ve.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=wt(this.target,this.observedBox,!0);return Hn(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),Xn=(function(){function e(t,o){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=o}return e})(),Re=new WeakMap,Bt=function(e,t){for(var o=0;o<e.length;o+=1)if(e[o].target===t)return o;return-1},Oe=(function(){function e(){}return e.connect=function(t,o){var r=new Xn(t,o);Re.set(t,r)},e.observe=function(t,o,r){var s=Re.get(t),c=s.observationTargets.length===0;Bt(s.observationTargets,o)<0&&(c&&ce.push(s),s.observationTargets.push(new Zn(o,r&&r.box)),Mt(1),je.schedule())},e.unobserve=function(t,o){var r=Re.get(t),s=Bt(r.observationTargets,o),c=r.observationTargets.length===1;s>=0&&(c&&ce.splice(ce.indexOf(r),1),r.observationTargets.splice(s,1),Mt(-1))},e.disconnect=function(t){var o=this,r=Re.get(t);r.observationTargets.slice().forEach(function(s){return o.unobserve(t,s.target)}),r.activeTargets.splice(0,r.activeTargets.length)},e})(),At=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Oe.connect(this,t)}return e.prototype.observe=function(t,o){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!gt(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Oe.observe(this,t,o)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!gt(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Oe.unobserve(this,t)},e.prototype.disconnect=function(){Oe.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})();const Kn=["disabled","title"],Yn={key:1,class:"stack-tab__button"},Ie=n.defineComponent({__name:"TabHeaderButton",props:{disabled:{type:Boolean,default:!1},shadow:{default:null},iconClass:{default:""},title:{default:""}},setup(e){return(t,o)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["stack-tab__header-button",{"stack-tab__shadow-right":e.shadow==="right","stack-tab__shadow-left":e.shadow==="left"}]),disabled:e.disabled?"disabled":null,title:e.title},["icon"in t.$slots?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["stack-tab__mask-button",e.iconClass])},null,2)),"icon"in t.$slots?(n.openBlock(),n.createElementBlock("div",Yn,[n.renderSlot(t.$slots,"icon")])):n.createCommentVNode("",!0)],10,Kn))}}),Jn=n.defineComponent({__name:"TabHeaderScroll",props:{space:{default:300},isScrollWheel:{type:Boolean,default:!0},isScrollButton:{type:Boolean,default:!0}},setup(e,{expose:t}){const o=n.ref(null),r=n.ref(null),s=n.ref(null),c=n.ref(!1),d=n.ref(!1),y=n.ref(!1),a=n.ref(!0),u=n.ref(),k=e,m=n.reactive({clientWidth:0,scrollWidth:0,scrollLeft:0}),v=n.reactive({thumbLeft:0,startScrollLeft:0,startThumbLeft:0,startPageX:0});n.watch(m,i=>{B(i)});const B=i=>{d.value=i.scrollLeft<=10,y.value=i.clientWidth+i.scrollLeft-i.scrollWidth>=-10,a.value=i.scrollWidth!==i.clientWidth},O=n.computed(()=>m.scrollWidth>m.clientWidth),M=n.computed(()=>{if(!O.value)return 0;const{clientWidth:i,scrollWidth:f}=m;return i/f*i}),C=n.computed(()=>{if(!O.value)return 0;const{clientWidth:i,scrollWidth:f,scrollLeft:b}=m;return(i-M.value)*(b/(f-i))}),x=()=>{if(!o.value)return;const{clientWidth:i,scrollWidth:f,scrollLeft:b}=o.value;Object.assign(m,{clientWidth:i,scrollWidth:f,scrollLeft:b})},E=()=>{const i=o.value?.querySelector(".stack-tab__item.is-active");i&&!p(i)&&H(i)},S=new At(()=>{x(),E()}),w=new At(()=>{O.value||E(),x()}),_=(i,f=!0)=>{Ye({wrap:o.value,left:i,top:0,smooth:f})},l=i=>{_(o.value.scrollLeft+i)},g=i=>{const f=i.deltaY<0;_(o.value.scrollLeft+(f?-k.space:k.space))},T=i=>{Object.assign(v,{startPageX:i.pageX,startScrollLeft:o.value?.scrollLeft,startThumbLeft:C.value,thumbLeft:C.value}),c.value=!0,document.addEventListener("mousemove",V),document.addEventListener("mouseup",F)},V=i=>{const{clientWidth:f,scrollWidth:b}=m;let h=v.startThumbLeft+i.pageX-v.startPageX;const R=f-M.value;h<0?h=0:h>R&&(h=R),v.thumbLeft=h,_(h*(b-f)/(f-M.value),!1),i.preventDefault()},F=()=>{c.value=!1,document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",F)};n.onMounted(()=>{S.observe(u.value);const i=o.value?.querySelector(".stack-tab__nav");w.observe(i)}),n.onUnmounted(()=>{S.disconnect(),w.disconnect()});const H=i=>{Xt({el:i,wrap:o.value,block:"end",inline:"center"})},p=i=>{if(!O.value)return!0;const f=i.offsetLeft,b=o.value.scrollLeft;return!(f<b||f+i.clientWidth>b+o.value.clientWidth)};return t({scrollIntoView:H,isInView:p}),(i,f)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[a.value?(n.openBlock(),n.createBlock(Ie,{key:0,"icon-class":"stack-tab__icon-left-arrow",disabled:d.value,onClick:f[0]||(f[0]=b=>!d.value&&l(-1*e.space))},null,8,["disabled"])):n.createCommentVNode("",!0),n.createElementVNode("div",{ref_key:"headerScroll",ref:u,class:"stack-tab__scroll",onWheelPassive:g},[n.createElementVNode("div",{ref_key:"container",ref:o,class:n.normalizeClass(["stack-tab__scroll-container",{"stack-tab__shadow-inset-left":!d.value&&y.value,"stack-tab__shadow-inset-right":!y.value&&d.value,"stack-tab__shadow-inset-all":!d.value&&!y.value}]),onScrollPassive:x},[n.renderSlot(i.$slots,"default")],34),n.withDirectives(n.createElementVNode("div",{ref_key:"bar",ref:r,class:n.normalizeClass(["stack-tab__scrollbar",{"is-dragging":c.value}])},[n.createElementVNode("div",{ref_key:"thumb",ref:s,class:n.normalizeClass(["stack-tab__scrollbar-thumb",{"is-dragging":c.value}]),style:n.normalizeStyle({width:`${M.value}px`,transform:`translateX(${C.value}px)`}),onMousedown:n.withModifiers(T,["prevent"])},null,38)],2),[[n.vShow,O.value]])],544),a.value?(n.openBlock(),n.createBlock(Ie,{key:1,"icon-class":"stack-tab__icon-right-arrow",disabled:y.value,onClick:f[1]||(f[1]=b=>!y.value&&l(e.space))},null,8,["disabled"])):n.createCommentVNode("",!0)],64))}}),Qn={class:"stack-tab__header"},eo=n.defineComponent({__name:"index",props:{space:{},tabScrollMode:{default:Q.BOTH},tabTransition:{default:()=>({name:"stack-tab-zoom"})},contextmenu:{type:[Boolean,Object],default:!0},max:{default:20}},emits:["active"],setup(e,{emit:t}){const{t:o}=he(),r=n.inject("maximum"),s=t,c=n.ref(),{shown:d,contextMenuData:y,showContextMenu:a}=En(),u=()=>{d.value=!1},k=e,{closeTab:m,activeTab:v,tabs:B}=Be(),O=n.computed(()=>typeof k.tabTransition=="string"?{name:k.tabTransition}:k.tabTransition),M=n.computed(()=>k.tabScrollMode===Q.BOTH||k.tabScrollMode===Q.BUTTON),C=k.tabScrollMode===Q.BOTH||k.tabScrollMode===Q.WHEEL,x=S=>{S.closable&&m(S.id),d.value=!1},E=(S,w,_)=>{c.value&&w&&n.nextTick(()=>{c.value.isInView(w)||c.value.scrollIntoView(w)}),v(S.id,_),s("active",S.id)};return(S,w)=>(n.openBlock(),n.createElementBlock("div",Qn,[n.renderSlot(S.$slots,"leftButton"),n.createVNode(Jn,{ref_key:"scrollContainerRef",ref:c,space:e.space,"is-scroll-wheel":n.unref(C),"is-scroll-button":M.value},{default:n.withCtx(()=>[n.createVNode(n.TransitionGroup,n.mergeProps({key:"tab-list-transition",tag:"ul",class:"stack-tab__nav"},O.value,{appear:""}),{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(B),(_,l)=>(n.openBlock(),n.createBlock(An,{key:_.id,contextmenu:e.contextmenu,item:_,onContextmenu:n.withModifiers(g=>n.unref(a)(g,_,l,n.unref(B).length),["prevent"]),onMouseup:n.withModifiers(g=>x(_),["middle","prevent"]),onClose:x,onActive:E},null,8,["contextmenu","item","onContextmenu","onMouseup"]))),128))]),_:1},16)]),_:1},8,["space","is-scroll-wheel","is-scroll-button"]),n.renderSlot(S.$slots,"rightButton"),n.createVNode(Ie,{"icon-class":n.unref(r)?"stack-tab__icon-restore":"stack-tab__icon-fullscreen",title:n.unref(o)("VueStackTab.maximum"),onClick:w[0]||(w[0]=_=>r.value=!n.unref(r))},null,8,["icon-class","title"]),n.createVNode(n.Transition,{name:"stack-tab-zoom",appear:""},{default:n.withCtx(()=>[n.unref(d)?(n.openBlock(),n.createBlock(xn,{key:"context-menu-transition",left:n.unref(y).left,top:n.unref(y).top,"tab-item":n.unref(y).item,max:n.unref(y).max,index:n.unref(y).index,onClose:u},null,8,["left","top","tab-item","max","index"])):n.createCommentVNode("",!0)]),_:1})]))}}),to={class:"stack-tab__container"},no={class:"stack-tab__iframe-wrapper"},oo={class:"stack-tab__iframe-loading"},ro={class:"stack-tab__iframe-loading-text"},so=["src","onLoad"],io=5e3,Ct=n.defineComponent({__name:"StackTabs",props:{defaultTabs:{default:()=>[]},max:{default:20},contextmenu:{type:[Boolean,Object],default:!0},pageTransition:{default:"stack-tab-swap"},pageTransitionBack:{default:"stack-tab-swap-back"},tabTransition:{default:"stack-tab-zoom"},tabScrollMode:{default:Q.BOTH},width:{default:"100%"},height:{default:"100%"},i18n:{default:"zh-CN"},space:{default:300},globalScroll:{type:Boolean,default:!1},iframePath:{},sessionPrefix:{default:""},iframeAllowedOrigins:{default:()=>[]}},emits:["onActive","onPageLoaded"],setup(e,{emit:t}){const{tabs:o,caches:r,iframeRefreshKeys:s,activeCacheKey:c,destroy:d,addPage:y,initialize:a,setMaxSize:u,setGlobalScroll:k,setSessionPrefix:m}=Me(),v=t,B=e,{changeLocale:O,t:M}=he(),C=n.ref(!1);n.provide("maximum",C);const{setIFramePath:x,openTab:E}=Be();x(B.iframePath),k(B.globalScroll),O(B.i18n);const S=(A,I)=>y(A,I),w=A=>{v("onActive",A)};u(B.max);const _=()=>{v("onPageLoaded")},l=n.ref(B.pageTransition),g=ie(),T=()=>{l.value=B.pageTransition},V=()=>{l.value=B.pageTransitionBack};g.on("FORWARD",T),g.on("BACKWARD",V);const F=n.computed(()=>o.value.filter(A=>A.iframe)),H=n.reactive({}),p=n.computed(()=>F.value.filter(A=>A.active&&(A.url??"")&&!Je(A.url??"")));n.watch(p,A=>{for(const I of A)H[I.id]=!0},{immediate:!0,deep:!0});const i=A=>{const I=A.url??"";return Je(I)?"about:blank":H[A.id]?I:"about:blank"},f=A=>A.iframeRefreshMode==="reload"?`${A.id}-${s.value[A.id]??0}`:A.id,b=n.reactive({}),h=n.reactive({}),R=new Map,L=A=>{const I=R.get(A);I&&(clearTimeout(I),R.delete(A)),b[A]=!0,h[A]=!1},D=A=>{if(b[A])return;h[A]=!0;const I=R.get(A);I&&clearTimeout(I),R.set(A,setTimeout(()=>{R.delete(A),h[A]=!1},io))};n.watch(p,A=>{for(const I of A)D(I.id)},{immediate:!0,deep:!0});const W=n.reactive({}),P=(A,I)=>{I?W[A]=I:delete W[A]},q=A=>{const Z=W[A];if(Z?.contentWindow)try{Z.contentWindow.postMessage({type:"vue-stack-tabs:refresh"},"*")}catch{}},ue=n.computed(()=>{const A=typeof window<"u"?window.location.origin:"",I=B.iframeAllowedOrigins??[];return[A,...I].filter(Boolean)}),we=A=>{if(!ue.value.includes(A.origin))return;const I=A.data;if(!I||typeof I!="object"||I.type!=="vue-stack-tabs:openTab")return;const Z=I.payload;Z&&typeof Z=="object"&&Z.title&&Z.path&&E(Z)};return g.on("REFRESH_IFRAME_POSTMESSAGE",q),n.onBeforeMount(()=>{m(B.sessionPrefix),a(B.defaultTabs),window.addEventListener("message",we)}),n.onBeforeUnmount(()=>{window.removeEventListener("message",we),g.off("REFRESH_IFRAME_POSTMESSAGE",q),g.off("FORWARD",T),g.off("BACKWARD",V),d()}),(A,I)=>{const Z=n.resolveComponent("router-view");return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["stack-tab",{"stack-tab__maximum":C.value}]),style:n.normalizeStyle({width:e.width,height:e.height,"z-index":C.value?n.unref(ze)("body *:not(.stack-tab,.stack-tab *)"):void 0})},[n.createVNode(eo,{space:e.space,"tab-transition":e.tabTransition,max:e.max,onActive:w},{leftButton:n.withCtx(()=>[n.renderSlot(A.$slots,"leftButton")]),rightButton:n.withCtx(()=>[n.renderSlot(A.$slots,"rightButton")]),_:3},8,["space","tab-transition","max"]),n.createElementVNode("div",to,[n.createVNode(Z,null,{default:n.withCtx(({Component:U,route:Le})=>[n.createVNode(n.Transition,{name:l.value,appear:"",mode:"out-in"},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.KeepAlive,{include:n.unref(r)},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(S(Le,U)),{key:n.unref(c),vnode:U,onOnLoaded:_},null,40,["vnode"]))],1032,["include"]))]),_:2},1032,["name"])]),_:1}),n.createVNode(n.TransitionGroup,{name:e.pageTransition,tag:"div",class:"stack-tab__iframes",appear:""},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(F.value,U=>(n.openBlock(),n.createBlock(n.Transition,{key:f(U),name:e.pageTransition,appear:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",no,[n.withDirectives(n.createElementVNode("div",oo,[n.createElementVNode("span",ro,n.toDisplayString(n.unref(M)("VueStackTab.loading")),1)],512),[[n.vShow,h[U.id]!==!1]]),(n.openBlock(),n.createElementBlock("iframe",{key:n.unref(s)[U.id]||0,ref_for:!0,ref:Le=>P(U.id,Le),class:"stack-tab__iframe",src:i(U),frameborder:"0",onLoad:Le=>L(U.id)},null,40,so))],512),[[n.vShow,U.active]])]),_:2},1032,["name"]))),128))]),_:1},8,["name"])])],6)}}}),He=typeof Buffer=="function";typeof TextDecoder=="function"&&new TextDecoder;const Rt=typeof TextEncoder=="function"?new TextEncoder:void 0,ye=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(e=>{let t={};return e.forEach((o,r)=>t[o]=r),t})(ye);const j=String.fromCharCode.bind(String);typeof Uint8Array.from=="function"&&Uint8Array.from.bind(Uint8Array);const ao=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),Ot=typeof btoa=="function"?e=>btoa(e):He?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,o,r,s,c="";const d=e.length%3;for(let y=0;y<e.length;){if((o=e.charCodeAt(y++))>255||(r=e.charCodeAt(y++))>255||(s=e.charCodeAt(y++))>255)throw new TypeError("invalid character found");t=o<<16|r<<8|s,c+=ye[t>>18&63]+ye[t>>12&63]+ye[t>>6&63]+ye[t&63]}return d?c.slice(0,d-3)+"===".substring(d):c},co=He?e=>Buffer.from(e).toString("base64"):e=>{let o=[];for(let r=0,s=e.length;r<s;r+=4096)o.push(j.apply(null,e.subarray(r,r+4096)));return Ot(o.join(""))},lo=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?j(192|t>>>6)+j(128|t&63):j(224|t>>>12&15)+j(128|t>>>6&63)+j(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return j(240|t>>>18&7)+j(128|t>>>12&63)+j(128|t>>>6&63)+j(128|t&63)}},fo=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,uo=e=>e.replace(fo,lo),It=He?e=>Buffer.from(e,"utf8").toString("base64"):Rt?e=>co(Rt.encode(e)):e=>Ot(uo(e)),ho=(e,t=!1)=>t?ao(It(e)):It(e),po=e=>{const r=`<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1167.06 237.75"><path d="M79.24,19.73h108.91v29.7h-108.91v-29.7Z" style="fill:#79a7ff; stroke-width:0px;"/><path d="M179.24,199.67H20.26c-11.21-.07-20.26-9.17-20.26-20.38V20.39C0,9.18,9.05.07,20.26,0h59.49c3.51.07,6.34,2.9,6.41,6.42v44.36c0,3.54-2.87,6.41-6.41,6.41s-6.41-2.86-6.42-6.4V12.36H20.25c-4.13.07-7.44,3.44-7.44,7.56v159.41c0,4.13,3.31,7.49,7.44,7.56h158.98c4.13-.07,7.44-3.44,7.44-7.56V51.84c0-3.54,2.87-6.41,6.41-6.42,3.55,0,6.42,2.87,6.42,6.42v127.45c0,11.21-9.05,20.32-20.26,20.39h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M192.8,60.77c-3.66-.07-6.61-3.02-6.68-6.68v-18.23c.09-4.29-3.32-7.83-7.6-7.92h-96.43c-3.69,0-6.69-2.99-6.69-6.69s2.99-6.69,6.69-6.69h96.27c11.69.08,21.13,9.58,21.13,21.27v18.25c0,3.69-2.99,6.68-6.68,6.68h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M193.08,58.67H10.15c-3.61-.08-6.48-3.07-6.41-6.68-.08-3.62,2.79-6.61,6.4-6.69,0,0,0,0,0,0h182.93c3.62.08,6.48,3.08,6.41,6.69.07,3.61-2.79,6.6-6.41,6.68h0Z" style="fill:#377dff; stroke-width:0px;"/><path d="M137.2,58.67c-3.42.24-6.4-2.32-6.68-5.74v-28.15c.55-3.69,4-6.24,7.69-5.69,2.94.44,5.24,2.75,5.69,5.69v28.15c-.28,3.42-3.26,5.98-6.68,5.74h-.02Z" style="fill:#377dff; stroke-width:0px;"/><path d="M99.78,100.48l-12.83-22.22h-18.39l31.22,54.05,31.22-54.05h-18.39l-12.83,22.22Z" style="fill:#00d797; stroke-width:0px;"/><path d="M135.28,78.26l-35.49,61.43-35.44-61.43h-20.11l55.55,96.2,55.55-96.2s-20.06,0-20.06,0ZM313.33,59.95c0,.52-.67,1.84-2,3.95s-3.3,5.2-5.9,9.28-5.75,9.28-9.46,15.61c-3.7,6.33-7.52,13.34-11.45,21.04-4.51,8.85-7.76,15.8-9.76,20.86s-2.99,9.41-2.99,13.05c0,2.89,1.53,5.44,4.6,7.63,3.7-2.89,7.34-6.33,10.93-10.32,3.58-3.99,7.13-8.44,10.63-13.36s7.55-11.13,12.14-18.65c4.6-7.52,8.69-14.43,12.27-20.73-.17-.52-.36-1.04-.56-1.56s-.3-.95-.3-1.3c0-2.72.55-5.26,1.65-7.63,1.1-2.37,2.47-4.68,4.12-6.94s4.12-5.44,7.42-9.54c.87-1.1,1.94-1.65,3.21-1.65,2.08,0,3.12,1.33,3.12,3.99s-1.08,6.84-3.25,12.53c-2.17,5.7-5.37,12.39-9.59,20.08s-9.47,16.29-15.74,25.81c-6.28,9.51-13.37,19.45-21.3,29.8-8.04,10.47-13.79,15.7-17.26,15.7-1.97,0-4.19-1.08-6.68-3.25s-4.63-5.13-6.42-8.89-2.69-7.78-2.69-12.06c0-2.54.53-5.81,1.6-9.8s2.75-8.78,5.03-14.36,4.87-11.09,7.76-16.53c3.01-5.72,5.65-10.47,7.94-14.23,2.28-3.76,4.87-7.94,7.76-12.53,2.89-4.6,4.34-7.1,4.34-7.5,0-.87-.58-1.3-1.73-1.3-3.35,0-7.82,1.71-13.4,5.12s-12.85,8.59-21.82,15.53c-3.41,2.66-5.57,4.38-6.46,5.16s-1.34,1.43-1.34,1.95c0,.69.55,1.04,1.65,1.04.46,0,2.02-.17,4.68-.52s4.77-.52,6.33-.52c2.6,0,3.9.46,3.9,1.39,0,.81-.54,1.45-1.61,1.91-1.07.46-2.54.93-4.42,1.39s-4.44,1.1-7.68,1.91c-3.47.93-7.16,2.25-11.06,3.99-3.9,1.73-6.14,2.6-6.72,2.6-1.1,0-1.78-.4-2.04-1.21s-.39-2.14-.39-3.99c0-8.21,1.36-14.56,4.08-19.04s7.58-9.15,14.57-14.01c7.98-5.55,15.61-10.16,22.9-13.84,7.29-3.67,13.58-6.36,18.87-8.07s9.18-2.56,11.67-2.56,4.84,1.56,7.24,4.68,3.6,6.42,3.6,9.89h0ZM366.34,124.75c-8.39,11.1-14.76,19-19.13,23.68s-7.94,7.03-10.71,7.03c-2.2,0-4.22-.91-6.07-2.73-1.85-1.82-3.28-4.28-4.29-7.37s-1.52-6.4-1.52-9.93c0-2.31.22-4.39.65-6.25.43-1.85,1.26-3.89,2.47-6.12s2.82-4.64,4.81-7.24c2-2.6,4.44-5.55,7.33-8.85,1.73-2.02,3.19-3.73,4.38-5.12,1.18-1.39,2.34-2.33,3.47-2.82s2.96-.74,5.51-.74c1.85,0,3.61.25,5.29.74,1.68.49,2.52,1,2.52,1.52,0,1.04-.85,2.92-2.56,5.64s-4.45,6.03-8.24,9.93c-3.79,3.9-8.17,7.74-13.14,11.49-1.1,3.41-1.65,6.01-1.65,7.81,0,2.49.95,3.73,2.86,3.73.69,0,1.85-.59,3.47-1.78,1.62-1.18,4.35-3.47,8.2-6.85,3.84-3.38,7.3-6.38,10.37-8.98,2.25-1.97,4.87-4.9,7.85-8.8s5.39-6.84,7.24-8.8c4.28-4.51,7.2-7.44,8.76-8.8s3.06-2.04,4.51-2.04,2.33.43,2.82,1.3c.49.87.74,2.63.74,5.29,0,1.21-.12,2.2-.35,2.95s-.71,1.72-1.43,2.91-2.18,3.37-4.38,6.55-4.8,6.94-7.81,11.28c-1.66,2.38-3.09,4.93-4.25,7.59-1.21,2.75-1.82,4.81-1.82,6.2,0,3.01,1.18,4.51,3.56,4.51,1.96,0,4.25-.81,6.85-2.43s6.59-4.54,11.97-8.76v5.81c-6.77,6.25-11.77,10.79-15.01,13.62s-6.04,4.97-8.41,6.42-4.63,2.17-6.77,2.17c-4.86,0-7.29-2.89-7.29-8.67,0-2.2.72-5.16,2.17-8.89,1.44-3.73,3.79-9.12,7.03-16.18v-.02Z" style="fill:#306fff; stroke-width:0px;"/><path d="M407.71,133.77v2.17c0,3.41.84,6.07,2.52,7.98,1.68,1.91,3.87,2.86,6.59,2.86s5.77-.66,8.8-2c3.04-1.33,6.06-3.09,9.07-5.29s6.68-5.15,11.02-8.85v5.29c-6.54,7.87-12.67,13.89-18.39,18.09-5.72,4.19-11.54,6.29-17.44,6.29-5.15,0-9.22-2-12.23-5.99s-4.51-9.46-4.51-16.39c0-6.07,1.42-11.58,4.25-16.52s7.46-10.16,13.88-15.66c4.39-3.76,8.76-6.59,13.1-8.5s8.21-2.86,11.62-2.86c2.72,0,4.87.62,6.46,1.86s2.39,3.11,2.39,5.59c0,3.64-1.36,7.27-4.08,10.89s-6.87,7.2-12.45,10.76c-5.58,3.56-12.45,6.98-20.6,10.28h0ZM408.58,128.13c5.2-2.02,9.66-4.54,13.36-7.55,3.7-3.01,6.43-5.88,8.2-8.63,1.76-2.75,2.65-4.76,2.65-6.03s-.61-2-1.82-2c-1.04,0-2.73.67-5.07,2s-4.71,3.07-7.11,5.21-4.55,4.66-6.46,7.55c-1.9,2.86-3.17,6.08-3.73,9.46h-.02ZM585.37,132.9c-1.45-2.66-3.61-5.06-6.51-7.2-2.89-2.14-6.15-3.86-9.76-5.16s-7.39-2.27-11.32-2.91c-11.68-1.74-22.58-5.52-32.7-11.36-.87-.46-1.79-1.44-2.78-2.95-.98-1.5-1.47-2.95-1.47-4.34,0-5.09.85-10.19,2.56-15.31,1.71-5.12,3.89-9.12,6.55-12.01,4.28-4.8,11.98-8.99,23.12-12.58,11.13-3.58,23.67-5.38,37.6-5.38,8.33,0,14.76.64,19.3,1.91s6.81,3.24,6.81,5.9c0,4.34-.59,7.69-1.78,10.06s-2.46,3.95-3.82,4.73c-1.36.78-3.75,1.84-7.16,3.17-3.64,1.27-6.81,2.6-9.5,3.99s-4.99,2.72-6.9,3.99c-1.91,1.27-3.09,1.91-3.56,1.91-.58,0-.87-.23-.87-.69,0-.98,1.03-2.47,3.08-4.47s4.58-3.74,7.59-5.25c3.18-1.68,4.77-2.75,4.77-3.21,0-.75-1.76-1.13-5.29-1.13-10.7,0-20.59.95-29.67,2.86s-16.24,4.42-21.47,7.55c-5.23,3.12-7.85,6.3-7.85,9.54,0,2.02,1.08,3.46,3.25,4.29,2.17.84,6.95,2.24,14.36,4.21,7.4,1.97,14.02,4.22,19.86,6.77,8.38,3.59,14.6,7.32,18.65,11.19,4.05,3.88,6.07,8.21,6.07,13.01,0,3.3-.8,6.61-2.39,9.93-1.59,3.33-3.92,6.38-6.98,9.15-3.07,2.78-6.59,5.06-10.58,6.85-3.41,1.45-7.71,2.8-12.88,4.08-5.18,1.27-10.79,2.27-16.83,2.99-6.04.72-11.81,1.08-17.31,1.08-10.12,0-18.26-.95-24.42-2.86s-9.24-4.8-9.24-8.67c0-1.74,1.04-4.44,3.12-8.11s4.54-6.14,7.37-7.42c2.49-.98,4.89-1.55,7.2-1.69,2.31-.14,3.47.13,3.47.82,0,.17-.09.35-.26.52s-.38.32-.61.43c-.23.12-.46.23-.69.35-1.16.46-2.1.82-2.82,1.08-.72.26-1.3.52-1.74.78-.43.26-.65.62-.65,1.08,0,1.21,5.99,1.82,17.96,1.82,10.41,0,18.94-.38,25.59-1.13s12.52-2.11,17.61-4.08c5.09-1.97,9.71-4.68,13.88-8.15l.04.02ZM640.8,85.63h3.73c3.06-5.49,5.84-9.38,8.33-11.67,2.49-2.28,5.32-3.43,8.5-3.43s4.77.72,4.77,2.17c0,.69-1.24,2.57-3.73,5.64s-4.37,5.64-5.64,7.72c1.96.23,3.71.43,5.25.61,1.53.17,2.73.32,3.6.43-3.3,6.13-7.43,12.4-12.4,18.82l-4.08-.3c-1.1-.09-2.21-.17-3.34-.26s-2.5-.19-4.12-.3c-3.12,5.03-5.74,9.53-7.85,13.49s-3.73,7.59-4.86,10.89-1.69,6.42-1.69,9.37c0,3.99,1.59,5.99,4.77,5.99,2.2,0,5.07-1.17,8.63-3.51s8.31-5.94,14.27-10.8v5.81c-15.61,16.95-27.15,25.42-34.61,25.42-2.6,0-4.7-1.01-6.29-3.04-1.59-2.02-2.38-4.63-2.38-7.81,0-2.14.45-4.68,1.34-7.63.9-2.95,2.5-7.4,4.81-13.36-.81.69-1.58,1.37-2.3,2.04s-1.39,1.27-2,1.82-1.26,1.13-1.95,1.73c-.69.61-1.39,1.23-2.08,1.87v-5.99c6.07-5.09,13.42-14.02,22.03-26.8-.87-.06-1.68-.1-2.43-.13s-1.65-.04-2.69-.04c-3.41,0-5.96.23-7.63.69-.69.17-1.34.36-1.95.56s-1.03.3-1.26.3-.35-.17-.35-.52c0-1.91,1.18-4.77,3.56-8.59,1.91-3.24,3.72-5.64,5.42-7.2,1.71-1.56,3.79-2.62,6.25-3.17,2.46-.55,5.91-.82,10.37-.82h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M664.91,115.12c8.79-7.98,17.32-13.91,25.59-17.78s14.66-5.81,19.17-5.81c1.21,0,2.34.51,3.38,1.52,1.04,1,1.88,2.19,2.47,3.51.61,1.33.91,2.31.91,2.95,0,1.04-.41,1.81-1.21,2.3-.81.49-2.23,1.08-4.25,1.78.4.93.92,2.11,1.56,3.56s1.13,2.62,1.47,3.51c.35.9.52,1.69.52,2.39,0,1.39-1.4,3.98-4.21,7.76-2.81,3.79-4.77,6.58-5.9,8.37-1.13,1.79-1.69,3.99-1.69,6.59,0,4.28,1.96,6.42,5.9,6.42s10.38-3.79,19-11.36v5.29c-14.63,16.25-25.1,24.38-31.4,24.38-2.26,0-3.86-.74-4.81-2.21s-1.43-3.66-1.43-6.55c0-4.57,1.65-11.19,4.94-19.86-8.44,9.37-14.72,16.03-18.82,20-4.11,3.96-7.49,5.94-10.15,5.94-1.27,0-2.86-1.1-4.77-3.3-1.91-2.2-3.6-5.04-5.07-8.54-1.47-3.5-2.21-7.13-2.21-10.89,0-2.72.26-4.99.78-6.81s1.53-3.69,3.04-5.59c1.5-1.91,3.9-4.42,7.2-7.55v-.02ZM706.46,105.58c-15.04,6.88-25.75,12.72-32.14,17.52s-9.59,9.75-9.59,14.83c0,1.85.32,3.37.95,4.55.64,1.19,1.5,1.78,2.6,1.78.64,0,1.76-.4,3.38-1.21,6.07-3.58,11.62-8.25,16.66-14.01,5.03-5.75,11.07-13.58,18.13-23.46h.01Z" style="fill:#306fff; stroke-width:0px;"/><path d="M779.07,130.82v5.81c-6.19,6.07-11.23,10.79-15.14,14.14-3.9,3.35-7.55,5.96-10.93,7.81-3.38,1.85-6.69,2.78-9.93,2.78s-6.1-1.26-8.76-3.77c-2.66-2.52-4.74-5.81-6.25-9.89-1.5-4.08-2.26-8.4-2.26-12.97,0-3.93.87-7.43,2.6-10.5,1.74-3.07,5.09-7.03,10.06-11.88,5.9-5.78,11.38-10.25,16.44-13.4s9.04-4.73,11.93-4.73c2.08,0,3.85.72,5.29,2.17s2.17,3.27,2.17,5.46c0,1.85-.95,4.48-2.86,7.89-1.91,3.41-4.05,6.38-6.42,8.89-2.37,2.52-4.25,3.77-5.64,3.77-1.5,0-2.25-.81-2.25-2.43.06-.46.1-.9.13-1.3s.04-.81.04-1.21c0-.69-.25-1.08-.74-1.17s-1.08.13-1.78.65c-5.78,4.05-9.75,6.9-11.88,8.54-2.14,1.65-3.83,3.31-5.07,4.99s-1.87,3.44-1.87,5.29c0,3.41,1.1,6.19,3.3,8.33s5.06,3.21,8.59,3.21,8.02-1.4,13.14-4.21c5.12-2.8,11.15-6.9,18.09-12.27h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M844.13,130.65v5.81c-6.48,7.58-11.91,13.32-16.31,17.22s-8.07,5.86-11.02,5.86-5.39-.84-7.68-2.52c-2.29-1.68-4.34-3.99-6.16-6.94-1.82-2.95-3.98-7.05-6.46-12.32-2.95,3.64-5.61,7.04-7.98,10.19-2.37,3.15-4.02,5.25-4.94,6.29-.93,1.04-1.77,1.56-2.52,1.56-1.56,0-2.69-1-3.38-2.99-.69-2-1.04-4.9-1.04-8.72,0-5.21.62-10.22,1.87-15.05,1.24-4.83,3.04-9.53,5.38-14.1s5.35-9.5,9.02-14.79c3.67-5.29,7.79-10.83,12.36-16.61,6.3-7.98,11.74-14.5,16.31-19.56,4.57-5.06,8.54-8.88,11.93-11.45,3.38-2.57,6.2-3.86,8.46-3.86,2.78,0,4.16,1.24,4.16,3.73,0,2.14-5.12,9.85-15.35,23.12-10.24,13.27-25.16,31.39-44.76,54.35v7.46c13.13-14.05,23.69-24.49,31.71-31.31,8.01-6.82,14.21-10.24,18.61-10.24,1.79,0,3.18,1.06,4.16,3.17s1.47,4.55,1.47,7.33c0,5.67-2.43,10.92-7.29,15.74-4.86,4.83-12.32,10.37-22.38,16.61,1.74,2.6,3.27,4.5,4.6,5.68,1.33,1.19,3.01,1.78,5.03,1.78,1.79,0,3.73-.61,5.81-1.82s4.21-2.75,6.38-4.6,5.51-4.86,10.02-9.02h-.01ZM809.86,135.07c2.2-1.45,4.93-3.69,8.2-6.72,3.27-3.04,6.06-6.19,8.37-9.46s3.47-6,3.47-8.2c0-.92-.41-1.39-1.21-1.39-2.2,0-5.97,2.11-11.32,6.33-5.35,4.22-10.57,9.63-15.66,16.22,2.2,0,4.92,1.07,8.15,3.21h0ZM951.78,140.71l2.86,2.17c-.75,1.62-1.47,3.04-2.17,4.25-.69,1.21-1.53,2.69-2.52,4.42-.98,1.73-1.73,3.04-2.25,3.9-4.34,7.58-8.41,11.36-12.23,11.36-1.62,0-3.01-.64-4.16-1.91-1.16-1.27-1.73-3.01-1.73-5.2,0-3.12,1.11-7.4,3.34-12.84,2.23-5.43,5.67-12.13,10.32-20.08s10.51-16.96,17.57-27.02c7.05-10.06,15.01-20.67,23.85-31.84-5.09-.75-11.13-1.13-18.13-1.13-8.04,0-16.99.9-26.85,2.69s-18.45,3.86-25.76,6.2c-7.32,2.34-10.97,4.06-10.97,5.16,0,.41.14.68.43.82.29.15.77.26,1.43.35s1.52.19,2.56.3c6.77.93,10.15,1.97,10.15,3.12,0,.58-1.47.85-4.42.82s-6.51-.04-10.67-.04c-3.3,0-5.68-.13-7.16-.39s-2.46-.75-2.95-1.47-.74-1.84-.74-3.34c0-.98.29-3.12.87-6.42,1.1-6.13,2.79-11.04,5.07-14.75,2.28-3.7,5.78-6.72,10.5-9.06,4.71-2.34,11.2-4.21,19.47-5.59,13.88-2.37,25.36-3.56,34.44-3.56,6.71,0,12,.27,15.88.82,3.87.55,6.72,1.34,8.54,2.39,1.82,1.04,2.98,2.07,3.47,3.08s1.14,2.76,1.95,5.25l2.69,7.98c.17.52.32.94.43,1.26.12.32.22.65.3,1,.09.35.13.67.13.95,0,2.26-.51,4.28-1.52,6.07s-2.86,4.48-5.55,8.07-4.67,6.39-5.94,8.41c-14.92,24.23-25.1,42.16-30.53,53.78v.02ZM991.94,115.12c8.79-7.98,17.32-13.91,25.59-17.78s14.66-5.81,19.17-5.81c1.21,0,2.34.51,3.38,1.52,1.04,1,1.88,2.19,2.47,3.51.61,1.33.91,2.31.91,2.95,0,1.04-.41,1.81-1.21,2.3-.81.49-2.23,1.08-4.25,1.78.4.93.92,2.11,1.56,3.56s1.13,2.62,1.47,3.51c.35.9.52,1.69.52,2.39,0,1.39-1.4,3.98-4.21,7.76-2.81,3.79-4.77,6.58-5.9,8.37-1.13,1.79-1.69,3.99-1.69,6.59,0,4.28,1.96,6.42,5.9,6.42s10.38-3.79,19-11.36v5.29c-14.63,16.25-25.1,24.38-31.4,24.38-2.26,0-3.86-.74-4.81-2.21s-1.43-3.66-1.43-6.55c0-4.57,1.65-11.19,4.94-19.86-8.44,9.37-14.72,16.03-18.82,20-4.11,3.96-7.49,5.94-10.15,5.94-1.27,0-2.86-1.1-4.77-3.3-1.91-2.2-3.6-5.04-5.07-8.54-1.47-3.5-2.21-7.13-2.21-10.89,0-2.72.26-4.99.78-6.81s1.53-3.69,3.04-5.59c1.5-1.91,3.9-4.42,7.2-7.55v-.02ZM1033.49,105.58c-15.04,6.88-25.75,12.72-32.14,17.52s-9.59,9.75-9.59,14.83c0,1.85.32,3.37.95,4.55.64,1.19,1.5,1.78,2.6,1.78.64,0,1.76-.4,3.38-1.21,6.07-3.58,11.62-8.25,16.66-14.01,5.03-5.75,11.07-13.58,18.13-23.46h.01Z" style="fill:#306fff; stroke-width:0px;"/><path d="M1111.3,130.82v5.64c-6.02,3.82-10.76,5.72-14.23,5.72-1.91,0-3.93-.32-6.07-.95-5.2,6.59-9.67,11.42-13.4,14.49s-7.47,4.6-11.23,4.6c-4.34,0-7.68-2.29-10.02-6.85-2.34-4.57-3.51-10.24-3.51-17,0-9.2,2.78-19.21,8.33-30.06,5.56-10.85,12.29-21.07,20.08-30.45,7.84-9.46,15.43-17.28,22.77-23.46,7.34-6.19,12.32-9.28,14.92-9.28s3.73,1.71,3.73,5.12c0,15.15-19.43,41.58-58.29,79.29-.12,1.04-.17,3.09-.17,6.16,0,7.98,2.14,11.97,6.42,11.97,1.68,0,3.37-.68,5.07-2.04,1.71-1.36,4.32-3.95,7.85-7.76-1.39-3.12-2.08-5.44-2.08-6.94,0-3.18,1.3-6.62,3.9-10.32s5.57-6.9,8.89-9.59c3.33-2.69,5.74-4.03,7.24-4.03,2.37,0,3.56,1.71,3.56,5.12,0,2.6-.68,5.72-2.04,9.37-1.36,3.64-3.34,7.81-5.94,12.49.98.81,1.76,1.4,2.34,1.78s1.45.56,2.6.56c2.66,0,5.75-1.18,9.28-3.56v-.02ZM1067.24,117.81c3.01-2.6,6.03-5.68,9.06-9.24s7.47-9.01,13.32-16.35c5.61-7.05,10.02-12.94,13.23-17.65s5.62-8.63,7.24-11.75c1.62-3.12,2.43-5.26,2.43-6.42,0-.87-.23-1.3-.69-1.3-1.27,0-3.92,2.1-7.94,6.29-4.02,4.19-8.6,9.93-13.75,17.22-7.11,10.06-12.26,17.64-15.44,22.73-3.18,5.09-5.67,10.58-7.46,16.48h0Z" style="fill:#306fff; stroke-width:0px;"/><path d="M1110.96,133.08v-2.08c14.92-15.73,25.18-26.75,30.79-33.05,1.27-7.11,4.34-10.67,9.19-10.67,1.21,0,2.52.35,3.9,1.04l.52,1.65c-.23.69-.35,1.68-.35,2.95,0,1.1.42,3.14,1.26,6.12s1.49,5.48,1.95,7.5.69,4.31.69,6.85c0,3.82-.87,7.48-2.6,10.97-1.73,3.5-4.25,6.85-7.55,10.06-3.3,3.21-7.55,6.49-12.75,9.85,2.08.35,3.73.52,4.94.52,2.37,0,4.93-.59,7.68-1.78,2.75-1.18,5.55-2.78,8.41-4.77,2.86-2,6.2-4.58,10.02-7.76v5.81c-7.4,7.23-14.02,12.71-19.86,16.44s-10.87,5.59-15.09,5.59c-5.44,0-10.47-2.31-15.09-6.94-2.72-2.78-4.41-5.43-5.08-7.98-.67-2.54-1-5.99-1-10.32h.02ZM1143.31,119.8l-1.56-12.66c-3.59,4.05-11.25,11.83-22.99,23.33,3.47.75,5.84,1.76,7.11,3.04,1.27,1.27,3.06,3.73,5.38,7.37,3.93-1.62,6.95-3.83,9.07-6.64,2.11-2.8,3.17-6.64,3.17-11.49,0-.58-.01-1.1-.04-1.56s-.07-.92-.13-1.39h0Z" style="fill:#306fff; stroke-width:0px;"/><g style="isolation:isolate;"><text transform="translate(943.45 229.96)" style="fill:#00d797; font-family:ArialMT, Arial; font-size:24px; isolation:isolate;"><tspan x="0" y="0">version: ${e}</tspan></text></g></svg>`,d="data:image/svg+xml;base64,"+ho(r),y="font-size: 1px; padding: "+Math.floor(100/4)+"px "+Math.floor(580/2)+"px; line-height: "+Math.floor(100/2)+"px;";window.console.log("%c+",y+`background-image: url(${d});background-size: 580px 100px;background-repeat: norepeat; color: transparent;`)},mo="FORWARD",bo="BACKWARD";function Lt(){const e=n.getCurrentInstance(),{attrs:t,props:o}=e,r=t.tId??o.tId,s=t.pId??o.pId,c=ke.useRoute(),d=ke.useRouter(),y=ie(),{getTab:a,evictPageCache:u,addPageScroller:k}=Me(),m=c.query.__tab;return{forward:M=>{const C=a(r),x=M.query||{};if(C){const S=ee();C.pages.push({id:S,tabId:C.id,path:M.path,query:x})}const E=X({__tab:m},M.query);y.emit(mo),d.push({path:M.path,query:E})},backward:(M,C)=>{const x=a(r);if(!x)return!1;const E=x.pages;let S=0;if(typeof M=="number")S=Math.abs(M);else{const g=Ne(M),T=g.query||{},V=E.list();let F=!1;const H=p=>{const i={...p||{}},f={...T};delete i.__tab,delete i._back,delete f.__tab,delete f._back;const b=Object.keys(f);return b.length===0?!0:b.every(h=>String(f[h]??"")===String(i[h]??""))};for(let p=E.size()-2;p>=0;p--){S++;const i=V[p],f=i?.path===g.path,b=H(i?.query);if(f&&b){F=!0;break}}if(!F)return!1}if(S<=0||(E.size()<=S&&(S=E.size()-1),S<=0))return!1;const w=[];for(let g=0;g<S;g++){const T=E.pop();T&&w.push(T.id)}const _=E.peek();if(!_)return!1;C&&(_._backParams=C),y.emit(bo);const l=X({__tab:m},_.query||{});return d.push({path:_.path,query:l}).then(()=>{for(const g of w)u(g)}),!0},addScrollTarget:(...M)=>{k(s,...M)}}}const go=n.defineComponent({__name:"iframe",setup(e){return Lt(),()=>{}}}),vo=()=>{const e=ie(),{attrs:t}=n.getCurrentInstance();n.onUnmounted(()=>{r()});const o=()=>{e.emit($.PAGE_LOADING,{tId:t.tId,value:!0})},r=()=>{e.emit($.PAGE_LOADING,{tId:t.tId,value:!1})};return{openTabLoading:o,closeTabLoading:r}},zt="vue-stack-tabs:refresh",Nt="vue-stack-tabs:openTab";function To(e){typeof window>"u"||!window.parent||window.parent.postMessage({type:Nt,payload:e},"*")}function yo(e=()=>window.location.reload()){if(typeof window>"u")return()=>{};const t=o=>{o.data?.type===zt&&e()};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)}const wo={install(e,t){po("1.1.0"),e.component("VueStackTabs",Ct).use(fn).use(Zt().getI18n(t))}};N.IFrame=go,N.MSG_OPEN_TAB=Nt,N.MSG_REFRESH=zt,N.Stack=_e,N.StackTab=Ct,N.TabHeaderButton=Ie,N.TabScrollMode=Q,N.default=wo,N.onRefreshRequest=yo,N.postOpenTab=To,N.useTabActions=Be,N.useTabLoading=vo,N.useTabRouter=Lt,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
package/package.json
CHANGED
package/src/lib/StackTabs.vue
CHANGED
|
@@ -25,9 +25,8 @@ import { useTabEmitter } from '@/lib/hooks/useTabEventBus'
|
|
|
25
25
|
const {
|
|
26
26
|
tabs,
|
|
27
27
|
caches,
|
|
28
|
-
refreshKey,
|
|
29
|
-
excludedCacheIdsForRefresh,
|
|
30
28
|
iframeRefreshKeys,
|
|
29
|
+
activeCacheKey,
|
|
31
30
|
destroy,
|
|
32
31
|
addPage,
|
|
33
32
|
initialize,
|
|
@@ -208,10 +207,17 @@ const handleRefreshIframePostMessage = (payload: unknown) => {
|
|
|
208
207
|
const iframe = iframeElRefs[tabId]
|
|
209
208
|
if (iframe?.contentWindow) {
|
|
210
209
|
try {
|
|
210
|
+
console.log(
|
|
211
|
+
`[vue-stack-tabs] Sending 'vue-stack-tabs:refresh' postMessage to iframe: ${tabId}`
|
|
212
|
+
)
|
|
211
213
|
iframe.contentWindow.postMessage({ type: 'vue-stack-tabs:refresh' }, '*')
|
|
212
|
-
} catch {
|
|
213
|
-
|
|
214
|
+
} catch (e) {
|
|
215
|
+
console.warn(`[vue-stack-tabs] Failed to send refresh postMessage to iframe: ${tabId}`, e)
|
|
214
216
|
}
|
|
217
|
+
} else {
|
|
218
|
+
console.warn(
|
|
219
|
+
`[vue-stack-tabs] IFrame element not found for tabId: ${tabId} when trying to refresh.`
|
|
220
|
+
)
|
|
215
221
|
}
|
|
216
222
|
}
|
|
217
223
|
|
|
@@ -274,38 +280,29 @@ onBeforeUnmount(() => {
|
|
|
274
280
|
<div class="stack-tab__container">
|
|
275
281
|
<router-view v-slot="{ Component, route }">
|
|
276
282
|
<transition :name="pageSwitch" appear mode="out-in">
|
|
277
|
-
<keep-alive :include="caches"
|
|
283
|
+
<keep-alive :include="caches">
|
|
278
284
|
<component
|
|
279
285
|
:is="tabWrapper(route, Component)"
|
|
280
|
-
:key="
|
|
286
|
+
:key="activeCacheKey"
|
|
287
|
+
:vnode="Component"
|
|
281
288
|
@on-loaded="onComponentLoaded"
|
|
282
289
|
/>
|
|
283
290
|
</keep-alive>
|
|
284
291
|
</transition>
|
|
285
292
|
</router-view>
|
|
286
|
-
<transition-group
|
|
287
|
-
:name="pageTransition"
|
|
288
|
-
tag="div"
|
|
289
|
-
class="stack-tab__iframes"
|
|
290
|
-
appear
|
|
291
|
-
>
|
|
293
|
+
<transition-group :name="pageTransition" tag="div" class="stack-tab__iframes" appear>
|
|
292
294
|
<Transition
|
|
293
295
|
v-for="frame of iframeTabs"
|
|
294
296
|
:key="getIframeKey(frame)"
|
|
295
297
|
:name="pageTransition"
|
|
296
298
|
appear
|
|
297
299
|
>
|
|
298
|
-
<div
|
|
299
|
-
v-show="frame.
|
|
300
|
-
class="stack-tab__iframe-wrapper"
|
|
301
|
-
>
|
|
302
|
-
<div
|
|
303
|
-
v-show="iframeLoadingStates[frame.id] !== false"
|
|
304
|
-
class="stack-tab__iframe-loading"
|
|
305
|
-
>
|
|
300
|
+
<div v-show="frame.active" class="stack-tab__iframe-wrapper">
|
|
301
|
+
<div v-show="iframeLoadingStates[frame.id] !== false" class="stack-tab__iframe-loading">
|
|
306
302
|
<span class="stack-tab__iframe-loading-text">{{ t('VueStackTab.loading') }}</span>
|
|
307
303
|
</div>
|
|
308
304
|
<iframe
|
|
305
|
+
:key="iframeRefreshKeys[frame.id] || 0"
|
|
309
306
|
:ref="(el) => setIframeRef(frame.id, el as HTMLIFrameElement | null)"
|
|
310
307
|
class="stack-tab__iframe"
|
|
311
308
|
:src="getIframeSrc(frame)"
|
|
@@ -299,6 +299,7 @@
|
|
|
299
299
|
left: 0;
|
|
300
300
|
width: 100%;
|
|
301
301
|
height: 100%;
|
|
302
|
+
pointer-events: none; /* 允许鼠标事件穿透到下层,避免遮挡其他标签 */
|
|
302
303
|
/* 进入的 iframe 置于上层;延迟进入,等待其他 tab 离开动画完成后再播放入场 */
|
|
303
304
|
.stack-tab-swap-enter-active {
|
|
304
305
|
z-index: 1;
|
|
@@ -317,6 +318,7 @@
|
|
|
317
318
|
left: 0;
|
|
318
319
|
width: 100%;
|
|
319
320
|
height: 100%;
|
|
321
|
+
pointer-events: auto; /* 恢复鼠标事件,允许与 iframe 交互 */
|
|
320
322
|
}
|
|
321
323
|
|
|
322
324
|
&__iframe {
|
|
@@ -1,44 +1,85 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* tabPanel/evict - 缓存驱逐逻辑
|
|
3
3
|
*
|
|
4
|
-
* 职责:标记待驱逐缓存、执行驱逐、维护 caches/components
|
|
4
|
+
* 职责:标记待驱逐缓存、执行驱逐、维护 caches / components
|
|
5
|
+
*
|
|
6
|
+
* 驱逐机制分两种:
|
|
7
|
+
*
|
|
8
|
+
* 1. 「标记 + 延迟驱逐」—— 用于关闭标签、刷新标签等场景
|
|
9
|
+
* 调用 markCacheForEviction 将 cacheName 放入 cacheIdsToEvict 集合,
|
|
10
|
+
* 等到目标页面的 cacheComponent 触发 onActivated 时,
|
|
11
|
+
* 再批量调用 evictMarkedCaches 真正执行驱逐。
|
|
12
|
+
* 该策略确保只有切换到新的活动页后才清理旧缓存,避免渲染空白。
|
|
13
|
+
*
|
|
14
|
+
* 2. 「立即驱逐」—— 用于 backward 内部退栈场景
|
|
15
|
+
* 调用 evictPageCache 直接同步清除单个缓存,
|
|
16
|
+
* 但必须在 router.push().then() 回调内调用(即导航完成后),
|
|
17
|
+
* 否则会触发以旧路由为基础的响应式重渲染,导致刚驱逐的组件被重建。
|
|
18
|
+
* 详见 useTabRouter.ts backward 函数的时序说明。
|
|
5
19
|
*/
|
|
6
20
|
import type { ITabPage } from '../../model/TabModel'
|
|
7
|
-
import {
|
|
8
|
-
caches,
|
|
9
|
-
components,
|
|
10
|
-
cacheIdsToEvict,
|
|
11
|
-
tabIdsToEvict
|
|
12
|
-
} from './state'
|
|
21
|
+
import { caches, components, cacheIdsToEvict, tabIdsToEvict } from './state'
|
|
13
22
|
|
|
14
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* 将指定 cacheName 放入待驱逐集合。
|
|
25
|
+
* 不立即清除,等叫到 evictMarkedCaches 时统一处理。
|
|
26
|
+
*/
|
|
15
27
|
export const markCacheForEviction = (cacheName: string) => {
|
|
16
28
|
cacheIdsToEvict.add(cacheName)
|
|
17
29
|
}
|
|
18
30
|
|
|
19
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* 标记某个标签下所有页面为待驱逐,并标记该标签本身(用于「关闭标签」场景)。
|
|
33
|
+
* tabIdsToEvict 中的标签 ID 会在 updatePageState 中被检测到,
|
|
34
|
+
* 阻止被关闭的标签重新路由时意外复活。
|
|
35
|
+
*/
|
|
20
36
|
export const markTabPagesForEviction = (tab: { id: string; pages: { list(): ITabPage[] } }) => {
|
|
21
37
|
for (const page of tab.pages.list()) markCacheForEviction(page.id)
|
|
22
38
|
tabIdsToEvict.add(tab.id)
|
|
23
39
|
}
|
|
24
40
|
|
|
25
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* 仅标记标签下所有页面为待驱逐,不标记标签本身(用于「续签/换页」场景)。
|
|
43
|
+
* 适用于刷新标签:旧页面缓存清零,标签本身仍然存活,
|
|
44
|
+
* 导航后由 updatePageState 重新创建页面。
|
|
45
|
+
*/
|
|
26
46
|
export const markTabPagesForEvictionOnly = (tab: { pages: { list(): ITabPage[] } }) => {
|
|
27
47
|
for (const page of tab.pages.list()) markCacheForEviction(page.id)
|
|
28
48
|
}
|
|
29
49
|
|
|
30
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* 将 cacheName 加入 <keep-alive> 的 include 列表(caches)。
|
|
52
|
+
* 幂等:已存在时不重复添加,避免 include 数组中出现重复项
|
|
53
|
+
* 影响 <keep-alive> 缓存范围,决定哪些 cacheComponent 实例会被保留。
|
|
54
|
+
*/
|
|
31
55
|
export const addCache = (cacheName: string) => {
|
|
32
56
|
if (!caches.value.includes(cacheName)) caches.value.push(cacheName)
|
|
33
57
|
}
|
|
34
58
|
|
|
35
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* 将 cacheName 从 include 列表(caches)中移除。
|
|
61
|
+
* Vue 的 <keep-alive> 会以 flush:'post' 的 watcher 检测 include 变更,
|
|
62
|
+
* 在下次渲染后自动销毁不再被 include 的缓存实例。
|
|
63
|
+
*/
|
|
36
64
|
export const removeCache = (cacheName: string) => {
|
|
37
65
|
const i = caches.value.indexOf(cacheName)
|
|
38
66
|
if (i >= 0) caches.value.splice(i, 1)
|
|
39
67
|
}
|
|
40
68
|
|
|
41
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* 立即、同步、彻底驱逐单个页面的缓存。
|
|
71
|
+
*
|
|
72
|
+
* 操作步骤:
|
|
73
|
+
* 1. 从 cacheIdsToEvict 移除(若存在,防止后续 evictMarkedCaches 二次处理)
|
|
74
|
+
* 2. removeCache(cacheName) → 从 <keep-alive> include 列表删除,触发 Vue 销毁缓存组件实例
|
|
75
|
+
* 3. components.delete(...) → 从 components Map 删除组件定义,
|
|
76
|
+
* 使 resolvePageComponent 下次进入时必须重新创建全新的 cacheComponent 实例
|
|
77
|
+
*
|
|
78
|
+
* ⚠️ 调用时机要求:
|
|
79
|
+
* 必须在 router.push() 完成(.then())之后调用,
|
|
80
|
+
* 不能在导航前调用,否则驱逐触发的响应式更新会导致 StackTabs 以旧路由重渲染,
|
|
81
|
+
* 进而重建刚被删除的组件(竞态)。详见 useTabRouter.ts backward 的注释。
|
|
82
|
+
*/
|
|
42
83
|
export const evictPageCache = (cacheName: string) => {
|
|
43
84
|
if (!cacheName) return
|
|
44
85
|
cacheIdsToEvict.delete(cacheName)
|
|
@@ -46,7 +87,13 @@ export const evictPageCache = (cacheName: string) => {
|
|
|
46
87
|
components.delete(cacheName)
|
|
47
88
|
}
|
|
48
89
|
|
|
49
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* 执行所有已标记缓存的批量驱逐(由 cacheComponent 的 onActivated 调用)。
|
|
92
|
+
*
|
|
93
|
+
* 调用时机:
|
|
94
|
+
* 当 cacheComponent 切换到激活(activated)状态时,说明用户切换到了一个新页面,
|
|
95
|
+
* 相关的旧页面已经稳定进入「不活跃/待驱逐」状态,此时批量清理是安全的。
|
|
96
|
+
*/
|
|
50
97
|
export const evictMarkedCaches = () => {
|
|
51
98
|
if (cacheIdsToEvict.size > 0) {
|
|
52
99
|
for (const cacheName of [...cacheIdsToEvict]) {
|
|
@@ -10,7 +10,9 @@ export const restoreScroller = (pageCacheId: string) => {
|
|
|
10
10
|
const positions = scrollPositionsByPageId.get(pageCacheId)
|
|
11
11
|
if (!positions) return
|
|
12
12
|
for (const [sel, pos] of positions) {
|
|
13
|
-
const el =
|
|
13
|
+
const el = sel.startsWith('#')
|
|
14
|
+
? document.getElementById(sel.slice(1))
|
|
15
|
+
: (document.querySelector(sel) as HTMLElement | null)
|
|
14
16
|
if (el) {
|
|
15
17
|
el.scrollTop = pos.top
|
|
16
18
|
el.scrollLeft = pos.left
|
|
@@ -23,7 +25,9 @@ export const saveScroller = (pageCacheId: string) => {
|
|
|
23
25
|
const positions = scrollPositionsByPageId.get(pageCacheId)
|
|
24
26
|
if (!positions) return
|
|
25
27
|
for (const sel of positions.keys()) {
|
|
26
|
-
const el =
|
|
28
|
+
const el = sel.startsWith('#')
|
|
29
|
+
? document.getElementById(sel.slice(1))
|
|
30
|
+
: (document.querySelector(sel) as HTMLElement | null)
|
|
27
31
|
positions.set(sel, {
|
|
28
32
|
top: el?.scrollTop ?? 0,
|
|
29
33
|
left: el?.scrollLeft ?? 0
|
|
@@ -22,7 +22,7 @@ export const tabIdsToEvict = new Set<string>()
|
|
|
22
22
|
/** 刷新计数器,变更时触发 component :key 变化 */
|
|
23
23
|
export const refreshKey = ref<number>(0)
|
|
24
24
|
/** 刷新时临时加入 keep-alive exclude 的缓存 ID */
|
|
25
|
-
|
|
25
|
+
// 改用 ULID 的新架构,无需黑名单隔离机制
|
|
26
26
|
/** pageCacheId -> Map<selector, { top, left }> 滚动位置存储 */
|
|
27
27
|
export const scrollPositionsByPageId = new Map<string, Map<string, { top: number; left: number }>>()
|
|
28
28
|
/** 是否已完成初始化 */
|