@shgysk8zer0/polyfills 0.3.5 → 0.3.7

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/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [v0.3.7] - 2024-04-01
10
+
11
+ ### Changed
12
+ - Version bump (missed a version bump somewhere)
13
+
14
+ ## [v0.3.6] - 2024-04-01
15
+
16
+ ### Added
17
+ - Add `Aegisjsproject/trusted-types`
18
+
9
19
  ## [v0.3.5] - 2024-03-27
10
20
 
11
21
  ### Fixed
package/all.min.js CHANGED
@@ -1,18 +1,17 @@
1
- !function(){"use strict";!function(){"undefined"==typeof globalThis&&("undefined"!=typeof window?Object.defineProperty(Window.prototype,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:window}):"undefined"!=typeof global?Object.defineProperty(global,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:global}):"undefined"!=typeof self?Object.defineProperty(self,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:self}):Object.defineProperty(this,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:this}))}(),!("crypto"in window)&&"msCrypto"in window&&(globalThis.crypto=globalThis.msCrypto),"Notification"in window||(globalThis.Notification=globalThis.notifications||globalThis.webkitNotifications||globalThis.oNotifications||globalThis.msNotifications||!1),"doNotTrack"in navigator||(navigator.doNotTrack=globalThis.doNotTrack||navigator.msDoNotTrack||"unspecified"),"indexedDB"in window||(globalThis.indexedDB=globalThis.indexedDB||globalThis.mozIndexedDB||globalThis.webkitIndexedDB||globalThis.msIndexedDB||!1),"hidden"in document||(document.hidden=document.webkitHidden||document.msHidden||document.mozHidden||!1),"visibilityState"in document||(document.visibilityState=document.webkitVisibilityState||document.msVisibilityState||document.mozVisibilityState||"visible"),"fullscreenElement"in document||(document.fullscreenElement=document.mozFullScreenElement||document.webkitFullscreenElement||!1),"requestAnimationFrame"in window||(globalThis.requestAnimationFrame=globalThis.mozRequestAnimationFrame||globalThis.webkitRequestAnimationFrame||globalThis.msRequestAnimationFrame||!1),"exitFullscreen"in Document.prototype||(Document.prototype.exitFullscreen=document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msCancelFullScreen||!1),"requestFullscreen"in HTMLElement.prototype||(HTMLElement.prototype.requestFullscreen=HTMLElement.prototype.requestFullScreen||HTMLElement.prototype.mozRequestFullScreen||HTMLElement.prototype.webkitRequestFullScreen||!1),"fullscreen"in Document.prototype||Object.defineProperty(Document.prototype,"fullscreen",{get:()=>document.fullscreenElement instanceof Element}),Object.groupBy instanceof Function||(Object.groupBy=function(e,t){return Array.from(e).reduce(((e,r,n)=>{const o=t.call(e,r,n);return e.hasOwnProperty(o)?e[o].push(r):e[o]=[r],e}),{})}),Map.prototype.emplace instanceof Function||(Map.prototype.emplace=function(e,{insert:t,update:r}={}){const n=this.has(e);if(n&&r instanceof Function){const t=this.get(e),n=r.call(this,t,e,this);return n!==t&&this.set(e,n),n}if(n)return this.get(e);if(t instanceof Function){const r=t.call(this,e,this);return this.set(e,r),r}throw new Error("Key is not found and no `insert()` given")}),Map.groupBy instanceof Function||(Map.groupBy=function(e,t){return Array.from(e).reduce(((e,r,n)=>(e.emplace(t.call(e,r,n),{insert:()=>[r],update:e=>(e.push(r),e)}),e)),new Map)});const e=[Array,String,globalThis.Int8Array,globalThis.Uint8Array,globalThis.Uint8ClampedArray,globalThis.Int16Array,globalThis.Uint16Array,globalThis.Int32Array,globalThis.Uint32Array,globalThis.Float32Array,globalThis.Float64Array,globalThis.BigInt64Array,globalThis.BigUint64Array];if(Array.prototype.flat instanceof Function||(Array.prototype.flat=function(e=1){const t=[];e=Math.min(Number.MAX_SAFE_INTEGER,Math.max(0,e));const r=(e,n)=>{Array.isArray(e)&&n>=0?e.forEach((e=>r(e,n-1))):t.push(e)};return r(this,Number.isNaN(e)?0:e),t}),Array.prototype.flatMap instanceof Function||(Array.prototype.flatMap=function(e,t){return this.map(e,t).flat(1)}),Array.prototype.findLast instanceof Function||(Array.prototype.findLast=function(e,t){let r;return this.forEach(((n,o,a)=>{e.call(t,n,o,a)&&(r=n)}),t),r}),"lastIndex"in Array.prototype||Object.defineProperty(Array.prototype,"lastIndex",{enumerable:!1,configurable:!1,get:function(){return Math.max(0,this.length-1)}}),"lastItem"in Array.prototype||Object.defineProperty(Array.prototype,"lastItem",{enumerable:!1,configurable:!1,get:function(){return this[this.lastIndex]},set:function(e){this[this.lastIndex]=e}}),Array.prototype.findLastIndex instanceof Function||(Array.prototype.findLastIndex=function(e,t){let r=-1;return this.forEach(((n,o,a)=>{e.call(t,n,o,a)&&(r=o)}),t),r}),!(Array.prototype.at instanceof Function)){const Ve=function(e){if((e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this[e]};for(const We of e)void 0!==We&&Object.defineProperty(We.prototype,"at",{value:Ve,writable:!0,enumerable:!1,configurable:!0})}function t(e,t,r,{writable:n=!0,enumerable:o=!0,configurable:a=!0}={}){e[t]instanceof Function||Object.defineProperty(e,t,{value:r,writable:n,enumerable:o,configurable:a})}function r(e,t,{get:r,set:n,enumerable:o=!0,configurable:a=!0}={}){e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:r,set:n,enumerable:o,configurable:a})}!(Array.prototype.group instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.group=function(e){return console.warn("`Array.group()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,e)}),!(Array.prototype.groupBy instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.groupBy=function(e){return console.warn("`Array.goupBy()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,e)}),!(Array.prototype.groupToMap instanceof Function)&&Map.groupBy instanceof Function&&(Array.prototype.groupToMap=function(e){return console.warn("`Array.groupToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,e)}),Map.groupBy instanceof Function&&(Array.prototype.groupByToMap=function(e){return console.warn("`Array.groupByToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,e)}),Array.fromAsync instanceof Function||(Array.fromAsync=async function(e,t,r=globalThis){let n=[];for await(const t of e)n.push(await t);return Array.from(n,t,r)}),Array.prototype.equals instanceof Function||(Array.prototype.equals=function(e){return this===e||!!Array.isArray(e)&&(this.length===e.length&&this.every(((t,r)=>{const n=e[r];return Array.isArray(t)?Array.isArray(n)&&t.equals(n):Object.is(t,n)})))}),Array.prototype.uniqueBy instanceof Function||(Array.prototype.uniqueBy=function(e){if(void 0===e)return[...new Set(this)];if("string"==typeof e){const t=[];return this.filter((r=>{const n=r[e];return!t.includes(n)&&(t.push(n),!0)}))}if(e instanceof Function){const t=[];return this.filter(((...r)=>{try{const n=e.apply(this,r);return"string"==typeof n&&(!t.includes(n)&&(t.push(n),!0))}catch(e){return!1}}))}throw new TypeError("Not a valid argument for uniqueBy")}),Array.prototype.toReversed instanceof Function||(Array.prototype.toReversed=function(){return[...this].reverse()}),Array.prototype.toSorted instanceof Function||(Array.prototype.toSorted=function(e){return[...this].sort(e)}),Array.prototype.toSpliced instanceof Function||(Array.prototype.toSpliced=function(e,t,...r){const n=[...this];return n.splice(e,t,...r),n}),Array.prototype.with instanceof Function||(Array.prototype.with=function(e,t){const r=[...this];return r[e]=t,r}),Array.isTemplateObject instanceof Function||(Array.isTemplateObject=function(e){return!!(Array.isArray(e)&&Array.isArray(e.raw)&&Object.isFrozen(e)&&Object.isFrozen(e.raw))&&(0!==e.length&&e.length===e.raw.length)}),Uint8Array.prototype.toHex instanceof Function||(Uint8Array.prototype.toHex=function(){return Array.from(this).map((e=>e.toString(16).padStart("0",2))).join("")}),Uint8Array.prototype.toBase64 instanceof Function||(Uint8Array.prototype.toBase64=function({alphabet:e="base64"}={}){if("base64"===e)return btoa(String.fromCodePoint(...this));if("base64url"===e)return this.toBase64({alphabet:"base64"}).replaceAll("+","-").replaceAll("/","_");throw new TypeError('expected alphabet to be either "base64" or "base64url')}),Uint8Array.fromHex instanceof Function||(Uint8Array.fromHex=function(e){if("string"!=typeof e)throw new TypeError("expected input to be a string");if(0===!(1&e.length))throw new SyntaxError("string should be an even number of characters");return Uint8Array.from(globalThis.Iterator.range(0,e.length,{step:2}),(t=>parseInt(e.substring(t,t+2),16)))}),Uint8Array.fromBase64 instanceof Function||(Uint8Array.fromBase64=function(e,{alphabet:t="base64",lastChunkHandling:r="loose"}={}){if("string"!=typeof e)throw new TypeError("expected input to be a string");if(!["base64","base64url"].includes(t))throw new TypeError('expected alphabet to be either "base64" or "base64url');if(!["loose","strict","stop-before-partial"].includes(r))throw new TypeError(`Invalid \`lastChunkHandling\`: "${r}".`);if("base64"!==t)return Uint8Array.fromBase64(e.replaceAll("-","+").replaceAll("_","/"),{alphabet:"base64"});{const t=e.length%4;if(1===t)throw new TypeError("Invalid string length.");if(0===t)return(new TextEncoder).encode(atob(e));switch(r){case"strict":throw new SyntaxError("Missing padding.");case"loose":return Uint8Array.fromBase64(e.padEnd(e.length+(4-t),"="),{alphabet:"base64",lastChunkHandling:"strict"});case"stop-before-partial":return Uint8Array.fromBase64(e.slice(0,e.length-t),{alphabet:"base64",lastChunkHandling:"strict"})}}}),"Symbol"in globalThis&&(void 0===Symbol.toStringTag&&(Symbol.toStringTag=Symbol("Symbol.toStringTag")),void 0===Symbol.iterator&&(Symbol.iterator=Symbol("Symbol.iterator"))),function(){if(!(Function.prototype.once instanceof Function)){const e=new WeakMap;Function.prototype.once=function(t){const r=this;return function(...n){if(e.has(r))return e.get(r);if("AsyncFunction"===r.constructor.name){const o=r.apply(t||r,n).catch((t=>{throw e.delete(r),t}));return e.set(r,o),o}if(r instanceof Function){const o=r.apply(t||r,n);return e.set(r,o),o}}}}}(),t(URL,"canParse",((e,t)=>{try{return new URL(e,t),!0}catch{return!1}})),Number.range instanceof Function||(Number.range=function(e,t,r=1){return console.warn("`Number.range()` is deprecated. Use `Iterator.range()` instead."),globalThis.Iterator.range(e,t,{step:r})});const n="Iterator"in globalThis,o=n?Object.getPrototypeOf(globalThis.Iterator):Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())),a=n?globalThis.Iterator:(e=>{class t{[Symbol.iterator](){return this}}return Object.setPrototypeOf(t,e),t})(o);var i;a.range instanceof Function||(a.range=function(e,t,r){if("number"==typeof r||"bigint"==typeof r)return a.range(e,t,{step:r});if("object"!=typeof r||Object.is(r,null))return a.range(e,t,{});{const{step:n=("number"==typeof e?e<t?1:-1:e<t?1n:-1n),inclusive:o=!1}=r;if("number"!=typeof e&&"bigint"!=typeof e)throw new TypeError("Start must be a number");if(Number.isNaN(e))throw new RangeError("Invalid start");if("number"!=typeof t&&"bigint"!=typeof t)throw new TypeError("End must be a number");if(Number.isNaN(t))throw new RangeError("Invalid end");if("number"!=typeof n&&"bigint"!=typeof n)throw new TypeError("Step must be a number");if(Number.isNaN(n))throw new RangeError("Invalid step");if(0===n)throw new RangeError("Step must not be 0");if(n<0&&e<t||n>0&&e>t)return;if(o){let r=e;return n>0?a.from({next(){const e=r<=t?{value:r,done:!1}:{done:!0};return r+=n,e}}):a.from({next(){const e=r>=t?{value:r,done:!1}:{done:!0};return r+=n,e}})}{let r=e;if(n>0)return a.from({next(){const e=r<t?{value:r,done:!1}:{done:!0};return r+=n,e}});{let r=e;return a.from({next(){const e=r>t?{value:r,done:!1}:{done:!0};return r+=n,e}})}}}}),o[Symbol.toStringTag]||(o[Symbol.toStringTag]="Iterator"),o.take instanceof Function||(o.take=function(e){let t=0;const r=this;return a.from({next:()=>t++>=e?{done:!0}:r.next()})}),o.drop instanceof Function||(o.drop=function(e){for(let t=0;t<e;t++){const{done:e}=this.next();if(e)break}return this}),o.toArray instanceof Function||(o.toArray=function(){return Array.from(this)}),o.forEach instanceof Function||(o.forEach=function(e){for(const t of this)e.call(this,t)}),o.flatMap instanceof Function||(o.flatMap=function(e){const t=this;let r=this.next();const n=({value:r,done:n=!0}={})=>n?a.from({next:()=>({done:!0})}):a.from(e.call(t,r));let o=n(r);return a.from({next(){const{value:e,done:a=!0}=o.next();return r.done&&a?{done:!0}:a?r.done?{done:!0}:(r=t.next(),o=n(r),o.next()):{value:e,done:a}}})}),o.map instanceof Function||(o.map=function(e){const t=this;return a.from({next(){const{done:r,value:n}=t.next();return r?{done:r}:{value:e.call(t,n),done:!1}}})}),o.reduce instanceof Function||(o.reduce=function(e,t){let r=void 0===t?this.next().value:t;for(const t of this)r=e.call(this,r,t);return r}),o.filter instanceof Function||(o.filter=function(e){const t=this;let r,n=!1;return a.from({next(){for(;!n;){const o=t.next();if(n=o.done,n)break;if(e.call(t,o.value)){r=o.value;break}}return{done:n,value:r}}})}),o.some instanceof Function||(o.some=function(e){let t=!1;for(const r of this)if(e.call(this,r)){t=!0;break}return t}),o.every instanceof Function||(o.every=function(e){let t=!0;for(const r of this)if(!e.call(this,r)){t=!1;break}return t}),o.find instanceof Function||(o.find=function(e){for(const t of this)if(e.call(this,t))return t}),o.indexed instanceof Function||(o.indexed=function(){let e=0;return this.map((t=>[e++,t]))}),o.chunks instanceof Function||(o.chunks=function(e){if(!Number.isSafeInteger(e)||e<1)throw new TypeError("Size must be a positive integer.");{const t=this;let r=!1;return a.from({next(){if(r)return{done:r};{const n=[];let o=0;for(;o++<e&&!r;){const e=t.next();if(e.done){r=!0,void 0!==e.value&&n.push(e.value);break}n.push(e.value)}return{value:n,done:!1}}}})}}),a.from instanceof Function||(a.from=function(e){if("object"!=typeof e||null===e)throw new TypeError("Not an object.");if(e.next instanceof Function){return Object.create(o,{next:{enumerable:!0,configurable:!1,writable:!1,value:(...t)=>e.next(...t)}})}if(e[Symbol.iterator]instanceof Function)return a.from(e[Symbol.iterator]())}),n||(globalThis.Iterator=a),Number.hasOwnProperty("isSafeInteger")||(Number.MAX_SAFE_INTEGER=2**53-1,Number.MIN_SAFE_INTEGER=-Number.MAX_SAFE_INTEGER,Number.isSafeInteger=e=>e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER),Number.hasOwnProperty("EPSILON")||(Number.EPSILON=2**-52),Math.hasOwnProperty("sign")||(Math.sign=e=>(e>0)-(e<0)||+e),Math.hasOwnProperty("trunc")||(Math.trunc=e=>{const t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t}),Math.hasOwnProperty("expm1")||(Math.expm1=e=>Math.exp(e)-1),Math.hasOwnProperty("hypot")||(Math.hypot=(...e)=>Math.sqrt(e.reduce(((e,t)=>e+t**2),0))),Math.hasOwnProperty("cbrt")||(Math.cbrt=e=>e**(1/3)),Math.hasOwnProperty("log10")||(Math.log10=e=>Math.log(e)*Math.LOG10E),Math.hasOwnProperty("log2")||(Math.log2=e=>Math.log(e)*Math.LOG2E),Math.hasOwnProperty("log1p")||(Math.log1p=e=>Math.log(1+e)),Math.hasOwnProperty("fround")||(Math.fround=(i=new Float32Array(1),function(e){return i[0]=e,i[0]})),Math.clamp instanceof Function||(Math.clamp=function(e,t,r){return Math.min(Math.max(e,t),r)}),Math.constrain instanceof Function||(Math.constrain=Math.clamp),Math.sum instanceof Function||(Math.sum=function(...e){return e.map((e=>parseFloat(e))).reduce(((e,t)=>e+t))}),function(){if(!("isSecureContext"in globalThis)){const e=["localhost","127.0.0.1"],t="https:",r=[t,"file:","wss:"],n=(e=globalThis.document)=>[...e.scripts].every((({src:r})=>{if(0===r.length)return!0;{const{protocol:n,hostname:o}=new URL(r,e.baseURI);return n===t||o===location.hostname}}));Object.defineProperty(globalThis,"isSecureContext",{enumerable:!0,configurable:!0,get:function(){return window.parent===window&&(!(!r.includes(location.protocol)&&!e.includes(location.hostname))&&n())}})}}();const s=new WeakMap;function l(e){return e instanceof Function&&"AsyncFunction"===e.constructor.name}
1
+ !function(){"use strict";!function(){"undefined"==typeof globalThis&&("undefined"!=typeof window?Object.defineProperty(Window.prototype,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:window}):"undefined"!=typeof global?Object.defineProperty(global,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:global}):"undefined"!=typeof self?Object.defineProperty(self,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:self}):Object.defineProperty(this,"globalThis",{enumerable:!1,writable:!0,configurable:!0,value:this}))}(),!("crypto"in window)&&"msCrypto"in window&&(globalThis.crypto=globalThis.msCrypto),"Notification"in window||(globalThis.Notification=globalThis.notifications||globalThis.webkitNotifications||globalThis.oNotifications||globalThis.msNotifications||!1),"doNotTrack"in navigator||(navigator.doNotTrack=globalThis.doNotTrack||navigator.msDoNotTrack||"unspecified"),"indexedDB"in window||(globalThis.indexedDB=globalThis.indexedDB||globalThis.mozIndexedDB||globalThis.webkitIndexedDB||globalThis.msIndexedDB||!1),"hidden"in document||(document.hidden=document.webkitHidden||document.msHidden||document.mozHidden||!1),"visibilityState"in document||(document.visibilityState=document.webkitVisibilityState||document.msVisibilityState||document.mozVisibilityState||"visible"),"fullscreenElement"in document||(document.fullscreenElement=document.mozFullScreenElement||document.webkitFullscreenElement||!1),"requestAnimationFrame"in window||(globalThis.requestAnimationFrame=globalThis.mozRequestAnimationFrame||globalThis.webkitRequestAnimationFrame||globalThis.msRequestAnimationFrame||!1),"exitFullscreen"in Document.prototype||(Document.prototype.exitFullscreen=document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msCancelFullScreen||!1),"requestFullscreen"in HTMLElement.prototype||(HTMLElement.prototype.requestFullscreen=HTMLElement.prototype.requestFullScreen||HTMLElement.prototype.mozRequestFullScreen||HTMLElement.prototype.webkitRequestFullScreen||!1),"fullscreen"in Document.prototype||Object.defineProperty(Document.prototype,"fullscreen",{get:()=>document.fullscreenElement instanceof Element}),Object.groupBy instanceof Function||(Object.groupBy=function(e,t){return Array.from(e).reduce(((e,r,n)=>{const o=t.call(e,r,n);return e.hasOwnProperty(o)?e[o].push(r):e[o]=[r],e}),{})}),Map.prototype.emplace instanceof Function||(Map.prototype.emplace=function(e,{insert:t,update:r}={}){const n=this.has(e);if(n&&r instanceof Function){const t=this.get(e),n=r.call(this,t,e,this);return n!==t&&this.set(e,n),n}if(n)return this.get(e);if(t instanceof Function){const r=t.call(this,e,this);return this.set(e,r),r}throw new Error("Key is not found and no `insert()` given")}),Map.groupBy instanceof Function||(Map.groupBy=function(e,t){return Array.from(e).reduce(((e,r,n)=>(e.emplace(t.call(e,r,n),{insert:()=>[r],update:e=>(e.push(r),e)}),e)),new Map)});const e=[Array,String,globalThis.Int8Array,globalThis.Uint8Array,globalThis.Uint8ClampedArray,globalThis.Int16Array,globalThis.Uint16Array,globalThis.Int32Array,globalThis.Uint32Array,globalThis.Float32Array,globalThis.Float64Array,globalThis.BigInt64Array,globalThis.BigUint64Array];if(Array.prototype.flat instanceof Function||(Array.prototype.flat=function(e=1){const t=[];e=Math.min(Number.MAX_SAFE_INTEGER,Math.max(0,e));const r=(e,n)=>{Array.isArray(e)&&n>=0?e.forEach((e=>r(e,n-1))):t.push(e)};return r(this,Number.isNaN(e)?0:e),t}),Array.prototype.flatMap instanceof Function||(Array.prototype.flatMap=function(e,t){return this.map(e,t).flat(1)}),Array.prototype.findLast instanceof Function||(Array.prototype.findLast=function(e,t){let r;return this.forEach(((n,o,i)=>{e.call(t,n,o,i)&&(r=n)}),t),r}),"lastIndex"in Array.prototype||Object.defineProperty(Array.prototype,"lastIndex",{enumerable:!1,configurable:!1,get:function(){return Math.max(0,this.length-1)}}),"lastItem"in Array.prototype||Object.defineProperty(Array.prototype,"lastItem",{enumerable:!1,configurable:!1,get:function(){return this[this.lastIndex]},set:function(e){this[this.lastIndex]=e}}),Array.prototype.findLastIndex instanceof Function||(Array.prototype.findLastIndex=function(e,t){let r=-1;return this.forEach(((n,o,i)=>{e.call(t,n,o,i)&&(r=o)}),t),r}),!(Array.prototype.at instanceof Function)){const le=function(e){if((e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this[e]};for(const ce of e)void 0!==ce&&Object.defineProperty(ce.prototype,"at",{value:le,writable:!0,enumerable:!1,configurable:!0})}function t(e,t,r,{writable:n=!0,enumerable:o=!0,configurable:i=!0}={}){e[t]instanceof Function||Object.defineProperty(e,t,{value:r,writable:n,enumerable:o,configurable:i})}function r(e,t,{get:r,set:n,enumerable:o=!0,configurable:i=!0}={}){e.hasOwnProperty(t)||Object.defineProperty(e,t,{get:r,set:n,enumerable:o,configurable:i})}!(Array.prototype.group instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.group=function(e){return console.warn("`Array.group()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,e)}),!(Array.prototype.groupBy instanceof Function)&&Object.groupBy instanceof Function&&(Array.prototype.groupBy=function(e){return console.warn("`Array.goupBy()` is deprecated. Please use `Object.groupBy()` instead."),Object.groupBy(this,e)}),!(Array.prototype.groupToMap instanceof Function)&&Map.groupBy instanceof Function&&(Array.prototype.groupToMap=function(e){return console.warn("`Array.groupToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,e)}),Map.groupBy instanceof Function&&(Array.prototype.groupByToMap=function(e){return console.warn("`Array.groupByToMap()` is deprecated. Please use `Map.groupBy()` instead."),Map.groupBy(this,e)}),Array.fromAsync instanceof Function||(Array.fromAsync=async function(e,t,r=globalThis){let n=[];for await(const t of e)n.push(await t);return Array.from(n,t,r)}),Array.prototype.equals instanceof Function||(Array.prototype.equals=function(e){return this===e||!!Array.isArray(e)&&(this.length===e.length&&this.every(((t,r)=>{const n=e[r];return Array.isArray(t)?Array.isArray(n)&&t.equals(n):Object.is(t,n)})))}),Array.prototype.uniqueBy instanceof Function||(Array.prototype.uniqueBy=function(e){if(void 0===e)return[...new Set(this)];if("string"==typeof e){const t=[];return this.filter((r=>{const n=r[e];return!t.includes(n)&&(t.push(n),!0)}))}if(e instanceof Function){const t=[];return this.filter(((...r)=>{try{const n=e.apply(this,r);return"string"==typeof n&&(!t.includes(n)&&(t.push(n),!0))}catch(e){return!1}}))}throw new TypeError("Not a valid argument for uniqueBy")}),Array.prototype.toReversed instanceof Function||(Array.prototype.toReversed=function(){return[...this].reverse()}),Array.prototype.toSorted instanceof Function||(Array.prototype.toSorted=function(e){return[...this].sort(e)}),Array.prototype.toSpliced instanceof Function||(Array.prototype.toSpliced=function(e,t,...r){const n=[...this];return n.splice(e,t,...r),n}),Array.prototype.with instanceof Function||(Array.prototype.with=function(e,t){const r=[...this];return r[e]=t,r}),Array.isTemplateObject instanceof Function||(Array.isTemplateObject=function(e){return!!(Array.isArray(e)&&Array.isArray(e.raw)&&Object.isFrozen(e)&&Object.isFrozen(e.raw))&&(0!==e.length&&e.length===e.raw.length)}),Uint8Array.prototype.toHex instanceof Function||(Uint8Array.prototype.toHex=function(){return Array.from(this).map((e=>e.toString(16).padStart("0",2))).join("")}),Uint8Array.prototype.toBase64 instanceof Function||(Uint8Array.prototype.toBase64=function({alphabet:e="base64"}={}){if("base64"===e)return btoa(String.fromCodePoint(...this));if("base64url"===e)return this.toBase64({alphabet:"base64"}).replaceAll("+","-").replaceAll("/","_");throw new TypeError('expected alphabet to be either "base64" or "base64url')}),Uint8Array.fromHex instanceof Function||(Uint8Array.fromHex=function(e){if("string"!=typeof e)throw new TypeError("expected input to be a string");if(0===!(1&e.length))throw new SyntaxError("string should be an even number of characters");return Uint8Array.from(globalThis.Iterator.range(0,e.length,{step:2}),(t=>parseInt(e.substring(t,t+2),16)))}),Uint8Array.fromBase64 instanceof Function||(Uint8Array.fromBase64=function(e,{alphabet:t="base64",lastChunkHandling:r="loose"}={}){if("string"!=typeof e)throw new TypeError("expected input to be a string");if(!["base64","base64url"].includes(t))throw new TypeError('expected alphabet to be either "base64" or "base64url');if(!["loose","strict","stop-before-partial"].includes(r))throw new TypeError(`Invalid \`lastChunkHandling\`: "${r}".`);if("base64"!==t)return Uint8Array.fromBase64(e.replaceAll("-","+").replaceAll("_","/"),{alphabet:"base64"});{const t=e.length%4;if(1===t)throw new TypeError("Invalid string length.");if(0===t)return(new TextEncoder).encode(atob(e));switch(r){case"strict":throw new SyntaxError("Missing padding.");case"loose":return Uint8Array.fromBase64(e.padEnd(e.length+(4-t),"="),{alphabet:"base64",lastChunkHandling:"strict"});case"stop-before-partial":return Uint8Array.fromBase64(e.slice(0,e.length-t),{alphabet:"base64",lastChunkHandling:"strict"})}}}),"Symbol"in globalThis&&(void 0===Symbol.toStringTag&&(Symbol.toStringTag=Symbol("Symbol.toStringTag")),void 0===Symbol.iterator&&(Symbol.iterator=Symbol("Symbol.iterator"))),function(){if(!(Function.prototype.once instanceof Function)){const e=new WeakMap;Function.prototype.once=function(t){const r=this;return function(...n){if(e.has(r))return e.get(r);if("AsyncFunction"===r.constructor.name){const o=r.apply(t||r,n).catch((t=>{throw e.delete(r),t}));return e.set(r,o),o}if(r instanceof Function){const o=r.apply(t||r,n);return e.set(r,o),o}}}}}(),t(URL,"canParse",((e,t)=>{try{return new URL(e,t),!0}catch{return!1}})),Number.range instanceof Function||(Number.range=function(e,t,r=1){return console.warn("`Number.range()` is deprecated. Use `Iterator.range()` instead."),globalThis.Iterator.range(e,t,{step:r})});const n="Iterator"in globalThis,o=n?Object.getPrototypeOf(globalThis.Iterator):Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())),i=n?globalThis.Iterator:(e=>{class t{[Symbol.iterator](){return this}}return Object.setPrototypeOf(t,e),t})(o);var a;i.range instanceof Function||(i.range=function(e,t,r){if("number"==typeof r||"bigint"==typeof r)return i.range(e,t,{step:r});if("object"!=typeof r||Object.is(r,null))return i.range(e,t,{});{const{step:n=("number"==typeof e?e<t?1:-1:e<t?1n:-1n),inclusive:o=!1}=r;if("number"!=typeof e&&"bigint"!=typeof e)throw new TypeError("Start must be a number");if(Number.isNaN(e))throw new RangeError("Invalid start");if("number"!=typeof t&&"bigint"!=typeof t)throw new TypeError("End must be a number");if(Number.isNaN(t))throw new RangeError("Invalid end");if("number"!=typeof n&&"bigint"!=typeof n)throw new TypeError("Step must be a number");if(Number.isNaN(n))throw new RangeError("Invalid step");if(0===n)throw new RangeError("Step must not be 0");if(n<0&&e<t||n>0&&e>t)return;if(o){let r=e;return n>0?i.from({next(){const e=r<=t?{value:r,done:!1}:{done:!0};return r+=n,e}}):i.from({next(){const e=r>=t?{value:r,done:!1}:{done:!0};return r+=n,e}})}{let r=e;if(n>0)return i.from({next(){const e=r<t?{value:r,done:!1}:{done:!0};return r+=n,e}});{let r=e;return i.from({next(){const e=r>t?{value:r,done:!1}:{done:!0};return r+=n,e}})}}}}),o[Symbol.toStringTag]||(o[Symbol.toStringTag]="Iterator"),o.take instanceof Function||(o.take=function(e){let t=0;const r=this;return i.from({next:()=>t++>=e?{done:!0}:r.next()})}),o.drop instanceof Function||(o.drop=function(e){for(let t=0;t<e;t++){const{done:e}=this.next();if(e)break}return this}),o.toArray instanceof Function||(o.toArray=function(){return Array.from(this)}),o.forEach instanceof Function||(o.forEach=function(e){for(const t of this)e.call(this,t)}),o.flatMap instanceof Function||(o.flatMap=function(e){const t=this;let r=this.next();const n=({value:r,done:n=!0}={})=>n?i.from({next:()=>({done:!0})}):i.from(e.call(t,r));let o=n(r);return i.from({next(){const{value:e,done:i=!0}=o.next();return r.done&&i?{done:!0}:i?r.done?{done:!0}:(r=t.next(),o=n(r),o.next()):{value:e,done:i}}})}),o.map instanceof Function||(o.map=function(e){const t=this;return i.from({next(){const{done:r,value:n}=t.next();return r?{done:r}:{value:e.call(t,n),done:!1}}})}),o.reduce instanceof Function||(o.reduce=function(e,t){let r=void 0===t?this.next().value:t;for(const t of this)r=e.call(this,r,t);return r}),o.filter instanceof Function||(o.filter=function(e){const t=this;let r,n=!1;return i.from({next(){for(;!n;){const o=t.next();if(n=o.done,n)break;if(e.call(t,o.value)){r=o.value;break}}return{done:n,value:r}}})}),o.some instanceof Function||(o.some=function(e){let t=!1;for(const r of this)if(e.call(this,r)){t=!0;break}return t}),o.every instanceof Function||(o.every=function(e){let t=!0;for(const r of this)if(!e.call(this,r)){t=!1;break}return t}),o.find instanceof Function||(o.find=function(e){for(const t of this)if(e.call(this,t))return t}),o.indexed instanceof Function||(o.indexed=function(){let e=0;return this.map((t=>[e++,t]))}),o.chunks instanceof Function||(o.chunks=function(e){if(!Number.isSafeInteger(e)||e<1)throw new TypeError("Size must be a positive integer.");{const t=this;let r=!1;return i.from({next(){if(r)return{done:r};{const n=[];let o=0;for(;o++<e&&!r;){const e=t.next();if(e.done){r=!0,void 0!==e.value&&n.push(e.value);break}n.push(e.value)}return{value:n,done:!1}}}})}}),i.from instanceof Function||(i.from=function(e){if("object"!=typeof e||null===e)throw new TypeError("Not an object.");if(e.next instanceof Function){return Object.create(o,{next:{enumerable:!0,configurable:!1,writable:!1,value:(...t)=>e.next(...t)}})}if(e[Symbol.iterator]instanceof Function)return i.from(e[Symbol.iterator]())}),n||(globalThis.Iterator=i),Number.hasOwnProperty("isSafeInteger")||(Number.MAX_SAFE_INTEGER=2**53-1,Number.MIN_SAFE_INTEGER=-Number.MAX_SAFE_INTEGER,Number.isSafeInteger=e=>e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER),Number.hasOwnProperty("EPSILON")||(Number.EPSILON=2**-52),Math.hasOwnProperty("sign")||(Math.sign=e=>(e>0)-(e<0)||+e),Math.hasOwnProperty("trunc")||(Math.trunc=e=>{const t=e-e%1;return 0===t&&(e<0||0===e&&1/e!=1/0)?-0:t}),Math.hasOwnProperty("expm1")||(Math.expm1=e=>Math.exp(e)-1),Math.hasOwnProperty("hypot")||(Math.hypot=(...e)=>Math.sqrt(e.reduce(((e,t)=>e+t**2),0))),Math.hasOwnProperty("cbrt")||(Math.cbrt=e=>e**(1/3)),Math.hasOwnProperty("log10")||(Math.log10=e=>Math.log(e)*Math.LOG10E),Math.hasOwnProperty("log2")||(Math.log2=e=>Math.log(e)*Math.LOG2E),Math.hasOwnProperty("log1p")||(Math.log1p=e=>Math.log(1+e)),Math.hasOwnProperty("fround")||(Math.fround=(a=new Float32Array(1),function(e){return a[0]=e,a[0]})),Math.clamp instanceof Function||(Math.clamp=function(e,t,r){return Math.min(Math.max(e,t),r)}),Math.constrain instanceof Function||(Math.constrain=Math.clamp),Math.sum instanceof Function||(Math.sum=function(...e){return e.map((e=>parseFloat(e))).reduce(((e,t)=>e+t))}),function(){if(!("isSecureContext"in globalThis)){const e=["localhost","127.0.0.1"],t="https:",r=[t,"file:","wss:"],n=(e=globalThis.document)=>[...e.scripts].every((({src:r})=>{if(0===r.length)return!0;{const{protocol:n,hostname:o}=new URL(r,e.baseURI);return n===t||o===location.hostname}}));Object.defineProperty(globalThis,"isSecureContext",{enumerable:!0,configurable:!0,get:function(){return window.parent===window&&(!(!r.includes(location.protocol)&&!e.includes(location.hostname))&&n())}})}}();function s(e){return function(e){return e instanceof Function&&"AsyncFunction"===e.constructor.name}(e)||e instanceof Promise}
2
2
  /**
3
3
  * @copyright 2023 Chris Zuber <admin@kernvalley.us>
4
4
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Lock
5
- */
6
- const c=new WeakMap;class u{constructor(e,t="exclusive"){if(!["exclusive","shared"].includes(t))throw new TypeError(`'${t}' (value of 'mode' member of LockOptions) is not a valid value for enumeration LockMode.`);if("string"!=typeof e&&(e=e.toString()),e.startsWith("-"))throw new DOMException("Names starting with `-` are reserved");c.set(this,{name:e,mode:t})}get name(){return c.get(this).name}get mode(){return c.get(this).mode}}
5
+ */const l=new WeakMap;class c{constructor(e,t="exclusive"){if(!["exclusive","shared"].includes(t))throw new TypeError(`'${t}' (value of 'mode' member of LockOptions) is not a valid value for enumeration LockMode.`);if("string"!=typeof e&&(e=e.toString()),e.startsWith("-"))throw new DOMException("Names starting with `-` are reserved");l.set(this,{name:e,mode:t})}get name(){return l.get(this).name}get mode(){return l.get(this).mode}}
7
6
  /**
8
7
  * @copyright 2023 Chris Zuber <admin@kernvalley.us>
9
- */const p=new Map,d=Symbol("lock-key"),f="locks"in navigator&&navigator.locks.request instanceof Function;const m=async function(){return await new Promise((e=>{"locks"in navigator&&navigator.locks.request instanceof Function?navigator.locks.query().then((()=>e(!0))).catch((()=>e(!1))):e(!1)}))}();async function h(e,t=null){return new Promise(((r,n)=>{var o;l(o=e)||o instanceof Promise?e.call(globalThis,t).then(r,n):queueMicrotask((()=>{try{const n=e.call(globalThis,t);r(n)}catch(e){n(e)}}))}))}async function y(e){p.has(e)&&await p.get(e).promise.catch(console.error)}function g(e,t,r){const{resolve:n,reject:o,promise:a}=function(){if(Promise.withResolvers instanceof Function)return Promise.withResolvers();{const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e}}(),i=new AbortController,s=new u(e,t),l=function({name:e,mode:t}){switch(t){case"exclusive":return w().some((t=>t.name===e));case"shared":return w().some((t=>t.name===e&&"exclusive"===t.mode))}}(s);return p.set(s,{resolve:n,reject:o,promise:a,callback:r,pending:l,controller:i}),s}function b(e){return e instanceof u&&p.has(e)&&p.get(e).pending}function w(e){return"string"==typeof e?[...p.keys()].filter((t=>t.name===e)):[...p.keys()]}function v(e){return w(e).filter((e=>!b(e)))}function T(e){return w(e).filter((e=>b(e)))}async function S(e){switch(e.mode){case"exclusive":await Promise.allSettled(w().filter((t=>t.name===e.name&&t!==e)).map(y));break;case"shared":await Promise.allSettled(w().filter((t=>t.name===e.name&&"exclusive"===t.mode&&t!==e)).map(y))}}function E(e){if(p.has(e))return p.get(e).controller.signal}async function A(e){if(p.has(e)){const{resolve:t,reject:r,promise:n,callback:o,pending:a,controller:i}=p.get(e);return a&&function(e,t=!0){p.has(e)&&p.set(e,{...p.get(e),pending:t})}(e,!1),h(o,e).then(t,r).finally((()=>{p.delete(e),requestIdleCallback((()=>i.abort()))})),n}}class x{constructor(e){if(e!==d)throw new TypeError("Invalid constructor")}static async request(e,...t){let r,n={};t[0]instanceof Function?r=t[0]:t[1]instanceof Function&&([n,r]=t),"string"!=typeof e&&(e=e.toString());const{mode:o="exclusive",ifAvailable:a=!1,steal:i=!1,signal:s}=n;if(i&&a)throw new DOMException("LockManager.request: `steal` and `ifAvailable` cannot be used together");if(e.startsWith("-"))throw new DOMException("LockManager.request: Names starting with `-` are reserved");if(!["exclusive","shared"].includes(o))throw new TypeError(`LockManager.request: '${o}' (value of 'mode' member of LockOptions) is not a valid value for enumeration LockMode.`);if(s instanceof AbortSignal&&s.aborted)throw s.reason;if("shared"===o&&i)throw new DOMException("LockManager.request: `steal` is only supported for exclusive lock requests");const l=v(e),c=T(e),u=[...l,...c].some((t=>t.name===e));i&&u&&function(e){[...p.entries()].filter((([t])=>t.name===e)).forEach((([e,{reject:t,controller:r}])=>{requestIdleCallback((()=>{r.abort(),p.delete(e)})),t(new DOMException("The lock request is aborted"))}))}(e);const d=g(e,o,r);switch(s instanceof AbortSignal&&s.addEventListener("abort",(()=>{if(p.has(d)){const{reject:e,controller:t}=p.get(d);p.delete(d),e(new DOMException("The lock request is aborted")),t.abort()}}),{once:!0,signal:E(d)}),o){case"exclusive":if(!a||0===l.length&&0===c.length)return await S(d),await A(d);{const e=p.get(d).controller;return p.delete(d),await h(r,null).then((t=>(requestIdleCallback((()=>e.abort())),t)))}case"shared":if(a){if([...l,...c].some((e=>"exclusive"===e.mode))){const e=p.get(d).controller;return p.delete(d),await h(r,null).then((t=>(requestIdleCallback((()=>e.abort())),t)))}return await S(d),await A(d)}return await S(d),await A(d);default:throw new TypeError(`LockManager.request: '${o}' (value of 'mode' member of LockOptions) is not a valid value for enumeration LockMode.`)}}static async query(){return{held:v().map((({name:e,mode:t})=>({name:e,mode:t,clientId:null}))),pending:T().map((({name:e,mode:t})=>({name:e,mode:t,clientId:null})))}}}function M(e,t="error"){if(e instanceof Error){const{message:r,name:n,fileName:o,lineNumber:a,columnNumber:i}=e;return new ErrorEvent(t,{error:e,message:`${n}: ${r}`,filename:o,lineno:a,colno:i})}throw new TypeError("`errorToEvent()` only accepts Errors")}let O=!1;new Promise((async e=>{if(f)if(await m)e(!1);else try{navigator.locks.request=x.request,navigator.locks.query=x.query,O=!0,e(!0)}catch(t){globalThis.dispatchEvent(M(t)),e(!1)}else try{navigator.locks=x,O=!0,e(!0)}catch(t){globalThis.dispatchEvent(M(t)),e(!1)}})),navigator.canShare instanceof Function||(navigator.canShare=function({title:e,text:t,url:r,files:n}={}){return navigator.share instanceof Function&&(!Array.isArray(n)||0===n.length)&&(!![e,t,r].every((e=>void 0===e))||[e,t,r].some((e=>"string"==typeof e&&0!==e.length)))}),navigator.setAppBadge instanceof Function||(navigator.setAppBadge=async e=>{if(!Number.isInteger(e))throw new TypeError("Failed to execute 'setAppBadge' on 'Navigator': Value is not of type 'unsigned long long'");if(e<0)throw new TypeError("Failed to execute 'setAppBadge' on 'Navigator': Value is outside the 'unsigned long long' value range.");0===e?document.title.startsWith("(")&&(document.title=document.title.replace(/^\((\d{1,2}\+?)\)\s/,"")):e<100?(await navigator.clearAppBadge(),document.title=`(${e}) ${document.title}`):(await navigator.clearAppBadge(),document.title=`(99+) ${document.title}`)}),navigator.clearAppBadge instanceof Function||(navigator.clearAppBadge=()=>navigator.setAppBadge(0)),Navigator.prototype.hasOwnProperty("pdfViewerEnabled")||Object.defineProperty(navigator,"pdfViewerEnabled",{enumerable:!0,configurable:!1,writable:!1,value:!1}),Navigator.prototype.getInstalledRelatedApps instanceof Function||(Navigator.prototype.getInstalledRelatedApps=async()=>[]),Navigator.prototype.getGamepads instanceof Function||(Navigator.prototype.getGamepads=()=>[]),"hardwareConcurrency"in Navigator.prototype||Object.defineProperty(Navigator.prototype,"hardwareConcurrency",{get:()=>1}),"connection"in Navigator.prototype?"type"in navigator.connection||(navigator.connection.type="unknown"):Object.defineProperty(Navigator.prototype,"connection",{get:()=>Object.create(EventTarget.prototype,{type:{value:"unknown"},effectiveType:{value:"4g"},rtt:{value:NaN},downlink:{value:NaN},downlinkMax:{value:1/0},saveData:{value:!1},onchange:{value:null,writable:!0},ontypechange:{value:null,writable:!0}})}),"doNotTrack"in Navigator.prototype||Object.defineProperty(Navigator.prototype,"doNotTrack",{get:()=>"unspecified"}),"globalPrivacyControl"in Navigator.prototype||Object.defineProperty(Navigator.prototype,"globalPrivacyControl",{get:()=>!1}),function(){if(!(globalThis.requestIdleCallback instanceof Function)){const e=e=>Number.isSafeInteger(e)&&e>0;globalThis.requestIdleCallback=function(t,{timeout:r}={}){const n=performance.now(),o=()=>e(r)?Math.max(0,r-(performance.now()-n)):Math.max(0,600-(performance.now()-n));return setTimeout((()=>t({didTimeout:!!e(r)&&0===o(),timeRemaining:o})),1)}}globalThis.cancelIdleCallback instanceof Function||(globalThis.cancelIdleCallback=e=>clearTimeout(e)),globalThis.requestAnimationFrame instanceof Function||(globalThis.requestAnimationFrame=e=>setTimeout((()=>e(performance.now())),1e3/60)),globalThis.cancelAnimationFrame instanceof Function||(globalThis.cancelAnimationFrame=e=>clearTimeout(e)),globalThis.queueMicrotask instanceof Function||(globalThis.queueMicrotask=e=>Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e})))))}(),function(){if(!("AbortSignal"in globalThis)){const e={signal:Symbol("signal"),aborted:Symbol("aborted"),reason:Symbol("reason"),onabort:Symbol("onabort")};globalThis.AbortError=class extends Error{},globalThis.AbortSignal=class t extends EventTarget{constructor(){super(),Object.defineProperties(this,{[e.aborted]:{enumerable:!1,writable:!0,configurable:!1,value:!1},[e.reason]:{enumerable:!1,writable:!0,configurable:!1,value:void 0},[e.onabort]:{enumerable:!1,writable:!0,configurable:!1,value:null}}),this.addEventListener("abort",(e=>{this.onabort instanceof Function&&this.onabort.call(this,e)}))}get aborted(){return this[e.aborted]}get onabort(){return this[e.onabort]}set onabort(t){this[e.onabort]=t instanceof Function?t:null}get reason(){return this[e.reason]}throwIfAborted(){if(this.aborted)throw this.reason}static abort(r=new DOMException("Operation aborted")){const n=new t;return n[e.aborted]=!0,n[e.reason]=r,n}},globalThis.AbortController=class{constructor(){this[e.signal]=new AbortSignal}get signal(){return this[e.signal]}abort(t=new DOMException("Operation aborted")){const r=this.signal;r.aborted||(r[e.aborted]=!0,r[e.reason]=t,r.dispatchEvent(new Event("abort")))}}}if(!("reason"in AbortSignal.prototype)){const e=new WeakMap,t=AbortController.prototype.abort;if(AbortSignal.abort instanceof Function){const t=AbortSignal.abort;AbortSignal.abort=function(r=new DOMException("Operation aborted")){const n=t();return e.set(n,r),n}}else AbortSignal.abort=function(e=new DOMException("Operation aborted")){const t=new AbortController;return t.abort(e),t.reason};Object.defineProperty(AbortSignal.prototype,"reason",{enumerable:!0,configurable:!0,get:function(){return e.has(this)?e.get(this):void 0}}),AbortController.prototype.abort=function(r=new DOMException("Operation aborted")){e.set(this.signal,r),t.call(this)}}AbortSignal.prototype.throwIfAborted instanceof Function||(AbortSignal.prototype.throwIfAborted=function(){if(this.aborted)throw this.reason}),AbortSignal.timeout instanceof Function||(AbortSignal.timeout=function(e){if(void 0===e)throw new TypeError("At least one 1 argument required but only 0 passed");if(Number.isFinite(e)){if(e<0)throw new TypeError("Argument 1 is out of range for unsigned long long.");{const t=new AbortController;return setTimeout((()=>t.abort(new DOMException("The operation timed out."))),e),t.signal}}throw new TypeError("Argument 1 is not a finite value, so it is out of range for unsigned long long.")}),AbortSignal.any instanceof Function||(AbortSignal.any=function(e){if(!Array.isArray(e))throw new TypeError("Expected an array of signals");const t=new AbortController;for(const r of e){if(!(r instanceof AbortSignal)){const e=new TypeError("`signal` is not an `AbortSignal`");throw t.abort(e),e}if(r.aborted){t.abort(r.reason||new DOMException("Operation aborted."));break}r.addEventListener("abort",(({target:e})=>{t.abort(e.reason||new DOMException("Operation aborted."))}),{signal:t.signal})}return t.signal})}(),globalThis.hasOwnProperty("AggregateError")||(globalThis.AggregateError=class extends Error{constructor(e,t){void 0===t?(super(e),this.errors=[]):(super(t),this.errors=e)}}),globalThis.reportError instanceof Function||(globalThis.reportError=function(e){globalThis.dispatchEvent(M(e))}),function(){if("MediaQueryListEvent"in globalThis||(globalThis.MediaQueryListEvent=class extends Event{constructor(e,{media:t,matches:r}={}){super(e),Object.defineProperties(this,{media:{enumerable:!0,configurable:!1,writable:!1,value:t},matches:{enumerable:!0,configurable:!1,writable:!1,value:r}})}}),"MediaQueryList"in globalThis&&!(globalThis.MediaQueryList.prototype.addEventListener instanceof Function)){const e=new WeakMap,t=function(){const{media:e,matches:t}=this;this.dispatchEvent(new MediaQueryListEvent("change",{media:e,matches:t}))},r=function(r){return e.has(r)||(e.set(r,new EventTarget),r.addListener(t.bind(r))),e.get(r)};globalThis.MediaQueryList.prototype.addEventListener=function(e,t,n){r(this).addEventListener(e,t,n)},globalThis.MediaQueryList.prototype.removeEventListener=function(e,t,n){r(this).removeEventListener(e,t,n)},globalThis.MediaQueryList.prototype.dispatchEvent=function(e){r(this).dispatchEvent(e)}}}(),"Promise"in globalThis&&(Promise.prototype.finally instanceof Function||(Promise.prototype.finally=function(e){return this.then((async t=>(await e(),t)),(async t=>(await e(),t)))}),Promise.allSettled instanceof Function||(Promise.allSettled=function(e){return Promise.all(Array.from(e).map((function(e){return new Promise((function(t){e instanceof Promise||(e=Promise.resolve(e)),e.then((function(e){t({status:"fulfilled",value:e})})).catch((function(e){t({status:"rejected",reason:e})}))}))})))}),Promise.any instanceof Function||(Promise.any=e=>new Promise(((t,r)=>{let n=[];e.forEach((o=>{o.then(t).catch((t=>{n.push(t),n.length===e.length&&r(new globalThis.AggregateError(n,"No Promise in Promise.any was resolved"))}))}))}))),Promise.race instanceof Function||(Promise.race=e=>new Promise(((t,r)=>{e.forEach((e=>e.then(t,r)))}))),Promise.try instanceof Function||(Promise.try=e=>new Promise((t=>t(e())))),Promise.withResolvers instanceof Function||(Promise.withResolvers=function(){const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e}))
8
+ */const u=new Map,p=Symbol("lock-key"),d="locks"in navigator&&navigator.locks.request instanceof Function;const f=async function(){return await new Promise((e=>{"locks"in navigator&&navigator.locks.request instanceof Function?navigator.locks.query().then((()=>e(!0))).catch((()=>e(!1))):e(!1)}))}();async function h(e,t=null){return new Promise(((r,n)=>{s(e)?e.call(globalThis,t).then(r,n):queueMicrotask((()=>{try{const n=e.call(globalThis,t);r(n)}catch(e){n(e)}}))}))}async function m(e){u.has(e)&&await u.get(e).promise.catch(console.error)}function g(e,t,r){const{resolve:n,reject:o,promise:i}=function(){if(Promise.withResolvers instanceof Function)return Promise.withResolvers();{const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e}}(),a=new AbortController,s=new c(e,t),l=function({name:e,mode:t}){switch(t){case"exclusive":return b().some((t=>t.name===e));case"shared":return b().some((t=>t.name===e&&"exclusive"===t.mode))}}(s);return u.set(s,{resolve:n,reject:o,promise:i,callback:r,pending:l,controller:a}),s}function y(e){return e instanceof c&&u.has(e)&&u.get(e).pending}function b(e){return"string"==typeof e?[...u.keys()].filter((t=>t.name===e)):[...u.keys()]}function w(e){return b(e).filter((e=>!y(e)))}function v(e){return b(e).filter((e=>y(e)))}async function T(e){switch(e.mode){case"exclusive":await Promise.allSettled(b().filter((t=>t.name===e.name&&t!==e)).map(m));break;case"shared":await Promise.allSettled(b().filter((t=>t.name===e.name&&"exclusive"===t.mode&&t!==e)).map(m))}}function S(e){if(u.has(e))return u.get(e).controller.signal}async function E(e){if(u.has(e)){const{resolve:t,reject:r,promise:n,callback:o,pending:i,controller:a}=u.get(e);return i&&function(e,t=!0){u.has(e)&&u.set(e,{...u.get(e),pending:t})}(e,!1),h(o,e).then(t,r).finally((()=>{u.delete(e),requestIdleCallback((()=>a.abort()))})),n}}class A{constructor(e){if(e!==p)throw new TypeError("Invalid constructor")}static async request(e,...t){let r,n={};t[0]instanceof Function?r=t[0]:t[1]instanceof Function&&([n,r]=t),"string"!=typeof e&&(e=e.toString());const{mode:o="exclusive",ifAvailable:i=!1,steal:a=!1,signal:s}=n;if(a&&i)throw new DOMException("LockManager.request: `steal` and `ifAvailable` cannot be used together");if(e.startsWith("-"))throw new DOMException("LockManager.request: Names starting with `-` are reserved");if(!["exclusive","shared"].includes(o))throw new TypeError(`LockManager.request: '${o}' (value of 'mode' member of LockOptions) is not a valid value for enumeration LockMode.`);if(s instanceof AbortSignal&&s.aborted)throw s.reason;if("shared"===o&&a)throw new DOMException("LockManager.request: `steal` is only supported for exclusive lock requests");const l=w(e),c=v(e),p=[...l,...c].some((t=>t.name===e));a&&p&&function(e){[...u.entries()].filter((([t])=>t.name===e)).forEach((([e,{reject:t,controller:r}])=>{requestIdleCallback((()=>{r.abort(),u.delete(e)})),t(new DOMException("The lock request is aborted"))}))}(e);const d=g(e,o,r);switch(s instanceof AbortSignal&&s.addEventListener("abort",(()=>{if(u.has(d)){const{reject:e,controller:t}=u.get(d);u.delete(d),e(new DOMException("The lock request is aborted")),t.abort()}}),{once:!0,signal:S(d)}),o){case"exclusive":if(!i||0===l.length&&0===c.length)return await T(d),await E(d);{const e=u.get(d).controller;return u.delete(d),await h(r,null).then((t=>(requestIdleCallback((()=>e.abort())),t)))}case"shared":if(i){if([...l,...c].some((e=>"exclusive"===e.mode))){const e=u.get(d).controller;return u.delete(d),await h(r,null).then((t=>(requestIdleCallback((()=>e.abort())),t)))}return await T(d),await E(d)}return await T(d),await E(d);default:throw new TypeError(`LockManager.request: '${o}' (value of 'mode' member of LockOptions) is not a valid value for enumeration LockMode.`)}}static async query(){return{held:w().map((({name:e,mode:t})=>({name:e,mode:t,clientId:null}))),pending:v().map((({name:e,mode:t})=>({name:e,mode:t,clientId:null})))}}}function M(e,t="error"){if(e instanceof Error){const{message:r,name:n,fileName:o,lineNumber:i,columnNumber:a}=e;return new ErrorEvent(t,{error:e,message:`${n}: ${r}`,filename:o,lineno:i,colno:a})}throw new TypeError("`errorToEvent()` only accepts Errors")}let x=!1;new Promise((async e=>{if(d)if(await f)e(!1);else try{navigator.locks.request=A.request,navigator.locks.query=A.query,x=!0,e(!0)}catch(t){globalThis.dispatchEvent(M(t)),e(!1)}else try{navigator.locks=A,x=!0,e(!0)}catch(t){globalThis.dispatchEvent(M(t)),e(!1)}})),navigator.canShare instanceof Function||(navigator.canShare=function({title:e,text:t,url:r,files:n}={}){return navigator.share instanceof Function&&(!Array.isArray(n)||0===n.length)&&(!![e,t,r].every((e=>void 0===e))||[e,t,r].some((e=>"string"==typeof e&&0!==e.length)))}),navigator.setAppBadge instanceof Function||(navigator.setAppBadge=async e=>{if(!Number.isInteger(e))throw new TypeError("Failed to execute 'setAppBadge' on 'Navigator': Value is not of type 'unsigned long long'");if(e<0)throw new TypeError("Failed to execute 'setAppBadge' on 'Navigator': Value is outside the 'unsigned long long' value range.");0===e?document.title.startsWith("(")&&(document.title=document.title.replace(/^\((\d{1,2}\+?)\)\s/,"")):e<100?(await navigator.clearAppBadge(),document.title=`(${e}) ${document.title}`):(await navigator.clearAppBadge(),document.title=`(99+) ${document.title}`)}),navigator.clearAppBadge instanceof Function||(navigator.clearAppBadge=()=>navigator.setAppBadge(0)),Navigator.prototype.hasOwnProperty("pdfViewerEnabled")||Object.defineProperty(navigator,"pdfViewerEnabled",{enumerable:!0,configurable:!1,writable:!1,value:!1}),Navigator.prototype.getInstalledRelatedApps instanceof Function||(Navigator.prototype.getInstalledRelatedApps=async()=>[]),Navigator.prototype.getGamepads instanceof Function||(Navigator.prototype.getGamepads=()=>[]),"hardwareConcurrency"in Navigator.prototype||Object.defineProperty(Navigator.prototype,"hardwareConcurrency",{get:()=>1}),"connection"in Navigator.prototype?"type"in navigator.connection||(navigator.connection.type="unknown"):Object.defineProperty(Navigator.prototype,"connection",{get:()=>Object.create(EventTarget.prototype,{type:{value:"unknown"},effectiveType:{value:"4g"},rtt:{value:NaN},downlink:{value:NaN},downlinkMax:{value:1/0},saveData:{value:!1},onchange:{value:null,writable:!0},ontypechange:{value:null,writable:!0}})}),"doNotTrack"in Navigator.prototype||Object.defineProperty(Navigator.prototype,"doNotTrack",{get:()=>"unspecified"}),"globalPrivacyControl"in Navigator.prototype||Object.defineProperty(Navigator.prototype,"globalPrivacyControl",{get:()=>!1}),function(){if(!(globalThis.requestIdleCallback instanceof Function)){const e=e=>Number.isSafeInteger(e)&&e>0;globalThis.requestIdleCallback=function(t,{timeout:r}={}){const n=performance.now(),o=()=>e(r)?Math.max(0,r-(performance.now()-n)):Math.max(0,600-(performance.now()-n));return setTimeout((()=>t({didTimeout:!!e(r)&&0===o(),timeRemaining:o})),1)}}globalThis.cancelIdleCallback instanceof Function||(globalThis.cancelIdleCallback=e=>clearTimeout(e)),globalThis.requestAnimationFrame instanceof Function||(globalThis.requestAnimationFrame=e=>setTimeout((()=>e(performance.now())),1e3/60)),globalThis.cancelAnimationFrame instanceof Function||(globalThis.cancelAnimationFrame=e=>clearTimeout(e)),globalThis.queueMicrotask instanceof Function||(globalThis.queueMicrotask=e=>Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e})))))}(),function(){if(!("AbortSignal"in globalThis)){const e={signal:Symbol("signal"),aborted:Symbol("aborted"),reason:Symbol("reason"),onabort:Symbol("onabort")};globalThis.AbortError=class extends Error{},globalThis.AbortSignal=class t extends EventTarget{constructor(){super(),Object.defineProperties(this,{[e.aborted]:{enumerable:!1,writable:!0,configurable:!1,value:!1},[e.reason]:{enumerable:!1,writable:!0,configurable:!1,value:void 0},[e.onabort]:{enumerable:!1,writable:!0,configurable:!1,value:null}}),this.addEventListener("abort",(e=>{this.onabort instanceof Function&&this.onabort.call(this,e)}))}get aborted(){return this[e.aborted]}get onabort(){return this[e.onabort]}set onabort(t){this[e.onabort]=t instanceof Function?t:null}get reason(){return this[e.reason]}throwIfAborted(){if(this.aborted)throw this.reason}static abort(r=new DOMException("Operation aborted")){const n=new t;return n[e.aborted]=!0,n[e.reason]=r,n}},globalThis.AbortController=class{constructor(){this[e.signal]=new AbortSignal}get signal(){return this[e.signal]}abort(t=new DOMException("Operation aborted")){const r=this.signal;r.aborted||(r[e.aborted]=!0,r[e.reason]=t,r.dispatchEvent(new Event("abort")))}}}if(!("reason"in AbortSignal.prototype)){const e=new WeakMap,t=AbortController.prototype.abort;if(AbortSignal.abort instanceof Function){const t=AbortSignal.abort;AbortSignal.abort=function(r=new DOMException("Operation aborted")){const n=t();return e.set(n,r),n}}else AbortSignal.abort=function(e=new DOMException("Operation aborted")){const t=new AbortController;return t.abort(e),t.reason};Object.defineProperty(AbortSignal.prototype,"reason",{enumerable:!0,configurable:!0,get:function(){return e.has(this)?e.get(this):void 0}}),AbortController.prototype.abort=function(r=new DOMException("Operation aborted")){e.set(this.signal,r),t.call(this)}}AbortSignal.prototype.throwIfAborted instanceof Function||(AbortSignal.prototype.throwIfAborted=function(){if(this.aborted)throw this.reason}),AbortSignal.timeout instanceof Function||(AbortSignal.timeout=function(e){if(void 0===e)throw new TypeError("At least one 1 argument required but only 0 passed");if(Number.isFinite(e)){if(e<0)throw new TypeError("Argument 1 is out of range for unsigned long long.");{const t=new AbortController;return setTimeout((()=>t.abort(new DOMException("The operation timed out."))),e),t.signal}}throw new TypeError("Argument 1 is not a finite value, so it is out of range for unsigned long long.")}),AbortSignal.any instanceof Function||(AbortSignal.any=function(e){if(!Array.isArray(e))throw new TypeError("Expected an array of signals");const t=new AbortController;for(const r of e){if(!(r instanceof AbortSignal)){const e=new TypeError("`signal` is not an `AbortSignal`");throw t.abort(e),e}if(r.aborted){t.abort(r.reason||new DOMException("Operation aborted."));break}r.addEventListener("abort",(({target:e})=>{t.abort(e.reason||new DOMException("Operation aborted."))}),{signal:t.signal})}return t.signal})}(),globalThis.hasOwnProperty("AggregateError")||(globalThis.AggregateError=class extends Error{constructor(e,t){void 0===t?(super(e),this.errors=[]):(super(t),this.errors=e)}}),globalThis.reportError instanceof Function||(globalThis.reportError=function(e){globalThis.dispatchEvent(M(e))}),function(){if("MediaQueryListEvent"in globalThis||(globalThis.MediaQueryListEvent=class extends Event{constructor(e,{media:t,matches:r}={}){super(e),Object.defineProperties(this,{media:{enumerable:!0,configurable:!1,writable:!1,value:t},matches:{enumerable:!0,configurable:!1,writable:!1,value:r}})}}),"MediaQueryList"in globalThis&&!(globalThis.MediaQueryList.prototype.addEventListener instanceof Function)){const e=new WeakMap,t=function(){const{media:e,matches:t}=this;this.dispatchEvent(new MediaQueryListEvent("change",{media:e,matches:t}))},r=function(r){return e.has(r)||(e.set(r,new EventTarget),r.addListener(t.bind(r))),e.get(r)};globalThis.MediaQueryList.prototype.addEventListener=function(e,t,n){r(this).addEventListener(e,t,n)},globalThis.MediaQueryList.prototype.removeEventListener=function(e,t,n){r(this).removeEventListener(e,t,n)},globalThis.MediaQueryList.prototype.dispatchEvent=function(e){r(this).dispatchEvent(e)}}}(),"Promise"in globalThis&&(Promise.prototype.finally instanceof Function||(Promise.prototype.finally=function(e){return this.then((async t=>(await e(),t)),(async t=>(await e(),t)))}),Promise.allSettled instanceof Function||(Promise.allSettled=function(e){return Promise.all(Array.from(e).map((function(e){return new Promise((function(t){e instanceof Promise||(e=Promise.resolve(e)),e.then((function(e){t({status:"fulfilled",value:e})})).catch((function(e){t({status:"rejected",reason:e})}))}))})))}),Promise.any instanceof Function||(Promise.any=e=>new Promise(((t,r)=>{let n=[];e.forEach((o=>{o.then(t).catch((t=>{n.push(t),n.length===e.length&&r(new globalThis.AggregateError(n,"No Promise in Promise.any was resolved"))}))}))}))),Promise.race instanceof Function||(Promise.race=e=>new Promise(((t,r)=>{e.forEach((e=>e.then(t,r)))}))),Promise.try instanceof Function||(Promise.try=e=>new Promise((t=>t(e())))),Promise.withResolvers instanceof Function||(Promise.withResolvers=function(){const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e}))
10
9
  /**
11
10
  * @copyright 2023 Chris Zuber <admin@kernvalley.us>
12
- */;let k=class{get encoding(){return"utf-8"}encode(e){return new Uint8Array(e.split("").flatMap((e=>{const t=e.charCodeAt(0);if(t<128)return[t];return[194+Math.floor((t-128)/64),t%64+128]})))}encodeInto(e,t){if(t instanceof Uint8Array){const r=this.encode(e),n=Math.min(t.length,r.length);return r.length>t.length?t.set(r.slice(0,n)):t.set(r),{read:n,written:n}}throw new TypeError("TextEncoder.encodeInto: Argument 2 does not implement interface Uint8Array.")}};
11
+ */;let L=class{get encoding(){return"utf-8"}encode(e){return new Uint8Array(e.split("").flatMap((e=>{const t=e.charCodeAt(0);if(t<128)return[t];return[194+Math.floor((t-128)/64),t%64+128]})))}encodeInto(e,t){if(t instanceof Uint8Array){const r=this.encode(e),n=Math.min(t.length,r.length);return r.length>t.length?t.set(r.slice(0,n)):t.set(r),{read:n,written:n}}throw new TypeError("TextEncoder.encodeInto: Argument 2 does not implement interface Uint8Array.")}};
13
12
  /**
14
13
  * @copyright 2023 Chris Zuber <admin@kernvalley.us>
15
- */const L=["utf-8","utf8"];class P{constructor(e="utf-8",{fatal:t=!1,ignoreBOM:r=!1}={}){if(e="string"!=typeof e?e.toString().toLowerCase():e.toLowerCase(),!L.includes(e))throw new RangeError(`TextDecoder constructor: The given encoding '${e}' is not supported.`);Object.defineProperties(this,{encoding:{configurable:!1,enumerable:!0,writable:!1,value:e},fatal:{configurable:!1,enumerable:!0,writable:!1,value:t},ignoreBOM:{configurable:!1,enumerable:!0,writable:!1,value:r}})}decode(e){switch(this.encoding){case"utf-8":case"utf8":{let t=NaN;return e.reduce(((e,r,n)=>{if(Number.isNaN(t)&&r<128)return e+String.fromCharCode(r);if(Number.isNaN(t)&&r>193)return t=r,e;if(t>193&&(o=128,i=194,"number"==typeof(a=r)&&a>=o&&a<=i)){const n=64*(t-194);return t=NaN,e+String.fromCharCode(n+r)}if(this.fatal)throw new RangeError(`Unhandled character at postion ${n}`);return t=NaN,e;var o,a,i}),"")}default:throw new TypeError(`Unsupported encoding '${this.encoding}'`)}}}"TextEncoder"in globalThis||(globalThis.TextEncoder=k),"TextDecoder"in globalThis||(globalThis.TextDecoder=P),globalThis.TextEncoder.prototype.encodeInto instanceof Function||(globalThis.TextEncoder.prototype.encodeInto=function(...e){return k.prototype.encodeInto.apply(this,e)}),!(crypto in globalThis)||crypto.randomUUID instanceof Function||(crypto.randomUUID=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))})
14
+ */const k=["utf-8","utf8"];class O{constructor(e="utf-8",{fatal:t=!1,ignoreBOM:r=!1}={}){if(e="string"!=typeof e?e.toString().toLowerCase():e.toLowerCase(),!k.includes(e))throw new RangeError(`TextDecoder constructor: The given encoding '${e}' is not supported.`);Object.defineProperties(this,{encoding:{configurable:!1,enumerable:!0,writable:!1,value:e},fatal:{configurable:!1,enumerable:!0,writable:!1,value:t},ignoreBOM:{configurable:!1,enumerable:!0,writable:!1,value:r}})}decode(e){switch(this.encoding){case"utf-8":case"utf8":{let t=NaN;return e.reduce(((e,r,n)=>{if(Number.isNaN(t)&&r<128)return e+String.fromCharCode(r);if(Number.isNaN(t)&&r>193)return t=r,e;if(t>193&&(o=128,a=194,"number"==typeof(i=r)&&i>=o&&i<=a)){const n=64*(t-194);return t=NaN,e+String.fromCharCode(n+r)}if(this.fatal)throw new RangeError(`Unhandled character at postion ${n}`);return t=NaN,e;var o,i,a}),"")}default:throw new TypeError(`Unsupported encoding '${this.encoding}'`)}}}"TextEncoder"in globalThis||(globalThis.TextEncoder=L),"TextDecoder"in globalThis||(globalThis.TextDecoder=O),globalThis.TextEncoder.prototype.encodeInto instanceof Function||(globalThis.TextEncoder.prototype.encodeInto=function(...e){return L.prototype.encodeInto.apply(this,e)}),!(crypto in globalThis)||crypto.randomUUID instanceof Function||(crypto.randomUUID=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)))})
16
15
  /**
17
16
  * @copyright 2023 Chris Zuber <admin@kernvalley.us>
18
17
  * @SEE https://wicg.github.io/cookie-store/
@@ -21,25 +20,21 @@ const c=new WeakMap;class u{constructor(e,t="exclusive"){if(!["exclusive","share
21
20
  * cookie properties, such as expires, etc.
22
21
  *
23
22
  * @TODO verify spec compliance as best as is possible
24
- */;const F="cookieStore"in globalThis,N={constructor:Symbol("constructor")};function j(){return 0===document.cookie.length?[]:document.cookie.split(";").map((e=>{const[t,r=null]=e.split("=");return{name:decodeURIComponent(t.trim()),value:"string"==typeof r?decodeURIComponent(r.trim()):null,path:void 0,expires:void 0,domain:void 0,sameSite:void 0,secure:void 0,partitioned:!1}}))}function I({name:e=null,value:t=null}={}){return"string"==typeof e&&(e=decodeURIComponent(e)),"string"==typeof t&&(t=decodeURIComponent(t)),"string"==typeof e&&"string"==typeof t?j().filter((r=>r.name===e&&r.value===t)):"string"==typeof e?j().filter((t=>t.name===e)):"string"==typeof t?j().filter((e=>e.value===t)):j()}function C({name:e,value:t,expires:r=null,maxAge:n=null,path:o="/",sameSite:a="lax",domain:i=null,secure:s=!1,partitioned:l=!1}){if(Number.isInteger(n))C({name:e,value:t,expires:Date.now()+n,path:o,sameSite:a,domain:i,secure:s,partitioned:l});else{let n=`${encodeURIComponent(e)}=`;t&&(n+=encodeURIComponent(t)),Number.isInteger(r)?n+=`;expires=${new Date(r).toUTCString()}`:r instanceof Date&&(n+=`;expires=${r.toUTCString()}`),"string"==typeof o&&(n+=`;path=${o}`),"string"==typeof i&&(n+=`;domain=${i}`),"string"==typeof a&&(n+=`;sameSite=${a}`),!0===s&&(n+=";secure"),!0===l&&(n+=";partitioned"),document.cookie=n}}class R extends EventTarget{constructor(e){if(e!==N.constructor)throw new DOMException("Invalid constructor");super(),Object.defineProperty(this,N.onchange,{enumerable:!1,configurable:!1,writable:!0,value:null})}get onchange(){return this[N.onchange]}set onchange(e){this[N.onchange]instanceof Function&&this.removeEventListener("change",this[N.onchange]),e instanceof Function&&this.addEventListener("change",e)}async get(e){const t=await this.getAll(e);return Array.isArray(t)&&0!==t.length?t[0]:null}async getAll(e){return I("string"==typeof e?{name:e}:e)}async set(...e){if(1===e.length&&"object"==typeof e[0]&&"string"==typeof e[0].name){const t=function({name:e,value:t=null,domain:r=null,path:n="/",expires:o=null,maxAge:a=null,sameSite:i="lax",secure:s=!1,partitioned:l=!1}){return{name:e,value:t,domain:r,path:n,expires:o,maxAge:a,sameSite:i,secure:s,partitioned:l}}(e[0]);C(t);const r=new Event("change");r.changed=[t],r.deleted=[],this.dispatchEvent(r)}else{if(2!==e.length)throw new Error("Invalid arguments");this.set({name:e[0],value:e[1]})}}async delete(e={}){if("string"==typeof e)this.delete({name:e});else{if("object"!=typeof e||"string"!=typeof e.name)throw new TypeError("Failed to execute 'delete' on 'CookieStore': required member name is undefined.");{const t=await this.getAll(e);if(0!==t.length){const r=new Event("change");r.changed=[],r.deleted=new Array(t.length),t.forEach(((t,n)=>{t.path=e.path||"/",t.domain=e.domain||null,t.secure=e.secure||null,delete t.value,t.sameSite=e.sameSite||"lax",r.deleted[n]=t,C({...t,value:null,expires:1})})),this.dispatchEvent(r)}}}}}const D=new R(N.constructor);!F&&(globalThis.cookieStore=D),globalThis.hasOwnProperty("Animation")&&!Animation.prototype.hasOwnProperty("finished")&&Object.defineProperty(Animation.prototype,"finished",{get:function(){return new Promise(((e,t)=>{"finished"===this.playState?e(this):(this.addEventListener("finish",(()=>e(this)),{once:!0}),this.addEventListener("error",(e=>t(e)),{once:!0}))}))}}),globalThis.hasOwnProperty("Animation")&&!Animation.prototype.hasOwnProperty("ready")&&Object.defineProperty(Animation.prototype,"ready",{get:function(){return new Promise(((e,t)=>{this.pending?(this.addEventListener("ready",(()=>e(this)),{once:!0}),this.addEventListener("error",(e=>t(e)),{once:!0})):e(this)}))}});
25
- /**
26
- * @copyright 2023 Chris Zuber <admin@kernvalley.us>
27
- */
28
- const H=Object.keys(Object.getOwnPropertyDescriptors(HTMLElement.prototype)).filter((e=>e.startsWith("on"))),U=(z=async function(){const{ok:e,headers:t}=await fetch(location.href,{method:"HEAD"});if(e&&t.has("Content-Security-Policy")){const e=t.get("Content-Security-Policy").trim().split(";").filter((e=>0!==e.length));return Object.fromEntries(e.map((e=>{const[t,...r]=e.trim().split(" ").filter((e=>0!==e.length));return[t,r]})))}}).once instanceof Function?z.once(q):function(...e){if(s.has(z))return s.get(z);if(l(z)){const t=z.apply(q||this,e).catch((e=>{throw s.delete(z),e}));return s.set(z,t),t}if(z instanceof Function){const t=z.apply(q||this,e);return s.set(z,t),t}};var z,q;function B(){const e=document.head.querySelector('meta[http-equiv="Content-Security-Policy"][content]');if(e instanceof HTMLMetaElement){const t=e.content.trim().split(";").filter((e=>0!==e.length));return Object.fromEntries(t.map((e=>{const[t,...r]=e.trim().split(" ").filter((e=>0!==e.length));return[t,r]})))}return{}}
23
+ */;const F="cookieStore"in globalThis,P={constructor:Symbol("constructor")};function j(){return 0===document.cookie.length?[]:document.cookie.split(";").map((e=>{const[t,r=null]=e.split("=");return{name:decodeURIComponent(t.trim()),value:"string"==typeof r?decodeURIComponent(r.trim()):null,path:void 0,expires:void 0,domain:void 0,sameSite:void 0,secure:void 0,partitioned:!1}}))}function I({name:e=null,value:t=null}={}){return"string"==typeof e&&(e=decodeURIComponent(e)),"string"==typeof t&&(t=decodeURIComponent(t)),"string"==typeof e&&"string"==typeof t?j().filter((r=>r.name===e&&r.value===t)):"string"==typeof e?j().filter((t=>t.name===e)):"string"==typeof t?j().filter((e=>e.value===t)):j()}function N({name:e,value:t,expires:r=null,maxAge:n=null,path:o="/",sameSite:i="lax",domain:a=null,secure:s=!1,partitioned:l=!1}){if(Number.isInteger(n))N({name:e,value:t,expires:Date.now()+n,path:o,sameSite:i,domain:a,secure:s,partitioned:l});else{let n=`${encodeURIComponent(e)}=`;t&&(n+=encodeURIComponent(t)),Number.isInteger(r)?n+=`;expires=${new Date(r).toUTCString()}`:r instanceof Date&&(n+=`;expires=${r.toUTCString()}`),"string"==typeof o&&(n+=`;path=${o}`),"string"==typeof a&&(n+=`;domain=${a}`),"string"==typeof i&&(n+=`;sameSite=${i}`),!0===s&&(n+=";secure"),!0===l&&(n+=";partitioned"),document.cookie=n}}class C extends EventTarget{constructor(e){if(e!==P.constructor)throw new DOMException("Invalid constructor");super(),Object.defineProperty(this,P.onchange,{enumerable:!1,configurable:!1,writable:!0,value:null})}get onchange(){return this[P.onchange]}set onchange(e){this[P.onchange]instanceof Function&&this.removeEventListener("change",this[P.onchange]),e instanceof Function&&this.addEventListener("change",e)}async get(e){const t=await this.getAll(e);return Array.isArray(t)&&0!==t.length?t[0]:null}async getAll(e){return I("string"==typeof e?{name:e}:e)}async set(...e){if(1===e.length&&"object"==typeof e[0]&&"string"==typeof e[0].name){const t=function({name:e,value:t=null,domain:r=null,path:n="/",expires:o=null,maxAge:i=null,sameSite:a="lax",secure:s=!1,partitioned:l=!1}){return{name:e,value:t,domain:r,path:n,expires:o,maxAge:i,sameSite:a,secure:s,partitioned:l}}(e[0]);N(t);const r=new Event("change");r.changed=[t],r.deleted=[],this.dispatchEvent(r)}else{if(2!==e.length)throw new Error("Invalid arguments");this.set({name:e[0],value:e[1]})}}async delete(e={}){if("string"==typeof e)this.delete({name:e});else{if("object"!=typeof e||"string"!=typeof e.name)throw new TypeError("Failed to execute 'delete' on 'CookieStore': required member name is undefined.");{const t=await this.getAll(e);if(0!==t.length){const r=new Event("change");r.changed=[],r.deleted=new Array(t.length),t.forEach(((t,n)=>{t.path=e.path||"/",t.domain=e.domain||null,t.secure=e.secure||null,delete t.value,t.sameSite=e.sameSite||"lax",r.deleted[n]=t,N({...t,value:null,expires:1})})),this.dispatchEvent(r)}}}}}const R=new C(P.constructor);if(!F&&(globalThis.cookieStore=R),globalThis.hasOwnProperty("Animation")&&!Animation.prototype.hasOwnProperty("finished")&&Object.defineProperty(Animation.prototype,"finished",{get:function(){return new Promise(((e,t)=>{"finished"===this.playState?e(this):(this.addEventListener("finish",(()=>e(this)),{once:!0}),this.addEventListener("error",(e=>t(e)),{once:!0}))}))}}),globalThis.hasOwnProperty("Animation")&&!Animation.prototype.hasOwnProperty("ready")&&Object.defineProperty(Animation.prototype,"ready",{get:function(){return new Promise(((e,t)=>{this.pending?(this.addEventListener("ready",(()=>e(this)),{once:!0}),this.addEventListener("error",(e=>t(e)),{once:!0})):e(this)}))}}),"HTMLElement"in globalThis&&!("trustedTypes"in globalThis)){const ue={key:Symbol("trust:key")},pe=new Set(Object.keys(HTMLElement.prototype).filter((e=>e.startsWith("on")))),de=()=>{const e=document.head.querySelector('meta[http-equiv="Content-Security-Policy"][content]');if(e instanceof HTMLMetaElement){const t=e.content.trim().split(";").filter((e=>0!==e.length)).map((e=>e.trim())),r=Object.fromEntries(t.map((e=>{const[t,...r]=e.trim().split(" ").filter((e=>0!==e.length));return[t,r]}))),n=Array.isArray(r["require-trusted-types-for"])&&r["require-trusted-types-for"].includes("'script'"),o=n&&Array.isArray(r["trusted-types"])?new Set(r["trusted-types"]):new Set,i=o.has("'allow-duplicates'");return o.has("'none'")?o.clear():i&&o.delete("'allow-duplicates'"),{enforced:n,allowedPolicies:o,allowDuplicates:i}}if(document.documentElement.dataset.hasOwnProperty("trustedPolicies")){const e=new Set(document.documentElement.dataset.trustedPolicies.split(" ")),t=e.has("'allow-duplicates'"),r=e.has("'none'");return t&&e.delete("'allow-duplicates'"),r&&e.clear(),{enforced:!0,allowedPolicies:e,allowDuplicates:t}}return{enforced:!1,allowedPolicies:new Set,allowDuplicates:!0}};class fe{#e;#t;#r;#n;constructor({enforced:e,allowedPolicies:t,allowDuplicates:r}={},n){if(n!==ue.key)throw new TypeError("Invalid constructor of TrustedTypePolicyFactory.");if(!(t instanceof Set))throw new TypeError("`allowedPolicies` must be a Set.");this.#t=t,this.#r=e,this.#n=r,this.#e=new Map}get defaultPolicy(){return this.#e.has("default")?this.#e.get("default"):null}createPolicy(e,{createHTML:t,createScript:r,createScriptURL:n}){if(/^[-#a-zA-Z0-9=_/@.%]+$/.test(e.toString())){if(this.#r&&!this.#t.has(e))throw new TypeError(`${e} is not an allowed policy.`);if(!this.#n&&this.#e.has(e))throw new TypeError(`${e} has already been created and duplicates are not allowed.`);{const o=new he(e.toString(),{createHTML:t,createScript:r,createScriptURL:n},ue.key);return this.#e.set(o.name,o),o}}throw new TypeError(`Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy: "${e}" contains invalid characters.`)}getAttributeType(e,t,r){if(e=e.toLowerCase(),t=t.toLowerCase(),"string"==typeof elementNS&&0!==r.length)return pe.has(t)?"TrustedScript":null;if(pe.has(t))return"TrustedScript";switch(e){case"script":return"src"===t?"TrustedScriptURL":null;case"iframe":return"srcdoc"===t?"TrustedHTML":"src"===t?"TrustedScriptURL":null;default:return null}}getPropertyType(e,t){if(e=e.toLowerCase(),pe.has(t.toLowerCase()))return"TrustedScript";switch(e){case"embed":case"iframe":return"src"===t?"TrustedScriptURL":null;case"script":return"src"===t?"TrustedScriptURL":["text","innerText","textContent","innerHTML"].includes(t)?"TrustedScript":["outerHTML"].includes(t)?"TrustedHTML":null;default:return["innerHTML","outerHTML"].includes(t)?"TrustedHTML":null}}isHTML(e){return e instanceof globalThis.TrustedHTML}isScript(e){return e instanceof globalThis.TrustedScript}isScriptURL(e){return e instanceof globalThis.TrustedScriptURL}get emptyHTML(){return new ge("",ue.key)}get emptyScript(){return new ye("",ue.key)}get[Symbol.for("polyfilled")](){return!0}get[Symbol.for("enforced")](){return this.#r}}class he{#o;#i;#a;#s;#e;constructor(e,{createHTML:t,createScript:r,createScriptURL:n},o){if(o!==ue.key)throw new Error(`Invalid construction of ${e} policy.`);this.#o=e,this.#i=t,this.#a=r,this.#s=n}get name(){return this.#o}createHTML(e,...t){if(this.#i instanceof Function)return new ge(this.#i(e.toString(),...t).toString(),ue.key);throw new TypeError("This policy does not provide `createHTML()`")}createScript(e,...t){if(this.#a instanceof Function)return new ye(this.#a(e.toString(),...t).toString(),ue.key);throw new TypeError("This policy does not provide `createScript()`")}createScriptURL(e,...t){if(this.#s instanceof Function)return new be(this.#s(e.toString(),...t).toString(),ue.key);throw new TypeError("This policy does not provide `createScriptURL()`")}}class me{#l;constructor(e,t){if(t!==ue.key)throw new Error("Invalid constructor of TrustedType.");this.#l=e}toString(){return this.#l}toJSON(){return this.#l}}class ge extends me{}class ye extends me{}class be extends me{}globalThis.TrustedTypePolicyFactory=fe,globalThis.trustedTypes=new fe(de(),ue.key),globalThis.TrustedHTML=ge,globalThis.TrustedScript=ye,globalThis.TrustedScriptURL=be}
29
24
  /**
30
- * @copyright 2023 Chris Zuber <admin@kernvalley.us>
31
- */const $="1"===document.documentElement.dataset.fetchTrustCsp;function _({"trusted-types":e=null}={}){if(Array.isArray(e)){const t=new Set(e),r=t.has("'allow-duplicates'"),n=t.has("'none'");return r&&t.delete("'allow-duplicates'"),n&&t.clear(),t.add("empty#html"),t.add("empty#script"),{policies:t,allowDuplicates:r,hasNone:n}}return{}}const{allowDuplicates:V,allowedPolicies:W}=function(){const e=_(B());if("object"==typeof e&&e.policies instanceof Set){const{policies:t,allowDuplicates:r}=e;return{allowDuplicates:r,allowedPolicies:t}}{const e=(()=>{const e=_(B());return"object"==typeof e&&"allowDuplicates"in e?e.allowDuplicates:"1"===document.documentElement.dataset.allowTrustDuplicates})(),t=(()=>{if(document.documentElement.dataset.hasOwnProperty("trustedPolicies"))return new Set(["empty#html","empty#script",...document.documentElement.dataset.trustedPolicies.split(" ")]);{const{policies:e}=_(B());return e instanceof Set?e:new Set(["empty#html","empty#script"])}})();return t.has("'none'")&&t.clear(),t.add("empty#html"),t.add("empty#script"),{allowDuplicates:e,allowedPolicies:t}}}();"trustedTypes"in globalThis&&trustedTypes instanceof EventTarget&&trustedTypes.createPolicy;const G={trustedValue:Symbol("[[Data]]"),trustedKey:Symbol("trusted-key"),emptyHTML:Symbol("policy-empty#html"),emptyScript:Symbol("policy-empty#script"),policy:Symbol.for("trust-policy"),defaultPolicy:Symbol("default-policy"),trustedTypesCSP:Symbol("trusted-types-csp")};Symbol.hasOwnProperty("toStringTag")||(Symbol.toStringTag=Symbol("Symbol.toStringTag"));const K=[];function Q(e){return null!==function(e){return K.find((t=>t.name===e))||null}(e)}function X(e,t){return function(){throw new TypeError(`Failed to execute '${t}' on 'TrustedTypePolicy': Policy ${e.name}'s TrustedTypePolicyOptions did not specify a '${t}' member.`)}}class J{constructor(e,{key:t,policy:r}){if(t!==G.trustedKey)throw new TypeError("Invalid constructor");Object.defineProperties(this,{[G.trustedValue]:{enumerable:!1,configurable:!1,writable:!1,value:e.toString()},[G.policy]:{enumerable:!1,configurable:!1,writable:!1,value:r.name}}),Object.freeze(this)}toString(){return this.valueOf()}toJSON(){return this.valueOf()}valueOf(){return this[G.trustedValue]}}class Y extends J{[Symbol.toStringTag](){return"TrustedHTML"}}class Z extends J{[Symbol.toStringTag](){return"TrustedScript"}}class ee extends J{[Symbol.toStringTag](){return"TrustedScriptURL"}}class te{constructor(e,{createHTML:t,createScript:r,createScriptURL:n}={},{key:o}){if(o!==G.trustedKey)throw new TypeError("Invalid constructor");Object.defineProperties(this,{name:{enumerable:!0,configurable:!1,writable:!1,value:e.toString()},createHTML:{enumerable:!0,configurable:!1,writable:!1,value:t instanceof Function?(e,...r)=>new Y(t(e.toString(),...r),{key:G.trustedKey,policy:this}):X(this,"createHTML")},createScript:{enumerable:!0,configurable:!1,writable:!1,value:r instanceof Function?(e,...t)=>new Z(r(e.toString(),...t),{key:G.trustedKey,policy:this}):X(this,"createScript")},createScriptURL:{enumerable:!0,configurable:!1,writable:!1,value:n instanceof Function?(e,...t)=>new ee(n(e.toString(),...t),{key:G.trustedKey,policy:this}):X(this,"createScriptURL")}})}}class re extends EventTarget{constructor(e){if(super(),e!==G.trustedKey)throw new TypeError("Invalid constructor");$&&async function(){const{policies:e,allowDuplicates:t=!1,hasNone:r=!1}=await U().then(_);return e instanceof Set?{policies:e,allowDuplicates:t,hasNone:r}:{}}().then((({policies:e,allowDuplicates:t=!1,hasNone:r=!1})=>{void 0!==e&&Object.defineProperty(re,G.trustedTypesCSP,{value:{policies:e,allowDuplicates:t,hasNone:r},enumberable:!1,writable:!1,configurable:!1})})).catch((e=>console.error(e))),Object.defineProperties(this,{[G.defaultPolicy]:{enumerable:!1,configurable:!1,writable:!0,value:null},[G.emptyHTML]:{enumerable:!1,configurable:!1,writable:!1,value:this.createPolicy("empty#html",{createHTML:()=>""})},[G.emptyScript]:{enumerable:!1,configurable:!1,writable:!1,value:this.createPolicy("empty#script",{createScript:()=>""})}})}isHTML(e){return e instanceof globalThis.TrustedHTML}isScript(e){return e instanceof globalThis.TrustedScript}isScriptURL(e){return e instanceof globalThis.TrustedScriptURL}createPolicy(e,{createHTML:t,createScript:r,createScriptURL:n}={}){const o=new te(e,{createHTML:t,createScript:r,createScriptURL:n},{key:G.trustedKey});if(!e.toString().match(/^[-#a-zA-Z0-9=_/@.%]+$/g))throw new TypeError(`Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy: "${e}" contains invalid characters.`);if(re.hasOwnProperty(G.trustedTypesCSP)){const{policies:t,allowDuplicates:r,hasNone:n}=re[G.trustedTypesCSP];if(n&&"empty#html"!==e&&"empty#script"!==e)throw new TypeError(`Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy: "${e}" disallowed.`);if(!t.has(e))throw new TypeError(`Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy: "${e}" disallowed.`);if(!r&&Q(e))throw new TypeError(`Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy: "${e}" already exists.`)}else{if(W.size>2&&!W.has(e))throw new TypeError(`Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy: "${e}" disallowed.`);if(!V&&Q(e))throw new TypeError(`Failed to execute 'createPolicy' on 'TrustedTypePolicyFactory': Policy: "${e}" already exists.`)}return"default"===o.name&&(this[G.defaultPolicy]=o),K.push(o),o}getAttributeType(e,t,r){if(e=e.toLowerCase(),t=t.toLowerCase(),"string"==typeof elementNS&&0!==r.length)return H.includes(t)?"TrustedScript":null;if(H.includes(t))return"TrustedScript";switch(e){case"script":return"src"===t?"TrustedScriptURL":null;case"iframe":return"srcdoc"===t?"TrustedHTML":"src"===t?"TrustedScriptURL":null;default:return null}}getPropertyType(e,t){if(e=e.toLowerCase(),H.includes(t.toLowerCase()))return"TrustedScript";switch(e){case"embed":case"iframe":return"src"===t?"TrustedScriptURL":null;case"script":return"src"===t?"TrustedScriptURL":["text","innerText","textContent","innerHTML"].includes(t)?"TrustedScript":["outerHTML"].includes(t)?"TrustedHTML":null;default:return["innerHTML","outerHTML"].includes(t)?"TrustedHTML":null}}get emptyHTML(){return this[G.emptyHTML].createHTML("")}get emptyScript(){return this[G.emptyScript].createScript("")}get defaultPolicy(){return this[G.defaultPolicy]}get _isPolyfill_(){return!0}static get allowDuplicates(){return V}}const ne=new re(G.trustedKey);!function(){if("TrustedTypePolicyFactory"in globalThis||(globalThis.TrustedTypePolicyFactory=re),"TrustedTypePolicy"in globalThis||(globalThis.TrustedTypePolicy=te),"TrustedType"in globalThis||(globalThis.TrustedType=J),"TrustedHTML"in globalThis||(globalThis.TrustedHTML=Y),"TrustedScript"in globalThis||(globalThis.TrustedScript=Z),"TrustedScriptURL"in globalThis||(globalThis.TrustedScriptURL=ee),"trustedTypes"in globalThis)try{globalThis.trustedTypes.createPolicy("empty#html",{createHTML:()=>""}),globalThis.trustedTypes.createPolicy("empty#script",{createScript:()=>""})}catch(e){console.error(e)}else globalThis.trustedTypes=ne}();const oe={get(){return Array.from(this.styleSheets).filter((e=>e.ownerNode.classList.contains("_adopted")))},set(e){if(!Array.isArray(e))throw new TypeError("Must be an array");{const t=new Set(this.adoptedStyleSheets);t.difference(e).forEach((e=>e.ownerNode.remove()));const r=[...new Set(e).difference(t)].map((e=>{const t=document.createElement("link"),r=new AbortController,n=r.signal,o=URL.createObjectURL(new File([],"adopted.css",{type:"text/css"}));return t.rel="stylesheet",t.href=o,t.classList.add("_adopted"),t.disabled=e.disabled,t.addEventListener("load",(({target:n})=>{r.abort(),t.media=e.media.mediaText,[...e.cssRules].forEach(((e,t)=>{n.sheet.insertRule(e.cssText,t)})),setTimeout((()=>URL.revokeObjectURL(n.href)),100)}),{once:!0,signal:n}),t.addEventListener("error",(({target:e})=>{r.abort(),URL.revokeObjectURL(e.href)}),{once:!0,signal:n}),t}));this instanceof Document?this.head.append(...r):this.append(...r)}}};function ae(e){for(;e.cssRules.length>0;)e.deleteRule(0)}r(Document.prototype,"adoptedStyleSheets",oe),"ShadowRoot"in globalThis&&r(ShadowRoot.prototype,"adoptedStyleSheets",oe);try{new CSSStyleSheet}catch{const Ge=globalThis.CSSStyleSheet;globalThis.CSSStyleSheet=function({disabled:e=!1,media:t}={}){const r=function(e="",{disabled:t=!1,media:r}={}){const n=Document.parseHTML(`<style>${e}</style>`,{sanitizer:new Sanitizer({allowElements:["style","html","head","body"]})}).styleSheets.item(0);return"string"==typeof r&&n.media.appendMedium(r),n.disabled=t,n}("#dfgbkjdfg{color:red;}",{disabled:e,media:t});return r.deleteRule(0),r},globalThis.CSSStyleSheet.prototype=Ge.prototype,Ge.prototype.constructor=globalThis.CSSStyleSheet}CSSStyleSheet.prototype.replace instanceof Function||(CSSStyleSheet.prototype.replace=function(e){const t=document.createElement("link"),r=new AbortController,{resolve:n,reject:o,promise:a}=Promise.withResolvers();return t.addEventListener("load",(({target:e})=>{ae(this),[...e.sheet.cssRules].forEach(((e,t)=>this.insertRule(e.cssText,t))),n(this),r.abort(),URL.revokeObjectURL(e.href),e.remove()}),{once:!0,signal:r.signal}),t.addEventListener("error",(({target:e})=>{const t=new DOMException("Error loading stylesheet.");o(t),r.abort(t),URL.revokeObjectURL(e.href),e.remove()}),{once:!0,signal:r.signal}),t.rel="stylesheet",t.crossOrigin="anonymous",t.referrerPolicy="no-referrer",t.media="no-op",t.href=URL.createObjectURL(new File([e],"tmp.css",{type:"text/css"})),document.head.append(t),a}),CSSStyleSheet.prototype.replaceSync instanceof Function||(CSSStyleSheet.prototype.replaceSync=function(e){const t=Document.parseHTML(`<style>${e}</style>`,{sanitizer:new Sanitizer({allowElements:["style","html","head","body"]})}).styleSheets.item(0);ae(this),[...t.cssRules].forEach(((e,t)=>this.insertRule(e.cssText,t)))});const ie={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},se="http://www.w3.org/1999/xhtml",le=new Set(("HTMLElement"in globalThis?Object.keys(HTMLElement.prototype):[]).filter((e=>e.startsWith("on"))));
25
+ * @copyright 2023-2024 Chris Zuber <admin@kernvalley.us>
26
+ */("HTMLElement"in globalThis&&!("trustedTypes"in globalThis)||"HTMLElement"in globalThis&&globalThis.trustedTypes[Symbol.for("polyfilled")]&&globalThis.trustedTypes[Symbol.for("enforced")])&&function(){function e(){return"trustedTypes"in globalThis}function t(){return e()&&!Object.is(trustedTypes.defaultPolicy,null)}function r(r){if(function(t){return e()&&trustedTypes.isHTML(t)}(r)||!e())return r;if(t())return trustedTypes.defaultPolicy.createHTML(r);throw new TypeError("Attempting to set HTML and no default policy is available.")}function n(r){if(function(t){return e()&&trustedTypes.isScript(t)}(r)||!e())return r;if(t())return trustedTypes.defaultPolicy.createScript(r);throw new TypeError("Attempting to create script and no default policy is available.")}function o(r){if(function(t){return e()&&trustedTypes.isScriptURL(t)}(r)||!e())return r;if(t())return trustedTypes.defaultPolicy.createScriptURL(r);throw new TypeError("Attempting to create script URL and no default policy is available.")}function i(t,r,n){return e()?trustedTypes.getAttributeType(t,r,n):null}try{const{write:e,writeln:t,execCommand:n}=Object.getOwnPropertyDescriptors(Document.prototype);Object.defineProperties(Document.prototype,{write:{value:function(t){e.value.call(this,r(t))},enumerable:e.enumerable,configurable:e.configurable,writable:e.writable},writeln:{value:function(e){t.value.call(this,r(e))},enumerable:t.enumerable,configurable:t.configurable,writable:t.writable},execCommand:{value:function(e,t,o){return["insertHTML"].includes(e)?n.value.call(this,e,t,r(o)):n.value.call(this,e,t,o)},enumerable:n.enumerable,configurable:n.configurable}})}catch(e){console.error(e)}if("ServiceWorkerContainer"in globalThis)try{const e=Object.getOwnPropertyDescriptor(ServiceWorkerContainer.prototype,"register");Object.defineProperty(ServiceWorkerContainer.prototype,"register",{value:function(t,r){return e.value.call(this,o(t),r)},enumerable:e.enumerable,configurable:e.configurable})}catch(e){console.error(e)}try{const e=Object.getOwnPropertyDescriptor(Range.prototype,"createContextualFragment");Object.defineProperty(Range.prototype,"createContextualFragment",{value:function(t){return e.value.call(this,r(t))},enumerable:e.enumerable,configurable:e.configurable})}catch(e){console.error(e)}try{const{parseFromString:e}=Object.getOwnPropertyDescriptors(DOMParser.prototype);Object.defineProperties(DOMParser.prototype,{parseFromString:{value:function(t,n){return"text/html"===n?e.value.call(this,r(t),n):e.value.call(this,t,n)},enumerable:e.enumerable,configurable:e.configurable,writable:e.writable}})}catch(e){console.error(e)}try{const{src:e,text:t}=Object.getOwnPropertyDescriptors(HTMLScriptElement.prototype);Object.defineProperties(HTMLScriptElement.prototype,{text:{get:function(){return t.get.call(this)},set:function(e){t.set.call(this,n(e))},enumerable:t.enumerable,configurable:t.configurable},src:{get:function(){return e.get.call(this)},set:function(t){e.set.call(this,o(t))},enumerable:e.enumerable,configurable:e.configurable}})}catch(e){console.error(e)}try{const{setAttribute:e,setAttributeNS:t,innerHTML:a,outerHTML:s,insertAdjacentHTML:l}=Object.getOwnPropertyDescriptors(Element.prototype);Object.defineProperties(Element.prototype,{setAttribute:{value:function(t,a){switch(i(this.tagName,t)){case"TrustedHTML":e.value.call(this,t,r(a));break;case"TrustedScript":e.value.call(this,t,n(a));break;case"TrustedScriptURL":e.value.call(this,t,o(a));break;default:e.value.call(this,t,a)}},enumerable:e.enumerable,configurable:e.configurable},setAttributeNS:{value:function(e,a,s){switch(i(this.tagName,a,e)){case"TrustedHTML":t.value.call(this,e,a,r(s));break;case"TrustedScript":t.value.call(this,e,a,n(s));break;case"TrustedScriptURL":t.value.call(this,e,a,o(s));break;default:t.value.call(this,e,a,s)}},enumerable:t.enumerable,configurable:t.configurable},innerHTML:{get:function(){return a.get.call(this)},set:function(e){a.set.call(this,r(e))},enumerable:a.enumerable,configurable:a.configurable},outerHTML:{get:function(){return s.get.call(this)},set:function(e){s.set.call(this,r(e))},enumerable:s.enumerable,configurable:s.configurable},insertAdjacentHTML:{value:function(e,t){l.value.call(this,e,r(t))},enumerable:l.enumerable,configurable:l.configurable}})}catch(e){console.error(e)}try{const{srcdoc:e,src:t}=Object.getOwnPropertyDescriptors(HTMLIFrameElement.prototype);Object.defineProperties(HTMLIFrameElement.prototype,{srcdoc:{get:function(){return e.get.call(this)},set:function(t){e.set.call(this,r(t))},enumerable:e.enumerable,configurable:e.configurable},src:{get:function(){return t.get.call(this)},set:function(e){t.set.call(this,o(e))},enumerable:t.enumerable,configurable:t.configurable}})}catch(e){console.error(e)}try{const{data:e,codeBase:t}=Object.getOwnPropertyDescriptors(HTMLObjectElement.prototype);Object.defineProperties(HTMLObjectElement.prototype,{data:{get:function(){return e.get.call(this)},set:function(t){e.set.call(this,o(t))},enumerable:e.enumerable,configurable:e.configurable},codeBase:{get:function(){return t.get.call(this)},set:function(e){t.set.call(this,o(e))},enumerable:t.enumerable,configurable:t.configurable}})}catch(e){console.error(e)}try{const{eval:e,setTimeout:t,setInterval:r}=globalThis;globalThis.eval=function(t){return e(n(t).toString())},globalThis.setTimeout=function(e,r,...o){return"string"==typeof e?t(n(e),r,...o):t(e,r,...o)},globalThis.setInterval=function(e,t,...o){return"string"==typeof e?r(n(e),t,...o):r(e,t,...o)};try{const e=globalThis.Function;globalThis.Function=function(...t){if(0===t.length)return e();{const r=n(t.pop());return e(...t,r.toString())}},globalThis.Function.prototype=e.prototype,e.prototype.constructor=globalThis.Function}catch(e){console.error(e)}}catch(e){console.error(e)}}();const H={get(){return Array.from(this.styleSheets).filter((e=>e.ownerNode.classList.contains("_adopted")))},set(e){if(!Array.isArray(e))throw new TypeError("Must be an array");{const t=new Set(this.adoptedStyleSheets);t.difference(e).forEach((e=>e.ownerNode.remove()));const r=[...new Set(e).difference(t)].map((e=>{const t=document.createElement("link"),r=new AbortController,n=r.signal,o=URL.createObjectURL(new File([],"adopted.css",{type:"text/css"}));return t.rel="stylesheet",t.href=o,t.classList.add("_adopted"),t.disabled=e.disabled,t.addEventListener("load",(({target:n})=>{r.abort(),t.media=e.media.mediaText,[...e.cssRules].forEach(((e,t)=>{n.sheet.insertRule(e.cssText,t)})),setTimeout((()=>URL.revokeObjectURL(n.href)),100)}),{once:!0,signal:n}),t.addEventListener("error",(({target:e})=>{r.abort(),URL.revokeObjectURL(e.href)}),{once:!0,signal:n}),t}));this instanceof Document?this.head.append(...r):this.append(...r)}}};function D(e){for(;e.cssRules.length>0;)e.deleteRule(0)}r(Document.prototype,"adoptedStyleSheets",H),"ShadowRoot"in globalThis&&r(ShadowRoot.prototype,"adoptedStyleSheets",H);try{new CSSStyleSheet}catch{const we=globalThis.CSSStyleSheet;globalThis.CSSStyleSheet=function({disabled:e=!1,media:t}={}){const r=function(e="",{disabled:t=!1,media:r}={}){const n=Document.parseHTML(`<style>${e}</style>`,{sanitizer:new Sanitizer({allowElements:["style","html","head","body"]})}).styleSheets.item(0);return"string"==typeof r&&n.media.appendMedium(r),n.disabled=t,n}("#dfgbkjdfg{color:red;}",{disabled:e,media:t});return r.deleteRule(0),r},globalThis.CSSStyleSheet.prototype=we.prototype,we.prototype.constructor=globalThis.CSSStyleSheet}CSSStyleSheet.prototype.replace instanceof Function||(CSSStyleSheet.prototype.replace=function(e){const t=document.createElement("link"),r=new AbortController,{resolve:n,reject:o,promise:i}=Promise.withResolvers();return t.addEventListener("load",(({target:e})=>{D(this),[...e.sheet.cssRules].forEach(((e,t)=>this.insertRule(e.cssText,t))),n(this),r.abort(),URL.revokeObjectURL(e.href),e.remove()}),{once:!0,signal:r.signal}),t.addEventListener("error",(({target:e})=>{const t=new DOMException("Error loading stylesheet.");o(t),r.abort(t),URL.revokeObjectURL(e.href),e.remove()}),{once:!0,signal:r.signal}),t.rel="stylesheet",t.crossOrigin="anonymous",t.referrerPolicy="no-referrer",t.media="no-op",t.href=URL.createObjectURL(new File([e],"tmp.css",{type:"text/css"})),document.head.append(t),i}),CSSStyleSheet.prototype.replaceSync instanceof Function||(CSSStyleSheet.prototype.replaceSync=function(e){const t=Document.parseHTML(`<style>${e}</style>`,{sanitizer:new Sanitizer({allowElements:["style","html","head","body"]})}).styleSheets.item(0);D(this),[...t.cssRules].forEach(((e,t)=>this.insertRule(e.cssText,t)))});const U={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},q="http://www.w3.org/1999/xhtml";
32
27
  /**
33
28
  * @copyright 2023 Chris Zuber <admin@kernvalley.us>
34
- */function ce(e,t=se){if("string"==typeof e)return Object.freeze({name:e,namespace:t});if("object"==typeof e&&"string"==typeof e.name){const{name:r,namespace:n=t,attributes:o}=e;return Object.freeze({name:r,namespace:"string"==typeof n&&0!==n.length?n:t,attributes:o})}throw new TypeError("Invalid config entry for `elements`.")}function ue({elements:e,allowElements:t},r=se){if(Array.isArray(t))return console.warn("Use of `allowElements` is deprecated. Please use `elements` instead."),ue({elements:t},r);if(Array.isArray(e))return e.map((e=>ce(e,r)));throw new TypeError("`elements` expected to be an array.")}function pe(e,t=""){if("string"==typeof e)return Object.freeze({name:e,namespace:t});if("object"==typeof e&&"string"==typeof e.name){const{name:r,namespace:n=t,elements:o}=e;return Object.freeze({name:r,namespace:"string"==typeof n?n:t,elements:o})}throw new TypeError("Invalid entry in `attributes` config.")}function de({attributes:e,allowAttributes:t},r=""){if(void 0!==t)return console.warn("Use of `allowAttributes` is deprecated. Please use `attributes` instead."),de({attributes:t},r);if(Array.isArray(e))return e.map((e=>pe(e,r)));if("object"==typeof e&&null!==e)return console.warn("`attributes` should be an array, not an oobject."),de({attributes:Object.entries(e).map((([e,t])=>({name:e,elements:t})))},r);throw new TypeError("`attributes` expected to be an array.")}function fe({comments:e,allowComments:t}){return"boolean"==typeof e?e:"boolean"==typeof t&&(console.warn("Use of `allowComments` is deprecated. Please use `comments` instead."),t)}function me({attributes:e,allowAttributes:t},r){return Object.freeze(Object.groupBy(de({attributes:e,allowAttributes:t},r),(({namespace:e})=>e)))}function he({elements:e,allowElements:t},r=se){return Object.freeze(Object.groupBy(ue({elements:e,allowElements:t},r),(({namespace:e})=>e)))}const ye=Object.freeze(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","exportparts","hidden","id","inert","inputmode","itemid","itemprop","itemref","itemscope","itemtype","lang","part","popover","slot","spellcheck","tabindex","title","translate","virtualkeyboardpolicy","aria-keyshortcuts","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"].map((e=>pe(e,"")))),ge=!1,be=Object.freeze(["html","head","link","meta","body","address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","search","blockquote","cite","div","dd","dt","dl","figcaption","figure","hr","li","ol","ul","menu","p","pre","a","abbr","b","bdi","bdo","br","code","data","dfn","em","i","kbd","mark","q","rp","ruby","rt","s","del","ins","samp","small","span","strong","sub","sup","time","u","var","wbr","area","audio","img","map","track","video","picture","source","canvas","caption","col","colgroup","table","tbody","tr","td","tfoot","th","thead","button","datalist","option","fieldset","label","form","input","legend","meter","optgroup","select","output","progress","textarea","details","summary","dialog","slot","template","dir","strike","selectmenu","center"].map((e=>ce(e,se)))),we=Object.freeze(["abbr","accept","accept-charset","align","alink","allow","allowfullscreen","alt","anchor","archive","as","async","autocomplete","autocorrect","autopictureinpicture","autoplay","axis","background","behavior","border","bordercolor","capture","cellpadding","cellspacing","challenge","char","charoff","charset","checked","cite","classid","clear","code","codetype","color","cols","colspan","compact","content","controls","controlslist","conversiondestination","coords","crossorigin","csp","data","datetime","declare","decoding","default","defer","direction","dirname","disabled","disablepictureinpicture","disableremoteplayback","disallowdocumentaccess","download","elementtiming","enctype","end","for","form","formenctype","formmethod","formnovalidate","formtarget","frameborder","headers","height","high","href","hreflang","hreftranslate","hspace","imagesizes","imagesrcset","importance","impressiondata","impressionexpiry","incremental","integrity","invisible","invoketarget","invokeaction","is","ismap","keytype","kind","label","language","latencyhint","leftmargin","link","list","loading","longdesc","loop","low","lowsrc","manifest","marginheight","marginwidth","max","maxlength","mayscript","media","method","min","minlength","multiple","muted","name","nohref","nomodule","noresize","noshade","novalidate","nowrap","object","open","optimum","pattern","ping","placeholder","playsinline","policy","popovertarget","popovertargetaction","poster","preload","pseudo","readonly","referrerpolicy","rel","reportingorigin","required","resources","rev","reversed","role","rows","rowspan","rules","sandbox","scheme","scope","scopes","scrollamount","scrolldelay","scrolling","select","selected","shadowrootmode","shadowrootdelegatesfocus","shape","size","sizes","span","src","srcdoc","srclang","srcset","standby","start","step","summary","target","text","topmargin","truespeed","trusttoken","type","usemap","valign","value","valuetype","version","vlink","vspace","webkitdirectory","width","wrap"].map((e=>pe(e))).concat(ye)),ve=Object.freeze({allowCustomElements:!0,allowUnknownMarkup:!1,comments:ge,elements:be,attributes:we}),Te=new Set(["href","src","action"]),Se=new Set(["javascript:","about:","data:","file:","ftp:"]);
29
+ */function z(e,t=q){if("string"==typeof e)return Object.freeze({name:e,namespace:t});if("object"==typeof e&&"string"==typeof e.name){const{name:r,namespace:n=t,attributes:o}=e;return Object.freeze({name:r,namespace:"string"==typeof n&&0!==n.length?n:t,attributes:o})}throw new TypeError("Invalid config entry for `elements`.")}function B(e,t=""){if("string"==typeof e)return Object.freeze({name:e,namespace:t});if("object"==typeof e&&"string"==typeof e.name){const{name:r,namespace:n=t,elements:o}=e;return Object.freeze({name:r,namespace:"string"==typeof n?n:t,elements:o})}throw new TypeError("Invalid entry in `attributes` config.")}new Set(("HTMLElement"in globalThis?Object.keys(HTMLElement.prototype):[]).filter((e=>e.startsWith("on"))));const $=Object.freeze(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","exportparts","hidden","id","inert","inputmode","itemid","itemprop","itemref","itemscope","itemtype","lang","part","popover","slot","spellcheck","tabindex","title","translate","virtualkeyboardpolicy","aria-keyshortcuts","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-dropeffect","aria-errormessage","aria-expanded","aria-flowto","aria-grabbed","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"].map((e=>B(e,"")))),V=Object.freeze(["html","head","link","meta","body","address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","search","blockquote","cite","div","dd","dt","dl","figcaption","figure","hr","li","ol","ul","menu","p","pre","a","abbr","b","bdi","bdo","br","code","data","dfn","em","i","kbd","mark","q","rp","ruby","rt","s","del","ins","samp","small","span","strong","sub","sup","time","u","var","wbr","area","audio","img","map","track","video","picture","source","canvas","caption","col","colgroup","table","tbody","tr","td","tfoot","th","thead","button","datalist","option","fieldset","label","form","input","legend","meter","optgroup","select","output","progress","textarea","details","summary","dialog","slot","template","dir","strike","selectmenu","center"].map((e=>z(e,q)))),_=Object.freeze(["abbr","accept","accept-charset","align","alink","allow","allowfullscreen","alt","anchor","archive","as","async","autocomplete","autocorrect","autopictureinpicture","autoplay","axis","background","behavior","border","bordercolor","capture","cellpadding","cellspacing","challenge","char","charoff","charset","checked","cite","classid","clear","code","codetype","color","cols","colspan","compact","content","controls","controlslist","conversiondestination","coords","crossorigin","csp","data","datetime","declare","decoding","default","defer","direction","dirname","disabled","disablepictureinpicture","disableremoteplayback","disallowdocumentaccess","download","elementtiming","enctype","end","for","form","formenctype","formmethod","formnovalidate","formtarget","frameborder","headers","height","high","href","hreflang","hreftranslate","hspace","imagesizes","imagesrcset","importance","impressiondata","impressionexpiry","incremental","integrity","invisible","invoketarget","invokeaction","is","ismap","keytype","kind","label","language","latencyhint","leftmargin","link","list","loading","longdesc","loop","low","lowsrc","manifest","marginheight","marginwidth","max","maxlength","mayscript","media","method","min","minlength","multiple","muted","name","nohref","nomodule","noresize","noshade","novalidate","nowrap","object","open","optimum","pattern","ping","placeholder","playsinline","policy","popovertarget","popovertargetaction","poster","preload","pseudo","readonly","referrerpolicy","rel","reportingorigin","required","resources","rev","reversed","role","rows","rowspan","rules","sandbox","scheme","scope","scopes","scrollamount","scrolldelay","scrolling","select","selected","shadowrootmode","shadowrootdelegatesfocus","shape","size","sizes","span","src","srcdoc","srclang","srcset","standby","start","step","summary","target","text","topmargin","truespeed","trusttoken","type","usemap","valign","value","valuetype","version","vlink","vspace","webkitdirectory","width","wrap"].map((e=>B(e))).concat($)),W=Object.freeze(["a","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tspan","view","missing-glyph","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","hkern","vkern","glyph","glyphRef","tref","cursor"].map((e=>z(e,"http://www.w3.org/2000/svg")))),G=Object.freeze(["accent-height","accumulate","additive","alignment-baseline","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","class","clip","clipPathUnits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","crossorigin","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","fill","fill-opacity","fill-rule","filter","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fr","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","height","href","hreflang","horiz-adv-x","horiz-origin-x","id","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lang","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","max","media","method","min","mode","name","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","ping","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","referrerPolicy","refX","refY","rel","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","style","surfaceScale","systemLanguage","tabindex","tableValues","target","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","transform-origin","type","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","visibility","width","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","y","y1","y2","yChannelSelector","z","zoomAndPan","autoReverse","accelerate"].map((e=>B(e,""))).concat($)),Q=Object.freeze(["math","maction","annotation","annotation-xml","menclose","merror","mfenced","mfrac","mi","mmultiscripts","mn","mo","mover","mpadded","mphantom","mprescripts","mroot","mrow","ms","semantics","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"].map((e=>z(e,"http://www.w3.org/1998/Math/MathML")))),X=Object.freeze(["accent","accentunder","actiontype","align","background","close","color","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","fence","fontfamily","fontsize","fontstyle","fontweight","frame","framespacing","height","href","id","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","superscriptshift","symmetric","voffset","width","xmlns"].map((e=>B(e,""))).concat($));
35
30
  /**
36
31
  * @copyright 2023-2024 Chris Zuber <admin@kernvalley.us>
37
32
  * @see https://wicg.github.io/sanitizer-api/#default-configuration-dictionary
38
- */"https:"===location.protocol&&Se.add("http:");const Ee=function(e,{createHTML:t,createScript:r,createScriptURL:n}){return"trustedTypes"in globalThis?globalThis.trustedTypes.createPolicy(e,{createHTML:t,createScript:r,createScriptURL:n}):Object.freeze({[Symbol.for("policy-name")]:e,createHTML:t instanceof Function?(e,...r)=>t(e.toString(),...r).toString():null,createScript:r instanceof Function?(e,...t)=>r(e.toString(),...t).toString():null,createScriptURL:n instanceof Function?(e,...t)=>n(e.toString(),...t).toString():null})}("aegis-sanitizer#html",{createHTML:e=>e});function Ae(e,t=ve){if(e instanceof Node){const r=function(e,{elementNS:t=se,attributeNS:r=""}={}){if("object"!=typeof e||null===e)throw new TypeError("Sanitizer config must be an object.");if(e.getConfiguration instanceof Function){console.warn("`Sanitzer` objects are deprecated and will be removed.");const{allowElements:n,allowAttributes:o,allowComments:a}=e.getConfiguration();return Object.freeze({elements:he({elements:n},t),attributes:me({attributes:o},r),comments:a})}return Object.freeze({elements:he(e,t),attributes:me(e,r),comments:fe(e)})}(t);return Me(e,r)}throw new TypeError("Not a node.")}function xe(e,t){return e.name.startsWith("data-")||(e.namespaceURI??"")in t.attributes&&t.attributes[e.namespaceURI??""].some((t=>t.name===e.localName))&&!le.has(e.localName)&&!function(e){if(Te.has(e.localName)){if(URL.canParse(e.value)){const{protocol:t}=new URL(e.value);return Se.has(t)}return!1}return!1}(e)}function Me(e,t){switch(e.nodeType){case Node.ELEMENT_NODE:!function(e,t){!function(e,t){return e.namespaceURI in t.elements&&t.elements[e.namespaceURI].some((t=>t.name===e.localName))}(e,t)?e.remove():([...e.attributes].forEach((e=>Oe(e,t))),"TEMPLATE"===e.tagName?ke(e.content,t):e.hasChildNodes()&&e.childNodes.forEach((e=>Me(e,t))))}(e,t);break;case Node.DOCUMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:ke(e,t);break;case Node.COMMENT_NODE:!function(e,t){t.comments||e.remove()}(e,t);break;case Node.ATTRIBUTE_NODE:Oe(e,t);break;case Node.TEXT_NODE:case Node.DOCUMENT_TYPE_NODE:break;default:e.ownerElement instanceof Element&&e.ownerElement.removeChild(e)}}function Oe(e,t){!xe(e,t)&&e.ownerElement instanceof Element&&e.ownerElement.removeAttributeNode(e)}function ke(e,t){e.childNodes.forEach((e=>Me(e,t)))}URL.canParse instanceof Function||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch{return!1}}),Object.groupBy instanceof Function||(Object.groupBy=function(e,t){return Object.fromEntries(e.map((e=>[t(e),e])))}),Element.prototype.setHTML instanceof Function||(Element.prototype.setHTML=function(e,{sanitizer:{elements:t=be,attributes:r=we,comments:n=false}=ve}={}){!function(e,t,{sanitizer:r=ve}={}){const n=document.createElement("template");n.innerHTML=Ee.createHTML(t),Ae(n.content,r),e.replaceChildren(n.content)}(this,e,{sanitizer:{elements:t,attributes:r,comments:n}})}),Document.parseHTML instanceof Function||(Document.parseHTML=function(e,{sanitizer:{elements:t=be,attributes:r=we,comments:n=false}=ve}={}){return function(e,{sanitizer:t=ve}={}){const r=(new DOMParser).parseFromString(Ee.createHTML(e),"text/html");return Ae(r,t),r}(e,{sanitizer:{elements:t,attributes:r,comments:n}})});const Le=Object.freeze(["a","animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tspan","view","missing-glyph","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","hkern","vkern","glyph","glyphRef","tref","cursor"].map((e=>ce(e,"http://www.w3.org/2000/svg")))),Pe=Object.freeze(["accent-height","accumulate","additive","alignment-baseline","alphabetic","amplitude","arabic-form","ascent","attributeName","attributeType","azimuth","baseFrequency","baseline-shift","baseProfile","bbox","begin","bias","by","calcMode","cap-height","class","clip","clipPathUnits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","crossorigin","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominant-baseline","dur","dx","dy","edgeMode","elevation","enable-background","end","exponent","fill","fill-opacity","fill-rule","filter","filterUnits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","format","from","fr","fx","fy","g1","g2","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","glyphRef","gradientTransform","gradientUnits","hanging","height","href","hreflang","horiz-adv-x","horiz-origin-x","id","ideographic","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lang","lengthAdjust","letter-spacing","lighting-color","limitingConeAngle","local","marker-end","marker-mid","marker-start","markerHeight","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","max","media","method","min","mode","name","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overline-position","overline-thickness","panose-1","paint-order","path","pathLength","patternContentUnits","patternTransform","patternUnits","ping","pointer-events","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","referrerPolicy","refX","refY","rel","rendering-intent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","scale","seed","shape-rendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","string","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","style","surfaceScale","systemLanguage","tabindex","tableValues","target","targetX","targetY","text-anchor","text-decoration","text-rendering","textLength","to","transform","transform-origin","type","u1","u2","underline-position","underline-thickness","unicode","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","values","vector-effect","version","vert-adv-y","vert-origin-x","vert-origin-y","viewBox","visibility","width","widths","word-spacing","writing-mode","x","x-height","x1","x2","xChannelSelector","xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","y","y1","y2","yChannelSelector","z","zoomAndPan","autoReverse","accelerate"].map((e=>pe(e,""))).concat(ye)),Fe=Object.freeze(["math","maction","annotation","annotation-xml","menclose","merror","mfenced","mfrac","mi","mmultiscripts","mn","mo","mover","mpadded","mphantom","mprescripts","mroot","mrow","ms","semantics","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"].map((e=>ce(e,"http://www.w3.org/1998/Math/MathML")))),Ne=Object.freeze(["accent","accentunder","actiontype","align","background","close","color","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","fence","fontfamily","fontsize","fontstyle","fontweight","frame","framespacing","height","href","id","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","superscriptshift","symmetric","voffset","width","xmlns"].map((e=>pe(e,""))).concat(ye));function je({currentTarget:e}){switch(e.popoverTargetAction){case"show":e.popoverTargetElement.showPopover();break;case"hide":e.popoverTargetElement.hidePopover();break;default:e.popoverTargetElement.togglePopover()}}if(Object.freeze([...be,...Le]),Object.freeze(Array.from(new Set([...we,...Pe]))),Object.freeze([...be,...Le,...Fe]),Object.freeze(Array.from(new Set([...we,...Pe,...Ne]))),globalThis.ToggleEvent instanceof Function){class Ke extends Event{#e;#t;constructor(e,{newState:t,oldState:r}){super(e,{bubbles:!0}),this.#e=t,this.#t=r}get newState(){return this.#e}get oldState(){return this.#t}}globalThis.ToggleEvent=Ke}if(!(HTMLElement.prototype.showPopover instanceof Function)){const Qe=e=>e.classList.contains("_popover-open");Object.defineProperties(HTMLElement.prototype,{showPopover:{value:function(){if(!Qe(this)){if(this.dispatchEvent(new ToggleEvent("beforetoggle",{oldState:"closed",newState:"open"})),"auto"===this.getAttribute("popover")){const e=new AbortController;document.body.addEventListener("click",(({target:t})=>{this.contains(t)||this.isSameNode(t.popoverTargetElement)||(e.abort(),this.hidePopover())}),{signal:e.signal,capture:!0}),document.body.addEventListener("keydown",(({key:t})=>{"Escape"===t&&(e.abort(),this.hidePopover())}),{signal:e.signal,capture:!0}),document.addEventListener("beforetoggle",(({target:t})=>{t.isSameNode(this)||"auto"!==t.getAttribute("popover")||(e.abort(),this.hidePopover())}),{signal:e.signal})}this.classList.add("_popover-open"),this.dispatchEvent(new ToggleEvent("toggle",{oldState:"closed",newState:"open"}))}}},hidePopover:{value:function(){Qe(this)&&(this.dispatchEvent(new ToggleEvent("beforetoggle",{oldState:"open",newState:"closed"})),queueMicrotask((()=>this.classList.remove("_popover-open"))),this.dispatchEvent(new ToggleEvent("toggle",{oldState:"open",newState:"closed"})))}},togglePopover:{value:function(){Qe(this)?this.hidePopover():this.showPopover()}}}),Object.defineProperties(HTMLButtonElement.prototype,{popoverTargetElement:{get(){return document.getElementById(this.getAttribute("popovertarget"))}},popoverTargetAction:{get(){return this.getAttribute("popovertargetaction")||"toggle"},set(e){this.setAttribute("popovertargetaction",e)}}}),function(e=document.body){e.querySelectorAll('button[popovertarget], input[type="button"][popovertarget]').forEach((e=>e.addEventListener("click",je)))}()}if(HTMLScriptElement.supports instanceof Function||(HTMLScriptElement.supports=function(e){switch(e.toLowerCase()){case"classic":return!0;case"module":return"noModule"in HTMLScriptElement.prototype;default:return!1}}),!Element.prototype.hasOwnProperty(ie.role)){const Xe=!0,Je=!0,Ye=Object.fromEntries(Object.entries(ie).map((([e,t])=>[e,{get:function(){return this.getAttribute(t)},set:function(e){"string"==typeof e?this.setAttribute(t,e):this.removeAttribute(t)},enumerable:Xe,configurable:Je}])));Object.defineProperties(Element.prototype,Ye)}if(!HTMLElement.prototype.hasOwnProperty("inert")){const Ze=new WeakMap,et=e=>{Ze.has(e)&&(e.tabIndex=Ze.get(e)),e.hasChildNodes()&&[...e.children].forEach(et)},tt=e=>{-1!==e.tabIndex&&(Ze.set(e,e.tabIndex),e.tabIndex=-1),e.hasChildNodes()&&[...e.children].forEach(tt)};Object.defineProperty(HTMLElement.prototype,"inert",{get:function(){return this.hasAttribute("inert")},set:function(e){e?(this.setAttribute("aria-hidden","true"),this.setAttribute("inert",""),tt(this)):(this.removeAttribute("aria-hidden"),this.removeAttribute("inert"),et(this))},enumerable:!0,configurable:!0})}if(HTMLImageElement.prototype.hasOwnProperty("complete")||Object.defineProperty(HTMLImageElement.prototype,"complete",{get:function(){return""===this.src||this.naturalHeight>0}}),HTMLImageElement.prototype.decode instanceof Function||(HTMLImageElement.prototype.decode=function(){return this.complete?Promise.resolve():new Promise(((e,t)=>{const r=()=>{this.removeEventListener("error",n),this.removeEventListener("load",r),e()},n=e=>{this.removeEventListener("error",n),this.removeEventListener("load",r),t(e)};this.addEventListener("load",r),this.addEventListener("error",n)}))}),!HTMLTemplateElement.prototype.hasOwnProperty("shadowRootMode")){Object.defineProperty(HTMLTemplateElement.prototype,"shadowRootMode",{get:function(){return this.getAttribute("shadowrootmode")},set:function(e){this.setAttribute("shadowrootmode",e)},enumerable:!0,configurable:!0});const rt=(e=document)=>{e.querySelectorAll("template[shadowrootmode]").forEach((e=>{const t=e.parentElement.attachShadow({mode:e.shadowRootMode});t.append(e.content),e.remove(),rt(t)}))};"loading"===document.readyState?document.addEventListener("readystatechange",(()=>rt(document)),{once:!0}):rt(document)}HTMLFormElement.prototype.requestSubmit instanceof Function||(HTMLFormElement.prototype.requestSubmit=function(e){if(void 0===e){const e=document.createElement("button");e.type="submit",e.hidden=!0,this.append(e),this.requestSubmit(e),setTimeout((()=>e.remove()),100)}else{if(!(e instanceof HTMLButtonElement||e instanceof HTMLInputElement))throw new TypeError("HTMLFormElement.requestSubmit: The submitter is not a submit button.");if(!("submit"===e.type||e instanceof HTMLInputElement&&"image"===e.type))throw new TypeError("HTMLFormElement.requestSubmit: The submitter is not a submit button.");if(!this.isSameNode(e.form))throw new DOMException("HTMLFormElement.requestSubmit: The submitter is not owned by this form.","NotFoundError");e.click()}}),"loading"in HTMLIFrameElement.prototype||r(HTMLIFrameElement.prototype,"loading",{get:function(){return this.getAttribute("loading")||"auto"},set:function(e){this.setAttribute("loading",e)}}),"credentialless"in HTMLIFrameElement.prototype||r(HTMLIFrameElement.prototype,"credentialless",{get:function(){return this.hasAttribute("credentialless")},set:function(e){this.toggleAttribute("credentialless",e)}});const Ie="Expected a set-like object.",Ce=["has","keys"],Re=["size"],De=e=>e instanceof Set,He=e=>De(e)||"object"==typeof e&&null!==e&&Ce.every((t=>e[t]instanceof Function))&&Re.every((t=>t in e));Set.prototype.intersection instanceof Function||(Set.prototype.intersection=function(e){if(!He(e))throw new TypeError(Ie);return new Set([...this].filter((t=>e.has(t))))}),Set.prototype.difference instanceof Function||(Set.prototype.difference=function(e){if(!He(e))throw new TypeError(Ie);return new Set([...this].filter((t=>!e.has(t))))}),Set.prototype.union instanceof Function||(Set.prototype.union=function(e){return new Set([...this,...e])}),Set.prototype.isSubsetOf instanceof Function||(Set.prototype.isSubsetOf=function(e){if(!He(e))throw new TypeError(Ie);return[...this].every((t=>e.has(t)))}),Set.prototype.isSupersetOf instanceof Function||(Set.prototype.isSupersetOf=function(e){if(!He(e))throw new TypeError(Ie);return De(e)?e.isSubsetOf(this):new Set(e.keys()).isSubsetOf(this)}),Set.prototype.symmetricDifference instanceof Function||(Set.prototype.symmetricDifference=function(e){if(!He(e))throw new TypeError(Ie);return De(e)?new Set([...this.difference(e),...e.difference(this)]):new Set([...this.difference(e),...new Set(e.keys()).difference(this)])}),Set.prototype.isDisjointFrom instanceof Function||(Set.prototype.isDisjointFrom=function(e){if(!He(e))throw new TypeError(Ie);return new Set([...this,...e]).size===this.size+e.size}),WeakMap.prototype.emplace instanceof Function||(WeakMap.prototype.emplace=function(e,{insert:t,update:r}={}){const n=this.has(e);if(n&&r instanceof Function){const t=this.get(e),n=r.call(this,t,e,this);return n!==t&&this.set(e,t),n}if(n)return this.get(e);if(t instanceof Function){const r=t.call(this,e,this);return this.set(e,r),r}throw new Error("Key is not found and no `insert()` given")}),function(){if("screen"in globalThis&&!(globalThis.getScreenDetails instanceof Function)){class e extends EventTarget{get availHeight(){return screen.availHeight}get availLeft(){return screen.availLeft}get availTop(){return screen.availTop}get availWidth(){return screen.availWidth}get colorDepth(){return screen.colorDepth}get devicePixelRatio(){return globalThis.devicePixelRatio||1}get height(){return screen.height}get isExtended(){return screen.isExtended}get isInternal(){return!0}get isPrimary(){return!0}get label(){return"Unknown"}get orientation(){return screen.orientation}get pixelDepth(){return screen.pixelDepth}get top(){return screen.top}get width(){return screen.width}}class t extends EventTarget{get currentScreen(){return new e}get screens(){return[this.currentScreen]}}Object.defineProperty(Screen.prototype,"isExtended",{enumerable:!0,configurable:!0,get:()=>!1}),globalThis.getScreenDetails=async()=>new t}}();
33
+ */function J({currentTarget:e}){switch(e.popoverTargetAction){case"show":e.popoverTargetElement.showPopover();break;case"hide":e.popoverTargetElement.hidePopover();break;default:e.popoverTargetElement.togglePopover()}}if(Object.freeze([...V,...W]),Object.freeze(Array.from(new Set([..._,...G]))),Object.freeze([...V,...W,...Q]),Object.freeze(Array.from(new Set([..._,...G,...X]))),function(e,{createHTML:t,createScript:r,createScriptURL:n}){"trustedTypes"in globalThis?globalThis.trustedTypes.createPolicy(e,{createHTML:t,createScript:r,createScriptURL:n}):Object.freeze({[Symbol.for("policy-name")]:e,createHTML:t instanceof Function?(e,...r)=>t(e.toString(),...r).toString():null,createScript:r instanceof Function?(e,...t)=>r(e.toString(),...t).toString():null,createScriptURL:n instanceof Function?(e,...t)=>n(e.toString(),...t).toString():null})}("aegis-sanitizer#html",{createHTML:e=>e}),globalThis.ToggleEvent instanceof Function){class ve extends Event{#c;#u;constructor(e,{newState:t,oldState:r}){super(e,{bubbles:!0}),this.#c=t,this.#u=r}get newState(){return this.#c}get oldState(){return this.#u}}globalThis.ToggleEvent=ve}if(!(HTMLElement.prototype.showPopover instanceof Function)){const Te=e=>e.classList.contains("_popover-open");Object.defineProperties(HTMLElement.prototype,{showPopover:{value:function(){if(!Te(this)){if(this.dispatchEvent(new ToggleEvent("beforetoggle",{oldState:"closed",newState:"open"})),"auto"===this.getAttribute("popover")){const e=new AbortController;document.body.addEventListener("click",(({target:t})=>{this.contains(t)||this.isSameNode(t.popoverTargetElement)||(e.abort(),this.hidePopover())}),{signal:e.signal,capture:!0}),document.body.addEventListener("keydown",(({key:t})=>{"Escape"===t&&(e.abort(),this.hidePopover())}),{signal:e.signal,capture:!0}),document.addEventListener("beforetoggle",(({target:t})=>{t.isSameNode(this)||"auto"!==t.getAttribute("popover")||(e.abort(),this.hidePopover())}),{signal:e.signal})}this.classList.add("_popover-open"),this.dispatchEvent(new ToggleEvent("toggle",{oldState:"closed",newState:"open"}))}}},hidePopover:{value:function(){Te(this)&&(this.dispatchEvent(new ToggleEvent("beforetoggle",{oldState:"open",newState:"closed"})),queueMicrotask((()=>this.classList.remove("_popover-open"))),this.dispatchEvent(new ToggleEvent("toggle",{oldState:"open",newState:"closed"})))}},togglePopover:{value:function(){Te(this)?this.hidePopover():this.showPopover()}}}),Object.defineProperties(HTMLButtonElement.prototype,{popoverTargetElement:{get(){return document.getElementById(this.getAttribute("popovertarget"))}},popoverTargetAction:{get(){return this.getAttribute("popovertargetaction")||"toggle"},set(e){this.setAttribute("popovertargetaction",e)}}}),function(e=document.body){e.querySelectorAll('button[popovertarget], input[type="button"][popovertarget]').forEach((e=>e.addEventListener("click",J)))}()}if(HTMLScriptElement.supports instanceof Function||(HTMLScriptElement.supports=function(e){switch(e.toLowerCase()){case"classic":return!0;case"module":return"noModule"in HTMLScriptElement.prototype;default:return!1}}),!Element.prototype.hasOwnProperty(U.role)){const Se=!0,Ee=!0,Ae=Object.fromEntries(Object.entries(U).map((([e,t])=>[e,{get:function(){return this.getAttribute(t)},set:function(e){"string"==typeof e?this.setAttribute(t,e):this.removeAttribute(t)},enumerable:Se,configurable:Ee}])));Object.defineProperties(Element.prototype,Ae)}if(!HTMLElement.prototype.hasOwnProperty("inert")){const Me=new WeakMap,xe=e=>{Me.has(e)&&(e.tabIndex=Me.get(e)),e.hasChildNodes()&&[...e.children].forEach(xe)},Le=e=>{-1!==e.tabIndex&&(Me.set(e,e.tabIndex),e.tabIndex=-1),e.hasChildNodes()&&[...e.children].forEach(Le)};Object.defineProperty(HTMLElement.prototype,"inert",{get:function(){return this.hasAttribute("inert")},set:function(e){e?(this.setAttribute("aria-hidden","true"),this.setAttribute("inert",""),Le(this)):(this.removeAttribute("aria-hidden"),this.removeAttribute("inert"),xe(this))},enumerable:!0,configurable:!0})}if(HTMLImageElement.prototype.hasOwnProperty("complete")||Object.defineProperty(HTMLImageElement.prototype,"complete",{get:function(){return""===this.src||this.naturalHeight>0}}),HTMLImageElement.prototype.decode instanceof Function||(HTMLImageElement.prototype.decode=function(){return this.complete?Promise.resolve():new Promise(((e,t)=>{const r=()=>{this.removeEventListener("error",n),this.removeEventListener("load",r),e()},n=e=>{this.removeEventListener("error",n),this.removeEventListener("load",r),t(e)};this.addEventListener("load",r),this.addEventListener("error",n)}))}),!HTMLTemplateElement.prototype.hasOwnProperty("shadowRootMode")){Object.defineProperty(HTMLTemplateElement.prototype,"shadowRootMode",{get:function(){return this.getAttribute("shadowrootmode")},set:function(e){this.setAttribute("shadowrootmode",e)},enumerable:!0,configurable:!0});const ke=(e=document)=>{e.querySelectorAll("template[shadowrootmode]").forEach((e=>{const t=e.parentElement.attachShadow({mode:e.shadowRootMode});t.append(e.content),e.remove(),ke(t)}))};"loading"===document.readyState?document.addEventListener("readystatechange",(()=>ke(document)),{once:!0}):ke(document)}HTMLFormElement.prototype.requestSubmit instanceof Function||(HTMLFormElement.prototype.requestSubmit=function(e){if(void 0===e){const e=document.createElement("button");e.type="submit",e.hidden=!0,this.append(e),this.requestSubmit(e),setTimeout((()=>e.remove()),100)}else{if(!(e instanceof HTMLButtonElement||e instanceof HTMLInputElement))throw new TypeError("HTMLFormElement.requestSubmit: The submitter is not a submit button.");if(!("submit"===e.type||e instanceof HTMLInputElement&&"image"===e.type))throw new TypeError("HTMLFormElement.requestSubmit: The submitter is not a submit button.");if(!this.isSameNode(e.form))throw new DOMException("HTMLFormElement.requestSubmit: The submitter is not owned by this form.","NotFoundError");e.click()}}),"loading"in HTMLIFrameElement.prototype||r(HTMLIFrameElement.prototype,"loading",{get:function(){return this.getAttribute("loading")||"auto"},set:function(e){this.setAttribute("loading",e)}}),"credentialless"in HTMLIFrameElement.prototype||r(HTMLIFrameElement.prototype,"credentialless",{get:function(){return this.hasAttribute("credentialless")},set:function(e){this.toggleAttribute("credentialless",e)}});const K="Expected a set-like object.",Y=["has","keys"],Z=["size"],ee=e=>e instanceof Set,te=e=>ee(e)||"object"==typeof e&&null!==e&&Y.every((t=>e[t]instanceof Function))&&Z.every((t=>t in e));Set.prototype.intersection instanceof Function||(Set.prototype.intersection=function(e){if(!te(e))throw new TypeError(K);return new Set([...this].filter((t=>e.has(t))))}),Set.prototype.difference instanceof Function||(Set.prototype.difference=function(e){if(!te(e))throw new TypeError(K);return new Set([...this].filter((t=>!e.has(t))))}),Set.prototype.union instanceof Function||(Set.prototype.union=function(e){return new Set([...this,...e])}),Set.prototype.isSubsetOf instanceof Function||(Set.prototype.isSubsetOf=function(e){if(!te(e))throw new TypeError(K);return[...this].every((t=>e.has(t)))}),Set.prototype.isSupersetOf instanceof Function||(Set.prototype.isSupersetOf=function(e){if(!te(e))throw new TypeError(K);return ee(e)?e.isSubsetOf(this):new Set(e.keys()).isSubsetOf(this)}),Set.prototype.symmetricDifference instanceof Function||(Set.prototype.symmetricDifference=function(e){if(!te(e))throw new TypeError(K);return ee(e)?new Set([...this.difference(e),...e.difference(this)]):new Set([...this.difference(e),...new Set(e.keys()).difference(this)])}),Set.prototype.isDisjointFrom instanceof Function||(Set.prototype.isDisjointFrom=function(e){if(!te(e))throw new TypeError(K);return new Set([...this,...e]).size===this.size+e.size}),WeakMap.prototype.emplace instanceof Function||(WeakMap.prototype.emplace=function(e,{insert:t,update:r}={}){const n=this.has(e);if(n&&r instanceof Function){const t=this.get(e),n=r.call(this,t,e,this);return n!==t&&this.set(e,t),n}if(n)return this.get(e);if(t instanceof Function){const r=t.call(this,e,this);return this.set(e,r),r}throw new Error("Key is not found and no `insert()` given")}),function(){if("screen"in globalThis&&!(globalThis.getScreenDetails instanceof Function)){class e extends EventTarget{get availHeight(){return screen.availHeight}get availLeft(){return screen.availLeft}get availTop(){return screen.availTop}get availWidth(){return screen.availWidth}get colorDepth(){return screen.colorDepth}get devicePixelRatio(){return globalThis.devicePixelRatio||1}get height(){return screen.height}get isExtended(){return screen.isExtended}get isInternal(){return!0}get isPrimary(){return!0}get label(){return"Unknown"}get orientation(){return screen.orientation}get pixelDepth(){return screen.pixelDepth}get top(){return screen.top}get width(){return screen.width}}class t extends EventTarget{get currentScreen(){return new e}get screens(){return[this.currentScreen]}}Object.defineProperty(Screen.prototype,"isExtended",{enumerable:!0,configurable:!0,get:()=>!1}),globalThis.getScreenDetails=async()=>new t}}();
39
34
  /**
40
35
  * @copyright 2023 Chris Zuber <admin@kernvalley.us>
41
36
  */
42
- const Ue="user-blocking",ze="user-visible",qe="background";async function Be(e,{delay:t=0,signal:r}={}){return new Promise(((n,o)=>{if(r instanceof AbortSignal&&r.aborted)o(r.reason);else{const a=new AbortController,i=setTimeout((()=>{n(e()),a.abort()}),t);r instanceof AbortSignal&&r.addEventListener("abort",(({target:e})=>{o(e.reason),clearTimeout(i)}),{once:!0,signal:a.signal})}}))}class $e{async postTask(e,{priority:t=ze,delay:r,signal:n}={}){return new Promise(((o,a)=>{if(n instanceof AbortSignal&&n.aborted)a(n.reason);else switch(t){case Ue:"number"==typeof r&&!Number.isNaN(r)&&r>0?Be(e,{delay:r,signal:n}).then(o,a):o((async()=>await e())());break;case ze:if("number"==typeof r&&!Number.isNaN(r)&&r>0)Be((()=>requestAnimationFrame((async()=>{try{const t=await e();o(t)}catch(e){a(e)}}))),{delay:r,signal:n}).catch(a);else{const t=new AbortController,r=requestAnimationFrame((async()=>{try{const t=await e();o(t)}catch(e){a(e)}finally{t.abort()}}));n instanceof AbortSignal&&n.addEventListener("abort",(({target:e})=>{cancelAnimationFrame(r),a(e.reason)}),{once:!0,signal:t.signal})}break;case qe:if("number"==typeof r&&!Number.isNaN(r)&&r>0)Be((()=>requestIdleCallback((async()=>{try{const t=await e();o(t)}catch(e){a(e)}}))),{delay:r,signal:n}).catch(a);else{const t=new AbortController,r=requestIdleCallback((async()=>{try{const t=await e();o(t)}catch(e){a(e)}finally{t.abort()}}));n instanceof AbortSignal&&n.addEventListener("abort",(({target:e})=>{cancelIdleCallback(r),a(e.reason)}),{once:!0,signal:t.signal})}break;default:throw new TypeError(`Scheduler.postTask: '${t}' (value of 'priority' member of SchedulerPostTaskOptions) is not a valid value for enumeration TaskPriority.`)}}))}}"scheduler"in globalThis||(globalThis.scheduler=new $e)
37
+ const re="user-blocking",ne="user-visible",oe="background";async function ie(e,{delay:t=0,signal:r}={}){return new Promise(((n,o)=>{if(r instanceof AbortSignal&&r.aborted)o(r.reason);else{const i=new AbortController,a=setTimeout((()=>{n(e()),i.abort()}),t);r instanceof AbortSignal&&r.addEventListener("abort",(({target:e})=>{o(e.reason),clearTimeout(a)}),{once:!0,signal:i.signal})}}))}class ae{async postTask(e,{priority:t=ne,delay:r,signal:n}={}){return new Promise(((o,i)=>{if(n instanceof AbortSignal&&n.aborted)i(n.reason);else switch(t){case re:"number"==typeof r&&!Number.isNaN(r)&&r>0?ie(e,{delay:r,signal:n}).then(o,i):o((async()=>await e())());break;case ne:if("number"==typeof r&&!Number.isNaN(r)&&r>0)ie((()=>requestAnimationFrame((async()=>{try{const t=await e();o(t)}catch(e){i(e)}}))),{delay:r,signal:n}).catch(i);else{const t=new AbortController,r=requestAnimationFrame((async()=>{try{const t=await e();o(t)}catch(e){i(e)}finally{t.abort()}}));n instanceof AbortSignal&&n.addEventListener("abort",(({target:e})=>{cancelAnimationFrame(r),i(e.reason)}),{once:!0,signal:t.signal})}break;case oe:if("number"==typeof r&&!Number.isNaN(r)&&r>0)ie((()=>requestIdleCallback((async()=>{try{const t=await e();o(t)}catch(e){i(e)}}))),{delay:r,signal:n}).catch(i);else{const t=new AbortController,r=requestIdleCallback((async()=>{try{const t=await e();o(t)}catch(e){i(e)}finally{t.abort()}}));n instanceof AbortSignal&&n.addEventListener("abort",(({target:e})=>{cancelIdleCallback(r),i(e.reason)}),{once:!0,signal:t.signal})}break;default:throw new TypeError(`Scheduler.postTask: '${t}' (value of 'priority' member of SchedulerPostTaskOptions) is not a valid value for enumeration TaskPriority.`)}}))}}"scheduler"in globalThis||(globalThis.scheduler=new ae)
43
38
  /**
44
39
  * @copyright 2023 Chris Zuber <admin@kernvalley.us>
45
40
  * @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals
@@ -57,5 +52,5 @@ const Ue="user-blocking",ze="user-visible",qe="background";async function Be(e,{
57
52
  * Additionally, if `internals.states._polyfilled`
58
53
  * - Use `._state--*` in addition to `:--*` to query element internals states
59
54
  * - This includes `:disabled` -> `._state--disabled` & `:invalid` -> `._state--invalid`
60
- */;const _e={key:Symbol("key"),internals:Symbol("element-internals"),form:Symbol("form"),fieldset:Symbol("fieldset"),element:Symbol("element"),validity:Symbol("validity"),validationMessage:Symbol("validation-message"),value:Symbol("value"),state:Symbol("state"),formController:Symbol("form-controller"),anchor:Symbol("anchor"),customInputs:Symbol("custom-inputs")};if(!(HTMLElement.prototype.attachInternals instanceof Function)&&"FormDataEvent"in globalThis){const nt={valueMissing:!1,typeMismatch:!1,patternMismatch:!1,tooLong:!1,tooShort:!1,rangeUnderflow:!1,rangeOverflow:!1,stepMismatch:!1,badInput:!1,customError:!1,valid:!0},ot=e=>e.hasOwnProperty(_e.fieldset)&&e[_e.fieldset]instanceof HTMLFieldSetElement&&e[_e.fieldset].disabled,at=e=>e instanceof HTMLElement&&e.tagName.includes("-")&&customElements.get(e.tagName.toLowerCase()).formAssociated,it=(e,t)=>function(r){if(r.target.reportValidity()){if(t.willValidate&&r.formData instanceof FormData){const n=t[_e.value];n instanceof FormData?n.entries().forEach((([e,t])=>r.formData.set(e,t))):e.hasAttribute("name")&&r.formData.set(e.getAttribute("name"),t[_e.value])}}else r.preventDefault(),r.stopImmediatePropagation(),r.stopPropagation()},st=(e,t)=>{Object.entries(t).forEach((([t,r])=>e.style.setProperty(t,r)))},lt=e=>e.hasAttribute("form")&&document.forms[e.getAttribute("form")]||e.closest("form"),ct=(e,t,r)=>{if(e instanceof HTMLFormElement){if(!(r instanceof HTMLElement&&r.tagName.includes("-")))throw new TypeError("Not a custom element");if(!(t instanceof dt||t instanceof globalThis.ElementInternals))throw new TypeError("Invalid ElementInternals");if(!at(r))throw new TypeError(`${r.tagName} is not form associated.`);if(!(r.formAssociatedCallback instanceof Function))throw new TypeError(`${r.tagName} is missing a formAssociatedCallback method.`);{const n=new AbortController,o=r.closest("fieldset");o instanceof Element&&(r[_e.fieldset]=o,o.hasOwnProperty(_e.customInputs)||(o[_e.customInputs]=new Set),o[_e.customInputs].add(r),ut.observe(o,pt)),t[_e.form]=e,t[_e.formController]=n;const{checkValidity:a,reportValidity:i}=e;e.reportValidity=function(){return!!i.call(this)&&t.reportValidity()},e.checkValidity=function(){return!!a.call(this)&&t.checkValidity()},n.signal.addEventListener("abort",(()=>{e.reportValidity=i,e.checkValidity=a}),{once:!0}),e.addEventListener("formdata",it(r,t),{signal:n.signal}),e.addEventListener("submit",(e=>{e.target.reportValidity()||(e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation())}),{signal:n.signal}),r.formResetCallback instanceof Function&&e.addEventListener("reset",(()=>r.formResetCallback()),{signal:n.signal})}}else if(t[_e.formController]instanceof AbortController&&t[_e.formController].abort(),t[_e.form]=null,t[_e.formController]=null,r.hasOwnProperty(_e.fieldset)){const e=r[_e.fieldset];e.hasOwnProperty(_e.customInputs)&&(e[_e.customInputs].delete(r),0===e[_e.customInputs.size]&&delete e[_e.customInputs]),r[_e.fieldset]=null}},ut=new MutationObserver((e=>{e.forEach((({target:t,type:r,attributeName:n})=>{if("attributes"===r&&"disabled"===n){const r=t.hasAttribute("disabled");if(at(t)&&t.hasOwnProperty(_e.internals)&&t[_e.internals].states.has("--disabled")!==r&&(1===e.length?!ot(t):t.hasAttribute("disabled")===ot(t)&&e.some((e=>e.target.isSameNode(t[_e.fieldset]))))){const e=t[_e.internals];r?e.states.add("--disabled"):e.states.delete("--disabled"),t.formDisabledCallback instanceof Function&&t.formDisabledCallback(r)}else"FIELDSET"!==t.tagName||!t.hasOwnProperty(_e.customInputs)||1!==e.length&&e.some((e=>t[_e.customInputs].has(e.target)))||t[_e.customInputs].forEach((e=>{e.isConnected&&e.hasOwnProperty(_e.internals)?e.hasAttribute("disabled")||(r?e[_e.internals].states.add("--disabled"):e[_e.internals].states.delete("--disabled"),e.formDisabledCallback instanceof Function&&e.formDisabledCallback(r)):t[_e.customInputs].delete(e)}))}}))})),pt={attributes:!0,attributeFilter:["disabled"]};class dt{constructor(e,t){if(t!==_e.key)throw new TypeError("Illegal constructor");if(!(e instanceof HTMLElement))throw new TypeError("Must be called on an HTMLElement");if(!e.tagName.includes("-"))throw new DOMException("Cannot attach internals to a built-in element.");{const t=!0,r=!1,n=!0;Object.defineProperties(this,{[_e.element]:{value:e,configurable:t,enumerable:r,writable:n},[_e.form]:{value:null,configurable:t,enumerable:r,writable:n},[_e.fieldset]:{value:null,configurable:t,enumerable:r,writable:n},[_e.anchor]:{value:null,configurable:t,enumerable:r,writable:n},[_e.validity]:{value:nt,configurable:t,enumerable:r,writable:n},[_e.validationMessage]:{value:"",configurable:t,enumerable:r,writable:n},[_e.value]:{value:null,configurable:t,enumerable:r,writable:n},[_e.state]:{value:null,configurable:t,enumerable:r,writable:n},[_e.formController]:{value:null,configurable:t,enumerable:r,writable:n}}),at(e)&&ut.observe(e,pt),Object.defineProperty(e,_e.internals,{value:this,enumerable:!1,configurable:!1,writable:!1}),setTimeout((()=>this.states.add("--element-internals-polyfilled")),10)}}get form(){return this[_e.form]}get labels(){const e=this.form;return e instanceof HTMLFormElement&&0!==this[_e.element].id.length?e.querySelectorAll(`label[for="${this[_e.element].id}"]`):document.createDocumentFragment().childNodes}get _polyfilled(){return!0}get shadowRoot(){return this[_e.element].shadowRoot}get validity(){return at(this[_e.element])?this[_e.validity]:void 0}get validationMessage(){return at(this[_e.element])?this[_e.validationMessage]||"":void 0}get willValidate(){const e=this[_e.element];return at(e)&&!ot(e)&&!["disabled","readonly"].some((t=>e.hasAttribute(t)))}checkValidity(){if(this.willValidate){if(this.validity.valid){const e=this[_e.element].nextElementSibling;return e instanceof HTMLElement&&e.classList.contains("_element-internals-popup")&&e.remove(),!0}return this[_e.element].dispatchEvent(new Event("invalid")),!1}return!0}reportValidity(){if(this.checkValidity())return!0;{const e=this.validationMessage;if("string"==typeof e&&0!==e.length){const{bottom:t,left:r}=this[_e.element].getBoundingClientRect(),n=document.createElement("div");n.textContent=e,st(n,{position:"fixed","background-color":"#2b2a33",color:"#fafafa",top:`${t+2}px`,left:`${r}px`,"z-index":2147483647,"color-scheme":"light-dark","font-family":"system-ui, serif","font-size":"18px",display:"inline-block",padding:"0.6em 0.8em",border:"1px solid #1a1a1a","border-radius":"6px"}),n.classList.add("_element-internals-popup"),this[_e.element].focus();const o=this[_e.element].nextElementSibling;o instanceof Element&&o.classList.contains("_element-internals-popup")&&o.remove(),this[_e.element].insertAdjacentElement("afterend",n),this[_e.anchor]instanceof Element&&this[_e.anchor].focus(),setTimeout((()=>{n.isConnected&&n.remove()}),3e3)}return!1}}setFormValue(e,t){if(!at(this[_e.element]))throw new DOMException("Not form associated");this[_e.value]=e,this[_e.state]=t}setValidity({valueMissing:e=!1,typeMismatch:t=!1,patternMismatch:r=!1,tooLong:n=!1,tooShort:o=!1,rangeUnderflow:a=!1,rangeOverflow:i=!1,stepMismatch:s=!1,badInput:l=!1,customError:c=!1},u="",p){if(!at(this[_e.element]))throw new DOMException("Not form associated");if(("string"!=typeof u||0===u.length)&&(e||t||r||n||o||a||i||s||l||c))throw new DOMException("Message required if any flags are true.");{const d=[e,t,r,n,o,a,i,s,l,c].every((e=>!1===e));this[_e.validity]={valueMissing:e,typeMismatch:t,patternMismatch:r,tooLong:n,tooShort:o,rangeUnderflow:a,rangeOverflow:i,stepMismatch:s,badInput:l,customError:c,valid:d},this[_e.validationMessage]=u,this[_e.anchor]=p,d?(this.states.delete("--invalid"),this.states.add("--valid")):(this.states.add("--invalid"),this.states.delete("--valid"),this[_e.element].dispatchEvent(new Event("invalid")))}}_associateForm(e,t){ct(e,this,t)}_findAssociatedForm(e){return lt(e)}}HTMLElement.prototype.attachInternals=function(){if(this.hasOwnProperty(_e.internals))throw new DOMException("Invalid operation");if(this.tagName.includes("-"))return new dt(this,_e.key);throw new DOMException("Cannot call attachInternals on built-in elements.")},globalThis.ElementInternals=dt}if("ElementInternals"in globalThis&&!("CustomStateSet"in globalThis)){const ft="_state",mt=new WeakMap,ht=e=>{if(e.toString().startsWith("--"))return`${ft}${e}`;throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value '${e}' must start with '--'.`)},{value:yt,writable:gt,configurable:bt,enumerable:wt}=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"attachInternals");class vt{constructor(e,t){if(t!==_e.key)throw new TypeError("Illegal Constructor");if(!(e instanceof HTMLElement))throw new TypeError("el must be an HTMLElement");mt.set(this,e),this.add("--custom-states-polyfilled")}get _polyfilled(){return!0}get size(){return[...this.values()].length}add(e){mt.get(this).classList.add(ht(e))}has(e){return mt.get(this).classList.contains(ht(e))}delete(e){const t=ht(e);return!!mt.get(this).classList.contains(t)&&(mt.get(this).classList.remove(t),!0)}clear(){this.values().forEach((e=>this.delete(e)))}keys(){return this.values()}values(){return mt.get(this).classList.values().filter((e=>e.startsWith(`${ft}--`))).map((e=>e.substr(ft.length)))}entries(){return this.values().map((e=>[e,e]))}forEach(e,t){this.values().forEach((r=>e.call(t||this,r,r,this)))}[Symbol.toStringTag](){return"CustomStateSet"}[Symbol.iterator](){return this.values()}}Object.defineProperty(HTMLElement.prototype,"attachInternals",{value:function(){const e=yt.call(this);return Object.defineProperty(e,_e.element,{value:this,enumerable:!1,writable:!1,configurable:!1}),Object.defineProperty(e,"states",{value:new vt(this,_e.key),configurable:!0,enumberable:!0}),Object.is(e.shadowRoot,null)&&!Object.is(this.shadowRoot,null)&&Object.defineProperty(e,"shadowRoot",{value:this.shadowRoot,configurable:!0,enumerable:!0}),e},writable:gt,configurable:bt,enumerable:wt}),globalThis.CustomStateSet=vt,function(e){const t=Object.fromEntries(Object.keys(ie).map((e=>[e,{get:function(){return this[_e.element][e]},set:function(t){this[_e.element][e]=t},enumerable:!0,configurable:!0}])));Object.defineProperties(e,t)}(ElementInternals.prototype)}if(t(Response,"json",((e,{status:t=200,statusText:r="",headers:n=new Headers}={})=>n instanceof Headers?(n.set("Content-Type","application/json"),new Response(JSON.stringify(e),{status:t,statusText:r,headers:n})):Response.json(e,{status:t,statusText:r,headers:new Headers(n)}))),t(Response,"redirect",((e,t=302)=>new Response("",{status:t,headers:new Headers({Location:e})}))),!(globalThis.Record instanceof Function)){function Tt(e){if(new.target===Tt)throw new TypeError("Record is not a constructor");const t=Object.create(Tt.prototype);return Object.defineProperties(t,Object.fromEntries(Object.entries(e).map((([e,t])=>[e,{enumerable:!0,configurable:!1,writable:!1,value:t}])))),Object.freeze(t),t}Tt.prototype.constructor=Tt,Object.defineProperty(Tt.prototype,Symbol.toStringTag,{value:"Record",enumerable:!0,configurable:!1,writable:!1}),Tt.fromEntries=function(e){return Tt(Object.fromEntries(e))},globalThis.Record=Tt}if(!(globalThis.Tuple instanceof Function)){const St=e=>{const t=Array.apply(Object.create(Et.prototype),e);return Object.setPrototypeOf(t,Et.prototype),t};function Et(...e){if(new.target===Et)throw new TypeError("Tuple is not a constructor");const t=St(e);return Object.freeze(t),t}Et.prototype.forEach=function(e,t){Array.prototype.forEach.call(this,e,t)},Et.prototype.join=function(e=","){return Array.prototype.join.call(this,e)},Et.prototype.concat=function(...e){return Et(...this,...e)},Et.prototype.slice=function(e,t){return Et.from(Array.prototype.slice.call(this,e,t))},Et.prototype.indexOf=function(e,t){return Array.prototype.indexOf.call(this,e,t)},Et.prototype.lastIndexOf=function(e,t){return Array.prototype.lastIndexOf.call(this,e,t)},Et.prototype.findIndex=function(e,t){return Array.prototype.findIndex.call(this,e,t)},Et.prototype.find=function(e,t){return Array.prototype.find.call(this,e,t)},Et.prototype.findLast=function(e,t){return Array.prototype.findLast.call(this,e,t)},Et.prototype.findLastIndex=function(e,t){return Array.prototype.findLastIndex.call(this,e,t)},Et.prototype.every=function(e,t){return Array.prototype.every.call(this,e,t)},Et.prototype.some=function(e,t){return Array.prototype.some.call(this,e,t)},Et.prototype.includes=function(e,t){return Array.prototype.includes.call(this,e,t)},Et.prototype.map=function(e,t){return Et.from(Array.prototype.map.call(this,e,t))},Et.prototype.filter=function(e,t){return Et.from(Array.prototype.filter.call(this,e,t))},Et.prototype.flat=function(e){return Et.from(Array.prototype.flat.call(this,e))},Et.prototype.flatMap=function(e,t){return Et.from(Array.prototype.flatMap.call(this,e,t))},Et.prototype.at=function(e){return Array.prototype.at.call(this,e)},Et.prototype.reduce=function(e,t){return Et.from(Array.prototype.reduce.call(this,e,t))},Et.prototype.reduceRight=function(e,t){return Et.from(Array.prototype.reduceRight.call(this,e,t))},Et.prototype.toSorted=function(e){return Et.from(Array.prototype.toSorted.call(this,e))},Et.prototype.toSpliced=function(e,t,...r){return Et.from(Array.prototype.toSpliced.call(this,e,t,...r))},Et.prototype.toReversed=function(){return Et.from(Array.prototype.toReversed.apply(this))},Et.prototype.with=function(e,t){return Et.from(Array.prototype.with.call(this,e,t))},Et.prototype.toLocaleString=function(e,t){return Array.prototype.toLocaleString.call(this,e,t)},Et.prototype.toJSON=function(){return[...this]},Et.prototype.keys=function(){return Array.prototype.keys.apply(this)},Et.prototype.values=function(){return Array.prototype.values.apply(this)},Et.prototype.entries=function(){return Array.prototype.entries.apply(this)},Et.prototype[Symbol.iterator]=function(){return Array.prototype[Symbol.iterator].apply(this)},Et.from=function(e,t,r){const n=St([]);return Array.prototype.push.apply(n,Array.from(e,t,r)),Object.freeze(n),n},Et.of=function(...e){return Et.from(e)},Object.defineProperties(Et.prototype,{length:{get:function(){return Object.getOwnPropertyDescriptor(Array.prototype,"length").get.apply(this)},enumerable:!0,configurable:!1},lastItem:{get:function(){return this[this.lastIndex]},enumerable:!0,configurable:!1},lastIndex:{get:function(){return Object.getOwnPropertyDescriptor(Array.prototype,"lastIndex").get.apply(this)},enumerable:!0,configurable:!1},[Symbol.toStringTag]:{value:"Tuple",enumerable:!0,configurable:!1,writable:!1}}),globalThis.Tuple=Et}if(!(JSON.parseImmutable instanceof Function)){function At(e){return"object"==typeof e?null===e?null:Array.isArray(e)?Tuple.from(e.map((e=>At(e)))):Record.fromEntries(Object.entries(e).map((([e,t])=>[e,At(t)]))):e}JSON.parseImmutable=function(e){return JSON.parse(e,((e,t)=>At(t)))}}}();
55
+ */;const se={key:Symbol("key"),internals:Symbol("element-internals"),form:Symbol("form"),fieldset:Symbol("fieldset"),element:Symbol("element"),validity:Symbol("validity"),validationMessage:Symbol("validation-message"),value:Symbol("value"),state:Symbol("state"),formController:Symbol("form-controller"),anchor:Symbol("anchor"),customInputs:Symbol("custom-inputs")};if(!(HTMLElement.prototype.attachInternals instanceof Function)&&"FormDataEvent"in globalThis){const Oe={valueMissing:!1,typeMismatch:!1,patternMismatch:!1,tooLong:!1,tooShort:!1,rangeUnderflow:!1,rangeOverflow:!1,stepMismatch:!1,badInput:!1,customError:!1,valid:!0},Fe=e=>e.hasOwnProperty(se.fieldset)&&e[se.fieldset]instanceof HTMLFieldSetElement&&e[se.fieldset].disabled,Pe=e=>e instanceof HTMLElement&&e.tagName.includes("-")&&customElements.get(e.tagName.toLowerCase()).formAssociated,je=(e,t)=>function(r){if(r.target.reportValidity()){if(t.willValidate&&r.formData instanceof FormData){const n=t[se.value];n instanceof FormData?n.entries().forEach((([e,t])=>r.formData.set(e,t))):e.hasAttribute("name")&&r.formData.set(e.getAttribute("name"),t[se.value])}}else r.preventDefault(),r.stopImmediatePropagation(),r.stopPropagation()},Ie=(e,t)=>{Object.entries(t).forEach((([t,r])=>e.style.setProperty(t,r)))},Ne=e=>e.hasAttribute("form")&&document.forms[e.getAttribute("form")]||e.closest("form"),Ce=(e,t,r)=>{if(e instanceof HTMLFormElement){if(!(r instanceof HTMLElement&&r.tagName.includes("-")))throw new TypeError("Not a custom element");if(!(t instanceof De||t instanceof globalThis.ElementInternals))throw new TypeError("Invalid ElementInternals");if(!Pe(r))throw new TypeError(`${r.tagName} is not form associated.`);if(!(r.formAssociatedCallback instanceof Function))throw new TypeError(`${r.tagName} is missing a formAssociatedCallback method.`);{const n=new AbortController,o=r.closest("fieldset");o instanceof Element&&(r[se.fieldset]=o,o.hasOwnProperty(se.customInputs)||(o[se.customInputs]=new Set),o[se.customInputs].add(r),Re.observe(o,He)),t[se.form]=e,t[se.formController]=n;const{checkValidity:i,reportValidity:a}=e;e.reportValidity=function(){return!!a.call(this)&&t.reportValidity()},e.checkValidity=function(){return!!i.call(this)&&t.checkValidity()},n.signal.addEventListener("abort",(()=>{e.reportValidity=a,e.checkValidity=i}),{once:!0}),e.addEventListener("formdata",je(r,t),{signal:n.signal}),e.addEventListener("submit",(e=>{e.target.reportValidity()||(e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation())}),{signal:n.signal}),r.formResetCallback instanceof Function&&e.addEventListener("reset",(()=>r.formResetCallback()),{signal:n.signal})}}else if(t[se.formController]instanceof AbortController&&t[se.formController].abort(),t[se.form]=null,t[se.formController]=null,r.hasOwnProperty(se.fieldset)){const e=r[se.fieldset];e.hasOwnProperty(se.customInputs)&&(e[se.customInputs].delete(r),0===e[se.customInputs.size]&&delete e[se.customInputs]),r[se.fieldset]=null}},Re=new MutationObserver((e=>{e.forEach((({target:t,type:r,attributeName:n})=>{if("attributes"===r&&"disabled"===n){const r=t.hasAttribute("disabled");if(Pe(t)&&t.hasOwnProperty(se.internals)&&t[se.internals].states.has("--disabled")!==r&&(1===e.length?!Fe(t):t.hasAttribute("disabled")===Fe(t)&&e.some((e=>e.target.isSameNode(t[se.fieldset]))))){const e=t[se.internals];r?e.states.add("--disabled"):e.states.delete("--disabled"),t.formDisabledCallback instanceof Function&&t.formDisabledCallback(r)}else"FIELDSET"!==t.tagName||!t.hasOwnProperty(se.customInputs)||1!==e.length&&e.some((e=>t[se.customInputs].has(e.target)))||t[se.customInputs].forEach((e=>{e.isConnected&&e.hasOwnProperty(se.internals)?e.hasAttribute("disabled")||(r?e[se.internals].states.add("--disabled"):e[se.internals].states.delete("--disabled"),e.formDisabledCallback instanceof Function&&e.formDisabledCallback(r)):t[se.customInputs].delete(e)}))}}))})),He={attributes:!0,attributeFilter:["disabled"]};class De{constructor(e,t){if(t!==se.key)throw new TypeError("Illegal constructor");if(!(e instanceof HTMLElement))throw new TypeError("Must be called on an HTMLElement");if(!e.tagName.includes("-"))throw new DOMException("Cannot attach internals to a built-in element.");{const t=!0,r=!1,n=!0;Object.defineProperties(this,{[se.element]:{value:e,configurable:t,enumerable:r,writable:n},[se.form]:{value:null,configurable:t,enumerable:r,writable:n},[se.fieldset]:{value:null,configurable:t,enumerable:r,writable:n},[se.anchor]:{value:null,configurable:t,enumerable:r,writable:n},[se.validity]:{value:Oe,configurable:t,enumerable:r,writable:n},[se.validationMessage]:{value:"",configurable:t,enumerable:r,writable:n},[se.value]:{value:null,configurable:t,enumerable:r,writable:n},[se.state]:{value:null,configurable:t,enumerable:r,writable:n},[se.formController]:{value:null,configurable:t,enumerable:r,writable:n}}),Pe(e)&&Re.observe(e,He),Object.defineProperty(e,se.internals,{value:this,enumerable:!1,configurable:!1,writable:!1}),setTimeout((()=>this.states.add("--element-internals-polyfilled")),10)}}get form(){return this[se.form]}get labels(){const e=this.form;return e instanceof HTMLFormElement&&0!==this[se.element].id.length?e.querySelectorAll(`label[for="${this[se.element].id}"]`):document.createDocumentFragment().childNodes}get _polyfilled(){return!0}get shadowRoot(){return this[se.element].shadowRoot}get validity(){return Pe(this[se.element])?this[se.validity]:void 0}get validationMessage(){return Pe(this[se.element])?this[se.validationMessage]||"":void 0}get willValidate(){const e=this[se.element];return Pe(e)&&!Fe(e)&&!["disabled","readonly"].some((t=>e.hasAttribute(t)))}checkValidity(){if(this.willValidate){if(this.validity.valid){const e=this[se.element].nextElementSibling;return e instanceof HTMLElement&&e.classList.contains("_element-internals-popup")&&e.remove(),!0}return this[se.element].dispatchEvent(new Event("invalid")),!1}return!0}reportValidity(){if(this.checkValidity())return!0;{const e=this.validationMessage;if("string"==typeof e&&0!==e.length){const{bottom:t,left:r}=this[se.element].getBoundingClientRect(),n=document.createElement("div");n.textContent=e,Ie(n,{position:"fixed","background-color":"#2b2a33",color:"#fafafa",top:`${t+2}px`,left:`${r}px`,"z-index":2147483647,"color-scheme":"light-dark","font-family":"system-ui, serif","font-size":"18px",display:"inline-block",padding:"0.6em 0.8em",border:"1px solid #1a1a1a","border-radius":"6px"}),n.classList.add("_element-internals-popup"),this[se.element].focus();const o=this[se.element].nextElementSibling;o instanceof Element&&o.classList.contains("_element-internals-popup")&&o.remove(),this[se.element].insertAdjacentElement("afterend",n),this[se.anchor]instanceof Element&&this[se.anchor].focus(),setTimeout((()=>{n.isConnected&&n.remove()}),3e3)}return!1}}setFormValue(e,t){if(!Pe(this[se.element]))throw new DOMException("Not form associated");this[se.value]=e,this[se.state]=t}setValidity({valueMissing:e=!1,typeMismatch:t=!1,patternMismatch:r=!1,tooLong:n=!1,tooShort:o=!1,rangeUnderflow:i=!1,rangeOverflow:a=!1,stepMismatch:s=!1,badInput:l=!1,customError:c=!1},u="",p){if(!Pe(this[se.element]))throw new DOMException("Not form associated");if(("string"!=typeof u||0===u.length)&&(e||t||r||n||o||i||a||s||l||c))throw new DOMException("Message required if any flags are true.");{const d=[e,t,r,n,o,i,a,s,l,c].every((e=>!1===e));this[se.validity]={valueMissing:e,typeMismatch:t,patternMismatch:r,tooLong:n,tooShort:o,rangeUnderflow:i,rangeOverflow:a,stepMismatch:s,badInput:l,customError:c,valid:d},this[se.validationMessage]=u,this[se.anchor]=p,d?(this.states.delete("--invalid"),this.states.add("--valid")):(this.states.add("--invalid"),this.states.delete("--valid"),this[se.element].dispatchEvent(new Event("invalid")))}}_associateForm(e,t){Ce(e,this,t)}_findAssociatedForm(e){return Ne(e)}}HTMLElement.prototype.attachInternals=function(){if(this.hasOwnProperty(se.internals))throw new DOMException("Invalid operation");if(this.tagName.includes("-"))return new De(this,se.key);throw new DOMException("Cannot call attachInternals on built-in elements.")},globalThis.ElementInternals=De}if("ElementInternals"in globalThis&&!("CustomStateSet"in globalThis)){const Ue="_state",qe=new WeakMap,ze=e=>{if(e.toString().startsWith("--"))return`${Ue}${e}`;throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value '${e}' must start with '--'.`)},{value:Be,writable:$e,configurable:Ve,enumerable:_e}=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"attachInternals");class We{constructor(e,t){if(t!==se.key)throw new TypeError("Illegal Constructor");if(!(e instanceof HTMLElement))throw new TypeError("el must be an HTMLElement");qe.set(this,e),this.add("--custom-states-polyfilled")}get _polyfilled(){return!0}get size(){return[...this.values()].length}add(e){qe.get(this).classList.add(ze(e))}has(e){return qe.get(this).classList.contains(ze(e))}delete(e){const t=ze(e);return!!qe.get(this).classList.contains(t)&&(qe.get(this).classList.remove(t),!0)}clear(){this.values().forEach((e=>this.delete(e)))}keys(){return this.values()}values(){return qe.get(this).classList.values().filter((e=>e.startsWith(`${Ue}--`))).map((e=>e.substr(Ue.length)))}entries(){return this.values().map((e=>[e,e]))}forEach(e,t){this.values().forEach((r=>e.call(t||this,r,r,this)))}[Symbol.toStringTag](){return"CustomStateSet"}[Symbol.iterator](){return this.values()}}Object.defineProperty(HTMLElement.prototype,"attachInternals",{value:function(){const e=Be.call(this);return Object.defineProperty(e,se.element,{value:this,enumerable:!1,writable:!1,configurable:!1}),Object.defineProperty(e,"states",{value:new We(this,se.key),configurable:!0,enumberable:!0}),Object.is(e.shadowRoot,null)&&!Object.is(this.shadowRoot,null)&&Object.defineProperty(e,"shadowRoot",{value:this.shadowRoot,configurable:!0,enumerable:!0}),e},writable:$e,configurable:Ve,enumerable:_e}),globalThis.CustomStateSet=We,function(e){const t=Object.fromEntries(Object.keys(U).map((e=>[e,{get:function(){return this[se.element][e]},set:function(t){this[se.element][e]=t},enumerable:!0,configurable:!0}])));Object.defineProperties(e,t)}(ElementInternals.prototype)}if(t(Response,"json",((e,{status:t=200,statusText:r="",headers:n=new Headers}={})=>n instanceof Headers?(n.set("Content-Type","application/json"),new Response(JSON.stringify(e),{status:t,statusText:r,headers:n})):Response.json(e,{status:t,statusText:r,headers:new Headers(n)}))),t(Response,"redirect",((e,t=302)=>new Response("",{status:t,headers:new Headers({Location:e})}))),!(globalThis.Record instanceof Function)){function Ge(e){if(new.target===Ge)throw new TypeError("Record is not a constructor");const t=Object.create(Ge.prototype);return Object.defineProperties(t,Object.fromEntries(Object.entries(e).map((([e,t])=>[e,{enumerable:!0,configurable:!1,writable:!1,value:t}])))),Object.freeze(t),t}Ge.prototype.constructor=Ge,Object.defineProperty(Ge.prototype,Symbol.toStringTag,{value:"Record",enumerable:!0,configurable:!1,writable:!1}),Ge.fromEntries=function(e){return Ge(Object.fromEntries(e))},globalThis.Record=Ge}if(!(globalThis.Tuple instanceof Function)){const Qe=e=>{const t=Array.apply(Object.create(Xe.prototype),e);return Object.setPrototypeOf(t,Xe.prototype),t};function Xe(...e){if(new.target===Xe)throw new TypeError("Tuple is not a constructor");const t=Qe(e);return Object.freeze(t),t}Xe.prototype.forEach=function(e,t){Array.prototype.forEach.call(this,e,t)},Xe.prototype.join=function(e=","){return Array.prototype.join.call(this,e)},Xe.prototype.concat=function(...e){return Xe(...this,...e)},Xe.prototype.slice=function(e,t){return Xe.from(Array.prototype.slice.call(this,e,t))},Xe.prototype.indexOf=function(e,t){return Array.prototype.indexOf.call(this,e,t)},Xe.prototype.lastIndexOf=function(e,t){return Array.prototype.lastIndexOf.call(this,e,t)},Xe.prototype.findIndex=function(e,t){return Array.prototype.findIndex.call(this,e,t)},Xe.prototype.find=function(e,t){return Array.prototype.find.call(this,e,t)},Xe.prototype.findLast=function(e,t){return Array.prototype.findLast.call(this,e,t)},Xe.prototype.findLastIndex=function(e,t){return Array.prototype.findLastIndex.call(this,e,t)},Xe.prototype.every=function(e,t){return Array.prototype.every.call(this,e,t)},Xe.prototype.some=function(e,t){return Array.prototype.some.call(this,e,t)},Xe.prototype.includes=function(e,t){return Array.prototype.includes.call(this,e,t)},Xe.prototype.map=function(e,t){return Xe.from(Array.prototype.map.call(this,e,t))},Xe.prototype.filter=function(e,t){return Xe.from(Array.prototype.filter.call(this,e,t))},Xe.prototype.flat=function(e){return Xe.from(Array.prototype.flat.call(this,e))},Xe.prototype.flatMap=function(e,t){return Xe.from(Array.prototype.flatMap.call(this,e,t))},Xe.prototype.at=function(e){return Array.prototype.at.call(this,e)},Xe.prototype.reduce=function(e,t){return Xe.from(Array.prototype.reduce.call(this,e,t))},Xe.prototype.reduceRight=function(e,t){return Xe.from(Array.prototype.reduceRight.call(this,e,t))},Xe.prototype.toSorted=function(e){return Xe.from(Array.prototype.toSorted.call(this,e))},Xe.prototype.toSpliced=function(e,t,...r){return Xe.from(Array.prototype.toSpliced.call(this,e,t,...r))},Xe.prototype.toReversed=function(){return Xe.from(Array.prototype.toReversed.apply(this))},Xe.prototype.with=function(e,t){return Xe.from(Array.prototype.with.call(this,e,t))},Xe.prototype.toLocaleString=function(e,t){return Array.prototype.toLocaleString.call(this,e,t)},Xe.prototype.toJSON=function(){return[...this]},Xe.prototype.keys=function(){return Array.prototype.keys.apply(this)},Xe.prototype.values=function(){return Array.prototype.values.apply(this)},Xe.prototype.entries=function(){return Array.prototype.entries.apply(this)},Xe.prototype[Symbol.iterator]=function(){return Array.prototype[Symbol.iterator].apply(this)},Xe.from=function(e,t,r){const n=Qe([]);return Array.prototype.push.apply(n,Array.from(e,t,r)),Object.freeze(n),n},Xe.of=function(...e){return Xe.from(e)},Object.defineProperties(Xe.prototype,{length:{get:function(){return Object.getOwnPropertyDescriptor(Array.prototype,"length").get.apply(this)},enumerable:!0,configurable:!1},lastItem:{get:function(){return this[this.lastIndex]},enumerable:!0,configurable:!1},lastIndex:{get:function(){return Object.getOwnPropertyDescriptor(Array.prototype,"lastIndex").get.apply(this)},enumerable:!0,configurable:!1},[Symbol.toStringTag]:{value:"Tuple",enumerable:!0,configurable:!1,writable:!1}}),globalThis.Tuple=Xe}if(!(JSON.parseImmutable instanceof Function)){function Je(e){return"object"==typeof e?null===e?null:Array.isArray(e)?Tuple.from(e.map((e=>Je(e)))):Record.fromEntries(Object.entries(e).map((([e,t])=>[e,Je(t)]))):e}JSON.parseImmutable=function(e){return JSON.parse(e,((e,t)=>Je(t)))}}}();
61
56
  //# sourceMappingURL=all.min.js.map