import{C as T,Gd as O,Ye as k,_ as B,e as D,f as L,t as M}from"./chunk-J36AVOW5.js";var R=D((J,g)=>{"use strict";var U=function(){var p=String.fromCharCode,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",w={};function j(t,o){if(!w[t]){w[t]={};for(var c=0;c<t.length;c++)w[t][t.charAt(c)]=c}return w[t][o]}var m={compressToBase64:function(t){if(t==null)return"";var o=m._compress(t,6,function(c){return v.charAt(c)});switch(o.length%4){default:case 0:return o;case 1:return o+"===";case 2:return o+"==";case 3:return o+"="}},decompressFromBase64:function(t){return t==null?"":t==""?null:m._decompress(t.length,32,function(o){return j(v,t.charAt(o))})},compressToUTF16:function(t){return t==null?"":m._compress(t,15,function(o){return p(o+32)})+" "},decompressFromUTF16:function(t){return t==null?"":t==""?null:m._decompress(t.length,16384,function(o){return t.charCodeAt(o)-32})},compressToUint8Array:function(t){for(var o=m.compress(t),c=new Uint8Array(o.length*2),r=0,s=o.length;r<s;r++){var l=o.charCodeAt(r);c[r*2]=l>>>8,c[r*2+1]=l%256}return c},decompressFromUint8Array:function(t){if(t==null)return m.decompress(t);for(var o=new Array(t.length/2),c=0,r=o.length;c<r;c++)o[c]=t[c*2]*256+t[c*2+1];var s=[];return o.forEach(function(l){s.push(p(l))}),m.decompress(s.join(""))},compressToEncodedURIComponent:function(t){return t==null?"":m._compress(t,6,function(o){return A.charAt(o)})},decompressFromEncodedURIComponent:function(t){return t==null?"":t==""?null:(t=t.replace(/ /g,"+"),m._decompress(t.length,32,function(o){return j(A,t.charAt(o))}))},compress:function(t){return m._compress(t,16,function(o){return p(o)})},_compress:function(t,o,c){if(t==null)return"";var r,s,l={},x={},y="",_="",u="",h=2,S=3,f=2,a=[],n=0,e=0,d;for(d=0;d<t.length;d+=1)if(y=t.charAt(d),Object.prototype.hasOwnProperty.call(l,y)||(l[y]=S++,x[y]=!0),_=u+y,Object.prototype.hasOwnProperty.call(l,_))u=_;else{if(Object.prototype.hasOwnProperty.call(x,u)){if(u.charCodeAt(0)<256){for(r=0;r<f;r++)n=n<<1,e==o-1?(e=0,a.push(c(n)),n=0):e++;for(s=u.charCodeAt(0),r=0;r<8;r++)n=n<<1|s&1,e==o-1?(e=0,a.push(c(n)),n=0):e++,s=s>>1}else{for(s=1,r=0;r<f;r++)n=n<<1|s,e==o-1?(e=0,a.push(c(n)),n=0):e++,s=0;for(s=u.charCodeAt(0),r=0;r<16;r++)n=n<<1|s&1,e==o-1?(e=0,a.push(c(n)),n=0):e++,s=s>>1}h--,h==0&&(h=Math.pow(2,f),f++),delete x[u]}else for(s=l[u],r=0;r<f;r++)n=n<<1|s&1,e==o-1?(e=0,a.push(c(n)),n=0):e++,s=s>>1;h--,h==0&&(h=Math.pow(2,f),f++),l[_]=S++,u=String(y)}if(u!==""){if(Object.prototype.hasOwnProperty.call(x,u)){if(u.charCodeAt(0)<256){for(r=0;r<f;r++)n=n<<1,e==o-1?(e=0,a.push(c(n)),n=0):e++;for(s=u.charCodeAt(0),r=0;r<8;r++)n=n<<1|s&1,e==o-1?(e=0,a.push(c(n)),n=0):e++,s=s>>1}else{for(s=1,r=0;r<f;r++)n=n<<1|s,e==o-1?(e=0,a.push(c(n)),n=0):e++,s=0;for(s=u.charCodeAt(0),r=0;r<16;r++)n=n<<1|s&1,e==o-1?(e=0,a.push(c(n)),n=0):e++,s=s>>1}h--,h==0&&(h=Math.pow(2,f),f++),delete x[u]}else for(s=l[u],r=0;r<f;r++)n=n<<1|s&1,e==o-1?(e=0,a.push(c(n)),n=0):e++,s=s>>1;h--,h==0&&(h=Math.pow(2,f),f++)}for(s=2,r=0;r<f;r++)n=n<<1|s&1,e==o-1?(e=0,a.push(c(n)),n=0):e++,s=s>>1;for(;;)if(n=n<<1,e==o-1){a.push(c(n));break}else e++;return a.join("")},decompress:function(t){return t==null?"":t==""?null:m._decompress(t.length,32768,function(o){return t.charCodeAt(o)})},_decompress:function(t,o,c){var r=[],s,l=4,x=4,y=3,_="",u=[],h,S,f,a,n,e,d,i={val:c(0),position:o,index:1};for(h=0;h<3;h+=1)r[h]=h;for(f=0,n=Math.pow(2,2),e=1;e!=n;)a=i.val&i.position,i.position>>=1,i.position==0&&(i.position=o,i.val=c(i.index++)),f|=(a>0?1:0)*e,e<<=1;switch(s=f){case 0:for(f=0,n=Math.pow(2,8),e=1;e!=n;)a=i.val&i.position,i.position>>=1,i.position==0&&(i.position=o,i.val=c(i.index++)),f|=(a>0?1:0)*e,e<<=1;d=p(f);break;case 1:for(f=0,n=Math.pow(2,16),e=1;e!=n;)a=i.val&i.position,i.position>>=1,i.position==0&&(i.position=o,i.val=c(i.index++)),f|=(a>0?1:0)*e,e<<=1;d=p(f);break;case 2:return""}for(r[3]=d,S=d,u.push(d);;){if(i.index>t)return"";for(f=0,n=Math.pow(2,y),e=1;e!=n;)a=i.val&i.position,i.position>>=1,i.position==0&&(i.position=o,i.val=c(i.index++)),f|=(a>0?1:0)*e,e<<=1;switch(d=f){case 0:for(f=0,n=Math.pow(2,8),e=1;e!=n;)a=i.val&i.position,i.position>>=1,i.position==0&&(i.position=o,i.val=c(i.index++)),f|=(a>0?1:0)*e,e<<=1;r[x++]=p(f),d=x-1,l--;break;case 1:for(f=0,n=Math.pow(2,16),e=1;e!=n;)a=i.val&i.position,i.position>>=1,i.position==0&&(i.position=o,i.val=c(i.index++)),f|=(a>0?1:0)*e,e<<=1;r[x++]=p(f),d=x-1,l--;break;case 2:return u.join("")}if(l==0&&(l=Math.pow(2,y),y++),r[d])_=r[d];else if(d===x)_=S+S.charAt(0);else return null;u.push(_),r[x++]=S+_.charAt(0),l--,S=_,l==0&&(l=Math.pow(2,y),y++)}}};return m}();typeof define=="function"&&define.amd?define(function(){return U}):typeof g<"u"&&g!=null?g.exports=U:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return U})});var Z=L(R());function E(p,v){let A=k(v.snapshot);return p.events.pipe(B(new O(A)),T(w=>w instanceof O),M(w=>w.snapshot))}function q(p,v,A){return E(p,v).pipe(M(w=>w.data[A]))}function G(p){let v=p.path();if(v.includes("?")){let A=v.slice(0,v.indexOf("?"));p.replaceState(A)}}function z(p,v){return v.indexOf(p)===0}function H(p,v){let A=p.url,w=v?.url||"";return z(A,w)}export{q as a,G as b,H as c};
