vendor: 4,205 bytes, line 1
1var e=Object.defineProperty,t=(t,n)=>e(t,`name`,{value:n,configurable:!0}),n=class{type=3;name=``;prefix=``;value=``;suffix=``;modifier=3;constructor(e,t,n,r,i,a){this.type=e,this.name=t,this.prefix=n,this.value=r,this.suffix=i,this.modifier=a}hasCustomName(){return this.name!==``&&typeof this.name!=`number`}};t(n,`Part`);var r=/[$_\p{ID_Start}]/u,i=/[$_\u200C\u200D\p{ID_Continue}]/u,a=`.*`;function o(e,t){return(t?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(e)}t(o,`isASCII`);function s(e,n=!1){let a=[],s=0;for(;s<e.length;){let c=e[s],l=t(function(t){if(!n)throw TypeError(t);a.push({type:`INVALID_CHAR`,index:s,value:e[s++]})},`ErrorOrInvalid`);if(c===`*`){a.push({type:`ASTERISK`,index:s,value:e[s++]});continue}if(c===`+`||c===`?`){a.push({type:`OTHER_MODIFIER`,index:s,value:e[s++]});continue}if(c===`\\`){a.push({type:`ESCAPED_CHAR`,index:s++,value:e[s++]});continue}if(c===`{`){a.push({type:`OPEN`,index:s,value:e[s++]});continue}if(c===`}`){a.push({type:`CLOSE`,index:s,value:e[s++]});continue}if(c===`:`){let t=``,n=s+1;for(;n<e.length;){let a=e.substr(n,1);if(n===s+1&&r.test(a)||n!==s+1&&i.test(a)){t+=e[n++];continue}break}if(!t){l(`Missing parameter name at ${s}`);continue}a.push({type:`NAME`,index:s,value:t}),s=n;continue}if(c===`(`){let t=1,n=``,r=s+1,i=!1;if(e[r]===`?`){l(`Pattern cannot start with "?" at ${r}`);continue}for(;r<e.length;){if(!o(e[r],!1)){l(`Invalid character '${e[r]}' at ${r}.`),i=!0;break}if(e[r]===`\\`){n+=e[r++]+e[r++];continue}if(e[r]===`)`){if(t--,t===0){r++;break}}else if(e[r]===`(`&&(t++,e[r+1]!==`?`)){l(`Capturing groups are not allowed at ${r}`),i=!0;break}n+=e[r++]}if(i)continue;if(t){l(`Unbalanced pattern at ${s}`);continue}if(!n){l(`Missing pattern at ${s}`);continue}a.push({type:`REGEX`,index:s,value:n}),s=r;continue}a.push({type:`CHAR`,index:s,value:e[s++]})}return a.push({type:`END`,index:s,value:``}),a}t(s,`lexer`);function c(e,r={}){let i=s(e);r.delimiter??=`/#?`,r.prefixes??=`./`;let o=`[^${l(r.delimiter)}]+?`,c=[],u=0,d=0,f=new Set,p=t(e=>{if(d<i.length&&i[d].type===e)return i[d++].value},`tryConsume`),m=t(()=>p(`OTHER_MODIFIER`)??p(`ASTERISK`),`tryConsumeModifier`),ee=t(e=>{let t=p(e);if(t!==void 0)return t;let{type:n,index:r}=i[d];throw TypeError(`Unexpected ${n} at ${r}, expected ${e}`)},`mustConsume`),h=t(()=>{let e=``,t;for(;t=p(`CHAR`)??p(`ESCAPED_CHAR`);)e+=t;return e},`consumeText`),g=t(e=>e,`DefaultEncodePart`),_=r.encodePart||g,v=``,y=t(e=>{v+=e},`appendToPendingFixedValue`),b=t(()=>{v.length&&(c.push(new n(3,``,``,_(v),``,3)),v=``)},`maybeAddPartFromPendingFixedValue`),x=t((e,t,r,i,s)=>{let l=3;switch(s){case`?`:l=1;break;case`*`:l=0;break;case`+`:l=2}if(!t&&!r&&l===3){y(e);return}if(b(),!t&&!r){if(!e)return;c.push(new n(3,``,``,_(e),``,l));return}let d;d=r?r===`*`?a:r:o;let p=2;d===o?(p=1,d=``):d===a&&(p=0,d=``);let m;if(t?m=t:r&&(m=u++),f.has(m))throw TypeError(`Duplicate name '${m}'.`);f.add(m),c.push(new n(p,m,_(e),d,_(i),l))},`addPart`);for(;d<i.length;){let e=p(`CHAR`),t=p(`NAME`),n=p(`REGEX`);if(!t&&!n&&(n=p(`ASTERISK`)),t||n){let i=e??``;r.prefixes.indexOf(i)===-1&&(y(i),i=``),b();let a=m();x(i,t,n,``,a);continue}let i=e??p(`ESCAPED_CHAR`);if(i){y(i);continue}if(p(`OPEN`)){let e=h(),t=p(`NAME`),n=p(`REGEX`);!t&&!n&&(n=p(`ASTERISK`));let r=h();ee(`CLOSE`);let i=m();x(e,t,n,r,i);continue}b(),ee(`END`)}return c}t(c,`parse`);function l(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}t(l,`escapeString`);function u(e){return e&&e.ignoreCase?`ui`:`u`}t(u,`flags`);function d(e,t,n){return p(c(e,n),t,n)}t(d,`stringToRegexp`);function f(e){switch(e){case 0:return`*`;case 1:return`?`;case 2:return`+`;case 3:return``}}t(f,`modifierToString`);function p(e,t,n={}){n.delimiter??=`/#?`,n.prefixes??=`./`,n.sensitive??=!1,n.strict??=!1,n.end??=!0,n.start??=!0,n.endsWith=``;let r=n.start?`^`:``;for(let i of e){if(i.type===3){i.modifier===3?r+=l(i.value):r+=`(?:${l(i.value)})${f(i.modifier)}`;continue}t&&t.push(i.name);let e=`[^${l(n.delimiter)}]+?`,o=i.value;if(i.type===1?o=e:i.type===0&&(o=a),!i.prefix.length&&!i.suffix.length){i.modifier===3||i.modifier===1?r+=`(${o})${f(i.modifier)}`:r+=`((?:${o})${f(i.modifier)})`;continue}if(i.modifier===3||i.modifier===1){r+=`(?:${l(i.prefix)}(${o}
1)${l(i.suffix)})`,r+=f(i.modifier);continue}r+=`(?:${l(i.prefix)}`,r+=`((?:${o})(?:`,r+=l(i.suffix),r+=l(i.prefix),r+=`(?:${o}))*)${l(i.suffix)})`,i.modifier===0&&(r+=`?`)}let i=`[${l(n.endsWith)}]|$`,o=`[${l(n.delimiter)}]`;if(n.end)return n.strict||(r+=`${o}?`),n.endsWith.length?r+=`(?=${i})`:r+=`$`,new RegExp(r,u(n));n.strict||(r+=`(?:${o}(?=${i}))?`);let s=!1;if(e.length){let t=e[e.length-1];t.type===3&&t.modifier===3&&(s=n.delimiter.indexOf(t)>-1)}return s||(r+=`(?=${o}|${i})`),new RegExp(r,u(n))}t(p,`partsToRegexp`);var m={delimiter:``,prefixes:``,sensitive:!0,strict:!0},ee={delimiter:`.`,prefixes:``,sensitive:!0,strict:!0},h={delimiter:`/`,prefixes:`/`,sensitive:!0,strict:!0};function g(e,t){return e.length?e[0]===`/`?!0:!t||e.length<2?!1:(e[0]==`\\`||e[0]==`{`)&&e[1]==`/`:!1}t(g,`isAbsolutePathname`);function _(e,t){return e.startsWith(t)?e.substring(t.length,e.length):e}t(_,`maybeStripPrefix`);function v(e,t){return e.endsWith(t)?e.substr(0,e.length-t.length):e}t(v,`maybeStripSuffix`);function y(e){return!e||e.length<2?!1:e[0]===`[`||(e[0]===`\\`||e[0]===`{`)&&e[1]===`[`}t(y,`treatAsIPv6Hostname`);var b=[`ftp`,`file`,`http`,`https`,`ws`,`wss`];function x(e){if(!e)return!0;for(let t of b)if(e.test(t))return!0;return!1}t(x,`isSpecialScheme`);function te(e,t){if(e=_(e,`#`),t||e===``)return e;let n=new URL(`https://example.com`);return n.hash=e,n.hash?n.hash.substring(1,n.hash.length):``}t(te,`canonicalizeHash`);function ne(e,t){if(e=_(e,`?`),t||e===``)return e;let n=new URL(`https://example.com`);return n.search=e,n.search?n.search.substring(1,n.search.length):``}t(ne,`canonicalizeSearch`);function re(e,t){return t||e===``?e:y(e)?T(e):w(e)}t(re,`canonicalizeHostname`);function ie(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.password=e,n.password}t(ie,`canonicalizePassword`);function ae(e,t){if(t||e===``)return e;let n=new URL(`https://example.com`);return n.username=e,n.username}t(ae,`canonicalizeUsername`);function oe(e,t,n){if(n||e===``)return e;if(t&&!b.includes(t))return new URL(`${t}:${e}`).pathname;let r=e[0]==`/`;return e=new URL(r?e:`/-`+e,`https://example.com`).pathname,r||(e=e.substring(2,e.length)),e}t(oe,`canonicalizePathname`);function se(e,t,n){return S(t)===e&&(e=``),n||e===``?e:E(e)}t(se,`canonicalizePort`);function ce(e,t){return e=v(e,`:`),t||e===``?e:C(e)}t(ce,`canonicalizeProtocol`);function S(e){switch(e){case`ws`:case`http`:return`80`;case`wws`:case`https`:return`443`;case`ftp`:return`21`;default:return``}}t(S,`defaultPortForProtocol`);function C(e){if(e===``)return e;if(/^[-+.A-Za-z0-9]*$/.test(e))return e.toLowerCase();throw TypeError(`Invalid protocol '${e}'.`)}t(C,`protocolEncodeCallback`);function le(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.username=e,t.username}t(le,`usernameEncodeCallback`);function ue(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.password=e,t.password}t(ue,`passwordEncodeCallback`);function w(e){if(e===``)return e;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e))throw TypeError(`Invalid hostname '${e}'`);let t=new URL(`https://example.com`);return t.hostname=e,t.hostname}t(w,`hostnameEncodeCallback`);function T(e){if(e===``)return e;if(/[^0-9a-fA-F[\]:]/g.test(e))throw TypeError(`Invalid IPv6 hostname '${e}'`);return e.toLowerCase()}t(T,`ipv6HostnameEncodeCallback`);function E(e){if(e===``||/^[0-9]*$/.test(e)&&parseInt(e)<=65535)return e;throw TypeError(`Invalid port '${e}'.`)}t(E,`portEncodeCallback`);function de(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.pathname=e[0]===`/`?e:`/-`+e,e[0]===`/`?t.pathname:t.pathname.substring(2,t.pathname.length)}t(de,`standardURLPathnameEncodeCallback`);function fe(e){return e===``?e:new URL(`data:${e}`).pathname}t(fe,`pathURLPathnameEncodeCallback`);function pe(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.search=e,t.search.substring(1,t.search.length)}t(pe,`searchEncodeCallback`);function me(e){if(e===``)return e;let t=new URL(`https://example.com`);return t.hash=e,t.hash.substring(1,t.hash.length)}t(me,`hashEncodeCallback`);var he=class{#e;#t=[];#n={};#r=0;#i=1;#a=0;#o=0;#s=0;#c=0;#l=!1;constructor(e){this.#e=e}get result(){return this.#n}parse(){for(this.#t=s(this.#e,!0);this.#r<this.#t.length;this.#r+=this.#i){if(this.#i=1,this.#t[this.#r].type===`END`){if(this.#o===0){this.#f(),this.#C()?this.#u(9,1):this.#S()?this.#u(8,1):this.#u(7,0);continue}if(this.#o===2){this.#p(5);continue}this.#u(10,0);break}if(this.#s>0){if(this.#T())--this.#s;else continue}if(this.#w()){this.#s+=1;continue}switch(this.#o){case 0:this.#g()&&this.#p(1);break;case 1:if(this.#g()){this.#k();let e=7,t=1;this.#_()?(e=2,t=3):this.#l&&(e=2),this.#u(e,t)}break;case 2:this.#v()?this.#p(3):(this.#x()||this.#S()||this.#C())&&this.#p(5);break;case 3:this.#y()?this.#u(4,1):this.#v()&&this.#u(5,1);break;case 4:this.#v()&&this.#u(5,1);break;case 5:this.#E()?this.#c+=1:this.#D()&&--this.#c,this.#b()&&!this.#c?this.#u(6,1):this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 6:this.#x()?this.#u(7,0):this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 7:this.#S()?this.#u(8,1):this.#C()&&this.#u(9,1);break;case 8:this.#C()&&this.#u(9,1)}}this.#n.hostname!==void 0&&this.#n.port===void 0&&(this.#n.port=``)}#u(e,t){switch(this.#o){case 0:break;case 1:this.#n.protocol=this.#O();break;case 2:break;case 3:this.#n.username=this.#O();break;case 4:this.#n.password=this.#O();break;case 5:this.#n.hostname=this.#O();break;case 6:this.#n.port=this.#O();break;case 7:this.#n.pathname=this.#O();break;case 8:this.#n.search=this.#O();break;case 9:this.#n.hash=this.#O()}this.#o!==0&&e!==10&&([1,2,3,4].includes(this.#o)&&[6,7,8,9].includes(e)&&(this.#n.hostname??=``),[1,2,3,4,5,6].includes(this.#o)&&[8,9].includes(e)&&(this.#n.pathname??=this.#l?`/`:``),[1,2,3,4,5,6,7].includes(this.#o)&&e===9&&(this.#n.search??=``)),this.#d(e,t)}#d(e,t){this.#o=e,this.#a=this.#r+t,this.#r+=t,this.#i=0}#f(){this.#r=this.#a,this.#i=0}#p(e){this.#f(),this.#o=e}#m(e){return e<0&&(e=this.#t.length-e),e<this.#t.length?this.#t[e]:this.#t[this.#t.length-1]}#h(e,t){let n=this.#m(e);return n.value===t&&(n.type===`CHAR`||n.type===`ESCAPED_CHAR`||n.type===`INVALID_CHAR`)}#g(){return this.#h(this.#r,`:`)}#_(){return this.#h(this.#r+1,`/`)&&this.#h(this.#r+2,`/`)}#v(){return this.#h(this.#r,`@`)}#y(){return this.#h(this.#r,`:`)}#b(){return this.#h(this.#r,`:`)}#x(){return this.#h(this.#r,`/`)}#S(){if(this.#h(this.#r,`?`))return!0;
1if(this.#t[this.#r].value!==`?`)return!1;let e=this.#m(this.#r-1);return e.type!==`NAME`&&e.type!==`REGEX`&&e.type!==`CLOSE`&&e.type!==`ASTERISK`}#C(){return this.#h(this.#r,`#`)}#w(){return this.#t[this.#r].type==`OPEN`}#T(){return this.#t[this.#r].type==`CLOSE`}#E(){return this.#h(this.#r,`[`)}#D(){return this.#h(this.#r,`]`)}#O(){let e=this.#t[this.#r],t=this.#m(this.#a).index;return this.#e.substring(t,e.index)}#k(){let e={};Object.assign(e,m),e.encodePart=C;let t=d(this.#O(),void 0,e);this.#l=x(t)}};t(he,`Parser`);var ge=[`protocol`,`username`,`password`,`hostname`,`port`,`pathname`,`search`,`hash`],D=`*`;function _e(e,t){if(typeof e!=`string`)throw TypeError(`parameter 1 is not of type 'string'.`);let n=new URL(e,t);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search===``?void 0:n.search.substring(1,n.search.length),hash:n.hash===``?void 0:n.hash.substring(1,n.hash.length)}}t(_e,`extractValues`);function O(e,t){return t?A(e):e}t(O,`processBaseURLString`);function k(e,t,n){let r;if(typeof t.baseURL==`string`)try{r=new URL(t.baseURL),t.protocol===void 0&&(e.protocol=O(r.protocol.substring(0,r.protocol.length-1),n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&(e.username=O(r.username,n)),!n&&t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.username===void 0&&t.password===void 0&&(e.password=O(r.password,n)),t.protocol===void 0&&t.hostname===void 0&&(e.hostname=O(r.hostname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&(e.port=O(r.port,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&(e.pathname=O(r.pathname,n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&(e.search=O(r.search.substring(1,r.search.length),n)),t.protocol===void 0&&t.hostname===void 0&&t.port===void 0&&t.pathname===void 0&&t.search===void 0&&t.hash===void 0&&(e.hash=O(r.hash.substring(1,r.hash.length),n))}catch{throw TypeError(`invalid baseURL '${t.baseURL}'.`)}if(typeof t.protocol==`string`&&(e.protocol=ce(t.protocol,n)),typeof t.username==`string`&&(e.username=ae(t.username,n)),typeof t.password==`string`&&(e.password=ie(t.password,n)),typeof t.hostname==`string`&&(e.hostname=re(t.hostname,n)),typeof t.port==`string`&&(e.port=se(t.port,e.protocol,n)),typeof t.pathname==`string`){if(e.pathname=t.pathname,r&&!g(e.pathname,n)){let t=r.pathname.lastIndexOf(`/`);t>=0&&(e.pathname=O(r.pathname.substring(0,t+1),n)+e.pathname)}e.pathname=oe(e.pathname,e.protocol,n)}return typeof t.search==`string`&&(e.search=ne(t.search,n)),typeof t.hash==`string`&&(e.hash=te(t.hash,n)),e}t(k,`applyInit`);function A(e){return e.replace(/([+*?:{}()\\])/g,`\\$1`)}t(A,`escapePatternString`);function ve(e){return e.replace(/([.+*?^${}()[\]|/\\])/g,`\\$1`)}t(ve,`escapeRegexpString`);function ye(e,t){t.delimiter??=`/#?`,t.prefixes??=`./`,t.sensitive??=!1,t.strict??=!1,t.end??=!0,t.start??=!0,t.endsWith=``;let n=`[^${ve(t.delimiter)}]+?`,r=/[$_\u200C\u200D\p{ID_Continue}]/u,i=``;for(let a=0;a<e.length;++a){let o=e[a];if(o.type===3){if(o.modifier===3){i+=A(o.value);continue}i+=`{${A(o.value)}}${f(o.modifier)}`;continue}let s=o.hasCustomName(),c=!!o.suffix.length||!!o.prefix.length&&(o.prefix.length!==1||!t.prefixes.includes(o.prefix)),l=a>0?e[a-1]:null,u=a<e.length-1?e[a+1]:null;if(!c&&s&&o.type===1&&o.modifier===3&&u&&!u.prefix.length&&!u.suffix.length){if(u.type===3){let e=u.value.length>0?u.value[0]:``;c=r.test(e)}else c=!u.hasCustomName()}if(!c&&!o.prefix.length&&l&&l.type===3){let e=l.value[l.value.length-1];c=t.prefixes.includes(e)}c&&(i+=`{`),i+=A(o.prefix),s&&(i+=`:${o.name}`),o.type===2?i+=`(${o.value})`:o.type===1?s||(i+=`(${n})`):o.type===0&&(!s&&(!l||l.type===3||l.modifier!==3||c||o.prefix!==``)?i+=`*`:i+=`(.*)`),o.type===1&&s&&o.suffix.length&&r.test(o.suffix[0])&&(i+=`\\`),i+=A(o.suffix),c&&(i+=`}`),o.modifier!==3&&(i+=f(o.modifier))}return i}t(ye,`partsToPattern`);var be=class{#e;#t={};#n={};#r={};#i={};#a=!1;constructor(e={},t,n){try{let r;if(typeof t==`string`?r=t:n=t,typeof e==`string`){let t=new he(e);if(t.parse(),e=t.result,r===void 0&&typeof e.protocol!=`string`)throw TypeError(`A base URL must be provided for a relative constructor string.`);e.baseURL=r}else{if(!e||typeof e!=`object`)throw TypeError(`parameter 1 is not of type 'string' and cannot convert to dictionary.`);if(r)throw TypeError(`parameter 1 is not of type 'string'.`)}typeof n>`u`&&(n={ignoreCase:!1});let i={ignoreCase:n.ignoreCase===!0},a={pathname:D,protocol:D,username:D,password:D,hostname:D,port:D,search:D,hash:D};this.#e=k(a,e,!0),S(this.#e.protocol)===this.#e.port&&(this.#e.port=``);let o;for(o of ge){if(!(o in this.#e))continue;let e={},t=this.#e[o];switch(this.#n[o]=[],o){case`protocol`:Object.assign(e,m),e.encodePart=C;break;case`username`:Object.assign(e,m),e.encodePart=le;break;case`password`:Object.assign(e,m),e.encodePart=ue;break;case`hostname`:Object.assign(e,ee),e.encodePart=y(t)?T:w;break;case`port`:Object.assign(e,m),e.encodePart=E;break;case`pathname`:x(this.#t.protocol)?(Object.assign(e,h,i),e.encodePart=de):(Object.assign(e,m,i),e.encodePart=fe);break;case`search`:Object.assign(e,m,i),e.encodePart=pe;break;case`hash`:Object.assign(e,m,i),e.encodePart=me}try{this.#i[o]=c(t,e),this.#t[o]=p(this.#i[o],this.#n[o],e),this.#r[o]=ye(this.#i[o],e),this.#a=this.#a||this.#i[o].some(e=>e.type===2)}catch{throw TypeError(`invalid ${o} pattern '${this.#e[o]}'.`)}}}catch(e){throw TypeError(`Failed to construct 'URLPattern': ${e.message}`)}}get[Symbol.toStringTag](){return`URLPattern`}test(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return!1;try{n=typeof e==`object`?k(n,e,!1):k(n,_e(e,t),!1)}catch{return!1}let r;for(r of ge)if(!this.#t[r].exec(n[r]))return!1;return!0}exec(e={},t){let n={pathname:``,protocol:``,username:``,password:``,hostname:``,port:``,search:``,hash:``};if(typeof e!=`string`&&t)throw TypeError(`parameter 1 is not of type 'string'.`);if(typeof e>`u`)return;try{n=typeof e==`object`?k(n,e,!1):k(n,_e(e,t),!1)}catch{return null}let r={};
1r.inputs=t?[e,t]:[e];let i;for(i of ge){let e=this.#t[i].exec(n[i]);if(!e)return null;let t={};for(let[n,r]of this.#n[i].entries())(typeof r==`string`||typeof r==`number`)&&(t[r]=e[n+1]);r[i]={input:n[i]??``,groups:t}}return r}static compareComponent(e,r,i){let a=t((e,t)=>{for(let n of[`type`,`modifier`,`prefix`,`value`,`suffix`]){if(e[n]<t[n])return-1;if(e[n]!==t[n])return 1}return 0},`comparePart`),o=new n(3,``,``,``,``,3),s=new n(0,``,``,``,``,3),c=t((e,t)=>{let n=0;for(;n<Math.min(e.length,t.length);++n){let r=a(e[n],t[n]);if(r)return r}return e.length===t.length?0:a(e[n]??o,t[n]??o)},`comparePartList`);return!r.#r[e]&&!i.#r[e]?0:r.#r[e]&&!i.#r[e]?c(r.#i[e],[s]):!r.#r[e]&&i.#r[e]?c([s],i.#i[e]):c(r.#i[e],i.#i[e])}get protocol(){return this.#r.protocol}get username(){return this.#r.username}get password(){return this.#r.password}get hostname(){return this.#r.hostname}get port(){return this.#r.port}get pathname(){return this.#r.pathname}get search(){return this.#r.search}get hash(){return this.#r.hash}get hasRegExpGroups(){return this.#a}};t(be,`URLPattern`),globalThis.URLPattern||(globalThis.URLPattern=be);var j=[`pt`,`en`,`es`],xe=`PARAGLIDE_LOCALE`,Se=3456e4,M=[`custom-path-locale`,`preferredLanguage`,`url`,`baseLocale`],Ce=[{match:`/api/:path(.*)?`,exclude:!0},{match:`/admin`,exclude:!0},{match:`/admin/:path(.*)?`,exclude:!0},{match:`/app/:path(.*)?`,strategy:[`cookie`,`baseLocale`]},{match:`/reports/:path(.*)?`,strategy:[`cookie`,`baseLocale`]}],N=[{pattern:`/app/:path(.*)?`,localized:[[`pt`,`/app/:path(.*)?`],[`en`,`/app/:path(.*)?`],[`es`,`/app/:path(.*)?`]]},{pattern:`/reports/:path(.*)?`,localized:[[`pt`,`/reports/:path(.*)?`],[`en`,`/reports/:path(.*)?`],[`es`,`/reports/:path(.*)?`]]},{pattern:`/`,localized:[[`pt`,`/pt`],[`en`,`/en`],[`es`,`/es`]]},{pattern:`/:path(.*)?`,localized:[[`pt`,`/pt/:path(.*)?`],[`en`,`/en/:path(.*)?`],[`es`,`/es/:path(.*)?`]]}],P=typeof window>`u`;globalThis.__paraglide=globalThis.__paraglide??{},globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};var we=!1,F=()=>{let e=M;!P&&typeof window<`u`&&window.location?.href&&(e=$e(window.location.href));let t=Te(e,typeof window<`u`?window.location?.href:void 0);if(t)return we||(we=!0,De(t,{reload:!1})),t;throw Error(`No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found`)};function Te(e,t){let n;for(let r of e){if(r===`cookie`)n=Ne();else if(r===`baseLocale`)n=`pt`;else if(r===`url`&&!P&&typeof t==`string`)n=Le(t);else if(r===`preferredLanguage`&&!P)n=Pe();else if(tt(r)&&$.has(r)){let e=$.get(r);if(e){let t=e.getLocale();if(t instanceof Promise)continue;if(t!==void 0)return ke(t)}}let e=I(n);if(e)return e}}var Ee=e=>{e?window.location.href=e:window.location.reload()},De=(e,t)=>{let n={reload:!0,...t},r;try{r=F()}catch{}let i=[],a,o=M;!P&&typeof window<`u`&&window.location?.href&&(o=$e(window.location.href));for(let t of o)if(t===`cookie`){if(P||typeof document>`u`||typeof window>`u`)continue;let t=`${xe}=${e}; path=/; max-age=${Se}`;document.cookie=t,V()}else if(t===`baseLocale`)continue;else if(t===`url`&&typeof window<`u`)a=H(window.location.href,{locale:e}).href;else if(tt(t)&&$.has(t)){let n=$.get(t);if(n){let r=n.setLocale(e);r instanceof Promise&&(r=r.catch(e=>{throw Error(`Custom strategy "${t}" setLocale failed.`,{cause:e})}),i.push(r))}}let s=()=>{!P&&n.reload&&window.location&&e!==r&&Ee(a)};if(i.length)return Promise.all(i).then(()=>{s()});s()},Oe=()=>typeof window<`u`?window.location.origin:`http://fallback.com`;function I(e){if(typeof e!=`string`)return;let t=e.toLowerCase();for(let e of j)if(e.toLowerCase()===t)return e}function ke(e){let t=I(e);if(t)return t;throw Error(`Invalid locale: ${e}. Expected one of: ${j.join(`, `)}`)}function L(e){return e}function R(e,t){return e.exec(t.href)}var Ae=xe.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),je=RegExp(`(?:^|;\\s*)${Ae}=([^;]*)`),z=Symbol(),B=z;function V(){B=z}function Me(){typeof queueMicrotask==`function`?queueMicrotask(V):Promise.resolve().then(V)}function Ne(){if(typeof document>`u`)return;if(B!==z)return B;let e=document.cookie.match(je)?.[1];return B=I(e),Me(),B}function Pe(){if(!navigator?.languages?.length)return;let e=navigator.languages.map(e=>({fullTag:e,baseTag:e.split(`-`)[0]}));for(let t of e){let e=I(t.fullTag);if(e)return e;let n=I(t.baseTag);if(n)return n}}var Fe,Ie;function Le(e){let t=typeof e==`string`?e:e.href;if(Fe===t)return Ie;let n;{let t=L(new URL(e));for(let e of N){for(let[r,i]of e.localized)if(R(new URLPattern(i,t.href),t)){n=r;break}if(n)break}}return Fe=t,Ie=n,n}function H(e,t){let n=t?.locale?ke(t?.locale):F(),r=typeof e==`string`?new URL(e):e,i=r;for(let e of N){let t=Ve(i,n,e);if(t!==void 0)return t;for(let[,t]of e.localized){let r=R(q(t,i),i);if(!r)continue;let a=e.localized.find(([e])=>e===n)?.[1];if(a)return L(U(W(a,G(r),i.origin),r))}let r=R(q(e.pattern,i),i);if(r){let t=e.localized.find(([e])=>e===n)?.[1];if(t)return L(U(W(t,G(r),i.origin),r))}}return r}function Re(e){let t=typeof e==`string`?new URL(e):e,n=t;
1for(let e of N){let t=He(n,e);if(t!==void 0)return t;for(let[,t]of e.localized){let r=R(q(t,n),n);if(r){let t=G(r);return L(U(W(e.pattern,t,n.origin),r))}}let r=R(q(e.pattern,n),n);if(r)return L(U(W(e.pattern,G(r),n.origin),r))}return t}function U(e,t){return t.protocol.groups[0]&&(e.protocol=t.protocol.groups[0]??``),t.hostname.groups[0]&&(e.hostname=t.hostname.groups[0]??``),t.username.groups[0]&&(e.username=t.username.groups[0]??``),t.password.groups[0]&&(e.password=t.password.groups[0]??``),t.port.groups[0]&&(e.port=t.port.groups[0]??``),t.pathname.groups[0]&&(e.pathname=t.pathname.groups[0]??``),t.search.groups[0]&&(e.search=t.search.groups[0]??``),t.hash.groups[0]&&(e.hash=t.hash.groups[0]??``),e}function W(e,t,n){let r=e.replace(/(https?:\/\/[^:/]+):(\d+)(\/|$)/g,(e,t,n,r)=>`${t}#PORT-${n}#${r}`).replace(/\{([^{}]*)\}([?+*]?)/g,(e,t,n)=>t).replace(/(\/?):([a-zA-Z0-9_]+)(\([^)]*\))?([?+*]?)/g,(e,n,r,i,a)=>{let o=t[r];if(o===null)return``;if(a===`?`)return o===void 0?``:`${n}${o}`;if(a===`+`||a===`*`){if(o===void 0&&a===`+`)throw Error(`Missing value for "${r}" (one or more required)`);return o?`${n}${o}`:``}if(o===void 0)throw Error(`Missing value for "${r}"`);return`${n}${o}`});return r=r.replace(/#PORT-(\d+)#/g,`:$1`),new URL(r,n)}function G(e){return{...e.hash.groups,...e.hostname.groups,...e.password.groups,...e.pathname.groups,...e.port.groups,...e.protocol.groups,...e.search.groups,...e.username.groups}}var K=new Map,ze=128,Be=/^(?:[A-Za-z][A-Za-z\d+.-]*|:[A-Za-z][A-Za-z\d_-]*):\/\//;function q(e,t){let n=Be.test(e),r=e.startsWith(`/`);if(!n&&!r)return new URLPattern(e,t.href);let i=n?e:JSON.stringify([t.origin,e]),a=K.get(i);if(a!==void 0)return K.delete(i),K.set(i,a),a;let o=new URLPattern(e,t.href);if(K.size>=ze){let e=K.keys().next().value;e!==void 0&&K.delete(e)}return K.set(i,o),o}var J=new WeakMap;function Ve(e,t,n){let r=Ue(n);if(r===null)return;for(let n of r.localized){let i=Z(n.pattern,e);if(i===void 0)continue;let a=r.localized.find(e=>e.locale===t)?.pattern;if(a!==void 0)return Q(a,i,e)}let i=Z(r.base,e);if(i!==void 0){let n=r.localized.find(e=>e.locale===t)?.pattern;if(n!==void 0)return Q(n,i,e)}}function He(e,t){let n=Ue(t);if(n===null)return;for(let t of n.localized){let r=Z(t.pattern,e);if(r!==void 0)return Q(n.base,r,e)}let r=Z(n.base,e);if(r!==void 0)return Q(n.base,r,e)}function Ue(e){let t=J.get(e);if(t!==void 0)return t;let n=We(e.pattern);if(n===void 0)return J.set(e,null),null;let r=[];for(let[t,i]of e.localized){let a=We(i);if(a===void 0||a.pathMode!==n.pathMode)return J.set(e,null),null;r.push({locale:t,pattern:a})}let i={base:n,localized:r};return J.set(e,i),i}function We(e){let t=e.match(/\/:path(?:\(\.\*\)(?:\?)?|\*)$/);if(t===null||t.index===void 0)return;let n=Ge(e.slice(0,t.index));if(n===void 0)return;let r=t[0].endsWith(`*`)?`segments`:t[0].endsWith(`?`)?`catch-all-optional`:`catch-all-required`;return{...n,pathMode:r}}function Ge(e){if(e===``||e.startsWith(`/`))return Y(e)?void 0:{protocol:void 0,hostname:void 0,port:void 0,pathnamePrefix:X(e),pathMode:`catch-all-optional`};let t=e.match(/^:protocol:\/\/([^/]+)(\/.*)?$/),n=e.match(/^([A-Za-z][A-Za-z\d+.-]*):\/\/([^/]+)(\/.*)?$/);if(t!==null){let e=(t[1]??``).match(/^([^:(){}?*+]+)(?::(\d+))?$/);return e===null||t[2]!==void 0&&Y(t[2])?void 0:{protocol:void 0,hostname:(e[1]??``).toLowerCase(),port:e[2],pathnamePrefix:X(t[2]??``),pathMode:`catch-all-optional`}}if(n===null)return;let r=n[2]??``,i=n[3],a=r.match(/^([^:(){}?*+]+)(?::(\d+))?$/);if(!(a===null||i!==void 0&&Y(i)))return{protocol:`${n[1]}:`,hostname:(a[1]??``).toLowerCase(),port:Ke(a[2],`${n[1]}:`),pathnamePrefix:X(i??``),pathMode:`catch-all-optional`}}function Ke(e,t){return e===`80`&&t===`http:`||e===`443`&&t===`https:`?``:e}function Y(e){return/[:(){}?*+]/.test(e)}function X(e){return e===``||e===`/`?`/`:e.endsWith(`/`)?e.slice(0,-1):e}function Z(e,t){if(e.protocol!==void 0&&e.protocol!==t.protocol||e.hostname!==void 0&&e.hostname!==t.hostname.toLowerCase()||e.hostname!==void 0&&(e.port??Je(e.protocol??t.protocol))!==t.port)return;let n=e.pathnamePrefix;if(n===`/`)return t.pathname.startsWith(`//`)?void 0:e.pathMode===`segments`?qe(t.pathname)?t.pathname:void 0:t.pathname;if(t.pathname===n)return e.pathMode===`catch-all-required`?void 0:``;if(t.pathname.startsWith(`${n}/`)){let r=t.pathname.slice(n.length);return r.startsWith(`//`)||e.pathMode===`segments`&&!qe(r)?void 0:r}}function qe(e){return e.length>1&&!e.endsWith(`/`)&&!e.includes(`//`)}function Je(e){return``}function Q(e,t,n){let r=new URL(n.href);return e.protocol!==void 0&&(r.protocol=e.protocol),e.hostname!==void 0&&(r.hostname=e.hostname,r.port=e.port??Je(r.protocol)),r.pathname=Ye(e.pathnamePrefix,t),r}function Ye(e,t){return e===`/`?t===``?`/`:t:t===``?e:`${e}${t.startsWith(`/`)?t:`/${t}`}`}var Xe,Ze;function Qe(e){if(Ce.length===0)return;let t=typeof e==`string`?e:e.href;if(Xe===t)return Ze;let n=L(new URL(t,`http://example.com`)),r=Re(n),i=r.href===n.href?[n]:[n,r],a;for(let e of i){for(let t of Ce)if(R(new URLPattern(t.match,e.href),e)){a=t;break}if(a)break}return Xe=t,Ze=a,a}function $e(e){let t=Qe(e);return t&&t.exclude!==!0&&Array.isArray(t.strategy)?t.strategy:M}function et(e,t){let n=F(),r=t?.locale??n,i=new URL(e,Oe()),a=H(i,{locale:r});return e.startsWith(`/`)&&i.origin===a.origin?r!==n&&H(i,{locale:n}).origin!==a.origin?a.href:a.pathname+a.search+a.hash:a.href}var $=new Map;function tt(e){return typeof e==`string`&&/^custom-[A-Za-z0-9_-]+$/.test(e)}
1export{H as a,et as i,F as n,De as o,j as r,Re as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.