@microblink/capture 1.0.5 → 1.0.8
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/dist/capture.js +4334 -4734
- package/dist/capture.umd.cjs +54 -49
- package/dist/resources/advanced/capture-wasm.js +3 -3
- package/dist/resources/advanced/capture-wasm.wasm +0 -0
- package/dist/resources/advanced-threads/capture-wasm.js +2 -2
- package/dist/resources/advanced-threads/capture-wasm.wasm +0 -0
- package/dist/resources/basic/capture-wasm.js +3 -3
- package/dist/resources/basic/capture-wasm.wasm +0 -0
- package/dist/resources/capture-worker.js +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +4 -25
package/dist/capture.umd.cjs
CHANGED
|
@@ -1,32 +1,37 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Dt,Nn){typeof exports=="object"&&typeof module<"u"?Nn(exports):typeof define=="function"&&define.amd?define(["exports"],Nn):(Dt=typeof globalThis<"u"?globalThis:Dt||self,Nn(Dt.capture={}))})(this,function(Dt){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/const En=Symbol("Comlink.proxy"),Vd=Symbol("Comlink.endpoint"),Wd=Symbol("Comlink.releaseProxy"),zr=Symbol("Comlink.finalizer"),Oi=Symbol("Comlink.thrown"),Wa=t=>typeof t=="object"&&t!==null||typeof t=="function",Zd={canHandle:t=>Wa(t)&&t[En],serialize(t){const{port1:e,port2:n}=new MessageChannel;return qa(t,e),[n,[n]]},deserialize(t){return t.start(),Ja(t)}},qd={canHandle:t=>Wa(t)&&Oi in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},Za=new Map([["proxy",Zd],["throw",qd]]);function Xd(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function qa(t,e=globalThis,n=["*"]){e.addEventListener("message",function i(r){if(!r||!r.data)return;if(!Xd(n,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:o,type:a,path:s}=Object.assign({path:[]},r.data),u=(r.data.argumentList||[]).map(sn);let l;try{const g=s.slice(0,-1).reduce((c,f)=>c[f],t),M=s.reduce((c,f)=>c[f],t);switch(a){case"GET":l=M;break;case"SET":g[s.slice(-1)[0]]=sn(r.data.value),l=!0;break;case"APPLY":l=M.apply(g,u);break;case"CONSTRUCT":{const c=new M(...u);l=ig(c)}break;case"ENDPOINT":{const{port1:c,port2:f}=new MessageChannel;qa(t,f),l=is(c,[c])}break;case"RELEASE":l=void 0;break;default:return}}catch(g){l={value:g,[Oi]:0}}Promise.resolve(l).catch(g=>({value:g,[Oi]:0})).then(g=>{const[M,c]=Ui(g);e.postMessage(Object.assign(Object.assign({},M),{id:o}),c),a==="RELEASE"&&(e.removeEventListener("message",i),Xa(e),zr in t&&typeof t[zr]=="function"&&t[zr]())}).catch(g=>{const[M,c]=Ui({value:new TypeError("Unserializable return value"),[Oi]:0});e.postMessage(Object.assign(Object.assign({},M),{id:o}),c)})}),e.start&&e.start()}function Jd(t){return t.constructor.name==="MessagePort"}function Xa(t){Jd(t)&&t.close()}function Ja(t,e){return kr(t,[],e)}function Ci(t){if(t)throw new Error("Proxy has been released and is not useable")}function ts(t){return Sn(t,{type:"RELEASE"}).then(()=>{Xa(t)})}const zi=new WeakMap,ki="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(zi.get(t)||0)-1;zi.set(t,e),e===0&&ts(t)});function tg(t,e){const n=(zi.get(e)||0)+1;zi.set(e,n),ki&&ki.register(t,e,t)}function eg(t){ki&&ki.unregister(t)}function kr(t,e=[],n=function(){}){let i=!1;const r=new Proxy(n,{get(o,a){if(Ci(i),a===Wd)return()=>{eg(r),ts(t),i=!0};if(a==="then"){if(e.length===0)return{then:()=>r};const s=Sn(t,{type:"GET",path:e.map(u=>u.toString())}).then(sn);return s.then.bind(s)}return kr(t,[...e,a])},set(o,a,s){Ci(i);const[u,l]=Ui(s);return Sn(t,{type:"SET",path:[...e,a].map(g=>g.toString()),value:u},l).then(sn)},apply(o,a,s){Ci(i);const u=e[e.length-1];if(u===Vd)return Sn(t,{type:"ENDPOINT"}).then(sn);if(u==="bind")return kr(t,e.slice(0,-1));const[l,g]=es(s);return Sn(t,{type:"APPLY",path:e.map(M=>M.toString()),argumentList:l},g).then(sn)},construct(o,a){Ci(i);const[s,u]=es(a);return Sn(t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:s},u).then(sn)}});return tg(r,t),r}function ng(t){return Array.prototype.concat.apply([],t)}function es(t){const e=t.map(Ui);return[e.map(n=>n[0]),ng(e.map(n=>n[1]))]}const ns=new WeakMap;function is(t,e){return ns.set(t,e),t}function ig(t){return Object.assign(t,{[En]:!0})}function Ui(t){for(const[e,n]of Za)if(n.canHandle(t)){const[i,r]=n.serialize(t);return[{type:"HANDLER",name:e,value:i},r]}return[{type:"RAW",value:t},ns.get(t)||[]]}function sn(t){switch(t.type){case"HANDLER":return Za.get(t.name).deserialize(t.value);case"RAW":return t.value}}function Sn(t,e,n){return new Promise(i=>{const r=rg();t.addEventListener("message",function o(a){!a.data||!a.data.id||a.data.id!==r||(t.removeEventListener("message",o),i(a.data))}),t.start&&t.start(),t.postMessage(Object.assign({id:r},e),n)})}function rg(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var Ur=(t=>(t[t.Invalid=0]="Invalid",t[t.RequiresServerPermission=1]="RequiresServerPermission",t[t.Valid=2]="Valid",t))(Ur||{}),Yr=(t=>(t[t.Ok=0]="Ok",t[t.NetworkError=1]="NetworkError",t[t.RemoteLock=2]="RemoteLock",t[t.PermissionExpired=3]="PermissionExpired",t[t.PayloadCorrupted=4]="PayloadCorrupted",t[t.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",t[t.IncorrectTokenState=6]="IncorrectTokenState",t))(Yr||{});(function(t){/**
|
|
6
|
-
|
|
7
|
-
* Copyright 2019 Google LLC
|
|
8
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
*/const e=Symbol("Comlink.proxy"),n=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),r=Symbol("Comlink.finalizer"),o=Symbol("Comlink.thrown"),a=L=>typeof L=="object"&&L!==null||typeof L=="function",s={canHandle:L=>a(L)&&L[e],serialize(L){const{port1:A,port2:G}=new MessageChannel;return M(L,A),[G,[G]]},deserialize(L){return L.start(),d(L)}},u={canHandle:L=>a(L)&&o in L,serialize({value:L}){let A;return L instanceof Error?A={isError:!0,value:{message:L.message,name:L.name,stack:L.stack}}:A={isError:!1,value:L},[A,[]]},deserialize(L){throw L.isError?Object.assign(new Error(L.value.message),L.value):L.value}},l=new Map([["proxy",s],["throw",u]]);function g(L,A){for(const G of L)if(A===G||G==="*"||G instanceof RegExp&&G.test(A))return!0;return!1}function M(L,A=globalThis,G=["*"]){A.addEventListener("message",function rt(W){if(!W||!W.data)return;if(!g(G,W.origin)){console.warn(`Invalid origin '${W.origin}' for comlink proxy`);return}const{id:At,type:X,path:ft}=Object.assign({path:[]},W.data),jt=(W.data.argumentList||[]).map(C);let dt;try{const Mt=ft.slice(0,-1).reduce((at,Ct)=>at[Ct],L),nt=ft.reduce((at,Ct)=>at[Ct],L);switch(X){case"GET":dt=nt;break;case"SET":Mt[ft.slice(-1)[0]]=C(W.data.value),dt=!0;break;case"APPLY":dt=nt.apply(Mt,jt);break;case"CONSTRUCT":{const at=new nt(...jt);dt=Y(at)}break;case"ENDPOINT":{const{port1:at,port2:Ct}=new MessageChannel;M(L,Ct),dt=F(at,[at])}break;case"RELEASE":dt=void 0;break;default:return}}catch(Mt){dt={value:Mt,[o]:0}}Promise.resolve(dt).catch(Mt=>({value:Mt,[o]:0})).then(Mt=>{const[nt,at]=U(Mt);A.postMessage(Object.assign(Object.assign({},nt),{id:At}),at),X==="RELEASE"&&(A.removeEventListener("message",rt),f(A),r in L&&typeof L[r]=="function"&&L[r]())}).catch(Mt=>{const[nt,at]=U({value:new TypeError("Unserializable return value"),[o]:0});A.postMessage(Object.assign(Object.assign({},nt),{id:At}),at)})}),A.start&&A.start()}function c(L){return L.constructor.name==="MessagePort"}function f(L){c(L)&&L.close()}function d(L,A){return j(L,[],A)}function h(L){if(L)throw new Error("Proxy has been released and is not useable")}function y(L){return I(L,{type:"RELEASE"}).then(()=>{f(L)})}const p=new WeakMap,w="FinalizationRegistry"in globalThis&&new FinalizationRegistry(L=>{const A=(p.get(L)||0)-1;p.set(L,A),A===0&&y(L)});function m(L,A){const G=(p.get(A)||0)+1;p.set(A,G),w&&w.register(L,A,L)}function N(L){w&&w.unregister(L)}function j(L,A=[],G=function(){}){let rt=!1;const W=new Proxy(G,{get(At,X){if(h(rt),X===i)return()=>{N(W),y(L),rt=!0};if(X==="then"){if(A.length===0)return{then:()=>W};const ft=I(L,{type:"GET",path:A.map(jt=>jt.toString())}).then(C);return ft.then.bind(ft)}return j(L,[...A,X])},set(At,X,ft){h(rt);const[jt,dt]=U(ft);return I(L,{type:"SET",path:[...A,X].map(Mt=>Mt.toString()),value:jt},dt).then(C)},apply(At,X,ft){h(rt);const jt=A[A.length-1];if(jt===n)return I(L,{type:"ENDPOINT"}).then(C);if(jt==="bind")return j(L,A.slice(0,-1));const[dt,Mt]=S(ft);return I(L,{type:"APPLY",path:A.map(nt=>nt.toString()),argumentList:dt},Mt).then(C)},construct(At,X){h(rt);const[ft,jt]=S(X);return I(L,{type:"CONSTRUCT",path:A.map(dt=>dt.toString()),argumentList:ft},jt).then(C)}});return m(W,L),W}function b(L){return Array.prototype.concat.apply([],L)}function S(L){const A=L.map(U);return[A.map(G=>G[0]),b(A.map(G=>G[1]))]}const v=new WeakMap;function F(L,A){return v.set(L,A),L}function Y(L){return Object.assign(L,{[e]:!0})}function U(L){for(const[A,G]of l)if(G.canHandle(L)){const[rt,W]=G.serialize(L);return[{type:"HANDLER",name:A,value:rt},W]}return[{type:"RAW",value:L},v.get(L)||[]]}function C(L){switch(L.type){case"HANDLER":return l.get(L.name).deserialize(L.value);case"RAW":return L.value}}function I(L,A,G){return new Promise(rt=>{const W=x();L.addEventListener("message",function At(X){!X.data||!X.data.id||X.data.id!==W||(L.removeEventListener("message",At),rt(X.data))}),L.start&&L.start(),L.postMessage(Object.assign({id:W},A),G)})}function x(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const k=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),D=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),P=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),R=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),H=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),q=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),et=()=>(async L=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(L)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));function st(){return/iOS|iPhone|iPad|iPod/i.test(navigator.userAgent)}async function bt(){if(!await et())return!1;if(!("importScripts"in self))throw Error("Not implemented");return st()?!1:"Worker"in self}async function Bt(){const L=[D(),P(),k(),R(),H()];if(!(await Promise.all(L)).every(Boolean))throw new Error("Browser doesn't meet minimum requirements!");return await q()?await bt()?"advanced-threads":"advanced":"basic"}let Lt,B;async function lt(){const L=await Bt();console.log(`Requesting ${L} Wasm build`);const A=self.location.href,G=A.substring(0,A.lastIndexOf("/")),rt=`${G}/${L}/capture-wasm.js`;try{importScripts(rt)}catch(W){console.error("loading scripts failed",W)}return Lt=await self.createModule({locateFile:W=>`${G}/${L}/${W}`,mainScriptUrlOrBlob:rt.toString(),setStatus:W=>{}}),Lt[r]=()=>{console.log("finalizer wasmModule")},Y(Lt)}function Nt(){return Lt||console.warn("Wasm is not initialized yet. Call loadWasm() first."),B=new Lt.Analyzer,B[r]=()=>{console.log("Comlink.finalizer called on Analyzer instance. Deleting instance."),B.delete()},Y(B)}function Ee(L){const A=B.analyze(L);return self.postMessage({},[L.data.buffer]),L=null,A}const oe={createAnalyzer:Nt,loadWasm:lt,analyze:Ee,terminate:()=>self.close(),[r]:()=>{console.log("Comlink.finalizer called on proxyWorker")}};return M(oe),t.proxyWorker=oe,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t})({}),!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(t){const e=performance.now(),n=this.getVideoPlaybackQuality(),i=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames,r=(o,a)=>{const s=this.getVideoPlaybackQuality(),u=this.mozPresentedFrames||this.mozPaintedFrames||s.totalVideoFrames-s.droppedVideoFrames;if(u>i){const l=this.mozFrameDelay||s.totalFrameDelay-n.totalFrameDelay||0,g=a-o;t(a,{presentationTime:a+l*1e3,expectedDisplayTime:a+g,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+g/1e3,presentedFrames:u,processingDuration:l}),delete this._rvfcpolyfillmap[e]}else this._rvfcpolyfillmap[e]=requestAnimationFrame(l=>r(a,l))};return this._rvfcpolyfillmap[e]=requestAnimationFrame(o=>r(e,o)),e},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(t){cancelAnimationFrame(this._rvfcpolyfillmap[t]),delete this._rvfcpolyfillmap[t]});const rs=Element.prototype.attachShadow;function Pr(){return typeof window.ShadyDOM<"u"&&typeof ShadowRoot<"u"}function og(){return typeof ShadowRoot<"u"}function ag(t){rs==null||Pr()||(Element.prototype.attachShadow=function(e){const n=rs.call(this,e);return t(n),n})}function sg(t,...e){const n=new Set(e);let i=!1;const r=()=>{for(const o of n)t(o);n.clear()};return{isRunning(){return i},schedule(o){n.add(o),i&&r()},stop(){i=!1},run(){i||(i=!0,r())}}}const ug={childList:!0,subtree:!0},cg=t=>{typeof queueMicrotask<"u"?queueMicrotask(t):typeof Promise<"u"?Promise.resolve().then(()=>t()):setTimeout(()=>t(),0)};function os(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null)return[...t];{const e=[];for(let n=0;n<t.length;n++)e[n]=t[n];return e}}function lg(t,e){return Pr()?new Set(os(window.ShadyDOM.nativeMethods.querySelectorAll.call(document.documentElement,e))):new Set("querySelectorAll"in t?os(t.querySelectorAll(e)):[])}function dg(t,e){return new Set([...t??[],...e??[]])}function gg(t){return"activeElement"in t}function as(t=document.documentElement){if(gg(t)&&ss(t),Pr()&&t instanceof ShadowRoot||!og())return;const e=t.childNodes,n="shadowRoot"in t&&t.shadowRoot!=null?[t.shadowRoot]:[];for(const i of[...e,...n])as(i)}function hg(t){return"isConnected"in Node.prototype?t.isConnected:t.ownerDocument==null||!(t.ownerDocument.compareDocumentPosition(t)&t.DOCUMENT_POSITION_DISCONNECTED)}const ri=new Map;function fg(t,e){const n=new Set,i=new Set,r=new Map,o=new WeakMap;let a=!1,s=!1,u=!1;const l=()=>{s=!0;const p=[...n];p.length>0&&e(p,t),n.clear(),a=!1,s=!1},g=()=>{a||(a=!0,cg(l))},M=p=>{n.add(p),s||g()},c=()=>{const p=[...n];return n.clear(),p},f=()=>{i.clear()},d=(p,w)=>{let m=r.get(p);const N=lg(p,w),j=m?.get(w),b=dg(N,j);h(b),m==null&&(m=new Map,r.set(p,m)),m.set(w,N)},h=p=>{for(const w of p){const m=o.get(w),N=hg(w);m!==N&&(o.set(w,N),M({connected:N,target:w}))}},y={observedTargets:i,queryRootAndHandleMutationChanges:d,handleMutationChange:h,addObservedTarget:p=>{if(Rr.run(),u||(u=!0,as()),i.add(p),typeof p!="string")h([p]);else for(const w of _r)d(w,p)},clearObservedTargets:f,clearQueue:c};ri.set(t,y)}const Mg=t=>{for(const e of t)if(e.type==="childList")for(const n of ri.values())for(const i of n.observedTargets)typeof i=="string"?n.queryRootAndHandleMutationChanges(e.target,i):n.handleMutationChange([i])},_r=new Set,ss=(()=>{let t;return function(e){_r.has(e)||(_r.add(e),t==null&&(t=new MutationObserver(Mg)),t.observe(e,ug))}})(),Rr=sg(ss,document.documentElement);class un{constructor(e){if(new.target===void 0)throw new TypeError(`Constructor ${un.name} requires 'new'`);if(e===void 0)throw new ReferenceError(`Failed to construct '${un.name}': 1 argument required, but only 0 present.`);if(typeof e!="function")throw new TypeError(`Failed to construct '${un.name}': The callback provided as parameter 1 is not a function.`);fg(this,e)}get[Symbol.toStringTag](){return"ConnectionObserver"}observe(e){if(e===void 0)throw new ReferenceError(`Failed to execute '${this.observe.name}' on '${un.name}': 1 argument required, but only 0 present.`);if(typeof e!="string"&&!(e instanceof Node))throw new TypeError(`Failed to execute '${this.observe.name}' on '${un.name}': parameter 1 is not of type 'Node' or a DOMString.`);ri.get(this)?.addObservedTarget(e)}takeRecords(){const e=ri.get(this);return e==null?[]:e.clearQueue()}disconnect(){ri.get(this)?.clearObservedTargets()}}ag(Rr.schedule.bind(Rr));var yg=function(){function t(e,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),pg=mg(["",""],["",""]);function mg(t,e){return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Ng(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var qt=function(){function t(){for(var e=this,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return Ng(this,t),this.tag=function(o){for(var a=arguments.length,s=Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];return typeof o=="function"?e.interimTag.bind(e,o):typeof o=="string"?e.transformEndResult(o):(o=o.map(e.transformString.bind(e)),e.transformEndResult(o.reduce(e.processSubstitutions.bind(e,s))))},i.length>0&&Array.isArray(i[0])&&(i=i[0]),this.transformers=i.map(function(o){return typeof o=="function"?o():o}),this.tag}return yg(t,[{key:"interimTag",value:function(e,n){for(var i=arguments.length,r=Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return this.tag(pg,e.apply(void 0,[n].concat(r)))}},{key:"processSubstitutions",value:function(e,n,i){var r=this.transformSubstitution(e.shift(),n);return"".concat(n,r,i)}},{key:"transformString",value:function(e){var n=function(i,r){return r.onString?r.onString(i):i};return this.transformers.reduce(n,e)}},{key:"transformSubstitution",value:function(e,n){var i=function(r,o){return o.onSubstitution?o.onSubstitution(r,n):r};return this.transformers.reduce(i,e)}},{key:"transformEndResult",value:function(e){var n=function(i,r){return r.onEndResult?r.onEndResult(i):i};return this.transformers.reduce(n,e)}}]),t}(),Xt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(e){if(t==="")return e.trim();if(t=t.toLowerCase(),t==="start"||t==="left")return e.replace(/^\s*/,"");if(t==="end"||t==="right")return e.replace(/\s*$/,"");throw new Error("Side not supported: "+t)}}};function wg(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var He=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(e){if(t==="initial"){var n=e.match(/^[^\S\n]*(?=\S)/gm),i=n&&Math.min.apply(Math,wg(n.map(function(o){return o.length})));if(i){var r=new RegExp("^.{"+i+"}","gm");return e.replace(r,"")}return e}if(t==="all")return e.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+t)}}},bn=function(t,e){return{onEndResult:function(n){if(t==null||e==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return n.replace(t,e)}}},An=function(t,e){return{onSubstitution:function(n,i){if(t==null||e==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return n==null?n:n.toString().replace(t,e)}}},Lg={separator:"",conjunction:"",serial:!1},De=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Lg;return{onSubstitution:function(e,n){if(Array.isArray(e)){var i=e.length,r=t.separator,o=t.conjunction,a=t.serial,s=n.match(/(\n?[^\S\n]+)$/);if(s?e=e.join(r+s[1]):e=e.join(r+" "),o&&i>1){var u=e.lastIndexOf(r);e=e.slice(0,u)+(a?r:"")+" "+o+e.slice(u+1)}}return e}}},us=function(t){return{onSubstitution:function(e,n){if(t!=null&&typeof t=="string")typeof e=="string"&&e.includes(t)&&(e=e.split(t));else throw new Error("You need to specify a string character to split by.");return e}}},cs=function(t){return t!=null&&!Number.isNaN(t)&&typeof t!="boolean"},Tg=function(){return{onSubstitution:function(t){return Array.isArray(t)?t.filter(cs):cs(t)?t:""}}};new qt(De({separator:","}),He,Xt),new qt(De({separator:",",conjunction:"and"}),He,Xt),new qt(De({separator:",",conjunction:"or"}),He,Xt),new qt(us(`
|
|
10
|
-
`),Tg,De,He,Xt),new qt(us(`
|
|
11
|
-
`),De,He,Xt,An(/&/g,"&"),An(/</g,"<"),An(/>/g,">"),An(/"/g,"""),An(/'/g,"'"),An(/`/g,"`")),new qt(bn(/(?:\n(?:\s*))+/g," "),Xt),new qt(bn(/(?:\n\s*)/g,""),Xt),new qt(De({separator:","}),bn(/(?:\s+)/g," "),Xt),new qt(De({separator:",",conjunction:"or"}),bn(/(?:\s+)/g," "),Xt),new qt(De({separator:",",conjunction:"and"}),bn(/(?:\s+)/g," "),Xt),new qt(De,He,Xt),new qt(De,bn(/(?:\s+)/g," "),Xt),new qt(He,Xt);var ls=new qt(He("all"),Xt),jg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fr={exports:{}};(function(t,e){(function(n,i){var r="1.0.35",o="",a="?",s="function",u="undefined",l="object",g="string",M="major",c="model",f="name",d="type",h="vendor",y="version",p="architecture",w="console",m="mobile",N="tablet",j="smarttv",b="wearable",S="embedded",v=350,F="Amazon",Y="Apple",U="ASUS",C="BlackBerry",I="Browser",x="Chrome",k="Edge",D="Firefox",P="Google",R="Huawei",H="LG",q="Microsoft",et="Motorola",st="Opera",bt="Samsung",Bt="Sharp",Lt="Sony",B="Xiaomi",lt="Zebra",Nt="Facebook",Ee="Chromium OS",oe="Mac OS",L=function(_,K){var z={};for(var $ in _)K[$]&&K[$].length%2===0?z[$]=K[$].concat(_[$]):z[$]=_[$];return z},A=function(_){for(var K={},z=0;z<_.length;z++)K[_[z].toUpperCase()]=_[z];return K},G=function(_,K){return typeof _===g?rt(K).indexOf(rt(_))!==-1:!1},rt=function(_){return _.toLowerCase()},W=function(_){return typeof _===g?_.replace(/[^\d\.]/g,o).split(".")[0]:i},At=function(_,K){if(typeof _===g)return _=_.replace(/^\s\s*/,o),typeof K===u?_:_.substring(0,v)},X=function(_,K){for(var z=0,$,Ht,zt,Q,O,Yt;z<K.length&&!O;){var jn=K[z],xi=K[z+1];for($=Ht=0;$<jn.length&&!O&&jn[$];)if(O=jn[$++].exec(_),O)for(zt=0;zt<xi.length;zt++)Yt=O[++Ht],Q=xi[zt],typeof Q===l&&Q.length>0?Q.length===2?typeof Q[1]==s?this[Q[0]]=Q[1].call(this,Yt):this[Q[0]]=Q[1]:Q.length===3?typeof Q[1]===s&&!(Q[1].exec&&Q[1].test)?this[Q[0]]=Yt?Q[1].call(this,Yt,Q[2]):i:this[Q[0]]=Yt?Yt.replace(Q[1],Q[2]):i:Q.length===4&&(this[Q[0]]=Yt?Q[3].call(this,Yt.replace(Q[1],Q[2])):i):this[Q]=Yt||i;z+=2}},ft=function(_,K){for(var z in K)if(typeof K[z]===l&&K[z].length>0){for(var $=0;$<K[z].length;$++)if(G(K[z][$],_))return z===a?i:z}else if(G(K[z],_))return z===a?i:z;return _},jt={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},dt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Mt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,y],[/opios[\/ ]+([\w\.]+)/i],[y,[f,st+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[f,st]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[f,"UC"+I]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[y,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+I],y],[/\bfocus\/([\w\.]+)/i],[y,[f,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[f,st+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[f,st+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[f,"MIUI "+I]],[/fxios\/([-\w\.]+)/i],[y,[f,D]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+I]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+I],y],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[f,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,Nt],y],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[f,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[f,x+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,x+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[f,"Android "+I]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[y,ft,jt]],[/(webkit|khtml)\/([\w\.]+)/i],[f,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[f,D+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,y],[/(cobalt)\/([\w\.]+)/i],[f,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,rt]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,o,rt]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,rt]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[h,bt],[d,N]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,bt],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,Y],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,Y],[d,N]],[/(macintosh);/i],[c,[h,Y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,Bt],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,R],[d,N]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,R],[d,m]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[h,B],[d,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,B],[d,N]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[c,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[h,et],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,et],[d,N]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,H],[d,N]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,H],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,N]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,P],[d,N]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,P],[d,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[h,Lt],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,Lt],[d,N]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,F],[d,N]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,F],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,N]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,C],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,U],[d,N]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,U],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,N]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/g," "],[d,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,N]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,c,[d,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,c,[d,N]],[/(surface duo)/i],[c,[h,q],[d,N]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,N]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,N]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,N]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,N]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,N]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,N]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,N]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,N]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,N]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,N]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,N]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,N]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,N]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,N]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,N]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,q],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,lt],[d,N]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,lt],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,j]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,bt],[d,j]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,H],[d,j]],[/(apple) ?tv/i],[h,[c,Y+" TV"],[d,j]],[/crkey/i],[[c,x+"cast"],[h,P],[d,j]],[/droid.+aft(\w)( bui|\))/i],[c,[h,F],[d,j]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,Bt],[d,j]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,Lt],[d,j]],[/(mitv-\w{5}) bui/i],[c,[h,B],[d,j]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,j]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,At],[c,At],[d,j]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,j]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,w]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,w]],[/(playstation [345portablevi]+)/i],[c,[h,Lt],[d,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,q],[d,w]],[/((pebble))app/i],[h,c,[d,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,Y],[d,b]],[/droid.+; (glass) \d/i],[c,[h,P],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,lt],[d,b]],[/(quest( 2| pro)?)/i],[c,[h,Nt],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,S]],[/(aeobc)\b/i],[c,[h,F],[d,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,N]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,N]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[f,k+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[f,[y,ft,dt]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[y,ft,dt]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,oe],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,y],[/\(bb(10);/i],[y,[f,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[f,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[f,x+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,Ee],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,y],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,y]]},nt=function(_,K){if(typeof _===l&&(K=_,_=i),!(this instanceof nt))return new nt(_,K).getResult();var z=typeof n!==u&&n.navigator?n.navigator:i,$=_||(z&&z.userAgent?z.userAgent:o),Ht=z&&z.userAgentData?z.userAgentData:i,zt=K?L(Mt,K):Mt,Q=z&&z.userAgent==$;return this.getBrowser=function(){var O={};return O[f]=i,O[y]=i,X.call(O,$,zt.browser),O[M]=W(O[y]),Q&&z&&z.brave&&typeof z.brave.isBrave==s&&(O[f]="Brave"),O},this.getCPU=function(){var O={};return O[p]=i,X.call(O,$,zt.cpu),O},this.getDevice=function(){var O={};return O[h]=i,O[c]=i,O[d]=i,X.call(O,$,zt.device),Q&&!O[d]&&Ht&&Ht.mobile&&(O[d]=m),Q&&O[c]=="Macintosh"&&z&&typeof z.standalone!==u&&z.maxTouchPoints&&z.maxTouchPoints>2&&(O[c]="iPad",O[d]=N),O},this.getEngine=function(){var O={};return O[f]=i,O[y]=i,X.call(O,$,zt.engine),O},this.getOS=function(){var O={};return O[f]=i,O[y]=i,X.call(O,$,zt.os),Q&&!O[f]&&Ht&&Ht.platform!="Unknown"&&(O[f]=Ht.platform.replace(/chrome os/i,Ee).replace(/macos/i,oe)),O},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return $},this.setUA=function(O){return $=typeof O===g&&O.length>v?At(O,v):O,this},this.setUA($),this};nt.VERSION=r,nt.BROWSER=A([f,y,M]),nt.CPU=A([p]),nt.DEVICE=A([c,h,d,w,m,j,N,b,S]),nt.ENGINE=nt.OS=A([f,y]),t.exports&&(e=t.exports=nt),e.UAParser=nt;var at=typeof n!==u&&(n.jQuery||n.Zepto);if(at&&!at.ua){var Ct=new nt;at.ua=Ct.getResult(),at.ua.get=function(){return Ct.getUA()},at.ua.set=function(_){Ct.setUA(_);var K=Ct.getResult();for(var z in K)at.ua[z]=K[z]}}})(typeof window=="object"?window:jg)})(Fr,Fr.exports);var Sg=Fr.exports;const bg=Eg(Sg);function ds(t){const e=Object.keys(t);if(e.length===0)throw new Error("No members in object!");let n=e[0],i=-1/0;for(const[r,o]of Object.entries(t))o>i&&(i=o,n=r);return n}const gs=t=>{if(t instanceof Error)return t;try{return new Error(JSON.stringify(t))}catch{return new Error(String(t))}};let hs=class{deviceInfo;settings;activeStream;name;#t;constructor(e,n){this.deviceInfo=e,this.name=e.label,this.activeStream=null,this.#t=Ms(e),this.settings=n}async startStream(){if(this.activeStream)return this.activeStream;const e=await navigator.mediaDevices.getUserMedia(this.#t);this.activeStream=e,e.onaddtrack=i=>console.log("added track",i),e.onremovetrack=i=>console.log("removed track",i);const n=e.getVideoTracks()[0];return n.onended=i=>{console.log("track ended",i),this.stopStream()},e}stopStream(){this.activeStream&&(console.log(`Stopping active stream on ${this.name}`),Qr(this.activeStream),this.activeStream=null)}getVideoTrack(){if(this.activeStream)return this.activeStream.getVideoTracks()[0]}};const Br=new bg,Hr=Br.getOS().name==="Android",fs=Br.getOS().name==="iOS",Ag=async()=>{try{const t=await navigator.mediaDevices.getUserMedia({video:!0});Qr(t)}catch{throw new Error("Camera permission not given")}},vg=async()=>{if(!navigator.mediaDevices)throw new Error(ls`
|
|
5
|
+
*/const Nn=Symbol("Comlink.proxy"),qd=Symbol("Comlink.endpoint"),Xd=Symbol("Comlink.releaseProxy"),Or=Symbol("Comlink.finalizer"),Ii=Symbol("Comlink.thrown"),Zs=t=>typeof t=="object"&&t!==null||typeof t=="function",Jd={canHandle:t=>Zs(t)&&t[Nn],serialize(t){const{port1:e,port2:n}=new MessageChannel;return Xs(t,e),[n,[n]]},deserialize(t){return t.start(),ta(t)}},tg={canHandle:t=>Zs(t)&&Ii in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},qs=new Map([["proxy",Jd],["throw",tg]]);function eg(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function Xs(t,e=globalThis,n=["*"]){e.addEventListener("message",function i(r){if(!r||!r.data)return;if(!eg(n,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:o,type:s,path:a}=Object.assign({path:[]},r.data),u=(r.data.argumentList||[]).map(Je);let l;try{const g=a.slice(0,-1).reduce((c,f)=>c[f],t),M=a.reduce((c,f)=>c[f],t);switch(s){case"GET":l=M;break;case"SET":g[a.slice(-1)[0]]=Je(r.data.value),l=!0;break;case"APPLY":l=M.apply(g,u);break;case"CONSTRUCT":{const c=new M(...u);l=sg(c)}break;case"ENDPOINT":{const{port1:c,port2:f}=new MessageChannel;Xs(t,f),l=ra(c,[c])}break;case"RELEASE":l=void 0;break;default:return}}catch(g){l={value:g,[Ii]:0}}Promise.resolve(l).catch(g=>({value:g,[Ii]:0})).then(g=>{const[M,c]=zi(g);e.postMessage(Object.assign(Object.assign({},M),{id:o}),c),s==="RELEASE"&&(e.removeEventListener("message",i),Js(e),Or in t&&typeof t[Or]=="function"&&t[Or]())}).catch(g=>{const[M,c]=zi({value:new TypeError("Unserializable return value"),[Ii]:0});e.postMessage(Object.assign(Object.assign({},M),{id:o}),c)})}),e.start&&e.start()}function ng(t){return t.constructor.name==="MessagePort"}function Js(t){ng(t)&&t.close()}function ta(t,e){return Cr(t,[],e)}function xi(t){if(t)throw new Error("Proxy has been released and is not useable")}function ea(t){return wn(t,{type:"RELEASE"}).then(()=>{Js(t)})}const Oi=new WeakMap,Ci="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(Oi.get(t)||0)-1;Oi.set(t,e),e===0&&ea(t)});function ig(t,e){const n=(Oi.get(e)||0)+1;Oi.set(e,n),Ci&&Ci.register(t,e,t)}function rg(t){Ci&&Ci.unregister(t)}function Cr(t,e=[],n=function(){}){let i=!1;const r=new Proxy(n,{get(o,s){if(xi(i),s===Xd)return()=>{rg(r),ea(t),i=!0};if(s==="then"){if(e.length===0)return{then:()=>r};const a=wn(t,{type:"GET",path:e.map(u=>u.toString())}).then(Je);return a.then.bind(a)}return Cr(t,[...e,s])},set(o,s,a){xi(i);const[u,l]=zi(a);return wn(t,{type:"SET",path:[...e,s].map(g=>g.toString()),value:u},l).then(Je)},apply(o,s,a){xi(i);const u=e[e.length-1];if(u===qd)return wn(t,{type:"ENDPOINT"}).then(Je);if(u==="bind")return Cr(t,e.slice(0,-1));const[l,g]=na(a);return wn(t,{type:"APPLY",path:e.map(M=>M.toString()),argumentList:l},g).then(Je)},construct(o,s){xi(i);const[a,u]=na(s);return wn(t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:a},u).then(Je)}});return ig(r,t),r}function og(t){return Array.prototype.concat.apply([],t)}function na(t){const e=t.map(zi);return[e.map(n=>n[0]),og(e.map(n=>n[1]))]}const ia=new WeakMap;function ra(t,e){return ia.set(t,e),t}function sg(t){return Object.assign(t,{[Nn]:!0})}function zi(t){for(const[e,n]of qs)if(n.canHandle(t)){const[i,r]=n.serialize(t);return[{type:"HANDLER",name:e,value:i},r]}return[{type:"RAW",value:t},ia.get(t)||[]]}function Je(t){switch(t.type){case"HANDLER":return qs.get(t.name).deserialize(t.value);case"RAW":return t.value}}function wn(t,e,n){return new Promise(i=>{const r=ag();t.addEventListener("message",function o(s){!s.data||!s.data.id||s.data.id!==r||(t.removeEventListener("message",o),i(s.data))}),t.start&&t.start(),t.postMessage(Object.assign({id:r},e),n)})}function ag(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var zr=(t=>(t[t.Invalid=0]="Invalid",t[t.RequiresServerPermission=1]="RequiresServerPermission",t[t.Valid=2]="Valid",t))(zr||{}),kr=(t=>(t[t.Ok=0]="Ok",t[t.NetworkError=1]="NetworkError",t[t.RemoteLock=2]="RemoteLock",t[t.PermissionExpired=3]="PermissionExpired",t[t.PayloadCorrupted=4]="PayloadCorrupted",t[t.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",t[t.IncorrectTokenState=6]="IncorrectTokenState",t))(kr||{});!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(t){const e=performance.now(),n=this.getVideoPlaybackQuality(),i=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames,r=(o,s)=>{const a=this.getVideoPlaybackQuality(),u=this.mozPresentedFrames||this.mozPaintedFrames||a.totalVideoFrames-a.droppedVideoFrames;if(u>i){const l=this.mozFrameDelay||a.totalFrameDelay-n.totalFrameDelay||0,g=s-o;t(s,{presentationTime:s+l*1e3,expectedDisplayTime:s+g,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+g/1e3,presentedFrames:u,processingDuration:l}),delete this._rvfcpolyfillmap[e]}else this._rvfcpolyfillmap[e]=requestAnimationFrame(l=>r(s,l))};return this._rvfcpolyfillmap[e]=requestAnimationFrame(o=>r(e,o)),e},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(t){cancelAnimationFrame(this._rvfcpolyfillmap[t]),delete this._rvfcpolyfillmap[t]});const oa=Element.prototype.attachShadow;function Ur(){return typeof window.ShadyDOM<"u"&&typeof ShadowRoot<"u"}function ug(){return typeof ShadowRoot<"u"}function cg(t){oa==null||Ur()||(Element.prototype.attachShadow=function(e){const n=oa.call(this,e);return t(n),n})}function lg(t,...e){const n=new Set(e);let i=!1;const r=()=>{for(const o of n)t(o);n.clear()};return{isRunning(){return i},schedule(o){n.add(o),i&&r()},stop(){i=!1},run(){i||(i=!0,r())}}}const dg={childList:!0,subtree:!0},gg=t=>{typeof queueMicrotask<"u"?queueMicrotask(t):typeof Promise<"u"?Promise.resolve().then(()=>t()):setTimeout(()=>t(),0)};function sa(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null)return[...t];{const e=[];for(let n=0;n<t.length;n++)e[n]=t[n];return e}}function hg(t,e){return Ur()?new Set(sa(window.ShadyDOM.nativeMethods.querySelectorAll.call(document.documentElement,e))):new Set("querySelectorAll"in t?sa(t.querySelectorAll(e)):[])}function fg(t,e){return new Set([...t??[],...e??[]])}function Mg(t){return"activeElement"in t}function aa(t=document.documentElement){if(Mg(t)&&ua(t),Ur()&&t instanceof ShadowRoot||!ug())return;const e=t.childNodes,n="shadowRoot"in t&&t.shadowRoot!=null?[t.shadowRoot]:[];for(const i of[...e,...n])aa(i)}function yg(t){return"isConnected"in Node.prototype?t.isConnected:t.ownerDocument==null||!(t.ownerDocument.compareDocumentPosition(t)&t.DOCUMENT_POSITION_DISCONNECTED)}const ti=new Map;function pg(t,e){const n=new Set,i=new Set,r=new Map,o=new WeakMap;let s=!1,a=!1,u=!1;const l=()=>{a=!0;const p=[...n];p.length>0&&e(p,t),n.clear(),s=!1,a=!1},g=()=>{s||(s=!0,gg(l))},M=p=>{n.add(p),a||g()},c=()=>{const p=[...n];return n.clear(),p},f=()=>{i.clear()},d=(p,w)=>{let m=r.get(p);const N=hg(p,w),T=m?.get(w),E=fg(N,T);h(E),m==null&&(m=new Map,r.set(p,m)),m.set(w,N)},h=p=>{for(const w of p){const m=o.get(w),N=yg(w);m!==N&&(o.set(w,N),M({connected:N,target:w}))}},y={observedTargets:i,queryRootAndHandleMutationChanges:d,handleMutationChange:h,addObservedTarget:p=>{if(_r.run(),u||(u=!0,aa()),i.add(p),typeof p!="string")h([p]);else for(const w of Yr)d(w,p)},clearObservedTargets:f,clearQueue:c};ti.set(t,y)}const mg=t=>{for(const e of t)if(e.type==="childList")for(const n of ti.values())for(const i of n.observedTargets)typeof i=="string"?n.queryRootAndHandleMutationChanges(e.target,i):n.handleMutationChange([i])},Yr=new Set,ua=(()=>{let t;return function(e){Yr.has(e)||(Yr.add(e),t==null&&(t=new MutationObserver(mg)),t.observe(e,dg))}})(),_r=lg(ua,document.documentElement);let Ng=class Jn{constructor(e){if(new.target===void 0)throw new TypeError(`Constructor ${Jn.name} requires 'new'`);if(e===void 0)throw new ReferenceError(`Failed to construct '${Jn.name}': 1 argument required, but only 0 present.`);if(typeof e!="function")throw new TypeError(`Failed to construct '${Jn.name}': The callback provided as parameter 1 is not a function.`);pg(this,e)}get[Symbol.toStringTag](){return"ConnectionObserver"}observe(e){if(e===void 0)throw new ReferenceError(`Failed to execute '${this.observe.name}' on '${Jn.name}': 1 argument required, but only 0 present.`);if(typeof e!="string"&&!(e instanceof Node))throw new TypeError(`Failed to execute '${this.observe.name}' on '${Jn.name}': parameter 1 is not of type 'Node' or a DOMString.`);ti.get(this)?.addObservedTarget(e)}takeRecords(){const e=ti.get(this);return e==null?[]:e.clearQueue()}disconnect(){ti.get(this)?.clearObservedTargets()}};cg(_r.schedule.bind(_r));var wg=function(){function t(e,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Lg=Tg(["",""],["",""]);function Tg(t,e){return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function jg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Yt=function(){function t(){for(var e=this,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return jg(this,t),this.tag=function(o){for(var s=arguments.length,a=Array(s>1?s-1:0),u=1;u<s;u++)a[u-1]=arguments[u];return typeof o=="function"?e.interimTag.bind(e,o):typeof o=="string"?e.transformEndResult(o):(o=o.map(e.transformString.bind(e)),e.transformEndResult(o.reduce(e.processSubstitutions.bind(e,a))))},i.length>0&&Array.isArray(i[0])&&(i=i[0]),this.transformers=i.map(function(o){return typeof o=="function"?o():o}),this.tag}return wg(t,[{key:"interimTag",value:function(e,n){for(var i=arguments.length,r=Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return this.tag(Lg,e.apply(void 0,[n].concat(r)))}},{key:"processSubstitutions",value:function(e,n,i){var r=this.transformSubstitution(e.shift(),n);return"".concat(n,r,i)}},{key:"transformString",value:function(e){var n=function(i,r){return r.onString?r.onString(i):i};return this.transformers.reduce(n,e)}},{key:"transformSubstitution",value:function(e,n){var i=function(r,o){return o.onSubstitution?o.onSubstitution(r,n):r};return this.transformers.reduce(i,e)}},{key:"transformEndResult",value:function(e){var n=function(i,r){return r.onEndResult?r.onEndResult(i):i};return this.transformers.reduce(n,e)}}]),t}(),_t=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(e){if(t==="")return e.trim();if(t=t.toLowerCase(),t==="start"||t==="left")return e.replace(/^\s*/,"");if(t==="end"||t==="right")return e.replace(/\s*$/,"");throw new Error("Side not supported: "+t)}}};function Sg(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var ze=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(e){if(t==="initial"){var n=e.match(/^[^\S\n]*(?=\S)/gm),i=n&&Math.min.apply(Math,Sg(n.map(function(o){return o.length})));if(i){var r=new RegExp("^.{"+i+"}","gm");return e.replace(r,"")}return e}if(t==="all")return e.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+t)}}},Ln=function(t,e){return{onEndResult:function(n){if(t==null||e==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return n.replace(t,e)}}},Tn=function(t,e){return{onSubstitution:function(n,i){if(t==null||e==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return n==null?n:n.toString().replace(t,e)}}},Eg={separator:"",conjunction:"",serial:!1},me=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Eg;return{onSubstitution:function(e,n){if(Array.isArray(e)){var i=e.length,r=t.separator,o=t.conjunction,s=t.serial,a=n.match(/(\n?[^\S\n]+)$/);if(a?e=e.join(r+a[1]):e=e.join(r+" "),o&&i>1){var u=e.lastIndexOf(r);e=e.slice(0,u)+(s?r:"")+" "+o+e.slice(u+1)}}return e}}},ca=function(t){return{onSubstitution:function(e,n){if(t!=null&&typeof t=="string")typeof e=="string"&&e.includes(t)&&(e=e.split(t));else throw new Error("You need to specify a string character to split by.");return e}}},la=function(t){return t!=null&&!Number.isNaN(t)&&typeof t!="boolean"},bg=function(){return{onSubstitution:function(t){return Array.isArray(t)?t.filter(la):la(t)?t:""}}};new Yt(me({separator:","}),ze,_t),new Yt(me({separator:",",conjunction:"and"}),ze,_t),new Yt(me({separator:",",conjunction:"or"}),ze,_t),new Yt(ca(`
|
|
6
|
+
`),bg,me,ze,_t),new Yt(ca(`
|
|
7
|
+
`),me,ze,_t,Tn(/&/g,"&"),Tn(/</g,"<"),Tn(/>/g,">"),Tn(/"/g,"""),Tn(/'/g,"'"),Tn(/`/g,"`")),new Yt(Ln(/(?:\n(?:\s*))+/g," "),_t),new Yt(Ln(/(?:\n\s*)/g,""),_t),new Yt(me({separator:","}),Ln(/(?:\s+)/g," "),_t),new Yt(me({separator:",",conjunction:"or"}),Ln(/(?:\s+)/g," "),_t),new Yt(me({separator:",",conjunction:"and"}),Ln(/(?:\s+)/g," "),_t),new Yt(me,ze,_t),new Yt(me,Ln(/(?:\s+)/g," "),_t),new Yt(ze,_t);var Pr=new Yt(ze("all"),_t),Ag=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Rr={exports:{}};(function(t,e){(function(n,i){var r="1.0.35",o="",s="?",a="function",u="undefined",l="object",g="string",M="major",c="model",f="name",d="type",h="vendor",y="version",p="architecture",w="console",m="mobile",N="tablet",T="smarttv",E="wearable",S="embedded",A=350,P="Amazon",U="Apple",Y="ASUS",C="BlackBerry",D="Browser",v="Chrome",O="Edge",b="Firefox",k="Google",_="Huawei",B="LG",Z="Microsoft",X="Motorola",nt="Opera",pt="Samsung",te="Sharp",Ct="Sony",H="Xiaomi",at="Zebra",lt="Facebook",qe="Chromium OS",Xe="Mac OS",Oe=function(z,F){var x={};for(var Q in z)F[Q]&&F[Q].length%2===0?x[Q]=F[Q].concat(z[Q]):x[Q]=z[Q];return x},de=function(z){for(var F={},x=0;x<z.length;x++)F[z[x].toUpperCase()]=z[x];return F},Mn=function(z,F){return typeof z===g?ye(F).indexOf(ye(z))!==-1:!1},ye=function(z){return z.toLowerCase()},$s=function(z){return typeof z===g?z.replace(/[^\d\.]/g,o).split(".")[0]:i},yn=function(z,F){if(typeof z===g)return z=z.replace(/^\s\s*/,o),typeof F===u?z:z.substring(0,A)},pe=function(z,F){for(var x=0,Q,At,wt,R,I,jt;x<F.length&&!I;){var mn=F[x],vi=F[x+1];for(Q=At=0;Q<mn.length&&!I&&mn[Q];)if(I=mn[Q++].exec(z),I)for(wt=0;wt<vi.length;wt++)jt=I[++At],R=vi[wt],typeof R===l&&R.length>0?R.length===2?typeof R[1]==a?this[R[0]]=R[1].call(this,jt):this[R[0]]=R[1]:R.length===3?typeof R[1]===a&&!(R[1].exec&&R[1].test)?this[R[0]]=jt?R[1].call(this,jt,R[2]):i:this[R[0]]=jt?jt.replace(R[1],R[2]):i:R.length===4&&(this[R[0]]=jt?R[3].call(this,jt.replace(R[1],R[2])):i):this[R]=jt||i;x+=2}},pn=function(z,F){for(var x in F)if(typeof F[x]===l&&F[x].length>0){for(var Q=0;Q<F[x].length;Q++)if(Mn(F[x][Q],z))return x===s?i:x}else if(Mn(F[x],z))return x===s?i:x;return z},Vs={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ai={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Di={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,y],[/opios[\/ ]+([\w\.]+)/i],[y,[f,nt+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[f,nt]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[f,"UC"+D]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[y,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+D],y],[/\bfocus\/([\w\.]+)/i],[y,[f,b+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[f,nt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[f,nt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[f,"MIUI "+D]],[/fxios\/([-\w\.]+)/i],[y,[f,b]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+D]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+D],y],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[f,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,lt],y],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[f,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[f,v+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,v+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[f,"Android "+D]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[y,pn,Vs]],[/(webkit|khtml)\/([\w\.]+)/i],[f,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[f,b+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,y],[/(cobalt)\/([\w\.]+)/i],[f,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,ye]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,o,ye]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,ye]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[h,pt],[d,N]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,pt],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,U],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,U],[d,N]],[/(macintosh);/i],[c,[h,U]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,te],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,_],[d,N]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,_],[d,m]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[h,H],[d,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,H],[d,N]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[c,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[h,X],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,X],[d,N]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,B],[d,N]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,B],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,N]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,k],[d,N]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,k],[d,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[h,Ct],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,Ct],[d,N]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,P],[d,N]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,P],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,N]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,C],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,Y],[d,N]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,Y],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,N]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/g," "],[d,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,N]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,c,[d,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,c,[d,N]],[/(surface duo)/i],[c,[h,Z],[d,N]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,N]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,N]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,N]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,N]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,N]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,N]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,N]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,N]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,N]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,N]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,N]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,N]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,N]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,N]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,N]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,Z],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,at],[d,N]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,at],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,T]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,pt],[d,T]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,B],[d,T]],[/(apple) ?tv/i],[h,[c,U+" TV"],[d,T]],[/crkey/i],[[c,v+"cast"],[h,k],[d,T]],[/droid.+aft(\w)( bui|\))/i],[c,[h,P],[d,T]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,te],[d,T]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,Ct],[d,T]],[/(mitv-\w{5}) bui/i],[c,[h,H],[d,T]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,T]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,yn],[c,yn],[d,T]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,T]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,w]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,w]],[/(playstation [345portablevi]+)/i],[c,[h,Ct],[d,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,Z],[d,w]],[/((pebble))app/i],[h,c,[d,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,U],[d,E]],[/droid.+; (glass) \d/i],[c,[h,k],[d,E]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,at],[d,E]],[/(quest( 2| pro)?)/i],[c,[h,lt],[d,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,S]],[/(aeobc)\b/i],[c,[h,P],[d,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,N]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,N]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[f,O+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[f,[y,pn,Ai]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[y,pn,Ai]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,Xe],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,y],[/\(bb(10);/i],[y,[f,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[f,b+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[f,v+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,qe],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,y],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,y]]},yt=function(z,F){if(typeof z===l&&(F=z,z=i),!(this instanceof yt))return new yt(z,F).getResult();var x=typeof n!==u&&n.navigator?n.navigator:i,Q=z||(x&&x.userAgent?x.userAgent:o),At=x&&x.userAgentData?x.userAgentData:i,wt=F?Oe(Di,F):Di,R=x&&x.userAgent==Q;return this.getBrowser=function(){var I={};return I[f]=i,I[y]=i,pe.call(I,Q,wt.browser),I[M]=$s(I[y]),R&&x&&x.brave&&typeof x.brave.isBrave==a&&(I[f]="Brave"),I},this.getCPU=function(){var I={};return I[p]=i,pe.call(I,Q,wt.cpu),I},this.getDevice=function(){var I={};return I[h]=i,I[c]=i,I[d]=i,pe.call(I,Q,wt.device),R&&!I[d]&&At&&At.mobile&&(I[d]=m),R&&I[c]=="Macintosh"&&x&&typeof x.standalone!==u&&x.maxTouchPoints&&x.maxTouchPoints>2&&(I[c]="iPad",I[d]=N),I},this.getEngine=function(){var I={};return I[f]=i,I[y]=i,pe.call(I,Q,wt.engine),I},this.getOS=function(){var I={};return I[f]=i,I[y]=i,pe.call(I,Q,wt.os),R&&!I[f]&&At&&At.platform!="Unknown"&&(I[f]=At.platform.replace(/chrome os/i,qe).replace(/macos/i,Xe)),I},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Q},this.setUA=function(I){return Q=typeof I===g&&I.length>A?yn(I,A):I,this},this.setUA(Q),this};yt.VERSION=r,yt.BROWSER=de([f,y,M]),yt.CPU=de([p]),yt.DEVICE=de([c,h,d,w,m,T,N,E,S]),yt.ENGINE=yt.OS=de([f,y]),t.exports&&(e=t.exports=yt),e.UAParser=yt;var ee=typeof n!==u&&(n.jQuery||n.Zepto);if(ee&&!ee.ua){var Ce=new yt;ee.ua=Ce.getResult(),ee.ua.get=function(){return Ce.getUA()},ee.ua.set=function(z){Ce.setUA(z);var F=Ce.getResult();for(var x in F)ee.ua[x]=F[x]}}})(typeof window=="object"?window:Ag)})(Rr,Rr.exports);var vg=Rr.exports;const Ig=Dg(vg);function da(t){const e=Object.keys(t);if(e.length===0)throw new Error("No members in object!");let n=e[0],i=-1/0;for(const[r,o]of Object.entries(t))o>i&&(i=o,n=r);return n}const ga=t=>{if(t instanceof Error)return t;try{return new Error(JSON.stringify(t))}catch{return new Error(String(t))}};let ha=class{deviceInfo;settings;activeStream;name;#t;constructor(e,n){this.deviceInfo=e,this.name=e.label,this.activeStream=null,this.#t=Ma(e),this.settings=n}async startStream(){if(this.activeStream)return this.activeStream;const e=await navigator.mediaDevices.getUserMedia(this.#t);this.activeStream=e,e.onaddtrack=i=>console.log("added track",i),e.onremovetrack=i=>console.log("removed track",i);const n=e.getVideoTracks()[0];return n.onended=i=>{console.log("track ended",i),this.stopStream()},e}stopStream(){this.activeStream&&(console.log(`Stopping active stream on ${this.name}`),Hr(this.activeStream),this.activeStream=null)}getVideoTrack(){if(this.activeStream)return this.activeStream.getVideoTracks()[0]}};const Br=new Ig,Fr=Br.getOS().name==="Android",fa=Br.getOS().name==="iOS",xg=async()=>{try{const t=await navigator.mediaDevices.getUserMedia({video:!0});Hr(t)}catch{throw new Error("Camera permission not given")}},Og=async()=>{if(!navigator.mediaDevices)throw new Error(Pr`
|
|
12
8
|
Cameras can only be used in a secure context:
|
|
13
9
|
https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
|
|
14
|
-
`);return await Ag(),(await navigator.mediaDevices.enumerateDevices()).filter(t=>t.kind==="videoinput")};async function Dg(t){try{const e=await Og(t),n=e.getVideoTracks()[0].getSettings();return Qr(e),new hs(t,n)}catch{return console.warn(`DEBUG: Device ${t.deviceId} doesn't support this constraint.`),null}}const Ig=t=>{if(Br.getOS().name!=="Android")return;if(t.some(i=>i.settings.facingMode===void 0)){console.warn("Not all devices have facingMode");return}let e=0,n=0;for(const i of t){const r=i.settings.facingMode;r==="environment"&&(i.name=`Back camera ${++n}`),r==="user"&&(i.name=`Front camera ${++e}`)}},Qr=t=>{const e=t.getTracks();for(const n of e)n.stop()},xg=t=>{const e={};for(const n of t){const i=n.deviceInfo.deviceId;e[i]=0,n.settings.facingMode==="environment"&&(e[i]+=2),Hr&&"torch"in n.settings&&(e[i]+=2),Hr&&n.settings.focusMode==="single-shot"&&(e[i]+=2),Hr&&n===t[t.length]&&(e[i]+=1),fs&&n.name==="Back Triple Camera"&&(e[i]+=5),fs&&n.name==="Back Dual Wide Camera"&&(e[i]+=3)}return ds(e)};function Ms(t){return{video:{deviceId:{exact:t.deviceId},frameRate:{exact:30},width:{exact:1920},height:{exact:1080}},audio:!1}}async function Og(t){const e=Ms(t);return await navigator.mediaDevices.getUserMedia(e)}async function Cg(){const t=await vg(),e=[];for await(const n of t){const i=await Dg(n);i!==null&&e.push(i)}return e}const zg=(t=window.location.href)=>{const e=new Worker(t+"/resources/capture-worker.js");return e.onerror=n=>console.error(n),Ja(e)};let kg=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const ys="capture-userid";function Ug(){const t=localStorage.getItem(ys);if(t)return t;const e=kg();return localStorage.setItem(ys,e),e}function Yg(t){return{licenseId:t.licenseId,licensee:t.licensee,packageName:t.packageName,platform:"Browser",sdkName:t.sdkName,sdkVersion:t.sdkVersion}}async function Pg(t){try{return await(await fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(Yg(t))})).json()}catch(e){throw console.error(e),e}}const Jt=Symbol.for("@ts-pattern/matcher"),ps=Symbol.for("@ts-pattern/isVariadic"),Yi="@ts-pattern/anonymous-select-key",Gr=t=>!!(t&&typeof t=="object"),Pi=t=>t&&!!t[Jt],Rt=(t,e,n)=>{if(Pi(t)){const i=t[Jt](),{matched:r,selections:o}=i.match(e);return r&&o&&Object.keys(o).forEach(a=>n(a,o[a])),r}if(Gr(t)){if(!Gr(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let i=[],r=[],o=[];for(const a of t.keys()){const s=t[a];Pi(s)&&s[ps]?o.push(s):o.length?r.push(s):i.push(s)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<i.length+r.length)return!1;const a=e.slice(0,i.length),s=r.length===0?[]:e.slice(-r.length),u=e.slice(i.length,r.length===0?1/0:-r.length);return i.every((l,g)=>Rt(l,a[g],n))&&r.every((l,g)=>Rt(l,s[g],n))&&(o.length===0||Rt(o[0],u,n))}return t.length===e.length&&t.every((a,s)=>Rt(a,e[s],n))}return Object.keys(t).every(i=>{const r=t[i];return(i in e||Pi(o=r)&&o[Jt]().matcherType==="optional")&&Rt(r,e[i],n);var o})}return Object.is(e,t)},ae=t=>{var e,n,i;return Gr(t)?Pi(t)?(e=(n=(i=t[Jt]()).getSelectionKeys)==null?void 0:n.call(i))!=null?e:[]:Array.isArray(t)?oi(t,ae):oi(Object.values(t),ae):[]},oi=(t,e)=>t.reduce((n,i)=>n.concat(e(i)),[]);function _g(...t){if(t.length===1){const[e]=t;return n=>Rt(e,n,()=>{})}if(t.length===2){const[e,n]=t;return Rt(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function Qt(t){return Object.assign(t,{optional:()=>$r(t),and:e=>vt(t,e),or:e=>ms(t,e),select:e=>e===void 0?ai(t):ai(e,t)})}function Kr(t){return Object.assign((e=>Object.assign(e,{*[Symbol.iterator](){yield Object.assign(e,{[ps]:!0})}}))(t),{optional:()=>Kr($r(t)),select:e=>Kr(e===void 0?ai(t):ai(e,t))})}function $r(t){return Qt({[Jt]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return e===void 0?(ae(t).forEach(r=>i(r,void 0)),{matched:!0,selections:n}):{matched:Rt(t,e,i),selections:n}},getSelectionKeys:()=>ae(t),matcherType:"optional"})})}const Rg=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},Fg=(t,e)=>{for(const[n,i]of t.entries())if(!e(i,n))return!1;return!0};function vt(...t){return Qt({[Jt]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return{matched:t.every(r=>Rt(r,e,i)),selections:n}},getSelectionKeys:()=>oi(t,ae),matcherType:"and"})})}function ms(...t){return Qt({[Jt]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return oi(t,ae).forEach(r=>i(r,void 0)),{matched:t.some(r=>Rt(r,e,i)),selections:n}},getSelectionKeys:()=>oi(t,ae),matcherType:"or"})})}function yt(t){return{[Jt]:()=>({match:e=>({matched:!!t(e)})})}}function ai(...t){const e=typeof t[0]=="string"?t[0]:void 0,n=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return Qt({[Jt]:()=>({match:i=>{let r={[e??Yi]:i};return{matched:n===void 0||Rt(n,i,(o,a)=>{r[o]=a}),selections:r}},getSelectionKeys:()=>[e??Yi].concat(n===void 0?[]:ae(n))})})}function Ie(t){return typeof t=="number"}function cn(t){return typeof t=="string"}function Qe(t){return typeof t=="bigint"}const Ns=Qt(yt(function(t){return!0})),Bg=Ns,ln=t=>Object.assign(Qt(t),{startsWith:e=>{return ln(vt(t,(n=e,yt(i=>cn(i)&&i.startsWith(n)))));var n},endsWith:e=>{return ln(vt(t,(n=e,yt(i=>cn(i)&&i.endsWith(n)))));var n},minLength:e=>ln(vt(t,(n=>yt(i=>cn(i)&&i.length>=n))(e))),maxLength:e=>ln(vt(t,(n=>yt(i=>cn(i)&&i.length<=n))(e))),includes:e=>{return ln(vt(t,(n=e,yt(i=>cn(i)&&i.includes(n)))));var n},regex:e=>{return ln(vt(t,(n=e,yt(i=>cn(i)&&!!i.match(n)))));var n}}),Hg=ln(yt(cn)),ws=(t,e)=>yt(n=>Ie(n)&&t<=n&&e>=n),Ls=t=>yt(e=>Ie(e)&&e<t),Ts=t=>yt(e=>Ie(e)&&e>t),js=t=>yt(e=>Ie(e)&&e<=t),Es=t=>yt(e=>Ie(e)&&e>=t),Ss=()=>yt(t=>Ie(t)&&Number.isInteger(t)),bs=()=>yt(t=>Ie(t)&&Number.isFinite(t)),As=()=>yt(t=>Ie(t)&&t>0),vs=()=>yt(t=>Ie(t)&&t<0),xe=t=>Object.assign(Qt(t),{between:(e,n)=>xe(vt(t,ws(e,n))),lt:e=>xe(vt(t,Ls(e))),gt:e=>xe(vt(t,Ts(e))),lte:e=>xe(vt(t,js(e))),gte:e=>xe(vt(t,Es(e))),int:()=>xe(vt(t,Ss())),finite:()=>xe(vt(t,bs())),positive:()=>xe(vt(t,As())),negative:()=>xe(vt(t,vs()))}),Qg=xe(yt(Ie)),Ds=(t,e)=>yt(n=>Qe(n)&&t<=n&&e>=n),Is=t=>yt(e=>Qe(e)&&e<t),xs=t=>yt(e=>Qe(e)&&e>t),Os=t=>yt(e=>Qe(e)&&e<=t),Cs=t=>yt(e=>Qe(e)&&e>=t),zs=()=>yt(t=>Qe(t)&&t>0),ks=()=>yt(t=>Qe(t)&&t<0),Ge=t=>Object.assign(Qt(t),{between:(e,n)=>Ge(vt(t,Ds(e,n))),lt:e=>Ge(vt(t,Is(e))),gt:e=>Ge(vt(t,xs(e))),lte:e=>Ge(vt(t,Os(e))),gte:e=>Ge(vt(t,Cs(e))),positive:()=>Ge(vt(t,zs())),negative:()=>Ge(vt(t,ks()))}),Gg=Ge(yt(Qe)),Kg=Qt(yt(function(t){return typeof t=="boolean"})),$g=Qt(yt(function(t){return typeof t=="symbol"})),Vg=Qt(yt(function(t){return t==null}));var Wg={__proto__:null,matcher:Jt,optional:$r,array:function(...t){return Kr({[Jt]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const n=t[0];let i={};if(e.length===0)return ae(n).forEach(o=>{i[o]=[]}),{matched:!0,selections:i};const r=(o,a)=>{i[o]=(i[o]||[]).concat([a])};return{matched:e.every(o=>Rt(n,o,r)),selections:i}},getSelectionKeys:()=>t.length===0?[]:ae(t[0])})})},set:function(...t){return Qt({[Jt]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};if(t.length===0)return{matched:!0};const i=(o,a)=>{n[o]=(n[o]||[]).concat([a])},r=t[0];return{matched:Rg(e,o=>Rt(r,o,i)),selections:n}},getSelectionKeys:()=>t.length===0?[]:ae(t[0])})})},map:function(...t){return Qt({[Jt]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};const i=(s,u)=>{n[s]=(n[s]||[]).concat([u])};if(t.length===0)return{matched:!0};var r;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(r=t[0])==null?void 0:r.toString()}`);const[o,a]=t;return{matched:Fg(e,(s,u)=>{const l=Rt(o,u,i),g=Rt(a,s,i);return l&&g}),selections:n}},getSelectionKeys:()=>t.length===0?[]:[...ae(t[0]),...ae(t[1])]})})},intersection:vt,union:ms,not:function(t){return Qt({[Jt]:()=>({match:e=>({matched:!Rt(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:yt,select:ai,any:Ns,_:Bg,string:Hg,between:ws,lt:Ls,gt:Ts,lte:js,gte:Es,int:Ss,finite:bs,positive:As,negative:vs,number:Qg,betweenBigInt:Ds,ltBigInt:Is,gtBigInt:xs,lteBigInt:Os,gteBigInt:Cs,positiveBigInt:zs,negativeBigInt:ks,bigint:Gg,boolean:Kg,symbol:$g,nullish:Vg,instanceOf:function(t){return Qt(yt(function(e){return n=>n instanceof e}(t)))},shape:function(t){return Qt(yt(_g(t)))}};const Vr={matched:!1,value:void 0};function Zg(t){return new qg(t,Vr)}let qg=class Va{constructor(e,n){this.input=void 0,this.state=void 0,this.input=e,this.state=n}with(...e){if(this.state.matched)return this;const n=e[e.length-1],i=[e[0]];let r;e.length===3&&typeof e[1]=="function"?(i.push(e[0]),r=e[1]):e.length>2&&i.push(...e.slice(1,e.length-1));let o=!1,a={};const s=(l,g)=>{o=!0,a[l]=g},u=!i.some(l=>Rt(l,this.input,s))||r&&!r(this.input)?Vr:{matched:!0,value:n(o?Yi in a?a[Yi]:a:this.input,this.input)};return new Va(this.input,u)}when(e,n){if(this.state.matched)return this;const i=!!e(this.input);return new Va(this.input,i?{matched:!0,value:n(this.input,this.input)}:Vr)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){return this.run()}run(){if(this.state.matched)return this.state.value;let e;try{e=JSON.stringify(this.input)}catch{e=this.input}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}returnType(){return this}};const Me={PROCESSING:{key:"PROCESSING",reticleType:"processing",minDuration:1e3},SIDE_CAPTURED:{key:"SIDE_CAPTURED",reticleType:"done",minDuration:1e3},FLIP_CARD:{key:"FLIP_CARD",reticleType:"flip",minDuration:3e3},DOCUMENT_CAPTURED:{key:"DOCUMENT_CAPTURED",reticleType:"done",minDuration:1e3},SENSING_FRONT:{key:"SENSING_FRONT",reticleType:"searching",minDuration:1e3},SENSING_BACK:{key:"SENSING_BACK",reticleType:"searching",minDuration:1e3},DOCUMENT_FRAMING_CAMERA_TOO_FAR:{key:"DOCUMENT_FRAMING_CAMERA_TOO_FAR",reticleType:"error",minDuration:1500},DOCUMENT_FRAMING_CAMERA_TOO_CLOSE:{key:"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE",reticleType:"error",minDuration:1500},DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP:{key:"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP",reticleType:"error",minDuration:1500},DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE:{key:"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE",reticleType:"error",minDuration:1500},LIGHTING_TOO_DARK:{key:"LIGHTING_TOO_DARK",reticleType:"error",minDuration:1500},LIGHTING_TOO_BRIGHT:{key:"LIGHTING_TOO_BRIGHT",reticleType:"error",minDuration:1500},BLUR_DETECTED:{key:"BLUR_DETECTED",reticleType:"error",minDuration:1500},GLARE_DETECTED:{key:"GLARE_DETECTED",reticleType:"error",minDuration:1500},OCCLUDED:{key:"OCCLUDED",reticleType:"error",minDuration:1500},WRONG_SIDE:{key:"WRONG_SIDE",reticleType:"error",minDuration:1500}};let Us=class{timeWindow=3e3;decayRate=.95;eventStack=[];analyzerSettings;currentUiState=Me.SENSING_FRONT;currentStateStartTime=performance.now();constructor(e){this.analyzerSettings=e}reset(){this.eventStack=[]}updateSettings(e){this.analyzerSettings=e}getUiState(e){const n=performance.now(),i={stateKey:this.getUiStateKeyFromResult(e),timeStamp:n,currentWeight:1};if(i.stateKey==="SIDE_CAPTURED"||i.stateKey==="DOCUMENT_CAPTURED")return this.eventStack=[],Me[i.stateKey];this.eventStack.push(i);const r={};if(this.eventStack.forEach(a=>{if(n-a.timeStamp>this.timeWindow){this.eventStack.shift();return}const s=a.timeStamp/n;a.currentWeight*=this.decayRate*s,r[a.stateKey]||(r[a.stateKey]=[]),r[a.stateKey].push(a.currentWeight)}),n-this.currentStateStartTime<this.currentUiState.minDuration)return this.currentUiState;const o={};for(const a in r){const s=a,u=a.length/this.eventStack.length,l=r[s].reduce((g,M)=>g+M,0);o[s]=l*u}try{const a=ds(o),s=Me[a];return s!==this.currentUiState&&(this.currentUiState=s,this.currentStateStartTime=n),s}catch{return this.currentUiState}}getUiStateKeyFromResult(e){return Zg(e).with({frameCaptured:!0,captureState:Wg.when(n=>n==="first-side-capture-in-progress"||n==="second-side-capture-in-progress")},()=>"PROCESSING").with({captureState:"first-side-capture-in-progress",frameAnalysisStatus:{framingStatus:"no-document"}},()=>"SENSING_FRONT").with({captureState:"second-side-capture-in-progress",frameAnalysisStatus:{framingStatus:"no-document"}},()=>"SENSING_BACK").with({captureState:"document-captured"},()=>"DOCUMENT_CAPTURED").with({captureState:"side-captured"},()=>"SIDE_CAPTURED").with({frameAnalysisStatus:{sideAnalysisStatus:"side-already-captured"}},()=>"WRONG_SIDE").with({frameAnalysisStatus:{framingStatus:"camera-angle-too-steep"}},()=>"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP").with({frameAnalysisStatus:{framingStatus:"camera-too-close"}},()=>"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE").with({frameAnalysisStatus:{framingStatus:"camera-too-far"}},()=>"DOCUMENT_FRAMING_CAMERA_TOO_FAR").with({frameAnalysisStatus:{framingStatus:"document-too-close-to-frame-edge"}},()=>"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE").with({frameAnalysisStatus:{lightingStatus:"too-bright"}},()=>"LIGHTING_TOO_BRIGHT").with({frameAnalysisStatus:{lightingStatus:"too-dark"}},()=>"LIGHTING_TOO_DARK").with({frameAnalysisStatus:{blurStatus:"blur-detected"}},()=>"BLUR_DETECTED").with({frameAnalysisStatus:{glareStatus:"glare-detected"}},()=>"GLARE_DETECTED").with({frameAnalysisStatus:{occlusionStatus:"occluded"}},()=>"OCCLUDED").otherwise(()=>"SENSING_FRONT")}};const Wr=document.createElement("canvas"),Zr=Wr.getContext("2d",{willReadFrequently:!0,alpha:!1});function Xg(t){if(!Zr)throw new Error("CanvasRenderingContext2D is missing!");const e=t.videoWidth,n=t.videoHeight;Wr.width=e,Wr.height=n,Zr.drawImage(t,0,0,e,n);const i=Zr.getImageData(0,0,e,n);return Jg(i)}function Jg(t){return{data:t.data,width:t.width,height:t.height,colorSpace:t.colorSpace}}const th=t=>(e,n,i)=>{const r=i.subscribe;return i.subscribe=(o,a,s)=>{let u=o;if(a){const l=s?.equalityFn||Object.is;let g=o(i.getState());u=M=>{const c=o(M);if(!l(g,c)){const f=g;a(g=c,f)}},s?.fireImmediately&&a(g,g)}return r(u)},t(e,n,i)},eh=th,Ys=t=>{let e;const n=new Set,i=(a,s)=>{const u=typeof a=="function"?a(e):a;if(!Object.is(u,e)){const l=e;e=s??typeof u!="object"?u:Object.assign({},e,u),n.forEach(g=>g(e,l))}},r=()=>e,o={setState:i,getState:r,subscribe:a=>(n.add(a),()=>n.delete(a)),destroy:()=>{n.clear()}};return e=t(i,r,o),o},nh=t=>t?Ys(t):Ys,Ps={cameras:[],videoElement:null,selectedCamera:null,isPlaying:!1,isCapturing:!1,isSwappingCamera:!1,isQueryingCameras:!1,callbacks:{},uiState:structuredClone(Me.SENSING_FRONT),initialized:!1,errorState:null,analyzerSettings:{}},J=nh()(eh(()=>structuredClone(Ps)));J.subscribe(t=>t.videoElement,(t,e)=>{!t&&e&&qr()});const qr=()=>{console.log("resetting zustand store"),J.getState().cameras.forEach(t=>{t.stopStream()}),J.setState(structuredClone(Ps))};let _i,Xr,si,dn,Jr;async function ih(t,e=!0){if(J.getState().isPlaying){console.warn("Already streaming");return}if(J.getState().selectedCamera)console.log("Reusing previous device");else try{await Hs()}catch(o){J.setState({errorState:gs(o)});return}const n=J.getState();if(!n.selectedCamera){console.warn("No selected camera!");return}const i=await n.selectedCamera.startStream(),r=i.getVideoTracks()[0].getSettings();if(!r.width||!r.height)throw new Error("Video doesn't have dimensions!");if(!t.isConnected)throw new Error("Video element needs to be in the document!");J.getState().videoElement||rh(t),t.srcObject=i,t.width=r.width,t.height=r.height,J.setState({videoElement:t}),e&&await eo()}async function _s(){qr(),await si.terminate()}function rh(t){new un(e=>{e[0].connected||_s()}).observe(t),t.playsInline=!0,t.setAttribute("muted","")}async function oh(t){if(J.getState().isCapturing){console.warn("Cancel the capture process using `cancelCapture()` before updating settings");return}const e={...J.getState().analyzerSettings,...t};await dn.updateSettings(e),_i.updateSettings(e)}async function ah(t){const e=J.getState();if(e.selectedCamera===t){console.warn("Already selected");return}if(e.isSwappingCamera)return;const n=e.selectedCamera;J.setState({isSwappingCamera:!0}),n&&n.stopStream(),e.videoElement&&(e.videoElement.srcObject=null);try{const i=await t.startStream();e.videoElement&&(e.videoElement.srcObject=i,e.isPlaying&&await e.videoElement.play()),J.setState({selectedCamera:t,isSwappingCamera:!1})}catch(i){console.error(i)}}async function sh(){console.log("stopStream called");const t=J.getState();if(t.selectedCamera?.stopStream(),!t.videoElement){console.log("no video element");return}t.videoElement.srcObject=null,await Fs(),no()}async function to(){const t=J.getState();if(!t.isCapturing||!t.isPlaying)return;if(!t.videoElement){console.error("Missing video element");return}const e=t.callbacks?.onFrameAnalysis,n=typeof e=="function",i=Xg(t.videoElement);Jr=new ImageData(Uint8ClampedArray.from(i.data),i.width,i.height);const r=await si.analyze(is(i,[i.data.buffer])),o=_i.getUiState(r);if(J.setState({uiState:o}),n)try{e(Jr,r)}catch(a){throw console.warn("onFrameAnalysis callback exception"),a}if(n&&window.setTimeout(()=>Jr=null,0),o.key==="SIDE_CAPTURED"){Ri(),J.setState({uiState:Me.SIDE_CAPTURED}),await new Promise(a=>setTimeout(a,Me.SIDE_CAPTURED.minDuration)),J.setState({uiState:Me.FLIP_CARD}),await new Promise(a=>setTimeout(a,Me.FLIP_CARD.minDuration)),await Rs();return}if(o.key==="DOCUMENT_CAPTURED"){no(),J.setState({uiState:Me.DOCUMENT_CAPTURED}),await new Promise(s=>setTimeout(s,Me.DOCUMENT_CAPTURED.minDuration));const a=await dn.getResult();try{t.callbacks?.onCaptureResult?.(a)}catch{console.warn("onCaptureResult callback exception")}return}Xr=t.videoElement.requestVideoFrameCallback(()=>void to())}async function Rs(){console.log("startCapture called");const t=J.getState();if(!t.isCapturing){if(!t.videoElement){console.warn("Missing video element");return}if(!t.selectedCamera){console.warn("No active camera!");return}await eo(),J.getState().isPlaying&&(J.setState({isCapturing:!0}),Xr=t.videoElement.requestVideoFrameCallback(()=>void to()))}}function Ri(){console.log("pauseCapture called");const t=J.getState().videoElement;t&&t.cancelVideoFrameCallback(Xr),J.setState({isCapturing:!1})}async function Fs(){console.log("cancelCapture called"),await Bs(),_i.reset(),Ri(),J.setState({uiState:Me.SENSING_FRONT})}async function Bs(){await dn.reset()}async function uh(){await dn.finishSideCapture()}async function Hs(){if(J.getState().isQueryingCameras||J.getState().isSwappingCamera)return;J.setState({isQueryingCameras:!0});const t=await Cg();if(t.length<1)throw new Error("No capable devices found! Your camera needs to have a minimum resolution of 1920x1080");Ig(t);const e=xg(t),n=t.find(i=>i.deviceInfo.deviceId===e);J.setState({cameras:t,selectedCamera:n,isQueryingCameras:!1})}async function eo(){const t=J.getState();if(!t.isPlaying){if(!t.videoElement){console.warn("No video element present.");return}if(!t.videoElement.srcObject){console.warn("No source present. Start a camera stream first.");return}if(!t.selectedCamera){console.warn("No selected camera");return}await t.selectedCamera.startStream(),await t.videoElement.play(),J.setState({isPlaying:!0}),t.isCapturing===!0&&t.videoElement.requestVideoFrameCallback(()=>void to())}}function no(){console.log("pausePlayback called");const t=J.getState();if(!t.videoElement){J.setState({isPlaying:!1});return}Ri(),t.videoElement.pause(),J.setState({isPlaying:!1})}function Qs(t){J.setState({callbacks:t})}async function ch(t){try{if(!window.isSecureContext)throw new Error(ls`
|
|
10
|
+
`);return await xg(),(await navigator.mediaDevices.enumerateDevices()).filter(t=>t.kind==="videoinput")};async function Cg(t){try{const e=await Ug(t),n=e.getVideoTracks()[0].getSettings();return Hr(e),new ha(t,n)}catch{return console.warn(`DEBUG: Device ${t.deviceId} doesn't support this constraint.`),null}}const zg=t=>{if(Br.getOS().name!=="Android")return;if(t.some(i=>i.settings.facingMode===void 0)){console.warn("Not all devices have facingMode");return}let e=0,n=0;for(const i of t){const r=i.settings.facingMode;r==="environment"&&(i.name=`Back camera ${++n}`),r==="user"&&(i.name=`Front camera ${++e}`)}},Hr=t=>{const e=t.getTracks();for(const n of e)n.stop()},kg=t=>{const e={};for(const n of t){const i=n.deviceInfo.deviceId;e[i]=0,n.settings.facingMode==="environment"&&(e[i]+=2),Fr&&"torch"in n.settings&&(e[i]+=2),Fr&&n.settings.focusMode==="single-shot"&&(e[i]+=2),Fr&&n===t[t.length]&&(e[i]+=1),fa&&n.name==="Back Triple Camera"&&(e[i]+=5),fa&&n.name==="Back Dual Wide Camera"&&(e[i]+=3)}return da(e)};function Ma(t){return{video:{deviceId:{exact:t.deviceId},frameRate:{exact:30},width:{exact:1920},height:{exact:1080}},audio:!1}}async function Ug(t){const e=Ma(t);return await navigator.mediaDevices.getUserMedia(e)}async function Yg(){const t=await Og(),e=[];for await(const n of t){const i=await Cg(n);i!==null&&e.push(i)}return e}const ya="application/javascript",_g=(t,e={})=>{const n={skipSameOrigin:!0,useBlob:!0,...e};return n.skipSameOrigin&&new URL(t).origin===self.location.origin?Promise.resolve(t):new Promise((i,r)=>void fetch(t).then(o=>o.text()).then(o=>{const s=new URL(t).href.split("/");s.pop();const a=Pr`
|
|
11
|
+
const _importScripts = importScripts;
|
|
12
|
+
const _fixImports = (url) => new URL(url, '${s.join("/")+"/"}').href;
|
|
13
|
+
importScripts = (...urls) => _importScripts(...urls.map(_fixImports));
|
|
14
|
+
`;let u=`data:${ya},`+encodeURIComponent(a+o);n.useBlob&&(u=URL.createObjectURL(new Blob([`importScripts("${u}")`],{type:ya}))),i(u)}).catch(r))},Pg=async(t=window.location.href)=>{const e=await _g(t+"/resources/capture-worker.js"),n=new Worker(e);n.onerror=r=>console.error(r);const i=ta(n);return await i.setResourceUrl(t+"/resources"),i};let Rg=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const pa="capture-userid";function Bg(){const t=localStorage.getItem(pa);if(t)return t;const e=Rg();return localStorage.setItem(pa,e),e}function Fg(t){return{licenseId:t.licenseId,licensee:t.licensee,packageName:t.packageName,platform:"Browser",sdkName:t.sdkName,sdkVersion:t.sdkVersion}}async function Hg(t){try{return await(await fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(Fg(t))})).json()}catch(e){throw console.error(e),e}}const Pt=Symbol.for("@ts-pattern/matcher"),ma=Symbol.for("@ts-pattern/isVariadic"),ki="@ts-pattern/anonymous-select-key",Qr=t=>!!(t&&typeof t=="object"),Ui=t=>t&&!!t[Pt],Et=(t,e,n)=>{if(Ui(t)){const i=t[Pt](),{matched:r,selections:o}=i.match(e);return r&&o&&Object.keys(o).forEach(s=>n(s,o[s])),r}if(Qr(t)){if(!Qr(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let i=[],r=[],o=[];for(const s of t.keys()){const a=t[s];Ui(a)&&a[ma]?o.push(a):o.length?r.push(a):i.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<i.length+r.length)return!1;const s=e.slice(0,i.length),a=r.length===0?[]:e.slice(-r.length),u=e.slice(i.length,r.length===0?1/0:-r.length);return i.every((l,g)=>Et(l,s[g],n))&&r.every((l,g)=>Et(l,a[g],n))&&(o.length===0||Et(o[0],u,n))}return t.length===e.length&&t.every((s,a)=>Et(s,e[a],n))}return Object.keys(t).every(i=>{const r=t[i];return(i in e||Ui(o=r)&&o[Pt]().matcherType==="optional")&&Et(r,e[i],n);var o})}return Object.is(e,t)},Gt=t=>{var e,n,i;return Qr(t)?Ui(t)?(e=(n=(i=t[Pt]()).getSelectionKeys)==null?void 0:n.call(i))!=null?e:[]:Array.isArray(t)?ei(t,Gt):ei(Object.values(t),Gt):[]},ei=(t,e)=>t.reduce((n,i)=>n.concat(e(i)),[]);function Qg(...t){if(t.length===1){const[e]=t;return n=>Et(e,n,()=>{})}if(t.length===2){const[e,n]=t;return Et(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function vt(t){return Object.assign(t,{optional:()=>Kr(t),and:e=>ht(t,e),or:e=>Na(t,e),select:e=>e===void 0?ni(t):ni(e,t)})}function Gr(t){return Object.assign((e=>Object.assign(e,{*[Symbol.iterator](){yield Object.assign(e,{[ma]:!0})}}))(t),{optional:()=>Gr(Kr(t)),select:e=>Gr(e===void 0?ni(t):ni(e,t))})}function Kr(t){return vt({[Pt]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return e===void 0?(Gt(t).forEach(r=>i(r,void 0)),{matched:!0,selections:n}):{matched:Et(t,e,i),selections:n}},getSelectionKeys:()=>Gt(t),matcherType:"optional"})})}const Gg=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},Kg=(t,e)=>{for(const[n,i]of t.entries())if(!e(i,n))return!1;return!0};function ht(...t){return vt({[Pt]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return{matched:t.every(r=>Et(r,e,i)),selections:n}},getSelectionKeys:()=>ei(t,Gt),matcherType:"and"})})}function Na(...t){return vt({[Pt]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return ei(t,Gt).forEach(r=>i(r,void 0)),{matched:t.some(r=>Et(r,e,i)),selections:n}},getSelectionKeys:()=>ei(t,Gt),matcherType:"or"})})}function rt(t){return{[Pt]:()=>({match:e=>({matched:!!t(e)})})}}function ni(...t){const e=typeof t[0]=="string"?t[0]:void 0,n=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return vt({[Pt]:()=>({match:i=>{let r={[e??ki]:i};return{matched:n===void 0||Et(n,i,(o,s)=>{r[o]=s}),selections:r}},getSelectionKeys:()=>[e??ki].concat(n===void 0?[]:Gt(n))})})}function Ne(t){return typeof t=="number"}function tn(t){return typeof t=="string"}function ke(t){return typeof t=="bigint"}const wa=vt(rt(function(t){return!0})),$g=wa,en=t=>Object.assign(vt(t),{startsWith:e=>{return en(ht(t,(n=e,rt(i=>tn(i)&&i.startsWith(n)))));var n},endsWith:e=>{return en(ht(t,(n=e,rt(i=>tn(i)&&i.endsWith(n)))));var n},minLength:e=>en(ht(t,(n=>rt(i=>tn(i)&&i.length>=n))(e))),maxLength:e=>en(ht(t,(n=>rt(i=>tn(i)&&i.length<=n))(e))),includes:e=>{return en(ht(t,(n=e,rt(i=>tn(i)&&i.includes(n)))));var n},regex:e=>{return en(ht(t,(n=e,rt(i=>tn(i)&&!!i.match(n)))));var n}}),Vg=en(rt(tn)),La=(t,e)=>rt(n=>Ne(n)&&t<=n&&e>=n),Ta=t=>rt(e=>Ne(e)&&e<t),ja=t=>rt(e=>Ne(e)&&e>t),Sa=t=>rt(e=>Ne(e)&&e<=t),Ea=t=>rt(e=>Ne(e)&&e>=t),ba=()=>rt(t=>Ne(t)&&Number.isInteger(t)),Aa=()=>rt(t=>Ne(t)&&Number.isFinite(t)),Da=()=>rt(t=>Ne(t)&&t>0),va=()=>rt(t=>Ne(t)&&t<0),we=t=>Object.assign(vt(t),{between:(e,n)=>we(ht(t,La(e,n))),lt:e=>we(ht(t,Ta(e))),gt:e=>we(ht(t,ja(e))),lte:e=>we(ht(t,Sa(e))),gte:e=>we(ht(t,Ea(e))),int:()=>we(ht(t,ba())),finite:()=>we(ht(t,Aa())),positive:()=>we(ht(t,Da())),negative:()=>we(ht(t,va()))}),Wg=we(rt(Ne)),Ia=(t,e)=>rt(n=>ke(n)&&t<=n&&e>=n),xa=t=>rt(e=>ke(e)&&e<t),Oa=t=>rt(e=>ke(e)&&e>t),Ca=t=>rt(e=>ke(e)&&e<=t),za=t=>rt(e=>ke(e)&&e>=t),ka=()=>rt(t=>ke(t)&&t>0),Ua=()=>rt(t=>ke(t)&&t<0),Ue=t=>Object.assign(vt(t),{between:(e,n)=>Ue(ht(t,Ia(e,n))),lt:e=>Ue(ht(t,xa(e))),gt:e=>Ue(ht(t,Oa(e))),lte:e=>Ue(ht(t,Ca(e))),gte:e=>Ue(ht(t,za(e))),positive:()=>Ue(ht(t,ka())),negative:()=>Ue(ht(t,Ua()))}),Zg=Ue(rt(ke)),qg=vt(rt(function(t){return typeof t=="boolean"})),Xg=vt(rt(function(t){return typeof t=="symbol"})),Jg=vt(rt(function(t){return t==null}));var th={__proto__:null,matcher:Pt,optional:Kr,array:function(...t){return Gr({[Pt]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const n=t[0];let i={};if(e.length===0)return Gt(n).forEach(o=>{i[o]=[]}),{matched:!0,selections:i};const r=(o,s)=>{i[o]=(i[o]||[]).concat([s])};return{matched:e.every(o=>Et(n,o,r)),selections:i}},getSelectionKeys:()=>t.length===0?[]:Gt(t[0])})})},set:function(...t){return vt({[Pt]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};if(t.length===0)return{matched:!0};const i=(o,s)=>{n[o]=(n[o]||[]).concat([s])},r=t[0];return{matched:Gg(e,o=>Et(r,o,i)),selections:n}},getSelectionKeys:()=>t.length===0?[]:Gt(t[0])})})},map:function(...t){return vt({[Pt]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};const i=(a,u)=>{n[a]=(n[a]||[]).concat([u])};if(t.length===0)return{matched:!0};var r;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(r=t[0])==null?void 0:r.toString()}`);const[o,s]=t;return{matched:Kg(e,(a,u)=>{const l=Et(o,u,i),g=Et(s,a,i);return l&&g}),selections:n}},getSelectionKeys:()=>t.length===0?[]:[...Gt(t[0]),...Gt(t[1])]})})},intersection:ht,union:Na,not:function(t){return vt({[Pt]:()=>({match:e=>({matched:!Et(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:rt,select:ni,any:wa,_:$g,string:Vg,between:La,lt:Ta,gt:ja,lte:Sa,gte:Ea,int:ba,finite:Aa,positive:Da,negative:va,number:Wg,betweenBigInt:Ia,ltBigInt:xa,gtBigInt:Oa,lteBigInt:Ca,gteBigInt:za,positiveBigInt:ka,negativeBigInt:Ua,bigint:Zg,boolean:qg,symbol:Xg,nullish:Jg,instanceOf:function(t){return vt(rt(function(e){return n=>n instanceof e}(t)))},shape:function(t){return vt(rt(Qg(t)))}};const $r={matched:!1,value:void 0};function eh(t){return new nh(t,$r)}let nh=class Ws{constructor(e,n){this.input=void 0,this.state=void 0,this.input=e,this.state=n}with(...e){if(this.state.matched)return this;const n=e[e.length-1],i=[e[0]];let r;e.length===3&&typeof e[1]=="function"?(i.push(e[0]),r=e[1]):e.length>2&&i.push(...e.slice(1,e.length-1));let o=!1,s={};const a=(l,g)=>{o=!0,s[l]=g},u=!i.some(l=>Et(l,this.input,a))||r&&!r(this.input)?$r:{matched:!0,value:n(o?ki in s?s[ki]:s:this.input,this.input)};return new Ws(this.input,u)}when(e,n){if(this.state.matched)return this;const i=!!e(this.input);return new Ws(this.input,i?{matched:!0,value:n(this.input,this.input)}:$r)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){return this.run()}run(){if(this.state.matched)return this.state.value;let e;try{e=JSON.stringify(this.input)}catch{e=this.input}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}returnType(){return this}};const ne={PROCESSING:{key:"PROCESSING",reticleType:"processing",minDuration:1e3},SIDE_CAPTURED:{key:"SIDE_CAPTURED",reticleType:"done",minDuration:1e3},FLIP_CARD:{key:"FLIP_CARD",reticleType:"flip",minDuration:3e3},DOCUMENT_CAPTURED:{key:"DOCUMENT_CAPTURED",reticleType:"done",minDuration:1e3},SENSING_FRONT:{key:"SENSING_FRONT",reticleType:"searching",minDuration:1e3},SENSING_BACK:{key:"SENSING_BACK",reticleType:"searching",minDuration:1e3},DOCUMENT_FRAMING_CAMERA_TOO_FAR:{key:"DOCUMENT_FRAMING_CAMERA_TOO_FAR",reticleType:"error",minDuration:1500},DOCUMENT_FRAMING_CAMERA_TOO_CLOSE:{key:"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE",reticleType:"error",minDuration:1500},DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP:{key:"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP",reticleType:"error",minDuration:1500},DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE:{key:"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE",reticleType:"error",minDuration:1500},LIGHTING_TOO_DARK:{key:"LIGHTING_TOO_DARK",reticleType:"error",minDuration:1500},LIGHTING_TOO_BRIGHT:{key:"LIGHTING_TOO_BRIGHT",reticleType:"error",minDuration:1500},BLUR_DETECTED:{key:"BLUR_DETECTED",reticleType:"error",minDuration:1500},GLARE_DETECTED:{key:"GLARE_DETECTED",reticleType:"error",minDuration:1500},OCCLUDED:{key:"OCCLUDED",reticleType:"error",minDuration:1500},WRONG_SIDE:{key:"WRONG_SIDE",reticleType:"error",minDuration:1500}};let Ya=class{timeWindow=3e3;decayRate=.95;eventStack=[];analyzerSettings;currentUiState=ne.SENSING_FRONT;currentStateStartTime=performance.now();constructor(e){this.analyzerSettings=e}reset(){this.eventStack=[]}updateSettings(e){this.analyzerSettings=e}getUiState(e){const n=performance.now(),i={stateKey:this.getUiStateKeyFromResult(e),timeStamp:n,currentWeight:1};if(i.stateKey==="SIDE_CAPTURED"||i.stateKey==="DOCUMENT_CAPTURED")return this.eventStack=[],ne[i.stateKey];this.eventStack.push(i);const r={};if(this.eventStack.forEach(s=>{if(n-s.timeStamp>this.timeWindow){this.eventStack.shift();return}const a=s.timeStamp/n;s.currentWeight*=this.decayRate*a,r[s.stateKey]||(r[s.stateKey]=[]),r[s.stateKey].push(s.currentWeight)}),n-this.currentStateStartTime<this.currentUiState.minDuration)return this.currentUiState;const o={};for(const s in r){const a=s,u=s.length/this.eventStack.length,l=r[a].reduce((g,M)=>g+M,0);o[a]=l*u}try{const s=da(o),a=ne[s];return a!==this.currentUiState&&(this.currentUiState=a,this.currentStateStartTime=n),a}catch{return this.currentUiState}}getUiStateKeyFromResult(e){return eh(e).with({frameCaptured:!0,captureState:th.when(n=>n==="first-side-capture-in-progress"||n==="second-side-capture-in-progress")},()=>"PROCESSING").with({captureState:"first-side-capture-in-progress",frameAnalysisStatus:{framingStatus:"no-document"}},()=>"SENSING_FRONT").with({captureState:"second-side-capture-in-progress",frameAnalysisStatus:{framingStatus:"no-document"}},()=>"SENSING_BACK").with({captureState:"document-captured"},()=>"DOCUMENT_CAPTURED").with({captureState:"side-captured"},()=>"SIDE_CAPTURED").with({frameAnalysisStatus:{sideAnalysisStatus:"side-already-captured"}},()=>"WRONG_SIDE").with({frameAnalysisStatus:{framingStatus:"camera-angle-too-steep"}},()=>"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP").with({frameAnalysisStatus:{framingStatus:"camera-too-close"}},()=>"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE").with({frameAnalysisStatus:{framingStatus:"camera-too-far"}},()=>"DOCUMENT_FRAMING_CAMERA_TOO_FAR").with({frameAnalysisStatus:{framingStatus:"document-too-close-to-frame-edge"}},()=>"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE").with({frameAnalysisStatus:{lightingStatus:"too-bright"}},()=>"LIGHTING_TOO_BRIGHT").with({frameAnalysisStatus:{lightingStatus:"too-dark"}},()=>"LIGHTING_TOO_DARK").with({frameAnalysisStatus:{blurStatus:"blur-detected"}},()=>"BLUR_DETECTED").with({frameAnalysisStatus:{glareStatus:"glare-detected"}},()=>"GLARE_DETECTED").with({frameAnalysisStatus:{occlusionStatus:"occluded"}},()=>"OCCLUDED").otherwise(()=>"SENSING_FRONT")}};const Vr=document.createElement("canvas"),Wr=Vr.getContext("2d",{willReadFrequently:!0,alpha:!1});function ih(t){if(!Wr)throw new Error("CanvasRenderingContext2D is missing!");const e=t.videoWidth,n=t.videoHeight;Vr.width=e,Vr.height=n,Wr.drawImage(t,0,0,e,n);const i=Wr.getImageData(0,0,e,n);return rh(i)}function rh(t){return{data:t.data,width:t.width,height:t.height,colorSpace:t.colorSpace}}const oh=t=>(e,n,i)=>{const r=i.subscribe;return i.subscribe=(o,s,a)=>{let u=o;if(s){const l=a?.equalityFn||Object.is;let g=o(i.getState());u=M=>{const c=o(M);if(!l(g,c)){const f=g;s(g=c,f)}},a?.fireImmediately&&s(g,g)}return r(u)},t(e,n,i)},sh=oh,_a=t=>{let e;const n=new Set,i=(s,a)=>{const u=typeof s=="function"?s(e):s;if(!Object.is(u,e)){const l=e;e=a??typeof u!="object"?u:Object.assign({},e,u),n.forEach(g=>g(e,l))}},r=()=>e,o={setState:i,getState:r,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>{n.clear()}};return e=t(i,r,o),o},ah=t=>t?_a(t):_a,Pa={cameras:[],videoElement:null,selectedCamera:null,isPlaying:!1,isCapturing:!1,isSwappingCamera:!1,isQueryingCameras:!1,callbacks:{},uiState:structuredClone(ne.SENSING_FRONT),initialized:!1,errorState:null,analyzerSettings:{}},$=ah()(sh(()=>structuredClone(Pa)));$.subscribe(t=>t.videoElement,(t,e)=>{!t&&e&&Zr()});const Zr=()=>{console.log("resetting zustand store"),$.getState().cameras.forEach(t=>{t.stopStream()}),$.setState(structuredClone(Pa))};let Yi,qr,ii,nn,Xr;async function uh(t,e=!0){if($.getState().isPlaying){console.warn("Already streaming");return}if($.getState().selectedCamera)console.log("Reusing previous device");else try{await Qa()}catch(o){$.setState({errorState:ga(o)});return}const n=$.getState();if(!n.selectedCamera){console.warn("No selected camera!");return}const i=await n.selectedCamera.startStream(),r=i.getVideoTracks()[0].getSettings();if(!r.width||!r.height)throw new Error("Video doesn't have dimensions!");if(!t.isConnected)throw new Error("Video element needs to be in the document!");$.getState().videoElement||ch(t),t.srcObject=i,t.width=r.width,t.height=r.height,$.setState({videoElement:t}),e&&await to()}async function Ra(){Zr(),await ii.terminate()}function ch(t){new Ng(e=>{e[0].connected||Ra()}).observe(t),t.playsInline=!0,t.setAttribute("muted","")}async function lh(t){if($.getState().isCapturing){console.warn("Cancel the capture process using `cancelCapture()` before updating settings");return}const e={...$.getState().analyzerSettings,...t};await nn.updateSettings(e),Yi.updateSettings(e)}async function dh(t){const e=$.getState();if(e.selectedCamera===t){console.warn("Already selected");return}if(e.isSwappingCamera)return;const n=e.selectedCamera;$.setState({isSwappingCamera:!0}),n&&n.stopStream(),e.videoElement&&(e.videoElement.srcObject=null);try{const i=await t.startStream();e.videoElement&&(e.videoElement.srcObject=i,e.isPlaying&&await e.videoElement.play()),$.setState({selectedCamera:t,isSwappingCamera:!1})}catch(i){console.error(i)}}async function gh(){console.log("stopStream called");const t=$.getState();if(t.selectedCamera?.stopStream(),!t.videoElement){console.log("no video element");return}t.videoElement.srcObject=null,await Fa(),eo()}async function Jr(){const t=$.getState();if(!t.isCapturing||!t.isPlaying)return;if(!t.videoElement){console.error("Missing video element");return}const e=t.callbacks?.onFrameAnalysis,n=typeof e=="function",i=ih(t.videoElement);Xr=new ImageData(Uint8ClampedArray.from(i.data),i.width,i.height);const r=await ii.analyze(ra(i,[i.data.buffer])),o=Yi.getUiState(r);if($.setState({uiState:o}),n)try{e(Xr,r)}catch(s){throw console.warn("onFrameAnalysis callback exception"),s}if(n&&window.setTimeout(()=>Xr=null,0),o.key==="SIDE_CAPTURED"){_i(),$.setState({uiState:ne.SIDE_CAPTURED}),await new Promise(s=>setTimeout(s,ne.SIDE_CAPTURED.minDuration)),$.setState({uiState:ne.FLIP_CARD}),await new Promise(s=>setTimeout(s,ne.FLIP_CARD.minDuration)),await Ba();return}if(o.key==="DOCUMENT_CAPTURED"){eo(),$.setState({uiState:ne.DOCUMENT_CAPTURED}),await new Promise(a=>setTimeout(a,ne.DOCUMENT_CAPTURED.minDuration));const s=await nn.getResult();try{t.callbacks?.onCaptureResult?.(s)}catch{console.warn("onCaptureResult callback exception")}return}qr=t.videoElement.requestVideoFrameCallback(()=>void Jr())}async function Ba(){console.log("startCapture called");const t=$.getState();if(!t.isCapturing){if(!t.videoElement){console.warn("Missing video element");return}if(!t.selectedCamera){console.warn("No active camera!");return}await to(),$.getState().isPlaying&&($.setState({isCapturing:!0}),qr=t.videoElement.requestVideoFrameCallback(()=>void Jr()))}}function _i(){console.log("pauseCapture called");const t=$.getState().videoElement;t&&t.cancelVideoFrameCallback(qr),$.setState({isCapturing:!1})}async function Fa(){console.log("cancelCapture called"),await Ha(),Yi.reset(),_i(),$.setState({uiState:ne.SENSING_FRONT})}async function Ha(){await nn.reset()}async function hh(){await nn.finishSideCapture()}async function Qa(){if($.getState().isQueryingCameras||$.getState().isSwappingCamera)return;$.setState({isQueryingCameras:!0});const t=await Yg();if(t.length<1)throw new Error("No capable devices found! Your camera needs to have a minimum resolution of 1920x1080");zg(t);const e=kg(t),n=t.find(i=>i.deviceInfo.deviceId===e);$.setState({cameras:t,selectedCamera:n,isQueryingCameras:!1})}async function to(){const t=$.getState();if(!t.isPlaying){if(!t.videoElement){console.warn("No video element present.");return}if(!t.videoElement.srcObject){console.warn("No source present. Start a camera stream first.");return}if(!t.selectedCamera){console.warn("No selected camera");return}await t.selectedCamera.startStream(),await t.videoElement.play(),$.setState({isPlaying:!0}),t.isCapturing===!0&&t.videoElement.requestVideoFrameCallback(()=>void Jr())}}function eo(){console.log("pausePlayback called");const t=$.getState();if(!t.videoElement){$.setState({isPlaying:!1});return}_i(),t.videoElement.pause(),$.setState({isPlaying:!1})}function Ga(t){$.setState({callbacks:t})}async function fh(t){try{if(!window.isSecureContext)throw new Error(Pr`
|
|
15
15
|
Can't load the SDK outside a secure context:
|
|
16
16
|
https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
|
|
17
|
-
`);if(J.getState().initialized)return console.warn("Already initialized"),Gs;si=zg(t.resourceUrl);const e=Ug(),n=await si.loadWasm(),i=await n.initializeWithLicenseKey(t.licenseKey,e,!1);if(i.unlockResult===Ur.RequiresServerPermission){const o=await Pg(i),a=await n.submitServerPermission(JSON.stringify(o));if(console.log(a),a.status!==Yr.Ok)throw new Error("Server unlock not ok.")}dn=await si.createAnalyzer();const r={...await dn.getSettings(),minimumDocumentDpi:200,...t.analyzerSettings};return _i=new Us(r),t.analyzerSettings&&await dn.updateSettings(r),J.setState({analyzerSettings:r}),t.callbacks&&Qs(t.callbacks),J.setState({initialized:!0}),Gs}catch(e){throw J.setState({errorState:gs(e)}),e}}const Gs={startCameraStream:ih,stopStream:sh,startPlayback:eo,pausePlayback:no,startCapture:Rs,pauseCapture:Ri,cancelCapture:Fs,finishSideCapture:uh,resetAnalyzer:Bs,selectCamera:ah,updateCameraDevices:Hs,setCallbacks:Qs,updateAnalyzerSettings:oh,subscribe:J.subscribe,getState:J.getState,destroy:_s},lh=t=>{const e=document.createElement("canvas");e.width=t.width,e.height=t.height;const n=e.getContext("2d");if(!n)throw new Error("missing canvas");return n.putImageData(t,0,0),e.toDataURL()},dh=t=>t.replace("data:","").replace(/^.+,/,""),Ks={context:void 0,registry:void 0},gh=(t,e)=>t===e,ye=Symbol("solid-proxy"),Fi=Symbol("solid-track"),hh=Symbol("solid-dev-component"),Bi={equals:gh};let $s=Js;const Ue=1,Hi=2,Vs={owned:null,cleanups:null,context:null,owner:null};var Et=null;let io=null,Tt=null,Gt=null,Ye=null,Qi=0;const[fh,mN]=Z(!1);function gn(t,e){const n=Tt,i=Et,r=t.length===0,o=r?Vs:{owned:null,cleanups:null,context:null,owner:e===void 0?i:e},a=r?t:()=>t(()=>Ut(()=>Wi(o)));Et=o,Tt=null;try{return $e(a,!0)}finally{Tt=n,Et=i}}function Z(t,e){e=e?Object.assign({},Bi,e):Bi;const n={value:t,observers:null,observerSlots:null,comparator:e.equals||void 0},i=r=>(typeof r=="function"&&(r=r(n.value)),Xs(n,r));return[qs.bind(n),i]}function Ws(t,e,n){const i=Ki(t,e,!0,Ue);vn(i)}function pe(t,e,n){const i=Ki(t,e,!1,Ue);vn(i)}function it(t,e,n){$s=Lh;const i=Ki(t,e,!1,Ue);(!n||!n.render)&&(i.user=!0),Ye?Ye.push(i):vn(i)}function V(t,e,n){n=n?Object.assign({},Bi,n):Bi;const i=Ki(t,e,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,vn(i),qs.bind(i)}function ro(t){return $e(t,!1)}function Ut(t){if(Tt===null)return t();const e=Tt;Tt=null;try{return t()}finally{Tt=e}}function Se(t,e,n){const i=Array.isArray(t);let r,o=n&&n.defer;return a=>{let s;if(i){s=Array(t.length);for(let l=0;l<t.length;l++)s[l]=t[l]()}else s=t();if(o){o=!1;return}const u=Ut(()=>e(s,r,a));return r=s,u}}function Ke(t){it(()=>Ut(t))}function ut(t){return Et===null||(Et.cleanups===null?Et.cleanups=[t]:Et.cleanups.push(t)),t}function Zs(){return Tt}function Mh(){return Et}function yh(t,e){const n=Et,i=Tt;Et=t,Tt=null;try{return $e(e,!0)}catch(r){oo(r)}finally{Et=n,Tt=i}}function ph(t){const e=Tt,n=Et;return Promise.resolve().then(()=>{Tt=e,Et=n;let i;return $e(t,!1),Tt=Et=null,i?i.done:void 0})}function mh(){return[fh,ph]}function se(t,e){const n=Symbol("context");return{id:n,Provider:jh(n),defaultValue:t}}function ue(t){let e;return(e=eu(Et,t.id))!==void 0?e:t.defaultValue}function Gi(t){const e=V(t),n=V(()=>ao(e()));return n.toArray=()=>{const i=n();return Array.isArray(i)?i:i!=null?[i]:[]},n}function qs(){if(this.sources&&this.state)if(this.state===Ue)vn(this);else{const t=Gt;Gt=null,$e(()=>Vi(this),!1),Gt=t}if(Tt){const t=this.observers?this.observers.length:0;Tt.sources?(Tt.sources.push(this),Tt.sourceSlots.push(t)):(Tt.sources=[this],Tt.sourceSlots=[t]),this.observers?(this.observers.push(Tt),this.observerSlots.push(Tt.sources.length-1)):(this.observers=[Tt],this.observerSlots=[Tt.sources.length-1])}return this.value}function Xs(t,e,n){let i=t.value;return(!t.comparator||!t.comparator(i,e))&&(t.value=e,t.observers&&t.observers.length&&$e(()=>{for(let r=0;r<t.observers.length;r+=1){const o=t.observers[r],a=io&&io.running;a&&io.disposed.has(o),(a?!o.tState:!o.state)&&(o.pure?Gt.push(o):Ye.push(o),o.observers&&tu(o)),a||(o.state=Ue)}if(Gt.length>1e6)throw Gt=[],new Error},!1)),e}function vn(t){if(!t.fn)return;Wi(t);const e=Et,n=Tt,i=Qi;Tt=Et=t,Nh(t,t.value,i),Tt=n,Et=e}function Nh(t,e,n){let i;try{i=t.fn(e)}catch(r){return t.pure&&(t.state=Ue,t.owned&&t.owned.forEach(Wi),t.owned=null),t.updatedAt=n+1,oo(r)}(!t.updatedAt||t.updatedAt<=n)&&(t.updatedAt!=null&&"observers"in t?Xs(t,i):t.value=i,t.updatedAt=n)}function Ki(t,e,n,i=Ue,r){const o={fn:t,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:Et,context:null,pure:n};return Et===null||Et!==Vs&&(Et.owned?Et.owned.push(o):Et.owned=[o]),o}function $i(t){if(t.state===0)return;if(t.state===Hi)return Vi(t);if(t.suspense&&Ut(t.suspense.inFallback))return t.suspense.effects.push(t);const e=[t];for(;(t=t.owner)&&(!t.updatedAt||t.updatedAt<Qi);)t.state&&e.push(t);for(let n=e.length-1;n>=0;n--)if(t=e[n],t.state===Ue)vn(t);else if(t.state===Hi){const i=Gt;Gt=null,$e(()=>Vi(t,e[0]),!1),Gt=i}}function $e(t,e){if(Gt)return t();let n=!1;e||(Gt=[]),Ye?n=!0:Ye=[],Qi++;try{const i=t();return wh(n),i}catch(i){n||(Ye=null),Gt=null,oo(i)}}function wh(t){if(Gt&&(Js(Gt),Gt=null),t)return;const e=Ye;Ye=null,e.length&&$e(()=>$s(e),!1)}function Js(t){for(let e=0;e<t.length;e++)$i(t[e])}function Lh(t){let e,n=0;for(e=0;e<t.length;e++){const i=t[e];i.user?t[n++]=i:$i(i)}for(e=0;e<n;e++)$i(t[e])}function Vi(t,e){t.state=0;for(let n=0;n<t.sources.length;n+=1){const i=t.sources[n];if(i.sources){const r=i.state;r===Ue?i!==e&&(!i.updatedAt||i.updatedAt<Qi)&&$i(i):r===Hi&&Vi(i,e)}}}function tu(t){for(let e=0;e<t.observers.length;e+=1){const n=t.observers[e];n.state||(n.state=Hi,n.pure?Gt.push(n):Ye.push(n),n.observers&&tu(n))}}function Wi(t){let e;if(t.sources)for(;t.sources.length;){const n=t.sources.pop(),i=t.sourceSlots.pop(),r=n.observers;if(r&&r.length){const o=r.pop(),a=n.observerSlots.pop();i<r.length&&(o.sourceSlots[a]=i,r[i]=o,n.observerSlots[i]=a)}}if(t.owned){for(e=t.owned.length-1;e>=0;e--)Wi(t.owned[e]);t.owned=null}if(t.cleanups){for(e=t.cleanups.length-1;e>=0;e--)t.cleanups[e]();t.cleanups=null}t.state=0,t.context=null}function Th(t){return t instanceof Error?t:new Error(typeof t=="string"?t:"Unknown error",{cause:t})}function oo(t,e=Et){throw Th(t)}function eu(t,e){return t?t.context&&t.context[e]!==void 0?t.context[e]:eu(t.owner,e):void 0}function ao(t){if(typeof t=="function"&&!t.length)return ao(t());if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++){const i=ao(t[n]);Array.isArray(i)?e.push.apply(e,i):e.push(i)}return e}return t}function jh(t,e){return function(n){let i;return pe(()=>i=Ut(()=>(Et.context={[t]:n.value},Gi(()=>n.children))),void 0),i}}const Eh=Symbol("fallback");function nu(t){for(let e=0;e<t.length;e++)t[e]()}function Sh(t,e,n={}){let i=[],r=[],o=[],a=0,s=e.length>1?[]:null;return ut(()=>nu(o)),()=>{let u=t()||[],l,g;return u[Fi],Ut(()=>{let c=u.length,f,d,h,y,p,w,m,N,j;if(c===0)a!==0&&(nu(o),o=[],i=[],r=[],a=0,s&&(s=[])),n.fallback&&(i=[Eh],r[0]=gn(b=>(o[0]=b,n.fallback())),a=1);else if(a===0){for(r=new Array(c),g=0;g<c;g++)i[g]=u[g],r[g]=gn(M);a=c}else{for(h=new Array(c),y=new Array(c),s&&(p=new Array(c)),w=0,m=Math.min(a,c);w<m&&i[w]===u[w];w++);for(m=a-1,N=c-1;m>=w&&N>=w&&i[m]===u[N];m--,N--)h[N]=r[m],y[N]=o[m],s&&(p[N]=s[m]);for(f=new Map,d=new Array(N+1),g=N;g>=w;g--)j=u[g],l=f.get(j),d[g]=l===void 0?-1:l,f.set(j,g);for(l=w;l<=m;l++)j=i[l],g=f.get(j),g!==void 0&&g!==-1?(h[g]=r[l],y[g]=o[l],s&&(p[g]=s[l]),g=d[g],f.set(j,g)):o[l]();for(g=w;g<c;g++)g in h?(r[g]=h[g],o[g]=y[g],s&&(s[g]=p[g],s[g](g))):r[g]=gn(M);r=r.slice(0,a=c),i=u.slice(0)}return r});function M(c){if(o[g]=c,s){const[f,d]=Z(g);return s[g]=d,e(u[g],f)}return e(u[g])}}}function T(t,e){return Ut(()=>t(e||{}))}function Zi(){return!0}const so={get(t,e,n){return e===ye?n:t.get(e)},has(t,e){return e===ye?!0:t.has(e)},set:Zi,deleteProperty:Zi,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:Zi,deleteProperty:Zi}},ownKeys(t){return t.keys()}};function uo(t){return(t=typeof t=="function"?t():t)?t:{}}function bh(){for(let t=0,e=this.length;t<e;++t){const n=this[t]();if(n!==void 0)return n}}function ht(...t){let e=!1;for(let o=0;o<t.length;o++){const a=t[o];e=e||!!a&&ye in a,t[o]=typeof a=="function"?(e=!0,V(a)):a}if(e)return new Proxy({get(o){for(let a=t.length-1;a>=0;a--){const s=uo(t[a])[o];if(s!==void 0)return s}},has(o){for(let a=t.length-1;a>=0;a--)if(o in uo(t[a]))return!0;return!1},keys(){const o=[];for(let a=0;a<t.length;a++)o.push(...Object.keys(uo(t[a])));return[...new Set(o)]}},so);const n={},i={},r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!a)continue;const s=Object.getOwnPropertyNames(a);for(let u=0,l=s.length;u<l;u++){const g=s[u];if(g==="__proto__"||g==="constructor")continue;const M=Object.getOwnPropertyDescriptor(a,g);if(!r.has(g))M.get?(r.add(g),Object.defineProperty(n,g,{enumerable:!0,configurable:!0,get:bh.bind(i[g]=[M.get.bind(a)])})):(M.value!==void 0&&r.add(g),n[g]=M.value);else{const c=i[g];c?M.get?c.push(M.get.bind(a)):M.value!==void 0&&c.push(()=>M.value):n[g]===void 0&&(n[g]=M.value)}}}return n}function St(t,...e){if(ye in t){const r=new Set(e.length>1?e.flat():e[0]),o=e.map(a=>new Proxy({get(s){return a.includes(s)?t[s]:void 0},has(s){return a.includes(s)&&s in t},keys(){return a.filter(s=>s in t)}},so));return o.push(new Proxy({get(a){return r.has(a)?void 0:t[a]},has(a){return r.has(a)?!1:a in t},keys(){return Object.keys(t).filter(a=>!r.has(a))}},so)),o}const n={},i=e.map(()=>({}));for(const r of Object.getOwnPropertyNames(t)){const o=Object.getOwnPropertyDescriptor(t,r),a=!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable;let s=!1,u=0;for(const l of e)l.includes(r)&&(s=!0,a?i[u][r]=o.value:Object.defineProperty(i[u],r,o)),++u;s||(a?n[r]=o.value:Object.defineProperty(n,r,o))}return[...i,n]}let Ah=0;function Dn(){const t=Ks.context;return t?`${t.id}${t.count++}`:`cl-${Ah++}`}const iu=t=>`Stale read from <${t}>.`;function ru(t){const e="fallback"in t&&{fallback:()=>t.fallback};return V(Sh(()=>t.each,t.children,e||void 0))}function kt(t){const e=t.keyed,n=V(()=>t.when,void 0,{equals:(i,r)=>e?i===r:!i==!r});return V(()=>{const i=n();if(i){const r=t.children;return typeof r=="function"&&r.length>0?Ut(()=>r(e?i:()=>{if(!Ut(n))throw iu("Show");return t.when})):r}return t.fallback},void 0,void 0)}function co(t){let e=!1;const n=(o,a)=>o[0]===a[0]&&(e?o[1]===a[1]:!o[1]==!a[1])&&o[2]===a[2],i=Gi(()=>t.children),r=V(()=>{let o=i();Array.isArray(o)||(o=[o]);for(let a=0;a<o.length;a++){const s=o[a].when;if(s)return e=!!o[a].keyed,[a,s,o[a]]}return[-1]},void 0,{equals:n});return V(()=>{const[o,a,s]=r();if(o<0)return t.fallback;const u=s.children;return typeof u=="function"&&u.length>0?Ut(()=>u(e?a:()=>{if(Ut(r)[0]!==o)throw iu("Match");return s.when})):u},void 0,void 0)}function Pe(t){return t}const vh=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Dh=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...vh]),Ih=new Set(["innerHTML","textContent","innerText","children"]),xh=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Oh=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Ch(t,e){const n=Oh[t];return typeof n=="object"?n[e]?n.$:void 0:n}const zh=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),kh=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Uh={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Yh(t,e,n){let i=n.length,r=e.length,o=i,a=0,s=0,u=e[r-1].nextSibling,l=null;for(;a<r||s<o;){if(e[a]===n[s]){a++,s++;continue}for(;e[r-1]===n[o-1];)r--,o--;if(r===a){const g=o<i?s?n[s-1].nextSibling:n[o-s]:u;for(;s<o;)t.insertBefore(n[s++],g)}else if(o===s)for(;a<r;)(!l||!l.has(e[a]))&&e[a].remove(),a++;else if(e[a]===n[o-1]&&n[s]===e[r-1]){const g=e[--r].nextSibling;t.insertBefore(n[s++],e[a++].nextSibling),t.insertBefore(n[--o],g),e[r]=n[o]}else{if(!l){l=new Map;let M=s;for(;M<o;)l.set(n[M],M++)}const g=l.get(e[a]);if(g!=null)if(s<g&&g<o){let M=a,c=1,f;for(;++M<r&&M<o&&!((f=l.get(e[M]))==null||f!==g+c);)c++;if(c>g-s){const d=e[a];for(;s<g;)t.insertBefore(n[s++],d)}else t.replaceChild(n[s++],e[a++])}else a++;else e[a++].remove()}}}const ou="_$DX_DELEGATE";function Ph(t,e,n,i={}){let r;return gn(o=>{r=o,e===document?t():ot(e,t(),e.firstChild?null:void 0,n)},i.owner),()=>{r(),e.textContent=""}}function wt(t,e,n){let i;const r=()=>{const a=document.createElement("template");return a.innerHTML=t,n?a.content.firstChild.firstChild:a.content.firstChild},o=e?()=>Ut(()=>document.importNode(i||(i=r()),!0)):()=>(i||(i=r())).cloneNode(!0);return o.cloneNode=o,o}function _h(t,e=window.document){const n=e[ou]||(e[ou]=new Set);for(let i=0,r=t.length;i<r;i++){const o=t[i];n.has(o)||(n.add(o),e.addEventListener(o,Kh))}}function Ve(t,e,n){n==null?t.removeAttribute(e):t.setAttribute(e,n)}function Rh(t,e,n,i){i==null?t.removeAttributeNS(e,n):t.setAttributeNS(e,n,i)}function xt(t,e){e==null?t.removeAttribute("class"):t.className=e}function Fh(t,e,n,i){if(i)Array.isArray(n)?(t[`$$${e}`]=n[0],t[`$$${e}Data`]=n[1]):t[`$$${e}`]=n;else if(Array.isArray(n)){const r=n[0];t.addEventListener(e,n[0]=o=>r.call(t,n[1],o))}else t.addEventListener(e,n)}function Bh(t,e,n={}){const i=Object.keys(e||{}),r=Object.keys(n);let o,a;for(o=0,a=r.length;o<a;o++){const s=r[o];!s||s==="undefined"||e[s]||(su(t,s,!1),delete n[s])}for(o=0,a=i.length;o<a;o++){const s=i[o],u=!!e[s];!s||s==="undefined"||n[s]===u||!u||(su(t,s,!0),n[s]=u)}return n}function Hh(t,e,n){if(!e)return n?Ve(t,"style"):e;const i=t.style;if(typeof e=="string")return i.cssText=e;typeof n=="string"&&(i.cssText=n=void 0),n||(n={}),e||(e={});let r,o;for(o in n)e[o]==null&&i.removeProperty(o),delete n[o];for(o in e)r=e[o],r!==n[o]&&(i.setProperty(o,r),n[o]=r);return n}function te(t,e={},n,i){const r={};return i||pe(()=>r.children=In(t,e.children,r.children)),pe(()=>e.ref&&e.ref(t)),pe(()=>Qh(t,e,n,!0,r,!0)),r}function au(t,e,n){return Ut(()=>t(e,n))}function ot(t,e,n,i){if(n!==void 0&&!i&&(i=[]),typeof e!="function")return In(t,e,i,n);pe(r=>In(t,e(),r,n),i)}function Qh(t,e,n,i,r={},o=!1){e||(e={});for(const a in r)if(!(a in e)){if(a==="children")continue;r[a]=uu(t,a,null,r[a],n,o)}for(const a in e){if(a==="children"){i||In(t,e.children);continue}const s=e[a];r[a]=uu(t,a,s,r[a],n,o)}}function Gh(t){return t.toLowerCase().replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}function su(t,e,n){const i=e.trim().split(/\s+/);for(let r=0,o=i.length;r<o;r++)t.classList.toggle(i[r],n)}function uu(t,e,n,i,r,o){let a,s,u,l,g;if(e==="style")return Hh(t,n,i);if(e==="classList")return Bh(t,n,i);if(n===i)return i;if(e==="ref")o||n(t);else if(e.slice(0,3)==="on:"){const M=e.slice(3);i&&t.removeEventListener(M,i),n&&t.addEventListener(M,n)}else if(e.slice(0,10)==="oncapture:"){const M=e.slice(10);i&&t.removeEventListener(M,i,!0),n&&t.addEventListener(M,n,!0)}else if(e.slice(0,2)==="on"){const M=e.slice(2).toLowerCase(),c=zh.has(M);if(!c&&i){const f=Array.isArray(i)?i[0]:i;t.removeEventListener(M,f)}(c||n)&&(Fh(t,M,n,c),c&&_h([M]))}else if(e.slice(0,5)==="attr:")Ve(t,e.slice(5),n);else if((g=e.slice(0,5)==="prop:")||(u=Ih.has(e))||!r&&((l=Ch(e,t.tagName))||(s=Dh.has(e)))||(a=t.nodeName.includes("-")))g&&(e=e.slice(5),s=!0),e==="class"||e==="className"?xt(t,n):a&&!s&&!u?t[Gh(e)]=n:t[l||e]=n;else{const M=r&&e.indexOf(":")>-1&&Uh[e.split(":")[0]];M?Rh(t,M,e,n):Ve(t,xh[e]||e,n)}return n}function Kh(t){const e=`$$${t.type}`;let n=t.composedPath&&t.composedPath()[0]||t.target;for(t.target!==n&&Object.defineProperty(t,"target",{configurable:!0,value:n}),Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}});n;){const i=n[e];if(i&&!n.disabled){const r=n[`${e}Data`];if(r!==void 0?i.call(n,r,t):i.call(n,t),t.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function In(t,e,n,i,r){for(;typeof n=="function";)n=n();if(e===n)return n;const o=typeof e,a=i!==void 0;if(t=a&&n[0]&&n[0].parentNode||t,o==="string"||o==="number")if(o==="number"&&(e=e.toString()),a){let s=n[0];s&&s.nodeType===3?s.data=e:s=document.createTextNode(e),n=xn(t,n,i,s)}else n!==""&&typeof n=="string"?n=t.firstChild.data=e:n=t.textContent=e;else if(e==null||o==="boolean")n=xn(t,n,i);else{if(o==="function")return pe(()=>{let s=e();for(;typeof s=="function";)s=s();n=In(t,s,n,i)}),()=>n;if(Array.isArray(e)){const s=[],u=n&&Array.isArray(n);if(lo(s,e,n,r))return pe(()=>n=In(t,s,n,i,!0)),()=>n;if(s.length===0){if(n=xn(t,n,i),a)return n}else u?n.length===0?cu(t,s,i):Yh(t,n,s):(n&&xn(t),cu(t,s));n=s}else if(e.nodeType){if(Array.isArray(n)){if(a)return n=xn(t,n,i,e);xn(t,n,null,e)}else n==null||n===""||!t.firstChild?t.appendChild(e):t.replaceChild(e,t.firstChild);n=e}else console.warn("Unrecognized value. Skipped inserting",e)}return n}function lo(t,e,n,i){let r=!1;for(let o=0,a=e.length;o<a;o++){let s=e[o],u=n&&n[o],l;if(!(s==null||s===!0||s===!1))if((l=typeof s)=="object"&&s.nodeType)t.push(s);else if(Array.isArray(s))r=lo(t,s,u)||r;else if(l==="function")if(i){for(;typeof s=="function";)s=s();r=lo(t,Array.isArray(s)?s:[s],Array.isArray(u)?u:[u])||r}else t.push(s),r=!0;else{const g=String(s);u&&u.nodeType===3&&u.data===g?t.push(u):t.push(document.createTextNode(g))}}return r}function cu(t,e,n=null){for(let i=0,r=e.length;i<r;i++)t.insertBefore(e[i],n)}function xn(t,e,n,i){if(n===void 0)return t.textContent="";const r=i||document.createTextNode("");if(e.length){let o=!1;for(let a=e.length-1;a>=0;a--){const s=e[a];if(r!==s){const u=s.parentNode===t;!o&&!a?u?t.replaceChild(r,s):t.insertBefore(r,n):u&&s.remove()}else o=!0}}else t.insertBefore(r,n);return[r]}const $h="http://www.w3.org/2000/svg";function lu(t,e=!1){return e?document.createElementNS($h,t):document.createElement(t)}function go(t){const{useShadow:e}=t,n=document.createTextNode(""),i=()=>t.mount||document.body,r=Mh();let o,a=!!Ks.context;return it(()=>{o||(o=yh(r,()=>V(()=>t.children)));const s=i();if(s instanceof HTMLHeadElement){const[u,l]=Z(!1),g=()=>l(!0);gn(M=>ot(s,()=>u()?M():o(),null)),ut(g)}else{const u=lu(t.isSVG?"g":"div",t.isSVG),l=e&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),ot(l,o),s.appendChild(u),t.ref&&t.ref(u),ut(()=>s.removeChild(u))}},void 0,{render:!a}),n}function ui(t){const[e,n]=St(t,["component"]),i=V(()=>e.component);return V(()=>{const r=i();switch(typeof r){case"function":return Object.assign(r,{[hh]:!0}),Ut(()=>r(n));case"string":const o=kh.has(r),a=lu(r,o);return te(a,n,o),a}})}const ho=Symbol("store-raw"),ci=Symbol("store-node");function du(t){let e=t[ye];if(!e&&(Object.defineProperty(t,ye,{value:e=new Proxy(t,Zh)}),!Array.isArray(t))){const n=Object.keys(t),i=Object.getOwnPropertyDescriptors(t);for(let r=0,o=n.length;r<o;r++){const a=n[r];i[a].get&&Object.defineProperty(t,a,{enumerable:i[a].enumerable,get:i[a].get.bind(e)})}}return e}function We(t){let e;return t!=null&&typeof t=="object"&&(t[ye]||!(e=Object.getPrototypeOf(t))||e===Object.prototype||Array.isArray(t))}function On(t,e=new Set){let n,i,r,o;if(n=t!=null&&t[ho])return n;if(!We(t)||e.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):e.add(t);for(let a=0,s=t.length;a<s;a++)r=t[a],(i=On(r,e))!==r&&(t[a]=i)}else{Object.isFrozen(t)?t=Object.assign({},t):e.add(t);const a=Object.keys(t),s=Object.getOwnPropertyDescriptors(t);for(let u=0,l=a.length;u<l;u++)o=a[u],!s[o].get&&(r=t[o],(i=On(r,e))!==r&&(t[o]=i))}return t}function fo(t){let e=t[ci];return e||Object.defineProperty(t,ci,{value:e=Object.create(null)}),e}function Mo(t,e,n){return t[e]||(t[e]=hu(n))}function Vh(t,e){const n=Reflect.getOwnPropertyDescriptor(t,e);return!n||n.get||!n.configurable||e===ye||e===ci||(delete n.value,delete n.writable,n.get=()=>t[ye][e]),n}function gu(t){if(Zs()){const e=fo(t);(e._||(e._=hu()))()}}function Wh(t){return gu(t),Reflect.ownKeys(t)}function hu(t){const[e,n]=Z(t,{equals:!1,internal:!0});return e.$=n,e}const Zh={get(t,e,n){if(e===ho)return t;if(e===ye)return n;if(e===Fi)return gu(t),n;const i=fo(t),r=i[e];let o=r?r():t[e];if(e===ci||e==="__proto__")return o;if(!r){const a=Object.getOwnPropertyDescriptor(t,e);Zs()&&(typeof o!="function"||t.hasOwnProperty(e))&&!(a&&a.get)&&(o=Mo(i,e,o)())}return We(o)?du(o):o},has(t,e){return e===ho||e===ye||e===Fi||e===ci||e==="__proto__"?!0:(this.get(t,e,t),e in t)},set(){return!0},deleteProperty(){return!0},ownKeys:Wh,getOwnPropertyDescriptor:Vh};function me(t,e,n,i=!1){if(!i&&t[e]===n)return;const r=t[e],o=t.length;n===void 0?delete t[e]:t[e]=n;let a=fo(t),s;if((s=Mo(a,e,r))&&s.$(()=>n),Array.isArray(t)&&t.length!==o){for(let u=t.length;u<o;u++)(s=a[u])&&s.$();(s=Mo(a,"length",o))&&s.$(t.length)}(s=a._)&&s.$()}function fu(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i+=1){const r=n[i];me(t,r,e[r])}}function qh(t,e){if(typeof e=="function"&&(e=e(t)),e=On(e),Array.isArray(e)){if(t===e)return;let n=0,i=e.length;for(;n<i;n++){const r=e[n];t[n]!==r&&me(t,n,r)}me(t,"length",i)}else fu(t,e)}function li(t,e,n=[]){let i,r=t;if(e.length>1){i=e.shift();const a=typeof i,s=Array.isArray(t);if(Array.isArray(i)){for(let u=0;u<i.length;u++)li(t,[i[u]].concat(e),n);return}else if(s&&a==="function"){for(let u=0;u<t.length;u++)i(t[u],u)&&li(t,[u].concat(e),n);return}else if(s&&a==="object"){const{from:u=0,to:l=t.length-1,by:g=1}=i;for(let M=u;M<=l;M+=g)li(t,[M].concat(e),n);return}else if(e.length>1){li(t[i],e,[i].concat(n));return}r=t[i],n=[i].concat(n)}let o=e[0];typeof o=="function"&&(o=o(r,n),o===r)||i===void 0&&o==null||(o=On(o),i===void 0||We(r)&&We(o)&&!Array.isArray(o)?fu(r,o):me(t,i,o))}function yo(...[t,e]){const n=On(t||{}),i=Array.isArray(n),r=du(n);function o(...a){ro(()=>{i&&a.length===1?qh(n,a[0]):li(n,a)})}return[r,o]}const po=Symbol("store-root");function Cn(t,e,n,i,r){const o=e[n];if(t===o)return;if(n!==po&&(!We(t)||!We(o)||r&&t[r]!==o[r])){me(e,n,t);return}if(Array.isArray(t)){if(t.length&&o.length&&(!i||r&&t[0]&&t[0][r]!=null)){let u,l,g,M,c,f,d,h;for(g=0,M=Math.min(o.length,t.length);g<M&&(o[g]===t[g]||r&&o[g]&&t[g]&&o[g][r]===t[g][r]);g++)Cn(t[g],o,g,i,r);const y=new Array(t.length),p=new Map;for(M=o.length-1,c=t.length-1;M>=g&&c>=g&&(o[M]===t[c]||r&&o[g]&&t[g]&&o[M][r]===t[c][r]);M--,c--)y[c]=o[M];if(g>c||g>M){for(l=g;l<=c;l++)me(o,l,t[l]);for(;l<t.length;l++)me(o,l,y[l]),Cn(t[l],o,l,i,r);o.length>t.length&&me(o,"length",t.length);return}for(d=new Array(c+1),l=c;l>=g;l--)f=t[l],h=r&&f?f[r]:f,u=p.get(h),d[l]=u===void 0?-1:u,p.set(h,l);for(u=g;u<=M;u++)f=o[u],h=r&&f?f[r]:f,l=p.get(h),l!==void 0&&l!==-1&&(y[l]=o[u],l=d[l],p.set(h,l));for(l=g;l<t.length;l++)l in y?(me(o,l,y[l]),Cn(t[l],o,l,i,r)):me(o,l,t[l])}else for(let u=0,l=t.length;u<l;u++)Cn(t[u],o,u,i,r);o.length>t.length&&me(o,"length",t.length);return}const a=Object.keys(t);for(let u=0,l=a.length;u<l;u++)Cn(t[a[u]],o,a[u],i,r);const s=Object.keys(o);for(let u=0,l=s.length;u<l;u++)t[s[u]]===void 0&&me(o,s[u],void 0)}function Xh(t,e={}){const{merge:n,key:i="id"}=e,r=On(t);return o=>{if(!We(o)||!We(r))return r;const a=Cn(r,{[po]:o},po,n,i);return a===void 0?o:a}}const Jh={scan_the_front_side:"Scan the front side of the document",flip_document:"Flip the document",scan_the_back_side:"Scan the back side of the document",scanning_wrong_side:"Scanning wrong side",move_closer:"Move closer",move_farther:"Move farther",camera_angle_too_steep:"Keep document parallel to phone",document_too_close_to_edge:"Keep the document fully visible",lightning_too_bright:"Move to spot with less lighting",lightning_too_dark:"Move to brighter spot",blur_detected:"Keep document and phone still",glare_detected:"Tilt or move document to remove reflection",occluded:"Keep the document fully visible",need_help_tooltip:"Need help?",onboarding_field_visible_title:"Keep all the details visible",onboarding_field_visible_details:"Make sure you keep the document well lit. All document fields should be visible on the camera screen.",tutorial_fields_visible_title:"Keep all the fields visible",tutorial_fields_visible_start:"Start scanning",tutorial_fields_visible_details:"Make sure you aren’t covering parts of the document with a finger, including the bottom lines. Also, watch out for hologram reflections that go over the document fields.",tutorial_harsh_light_title:"Watch out for harsh light",tutorial_harsh_light_details:"Avoid direct harsh light because it reflects from the document and can make parts of the document unreadable. If you can’t read data on the document, it won’t be visible to the camera either.",tutorial_keep_still_title:"Keep still while scanning",tutorial_keep_still_details:"Try to keep the phone and document still while scanning. Moving either can blur the image and make data on the document unreadable.",camera_unavailable:"Camera Unavailable",camera_permission_error:"App doesn't have permission to use the camera, please change privacy settings",settings:"Settings",camera_media_capture_error:"Unable to capture media",camera_unable_to_resume_session:"Unable to resume",camera_query_in_progress:"Selecting best camera, please wait",done:"Done",cancel:"Cancel",back:"Back",next:"Next",ok:"OK",dismiss:"Dismiss"},Mu=se(),tf=t=>{const[e,n]=yo(structuredClone({...Jh,...t.userStrings})),i={t:e,updateLocalization:n};return T(Mu.Provider,{value:i,get children(){return t.children}})};function hn(){const t=ue(Mu);if(!t)throw new Error("LocalizationProvider not in scope.");return t}function mo(t){return(...e)=>{for(const n of t)n&&n(...e)}}function ef(t){return(...e)=>{for(let n=t.length-1;n>=0;n--){const i=t[n];i&&i(...e)}}}var E=t=>typeof t=="function"&&!t.length?t():t,yu=t=>Array.isArray(t)?t:t?[t]:[];function nf(t,...e){return typeof t=="function"?t(...e):t}var rf=ut;function of(t,e,n,i){return t.addEventListener(e,n,i),rf(t.removeEventListener.bind(t,e,n,i))}function af(t,e,n,i){const r=()=>{yu(E(t)).forEach(o=>{o&&yu(E(e)).forEach(a=>of(o,a,n,i))})};typeof t=="function"?it(r):pe(r)}var No=Symbol("fallback");function pu(t){for(const e of t)e.dispose()}function sf(t,e,n,i={}){const r=new Map;return ut(()=>pu(r.values())),()=>{const a=t()||[];return a[Fi],Ut(()=>{if(!a.length)return pu(r.values()),r.clear(),i.fallback?[gn(g=>(r.set(No,{dispose:g}),i.fallback()))]:[];const s=new Array(a.length),u=r.get(No);if(!r.size||u){u?.dispose(),r.delete(No);for(let g=0;g<a.length;g++){const M=a[g],c=e(M,g);o(s,M,g,c)}return s}const l=new Set(r.keys());for(let g=0;g<a.length;g++){const M=a[g],c=e(M,g);l.delete(c);const f=r.get(c);f?(s[g]=f.mapped,f.setIndex?.(g),f.setItem(()=>M)):o(s,M,g,c)}for(const g of l)r.get(g)?.dispose(),r.delete(g);return s})};function o(a,s,u,l){gn(g=>{const[M,c]=Z(s),f={setItem:c,dispose:g};if(n.length>1){const[d,h]=Z(u);f.setIndex=h,f.mapped=n(M,d)}else f.mapped=n(M);r.set(l,f),a[u]=f.mapped})}}function uf(t){const{by:e}=t;return V(sf(()=>t.each,typeof e=="function"?e:n=>n[e],t.children,"fallback"in t?{fallback:()=>t.fallback}:void 0))}function cf(t){const e=typeof t.on=="function"||Array.isArray(t.on)?t.on:()=>t.on;return V(Se(e,(n,i)=>{const r=t.children;return typeof r=="function"&&r.length>0?r(n,i):r}))}function qi(){return!0}var lf={get(t,e,n){return e===ye?n:t.get(e)},has(t,e){return t.has(e)},set:qi,deleteProperty:qi,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:qi,deleteProperty:qi}},ownKeys(t){return t.keys()}},df=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function mu(t){const e={};let n;for(;n=df.exec(t);)e[n[1]]=n[2];return e}function Nu(t,e){if(typeof t=="object"&&typeof e=="object")return{...t,...e};if(typeof t=="string"&&typeof e=="string")return`${t};${e}`;const n=typeof t=="object"?t:mu(t),i=typeof e=="object"?e:mu(e);return{...n,...i}}var wo=(t,e,n)=>{let i;for(const r of t){const o=E(r)[e];i?o&&(i=n(i,o)):i=o}return i};function gf(...t){const e=Array.isArray(t[0]),n=e?t[0]:t;if(n.length===1)return n[0];const i=e&&t[1]?.reverseEventHandlers?ef:mo,r={};for(const a of n){const s=E(a);for(const u in s)if(u[0]==="o"&&u[1]==="n"&&u[2]){const l=s[u],g=u.toLowerCase(),M=typeof l=="function"?l:Array.isArray(l)?l.length===1?l[0]:l[0].bind(void 0,l[1]):void 0;M?r[g]?r[g].push(M):r[g]=[M]:delete r[g]}}const o=ht(...n);return new Proxy({get(a){if(typeof a!="string")return Reflect.get(o,a);if(a==="style")return wo(n,"style",Nu);if(a==="ref"){const s=[];for(const u of n){const l=E(u)[a];typeof l=="function"&&s.push(l)}return i(s)}if(a[0]==="o"&&a[1]==="n"&&a[2]){const s=r[a.toLowerCase()];return s?i(s):Reflect.get(o,a)}return a==="class"||a==="className"?wo(n,a,(s,u)=>`${s} ${u}`):a==="classList"?wo(n,a,(s,u)=>({...s,...u})):Reflect.get(o,a)},has(a){return Reflect.has(o,a)},keys(){return Object.keys(o)}},lf)}function ce(...t){return mo(t)}var wu=t=>t instanceof Element;function Lo(t,e){if(e(t))return t;if(typeof t=="function"&&!t.length)return Lo(t(),e);if(Array.isArray(t))for(const n of t){const i=Lo(n,e);if(i)return i}return null}function hf(t,e=wu,n=wu){const i=V(t);return V(()=>Lo(i(),e))}function Lu(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function ff(t){return typeof t=="number"}function Mf(t){return Array.isArray(t)}function zn(t){return Object.prototype.toString.call(t)==="[object String]"}function Xi(t){return typeof t=="function"}function kn(t){return e=>`${t()}-${e}`}function Ne(t,e){return t?t===e||t.contains(e):!1}function di(t,e=!1){const{activeElement:n}=le(t);if(!n?.nodeName)return null;if(Tu(n)&&n.contentDocument)return di(n.contentDocument.body,e);if(e){const i=n.getAttribute("aria-activedescendant");if(i){const r=le(n).getElementById(i);if(r)return r}}return n}function To(t){return le(t).defaultView||window}function le(t){return t?t.ownerDocument||t:document}function Tu(t){return t.tagName==="IFRAME"}var ju=(t=>(t.Escape="Escape",t.Enter="Enter",t.Tab="Tab",t.Space=" ",t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.End="End",t.Home="Home",t.PageDown="PageDown",t.PageUp="PageUp",t))(ju||{});function Eu(t){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(e=>t.test(e.brand))||t.test(window.navigator.userAgent)}function jo(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function gi(){return jo(/^Mac/i)}function yf(){return jo(/^iPhone/i)}function pf(){return jo(/^iPad/i)||gi()&&navigator.maxTouchPoints>1}function Su(){return yf()||pf()}function mf(){return gi()||Su()}function Nf(){return Eu(/AppleWebKit/i)&&!wf()}function wf(){return Eu(/Chrome/i)}function Pt(t,e){return e&&(Xi(e)?e(t):e[0](e[1],t)),t?.defaultPrevented}function we(t){return e=>{for(const n of t)Pt(e,n)}}function Lf(t){return gi()?t.metaKey&&!t.ctrlKey:t.ctrlKey&&!t.metaKey}function Kt(t){if(t)if(Tf())t.focus({preventScroll:!0});else{const e=jf(t);t.focus(),Ef(e)}}var Ji=null;function Tf(){if(Ji==null){Ji=!1;try{document.createElement("div").focus({get preventScroll(){return Ji=!0,!0}})}catch{}}return Ji}function jf(t){let e=t.parentNode;const n=[],i=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==i;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return i instanceof HTMLElement&&n.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),n}function Ef(t){for(const{element:e,scrollTop:n,scrollLeft:i}of t)e.scrollTop=n,e.scrollLeft=i}var bu=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],Sf=[...bu,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Eo=bu.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",bf=Sf.join(':not([hidden]):not([tabindex="-1"]),');function Au(t,e){const n=Array.from(t.querySelectorAll(Eo)).filter(vu);return e&&vu(t)&&n.unshift(t),n.forEach((i,r)=>{if(Tu(i)&&i.contentDocument){const o=i.contentDocument.body,a=Au(o,!1);n.splice(r,1,...a)}}),n}function vu(t){return Du(t)&&!Af(t)}function Du(t){return t.matches(Eo)&&So(t)}function Af(t){return parseInt(t.getAttribute("tabindex")||"0",10)<0}function So(t,e){return t.nodeName!=="#comment"&&vf(t)&&Df(t,e)&&(!t.parentElement||So(t.parentElement,t))}function vf(t){if(!(t instanceof HTMLElement)&&!(t instanceof SVGElement))return!1;const{display:e,visibility:n}=t.style;let i=e!=="none"&&n!=="hidden"&&n!=="collapse";if(i){if(!t.ownerDocument.defaultView)return i;const{getComputedStyle:r}=t.ownerDocument.defaultView,{display:o,visibility:a}=r(t);i=o!=="none"&&a!=="hidden"&&a!=="collapse"}return i}function Df(t,e){return!t.hasAttribute("hidden")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function If(t,e){return e.some(n=>n.contains(t))}function xf(t,e,n){const i=e?.tabbable?bf:Eo,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){return e?.from?.contains(o)?NodeFilter.FILTER_REJECT:o.matches(i)&&So(o)&&(!n||If(o,n))&&(!e?.accept||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(r.currentNode=e.from),r}function Of(){}function Cf(t){return[t.clientX,t.clientY]}function zf(t,e){const[n,i]=t;let r=!1;const o=e.length;for(let a=o,s=0,u=a-1;s<a;u=s++){const[l,g]=e[s],[M,c]=e[u],[,f]=e[u===0?a-1:u-1]||[0,0],d=(g-c)*(n-l)-(l-M)*(i-g);if(c<g){if(i>=c&&i<g){if(d===0)return!0;d>0&&(i===c?i>f&&(r=!r):r=!r)}}else if(g<c){if(i>g&&i<=c){if(d===0)return!0;d<0&&(i===c?i<f&&(r=!r):r=!r)}}else if(i==g&&(n>=M&&n<=l||n>=l&&n<=M))return!0}return r}function Ot(t,e){return ht(t,e)}var hi=new Map,Iu=new Set;function xu(){if(typeof window>"u")return;const t=n=>{if(!n.target)return;let i=hi.get(n.target);i||(i=new Set,hi.set(n.target,i),n.target.addEventListener("transitioncancel",e)),i.add(n.propertyName)},e=n=>{if(!n.target)return;const i=hi.get(n.target);if(i&&(i.delete(n.propertyName),i.size===0&&(n.target.removeEventListener("transitioncancel",e),hi.delete(n.target)),hi.size===0)){for(const r of Iu)r();Iu.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",e)}typeof document<"u"&&(document.readyState!=="loading"?xu():document.addEventListener("DOMContentLoaded",xu));function Ou(t,e){const n=Cu(t,e,"left"),i=Cu(t,e,"top"),r=e.offsetWidth,o=e.offsetHeight;let a=t.scrollLeft,s=t.scrollTop;const u=a+t.offsetWidth,l=s+t.offsetHeight;n<=a?a=n:n+r>u&&(a+=n+r-u),i<=s?s=i:i+o>l&&(s+=i+o-l),t.scrollLeft=a,t.scrollTop=s}function Cu(t,e,n){const i=n==="left"?"offsetLeft":"offsetTop";let r=0;for(;e.offsetParent&&(r+=e[i],e.offsetParent!==t);){if(e.offsetParent.contains(t)){r-=t[i];break}e=e.offsetParent}return r}var kf={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function bo(t){let e=t.startIndex??0;const n=t.startLevel??0,i=[],r=u=>{const l=t.getKey??"key",g=zn(l)?u[l]:l(u);return g!=null?String(g):""},o=u=>{const l=t.getTextValue??"textValue",g=zn(l)?u[l]:l(u);return g!=null?String(g):""},a=u=>{const l=t.getDisabled??"disabled";return(zn(l)?u[l]:l(u))??!1},s=u=>zn(t.getSectionChildren)?u[t.getSectionChildren]:t.getSectionChildren?.(u);for(const u of t.dataSource){if(zn(u)||ff(u)){i.push({type:"item",rawValue:u,key:String(u),textValue:String(u),disabled:a(u),level:n,index:e}),e++;continue}if(s(u)!=null){i.push({type:"section",rawValue:u,key:"",textValue:"",disabled:!1,level:n,index:e}),e++;const l=s(u)??[];if(l.length>0){const g=bo({dataSource:l,getKey:t.getKey,getTextValue:t.getTextValue,getDisabled:t.getDisabled,getSectionChildren:t.getSectionChildren,startIndex:e,startLevel:n+1});i.push(...g),e+=g.length}}else i.push({type:"item",rawValue:u,key:r(u),textValue:o(u),disabled:a(u),level:n,index:e}),e++}return i}/*!
|
|
17
|
+
`);if($.getState().initialized)return console.warn("Already initialized"),Ka;ii=await Pg(t.resourceUrl);const e=Bg(),n=await ii.loadWasm(),i=await n.initializeWithLicenseKey(t.licenseKey,e,!1);if(i.unlockResult===zr.RequiresServerPermission){const o=await Hg(i),s=await n.submitServerPermission(JSON.stringify(o));if(console.log(s),s.status!==kr.Ok)throw new Error("Server unlock not ok.")}nn=await ii.createAnalyzer();const r={...await nn.getSettings(),minimumDocumentDpi:200,...t.analyzerSettings};return Yi=new Ya(r),t.analyzerSettings&&await nn.updateSettings(r),$.setState({analyzerSettings:r}),t.callbacks&&Ga(t.callbacks),$.setState({initialized:!0}),Ka}catch(e){throw $.setState({errorState:ga(e)}),e}}const Ka={startCameraStream:uh,stopStream:gh,startPlayback:to,pausePlayback:eo,startCapture:Ba,pauseCapture:_i,cancelCapture:Fa,finishSideCapture:hh,resetAnalyzer:Ha,selectCamera:dh,updateCameraDevices:Qa,setCallbacks:Ga,updateAnalyzerSettings:lh,subscribe:$.subscribe,getState:$.getState,destroy:Ra},Mh=t=>{const e=document.createElement("canvas");e.width=t.width,e.height=t.height;const n=e.getContext("2d");if(!n)throw new Error("missing canvas");return n.putImageData(t,0,0),e.toDataURL()},yh=t=>t.replace("data:","").replace(/^.+,/,""),$a={context:void 0,registry:void 0},ph=(t,e)=>t===e,ie=Symbol("solid-proxy"),Pi=Symbol("solid-track"),mh=Symbol("solid-dev-component"),Ri={equals:ph};let Va=tu;const Ee=1,Bi=2,Wa={owned:null,cleanups:null,context:null,owner:null};var dt=null;let no=null,ct=null,It=null,be=null,Fi=0;const[Nh,EN]=K(!1);function rn(t,e){const n=ct,i=dt,r=t.length===0,o=r?Wa:{owned:null,cleanups:null,context:null,owner:e===void 0?i:e},s=r?t:()=>t(()=>Tt(()=>$i(o)));dt=o,ct=null;try{return _e(s,!0)}finally{ct=n,dt=i}}function K(t,e){e=e?Object.assign({},Ri,e):Ri;const n={value:t,observers:null,observerSlots:null,comparator:e.equals||void 0},i=r=>(typeof r=="function"&&(r=r(n.value)),Ja(n,r));return[Xa.bind(n),i]}function Za(t,e,n){const i=Qi(t,e,!0,Ee);jn(i)}function re(t,e,n){const i=Qi(t,e,!1,Ee);jn(i)}function W(t,e,n){Va=bh;const i=Qi(t,e,!1,Ee);(!n||!n.render)&&(i.user=!0),be?be.push(i):jn(i)}function G(t,e,n){n=n?Object.assign({},Ri,n):Ri;const i=Qi(t,e,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,jn(i),Xa.bind(i)}function io(t){return _e(t,!1)}function Tt(t){if(ct===null)return t();const e=ct;ct=null;try{return t()}finally{ct=e}}function ge(t,e,n){const i=Array.isArray(t);let r,o=n&&n.defer;return s=>{let a;if(i){a=Array(t.length);for(let l=0;l<t.length;l++)a[l]=t[l]()}else a=t();if(o){o=!1;return}const u=Tt(()=>e(a,r,s));return r=a,u}}function Ye(t){W(()=>Tt(t))}function J(t){return dt===null||(dt.cleanups===null?dt.cleanups=[t]:dt.cleanups.push(t)),t}function qa(){return ct}function wh(){return dt}function Lh(t,e){const n=dt,i=ct;dt=t,ct=null;try{return _e(e,!0)}catch(r){ro(r)}finally{dt=n,ct=i}}function Th(t){const e=ct,n=dt;return Promise.resolve().then(()=>{ct=e,dt=n;let i;return _e(t,!1),ct=dt=null,i?i.done:void 0})}function jh(){return[Nh,Th]}function Kt(t,e){const n=Symbol("context");return{id:n,Provider:Dh(n),defaultValue:t}}function $t(t){let e;return(e=nu(dt,t.id))!==void 0?e:t.defaultValue}function Hi(t){const e=G(t),n=G(()=>oo(e()));return n.toArray=()=>{const i=n();return Array.isArray(i)?i:i!=null?[i]:[]},n}function Xa(){if(this.sources&&this.state)if(this.state===Ee)jn(this);else{const t=It;It=null,_e(()=>Ki(this),!1),It=t}if(ct){const t=this.observers?this.observers.length:0;ct.sources?(ct.sources.push(this),ct.sourceSlots.push(t)):(ct.sources=[this],ct.sourceSlots=[t]),this.observers?(this.observers.push(ct),this.observerSlots.push(ct.sources.length-1)):(this.observers=[ct],this.observerSlots=[ct.sources.length-1])}return this.value}function Ja(t,e,n){let i=t.value;return(!t.comparator||!t.comparator(i,e))&&(t.value=e,t.observers&&t.observers.length&&_e(()=>{for(let r=0;r<t.observers.length;r+=1){const o=t.observers[r],s=no&&no.running;s&&no.disposed.has(o),(s?!o.tState:!o.state)&&(o.pure?It.push(o):be.push(o),o.observers&&eu(o)),s||(o.state=Ee)}if(It.length>1e6)throw It=[],new Error},!1)),e}function jn(t){if(!t.fn)return;$i(t);const e=dt,n=ct,i=Fi;ct=dt=t,Sh(t,t.value,i),ct=n,dt=e}function Sh(t,e,n){let i;try{i=t.fn(e)}catch(r){return t.pure&&(t.state=Ee,t.owned&&t.owned.forEach($i),t.owned=null),t.updatedAt=n+1,ro(r)}(!t.updatedAt||t.updatedAt<=n)&&(t.updatedAt!=null&&"observers"in t?Ja(t,i):t.value=i,t.updatedAt=n)}function Qi(t,e,n,i=Ee,r){const o={fn:t,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:dt,context:null,pure:n};return dt===null||dt!==Wa&&(dt.owned?dt.owned.push(o):dt.owned=[o]),o}function Gi(t){if(t.state===0)return;if(t.state===Bi)return Ki(t);if(t.suspense&&Tt(t.suspense.inFallback))return t.suspense.effects.push(t);const e=[t];for(;(t=t.owner)&&(!t.updatedAt||t.updatedAt<Fi);)t.state&&e.push(t);for(let n=e.length-1;n>=0;n--)if(t=e[n],t.state===Ee)jn(t);else if(t.state===Bi){const i=It;It=null,_e(()=>Ki(t,e[0]),!1),It=i}}function _e(t,e){if(It)return t();let n=!1;e||(It=[]),be?n=!0:be=[],Fi++;try{const i=t();return Eh(n),i}catch(i){n||(be=null),It=null,ro(i)}}function Eh(t){if(It&&(tu(It),It=null),t)return;const e=be;be=null,e.length&&_e(()=>Va(e),!1)}function tu(t){for(let e=0;e<t.length;e++)Gi(t[e])}function bh(t){let e,n=0;for(e=0;e<t.length;e++){const i=t[e];i.user?t[n++]=i:Gi(i)}for(e=0;e<n;e++)Gi(t[e])}function Ki(t,e){t.state=0;for(let n=0;n<t.sources.length;n+=1){const i=t.sources[n];if(i.sources){const r=i.state;r===Ee?i!==e&&(!i.updatedAt||i.updatedAt<Fi)&&Gi(i):r===Bi&&Ki(i,e)}}}function eu(t){for(let e=0;e<t.observers.length;e+=1){const n=t.observers[e];n.state||(n.state=Bi,n.pure?It.push(n):be.push(n),n.observers&&eu(n))}}function $i(t){let e;if(t.sources)for(;t.sources.length;){const n=t.sources.pop(),i=t.sourceSlots.pop(),r=n.observers;if(r&&r.length){const o=r.pop(),s=n.observerSlots.pop();i<r.length&&(o.sourceSlots[s]=i,r[i]=o,n.observerSlots[i]=s)}}if(t.owned){for(e=t.owned.length-1;e>=0;e--)$i(t.owned[e]);t.owned=null}if(t.cleanups){for(e=t.cleanups.length-1;e>=0;e--)t.cleanups[e]();t.cleanups=null}t.state=0,t.context=null}function Ah(t){return t instanceof Error?t:new Error(typeof t=="string"?t:"Unknown error",{cause:t})}function ro(t,e=dt){throw Ah(t)}function nu(t,e){return t?t.context&&t.context[e]!==void 0?t.context[e]:nu(t.owner,e):void 0}function oo(t){if(typeof t=="function"&&!t.length)return oo(t());if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++){const i=oo(t[n]);Array.isArray(i)?e.push.apply(e,i):e.push(i)}return e}return t}function Dh(t,e){return function(n){let i;return re(()=>i=Tt(()=>(dt.context={[t]:n.value},Hi(()=>n.children))),void 0),i}}const vh=Symbol("fallback");function iu(t){for(let e=0;e<t.length;e++)t[e]()}function Ih(t,e,n={}){let i=[],r=[],o=[],s=0,a=e.length>1?[]:null;return J(()=>iu(o)),()=>{let u=t()||[],l,g;return u[Pi],Tt(()=>{let c=u.length,f,d,h,y,p,w,m,N,T;if(c===0)s!==0&&(iu(o),o=[],i=[],r=[],s=0,a&&(a=[])),n.fallback&&(i=[vh],r[0]=rn(E=>(o[0]=E,n.fallback())),s=1);else if(s===0){for(r=new Array(c),g=0;g<c;g++)i[g]=u[g],r[g]=rn(M);s=c}else{for(h=new Array(c),y=new Array(c),a&&(p=new Array(c)),w=0,m=Math.min(s,c);w<m&&i[w]===u[w];w++);for(m=s-1,N=c-1;m>=w&&N>=w&&i[m]===u[N];m--,N--)h[N]=r[m],y[N]=o[m],a&&(p[N]=a[m]);for(f=new Map,d=new Array(N+1),g=N;g>=w;g--)T=u[g],l=f.get(T),d[g]=l===void 0?-1:l,f.set(T,g);for(l=w;l<=m;l++)T=i[l],g=f.get(T),g!==void 0&&g!==-1?(h[g]=r[l],y[g]=o[l],a&&(p[g]=a[l]),g=d[g],f.set(T,g)):o[l]();for(g=w;g<c;g++)g in h?(r[g]=h[g],o[g]=y[g],a&&(a[g]=p[g],a[g](g))):r[g]=rn(M);r=r.slice(0,s=c),i=u.slice(0)}return r});function M(c){if(o[g]=c,a){const[f,d]=K(g);return a[g]=d,e(u[g],f)}return e(u[g])}}}function L(t,e){return Tt(()=>t(e||{}))}function Vi(){return!0}const so={get(t,e,n){return e===ie?n:t.get(e)},has(t,e){return e===ie?!0:t.has(e)},set:Vi,deleteProperty:Vi,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:Vi,deleteProperty:Vi}},ownKeys(t){return t.keys()}};function ao(t){return(t=typeof t=="function"?t():t)?t:{}}function xh(){for(let t=0,e=this.length;t<e;++t){const n=this[t]();if(n!==void 0)return n}}function it(...t){let e=!1;for(let o=0;o<t.length;o++){const s=t[o];e=e||!!s&&ie in s,t[o]=typeof s=="function"?(e=!0,G(s)):s}if(e)return new Proxy({get(o){for(let s=t.length-1;s>=0;s--){const a=ao(t[s])[o];if(a!==void 0)return a}},has(o){for(let s=t.length-1;s>=0;s--)if(o in ao(t[s]))return!0;return!1},keys(){const o=[];for(let s=0;s<t.length;s++)o.push(...Object.keys(ao(t[s])));return[...new Set(o)]}},so);const n={},i={},r=new Set;for(let o=t.length-1;o>=0;o--){const s=t[o];if(!s)continue;const a=Object.getOwnPropertyNames(s);for(let u=0,l=a.length;u<l;u++){const g=a[u];if(g==="__proto__"||g==="constructor")continue;const M=Object.getOwnPropertyDescriptor(s,g);if(!r.has(g))M.get?(r.add(g),Object.defineProperty(n,g,{enumerable:!0,configurable:!0,get:xh.bind(i[g]=[M.get.bind(s)])})):(M.value!==void 0&&r.add(g),n[g]=M.value);else{const c=i[g];c?M.get?c.push(M.get.bind(s)):M.value!==void 0&&c.push(()=>M.value):n[g]===void 0&&(n[g]=M.value)}}}return n}function gt(t,...e){if(ie in t){const r=new Set(e.length>1?e.flat():e[0]),o=e.map(s=>new Proxy({get(a){return s.includes(a)?t[a]:void 0},has(a){return s.includes(a)&&a in t},keys(){return s.filter(a=>a in t)}},so));return o.push(new Proxy({get(s){return r.has(s)?void 0:t[s]},has(s){return r.has(s)?!1:s in t},keys(){return Object.keys(t).filter(s=>!r.has(s))}},so)),o}const n={},i=e.map(()=>({}));for(const r of Object.getOwnPropertyNames(t)){const o=Object.getOwnPropertyDescriptor(t,r),s=!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable;let a=!1,u=0;for(const l of e)l.includes(r)&&(a=!0,s?i[u][r]=o.value:Object.defineProperty(i[u],r,o)),++u;a||(s?n[r]=o.value:Object.defineProperty(n,r,o))}return[...i,n]}let Oh=0;function Sn(){const t=$a.context;return t?`${t.id}${t.count++}`:`cl-${Oh++}`}const ru=t=>`Stale read from <${t}>.`;function ou(t){const e="fallback"in t&&{fallback:()=>t.fallback};return G(Ih(()=>t.each,t.children,e||void 0))}function Lt(t){const e=t.keyed,n=G(()=>t.when,void 0,{equals:(i,r)=>e?i===r:!i==!r});return G(()=>{const i=n();if(i){const r=t.children;return typeof r=="function"&&r.length>0?Tt(()=>r(e?i:()=>{if(!Tt(n))throw ru("Show");return t.when})):r}return t.fallback},void 0,void 0)}function uo(t){let e=!1;const n=(o,s)=>o[0]===s[0]&&(e?o[1]===s[1]:!o[1]==!s[1])&&o[2]===s[2],i=Hi(()=>t.children),r=G(()=>{let o=i();Array.isArray(o)||(o=[o]);for(let s=0;s<o.length;s++){const a=o[s].when;if(a)return e=!!o[s].keyed,[s,a,o[s]]}return[-1]},void 0,{equals:n});return G(()=>{const[o,s,a]=r();if(o<0)return t.fallback;const u=a.children;return typeof u=="function"&&u.length>0?Tt(()=>u(e?s:()=>{if(Tt(r)[0]!==o)throw ru("Match");return a.when})):u},void 0,void 0)}function Ae(t){return t}const Ch=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],zh=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Ch]),kh=new Set(["innerHTML","textContent","innerText","children"]),Uh=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Yh=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function _h(t,e){const n=Yh[t];return typeof n=="object"?n[e]?n.$:void 0:n}const Ph=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Rh=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Bh={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Fh(t,e,n){let i=n.length,r=e.length,o=i,s=0,a=0,u=e[r-1].nextSibling,l=null;for(;s<r||a<o;){if(e[s]===n[a]){s++,a++;continue}for(;e[r-1]===n[o-1];)r--,o--;if(r===s){const g=o<i?a?n[a-1].nextSibling:n[o-a]:u;for(;a<o;)t.insertBefore(n[a++],g)}else if(o===a)for(;s<r;)(!l||!l.has(e[s]))&&e[s].remove(),s++;else if(e[s]===n[o-1]&&n[a]===e[r-1]){const g=e[--r].nextSibling;t.insertBefore(n[a++],e[s++].nextSibling),t.insertBefore(n[--o],g),e[r]=n[o]}else{if(!l){l=new Map;let M=a;for(;M<o;)l.set(n[M],M++)}const g=l.get(e[s]);if(g!=null)if(a<g&&g<o){let M=s,c=1,f;for(;++M<r&&M<o&&!((f=l.get(e[M]))==null||f!==g+c);)c++;if(c>g-a){const d=e[s];for(;a<g;)t.insertBefore(n[a++],d)}else t.replaceChild(n[a++],e[s++])}else s++;else e[s++].remove()}}}const su="_$DX_DELEGATE";function Hh(t,e,n,i={}){let r;return rn(o=>{r=o,e===document?t():q(e,t(),e.firstChild?null:void 0,n)},i.owner),()=>{r(),e.textContent=""}}function ut(t,e,n){let i;const r=()=>{const s=document.createElement("template");return s.innerHTML=t,n?s.content.firstChild.firstChild:s.content.firstChild},o=e?()=>Tt(()=>document.importNode(i||(i=r()),!0)):()=>(i||(i=r())).cloneNode(!0);return o.cloneNode=o,o}function Qh(t,e=window.document){const n=e[su]||(e[su]=new Set);for(let i=0,r=t.length;i<r;i++){const o=t[i];n.has(o)||(n.add(o),e.addEventListener(o,qh))}}function Pe(t,e,n){n==null?t.removeAttribute(e):t.setAttribute(e,n)}function Gh(t,e,n,i){i==null?t.removeAttributeNS(e,n):t.setAttributeNS(e,n,i)}function mt(t,e){e==null?t.removeAttribute("class"):t.className=e}function Kh(t,e,n,i){if(i)Array.isArray(n)?(t[`$$${e}`]=n[0],t[`$$${e}Data`]=n[1]):t[`$$${e}`]=n;else if(Array.isArray(n)){const r=n[0];t.addEventListener(e,n[0]=o=>r.call(t,n[1],o))}else t.addEventListener(e,n)}function $h(t,e,n={}){const i=Object.keys(e||{}),r=Object.keys(n);let o,s;for(o=0,s=r.length;o<s;o++){const a=r[o];!a||a==="undefined"||e[a]||(uu(t,a,!1),delete n[a])}for(o=0,s=i.length;o<s;o++){const a=i[o],u=!!e[a];!a||a==="undefined"||n[a]===u||!u||(uu(t,a,!0),n[a]=u)}return n}function Vh(t,e,n){if(!e)return n?Pe(t,"style"):e;const i=t.style;if(typeof e=="string")return i.cssText=e;typeof n=="string"&&(i.cssText=n=void 0),n||(n={}),e||(e={});let r,o;for(o in n)e[o]==null&&i.removeProperty(o),delete n[o];for(o in e)r=e[o],r!==n[o]&&(i.setProperty(o,r),n[o]=r);return n}function Rt(t,e={},n,i){const r={};return i||re(()=>r.children=En(t,e.children,r.children)),re(()=>e.ref&&e.ref(t)),re(()=>Wh(t,e,n,!0,r,!0)),r}function au(t,e,n){return Tt(()=>t(e,n))}function q(t,e,n,i){if(n!==void 0&&!i&&(i=[]),typeof e!="function")return En(t,e,i,n);re(r=>En(t,e(),r,n),i)}function Wh(t,e,n,i,r={},o=!1){e||(e={});for(const s in r)if(!(s in e)){if(s==="children")continue;r[s]=cu(t,s,null,r[s],n,o)}for(const s in e){if(s==="children"){i||En(t,e.children);continue}const a=e[s];r[s]=cu(t,s,a,r[s],n,o)}}function Zh(t){return t.toLowerCase().replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}function uu(t,e,n){const i=e.trim().split(/\s+/);for(let r=0,o=i.length;r<o;r++)t.classList.toggle(i[r],n)}function cu(t,e,n,i,r,o){let s,a,u,l,g;if(e==="style")return Vh(t,n,i);if(e==="classList")return $h(t,n,i);if(n===i)return i;if(e==="ref")o||n(t);else if(e.slice(0,3)==="on:"){const M=e.slice(3);i&&t.removeEventListener(M,i),n&&t.addEventListener(M,n)}else if(e.slice(0,10)==="oncapture:"){const M=e.slice(10);i&&t.removeEventListener(M,i,!0),n&&t.addEventListener(M,n,!0)}else if(e.slice(0,2)==="on"){const M=e.slice(2).toLowerCase(),c=Ph.has(M);if(!c&&i){const f=Array.isArray(i)?i[0]:i;t.removeEventListener(M,f)}(c||n)&&(Kh(t,M,n,c),c&&Qh([M]))}else if(e.slice(0,5)==="attr:")Pe(t,e.slice(5),n);else if((g=e.slice(0,5)==="prop:")||(u=kh.has(e))||!r&&((l=_h(e,t.tagName))||(a=zh.has(e)))||(s=t.nodeName.includes("-")))g&&(e=e.slice(5),a=!0),e==="class"||e==="className"?mt(t,n):s&&!a&&!u?t[Zh(e)]=n:t[l||e]=n;else{const M=r&&e.indexOf(":")>-1&&Bh[e.split(":")[0]];M?Gh(t,M,e,n):Pe(t,Uh[e]||e,n)}return n}function qh(t){const e=`$$${t.type}`;let n=t.composedPath&&t.composedPath()[0]||t.target;for(t.target!==n&&Object.defineProperty(t,"target",{configurable:!0,value:n}),Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}});n;){const i=n[e];if(i&&!n.disabled){const r=n[`${e}Data`];if(r!==void 0?i.call(n,r,t):i.call(n,t),t.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function En(t,e,n,i,r){for(;typeof n=="function";)n=n();if(e===n)return n;const o=typeof e,s=i!==void 0;if(t=s&&n[0]&&n[0].parentNode||t,o==="string"||o==="number")if(o==="number"&&(e=e.toString()),s){let a=n[0];a&&a.nodeType===3?a.data=e:a=document.createTextNode(e),n=bn(t,n,i,a)}else n!==""&&typeof n=="string"?n=t.firstChild.data=e:n=t.textContent=e;else if(e==null||o==="boolean")n=bn(t,n,i);else{if(o==="function")return re(()=>{let a=e();for(;typeof a=="function";)a=a();n=En(t,a,n,i)}),()=>n;if(Array.isArray(e)){const a=[],u=n&&Array.isArray(n);if(co(a,e,n,r))return re(()=>n=En(t,a,n,i,!0)),()=>n;if(a.length===0){if(n=bn(t,n,i),s)return n}else u?n.length===0?lu(t,a,i):Fh(t,n,a):(n&&bn(t),lu(t,a));n=a}else if(e.nodeType){if(Array.isArray(n)){if(s)return n=bn(t,n,i,e);bn(t,n,null,e)}else n==null||n===""||!t.firstChild?t.appendChild(e):t.replaceChild(e,t.firstChild);n=e}else console.warn("Unrecognized value. Skipped inserting",e)}return n}function co(t,e,n,i){let r=!1;for(let o=0,s=e.length;o<s;o++){let a=e[o],u=n&&n[o],l;if(!(a==null||a===!0||a===!1))if((l=typeof a)=="object"&&a.nodeType)t.push(a);else if(Array.isArray(a))r=co(t,a,u)||r;else if(l==="function")if(i){for(;typeof a=="function";)a=a();r=co(t,Array.isArray(a)?a:[a],Array.isArray(u)?u:[u])||r}else t.push(a),r=!0;else{const g=String(a);u&&u.nodeType===3&&u.data===g?t.push(u):t.push(document.createTextNode(g))}}return r}function lu(t,e,n=null){for(let i=0,r=e.length;i<r;i++)t.insertBefore(e[i],n)}function bn(t,e,n,i){if(n===void 0)return t.textContent="";const r=i||document.createTextNode("");if(e.length){let o=!1;for(let s=e.length-1;s>=0;s--){const a=e[s];if(r!==a){const u=a.parentNode===t;!o&&!s?u?t.replaceChild(r,a):t.insertBefore(r,n):u&&a.remove()}else o=!0}}else t.insertBefore(r,n);return[r]}const Xh="http://www.w3.org/2000/svg";function du(t,e=!1){return e?document.createElementNS(Xh,t):document.createElement(t)}function lo(t){const{useShadow:e}=t,n=document.createTextNode(""),i=()=>t.mount||document.body,r=wh();let o,s=!!$a.context;return W(()=>{o||(o=Lh(r,()=>G(()=>t.children)));const a=i();if(a instanceof HTMLHeadElement){const[u,l]=K(!1),g=()=>l(!0);rn(M=>q(a,()=>u()?M():o(),null)),J(g)}else{const u=du(t.isSVG?"g":"div",t.isSVG),l=e&&u.attachShadow?u.attachShadow({mode:"open"}):u;Object.defineProperty(u,"_$host",{get(){return n.parentNode},configurable:!0}),q(l,o),a.appendChild(u),t.ref&&t.ref(u),J(()=>a.removeChild(u))}},void 0,{render:!s}),n}function ri(t){const[e,n]=gt(t,["component"]),i=G(()=>e.component);return G(()=>{const r=i();switch(typeof r){case"function":return Object.assign(r,{[mh]:!0}),Tt(()=>r(n));case"string":const o=Rh.has(r),s=du(r,o);return Rt(s,n,o),s}})}/*!
|
|
18
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
21
|
+
* Released under the MIT License.
|
|
22
|
+
*/function gu(t){return Object.prototype.toString.call(t)==="[object Object]"}function Jh(t){var e,n;return gu(t)===!1?!1:(e=t.constructor,e===void 0?!0:(n=e.prototype,!(gu(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}const go=Symbol("store-raw"),oi=Symbol("store-node");function hu(t){let e=t[ie];if(!e&&(Object.defineProperty(t,ie,{value:e=new Proxy(t,nf)}),!Array.isArray(t))){const n=Object.keys(t),i=Object.getOwnPropertyDescriptors(t);for(let r=0,o=n.length;r<o;r++){const s=n[r];i[s].get&&Object.defineProperty(t,s,{enumerable:i[s].enumerable,get:i[s].get.bind(e)})}}return e}function Re(t){let e;return t!=null&&typeof t=="object"&&(t[ie]||!(e=Object.getPrototypeOf(t))||e===Object.prototype||Array.isArray(t))}function An(t,e=new Set){let n,i,r,o;if(n=t!=null&&t[go])return n;if(!Re(t)||e.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):e.add(t);for(let s=0,a=t.length;s<a;s++)r=t[s],(i=An(r,e))!==r&&(t[s]=i)}else{Object.isFrozen(t)?t=Object.assign({},t):e.add(t);const s=Object.keys(t),a=Object.getOwnPropertyDescriptors(t);for(let u=0,l=s.length;u<l;u++)o=s[u],!a[o].get&&(r=t[o],(i=An(r,e))!==r&&(t[o]=i))}return t}function ho(t){let e=t[oi];return e||Object.defineProperty(t,oi,{value:e=Object.create(null)}),e}function fo(t,e,n){return t[e]||(t[e]=Mu(n))}function tf(t,e){const n=Reflect.getOwnPropertyDescriptor(t,e);return!n||n.get||!n.configurable||e===ie||e===oi||(delete n.value,delete n.writable,n.get=()=>t[ie][e]),n}function fu(t){if(qa()){const e=ho(t);(e._||(e._=Mu()))()}}function ef(t){return fu(t),Reflect.ownKeys(t)}function Mu(t){const[e,n]=K(t,{equals:!1,internal:!0});return e.$=n,e}const nf={get(t,e,n){if(e===go)return t;if(e===ie)return n;if(e===Pi)return fu(t),n;const i=ho(t),r=i[e];let o=r?r():t[e];if(e===oi||e==="__proto__")return o;if(!r){const s=Object.getOwnPropertyDescriptor(t,e);qa()&&(typeof o!="function"||t.hasOwnProperty(e))&&!(s&&s.get)&&(o=fo(i,e,o)())}return Re(o)?hu(o):o},has(t,e){return e===go||e===ie||e===Pi||e===oi||e==="__proto__"?!0:(this.get(t,e,t),e in t)},set(){return!0},deleteProperty(){return!0},ownKeys:ef,getOwnPropertyDescriptor:tf};function oe(t,e,n,i=!1){if(!i&&t[e]===n)return;const r=t[e],o=t.length;n===void 0?delete t[e]:t[e]=n;let s=ho(t),a;if((a=fo(s,e,r))&&a.$(()=>n),Array.isArray(t)&&t.length!==o){for(let u=t.length;u<o;u++)(a=s[u])&&a.$();(a=fo(s,"length",o))&&a.$(t.length)}(a=s._)&&a.$()}function yu(t,e){const n=Object.keys(e);for(let i=0;i<n.length;i+=1){const r=n[i];oe(t,r,e[r])}}function rf(t,e){if(typeof e=="function"&&(e=e(t)),e=An(e),Array.isArray(e)){if(t===e)return;let n=0,i=e.length;for(;n<i;n++){const r=e[n];t[n]!==r&&oe(t,n,r)}oe(t,"length",i)}else yu(t,e)}function si(t,e,n=[]){let i,r=t;if(e.length>1){i=e.shift();const s=typeof i,a=Array.isArray(t);if(Array.isArray(i)){for(let u=0;u<i.length;u++)si(t,[i[u]].concat(e),n);return}else if(a&&s==="function"){for(let u=0;u<t.length;u++)i(t[u],u)&&si(t,[u].concat(e),n);return}else if(a&&s==="object"){const{from:u=0,to:l=t.length-1,by:g=1}=i;for(let M=u;M<=l;M+=g)si(t,[M].concat(e),n);return}else if(e.length>1){si(t[i],e,[i].concat(n));return}r=t[i],n=[i].concat(n)}let o=e[0];typeof o=="function"&&(o=o(r,n),o===r)||i===void 0&&o==null||(o=An(o),i===void 0||Re(r)&&Re(o)&&!Array.isArray(o)?yu(r,o):oe(t,i,o))}function Mo(...[t,e]){const n=An(t||{}),i=Array.isArray(n),r=hu(n);function o(...s){io(()=>{i&&s.length===1?rf(n,s[0]):si(n,s)})}return[r,o]}const yo=Symbol("store-root");function Dn(t,e,n,i,r){const o=e[n];if(t===o)return;if(n!==yo&&(!Re(t)||!Re(o)||r&&t[r]!==o[r])){oe(e,n,t);return}if(Array.isArray(t)){if(t.length&&o.length&&(!i||r&&t[0]&&t[0][r]!=null)){let u,l,g,M,c,f,d,h;for(g=0,M=Math.min(o.length,t.length);g<M&&(o[g]===t[g]||r&&o[g]&&t[g]&&o[g][r]===t[g][r]);g++)Dn(t[g],o,g,i,r);const y=new Array(t.length),p=new Map;for(M=o.length-1,c=t.length-1;M>=g&&c>=g&&(o[M]===t[c]||r&&o[g]&&t[g]&&o[M][r]===t[c][r]);M--,c--)y[c]=o[M];if(g>c||g>M){for(l=g;l<=c;l++)oe(o,l,t[l]);for(;l<t.length;l++)oe(o,l,y[l]),Dn(t[l],o,l,i,r);o.length>t.length&&oe(o,"length",t.length);return}for(d=new Array(c+1),l=c;l>=g;l--)f=t[l],h=r&&f?f[r]:f,u=p.get(h),d[l]=u===void 0?-1:u,p.set(h,l);for(u=g;u<=M;u++)f=o[u],h=r&&f?f[r]:f,l=p.get(h),l!==void 0&&l!==-1&&(y[l]=o[u],l=d[l],p.set(h,l));for(l=g;l<t.length;l++)l in y?(oe(o,l,y[l]),Dn(t[l],o,l,i,r)):oe(o,l,t[l])}else for(let u=0,l=t.length;u<l;u++)Dn(t[u],o,u,i,r);o.length>t.length&&oe(o,"length",t.length);return}const s=Object.keys(t);for(let u=0,l=s.length;u<l;u++)Dn(t[s[u]],o,s[u],i,r);const a=Object.keys(o);for(let u=0,l=a.length;u<l;u++)t[a[u]]===void 0&&oe(o,a[u],void 0)}function of(t,e={}){const{merge:n,key:i="id"}=e,r=An(t);return o=>{if(!Re(o)||!Re(r))return r;const s=Dn(r,{[yo]:o},yo,n,i);return s===void 0?o:s}}const sf={scan_the_front_side:"Scan the front side of the document",flip_document:"Flip the document",scan_the_back_side:"Scan the back side of the document",scanning_wrong_side:"Scanning wrong side",move_closer:"Move closer",move_farther:"Move farther",camera_angle_too_steep:"Keep document parallel to phone",document_too_close_to_edge:"Keep the document fully visible",lightning_too_bright:"Move to spot with less lighting",lightning_too_dark:"Move to brighter spot",blur_detected:"Keep document and phone still",glare_detected:"Tilt or move document to remove reflection",occluded:"Keep the document fully visible",need_help_tooltip:"Need help?",onboarding_field_visible_title:"Keep all the details visible",onboarding_field_visible_details:"Make sure you keep the document well lit. All document fields should be visible on the camera screen.",tutorial_fields_visible_title:"Keep all the fields visible",tutorial_fields_visible_start:"Start scanning",tutorial_fields_visible_details:"Make sure you aren’t covering parts of the document with a finger, including the bottom lines. Also, watch out for hologram reflections that go over the document fields.",tutorial_harsh_light_title:"Watch out for harsh light",tutorial_harsh_light_details:"Avoid direct harsh light because it reflects from the document and can make parts of the document unreadable. If you can’t read data on the document, it won’t be visible to the camera either.",tutorial_keep_still_title:"Keep still while scanning",tutorial_keep_still_details:"Try to keep the phone and document still while scanning. Moving either can blur the image and make data on the document unreadable.",camera_unavailable:"Camera Unavailable",camera_permission_error:"App doesn't have permission to use the camera, please change privacy settings",settings:"Settings",camera_media_capture_error:"Unable to capture media",camera_unable_to_resume_session:"Unable to resume",camera_query_in_progress:"Selecting best camera, please wait",done:"Done",cancel:"Cancel",back:"Back",next:"Next",ok:"OK",dismiss:"Dismiss"},pu=Kt(),af=t=>{const[e,n]=Mo(structuredClone({...sf,...t.userStrings})),i={t:e,updateLocalization:n};return L(pu.Provider,{value:i,get children(){return t.children}})};function on(){const t=$t(pu);if(!t)throw new Error("LocalizationProvider not in scope.");return t}function po(t){return(...e)=>{for(const n of t)n&&n(...e)}}function uf(t){return(...e)=>{for(let n=t.length-1;n>=0;n--){const i=t[n];i&&i(...e)}}}var j=t=>typeof t=="function"&&!t.length?t():t,mu=t=>Array.isArray(t)?t:t?[t]:[];function cf(t,...e){return typeof t=="function"?t(...e):t}var lf=J;function df(t,e,n,i){return t.addEventListener(e,n,i),lf(t.removeEventListener.bind(t,e,n,i))}function gf(t,e,n,i){const r=()=>{mu(j(t)).forEach(o=>{o&&mu(j(e)).forEach(s=>df(o,s,n,i))})};typeof t=="function"?W(r):re(r)}var mo=Symbol("fallback");function Nu(t){for(const e of t)e.dispose()}function hf(t,e,n,i={}){const r=new Map;return J(()=>Nu(r.values())),()=>{const s=t()||[];return s[Pi],Tt(()=>{if(!s.length)return Nu(r.values()),r.clear(),i.fallback?[rn(g=>(r.set(mo,{dispose:g}),i.fallback()))]:[];const a=new Array(s.length),u=r.get(mo);if(!r.size||u){u?.dispose(),r.delete(mo);for(let g=0;g<s.length;g++){const M=s[g],c=e(M,g);o(a,M,g,c)}return a}const l=new Set(r.keys());for(let g=0;g<s.length;g++){const M=s[g],c=e(M,g);l.delete(c);const f=r.get(c);f?(a[g]=f.mapped,f.setIndex?.(g),f.setItem(()=>M)):o(a,M,g,c)}for(const g of l)r.get(g)?.dispose(),r.delete(g);return a})};function o(s,a,u,l){rn(g=>{const[M,c]=K(a),f={setItem:c,dispose:g};if(n.length>1){const[d,h]=K(u);f.setIndex=h,f.mapped=n(M,d)}else f.mapped=n(M);r.set(l,f),s[u]=f.mapped})}}function ff(t){const{by:e}=t;return G(hf(()=>t.each,typeof e=="function"?e:n=>n[e],t.children,"fallback"in t?{fallback:()=>t.fallback}:void 0))}function Mf(t){const e=typeof t.on=="function"||Array.isArray(t.on)?t.on:()=>t.on;return G(ge(e,(n,i)=>{const r=t.children;return typeof r=="function"&&r.length>0?r(n,i):r}))}function Wi(){return!0}var yf={get(t,e,n){return e===ie?n:t.get(e)},has(t,e){return t.has(e)},set:Wi,deleteProperty:Wi,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:Wi,deleteProperty:Wi}},ownKeys(t){return t.keys()}},pf=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function wu(t){const e={};let n;for(;n=pf.exec(t);)e[n[1]]=n[2];return e}function Lu(t,e){if(typeof t=="object"&&typeof e=="object")return{...t,...e};if(typeof t=="string"&&typeof e=="string")return`${t};${e}`;const n=typeof t=="object"?t:wu(t),i=typeof e=="object"?e:wu(e);return{...n,...i}}var No=(t,e,n)=>{let i;for(const r of t){const o=j(r)[e];i?o&&(i=n(i,o)):i=o}return i};function mf(...t){const e=Array.isArray(t[0]),n=e?t[0]:t;if(n.length===1)return n[0];const i=e&&t[1]?.reverseEventHandlers?uf:po,r={};for(const s of n){const a=j(s);for(const u in a)if(u[0]==="o"&&u[1]==="n"&&u[2]){const l=a[u],g=u.toLowerCase(),M=typeof l=="function"?l:Array.isArray(l)?l.length===1?l[0]:l[0].bind(void 0,l[1]):void 0;M?r[g]?r[g].push(M):r[g]=[M]:delete r[g]}}const o=it(...n);return new Proxy({get(s){if(typeof s!="string")return Reflect.get(o,s);if(s==="style")return No(n,"style",Lu);if(s==="ref"){const a=[];for(const u of n){const l=j(u)[s];typeof l=="function"&&a.push(l)}return i(a)}if(s[0]==="o"&&s[1]==="n"&&s[2]){const a=r[s.toLowerCase()];return a?i(a):Reflect.get(o,s)}return s==="class"||s==="className"?No(n,s,(a,u)=>`${a} ${u}`):s==="classList"?No(n,s,(a,u)=>({...a,...u})):Reflect.get(o,s)},has(s){return Reflect.has(o,s)},keys(){return Object.keys(o)}},yf)}function Vt(...t){return po(t)}var Tu=t=>t instanceof Element;function wo(t,e){if(e(t))return t;if(typeof t=="function"&&!t.length)return wo(t(),e);if(Array.isArray(t))for(const n of t){const i=wo(n,e);if(i)return i}return null}function Nf(t,e=Tu,n=Tu){const i=G(t);return G(()=>wo(i(),e))}function ju(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function wf(t){return typeof t=="number"}function Lf(t){return Array.isArray(t)}function vn(t){return Object.prototype.toString.call(t)==="[object String]"}function Zi(t){return typeof t=="function"}function In(t){return e=>`${t()}-${e}`}function se(t,e){return t?t===e||t.contains(e):!1}function ai(t,e=!1){const{activeElement:n}=Wt(t);if(!n?.nodeName)return null;if(Su(n)&&n.contentDocument)return ai(n.contentDocument.body,e);if(e){const i=n.getAttribute("aria-activedescendant");if(i){const r=Wt(n).getElementById(i);if(r)return r}}return n}function Lo(t){return Wt(t).defaultView||window}function Wt(t){return t?t.ownerDocument||t:document}function Su(t){return t.tagName==="IFRAME"}var Eu=(t=>(t.Escape="Escape",t.Enter="Enter",t.Tab="Tab",t.Space=" ",t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.End="End",t.Home="Home",t.PageDown="PageDown",t.PageUp="PageUp",t))(Eu||{});function bu(t){return typeof window>"u"||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(e=>t.test(e.brand))||t.test(window.navigator.userAgent)}function To(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function ui(){return To(/^Mac/i)}function Tf(){return To(/^iPhone/i)}function jf(){return To(/^iPad/i)||ui()&&navigator.maxTouchPoints>1}function Au(){return Tf()||jf()}function Sf(){return ui()||Au()}function Ef(){return bu(/AppleWebKit/i)&&!bf()}function bf(){return bu(/Chrome/i)}function St(t,e){return e&&(Zi(e)?e(t):e[0](e[1],t)),t?.defaultPrevented}function ae(t){return e=>{for(const n of t)St(e,n)}}function Af(t){return ui()?t.metaKey&&!t.ctrlKey:t.ctrlKey&&!t.metaKey}function xt(t){if(t)if(Df())t.focus({preventScroll:!0});else{const e=vf(t);t.focus(),If(e)}}var qi=null;function Df(){if(qi==null){qi=!1;try{document.createElement("div").focus({get preventScroll(){return qi=!0,!0}})}catch{}}return qi}function vf(t){let e=t.parentNode;const n=[],i=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==i;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return i instanceof HTMLElement&&n.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),n}function If(t){for(const{element:e,scrollTop:n,scrollLeft:i}of t)e.scrollTop=n,e.scrollLeft=i}var Du=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],xf=[...Du,'[tabindex]:not([tabindex="-1"]):not([disabled])'],jo=Du.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])",Of=xf.join(':not([hidden]):not([tabindex="-1"]),');function vu(t,e){const n=Array.from(t.querySelectorAll(jo)).filter(Iu);return e&&Iu(t)&&n.unshift(t),n.forEach((i,r)=>{if(Su(i)&&i.contentDocument){const o=i.contentDocument.body,s=vu(o,!1);n.splice(r,1,...s)}}),n}function Iu(t){return xu(t)&&!Cf(t)}function xu(t){return t.matches(jo)&&So(t)}function Cf(t){return parseInt(t.getAttribute("tabindex")||"0",10)<0}function So(t,e){return t.nodeName!=="#comment"&&zf(t)&&kf(t,e)&&(!t.parentElement||So(t.parentElement,t))}function zf(t){if(!(t instanceof HTMLElement)&&!(t instanceof SVGElement))return!1;const{display:e,visibility:n}=t.style;let i=e!=="none"&&n!=="hidden"&&n!=="collapse";if(i){if(!t.ownerDocument.defaultView)return i;const{getComputedStyle:r}=t.ownerDocument.defaultView,{display:o,visibility:s}=r(t);i=o!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function kf(t,e){return!t.hasAttribute("hidden")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Uf(t,e){return e.some(n=>n.contains(t))}function Yf(t,e,n){const i=e?.tabbable?Of:jo,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){return e?.from?.contains(o)?NodeFilter.FILTER_REJECT:o.matches(i)&&So(o)&&(!n||Uf(o,n))&&(!e?.accept||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(r.currentNode=e.from),r}function _f(){}function Pf(t){return[t.clientX,t.clientY]}function Rf(t,e){const[n,i]=t;let r=!1;const o=e.length;for(let s=o,a=0,u=s-1;a<s;u=a++){const[l,g]=e[a],[M,c]=e[u],[,f]=e[u===0?s-1:u-1]||[0,0],d=(g-c)*(n-l)-(l-M)*(i-g);if(c<g){if(i>=c&&i<g){if(d===0)return!0;d>0&&(i===c?i>f&&(r=!r):r=!r)}}else if(g<c){if(i>g&&i<=c){if(d===0)return!0;d<0&&(i===c?i<f&&(r=!r):r=!r)}}else if(i==g&&(n>=M&&n<=l||n>=l&&n<=M))return!0}return r}function Nt(t,e){return it(t,e)}var ci=new Map,Ou=new Set;function Cu(){if(typeof window>"u")return;const t=n=>{if(!n.target)return;let i=ci.get(n.target);i||(i=new Set,ci.set(n.target,i),n.target.addEventListener("transitioncancel",e)),i.add(n.propertyName)},e=n=>{if(!n.target)return;const i=ci.get(n.target);if(i&&(i.delete(n.propertyName),i.size===0&&(n.target.removeEventListener("transitioncancel",e),ci.delete(n.target)),ci.size===0)){for(const r of Ou)r();Ou.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",e)}typeof document<"u"&&(document.readyState!=="loading"?Cu():document.addEventListener("DOMContentLoaded",Cu));function zu(t,e){const n=ku(t,e,"left"),i=ku(t,e,"top"),r=e.offsetWidth,o=e.offsetHeight;let s=t.scrollLeft,a=t.scrollTop;const u=s+t.offsetWidth,l=a+t.offsetHeight;n<=s?s=n:n+r>u&&(s+=n+r-u),i<=a?a=i:i+o>l&&(a+=i+o-l),t.scrollLeft=s,t.scrollTop=a}function ku(t,e,n){const i=n==="left"?"offsetLeft":"offsetTop";let r=0;for(;e.offsetParent&&(r+=e[i],e.offsetParent!==t);){if(e.offsetParent.contains(t)){r-=t[i];break}e=e.offsetParent}return r}var Bf={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"};function Eo(t){let e=t.startIndex??0;const n=t.startLevel??0,i=[],r=u=>{const l=t.getKey??"key",g=vn(l)?u[l]:l(u);return g!=null?String(g):""},o=u=>{const l=t.getTextValue??"textValue",g=vn(l)?u[l]:l(u);return g!=null?String(g):""},s=u=>{const l=t.getDisabled??"disabled";return(vn(l)?u[l]:l(u))??!1},a=u=>vn(t.getSectionChildren)?u[t.getSectionChildren]:t.getSectionChildren?.(u);for(const u of t.dataSource){if(vn(u)||wf(u)){i.push({type:"item",rawValue:u,key:String(u),textValue:String(u),disabled:s(u),level:n,index:e}),e++;continue}if(a(u)!=null){i.push({type:"section",rawValue:u,key:"",textValue:"",disabled:!1,level:n,index:e}),e++;const l=a(u)??[];if(l.length>0){const g=Eo({dataSource:l,getKey:t.getKey,getTextValue:t.getTextValue,getDisabled:t.getDisabled,getSectionChildren:t.getSectionChildren,startIndex:e,startLevel:n+1});i.push(...g),e+=g.length}}else i.push({type:"item",rawValue:u,key:r(u),textValue:o(u),disabled:s(u),level:n,index:e}),e++}return i}/*!
|
|
18
23
|
* Portions of this file are based on code from react-spectrum.
|
|
19
24
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
20
25
|
*
|
|
21
26
|
* Credits to the React Spectrum team:
|
|
22
27
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/collections/src/useCollection.ts
|
|
23
|
-
*/function
|
|
28
|
+
*/function Ff(t,e=[]){const n=Eo({dataSource:j(t.dataSource),getKey:j(t.getKey),getTextValue:j(t.getTextValue),getDisabled:j(t.getDisabled),getSectionChildren:j(t.getSectionChildren)}),[i,r]=K(t.factory(n));return W(ge([()=>j(t.dataSource),()=>j(t.getKey),()=>j(t.getTextValue),()=>j(t.getDisabled),()=>j(t.getSectionChildren),()=>t.factory,...e],([o,s,a,u,l,g])=>{const M=Eo({dataSource:o,getKey:s,getTextValue:a,getDisabled:u,getSectionChildren:l});r(()=>g(M))},{defer:!0})),i}/*!
|
|
24
29
|
* Portions of this file are based on code from react-spectrum.
|
|
25
30
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
26
31
|
*
|
|
27
32
|
* Credits to the React Spectrum team:
|
|
28
33
|
* https://github.com/adobe/react-spectrum/blob/22cb32d329e66c60f55d4fc4025d1d44bb015d71/packages/@react-stately/collections/src/getItemCount.ts
|
|
29
|
-
*/const
|
|
34
|
+
*/const Uu=new WeakMap;function Hf(t){let e=Uu.get(t);if(e!=null)return e;e=0;for(const n of t)n.type==="item"&&e++;return Uu.set(t,e),e}function Yu(t){const[e,n]=K(t.defaultValue?.()),i=G(()=>t.value?.()!==void 0),r=G(()=>i()?t.value?.():e());return[r,o=>{Tt(()=>{const s=cf(o,r());return Object.is(s,r())||(i()||n(s),t.onChange?.(s)),s})}]}function Qf(t){const[e,n]=Yu(t);return[()=>e()??!1,n]}function bo(t={}){const[e,n]=Qf({value:()=>j(t.open),defaultValue:()=>!!j(t.defaultOpen),onChange:o=>t.onOpenChange?.(o)}),i=()=>{n(!0)},r=()=>{n(!1)};return{isOpen:e,setIsOpen:n,open:i,close:r,toggle:()=>{e()?r():i()}}}function Gf(t){const e=n=>{n.key===Eu.Escape&&t.onEscapeKeyDown?.(n)};W(()=>{if(j(t.isDisabled))return;const n=t.ownerDocument?.()??Wt();n.addEventListener("keydown",e),J(()=>{n.removeEventListener("keydown",e)})})}/*!
|
|
30
35
|
* Portions of this file are based on code from radix-ui-primitives.
|
|
31
36
|
* MIT Licensed, Copyright (c) 2022 WorkOS.
|
|
32
37
|
*
|
|
@@ -38,7 +43,7 @@
|
|
|
38
43
|
*
|
|
39
44
|
* Credits to the Chakra UI team:
|
|
40
45
|
* https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/dismissable/src/layer-stack.ts
|
|
41
|
-
*/const
|
|
46
|
+
*/const Xi="data-kb-top-layer";let _u,Ao=!1;const De=[];function li(t){return De.findIndex(e=>e.node===t)}function Kf(t){return De[li(t)]}function $f(t){return De[De.length-1].node===t}function Pu(){return De.filter(t=>t.isPointerBlocking)}function Vf(){return[...Pu()].slice(-1)[0]}function Do(){return Pu().length>0}function Ru(t){const e=li(Vf()?.node);return li(t)<e}function Wf(t){De.push(t)}function Zf(t){const e=li(t);e<0||De.splice(e,1)}function qf(){De.forEach(({node:t})=>{t.style.pointerEvents=Ru(t)?"none":"auto"})}function Xf(t){if(Do()&&!Ao){const e=Wt(t);_u=document.body.style.pointerEvents,e.body.style.pointerEvents="none",Ao=!0}}function Jf(t){if(Do())return;const e=Wt(t);e.body.style.pointerEvents=_u,e.body.style.length===0&&e.body.removeAttribute("style"),Ao=!1}const Zt={layers:De,isTopMostLayer:$f,hasPointerBlockingLayer:Do,isBelowPointerBlockingLayer:Ru,addLayer:Wf,removeLayer:Zf,indexOf:li,find:Kf,assignPointerEventToLayers:qf,disableBodyPointerEvents:Xf,restoreBodyPointerEvents:Jf};/*!
|
|
42
47
|
* Portions of this file are based on code from radix-ui-primitives.
|
|
43
48
|
* MIT Licensed, Copyright (c) 2022 WorkOS.
|
|
44
49
|
*
|
|
@@ -51,25 +56,25 @@
|
|
|
51
56
|
* Credits to the Chakra UI team:
|
|
52
57
|
* https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/focus-scope/src/focus-on-child-unmount.ts
|
|
53
58
|
* https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/focus-scope/src/focus-containment.ts
|
|
54
|
-
*/const
|
|
59
|
+
*/const vo="focusScope.autoFocusOnMount",Io="focusScope.autoFocusOnUnmount",Bu={bubbles:!1,cancelable:!0},Fu={stack:[],active(){return this.stack[0]},add(t){t!==this.active()&&this.active()?.pause(),this.stack=ju(this.stack,t),this.stack.unshift(t)},remove(t){this.stack=ju(this.stack,t),this.active()?.resume()}};function Hu(t,e){const[n,i]=K(!1),r={pause(){i(!0)},resume(){i(!1)}};let o=null;const s=d=>t.onMountAutoFocus?.(d),a=d=>t.onUnmountAutoFocus?.(d),u=()=>Wt(e()),l=()=>{const d=u().createElement("span");return d.setAttribute("data-focus-trap",""),d.tabIndex=0,Object.assign(d.style,Bf),d},g=()=>{const d=e();return d?vu(d,!0).filter(h=>!h.hasAttribute("data-focus-trap")):[]},M=()=>{const d=g();return d.length>0?d[0]:null},c=()=>{const d=g();return d.length>0?d[d.length-1]:null},f=()=>{const d=e();if(!d)return!1;const h=ai(d);return!h||se(d,h)?!1:xu(h)};W(()=>{const d=e();if(!d)return;Fu.add(r);const h=ai(d);if(!se(d,h)){const y=new CustomEvent(vo,Bu);d.addEventListener(vo,s),d.dispatchEvent(y),y.defaultPrevented||setTimeout(()=>{xt(M()),ai(d)===h&&xt(d)},0)}J(()=>{d.removeEventListener(vo,s),setTimeout(()=>{const y=new CustomEvent(Io,Bu);f()&&y.preventDefault(),d.addEventListener(Io,a),d.dispatchEvent(y),y.defaultPrevented||xt(h??u().body),d.removeEventListener(Io,a),Fu.remove(r)},0)})}),W(()=>{const d=e();if(!d||!j(t.trapFocus)||n())return;const h=p=>{const w=p.target;w?.closest(`[${Xi}]`)||(se(d,w)?o=w:xt(o))},y=p=>{const w=p.relatedTarget??ai(d);w?.closest(`[${Xi}]`)||se(d,w)||xt(o)};u().addEventListener("focusin",h),u().addEventListener("focusout",y),J(()=>{u().removeEventListener("focusin",h),u().removeEventListener("focusout",y)})}),W(()=>{const d=e();if(!d||!j(t.trapFocus)||n())return;const h=l();d.insertAdjacentElement("afterbegin",h);const y=l();d.insertAdjacentElement("beforeend",y);function p(m){const N=M(),T=c();m.relatedTarget===N?xt(T):xt(N)}h.addEventListener("focusin",p),y.addEventListener("focusin",p);const w=new MutationObserver(m=>{for(const N of m)N.previousSibling===y&&(y.remove(),d.insertAdjacentElement("beforeend",y)),N.nextSibling===h&&(h.remove(),d.insertAdjacentElement("afterbegin",h))});w.observe(d,{childList:!0,subtree:!1}),J(()=>{h.removeEventListener("focusin",p),y.removeEventListener("focusin",p),h.remove(),y.remove(),w.disconnect()})})}/*!
|
|
55
60
|
* Portions of this file are based on code from zag.
|
|
56
61
|
* MIT Licensed, Copyright (c) 2021 Chakra UI.
|
|
57
62
|
*
|
|
58
63
|
* Credits to the zag team:
|
|
59
64
|
* https://github.com/chakra-ui/zag/blob/c1e6c7689b22bf58741ded7cf224dd9baec2a046/packages/utilities/form-utils/src/form.ts
|
|
60
|
-
*/function
|
|
65
|
+
*/function tM(t,e){W(ge(t,n=>{if(n==null)return;const i=eM(n);i!=null&&(i.addEventListener("reset",e,{passive:!0}),J(()=>{i.removeEventListener("reset",e)}))}))}function eM(t){return nM(t)?t.form:t.closest("form")}function nM(t){return t.matches("textarea, input, select, button")}/*!
|
|
61
66
|
* Portions of this file are based on code from react-spectrum.
|
|
62
67
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
63
68
|
*
|
|
64
69
|
* Credits to the React Spectrum team:
|
|
65
70
|
* https://github.com/adobe/react-spectrum/blob/15e101b74966bd5eb719c6529ce71ce57eaed430/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx
|
|
66
|
-
*/const
|
|
71
|
+
*/const iM="data-live-announcer";/*!
|
|
67
72
|
* This file is based on code from react-spectrum.
|
|
68
73
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
69
74
|
*
|
|
70
75
|
* Credits to the React Spectrum team:
|
|
71
76
|
* https://github.com/adobe/react-spectrum/blob/810579b671791f1593108f62cdc1893de3a220e3/packages/@react-aria/overlays/src/ariaHideOutside.ts
|
|
72
|
-
*/function
|
|
77
|
+
*/function Qu(t){W(()=>{j(t.isDisabled)||J(rM(j(t.targets),j(t.root)))})}const di=new WeakMap,ue=[];function rM(t,e=document.body){const n=new Set(t),i=new Set,r=u=>{for(const c of u.querySelectorAll(`[${iM}], [${Xi}]`))n.add(c);const l=c=>{if(n.has(c)||c.parentElement&&i.has(c.parentElement)&&c.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const f of n)if(c.contains(f))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},g=document.createTreeWalker(u,NodeFilter.SHOW_ELEMENT,{acceptNode:l}),M=l(u);if(M===NodeFilter.FILTER_ACCEPT&&o(u),M!==NodeFilter.FILTER_REJECT){let c=g.nextNode();for(;c!=null;)o(c),c=g.nextNode()}},o=u=>{const l=di.get(u)??0;u.getAttribute("aria-hidden")==="true"&&l===0||(l===0&&u.setAttribute("aria-hidden","true"),i.add(u),di.set(u,l+1))};ue.length&&ue[ue.length-1].disconnect(),r(e);const s=new MutationObserver(u=>{for(const l of u)if(!(l.type!=="childList"||l.addedNodes.length===0)&&![...n,...i].some(g=>g.contains(l.target))){for(const g of l.removedNodes)g instanceof Element&&(n.delete(g),i.delete(g));for(const g of l.addedNodes)(g instanceof HTMLElement||g instanceof SVGElement)&&(g.dataset.liveAnnouncer==="true"||g.dataset.reactAriaTopLayer==="true")?n.add(g):g instanceof Element&&r(g)}});s.observe(e,{childList:!0,subtree:!0});const a={observe(){s.observe(e,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return ue.push(a),()=>{s.disconnect();for(const u of i){const l=di.get(u);if(l==null)return;l===1?(u.removeAttribute("aria-hidden"),di.delete(u)):di.set(u,l-1)}a===ue[ue.length-1]?(ue.pop(),ue.length&&ue[ue.length-1].observe()):ue.splice(ue.indexOf(a),1)}}/*!
|
|
73
78
|
* Portions of this file are based on code from radix-ui-primitives.
|
|
74
79
|
* MIT Licensed, Copyright (c) 2022 WorkOS.
|
|
75
80
|
*
|
|
@@ -81,14 +86,14 @@
|
|
|
81
86
|
*
|
|
82
87
|
* Credits to the Chakra UI team:
|
|
83
88
|
* https://github.com/chakra-ui/zag/blob/d1dbf9e240803c9e3ed81ebef363739be4273de0/packages/utilities/interact-outside/src/index.ts
|
|
84
|
-
*/const
|
|
89
|
+
*/const Gu="interactOutside.pointerDownOutside",Ku="interactOutside.focusOutside";function oM(t,e){let n,i=_f;const r=()=>Wt(e()),o=M=>t.onPointerDownOutside?.(M),s=M=>t.onFocusOutside?.(M),a=M=>t.onInteractOutside?.(M),u=M=>{const c=M.target;return!(c instanceof HTMLElement)||c.closest(`[${Xi}]`)||!se(r(),c)||se(e(),c)?!1:!t.shouldExcludeElement?.(c)},l=M=>{function c(){const f=e(),d=M.target;if(!f||!d||!u(M))return;const h=ae([o,a]);d.addEventListener(Gu,h,{once:!0});const y=new CustomEvent(Gu,{bubbles:!1,cancelable:!0,detail:{originalEvent:M,isContextMenu:M.button===2||Af(M)&&M.button===0}});d.dispatchEvent(y)}M.pointerType==="touch"?(r().removeEventListener("click",c),i=c,r().addEventListener("click",c,{once:!0})):c()},g=M=>{const c=e(),f=M.target;if(!c||!f||!u(M))return;const d=ae([s,a]);f.addEventListener(Ku,d,{once:!0});const h=new CustomEvent(Ku,{bubbles:!1,cancelable:!0,detail:{originalEvent:M,isContextMenu:!1}});f.dispatchEvent(h)};W(()=>{j(t.isDisabled)||(n=window.setTimeout(()=>{r().addEventListener("pointerdown",l,!0)},0),r().addEventListener("focusin",g,!0),J(()=>{window.clearTimeout(n),r().removeEventListener("click",i),r().removeEventListener("pointerdown",l,!0),r().removeEventListener("focusin",g,!0)}))})}/*!
|
|
85
90
|
* Portions of this file are based on code from radix-ui-primitives.
|
|
86
91
|
* MIT Licensed, Copyright (c) 2022 WorkOS.
|
|
87
92
|
*
|
|
88
93
|
* Credits to the Radix UI team:
|
|
89
94
|
* https://github.com/radix-ui/primitives/blob/21a7c97dc8efa79fecca36428eec49f187294085/packages/react/presence/src/Presence.tsx
|
|
90
95
|
* https://github.com/radix-ui/primitives/blob/21a7c97dc8efa79fecca36428eec49f187294085/packages/react/presence/src/useStateMachine.tsx
|
|
91
|
-
*/function
|
|
96
|
+
*/function Ji(t){const[e,n]=K();let i={},r=t(),o="none";const[s,a]=sM(t()?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W(ge(s,u=>{const l=tr(i);o=u==="mounted"?l:"none"})),W(ge(t,u=>{if(r===u)return;const l=tr(i);u?a("MOUNT"):i?.display==="none"?a("UNMOUNT"):a(r&&o!==l?"ANIMATION_OUT":"UNMOUNT"),r=u})),W(ge(e,u=>{if(u){const l=M=>{const c=tr(i).includes(M.animationName);M.target===u&&c&&a("ANIMATION_END")},g=M=>{M.target===u&&(o=tr(i))};u.addEventListener("animationstart",g),u.addEventListener("animationcancel",l),u.addEventListener("animationend",l),J(()=>{u.removeEventListener("animationstart",g),u.removeEventListener("animationcancel",l),u.removeEventListener("animationend",l)})}else a("ANIMATION_END")})),{isPresent:()=>["mounted","unmountSuspended"].includes(s()),setRef:u=>{u&&(i=getComputedStyle(u)),n(u)}}}function tr(t){return t?.animationName||"none"}function sM(t,e){const n=(o,s)=>e[o][s]??o,[i,r]=K(t);return[i,o=>{r(s=>n(s,o))}]}/*!
|
|
92
97
|
* Portions of this file are based on code from floating-ui.
|
|
93
98
|
* MIT Licensed, Copyright (c) 2021 Floating UI contributors.
|
|
94
99
|
*
|
|
@@ -100,45 +105,45 @@
|
|
|
100
105
|
*
|
|
101
106
|
* Credits to the Ariakit team:
|
|
102
107
|
* https://github.com/ariakit/ariakit/blob/5d8a1f047fcadcf117073c70359663a3946b73bf/packages/ariakit/src/dialog/__utils/use-prevent-body-scroll.ts
|
|
103
|
-
*/const
|
|
108
|
+
*/const xo="data-kb-scroll-lock";function $u(t,e){if(!t)return()=>{};const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function aM(t,e,n){if(!t)return()=>{};const i=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{i?t.style.setProperty(e,i):t.style.removeProperty(e)}}function uM(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function Vu(t){W(()=>{if(!j(t.ownerRef)||j(t.isDisabled))return;const e=Wt(j(t.ownerRef)),n=Lo(j(t.ownerRef)),{documentElement:i,body:r}=e;if(r.hasAttribute(xo))return;r.setAttribute(xo,"");const o=n.innerWidth-i.clientWidth,s=()=>aM(i,"--scrollbar-width",`${o}px`),a=uM(i),u=()=>$u(r,{overflow:"hidden",[a]:`${o}px`}),l=()=>{const{scrollX:M,scrollY:c,visualViewport:f}=n,d=f?.offsetLeft??0,h=f?.offsetTop??0,y=$u(r,{position:"fixed",overflow:"hidden",top:`${-(c-Math.floor(h))}px`,left:`${-(M-Math.floor(d))}px`,right:"0",[a]:`${o}px`});return()=>{y(),n.scrollTo(M,c)}},g=po([s(),Au()?l():u()]);J(()=>{g(),r.removeAttribute(xo)})})}function qt(t){return e=>(t(e),()=>t(void 0))}/*!
|
|
104
109
|
* Portions of this file are based on code from ariakit.
|
|
105
110
|
* MIT Licensed, Copyright (c) Diego Haz.
|
|
106
111
|
*
|
|
107
112
|
* Credits to the ariakit team:
|
|
108
113
|
* https://github.com/ariakit/ariakit/blob/8a13899ff807bbf39f3d89d2d5964042ba4d5287/packages/ariakit-react-utils/src/hooks.ts
|
|
109
|
-
*/function
|
|
114
|
+
*/function cM(t,e){const[n,i]=K(Wu(e?.()));return W(()=>{i(t()?.tagName.toLowerCase()||Wu(e?.()))}),n}function Wu(t){return vn(t)?t:void 0}/*!
|
|
110
115
|
* Portions of this file are based on code from react-spectrum.
|
|
111
116
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
112
117
|
*
|
|
113
118
|
* Credits to the React Spectrum team:
|
|
114
119
|
* https://github.com/adobe/react-spectrum/blob/70e7caf1946c423bc9aa9cb0e50dbdbe953d239b/packages/@react-aria/label/src/useField.ts
|
|
115
|
-
*/const
|
|
120
|
+
*/const lM=["id","name","validationState","required","disabled","readOnly"];function dM(t){const e=`form-control-${Sn()}`;t=Nt({id:e},t);const[n,i]=K(),[r,o]=K(),[s,a]=K(),[u,l]=K(),g=(f,d,h)=>{const y=h!=null||n()!=null;return[h,n(),y&&d!=null?f:void 0].filter(Boolean).join(" ")||void 0},M=f=>[s(),u(),f].filter(Boolean).join(" ")||void 0,c=G(()=>({"data-valid":j(t.validationState)==="valid"?"":void 0,"data-invalid":j(t.validationState)==="invalid"?"":void 0,"data-required":j(t.required)?"":void 0,"data-disabled":j(t.disabled)?"":void 0,"data-readonly":j(t.readOnly)?"":void 0}));return{formControlContext:{name:()=>j(t.name)??j(t.id),dataset:c,validationState:()=>j(t.validationState),isRequired:()=>j(t.required),isDisabled:()=>j(t.disabled),isReadOnly:()=>j(t.readOnly),labelId:n,fieldId:r,descriptionId:s,errorMessageId:u,getAriaLabelledBy:g,getAriaDescribedBy:M,generateId:In(()=>j(t.id)),registerLabel:qt(i),registerField:qt(o),registerDescription:qt(a),registerErrorMessage:qt(l)}}}const Zu=Kt();function Oo(){const t=$t(Zu);if(t===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return t}const gM=["id","aria-label","aria-labelledby","aria-describedby"];function hM(t){const e=Oo();return t=Nt({id:e.generateId("field")},t),W(()=>J(e.registerField(j(t.id)))),{fieldProps:{id:()=>j(t.id),ariaLabel:()=>j(t["aria-label"]),ariaLabelledBy:()=>e.getAriaLabelledBy(j(t.id),j(t["aria-label"]),j(t["aria-labelledby"])),ariaDescribedBy:()=>e.getAriaDescribedBy(j(t["aria-describedby"]))}}}function Bt(t){const[e,n]=gt(t,["asChild","as","children"]);if(!e.asChild)return L(ri,it({get component(){return e.as}},n,{get children(){return e.children}}));const i=Hi(()=>e.children);if(qu(i())){const r=Xu(n,i()?.props??{});return L(ri,r)}if(Lf(i())){const r=i().find(qu);if(r){const o=()=>L(ou,{get each(){return i()},children:a=>L(Lt,{when:a===r,fallback:a,get children(){return r.props.children}})}),s=Xu(n,r?.props??{});return L(ri,it(s,{children:o}))}}throw new Error("[kobalte]: Component is expected to render `asChild` but no children `As` component was found.")}const fM=Symbol("$$KobalteAsComponent");function qu(t){return t?.[fM]===!0}function Xu(t,e){return mf([t,e],{reverseEventHandlers:!0})}const MM={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schließen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"Lõpeta"},"fi-FI":{dismiss:"Hylkää"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutasítás"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};/*!
|
|
116
121
|
* Portions of this file are based on code from react-spectrum.
|
|
117
122
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
118
123
|
*
|
|
119
124
|
* Credits to the React Spectrum team:
|
|
120
125
|
* https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/i18n/src/utils.ts
|
|
121
|
-
*/const
|
|
126
|
+
*/const yM=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),pM=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function mM(t){if(Intl.Locale){const n=new Intl.Locale(t).maximize().script??"";return yM.has(n)}const e=t.split("-")[0];return pM.has(e)}function NM(t){return mM(t)?"rtl":"ltr"}/*!
|
|
122
127
|
* Portions of this file are based on code from react-spectrum.
|
|
123
128
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
124
129
|
*
|
|
125
130
|
* Credits to the React Spectrum team:
|
|
126
131
|
* https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/i18n/src/useDefaultLocale.ts
|
|
127
|
-
*/function
|
|
132
|
+
*/function Ju(){let t=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:NM(t)}}let Co=Ju();const gi=new Set;function tc(){Co=Ju();for(const t of gi)t(Co)}function wM(){const[t,e]=K(Co),n=G(()=>t());return Ye(()=>{gi.size===0&&window.addEventListener("languagechange",tc),gi.add(e),J(()=>{gi.delete(e),gi.size===0&&window.removeEventListener("languagechange",tc)})}),{locale:()=>n().locale,direction:()=>n().direction}}const LM=Kt();function er(){const t=wM();return $t(LM)||t}/*!
|
|
128
133
|
* Portions of this file are based on code from react-spectrum.
|
|
129
134
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
130
135
|
*
|
|
131
136
|
* Credits to the React Spectrum team:
|
|
132
137
|
* https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/i18n/src/useCollator.ts
|
|
133
|
-
*/const ko=new Map;function Ju(t){const{locale:e}=ir(),n=V(()=>e()+(t?Object.entries(t).sort((i,r)=>i[0]<r[0]?-1:1).join():""));return V(()=>{const i=n();let r;return ko.has(i)&&(r=ko.get(i)),r||(r=new Intl.Collator(e(),t),ko.set(i,r)),r})}var Uo=function(t,e){return Uo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},Uo(t,e)};function rr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Uo(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var pt=function(){return pt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},pt.apply(this,arguments)};function Yo(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function Po(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,o;i<r;i++)(o||!(i in e))&&(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))}var ct;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(ct||(ct={}));var Dt;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(Dt||(Dt={}));var Un;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(Un||(Un={}));function tc(t){return t.type===Dt.literal}function yM(t){return t.type===Dt.argument}function ec(t){return t.type===Dt.number}function nc(t){return t.type===Dt.date}function ic(t){return t.type===Dt.time}function rc(t){return t.type===Dt.select}function oc(t){return t.type===Dt.plural}function pM(t){return t.type===Dt.pound}function ac(t){return t.type===Dt.tag}function sc(t){return!!(t&&typeof t=="object"&&t.type===Un.number)}function _o(t){return!!(t&&typeof t=="object"&&t.type===Un.dateTime)}var uc=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,mM=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function NM(t){var e={};return t.replace(mM,function(n){var i=n.length;switch(n[0]){case"G":e.era=i===4?"long":i===5?"narrow":"short";break;case"y":e.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][i-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][i-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][i-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][i-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][i-1];break;case"s":e.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var wM=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function LM(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(wM).filter(function(c){return c.length>0}),n=[],i=0,r=e;i<r.length;i++){var o=r[i],a=o.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var s=a[0],u=a.slice(1),l=0,g=u;l<g.length;l++){var M=g[l];if(M.length===0)throw new Error("Invalid number skeleton")}n.push({stem:s,options:u})}return n}function TM(t){return t.replace(/^(.*?)-/,"")}var cc=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,lc=/^(@+)?(\+|#+)?[rs]?$/g,jM=/(\*)(0+)|(#+)(0+)|(0+)/g,dc=/^(0+)$/;function gc(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(lc,function(n,i,r){return typeof r!="string"?(e.minimumSignificantDigits=i.length,e.maximumSignificantDigits=i.length):r==="+"?e.minimumSignificantDigits=i.length:i[0]==="#"?e.maximumSignificantDigits=i.length:(e.minimumSignificantDigits=i.length,e.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),e}function hc(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function EM(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if(n==="+!"?(e.signDisplay="always",t=t.slice(2)):n==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!dc.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function fc(t){var e={},n=hc(t);return n||e}function SM(t){for(var e={},n=0,i=t;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=r.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=TM(r.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=pt(pt(pt({},e),{notation:"scientific"}),r.options.reduce(function(u,l){return pt(pt({},u),fc(l))},{}));continue;case"engineering":e=pt(pt(pt({},e),{notation:"engineering"}),r.options.reduce(function(u,l){return pt(pt({},u),fc(l))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(jM,function(u,l,g,M,c,f){if(l)e.minimumIntegerDigits=g.length;else{if(M&&c)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(dc.test(r.stem)){e.minimumIntegerDigits=r.stem.length;continue}if(cc.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(cc,function(u,l,g,M,c,f){return g==="*"?e.minimumFractionDigits=l.length:M&&M[0]==="#"?e.maximumFractionDigits=M.length:c&&f?(e.minimumFractionDigits=c.length,e.maximumFractionDigits=c.length+f.length):(e.minimumFractionDigits=l.length,e.maximumFractionDigits=l.length),""});var o=r.options[0];o==="w"?e=pt(pt({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=pt(pt({},e),gc(o)));continue}if(lc.test(r.stem)){e=pt(pt({},e),gc(r.stem));continue}var a=hc(r.stem);a&&(e=pt(pt({},e),a));var s=EM(r.stem);s&&(e=pt(pt({},e),s))}return e}var or={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function bM(t,e){for(var n="",i=0;i<t.length;i++){var r=t.charAt(i);if(r==="j"){for(var o=0;i+1<t.length&&t.charAt(i+1)===r;)o++,i++;var a=1+(o&1),s=o<2?1:3+(o>>1),u="a",l=AM(e);for((l=="H"||l=="k")&&(s=0);s-- >0;)n+=u;for(;a-- >0;)n=l+n}else r==="J"?n+="H":n+=r}return n}function AM(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,i;n!=="root"&&(i=t.maximize().region);var r=or[i||""]||or[n||""]||or["".concat(n,"-001")]||or["001"];return r[0]}var Ro,vM=new RegExp("^".concat(uc.source,"*")),DM=new RegExp("".concat(uc.source,"*$"));function gt(t,e){return{start:t,end:e}}var IM=!!String.prototype.startsWith,xM=!!String.fromCodePoint,OM=!!Object.fromEntries,CM=!!String.prototype.codePointAt,zM=!!String.prototype.trimStart,kM=!!String.prototype.trimEnd,UM=!!Number.isSafeInteger,YM=UM?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Fo=!0;try{var PM=mc("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Fo=((Ro=PM.exec("a"))===null||Ro===void 0?void 0:Ro[0])==="a"}catch{Fo=!1}var Mc=IM?function(t,e,n){return t.startsWith(e,n)}:function(t,e,n){return t.slice(n,n+e.length)===e},Bo=xM?String.fromCodePoint:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n="",i=t.length,r=0,o;i>r;){if(o=t[r++],o>1114111)throw RangeError(o+" is not a valid code point");n+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return n},yc=OM?Object.fromEntries:function(t){for(var e={},n=0,i=t;n<i.length;n++){var r=i[n],o=r[0],a=r[1];e[o]=a}return e},pc=CM?function(t,e){return t.codePointAt(e)}:function(t,e){var n=t.length;if(!(e<0||e>=n)){var i=t.charCodeAt(e),r;return i<55296||i>56319||e+1===n||(r=t.charCodeAt(e+1))<56320||r>57343?i:(i-55296<<10)+(r-56320)+65536}},_M=zM?function(t){return t.trimStart()}:function(t){return t.replace(vM,"")},RM=kM?function(t){return t.trimEnd()}:function(t){return t.replace(DM,"")};function mc(t,e){return new RegExp(t,e)}var Ho;if(Fo){var Nc=mc("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ho=function(t,e){var n;Nc.lastIndex=e;var i=Nc.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Ho=function(t,e){for(var n=[];;){var i=pc(t,e);if(i===void 0||wc(i)||QM(i))break;n.push(i),e+=i>=65536?2:1}return Bo.apply(void 0,n)};var FM=function(){function t(e,n){n===void 0&&(n={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,i){for(var r=[];!this.isEOF();){var o=this.char();if(o===123){var a=this.parseArgument(e,i);if(a.err)return a;r.push(a.val)}else{if(o===125&&e>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var s=this.clonePosition();this.bump(),r.push({type:Dt.pound,location:gt(s,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(ct.UNMATCHED_CLOSING_TAG,gt(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Qo(this.peek()||0)){var a=this.parseTag(e,n);if(a.err)return a;r.push(a.val)}else{var a=this.parseLiteral(e,n);if(a.err)return a;r.push(a.val)}}}return{val:r,err:null}},t.prototype.parseTag=function(e,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:Dt.literal,value:"<".concat(r,"/>"),location:gt(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,n,!0);if(o.err)return o;var a=o.val,s=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Qo(this.char()))return this.error(ct.INVALID_TAG,gt(s,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return r!==l?this.error(ct.UNMATCHED_CLOSING_TAG,gt(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:Dt.tag,value:r,children:a,location:gt(i,this.clonePosition())},err:null}:this.error(ct.INVALID_TAG,gt(s,this.clonePosition())))}else return this.error(ct.UNCLOSED_TAG,gt(i,this.clonePosition()))}else return this.error(ct.INVALID_TAG,gt(i,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&HM(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var i=this.clonePosition(),r="";;){var o=this.tryParseQuote(n);if(o){r+=o;continue}var a=this.tryParseUnquoted(e,n);if(a){r+=a;continue}var s=this.tryParseLeftAngleBracket();if(s){r+=s;continue}break}var u=gt(i,this.clonePosition());return{val:{type:Dt.literal,value:r,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!BM(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return Bo.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&e>0?null:(this.bump(),Bo(i))},t.prototype.parseArgument=function(e,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ct.EXPECT_ARGUMENT_CLOSING_BRACE,gt(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ct.EMPTY_ARGUMENT,gt(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(ct.MALFORMED_ARGUMENT,gt(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ct.EXPECT_ARGUMENT_CLOSING_BRACE,gt(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:Dt.argument,value:r,location:gt(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ct.EXPECT_ARGUMENT_CLOSING_BRACE,gt(i,this.clonePosition())):this.parseArgumentOptions(e,n,r,i);default:return this.error(ct.MALFORMED_ARGUMENT,gt(i,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),i=Ho(this.message,n),r=n+i.length;this.bumpTo(r);var o=this.clonePosition(),a=gt(e,o);return{value:i,location:a}},t.prototype.parseArgumentOptions=function(e,n,i,r){var o,a=this.clonePosition(),s=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(s){case"":return this.error(ct.EXPECT_ARGUMENT_TYPE,gt(a,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var g=this.clonePosition(),M=this.parseSimpleArgStyleIfPossible();if(M.err)return M;var c=RM(M.val);if(c.length===0)return this.error(ct.EXPECT_ARGUMENT_STYLE,gt(this.clonePosition(),this.clonePosition()));var f=gt(g,this.clonePosition());l={style:c,styleLocation:f}}var d=this.tryParseArgumentClose(r);if(d.err)return d;var h=gt(r,this.clonePosition());if(l&&Mc(l?.style,"::",0)){var y=_M(l.style.slice(2));if(s==="number"){var M=this.parseNumberSkeletonFromString(y,l.styleLocation);return M.err?M:{val:{type:Dt.number,value:i,location:h,style:M.val},err:null}}else{if(y.length===0)return this.error(ct.EXPECT_DATE_TIME_SKELETON,h);var p=y;this.locale&&(p=bM(y,this.locale));var c={type:Un.dateTime,pattern:p,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?NM(p):{}},w=s==="date"?Dt.date:Dt.time;return{val:{type:w,value:i,location:h,style:c},err:null}}}return{val:{type:s==="number"?Dt.number:s==="date"?Dt.date:Dt.time,value:i,location:h,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ct.EXPECT_SELECT_ARGUMENT_OPTIONS,gt(m,pt({},m)));this.bumpSpace();var N=this.parseIdentifierIfPossible(),j=0;if(s!=="select"&&N.value==="offset"){if(!this.bumpIf(":"))return this.error(ct.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,gt(this.clonePosition(),this.clonePosition()));this.bumpSpace();var M=this.tryParseDecimalInteger(ct.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ct.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(M.err)return M;this.bumpSpace(),N=this.parseIdentifierIfPossible(),j=M.val}var b=this.tryParsePluralOrSelectOptions(e,s,n,N);if(b.err)return b;var d=this.tryParseArgumentClose(r);if(d.err)return d;var S=gt(r,this.clonePosition());return s==="select"?{val:{type:Dt.select,value:i,options:yc(b.val),location:S},err:null}:{val:{type:Dt.plural,value:i,options:yc(b.val),offset:j,pluralType:s==="plural"?"cardinal":"ordinal",location:S},err:null}}default:return this.error(ct.INVALID_ARGUMENT_TYPE,gt(a,u))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(ct.EXPECT_ARGUMENT_CLOSING_BRACE,gt(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ct.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,gt(r,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,n){var i=[];try{i=LM(e)}catch{return this.error(ct.INVALID_NUMBER_SKELETON,n)}return{val:{type:Un.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?SM(i):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,i,r){for(var o,a=!1,s=[],u=new Set,l=r.value,g=r.location;;){if(l.length===0){var M=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(ct.EXPECT_PLURAL_ARGUMENT_SELECTOR,ct.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;g=gt(M,this.clonePosition()),l=this.message.slice(M.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?ct.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ct.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,g);l==="other"&&(a=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ct.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ct.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,gt(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(e+1,n,i);if(d.err)return d;var h=this.tryParseArgumentClose(f);if(h.err)return h;s.push([l,{value:d.val,location:gt(f,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,g=o.location}return s.length===0?this.error(n==="select"?ct.EXPECT_SELECT_ARGUMENT_SELECTOR:ct.EXPECT_PLURAL_ARGUMENT_SELECTOR,gt(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(ct.MISSING_OTHER_CLAUSE,gt(this.clonePosition(),this.clonePosition())):{val:s,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var o=!1,a=0;!this.isEOF();){var s=this.char();if(s>=48&&s<=57)o=!0,a=a*10+(s-48),this.bump();else break}var u=gt(r,this.clonePosition());return o?(a*=i,YM(a)?{val:a,err:null}:this.error(n,u)):this.error(e,u)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=pc(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(Mc(this.message,e,this.offset())){for(var n=0;n<e.length;n++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var n=this.offset(),i=this.message.indexOf(e,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&wc(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(e>=65536?2:1));return i??null},t}();function Qo(t){return t>=97&&t<=122||t>=65&&t<=90}function BM(t){return Qo(t)||t===47}function HM(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function wc(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function QM(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function Go(t){t.forEach(function(e){if(delete e.location,rc(e)||oc(e))for(var n in e.options)delete e.options[n].location,Go(e.options[n].value);else ec(e)&&sc(e.style)||(nc(e)||ic(e))&&_o(e.style)?delete e.style.location:ac(e)&&Go(e.children)})}function GM(t,e){e===void 0&&(e={}),e=pt({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new FM(t,e).parse();if(n.err){var i=SyntaxError(ct[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return e?.captureLocation||Go(n.val),n.val}function Ko(t,e){var n=e&&e.cache?e.cache:qM,i=e&&e.serializer?e.serializer:ZM,r=e&&e.strategy?e.strategy:$M;return r(t,{cache:n,serializer:i})}function KM(t){return t==null||typeof t=="number"||typeof t=="boolean"}function Lc(t,e,n,i){var r=KM(i)?i:n(i),o=e.get(r);return typeof o>"u"&&(o=t.call(this,i),e.set(r,o)),o}function Tc(t,e,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),o=e.get(r);return typeof o>"u"&&(o=t.apply(this,i),e.set(r,o)),o}function $o(t,e,n,i,r){return n.bind(e,t,i,r)}function $M(t,e){var n=t.length===1?Lc:Tc;return $o(t,this,n,e.cache.create(),e.serializer)}function VM(t,e){return $o(t,this,Tc,e.cache.create(),e.serializer)}function WM(t,e){return $o(t,this,Lc,e.cache.create(),e.serializer)}var ZM=function(){return JSON.stringify(arguments)};function Vo(){this.cache=Object.create(null)}Vo.prototype.get=function(t){return this.cache[t]},Vo.prototype.set=function(t,e){this.cache[t]=e};var qM={create:function(){return new Vo}},Wo={variadic:VM,monadic:WM},Yn;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(Yn||(Yn={}));var ar=function(t){rr(e,t);function e(n,i,r){var o=t.call(this,n)||this;return o.code=i,o.originalMessage=r,o}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),jc=function(t){rr(e,t);function e(n,i,r,o){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),Yn.INVALID_VALUE,o)||this}return e}(ar),XM=function(t){rr(e,t);function e(n,i,r){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),Yn.INVALID_VALUE,r)||this}return e}(ar),JM=function(t){rr(e,t);function e(n,i){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),Yn.MISSING_VALUE,i)||this}return e}(ar),Vt;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(Vt||(Vt={}));function t0(t){return t.length<2?t:t.reduce(function(e,n){var i=e[e.length-1];return!i||i.type!==Vt.literal||n.type!==Vt.literal?e.push(n):i.value+=n.value,e},[])}function e0(t){return typeof t=="function"}function sr(t,e,n,i,r,o,a){if(t.length===1&&tc(t[0]))return[{type:Vt.literal,value:t[0].value}];for(var s=[],u=0,l=t;u<l.length;u++){var g=l[u];if(tc(g)){s.push({type:Vt.literal,value:g.value});continue}if(pM(g)){typeof o=="number"&&s.push({type:Vt.literal,value:n.getNumberFormat(e).format(o)});continue}var M=g.value;if(!(r&&M in r))throw new JM(M,a);var c=r[M];if(yM(g)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),s.push({type:typeof c=="string"?Vt.literal:Vt.object,value:c});continue}if(nc(g)){var f=typeof g.style=="string"?i.date[g.style]:_o(g.style)?g.style.parsedOptions:void 0;s.push({type:Vt.literal,value:n.getDateTimeFormat(e,f).format(c)});continue}if(ic(g)){var f=typeof g.style=="string"?i.time[g.style]:_o(g.style)?g.style.parsedOptions:i.time.medium;s.push({type:Vt.literal,value:n.getDateTimeFormat(e,f).format(c)});continue}if(ec(g)){var f=typeof g.style=="string"?i.number[g.style]:sc(g.style)?g.style.parsedOptions:void 0;f&&f.scale&&(c=c*(f.scale||1)),s.push({type:Vt.literal,value:n.getNumberFormat(e,f).format(c)});continue}if(ac(g)){var d=g.children,h=g.value,y=r[h];if(!e0(y))throw new XM(h,"function",a);var p=sr(d,e,n,i,r,o),w=y(p.map(function(j){return j.value}));Array.isArray(w)||(w=[w]),s.push.apply(s,w.map(function(j){return{type:typeof j=="string"?Vt.literal:Vt.object,value:j}}))}if(rc(g)){var m=g.options[c]||g.options.other;if(!m)throw new jc(g.value,c,Object.keys(g.options),a);s.push.apply(s,sr(m.value,e,n,i,r));continue}if(oc(g)){var m=g.options["=".concat(c)];if(!m){if(!Intl.PluralRules)throw new ar(`Intl.PluralRules is not available in this environment.
|
|
138
|
+
*/const zo=new Map;function ec(t){const{locale:e}=er(),n=G(()=>e()+(t?Object.entries(t).sort((i,r)=>i[0]<r[0]?-1:1).join():""));return G(()=>{const i=n();let r;return zo.has(i)&&(r=zo.get(i)),r||(r=new Intl.Collator(e(),t),zo.set(i,r)),r})}var ko=function(t,e){return ko=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},ko(t,e)};function nr(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ko(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var ot=function(){return ot=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},ot.apply(this,arguments)};function Uo(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function Yo(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,o;i<r;i++)(o||!(i in e))&&(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))}var tt;(function(t){t[t.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",t[t.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",t[t.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",t[t.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",t[t.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",t[t.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",t[t.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",t[t.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",t[t.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",t[t.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",t[t.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",t[t.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",t[t.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",t[t.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",t[t.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",t[t.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",t[t.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",t[t.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",t[t.INVALID_TAG=23]="INVALID_TAG",t[t.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",t[t.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",t[t.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(tt||(tt={}));var ft;(function(t){t[t.literal=0]="literal",t[t.argument=1]="argument",t[t.number=2]="number",t[t.date=3]="date",t[t.time=4]="time",t[t.select=5]="select",t[t.plural=6]="plural",t[t.pound=7]="pound",t[t.tag=8]="tag"})(ft||(ft={}));var xn;(function(t){t[t.number=0]="number",t[t.dateTime=1]="dateTime"})(xn||(xn={}));function nc(t){return t.type===ft.literal}function TM(t){return t.type===ft.argument}function ic(t){return t.type===ft.number}function rc(t){return t.type===ft.date}function oc(t){return t.type===ft.time}function sc(t){return t.type===ft.select}function ac(t){return t.type===ft.plural}function jM(t){return t.type===ft.pound}function uc(t){return t.type===ft.tag}function cc(t){return!!(t&&typeof t=="object"&&t.type===xn.number)}function _o(t){return!!(t&&typeof t=="object"&&t.type===xn.dateTime)}var lc=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,SM=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function EM(t){var e={};return t.replace(SM,function(n){var i=n.length;switch(n[0]){case"G":e.era=i===4?"long":i===5?"narrow":"short";break;case"y":e.year=i===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":e.month=["numeric","2-digit","short","long","narrow"][i-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":e.day=["numeric","2-digit"][i-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":e.weekday=i===4?"short":i===5?"narrow":"short";break;case"e":if(i<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][i-4];break;case"c":if(i<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");e.weekday=["short","long","narrow","short"][i-4];break;case"a":e.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":e.hourCycle="h12",e.hour=["numeric","2-digit"][i-1];break;case"H":e.hourCycle="h23",e.hour=["numeric","2-digit"][i-1];break;case"K":e.hourCycle="h11",e.hour=["numeric","2-digit"][i-1];break;case"k":e.hourCycle="h24",e.hour=["numeric","2-digit"][i-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":e.minute=["numeric","2-digit"][i-1];break;case"s":e.second=["numeric","2-digit"][i-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":e.timeZoneName=i<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),e}var bM=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function AM(t){if(t.length===0)throw new Error("Number skeleton cannot be empty");for(var e=t.split(bM).filter(function(c){return c.length>0}),n=[],i=0,r=e;i<r.length;i++){var o=r[i],s=o.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var a=s[0],u=s.slice(1),l=0,g=u;l<g.length;l++){var M=g[l];if(M.length===0)throw new Error("Invalid number skeleton")}n.push({stem:a,options:u})}return n}function DM(t){return t.replace(/^(.*?)-/,"")}var dc=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,gc=/^(@+)?(\+|#+)?[rs]?$/g,vM=/(\*)(0+)|(#+)(0+)|(0+)/g,hc=/^(0+)$/;function fc(t){var e={};return t[t.length-1]==="r"?e.roundingPriority="morePrecision":t[t.length-1]==="s"&&(e.roundingPriority="lessPrecision"),t.replace(gc,function(n,i,r){return typeof r!="string"?(e.minimumSignificantDigits=i.length,e.maximumSignificantDigits=i.length):r==="+"?e.minimumSignificantDigits=i.length:i[0]==="#"?e.maximumSignificantDigits=i.length:(e.minimumSignificantDigits=i.length,e.maximumSignificantDigits=i.length+(typeof r=="string"?r.length:0)),""}),e}function Mc(t){switch(t){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function IM(t){var e;if(t[0]==="E"&&t[1]==="E"?(e={notation:"engineering"},t=t.slice(2)):t[0]==="E"&&(e={notation:"scientific"},t=t.slice(1)),e){var n=t.slice(0,2);if(n==="+!"?(e.signDisplay="always",t=t.slice(2)):n==="+?"&&(e.signDisplay="exceptZero",t=t.slice(2)),!hc.test(t))throw new Error("Malformed concise eng/scientific notation");e.minimumIntegerDigits=t.length}return e}function yc(t){var e={},n=Mc(t);return n||e}function xM(t){for(var e={},n=0,i=t;n<i.length;n++){var r=i[n];switch(r.stem){case"percent":case"%":e.style="percent";continue;case"%x100":e.style="percent",e.scale=100;continue;case"currency":e.style="currency",e.currency=r.options[0];continue;case"group-off":case",_":e.useGrouping=!1;continue;case"precision-integer":case".":e.maximumFractionDigits=0;continue;case"measure-unit":case"unit":e.style="unit",e.unit=DM(r.options[0]);continue;case"compact-short":case"K":e.notation="compact",e.compactDisplay="short";continue;case"compact-long":case"KK":e.notation="compact",e.compactDisplay="long";continue;case"scientific":e=ot(ot(ot({},e),{notation:"scientific"}),r.options.reduce(function(u,l){return ot(ot({},u),yc(l))},{}));continue;case"engineering":e=ot(ot(ot({},e),{notation:"engineering"}),r.options.reduce(function(u,l){return ot(ot({},u),yc(l))},{}));continue;case"notation-simple":e.notation="standard";continue;case"unit-width-narrow":e.currencyDisplay="narrowSymbol",e.unitDisplay="narrow";continue;case"unit-width-short":e.currencyDisplay="code",e.unitDisplay="short";continue;case"unit-width-full-name":e.currencyDisplay="name",e.unitDisplay="long";continue;case"unit-width-iso-code":e.currencyDisplay="symbol";continue;case"scale":e.scale=parseFloat(r.options[0]);continue;case"integer-width":if(r.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");r.options[0].replace(vM,function(u,l,g,M,c,f){if(l)e.minimumIntegerDigits=g.length;else{if(M&&c)throw new Error("We currently do not support maximum integer digits");if(f)throw new Error("We currently do not support exact integer digits")}return""});continue}if(hc.test(r.stem)){e.minimumIntegerDigits=r.stem.length;continue}if(dc.test(r.stem)){if(r.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");r.stem.replace(dc,function(u,l,g,M,c,f){return g==="*"?e.minimumFractionDigits=l.length:M&&M[0]==="#"?e.maximumFractionDigits=M.length:c&&f?(e.minimumFractionDigits=c.length,e.maximumFractionDigits=c.length+f.length):(e.minimumFractionDigits=l.length,e.maximumFractionDigits=l.length),""});var o=r.options[0];o==="w"?e=ot(ot({},e),{trailingZeroDisplay:"stripIfInteger"}):o&&(e=ot(ot({},e),fc(o)));continue}if(gc.test(r.stem)){e=ot(ot({},e),fc(r.stem));continue}var s=Mc(r.stem);s&&(e=ot(ot({},e),s));var a=IM(r.stem);a&&(e=ot(ot({},e),a))}return e}var ir={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","h","K"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TL:["H","hB","hb","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function OM(t,e){for(var n="",i=0;i<t.length;i++){var r=t.charAt(i);if(r==="j"){for(var o=0;i+1<t.length&&t.charAt(i+1)===r;)o++,i++;var s=1+(o&1),a=o<2?1:3+(o>>1),u="a",l=CM(e);for((l=="H"||l=="k")&&(a=0);a-- >0;)n+=u;for(;s-- >0;)n=l+n}else r==="J"?n+="H":n+=r}return n}function CM(t){var e=t.hourCycle;if(e===void 0&&t.hourCycles&&t.hourCycles.length&&(e=t.hourCycles[0]),e)switch(e){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n=t.language,i;n!=="root"&&(i=t.maximize().region);var r=ir[i||""]||ir[n||""]||ir["".concat(n,"-001")]||ir["001"];return r[0]}var Po,zM=new RegExp("^".concat(lc.source,"*")),kM=new RegExp("".concat(lc.source,"*$"));function et(t,e){return{start:t,end:e}}var UM=!!String.prototype.startsWith,YM=!!String.fromCodePoint,_M=!!Object.fromEntries,PM=!!String.prototype.codePointAt,RM=!!String.prototype.trimStart,BM=!!String.prototype.trimEnd,FM=!!Number.isSafeInteger,HM=FM?Number.isSafeInteger:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&Math.abs(t)<=9007199254740991},Ro=!0;try{var QM=wc("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Ro=((Po=QM.exec("a"))===null||Po===void 0?void 0:Po[0])==="a"}catch{Ro=!1}var pc=UM?function(t,e,n){return t.startsWith(e,n)}:function(t,e,n){return t.slice(n,n+e.length)===e},Bo=YM?String.fromCodePoint:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n="",i=t.length,r=0,o;i>r;){if(o=t[r++],o>1114111)throw RangeError(o+" is not a valid code point");n+=o<65536?String.fromCharCode(o):String.fromCharCode(((o-=65536)>>10)+55296,o%1024+56320)}return n},mc=_M?Object.fromEntries:function(t){for(var e={},n=0,i=t;n<i.length;n++){var r=i[n],o=r[0],s=r[1];e[o]=s}return e},Nc=PM?function(t,e){return t.codePointAt(e)}:function(t,e){var n=t.length;if(!(e<0||e>=n)){var i=t.charCodeAt(e),r;return i<55296||i>56319||e+1===n||(r=t.charCodeAt(e+1))<56320||r>57343?i:(i-55296<<10)+(r-56320)+65536}},GM=RM?function(t){return t.trimStart()}:function(t){return t.replace(zM,"")},KM=BM?function(t){return t.trimEnd()}:function(t){return t.replace(kM,"")};function wc(t,e){return new RegExp(t,e)}var Fo;if(Ro){var Lc=wc("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Fo=function(t,e){var n;Lc.lastIndex=e;var i=Lc.exec(t);return(n=i[1])!==null&&n!==void 0?n:""}}else Fo=function(t,e){for(var n=[];;){var i=Nc(t,e);if(i===void 0||Tc(i)||ZM(i))break;n.push(i),e+=i>=65536?2:1}return Bo.apply(void 0,n)};var $M=function(){function t(e,n){n===void 0&&(n={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}return t.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},t.prototype.parseMessage=function(e,n,i){for(var r=[];!this.isEOF();){var o=this.char();if(o===123){var s=this.parseArgument(e,i);if(s.err)return s;r.push(s.val)}else{if(o===125&&e>0)break;if(o===35&&(n==="plural"||n==="selectordinal")){var a=this.clonePosition();this.bump(),r.push({type:ft.pound,location:et(a,this.clonePosition())})}else if(o===60&&!this.ignoreTag&&this.peek()===47){if(i)break;return this.error(tt.UNMATCHED_CLOSING_TAG,et(this.clonePosition(),this.clonePosition()))}else if(o===60&&!this.ignoreTag&&Ho(this.peek()||0)){var s=this.parseTag(e,n);if(s.err)return s;r.push(s.val)}else{var s=this.parseLiteral(e,n);if(s.err)return s;r.push(s.val)}}}return{val:r,err:null}},t.prototype.parseTag=function(e,n){var i=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ft.literal,value:"<".concat(r,"/>"),location:et(i,this.clonePosition())},err:null};if(this.bumpIf(">")){var o=this.parseMessage(e+1,n,!0);if(o.err)return o;var s=o.val,a=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Ho(this.char()))return this.error(tt.INVALID_TAG,et(a,this.clonePosition()));var u=this.clonePosition(),l=this.parseTagName();return r!==l?this.error(tt.UNMATCHED_CLOSING_TAG,et(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ft.tag,value:r,children:s,location:et(i,this.clonePosition())},err:null}:this.error(tt.INVALID_TAG,et(a,this.clonePosition())))}else return this.error(tt.UNCLOSED_TAG,et(i,this.clonePosition()))}else return this.error(tt.INVALID_TAG,et(i,this.clonePosition()))},t.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&WM(this.char());)this.bump();return this.message.slice(e,this.offset())},t.prototype.parseLiteral=function(e,n){for(var i=this.clonePosition(),r="";;){var o=this.tryParseQuote(n);if(o){r+=o;continue}var s=this.tryParseUnquoted(e,n);if(s){r+=s;continue}var a=this.tryParseLeftAngleBracket();if(a){r+=a;continue}break}var u=et(i,this.clonePosition());return{val:{type:ft.literal,value:r,location:u},err:null}},t.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!VM(this.peek()||0))?(this.bump(),"<"):null},t.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();var n=[this.char()];for(this.bump();!this.isEOF();){var i=this.char();if(i===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(i);this.bump()}return Bo.apply(void 0,n)},t.prototype.tryParseUnquoted=function(e,n){if(this.isEOF())return null;var i=this.char();return i===60||i===123||i===35&&(n==="plural"||n==="selectordinal")||i===125&&e>0?null:(this.bump(),Bo(i))},t.prototype.parseArgument=function(e,n){var i=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(tt.EXPECT_ARGUMENT_CLOSING_BRACE,et(i,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(tt.EMPTY_ARGUMENT,et(i,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(tt.MALFORMED_ARGUMENT,et(i,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(tt.EXPECT_ARGUMENT_CLOSING_BRACE,et(i,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ft.argument,value:r,location:et(i,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(tt.EXPECT_ARGUMENT_CLOSING_BRACE,et(i,this.clonePosition())):this.parseArgumentOptions(e,n,r,i);default:return this.error(tt.MALFORMED_ARGUMENT,et(i,this.clonePosition()))}},t.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),n=this.offset(),i=Fo(this.message,n),r=n+i.length;this.bumpTo(r);var o=this.clonePosition(),s=et(e,o);return{value:i,location:s}},t.prototype.parseArgumentOptions=function(e,n,i,r){var o,s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(a){case"":return this.error(tt.EXPECT_ARGUMENT_TYPE,et(s,u));case"number":case"date":case"time":{this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var g=this.clonePosition(),M=this.parseSimpleArgStyleIfPossible();if(M.err)return M;var c=KM(M.val);if(c.length===0)return this.error(tt.EXPECT_ARGUMENT_STYLE,et(this.clonePosition(),this.clonePosition()));var f=et(g,this.clonePosition());l={style:c,styleLocation:f}}var d=this.tryParseArgumentClose(r);if(d.err)return d;var h=et(r,this.clonePosition());if(l&&pc(l?.style,"::",0)){var y=GM(l.style.slice(2));if(a==="number"){var M=this.parseNumberSkeletonFromString(y,l.styleLocation);return M.err?M:{val:{type:ft.number,value:i,location:h,style:M.val},err:null}}else{if(y.length===0)return this.error(tt.EXPECT_DATE_TIME_SKELETON,h);var p=y;this.locale&&(p=OM(y,this.locale));var c={type:xn.dateTime,pattern:p,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?EM(p):{}},w=a==="date"?ft.date:ft.time;return{val:{type:w,value:i,location:h,style:c},err:null}}}return{val:{type:a==="number"?ft.number:a==="date"?ft.date:ft.time,value:i,location:h,style:(o=l?.style)!==null&&o!==void 0?o:null},err:null}}case"plural":case"selectordinal":case"select":{var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(tt.EXPECT_SELECT_ARGUMENT_OPTIONS,et(m,ot({},m)));this.bumpSpace();var N=this.parseIdentifierIfPossible(),T=0;if(a!=="select"&&N.value==="offset"){if(!this.bumpIf(":"))return this.error(tt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,et(this.clonePosition(),this.clonePosition()));this.bumpSpace();var M=this.tryParseDecimalInteger(tt.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,tt.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(M.err)return M;this.bumpSpace(),N=this.parseIdentifierIfPossible(),T=M.val}var E=this.tryParsePluralOrSelectOptions(e,a,n,N);if(E.err)return E;var d=this.tryParseArgumentClose(r);if(d.err)return d;var S=et(r,this.clonePosition());return a==="select"?{val:{type:ft.select,value:i,options:mc(E.val),location:S},err:null}:{val:{type:ft.plural,value:i,options:mc(E.val),offset:T,pluralType:a==="plural"?"cardinal":"ordinal",location:S},err:null}}default:return this.error(tt.INVALID_ARGUMENT_TYPE,et(s,u))}},t.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(tt.EXPECT_ARGUMENT_CLOSING_BRACE,et(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},t.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,n=this.clonePosition();!this.isEOF();){var i=this.char();switch(i){case 39:{this.bump();var r=this.clonePosition();if(!this.bumpUntil("'"))return this.error(tt.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,et(r,this.clonePosition()));this.bump();break}case 123:{e+=1,this.bump();break}case 125:{if(e>0)e-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(n.offset,this.offset()),err:null}},t.prototype.parseNumberSkeletonFromString=function(e,n){var i=[];try{i=AM(e)}catch{return this.error(tt.INVALID_NUMBER_SKELETON,n)}return{val:{type:xn.number,tokens:i,location:n,parsedOptions:this.shouldParseSkeletons?xM(i):{}},err:null}},t.prototype.tryParsePluralOrSelectOptions=function(e,n,i,r){for(var o,s=!1,a=[],u=new Set,l=r.value,g=r.location;;){if(l.length===0){var M=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){var c=this.tryParseDecimalInteger(tt.EXPECT_PLURAL_ARGUMENT_SELECTOR,tt.INVALID_PLURAL_ARGUMENT_SELECTOR);if(c.err)return c;g=et(M,this.clonePosition()),l=this.message.slice(M.offset,this.offset())}else break}if(u.has(l))return this.error(n==="select"?tt.DUPLICATE_SELECT_ARGUMENT_SELECTOR:tt.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,g);l==="other"&&(s=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?tt.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:tt.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,et(this.clonePosition(),this.clonePosition()));var d=this.parseMessage(e+1,n,i);if(d.err)return d;var h=this.tryParseArgumentClose(f);if(h.err)return h;a.push([l,{value:d.val,location:et(f,this.clonePosition())}]),u.add(l),this.bumpSpace(),o=this.parseIdentifierIfPossible(),l=o.value,g=o.location}return a.length===0?this.error(n==="select"?tt.EXPECT_SELECT_ARGUMENT_SELECTOR:tt.EXPECT_PLURAL_ARGUMENT_SELECTOR,et(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(tt.MISSING_OTHER_CLAUSE,et(this.clonePosition(),this.clonePosition())):{val:a,err:null}},t.prototype.tryParseDecimalInteger=function(e,n){var i=1,r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(i=-1);for(var o=!1,s=0;!this.isEOF();){var a=this.char();if(a>=48&&a<=57)o=!0,s=s*10+(a-48),this.bump();else break}var u=et(r,this.clonePosition());return o?(s*=i,HM(s)?{val:s,err:null}:this.error(n,u)):this.error(e,u)},t.prototype.offset=function(){return this.position.offset},t.prototype.isEOF=function(){return this.offset()===this.message.length},t.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},t.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var n=Nc(this.message,e);if(n===void 0)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return n},t.prototype.error=function(e,n){return{val:null,err:{kind:e,message:this.message,location:n}}},t.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},t.prototype.bumpIf=function(e){if(pc(this.message,e,this.offset())){for(var n=0;n<e.length;n++)this.bump();return!0}return!1},t.prototype.bumpUntil=function(e){var n=this.offset(),i=this.message.indexOf(e,n);return i>=0?(this.bumpTo(i),!0):(this.bumpTo(this.message.length),!1)},t.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var n=this.offset();if(n===e)break;if(n>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},t.prototype.bumpSpace=function(){for(;!this.isEOF()&&Tc(this.char());)this.bump()},t.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),n=this.offset(),i=this.message.charCodeAt(n+(e>=65536?2:1));return i??null},t}();function Ho(t){return t>=97&&t<=122||t>=65&&t<=90}function VM(t){return Ho(t)||t===47}function WM(t){return t===45||t===46||t>=48&&t<=57||t===95||t>=97&&t<=122||t>=65&&t<=90||t==183||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8255&&t<=8256||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}function Tc(t){return t>=9&&t<=13||t===32||t===133||t>=8206&&t<=8207||t===8232||t===8233}function ZM(t){return t>=33&&t<=35||t===36||t>=37&&t<=39||t===40||t===41||t===42||t===43||t===44||t===45||t>=46&&t<=47||t>=58&&t<=59||t>=60&&t<=62||t>=63&&t<=64||t===91||t===92||t===93||t===94||t===96||t===123||t===124||t===125||t===126||t===161||t>=162&&t<=165||t===166||t===167||t===169||t===171||t===172||t===174||t===176||t===177||t===182||t===187||t===191||t===215||t===247||t>=8208&&t<=8213||t>=8214&&t<=8215||t===8216||t===8217||t===8218||t>=8219&&t<=8220||t===8221||t===8222||t===8223||t>=8224&&t<=8231||t>=8240&&t<=8248||t===8249||t===8250||t>=8251&&t<=8254||t>=8257&&t<=8259||t===8260||t===8261||t===8262||t>=8263&&t<=8273||t===8274||t===8275||t>=8277&&t<=8286||t>=8592&&t<=8596||t>=8597&&t<=8601||t>=8602&&t<=8603||t>=8604&&t<=8607||t===8608||t>=8609&&t<=8610||t===8611||t>=8612&&t<=8613||t===8614||t>=8615&&t<=8621||t===8622||t>=8623&&t<=8653||t>=8654&&t<=8655||t>=8656&&t<=8657||t===8658||t===8659||t===8660||t>=8661&&t<=8691||t>=8692&&t<=8959||t>=8960&&t<=8967||t===8968||t===8969||t===8970||t===8971||t>=8972&&t<=8991||t>=8992&&t<=8993||t>=8994&&t<=9e3||t===9001||t===9002||t>=9003&&t<=9083||t===9084||t>=9085&&t<=9114||t>=9115&&t<=9139||t>=9140&&t<=9179||t>=9180&&t<=9185||t>=9186&&t<=9254||t>=9255&&t<=9279||t>=9280&&t<=9290||t>=9291&&t<=9311||t>=9472&&t<=9654||t===9655||t>=9656&&t<=9664||t===9665||t>=9666&&t<=9719||t>=9720&&t<=9727||t>=9728&&t<=9838||t===9839||t>=9840&&t<=10087||t===10088||t===10089||t===10090||t===10091||t===10092||t===10093||t===10094||t===10095||t===10096||t===10097||t===10098||t===10099||t===10100||t===10101||t>=10132&&t<=10175||t>=10176&&t<=10180||t===10181||t===10182||t>=10183&&t<=10213||t===10214||t===10215||t===10216||t===10217||t===10218||t===10219||t===10220||t===10221||t===10222||t===10223||t>=10224&&t<=10239||t>=10240&&t<=10495||t>=10496&&t<=10626||t===10627||t===10628||t===10629||t===10630||t===10631||t===10632||t===10633||t===10634||t===10635||t===10636||t===10637||t===10638||t===10639||t===10640||t===10641||t===10642||t===10643||t===10644||t===10645||t===10646||t===10647||t===10648||t>=10649&&t<=10711||t===10712||t===10713||t===10714||t===10715||t>=10716&&t<=10747||t===10748||t===10749||t>=10750&&t<=11007||t>=11008&&t<=11055||t>=11056&&t<=11076||t>=11077&&t<=11078||t>=11079&&t<=11084||t>=11085&&t<=11123||t>=11124&&t<=11125||t>=11126&&t<=11157||t===11158||t>=11159&&t<=11263||t>=11776&&t<=11777||t===11778||t===11779||t===11780||t===11781||t>=11782&&t<=11784||t===11785||t===11786||t===11787||t===11788||t===11789||t>=11790&&t<=11798||t===11799||t>=11800&&t<=11801||t===11802||t===11803||t===11804||t===11805||t>=11806&&t<=11807||t===11808||t===11809||t===11810||t===11811||t===11812||t===11813||t===11814||t===11815||t===11816||t===11817||t>=11818&&t<=11822||t===11823||t>=11824&&t<=11833||t>=11834&&t<=11835||t>=11836&&t<=11839||t===11840||t===11841||t===11842||t>=11843&&t<=11855||t>=11856&&t<=11857||t===11858||t>=11859&&t<=11903||t>=12289&&t<=12291||t===12296||t===12297||t===12298||t===12299||t===12300||t===12301||t===12302||t===12303||t===12304||t===12305||t>=12306&&t<=12307||t===12308||t===12309||t===12310||t===12311||t===12312||t===12313||t===12314||t===12315||t===12316||t===12317||t>=12318&&t<=12319||t===12320||t===12336||t===64830||t===64831||t>=65093&&t<=65094}function Qo(t){t.forEach(function(e){if(delete e.location,sc(e)||ac(e))for(var n in e.options)delete e.options[n].location,Qo(e.options[n].value);else ic(e)&&cc(e.style)||(rc(e)||oc(e))&&_o(e.style)?delete e.style.location:uc(e)&&Qo(e.children)})}function qM(t,e){e===void 0&&(e={}),e=ot({shouldParseSkeletons:!0,requiresOtherClause:!0},e);var n=new $M(t,e).parse();if(n.err){var i=SyntaxError(tt[n.err.kind]);throw i.location=n.err.location,i.originalMessage=n.err.message,i}return e?.captureLocation||Qo(n.val),n.val}function Go(t,e){var n=e&&e.cache?e.cache:i0,i=e&&e.serializer?e.serializer:n0,r=e&&e.strategy?e.strategy:JM;return r(t,{cache:n,serializer:i})}function XM(t){return t==null||typeof t=="number"||typeof t=="boolean"}function jc(t,e,n,i){var r=XM(i)?i:n(i),o=e.get(r);return typeof o>"u"&&(o=t.call(this,i),e.set(r,o)),o}function Sc(t,e,n){var i=Array.prototype.slice.call(arguments,3),r=n(i),o=e.get(r);return typeof o>"u"&&(o=t.apply(this,i),e.set(r,o)),o}function Ko(t,e,n,i,r){return n.bind(e,t,i,r)}function JM(t,e){var n=t.length===1?jc:Sc;return Ko(t,this,n,e.cache.create(),e.serializer)}function t0(t,e){return Ko(t,this,Sc,e.cache.create(),e.serializer)}function e0(t,e){return Ko(t,this,jc,e.cache.create(),e.serializer)}var n0=function(){return JSON.stringify(arguments)};function $o(){this.cache=Object.create(null)}$o.prototype.get=function(t){return this.cache[t]},$o.prototype.set=function(t,e){this.cache[t]=e};var i0={create:function(){return new $o}},Vo={variadic:t0,monadic:e0},On;(function(t){t.MISSING_VALUE="MISSING_VALUE",t.INVALID_VALUE="INVALID_VALUE",t.MISSING_INTL_API="MISSING_INTL_API"})(On||(On={}));var rr=function(t){nr(e,t);function e(n,i,r){var o=t.call(this,n)||this;return o.code=i,o.originalMessage=r,o}return e.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},e}(Error),Ec=function(t){nr(e,t);function e(n,i,r,o){return t.call(this,'Invalid values for "'.concat(n,'": "').concat(i,'". Options are "').concat(Object.keys(r).join('", "'),'"'),On.INVALID_VALUE,o)||this}return e}(rr),r0=function(t){nr(e,t);function e(n,i,r){return t.call(this,'Value for "'.concat(n,'" must be of type ').concat(i),On.INVALID_VALUE,r)||this}return e}(rr),o0=function(t){nr(e,t);function e(n,i){return t.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(i,'"'),On.MISSING_VALUE,i)||this}return e}(rr),zt;(function(t){t[t.literal=0]="literal",t[t.object=1]="object"})(zt||(zt={}));function s0(t){return t.length<2?t:t.reduce(function(e,n){var i=e[e.length-1];return!i||i.type!==zt.literal||n.type!==zt.literal?e.push(n):i.value+=n.value,e},[])}function a0(t){return typeof t=="function"}function or(t,e,n,i,r,o,s){if(t.length===1&&nc(t[0]))return[{type:zt.literal,value:t[0].value}];for(var a=[],u=0,l=t;u<l.length;u++){var g=l[u];if(nc(g)){a.push({type:zt.literal,value:g.value});continue}if(jM(g)){typeof o=="number"&&a.push({type:zt.literal,value:n.getNumberFormat(e).format(o)});continue}var M=g.value;if(!(r&&M in r))throw new o0(M,s);var c=r[M];if(TM(g)){(!c||typeof c=="string"||typeof c=="number")&&(c=typeof c=="string"||typeof c=="number"?String(c):""),a.push({type:typeof c=="string"?zt.literal:zt.object,value:c});continue}if(rc(g)){var f=typeof g.style=="string"?i.date[g.style]:_o(g.style)?g.style.parsedOptions:void 0;a.push({type:zt.literal,value:n.getDateTimeFormat(e,f).format(c)});continue}if(oc(g)){var f=typeof g.style=="string"?i.time[g.style]:_o(g.style)?g.style.parsedOptions:i.time.medium;a.push({type:zt.literal,value:n.getDateTimeFormat(e,f).format(c)});continue}if(ic(g)){var f=typeof g.style=="string"?i.number[g.style]:cc(g.style)?g.style.parsedOptions:void 0;f&&f.scale&&(c=c*(f.scale||1)),a.push({type:zt.literal,value:n.getNumberFormat(e,f).format(c)});continue}if(uc(g)){var d=g.children,h=g.value,y=r[h];if(!a0(y))throw new r0(h,"function",s);var p=or(d,e,n,i,r,o),w=y(p.map(function(T){return T.value}));Array.isArray(w)||(w=[w]),a.push.apply(a,w.map(function(T){return{type:typeof T=="string"?zt.literal:zt.object,value:T}}))}if(sc(g)){var m=g.options[c]||g.options.other;if(!m)throw new Ec(g.value,c,Object.keys(g.options),s);a.push.apply(a,or(m.value,e,n,i,r));continue}if(ac(g)){var m=g.options["=".concat(c)];if(!m){if(!Intl.PluralRules)throw new rr(`Intl.PluralRules is not available in this environment.
|
|
134
139
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
135
|
-
`,
|
|
140
|
+
`,On.MISSING_INTL_API,s);var N=n.getPluralRules(e,{type:g.pluralType}).select(c-(g.offset||0));m=g.options[N]||g.options.other}if(!m)throw new Ec(g.value,c,Object.keys(g.options),s);a.push.apply(a,or(m.value,e,n,i,r,c-(g.offset||0)));continue}}return s0(a)}function u0(t,e){return e?ot(ot(ot({},t||{}),e||{}),Object.keys(t).reduce(function(n,i){return n[i]=ot(ot({},t[i]),e[i]||{}),n},{})):t}function c0(t,e){return e?Object.keys(t).reduce(function(n,i){return n[i]=u0(t[i],e[i]),n},ot({},t)):t}function Wo(t){return{create:function(){return{get:function(e){return t[e]},set:function(e,n){t[e]=n}}}}}function l0(t){return t===void 0&&(t={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Go(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((e=Intl.NumberFormat).bind.apply(e,Yo([void 0],n,!1)))},{cache:Wo(t.number),strategy:Vo.variadic}),getDateTimeFormat:Go(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((e=Intl.DateTimeFormat).bind.apply(e,Yo([void 0],n,!1)))},{cache:Wo(t.dateTime),strategy:Vo.variadic}),getPluralRules:Go(function(){for(var e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return new((e=Intl.PluralRules).bind.apply(e,Yo([void 0],n,!1)))},{cache:Wo(t.pluralRules),strategy:Vo.variadic})}}var d0=function(){function t(e,n,i,r){n===void 0&&(n=t.defaultLocale);var o=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var l=o.formatToParts(u);if(l.length===1)return l[0].value;var g=l.reduce(function(M,c){return!M.length||c.type!==zt.literal||typeof M[M.length-1]!="string"?M.push(c.value):M[M.length-1]+=c.value,M},[]);return g.length<=1?g[0]||"":g},this.formatToParts=function(u){return or(o.ast,o.locales,o.formatters,o.formats,u,void 0,o.message)},this.resolvedOptions=function(){var u;return{locale:((u=o.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(o.locales)[0]}},this.getAst=function(){return o.ast},this.locales=n,this.resolvedLocale=t.resolveLocale(n),typeof e=="string"){if(this.message=e,!t.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=r||{};s.formatters;var a=Uo(s,["formatters"]);this.ast=t.__parse(e,ot(ot({},a),{locale:this.resolvedLocale}))}else this.ast=e;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=c0(t.formats,i),this.formatters=r&&r.formatters||l0(this.formatterCache)}return Object.defineProperty(t,"defaultLocale",{get:function(){return t.memoizedDefaultLocale||(t.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),t.memoizedDefaultLocale},enumerable:!1,configurable:!0}),t.memoizedDefaultLocale=null,t.resolveLocale=function(e){if(!(typeof Intl.Locale>"u")){var n=Intl.NumberFormat.supportedLocalesOf(e);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof e=="string"?e:e[0])}},t.__parse=qM,t.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},t}();class g0{getStringForLocale(e,n){let i=this.messages[n];i||(i=h0(n,this.messages,this.defaultLocale),this.messages[n]=i);let r=i[e];if(!r)throw new Error(`Could not find intl message ${e} in ${n} locale`);return r}constructor(e,n="en-US"){this.messages={...e},this.defaultLocale=n}}function h0(t,e,n="en-US"){if(e[t])return e[t];let i=f0(t);if(e[i])return e[i];for(let r in e)if(r.startsWith(i+"-"))return e[r];return e[n]}function f0(t){return Intl.Locale?new Intl.Locale(t).language:t.split("-")[0]}class M0{format(e,n){let i=this.cache[e];if(!i){let o=this.messages.getStringForLocale(e,this.locale);if(!o)throw new Error(`Could not find intl message ${e} in ${this.locale} locale`);i=new d0(o,this.locale),this.cache[e]=i}let r;return n&&(r=Object.keys(n).reduce((o,s)=>(o[s]=n[s]==null?!1:n[s],o),{})),i.format(r)}constructor(e,n){this.locale=e,this.messages=n,this.cache={}}}/*!
|
|
136
141
|
* Portions of this file are based on code from react-spectrum.
|
|
137
142
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
138
143
|
*
|
|
139
144
|
* Credits to the React Spectrum team:
|
|
140
145
|
* https://github.com/adobe/react-spectrum/blob/23c3a91e7b87952f07da9da115188bd2abd99d77/packages/@react-aria/i18n/src/useMessageFormatter.ts
|
|
141
|
-
*/const
|
|
146
|
+
*/const bc=new WeakMap;function y0(t){let e=bc.get(t);return e||(e=new g0(t),bc.set(t,e)),e}function p0(t){const{locale:e}=er(),n=G(()=>new M0(e(),y0(j(t))));return G(()=>({format:(i,r)=>n().format(i,r)}))}/*!
|
|
142
147
|
* Portions of this file are based on code from react-spectrum.
|
|
143
148
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
144
149
|
*
|
|
@@ -146,93 +151,93 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
|
146
151
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/Selection.ts
|
|
147
152
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/types.ts
|
|
148
153
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-types/shared/src/selection.d.ts
|
|
149
|
-
*/class
|
|
154
|
+
*/class ce extends Set{anchorKey;currentKey;constructor(e,n,i){super(e),e instanceof ce?(this.anchorKey=n||e.anchorKey,this.currentKey=i||e.currentKey):(this.anchorKey=n,this.currentKey=i)}}function m0(t){const[e,n]=Yu(t);return[()=>e()??new ce,n]}/*!
|
|
150
155
|
* Portions of this file are based on code from react-spectrum.
|
|
151
156
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
152
157
|
*
|
|
153
158
|
* Credits to the React Spectrum team:
|
|
154
159
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/utils.ts
|
|
155
|
-
*/function
|
|
160
|
+
*/function Ac(t){return Sf()?t.altKey:t.ctrlKey}function Cn(t){return ui()?t.metaKey:t.ctrlKey}function Dc(t){return new ce(t)}function N0(t,e){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}/*!
|
|
156
161
|
* Portions of this file are based on code from react-spectrum.
|
|
157
162
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
158
163
|
*
|
|
159
164
|
* Credits to the React Spectrum team:
|
|
160
165
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/useMultipleSelectionState.ts
|
|
161
|
-
*/function
|
|
166
|
+
*/function w0(t){t=Nt({selectionMode:"none",selectionBehavior:"toggle"},t);const[e,n]=K(!1),[i,r]=K(),o=G(()=>{const d=j(t.selectedKeys);if(d)return Dc(d)}),s=G(()=>{const d=j(t.defaultSelectedKeys);return d?Dc(d):new ce}),[a,u]=m0({value:o,defaultValue:s,onChange:d=>t.onSelectionChange?.(d)}),[l,g]=K(j(t.selectionBehavior)),M=()=>j(t.selectionMode),c=()=>j(t.disallowEmptySelection)??!1,f=d=>{(j(t.allowDuplicateSelectionEvents)||!N0(d,a()))&&u(d)};return W(()=>{const d=a();j(t.selectionBehavior)==="replace"&&l()==="toggle"&&typeof d=="object"&&d.size===0&&g("replace")}),W(()=>{g(j(t.selectionBehavior)??"toggle")}),{selectionMode:M,disallowEmptySelection:c,selectionBehavior:l,setSelectionBehavior:g,isFocused:e,setFocused:n,focusedKey:i,setFocusedKey:r,selectedKeys:a,setSelectedKeys:f}}/*!
|
|
162
167
|
* Portions of this file are based on code from react-spectrum.
|
|
163
168
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
164
169
|
*
|
|
165
170
|
* Credits to the React Spectrum team:
|
|
166
171
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useTypeSelect.ts
|
|
167
|
-
*/function
|
|
172
|
+
*/function vc(t){const[e,n]=K(""),[i,r]=K(-1);return{typeSelectHandlers:{onKeyDown:o=>{if(j(t.isDisabled))return;const s=j(t.keyboardDelegate),a=j(t.selectionManager);if(!s.getKeyForSearch)return;const u=L0(o.key);if(!u||o.ctrlKey||o.metaKey)return;u===" "&&e().trim().length>0&&(o.preventDefault(),o.stopPropagation());let l=n(M=>M+=u),g=s.getKeyForSearch(l,a.focusedKey())??s.getKeyForSearch(l);g==null&&T0(l)&&(l=l[0],g=s.getKeyForSearch(l,a.focusedKey())??s.getKeyForSearch(l)),g!=null&&(a.setFocusedKey(g),t.onTypeSelect?.(g)),clearTimeout(i()),r(window.setTimeout(()=>n(""),500))}}}}function L0(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function T0(t){return t.split("").every(e=>e===t[0])}/*!
|
|
168
173
|
* Portions of this file are based on code from react-spectrum.
|
|
169
174
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
170
175
|
*
|
|
171
176
|
* Credits to the React Spectrum team:
|
|
172
177
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useSelectableCollection.ts
|
|
173
|
-
*/function
|
|
178
|
+
*/function j0(t,e,n){t=it({selectOnFocus:()=>j(t.selectionManager).selectionBehavior()==="replace"},t);const i=()=>n?.()??e(),{direction:r}=er();let o={top:0,left:0};gf(()=>j(t.isVirtualized)?void 0:i(),"scroll",()=>{const c=i();c&&(o={top:c.scrollTop,left:c.scrollLeft})});const{typeSelectHandlers:s}=vc({isDisabled:()=>j(t.disallowTypeAhead),keyboardDelegate:()=>j(t.keyboardDelegate),selectionManager:()=>j(t.selectionManager)}),a=c=>{St(c,s.onKeyDown),c.altKey&&c.key==="Tab"&&c.preventDefault();const f=e();if(!f?.contains(c.target))return;const d=j(t.selectionManager),h=j(t.selectOnFocus),y=N=>{N!=null&&(d.setFocusedKey(N),c.shiftKey&&d.selectionMode()==="multiple"?d.extendSelection(N):h&&!Ac(c)&&d.replaceSelection(N))},p=j(t.keyboardDelegate),w=j(t.shouldFocusWrap),m=d.focusedKey();switch(c.key){case"ArrowDown":{if(p.getKeyBelow){c.preventDefault();let N;m!=null?N=p.getKeyBelow(m):N=p.getFirstKey?.(),N==null&&w&&(N=p.getFirstKey?.(m)),y(N)}break}case"ArrowUp":{if(p.getKeyAbove){c.preventDefault();let N;m!=null?N=p.getKeyAbove(m):N=p.getLastKey?.(),N==null&&w&&(N=p.getLastKey?.(m)),y(N)}break}case"ArrowLeft":{if(p.getKeyLeftOf){c.preventDefault();const N=r()==="rtl";let T;m!=null?T=p.getKeyLeftOf(m):T=N?p.getFirstKey?.():p.getLastKey?.(),y(T)}break}case"ArrowRight":{if(p.getKeyRightOf){c.preventDefault();const N=r()==="rtl";let T;m!=null?T=p.getKeyRightOf(m):T=N?p.getLastKey?.():p.getFirstKey?.(),y(T)}break}case"Home":if(p.getFirstKey){c.preventDefault();const N=p.getFirstKey(m,Cn(c));N!=null&&(d.setFocusedKey(N),Cn(c)&&c.shiftKey&&d.selectionMode()==="multiple"?d.extendSelection(N):h&&d.replaceSelection(N))}break;case"End":if(p.getLastKey){c.preventDefault();const N=p.getLastKey(m,Cn(c));N!=null&&(d.setFocusedKey(N),Cn(c)&&c.shiftKey&&d.selectionMode()==="multiple"?d.extendSelection(N):h&&d.replaceSelection(N))}break;case"PageDown":if(p.getKeyPageBelow&&m!=null){c.preventDefault();const N=p.getKeyPageBelow(m);y(N)}break;case"PageUp":if(p.getKeyPageAbove&&m!=null){c.preventDefault();const N=p.getKeyPageAbove(m);y(N)}break;case"a":Cn(c)&&d.selectionMode()==="multiple"&&j(t.disallowSelectAll)!==!0&&(c.preventDefault(),d.selectAll());break;case"Escape":c.defaultPrevented||(c.preventDefault(),j(t.disallowEmptySelection)||d.clearSelection());break;case"Tab":if(!j(t.allowsTabNavigation)){if(c.shiftKey)f.focus();else{const N=Yf(f,{tabbable:!0});let T,E;do E=N.lastChild(),E&&(T=E);while(E);T&&!T.contains(document.activeElement)&&xt(T)}break}}},u=c=>{const f=j(t.selectionManager),d=j(t.keyboardDelegate),h=j(t.selectOnFocus);if(f.isFocused()){c.currentTarget.contains(c.target)||f.setFocused(!1);return}if(c.currentTarget.contains(c.target)){if(f.setFocused(!0),f.focusedKey()==null){const y=w=>{w!=null&&(f.setFocusedKey(w),h&&f.replaceSelection(w))},p=c.relatedTarget;p&&c.currentTarget.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_FOLLOWING?y(f.lastSelectedKey()??d.getLastKey?.()):y(f.firstSelectedKey()??d.getFirstKey?.())}else if(!j(t.isVirtualized)){const y=i();if(y){y.scrollTop=o.top,y.scrollLeft=o.left;const p=y.querySelector(`[data-key="${f.focusedKey()}"]`);p&&(xt(p),zu(y,p))}}}},l=c=>{const f=j(t.selectionManager);c.currentTarget.contains(c.relatedTarget)||f.setFocused(!1)},g=c=>{i()===c.target&&c.preventDefault()},M=()=>{const c=j(t.autoFocus);if(!c)return;const f=j(t.selectionManager),d=j(t.keyboardDelegate);let h;c==="first"&&(h=d.getFirstKey?.()),c==="last"&&(h=d.getLastKey?.());const y=f.selectedKeys();y.size&&(h=y.values().next().value),f.setFocused(!0),f.setFocusedKey(h);const p=e();p&&h==null&&!j(t.shouldUseVirtualFocus)&&xt(p)};return Ye(()=>{t.deferAutoFocus?setTimeout(M,0):M()}),W(ge([i,()=>j(t.isVirtualized),()=>j(t.selectionManager).focusedKey()],c=>{const[f,d,h]=c;if(d)h&&t.scrollToKey?.(h);else if(h&&f){const y=f.querySelector(`[data-key="${h}"]`);y&&zu(f,y)}})),{tabIndex:G(()=>{if(!j(t.shouldUseVirtualFocus))return j(t.selectionManager).focusedKey()==null?0:-1}),onKeyDown:a,onMouseDown:g,onFocusIn:u,onFocusOut:l}}/*!
|
|
174
179
|
* Portions of this file are based on code from react-spectrum.
|
|
175
180
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
176
181
|
*
|
|
177
182
|
* Credits to the React Spectrum team:
|
|
178
183
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useSelectableItem.ts
|
|
179
|
-
*/function
|
|
184
|
+
*/function S0(t,e){const n=()=>j(t.selectionManager),i=()=>j(t.key),r=()=>j(t.shouldUseVirtualFocus),o=w=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(i())&&!n().disallowEmptySelection()?n().toggleSelection(i()):n().replaceSelection(i()):w&&w.shiftKey?n().extendSelection(i()):n().selectionBehavior()==="toggle"||Cn(w)||"pointerType"in w&&w.pointerType==="touch"?n().toggleSelection(i()):n().replaceSelection(i()))},s=()=>n().isSelected(i()),a=()=>j(t.disabled)||n().isDisabled(i()),u=()=>!a()&&n().canSelectItem(i());let l=null;const g=w=>{u()&&(l=w.pointerType,w.pointerType==="mouse"&&w.button===0&&!j(t.shouldSelectOnPressUp)&&o(w))},M=w=>{u()&&w.pointerType==="mouse"&&w.button===0&&j(t.shouldSelectOnPressUp)&&j(t.allowsDifferentPressOrigin)&&o(w)},c=w=>{u()&&(j(t.shouldSelectOnPressUp)&&!j(t.allowsDifferentPressOrigin)||l!=="mouse")&&o(w)},f=w=>{!u()||!["Enter"," "].includes(w.key)||(Ac(w)?n().toggleSelection(i()):o(w))},d=w=>{a()&&w.preventDefault()},h=w=>{const m=e();r()||a()||!m||w.target===m&&n().setFocusedKey(i())},y=G(()=>{if(!(r()||a()))return i()===n().focusedKey()?0:-1}),p=G(()=>j(t.virtualized)?void 0:i());return W(ge([e,i,r,()=>n().focusedKey(),()=>n().isFocused()],([w,m,N,T,E])=>{w&&m===T&&E&&!N&&document.activeElement!==w&&(t.focus?t.focus():xt(w))})),{isSelected:s,isDisabled:a,allowsSelection:u,tabIndex:y,dataKey:p,onPointerDown:g,onPointerUp:M,onClick:c,onKeyDown:f,onMouseDown:d,onFocus:h}}/*!
|
|
180
185
|
* Portions of this file are based on code from react-spectrum.
|
|
181
186
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
182
187
|
*
|
|
183
188
|
* Credits to the React Spectrum team:
|
|
184
189
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/selection/src/SelectionManager.ts
|
|
185
|
-
*/class
|
|
190
|
+
*/class E0{collection;state;constructor(e,n){this.collection=e,this.state=n}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const n=this.getKey(e);return n==null?!1:this.state.selectedKeys().has(n)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(n=>e.has(n))}firstSelectedKey(){let e;for(const n of this.state.selectedKeys()){const i=this.collection().getItem(n),r=i?.index!=null&&e?.index!=null&&i.index<e.index;(!e||r)&&(e=i)}return e?.key}lastSelectedKey(){let e;for(const n of this.state.selectedKeys()){const i=this.collection().getItem(n),r=i?.index!=null&&e?.index!=null&&i.index>e.index;(!e||r)&&(e=i)}return e?.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const n=this.getKey(e);if(n==null)return;const i=this.state.selectedKeys(),r=i.anchorKey||n,o=new ce(i,r,n);for(const s of this.getKeyRange(r,i.currentKey||n))o.delete(s);for(const s of this.getKeyRange(n,r))this.canSelectItem(s)&&o.add(s);this.state.setSelectedKeys(o)}getKeyRange(e,n){const i=this.collection().getItem(e),r=this.collection().getItem(n);return i&&r?i.index!=null&&r.index!=null&&i.index<=r.index?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){const i=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&i.push(r),r===n)return i;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const n=this.collection().getItem(e);return n?!n||n.type!=="item"?null:n.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const n=this.getKey(e);if(n==null)return;const i=new ce(this.state.selectedKeys());i.has(n)?i.delete(n):this.canSelectItem(n)&&(i.add(n),i.anchorKey=n,i.currentKey=n),!(this.disallowEmptySelection()&&i.size===0)&&this.state.setSelectedKeys(i)}replaceSelection(e){if(this.selectionMode()==="none")return;const n=this.getKey(e);if(n==null)return;const i=this.canSelectItem(n)?new ce([n],n,n):new ce;this.state.setSelectedKeys(i)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const n=new ce;for(const i of e){const r=this.getKey(i);if(r!=null&&(n.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(n)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new ce)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||n&&n.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const n=this.selectedKeys();if(e.size!==n.size)return!1;for(const i of e)if(!n.has(i))return!1;for(const i of n)if(!e.has(i))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const n=this.collection().getItem(e);return n!=null&&!n.disabled}isDisabled(e){const n=this.collection().getItem(e);return!n||n.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const i=this.collection().getItem(n);if(!i)continue;i.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}}/*!
|
|
186
191
|
* Portions of this file are based on code from react-spectrum.
|
|
187
192
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
188
193
|
*
|
|
189
194
|
* Credits to the React Spectrum team:
|
|
190
195
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/list/src/ListCollection.ts
|
|
191
|
-
*/class
|
|
196
|
+
*/class Ic{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let n,i=0;for(const[r,o]of this.keyMap)n?(n.nextKey=r,o.prevKey=n.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=i++),n=o,n.nextKey=void 0;this.lastKey=n.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}}/*!
|
|
192
197
|
* Portions of this file are based on code from react-spectrum.
|
|
193
198
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
194
199
|
*
|
|
195
200
|
* Credits to the React Spectrum team:
|
|
196
201
|
* https://github.com/adobe/react-spectrum/blob/bfce84fee12a027d9cbc38b43e1747e3e4b4b169/packages/@react-stately/list/src/useListState.ts
|
|
197
|
-
*/function
|
|
202
|
+
*/function xc(t){const e=w0(t),n=Ff({dataSource:()=>j(t.dataSource),getKey:()=>j(t.getKey),getTextValue:()=>j(t.getTextValue),getDisabled:()=>j(t.getDisabled),getSectionChildren:()=>j(t.getSectionChildren),factory:r=>t.filter?new Ic(t.filter(r)):new Ic(r)},[()=>t.filter]),i=new E0(n,e);return Za(()=>{const r=e.focusedKey();r!=null&&!n().getItem(r)&&e.setFocusedKey(void 0)}),{collection:n,selectionManager:()=>i}}/*!
|
|
198
203
|
* Portions of this file are based on code from react-spectrum.
|
|
199
204
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
200
205
|
*
|
|
201
206
|
* Credits to the React Spectrum team:
|
|
202
207
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/ListKeyboardDelegate.ts
|
|
203
|
-
*/class
|
|
208
|
+
*/class Oc{collection;ref;collator;constructor(e,n,i){this.collection=e,this.ref=n,this.collator=i}getKeyBelow(e){let n=this.collection().getKeyAfter(e);for(;n!=null;){const i=this.collection().getItem(n);if(i&&i.type==="item"&&!i.disabled)return n;n=this.collection().getKeyAfter(n)}}getKeyAbove(e){let n=this.collection().getKeyBefore(e);for(;n!=null;){const i=this.collection().getItem(n);if(i&&i.type==="item"&&!i.disabled)return n;n=this.collection().getKeyBefore(n)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const n=this.collection().getItem(e);if(n&&n.type==="item"&&!n.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const n=this.collection().getItem(e);if(n&&n.type==="item"&&!n.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){const n=this.ref?.();let i=this.getItem(e);if(!n||!i)return;const r=Math.max(0,i.offsetTop+i.offsetHeight-n.offsetHeight);let o=e;for(;o&&i&&i.offsetTop>r;)o=this.getKeyAbove(o),i=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){const n=this.ref?.();let i=this.getItem(e);if(!n||!i)return;const r=Math.min(n.scrollHeight,i.offsetTop-i.offsetHeight+n.offsetHeight);let o=e;for(;o&&i&&i.offsetTop<r;)o=this.getKeyBelow(o),i=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,n){const i=this.collator?.();if(!i)return;let r=n!=null?this.getKeyBelow(n):this.getFirstKey();for(;r!=null;){const o=this.collection().getItem(r);if(o){const s=o.textValue.slice(0,e.length);if(o.textValue&&i.compare(s,e)===0)return r}r=this.getKeyBelow(r)}}}/*!
|
|
204
209
|
* Portions of this file are based on code from react-spectrum.
|
|
205
210
|
* Apache License Version 2.0, Copyright 2020 Adobe.
|
|
206
211
|
*
|
|
207
212
|
* Credits to the React Spectrum team:
|
|
208
213
|
* https://github.com/adobe/react-spectrum/blob/8f2f2acb3d5850382ebe631f055f88c704aa7d17/packages/@react-aria/selection/src/useSelectableList.ts
|
|
209
|
-
*/function
|
|
214
|
+
*/function b0(t,e,n){const i=ec({usage:"search",sensitivity:"base"}),r=G(()=>j(t.keyboardDelegate)||new Oc(t.collection,e,i));return j0({selectionManager:()=>j(t.selectionManager),keyboardDelegate:r,autoFocus:()=>j(t.autoFocus),deferAutoFocus:()=>j(t.deferAutoFocus),shouldFocusWrap:()=>j(t.shouldFocusWrap),disallowEmptySelection:()=>j(t.disallowEmptySelection),selectOnFocus:()=>j(t.selectOnFocus),disallowTypeAhead:()=>j(t.disallowTypeAhead),shouldUseVirtualFocus:()=>j(t.shouldUseVirtualFocus),allowsTabNavigation:()=>j(t.allowsTabNavigation),isVirtualized:()=>j(t.isVirtualized),scrollToKey:o=>j(t.scrollToKey)?.(o)},e,n)}/*!
|
|
210
215
|
* Portions of this file are based on code from ariakit
|
|
211
216
|
* MIT Licensed, Copyright (c) Diego Haz.
|
|
212
217
|
*
|
|
213
218
|
* Credits to the ariakit team:
|
|
214
219
|
* https://github.com/hope-ui/hope-ui/blob/54125b130195f37161dbeeea0c21dc3b198bc3ac/packages/core/src/button/is-button.ts
|
|
215
|
-
*/const L0=["button","color","file","image","reset","submit"];function T0(t){const e=t.tagName.toLowerCase();return e==="button"?!0:e==="input"&&t.type?L0.indexOf(t.type)!==-1:!1}function ur(t){let e;t=Ot({type:"button"},t);const[n,i]=St(t,["ref","type","disabled"]),r=iM(()=>e,()=>"button"),o=V(()=>{const u=r();return u==null?!1:T0({tagName:u,type:n.type})}),a=V(()=>r()==="input"),s=V(()=>r()==="a"&&e?.getAttribute("href")!=null);return T(ee,ht({as:"button",ref(u){const l=ce(g=>e=g,n.ref);typeof l=="function"&&l(u)},get type(){return o()||a()?n.type:void 0},get role(){return!o()&&!s()?"button":void 0},get tabIndex(){return!o()&&!s()&&!n.disabled?0:void 0},get disabled(){return o()||a()?n.disabled:void 0},get"aria-disabled"(){return!o()&&!a()&&n.disabled?!0:void 0},get"data-disabled"(){return n.disabled?"":void 0}},i))}const xc=se();function _n(){const t=ue(xc);if(t===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return t}function qo(t){const e=_n(),[n,i]=St(t,["aria-label","onClick"]),r=d0(()=>cM);return T(ur,ht({get"aria-label"(){return n["aria-label"]||r().format("dismiss")},onClick:o=>{Pt(o,n.onClick),e.close()}},i))}const Oc=se();function j0(){return ue(Oc)}function Xo(t){let e;const n=j0(),[i,r]=St(t,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),o=new Set([]),a=u=>{o.add(u);const l=n?.registerNestedLayer(u);return()=>{o.delete(u),l?.()}};Jf({shouldExcludeElement:u=>e?i.excludedElements?.some(l=>Ne(l(),u))||[...o].some(l=>Ne(l,u)):!1,onPointerDownOutside:u=>{!e||de.isBelowPointerBlockingLayer(e)||!i.bypassTopMostLayerCheck&&!de.isTopMostLayer(e)||(i.onPointerDownOutside?.(u),i.onInteractOutside?.(u),u.defaultPrevented||i.onDismiss?.())},onFocusOutside:u=>{i.onFocusOutside?.(u),i.onInteractOutside?.(u),u.defaultPrevented||i.onDismiss?.()}},()=>e),_f({ownerDocument:()=>le(e),onEscapeKeyDown:u=>{!e||!de.isTopMostLayer(e)||(i.onEscapeKeyDown?.(u),!u.defaultPrevented&&i.onDismiss&&(u.preventDefault(),i.onDismiss()))}}),Ke(()=>{if(!e)return;de.addLayer({node:e,isPointerBlocking:i.disableOutsidePointerEvents,dismiss:i.onDismiss});const u=n?.registerNestedLayer(e);de.assignPointerEventToLayers(),de.disableBodyPointerEvents(e),ut(()=>{e&&(de.removeLayer(e),u?.(),de.assignPointerEventToLayers(),de.restoreBodyPointerEvents(e))})}),it(Se([()=>e,()=>i.disableOutsidePointerEvents],([u,l])=>{if(!u)return;const g=de.find(u);g&&g.isPointerBlocking!==l&&(g.isPointerBlocking=l,de.assignPointerEventToLayers()),l&&de.disableBodyPointerEvents(u),ut(()=>{de.restoreBodyPointerEvents(u)})},{defer:!0}));const s={registerNestedLayer:a};return T(Oc.Provider,{value:s,get children(){return T(ee,ht({as:"div",ref(u){const l=ce(g=>e=g,i.ref);typeof l=="function"&&l(u)}},r))}})}function cr(t){let e;const n=_n();t=Ot({id:n.generateId("content")},t);const[i,r]=St(t,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let o=!1,a=!1;const s=M=>{i.onPointerDownOutside?.(M),n.modal()&&M.detail.isContextMenu&&M.preventDefault()},u=M=>{i.onFocusOutside?.(M),n.modal()&&M.preventDefault()},l=M=>{i.onInteractOutside?.(M),!n.modal()&&(M.defaultPrevented||(o=!0,M.detail.originalEvent.type==="pointerdown"&&(a=!0)),Ne(n.triggerRef(),M.target)&&M.preventDefault(),M.detail.originalEvent.type==="focusin"&&a&&M.preventDefault())},g=M=>{i.onCloseAutoFocus?.(M),n.modal()?(M.preventDefault(),Kt(n.triggerRef())):(M.defaultPrevented||(o||Kt(n.triggerRef()),M.preventDefault()),o=!1,a=!1)};return Bu({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>e?[e]:[]}),Ku({ownerRef:()=>e,isDisabled:()=>!(n.isOpen()&&(n.modal()||n.preventScroll()))}),Fu({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:g},()=>e),it(()=>ut(n.registerContentId(r.id))),T(kt,{get when(){return n.contentPresence.isPresent()},get children(){return T(Xo,ht({ref(M){const c=ce(f=>{n.contentPresence.setRef(f),e=f},i.ref);typeof c=="function"&&c(M)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return V(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:l,get onDismiss(){return n.close}},r))}})}function E0(t){const e=_n();t=Ot({id:e.generateId("description")},t);const[n,i]=St(t,["id"]);return it(()=>ut(e.registerDescriptionId(n.id))),T(ee,ht({as:"p",get id(){return n.id}},i))}function Jo(t){const e=_n(),[n,i]=St(t,["ref","style","onPointerDown"]),r=o=>{Pt(o,n.onPointerDown),o.target===o.currentTarget&&o.preventDefault()};return T(kt,{get when(){return e.overlayPresence.isPresent()},get children(){return T(ee,ht({as:"div",ref(o){const a=ce(e.overlayPresence.setRef,n.ref);typeof a=="function"&&a(o)},get style(){return{"pointer-events":"auto",...n.style}},get"data-expanded"(){return e.isOpen()?"":void 0},get"data-closed"(){return e.isOpen()?void 0:""},onPointerDown:r},i))}})}function lr(t){const e=_n();return T(kt,{get when(){return e.contentPresence.isPresent()||e.overlayPresence.isPresent()},get children(){return T(go,t)}})}function dr(t){const e=`dialog-${Dn()}`;t=Ot({id:e,modal:!0,preventScroll:!1},t);const[n,i]=Z(),[r,o]=Z(),[a,s]=Z(),[u,l]=Z(),g=Ao({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:h=>t.onOpenChange?.(h)}),M=()=>t.forceMount||g.isOpen(),c=er(M),f=er(M),d={isOpen:g.isOpen,modal:()=>t.modal??!0,preventScroll:()=>t.preventScroll??!1,contentId:n,titleId:r,descriptionId:a,triggerRef:u,overlayPresence:c,contentPresence:f,close:g.close,toggle:g.toggle,setTriggerRef:l,generateId:kn(()=>t.id),registerContentId:ge(i),registerTitleId:ge(o),registerDescriptionId:ge(s)};return T(xc.Provider,{value:d,get children(){return t.children}})}function S0(t){const e=_n();t=Ot({id:e.generateId("title")},t);const[n,i]=St(t,["id"]);return it(()=>ut(e.registerTitleId(n.id))),T(ee,ht({as:"h2",get id(){return n.id}},i))}function b0(t){return T(cr,ht({role:"alertdialog"},t))}const Cc=se();function zc(){const t=ue(Cc);if(t===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return t}const A0=wt('<svg display="block" viewBox="0 0 30 30"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),ta=30,kc=ta/2,v0={top:180,right:-90,bottom:0,left:90};function D0(t){const e=zc();t=Ot({size:ta},t);const[n,i]=St(t,["ref","style","children","size"]),r=()=>e.currentPlacement().split("-")[0],o=I0(e.contentRef),a=()=>o()?.getPropertyValue("background-color")||"none",s=()=>o()?.getPropertyValue(`border-${r()}-color`)||"none",u=()=>o()?.getPropertyValue(`border-${r()}-width`)||"0px",l=()=>parseInt(u())*2*(ta/n.size),g=()=>`rotate(${v0[r()]} ${kc} ${kc})`;return T(ee,ht({as:"div",ref(M){const c=ce(e.setArrowRef,n.ref);typeof c=="function"&&c(M)},"aria-hidden":"true",get style(){return{position:"absolute","font-size":`${n.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:s(),"stroke-width":l(),...n.style}}},i,{get children(){const M=A0(),c=M.firstChild;return c.firstChild.nextSibling,pe(()=>Ve(c,"transform",g())),M}}))}function I0(t){const[e,n]=Z();return it(()=>{const i=t();i&&n(To(i).getComputedStyle(i))}),e}function Uc(t){const e=zc(),[n,i]=St(t,["ref","style"]);return T(ee,ht({as:"div",ref(r){const o=ce(e.setPositionerRef,n.ref);typeof o=="function"&&o(r)},"data-popper-positioner":"",get style(){return{position:"absolute",top:0,left:0,"min-width":"max-content",...n.style}}},i))}function Rn(t){return t.split("-")[1]}function ea(t){return t==="y"?"height":"width"}function Ze(t){return t.split("-")[0]}function Fn(t){return["top","bottom"].includes(Ze(t))?"x":"y"}function Yc(t,e,n){let{reference:i,floating:r}=t;const o=i.x+i.width/2-r.width/2,a=i.y+i.height/2-r.height/2,s=Fn(e),u=ea(s),l=i[u]/2-r[u]/2,g=s==="x";let M;switch(Ze(e)){case"top":M={x:o,y:i.y-r.height};break;case"bottom":M={x:o,y:i.y+i.height};break;case"right":M={x:i.x+i.width,y:a};break;case"left":M={x:i.x-r.width,y:a};break;default:M={x:i.x,y:i.y}}switch(Rn(e)){case"start":M[s]-=l*(n&&g?-1:1);break;case"end":M[s]+=l*(n&&g?-1:1)}return M}const x0=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:g,y:M}=Yc(l,i,u),c=i,f={},d=0;for(let h=0;h<s.length;h++){const{name:y,fn:p}=s[h],{x:w,y:m,data:N,reset:j}=await p({x:g,y:M,initialPlacement:i,placement:c,strategy:r,middlewareData:f,rects:l,platform:a,elements:{reference:t,floating:e}});g=w??g,M=m??M,f={...f,[y]:{...f[y],...N}},j&&d<=50&&(d++,typeof j=="object"&&(j.placement&&(c=j.placement),j.rects&&(l=j.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:r}):j.rects),{x:g,y:M}=Yc(l,c,u)),h=-1)}return{x:g,y:M,placement:c,strategy:r,middlewareData:f}};function fn(t,e){return typeof t=="function"?t(e):t}function Pc(t){return typeof t!="number"?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(t):{top:t,right:t,bottom:t,left:t}}function gr(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function pi(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:o,rects:a,elements:s,strategy:u}=t,{boundary:l="clippingAncestors",rootBoundary:g="viewport",elementContext:M="floating",altBoundary:c=!1,padding:f=0}=fn(e,t),d=Pc(f),h=s[c?M==="floating"?"reference":"floating":M],y=gr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(h)))==null||n?h:h.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:g,strategy:u})),p=M==="floating"?{...a.floating,x:i,y:r}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),m=await(o.isElement==null?void 0:o.isElement(w))&&await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1},N=gr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p,offsetParent:w,strategy:u}):p);return{top:(y.top-N.top+d.top)/m.y,bottom:(N.bottom-y.bottom+d.bottom)/m.y,left:(y.left-N.left+d.left)/m.x,right:(N.right-y.right+d.right)/m.x}}const mi=Math.min,Mn=Math.max;function na(t,e,n){return Mn(t,mi(e,n))}const O0=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:o,platform:a,elements:s}=e,{element:u,padding:l=0}=fn(t,e)||{};if(u==null)return{};const g=Pc(l),M={x:n,y:i},c=Fn(r),f=ea(c),d=await a.getDimensions(u),h=c==="y",y=h?"top":"left",p=h?"bottom":"right",w=h?"clientHeight":"clientWidth",m=o.reference[f]+o.reference[c]-M[c]-o.floating[f],N=M[c]-o.reference[c],j=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let b=j?j[w]:0;b&&await(a.isElement==null?void 0:a.isElement(j))||(b=s.floating[w]||o.floating[f]);const S=m/2-N/2,v=b/2-d[f]/2-1,F=mi(g[y],v),Y=mi(g[p],v),U=F,C=b-d[f]-Y,I=b/2-d[f]/2+S,x=na(U,I,C),k=Rn(r)!=null&&I!=x&&o.reference[f]/2-(I<U?F:Y)-d[f]/2<0?I<U?U-I:C-I:0;return{[c]:M[c]-k,data:{[c]:x,centerOffset:I-x+k}}}}),_c=["top","right","bottom","left"];_c.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);const C0={left:"right",right:"left",bottom:"top",top:"bottom"};function hr(t){return t.replace(/left|right|bottom|top/g,e=>C0[e])}function z0(t,e,n){n===void 0&&(n=!1);const i=Rn(t),r=Fn(t),o=ea(r);let a=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=hr(a)),{main:a,cross:hr(a)}}const k0={start:"end",end:"start"};function ia(t){return t.replace(/start|end/g,e=>k0[e])}const U0=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n;const{placement:i,middlewareData:r,rects:o,initialPlacement:a,platform:s,elements:u}=e,{mainAxis:l=!0,crossAxis:g=!0,fallbackPlacements:M,fallbackStrategy:c="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:d=!0,...h}=fn(t,e),y=Ze(i),p=Ze(a)===a,w=await(s.isRTL==null?void 0:s.isRTL(u.floating)),m=M||(p||!d?[hr(a)]:function(U){const C=hr(U);return[ia(U),C,ia(C)]}(a));M||f==="none"||m.push(...function(U,C,I,x){const k=Rn(U);let D=function(P,R,H){const q=["left","right"],et=["right","left"],st=["top","bottom"],bt=["bottom","top"];switch(P){case"top":case"bottom":return H?R?et:q:R?q:et;case"left":case"right":return R?st:bt;default:return[]}}(Ze(U),I==="start",x);return k&&(D=D.map(P=>P+"-"+k),C&&(D=D.concat(D.map(ia)))),D}(a,d,f,w));const N=[a,...m],j=await pi(e,h),b=[];let S=((n=r.flip)==null?void 0:n.overflows)||[];if(l&&b.push(j[y]),g){const{main:U,cross:C}=z0(i,o,w);b.push(j[U],j[C])}if(S=[...S,{placement:i,overflows:b}],!b.every(U=>U<=0)){var v,F;const U=(((v=r.flip)==null?void 0:v.index)||0)+1,C=N[U];if(C)return{data:{index:U,overflows:S},reset:{placement:C}};let I=(F=S.filter(x=>x.overflows[0]<=0).sort((x,k)=>x.overflows[1]-k.overflows[1])[0])==null?void 0:F.placement;if(!I)switch(c){case"bestFit":{var Y;const x=(Y=S.map(k=>[k.placement,k.overflows.filter(D=>D>0).reduce((D,P)=>D+P,0)]).sort((k,D)=>k[1]-D[1])[0])==null?void 0:Y[0];x&&(I=x);break}case"initialPlacement":I=a}if(i!==I)return{reset:{placement:I}}}return{}}}};function Rc(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Fc(t){return _c.some(e=>t[e]>=0)}const Y0=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...r}=fn(t,e);switch(i){case"referenceHidden":{const o=Rc(await pi(e,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Fc(o)}}}case"escaped":{const o=Rc(await pi(e,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Fc(o)}}}default:return{}}}}},P0=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:i}=e,r=await async function(o,a){const{placement:s,platform:u,elements:l}=o,g=await(u.isRTL==null?void 0:u.isRTL(l.floating)),M=Ze(s),c=Rn(s),f=Fn(s)==="x",d=["left","top"].includes(M)?-1:1,h=g&&f?-1:1,y=fn(a,o);let{mainAxis:p,crossAxis:w,alignmentAxis:m}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return c&&typeof m=="number"&&(w=c==="end"?-1*m:m),f?{x:w*h,y:p*d}:{x:p*d,y:w*h}}(e,t);return{x:n+r.x,y:i+r.y,data:r}}}};function _0(t){return t==="x"?"y":"x"}const R0=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:p,y:w}=y;return{x:p,y:w}}},...u}=fn(t,e),l={x:n,y:i},g=await pi(e,u),M=Fn(Ze(r)),c=_0(M);let f=l[M],d=l[c];if(o){const y=M==="y"?"bottom":"right";f=na(f+g[M==="y"?"top":"left"],f,f-g[y])}if(a){const y=c==="y"?"bottom":"right";d=na(d+g[c==="y"?"top":"left"],d,d-g[y])}const h=s.fn({...e,[M]:f,[c]:d});return{...h,data:{x:h.x-n,y:h.y-i}}}}},F0=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:i,platform:r,elements:o}=e,{apply:a=()=>{},...s}=fn(t,e),u=await pi(e,s),l=Ze(n),g=Rn(n),M=Fn(n)==="x",{width:c,height:f}=i.floating;let d,h;l==="top"||l==="bottom"?(d=l,h=g===(await(r.isRTL==null?void 0:r.isRTL(o.floating))?"start":"end")?"left":"right"):(h=l,d=g==="end"?"top":"bottom");const y=f-u[d],p=c-u[h],w=!e.middlewareData.shift;let m=y,N=p;if(M){const b=c-u.left-u.right;N=g||w?mi(p,b):b}else{const b=f-u.top-u.bottom;m=g||w?mi(y,b):b}if(w&&!g){const b=Mn(u.left,0),S=Mn(u.right,0),v=Mn(u.top,0),F=Mn(u.bottom,0);M?N=c-2*(b!==0||S!==0?b+S:Mn(u.left,u.right)):m=f-2*(v!==0||F!==0?v+F:Mn(u.top,u.bottom))}await a({...e,availableWidth:N,availableHeight:m});const j=await r.getDimensions(o.floating);return c!==j.width||f!==j.height?{reset:{rects:!0}}:{}}}};function he(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Oe(t){return he(t).getComputedStyle(t)}function Bc(t){return t instanceof he(t).Node}function qe(t){return Bc(t)?(t.nodeName||"").toLowerCase():"#document"}function be(t){return t instanceof HTMLElement||t instanceof he(t).HTMLElement}function Hc(t){return typeof ShadowRoot<"u"&&(t instanceof he(t).ShadowRoot||t instanceof ShadowRoot)}function Ni(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=Oe(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function B0(t){return["table","td","th"].includes(qe(t))}function ra(t){const e=oa(),n=Oe(t);return n.transform!=="none"||n.perspective!=="none"||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function oa(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function fr(t){return["html","body","#document"].includes(qe(t))}const aa=Math.min,Bn=Math.max,Mr=Math.round,yr=Math.floor,Xe=t=>({x:t,y:t});function Qc(t){const e=Oe(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=be(t),o=r?t.offsetWidth:n,a=r?t.offsetHeight:i,s=Mr(n)!==o||Mr(i)!==a;return s&&(n=o,i=a),{width:n,height:i,$:s}}function Re(t){return t instanceof Element||t instanceof he(t).Element}function sa(t){return Re(t)?t:t.contextElement}function Hn(t){const e=sa(t);if(!be(e))return Xe(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:o}=Qc(e);let a=(o?Mr(n.width):n.width)/i,s=(o?Mr(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const H0=Xe(0);function Gc(t){const e=he(t);return oa()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:H0}function yn(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),o=sa(t);let a=Xe(1);e&&(i?Re(i)&&(a=Hn(i)):a=Hn(t));const s=function(c,f,d){return f===void 0&&(f=!1),!(!d||f&&d!==he(c))&&f}(o,n,i)?Gc(o):Xe(0);let u=(r.left+s.x)/a.x,l=(r.top+s.y)/a.y,g=r.width/a.x,M=r.height/a.y;if(o){const c=he(o),f=i&&Re(i)?he(i):i;let d=c.frameElement;for(;d&&i&&f!==c;){const h=Hn(d),y=d.getBoundingClientRect(),p=getComputedStyle(d),w=y.left+(d.clientLeft+parseFloat(p.paddingLeft))*h.x,m=y.top+(d.clientTop+parseFloat(p.paddingTop))*h.y;u*=h.x,l*=h.y,g*=h.x,M*=h.y,u+=w,l+=m,d=he(d).frameElement}}return gr({width:g,height:M,x:u,y:l})}function pr(t){return Re(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Fe(t){var e;return(e=(Bc(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Kc(t){return yn(Fe(t)).left+pr(t).scrollLeft}function Qn(t){if(qe(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Hc(t)&&t.host||Fe(t);return Hc(e)?e.host:e}function $c(t){const e=Qn(t);return fr(e)?t.ownerDocument?t.ownerDocument.body:t.body:be(e)&&Ni(e)?e:$c(e)}function mr(t,e){var n;e===void 0&&(e=[]);const i=$c(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),o=he(i);return r?e.concat(o,o.visualViewport||[],Ni(i)?i:[]):e.concat(i,mr(i))}function Vc(t,e,n){let i;if(e==="viewport")i=function(r,o){const a=he(r),s=Fe(r),u=a.visualViewport;let l=s.clientWidth,g=s.clientHeight,M=0,c=0;if(u){l=u.width,g=u.height;const f=oa();(!f||f&&o==="fixed")&&(M=u.offsetLeft,c=u.offsetTop)}return{width:l,height:g,x:M,y:c}}(t,n);else if(e==="document")i=function(r){const o=Fe(r),a=pr(r),s=r.ownerDocument.body,u=Bn(o.scrollWidth,o.clientWidth,s.scrollWidth,s.clientWidth),l=Bn(o.scrollHeight,o.clientHeight,s.scrollHeight,s.clientHeight);let g=-a.scrollLeft+Kc(r);const M=-a.scrollTop;return Oe(s).direction==="rtl"&&(g+=Bn(o.clientWidth,s.clientWidth)-u),{width:u,height:l,x:g,y:M}}(Fe(t));else if(Re(e))i=function(r,o){const a=yn(r,!0,o==="fixed"),s=a.top+r.clientTop,u=a.left+r.clientLeft,l=be(r)?Hn(r):Xe(1);return{width:r.clientWidth*l.x,height:r.clientHeight*l.y,x:u*l.x,y:s*l.y}}(e,n);else{const r=Gc(t);i={...e,x:e.x-r.x,y:e.y-r.y}}return gr(i)}function Wc(t,e){const n=Qn(t);return!(n===e||!Re(n)||fr(n))&&(Oe(n).position==="fixed"||Wc(n,e))}function Q0(t,e,n){const i=be(e),r=Fe(e),o=n==="fixed",a=yn(t,!0,o,e);let s={scrollLeft:0,scrollTop:0};const u=Xe(0);if(i||!i&&!o)if((qe(e)!=="body"||Ni(r))&&(s=pr(e)),be(e)){const l=yn(e,!0,o,e);u.x=l.x+e.clientLeft,u.y=l.y+e.clientTop}else r&&(u.x=Kc(r));return{x:a.left+s.scrollLeft-u.x,y:a.top+s.scrollTop-u.y,width:a.width,height:a.height}}function Zc(t,e){return be(t)&&Oe(t).position!=="fixed"?e?e(t):t.offsetParent:null}function qc(t,e){const n=he(t);if(!be(t))return n;let i=Zc(t,e);for(;i&&B0(i)&&Oe(i).position==="static";)i=Zc(i,e);return i&&(qe(i)==="html"||qe(i)==="body"&&Oe(i).position==="static"&&!ra(i))?n:i||function(r){let o=Qn(r);for(;be(o)&&!fr(o);){if(ra(o))return o;o=Qn(o)}return null}(t)||n}const Xc={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:i}=t;const r=be(n),o=Fe(n);if(n===o)return e;let a={scrollLeft:0,scrollTop:0},s=Xe(1);const u=Xe(0);if((r||!r&&i!=="fixed")&&((qe(n)!=="body"||Ni(o))&&(a=pr(n)),be(n))){const l=yn(n);s=Hn(n),u.x=l.x+n.clientLeft,u.y=l.y+n.clientTop}return{width:e.width*s.x,height:e.height*s.y,x:e.x*s.x-a.scrollLeft*s.x+u.x,y:e.y*s.y-a.scrollTop*s.y+u.y}},getDocumentElement:Fe,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?function(u,l){const g=l.get(u);if(g)return g;let M=mr(u).filter(h=>Re(h)&&qe(h)!=="body"),c=null;const f=Oe(u).position==="fixed";let d=f?Qn(u):u;for(;Re(d)&&!fr(d);){const h=Oe(d),y=ra(d);y||h.position!=="fixed"||(c=null),(f?!y&&!c:!y&&h.position==="static"&&c&&["absolute","fixed"].includes(c.position)||Ni(d)&&!y&&Wc(u,d))?M=M.filter(p=>p!==d):c=h,d=Qn(d)}return l.set(u,M),M}(e,this._c):[].concat(n),i],a=o[0],s=o.reduce((u,l)=>{const g=Vc(e,l,r);return u.top=Bn(g.top,u.top),u.right=aa(g.right,u.right),u.bottom=aa(g.bottom,u.bottom),u.left=Bn(g.left,u.left),u},Vc(e,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:qc,getElementRects:async function(t){let{reference:e,floating:n,strategy:i}=t;const r=this.getOffsetParent||qc,o=this.getDimensions;return{reference:Q0(e,await r(n),i),floating:{x:0,y:0,...await o(n)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Qc(t)},getScale:Hn,isElement:Re,isRTL:function(t){return getComputedStyle(t).direction==="rtl"}};function G0(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,l=sa(t),g=r||o?[...l?mr(l):[],...mr(e)]:[];g.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const M=l&&s?function(y,p){let w,m=null;const N=Fe(y);function j(){clearTimeout(w),m&&m.disconnect(),m=null}return function b(S,v){S===void 0&&(S=!1),v===void 0&&(v=1),j();const{left:F,top:Y,width:U,height:C}=y.getBoundingClientRect();if(S||p(),!U||!C)return;const I={rootMargin:-yr(Y)+"px "+-yr(N.clientWidth-(F+U))+"px "+-yr(N.clientHeight-(Y+C))+"px "+-yr(F)+"px",threshold:Bn(0,aa(1,v))||1};let x=!0;function k(D){const P=D[0].intersectionRatio;if(P!==v){if(!x)return b();P?b(!1,P):w=setTimeout(()=>{b(!1,1e-7)},100)}x=!1}try{m=new IntersectionObserver(k,{...I,root:N.ownerDocument})}catch{m=new IntersectionObserver(k,I)}m.observe(y)}(!0),j}(l,n):null;let c,f=-1,d=null;a&&(d=new ResizeObserver(y=>{let[p]=y;p&&p.target===l&&d&&(d.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{d&&d.observe(e)})),n()}),l&&!u&&d.observe(l),d.observe(e));let h=u?yn(t):null;return u&&function y(){const p=yn(t);!h||p.x===h.x&&p.y===h.y&&p.width===h.width&&p.height===h.height||n(),h=p,c=requestAnimationFrame(y)}(),n(),()=>{g.forEach(y=>{r&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),M&&M(),d&&d.disconnect(),d=null,u&&cancelAnimationFrame(c)}}const K0=(t,e,n)=>{const i=new Map,r={platform:Xc,...n},o={...r.platform,_c:i};return x0(t,e,{...r,platform:o})};function Jc(t){const{x:e=0,y:n=0,width:i=0,height:r=0}=t??{};if(typeof DOMRect=="function")return new DOMRect(e,n,i,r);const o={x:e,y:n,width:i,height:r,top:n,right:e+i,bottom:n+r,left:e};return{...o,toJSON:()=>o}}function $0(t,e){return{contextElement:t,getBoundingClientRect:()=>{const n=e(t);return n?Jc(n):t?t.getBoundingClientRect():Jc()}}}function V0(t){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(t)}const W0={top:"bottom",right:"left",bottom:"top",left:"right"};function Z0(t,e){const[n,i]=t.split("-"),r=W0[n];return i?n==="left"||n==="right"?`${r} ${i==="start"?"top":"bottom"}`:i==="start"?`${r} ${e==="rtl"?"right":"left"}`:`${r} ${e==="rtl"?"left":"right"}`:`${r} center`}function tl(t){t=Ot({getAnchorRect:M=>M?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},t);const[e,n]=Z(),[i,r]=Z(),[o,a]=Z(t.placement),s=()=>$0(t.anchorRef(),t.getAnchorRect),{direction:u}=ir();async function l(){const M=s(),c=e(),f=i();if(!M||!c)return;const d=(f?.clientHeight||0)/2,h=typeof t.gutter=="number"?t.gutter+d:t.gutter??d;c.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),M.getBoundingClientRect();const y=[P0(({placement:j})=>{const b=!!j.split("-")[1];return{mainAxis:h,crossAxis:b?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const j=typeof t.flip=="string"?t.flip.split(" "):void 0;if(j!==void 0&&!j.every(V0))throw new Error("`flip` expects a spaced-delimited list of placements");y.push(U0({padding:t.overflowPadding,fallbackPlacements:j}))}(t.slide||t.overlap)&&y.push(R0({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),y.push(F0({padding:t.overflowPadding,apply({availableWidth:j,availableHeight:b,rects:S}){const v=Math.round(S.reference.width);j=Math.floor(j),b=Math.floor(b),c.style.setProperty("--kb-popper-anchor-width",`${v}px`),c.style.setProperty("--kb-popper-content-available-width",`${j}px`),c.style.setProperty("--kb-popper-content-available-height",`${b}px`),t.sameWidth&&(c.style.width=`${v}px`),t.fitViewport&&(c.style.maxWidth=`${j}px`,c.style.maxHeight=`${b}px`)}})),t.hideWhenDetached&&y.push(Y0({padding:t.detachedPadding})),f&&y.push(O0({element:f,padding:t.arrowPadding}));const p=await K0(M,c,{placement:t.placement,strategy:"absolute",middleware:y,platform:{...Xc,isRTL:()=>u()==="rtl"}});if(a(p.placement),t.onCurrentPlacementChange?.(p.placement),!c)return;c.style.setProperty("--kb-popper-content-transform-origin",Z0(p.placement,u()));const w=Math.round(p.x),m=Math.round(p.y);let N;if(t.hideWhenDetached&&(N=p.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(c.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${m}px, 0)`,visibility:N}),f&&p.middlewareData.arrow){const{x:j,y:b}=p.middlewareData.arrow,S=p.placement.split("-")[0];Object.assign(f.style,{left:j!=null?`${j}px`:"",top:b!=null?`${b}px`:"",[S]:"100%"})}}it(()=>{const M=s(),c=e();if(!M||!c)return;const f=G0(M,c,l,{elementResize:typeof ResizeObserver=="function"});ut(f)}),it(()=>{const M=e(),c=t.contentRef();!M||!c||queueMicrotask(()=>{M.style.zIndex=getComputedStyle(c).zIndex})});const g={currentPlacement:o,contentRef:()=>t.contentRef(),setPositionerRef:n,setArrowRef:r};return T(Cc.Provider,{value:g,get children(){return t.children}})}const el=se();function q0(){const t=ue(el);if(t===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return t}const nl=se();function il(){const t=ue(nl);if(t===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return t}function X0(t){let e;const n=q0(),i=`${n.generateId("item")}-${Dn()}`;t=Ot({id:i},t);const[r,o]=St(t,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,s]=Z(),[u,l]=Z(),g=()=>n.listState().selectionManager(),M=()=>g().focusedKey()===r.item.key,c=m0({key:()=>r.item.key,selectionManager:g,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>r.item.disabled},()=>e),f=()=>{if(g().selectionMode()!=="none")return c.isSelected()},d=V(()=>!(gi()&&Nf())),h=()=>d()?r["aria-label"]:void 0,y=()=>d()?a():void 0,p=()=>d()?u():void 0,w=()=>{if(!n.isVirtualized())return;const S=n.listState().collection().getItem(r.item.key)?.index;return S!=null?S+1:void 0},m=()=>{if(n.isVirtualized())return Yf(n.listState().collection())},N=S=>{Pt(S,r.onPointerMove),S.pointerType==="mouse"&&!c.isDisabled()&&n.shouldFocusOnHover()&&(Kt(S.currentTarget),g().setFocused(!0),g().setFocusedKey(r.item.key))},j=V(()=>({"data-disabled":c.isDisabled()?"":void 0,"data-selected":c.isSelected()?"":void 0,"data-highlighted":M()?"":void 0})),b={isSelected:c.isSelected,dataset:j,generateId:kn(()=>o.id),registerLabelId:ge(s),registerDescriptionId:ge(l)};return T(nl.Provider,{value:b,get children(){return T(ee,ht({as:"li",ref(S){const v=ce(F=>e=F,r.ref);typeof v=="function"&&v(S)},role:"option",get tabIndex(){return c.tabIndex()},get"aria-disabled"(){return c.isDisabled()},get"aria-selected"(){return f()},get"aria-label"(){return h()},get"aria-labelledby"(){return y()},get"aria-describedby"(){return p()},get"aria-posinset"(){return w()},get"aria-setsize"(){return m()},get"data-key"(){return c.dataKey()},get onPointerDown(){return we([r.onPointerDown,c.onPointerDown])},get onPointerUp(){return we([r.onPointerUp,c.onPointerUp])},get onClick(){return we([r.onClick,c.onClick])},get onKeyDown(){return we([r.onKeyDown,c.onKeyDown])},get onMouseDown(){return we([r.onMouseDown,c.onMouseDown])},get onFocus(){return we([r.onFocus,c.onFocus])},onPointerMove:N},j,o))}})}function J0(t){const e=il();t=Ot({id:e.generateId("indicator")},t);const[n,i]=St(t,["forceMount"]);return T(kt,{get when(){return n.forceMount||e.isSelected()},get children(){return T(ee,ht({as:"div","aria-hidden":"true"},()=>e.dataset(),i))}})}function ty(t){const e=il();t=Ot({id:e.generateId("label")},t);const[n,i]=St(t,["id"]);return it(()=>ut(e.registerLabelId(n.id))),T(ee,ht({as:"div",get id(){return n.id}},()=>e.dataset(),i))}function ey(t){let e;const n=`listbox-${Dn()}`;t=Ot({id:n,selectionMode:"single",virtualized:!1},t);const[i,r]=St(t,["ref","children","renderItem","renderSection","value","defaultValue","onChange","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","state","keyboardDelegate","autoFocus","selectionMode","shouldFocusWrap","shouldUseVirtualFocus","shouldSelectOnPressUp","shouldFocusOnHover","allowDuplicateSelectionEvents","disallowEmptySelection","selectionBehavior","selectOnFocus","disallowTypeAhead","allowsTabNavigation","virtualized","scrollToItem","scrollRef","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),o=V(()=>i.state?i.state:Dc({selectedKeys:()=>i.value,defaultSelectedKeys:()=>i.defaultValue,onSelectionChange:i.onChange,allowDuplicateSelectionEvents:()=>E(i.allowDuplicateSelectionEvents),disallowEmptySelection:()=>E(i.disallowEmptySelection),selectionBehavior:()=>E(i.selectionBehavior),selectionMode:()=>E(i.selectionMode),dataSource:()=>i.options??[],getKey:()=>i.optionValue,getTextValue:()=>i.optionTextValue,getDisabled:()=>i.optionDisabled,getSectionChildren:()=>i.optionGroupChildren})),a=w0({selectionManager:()=>o().selectionManager(),collection:()=>o().collection(),autoFocus:()=>E(i.autoFocus),shouldFocusWrap:()=>E(i.shouldFocusWrap),keyboardDelegate:()=>i.keyboardDelegate,disallowEmptySelection:()=>E(i.disallowEmptySelection),selectOnFocus:()=>E(i.selectOnFocus),disallowTypeAhead:()=>E(i.disallowTypeAhead),shouldUseVirtualFocus:()=>E(i.shouldUseVirtualFocus),allowsTabNavigation:()=>E(i.allowsTabNavigation),isVirtualized:()=>i.virtualized,scrollToKey:()=>i.scrollToItem},()=>e,()=>i.scrollRef?.()),s={listState:o,generateId:kn(()=>r.id),shouldUseVirtualFocus:()=>t.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>t.shouldSelectOnPressUp,shouldFocusOnHover:()=>t.shouldFocusOnHover,isVirtualized:()=>i.virtualized};return T(el.Provider,{value:s,get children(){return T(ee,ht({as:"ul",ref(u){const l=ce(g=>e=g,i.ref);typeof l=="function"&&l(u)},role:"listbox",get tabIndex(){return a.tabIndex()},get"aria-multiselectable"(){return o().selectionManager().selectionMode()==="multiple"?!0:void 0},get onKeyDown(){return we([i.onKeyDown,a.onKeyDown])},get onMouseDown(){return we([i.onMouseDown,a.onMouseDown])},get onFocusIn(){return we([i.onFocusIn,a.onFocusIn])},get onFocusOut(){return we([i.onFocusOut,a.onFocusOut])}},r,{get children(){return T(kt,{get when(){return!i.virtualized},get fallback(){return i.children?.(o().collection)},get children(){return T(uf,{get each(){return[...o().collection()]},by:"key",children:u=>T(co,{get children(){return[T(Pe,{get when(){return u().type==="section"},get children(){return i.renderSection?.(u())}}),T(Pe,{get when(){return u().type==="item"},get children(){return i.renderItem?.(u())}})]}})})}})}}))}})}const rl=se();function Gn(){const t=ue(rl);if(t===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return t}function ny(t){let e;const n=Gn(),[i,r]=St(t,["ref","id","style","onCloseAutoFocus","onFocusOutside"]),o=s=>{n.close()},a=s=>{i.onFocusOutside?.(s),n.isOpen()&&n.isModal()&&s.preventDefault()};return Bu({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>e?[e]:[]}),Ku({ownerRef:()=>e,isDisabled:()=>!(n.isOpen()&&(n.isModal()||n.preventScroll()))}),Fu({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:s=>{s.preventDefault()},onUnmountAutoFocus:s=>{i.onCloseAutoFocus?.(s),s.defaultPrevented||(Kt(n.triggerRef()),s.preventDefault())}},()=>e),T(kt,{get when(){return n.contentPresence.isPresent()},get children(){return T(Uc,{get children(){return T(Xo,ht({ref(s){const u=ce(l=>{n.setContentRef(l),n.contentPresence.setRef(l),e=l},i.ref);typeof u=="function"&&u(s)},get disableOutsidePointerEvents(){return V(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return{"--kb-select-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...i.style}},onEscapeKeyDown:o,onFocusOutside:a,get onDismiss(){return n.close}},()=>n.dataset(),r))}})}})}function iy(t){const e=Gn();return t=Ot({children:"▼"},t),T(ee,ht({as:"span","aria-hidden":"true"},()=>e.dataset(),t))}function ry(t){const e=Gn();t=Ot({id:e.generateId("listbox")},t);const[n,i]=St(t,["ref","id","onKeyDown"]);return it(()=>ut(e.registerListboxId(n.id))),T(ey,ht({ref(r){const o=ce(e.setListboxRef,n.ref);typeof o=="function"&&o(r)},get id(){return n.id},get state(){return e.listState()},get virtualized(){return e.isVirtualized()},get autoFocus(){return e.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return e.shouldFocusWrap()},get disallowTypeAhead(){return e.disallowTypeAhead()},get"aria-labelledby"(){return e.listboxAriaLabelledBy()},get renderItem(){return e.renderItem},get renderSection(){return e.renderSection},onKeyDown:r=>{Pt(r,n.onKeyDown),r.key==="Escape"&&e.isMultiple()&&r.preventDefault()}},i))}function oy(t){const e=Gn();return T(kt,{get when(){return e.contentPresence.isPresent()},get children(){return T(go,t)}})}function ay(t){const e=`select-${Dn()}`;t=Ot({id:e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1,preventScroll:!1},t);const[n,i,r,o]=St(t,["itemComponent","sectionComponent","open","defaultOpen","onOpenChange","value","defaultValue","onChange","placeholder","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","keyboardDelegate","allowDuplicateSelectionEvents","disallowEmptySelection","disallowTypeAhead","shouldFocusWrap","selectionBehavior","selectionMode","virtualized","modal","preventScroll","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"],rM),[a,s]=Z(),[u,l]=Z(),[g,M]=Z(),[c,f]=Z(),[d,h]=Z(),[y,p]=Z(),[w,m]=Z(),[N,j]=Z(!0),b=B=>{const lt=n.optionValue;return lt==null?String(B):String(Xi(lt)?lt(B):B[lt])},S=V(()=>{const B=n.optionGroupChildren;return B==null?n.options:Xi(B)?n.options.flatMap(lt=>B(lt)??lt):n.options.flatMap(lt=>lt[B]??lt)}),v=V(()=>S().map(B=>b(B))),F=B=>[...B].map(lt=>S().find(Nt=>b(Nt)===lt)).filter(lt=>lt!=null),Y=Ao({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:B=>n.onOpenChange?.(B)}),U=Dc({selectedKeys:()=>n.value&&n.value.map(b),defaultSelectedKeys:()=>n.defaultValue&&n.defaultValue.map(b),onSelectionChange:B=>{n.onChange?.(F(B)),n.selectionMode==="single"&&P()},allowDuplicateSelectionEvents:()=>E(n.allowDuplicateSelectionEvents),disallowEmptySelection:()=>E(n.disallowEmptySelection),selectionBehavior:()=>E(n.selectionBehavior),selectionMode:()=>n.selectionMode,dataSource:()=>n.options??[],getKey:()=>n.optionValue,getTextValue:()=>n.optionTextValue,getDisabled:()=>n.optionDisabled,getSectionChildren:()=>n.optionGroupChildren}),C=V(()=>F(U.selectionManager().selectedKeys())),I=B=>{U.selectionManager().toggleSelection(b(B))},x=er(()=>n.forceMount||Y.isOpen()),k=()=>{const B=y();B&&Kt(B)},D=B=>{if(n.options.length<=0)return;j(B),Y.open();let lt=U.selectionManager().firstSelectedKey();lt==null&&(B==="first"?lt=U.collection().getFirstKey():B==="last"&&(lt=U.collection().getLastKey())),k(),U.selectionManager().setFocused(!0),U.selectionManager().setFocusedKey(lt)},P=()=>{Y.close(),U.selectionManager().setFocused(!1),U.selectionManager().setFocusedKey(void 0)},R=B=>{Y.isOpen()?P():D(B)},{formControlContext:H}=oM(r);Vf(c,()=>{const B=n.defaultValue?[...n.defaultValue].map(b):new Te;U.selectionManager().setSelectedKeys(B)});const q=Ju({usage:"search",sensitivity:"base"}),et=V(()=>E(n.keyboardDelegate)||new Ic(U.collection,void 0,q)),st=B=>n.itemComponent?.({item:B}),bt=B=>n.sectionComponent?.({section:B});it(Se([v],([B])=>{const lt=[...U.selectionManager().selectedKeys()].filter(Nt=>B.includes(Nt));U.selectionManager().setSelectedKeys(lt)},{defer:!0}));const Bt=V(()=>({"data-expanded":Y.isOpen()?"":void 0,"data-closed":Y.isOpen()?void 0:""})),Lt={dataset:Bt,isOpen:Y.isOpen,isDisabled:()=>H.isDisabled()??!1,isMultiple:()=>E(n.selectionMode)==="multiple",isVirtualized:()=>n.virtualized??!1,isModal:()=>n.modal??!1,preventScroll:()=>n.preventScroll??!1,disallowTypeAhead:()=>n.disallowTypeAhead??!1,shouldFocusWrap:()=>n.shouldFocusWrap??!1,selectedOptions:C,contentPresence:x,autoFocus:N,triggerRef:c,listState:()=>U,keyboardDelegate:et,triggerId:a,valueId:u,listboxId:g,listboxAriaLabelledBy:w,setListboxAriaLabelledBy:m,setTriggerRef:f,setContentRef:h,setListboxRef:p,open:D,close:P,toggle:R,placeholder:()=>n.placeholder,renderItem:st,renderSection:bt,removeOptionFromSelection:I,generateId:kn(()=>E(r.id)),registerTriggerId:ge(s),registerValueId:ge(l),registerListboxId:ge(M)};return T(Vu.Provider,{value:H,get children(){return T(rl.Provider,{value:Lt,get children(){return T(tl,ht({anchorRef:c,contentRef:d},i,{get children(){return T(ee,ht({as:"div",role:"group",get id(){return E(r.id)}},()=>H.dataset(),Bt,o))}}))}})}})}function sy(t){const[e,n]=St(t,["value","defaultValue","onChange","multiple"]),i=V(()=>{if(e.value!=null)return e.multiple?e.value:[e.value]}),r=V(()=>{if(e.defaultValue!=null)return e.multiple?e.defaultValue:[e.defaultValue]});return T(ay,ht({get value(){return i()},get defaultValue(){return r()},onChange:o=>{e.onChange?.(e.multiple?o:o[0])},get selectionMode(){return e.multiple?"multiple":"single"},get disallowEmptySelection(){return!e.multiple}},n))}function uy(t){const e=Co(),n=Gn();t=Ot({id:n.generateId("trigger")},t);const[i,r,o]=St(t,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],aM),a=()=>n.listState().selectionManager(),s=()=>n.keyboardDelegate(),u=()=>i.disabled||n.isDisabled(),{fieldProps:l}=sM(r),{typeSelectHandlers:g}=Ac({keyboardDelegate:s,selectionManager:a,onTypeSelect:p=>a().select(p)}),M=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,c=p=>{Pt(p,i.onPointerDown),p.currentTarget.dataset.pointerType=p.pointerType,!u()&&p.pointerType!=="touch"&&p.button===0&&(p.preventDefault(),n.toggle(!0))},f=p=>{Pt(p,i.onClick),!u()&&p.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},d=p=>{if(Pt(p,i.onKeyDown),!u())switch(Pt(p,g.onKeyDown),p.key){case"Enter":case" ":case"ArrowDown":p.stopPropagation(),p.preventDefault(),n.toggle("first");break;case"ArrowUp":p.stopPropagation(),p.preventDefault(),n.toggle("last");break;case"ArrowLeft":{if(p.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),m=w!=null?s().getKeyAbove?.(w):s().getFirstKey?.();m!=null&&a().select(m);break}case"ArrowRight":{if(p.preventDefault(),n.isMultiple())return;const w=a().firstSelectedKey(),m=w!=null?s().getKeyBelow?.(w):s().getFirstKey?.();m!=null&&a().select(m);break}}},h=p=>{Pt(p,i.onFocus),!a().isFocused()&&a().setFocused(!0)},y=p=>{Pt(p,i.onBlur),!n.isOpen()&&a().setFocused(!1)};return it(()=>ut(n.registerTriggerId(l.id()))),it(()=>{n.setListboxAriaLabelledBy([l.ariaLabelledBy(),l.ariaLabel()&&!l.ariaLabelledBy()?l.id():null].filter(Boolean).join(" ")||void 0)}),T(ur,ht({ref(p){const w=ce(n.setTriggerRef,i.ref);typeof w=="function"&&w(p)},get id(){return l.id()},get disabled(){return u()},"aria-haspopup":"listbox",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return V(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return l.ariaLabel()},get"aria-labelledby"(){return M()},get"aria-describedby"(){return l.ariaDescribedBy()},onPointerDown:c,onClick:f,onKeyDown:d,onFocus:h,onBlur:y},()=>n.dataset(),()=>e.dataset(),o))}const cy=wt("<span>");function ly(t){const e=Co(),n=Gn();t=Ot({id:n.generateId("value")},t);const[i,r]=St(t,["id","children"]),o=()=>n.listState().selectionManager(),a=()=>{const s=o().selectedKeys();return s.size===1&&s.has("")?!0:o().isEmpty()};return it(()=>ut(n.registerValueId(i.id))),(()=>{const s=cy();return te(s,ht({get id(){return i.id},get"data-placeholder-shown"(){return a()?"":void 0}},()=>e.dataset(),r),!1,!0),ot(s,T(kt,{get when(){return!a()},get fallback(){return n.placeholder()},get children(){return T(dy,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:u=>n.removeOptionFromSelection(u),clear:()=>o().clearSelection()},get children(){return i.children}})}})),s})()}function dy(t){const e=Gi(()=>{const n=t.children;return Xi(n)?n(t.state):n});return V(e)}const ol=se();function ua(){const t=ue(ol);if(t===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return t}function gy(t){const e=ua();t=Ot({id:e.generateId("content")},t);const[n,i]=St(t,["ref","style"]);return it(()=>ut(e.registerContentId(i.id))),T(kt,{get when(){return e.contentPresence.isPresent()},get children(){return T(Uc,{get children(){return T(Xo,ht({ref(r){const o=ce(a=>{e.setContentRef(a),e.contentPresence.setRef(a)},n.ref);typeof o=="function"&&o(r)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return{"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...n.style}},onFocusOutside:r=>r.preventDefault(),onDismiss:()=>e.hideTooltip(!0)},()=>e.dataset(),i))}})}})}function hy(t){const e=ua();return T(kt,{get when(){return e.contentPresence.isPresent()},get children(){return T(go,t)}})}/*!
|
|
220
|
+
*/const A0=["button","color","file","image","reset","submit"];function D0(t){const e=t.tagName.toLowerCase();return e==="button"?!0:e==="input"&&t.type?A0.indexOf(t.type)!==-1:!1}function sr(t){let e;t=Nt({type:"button"},t);const[n,i]=gt(t,["ref","type","disabled"]),r=cM(()=>e,()=>"button"),o=G(()=>{const u=r();return u==null?!1:D0({tagName:u,type:n.type})}),s=G(()=>r()==="input"),a=G(()=>r()==="a"&&e?.getAttribute("href")!=null);return L(Bt,it({as:"button",ref(u){const l=Vt(g=>e=g,n.ref);typeof l=="function"&&l(u)},get type(){return o()||s()?n.type:void 0},get role(){return!o()&&!a()?"button":void 0},get tabIndex(){return!o()&&!a()&&!n.disabled?0:void 0},get disabled(){return o()||s()?n.disabled:void 0},get"aria-disabled"(){return!o()&&!s()&&n.disabled?!0:void 0},get"data-disabled"(){return n.disabled?"":void 0}},i))}const Cc=Kt();function zn(){const t=$t(Cc);if(t===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return t}function Zo(t){const e=zn(),[n,i]=gt(t,["aria-label","onClick"]),r=p0(()=>MM);return L(sr,it({get"aria-label"(){return n["aria-label"]||r().format("dismiss")},onClick:o=>{St(o,n.onClick),e.close()}},i))}const zc=Kt();function v0(){return $t(zc)}function qo(t){let e;const n=v0(),[i,r]=gt(t,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),o=new Set([]),s=u=>{o.add(u);const l=n?.registerNestedLayer(u);return()=>{o.delete(u),l?.()}};oM({shouldExcludeElement:u=>e?i.excludedElements?.some(l=>se(l(),u))||[...o].some(l=>se(l,u)):!1,onPointerDownOutside:u=>{!e||Zt.isBelowPointerBlockingLayer(e)||!i.bypassTopMostLayerCheck&&!Zt.isTopMostLayer(e)||(i.onPointerDownOutside?.(u),i.onInteractOutside?.(u),u.defaultPrevented||i.onDismiss?.())},onFocusOutside:u=>{i.onFocusOutside?.(u),i.onInteractOutside?.(u),u.defaultPrevented||i.onDismiss?.()}},()=>e),Gf({ownerDocument:()=>Wt(e),onEscapeKeyDown:u=>{!e||!Zt.isTopMostLayer(e)||(i.onEscapeKeyDown?.(u),!u.defaultPrevented&&i.onDismiss&&(u.preventDefault(),i.onDismiss()))}}),Ye(()=>{if(!e)return;Zt.addLayer({node:e,isPointerBlocking:i.disableOutsidePointerEvents,dismiss:i.onDismiss});const u=n?.registerNestedLayer(e);Zt.assignPointerEventToLayers(),Zt.disableBodyPointerEvents(e),J(()=>{e&&(Zt.removeLayer(e),u?.(),Zt.assignPointerEventToLayers(),Zt.restoreBodyPointerEvents(e))})}),W(ge([()=>e,()=>i.disableOutsidePointerEvents],([u,l])=>{if(!u)return;const g=Zt.find(u);g&&g.isPointerBlocking!==l&&(g.isPointerBlocking=l,Zt.assignPointerEventToLayers()),l&&Zt.disableBodyPointerEvents(u),J(()=>{Zt.restoreBodyPointerEvents(u)})},{defer:!0}));const a={registerNestedLayer:s};return L(zc.Provider,{value:a,get children(){return L(Bt,it({as:"div",ref(u){const l=Vt(g=>e=g,i.ref);typeof l=="function"&&l(u)}},r))}})}function ar(t){let e;const n=zn();t=Nt({id:n.generateId("content")},t);const[i,r]=gt(t,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let o=!1,s=!1;const a=M=>{i.onPointerDownOutside?.(M),n.modal()&&M.detail.isContextMenu&&M.preventDefault()},u=M=>{i.onFocusOutside?.(M),n.modal()&&M.preventDefault()},l=M=>{i.onInteractOutside?.(M),!n.modal()&&(M.defaultPrevented||(o=!0,M.detail.originalEvent.type==="pointerdown"&&(s=!0)),se(n.triggerRef(),M.target)&&M.preventDefault(),M.detail.originalEvent.type==="focusin"&&s&&M.preventDefault())},g=M=>{i.onCloseAutoFocus?.(M),n.modal()?(M.preventDefault(),xt(n.triggerRef())):(M.defaultPrevented||(o||xt(n.triggerRef()),M.preventDefault()),o=!1,s=!1)};return Qu({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>e?[e]:[]}),Vu({ownerRef:()=>e,isDisabled:()=>!(n.isOpen()&&(n.modal()||n.preventScroll()))}),Hu({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:i.onOpenAutoFocus,onUnmountAutoFocus:g},()=>e),W(()=>J(n.registerContentId(r.id))),L(Lt,{get when(){return n.contentPresence.isPresent()},get children(){return L(qo,it({ref(M){const c=Vt(f=>{n.contentPresence.setRef(f),e=f},i.ref);typeof c=="function"&&c(M)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return G(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:l,get onDismiss(){return n.close}},r))}})}function I0(t){const e=zn();t=Nt({id:e.generateId("description")},t);const[n,i]=gt(t,["id"]);return W(()=>J(e.registerDescriptionId(n.id))),L(Bt,it({as:"p",get id(){return n.id}},i))}function Xo(t){const e=zn(),[n,i]=gt(t,["ref","style","onPointerDown"]),r=o=>{St(o,n.onPointerDown),o.target===o.currentTarget&&o.preventDefault()};return L(Lt,{get when(){return e.overlayPresence.isPresent()},get children(){return L(Bt,it({as:"div",ref(o){const s=Vt(e.overlayPresence.setRef,n.ref);typeof s=="function"&&s(o)},get style(){return{"pointer-events":"auto",...n.style}},get"data-expanded"(){return e.isOpen()?"":void 0},get"data-closed"(){return e.isOpen()?void 0:""},onPointerDown:r},i))}})}function ur(t){const e=zn();return L(Lt,{get when(){return e.contentPresence.isPresent()||e.overlayPresence.isPresent()},get children(){return L(lo,t)}})}function cr(t){const e=`dialog-${Sn()}`;t=Nt({id:e,modal:!0,preventScroll:!1},t);const[n,i]=K(),[r,o]=K(),[s,a]=K(),[u,l]=K(),g=bo({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:h=>t.onOpenChange?.(h)}),M=()=>t.forceMount||g.isOpen(),c=Ji(M),f=Ji(M),d={isOpen:g.isOpen,modal:()=>t.modal??!0,preventScroll:()=>t.preventScroll??!1,contentId:n,titleId:r,descriptionId:s,triggerRef:u,overlayPresence:c,contentPresence:f,close:g.close,toggle:g.toggle,setTriggerRef:l,generateId:In(()=>t.id),registerContentId:qt(i),registerTitleId:qt(o),registerDescriptionId:qt(a)};return L(Cc.Provider,{value:d,get children(){return t.children}})}function x0(t){const e=zn();t=Nt({id:e.generateId("title")},t);const[n,i]=gt(t,["id"]);return W(()=>J(e.registerTitleId(n.id))),L(Bt,it({as:"h2",get id(){return n.id}},i))}function O0(t){return L(ar,it({role:"alertdialog"},t))}const kc=Kt();function Uc(){const t=$t(kc);if(t===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return t}const C0=ut('<svg display="block" viewBox="0 0 30 30"><g><path fill="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z"></path><path stroke="none" d="M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z">'),Jo=30,Yc=Jo/2,z0={top:180,right:-90,bottom:0,left:90};function k0(t){const e=Uc();t=Nt({size:Jo},t);const[n,i]=gt(t,["ref","style","children","size"]),r=()=>e.currentPlacement().split("-")[0],o=U0(e.contentRef),s=()=>o()?.getPropertyValue("background-color")||"none",a=()=>o()?.getPropertyValue(`border-${r()}-color`)||"none",u=()=>o()?.getPropertyValue(`border-${r()}-width`)||"0px",l=()=>parseInt(u())*2*(Jo/n.size),g=()=>`rotate(${z0[r()]} ${Yc} ${Yc})`;return L(Bt,it({as:"div",ref(M){const c=Vt(e.setArrowRef,n.ref);typeof c=="function"&&c(M)},"aria-hidden":"true",get style(){return{position:"absolute","font-size":`${n.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:s(),stroke:a(),"stroke-width":l(),...n.style}}},i,{get children(){const M=C0(),c=M.firstChild;return c.firstChild.nextSibling,re(()=>Pe(c,"transform",g())),M}}))}function U0(t){const[e,n]=K();return W(()=>{const i=t();i&&n(Lo(i).getComputedStyle(i))}),e}function _c(t){const e=Uc(),[n,i]=gt(t,["ref","style"]);return L(Bt,it({as:"div",ref(r){const o=Vt(e.setPositionerRef,n.ref);typeof o=="function"&&o(r)},"data-popper-positioner":"",get style(){return{position:"absolute",top:0,left:0,"min-width":"max-content",...n.style}}},i))}function kn(t){return t.split("-")[1]}function ts(t){return t==="y"?"height":"width"}function Be(t){return t.split("-")[0]}function Un(t){return["top","bottom"].includes(Be(t))?"x":"y"}function Pc(t,e,n){let{reference:i,floating:r}=t;const o=i.x+i.width/2-r.width/2,s=i.y+i.height/2-r.height/2,a=Un(e),u=ts(a),l=i[u]/2-r[u]/2,g=a==="x";let M;switch(Be(e)){case"top":M={x:o,y:i.y-r.height};break;case"bottom":M={x:o,y:i.y+i.height};break;case"right":M={x:i.x+i.width,y:s};break;case"left":M={x:i.x-r.width,y:s};break;default:M={x:i.x,y:i.y}}switch(kn(e)){case"start":M[a]-=l*(n&&g?-1:1);break;case"end":M[a]+=l*(n&&g?-1:1)}return M}const Y0=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:s}=n,a=o.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:g,y:M}=Pc(l,i,u),c=i,f={},d=0;for(let h=0;h<a.length;h++){const{name:y,fn:p}=a[h],{x:w,y:m,data:N,reset:T}=await p({x:g,y:M,initialPlacement:i,placement:c,strategy:r,middlewareData:f,rects:l,platform:s,elements:{reference:t,floating:e}});g=w??g,M=m??M,f={...f,[y]:{...f[y],...N}},T&&d<=50&&(d++,typeof T=="object"&&(T.placement&&(c=T.placement),T.rects&&(l=T.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):T.rects),{x:g,y:M}=Pc(l,c,u)),h=-1)}return{x:g,y:M,placement:c,strategy:r,middlewareData:f}};function sn(t,e){return typeof t=="function"?t(e):t}function Rc(t){return typeof t!="number"?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(t):{top:t,right:t,bottom:t,left:t}}function lr(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function hi(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:o,rects:s,elements:a,strategy:u}=t,{boundary:l="clippingAncestors",rootBoundary:g="viewport",elementContext:M="floating",altBoundary:c=!1,padding:f=0}=sn(e,t),d=Rc(f),h=a[c?M==="floating"?"reference":"floating":M],y=lr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(h)))==null||n?h:h.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:l,rootBoundary:g,strategy:u})),p=M==="floating"?{...s.floating,x:i,y:r}:s.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),m=await(o.isElement==null?void 0:o.isElement(w))&&await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1},N=lr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p,offsetParent:w,strategy:u}):p);return{top:(y.top-N.top+d.top)/m.y,bottom:(N.bottom-y.bottom+d.bottom)/m.y,left:(y.left-N.left+d.left)/m.x,right:(N.right-y.right+d.right)/m.x}}const fi=Math.min,an=Math.max;function es(t,e,n){return an(t,fi(e,n))}const _0=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:o,platform:s,elements:a}=e,{element:u,padding:l=0}=sn(t,e)||{};if(u==null)return{};const g=Rc(l),M={x:n,y:i},c=Un(r),f=ts(c),d=await s.getDimensions(u),h=c==="y",y=h?"top":"left",p=h?"bottom":"right",w=h?"clientHeight":"clientWidth",m=o.reference[f]+o.reference[c]-M[c]-o.floating[f],N=M[c]-o.reference[c],T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=T?T[w]:0;E&&await(s.isElement==null?void 0:s.isElement(T))||(E=a.floating[w]||o.floating[f]);const S=m/2-N/2,A=E/2-d[f]/2-1,P=fi(g[y],A),U=fi(g[p],A),Y=P,C=E-d[f]-U,D=E/2-d[f]/2+S,v=es(Y,D,C),O=kn(r)!=null&&D!=v&&o.reference[f]/2-(D<Y?P:U)-d[f]/2<0?D<Y?Y-D:C-D:0;return{[c]:M[c]-O,data:{[c]:v,centerOffset:D-v+O}}}}),Bc=["top","right","bottom","left"];Bc.reduce((t,e)=>t.concat(e,e+"-start",e+"-end"),[]);const P0={left:"right",right:"left",bottom:"top",top:"bottom"};function dr(t){return t.replace(/left|right|bottom|top/g,e=>P0[e])}function R0(t,e,n){n===void 0&&(n=!1);const i=kn(t),r=Un(t),o=ts(r);let s=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(s=dr(s)),{main:s,cross:dr(s)}}const B0={start:"end",end:"start"};function ns(t){return t.replace(/start|end/g,e=>B0[e])}const F0=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n;const{placement:i,middlewareData:r,rects:o,initialPlacement:s,platform:a,elements:u}=e,{mainAxis:l=!0,crossAxis:g=!0,fallbackPlacements:M,fallbackStrategy:c="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:d=!0,...h}=sn(t,e),y=Be(i),p=Be(s)===s,w=await(a.isRTL==null?void 0:a.isRTL(u.floating)),m=M||(p||!d?[dr(s)]:function(Y){const C=dr(Y);return[ns(Y),C,ns(C)]}(s));M||f==="none"||m.push(...function(Y,C,D,v){const O=kn(Y);let b=function(k,_,B){const Z=["left","right"],X=["right","left"],nt=["top","bottom"],pt=["bottom","top"];switch(k){case"top":case"bottom":return B?_?X:Z:_?Z:X;case"left":case"right":return _?nt:pt;default:return[]}}(Be(Y),D==="start",v);return O&&(b=b.map(k=>k+"-"+O),C&&(b=b.concat(b.map(ns)))),b}(s,d,f,w));const N=[s,...m],T=await hi(e,h),E=[];let S=((n=r.flip)==null?void 0:n.overflows)||[];if(l&&E.push(T[y]),g){const{main:Y,cross:C}=R0(i,o,w);E.push(T[Y],T[C])}if(S=[...S,{placement:i,overflows:E}],!E.every(Y=>Y<=0)){var A,P;const Y=(((A=r.flip)==null?void 0:A.index)||0)+1,C=N[Y];if(C)return{data:{index:Y,overflows:S},reset:{placement:C}};let D=(P=S.filter(v=>v.overflows[0]<=0).sort((v,O)=>v.overflows[1]-O.overflows[1])[0])==null?void 0:P.placement;if(!D)switch(c){case"bestFit":{var U;const v=(U=S.map(O=>[O.placement,O.overflows.filter(b=>b>0).reduce((b,k)=>b+k,0)]).sort((O,b)=>O[1]-b[1])[0])==null?void 0:U[0];v&&(D=v);break}case"initialPlacement":D=s}if(i!==D)return{reset:{placement:D}}}return{}}}};function Fc(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Hc(t){return Bc.some(e=>t[e]>=0)}const H0=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...r}=sn(t,e);switch(i){case"referenceHidden":{const o=Fc(await hi(e,{...r,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Hc(o)}}}case"escaped":{const o=Fc(await hi(e,{...r,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Hc(o)}}}default:return{}}}}},Q0=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:i}=e,r=await async function(o,s){const{placement:a,platform:u,elements:l}=o,g=await(u.isRTL==null?void 0:u.isRTL(l.floating)),M=Be(a),c=kn(a),f=Un(a)==="x",d=["left","top"].includes(M)?-1:1,h=g&&f?-1:1,y=sn(s,o);let{mainAxis:p,crossAxis:w,alignmentAxis:m}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return c&&typeof m=="number"&&(w=c==="end"?-1*m:m),f?{x:w*h,y:p*d}:{x:p*d,y:w*h}}(e,t);return{x:n+r.x,y:i+r.y,data:r}}}};function G0(t){return t==="x"?"y":"x"}const K0=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:p,y:w}=y;return{x:p,y:w}}},...u}=sn(t,e),l={x:n,y:i},g=await hi(e,u),M=Un(Be(r)),c=G0(M);let f=l[M],d=l[c];if(o){const y=M==="y"?"bottom":"right";f=es(f+g[M==="y"?"top":"left"],f,f-g[y])}if(s){const y=c==="y"?"bottom":"right";d=es(d+g[c==="y"?"top":"left"],d,d-g[y])}const h=a.fn({...e,[M]:f,[c]:d});return{...h,data:{x:h.x-n,y:h.y-i}}}}},$0=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:i,platform:r,elements:o}=e,{apply:s=()=>{},...a}=sn(t,e),u=await hi(e,a),l=Be(n),g=kn(n),M=Un(n)==="x",{width:c,height:f}=i.floating;let d,h;l==="top"||l==="bottom"?(d=l,h=g===(await(r.isRTL==null?void 0:r.isRTL(o.floating))?"start":"end")?"left":"right"):(h=l,d=g==="end"?"top":"bottom");const y=f-u[d],p=c-u[h],w=!e.middlewareData.shift;let m=y,N=p;if(M){const E=c-u.left-u.right;N=g||w?fi(p,E):E}else{const E=f-u.top-u.bottom;m=g||w?fi(y,E):E}if(w&&!g){const E=an(u.left,0),S=an(u.right,0),A=an(u.top,0),P=an(u.bottom,0);M?N=c-2*(E!==0||S!==0?E+S:an(u.left,u.right)):m=f-2*(A!==0||P!==0?A+P:an(u.top,u.bottom))}await s({...e,availableWidth:N,availableHeight:m});const T=await r.getDimensions(o.floating);return c!==T.width||f!==T.height?{reset:{rects:!0}}:{}}}};function Xt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Le(t){return Xt(t).getComputedStyle(t)}function Qc(t){return t instanceof Xt(t).Node}function Fe(t){return Qc(t)?(t.nodeName||"").toLowerCase():"#document"}function he(t){return t instanceof HTMLElement||t instanceof Xt(t).HTMLElement}function Gc(t){return typeof ShadowRoot<"u"&&(t instanceof Xt(t).ShadowRoot||t instanceof ShadowRoot)}function Mi(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=Le(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function V0(t){return["table","td","th"].includes(Fe(t))}function is(t){const e=rs(),n=Le(t);return n.transform!=="none"||n.perspective!=="none"||!!n.containerType&&n.containerType!=="normal"||!e&&!!n.backdropFilter&&n.backdropFilter!=="none"||!e&&!!n.filter&&n.filter!=="none"||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function rs(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function gr(t){return["html","body","#document"].includes(Fe(t))}const os=Math.min,Yn=Math.max,hr=Math.round,fr=Math.floor,He=t=>({x:t,y:t});function Kc(t){const e=Le(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=he(t),o=r?t.offsetWidth:n,s=r?t.offsetHeight:i,a=hr(n)!==o||hr(i)!==s;return a&&(n=o,i=s),{width:n,height:i,$:a}}function ve(t){return t instanceof Element||t instanceof Xt(t).Element}function ss(t){return ve(t)?t:t.contextElement}function _n(t){const e=ss(t);if(!he(e))return He(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:o}=Kc(e);let s=(o?hr(n.width):n.width)/i,a=(o?hr(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const W0=He(0);function $c(t){const e=Xt(t);return rs()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:W0}function un(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),o=ss(t);let s=He(1);e&&(i?ve(i)&&(s=_n(i)):s=_n(t));const a=function(c,f,d){return f===void 0&&(f=!1),!(!d||f&&d!==Xt(c))&&f}(o,n,i)?$c(o):He(0);let u=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,g=r.width/s.x,M=r.height/s.y;if(o){const c=Xt(o),f=i&&ve(i)?Xt(i):i;let d=c.frameElement;for(;d&&i&&f!==c;){const h=_n(d),y=d.getBoundingClientRect(),p=getComputedStyle(d),w=y.left+(d.clientLeft+parseFloat(p.paddingLeft))*h.x,m=y.top+(d.clientTop+parseFloat(p.paddingTop))*h.y;u*=h.x,l*=h.y,g*=h.x,M*=h.y,u+=w,l+=m,d=Xt(d).frameElement}}return lr({width:g,height:M,x:u,y:l})}function Mr(t){return ve(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ie(t){var e;return(e=(Qc(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Vc(t){return un(Ie(t)).left+Mr(t).scrollLeft}function Pn(t){if(Fe(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Gc(t)&&t.host||Ie(t);return Gc(e)?e.host:e}function Wc(t){const e=Pn(t);return gr(e)?t.ownerDocument?t.ownerDocument.body:t.body:he(e)&&Mi(e)?e:Wc(e)}function yr(t,e){var n;e===void 0&&(e=[]);const i=Wc(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),o=Xt(i);return r?e.concat(o,o.visualViewport||[],Mi(i)?i:[]):e.concat(i,yr(i))}function Zc(t,e,n){let i;if(e==="viewport")i=function(r,o){const s=Xt(r),a=Ie(r),u=s.visualViewport;let l=a.clientWidth,g=a.clientHeight,M=0,c=0;if(u){l=u.width,g=u.height;const f=rs();(!f||f&&o==="fixed")&&(M=u.offsetLeft,c=u.offsetTop)}return{width:l,height:g,x:M,y:c}}(t,n);else if(e==="document")i=function(r){const o=Ie(r),s=Mr(r),a=r.ownerDocument.body,u=Yn(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),l=Yn(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let g=-s.scrollLeft+Vc(r);const M=-s.scrollTop;return Le(a).direction==="rtl"&&(g+=Yn(o.clientWidth,a.clientWidth)-u),{width:u,height:l,x:g,y:M}}(Ie(t));else if(ve(e))i=function(r,o){const s=un(r,!0,o==="fixed"),a=s.top+r.clientTop,u=s.left+r.clientLeft,l=he(r)?_n(r):He(1);return{width:r.clientWidth*l.x,height:r.clientHeight*l.y,x:u*l.x,y:a*l.y}}(e,n);else{const r=$c(t);i={...e,x:e.x-r.x,y:e.y-r.y}}return lr(i)}function qc(t,e){const n=Pn(t);return!(n===e||!ve(n)||gr(n))&&(Le(n).position==="fixed"||qc(n,e))}function Z0(t,e,n){const i=he(e),r=Ie(e),o=n==="fixed",s=un(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const u=He(0);if(i||!i&&!o)if((Fe(e)!=="body"||Mi(r))&&(a=Mr(e)),he(e)){const l=un(e,!0,o,e);u.x=l.x+e.clientLeft,u.y=l.y+e.clientTop}else r&&(u.x=Vc(r));return{x:s.left+a.scrollLeft-u.x,y:s.top+a.scrollTop-u.y,width:s.width,height:s.height}}function Xc(t,e){return he(t)&&Le(t).position!=="fixed"?e?e(t):t.offsetParent:null}function Jc(t,e){const n=Xt(t);if(!he(t))return n;let i=Xc(t,e);for(;i&&V0(i)&&Le(i).position==="static";)i=Xc(i,e);return i&&(Fe(i)==="html"||Fe(i)==="body"&&Le(i).position==="static"&&!is(i))?n:i||function(r){let o=Pn(r);for(;he(o)&&!gr(o);){if(is(o))return o;o=Pn(o)}return null}(t)||n}const tl={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:i}=t;const r=he(n),o=Ie(n);if(n===o)return e;let s={scrollLeft:0,scrollTop:0},a=He(1);const u=He(0);if((r||!r&&i!=="fixed")&&((Fe(n)!=="body"||Mi(o))&&(s=Mr(n)),he(n))){const l=un(n);a=_n(n),u.x=l.x+n.clientLeft,u.y=l.y+n.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+u.x,y:e.y*a.y-s.scrollTop*a.y+u.y}},getDocumentElement:Ie,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?function(u,l){const g=l.get(u);if(g)return g;let M=yr(u).filter(h=>ve(h)&&Fe(h)!=="body"),c=null;const f=Le(u).position==="fixed";let d=f?Pn(u):u;for(;ve(d)&&!gr(d);){const h=Le(d),y=is(d);y||h.position!=="fixed"||(c=null),(f?!y&&!c:!y&&h.position==="static"&&c&&["absolute","fixed"].includes(c.position)||Mi(d)&&!y&&qc(u,d))?M=M.filter(p=>p!==d):c=h,d=Pn(d)}return l.set(u,M),M}(e,this._c):[].concat(n),i],s=o[0],a=o.reduce((u,l)=>{const g=Zc(e,l,r);return u.top=Yn(g.top,u.top),u.right=os(g.right,u.right),u.bottom=os(g.bottom,u.bottom),u.left=Yn(g.left,u.left),u},Zc(e,s,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Jc,getElementRects:async function(t){let{reference:e,floating:n,strategy:i}=t;const r=this.getOffsetParent||Jc,o=this.getDimensions;return{reference:Z0(e,await r(n),i),floating:{x:0,y:0,...await o(n)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Kc(t)},getScale:_n,isElement:ve,isRTL:function(t){return getComputedStyle(t).direction==="rtl"}};function q0(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,l=ss(t),g=r||o?[...l?yr(l):[],...yr(e)]:[];g.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const M=l&&a?function(y,p){let w,m=null;const N=Ie(y);function T(){clearTimeout(w),m&&m.disconnect(),m=null}return function E(S,A){S===void 0&&(S=!1),A===void 0&&(A=1),T();const{left:P,top:U,width:Y,height:C}=y.getBoundingClientRect();if(S||p(),!Y||!C)return;const D={rootMargin:-fr(U)+"px "+-fr(N.clientWidth-(P+Y))+"px "+-fr(N.clientHeight-(U+C))+"px "+-fr(P)+"px",threshold:Yn(0,os(1,A))||1};let v=!0;function O(b){const k=b[0].intersectionRatio;if(k!==A){if(!v)return E();k?E(!1,k):w=setTimeout(()=>{E(!1,1e-7)},100)}v=!1}try{m=new IntersectionObserver(O,{...D,root:N.ownerDocument})}catch{m=new IntersectionObserver(O,D)}m.observe(y)}(!0),T}(l,n):null;let c,f=-1,d=null;s&&(d=new ResizeObserver(y=>{let[p]=y;p&&p.target===l&&d&&(d.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{d&&d.observe(e)})),n()}),l&&!u&&d.observe(l),d.observe(e));let h=u?un(t):null;return u&&function y(){const p=un(t);!h||p.x===h.x&&p.y===h.y&&p.width===h.width&&p.height===h.height||n(),h=p,c=requestAnimationFrame(y)}(),n(),()=>{g.forEach(y=>{r&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),M&&M(),d&&d.disconnect(),d=null,u&&cancelAnimationFrame(c)}}const X0=(t,e,n)=>{const i=new Map,r={platform:tl,...n},o={...r.platform,_c:i};return Y0(t,e,{...r,platform:o})};function el(t){const{x:e=0,y:n=0,width:i=0,height:r=0}=t??{};if(typeof DOMRect=="function")return new DOMRect(e,n,i,r);const o={x:e,y:n,width:i,height:r,top:n,right:e+i,bottom:n+r,left:e};return{...o,toJSON:()=>o}}function J0(t,e){return{contextElement:t,getBoundingClientRect:()=>{const n=e(t);return n?el(n):t?t.getBoundingClientRect():el()}}}function ty(t){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(t)}const ey={top:"bottom",right:"left",bottom:"top",left:"right"};function ny(t,e){const[n,i]=t.split("-"),r=ey[n];return i?n==="left"||n==="right"?`${r} ${i==="start"?"top":"bottom"}`:i==="start"?`${r} ${e==="rtl"?"right":"left"}`:`${r} ${e==="rtl"?"left":"right"}`:`${r} center`}function nl(t){t=Nt({getAnchorRect:M=>M?.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},t);const[e,n]=K(),[i,r]=K(),[o,s]=K(t.placement),a=()=>J0(t.anchorRef(),t.getAnchorRect),{direction:u}=er();async function l(){const M=a(),c=e(),f=i();if(!M||!c)return;const d=(f?.clientHeight||0)/2,h=typeof t.gutter=="number"?t.gutter+d:t.gutter??d;c.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),M.getBoundingClientRect();const y=[Q0(({placement:T})=>{const E=!!T.split("-")[1];return{mainAxis:h,crossAxis:E?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const T=typeof t.flip=="string"?t.flip.split(" "):void 0;if(T!==void 0&&!T.every(ty))throw new Error("`flip` expects a spaced-delimited list of placements");y.push(F0({padding:t.overflowPadding,fallbackPlacements:T}))}(t.slide||t.overlap)&&y.push(K0({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),y.push($0({padding:t.overflowPadding,apply({availableWidth:T,availableHeight:E,rects:S}){const A=Math.round(S.reference.width);T=Math.floor(T),E=Math.floor(E),c.style.setProperty("--kb-popper-anchor-width",`${A}px`),c.style.setProperty("--kb-popper-content-available-width",`${T}px`),c.style.setProperty("--kb-popper-content-available-height",`${E}px`),t.sameWidth&&(c.style.width=`${A}px`),t.fitViewport&&(c.style.maxWidth=`${T}px`,c.style.maxHeight=`${E}px`)}})),t.hideWhenDetached&&y.push(H0({padding:t.detachedPadding})),f&&y.push(_0({element:f,padding:t.arrowPadding}));const p=await X0(M,c,{placement:t.placement,strategy:"absolute",middleware:y,platform:{...tl,isRTL:()=>u()==="rtl"}});if(s(p.placement),t.onCurrentPlacementChange?.(p.placement),!c)return;c.style.setProperty("--kb-popper-content-transform-origin",ny(p.placement,u()));const w=Math.round(p.x),m=Math.round(p.y);let N;if(t.hideWhenDetached&&(N=p.middlewareData.hide?.referenceHidden?"hidden":"visible"),Object.assign(c.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${m}px, 0)`,visibility:N}),f&&p.middlewareData.arrow){const{x:T,y:E}=p.middlewareData.arrow,S=p.placement.split("-")[0];Object.assign(f.style,{left:T!=null?`${T}px`:"",top:E!=null?`${E}px`:"",[S]:"100%"})}}W(()=>{const M=a(),c=e();if(!M||!c)return;const f=q0(M,c,l,{elementResize:typeof ResizeObserver=="function"});J(f)}),W(()=>{const M=e(),c=t.contentRef();!M||!c||queueMicrotask(()=>{M.style.zIndex=getComputedStyle(c).zIndex})});const g={currentPlacement:o,contentRef:()=>t.contentRef(),setPositionerRef:n,setArrowRef:r};return L(kc.Provider,{value:g,get children(){return t.children}})}const il=Kt();function iy(){const t=$t(il);if(t===void 0)throw new Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return t}const rl=Kt();function ol(){const t=$t(rl);if(t===void 0)throw new Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return t}function ry(t){let e;const n=iy(),i=`${n.generateId("item")}-${Sn()}`;t=Nt({id:i},t);const[r,o]=gt(t,["ref","item","aria-label","aria-labelledby","aria-describedby","onPointerMove","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[s,a]=K(),[u,l]=K(),g=()=>n.listState().selectionManager(),M=()=>g().focusedKey()===r.item.key,c=S0({key:()=>r.item.key,selectionManager:g,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>r.item.disabled},()=>e),f=()=>{if(g().selectionMode()!=="none")return c.isSelected()},d=G(()=>!(ui()&&Ef())),h=()=>d()?r["aria-label"]:void 0,y=()=>d()?s():void 0,p=()=>d()?u():void 0,w=()=>{if(!n.isVirtualized())return;const S=n.listState().collection().getItem(r.item.key)?.index;return S!=null?S+1:void 0},m=()=>{if(n.isVirtualized())return Hf(n.listState().collection())},N=S=>{St(S,r.onPointerMove),S.pointerType==="mouse"&&!c.isDisabled()&&n.shouldFocusOnHover()&&(xt(S.currentTarget),g().setFocused(!0),g().setFocusedKey(r.item.key))},T=G(()=>({"data-disabled":c.isDisabled()?"":void 0,"data-selected":c.isSelected()?"":void 0,"data-highlighted":M()?"":void 0})),E={isSelected:c.isSelected,dataset:T,generateId:In(()=>o.id),registerLabelId:qt(a),registerDescriptionId:qt(l)};return L(rl.Provider,{value:E,get children(){return L(Bt,it({as:"li",ref(S){const A=Vt(P=>e=P,r.ref);typeof A=="function"&&A(S)},role:"option",get tabIndex(){return c.tabIndex()},get"aria-disabled"(){return c.isDisabled()},get"aria-selected"(){return f()},get"aria-label"(){return h()},get"aria-labelledby"(){return y()},get"aria-describedby"(){return p()},get"aria-posinset"(){return w()},get"aria-setsize"(){return m()},get"data-key"(){return c.dataKey()},get onPointerDown(){return ae([r.onPointerDown,c.onPointerDown])},get onPointerUp(){return ae([r.onPointerUp,c.onPointerUp])},get onClick(){return ae([r.onClick,c.onClick])},get onKeyDown(){return ae([r.onKeyDown,c.onKeyDown])},get onMouseDown(){return ae([r.onMouseDown,c.onMouseDown])},get onFocus(){return ae([r.onFocus,c.onFocus])},onPointerMove:N},T,o))}})}function oy(t){const e=ol();t=Nt({id:e.generateId("indicator")},t);const[n,i]=gt(t,["forceMount"]);return L(Lt,{get when(){return n.forceMount||e.isSelected()},get children(){return L(Bt,it({as:"div","aria-hidden":"true"},()=>e.dataset(),i))}})}function sy(t){const e=ol();t=Nt({id:e.generateId("label")},t);const[n,i]=gt(t,["id"]);return W(()=>J(e.registerLabelId(n.id))),L(Bt,it({as:"div",get id(){return n.id}},()=>e.dataset(),i))}function ay(t){let e;const n=`listbox-${Sn()}`;t=Nt({id:n,selectionMode:"single",virtualized:!1},t);const[i,r]=gt(t,["ref","children","renderItem","renderSection","value","defaultValue","onChange","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","state","keyboardDelegate","autoFocus","selectionMode","shouldFocusWrap","shouldUseVirtualFocus","shouldSelectOnPressUp","shouldFocusOnHover","allowDuplicateSelectionEvents","disallowEmptySelection","selectionBehavior","selectOnFocus","disallowTypeAhead","allowsTabNavigation","virtualized","scrollToItem","scrollRef","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),o=G(()=>i.state?i.state:xc({selectedKeys:()=>i.value,defaultSelectedKeys:()=>i.defaultValue,onSelectionChange:i.onChange,allowDuplicateSelectionEvents:()=>j(i.allowDuplicateSelectionEvents),disallowEmptySelection:()=>j(i.disallowEmptySelection),selectionBehavior:()=>j(i.selectionBehavior),selectionMode:()=>j(i.selectionMode),dataSource:()=>i.options??[],getKey:()=>i.optionValue,getTextValue:()=>i.optionTextValue,getDisabled:()=>i.optionDisabled,getSectionChildren:()=>i.optionGroupChildren})),s=b0({selectionManager:()=>o().selectionManager(),collection:()=>o().collection(),autoFocus:()=>j(i.autoFocus),shouldFocusWrap:()=>j(i.shouldFocusWrap),keyboardDelegate:()=>i.keyboardDelegate,disallowEmptySelection:()=>j(i.disallowEmptySelection),selectOnFocus:()=>j(i.selectOnFocus),disallowTypeAhead:()=>j(i.disallowTypeAhead),shouldUseVirtualFocus:()=>j(i.shouldUseVirtualFocus),allowsTabNavigation:()=>j(i.allowsTabNavigation),isVirtualized:()=>i.virtualized,scrollToKey:()=>i.scrollToItem},()=>e,()=>i.scrollRef?.()),a={listState:o,generateId:In(()=>r.id),shouldUseVirtualFocus:()=>t.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>t.shouldSelectOnPressUp,shouldFocusOnHover:()=>t.shouldFocusOnHover,isVirtualized:()=>i.virtualized};return L(il.Provider,{value:a,get children(){return L(Bt,it({as:"ul",ref(u){const l=Vt(g=>e=g,i.ref);typeof l=="function"&&l(u)},role:"listbox",get tabIndex(){return s.tabIndex()},get"aria-multiselectable"(){return o().selectionManager().selectionMode()==="multiple"?!0:void 0},get onKeyDown(){return ae([i.onKeyDown,s.onKeyDown])},get onMouseDown(){return ae([i.onMouseDown,s.onMouseDown])},get onFocusIn(){return ae([i.onFocusIn,s.onFocusIn])},get onFocusOut(){return ae([i.onFocusOut,s.onFocusOut])}},r,{get children(){return L(Lt,{get when(){return!i.virtualized},get fallback(){return i.children?.(o().collection)},get children(){return L(ff,{get each(){return[...o().collection()]},by:"key",children:u=>L(uo,{get children(){return[L(Ae,{get when(){return u().type==="section"},get children(){return i.renderSection?.(u())}}),L(Ae,{get when(){return u().type==="item"},get children(){return i.renderItem?.(u())}})]}})})}})}}))}})}const sl=Kt();function Rn(){const t=$t(sl);if(t===void 0)throw new Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return t}function uy(t){let e;const n=Rn(),[i,r]=gt(t,["ref","id","style","onCloseAutoFocus","onFocusOutside"]),o=a=>{n.close()},s=a=>{i.onFocusOutside?.(a),n.isOpen()&&n.isModal()&&a.preventDefault()};return Qu({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>e?[e]:[]}),Vu({ownerRef:()=>e,isDisabled:()=>!(n.isOpen()&&(n.isModal()||n.preventScroll()))}),Hu({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:a=>{a.preventDefault()},onUnmountAutoFocus:a=>{i.onCloseAutoFocus?.(a),a.defaultPrevented||(xt(n.triggerRef()),a.preventDefault())}},()=>e),L(Lt,{get when(){return n.contentPresence.isPresent()},get children(){return L(_c,{get children(){return L(qo,it({ref(a){const u=Vt(l=>{n.setContentRef(l),n.contentPresence.setRef(l),e=l},i.ref);typeof u=="function"&&u(a)},get disableOutsidePointerEvents(){return G(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return{"--kb-select-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...i.style}},onEscapeKeyDown:o,onFocusOutside:s,get onDismiss(){return n.close}},()=>n.dataset(),r))}})}})}function cy(t){const e=Rn();return t=Nt({children:"▼"},t),L(Bt,it({as:"span","aria-hidden":"true"},()=>e.dataset(),t))}function ly(t){const e=Rn();t=Nt({id:e.generateId("listbox")},t);const[n,i]=gt(t,["ref","id","onKeyDown"]);return W(()=>J(e.registerListboxId(n.id))),L(ay,it({ref(r){const o=Vt(e.setListboxRef,n.ref);typeof o=="function"&&o(r)},get id(){return n.id},get state(){return e.listState()},get virtualized(){return e.isVirtualized()},get autoFocus(){return e.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return e.shouldFocusWrap()},get disallowTypeAhead(){return e.disallowTypeAhead()},get"aria-labelledby"(){return e.listboxAriaLabelledBy()},get renderItem(){return e.renderItem},get renderSection(){return e.renderSection},onKeyDown:r=>{St(r,n.onKeyDown),r.key==="Escape"&&e.isMultiple()&&r.preventDefault()}},i))}function dy(t){const e=Rn();return L(Lt,{get when(){return e.contentPresence.isPresent()},get children(){return L(lo,t)}})}function gy(t){const e=`select-${Sn()}`;t=Nt({id:e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1,preventScroll:!1},t);const[n,i,r,o]=gt(t,["itemComponent","sectionComponent","open","defaultOpen","onOpenChange","value","defaultValue","onChange","placeholder","options","optionValue","optionTextValue","optionDisabled","optionGroupChildren","keyboardDelegate","allowDuplicateSelectionEvents","disallowEmptySelection","disallowTypeAhead","shouldFocusWrap","selectionBehavior","selectionMode","virtualized","modal","preventScroll","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"],lM),[s,a]=K(),[u,l]=K(),[g,M]=K(),[c,f]=K(),[d,h]=K(),[y,p]=K(),[w,m]=K(),[N,T]=K(!0),E=H=>{const at=n.optionValue;return at==null?String(H):String(Zi(at)?at(H):H[at])},S=G(()=>{const H=n.optionGroupChildren;return H==null?n.options:Zi(H)?n.options.flatMap(at=>H(at)??at):n.options.flatMap(at=>at[H]??at)}),A=G(()=>S().map(H=>E(H))),P=H=>[...H].map(at=>S().find(lt=>E(lt)===at)).filter(at=>at!=null),U=bo({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:H=>n.onOpenChange?.(H)}),Y=xc({selectedKeys:()=>n.value&&n.value.map(E),defaultSelectedKeys:()=>n.defaultValue&&n.defaultValue.map(E),onSelectionChange:H=>{n.onChange?.(P(H)),n.selectionMode==="single"&&k()},allowDuplicateSelectionEvents:()=>j(n.allowDuplicateSelectionEvents),disallowEmptySelection:()=>j(n.disallowEmptySelection),selectionBehavior:()=>j(n.selectionBehavior),selectionMode:()=>n.selectionMode,dataSource:()=>n.options??[],getKey:()=>n.optionValue,getTextValue:()=>n.optionTextValue,getDisabled:()=>n.optionDisabled,getSectionChildren:()=>n.optionGroupChildren}),C=G(()=>P(Y.selectionManager().selectedKeys())),D=H=>{Y.selectionManager().toggleSelection(E(H))},v=Ji(()=>n.forceMount||U.isOpen()),O=()=>{const H=y();H&&xt(H)},b=H=>{if(n.options.length<=0)return;T(H),U.open();let at=Y.selectionManager().firstSelectedKey();at==null&&(H==="first"?at=Y.collection().getFirstKey():H==="last"&&(at=Y.collection().getLastKey())),O(),Y.selectionManager().setFocused(!0),Y.selectionManager().setFocusedKey(at)},k=()=>{U.close(),Y.selectionManager().setFocused(!1),Y.selectionManager().setFocusedKey(void 0)},_=H=>{U.isOpen()?k():b(H)},{formControlContext:B}=dM(r);tM(c,()=>{const H=n.defaultValue?[...n.defaultValue].map(E):new ce;Y.selectionManager().setSelectedKeys(H)});const Z=ec({usage:"search",sensitivity:"base"}),X=G(()=>j(n.keyboardDelegate)||new Oc(Y.collection,void 0,Z)),nt=H=>n.itemComponent?.({item:H}),pt=H=>n.sectionComponent?.({section:H});W(ge([A],([H])=>{const at=[...Y.selectionManager().selectedKeys()].filter(lt=>H.includes(lt));Y.selectionManager().setSelectedKeys(at)},{defer:!0}));const te=G(()=>({"data-expanded":U.isOpen()?"":void 0,"data-closed":U.isOpen()?void 0:""})),Ct={dataset:te,isOpen:U.isOpen,isDisabled:()=>B.isDisabled()??!1,isMultiple:()=>j(n.selectionMode)==="multiple",isVirtualized:()=>n.virtualized??!1,isModal:()=>n.modal??!1,preventScroll:()=>n.preventScroll??!1,disallowTypeAhead:()=>n.disallowTypeAhead??!1,shouldFocusWrap:()=>n.shouldFocusWrap??!1,selectedOptions:C,contentPresence:v,autoFocus:N,triggerRef:c,listState:()=>Y,keyboardDelegate:X,triggerId:s,valueId:u,listboxId:g,listboxAriaLabelledBy:w,setListboxAriaLabelledBy:m,setTriggerRef:f,setContentRef:h,setListboxRef:p,open:b,close:k,toggle:_,placeholder:()=>n.placeholder,renderItem:nt,renderSection:pt,removeOptionFromSelection:D,generateId:In(()=>j(r.id)),registerTriggerId:qt(a),registerValueId:qt(l),registerListboxId:qt(M)};return L(Zu.Provider,{value:B,get children(){return L(sl.Provider,{value:Ct,get children(){return L(nl,it({anchorRef:c,contentRef:d},i,{get children(){return L(Bt,it({as:"div",role:"group",get id(){return j(r.id)}},()=>B.dataset(),te,o))}}))}})}})}function hy(t){const[e,n]=gt(t,["value","defaultValue","onChange","multiple"]),i=G(()=>{if(e.value!=null)return e.multiple?e.value:[e.value]}),r=G(()=>{if(e.defaultValue!=null)return e.multiple?e.defaultValue:[e.defaultValue]});return L(gy,it({get value(){return i()},get defaultValue(){return r()},onChange:o=>{e.onChange?.(e.multiple?o:o[0])},get selectionMode(){return e.multiple?"multiple":"single"},get disallowEmptySelection(){return!e.multiple}},n))}function fy(t){const e=Oo(),n=Rn();t=Nt({id:n.generateId("trigger")},t);const[i,r,o]=gt(t,["ref","disabled","onPointerDown","onClick","onKeyDown","onFocus","onBlur"],gM),s=()=>n.listState().selectionManager(),a=()=>n.keyboardDelegate(),u=()=>i.disabled||n.isDisabled(),{fieldProps:l}=hM(r),{typeSelectHandlers:g}=vc({keyboardDelegate:a,selectionManager:s,onTypeSelect:p=>s().select(p)}),M=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(" ")||void 0,c=p=>{St(p,i.onPointerDown),p.currentTarget.dataset.pointerType=p.pointerType,!u()&&p.pointerType!=="touch"&&p.button===0&&(p.preventDefault(),n.toggle(!0))},f=p=>{St(p,i.onClick),!u()&&p.currentTarget.dataset.pointerType==="touch"&&n.toggle(!0)},d=p=>{if(St(p,i.onKeyDown),!u())switch(St(p,g.onKeyDown),p.key){case"Enter":case" ":case"ArrowDown":p.stopPropagation(),p.preventDefault(),n.toggle("first");break;case"ArrowUp":p.stopPropagation(),p.preventDefault(),n.toggle("last");break;case"ArrowLeft":{if(p.preventDefault(),n.isMultiple())return;const w=s().firstSelectedKey(),m=w!=null?a().getKeyAbove?.(w):a().getFirstKey?.();m!=null&&s().select(m);break}case"ArrowRight":{if(p.preventDefault(),n.isMultiple())return;const w=s().firstSelectedKey(),m=w!=null?a().getKeyBelow?.(w):a().getFirstKey?.();m!=null&&s().select(m);break}}},h=p=>{St(p,i.onFocus),!s().isFocused()&&s().setFocused(!0)},y=p=>{St(p,i.onBlur),!n.isOpen()&&s().setFocused(!1)};return W(()=>J(n.registerTriggerId(l.id()))),W(()=>{n.setListboxAriaLabelledBy([l.ariaLabelledBy(),l.ariaLabel()&&!l.ariaLabelledBy()?l.id():null].filter(Boolean).join(" ")||void 0)}),L(sr,it({ref(p){const w=Vt(n.setTriggerRef,i.ref);typeof w=="function"&&w(p)},get id(){return l.id()},get disabled(){return u()},"aria-haspopup":"listbox",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return G(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return l.ariaLabel()},get"aria-labelledby"(){return M()},get"aria-describedby"(){return l.ariaDescribedBy()},onPointerDown:c,onClick:f,onKeyDown:d,onFocus:h,onBlur:y},()=>n.dataset(),()=>e.dataset(),o))}const My=ut("<span>");function yy(t){const e=Oo(),n=Rn();t=Nt({id:n.generateId("value")},t);const[i,r]=gt(t,["id","children"]),o=()=>n.listState().selectionManager(),s=()=>{const a=o().selectedKeys();return a.size===1&&a.has("")?!0:o().isEmpty()};return W(()=>J(n.registerValueId(i.id))),(()=>{const a=My();return Rt(a,it({get id(){return i.id},get"data-placeholder-shown"(){return s()?"":void 0}},()=>e.dataset(),r),!1,!0),q(a,L(Lt,{get when(){return!s()},get fallback(){return n.placeholder()},get children(){return L(py,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:u=>n.removeOptionFromSelection(u),clear:()=>o().clearSelection()},get children(){return i.children}})}})),a})()}function py(t){const e=Hi(()=>{const n=t.children;return Zi(n)?n(t.state):n});return G(e)}const al=Kt();function as(){const t=$t(al);if(t===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return t}function my(t){const e=as();t=Nt({id:e.generateId("content")},t);const[n,i]=gt(t,["ref","style"]);return W(()=>J(e.registerContentId(i.id))),L(Lt,{get when(){return e.contentPresence.isPresent()},get children(){return L(_c,{get children(){return L(qo,it({ref(r){const o=Vt(s=>{e.setContentRef(s),e.contentPresence.setRef(s)},n.ref);typeof o=="function"&&o(r)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return{"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative",...n.style}},onFocusOutside:r=>r.preventDefault(),onDismiss:()=>e.hideTooltip(!0)},()=>e.dataset(),i))}})}})}function Ny(t){const e=as();return L(Lt,{get when(){return e.contentPresence.isPresent()},get children(){return L(lo,t)}})}/*!
|
|
216
221
|
* Portions of this file are based on code from ariakit.
|
|
217
222
|
* MIT Licensed, Copyright (c) Diego Haz.
|
|
218
223
|
*
|
|
219
224
|
* Credits to the Ariakit team:
|
|
220
225
|
* https://github.com/ariakit/ariakit/blob/84e97943ad637a582c01c9b56d880cd95f595737/packages/ariakit/src/hovercard/__utils/polygon.ts
|
|
221
226
|
* https://github.com/ariakit/ariakit/blob/f2a96973de523d67e41eec983263936c489ef3e2/packages/ariakit/src/hovercard/__utils/debug-polygon.ts
|
|
222
|
-
*/function
|
|
227
|
+
*/function wy(t,e,n){const i=t.split("-")[0],r=e.getBoundingClientRect(),o=n.getBoundingClientRect(),s=[],a=r.left+r.width/2,u=r.top+r.height/2;switch(i){case"top":s.push([r.left,u]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([r.right,u]);break;case"right":s.push([a,r.top]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([a,r.bottom]);break;case"bottom":s.push([r.left,u]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([o.right,o.top]),s.push([r.right,u]);break;case"left":s.push([a,r.top]),s.push([o.right,o.top]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([a,r.bottom]);break}return s}const cn={};let Ly=0,Bn=!1,xe,yi;function Ty(t){const e=`tooltip-${Sn()}`,n=`${++Ly}`;t=Nt({id:e,openDelay:700,closeDelay:300},t);const[i,r]=gt(t,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","ignoreSafeArea","forceMount"]);let o;const[s,a]=K(),[u,l]=K(),[g,M]=K(),[c,f]=K(r.placement),d=bo({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:C=>i.onOpenChange?.(C)}),h=Ji(()=>i.forceMount||d.isOpen()),y=()=>{cn[n]=w},p=()=>{for(const C in cn)C!==n&&(cn[C](!0),delete cn[C])},w=(C=!1)=>{C||i.closeDelay&&i.closeDelay<=0?(window.clearTimeout(o),o=void 0,d.close()):o||(o=window.setTimeout(()=>{o=void 0,d.close()},i.closeDelay)),window.clearTimeout(xe),xe=void 0,Bn&&(window.clearTimeout(yi),yi=window.setTimeout(()=>{delete cn[n],yi=void 0,Bn=!1},i.closeDelay))},m=()=>{clearTimeout(o),o=void 0,p(),y(),Bn=!0,d.open(),window.clearTimeout(xe),xe=void 0,window.clearTimeout(yi),yi=void 0},N=()=>{p(),y(),!d.isOpen()&&!xe&&!Bn?xe=window.setTimeout(()=>{xe=void 0,Bn=!0,m()},i.openDelay):d.isOpen()||m()},T=(C=!1)=>{!C&&i.openDelay&&i.openDelay>0&&!o?N():m()},E=()=>{window.clearTimeout(xe),xe=void 0,Bn=!1},S=()=>{window.clearTimeout(o),o=void 0},A=C=>se(u(),C)||se(g(),C),P=C=>{const D=u(),v=g();if(!(!D||!v))return wy(C,D,v)},U=C=>{const D=C.target;if(A(D)){S();return}if(!i.ignoreSafeArea){const v=P(c());if(v&&Rf(Pf(C),v)){S();return}}o||w()};W(()=>{if(!d.isOpen())return;const C=Wt();C.addEventListener("pointermove",U,!0),J(()=>{C.removeEventListener("pointermove",U,!0)})}),W(()=>{const C=u();if(!C||!d.isOpen())return;const D=O=>{const b=O.target;se(b,C)&&w(!0)},v=Lo();v.addEventListener("scroll",D,{capture:!0}),J(()=>{v.removeEventListener("scroll",D,{capture:!0})})}),J(()=>{clearTimeout(o),cn[n]&&delete cn[n]});const Y={dataset:G(()=>({"data-expanded":d.isOpen()?"":void 0,"data-closed":d.isOpen()?void 0:""})),isOpen:d.isOpen,isDisabled:()=>i.disabled??!1,triggerOnFocusOnly:()=>i.triggerOnFocusOnly??!1,contentId:s,contentPresence:h,openTooltip:T,hideTooltip:w,cancelOpening:E,generateId:In(()=>t.id),registerContentId:qt(a),isTargetOnTooltip:A,setTriggerRef:l,setContentRef:M};return L(al.Provider,{value:Y,get children(){return L(nl,it({anchorRef:u,contentRef:g,onCurrentPlacementChange:f},r))}})}function jy(t){let e;const n=as(),[i,r]=gt(t,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur","onTouchStart"]);let o=!1,s=!1,a=!1;const u=()=>{o=!1},l=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},g=p=>{n.isOpen()&&!s&&!a&&n.hideTooltip(p)},M=p=>{St(p,i.onPointerEnter),!(p.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||p.defaultPrevented)&&(s=!0,l())},c=p=>{St(p,i.onPointerLeave),p.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?g():n.cancelOpening())},f=p=>{St(p,i.onPointerDown),o=!0,Wt(e).addEventListener("pointerup",u,{once:!0})},d=p=>{St(p,i.onClick),s=!1,a=!1,g(!0)},h=p=>{St(p,i.onFocus),!(n.isDisabled()||p.defaultPrevented||o)&&(a=!0,l())},y=p=>{St(p,i.onBlur);const w=p.relatedTarget;n.isTargetOnTooltip(w)||(s=!1,a=!1,g(!0))};return J(()=>{Wt(e).removeEventListener("pointerup",u)}),L(Bt,it({as:"button",ref(p){const w=Vt(m=>{n.setTriggerRef(m),e=m},i.ref);typeof w=="function"&&w(p)},get"aria-describedby"(){return G(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:M,onPointerLeave:c,onPointerDown:f,onClick:d,onFocus:h,onBlur:y},()=>n.dataset(),r))}/**
|
|
223
228
|
* @license
|
|
224
229
|
* Copyright 2019 Google LLC
|
|
225
230
|
* SPDX-License-Identifier: Apache-2.0
|
|
226
|
-
*/const al=Symbol("Comlink.proxy"),my=Symbol("Comlink.endpoint"),Ny=Symbol("Comlink.releaseProxy"),ca=Symbol("Comlink.finalizer"),Nr=Symbol("Comlink.thrown"),sl=t=>typeof t=="object"&&t!==null||typeof t=="function",wy={canHandle:t=>sl(t)&&t[al],serialize(t){const{port1:e,port2:n}=new MessageChannel;return cl(t,e),[n,[n]]},deserialize(t){return t.start(),dl(t)}},Ly={canHandle:t=>sl(t)&&Nr in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},ul=new Map([["proxy",wy],["throw",Ly]]);function Ty(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function cl(t,e=globalThis,n=["*"]){e.addEventListener("message",function i(r){if(!r||!r.data)return;if(!Ty(n,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:o,type:a,path:s}=Object.assign({path:[]},r.data),u=(r.data.argumentList||[]).map(mn);let l;try{const g=s.slice(0,-1).reduce((c,f)=>c[f],t),M=s.reduce((c,f)=>c[f],t);switch(a){case"GET":l=M;break;case"SET":g[s.slice(-1)[0]]=mn(r.data.value),l=!0;break;case"APPLY":l=M.apply(g,u);break;case"CONSTRUCT":{const c=new M(...u);l=Ay(c)}break;case"ENDPOINT":{const{port1:c,port2:f}=new MessageChannel;cl(t,f),l=Ml(c,[c])}break;case"RELEASE":l=void 0;break;default:return}}catch(g){l={value:g,[Nr]:0}}Promise.resolve(l).catch(g=>({value:g,[Nr]:0})).then(g=>{const[M,c]=jr(g);e.postMessage(Object.assign(Object.assign({},M),{id:o}),c),a==="RELEASE"&&(e.removeEventListener("message",i),ll(e),ca in t&&typeof t[ca]=="function"&&t[ca]())}).catch(g=>{const[M,c]=jr({value:new TypeError("Unserializable return value"),[Nr]:0});e.postMessage(Object.assign(Object.assign({},M),{id:o}),c)})}),e.start&&e.start()}function jy(t){return t.constructor.name==="MessagePort"}function ll(t){jy(t)&&t.close()}function dl(t,e){return la(t,[],e)}function wr(t){if(t)throw new Error("Proxy has been released and is not useable")}function gl(t){return $n(t,{type:"RELEASE"}).then(()=>{ll(t)})}const Lr=new WeakMap,Tr="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(Lr.get(t)||0)-1;Lr.set(t,e),e===0&&gl(t)});function Ey(t,e){const n=(Lr.get(e)||0)+1;Lr.set(e,n),Tr&&Tr.register(t,e,t)}function Sy(t){Tr&&Tr.unregister(t)}function la(t,e=[],n=function(){}){let i=!1;const r=new Proxy(n,{get(o,a){if(wr(i),a===Ny)return()=>{Sy(r),gl(t),i=!0};if(a==="then"){if(e.length===0)return{then:()=>r};const s=$n(t,{type:"GET",path:e.map(u=>u.toString())}).then(mn);return s.then.bind(s)}return la(t,[...e,a])},set(o,a,s){wr(i);const[u,l]=jr(s);return $n(t,{type:"SET",path:[...e,a].map(g=>g.toString()),value:u},l).then(mn)},apply(o,a,s){wr(i);const u=e[e.length-1];if(u===my)return $n(t,{type:"ENDPOINT"}).then(mn);if(u==="bind")return la(t,e.slice(0,-1));const[l,g]=hl(s);return $n(t,{type:"APPLY",path:e.map(M=>M.toString()),argumentList:l},g).then(mn)},construct(o,a){wr(i);const[s,u]=hl(a);return $n(t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:s},u).then(mn)}});return Ey(r,t),r}function by(t){return Array.prototype.concat.apply([],t)}function hl(t){const e=t.map(jr);return[e.map(n=>n[0]),by(e.map(n=>n[1]))]}const fl=new WeakMap;function Ml(t,e){return fl.set(t,e),t}function Ay(t){return Object.assign(t,{[al]:!0})}function jr(t){for(const[e,n]of ul)if(n.canHandle(t)){const[i,r]=n.serialize(t);return[{type:"HANDLER",name:e,value:i},r]}return[{type:"RAW",value:t},fl.get(t)||[]]}function mn(t){switch(t.type){case"HANDLER":return ul.get(t.name).deserialize(t.value);case"RAW":return t.value}}function $n(t,e,n){return new Promise(i=>{const r=vy();t.addEventListener("message",function o(a){!a.data||!a.data.id||a.data.id!==r||(t.removeEventListener("message",o),i(a.data))}),t.start&&t.start(),t.postMessage(Object.assign({id:r},e),n)})}function vy(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var yl=(t=>(t[t.Invalid=0]="Invalid",t[t.RequiresServerPermission=1]="RequiresServerPermission",t[t.Valid=2]="Valid",t))(yl||{}),pl=(t=>(t[t.Ok=0]="Ok",t[t.NetworkError=1]="NetworkError",t[t.RemoteLock=2]="RemoteLock",t[t.PermissionExpired=3]="PermissionExpired",t[t.PayloadCorrupted=4]="PayloadCorrupted",t[t.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",t[t.IncorrectTokenState=6]="IncorrectTokenState",t))(pl||{});(function(t){/**
|
|
227
|
-
|
|
228
|
-
* Copyright 2019 Google LLC
|
|
229
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
230
|
-
*/const e=Symbol("Comlink.proxy"),n=Symbol("Comlink.endpoint"),i=Symbol("Comlink.releaseProxy"),r=Symbol("Comlink.finalizer"),o=Symbol("Comlink.thrown"),a=L=>typeof L=="object"&&L!==null||typeof L=="function",s={canHandle:L=>a(L)&&L[e],serialize(L){const{port1:A,port2:G}=new MessageChannel;return M(L,A),[G,[G]]},deserialize(L){return L.start(),d(L)}},u={canHandle:L=>a(L)&&o in L,serialize({value:L}){let A;return L instanceof Error?A={isError:!0,value:{message:L.message,name:L.name,stack:L.stack}}:A={isError:!1,value:L},[A,[]]},deserialize(L){throw L.isError?Object.assign(new Error(L.value.message),L.value):L.value}},l=new Map([["proxy",s],["throw",u]]);function g(L,A){for(const G of L)if(A===G||G==="*"||G instanceof RegExp&&G.test(A))return!0;return!1}function M(L,A=globalThis,G=["*"]){A.addEventListener("message",function rt(W){if(!W||!W.data)return;if(!g(G,W.origin)){console.warn(`Invalid origin '${W.origin}' for comlink proxy`);return}const{id:At,type:X,path:ft}=Object.assign({path:[]},W.data),jt=(W.data.argumentList||[]).map(C);let dt;try{const Mt=ft.slice(0,-1).reduce((at,Ct)=>at[Ct],L),nt=ft.reduce((at,Ct)=>at[Ct],L);switch(X){case"GET":dt=nt;break;case"SET":Mt[ft.slice(-1)[0]]=C(W.data.value),dt=!0;break;case"APPLY":dt=nt.apply(Mt,jt);break;case"CONSTRUCT":{const at=new nt(...jt);dt=Y(at)}break;case"ENDPOINT":{const{port1:at,port2:Ct}=new MessageChannel;M(L,Ct),dt=F(at,[at])}break;case"RELEASE":dt=void 0;break;default:return}}catch(Mt){dt={value:Mt,[o]:0}}Promise.resolve(dt).catch(Mt=>({value:Mt,[o]:0})).then(Mt=>{const[nt,at]=U(Mt);A.postMessage(Object.assign(Object.assign({},nt),{id:At}),at),X==="RELEASE"&&(A.removeEventListener("message",rt),f(A),r in L&&typeof L[r]=="function"&&L[r]())}).catch(Mt=>{const[nt,at]=U({value:new TypeError("Unserializable return value"),[o]:0});A.postMessage(Object.assign(Object.assign({},nt),{id:At}),at)})}),A.start&&A.start()}function c(L){return L.constructor.name==="MessagePort"}function f(L){c(L)&&L.close()}function d(L,A){return j(L,[],A)}function h(L){if(L)throw new Error("Proxy has been released and is not useable")}function y(L){return I(L,{type:"RELEASE"}).then(()=>{f(L)})}const p=new WeakMap,w="FinalizationRegistry"in globalThis&&new FinalizationRegistry(L=>{const A=(p.get(L)||0)-1;p.set(L,A),A===0&&y(L)});function m(L,A){const G=(p.get(A)||0)+1;p.set(A,G),w&&w.register(L,A,L)}function N(L){w&&w.unregister(L)}function j(L,A=[],G=function(){}){let rt=!1;const W=new Proxy(G,{get(At,X){if(h(rt),X===i)return()=>{N(W),y(L),rt=!0};if(X==="then"){if(A.length===0)return{then:()=>W};const ft=I(L,{type:"GET",path:A.map(jt=>jt.toString())}).then(C);return ft.then.bind(ft)}return j(L,[...A,X])},set(At,X,ft){h(rt);const[jt,dt]=U(ft);return I(L,{type:"SET",path:[...A,X].map(Mt=>Mt.toString()),value:jt},dt).then(C)},apply(At,X,ft){h(rt);const jt=A[A.length-1];if(jt===n)return I(L,{type:"ENDPOINT"}).then(C);if(jt==="bind")return j(L,A.slice(0,-1));const[dt,Mt]=S(ft);return I(L,{type:"APPLY",path:A.map(nt=>nt.toString()),argumentList:dt},Mt).then(C)},construct(At,X){h(rt);const[ft,jt]=S(X);return I(L,{type:"CONSTRUCT",path:A.map(dt=>dt.toString()),argumentList:ft},jt).then(C)}});return m(W,L),W}function b(L){return Array.prototype.concat.apply([],L)}function S(L){const A=L.map(U);return[A.map(G=>G[0]),b(A.map(G=>G[1]))]}const v=new WeakMap;function F(L,A){return v.set(L,A),L}function Y(L){return Object.assign(L,{[e]:!0})}function U(L){for(const[A,G]of l)if(G.canHandle(L)){const[rt,W]=G.serialize(L);return[{type:"HANDLER",name:A,value:rt},W]}return[{type:"RAW",value:L},v.get(L)||[]]}function C(L){switch(L.type){case"HANDLER":return l.get(L.name).deserialize(L.value);case"RAW":return L.value}}function I(L,A,G){return new Promise(rt=>{const W=x();L.addEventListener("message",function At(X){!X.data||!X.data.id||X.data.id!==W||(L.removeEventListener("message",At),rt(X.data))}),L.start&&L.start(),L.postMessage(Object.assign({id:W},A),G)})}function x(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const k=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),D=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,2,8,1,1,97,1,98,3,127,1,6,6,1,127,1,65,0,11,7,5,1,1,97,3,1])),P=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,7,1,5,0,208,112,26,11])),R=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,12,1,10,0,67,0,0,0,0,252,0,26,11])),H=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,65,0,192,26,11])),q=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),et=()=>(async L=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(L)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));function st(){return/iOS|iPhone|iPad|iPod/i.test(navigator.userAgent)}async function bt(){if(!await et())return!1;if(!("importScripts"in self))throw Error("Not implemented");return st()?!1:"Worker"in self}async function Bt(){const L=[D(),P(),k(),R(),H()];if(!(await Promise.all(L)).every(Boolean))throw new Error("Browser doesn't meet minimum requirements!");return await q()?await bt()?"advanced-threads":"advanced":"basic"}let Lt,B;async function lt(){const L=await Bt();console.log(`Requesting ${L} Wasm build`);const A=self.location.href,G=A.substring(0,A.lastIndexOf("/")),rt=`${G}/${L}/capture-wasm.js`;try{importScripts(rt)}catch(W){console.error("loading scripts failed",W)}return Lt=await self.createModule({locateFile:W=>`${G}/${L}/${W}`,mainScriptUrlOrBlob:rt.toString(),setStatus:W=>{}}),Lt[r]=()=>{console.log("finalizer wasmModule")},Y(Lt)}function Nt(){return Lt||console.warn("Wasm is not initialized yet. Call loadWasm() first."),B=new Lt.Analyzer,B[r]=()=>{console.log("Comlink.finalizer called on Analyzer instance. Deleting instance."),B.delete()},Y(B)}function Ee(L){const A=B.analyze(L);return self.postMessage({},[L.data.buffer]),L=null,A}const oe={createAnalyzer:Nt,loadWasm:lt,analyze:Ee,terminate:()=>self.close(),[r]:()=>{console.log("Comlink.finalizer called on proxyWorker")}};return M(oe),t.proxyWorker=oe,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t})({}),!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(t){const e=performance.now(),n=this.getVideoPlaybackQuality(),i=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames,r=(o,a)=>{const s=this.getVideoPlaybackQuality(),u=this.mozPresentedFrames||this.mozPaintedFrames||s.totalVideoFrames-s.droppedVideoFrames;if(u>i){const l=this.mozFrameDelay||s.totalFrameDelay-n.totalFrameDelay||0,g=a-o;t(a,{presentationTime:a+l*1e3,expectedDisplayTime:a+g,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+g/1e3,presentedFrames:u,processingDuration:l}),delete this._rvfcpolyfillmap[e]}else this._rvfcpolyfillmap[e]=requestAnimationFrame(l=>r(a,l))};return this._rvfcpolyfillmap[e]=requestAnimationFrame(o=>r(e,o)),e},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(t){cancelAnimationFrame(this._rvfcpolyfillmap[t]),delete this._rvfcpolyfillmap[t]});const ml=Element.prototype.attachShadow;function da(){return typeof window.ShadyDOM<"u"&&typeof ShadowRoot<"u"}function Dy(){return typeof ShadowRoot<"u"}function Iy(t){ml==null||da()||(Element.prototype.attachShadow=function(e){const n=ml.call(this,e);return t(n),n})}function xy(t,...e){const n=new Set(e);let i=!1;const r=()=>{for(const o of n)t(o);n.clear()};return{isRunning(){return i},schedule(o){n.add(o),i&&r()},stop(){i=!1},run(){i||(i=!0,r())}}}const Oy={childList:!0,subtree:!0},Cy=t=>{typeof queueMicrotask<"u"?queueMicrotask(t):typeof Promise<"u"?Promise.resolve().then(()=>t()):setTimeout(()=>t(),0)};function Nl(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null)return[...t];{const e=[];for(let n=0;n<t.length;n++)e[n]=t[n];return e}}function zy(t,e){return da()?new Set(Nl(window.ShadyDOM.nativeMethods.querySelectorAll.call(document.documentElement,e))):new Set("querySelectorAll"in t?Nl(t.querySelectorAll(e)):[])}function ky(t,e){return new Set([...t??[],...e??[]])}function Uy(t){return"activeElement"in t}function wl(t=document.documentElement){if(Uy(t)&&Ll(t),da()&&t instanceof ShadowRoot||!Dy())return;const e=t.childNodes,n="shadowRoot"in t&&t.shadowRoot!=null?[t.shadowRoot]:[];for(const i of[...e,...n])wl(i)}function Yy(t){return"isConnected"in Node.prototype?t.isConnected:t.ownerDocument==null||!(t.ownerDocument.compareDocumentPosition(t)&t.DOCUMENT_POSITION_DISCONNECTED)}const Li=new Map;function Py(t,e){const n=new Set,i=new Set,r=new Map,o=new WeakMap;let a=!1,s=!1,u=!1;const l=()=>{s=!0;const p=[...n];p.length>0&&e(p,t),n.clear(),a=!1,s=!1},g=()=>{a||(a=!0,Cy(l))},M=p=>{n.add(p),s||g()},c=()=>{const p=[...n];return n.clear(),p},f=()=>{i.clear()},d=(p,w)=>{let m=r.get(p);const N=zy(p,w),j=m?.get(w),b=ky(N,j);h(b),m==null&&(m=new Map,r.set(p,m)),m.set(w,N)},h=p=>{for(const w of p){const m=o.get(w),N=Yy(w);m!==N&&(o.set(w,N),M({connected:N,target:w}))}},y={observedTargets:i,queryRootAndHandleMutationChanges:d,handleMutationChange:h,addObservedTarget:p=>{if(ha.run(),u||(u=!0,wl()),i.add(p),typeof p!="string")h([p]);else for(const w of ga)d(w,p)},clearObservedTargets:f,clearQueue:c};Li.set(t,y)}const _y=t=>{for(const e of t)if(e.type==="childList")for(const n of Li.values())for(const i of n.observedTargets)typeof i=="string"?n.queryRootAndHandleMutationChanges(e.target,i):n.handleMutationChange([i])},ga=new Set,Ll=(()=>{let t;return function(e){ga.has(e)||(ga.add(e),t==null&&(t=new MutationObserver(_y)),t.observe(e,Oy))}})(),ha=xy(Ll,document.documentElement);class Nn{constructor(e){if(new.target===void 0)throw new TypeError(`Constructor ${Nn.name} requires 'new'`);if(e===void 0)throw new ReferenceError(`Failed to construct '${Nn.name}': 1 argument required, but only 0 present.`);if(typeof e!="function")throw new TypeError(`Failed to construct '${Nn.name}': The callback provided as parameter 1 is not a function.`);Py(this,e)}get[Symbol.toStringTag](){return"ConnectionObserver"}observe(e){if(e===void 0)throw new ReferenceError(`Failed to execute '${this.observe.name}' on '${Nn.name}': 1 argument required, but only 0 present.`);if(typeof e!="string"&&!(e instanceof Node))throw new TypeError(`Failed to execute '${this.observe.name}' on '${Nn.name}': parameter 1 is not of type 'Node' or a DOMString.`);Li.get(this)?.addObservedTarget(e)}takeRecords(){const e=Li.get(this);return e==null?[]:e.clearQueue()}disconnect(){Li.get(this)?.clearObservedTargets()}}Iy(ha.schedule.bind(ha));var Ry=function(){function t(e,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Fy=By(["",""],["",""]);function By(t,e){return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Hy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ne=function(){function t(){for(var e=this,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return Hy(this,t),this.tag=function(o){for(var a=arguments.length,s=Array(a>1?a-1:0),u=1;u<a;u++)s[u-1]=arguments[u];return typeof o=="function"?e.interimTag.bind(e,o):typeof o=="string"?e.transformEndResult(o):(o=o.map(e.transformString.bind(e)),e.transformEndResult(o.reduce(e.processSubstitutions.bind(e,s))))},i.length>0&&Array.isArray(i[0])&&(i=i[0]),this.transformers=i.map(function(o){return typeof o=="function"?o():o}),this.tag}return Ry(t,[{key:"interimTag",value:function(e,n){for(var i=arguments.length,r=Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return this.tag(Fy,e.apply(void 0,[n].concat(r)))}},{key:"processSubstitutions",value:function(e,n,i){var r=this.transformSubstitution(e.shift(),n);return"".concat(n,r,i)}},{key:"transformString",value:function(e){var n=function(i,r){return r.onString?r.onString(i):i};return this.transformers.reduce(n,e)}},{key:"transformSubstitution",value:function(e,n){var i=function(r,o){return o.onSubstitution?o.onSubstitution(r,n):r};return this.transformers.reduce(i,e)}},{key:"transformEndResult",value:function(e){var n=function(i,r){return r.onEndResult?r.onEndResult(i):i};return this.transformers.reduce(n,e)}}]),t}(),ie=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(e){if(t==="")return e.trim();if(t=t.toLowerCase(),t==="start"||t==="left")return e.replace(/^\s*/,"");if(t==="end"||t==="right")return e.replace(/\s*$/,"");throw new Error("Side not supported: "+t)}}};function Qy(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var Je=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(e){if(t==="initial"){var n=e.match(/^[^\S\n]*(?=\S)/gm),i=n&&Math.min.apply(Math,Qy(n.map(function(o){return o.length})));if(i){var r=new RegExp("^.{"+i+"}","gm");return e.replace(r,"")}return e}if(t==="all")return e.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+t)}}},Vn=function(t,e){return{onEndResult:function(n){if(t==null||e==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return n.replace(t,e)}}},Wn=function(t,e){return{onSubstitution:function(n,i){if(t==null||e==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return n==null?n:n.toString().replace(t,e)}}},Gy={separator:"",conjunction:"",serial:!1},Ce=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Gy;return{onSubstitution:function(e,n){if(Array.isArray(e)){var i=e.length,r=t.separator,o=t.conjunction,a=t.serial,s=n.match(/(\n?[^\S\n]+)$/);if(s?e=e.join(r+s[1]):e=e.join(r+" "),o&&i>1){var u=e.lastIndexOf(r);e=e.slice(0,u)+(a?r:"")+" "+o+e.slice(u+1)}}return e}}},Tl=function(t){return{onSubstitution:function(e,n){if(t!=null&&typeof t=="string")typeof e=="string"&&e.includes(t)&&(e=e.split(t));else throw new Error("You need to specify a string character to split by.");return e}}},jl=function(t){return t!=null&&!Number.isNaN(t)&&typeof t!="boolean"},Ky=function(){return{onSubstitution:function(t){return Array.isArray(t)?t.filter(jl):jl(t)?t:""}}};new ne(Ce({separator:","}),Je,ie),new ne(Ce({separator:",",conjunction:"and"}),Je,ie),new ne(Ce({separator:",",conjunction:"or"}),Je,ie),new ne(Tl(`
|
|
231
|
-
`),Ky,Ce,Je,ie),new ne(Tl(`
|
|
232
|
-
`),Ce,Je,ie,Wn(/&/g,"&"),Wn(/</g,"<"),Wn(/>/g,">"),Wn(/"/g,"""),Wn(/'/g,"'"),Wn(/`/g,"`")),new ne(Vn(/(?:\n(?:\s*))+/g," "),ie),new ne(Vn(/(?:\n\s*)/g,""),ie),new ne(Ce({separator:","}),Vn(/(?:\s+)/g," "),ie),new ne(Ce({separator:",",conjunction:"or"}),Vn(/(?:\s+)/g," "),ie),new ne(Ce({separator:",",conjunction:"and"}),Vn(/(?:\s+)/g," "),ie),new ne(Ce,Je,ie),new ne(Ce,Vn(/(?:\s+)/g," "),ie),new ne(Je,ie);var El=new ne(Je("all"),ie),$y=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fa={exports:{}};(function(t,e){(function(n,i){var r="1.0.35",o="",a="?",s="function",u="undefined",l="object",g="string",M="major",c="model",f="name",d="type",h="vendor",y="version",p="architecture",w="console",m="mobile",N="tablet",j="smarttv",b="wearable",S="embedded",v=350,F="Amazon",Y="Apple",U="ASUS",C="BlackBerry",I="Browser",x="Chrome",k="Edge",D="Firefox",P="Google",R="Huawei",H="LG",q="Microsoft",et="Motorola",st="Opera",bt="Samsung",Bt="Sharp",Lt="Sony",B="Xiaomi",lt="Zebra",Nt="Facebook",Ee="Chromium OS",oe="Mac OS",L=function(_,K){var z={};for(var $ in _)K[$]&&K[$].length%2===0?z[$]=K[$].concat(_[$]):z[$]=_[$];return z},A=function(_){for(var K={},z=0;z<_.length;z++)K[_[z].toUpperCase()]=_[z];return K},G=function(_,K){return typeof _===g?rt(K).indexOf(rt(_))!==-1:!1},rt=function(_){return _.toLowerCase()},W=function(_){return typeof _===g?_.replace(/[^\d\.]/g,o).split(".")[0]:i},At=function(_,K){if(typeof _===g)return _=_.replace(/^\s\s*/,o),typeof K===u?_:_.substring(0,v)},X=function(_,K){for(var z=0,$,Ht,zt,Q,O,Yt;z<K.length&&!O;){var jn=K[z],xi=K[z+1];for($=Ht=0;$<jn.length&&!O&&jn[$];)if(O=jn[$++].exec(_),O)for(zt=0;zt<xi.length;zt++)Yt=O[++Ht],Q=xi[zt],typeof Q===l&&Q.length>0?Q.length===2?typeof Q[1]==s?this[Q[0]]=Q[1].call(this,Yt):this[Q[0]]=Q[1]:Q.length===3?typeof Q[1]===s&&!(Q[1].exec&&Q[1].test)?this[Q[0]]=Yt?Q[1].call(this,Yt,Q[2]):i:this[Q[0]]=Yt?Yt.replace(Q[1],Q[2]):i:Q.length===4&&(this[Q[0]]=Yt?Q[3].call(this,Yt.replace(Q[1],Q[2])):i):this[Q]=Yt||i;z+=2}},ft=function(_,K){for(var z in K)if(typeof K[z]===l&&K[z].length>0){for(var $=0;$<K[z].length;$++)if(G(K[z][$],_))return z===a?i:z}else if(G(K[z],_))return z===a?i:z;return _},jt={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},dt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Mt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,y],[/opios[\/ ]+([\w\.]+)/i],[y,[f,st+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[f,st]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[f,"UC"+I]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[y,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+I],y],[/\bfocus\/([\w\.]+)/i],[y,[f,D+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[f,st+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[f,st+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[f,"MIUI "+I]],[/fxios\/([-\w\.]+)/i],[y,[f,D]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+I]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+I],y],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[f,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,Nt],y],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[f,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[f,x+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,x+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[f,"Android "+I]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[y,ft,jt]],[/(webkit|khtml)\/([\w\.]+)/i],[f,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[f,D+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,y],[/(cobalt)\/([\w\.]+)/i],[f,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,rt]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,o,rt]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,rt]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[h,bt],[d,N]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,bt],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,Y],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,Y],[d,N]],[/(macintosh);/i],[c,[h,Y]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,Bt],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,R],[d,N]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,R],[d,m]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[h,B],[d,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,B],[d,N]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[c,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[h,et],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,et],[d,N]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,H],[d,N]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,H],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,N]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,P],[d,N]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,P],[d,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[h,Lt],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,Lt],[d,N]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,F],[d,N]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,F],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,N]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,C],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,U],[d,N]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,U],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,N]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/g," "],[d,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,N]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,c,[d,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,c,[d,N]],[/(surface duo)/i],[c,[h,q],[d,N]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,N]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,N]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,N]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,N]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,N]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,N]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,N]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,N]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,N]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,N]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,N]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,N]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,N]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,N]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,N]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,q],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,lt],[d,N]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,lt],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,j]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,bt],[d,j]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,H],[d,j]],[/(apple) ?tv/i],[h,[c,Y+" TV"],[d,j]],[/crkey/i],[[c,x+"cast"],[h,P],[d,j]],[/droid.+aft(\w)( bui|\))/i],[c,[h,F],[d,j]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,Bt],[d,j]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,Lt],[d,j]],[/(mitv-\w{5}) bui/i],[c,[h,B],[d,j]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,j]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,At],[c,At],[d,j]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,j]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,w]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,w]],[/(playstation [345portablevi]+)/i],[c,[h,Lt],[d,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,q],[d,w]],[/((pebble))app/i],[h,c,[d,b]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,Y],[d,b]],[/droid.+; (glass) \d/i],[c,[h,P],[d,b]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,lt],[d,b]],[/(quest( 2| pro)?)/i],[c,[h,Nt],[d,b]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,S]],[/(aeobc)\b/i],[c,[h,F],[d,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,N]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,N]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[f,k+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[f,[y,ft,dt]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[y,ft,dt]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,oe],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,y],[/\(bb(10);/i],[y,[f,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[f,D+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[f,x+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,Ee],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,y],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,y]]},nt=function(_,K){if(typeof _===l&&(K=_,_=i),!(this instanceof nt))return new nt(_,K).getResult();var z=typeof n!==u&&n.navigator?n.navigator:i,$=_||(z&&z.userAgent?z.userAgent:o),Ht=z&&z.userAgentData?z.userAgentData:i,zt=K?L(Mt,K):Mt,Q=z&&z.userAgent==$;return this.getBrowser=function(){var O={};return O[f]=i,O[y]=i,X.call(O,$,zt.browser),O[M]=W(O[y]),Q&&z&&z.brave&&typeof z.brave.isBrave==s&&(O[f]="Brave"),O},this.getCPU=function(){var O={};return O[p]=i,X.call(O,$,zt.cpu),O},this.getDevice=function(){var O={};return O[h]=i,O[c]=i,O[d]=i,X.call(O,$,zt.device),Q&&!O[d]&&Ht&&Ht.mobile&&(O[d]=m),Q&&O[c]=="Macintosh"&&z&&typeof z.standalone!==u&&z.maxTouchPoints&&z.maxTouchPoints>2&&(O[c]="iPad",O[d]=N),O},this.getEngine=function(){var O={};return O[f]=i,O[y]=i,X.call(O,$,zt.engine),O},this.getOS=function(){var O={};return O[f]=i,O[y]=i,X.call(O,$,zt.os),Q&&!O[f]&&Ht&&Ht.platform!="Unknown"&&(O[f]=Ht.platform.replace(/chrome os/i,Ee).replace(/macos/i,oe)),O},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return $},this.setUA=function(O){return $=typeof O===g&&O.length>v?At(O,v):O,this},this.setUA($),this};nt.VERSION=r,nt.BROWSER=A([f,y,M]),nt.CPU=A([p]),nt.DEVICE=A([c,h,d,w,m,j,N,b,S]),nt.ENGINE=nt.OS=A([f,y]),t.exports&&(e=t.exports=nt),e.UAParser=nt;var at=typeof n!==u&&(n.jQuery||n.Zepto);if(at&&!at.ua){var Ct=new nt;at.ua=Ct.getResult(),at.ua.get=function(){return Ct.getUA()},at.ua.set=function(_){Ct.setUA(_);var K=Ct.getResult();for(var z in K)at.ua[z]=K[z]}}})(typeof window=="object"?window:$y)})(fa,fa.exports);var Wy=fa.exports;const Zy=Vy(Wy);function Sl(t){const e=Object.keys(t);if(e.length===0)throw new Error("No members in object!");let n=e[0],i=-1/0;for(const[r,o]of Object.entries(t))o>i&&(i=o,n=r);return n}const bl=t=>{if(t instanceof Error)return t;try{return new Error(JSON.stringify(t))}catch{return new Error(String(t))}};class qy{deviceInfo;settings;activeStream;name;#t;constructor(e,n){this.deviceInfo=e,this.name=e.label,this.activeStream=null,this.#t=vl(e),this.settings=n}async startStream(){if(this.activeStream)return this.activeStream;const e=await navigator.mediaDevices.getUserMedia(this.#t);this.activeStream=e,e.onaddtrack=i=>console.log("added track",i),e.onremovetrack=i=>console.log("removed track",i);const n=e.getVideoTracks()[0];return n.onended=i=>{console.log("track ended",i),this.stopStream()},e}stopStream(){this.activeStream&&(console.log(`Stopping active stream on ${this.name}`),pa(this.activeStream),this.activeStream=null)}getVideoTrack(){if(this.activeStream)return this.activeStream.getVideoTracks()[0]}}const Ma=new Zy,ya=Ma.getOS().name==="Android",Al=Ma.getOS().name==="iOS",Xy=async()=>{try{const t=await navigator.mediaDevices.getUserMedia({video:!0});pa(t)}catch{throw new Error("Camera permission not given")}},Jy=async()=>{if(!navigator.mediaDevices)throw new Error(El`
|
|
231
|
+
*/const ul=Symbol("Comlink.proxy"),Sy=Symbol("Comlink.endpoint"),Ey=Symbol("Comlink.releaseProxy"),us=Symbol("Comlink.finalizer"),pr=Symbol("Comlink.thrown"),cl=t=>typeof t=="object"&&t!==null||typeof t=="function",by={canHandle:t=>cl(t)&&t[ul],serialize(t){const{port1:e,port2:n}=new MessageChannel;return dl(t,e),[n,[n]]},deserialize(t){return t.start(),hl(t)}},Ay={canHandle:t=>cl(t)&&pr in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},ll=new Map([["proxy",by],["throw",Ay]]);function Dy(t,e){for(const n of t)if(e===n||n==="*"||n instanceof RegExp&&n.test(e))return!0;return!1}function dl(t,e=globalThis,n=["*"]){e.addEventListener("message",function i(r){if(!r||!r.data)return;if(!Dy(n,r.origin)){console.warn(`Invalid origin '${r.origin}' for comlink proxy`);return}const{id:o,type:s,path:a}=Object.assign({path:[]},r.data),u=(r.data.argumentList||[]).map(ln);let l;try{const g=a.slice(0,-1).reduce((c,f)=>c[f],t),M=a.reduce((c,f)=>c[f],t);switch(s){case"GET":l=M;break;case"SET":g[a.slice(-1)[0]]=ln(r.data.value),l=!0;break;case"APPLY":l=M.apply(g,u);break;case"CONSTRUCT":{const c=new M(...u);l=Cy(c)}break;case"ENDPOINT":{const{port1:c,port2:f}=new MessageChannel;dl(t,f),l=pl(c,[c])}break;case"RELEASE":l=void 0;break;default:return}}catch(g){l={value:g,[pr]:0}}Promise.resolve(l).catch(g=>({value:g,[pr]:0})).then(g=>{const[M,c]=Lr(g);e.postMessage(Object.assign(Object.assign({},M),{id:o}),c),s==="RELEASE"&&(e.removeEventListener("message",i),gl(e),us in t&&typeof t[us]=="function"&&t[us]())}).catch(g=>{const[M,c]=Lr({value:new TypeError("Unserializable return value"),[pr]:0});e.postMessage(Object.assign(Object.assign({},M),{id:o}),c)})}),e.start&&e.start()}function vy(t){return t.constructor.name==="MessagePort"}function gl(t){vy(t)&&t.close()}function hl(t,e){return cs(t,[],e)}function mr(t){if(t)throw new Error("Proxy has been released and is not useable")}function fl(t){return Fn(t,{type:"RELEASE"}).then(()=>{gl(t)})}const Nr=new WeakMap,wr="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(Nr.get(t)||0)-1;Nr.set(t,e),e===0&&fl(t)});function Iy(t,e){const n=(Nr.get(e)||0)+1;Nr.set(e,n),wr&&wr.register(t,e,t)}function xy(t){wr&&wr.unregister(t)}function cs(t,e=[],n=function(){}){let i=!1;const r=new Proxy(n,{get(o,s){if(mr(i),s===Ey)return()=>{xy(r),fl(t),i=!0};if(s==="then"){if(e.length===0)return{then:()=>r};const a=Fn(t,{type:"GET",path:e.map(u=>u.toString())}).then(ln);return a.then.bind(a)}return cs(t,[...e,s])},set(o,s,a){mr(i);const[u,l]=Lr(a);return Fn(t,{type:"SET",path:[...e,s].map(g=>g.toString()),value:u},l).then(ln)},apply(o,s,a){mr(i);const u=e[e.length-1];if(u===Sy)return Fn(t,{type:"ENDPOINT"}).then(ln);if(u==="bind")return cs(t,e.slice(0,-1));const[l,g]=Ml(a);return Fn(t,{type:"APPLY",path:e.map(M=>M.toString()),argumentList:l},g).then(ln)},construct(o,s){mr(i);const[a,u]=Ml(s);return Fn(t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:a},u).then(ln)}});return Iy(r,t),r}function Oy(t){return Array.prototype.concat.apply([],t)}function Ml(t){const e=t.map(Lr);return[e.map(n=>n[0]),Oy(e.map(n=>n[1]))]}const yl=new WeakMap;function pl(t,e){return yl.set(t,e),t}function Cy(t){return Object.assign(t,{[ul]:!0})}function Lr(t){for(const[e,n]of ll)if(n.canHandle(t)){const[i,r]=n.serialize(t);return[{type:"HANDLER",name:e,value:i},r]}return[{type:"RAW",value:t},yl.get(t)||[]]}function ln(t){switch(t.type){case"HANDLER":return ll.get(t.name).deserialize(t.value);case"RAW":return t.value}}function Fn(t,e,n){return new Promise(i=>{const r=zy();t.addEventListener("message",function o(s){!s.data||!s.data.id||s.data.id!==r||(t.removeEventListener("message",o),i(s.data))}),t.start&&t.start(),t.postMessage(Object.assign({id:r},e),n)})}function zy(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var ml=(t=>(t[t.Invalid=0]="Invalid",t[t.RequiresServerPermission=1]="RequiresServerPermission",t[t.Valid=2]="Valid",t))(ml||{}),Nl=(t=>(t[t.Ok=0]="Ok",t[t.NetworkError=1]="NetworkError",t[t.RemoteLock=2]="RemoteLock",t[t.PermissionExpired=3]="PermissionExpired",t[t.PayloadCorrupted=4]="PayloadCorrupted",t[t.PayloadSignatureVerificationFailed=5]="PayloadSignatureVerificationFailed",t[t.IncorrectTokenState=6]="IncorrectTokenState",t))(Nl||{});!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(t){const e=performance.now(),n=this.getVideoPlaybackQuality(),i=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames,r=(o,s)=>{const a=this.getVideoPlaybackQuality(),u=this.mozPresentedFrames||this.mozPaintedFrames||a.totalVideoFrames-a.droppedVideoFrames;if(u>i){const l=this.mozFrameDelay||a.totalFrameDelay-n.totalFrameDelay||0,g=s-o;t(s,{presentationTime:s+l*1e3,expectedDisplayTime:s+g,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+g/1e3,presentedFrames:u,processingDuration:l}),delete this._rvfcpolyfillmap[e]}else this._rvfcpolyfillmap[e]=requestAnimationFrame(l=>r(s,l))};return this._rvfcpolyfillmap[e]=requestAnimationFrame(o=>r(e,o)),e},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(t){cancelAnimationFrame(this._rvfcpolyfillmap[t]),delete this._rvfcpolyfillmap[t]});const wl=Element.prototype.attachShadow;function ls(){return typeof window.ShadyDOM<"u"&&typeof ShadowRoot<"u"}function ky(){return typeof ShadowRoot<"u"}function Uy(t){wl==null||ls()||(Element.prototype.attachShadow=function(e){const n=wl.call(this,e);return t(n),n})}function Yy(t,...e){const n=new Set(e);let i=!1;const r=()=>{for(const o of n)t(o);n.clear()};return{isRunning(){return i},schedule(o){n.add(o),i&&r()},stop(){i=!1},run(){i||(i=!0,r())}}}const _y={childList:!0,subtree:!0},Py=t=>{typeof queueMicrotask<"u"?queueMicrotask(t):typeof Promise<"u"?Promise.resolve().then(()=>t()):setTimeout(()=>t(),0)};function Ll(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null)return[...t];{const e=[];for(let n=0;n<t.length;n++)e[n]=t[n];return e}}function Ry(t,e){return ls()?new Set(Ll(window.ShadyDOM.nativeMethods.querySelectorAll.call(document.documentElement,e))):new Set("querySelectorAll"in t?Ll(t.querySelectorAll(e)):[])}function By(t,e){return new Set([...t??[],...e??[]])}function Fy(t){return"activeElement"in t}function Tl(t=document.documentElement){if(Fy(t)&&jl(t),ls()&&t instanceof ShadowRoot||!ky())return;const e=t.childNodes,n="shadowRoot"in t&&t.shadowRoot!=null?[t.shadowRoot]:[];for(const i of[...e,...n])Tl(i)}function Hy(t){return"isConnected"in Node.prototype?t.isConnected:t.ownerDocument==null||!(t.ownerDocument.compareDocumentPosition(t)&t.DOCUMENT_POSITION_DISCONNECTED)}const pi=new Map;function Qy(t,e){const n=new Set,i=new Set,r=new Map,o=new WeakMap;let s=!1,a=!1,u=!1;const l=()=>{a=!0;const p=[...n];p.length>0&&e(p,t),n.clear(),s=!1,a=!1},g=()=>{s||(s=!0,Py(l))},M=p=>{n.add(p),a||g()},c=()=>{const p=[...n];return n.clear(),p},f=()=>{i.clear()},d=(p,w)=>{let m=r.get(p);const N=Ry(p,w),T=m?.get(w),E=By(N,T);h(E),m==null&&(m=new Map,r.set(p,m)),m.set(w,N)},h=p=>{for(const w of p){const m=o.get(w),N=Hy(w);m!==N&&(o.set(w,N),M({connected:N,target:w}))}},y={observedTargets:i,queryRootAndHandleMutationChanges:d,handleMutationChange:h,addObservedTarget:p=>{if(gs.run(),u||(u=!0,Tl()),i.add(p),typeof p!="string")h([p]);else for(const w of ds)d(w,p)},clearObservedTargets:f,clearQueue:c};pi.set(t,y)}const Gy=t=>{for(const e of t)if(e.type==="childList")for(const n of pi.values())for(const i of n.observedTargets)typeof i=="string"?n.queryRootAndHandleMutationChanges(e.target,i):n.handleMutationChange([i])},ds=new Set,jl=(()=>{let t;return function(e){ds.has(e)||(ds.add(e),t==null&&(t=new MutationObserver(Gy)),t.observe(e,_y))}})(),gs=Yy(jl,document.documentElement);class dn{constructor(e){if(new.target===void 0)throw new TypeError(`Constructor ${dn.name} requires 'new'`);if(e===void 0)throw new ReferenceError(`Failed to construct '${dn.name}': 1 argument required, but only 0 present.`);if(typeof e!="function")throw new TypeError(`Failed to construct '${dn.name}': The callback provided as parameter 1 is not a function.`);Qy(this,e)}get[Symbol.toStringTag](){return"ConnectionObserver"}observe(e){if(e===void 0)throw new ReferenceError(`Failed to execute '${this.observe.name}' on '${dn.name}': 1 argument required, but only 0 present.`);if(typeof e!="string"&&!(e instanceof Node))throw new TypeError(`Failed to execute '${this.observe.name}' on '${dn.name}': parameter 1 is not of type 'Node' or a DOMString.`);pi.get(this)?.addObservedTarget(e)}takeRecords(){const e=pi.get(this);return e==null?[]:e.clearQueue()}disconnect(){pi.get(this)?.clearObservedTargets()}}Uy(gs.schedule.bind(gs));var Ky=function(){function t(e,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),$y=Vy(["",""],["",""]);function Vy(t,e){return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function Wy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ft=function(){function t(){for(var e=this,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return Wy(this,t),this.tag=function(o){for(var s=arguments.length,a=Array(s>1?s-1:0),u=1;u<s;u++)a[u-1]=arguments[u];return typeof o=="function"?e.interimTag.bind(e,o):typeof o=="string"?e.transformEndResult(o):(o=o.map(e.transformString.bind(e)),e.transformEndResult(o.reduce(e.processSubstitutions.bind(e,a))))},i.length>0&&Array.isArray(i[0])&&(i=i[0]),this.transformers=i.map(function(o){return typeof o=="function"?o():o}),this.tag}return Ky(t,[{key:"interimTag",value:function(e,n){for(var i=arguments.length,r=Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return this.tag($y,e.apply(void 0,[n].concat(r)))}},{key:"processSubstitutions",value:function(e,n,i){var r=this.transformSubstitution(e.shift(),n);return"".concat(n,r,i)}},{key:"transformString",value:function(e){var n=function(i,r){return r.onString?r.onString(i):i};return this.transformers.reduce(n,e)}},{key:"transformSubstitution",value:function(e,n){var i=function(r,o){return o.onSubstitution?o.onSubstitution(r,n):r};return this.transformers.reduce(i,e)}},{key:"transformEndResult",value:function(e){var n=function(i,r){return r.onEndResult?r.onEndResult(i):i};return this.transformers.reduce(n,e)}}]),t}(),Ht=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(e){if(t==="")return e.trim();if(t=t.toLowerCase(),t==="start"||t==="left")return e.replace(/^\s*/,"");if(t==="end"||t==="right")return e.replace(/\s*$/,"");throw new Error("Side not supported: "+t)}}};function Zy(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}else return Array.from(t)}var Qe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(e){if(t==="initial"){var n=e.match(/^[^\S\n]*(?=\S)/gm),i=n&&Math.min.apply(Math,Zy(n.map(function(o){return o.length})));if(i){var r=new RegExp("^.{"+i+"}","gm");return e.replace(r,"")}return e}if(t==="all")return e.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+t)}}},Hn=function(t,e){return{onEndResult:function(n){if(t==null||e==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return n.replace(t,e)}}},Qn=function(t,e){return{onSubstitution:function(n,i){if(t==null||e==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return n==null?n:n.toString().replace(t,e)}}},qy={separator:"",conjunction:"",serial:!1},Te=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qy;return{onSubstitution:function(e,n){if(Array.isArray(e)){var i=e.length,r=t.separator,o=t.conjunction,s=t.serial,a=n.match(/(\n?[^\S\n]+)$/);if(a?e=e.join(r+a[1]):e=e.join(r+" "),o&&i>1){var u=e.lastIndexOf(r);e=e.slice(0,u)+(s?r:"")+" "+o+e.slice(u+1)}}return e}}},Sl=function(t){return{onSubstitution:function(e,n){if(t!=null&&typeof t=="string")typeof e=="string"&&e.includes(t)&&(e=e.split(t));else throw new Error("You need to specify a string character to split by.");return e}}},El=function(t){return t!=null&&!Number.isNaN(t)&&typeof t!="boolean"},Xy=function(){return{onSubstitution:function(t){return Array.isArray(t)?t.filter(El):El(t)?t:""}}};new Ft(Te({separator:","}),Qe,Ht),new Ft(Te({separator:",",conjunction:"and"}),Qe,Ht),new Ft(Te({separator:",",conjunction:"or"}),Qe,Ht),new Ft(Sl(`
|
|
232
|
+
`),Xy,Te,Qe,Ht),new Ft(Sl(`
|
|
233
|
+
`),Te,Qe,Ht,Qn(/&/g,"&"),Qn(/</g,"<"),Qn(/>/g,">"),Qn(/"/g,"""),Qn(/'/g,"'"),Qn(/`/g,"`")),new Ft(Hn(/(?:\n(?:\s*))+/g," "),Ht),new Ft(Hn(/(?:\n\s*)/g,""),Ht),new Ft(Te({separator:","}),Hn(/(?:\s+)/g," "),Ht),new Ft(Te({separator:",",conjunction:"or"}),Hn(/(?:\s+)/g," "),Ht),new Ft(Te({separator:",",conjunction:"and"}),Hn(/(?:\s+)/g," "),Ht),new Ft(Te,Qe,Ht),new Ft(Te,Hn(/(?:\s+)/g," "),Ht),new Ft(Qe,Ht);var hs=new Ft(Qe("all"),Ht),Jy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tp(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fs={exports:{}};(function(t,e){(function(n,i){var r="1.0.35",o="",s="?",a="function",u="undefined",l="object",g="string",M="major",c="model",f="name",d="type",h="vendor",y="version",p="architecture",w="console",m="mobile",N="tablet",T="smarttv",E="wearable",S="embedded",A=350,P="Amazon",U="Apple",Y="ASUS",C="BlackBerry",D="Browser",v="Chrome",O="Edge",b="Firefox",k="Google",_="Huawei",B="LG",Z="Microsoft",X="Motorola",nt="Opera",pt="Samsung",te="Sharp",Ct="Sony",H="Xiaomi",at="Zebra",lt="Facebook",qe="Chromium OS",Xe="Mac OS",Oe=function(z,F){var x={};for(var Q in z)F[Q]&&F[Q].length%2===0?x[Q]=F[Q].concat(z[Q]):x[Q]=z[Q];return x},de=function(z){for(var F={},x=0;x<z.length;x++)F[z[x].toUpperCase()]=z[x];return F},Mn=function(z,F){return typeof z===g?ye(F).indexOf(ye(z))!==-1:!1},ye=function(z){return z.toLowerCase()},$s=function(z){return typeof z===g?z.replace(/[^\d\.]/g,o).split(".")[0]:i},yn=function(z,F){if(typeof z===g)return z=z.replace(/^\s\s*/,o),typeof F===u?z:z.substring(0,A)},pe=function(z,F){for(var x=0,Q,At,wt,R,I,jt;x<F.length&&!I;){var mn=F[x],vi=F[x+1];for(Q=At=0;Q<mn.length&&!I&&mn[Q];)if(I=mn[Q++].exec(z),I)for(wt=0;wt<vi.length;wt++)jt=I[++At],R=vi[wt],typeof R===l&&R.length>0?R.length===2?typeof R[1]==a?this[R[0]]=R[1].call(this,jt):this[R[0]]=R[1]:R.length===3?typeof R[1]===a&&!(R[1].exec&&R[1].test)?this[R[0]]=jt?R[1].call(this,jt,R[2]):i:this[R[0]]=jt?jt.replace(R[1],R[2]):i:R.length===4&&(this[R[0]]=jt?R[3].call(this,jt.replace(R[1],R[2])):i):this[R]=jt||i;x+=2}},pn=function(z,F){for(var x in F)if(typeof F[x]===l&&F[x].length>0){for(var Q=0;Q<F[x].length;Q++)if(Mn(F[x][Q],z))return x===s?i:x}else if(Mn(F[x],z))return x===s?i:x;return z},Vs={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ai={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Di={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[f,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[f,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[f,y],[/opios[\/ ]+([\w\.]+)/i],[y,[f,nt+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[f,nt]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[f,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[f,"UC"+D]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[y,[f,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[f,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[f,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[f,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[f,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[f,/(.+)/,"$1 Secure "+D],y],[/\bfocus\/([\w\.]+)/i],[y,[f,b+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[f,nt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[f,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[f,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[f,nt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[f,"MIUI "+D]],[/fxios\/([-\w\.]+)/i],[y,[f,b]],[/\bqihu|(qi?ho?o?|360)browser/i],[[f,"360 "+D]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[f,/(.+)/,"$1 "+D],y],[/(comodo_dragon)\/([\w\.]+)/i],[[f,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[f,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[f],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[f,lt],y],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[f,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[f,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[f,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[f,v+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[f,v+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[f,"Android "+D]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[f,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[f,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,f],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[f,[y,pn,Vs]],[/(webkit|khtml)\/([\w\.]+)/i],[f,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[f,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[f,b+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[f,y],[/(cobalt)\/([\w\.]+)/i],[f,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[p,"amd64"]],[/(ia32(?=;))/i],[[p,ye]],[/((?:i[346]|x)86)[;\)]/i],[[p,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[p,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[p,"armhf"]],[/windows (ce|mobile); ppc;/i],[[p,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[p,/ower/,o,ye]],[/(sun4\w)[;\)]/i],[[p,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[p,ye]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[h,pt],[d,N]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[h,pt],[d,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[h,U],[d,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[h,U],[d,N]],[/(macintosh);/i],[c,[h,U]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[h,te],[d,m]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[h,_],[d,N]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[h,_],[d,m]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[h,H],[d,m]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[h,H],[d,N]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[h,"OPPO"],[d,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[h,"Vivo"],[d,m]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[c,[h,"Realme"],[d,m]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[h,X],[d,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[h,X],[d,N]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[h,B],[d,N]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[h,B],[d,m]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[h,"Lenovo"],[d,N]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[h,"Nokia"],[d,m]],[/(pixel c)\b/i],[c,[h,k],[d,N]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[h,k],[d,m]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[h,Ct],[d,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[h,Ct],[d,N]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[h,"OnePlus"],[d,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[h,P],[d,N]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[h,P],[d,m]],[/(playbook);[-\w\),; ]+(rim)/i],[c,h,[d,N]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[h,C],[d,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[h,Y],[d,N]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[h,Y],[d,m]],[/(nexus 9)/i],[c,[h,"HTC"],[d,N]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[c,/_/g," "],[d,m]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[h,"Acer"],[d,N]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[h,"Meizu"],[d,m]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,c,[d,m]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,c,[d,N]],[/(surface duo)/i],[c,[h,Z],[d,N]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[h,"Fairphone"],[d,m]],[/(u304aa)/i],[c,[h,"AT&T"],[d,m]],[/\bsie-(\w*)/i],[c,[h,"Siemens"],[d,m]],[/\b(rct\w+) b/i],[c,[h,"RCA"],[d,N]],[/\b(venue[\d ]{2,7}) b/i],[c,[h,"Dell"],[d,N]],[/\b(q(?:mv|ta)\w+) b/i],[c,[h,"Verizon"],[d,N]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[h,"Barnes & Noble"],[d,N]],[/\b(tm\d{3}\w+) b/i],[c,[h,"NuVision"],[d,N]],[/\b(k88) b/i],[c,[h,"ZTE"],[d,N]],[/\b(nx\d{3}j) b/i],[c,[h,"ZTE"],[d,m]],[/\b(gen\d{3}) b.+49h/i],[c,[h,"Swiss"],[d,m]],[/\b(zur\d{3}) b/i],[c,[h,"Swiss"],[d,N]],[/\b((zeki)?tb.*\b) b/i],[c,[h,"Zeki"],[d,N]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],c,[d,N]],[/\b(ns-?\w{0,9}) b/i],[c,[h,"Insignia"],[d,N]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[h,"NextBook"],[d,N]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],c,[d,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],c,[d,m]],[/\b(ph-1) /i],[c,[h,"Essential"],[d,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[h,"Envizen"],[d,N]],[/\b(trio[-\w\. ]+) b/i],[c,[h,"MachSpeed"],[d,N]],[/\btu_(1491) b/i],[c,[h,"Rotor"],[d,N]],[/(shield[\w ]+) b/i],[c,[h,"Nvidia"],[d,N]],[/(sprint) (\w+)/i],[h,c,[d,m]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[h,Z],[d,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[h,at],[d,N]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[h,at],[d,m]],[/smart-tv.+(samsung)/i],[h,[d,T]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[h,pt],[d,T]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,B],[d,T]],[/(apple) ?tv/i],[h,[c,U+" TV"],[d,T]],[/crkey/i],[[c,v+"cast"],[h,k],[d,T]],[/droid.+aft(\w)( bui|\))/i],[c,[h,P],[d,T]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[h,te],[d,T]],[/(bravia[\w ]+)( bui|\))/i],[c,[h,Ct],[d,T]],[/(mitv-\w{5}) bui/i],[c,[h,H],[d,T]],[/Hbbtv.*(technisat) (.*);/i],[h,c,[d,T]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,yn],[c,yn],[d,T]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,T]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,c,[d,w]],[/droid.+; (shield) bui/i],[c,[h,"Nvidia"],[d,w]],[/(playstation [345portablevi]+)/i],[c,[h,Ct],[d,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[h,Z],[d,w]],[/((pebble))app/i],[h,c,[d,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[h,U],[d,E]],[/droid.+; (glass) \d/i],[c,[h,k],[d,E]],[/droid.+; (wt63?0{2,3})\)/i],[c,[h,at],[d,E]],[/(quest( 2| pro)?)/i],[c,[h,lt],[d,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[d,S]],[/(aeobc)\b/i],[c,[h,P],[d,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[c,[d,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,N]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,N]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,m]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[f,O+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[f,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[f,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,f]],os:[[/microsoft (windows) (vista|xp)/i],[f,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[f,[y,pn,Ai]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,"Windows"],[y,pn,Ai]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[f,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[f,Xe],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,f],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[f,y],[/\(bb(10);/i],[y,[f,C]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[f,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[f,b+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[f,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[f,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[f,v+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[f,qe],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[f,y],[/(sunos) ?([\w\.\d]*)/i],[[f,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[f,y]]},yt=function(z,F){if(typeof z===l&&(F=z,z=i),!(this instanceof yt))return new yt(z,F).getResult();var x=typeof n!==u&&n.navigator?n.navigator:i,Q=z||(x&&x.userAgent?x.userAgent:o),At=x&&x.userAgentData?x.userAgentData:i,wt=F?Oe(Di,F):Di,R=x&&x.userAgent==Q;return this.getBrowser=function(){var I={};return I[f]=i,I[y]=i,pe.call(I,Q,wt.browser),I[M]=$s(I[y]),R&&x&&x.brave&&typeof x.brave.isBrave==a&&(I[f]="Brave"),I},this.getCPU=function(){var I={};return I[p]=i,pe.call(I,Q,wt.cpu),I},this.getDevice=function(){var I={};return I[h]=i,I[c]=i,I[d]=i,pe.call(I,Q,wt.device),R&&!I[d]&&At&&At.mobile&&(I[d]=m),R&&I[c]=="Macintosh"&&x&&typeof x.standalone!==u&&x.maxTouchPoints&&x.maxTouchPoints>2&&(I[c]="iPad",I[d]=N),I},this.getEngine=function(){var I={};return I[f]=i,I[y]=i,pe.call(I,Q,wt.engine),I},this.getOS=function(){var I={};return I[f]=i,I[y]=i,pe.call(I,Q,wt.os),R&&!I[f]&&At&&At.platform!="Unknown"&&(I[f]=At.platform.replace(/chrome os/i,qe).replace(/macos/i,Xe)),I},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return Q},this.setUA=function(I){return Q=typeof I===g&&I.length>A?yn(I,A):I,this},this.setUA(Q),this};yt.VERSION=r,yt.BROWSER=de([f,y,M]),yt.CPU=de([p]),yt.DEVICE=de([c,h,d,w,m,T,N,E,S]),yt.ENGINE=yt.OS=de([f,y]),t.exports&&(e=t.exports=yt),e.UAParser=yt;var ee=typeof n!==u&&(n.jQuery||n.Zepto);if(ee&&!ee.ua){var Ce=new yt;ee.ua=Ce.getResult(),ee.ua.get=function(){return Ce.getUA()},ee.ua.set=function(z){Ce.setUA(z);var F=Ce.getResult();for(var x in F)ee.ua[x]=F[x]}}})(typeof window=="object"?window:Jy)})(fs,fs.exports);var ep=fs.exports;const np=tp(ep);function bl(t){const e=Object.keys(t);if(e.length===0)throw new Error("No members in object!");let n=e[0],i=-1/0;for(const[r,o]of Object.entries(t))o>i&&(i=o,n=r);return n}const Al=t=>{if(t instanceof Error)return t;try{return new Error(JSON.stringify(t))}catch{return new Error(String(t))}};class ip{deviceInfo;settings;activeStream;name;#t;constructor(e,n){this.deviceInfo=e,this.name=e.label,this.activeStream=null,this.#t=vl(e),this.settings=n}async startStream(){if(this.activeStream)return this.activeStream;const e=await navigator.mediaDevices.getUserMedia(this.#t);this.activeStream=e,e.onaddtrack=i=>console.log("added track",i),e.onremovetrack=i=>console.log("removed track",i);const n=e.getVideoTracks()[0];return n.onended=i=>{console.log("track ended",i),this.stopStream()},e}stopStream(){this.activeStream&&(console.log(`Stopping active stream on ${this.name}`),ps(this.activeStream),this.activeStream=null)}getVideoTrack(){if(this.activeStream)return this.activeStream.getVideoTracks()[0]}}const Ms=new np,ys=Ms.getOS().name==="Android",Dl=Ms.getOS().name==="iOS",rp=async()=>{try{const t=await navigator.mediaDevices.getUserMedia({video:!0});ps(t)}catch{throw new Error("Camera permission not given")}},op=async()=>{if(!navigator.mediaDevices)throw new Error(hs`
|
|
233
234
|
Cameras can only be used in a secure context:
|
|
234
235
|
https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
|
|
235
|
-
`);return await Xy(),(await navigator.mediaDevices.enumerateDevices()).filter(t=>t.kind==="videoinput")};async function tp(t){try{const e=await ip(t),n=e.getVideoTracks()[0].getSettings();return pa(e),new qy(t,n)}catch{return console.warn(`DEBUG: Device ${t.deviceId} doesn't support this constraint.`),null}}const ep=t=>{if(Ma.getOS().name!=="Android")return;if(t.some(i=>i.settings.facingMode===void 0)){console.warn("Not all devices have facingMode");return}let e=0,n=0;for(const i of t){const r=i.settings.facingMode;r==="environment"&&(i.name=`Back camera ${++n}`),r==="user"&&(i.name=`Front camera ${++e}`)}},pa=t=>{const e=t.getTracks();for(const n of e)n.stop()},np=t=>{const e={};for(const n of t){const i=n.deviceInfo.deviceId;e[i]=0,n.settings.facingMode==="environment"&&(e[i]+=2),ya&&"torch"in n.settings&&(e[i]+=2),ya&&n.settings.focusMode==="single-shot"&&(e[i]+=2),ya&&n===t[t.length]&&(e[i]+=1),Al&&n.name==="Back Triple Camera"&&(e[i]+=5),Al&&n.name==="Back Dual Wide Camera"&&(e[i]+=3)}return Sl(e)};function vl(t){return{video:{deviceId:{exact:t.deviceId},frameRate:{exact:30},width:{exact:1920},height:{exact:1080}},audio:!1}}async function ip(t){const e=vl(t);return await navigator.mediaDevices.getUserMedia(e)}async function rp(){const t=await Jy(),e=[];for await(const n of t){const i=await tp(n);i!==null&&e.push(i)}return e}const op=(t=window.location.href)=>{const e=new Worker(t+"/resources/capture-worker.js");return e.onerror=n=>console.error(n),dl(e)};let ap=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const Dl="capture-userid";function sp(){const t=localStorage.getItem(Dl);if(t)return t;const e=ap();return localStorage.setItem(Dl,e),e}function up(t){return{licenseId:t.licenseId,licensee:t.licensee,packageName:t.packageName,platform:"Browser",sdkName:t.sdkName,sdkVersion:t.sdkVersion}}async function cp(t){try{return await(await fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(up(t))})).json()}catch(e){throw console.error(e),e}}const re=Symbol.for("@ts-pattern/matcher"),Il=Symbol.for("@ts-pattern/isVariadic"),Er="@ts-pattern/anonymous-select-key",ma=t=>!!(t&&typeof t=="object"),Sr=t=>t&&!!t[re],Ft=(t,e,n)=>{if(Sr(t)){const i=t[re](),{matched:r,selections:o}=i.match(e);return r&&o&&Object.keys(o).forEach(a=>n(a,o[a])),r}if(ma(t)){if(!ma(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let i=[],r=[],o=[];for(const a of t.keys()){const s=t[a];Sr(s)&&s[Il]?o.push(s):o.length?r.push(s):i.push(s)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<i.length+r.length)return!1;const a=e.slice(0,i.length),s=r.length===0?[]:e.slice(-r.length),u=e.slice(i.length,r.length===0?1/0:-r.length);return i.every((l,g)=>Ft(l,a[g],n))&&r.every((l,g)=>Ft(l,s[g],n))&&(o.length===0||Ft(o[0],u,n))}return t.length===e.length&&t.every((a,s)=>Ft(a,e[s],n))}return Object.keys(t).every(i=>{const r=t[i];return(i in e||Sr(o=r)&&o[re]().matcherType==="optional")&&Ft(r,e[i],n);var o})}return Object.is(e,t)},fe=t=>{var e,n,i;return ma(t)?Sr(t)?(e=(n=(i=t[re]()).getSelectionKeys)==null?void 0:n.call(i))!=null?e:[]:Array.isArray(t)?Ti(t,fe):Ti(Object.values(t),fe):[]},Ti=(t,e)=>t.reduce((n,i)=>n.concat(e(i)),[]);function lp(...t){if(t.length===1){const[e]=t;return n=>Ft(e,n,()=>{})}if(t.length===2){const[e,n]=t;return Ft(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function $t(t){return Object.assign(t,{optional:()=>wa(t),and:e=>It(t,e),or:e=>xl(t,e),select:e=>e===void 0?ji(t):ji(e,t)})}function Na(t){return Object.assign((e=>Object.assign(e,{*[Symbol.iterator](){yield Object.assign(e,{[Il]:!0})}}))(t),{optional:()=>Na(wa(t)),select:e=>Na(e===void 0?ji(t):ji(e,t))})}function wa(t){return $t({[re]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return e===void 0?(fe(t).forEach(r=>i(r,void 0)),{matched:!0,selections:n}):{matched:Ft(t,e,i),selections:n}},getSelectionKeys:()=>fe(t),matcherType:"optional"})})}const dp=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},gp=(t,e)=>{for(const[n,i]of t.entries())if(!e(i,n))return!1;return!0};function It(...t){return $t({[re]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return{matched:t.every(r=>Ft(r,e,i)),selections:n}},getSelectionKeys:()=>Ti(t,fe),matcherType:"and"})})}function xl(...t){return $t({[re]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return Ti(t,fe).forEach(r=>i(r,void 0)),{matched:t.some(r=>Ft(r,e,i)),selections:n}},getSelectionKeys:()=>Ti(t,fe),matcherType:"or"})})}function mt(t){return{[re]:()=>({match:e=>({matched:!!t(e)})})}}function ji(...t){const e=typeof t[0]=="string"?t[0]:void 0,n=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return $t({[re]:()=>({match:i=>{let r={[e??Er]:i};return{matched:n===void 0||Ft(n,i,(o,a)=>{r[o]=a}),selections:r}},getSelectionKeys:()=>[e??Er].concat(n===void 0?[]:fe(n))})})}function ze(t){return typeof t=="number"}function wn(t){return typeof t=="string"}function tn(t){return typeof t=="bigint"}const Ol=$t(mt(function(t){return!0})),hp=Ol,Ln=t=>Object.assign($t(t),{startsWith:e=>{return Ln(It(t,(n=e,mt(i=>wn(i)&&i.startsWith(n)))));var n},endsWith:e=>{return Ln(It(t,(n=e,mt(i=>wn(i)&&i.endsWith(n)))));var n},minLength:e=>Ln(It(t,(n=>mt(i=>wn(i)&&i.length>=n))(e))),maxLength:e=>Ln(It(t,(n=>mt(i=>wn(i)&&i.length<=n))(e))),includes:e=>{return Ln(It(t,(n=e,mt(i=>wn(i)&&i.includes(n)))));var n},regex:e=>{return Ln(It(t,(n=e,mt(i=>wn(i)&&!!i.match(n)))));var n}}),fp=Ln(mt(wn)),Cl=(t,e)=>mt(n=>ze(n)&&t<=n&&e>=n),zl=t=>mt(e=>ze(e)&&e<t),kl=t=>mt(e=>ze(e)&&e>t),Ul=t=>mt(e=>ze(e)&&e<=t),Yl=t=>mt(e=>ze(e)&&e>=t),Pl=()=>mt(t=>ze(t)&&Number.isInteger(t)),_l=()=>mt(t=>ze(t)&&Number.isFinite(t)),Rl=()=>mt(t=>ze(t)&&t>0),Fl=()=>mt(t=>ze(t)&&t<0),ke=t=>Object.assign($t(t),{between:(e,n)=>ke(It(t,Cl(e,n))),lt:e=>ke(It(t,zl(e))),gt:e=>ke(It(t,kl(e))),lte:e=>ke(It(t,Ul(e))),gte:e=>ke(It(t,Yl(e))),int:()=>ke(It(t,Pl())),finite:()=>ke(It(t,_l())),positive:()=>ke(It(t,Rl())),negative:()=>ke(It(t,Fl()))}),Mp=ke(mt(ze)),Bl=(t,e)=>mt(n=>tn(n)&&t<=n&&e>=n),Hl=t=>mt(e=>tn(e)&&e<t),Ql=t=>mt(e=>tn(e)&&e>t),Gl=t=>mt(e=>tn(e)&&e<=t),Kl=t=>mt(e=>tn(e)&&e>=t),$l=()=>mt(t=>tn(t)&&t>0),Vl=()=>mt(t=>tn(t)&&t<0),en=t=>Object.assign($t(t),{between:(e,n)=>en(It(t,Bl(e,n))),lt:e=>en(It(t,Hl(e))),gt:e=>en(It(t,Ql(e))),lte:e=>en(It(t,Gl(e))),gte:e=>en(It(t,Kl(e))),positive:()=>en(It(t,$l())),negative:()=>en(It(t,Vl()))}),yp=en(mt(tn)),pp=$t(mt(function(t){return typeof t=="boolean"})),mp=$t(mt(function(t){return typeof t=="symbol"})),Np=$t(mt(function(t){return t==null}));var wp={__proto__:null,matcher:re,optional:wa,array:function(...t){return Na({[re]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const n=t[0];let i={};if(e.length===0)return fe(n).forEach(o=>{i[o]=[]}),{matched:!0,selections:i};const r=(o,a)=>{i[o]=(i[o]||[]).concat([a])};return{matched:e.every(o=>Ft(n,o,r)),selections:i}},getSelectionKeys:()=>t.length===0?[]:fe(t[0])})})},set:function(...t){return $t({[re]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};if(t.length===0)return{matched:!0};const i=(o,a)=>{n[o]=(n[o]||[]).concat([a])},r=t[0];return{matched:dp(e,o=>Ft(r,o,i)),selections:n}},getSelectionKeys:()=>t.length===0?[]:fe(t[0])})})},map:function(...t){return $t({[re]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};const i=(s,u)=>{n[s]=(n[s]||[]).concat([u])};if(t.length===0)return{matched:!0};var r;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(r=t[0])==null?void 0:r.toString()}`);const[o,a]=t;return{matched:gp(e,(s,u)=>{const l=Ft(o,u,i),g=Ft(a,s,i);return l&&g}),selections:n}},getSelectionKeys:()=>t.length===0?[]:[...fe(t[0]),...fe(t[1])]})})},intersection:It,union:xl,not:function(t){return $t({[re]:()=>({match:e=>({matched:!Ft(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:mt,select:ji,any:Ol,_:hp,string:fp,between:Cl,lt:zl,gt:kl,lte:Ul,gte:Yl,int:Pl,finite:_l,positive:Rl,negative:Fl,number:Mp,betweenBigInt:Bl,ltBigInt:Hl,gtBigInt:Ql,lteBigInt:Gl,gteBigInt:Kl,positiveBigInt:$l,negativeBigInt:Vl,bigint:yp,boolean:pp,symbol:mp,nullish:Np,instanceOf:function(t){return $t(mt(function(e){return n=>n instanceof e}(t)))},shape:function(t){return $t(mt(lp(t)))}};const La={matched:!1,value:void 0};function Lp(t){return new br(t,La)}class br{constructor(e,n){this.input=void 0,this.state=void 0,this.input=e,this.state=n}with(...e){if(this.state.matched)return this;const n=e[e.length-1],i=[e[0]];let r;e.length===3&&typeof e[1]=="function"?(i.push(e[0]),r=e[1]):e.length>2&&i.push(...e.slice(1,e.length-1));let o=!1,a={};const s=(l,g)=>{o=!0,a[l]=g},u=!i.some(l=>Ft(l,this.input,s))||r&&!r(this.input)?La:{matched:!0,value:n(o?Er in a?a[Er]:a:this.input,this.input)};return new br(this.input,u)}when(e,n){if(this.state.matched)return this;const i=!!e(this.input);return new br(this.input,i?{matched:!0,value:n(this.input,this.input)}:La)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){return this.run()}run(){if(this.state.matched)return this.state.value;let e;try{e=JSON.stringify(this.input)}catch{e=this.input}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}returnType(){return this}}const Wt={PROCESSING:{key:"PROCESSING",reticleType:"processing",minDuration:1e3},SIDE_CAPTURED:{key:"SIDE_CAPTURED",reticleType:"done",minDuration:1e3},FLIP_CARD:{key:"FLIP_CARD",reticleType:"flip",minDuration:3e3},DOCUMENT_CAPTURED:{key:"DOCUMENT_CAPTURED",reticleType:"done",minDuration:1e3},SENSING_FRONT:{key:"SENSING_FRONT",reticleType:"searching",minDuration:1e3},SENSING_BACK:{key:"SENSING_BACK",reticleType:"searching",minDuration:1e3},DOCUMENT_FRAMING_CAMERA_TOO_FAR:{key:"DOCUMENT_FRAMING_CAMERA_TOO_FAR",reticleType:"error",minDuration:1500},DOCUMENT_FRAMING_CAMERA_TOO_CLOSE:{key:"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE",reticleType:"error",minDuration:1500},DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP:{key:"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP",reticleType:"error",minDuration:1500},DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE:{key:"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE",reticleType:"error",minDuration:1500},LIGHTING_TOO_DARK:{key:"LIGHTING_TOO_DARK",reticleType:"error",minDuration:1500},LIGHTING_TOO_BRIGHT:{key:"LIGHTING_TOO_BRIGHT",reticleType:"error",minDuration:1500},BLUR_DETECTED:{key:"BLUR_DETECTED",reticleType:"error",minDuration:1500},GLARE_DETECTED:{key:"GLARE_DETECTED",reticleType:"error",minDuration:1500},OCCLUDED:{key:"OCCLUDED",reticleType:"error",minDuration:1500},WRONG_SIDE:{key:"WRONG_SIDE",reticleType:"error",minDuration:1500}};class Tp{timeWindow=3e3;decayRate=.95;eventStack=[];analyzerSettings;currentUiState=Wt.SENSING_FRONT;currentStateStartTime=performance.now();constructor(e){this.analyzerSettings=e}reset(){this.eventStack=[]}updateSettings(e){this.analyzerSettings=e}getUiState(e){const n=performance.now(),i={stateKey:this.getUiStateKeyFromResult(e),timeStamp:n,currentWeight:1};if(i.stateKey==="SIDE_CAPTURED"||i.stateKey==="DOCUMENT_CAPTURED")return this.eventStack=[],Wt[i.stateKey];this.eventStack.push(i);const r={};if(this.eventStack.forEach(a=>{if(n-a.timeStamp>this.timeWindow){this.eventStack.shift();return}const s=a.timeStamp/n;a.currentWeight*=this.decayRate*s,r[a.stateKey]||(r[a.stateKey]=[]),r[a.stateKey].push(a.currentWeight)}),n-this.currentStateStartTime<this.currentUiState.minDuration)return this.currentUiState;const o={};for(const a in r){const s=a,u=a.length/this.eventStack.length,l=r[s].reduce((g,M)=>g+M,0);o[s]=l*u}try{const a=Sl(o),s=Wt[a];return s!==this.currentUiState&&(this.currentUiState=s,this.currentStateStartTime=n),s}catch{return this.currentUiState}}getUiStateKeyFromResult(e){return Lp(e).with({frameCaptured:!0,captureState:wp.when(n=>n==="first-side-capture-in-progress"||n==="second-side-capture-in-progress")},()=>"PROCESSING").with({captureState:"first-side-capture-in-progress",frameAnalysisStatus:{framingStatus:"no-document"}},()=>"SENSING_FRONT").with({captureState:"second-side-capture-in-progress",frameAnalysisStatus:{framingStatus:"no-document"}},()=>"SENSING_BACK").with({captureState:"document-captured"},()=>"DOCUMENT_CAPTURED").with({captureState:"side-captured"},()=>"SIDE_CAPTURED").with({frameAnalysisStatus:{sideAnalysisStatus:"side-already-captured"}},()=>"WRONG_SIDE").with({frameAnalysisStatus:{framingStatus:"camera-angle-too-steep"}},()=>"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP").with({frameAnalysisStatus:{framingStatus:"camera-too-close"}},()=>"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE").with({frameAnalysisStatus:{framingStatus:"camera-too-far"}},()=>"DOCUMENT_FRAMING_CAMERA_TOO_FAR").with({frameAnalysisStatus:{framingStatus:"document-too-close-to-frame-edge"}},()=>"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE").with({frameAnalysisStatus:{lightingStatus:"too-bright"}},()=>"LIGHTING_TOO_BRIGHT").with({frameAnalysisStatus:{lightingStatus:"too-dark"}},()=>"LIGHTING_TOO_DARK").with({frameAnalysisStatus:{blurStatus:"blur-detected"}},()=>"BLUR_DETECTED").with({frameAnalysisStatus:{glareStatus:"glare-detected"}},()=>"GLARE_DETECTED").with({frameAnalysisStatus:{occlusionStatus:"occluded"}},()=>"OCCLUDED").otherwise(()=>"SENSING_FRONT")}}const Ta=document.createElement("canvas"),ja=Ta.getContext("2d",{willReadFrequently:!0,alpha:!1});function jp(t){if(!ja)throw new Error("CanvasRenderingContext2D is missing!");const e=t.videoWidth,n=t.videoHeight;Ta.width=e,Ta.height=n,ja.drawImage(t,0,0,e,n);const i=ja.getImageData(0,0,e,n);return Ep(i)}function Ep(t){return{data:t.data,width:t.width,height:t.height,colorSpace:t.colorSpace}}const Sp=t=>(e,n,i)=>{const r=i.subscribe;return i.subscribe=(o,a,s)=>{let u=o;if(a){const l=s?.equalityFn||Object.is;let g=o(i.getState());u=M=>{const c=o(M);if(!l(g,c)){const f=g;a(g=c,f)}},s?.fireImmediately&&a(g,g)}return r(u)},t(e,n,i)},bp=Sp,Wl=t=>{let e;const n=new Set,i=(a,s)=>{const u=typeof a=="function"?a(e):a;if(!Object.is(u,e)){const l=e;e=s??typeof u!="object"?u:Object.assign({},e,u),n.forEach(g=>g(e,l))}},r=()=>e,o={setState:i,getState:r,subscribe:a=>(n.add(a),()=>n.delete(a)),destroy:()=>{n.clear()}};return e=t(i,r,o),o},Ap=t=>t?Wl(t):Wl,Zl={cameras:[],videoElement:null,selectedCamera:null,isPlaying:!1,isCapturing:!1,isSwappingCamera:!1,isQueryingCameras:!1,callbacks:{},uiState:structuredClone(Wt.SENSING_FRONT),initialized:!1,errorState:null,analyzerSettings:{}},tt=Ap()(bp(()=>structuredClone(Zl)));tt.subscribe(t=>t.videoElement,(t,e)=>{!t&&e&&ql()});const ql=()=>{console.log("resetting zustand store"),tt.getState().cameras.forEach(t=>{t.stopStream()}),tt.setState(structuredClone(Zl))};let Ar,Ea,Ei,Tn,Sa;async function vp(t,e=!0){if(tt.getState().isPlaying){console.warn("Already streaming");return}if(tt.getState().selectedCamera)console.log("Reusing previous device");else try{await nd()}catch(o){tt.setState({errorState:bl(o)});return}const n=tt.getState();if(!n.selectedCamera){console.warn("No selected camera!");return}const i=await n.selectedCamera.startStream(),r=i.getVideoTracks()[0].getSettings();if(!r.width||!r.height)throw new Error("Video doesn't have dimensions!");if(!t.isConnected)throw new Error("Video element needs to be in the document!");tt.getState().videoElement||Dp(t),t.srcObject=i,t.width=r.width,t.height=r.height,tt.setState({videoElement:t}),e&&await Aa()}async function Xl(){ql(),await Ei.terminate()}function Dp(t){new Nn(e=>{e[0].connected||Xl()}).observe(t),t.playsInline=!0,t.setAttribute("muted","")}async function Ip(t){if(tt.getState().isCapturing){console.warn("Cancel the capture process using `cancelCapture()` before updating settings");return}const e={...tt.getState().analyzerSettings,...t};await Tn.updateSettings(e),Ar.updateSettings(e)}async function xp(t){const e=tt.getState();if(e.selectedCamera===t){console.warn("Already selected");return}if(e.isSwappingCamera)return;const n=e.selectedCamera;tt.setState({isSwappingCamera:!0}),n&&n.stopStream(),e.videoElement&&(e.videoElement.srcObject=null);try{const i=await t.startStream();e.videoElement&&(e.videoElement.srcObject=i,e.isPlaying&&await e.videoElement.play()),tt.setState({selectedCamera:t,isSwappingCamera:!1})}catch(i){console.error(i)}}async function Op(){console.log("stopStream called");const t=tt.getState();if(t.selectedCamera?.stopStream(),!t.videoElement){console.log("no video element");return}t.videoElement.srcObject=null,await td(),va()}async function ba(){const t=tt.getState();if(!t.isCapturing||!t.isPlaying)return;if(!t.videoElement){console.error("Missing video element");return}const e=t.callbacks?.onFrameAnalysis,n=typeof e=="function",i=jp(t.videoElement);Sa=new ImageData(Uint8ClampedArray.from(i.data),i.width,i.height);const r=await Ei.analyze(Ml(i,[i.data.buffer])),o=Ar.getUiState(r);if(tt.setState({uiState:o}),n)try{e(Sa,r)}catch(a){throw console.warn("onFrameAnalysis callback exception"),a}if(n&&window.setTimeout(()=>Sa=null,0),o.key==="SIDE_CAPTURED"){vr(),tt.setState({uiState:Wt.SIDE_CAPTURED}),await new Promise(a=>setTimeout(a,Wt.SIDE_CAPTURED.minDuration)),tt.setState({uiState:Wt.FLIP_CARD}),await new Promise(a=>setTimeout(a,Wt.FLIP_CARD.minDuration)),await Jl();return}if(o.key==="DOCUMENT_CAPTURED"){va(),tt.setState({uiState:Wt.DOCUMENT_CAPTURED}),await new Promise(s=>setTimeout(s,Wt.DOCUMENT_CAPTURED.minDuration));const a=await Tn.getResult();try{t.callbacks?.onCaptureResult?.(a)}catch{console.warn("onCaptureResult callback exception")}return}Ea=t.videoElement.requestVideoFrameCallback(()=>void ba())}async function Jl(){console.log("startCapture called");const t=tt.getState();if(!t.isCapturing){if(!t.videoElement){console.warn("Missing video element");return}if(!t.selectedCamera){console.warn("No active camera!");return}await Aa(),tt.getState().isPlaying&&(tt.setState({isCapturing:!0}),Ea=t.videoElement.requestVideoFrameCallback(()=>void ba()))}}function vr(){console.log("pauseCapture called");const t=tt.getState().videoElement;t&&t.cancelVideoFrameCallback(Ea),tt.setState({isCapturing:!1})}async function td(){console.log("cancelCapture called"),await ed(),Ar.reset(),vr(),tt.setState({uiState:Wt.SENSING_FRONT})}async function ed(){await Tn.reset()}async function Cp(){await Tn.finishSideCapture()}async function nd(){if(tt.getState().isQueryingCameras||tt.getState().isSwappingCamera)return;tt.setState({isQueryingCameras:!0});const t=await rp();if(t.length<1)throw new Error("No capable devices found! Your camera needs to have a minimum resolution of 1920x1080");ep(t);const e=np(t),n=t.find(i=>i.deviceInfo.deviceId===e);tt.setState({cameras:t,selectedCamera:n,isQueryingCameras:!1})}async function Aa(){const t=tt.getState();if(!t.isPlaying){if(!t.videoElement){console.warn("No video element present.");return}if(!t.videoElement.srcObject){console.warn("No source present. Start a camera stream first.");return}if(!t.selectedCamera){console.warn("No selected camera");return}await t.selectedCamera.startStream(),await t.videoElement.play(),tt.setState({isPlaying:!0}),t.isCapturing===!0&&t.videoElement.requestVideoFrameCallback(()=>void ba())}}function va(){console.log("pausePlayback called");const t=tt.getState();if(!t.videoElement){tt.setState({isPlaying:!1});return}vr(),t.videoElement.pause(),tt.setState({isPlaying:!1})}function id(t){tt.setState({callbacks:t})}async function zp(t){try{if(!window.isSecureContext)throw new Error(El`
|
|
236
|
+
`);return await rp(),(await navigator.mediaDevices.enumerateDevices()).filter(t=>t.kind==="videoinput")};async function sp(t){try{const e=await cp(t),n=e.getVideoTracks()[0].getSettings();return ps(e),new ip(t,n)}catch{return console.warn(`DEBUG: Device ${t.deviceId} doesn't support this constraint.`),null}}const ap=t=>{if(Ms.getOS().name!=="Android")return;if(t.some(i=>i.settings.facingMode===void 0)){console.warn("Not all devices have facingMode");return}let e=0,n=0;for(const i of t){const r=i.settings.facingMode;r==="environment"&&(i.name=`Back camera ${++n}`),r==="user"&&(i.name=`Front camera ${++e}`)}},ps=t=>{const e=t.getTracks();for(const n of e)n.stop()},up=t=>{const e={};for(const n of t){const i=n.deviceInfo.deviceId;e[i]=0,n.settings.facingMode==="environment"&&(e[i]+=2),ys&&"torch"in n.settings&&(e[i]+=2),ys&&n.settings.focusMode==="single-shot"&&(e[i]+=2),ys&&n===t[t.length]&&(e[i]+=1),Dl&&n.name==="Back Triple Camera"&&(e[i]+=5),Dl&&n.name==="Back Dual Wide Camera"&&(e[i]+=3)}return bl(e)};function vl(t){return{video:{deviceId:{exact:t.deviceId},frameRate:{exact:30},width:{exact:1920},height:{exact:1080}},audio:!1}}async function cp(t){const e=vl(t);return await navigator.mediaDevices.getUserMedia(e)}async function lp(){const t=await op(),e=[];for await(const n of t){const i=await sp(n);i!==null&&e.push(i)}return e}const Il="application/javascript",dp=(t,e={})=>{const n={skipSameOrigin:!0,useBlob:!0,...e};return n.skipSameOrigin&&new URL(t).origin===self.location.origin?Promise.resolve(t):new Promise((i,r)=>void fetch(t).then(o=>o.text()).then(o=>{const s=new URL(t).href.split("/");s.pop();const a=hs`
|
|
237
|
+
const _importScripts = importScripts;
|
|
238
|
+
const _fixImports = (url) => new URL(url, '${s.join("/")+"/"}').href;
|
|
239
|
+
importScripts = (...urls) => _importScripts(...urls.map(_fixImports));
|
|
240
|
+
`;let u=`data:${Il},`+encodeURIComponent(a+o);n.useBlob&&(u=URL.createObjectURL(new Blob([`importScripts("${u}")`],{type:Il}))),i(u)}).catch(r))},gp=async(t=window.location.href)=>{const e=await dp(t+"/resources/capture-worker.js"),n=new Worker(e);n.onerror=r=>console.error(r);const i=hl(n);return await i.setResourceUrl(t+"/resources"),i};let hp=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const xl="capture-userid";function fp(){const t=localStorage.getItem(xl);if(t)return t;const e=hp();return localStorage.setItem(xl,e),e}function Mp(t){return{licenseId:t.licenseId,licensee:t.licensee,packageName:t.packageName,platform:"Browser",sdkName:t.sdkName,sdkVersion:t.sdkVersion}}async function yp(t){try{return await(await fetch("https://baltazar.microblink.com/api/v1/status/check",{method:"POST",headers:{"Content-Type":"application/json"},cache:"no-cache",body:JSON.stringify(Mp(t))})).json()}catch(e){throw console.error(e),e}}const Qt=Symbol.for("@ts-pattern/matcher"),Ol=Symbol.for("@ts-pattern/isVariadic"),Tr="@ts-pattern/anonymous-select-key",ms=t=>!!(t&&typeof t=="object"),jr=t=>t&&!!t[Qt],bt=(t,e,n)=>{if(jr(t)){const i=t[Qt](),{matched:r,selections:o}=i.match(e);return r&&o&&Object.keys(o).forEach(s=>n(s,o[s])),r}if(ms(t)){if(!ms(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let i=[],r=[],o=[];for(const s of t.keys()){const a=t[s];jr(a)&&a[Ol]?o.push(a):o.length?r.push(a):i.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<i.length+r.length)return!1;const s=e.slice(0,i.length),a=r.length===0?[]:e.slice(-r.length),u=e.slice(i.length,r.length===0?1/0:-r.length);return i.every((l,g)=>bt(l,s[g],n))&&r.every((l,g)=>bt(l,a[g],n))&&(o.length===0||bt(o[0],u,n))}return t.length===e.length&&t.every((s,a)=>bt(s,e[a],n))}return Object.keys(t).every(i=>{const r=t[i];return(i in e||jr(o=r)&&o[Qt]().matcherType==="optional")&&bt(r,e[i],n);var o})}return Object.is(e,t)},Jt=t=>{var e,n,i;return ms(t)?jr(t)?(e=(n=(i=t[Qt]()).getSelectionKeys)==null?void 0:n.call(i))!=null?e:[]:Array.isArray(t)?mi(t,Jt):mi(Object.values(t),Jt):[]},mi=(t,e)=>t.reduce((n,i)=>n.concat(e(i)),[]);function pp(...t){if(t.length===1){const[e]=t;return n=>bt(e,n,()=>{})}if(t.length===2){const[e,n]=t;return bt(e,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function Ot(t){return Object.assign(t,{optional:()=>ws(t),and:e=>Mt(t,e),or:e=>Cl(t,e),select:e=>e===void 0?Ni(t):Ni(e,t)})}function Ns(t){return Object.assign((e=>Object.assign(e,{*[Symbol.iterator](){yield Object.assign(e,{[Ol]:!0})}}))(t),{optional:()=>Ns(ws(t)),select:e=>Ns(e===void 0?Ni(t):Ni(e,t))})}function ws(t){return Ot({[Qt]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return e===void 0?(Jt(t).forEach(r=>i(r,void 0)),{matched:!0,selections:n}):{matched:bt(t,e,i),selections:n}},getSelectionKeys:()=>Jt(t),matcherType:"optional"})})}const mp=(t,e)=>{for(const n of t)if(!e(n))return!1;return!0},Np=(t,e)=>{for(const[n,i]of t.entries())if(!e(i,n))return!1;return!0};function Mt(...t){return Ot({[Qt]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return{matched:t.every(r=>bt(r,e,i)),selections:n}},getSelectionKeys:()=>mi(t,Jt),matcherType:"and"})})}function Cl(...t){return Ot({[Qt]:()=>({match:e=>{let n={};const i=(r,o)=>{n[r]=o};return mi(t,Jt).forEach(r=>i(r,void 0)),{matched:t.some(r=>bt(r,e,i)),selections:n}},getSelectionKeys:()=>mi(t,Jt),matcherType:"or"})})}function st(t){return{[Qt]:()=>({match:e=>({matched:!!t(e)})})}}function Ni(...t){const e=typeof t[0]=="string"?t[0]:void 0,n=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return Ot({[Qt]:()=>({match:i=>{let r={[e??Tr]:i};return{matched:n===void 0||bt(n,i,(o,s)=>{r[o]=s}),selections:r}},getSelectionKeys:()=>[e??Tr].concat(n===void 0?[]:Jt(n))})})}function je(t){return typeof t=="number"}function gn(t){return typeof t=="string"}function Ge(t){return typeof t=="bigint"}const zl=Ot(st(function(t){return!0})),wp=zl,hn=t=>Object.assign(Ot(t),{startsWith:e=>{return hn(Mt(t,(n=e,st(i=>gn(i)&&i.startsWith(n)))));var n},endsWith:e=>{return hn(Mt(t,(n=e,st(i=>gn(i)&&i.endsWith(n)))));var n},minLength:e=>hn(Mt(t,(n=>st(i=>gn(i)&&i.length>=n))(e))),maxLength:e=>hn(Mt(t,(n=>st(i=>gn(i)&&i.length<=n))(e))),includes:e=>{return hn(Mt(t,(n=e,st(i=>gn(i)&&i.includes(n)))));var n},regex:e=>{return hn(Mt(t,(n=e,st(i=>gn(i)&&!!i.match(n)))));var n}}),Lp=hn(st(gn)),kl=(t,e)=>st(n=>je(n)&&t<=n&&e>=n),Ul=t=>st(e=>je(e)&&e<t),Yl=t=>st(e=>je(e)&&e>t),_l=t=>st(e=>je(e)&&e<=t),Pl=t=>st(e=>je(e)&&e>=t),Rl=()=>st(t=>je(t)&&Number.isInteger(t)),Bl=()=>st(t=>je(t)&&Number.isFinite(t)),Fl=()=>st(t=>je(t)&&t>0),Hl=()=>st(t=>je(t)&&t<0),Se=t=>Object.assign(Ot(t),{between:(e,n)=>Se(Mt(t,kl(e,n))),lt:e=>Se(Mt(t,Ul(e))),gt:e=>Se(Mt(t,Yl(e))),lte:e=>Se(Mt(t,_l(e))),gte:e=>Se(Mt(t,Pl(e))),int:()=>Se(Mt(t,Rl())),finite:()=>Se(Mt(t,Bl())),positive:()=>Se(Mt(t,Fl())),negative:()=>Se(Mt(t,Hl()))}),Tp=Se(st(je)),Ql=(t,e)=>st(n=>Ge(n)&&t<=n&&e>=n),Gl=t=>st(e=>Ge(e)&&e<t),Kl=t=>st(e=>Ge(e)&&e>t),$l=t=>st(e=>Ge(e)&&e<=t),Vl=t=>st(e=>Ge(e)&&e>=t),Wl=()=>st(t=>Ge(t)&&t>0),Zl=()=>st(t=>Ge(t)&&t<0),Ke=t=>Object.assign(Ot(t),{between:(e,n)=>Ke(Mt(t,Ql(e,n))),lt:e=>Ke(Mt(t,Gl(e))),gt:e=>Ke(Mt(t,Kl(e))),lte:e=>Ke(Mt(t,$l(e))),gte:e=>Ke(Mt(t,Vl(e))),positive:()=>Ke(Mt(t,Wl())),negative:()=>Ke(Mt(t,Zl()))}),jp=Ke(st(Ge)),Sp=Ot(st(function(t){return typeof t=="boolean"})),Ep=Ot(st(function(t){return typeof t=="symbol"})),bp=Ot(st(function(t){return t==null}));var Ap={__proto__:null,matcher:Qt,optional:ws,array:function(...t){return Ns({[Qt]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const n=t[0];let i={};if(e.length===0)return Jt(n).forEach(o=>{i[o]=[]}),{matched:!0,selections:i};const r=(o,s)=>{i[o]=(i[o]||[]).concat([s])};return{matched:e.every(o=>bt(n,o,r)),selections:i}},getSelectionKeys:()=>t.length===0?[]:Jt(t[0])})})},set:function(...t){return Ot({[Qt]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};if(t.length===0)return{matched:!0};const i=(o,s)=>{n[o]=(n[o]||[]).concat([s])},r=t[0];return{matched:mp(e,o=>bt(r,o,i)),selections:n}},getSelectionKeys:()=>t.length===0?[]:Jt(t[0])})})},map:function(...t){return Ot({[Qt]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let n={};if(e.size===0)return{matched:!0,selections:n};const i=(a,u)=>{n[a]=(n[a]||[]).concat([u])};if(t.length===0)return{matched:!0};var r;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(r=t[0])==null?void 0:r.toString()}`);const[o,s]=t;return{matched:Np(e,(a,u)=>{const l=bt(o,u,i),g=bt(s,a,i);return l&&g}),selections:n}},getSelectionKeys:()=>t.length===0?[]:[...Jt(t[0]),...Jt(t[1])]})})},intersection:Mt,union:Cl,not:function(t){return Ot({[Qt]:()=>({match:e=>({matched:!bt(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:st,select:Ni,any:zl,_:wp,string:Lp,between:kl,lt:Ul,gt:Yl,lte:_l,gte:Pl,int:Rl,finite:Bl,positive:Fl,negative:Hl,number:Tp,betweenBigInt:Ql,ltBigInt:Gl,gtBigInt:Kl,lteBigInt:$l,gteBigInt:Vl,positiveBigInt:Wl,negativeBigInt:Zl,bigint:jp,boolean:Sp,symbol:Ep,nullish:bp,instanceOf:function(t){return Ot(st(function(e){return n=>n instanceof e}(t)))},shape:function(t){return Ot(st(pp(t)))}};const Ls={matched:!1,value:void 0};function Dp(t){return new Sr(t,Ls)}class Sr{constructor(e,n){this.input=void 0,this.state=void 0,this.input=e,this.state=n}with(...e){if(this.state.matched)return this;const n=e[e.length-1],i=[e[0]];let r;e.length===3&&typeof e[1]=="function"?(i.push(e[0]),r=e[1]):e.length>2&&i.push(...e.slice(1,e.length-1));let o=!1,s={};const a=(l,g)=>{o=!0,s[l]=g},u=!i.some(l=>bt(l,this.input,a))||r&&!r(this.input)?Ls:{matched:!0,value:n(o?Tr in s?s[Tr]:s:this.input,this.input)};return new Sr(this.input,u)}when(e,n){if(this.state.matched)return this;const i=!!e(this.input);return new Sr(this.input,i?{matched:!0,value:n(this.input,this.input)}:Ls)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){return this.run()}run(){if(this.state.matched)return this.state.value;let e;try{e=JSON.stringify(this.input)}catch{e=this.input}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}returnType(){return this}}const kt={PROCESSING:{key:"PROCESSING",reticleType:"processing",minDuration:1e3},SIDE_CAPTURED:{key:"SIDE_CAPTURED",reticleType:"done",minDuration:1e3},FLIP_CARD:{key:"FLIP_CARD",reticleType:"flip",minDuration:3e3},DOCUMENT_CAPTURED:{key:"DOCUMENT_CAPTURED",reticleType:"done",minDuration:1e3},SENSING_FRONT:{key:"SENSING_FRONT",reticleType:"searching",minDuration:1e3},SENSING_BACK:{key:"SENSING_BACK",reticleType:"searching",minDuration:1e3},DOCUMENT_FRAMING_CAMERA_TOO_FAR:{key:"DOCUMENT_FRAMING_CAMERA_TOO_FAR",reticleType:"error",minDuration:1500},DOCUMENT_FRAMING_CAMERA_TOO_CLOSE:{key:"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE",reticleType:"error",minDuration:1500},DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP:{key:"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP",reticleType:"error",minDuration:1500},DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE:{key:"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE",reticleType:"error",minDuration:1500},LIGHTING_TOO_DARK:{key:"LIGHTING_TOO_DARK",reticleType:"error",minDuration:1500},LIGHTING_TOO_BRIGHT:{key:"LIGHTING_TOO_BRIGHT",reticleType:"error",minDuration:1500},BLUR_DETECTED:{key:"BLUR_DETECTED",reticleType:"error",minDuration:1500},GLARE_DETECTED:{key:"GLARE_DETECTED",reticleType:"error",minDuration:1500},OCCLUDED:{key:"OCCLUDED",reticleType:"error",minDuration:1500},WRONG_SIDE:{key:"WRONG_SIDE",reticleType:"error",minDuration:1500}};class vp{timeWindow=3e3;decayRate=.95;eventStack=[];analyzerSettings;currentUiState=kt.SENSING_FRONT;currentStateStartTime=performance.now();constructor(e){this.analyzerSettings=e}reset(){this.eventStack=[]}updateSettings(e){this.analyzerSettings=e}getUiState(e){const n=performance.now(),i={stateKey:this.getUiStateKeyFromResult(e),timeStamp:n,currentWeight:1};if(i.stateKey==="SIDE_CAPTURED"||i.stateKey==="DOCUMENT_CAPTURED")return this.eventStack=[],kt[i.stateKey];this.eventStack.push(i);const r={};if(this.eventStack.forEach(s=>{if(n-s.timeStamp>this.timeWindow){this.eventStack.shift();return}const a=s.timeStamp/n;s.currentWeight*=this.decayRate*a,r[s.stateKey]||(r[s.stateKey]=[]),r[s.stateKey].push(s.currentWeight)}),n-this.currentStateStartTime<this.currentUiState.minDuration)return this.currentUiState;const o={};for(const s in r){const a=s,u=s.length/this.eventStack.length,l=r[a].reduce((g,M)=>g+M,0);o[a]=l*u}try{const s=bl(o),a=kt[s];return a!==this.currentUiState&&(this.currentUiState=a,this.currentStateStartTime=n),a}catch{return this.currentUiState}}getUiStateKeyFromResult(e){return Dp(e).with({frameCaptured:!0,captureState:Ap.when(n=>n==="first-side-capture-in-progress"||n==="second-side-capture-in-progress")},()=>"PROCESSING").with({captureState:"first-side-capture-in-progress",frameAnalysisStatus:{framingStatus:"no-document"}},()=>"SENSING_FRONT").with({captureState:"second-side-capture-in-progress",frameAnalysisStatus:{framingStatus:"no-document"}},()=>"SENSING_BACK").with({captureState:"document-captured"},()=>"DOCUMENT_CAPTURED").with({captureState:"side-captured"},()=>"SIDE_CAPTURED").with({frameAnalysisStatus:{sideAnalysisStatus:"side-already-captured"}},()=>"WRONG_SIDE").with({frameAnalysisStatus:{framingStatus:"camera-angle-too-steep"}},()=>"DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP").with({frameAnalysisStatus:{framingStatus:"camera-too-close"}},()=>"DOCUMENT_FRAMING_CAMERA_TOO_CLOSE").with({frameAnalysisStatus:{framingStatus:"camera-too-far"}},()=>"DOCUMENT_FRAMING_CAMERA_TOO_FAR").with({frameAnalysisStatus:{framingStatus:"document-too-close-to-frame-edge"}},()=>"DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE").with({frameAnalysisStatus:{lightingStatus:"too-bright"}},()=>"LIGHTING_TOO_BRIGHT").with({frameAnalysisStatus:{lightingStatus:"too-dark"}},()=>"LIGHTING_TOO_DARK").with({frameAnalysisStatus:{blurStatus:"blur-detected"}},()=>"BLUR_DETECTED").with({frameAnalysisStatus:{glareStatus:"glare-detected"}},()=>"GLARE_DETECTED").with({frameAnalysisStatus:{occlusionStatus:"occluded"}},()=>"OCCLUDED").otherwise(()=>"SENSING_FRONT")}}const Ts=document.createElement("canvas"),js=Ts.getContext("2d",{willReadFrequently:!0,alpha:!1});function Ip(t){if(!js)throw new Error("CanvasRenderingContext2D is missing!");const e=t.videoWidth,n=t.videoHeight;Ts.width=e,Ts.height=n,js.drawImage(t,0,0,e,n);const i=js.getImageData(0,0,e,n);return xp(i)}function xp(t){return{data:t.data,width:t.width,height:t.height,colorSpace:t.colorSpace}}const Op=t=>(e,n,i)=>{const r=i.subscribe;return i.subscribe=(o,s,a)=>{let u=o;if(s){const l=a?.equalityFn||Object.is;let g=o(i.getState());u=M=>{const c=o(M);if(!l(g,c)){const f=g;s(g=c,f)}},a?.fireImmediately&&s(g,g)}return r(u)},t(e,n,i)},Cp=Op,ql=t=>{let e;const n=new Set,i=(s,a)=>{const u=typeof s=="function"?s(e):s;if(!Object.is(u,e)){const l=e;e=a??typeof u!="object"?u:Object.assign({},e,u),n.forEach(g=>g(e,l))}},r=()=>e,o={setState:i,getState:r,subscribe:s=>(n.add(s),()=>n.delete(s)),destroy:()=>{n.clear()}};return e=t(i,r,o),o},zp=t=>t?ql(t):ql,Xl={cameras:[],videoElement:null,selectedCamera:null,isPlaying:!1,isCapturing:!1,isSwappingCamera:!1,isQueryingCameras:!1,callbacks:{},uiState:structuredClone(kt.SENSING_FRONT),initialized:!1,errorState:null,analyzerSettings:{}},V=zp()(Cp(()=>structuredClone(Xl)));V.subscribe(t=>t.videoElement,(t,e)=>{!t&&e&&Jl()});const Jl=()=>{console.log("resetting zustand store"),V.getState().cameras.forEach(t=>{t.stopStream()}),V.setState(structuredClone(Xl))};let Er,Ss,wi,fn,Es;async function kp(t,e=!0){if(V.getState().isPlaying){console.warn("Already streaming");return}if(V.getState().selectedCamera)console.log("Reusing previous device");else try{await rd()}catch(o){V.setState({errorState:Al(o)});return}const n=V.getState();if(!n.selectedCamera){console.warn("No selected camera!");return}const i=await n.selectedCamera.startStream(),r=i.getVideoTracks()[0].getSettings();if(!r.width||!r.height)throw new Error("Video doesn't have dimensions!");if(!t.isConnected)throw new Error("Video element needs to be in the document!");V.getState().videoElement||Up(t),t.srcObject=i,t.width=r.width,t.height=r.height,V.setState({videoElement:t}),e&&await As()}async function td(){Jl(),await wi.terminate()}function Up(t){new dn(e=>{e[0].connected||td()}).observe(t),t.playsInline=!0,t.setAttribute("muted","")}async function Yp(t){if(V.getState().isCapturing){console.warn("Cancel the capture process using `cancelCapture()` before updating settings");return}const e={...V.getState().analyzerSettings,...t};await fn.updateSettings(e),Er.updateSettings(e)}async function _p(t){const e=V.getState();if(e.selectedCamera===t){console.warn("Already selected");return}if(e.isSwappingCamera)return;const n=e.selectedCamera;V.setState({isSwappingCamera:!0}),n&&n.stopStream(),e.videoElement&&(e.videoElement.srcObject=null);try{const i=await t.startStream();e.videoElement&&(e.videoElement.srcObject=i,e.isPlaying&&await e.videoElement.play()),V.setState({selectedCamera:t,isSwappingCamera:!1})}catch(i){console.error(i)}}async function Pp(){console.log("stopStream called");const t=V.getState();if(t.selectedCamera?.stopStream(),!t.videoElement){console.log("no video element");return}t.videoElement.srcObject=null,await nd(),Ds()}async function bs(){const t=V.getState();if(!t.isCapturing||!t.isPlaying)return;if(!t.videoElement){console.error("Missing video element");return}const e=t.callbacks?.onFrameAnalysis,n=typeof e=="function",i=Ip(t.videoElement);Es=new ImageData(Uint8ClampedArray.from(i.data),i.width,i.height);const r=await wi.analyze(pl(i,[i.data.buffer])),o=Er.getUiState(r);if(V.setState({uiState:o}),n)try{e(Es,r)}catch(s){throw console.warn("onFrameAnalysis callback exception"),s}if(n&&window.setTimeout(()=>Es=null,0),o.key==="SIDE_CAPTURED"){br(),V.setState({uiState:kt.SIDE_CAPTURED}),await new Promise(s=>setTimeout(s,kt.SIDE_CAPTURED.minDuration)),V.setState({uiState:kt.FLIP_CARD}),await new Promise(s=>setTimeout(s,kt.FLIP_CARD.minDuration)),await ed();return}if(o.key==="DOCUMENT_CAPTURED"){Ds(),V.setState({uiState:kt.DOCUMENT_CAPTURED}),await new Promise(a=>setTimeout(a,kt.DOCUMENT_CAPTURED.minDuration));const s=await fn.getResult();try{t.callbacks?.onCaptureResult?.(s)}catch{console.warn("onCaptureResult callback exception")}return}Ss=t.videoElement.requestVideoFrameCallback(()=>void bs())}async function ed(){console.log("startCapture called");const t=V.getState();if(!t.isCapturing){if(!t.videoElement){console.warn("Missing video element");return}if(!t.selectedCamera){console.warn("No active camera!");return}await As(),V.getState().isPlaying&&(V.setState({isCapturing:!0}),Ss=t.videoElement.requestVideoFrameCallback(()=>void bs()))}}function br(){console.log("pauseCapture called");const t=V.getState().videoElement;t&&t.cancelVideoFrameCallback(Ss),V.setState({isCapturing:!1})}async function nd(){console.log("cancelCapture called"),await id(),Er.reset(),br(),V.setState({uiState:kt.SENSING_FRONT})}async function id(){await fn.reset()}async function Rp(){await fn.finishSideCapture()}async function rd(){if(V.getState().isQueryingCameras||V.getState().isSwappingCamera)return;V.setState({isQueryingCameras:!0});const t=await lp();if(t.length<1)throw new Error("No capable devices found! Your camera needs to have a minimum resolution of 1920x1080");ap(t);const e=up(t),n=t.find(i=>i.deviceInfo.deviceId===e);V.setState({cameras:t,selectedCamera:n,isQueryingCameras:!1})}async function As(){const t=V.getState();if(!t.isPlaying){if(!t.videoElement){console.warn("No video element present.");return}if(!t.videoElement.srcObject){console.warn("No source present. Start a camera stream first.");return}if(!t.selectedCamera){console.warn("No selected camera");return}await t.selectedCamera.startStream(),await t.videoElement.play(),V.setState({isPlaying:!0}),t.isCapturing===!0&&t.videoElement.requestVideoFrameCallback(()=>void bs())}}function Ds(){console.log("pausePlayback called");const t=V.getState();if(!t.videoElement){V.setState({isPlaying:!1});return}br(),t.videoElement.pause(),V.setState({isPlaying:!1})}function od(t){V.setState({callbacks:t})}async function Bp(t){try{if(!window.isSecureContext)throw new Error(hs`
|
|
236
241
|
Can't load the SDK outside a secure context:
|
|
237
242
|
https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
|
|
238
|
-
`);if(tt.getState().initialized)return console.warn("Already initialized"),rd;Ei=op(t.resourceUrl);const e=sp(),n=await Ei.loadWasm(),i=await n.initializeWithLicenseKey(t.licenseKey,e,!1);if(i.unlockResult===yl.RequiresServerPermission){const o=await cp(i),a=await n.submitServerPermission(JSON.stringify(o));if(console.log(a),a.status!==pl.Ok)throw new Error("Server unlock not ok.")}Tn=await Ei.createAnalyzer();const r={...await Tn.getSettings(),minimumDocumentDpi:200,...t.analyzerSettings};return Ar=new Tp(r),t.analyzerSettings&&await Tn.updateSettings(r),tt.setState({analyzerSettings:r}),t.callbacks&&id(t.callbacks),tt.setState({initialized:!0}),rd}catch(e){throw tt.setState({errorState:bl(e)}),e}}const rd={startCameraStream:vp,stopStream:Op,startPlayback:Aa,pausePlayback:va,startCapture:Jl,pauseCapture:vr,cancelCapture:td,finishSideCapture:Cp,resetAnalyzer:ed,selectCamera:xp,updateCameraDevices:nd,setCallbacks:id,updateAnalyzerSettings:Ip,subscribe:tt.subscribe,getState:tt.getState,destroy:Xl};function od(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=od(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}function nn(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=od(t))&&(i&&(i+=" "),i+=e);return i}const kp=wt('<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.41 6.91a.833.833 0 0 1 1.18 0L10 11.323l4.41-4.411a.833.833 0 1 1 1.18 1.178l-5 5a.833.833 0 0 1-1.18 0l-5-5a.833.833 0 0 1 0-1.178Z" fill="#fff">'),Up=(t={})=>(()=>{const e=kp();return te(e,t,!0,!0),e})(),Yp=wt('<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g fill-rule="evenodd" clip-rule="evenodd" fill="#fff"><path d="M6.322 2.988A1.667 1.667 0 0 1 7.5 2.5h5a1.667 1.667 0 0 1 1.667 1.667A.833.833 0 0 0 15 5h.833a2.5 2.5 0 0 1 2.5 2.5V15a2.5 2.5 0 0 1-2.5 2.5H4.167a2.5 2.5 0 0 1-2.5-2.5V7.5a2.5 2.5 0 0 1 2.5-2.5H5a.833.833 0 0 0 .833-.833c0-.442.176-.866.489-1.179ZM4.167 6.667a.833.833 0 0 0-.834.833V15a.833.833 0 0 0 .834.833h11.666a.834.834 0 0 0 .834-.833V7.5a.833.833 0 0 0-.834-.833H15a2.5 2.5 0 0 1-2.5-2.5h-5a2.5 2.5 0 0 1-2.5 2.5h-.833Z"></path><path d="M10 9.167a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.333Zm-3.333 1.666a3.333 3.333 0 1 1 6.666 0 3.333 3.333 0 0 1-6.666 0Z">'),Pp=(t={})=>(()=>{const e=Yp();return te(e,t,!0,!0),e})(),_p=wt('<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.167 10.833 7.5 14.167l8.333-8.334" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'),Rp=(t={})=>(()=>{const e=_p();return te(e,t,!0,!0),e})();function Fp(t,e=t.getState,n){const i=e(t.getState()),[r,o]=yo(i),a=(u,l)=>{const g=e(l),M=e(u);n!==void 0&&n(g,M)||o(Xh(M))},s=t.subscribe(a);return ut(()=>s()),r}const ad=se(),Bp=t=>{const[e,n]=yo(t.mergedDefaults),i=Fp(tt);Ke(()=>{(async()=>{const o=await zp(t.sdkSettings);n({captureSdk:o})})()}),it(()=>{const o=t.mergedDefaults.dismountFn;if(e.captureSdk){const a=e.captureSdk.subscribe(s=>s.videoElement,(s,u)=>{!s&&u&&o()});ut(()=>a())}});const r={solidStore:e,updateSolidStore:n,sdkStore:i};return T(ad.Provider,{value:r,get children(){return t.children}})};function rn(){const t=ue(ad);if(!t)throw new Error("StoreContext.Provider not in scope");return t}const Hp=()=>{const{solidStore:t,sdkStore:e}=rn(),n=()=>[...e.cameras.map(s=>({value:s.deviceInfo.deviceId,label:s.name,disabled:!1}))],i=()=>n().find(s=>s.value===e.selectedCamera?.deviceInfo.deviceId),r=async s=>{if(!t.captureSdk)return;a(!0);const u=e.cameras.find(l=>l.deviceInfo.deviceId===s);if(!u){console.warn("No camera");return}await t.captureSdk.selectCamera(u),a(!1)},[o,a]=Z(!1);return T(sy,{get options(){return n()},get value(){return i()},optionValue:"value",optionTextValue:"label",optionDisabled:"disabled",placeholder:"Select a camera...",get disabled(){return o()},onChange:s=>void r(s.value),itemComponent:s=>T(X0,{get item(){return s.item},class:"mb-kd2hm8",get children(){return[T(ty,{class:"mb-1v5y2d4",get children(){return s.item.textValue}}),T(J0,{class:"mb-1my8n64",get children(){return T(Rp,{class:"mb-gliefk"})}})]}}),get children(){return[T(uy,{"aria-label":"Camera",class:"mb-16knymi",get children(){return[T(Pp,{class:"mb-1v0j9xg"}),T(ly,{class:"mb-1vhx4rq",children:s=>s.selectedOption().label}),T(iy,{class:"mb-16n64rq",get children(){return T(Up,{class:"mb-1pgdg8r"})}})]}}),T(oy,{get children(){return T(ny,{get class(){return nn("mb-style-scope","mb-qbe87e")},get children(){return T(ry,{class:"mb-1woc7wg"})}})}})]}})},Qp=wt('<svg viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.623 2.195A1.286 1.286 0 1 0 15.805.377L9 7.182 2.195.377A1.286 1.286 0 1 0 .377 2.195L7.182 9 .377 15.805a1.286 1.286 0 0 0 1.818 1.818L9 10.818l6.805 6.805a1.286 1.286 0 0 0 1.818-1.818L10.818 9l6.805-6.805Z" fill="#fff">'),Da=(t={})=>(()=>{const e=Qp();return te(e,t,!0,!0),e})(),Gp=wt("<div>"),Kp=wt("<div><div>"),$p=()=>{const{sdkStore:t,solidStore:e}=rn(),{t:n}=hn();return(()=>{const i=Kp(),r=i.firstChild;return ot(i,T(kt,{get when(){return t.cameras.length>1},get children(){const o=Gp();return xt(o,"mb-15a7aro"),ot(o,T(Hp,{})),o}}),r),xt(r,"mb-1fovbrr"),ot(r,T(ur,{get"aria-label"(){return n.dismiss},onclick:()=>e.dismountFn(),class:"mb-1kkaye",get children(){return T(Da,{width:16})}})),pe(()=>xt(i,nn("mb-sihyjw",Vp))),i})()},Vp="mb-1pqj4ih";function sd(t,e){t.indexOf(e)===-1&&t.push(e)}function Wp(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ud=(t,e,n)=>Math.min(Math.max(n,t),e),Ae={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Si=t=>typeof t=="number",Zn=t=>Array.isArray(t)&&!Si(t[0]),Zp=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function qp(t,e){return Zn(t)?t[Zp(0,t.length,e)]:t}const cd=(t,e,n)=>-n*t+n*e+t,ld=()=>{},on=t=>t,Ia=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function dd(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=Ia(0,e,i);t.push(cd(n,1,r))}}function Xp(t){const e=[0];return dd(e,t-1),e}function Jp(t,e=Xp(t.length),n=on){const i=t.length,r=i-e.length;return r>0&&dd(e,r),o=>{let a=0;for(;a<i-2&&!(o<e[a+1]);a++);let s=ud(0,1,Ia(e[a],e[a+1],o));return s=qp(n,a)(s),cd(t[a],t[a+1],s)}}const gd=t=>Array.isArray(t)&&Si(t[0]),xa=t=>typeof t=="object"&&!!t.createAnimation,qn=t=>typeof t=="function",tm=t=>typeof t=="string",Oa={ms:t=>t*1e3,s:t=>t/1e3},hd=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,em=1e-7,nm=12;function im(t,e,n,i,r){let o,a,s=0;do a=e+(n-e)/2,o=hd(a,i,r)-t,o>0?n=a:e=a;while(Math.abs(o)>em&&++s<nm);return a}function bi(t,e,n,i){if(t===e&&n===i)return on;const r=o=>im(o,0,1,t,n);return o=>o===0||o===1?o:hd(r(o),e,i)}const rm=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const i=n*t,r=e==="end"?Math.floor(i):Math.ceil(i);return ud(0,1,r/t)},fd={ease:bi(.25,.1,.25,1),"ease-in":bi(.42,0,1,1),"ease-in-out":bi(.42,0,.58,1),"ease-out":bi(0,0,.58,1)},om=/\((.*?)\)/;function Md(t){if(qn(t))return t;if(gd(t))return bi(...t);if(fd[t])return fd[t];if(t.startsWith("steps")){const e=om.exec(t);if(e){const n=e[1].split(",");return rm(parseFloat(n[0]),n[1].trim())}}return on}class am{constructor(e,n=[0,1],{easing:i,duration:r=Ae.duration,delay:o=Ae.delay,endDelay:a=Ae.endDelay,repeat:s=Ae.repeat,offset:u,direction:l="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=on,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((M,c)=>{this.resolve=M,this.reject=c}),i=i||Ae.easing,xa(i)){const M=i.createAnimation(n);i=M.easing,n=M.keyframes||n,r=M.duration||r}this.repeat=s,this.easing=Zn(i)?on:Md(i),this.updateDuration(r);const g=Jp(n,u,Zn(i)?i.map(Md):on);this.tick=M=>{var c;o=o;let f=0;this.pauseTime!==void 0?f=this.pauseTime:f=(M-this.startTime)*this.rate,this.t=f,f/=1e3,f=Math.max(f-o,0),this.playState==="finished"&&this.pauseTime===void 0&&(f=this.totalDuration);const d=f/this.duration;let h=Math.floor(d),y=d%1;!y&&d>=1&&(y=1),y===1&&h--;const p=h%2;(l==="reverse"||l==="alternate"&&p||l==="alternate-reverse"&&!p)&&(y=1-y);const w=f>=this.totalDuration?1:Math.min(y,1),m=g(this.easing(w));e(m),this.pauseTime===void 0&&(this.playState==="finished"||f>=this.totalDuration+a)?(this.playState="finished",(c=this.resolve)===null||c===void 0||c.call(this,m)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}var yd=function(){};process.env.NODE_ENV!=="production"&&(yd=function(t,e){if(!t)throw new Error(e)});class sm{setAnimation(e){this.animation=e,e?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ca=new WeakMap;function pd(t){return Ca.has(t)||Ca.set(t,{transforms:[],values:new Map}),Ca.get(t)}function um(t,e){return t.has(e)||t.set(e,new sm),t.get(e)}const cm=["","X","Y","Z"],lm=["translate","scale","rotate","skew"],Xn={x:"translateX",y:"translateY",z:"translateZ"},md={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},dm={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:md,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:on},skew:md},Jn=new Map,Dr=t=>`--motion-${t}`,Ir=["x","y","z"];lm.forEach(t=>{cm.forEach(e=>{Ir.push(t+e),Jn.set(Dr(t+e),dm[t])})});const gm=(t,e)=>Ir.indexOf(t)-Ir.indexOf(e),hm=new Set(Ir),za=t=>hm.has(t),fm=(t,e)=>{Xn[e]&&(e=Xn[e]);const{transforms:n}=pd(t);sd(n,e),t.style.transform=Nd(n)},Nd=t=>t.sort(gm).reduce(Mm,"").trim(),Mm=(t,e)=>`${t} ${e}(var(${Dr(e)}))`,ka=t=>t.startsWith("--"),wd=new Set;function ym(t){if(!wd.has(t)){wd.add(t);try{const{syntax:e,initialValue:n}=Jn.has(t)?Jn.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch{}}}const Ua=(t,e)=>document.createElement("div").animate(t,e),Ld={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ua({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Ua({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Ua({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ya={},ti={};for(const t in Ld)ti[t]=()=>(Ya[t]===void 0&&(Ya[t]=Ld[t]()),Ya[t]);const pm=.015,mm=(t,e)=>{let n="";const i=Math.round(e/pm);for(let r=0;r<i;r++)n+=t(Ia(0,i-1,r))+", ";return n.substring(0,n.length-2)},Td=(t,e)=>qn(t)?ti.linearEasing()?`linear(${mm(t,e)})`:Ae.easing:gd(t)?Nm(t):t,Nm=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;function wm(t,e){for(let n=0;n<t.length;n++)t[n]===null&&(t[n]=n?t[n-1]:e());return t}const Lm=t=>Array.isArray(t)?t:[t];function Pa(t){return Xn[t]&&(t=Xn[t]),za(t)?Dr(t):t}const Ai={get:(t,e)=>{e=Pa(e);let n=ka(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!==0){const i=Jn.get(e);i&&(n=i.initialValue)}return n},set:(t,e,n)=>{e=Pa(e),ka(e)?t.style.setProperty(e,n):t.style[e]=n}};function Tm(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function jm(t,e){var n;let i=e?.toDefaultUnit||on;const r=t[t.length-1];if(tm(r)){const o=((n=r.match(/(-?[\d.]+)([a-z%]*)/))===null||n===void 0?void 0:n[2])||"";o&&(i=a=>a+o)}return i}function Em(){return window.__MOTION_DEV_TOOLS_RECORD}function Sm(t,e,n,i={},r){const o=Em(),a=i.record!==!1&&o;let s,{duration:u=Ae.duration,delay:l=Ae.delay,endDelay:g=Ae.endDelay,repeat:M=Ae.repeat,easing:c=Ae.easing,persist:f=!1,direction:d,offset:h,allowWebkitAcceleration:y=!1}=i;const p=pd(t),w=za(e);let m=ti.waapi();w&&fm(t,e);const N=Pa(e),j=um(p.values,N),b=Jn.get(N);return Tm(j.animation,!(xa(c)&&j.generator)&&i.record!==!1),()=>{const S=()=>{var Y,U;return(U=(Y=Ai.get(t,N))!==null&&Y!==void 0?Y:b?.initialValue)!==null&&U!==void 0?U:0};let v=wm(Lm(n),S);const F=jm(v,b);if(xa(c)){const Y=c.createAnimation(v,e!=="opacity",S,N,j);c=Y.easing,v=Y.keyframes||v,u=Y.duration||u}if(ka(N)&&(ti.cssRegisterProperty()?ym(N):m=!1),w&&!ti.linearEasing()&&(qn(c)||Zn(c)&&c.some(qn))&&(m=!1),m){b&&(v=v.map(C=>Si(C)?b.toDefaultUnit(C):C)),v.length===1&&(!ti.partialKeyframes()||a)&&v.unshift(S());const Y={delay:Oa.ms(l),duration:Oa.ms(u),endDelay:Oa.ms(g),easing:Zn(c)?void 0:Td(c,u),direction:d,iterations:M+1,fill:"both"};s=t.animate({[N]:v,offset:h,easing:Zn(c)?c.map(C=>Td(C,u)):void 0},Y),s.finished||(s.finished=new Promise((C,I)=>{s.onfinish=C,s.oncancel=I}));const U=v[v.length-1];s.finished.then(()=>{f||(Ai.set(t,N,U),s.cancel())}).catch(ld),y||(s.playbackRate=1.000001)}else if(r&&w)v=v.map(Y=>typeof Y=="string"?parseFloat(Y):Y),v.length===1&&v.unshift(parseFloat(S())),s=new r(Y=>{Ai.set(t,N,F?F(Y):Y)},v,Object.assign(Object.assign({},i),{duration:u,easing:c}));else{const Y=v[v.length-1];Ai.set(t,N,b&&Si(Y)?b.toDefaultUnit(Y):Y)}return a&&o(t,e,v,{duration:u,delay:l,easing:c,repeat:M,offset:h},"motion-one"),j.setAnimation(s),s}}const bm=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function Am(t,e){var n;return typeof t=="string"?e?((n=e[t])!==null&&n!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const vm={any:0,all:1};function Dm(t,e,{root:n,margin:i,amount:r="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const o=Am(t),a=new WeakMap,s=l=>{l.forEach(g=>{const M=a.get(g.target);if(g.isIntersecting!==!!M)if(g.isIntersecting){const c=e(g);qn(c)?a.set(g.target,c):u.unobserve(g.target)}else M&&(M(g),a.delete(g.target))})},u=new IntersectionObserver(s,{root:n,rootMargin:i,threshold:typeof r=="number"?r:vm[r]});return o.forEach(l=>u.observe(l)),()=>u.disconnect()}function Im(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!xm(t,e):t!==e}function xm(t,e){const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function Om(t){return typeof t=="object"}function jd(t,e){if(Om(t))return t;if(t&&e)return e[t]}let an;function Cm(){if(!an)return;const t=an.sort(km).map(Um);t.forEach(Ed),t.forEach(Ed),an=void 0}function _a(t){an?sd(an,t):(an=[t],requestAnimationFrame(Cm))}function zm(t){an&&Wp(an,t)}const km=(t,e)=>t.getDepth()-e.getDepth(),Um=t=>t.animateUpdates(),Ed=t=>t.next(),Sd=(t,e)=>new CustomEvent(t,{detail:{target:e}});function Ra(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEvent:n}}))}function bd(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEntry:n}}))}const Ym={isActive:t=>!!t.inView,subscribe:(t,{enable:e,disable:n},{inViewOptions:i={}})=>{const{once:r}=i,o=Yo(i,["once"]);return Dm(t,a=>{if(e(),bd(t,"viewenter",a),!r)return s=>{n(),bd(t,"viewleave",s)}},o)}},Ad=(t,e,n)=>i=>{i.pointerType&&i.pointerType!=="mouse"||(n(),Ra(t,e,i))},Pm={isActive:t=>!!t.hover,subscribe:(t,{enable:e,disable:n})=>{const i=Ad(t,"hoverstart",e),r=Ad(t,"hoverend",n);return t.addEventListener("pointerenter",i),t.addEventListener("pointerleave",r),()=>{t.removeEventListener("pointerenter",i),t.removeEventListener("pointerleave",r)}}},_m={isActive:t=>!!t.press,subscribe:(t,{enable:e,disable:n})=>{const i=o=>{n(),Ra(t,"pressend",o),window.removeEventListener("pointerup",i)},r=o=>{e(),Ra(t,"pressstart",o),window.addEventListener("pointerup",i)};return t.addEventListener("pointerdown",r),()=>{t.removeEventListener("pointerdown",r),window.removeEventListener("pointerup",i)}}},xr={inView:Ym,hover:Pm,press:_m},vd=["initial","animate",...Object.keys(xr),"exit"],Fa=new WeakMap;function Rm(t={},e){let n,i=e?e.getDepth()+1:0;const r={initial:!0,animate:!0},o={},a={};for(const h of vd)a[h]=typeof t[h]=="string"?t[h]:e?.getContext()[h];const s=t.initial===!1?"animate":"initial";let u=jd(t[s]||a[s],t.variants)||{},l=Yo(u,["transition"]);const g=Object.assign({},l);function*M(){var h,y;const p=l;l={};const w={};for(const S of vd){if(!r[S])continue;const v=jd(t[S]);if(v)for(const F in v)F!=="transition"&&(l[F]=v[F],w[F]=bm((y=(h=v.transition)!==null&&h!==void 0?h:t.transition)!==null&&y!==void 0?y:{},F))}const m=new Set([...Object.keys(l),...Object.keys(p)]),N=[];m.forEach(S=>{var v;l[S]===void 0&&(l[S]=g[S]),Im(p[S],l[S])&&((v=g[S])!==null&&v!==void 0||(g[S]=Ai.get(n,S)),N.push(Sm(n,S,l[S],w[S],am)))}),yield;const j=N.map(S=>S()).filter(Boolean);if(!j.length)return;const b=l;n.dispatchEvent(Sd("motionstart",b)),Promise.all(j.map(S=>S.finished)).then(()=>{n.dispatchEvent(Sd("motioncomplete",b))}).catch(ld)}const c=(h,y)=>()=>{r[h]=y,_a(d)},f=()=>{for(const h in xr){const y=xr[h].isActive(t),p=o[h];y&&!p?o[h]=xr[h].subscribe(n,{enable:c(h,!0),disable:c(h,!1)},t):!y&&p&&(p(),delete o[h])}},d={update:h=>{n&&(t=h,f(),_a(d))},setActive:(h,y)=>{n&&(r[h]=y,_a(d))},animateUpdates:M,getDepth:()=>i,getTarget:()=>l,getOptions:()=>t,getContext:()=>a,mount:h=>(yd(!!h,"Animation state must be mounted with valid Element"),n=h,Fa.set(n,d),f(),()=>{Fa.delete(n),zm(d);for(const y in o)o[y]()}),isMounted:()=>!!n};return d}function Fm(t){const e={},n=[];for(let i in t){const r=t[i];za(i)&&(Xn[i]&&(i=Xn[i]),n.push(i),i=Dr(i));let o=Array.isArray(r)?r[0]:r;const a=Jn.get(i);a&&(o=Si(r)?a.toDefaultUnit(r):r),e[i]=o}return n.length&&(e.transform=Nd(n)),e}var Bm=()=>{},Dd=(t,e)=>e();function Hm(t,e){const n=Ut(t),i=n?[n]:[],{onEnter:r=Dd,onExit:o=Dd}=e,[a,s]=Z(e.appear?[]:i),[u]=mh();let l,g=!1;function M(d,h){if(!d)return h&&h();g=!0,o(d,()=>{ro(()=>{g=!1,s(y=>y.filter(p=>p!==d)),h&&h()})})}function c(d){const h=l;if(!h)return d&&d();l=void 0,s(y=>[h,...y]),r(h,d??Bm)}const f=e.mode==="out-in"?d=>g||M(d,c):e.mode==="in-out"?d=>c(()=>M(d)):d=>{c(),M(d)};return Ws(d=>{const h=t();return Ut(u)?(u(),d):(h!==d&&(l=h,ro(()=>Ut(()=>f(d)))),h)},e.appear?void 0:n),a}const Id=se(),Qm=t=>{let e=t.initial!==!1;const n=T(Id.Provider,{value:()=>e,get children(){return T(Ba.Provider,{value:void 0,get children(){return Hm(hf(()=>t.children),{appear:e,mode:t.exitBeforeEnter?"out-in":"parallel",onExit(i,r){const o=Fa.get(i);o&&o.getOptions().exit?xd(i,r):r()}})}})}});return e=!0,n},xd=(t,e)=>t.addEventListener("motioncomplete",e);function Gm(t,e,n,i){const r=Rm(n?.()===!1?{...e(),initial:!1}:e(),i);return Ke(()=>{const o=r.mount(t());ut(()=>{n&&e().exit?(r.setActive("exit",!0),xd(t(),o)):o()}),qn(e)&&it(()=>r.update(e()))}),[r,Fm(r.getTarget())]}const Km=["initial","animate","inView","inViewOptions","hover","press","variants","transition","exit"],$m=["tag","ref","style","onMotionStart","onMotionComplete","onHoverStart","onHoverEnd","onPressStart","onPressEnd","onViewEnter","onViewLeave"],Ba=se(),Od=t=>{const[e,,n]=St(t,Km,$m),[i,r]=Gm(()=>o,()=>({...e}),ue(Id),ue(Ba));let o;return T(Ba.Provider,{value:i,get children(){return T(ui,ht({ref:a=>{o=a,t.ref?.(a)},get component(){return t.tag||"div"},get style(){return V(()=>!!t.style)()?Nu(t.style,r):r},get"on:motionstart"(){return t.onMotionStart},get"on:motioncomplete"(){return t.onMotionComplete},get"on:hoverstart"(){return t.onHoverStart},get"on:hoverend"(){return t.onHoverEnd},get"on:pressstart"(){return t.onPressStart},get"on:pressend"(){return t.onPressEnd},get"on:viewenter"(){return t.onViewEnter},get"on:viewleave"(){return t.onViewLeave}},n))}})},ei=new Proxy(Od,{get:(t,e)=>n=>T(Od,ht(n,{tag:e}))}),Vm=wt('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 96 60"><path fill="#fff" fill-rule="evenodd" d="M0 6a6 6 0 0 1 6-6h84a6 6 0 0 1 6 6v48a6 6 0 0 1-6 6H6a6 6 0 0 1-6-6V6Zm10.2 7.8c0-1.325 1.11-2.4 2.48-2.4h69.44c1.37 0 2.48 1.075 2.48 2.4s-1.11 2.4-2.48 2.4H12.68c-1.37 0-2.48-1.074-2.48-2.4Zm70.5 35.4a3.9 3.9 0 1 0 0-7.8 3.9 3.9 0 0 0 0 7.8Zm-70.5-3c0-1.326 1.098-2.4 2.451-2.4H34.15c1.353 0 2.451 1.075 2.451 2.4s-1.098 2.4-2.451 2.4h-21.5c-1.354 0-2.451-1.075-2.451-2.4Zm2.474-13.8c-1.366 0-2.474 1.075-2.474 2.4 0 1.326 1.108 2.4 2.474 2.4h30.452c1.366 0 2.474-1.075 2.474-2.4s-1.108-2.4-2.474-2.4H12.674Z" clip-rule="evenodd">'),Wm=(t={})=>(()=>{const e=Vm();return te(e,t,!0,!0),e})(),Zm=wt('<svg viewBox="0 0 96 60" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 0a6 6 0 0 0-6 6v48a6 6 0 0 0 6 6h84a6 6 0 0 0 6-6V6a6 6 0 0 0-6-6H6Zm42.671 10.8c-1.365 0-2.471 1.074-2.471 2.4 0 1.325 1.106 2.4 2.471 2.4H82.13c1.365 0 2.471-1.075 2.471-2.4s-1.106-2.4-2.471-2.4H48.67ZM72 49.2c0-1.326 1.058-2.4 2.364-2.4h7.272c1.306 0 2.364 1.075 2.364 2.4s-1.058 2.4-2.364 2.4h-7.272C73.058 51.6 72 50.525 72 49.2ZM48.702 33.6c-1.382 0-2.502 1.075-2.502 2.4s1.12 2.4 2.502 2.4h15.396c1.382 0 2.502-1.075 2.502-2.4s-1.12-2.4-2.502-2.4H48.702Zm-2.502-9c0-1.326 1.106-2.4 2.471-2.4H82.13c1.365 0 2.471 1.075 2.471 2.4S83.494 27 82.129 27H48.67c-1.365 0-2.471-1.075-2.471-2.4ZM13.265 10.8c-1.693 0-3.065 1.407-3.065 3.144v24.024c0 1.117.569 2.097 1.42 2.653.266.174.59.224.894.138a1.12 1.12 0 0 0 .698-.587c1.385-2.82 3.678-5.021 6.438-6.162.373-.154.637-.504.688-.915.05-.41-.119-.816-.443-1.062a7.227 7.227 0 0 1-2.84-5.78c0-3.962 3.115-7.164 6.945-7.164s6.944 3.203 6.944 7.165a7.227 7.227 0 0 1-2.839 5.78 1.155 1.155 0 0 0-.442 1.061c.05.41.314.76.688.915 2.76 1.14 5.052 3.343 6.437 6.162.142.288.395.501.698.587.304.086.628.036.893-.138a3.162 3.162 0 0 0 1.421-2.653V13.944c0-1.737-1.372-3.144-3.065-3.144h-21.47Z" fill="#fff">'),qm=(t={})=>(()=>{const e=Zm();return te(e,t,!0,!0),e})(),Xm=wt('<svg viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="96" height="96" rx="48" fill="#fff"></rect><path d="M44.972 57.46a1.995 1.995 0 0 1-1.414-.584l-8.484-8.486a2 2 0 1 1 2.826-2.83l7.07 7.07L57.7 39.904a2 2 0 1 1 2.83 2.828L46.386 56.876a1.995 1.995 0 0 1-1.414.584Z" fill="#000">'),Jm=(t={})=>(()=>{const e=Xm();return te(e,t,!0,!0),e})(),t1=wt('<svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" fill-rule="evenodd" clip-rule="evenodd" d="M50 7.692C26.634 7.692 7.692 26.634 7.692 50S26.634 92.308 50 92.308 92.308 73.366 92.308 50 73.366 7.692 50 7.692ZM0 50C0 22.386 22.386 0 50 0s50 22.386 50 50-22.386 50-50 50S0 77.614 0 50Z" fill="#fff"></path><circle cx="50" cy="50" r="4" fill="#fff">'),e1=(t={})=>(()=>{const e=t1();return te(e,t,!0,!0),e})(),n1=wt('<svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" fill-rule="evenodd" clip-rule="evenodd" d="M67.122 11.998a42.158 42.158 0 0 0-34.244 0l-3.397-7.644a50.523 50.523 0 0 1 41.038 0l-3.397 7.644Zm-55.124 20.88a42.158 42.158 0 0 0 0 34.244l-7.644 3.397a50.523 50.523 0 0 1 0-41.038l7.644 3.397Zm76.004 34.244a42.157 42.157 0 0 0 0-34.244l7.644-3.397a50.519 50.519 0 0 1 0 41.038l-7.644-3.397Zm-55.124 20.88a42.157 42.157 0 0 0 34.244 0l3.397 7.644a50.519 50.519 0 0 1-41.038 0l3.397-7.644Z" fill="#fff"></path><circle cx="50" cy="50" r="4" fill="#fff">'),i1=(t={})=>(()=>{const e=n1();return te(e,t,!0,!0),e})(),r1=wt('<svg viewBox="0 0 101 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".3" fill-rule="evenodd" clip-rule="evenodd" d="M50.301 7.692C26.935 7.692 7.994 26.634 7.994 50S26.935 92.308 50.3 92.308C73.667 92.308 92.61 73.366 92.61 50S73.667 7.692 50.301 7.692ZM.301 50c0-27.614 22.386-50 50-50s50 22.386 50 50-22.386 50-50 50-50-22.386-50-50Z" fill="#fff"></path><circle cx="50.3" cy="50" r="4" fill="#fff"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M29.148 13.36C8.912 25.043 1.977 50.918 13.662 71.154L7 75C-6.807 51.085 1.387 20.506 25.301 6.699l3.847 6.661Z" fill="#fff">'),o1=(t={})=>(()=>{const e=r1();return te(e,t,!0,!0),e})(),Cd={SENSING_FRONT:"scan_the_front_side",SENSING_BACK:"scan_the_back_side",FLIP_CARD:"flip_document",WRONG_SIDE:"scanning_wrong_side",BLUR_DETECTED:"blur_detected",GLARE_DETECTED:"glare_detected",OCCLUDED:"occluded",DOCUMENT_FRAMING_CAMERA_TOO_CLOSE:"move_farther",DOCUMENT_FRAMING_CAMERA_TOO_FAR:"move_closer",DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE:"document_too_close_to_edge",DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP:"camera_angle_too_steep",LIGHTING_TOO_DARK:"lightning_too_dark",LIGHTING_TOO_BRIGHT:"lightning_too_bright"},a1=wt("<div><div><div><div>"),Ha=wt("<div>"),s1=()=>{const{sdkStore:t}=rn();return(()=>{const e=a1(),n=e.firstChild,i=n.firstChild,r=i.firstChild;return xt(e,"mb-79tnxm"),xt(i,"mb-1kst2vr"),xt(r,"mb-qaqzbh"),ot(r,T(co,{get children(){return[T(Pe,{get when(){return t.uiState.reticleType==="searching"},get children(){return T(l1,{})}}),T(Pe,{get when(){return t.uiState.reticleType==="processing"},get children(){return T(g1,{})}}),T(Pe,{get when(){return t.uiState.reticleType==="error"},get children(){return T(d1,{})}}),T(Pe,{get when(){return t.uiState.reticleType==="done"},get children(){return T(u1,{})}}),T(Pe,{get when(){return t.uiState.reticleType==="flip"},get children(){return T(c1,{})}})]}})),ot(n,T(h1,{get uiState(){return t.uiState}}),null),e})()},u1=()=>T(ei,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1,transition:{easing:"ease-in-out",duration:.3}},exit:{opacity:0,scale:5},get children(){return T(Jm,{class:"mb-oegy9h"})}}),c1=()=>(()=>{const t=Ha();return xt(t,"mb-ah9it3"),ot(t,T(ei,{class:"mb-pcpdyq",initial:{opacity:0},get animate(){return{opacity:1,rotateY:["180deg"],transition:{rotateY:{duration:(Wt.FLIP_CARD.minDuration-100)/1e3},opacity:{duration:.5}}}},exit:{opacity:0},get children(){return[T(qm,{class:zd}),T(Wm,{get class(){return nn(zd,"mb-12tdqjq")}})]}})),t})(),zd="mb-3q2rd5",Qa=t=>T(ei.div,{class:"mb-1v17koz",initial:{opacity:0},get animate(){return{opacity:1,background:t.type==="error"?"var(--mb-reticle-error)":"var(--mb-reticle-ok)",transition:{delay:.05}}},transition:{duration:.05},get children(){return t.children}}),l1=()=>T(Qa,{type:"searching",get children(){return T(ei,{class:"mb-5pevkr",animate:{opacity:1,transform:"rotate(360deg)"},transition:{transform:{duration:1,easing:"ease-in-out",repeat:1/0}},get children(){return T(i1,{class:"mb-1i7l9ps"})}})}}),d1=()=>T(Qa,{type:"error",get children(){return T(e1,{class:"mb-1omzjeg"})}}),g1=()=>T(Qa,{type:"processing",get children(){return T(ei,{animate:{opacity:1,rotate:"360deg"},transition:{rotate:{duration:.8,easing:[.23,.58,.58,.23],repeat:1/0}},get children(){return T(o1,{class:"mb-1i7l9ps"})}})}}),h1=t=>{const{t:e}=hn(),n=()=>{if(t.uiState.key in Cd)return Cd[t.uiState.key]};return(()=>{const i=Ha();return xt(i,"mb-dcm5x3"),ot(i,T(Qm,{exitBeforeEnter:!0,get children(){return T(cf,{on:()=>t.uiState.key,get children(){return T(kt,{get when(){return n()},get children(){return T(ei.div,{initial:{opacity:0,transform:"translateY(30px)"},animate:{opacity:1,transform:"translateY(0)",transition:{delay:.05}},transition:{duration:.05},exit:{opacity:0,transform:"translateY(-30px)"},class:"mb-j1awg8",get children(){const r=Ha();return ot(r,()=>e[n()]),r}})}})}})}})),i})()},f1=wt('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 36 36"><path fill="#0062F2" fill-rule="evenodd" d="M12 15c0-3.315 2.685-6 6-6s6 2.685 6 6c0 1.924-1.185 2.96-2.339 3.968-1.095.957-2.161 1.889-2.161 3.532h-3c0-2.732 1.413-3.815 2.656-4.767C20.13 16.985 21 16.319 21 15c0-1.65-1.35-3-3-3s-3 1.35-3 3h-3Zm7.5 9v3h-3v-3h3Z" clip-rule="evenodd">'),M1=(t={})=>(()=>{const e=f1();return te(e,t,!0,!0),e})(),y1=wt("<p>"),p1=wt("<div>"),m1=()=>{const{updateSolidStore:t}=rn(),{t:e}=hn();return(()=>{const n=p1();return ot(n,T(yy,{overflowPadding:32,get children(){return[T(py,{onclick:()=>t({helpVisible:!0}),class:N1,get children(){return T(M1,{class:"mb-1slvbtw"})}}),T(hy,{get children(){return T(gy,{get class(){return nn(w1,"mb-style-scope")},get children(){return[T(D0,{}),(()=>{const i=y1();return ot(i,()=>e.need_help_tooltip),i})()]}})}})]}})),n})()},N1="mb-posxld",w1="mb-1lgdfjp";var L1=t=>typeof t=="function"&&!t.length?t():t,ni=function(){return ni=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},ni.apply(this,arguments)};function kd(t,e,n){if(n||arguments.length===2)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function Ud(t){return Array.prototype.slice.call(t)}function Yd(t,e){var n=Math.floor(t);return n===e||n+1===e?t:e}function Pd(){return Date.now()}function Ga(t,e,n){if(e="data-keen-slider-"+e,n===null)return t.removeAttribute(e);t.setAttribute(e,n||"")}function Or(t,e){return e=e||document,typeof t=="function"&&(t=t(e)),Array.isArray(t)?t:typeof t=="string"?Ud(e.querySelectorAll(t)):t instanceof HTMLElement?[t]:t instanceof NodeList?Ud(t):[]}function vi(t){t.raw&&(t=t.raw),t.cancelable&&!t.defaultPrevented&&t.preventDefault()}function Di(t){t.raw&&(t=t.raw),t.stopPropagation&&t.stopPropagation()}function _d(){var t=[];return{add:function(e,n,i,r){e.addListener?e.addListener(i):e.addEventListener(n,i,r),t.push([e,n,i,r])},input:function(e,n,i,r){this.add(e,n,function(o){return function(a){a.nativeEvent&&(a=a.nativeEvent);var s=a.changedTouches||[],u=a.targetTouches||[],l=a.detail&&a.detail.x?a.detail:null;return o({id:l?l.identifier?l.identifier:"i":u[0]?u[0]?u[0].identifier:"e":"d",idChanged:l?l.identifier?l.identifier:"i":s[0]?s[0]?s[0].identifier:"e":"d",raw:a,x:l&&l.x?l.x:u[0]?u[0].screenX:l?l.x:a.pageX,y:l&&l.y?l.y:u[0]?u[0].screenY:l?l.y:a.pageY})}}(i),r)},purge:function(){t.forEach(function(e){e[0].removeListener?e[0].removeListener(e[2]):e[0].removeEventListener(e[1],e[2],e[3])}),t=[]}}}function Ka(t,e,n){return Math.min(Math.max(t,e),n)}function ve(t){return(t>0?1:0)-(t<0?1:0)||+t}function Rd(t){var e=t.getBoundingClientRect();return{height:Yd(e.height,t.offsetHeight),width:Yd(e.width,t.offsetWidth)}}function Zt(t,e,n,i){var r=t&&t[e];return r==null?n:i&&typeof r=="function"?r():r}function je(t){return Math.round(1e6*t)/1e6}function T1(t){var e,n,i,r,o,a;function s(c){a||(a=c),u(!0);var f=c-a;f>i&&(f=i);var d=r[n];if(d[3]<f)return n++,s(c);var h=d[2],y=d[4],p=d[0],w=d[1]*(0,d[5])(y===0?1:(f-h)/y);if(w&&t.track.to(p+w),f<i)return g();a=null,u(!1),l(null),t.emit("animationEnded")}function u(c){e.active=c}function l(c){e.targetIdx=c}function g(){var c;c=s,o=window.requestAnimationFrame(c)}function M(){var c;c=o,window.cancelAnimationFrame(c),u(!1),l(null),a&&t.emit("animationStopped"),a=null}return e={active:!1,start:function(c){if(M(),t.track.details){var f=0,d=t.track.details.position;n=0,i=0,r=c.map(function(h){var y,p=Number(d),w=(y=h.earlyExit)!==null&&y!==void 0?y:h.duration,m=h.easing,N=h.distance*m(w/h.duration)||0;d+=N;var j=i;return i+=w,f+=N,[p,h.distance,j,i,h.duration,m]}),l(t.track.distToIdx(f)),g(),t.emit("animationStarted")}},stop:M,targetIdx:null}}function j1(t){var e,n,i,r,o,a,s,u,l,g,M,c,f,d,h=1/0,y=[],p=null,w=0;function m(x){C(w+x)}function N(x){var k=j(w+x).abs;return v(k)?k:null}function j(x){var k=Math.floor(Math.abs(je(x/n))),D=je((x%n+n)%n);D===n&&(D=0);var P=ve(x),R=s.indexOf(kd([],s,!0).reduce(function(q,et){return Math.abs(et-D)<Math.abs(q-D)?et:q})),H=R;return P<0&&k++,R===a&&(H=0,k+=P>0?1:-1),{abs:H+k*a*P,origin:R,rel:H}}function b(x,k,D){var P;if(k||!Y())return S(x,D);if(!v(x))return null;var R=j(D??w),H=R.abs,q=x-R.rel,et=H+q;P=S(et);var st=S(et-a*ve(q));return(st!==null&&Math.abs(st)<Math.abs(P)||P===null)&&(P=st),je(P)}function S(x,k){if(k==null&&(k=je(w)),!v(x)||x===null)return null;x=Math.round(x);var D=j(k),P=D.abs,R=D.rel,H=D.origin,q=U(x),et=(k%n+n)%n,st=s[H],bt=Math.floor((x-(P-R))/a)*n;return je(st-et-st+s[q]+bt+(H===a?n:0))}function v(x){return F(x)===x}function F(x){return Ka(x,l,g)}function Y(){return r.loop}function U(x){return(x%a+a)%a}function C(x){var k;k=x-w,y.push({distance:k,timestamp:Pd()}),y.length>6&&(y=y.slice(-6)),w=je(x);var D=I().abs;if(D!==p){var P=p!==null;p=D,P&&t.emit("slideChanged")}}function I(x){var k=x?null:function(){if(a){var D=Y(),P=D?(w%n+n)%n:w,R=(D?w%n:w)-o[0][2],H=0-(R<0&&D?n-Math.abs(R):R),q=0,et=j(w),st=et.abs,bt=et.rel,Bt=o[bt][2],Lt=o.map(function(B,lt){var Nt=H+q;(Nt<0-B[0]||Nt>1)&&(Nt+=(Math.abs(Nt)>n-1&&D?n:0)*ve(-Nt));var Ee=lt-bt,oe=ve(Ee),L=Ee+st;D&&(oe===-1&&Nt>Bt&&(L+=a),oe===1&&Nt<Bt&&(L-=a),M!==null&&L<M&&(Nt+=n),c!==null&&L>c&&(Nt-=n));var A=Nt+B[0]+B[1],G=Math.max(Nt>=0&&A<=1?1:A<0||Nt>1?0:Nt<0?Math.min(1,(B[0]+Nt)/B[0]):(1-Nt)/B[0],0);return q+=B[0]+B[1],{abs:L,distance:r.rtl?-1*Nt+1-B[0]:Nt,portion:G,size:B[0]}});return st=F(st),bt=U(st),{abs:F(st),length:i,max:d,maxIdx:g,min:f,minIdx:l,position:w,progress:D?P/n:w/i,rel:bt,slides:Lt,slidesLength:n}}}();return e.details=k,t.emit("detailsChanged"),k}return e={absToRel:U,add:m,details:null,distToIdx:N,idxToDist:b,init:function(x){if(function(){if(r=t.options,o=(r.trackConfig||[]).map(function(R){return[Zt(R,"size",1),Zt(R,"spacing",0),Zt(R,"origin",0)]}),a=o.length){n=je(o.reduce(function(R,H){return R+H[0]+H[1]},0));var D,P=a-1;i=je(n+o[0][2]-o[P][0]-o[P][2]-o[P][1]),s=o.reduce(function(R,H){if(!R)return[0];var q=o[R.length-1],et=R[R.length-1]+(q[0]+q[2])+q[1];return et-=H[2],R[R.length-1]>et&&(et=R[R.length-1]),et=je(et),R.push(et),(!D||D<et)&&(u=R.length-1),D=et,R},null),i===0&&(u=0),s.push(je(n))}}(),!a)return I(!0);var k;(function(){var D=t.options.range,P=t.options.loop;M=l=P?Zt(P,"min",-1/0):0,c=g=P?Zt(P,"max",h):u;var R=Zt(D,"min",null),H=Zt(D,"max",null);R!==null&&(l=R),H!==null&&(g=H),f=l===-1/0?l:t.track.idxToDist(l||0,!0,0),d=g===h?g:b(g,!0,0),H===null&&(c=g),Zt(D,"align",!1)&&g!==h&&o[U(g)][2]===0&&(d-=1-o[U(g)][0],g=N(d-w)),f=je(f),d=je(d)})(),k=x,Number(k)===k?m(S(F(x))):I()},to:C,velocity:function(){var x=Pd(),k=y.reduce(function(D,P){var R=P.distance,H=P.timestamp;return x-H>200||(ve(R)!==ve(D.distance)&&D.distance&&(D={distance:0,lastTimestamp:0,time:0}),D.time&&(D.distance+=R),D.lastTimestamp&&(D.time+=H-D.lastTimestamp),D.lastTimestamp=H),D},{distance:0,lastTimestamp:0,time:0});return k.distance/k.time||0}}}function E1(t){var e,n,i,r,o,a,s,u;function l(p){return 2*p}function g(p){return Ka(p,s,u)}function M(p){return 1-Math.pow(1-p,3)}function c(){return i?t.track.velocity():0}function f(){y();var p=t.options.mode==="free-snap",w=t.track,m=c();r=ve(m);var N=t.track.details,j=[];if(m||!p){var b=d(m),S=b.dist,v=b.dur;if(v=l(v),S*=r,p){var F=w.idxToDist(w.distToIdx(S),!0);F&&(S=F)}j.push({distance:S,duration:v,easing:M});var Y=N.position,U=Y+S;if(U<o||U>a){var C=U<o?o-Y:a-Y,I=0,x=m;if(ve(C)===r){var k=Math.min(Math.abs(C)/Math.abs(S),1),D=function(H){return 1-Math.pow(1-H,1/3)}(k)*v;j[0].earlyExit=D,x=m*(1-k)}else j[0].earlyExit=0,I+=C;var P=d(x,100),R=P.dist*r;t.options.rubberband&&(j.push({distance:R,duration:l(P.dur),easing:M}),j.push({distance:-R+I,duration:500,easing:M}))}t.animator.start(j)}else t.moveToIdx(g(N.abs),!0,{duration:500,easing:function(H){return 1+--H*H*H*H*H}})}function d(p,w){w===void 0&&(w=1e3);var m=147e-9+(p=Math.abs(p))/w;return{dist:Math.pow(p,2)/m,dur:p/m}}function h(){var p=t.track.details;p&&(o=p.min,a=p.max,s=p.minIdx,u=p.maxIdx)}function y(){t.animator.stop()}t.on("updated",h),t.on("optionsChanged",h),t.on("created",h),t.on("dragStarted",function(){i=!1,y(),e=n=t.track.details.abs}),t.on("dragChecked",function(){i=!0}),t.on("dragEnded",function(){var p=t.options.mode;p==="snap"&&function(){var w=t.track,m=t.track.details,N=m.position,j=ve(c());(N>a||N<o)&&(j=0);var b=e+j;m.slides[w.absToRel(b)].portion===0&&(b-=j),e!==n&&(b=n),ve(w.idxToDist(b,!0))!==j&&(b+=j),b=g(b);var S=w.idxToDist(b,!0);t.animator.start([{distance:S,duration:500,easing:function(v){return 1+--v*v*v*v*v}}])}(),p!=="free"&&p!=="free-snap"||f()}),t.on("dragged",function(){n=t.track.details.abs})}function S1(t){var e,n,i,r,o,a,s,u,l,g,M,c,f,d,h,y,p,w,m=_d();function N(I){if(a&&u===I.id){var x=v(I);if(l){if(!S(I))return b(I);g=x,l=!1,t.emit("dragChecked")}if(y)return g=x;vi(I);var k=function(P){if(p===-1/0&&w===1/0)return P;var R=t.track.details,H=R.length,q=R.position,et=Ka(P,p-q,w-q);if(H===0)return 0;if(!t.options.rubberband)return et;if(q<=w&&q>=p||q<p&&n>0||q>w&&n<0)return P;var st=(q<p?q-p:q-w)/H,bt=r*H,Bt=Math.abs(st*bt),Lt=Math.max(0,1-Bt/o*2);return Lt*Lt*P}(s(g-x)/r*i);n=ve(k);var D=t.track.details.position;(D>p&&D<w||D===p&&n>0||D===w&&n<0)&&Di(I),M+=k,!c&&Math.abs(M*r)>5&&(c=!0),t.track.add(k),g=x,t.emit("dragged")}}function j(I){!a&&t.track.details&&t.track.details.length&&(M=0,a=!0,c=!1,l=!0,u=I.id,S(I),g=v(I),t.emit("dragStarted"))}function b(I){a&&u===I.idChanged&&(a=!1,t.emit("dragEnded"))}function S(I){var x=F(),k=x?I.y:I.x,D=x?I.x:I.y,P=f!==void 0&&d!==void 0&&Math.abs(d-D)<=Math.abs(f-k);return f=k,d=D,P}function v(I){return F()?I.y:I.x}function F(){return t.options.vertical}function Y(){r=t.size,o=F()?window.innerHeight:window.innerWidth;var I=t.track.details;I&&(p=I.min,w=I.max)}function U(I){c&&(Di(I),vi(I))}function C(){if(m.purge(),t.options.drag&&!t.options.disabled){var I;I=t.options.dragSpeed||1,s=typeof I=="function"?I:function(k){return k*I},i=t.options.rtl?-1:1,Y(),e=t.container,function(){var k="data-keen-slider-clickable";Or("[".concat(k,"]:not([").concat(k,"=false])"),e).map(function(D){m.add(D,"dragstart",Di),m.add(D,"mousedown",Di),m.add(D,"touchstart",Di)})}(),m.add(e,"dragstart",function(k){vi(k)}),m.add(e,"click",U,{capture:!0}),m.input(e,"ksDragStart",j),m.input(e,"ksDrag",N),m.input(e,"ksDragEnd",b),m.input(e,"mousedown",j),m.input(e,"mousemove",N),m.input(e,"mouseleave",b),m.input(e,"mouseup",b),m.input(e,"touchstart",j,{passive:!0}),m.input(e,"touchmove",N,{passive:!1}),m.input(e,"touchend",b),m.input(e,"touchcancel",b),m.add(window,"wheel",function(k){a&&vi(k)});var x="data-keen-slider-scrollable";Or("[".concat(x,"]:not([").concat(x,"=false])"),t.container).map(function(k){return function(D){var P;m.input(D,"touchstart",function(R){P=v(R),y=!0,h=!0},{passive:!0}),m.input(D,"touchmove",function(R){var H=F(),q=H?D.scrollHeight-D.clientHeight:D.scrollWidth-D.clientWidth,et=P-v(R),st=H?D.scrollTop:D.scrollLeft,bt=H&&D.style.overflowY==="scroll"||!H&&D.style.overflowX==="scroll";if(P=v(R),(et<0&&st>0||et>0&&st<q)&&h&&bt)return y=!0;h=!1,vi(R),y=!1}),m.input(D,"touchend",function(){y=!1})}(k)})}}t.on("updated",Y),t.on("optionsChanged",C),t.on("created",C),t.on("destroyed",m.purge)}function b1(t){var e,n,i=null;function r(f,d,h){t.animator.active?a(f,d,h):requestAnimationFrame(function(){return a(f,d,h)})}function o(){r(!1,!1,n)}function a(f,d,h){var y=0,p=t.size,w=t.track.details;if(w&&e){var m=w.slides;e.forEach(function(N,j){if(f)!i&&d&&u(N,null,h),l(N,null,h);else{if(!m[j])return;var b=m[j].size*p;!i&&d&&u(N,b,h),l(N,m[j].distance*p-y,h),y+=b}})}}function s(f){return t.options.renderMode==="performance"?Math.round(f):f}function u(f,d,h){var y=h?"height":"width";d!==null&&(d=s(d)+"px"),f.style["min-"+y]=d,f.style["max-"+y]=d}function l(f,d,h){if(d!==null){d=s(d);var y=h?d:0;d="translate3d(".concat(h?0:d,"px, ").concat(y,"px, 0)")}f.style.transform=d,f.style["-webkit-transform"]=d}function g(){e&&(a(!0,!0,n),e=null),t.on("detailsChanged",o,!0)}function M(){r(!1,!0,n)}function c(){g(),n=t.options.vertical,t.options.disabled||t.options.renderMode==="custom"||(i=Zt(t.options.slides,"perView",null)==="auto",t.on("detailsChanged",o),(e=t.slides).length&&M())}t.on("created",c),t.on("optionsChanged",c),t.on("beforeOptionsChanged",function(){g()}),t.on("updated",M),t.on("destroyed",g)}function A1(t,e){return function(n){var i,r,o,a,s,u=_d();function l(S){var v;Ga(n.container,"reverse",(v=n.container,window.getComputedStyle(v,null).getPropertyValue("direction")!=="rtl"||S?null:"")),Ga(n.container,"v",n.options.vertical&&!S?"":null),Ga(n.container,"disabled",n.options.disabled&&!S?"":null)}function g(){M()&&y()}function M(){var S=null;if(a.forEach(function(F){F.matches&&(S=F.__media)}),S===i)return!1;i||n.emit("beforeOptionsChanged"),i=S;var v=S?o.breakpoints[S]:o;return n.options=ni(ni({},o),v),l(),j(),b(),w(),!0}function c(S){var v=Rd(S);return(n.options.vertical?v.height:v.width)/n.size||1}function f(){return n.options.trackConfig.length}function d(S){for(var v in i=!1,o=ni(ni({},e),S),u.purge(),r=n.size,a=[],o.breakpoints||[]){var F=window.matchMedia(v);F.__media=v,a.push(F),u.add(F,"change",g)}u.add(window,"orientationchange",N),u.add(window,"resize",m),M()}function h(S){n.animator.stop();var v=n.track.details;n.track.init(S??(v?v.abs:0))}function y(S){h(S),n.emit("optionsChanged")}function p(S,v){if(S)return d(S),void y(v);j(),b();var F=f();w(),f()!==F?y(v):h(v),n.emit("updated")}function w(){var S=n.options.slides;if(typeof S=="function")return n.options.trackConfig=S(n.size,n.slides);for(var v=n.slides,F=v.length,Y=typeof S=="number"?S:Zt(S,"number",F,!0),U=[],C=Zt(S,"perView",1,!0),I=Zt(S,"spacing",0,!0)/n.size||0,x=C==="auto"?I:I/C,k=Zt(S,"origin","auto"),D=0,P=0;P<Y;P++){var R=C==="auto"?c(v[P]):1/C-I+x,H=k==="center"?.5-R/2:k==="auto"?0:k;U.push({origin:H,size:R,spacing:I}),D+=R}if(D+=I*(Y-1),k==="auto"&&!n.options.loop&&C!==1){var q=0;U.map(function(et){var st=D-q;return q+=et.size+I,st>=1||(et.origin=1-st-(D>1?0:1-D)),et})}n.options.trackConfig=U}function m(){j();var S=n.size;n.options.disabled||S===r||(r=S,p())}function N(){m(),setTimeout(m,500),setTimeout(m,2e3)}function j(){var S=Rd(n.container);n.size=(n.options.vertical?S.height:S.width)||1}function b(){n.slides=Or(n.options.selector,n.container)}n.container=(s=Or(t,document)).length?s[0]:null,n.destroy=function(){u.purge(),n.emit("destroyed"),l(!0)},n.prev=function(){n.moveToIdx(n.track.details.abs-1,!0)},n.next=function(){n.moveToIdx(n.track.details.abs+1,!0)},n.update=p,d(n.options)}}var v1=function(t,e,n){try{return function(i,r){var o,a={};return o={emit:function(s){a[s]&&a[s].forEach(function(l){l(o)});var u=o.options&&o.options[s];u&&u(o)},moveToIdx:function(s,u,l){var g=o.track.idxToDist(s,u);if(g){var M=o.options.defaultAnimation;o.animator.start([{distance:g,duration:Zt(l||M,"duration",500),easing:Zt(l||M,"easing",function(c){return 1+--c*c*c*c*c})}])}},on:function(s,u,l){l===void 0&&(l=!1),a[s]||(a[s]=[]);var g=a[s].indexOf(u);g>-1?l&&delete a[s][g]:l||a[s].push(u)},options:i},function(){if(o.track=j1(o),o.animator=T1(o),r)for(var s=0,u=r;s<u.length;s++)(0,u[s])(o);o.track.init(o.options.initial||0),o.emit("created")}(),o}(e,kd([A1(t,{drag:!0,mode:"snap",renderMode:"precision",rubberband:!0,selector:".keen-slider__slide"}),b1,S1,E1],n||[],!0))}catch(i){console.error(i)}};const D1=(t,...e)=>{let n,i;const r=()=>L1(t),[o,a]=Z(r()?.initial||0),s=()=>n&&n.destroy(),u=(g={})=>({selector:i.childNodes,...r(),...g}),l=()=>n?.update(u());return[g=>{i=g,i.classList.add("keen-slider"),Ke(()=>{n=new v1(i,u(),e),n.on("slideChanged",()=>a(n.track.details.rel))}),ut(s),typeof t=="function"&&it(Se(()=>t,l))},{current:o,next:()=>n&&n.next(),prev:()=>n&&n.prev(),details:()=>n?n.track.details:{},slider:()=>n,moveTo:(g,M=250,c=!1,f)=>n?.moveToIdx(g,c,{duration:M,easing:f}),destroy:s,update:l}]},Cr=t=>{const[e]=St(t,["class"]);return T(ur,ht(t,{get class(){return nn(e.class,"mb-1epo54l",t.variant==="secondary"&&"mb-1ohbwoy")},get children(){return t.children}}))},I1="data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjgwIiBoZWlnaHQ9IjE5NyIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDI4MCAxOTciPgogIDxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0yNDEuMjY3IDEzLjQyNkgzOC43MjlhOS4wOTUgOS4wOTUgMCAwIDAtOS4wOTUgOS4wOTVWMTQ0LjU1YTkuMDk1IDkuMDk1IDAgMCAwIDkuMDk1IDkuMDk1aDIwMi41MzhhOS4wOTUgOS4wOTUgMCAwIDAgOS4wOTUtOS4wOTVWMjIuNTIxYTkuMDk1IDkuMDk1IDAgMCAwLTkuMDk1LTkuMDk1WiIvPgogIDxwYXRoIGZpbGw9IiMxNDI2NDEiIGQ9Ik00OC4zMSA3OS4yODJhMjUuNTIzIDI1LjUyMyAwIDAgMS0xOS41NjgtOS4xMTQgMS4xNjcgMS4xNjcgMCAwIDEgLjE0LTEuNjQzIDEuMTY3IDEuMTY3IDAgMCAxIDEuNjQzLjE0IDIzLjE5IDIzLjE5IDAgMCAwIDE3Ljc4IDguMjg0YzEyLjgxIDAgMjMuMjMtMTAuNDIxIDIzLjIzLTIzLjIzMSAwLTEyLjgxLTEwLjQyLTIzLjIzLTIzLjIzLTIzLjIzLTcuMDEgMC0xMy41NyAzLjExNy0xOC4wMDQgOC41NTNhMS4xNyAxLjE3IDAgMCAxLTEuNjQzLjE2OCAxLjE3IDEuMTcgMCAwID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IDEuNjUybDIuNjQxIDIuNjQxLTIuNjQxIDIuNjQyYTEuMTY1IDEuMTY1IDAgMCAwIC44MjYgMS45OTJjLjI5OCAwIC41OTctLjExMi44MjYtLjM0bDIuNjQxLTIuNjQyIDIuNjQxIDIuNjQyYy4yMjkuMjI4LjUyOC4zNC44MjYuMzRhMS4xNjUgMS4xNjUgMCAwIDAgLjgyNi0xLjk5MmwtMi42NDEtMi42NDJaIi8+Cjwvc3ZnPg==",Fd="mb-2a9seb",Bd="mb-1mieit8",Hd=nn("mb-style-scope","mb-1ogpkgw"),C1=wt('<div><div><div><div><img alt="" srcset=""></div><div><h2></h2><p></p></div></div><div><div><img alt="" srcset=""></div><div><h2></h2><p></p></div></div><div><div><img alt="" srcset=""></div><div><h2></h2><p></p></div></div></div><div></div><div>'),Qd=wt("<div>"),z1=()=>{let t;const{solidStore:e,updateSolidStore:n}=rn(),[i,{current:r,next:o,prev:a}]=D1(),s=()=>{n({helpVisible:!1}),e.captureSdk?.startCapture()};Ke(()=>{i(t),e.captureSdk?.pauseCapture()});const{t:u}=hn();return T(dr,{open:!0,get children(){return T(lr,{get children(){return[T(Jo,{class:Bd}),(()=>{const l=Qd();return xt(l,Fd),ot(l,T(cr,{onEscapeKeyDown:s,onPointerDownOutside:s,onOpenAutoFocus:g=>g.preventDefault(),class:Hd,get children(){return[T(qo,{onClick:s,class:"mb-8u3v3h",get children(){return T(Da,{class:"mb-h83tsy"})}}),(()=>{const g=C1(),M=g.firstChild,c=M.firstChild,f=c.firstChild,d=f.firstChild,h=f.nextSibling,y=h.firstChild,p=y.nextSibling,w=c.nextSibling,m=w.firstChild,N=m.firstChild,j=m.nextSibling,b=j.firstChild,S=b.nextSibling,v=w.nextSibling,F=v.firstChild,Y=F.firstChild,U=F.nextSibling,C=U.firstChild,I=C.nextSibling,x=M.nextSibling,k=x.nextSibling;xt(g,"mb-d1kpoi");const D=t;return typeof D=="function"?au(D,M):t=M,Ve(d,"src",I1),ot(y,()=>u.tutorial_fields_visible_title),ot(p,()=>u.tutorial_fields_visible_details),Ve(N,"src",x1),ot(b,()=>u.tutorial_harsh_light_title),ot(S,()=>u.tutorial_harsh_light_details),Ve(Y,"src",O1),ot(C,()=>u.tutorial_keep_still_title),ot(I,()=>u.tutorial_keep_still_details),xt(x,"mb-slxsc0"),ot(x,T(ru,{get each(){return new Array(3).fill(null)},children:(P,R)=>(()=>{const H=Qd();return pe(()=>xt(H,nn("mb-1777uja",R()===r()&&"mb-rp0tll"))),H})()})),xt(k,"mb-4sy7j9"),ot(k,T(Cr,{get disabled(){return r()===0},onClick:()=>a(),variant:"secondary",get children(){return u.back}}),null),ot(k,T(co,{get children(){return[T(Pe,{get when(){return r()!==2},get children(){return T(Cr,{onClick:()=>o(),get children(){return u.next}})}}),T(Pe,{get when(){return r()===2},get children(){return T(Cr,{onClick:s,get children(){return u.done}})}})]}}),null),g})()]}})),l})()]}})}})},k1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyODAiIGhlaWdodD0iMjA2IiBmaWxsPSJub25lIj4KICA8cGF0aCBmaWxsPSIjMTQyNjQxIiBkPSJNMjI3LjA4NCAzNC4zNjlINDcuNTQ4Yy01LjAyMyAwLTkuMDk1IDQuMDU4LTkuMDk1IDkuMDYzdjk1LjY1OGMwIDUuMDA1IDQuMDcyIDkuMDYzIDkuMDk1IDkuMDYzaDE3OS41MzZjNS4wMjQgMCA5LjA5Ni00LjA1OCA5LjA5Ni05LjA2M1Y0My40MzJjMC01LjAwNS00LjA3Mi05LjA2My05LjA5Ni05LjA2M1oiIG9wYWNpdHk9Ii4zIi8+CiAgPHBhdGggZmlsbD0iI2ZmZiIgZD0iTTIzMS4yODUgMjguNzg5SDUxLjc0OWMtNS4wMjQgMC05LjA5NiA0LjA1Ny05LjA5NiA5LjA2M3Y5NS42NTdjMCA1LjAwNiA0LjA3MiA5LjA2MyA5LjA5NiA5LjA2M2gxNzkuNTM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t:r}=hn();return T(dr,{get open(){return t()},get children(){return T(lr,{get children(){return[T(Jo,{class:Bd}),(()=>{const o=Y1();return xt(o,Fd),ot(o,T(cr,{onEscapeKeyDown:i,onPointerDownOutside:i,class:Hd,get children(){return[T(qo,{onClick:i,class:"mb-8u3v3h",get children(){return T(Da,{class:"mb-h83tsy"})}}),(()=>{const a=U1(),s=a.firstChild,u=s.nextSibling,l=u.nextSibling;return xt(a,"mb-zjp32o"),Ve(s,"src",k1),xt(s,"mb-zgw7tn"),ot(u,()=>r.tutorial_fields_visible_title),ot(l,()=>r.tutorial_fields_visible_details),ot(a,T(Cr,{onClick:i,class:"mb-1r8ti85",get children(){return r.tutorial_fields_visible_start}}),null),a})()]}})),o})()]}})}})},_1=wt('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 115 53"><path fill="#fff" d="M35.088 19.572c1.314 0 2.178-.891 2.178-2.16 0-1.287-.855-2.151-2.178-2.151h-2.601v6.579h1.152v-2.268h1.449Zm-.225-3.285c.765 0 1.197.396 1.197 1.116 0 .72-.423 1.143-1.215 1.143h-1.206v-2.259h1.224Zm2.909 3.321c0 1.386 1 2.34 2.376 2.34 1.377 0 2.376-.954 2.376-2.34s-.999-2.34-2.376-2.34c-1.377 0-2.376.954-2.376 2.34Zm1.098 0c0-.81.522-1.359 1.278-1.359s1.278.549 1.278 1.359c0 .81-.522 1.359-1.278 1.359s-1.278-.549-1.278-1.359Zm5.466 2.232h1.07l.613-1.908c.225-.729.306-1.044.35-1.251.037.225.136.648.316 1.233l.612 1.926h1.026l1.539-4.446H48.7l-.594 1.908c-.081.279-.225.81-.297 1.143a16.122 16.122 0 0 0-.288-1.143l-.594-1.908h-1.116l-.612 1.908c-.144.441-.225.72-.306 1.152a14.615 14.615 0 0 0-.27-1.152l-.585-1.908h-1.143l1.44 4.446Zm8.14.117c1.16 0 1.97-.585 2.16-1.557h-1.017c-.126.423-.522.657-1.125.657-.73 0-1.143-.396-1.224-1.179l3.348-.009v-.333c0-1.386-.846-2.277-2.178-2.277-1.305 0-2.214.963-2.214 2.358 0 1.377.927 2.34 2.25 2.34Zm-.027-3.798c.657 0 1.08.405 1.08 1.017h-2.232c.108-.666.504-1.017 1.152-1.017Zm6.018-.783a1.948 1.948 0 0 0-.486-.063c-.594 0-1.017.297-1.206.738l-.063-.648h-1.035v4.437h1.098v-2.16c0-.864.495-1.287 1.287-1.287h.405v-1.017Zm2.763 4.581c1.16 0 1.97-.585 2.16-1.557h-1.018c-.126.423-.522.657-1.125.657-.729 0-1.143-.396-1.224-1.179l3.348-.009v-.333c0-1.386-.846-2.277-2.178-2.277-1.305 0-2.214.963-2.214 2.358 0 1.377.927 2.34 2.25 2.34Zm-.028-3.798c.657 0 1.08.405 1.08 1.017H60.05c.108-.666.504-1.017 1.152-1.017Zm5.055 3.798c.675 0 1.251-.297 1.521-.81l.072.693h1.008v-6.696H67.77v2.817c-.279-.441-.828-.702-1.449-.702-1.34 0-2.15.99-2.15 2.376 0 1.377.8 2.322 2.087 2.322Zm.243-1.008c-.765 0-1.233-.558-1.233-1.35s.468-1.359 1.233-1.359c.765 0 1.26.558 1.26 1.359 0 .801-.495 1.35-1.26 1.35Zm7.305.891.072-.693c.261.513.828.81 1.494.81 1.278 0 2.115-.945 2.115-2.313 0-1.404-.774-2.394-2.043-2.394-.675 0-1.269.297-1.557.792v-2.898h-1.098v6.696h1.017Zm.09-2.241c0-.801.495-1.359 1.251-1.359.774 0 1.233.567 1.233 1.359s-.459 1.35-1.233 1.35c-.756 0-1.25-.549-1.25-1.35Zm4.092 4.302c.243.063.513.099.819.099.728 0 1.197-.342 1.53-1.17l2.177-5.436H81.38l-1.206 3.24-1.142-3.24H77.87l1.791 4.635-.126.333c-.189.522-.459.621-.89.621h-.657v.918ZM19.816 35.596l-2.89-7.432H15v9.672h1.314V30.23l2.996 7.648h.959l3.022-7.716v7.675h1.355v-9.672h-1.939l-2.89 7.432Zm8.837-7.433h-1.422v9.673h1.422v-9.672Zm19.01 4.828a3.188 3.188 0 0 0 .59-1.87c0-.791-.34-1.53-.958-2.08-.637-.566-1.523-.876-2.497-.876h-3.925v9.673h1.422v-3.46h2.303l2.008 3.459h1.688l-2.15-3.696a3.277 3.277 0 0 0 1.519-1.15Zm-.86-1.856a1.925 1.925 0 0 1-.548 1.369c-.362.362-.87.561-1.43.561h-2.532v-3.573h2.532c1.128 0 1.979.706 1.979 1.643ZM54.28 28c-1.334 0-2.537.525-3.392 1.477-.822.918-1.276 2.169-1.276 3.523s.453 2.612 1.276 3.529c.852.948 2.057 1.47 3.392 1.47 1.341 0 2.55-.523 3.404-1.47.824-.916 1.278-2.17 1.278-3.53 0-1.36-.454-2.605-1.278-3.522C56.83 28.523 55.62 28 54.28 28Zm0 8.645a2.997 2.997 0 0 1-1.27-.278 3.047 3.047 0 0 1-1.04-.79c-.586-.678-.909-1.593-.909-2.577s.323-1.892.91-2.572a3.017 3.017 0 0 1 2.31-1.073c.892 0 1.715.381 2.316 1.074.59.68.916 1.593.916 2.57 0 .979-.325 1.899-.916 2.578a3.064 3.064 0 0 1-1.044.79c-.4.184-.834.28-1.273.278Zm12.474-3.883c.83-.466 1.322-1.283 1.322-2.199 0-1.413-1.233-2.4-2.995-2.4h-4.17v9.673h4.37c1.736 0 2.996-1.175 2.996-2.794.001-.972-.58-1.839-1.523-2.28Zm-1.431 3.747h-2.99v-3.002h2.786c1.022 0 1.71.557 1.71 1.386 0 .981-.591 1.616-1.506 1.616Zm-.364-4.303h-2.627v-2.714h2.787c.917 0 1.507.484 1.507 1.235.001.737-.515 1.48-1.667 1.48v-.001Zm6.787-4.043h-1.422v9.673h6.222v-1.355h-4.8v-8.318Zm7.808 0h-1.422v9.673h1.422v-9.672Zm8.93 7.157-4.954-7.126-.021-.03h-1.375v9.672h1.341v-7.51l5.219 7.51h1.131v-9.672h-1.34v7.156Zm7.694-2.9 3.72-4.257H98.16l-4.333 4.948v-4.947h-1.422v9.672h1.422V35.03l1.38-1.56 3.07 4.367H100l-3.822-5.417Zm-58.265 2.144c-.634 1.468-1.448 2.094-2.726 2.094-.874 0-1.674-.38-2.253-1.069-.571-.678-.885-1.598-.885-2.59 0-.983.307-1.896.864-2.572.571-.691 1.364-1.072 2.234-1.072 1.177 0 2.039.597 2.633 1.825l.025.052h1.488l-.007-.042c-.035-.204-.109-.394-.18-.581l-.023-.06a3.979 3.979 0 0 0-1.522-1.872c-.685-.45-1.511-.677-2.455-.677-1.29 0-2.453.525-3.277 1.478-.793.917-1.23 2.168-1.23 3.522 0 1.372.44 2.629 1.237 3.538.839.956 1.988 1.462 3.324 1.462.936 0 1.758-.247 2.445-.733.115-.082.226-.17.332-.264.696-.615 1.223-1.491 1.41-2.343l.004-.022c.007-.03.012-.06.017-.088l.007-.042h-1.439l-.023.056Z">'),R1=(t={})=>(()=>{const e=_1();return te(e,t,!0,!0),e})(),F1=wt('<div><div></div><video src="">'),B1=wt("<div>"),Gd=()=>{let t;const{solidStore:e,sdkStore:n}=rn(),{t:i}=hn();return it(()=>{const r=e.captureSdk;!n||!r||r.startCameraStream(t).then(async()=>{e.uiSettings.showTutorial||await r.startCapture()})}),(()=>{const r=F1(),o=r.firstChild,a=o.nextSibling;ot(r,T(kt,{get when(){return!n.isQueryingCameras},get fallback(){return(()=>{const u=B1();return ot(u,()=>i.camera_query_in_progress),u})()},get children(){return T($p,{})}}),o),ot(r,T(kt,{get when(){return n.isPlaying&&e.uiSettings.showTutorial},get children(){return T(P1,{})}}),o),ot(r,T(kt,{get when(){return e.helpVisible},get children(){return T(z1,{})}}),o),ot(r,T(kt,{get when(){return n.isCapturing||n.uiState.key===Wt.FLIP_CARD.key||n.uiState.key===Wt.SIDE_CAPTURED.key||n.uiState.key===Wt.DOCUMENT_CAPTURED.key},get children(){return T(s1,{})}}),o),xt(o,$1),ot(o,T(R1,{class:K1})),ot(r,T(m1,{}),a);const s=t;return typeof s=="function"?au(s,a):t=a,xt(a,V1),pe(()=>xt(r,nn("mb-style-scope",Q1,"mb-video-screen"))),r})()},H1=()=>T(dr,{defaultOpen:!0,get children(){return T(lr,{get children(){return T(cr,{onEscapeKeyDown:t=>t.preventDefault(),onPointerDownOutside:t=>t.preventDefault(),onOpenAutoFocus:t=>t.preventDefault(),class:G1,get children(){return T(Gd,{})}})}})}}),Q1="mb-1lz2sq8",G1="mb-1v96fqo",K1="mb-191sfs5",$1="mb-o9aq4l",V1="mb-1f2d6cn",W1=wt('<div class="alert-dialog__header">'),Z1=wt("<p>"),q1=wt('<div class="alert-dialog__positioner">'),X1=wt("<pre>"),J1=t=>T(dr,{defaultOpen:!0,get children(){return T(lr,{get children(){return[T(Jo,{class:"alert-dialog__overlay"}),(()=>{const e=q1();return ot(e,T(b0,{class:"alert-dialog__content",get children(){return[(()=>{const n=W1();return ot(n,T(S0,{class:"alert-dialog__title",get children(){return["Caught error: ",V(()=>t.error.name)]}}),null),ot(n,T(qo,{class:"alert-dialog__close-button",children:"Close"}),null),n})(),T(E0,{class:"alert-dialog__description",get children(){return[(()=>{const n=Z1();return ot(n,()=>t.error.message),n})(),T(kt,{get when(){return t.error.stack},children:n=>(()=>{const i=X1();return xt(i,"mb-rjcpop"),ot(i,n),i})()})]}})]}})),e})()]}})}}),tN=t=>{const{solidStore:e,sdkStore:n}=rn(),{updateLocalization:i}=hn();return it(()=>{e.captureSdk&&t.exposeApiOnLoad({updateLocalization:i,captureSdk:e.captureSdk})}),[T(kt,{get when(){return n.errorState},children:r=>T(J1,{get error(){return r()}})}),T(kt,{get when(){return e.captureSdk},get children(){return T(ui,{get component(){return e.uiSettings.target.id===$a?H1:Gd}})}})]};function eN(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nN=function(t){return iN(t)&&!rN(t)};function iN(t){return!!t&&typeof t=="object"}function rN(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||sN(t)}var oN=typeof Symbol=="function"&&Symbol.for,aN=oN?Symbol.for("react.element"):60103;function sN(t){return t.$$typeof===aN}function uN(t){return Array.isArray(t)?[]:{}}function Ii(t,e){return e.clone!==!1&&e.isMergeableObject(t)?ii(uN(t),t,e):t}function cN(t,e,n){return t.concat(e).map(function(i){return Ii(i,n)})}function lN(t,e){if(!e.customMerge)return ii;var n=e.customMerge(t);return typeof n=="function"?n:ii}function dN(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Kd(t){return Object.keys(t).concat(dN(t))}function $d(t,e){try{return e in t}catch{return!1}}function gN(t,e){return $d(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function hN(t,e,n){var i={};return n.isMergeableObject(t)&&Kd(t).forEach(function(r){i[r]=Ii(t[r],n)}),Kd(e).forEach(function(r){gN(t,r)||($d(t,r)&&n.isMergeableObject(e[r])?i[r]=lN(r,n)(t[r],e[r],n):i[r]=Ii(e[r],n))}),i}function ii(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||cN,n.isMergeableObject=n.isMergeableObject||nN,n.cloneUnlessOtherwiseSpecified=Ii;var i=Array.isArray(e),r=Array.isArray(t),o=i===r;return o?i?n.arrayMerge(t,e,n):hN(t,e,n):Ii(e,n)}ii.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return ii(n,i,e)},{})};var fN=ii,MN=fN;const yN=eN(MN),$a="mount-point";function pN(t){return new Promise(e=>{const n=()=>s(),i={captureSdk:void 0,helpVisible:!1,uiSettings:{target:null,showTutorial:!0,showErrorDialog:!0},dismountFn:n},r=t.uiSettings?.target??document.createElement("div");!r.isConnected&&r instanceof HTMLDivElement&&(r.setAttribute("id",$a),document.body.appendChild(r));const o=yN(i,t);o.uiSettings.target=r;const a=u=>{e({dismount:n,...u})},s=Ph(()=>T(tf,{get userStrings(){return t.uiSettings?.localization},get children(){return T(Bp,{get sdkSettings(){return t.sdkSettings},mergedDefaults:o,get children(){return T(tN,{exposeApiOnLoad:a})}})}}),o.uiSettings.target)})}_t.ConfiguredCamera=hs,_t.FeedbackParser=Us,_t.LicenseTokenState=Ur,_t.MOUNT_POINT_ID=$a,_t.ServerPermissionSubmitResultStatus=Yr,_t.createCaptureSdk=ch,_t.createCaptureUi=pN,_t.getBase64StringFromDataURL=dh,_t.imageDataToUrl=lh,_t.resetCoreStore=qr,_t.uiStateMap=Me,_t.zustandStore=J,Object.defineProperty(_t,Symbol.toStringTag,{value:"Module"})});
|
|
243
|
+
`);if(V.getState().initialized)return console.warn("Already initialized"),sd;wi=await gp(t.resourceUrl);const e=fp(),n=await wi.loadWasm(),i=await n.initializeWithLicenseKey(t.licenseKey,e,!1);if(i.unlockResult===ml.RequiresServerPermission){const o=await yp(i),s=await n.submitServerPermission(JSON.stringify(o));if(console.log(s),s.status!==Nl.Ok)throw new Error("Server unlock not ok.")}fn=await wi.createAnalyzer();const r={...await fn.getSettings(),minimumDocumentDpi:200,...t.analyzerSettings};return Er=new vp(r),t.analyzerSettings&&await fn.updateSettings(r),V.setState({analyzerSettings:r}),t.callbacks&&od(t.callbacks),V.setState({initialized:!0}),sd}catch(e){throw V.setState({errorState:Al(e)}),e}}const sd={startCameraStream:kp,stopStream:Pp,startPlayback:As,pausePlayback:Ds,startCapture:ed,pauseCapture:br,cancelCapture:nd,finishSideCapture:Rp,resetAnalyzer:id,selectCamera:_p,updateCameraDevices:rd,setCallbacks:od,updateAnalyzerSettings:Yp,subscribe:V.subscribe,getState:V.getState,destroy:td};function ad(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=ad(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}function $e(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=ad(t))&&(i&&(i+=" "),i+=e);return i}const Fp=ut('<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.41 6.91a.833.833 0 0 1 1.18 0L10 11.323l4.41-4.411a.833.833 0 1 1 1.18 1.178l-5 5a.833.833 0 0 1-1.18 0l-5-5a.833.833 0 0 1 0-1.178Z" fill="#fff">'),Hp=(t={})=>(()=>{const e=Fp();return Rt(e,t,!0,!0),e})(),Qp=ut('<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><g fill-rule="evenodd" clip-rule="evenodd" fill="#fff"><path d="M6.322 2.988A1.667 1.667 0 0 1 7.5 2.5h5a1.667 1.667 0 0 1 1.667 1.667A.833.833 0 0 0 15 5h.833a2.5 2.5 0 0 1 2.5 2.5V15a2.5 2.5 0 0 1-2.5 2.5H4.167a2.5 2.5 0 0 1-2.5-2.5V7.5a2.5 2.5 0 0 1 2.5-2.5H5a.833.833 0 0 0 .833-.833c0-.442.176-.866.489-1.179ZM4.167 6.667a.833.833 0 0 0-.834.833V15a.833.833 0 0 0 .834.833h11.666a.834.834 0 0 0 .834-.833V7.5a.833.833 0 0 0-.834-.833H15a2.5 2.5 0 0 1-2.5-2.5h-5a2.5 2.5 0 0 1-2.5 2.5h-.833Z"></path><path d="M10 9.167a1.667 1.667 0 1 0 0 3.333 1.667 1.667 0 0 0 0-3.333Zm-3.333 1.666a3.333 3.333 0 1 1 6.666 0 3.333 3.333 0 0 1-6.666 0Z">'),Gp=(t={})=>(()=>{const e=Qp();return Rt(e,t,!0,!0),e})(),Kp=ut('<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4.167 10.833 7.5 14.167l8.333-8.334" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'),$p=(t={})=>(()=>{const e=Kp();return Rt(e,t,!0,!0),e})();function Vp(t,e=t.getState,n){const i=e(t.getState()),[r,o]=Mo(i),s=(u,l)=>{const g=e(l),M=e(u);n!==void 0&&n(g,M)||o(of(M))},a=t.subscribe(s);return J(()=>a()),r}const ud=Kt(),Wp=t=>{const[e,n]=Mo(t.mergedDefaults),i=Vp(V);Ye(()=>{(async()=>{const o=await Bp(t.sdkSettings);n({captureSdk:o})})()}),W(()=>{const o=t.mergedDefaults.dismountFn;if(e.captureSdk){const s=e.captureSdk.subscribe(a=>a.videoElement,(a,u)=>{!a&&u&&o()});J(()=>s())}});const r={solidStore:e,updateSolidStore:n,sdkStore:i};return L(ud.Provider,{value:r,get children(){return t.children}})};function Ve(){const t=$t(ud);if(!t)throw new Error("StoreContext.Provider not in scope");return t}const Zp=()=>{const{solidStore:t,sdkStore:e}=Ve(),n=()=>[...e.cameras.map(a=>({value:a.deviceInfo.deviceId,label:a.name,disabled:!1}))],i=()=>n().find(a=>a.value===e.selectedCamera?.deviceInfo.deviceId),r=async a=>{if(!t.captureSdk)return;s(!0);const u=e.cameras.find(l=>l.deviceInfo.deviceId===a);if(!u){console.warn("No camera");return}await t.captureSdk.selectCamera(u),s(!1)},[o,s]=K(!1);return L(hy,{get options(){return n()},get value(){return i()},optionValue:"value",optionTextValue:"label",optionDisabled:"disabled",placeholder:"Select a camera...",get disabled(){return o()},onChange:a=>void r(a.value),itemComponent:a=>L(ry,{get item(){return a.item},class:"mb-kd2hm8",get children(){return[L(sy,{class:"mb-1v5y2d4",get children(){return a.item.textValue}}),L(oy,{class:"mb-1my8n64",get children(){return L($p,{class:"mb-gliefk"})}})]}}),get children(){return[L(fy,{"aria-label":"Camera",class:"mb-16knymi",get children(){return[L(Gp,{class:"mb-1v0j9xg"}),L(yy,{class:"mb-1vhx4rq",children:a=>a.selectedOption().label}),L(cy,{class:"mb-16n64rq",get children(){return L(Hp,{class:"mb-1pgdg8r"})}})]}}),L(dy,{get children(){return L(uy,{get class(){return $e("mb-style-scope","mb-qbe87e")},get children(){return L(ly,{class:"mb-1woc7wg"})}})}})]}})},qp=ut('<svg viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.623 2.195A1.286 1.286 0 1 0 15.805.377L9 7.182 2.195.377A1.286 1.286 0 1 0 .377 2.195L7.182 9 .377 15.805a1.286 1.286 0 0 0 1.818 1.818L9 10.818l6.805 6.805a1.286 1.286 0 0 0 1.818-1.818L10.818 9l6.805-6.805Z" fill="#fff">'),vs=(t={})=>(()=>{const e=qp();return Rt(e,t,!0,!0),e})(),Xp=ut("<div>"),Jp=ut("<div><div>"),tm=()=>{const{sdkStore:t,solidStore:e}=Ve(),{t:n}=on();return(()=>{const i=Jp(),r=i.firstChild;return q(i,L(Lt,{get when(){return t.cameras.length>1},get children(){const o=Xp();return mt(o,"mb-15a7aro"),q(o,L(Zp,{})),o}}),r),mt(r,"mb-1fovbrr"),q(r,L(sr,{get"aria-label"(){return n.dismiss},onclick:()=>e.dismountFn(),class:"mb-1kkaye",get children(){return L(vs,{width:16})}})),re(()=>mt(i,$e("mb-sihyjw",em))),i})()},em="mb-1pqj4ih";function cd(t,e){t.indexOf(e)===-1&&t.push(e)}function nm(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ld=(t,e,n)=>Math.min(Math.max(n,t),e),fe={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},Li=t=>typeof t=="number",Gn=t=>Array.isArray(t)&&!Li(t[0]),im=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function rm(t,e){return Gn(t)?t[im(0,t.length,e)]:t}const dd=(t,e,n)=>-n*t+n*e+t,gd=()=>{},We=t=>t,Is=(t,e,n)=>e-t===0?1:(n-t)/(e-t);function hd(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=Is(0,e,i);t.push(dd(n,1,r))}}function om(t){const e=[0];return hd(e,t-1),e}function sm(t,e=om(t.length),n=We){const i=t.length,r=i-e.length;return r>0&&hd(e,r),o=>{let s=0;for(;s<i-2&&!(o<e[s+1]);s++);let a=ld(0,1,Is(e[s],e[s+1],o));return a=rm(n,s)(a),dd(t[s],t[s+1],a)}}const fd=t=>Array.isArray(t)&&Li(t[0]),xs=t=>typeof t=="object"&&!!t.createAnimation,Kn=t=>typeof t=="function",am=t=>typeof t=="string",Os={ms:t=>t*1e3,s:t=>t/1e3},Md=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,um=1e-7,cm=12;function lm(t,e,n,i,r){let o,s,a=0;do s=e+(n-e)/2,o=Md(s,i,r)-t,o>0?n=s:e=s;while(Math.abs(o)>um&&++a<cm);return s}function Ti(t,e,n,i){if(t===e&&n===i)return We;const r=o=>lm(o,0,1,t,n);return o=>o===0||o===1?o:Md(r(o),e,i)}const dm=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const i=n*t,r=e==="end"?Math.floor(i):Math.ceil(i);return ld(0,1,r/t)},yd={ease:Ti(.25,.1,.25,1),"ease-in":Ti(.42,0,1,1),"ease-in-out":Ti(.42,0,.58,1),"ease-out":Ti(0,0,.58,1)},gm=/\((.*?)\)/;function pd(t){if(Kn(t))return t;if(fd(t))return Ti(...t);if(yd[t])return yd[t];if(t.startsWith("steps")){const e=gm.exec(t);if(e){const n=e[1].split(",");return dm(parseFloat(n[0]),n[1].trim())}}return We}class hm{constructor(e,n=[0,1],{easing:i,duration:r=fe.duration,delay:o=fe.delay,endDelay:s=fe.endDelay,repeat:a=fe.repeat,offset:u,direction:l="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=We,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((M,c)=>{this.resolve=M,this.reject=c}),i=i||fe.easing,xs(i)){const M=i.createAnimation(n);i=M.easing,n=M.keyframes||n,r=M.duration||r}this.repeat=a,this.easing=Gn(i)?We:pd(i),this.updateDuration(r);const g=sm(n,u,Gn(i)?i.map(pd):We);this.tick=M=>{var c;o=o;let f=0;this.pauseTime!==void 0?f=this.pauseTime:f=(M-this.startTime)*this.rate,this.t=f,f/=1e3,f=Math.max(f-o,0),this.playState==="finished"&&this.pauseTime===void 0&&(f=this.totalDuration);const d=f/this.duration;let h=Math.floor(d),y=d%1;!y&&d>=1&&(y=1),y===1&&h--;const p=h%2;(l==="reverse"||l==="alternate"&&p||l==="alternate-reverse"&&!p)&&(y=1-y);const w=f>=this.totalDuration?1:Math.min(y,1),m=g(this.easing(w));e(m),this.pauseTime===void 0&&(this.playState==="finished"||f>=this.totalDuration+s)?(this.playState="finished",(c=this.resolve)===null||c===void 0||c.call(this,m)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){const e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}}var md=function(){};process.env.NODE_ENV!=="production"&&(md=function(t,e){if(!t)throw new Error(e)});class fm{setAnimation(e){this.animation=e,e?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Cs=new WeakMap;function Nd(t){return Cs.has(t)||Cs.set(t,{transforms:[],values:new Map}),Cs.get(t)}function Mm(t,e){return t.has(e)||t.set(e,new fm),t.get(e)}const ym=["","X","Y","Z"],pm=["translate","scale","rotate","skew"],$n={x:"translateX",y:"translateY",z:"translateZ"},wd={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},mm={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:wd,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:We},skew:wd},Vn=new Map,Ar=t=>`--motion-${t}`,Dr=["x","y","z"];pm.forEach(t=>{ym.forEach(e=>{Dr.push(t+e),Vn.set(Ar(t+e),mm[t])})});const Nm=(t,e)=>Dr.indexOf(t)-Dr.indexOf(e),wm=new Set(Dr),zs=t=>wm.has(t),Lm=(t,e)=>{$n[e]&&(e=$n[e]);const{transforms:n}=Nd(t);cd(n,e),t.style.transform=Ld(n)},Ld=t=>t.sort(Nm).reduce(Tm,"").trim(),Tm=(t,e)=>`${t} ${e}(var(${Ar(e)}))`,ks=t=>t.startsWith("--"),Td=new Set;function jm(t){if(!Td.has(t)){Td.add(t);try{const{syntax:e,initialValue:n}=Vn.has(t)?Vn.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:n})}catch{}}}const Us=(t,e)=>document.createElement("div").animate(t,e),jd={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Us({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Us({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Us({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ys={},Wn={};for(const t in jd)Wn[t]=()=>(Ys[t]===void 0&&(Ys[t]=jd[t]()),Ys[t]);const Sm=.015,Em=(t,e)=>{let n="";const i=Math.round(e/Sm);for(let r=0;r<i;r++)n+=t(Is(0,i-1,r))+", ";return n.substring(0,n.length-2)},Sd=(t,e)=>Kn(t)?Wn.linearEasing()?`linear(${Em(t,e)})`:fe.easing:fd(t)?bm(t):t,bm=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`;function Am(t,e){for(let n=0;n<t.length;n++)t[n]===null&&(t[n]=n?t[n-1]:e());return t}const Dm=t=>Array.isArray(t)?t:[t];function _s(t){return $n[t]&&(t=$n[t]),zs(t)?Ar(t):t}const ji={get:(t,e)=>{e=_s(e);let n=ks(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!==0){const i=Vn.get(e);i&&(n=i.initialValue)}return n},set:(t,e,n)=>{e=_s(e),ks(e)?t.style.setProperty(e,n):t.style[e]=n}};function vm(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch{}}function Im(t,e){var n;let i=e?.toDefaultUnit||We;const r=t[t.length-1];if(am(r)){const o=((n=r.match(/(-?[\d.]+)([a-z%]*)/))===null||n===void 0?void 0:n[2])||"";o&&(i=s=>s+o)}return i}function xm(){return window.__MOTION_DEV_TOOLS_RECORD}function Om(t,e,n,i={},r){const o=xm(),s=i.record!==!1&&o;let a,{duration:u=fe.duration,delay:l=fe.delay,endDelay:g=fe.endDelay,repeat:M=fe.repeat,easing:c=fe.easing,persist:f=!1,direction:d,offset:h,allowWebkitAcceleration:y=!1}=i;const p=Nd(t),w=zs(e);let m=Wn.waapi();w&&Lm(t,e);const N=_s(e),T=Mm(p.values,N),E=Vn.get(N);return vm(T.animation,!(xs(c)&&T.generator)&&i.record!==!1),()=>{const S=()=>{var U,Y;return(Y=(U=ji.get(t,N))!==null&&U!==void 0?U:E?.initialValue)!==null&&Y!==void 0?Y:0};let A=Am(Dm(n),S);const P=Im(A,E);if(xs(c)){const U=c.createAnimation(A,e!=="opacity",S,N,T);c=U.easing,A=U.keyframes||A,u=U.duration||u}if(ks(N)&&(Wn.cssRegisterProperty()?jm(N):m=!1),w&&!Wn.linearEasing()&&(Kn(c)||Gn(c)&&c.some(Kn))&&(m=!1),m){E&&(A=A.map(C=>Li(C)?E.toDefaultUnit(C):C)),A.length===1&&(!Wn.partialKeyframes()||s)&&A.unshift(S());const U={delay:Os.ms(l),duration:Os.ms(u),endDelay:Os.ms(g),easing:Gn(c)?void 0:Sd(c,u),direction:d,iterations:M+1,fill:"both"};a=t.animate({[N]:A,offset:h,easing:Gn(c)?c.map(C=>Sd(C,u)):void 0},U),a.finished||(a.finished=new Promise((C,D)=>{a.onfinish=C,a.oncancel=D}));const Y=A[A.length-1];a.finished.then(()=>{f||(ji.set(t,N,Y),a.cancel())}).catch(gd),y||(a.playbackRate=1.000001)}else if(r&&w)A=A.map(U=>typeof U=="string"?parseFloat(U):U),A.length===1&&A.unshift(parseFloat(S())),a=new r(U=>{ji.set(t,N,P?P(U):U)},A,Object.assign(Object.assign({},i),{duration:u,easing:c}));else{const U=A[A.length-1];ji.set(t,N,E&&Li(U)?E.toDefaultUnit(U):U)}return s&&o(t,e,A,{duration:u,delay:l,easing:c,repeat:M,offset:h},"motion-one"),T.setAnimation(a),a}}const Cm=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function zm(t,e){var n;return typeof t=="string"?e?((n=e[t])!==null&&n!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}const km={any:0,all:1};function Um(t,e,{root:n,margin:i,amount:r="any"}={}){if(typeof IntersectionObserver>"u")return()=>{};const o=zm(t),s=new WeakMap,a=l=>{l.forEach(g=>{const M=s.get(g.target);if(g.isIntersecting!==!!M)if(g.isIntersecting){const c=e(g);Kn(c)?s.set(g.target,c):u.unobserve(g.target)}else M&&(M(g),s.delete(g.target))})},u=new IntersectionObserver(a,{root:n,rootMargin:i,threshold:typeof r=="number"?r:km[r]});return o.forEach(l=>u.observe(l)),()=>u.disconnect()}function Ym(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!_m(t,e):t!==e}function _m(t,e){const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function Pm(t){return typeof t=="object"}function Ed(t,e){if(Pm(t))return t;if(t&&e)return e[t]}let Ze;function Rm(){if(!Ze)return;const t=Ze.sort(Fm).map(Hm);t.forEach(bd),t.forEach(bd),Ze=void 0}function Ps(t){Ze?cd(Ze,t):(Ze=[t],requestAnimationFrame(Rm))}function Bm(t){Ze&&nm(Ze,t)}const Fm=(t,e)=>t.getDepth()-e.getDepth(),Hm=t=>t.animateUpdates(),bd=t=>t.next(),Ad=(t,e)=>new CustomEvent(t,{detail:{target:e}});function Rs(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEvent:n}}))}function Dd(t,e,n){t.dispatchEvent(new CustomEvent(e,{detail:{originalEntry:n}}))}const Qm={isActive:t=>!!t.inView,subscribe:(t,{enable:e,disable:n},{inViewOptions:i={}})=>{const{once:r}=i,o=Uo(i,["once"]);return Um(t,s=>{if(e(),Dd(t,"viewenter",s),!r)return a=>{n(),Dd(t,"viewleave",a)}},o)}},vd=(t,e,n)=>i=>{i.pointerType&&i.pointerType!=="mouse"||(n(),Rs(t,e,i))},Gm={isActive:t=>!!t.hover,subscribe:(t,{enable:e,disable:n})=>{const i=vd(t,"hoverstart",e),r=vd(t,"hoverend",n);return t.addEventListener("pointerenter",i),t.addEventListener("pointerleave",r),()=>{t.removeEventListener("pointerenter",i),t.removeEventListener("pointerleave",r)}}},Km={isActive:t=>!!t.press,subscribe:(t,{enable:e,disable:n})=>{const i=o=>{n(),Rs(t,"pressend",o),window.removeEventListener("pointerup",i)},r=o=>{e(),Rs(t,"pressstart",o),window.addEventListener("pointerup",i)};return t.addEventListener("pointerdown",r),()=>{t.removeEventListener("pointerdown",r),window.removeEventListener("pointerup",i)}}},vr={inView:Qm,hover:Gm,press:Km},Id=["initial","animate",...Object.keys(vr),"exit"],Bs=new WeakMap;function $m(t={},e){let n,i=e?e.getDepth()+1:0;const r={initial:!0,animate:!0},o={},s={};for(const h of Id)s[h]=typeof t[h]=="string"?t[h]:e?.getContext()[h];const a=t.initial===!1?"animate":"initial";let u=Ed(t[a]||s[a],t.variants)||{},l=Uo(u,["transition"]);const g=Object.assign({},l);function*M(){var h,y;const p=l;l={};const w={};for(const S of Id){if(!r[S])continue;const A=Ed(t[S]);if(A)for(const P in A)P!=="transition"&&(l[P]=A[P],w[P]=Cm((y=(h=A.transition)!==null&&h!==void 0?h:t.transition)!==null&&y!==void 0?y:{},P))}const m=new Set([...Object.keys(l),...Object.keys(p)]),N=[];m.forEach(S=>{var A;l[S]===void 0&&(l[S]=g[S]),Ym(p[S],l[S])&&((A=g[S])!==null&&A!==void 0||(g[S]=ji.get(n,S)),N.push(Om(n,S,l[S],w[S],hm)))}),yield;const T=N.map(S=>S()).filter(Boolean);if(!T.length)return;const E=l;n.dispatchEvent(Ad("motionstart",E)),Promise.all(T.map(S=>S.finished)).then(()=>{n.dispatchEvent(Ad("motioncomplete",E))}).catch(gd)}const c=(h,y)=>()=>{r[h]=y,Ps(d)},f=()=>{for(const h in vr){const y=vr[h].isActive(t),p=o[h];y&&!p?o[h]=vr[h].subscribe(n,{enable:c(h,!0),disable:c(h,!1)},t):!y&&p&&(p(),delete o[h])}},d={update:h=>{n&&(t=h,f(),Ps(d))},setActive:(h,y)=>{n&&(r[h]=y,Ps(d))},animateUpdates:M,getDepth:()=>i,getTarget:()=>l,getOptions:()=>t,getContext:()=>s,mount:h=>(md(!!h,"Animation state must be mounted with valid Element"),n=h,Bs.set(n,d),f(),()=>{Bs.delete(n),Bm(d);for(const y in o)o[y]()}),isMounted:()=>!!n};return d}function Vm(t){const e={},n=[];for(let i in t){const r=t[i];zs(i)&&($n[i]&&(i=$n[i]),n.push(i),i=Ar(i));let o=Array.isArray(r)?r[0]:r;const s=Vn.get(i);s&&(o=Li(r)?s.toDefaultUnit(r):r),e[i]=o}return n.length&&(e.transform=Ld(n)),e}var Wm=()=>{},xd=(t,e)=>e();function Zm(t,e){const n=Tt(t),i=n?[n]:[],{onEnter:r=xd,onExit:o=xd}=e,[s,a]=K(e.appear?[]:i),[u]=jh();let l,g=!1;function M(d,h){if(!d)return h&&h();g=!0,o(d,()=>{io(()=>{g=!1,a(y=>y.filter(p=>p!==d)),h&&h()})})}function c(d){const h=l;if(!h)return d&&d();l=void 0,a(y=>[h,...y]),r(h,d??Wm)}const f=e.mode==="out-in"?d=>g||M(d,c):e.mode==="in-out"?d=>c(()=>M(d)):d=>{c(),M(d)};return Za(d=>{const h=t();return Tt(u)?(u(),d):(h!==d&&(l=h,io(()=>Tt(()=>f(d)))),h)},e.appear?void 0:n),s}const Od=Kt(),qm=t=>{let e=t.initial!==!1;const n=L(Od.Provider,{value:()=>e,get children(){return L(Fs.Provider,{value:void 0,get children(){return Zm(Nf(()=>t.children),{appear:e,mode:t.exitBeforeEnter?"out-in":"parallel",onExit(i,r){const o=Bs.get(i);o&&o.getOptions().exit?Cd(i,r):r()}})}})}});return e=!0,n},Cd=(t,e)=>t.addEventListener("motioncomplete",e);function Xm(t,e,n,i){const r=$m(n?.()===!1?{...e(),initial:!1}:e(),i);return Ye(()=>{const o=r.mount(t());J(()=>{n&&e().exit?(r.setActive("exit",!0),Cd(t(),o)):o()}),Kn(e)&&W(()=>r.update(e()))}),[r,Vm(r.getTarget())]}const Jm=["initial","animate","inView","inViewOptions","hover","press","variants","transition","exit"],t1=["tag","ref","style","onMotionStart","onMotionComplete","onHoverStart","onHoverEnd","onPressStart","onPressEnd","onViewEnter","onViewLeave"],Fs=Kt(),zd=t=>{const[e,,n]=gt(t,Jm,t1),[i,r]=Xm(()=>o,()=>({...e}),$t(Od),$t(Fs));let o;return L(Fs.Provider,{value:i,get children(){return L(ri,it({ref:s=>{o=s,t.ref?.(s)},get component(){return t.tag||"div"},get style(){return G(()=>!!t.style)()?Lu(t.style,r):r},get"on:motionstart"(){return t.onMotionStart},get"on:motioncomplete"(){return t.onMotionComplete},get"on:hoverstart"(){return t.onHoverStart},get"on:hoverend"(){return t.onHoverEnd},get"on:pressstart"(){return t.onPressStart},get"on:pressend"(){return t.onPressEnd},get"on:viewenter"(){return t.onViewEnter},get"on:viewleave"(){return t.onViewLeave}},n))}})},Zn=new Proxy(zd,{get:(t,e)=>n=>L(zd,it(n,{tag:e}))}),e1=ut('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 96 60"><path fill="#fff" fill-rule="evenodd" d="M0 6a6 6 0 0 1 6-6h84a6 6 0 0 1 6 6v48a6 6 0 0 1-6 6H6a6 6 0 0 1-6-6V6Zm10.2 7.8c0-1.325 1.11-2.4 2.48-2.4h69.44c1.37 0 2.48 1.075 2.48 2.4s-1.11 2.4-2.48 2.4H12.68c-1.37 0-2.48-1.074-2.48-2.4Zm70.5 35.4a3.9 3.9 0 1 0 0-7.8 3.9 3.9 0 0 0 0 7.8Zm-70.5-3c0-1.326 1.098-2.4 2.451-2.4H34.15c1.353 0 2.451 1.075 2.451 2.4s-1.098 2.4-2.451 2.4h-21.5c-1.354 0-2.451-1.075-2.451-2.4Zm2.474-13.8c-1.366 0-2.474 1.075-2.474 2.4 0 1.326 1.108 2.4 2.474 2.4h30.452c1.366 0 2.474-1.075 2.474-2.4s-1.108-2.4-2.474-2.4H12.674Z" clip-rule="evenodd">'),n1=(t={})=>(()=>{const e=e1();return Rt(e,t,!0,!0),e})(),i1=ut('<svg viewBox="0 0 96 60" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 0a6 6 0 0 0-6 6v48a6 6 0 0 0 6 6h84a6 6 0 0 0 6-6V6a6 6 0 0 0-6-6H6Zm42.671 10.8c-1.365 0-2.471 1.074-2.471 2.4 0 1.325 1.106 2.4 2.471 2.4H82.13c1.365 0 2.471-1.075 2.471-2.4s-1.106-2.4-2.471-2.4H48.67ZM72 49.2c0-1.326 1.058-2.4 2.364-2.4h7.272c1.306 0 2.364 1.075 2.364 2.4s-1.058 2.4-2.364 2.4h-7.272C73.058 51.6 72 50.525 72 49.2ZM48.702 33.6c-1.382 0-2.502 1.075-2.502 2.4s1.12 2.4 2.502 2.4h15.396c1.382 0 2.502-1.075 2.502-2.4s-1.12-2.4-2.502-2.4H48.702Zm-2.502-9c0-1.326 1.106-2.4 2.471-2.4H82.13c1.365 0 2.471 1.075 2.471 2.4S83.494 27 82.129 27H48.67c-1.365 0-2.471-1.075-2.471-2.4ZM13.265 10.8c-1.693 0-3.065 1.407-3.065 3.144v24.024c0 1.117.569 2.097 1.42 2.653.266.174.59.224.894.138a1.12 1.12 0 0 0 .698-.587c1.385-2.82 3.678-5.021 6.438-6.162.373-.154.637-.504.688-.915.05-.41-.119-.816-.443-1.062a7.227 7.227 0 0 1-2.84-5.78c0-3.962 3.115-7.164 6.945-7.164s6.944 3.203 6.944 7.165a7.227 7.227 0 0 1-2.839 5.78 1.155 1.155 0 0 0-.442 1.061c.05.41.314.76.688.915 2.76 1.14 5.052 3.343 6.437 6.162.142.288.395.501.698.587.304.086.628.036.893-.138a3.162 3.162 0 0 0 1.421-2.653V13.944c0-1.737-1.372-3.144-3.065-3.144h-21.47Z" fill="#fff">'),r1=(t={})=>(()=>{const e=i1();return Rt(e,t,!0,!0),e})(),o1=ut('<svg viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="96" height="96" rx="48" fill="#fff"></rect><path d="M44.972 57.46a1.995 1.995 0 0 1-1.414-.584l-8.484-8.486a2 2 0 1 1 2.826-2.83l7.07 7.07L57.7 39.904a2 2 0 1 1 2.83 2.828L46.386 56.876a1.995 1.995 0 0 1-1.414.584Z" fill="#000">'),s1=(t={})=>(()=>{const e=o1();return Rt(e,t,!0,!0),e})(),a1=ut('<svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" fill-rule="evenodd" clip-rule="evenodd" d="M50 7.692C26.634 7.692 7.692 26.634 7.692 50S26.634 92.308 50 92.308 92.308 73.366 92.308 50 73.366 7.692 50 7.692ZM0 50C0 22.386 22.386 0 50 0s50 22.386 50 50-22.386 50-50 50S0 77.614 0 50Z" fill="#fff"></path><circle cx="50" cy="50" r="4" fill="#fff">'),u1=(t={})=>(()=>{const e=a1();return Rt(e,t,!0,!0),e})(),c1=ut('<svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".75" fill-rule="evenodd" clip-rule="evenodd" d="M67.122 11.998a42.158 42.158 0 0 0-34.244 0l-3.397-7.644a50.523 50.523 0 0 1 41.038 0l-3.397 7.644Zm-55.124 20.88a42.158 42.158 0 0 0 0 34.244l-7.644 3.397a50.523 50.523 0 0 1 0-41.038l7.644 3.397Zm76.004 34.244a42.157 42.157 0 0 0 0-34.244l7.644-3.397a50.519 50.519 0 0 1 0 41.038l-7.644-3.397Zm-55.124 20.88a42.157 42.157 0 0 0 34.244 0l3.397 7.644a50.519 50.519 0 0 1-41.038 0l3.397-7.644Z" fill="#fff"></path><circle cx="50" cy="50" r="4" fill="#fff">'),l1=(t={})=>(()=>{const e=c1();return Rt(e,t,!0,!0),e})(),d1=ut('<svg viewBox="0 0 101 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".3" fill-rule="evenodd" clip-rule="evenodd" d="M50.301 7.692C26.935 7.692 7.994 26.634 7.994 50S26.935 92.308 50.3 92.308C73.667 92.308 92.61 73.366 92.61 50S73.667 7.692 50.301 7.692ZM.301 50c0-27.614 22.386-50 50-50s50 22.386 50 50-22.386 50-50 50-50-22.386-50-50Z" fill="#fff"></path><circle cx="50.3" cy="50" r="4" fill="#fff"></circle><path fill-rule="evenodd" clip-rule="evenodd" d="M29.148 13.36C8.912 25.043 1.977 50.918 13.662 71.154L7 75C-6.807 51.085 1.387 20.506 25.301 6.699l3.847 6.661Z" fill="#fff">'),g1=(t={})=>(()=>{const e=d1();return Rt(e,t,!0,!0),e})(),kd={SENSING_FRONT:"scan_the_front_side",SENSING_BACK:"scan_the_back_side",FLIP_CARD:"flip_document",WRONG_SIDE:"scanning_wrong_side",BLUR_DETECTED:"blur_detected",GLARE_DETECTED:"glare_detected",OCCLUDED:"occluded",DOCUMENT_FRAMING_CAMERA_TOO_CLOSE:"move_farther",DOCUMENT_FRAMING_CAMERA_TOO_FAR:"move_closer",DOCUMENT_TOO_CLOSE_TO_FRAME_EDGE:"document_too_close_to_edge",DOCUMENT_FRAMING_CAMERA_ANGLE_TOO_STEEP:"camera_angle_too_steep",LIGHTING_TOO_DARK:"lightning_too_dark",LIGHTING_TOO_BRIGHT:"lightning_too_bright"},h1=ut("<div><div><div><div>"),Hs=ut("<div>"),f1=()=>{const{sdkStore:t}=Ve();return(()=>{const e=h1(),n=e.firstChild,i=n.firstChild,r=i.firstChild;return mt(e,"mb-79tnxm"),mt(i,"mb-1kst2vr"),mt(r,"mb-qaqzbh"),q(r,L(uo,{get children(){return[L(Ae,{get when(){return t.uiState.reticleType==="searching"},get children(){return L(p1,{})}}),L(Ae,{get when(){return t.uiState.reticleType==="processing"},get children(){return L(N1,{})}}),L(Ae,{get when(){return t.uiState.reticleType==="error"},get children(){return L(m1,{})}}),L(Ae,{get when(){return t.uiState.reticleType==="done"},get children(){return L(M1,{})}}),L(Ae,{get when(){return t.uiState.reticleType==="flip"},get children(){return L(y1,{})}})]}})),q(n,L(w1,{get uiState(){return t.uiState}}),null),e})()},M1=()=>L(Zn,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1,transition:{easing:"ease-in-out",duration:.3}},exit:{opacity:0,scale:5},get children(){return L(s1,{class:"mb-oegy9h"})}}),y1=()=>(()=>{const t=Hs();return mt(t,"mb-ah9it3"),q(t,L(Zn,{class:"mb-pcpdyq",initial:{opacity:0},get animate(){return{opacity:1,rotateY:["180deg"],transition:{rotateY:{duration:(kt.FLIP_CARD.minDuration-100)/1e3},opacity:{duration:.5}}}},exit:{opacity:0},get children(){return[L(r1,{class:Ud}),L(n1,{get class(){return $e(Ud,"mb-12tdqjq")}})]}})),t})(),Ud="mb-3q2rd5",Qs=t=>L(Zn.div,{class:"mb-1v17koz",initial:{opacity:0},get animate(){return{opacity:1,background:t.type==="error"?"var(--mb-reticle-error)":"var(--mb-reticle-ok)",transition:{delay:.05}}},transition:{duration:.05},get children(){return t.children}}),p1=()=>L(Qs,{type:"searching",get children(){return L(Zn,{class:"mb-5pevkr",animate:{opacity:1,transform:"rotate(360deg)"},transition:{transform:{duration:1,easing:"ease-in-out",repeat:1/0}},get children(){return L(l1,{class:"mb-1i7l9ps"})}})}}),m1=()=>L(Qs,{type:"error",get children(){return L(u1,{class:"mb-1omzjeg"})}}),N1=()=>L(Qs,{type:"processing",get children(){return L(Zn,{animate:{opacity:1,rotate:"360deg"},transition:{rotate:{duration:.8,easing:[.23,.58,.58,.23],repeat:1/0}},get children(){return L(g1,{class:"mb-1i7l9ps"})}})}}),w1=t=>{const{t:e}=on(),n=()=>{if(t.uiState.key in kd)return kd[t.uiState.key]};return(()=>{const i=Hs();return mt(i,"mb-dcm5x3"),q(i,L(qm,{exitBeforeEnter:!0,get children(){return L(Mf,{on:()=>t.uiState.key,get children(){return L(Lt,{get when(){return n()},get children(){return L(Zn.div,{initial:{opacity:0,transform:"translateY(30px)"},animate:{opacity:1,transform:"translateY(0)",transition:{delay:.05}},transition:{duration:.05},exit:{opacity:0,transform:"translateY(-30px)"},class:"mb-j1awg8",get children(){const r=Hs();return q(r,()=>e[n()]),r}})}})}})}})),i})()},L1=ut('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 36 36"><path fill="#0062F2" fill-rule="evenodd" d="M12 15c0-3.315 2.685-6 6-6s6 2.685 6 6c0 1.924-1.185 2.96-2.339 3.968-1.095.957-2.161 1.889-2.161 3.532h-3c0-2.732 1.413-3.815 2.656-4.767C20.13 16.985 21 16.319 21 15c0-1.65-1.35-3-3-3s-3 1.35-3 3h-3Zm7.5 9v3h-3v-3h3Z" clip-rule="evenodd">'),T1=(t={})=>(()=>{const e=L1();return Rt(e,t,!0,!0),e})(),j1=ut("<p>"),S1=ut("<div>"),E1=()=>{const{updateSolidStore:t}=Ve(),{t:e}=on();return(()=>{const n=S1();return q(n,L(Ty,{overflowPadding:32,get children(){return[L(jy,{onclick:()=>t({helpVisible:!0}),class:b1,get children(){return L(T1,{class:"mb-1slvbtw"})}}),L(Ny,{get children(){return L(my,{get class(){return $e(A1,"mb-style-scope")},get children(){return[L(k0,{}),(()=>{const i=j1();return q(i,()=>e.need_help_tooltip),i})()]}})}})]}})),n})()},b1="mb-posxld",A1="mb-1lgdfjp";var D1=t=>typeof t=="function"&&!t.length?t():t,qn=function(){return qn=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},qn.apply(this,arguments)};function Yd(t,e,n){if(n||arguments.length===2)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}function _d(t){return Array.prototype.slice.call(t)}function Pd(t,e){var n=Math.floor(t);return n===e||n+1===e?t:e}function Rd(){return Date.now()}function Gs(t,e,n){if(e="data-keen-slider-"+e,n===null)return t.removeAttribute(e);t.setAttribute(e,n||"")}function Ir(t,e){return e=e||document,typeof t=="function"&&(t=t(e)),Array.isArray(t)?t:typeof t=="string"?_d(e.querySelectorAll(t)):t instanceof HTMLElement?[t]:t instanceof NodeList?_d(t):[]}function Si(t){t.raw&&(t=t.raw),t.cancelable&&!t.defaultPrevented&&t.preventDefault()}function Ei(t){t.raw&&(t=t.raw),t.stopPropagation&&t.stopPropagation()}function Bd(){var t=[];return{add:function(e,n,i,r){e.addListener?e.addListener(i):e.addEventListener(n,i,r),t.push([e,n,i,r])},input:function(e,n,i,r){this.add(e,n,function(o){return function(s){s.nativeEvent&&(s=s.nativeEvent);var a=s.changedTouches||[],u=s.targetTouches||[],l=s.detail&&s.detail.x?s.detail:null;return o({id:l?l.identifier?l.identifier:"i":u[0]?u[0]?u[0].identifier:"e":"d",idChanged:l?l.identifier?l.identifier:"i":a[0]?a[0]?a[0].identifier:"e":"d",raw:s,x:l&&l.x?l.x:u[0]?u[0].screenX:l?l.x:s.pageX,y:l&&l.y?l.y:u[0]?u[0].screenY:l?l.y:s.pageY})}}(i),r)},purge:function(){t.forEach(function(e){e[0].removeListener?e[0].removeListener(e[2]):e[0].removeEventListener(e[1],e[2],e[3])}),t=[]}}}function Ks(t,e,n){return Math.min(Math.max(t,e),n)}function Me(t){return(t>0?1:0)-(t<0?1:0)||+t}function Fd(t){var e=t.getBoundingClientRect();return{height:Pd(e.height,t.offsetHeight),width:Pd(e.width,t.offsetWidth)}}function Ut(t,e,n,i){var r=t&&t[e];return r==null?n:i&&typeof r=="function"?r():r}function le(t){return Math.round(1e6*t)/1e6}function v1(t){var e,n,i,r,o,s;function a(c){s||(s=c),u(!0);var f=c-s;f>i&&(f=i);var d=r[n];if(d[3]<f)return n++,a(c);var h=d[2],y=d[4],p=d[0],w=d[1]*(0,d[5])(y===0?1:(f-h)/y);if(w&&t.track.to(p+w),f<i)return g();s=null,u(!1),l(null),t.emit("animationEnded")}function u(c){e.active=c}function l(c){e.targetIdx=c}function g(){var c;c=a,o=window.requestAnimationFrame(c)}function M(){var c;c=o,window.cancelAnimationFrame(c),u(!1),l(null),s&&t.emit("animationStopped"),s=null}return e={active:!1,start:function(c){if(M(),t.track.details){var f=0,d=t.track.details.position;n=0,i=0,r=c.map(function(h){var y,p=Number(d),w=(y=h.earlyExit)!==null&&y!==void 0?y:h.duration,m=h.easing,N=h.distance*m(w/h.duration)||0;d+=N;var T=i;return i+=w,f+=N,[p,h.distance,T,i,h.duration,m]}),l(t.track.distToIdx(f)),g(),t.emit("animationStarted")}},stop:M,targetIdx:null}}function I1(t){var e,n,i,r,o,s,a,u,l,g,M,c,f,d,h=1/0,y=[],p=null,w=0;function m(v){C(w+v)}function N(v){var O=T(w+v).abs;return A(O)?O:null}function T(v){var O=Math.floor(Math.abs(le(v/n))),b=le((v%n+n)%n);b===n&&(b=0);var k=Me(v),_=a.indexOf(Yd([],a,!0).reduce(function(Z,X){return Math.abs(X-b)<Math.abs(Z-b)?X:Z})),B=_;return k<0&&O++,_===s&&(B=0,O+=k>0?1:-1),{abs:B+O*s*k,origin:_,rel:B}}function E(v,O,b){var k;if(O||!U())return S(v,b);if(!A(v))return null;var _=T(b??w),B=_.abs,Z=v-_.rel,X=B+Z;k=S(X);var nt=S(X-s*Me(Z));return(nt!==null&&Math.abs(nt)<Math.abs(k)||k===null)&&(k=nt),le(k)}function S(v,O){if(O==null&&(O=le(w)),!A(v)||v===null)return null;v=Math.round(v);var b=T(O),k=b.abs,_=b.rel,B=b.origin,Z=Y(v),X=(O%n+n)%n,nt=a[B],pt=Math.floor((v-(k-_))/s)*n;return le(nt-X-nt+a[Z]+pt+(B===s?n:0))}function A(v){return P(v)===v}function P(v){return Ks(v,l,g)}function U(){return r.loop}function Y(v){return(v%s+s)%s}function C(v){var O;O=v-w,y.push({distance:O,timestamp:Rd()}),y.length>6&&(y=y.slice(-6)),w=le(v);var b=D().abs;if(b!==p){var k=p!==null;p=b,k&&t.emit("slideChanged")}}function D(v){var O=v?null:function(){if(s){var b=U(),k=b?(w%n+n)%n:w,_=(b?w%n:w)-o[0][2],B=0-(_<0&&b?n-Math.abs(_):_),Z=0,X=T(w),nt=X.abs,pt=X.rel,te=o[pt][2],Ct=o.map(function(H,at){var lt=B+Z;(lt<0-H[0]||lt>1)&&(lt+=(Math.abs(lt)>n-1&&b?n:0)*Me(-lt));var qe=at-pt,Xe=Me(qe),Oe=qe+nt;b&&(Xe===-1&<>te&&(Oe+=s),Xe===1&<<te&&(Oe-=s),M!==null&&Oe<M&&(lt+=n),c!==null&&Oe>c&&(lt-=n));var de=lt+H[0]+H[1],Mn=Math.max(lt>=0&&de<=1?1:de<0||lt>1?0:lt<0?Math.min(1,(H[0]+lt)/H[0]):(1-lt)/H[0],0);return Z+=H[0]+H[1],{abs:Oe,distance:r.rtl?-1*lt+1-H[0]:lt,portion:Mn,size:H[0]}});return nt=P(nt),pt=Y(nt),{abs:P(nt),length:i,max:d,maxIdx:g,min:f,minIdx:l,position:w,progress:b?k/n:w/i,rel:pt,slides:Ct,slidesLength:n}}}();return e.details=O,t.emit("detailsChanged"),O}return e={absToRel:Y,add:m,details:null,distToIdx:N,idxToDist:E,init:function(v){if(function(){if(r=t.options,o=(r.trackConfig||[]).map(function(_){return[Ut(_,"size",1),Ut(_,"spacing",0),Ut(_,"origin",0)]}),s=o.length){n=le(o.reduce(function(_,B){return _+B[0]+B[1]},0));var b,k=s-1;i=le(n+o[0][2]-o[k][0]-o[k][2]-o[k][1]),a=o.reduce(function(_,B){if(!_)return[0];var Z=o[_.length-1],X=_[_.length-1]+(Z[0]+Z[2])+Z[1];return X-=B[2],_[_.length-1]>X&&(X=_[_.length-1]),X=le(X),_.push(X),(!b||b<X)&&(u=_.length-1),b=X,_},null),i===0&&(u=0),a.push(le(n))}}(),!s)return D(!0);var O;(function(){var b=t.options.range,k=t.options.loop;M=l=k?Ut(k,"min",-1/0):0,c=g=k?Ut(k,"max",h):u;var _=Ut(b,"min",null),B=Ut(b,"max",null);_!==null&&(l=_),B!==null&&(g=B),f=l===-1/0?l:t.track.idxToDist(l||0,!0,0),d=g===h?g:E(g,!0,0),B===null&&(c=g),Ut(b,"align",!1)&&g!==h&&o[Y(g)][2]===0&&(d-=1-o[Y(g)][0],g=N(d-w)),f=le(f),d=le(d)})(),O=v,Number(O)===O?m(S(P(v))):D()},to:C,velocity:function(){var v=Rd(),O=y.reduce(function(b,k){var _=k.distance,B=k.timestamp;return v-B>200||(Me(_)!==Me(b.distance)&&b.distance&&(b={distance:0,lastTimestamp:0,time:0}),b.time&&(b.distance+=_),b.lastTimestamp&&(b.time+=B-b.lastTimestamp),b.lastTimestamp=B),b},{distance:0,lastTimestamp:0,time:0});return O.distance/O.time||0}}}function x1(t){var e,n,i,r,o,s,a,u;function l(p){return 2*p}function g(p){return Ks(p,a,u)}function M(p){return 1-Math.pow(1-p,3)}function c(){return i?t.track.velocity():0}function f(){y();var p=t.options.mode==="free-snap",w=t.track,m=c();r=Me(m);var N=t.track.details,T=[];if(m||!p){var E=d(m),S=E.dist,A=E.dur;if(A=l(A),S*=r,p){var P=w.idxToDist(w.distToIdx(S),!0);P&&(S=P)}T.push({distance:S,duration:A,easing:M});var U=N.position,Y=U+S;if(Y<o||Y>s){var C=Y<o?o-U:s-U,D=0,v=m;if(Me(C)===r){var O=Math.min(Math.abs(C)/Math.abs(S),1),b=function(B){return 1-Math.pow(1-B,1/3)}(O)*A;T[0].earlyExit=b,v=m*(1-O)}else T[0].earlyExit=0,D+=C;var k=d(v,100),_=k.dist*r;t.options.rubberband&&(T.push({distance:_,duration:l(k.dur),easing:M}),T.push({distance:-_+D,duration:500,easing:M}))}t.animator.start(T)}else t.moveToIdx(g(N.abs),!0,{duration:500,easing:function(B){return 1+--B*B*B*B*B}})}function d(p,w){w===void 0&&(w=1e3);var m=147e-9+(p=Math.abs(p))/w;return{dist:Math.pow(p,2)/m,dur:p/m}}function h(){var p=t.track.details;p&&(o=p.min,s=p.max,a=p.minIdx,u=p.maxIdx)}function y(){t.animator.stop()}t.on("updated",h),t.on("optionsChanged",h),t.on("created",h),t.on("dragStarted",function(){i=!1,y(),e=n=t.track.details.abs}),t.on("dragChecked",function(){i=!0}),t.on("dragEnded",function(){var p=t.options.mode;p==="snap"&&function(){var w=t.track,m=t.track.details,N=m.position,T=Me(c());(N>s||N<o)&&(T=0);var E=e+T;m.slides[w.absToRel(E)].portion===0&&(E-=T),e!==n&&(E=n),Me(w.idxToDist(E,!0))!==T&&(E+=T),E=g(E);var S=w.idxToDist(E,!0);t.animator.start([{distance:S,duration:500,easing:function(A){return 1+--A*A*A*A*A}}])}(),p!=="free"&&p!=="free-snap"||f()}),t.on("dragged",function(){n=t.track.details.abs})}function O1(t){var e,n,i,r,o,s,a,u,l,g,M,c,f,d,h,y,p,w,m=Bd();function N(D){if(s&&u===D.id){var v=A(D);if(l){if(!S(D))return E(D);g=v,l=!1,t.emit("dragChecked")}if(y)return g=v;Si(D);var O=function(k){if(p===-1/0&&w===1/0)return k;var _=t.track.details,B=_.length,Z=_.position,X=Ks(k,p-Z,w-Z);if(B===0)return 0;if(!t.options.rubberband)return X;if(Z<=w&&Z>=p||Z<p&&n>0||Z>w&&n<0)return k;var nt=(Z<p?Z-p:Z-w)/B,pt=r*B,te=Math.abs(nt*pt),Ct=Math.max(0,1-te/o*2);return Ct*Ct*k}(a(g-v)/r*i);n=Me(O);var b=t.track.details.position;(b>p&&b<w||b===p&&n>0||b===w&&n<0)&&Ei(D),M+=O,!c&&Math.abs(M*r)>5&&(c=!0),t.track.add(O),g=v,t.emit("dragged")}}function T(D){!s&&t.track.details&&t.track.details.length&&(M=0,s=!0,c=!1,l=!0,u=D.id,S(D),g=A(D),t.emit("dragStarted"))}function E(D){s&&u===D.idChanged&&(s=!1,t.emit("dragEnded"))}function S(D){var v=P(),O=v?D.y:D.x,b=v?D.x:D.y,k=f!==void 0&&d!==void 0&&Math.abs(d-b)<=Math.abs(f-O);return f=O,d=b,k}function A(D){return P()?D.y:D.x}function P(){return t.options.vertical}function U(){r=t.size,o=P()?window.innerHeight:window.innerWidth;var D=t.track.details;D&&(p=D.min,w=D.max)}function Y(D){c&&(Ei(D),Si(D))}function C(){if(m.purge(),t.options.drag&&!t.options.disabled){var D;D=t.options.dragSpeed||1,a=typeof D=="function"?D:function(O){return O*D},i=t.options.rtl?-1:1,U(),e=t.container,function(){var O="data-keen-slider-clickable";Ir("[".concat(O,"]:not([").concat(O,"=false])"),e).map(function(b){m.add(b,"dragstart",Ei),m.add(b,"mousedown",Ei),m.add(b,"touchstart",Ei)})}(),m.add(e,"dragstart",function(O){Si(O)}),m.add(e,"click",Y,{capture:!0}),m.input(e,"ksDragStart",T),m.input(e,"ksDrag",N),m.input(e,"ksDragEnd",E),m.input(e,"mousedown",T),m.input(e,"mousemove",N),m.input(e,"mouseleave",E),m.input(e,"mouseup",E),m.input(e,"touchstart",T,{passive:!0}),m.input(e,"touchmove",N,{passive:!1}),m.input(e,"touchend",E),m.input(e,"touchcancel",E),m.add(window,"wheel",function(O){s&&Si(O)});var v="data-keen-slider-scrollable";Ir("[".concat(v,"]:not([").concat(v,"=false])"),t.container).map(function(O){return function(b){var k;m.input(b,"touchstart",function(_){k=A(_),y=!0,h=!0},{passive:!0}),m.input(b,"touchmove",function(_){var B=P(),Z=B?b.scrollHeight-b.clientHeight:b.scrollWidth-b.clientWidth,X=k-A(_),nt=B?b.scrollTop:b.scrollLeft,pt=B&&b.style.overflowY==="scroll"||!B&&b.style.overflowX==="scroll";if(k=A(_),(X<0&&nt>0||X>0&&nt<Z)&&h&&pt)return y=!0;h=!1,Si(_),y=!1}),m.input(b,"touchend",function(){y=!1})}(O)})}}t.on("updated",U),t.on("optionsChanged",C),t.on("created",C),t.on("destroyed",m.purge)}function C1(t){var e,n,i=null;function r(f,d,h){t.animator.active?s(f,d,h):requestAnimationFrame(function(){return s(f,d,h)})}function o(){r(!1,!1,n)}function s(f,d,h){var y=0,p=t.size,w=t.track.details;if(w&&e){var m=w.slides;e.forEach(function(N,T){if(f)!i&&d&&u(N,null,h),l(N,null,h);else{if(!m[T])return;var E=m[T].size*p;!i&&d&&u(N,E,h),l(N,m[T].distance*p-y,h),y+=E}})}}function a(f){return t.options.renderMode==="performance"?Math.round(f):f}function u(f,d,h){var y=h?"height":"width";d!==null&&(d=a(d)+"px"),f.style["min-"+y]=d,f.style["max-"+y]=d}function l(f,d,h){if(d!==null){d=a(d);var y=h?d:0;d="translate3d(".concat(h?0:d,"px, ").concat(y,"px, 0)")}f.style.transform=d,f.style["-webkit-transform"]=d}function g(){e&&(s(!0,!0,n),e=null),t.on("detailsChanged",o,!0)}function M(){r(!1,!0,n)}function c(){g(),n=t.options.vertical,t.options.disabled||t.options.renderMode==="custom"||(i=Ut(t.options.slides,"perView",null)==="auto",t.on("detailsChanged",o),(e=t.slides).length&&M())}t.on("created",c),t.on("optionsChanged",c),t.on("beforeOptionsChanged",function(){g()}),t.on("updated",M),t.on("destroyed",g)}function z1(t,e){return function(n){var i,r,o,s,a,u=Bd();function l(S){var A;Gs(n.container,"reverse",(A=n.container,window.getComputedStyle(A,null).getPropertyValue("direction")!=="rtl"||S?null:"")),Gs(n.container,"v",n.options.vertical&&!S?"":null),Gs(n.container,"disabled",n.options.disabled&&!S?"":null)}function g(){M()&&y()}function M(){var S=null;if(s.forEach(function(P){P.matches&&(S=P.__media)}),S===i)return!1;i||n.emit("beforeOptionsChanged"),i=S;var A=S?o.breakpoints[S]:o;return n.options=qn(qn({},o),A),l(),T(),E(),w(),!0}function c(S){var A=Fd(S);return(n.options.vertical?A.height:A.width)/n.size||1}function f(){return n.options.trackConfig.length}function d(S){for(var A in i=!1,o=qn(qn({},e),S),u.purge(),r=n.size,s=[],o.breakpoints||[]){var P=window.matchMedia(A);P.__media=A,s.push(P),u.add(P,"change",g)}u.add(window,"orientationchange",N),u.add(window,"resize",m),M()}function h(S){n.animator.stop();var A=n.track.details;n.track.init(S??(A?A.abs:0))}function y(S){h(S),n.emit("optionsChanged")}function p(S,A){if(S)return d(S),void y(A);T(),E();var P=f();w(),f()!==P?y(A):h(A),n.emit("updated")}function w(){var S=n.options.slides;if(typeof S=="function")return n.options.trackConfig=S(n.size,n.slides);for(var A=n.slides,P=A.length,U=typeof S=="number"?S:Ut(S,"number",P,!0),Y=[],C=Ut(S,"perView",1,!0),D=Ut(S,"spacing",0,!0)/n.size||0,v=C==="auto"?D:D/C,O=Ut(S,"origin","auto"),b=0,k=0;k<U;k++){var _=C==="auto"?c(A[k]):1/C-D+v,B=O==="center"?.5-_/2:O==="auto"?0:O;Y.push({origin:B,size:_,spacing:D}),b+=_}if(b+=D*(U-1),O==="auto"&&!n.options.loop&&C!==1){var Z=0;Y.map(function(X){var nt=b-Z;return Z+=X.size+D,nt>=1||(X.origin=1-nt-(b>1?0:1-b)),X})}n.options.trackConfig=Y}function m(){T();var S=n.size;n.options.disabled||S===r||(r=S,p())}function N(){m(),setTimeout(m,500),setTimeout(m,2e3)}function T(){var S=Fd(n.container);n.size=(n.options.vertical?S.height:S.width)||1}function E(){n.slides=Ir(n.options.selector,n.container)}n.container=(a=Ir(t,document)).length?a[0]:null,n.destroy=function(){u.purge(),n.emit("destroyed"),l(!0)},n.prev=function(){n.moveToIdx(n.track.details.abs-1,!0)},n.next=function(){n.moveToIdx(n.track.details.abs+1,!0)},n.update=p,d(n.options)}}var k1=function(t,e,n){try{return function(i,r){var o,s={};return o={emit:function(a){s[a]&&s[a].forEach(function(l){l(o)});var u=o.options&&o.options[a];u&&u(o)},moveToIdx:function(a,u,l){var g=o.track.idxToDist(a,u);if(g){var M=o.options.defaultAnimation;o.animator.start([{distance:g,duration:Ut(l||M,"duration",500),easing:Ut(l||M,"easing",function(c){return 1+--c*c*c*c*c})}])}},on:function(a,u,l){l===void 0&&(l=!1),s[a]||(s[a]=[]);var g=s[a].indexOf(u);g>-1?l&&delete s[a][g]:l||s[a].push(u)},options:i},function(){if(o.track=I1(o),o.animator=v1(o),r)for(var a=0,u=r;a<u.length;a++)(0,u[a])(o);o.track.init(o.options.initial||0),o.emit("created")}(),o}(e,Yd([z1(t,{drag:!0,mode:"snap",renderMode:"precision",rubberband:!0,selector:".keen-slider__slide"}),C1,O1,x1],n||[],!0))}catch(i){console.error(i)}};const U1=(t,...e)=>{let n,i;const r=()=>D1(t),[o,s]=K(r()?.initial||0),a=()=>n&&n.destroy(),u=(g={})=>({selector:i.childNodes,...r(),...g}),l=()=>n?.update(u());return[g=>{i=g,i.classList.add("keen-slider"),Ye(()=>{n=new k1(i,u(),e),n.on("slideChanged",()=>s(n.track.details.rel))}),J(a),typeof t=="function"&&W(ge(()=>t,l))},{current:o,next:()=>n&&n.next(),prev:()=>n&&n.prev(),details:()=>n?n.track.details:{},slider:()=>n,moveTo:(g,M=250,c=!1,f)=>n?.moveToIdx(g,c,{duration:M,easing:f}),destroy:a,update:l}]},xr=t=>{const[e]=gt(t,["class"]);return L(sr,it(t,{get class(){return $e(e.class,"mb-1epo54l",t.variant==="secondary"&&"mb-1ohbwoy")},get children(){return t.children}}))},Y1="data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjgwIiBoZWlnaHQ9IjE5NyIgZmlsb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div><img alt="" srcset=""></div><div><h2></h2><p></p></div></div><div><div><img alt="" srcset=""></div><div><h2></h2><p></p></div></div></div><div></div><div>'),Kd=ut("<div>"),B1=()=>{let t;const{solidStore:e,updateSolidStore:n}=Ve(),[i,{current:r,next:o,prev:s}]=U1(),a=()=>{n({helpVisible:!1}),e.captureSdk?.startCapture()};Ye(()=>{i(t),e.captureSdk?.pauseCapture()});const{t:u}=on();return L(cr,{open:!0,get children(){return L(ur,{get children(){return[L(Xo,{class:Qd}),(()=>{const l=Kd();return mt(l,Hd),q(l,L(ar,{onEscapeKeyDown:a,onPointerDownOutside:a,onOpenAutoFocus:g=>g.preventDefault(),class:Gd,get children(){return[L(Zo,{onClick:a,class:"mb-8u3v3h",get children(){return L(vs,{class:"mb-h83tsy"})}}),(()=>{const g=R1(),M=g.firstChild,c=M.firstChild,f=c.firstChild,d=f.firstChild,h=f.nextSibling,y=h.firstChild,p=y.nextSibling,w=c.nextSibling,m=w.firstChild,N=m.firstChild,T=m.nextSibling,E=T.firstChild,S=E.nextSibling,A=w.nextSibling,P=A.firstChild,U=P.firstChild,Y=P.nextSibling,C=Y.firstChild,D=C.nextSibling,v=M.nextSibling,O=v.nextSibling;mt(g,"mb-d1kpoi");const b=t;return typeof b=="function"?au(b,M):t=M,Pe(d,"src",Y1),q(y,()=>u.tutorial_fields_visible_title),q(p,()=>u.tutorial_fields_visible_details),Pe(N,"src",_1),q(E,()=>u.tutorial_harsh_light_title),q(S,()=>u.tutorial_harsh_light_details),Pe(U,"src",P1),q(C,()=>u.tutorial_keep_still_title),q(D,()=>u.tutorial_keep_still_details),mt(v,"mb-slxsc0"),q(v,L(ou,{get each(){return new Array(3).fill(null)},children:(k,_)=>(()=>{const B=Kd();return re(()=>mt(B,$e("mb-1777uja",_()===r()&&"mb-rp0tll"))),B})()})),mt(O,"mb-4sy7j9"),q(O,L(xr,{get disabled(){return r()===0},onClick:()=>s(),variant:"secondary",get children(){return u.back}}),null),q(O,L(uo,{get children(){return[L(Ae,{get when(){return r()!==2},get children(){return L(xr,{onClick:()=>o(),get children(){return u.next}})}}),L(Ae,{get when(){return r()===2},get children(){return L(xr,{onClick:a,get children(){return u.done}})}})]}}),null),g})()]}})),l})()]}})}})},F1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyODAiIGhlaWdodD0iMjA2IiBmaWxsPSJub25lIj4KICA8cGF0aCBmaWxsPSIjMTQyNjQxIiBkPSJNMjI3LjA4NCAzNC4zNjlINDcuNTQ4Yy01LjAyMyAwLTkuMDk1IDQuMDU4LTkuMDk1IDkuMDYzdjk1LjY1OGMwIDUuMDA1IDQuMDcyIDkuMDYzIDkuMDk1IDkuMDYzaDE3OS41MzZjNS4wMjQgMCA5LjA5Ni00LjA1OCA5LjA5Ni05LjA2M1Y0My40MzJjMC01LjAwNS00LjA3Mi05LjA2My05LjA5Ni05LjA2M1oiIG9wYWNpdHk9Ii4zIi8+CiAgPHBhdGggZmlsbD0iI2ZmZiIgZD0iTTIzMS4yODUgMjguNzg5SDUxLjc0OWMtNS4wMjQgMC05LjA5NiA0LjA1Ny05LjA5NiA5LjA2M3Y5NS42NTdjMCA1LjAwNiA0LjA3MiA5LjA2MyA5LjA5NiA5LjA2M2gxNzkuNTM2YzUuMDIzIDAgOS4wOTUtNC4wNTcgOS4wOTUtOS4wNjNWMzcuODUyYzAtNS4wMDUtNC4wNzItOS4wNjMtOS4wOTUtOS4wNjNaIi8+CiAgPHBhdGggZmlsbD0iIzE0MjY0MSIgZD0iTTIzMS4yODUgMTQzLjczSDUxLjc0OWMtNS42NTYgMC0xMC4yNjItNC41ODUtMTAuMjYyLTEwLjIyNVYzNy44NDdjMC01LjYzNiA0LjYwMS0xMC4yMjUgMTAuMjYyLTEwLjIyNWgxNzkuNTM2YzUuNjU2IDAgMTAuMjYyIDQuNTg1IDEwLjI2MiAxMC4yMjV2OTUuNjU4YzAgNS42MzYtNC42MDIgMTAuM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ni03LjktNy45MjktNy45SDM4LjQ5NXYuMDA0Wk0xMzguNiAxOTQuODRjNy42MDMgMCAxMy43NjYtNi4xNDIgMTMuNzY2LTEzLjcxOHMtNi4xNjMtMTMuNzE4LTEzLjc2Ni0xMy43MTgtMTMuNzY3IDYuMTQyLTEzLjc2NyAxMy43MTggNi4xNjQgMTMuNzE4IDEzLjc2NyAxMy43MThaIi8+CiAgPHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE0NC43NTUgMTc3LjA4MWExLjE2OCAxLjE2OCAwIDAgMC0xLjY1MiAwbC02LjE0MSA2LjExOS0yLjY3NC0yLjY2NGExLjE2OCAxLjE2OCAwIDAgMC0xLjY1MiAwIDEuMTYgMS4xNiAwIDAgMCAwIDEuNjQ2bDMuNDYzIDMuNDU1Yy4yMjguMjI4LjUyNy4zNC44MjYuMzRoLjA3NGMuMjk5IDAgLjU5OC0uMTEyLjgyNi0uMzRsNi45My02LjkwNWExLjE1OCAxLjE1OCAwIDAgMCAwLTEuNjQ2di0uMDA1WiIvPgo8L3N2Zz4=",H1=ut('<div><img alt="" srcset=""><h2></h2><p>'),Q1=ut("<div>"),G1=()=>{const[t,e]=K(!0),{solidStore:n}=Ve(),i=()=>{e(!1),n.captureSdk?.startCapture()};Ye(()=>{n.captureSdk?.pauseCapture()});const{t:r}=on();return L(cr,{get open(){return t()},get children(){return L(ur,{get children(){return[L(Xo,{class:Qd}),(()=>{const o=Q1();return mt(o,Hd),q(o,L(ar,{onEscapeKeyDown:i,onPointerDownOutside:i,class:Gd,get children(){return[L(Zo,{onClick:i,class:"mb-8u3v3h",get children(){return L(vs,{class:"mb-h83tsy"})}}),(()=>{const s=H1(),a=s.firstChild,u=a.nextSibling,l=u.nextSibling;return mt(s,"mb-zjp32o"),Pe(a,"src",F1),mt(a,"mb-zgw7tn"),q(u,()=>r.tutorial_fields_visible_title),q(l,()=>r.tutorial_fields_visible_details),q(s,L(xr,{onClick:i,class:"mb-1r8ti85",get children(){return r.tutorial_fields_visible_start}}),null),s})()]}})),o})()]}})}})},K1=ut('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 115 53"><path fill="#fff" d="M35.088 19.572c1.314 0 2.178-.891 2.178-2.16 0-1.287-.855-2.151-2.178-2.151h-2.601v6.579h1.152v-2.268h1.449Zm-.225-3.285c.765 0 1.197.396 1.197 1.116 0 .72-.423 1.143-1.215 1.143h-1.206v-2.259h1.224Zm2.909 3.321c0 1.386 1 2.34 2.376 2.34 1.377 0 2.376-.954 2.376-2.34s-.999-2.34-2.376-2.34c-1.377 0-2.376.954-2.376 2.34Zm1.098 0c0-.81.522-1.359 1.278-1.359s1.278.549 1.278 1.359c0 .81-.522 1.359-1.278 1.359s-1.278-.549-1.278-1.359Zm5.466 2.232h1.07l.613-1.908c.225-.729.306-1.044.35-1.251.037.225.136.648.316 1.233l.612 1.926h1.026l1.539-4.446H48.7l-.594 1.908c-.081.279-.225.81-.297 1.143a16.122 16.122 0 0 0-.288-1.143l-.594-1.908h-1.116l-.612 1.908c-.144.441-.225.72-.306 1.152a14.615 14.615 0 0 0-.27-1.152l-.585-1.908h-1.143l1.44 4.446Zm8.14.117c1.16 0 1.97-.585 2.16-1.557h-1.017c-.126.423-.522.657-1.125.657-.73 0-1.143-.396-1.224-1.179l3.348-.009v-.333c0-1.386-.846-2.277-2.178-2.277-1.305 0-2.214.963-2.214 2.358 0 1.377.927 2.34 2.25 2.34Zm-.027-3.798c.657 0 1.08.405 1.08 1.017h-2.232c.108-.666.504-1.017 1.152-1.017Zm6.018-.783a1.948 1.948 0 0 0-.486-.063c-.594 0-1.017.297-1.206.738l-.063-.648h-1.035v4.437h1.098v-2.16c0-.864.495-1.287 1.287-1.287h.405v-1.017Zm2.763 4.581c1.16 0 1.97-.585 2.16-1.557h-1.018c-.126.423-.522.657-1.125.657-.729 0-1.143-.396-1.224-1.179l3.348-.009v-.333c0-1.386-.846-2.277-2.178-2.277-1.305 0-2.214.963-2.214 2.358 0 1.377.927 2.34 2.25 2.34Zm-.028-3.798c.657 0 1.08.405 1.08 1.017H60.05c.108-.666.504-1.017 1.152-1.017Zm5.055 3.798c.675 0 1.251-.297 1.521-.81l.072.693h1.008v-6.696H67.77v2.817c-.279-.441-.828-.702-1.449-.702-1.34 0-2.15.99-2.15 2.376 0 1.377.8 2.322 2.087 2.322Zm.243-1.008c-.765 0-1.233-.558-1.233-1.35s.468-1.359 1.233-1.359c.765 0 1.26.558 1.26 1.359 0 .801-.495 1.35-1.26 1.35Zm7.305.891.072-.693c.261.513.828.81 1.494.81 1.278 0 2.115-.945 2.115-2.313 0-1.404-.774-2.394-2.043-2.394-.675 0-1.269.297-1.557.792v-2.898h-1.098v6.696h1.017Zm.09-2.241c0-.801.495-1.359 1.251-1.359.774 0 1.233.567 1.233 1.359s-.459 1.35-1.233 1.35c-.756 0-1.25-.549-1.25-1.35Zm4.092 4.302c.243.063.513.099.819.099.728 0 1.197-.342 1.53-1.17l2.177-5.436H81.38l-1.206 3.24-1.142-3.24H77.87l1.791 4.635-.126.333c-.189.522-.459.621-.89.621h-.657v.918ZM19.816 35.596l-2.89-7.432H15v9.672h1.314V30.23l2.996 7.648h.959l3.022-7.716v7.675h1.355v-9.672h-1.939l-2.89 7.432Zm8.837-7.433h-1.422v9.673h1.422v-9.672Zm19.01 4.828a3.188 3.188 0 0 0 .59-1.87c0-.791-.34-1.53-.958-2.08-.637-.566-1.523-.876-2.497-.876h-3.925v9.673h1.422v-3.46h2.303l2.008 3.459h1.688l-2.15-3.696a3.277 3.277 0 0 0 1.519-1.15Zm-.86-1.856a1.925 1.925 0 0 1-.548 1.369c-.362.362-.87.561-1.43.561h-2.532v-3.573h2.532c1.128 0 1.979.706 1.979 1.643ZM54.28 28c-1.334 0-2.537.525-3.392 1.477-.822.918-1.276 2.169-1.276 3.523s.453 2.612 1.276 3.529c.852.948 2.057 1.47 3.392 1.47 1.341 0 2.55-.523 3.404-1.47.824-.916 1.278-2.17 1.278-3.53 0-1.36-.454-2.605-1.278-3.522C56.83 28.523 55.62 28 54.28 28Zm0 8.645a2.997 2.997 0 0 1-1.27-.278 3.047 3.047 0 0 1-1.04-.79c-.586-.678-.909-1.593-.909-2.577s.323-1.892.91-2.572a3.017 3.017 0 0 1 2.31-1.073c.892 0 1.715.381 2.316 1.074.59.68.916 1.593.916 2.57 0 .979-.325 1.899-.916 2.578a3.064 3.064 0 0 1-1.044.79c-.4.184-.834.28-1.273.278Zm12.474-3.883c.83-.466 1.322-1.283 1.322-2.199 0-1.413-1.233-2.4-2.995-2.4h-4.17v9.673h4.37c1.736 0 2.996-1.175 2.996-2.794.001-.972-.58-1.839-1.523-2.28Zm-1.431 3.747h-2.99v-3.002h2.786c1.022 0 1.71.557 1.71 1.386 0 .981-.591 1.616-1.506 1.616Zm-.364-4.303h-2.627v-2.714h2.787c.917 0 1.507.484 1.507 1.235.001.737-.515 1.48-1.667 1.48v-.001Zm6.787-4.043h-1.422v9.673h6.222v-1.355h-4.8v-8.318Zm7.808 0h-1.422v9.673h1.422v-9.672Zm8.93 7.157-4.954-7.126-.021-.03h-1.375v9.672h1.341v-7.51l5.219 7.51h1.131v-9.672h-1.34v7.156Zm7.694-2.9 3.72-4.257H98.16l-4.333 4.948v-4.947h-1.422v9.672h1.422V35.03l1.38-1.56 3.07 4.367H100l-3.822-5.417Zm-58.265 2.144c-.634 1.468-1.448 2.094-2.726 2.094-.874 0-1.674-.38-2.253-1.069-.571-.678-.885-1.598-.885-2.59 0-.983.307-1.896.864-2.572.571-.691 1.364-1.072 2.234-1.072 1.177 0 2.039.597 2.633 1.825l.025.052h1.488l-.007-.042c-.035-.204-.109-.394-.18-.581l-.023-.06a3.979 3.979 0 0 0-1.522-1.872c-.685-.45-1.511-.677-2.455-.677-1.29 0-2.453.525-3.277 1.478-.793.917-1.23 2.168-1.23 3.522 0 1.372.44 2.629 1.237 3.538.839.956 1.988 1.462 3.324 1.462.936 0 1.758-.247 2.445-.733.115-.082.226-.17.332-.264.696-.615 1.223-1.491 1.41-2.343l.004-.022c.007-.03.012-.06.017-.088l.007-.042h-1.439l-.023.056Z">'),$1=(t={})=>(()=>{const e=K1();return Rt(e,t,!0,!0),e})(),V1=ut('<div><div></div><video src="">'),W1=ut("<div>"),$d=()=>{let t;const{solidStore:e,sdkStore:n}=Ve(),{t:i}=on();return W(()=>{const r=e.captureSdk;!n||!r||r.startCameraStream(t).then(async()=>{e.uiSettings.showTutorial||await r.startCapture()})}),(()=>{const r=V1(),o=r.firstChild,s=o.nextSibling;q(r,L(Lt,{get when(){return!n.isQueryingCameras},get fallback(){return(()=>{const u=W1();return q(u,()=>i.camera_query_in_progress),u})()},get children(){return L(tm,{})}}),o),q(r,L(Lt,{get when(){return n.isPlaying&&e.uiSettings.showTutorial},get children(){return L(G1,{})}}),o),q(r,L(Lt,{get when(){return e.helpVisible},get children(){return L(B1,{})}}),o),q(r,L(Lt,{get when(){return n.isCapturing||n.uiState.key===kt.FLIP_CARD.key||n.uiState.key===kt.SIDE_CAPTURED.key||n.uiState.key===kt.DOCUMENT_CAPTURED.key},get children(){return L(f1,{})}}),o),mt(o,tN),q(o,L($1,{class:J1})),q(r,L(E1,{}),s);const a=t;return typeof a=="function"?au(a,s):t=s,mt(s,eN),re(()=>mt(r,$e("mb-style-scope",q1,"mb-video-screen"))),r})()},Z1=()=>L(cr,{defaultOpen:!0,get children(){return L(ur,{get children(){return L(ar,{onEscapeKeyDown:t=>t.preventDefault(),onPointerDownOutside:t=>t.preventDefault(),onOpenAutoFocus:t=>t.preventDefault(),class:X1,get children(){return L($d,{})}})}})}}),q1="mb-1lz2sq8",X1="mb-1v96fqo",J1="mb-191sfs5",tN="mb-o9aq4l",eN="mb-1f2d6cn",nN=ut('<div class="alert-dialog__header">'),iN=ut("<p>"),rN=ut('<div class="alert-dialog__positioner">'),oN=ut("<pre>"),sN=t=>L(cr,{defaultOpen:!0,get children(){return L(ur,{get children(){return[L(Xo,{class:"alert-dialog__overlay"}),(()=>{const e=rN();return q(e,L(O0,{class:"alert-dialog__content",get children(){return[(()=>{const n=nN();return q(n,L(x0,{class:"alert-dialog__title",get children(){return["Caught error: ",G(()=>t.error.name)]}}),null),q(n,L(Zo,{class:"alert-dialog__close-button",children:"Close"}),null),n})(),L(I0,{class:"alert-dialog__description",get children(){return[(()=>{const n=iN();return q(n,()=>t.error.message),n})(),L(Lt,{get when(){return t.error.stack},children:n=>(()=>{const i=oN();return mt(i,"mb-rjcpop"),q(i,n),i})()})]}})]}})),e})()]}})}}),aN=t=>{const{solidStore:e,sdkStore:n}=Ve(),{updateLocalization:i}=on();return W(()=>{e.captureSdk&&t.exposeApiOnLoad({updateLocalization:i,captureSdk:e.captureSdk})}),[L(Lt,{get when(){return n.errorState},children:r=>L(sN,{get error(){return r()}})}),L(Lt,{get when(){return e.captureSdk},get children(){return L(ri,{get component(){return e.uiSettings.target.id===Zd?Z1:$d}})}})]};function uN(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cN=function(t){return lN(t)&&!dN(t)};function lN(t){return!!t&&typeof t=="object"}function dN(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||fN(t)}var gN=typeof Symbol=="function"&&Symbol.for,hN=gN?Symbol.for("react.element"):60103;function fN(t){return t.$$typeof===hN}function MN(t){return Array.isArray(t)?[]:{}}function bi(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Xn(MN(t),t,e):t}function yN(t,e,n){return t.concat(e).map(function(i){return bi(i,n)})}function pN(t,e){if(!e.customMerge)return Xn;var n=e.customMerge(t);return typeof n=="function"?n:Xn}function mN(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function Vd(t){return Object.keys(t).concat(mN(t))}function Wd(t,e){try{return e in t}catch{return!1}}function NN(t,e){return Wd(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function wN(t,e,n){var i={};return n.isMergeableObject(t)&&Vd(t).forEach(function(r){i[r]=bi(t[r],n)}),Vd(e).forEach(function(r){NN(t,r)||(Wd(t,r)&&n.isMergeableObject(e[r])?i[r]=pN(r,n)(t[r],e[r],n):i[r]=bi(e[r],n))}),i}function Xn(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||yN,n.isMergeableObject=n.isMergeableObject||cN,n.cloneUnlessOtherwiseSpecified=bi;var i=Array.isArray(e),r=Array.isArray(t),o=i===r;return o?i?n.arrayMerge(t,e,n):wN(t,e,n):bi(e,n)}Xn.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,i){return Xn(n,i,e)},{})};var LN=Xn,TN=LN;const jN=uN(TN),Zd="mount-point";function SN(t){return new Promise(e=>{const n=()=>a(),i={captureSdk:void 0,helpVisible:!1,uiSettings:{target:null,showTutorial:!0,showErrorDialog:!0},dismountFn:n},r=t.uiSettings?.target??document.createElement("div");!r.isConnected&&r instanceof HTMLDivElement&&(r.setAttribute("id",Zd),document.body.appendChild(r));const o=jN(i,t,{isMergeableObject:Jh});o.uiSettings.target=r;const s=u=>{e({dismount:n,...u})},a=Hh(()=>L(af,{get userStrings(){return t.uiSettings?.localization},get children(){return L(Wp,{get sdkSettings(){return t.sdkSettings},mergedDefaults:o,get children(){return L(aN,{exposeApiOnLoad:s})}})}}),o.uiSettings.target)})}Dt.ConfiguredCamera=ha,Dt.FeedbackParser=Ya,Dt.LicenseTokenState=zr,Dt.ServerPermissionSubmitResultStatus=kr,Dt.createCaptureSdk=fh,Dt.createCaptureUi=SN,Dt.getBase64StringFromDataURL=yh,Dt.imageDataToUrl=Mh,Dt.resetCoreStore=Zr,Dt.uiStateMap=ne,Dt.zustandStore=$,Object.defineProperty(Dt,Symbol.toStringTag,{value:"Module"})});
|