@incodetech/welcome 1.92.0 → 1.92.1
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/onBoarding.mjs +7 -3
- package/dist/onBoarding.umd.js +2 -2
- package/package.json +6 -1
package/dist/onBoarding.mjs
CHANGED
|
@@ -24042,7 +24042,11 @@ function getInitializationParams(Be = !1) {
|
|
|
24042
24042
|
}
|
|
24043
24043
|
typeof window < "u" && (window.wasmArrayBuffer = null);
|
|
24044
24044
|
async function fetchGlueCode(Be) {
|
|
24045
|
-
return import(
|
|
24045
|
+
return import(
|
|
24046
|
+
/* @vite-ignore */
|
|
24047
|
+
/* webpackIgnore: true */
|
|
24048
|
+
Be.replace(/\.wasm($|\?)/, ".js$1")
|
|
24049
|
+
);
|
|
24046
24050
|
}
|
|
24047
24051
|
async function loadWasmBinary(Be, Le, Ye = !0) {
|
|
24048
24052
|
const tt = Ye && Le ? Le : Be;
|
|
@@ -25309,7 +25313,7 @@ function emptyQueue(Be) {
|
|
|
25309
25313
|
}
|
|
25310
25314
|
const state = {
|
|
25311
25315
|
token: null
|
|
25312
|
-
}, version$3 = "1.92.
|
|
25316
|
+
}, version$3 = "1.92.1", devDependencies = {
|
|
25313
25317
|
"@fingerprintjs/fingerprintjs-pro": "3.12.3",
|
|
25314
25318
|
"@thumbmarkjs/thumbmarkjs": "0.20.6"
|
|
25315
25319
|
}, deviceFingerprintSignalsUrl = "/omni/add/device-fingerprint-signals", triggerEventCodes = /* @__PURE__ */ new Set(["modelLoadEnd", "captureAttemptFinished"]), sessionInitEventCode = "modelLoadEnd";
|
|
@@ -358450,7 +358454,7 @@ function init(Be = {}) {
|
|
|
358450
358454
|
};
|
|
358451
358455
|
return initAndBind(BrowserClient, tt);
|
|
358452
358456
|
}
|
|
358453
|
-
const DEPRECATION_PERIOD_MONTHS = 12, SDK_RELEASE_DATE = "2026-08-
|
|
358457
|
+
const DEPRECATION_PERIOD_MONTHS = 12, SDK_RELEASE_DATE = "2026-08-26", DEPRECATED_SDK_WARNING_MESSAGE = "You are using a deprecated SDK version. Please upgrade to the latest version to avoid any disruption.";
|
|
358454
358458
|
let hasWarned = !1;
|
|
358455
358459
|
const parseReleaseDate = (Be) => {
|
|
358456
358460
|
const Le = /^(\d{4})-(\d{2})-(\d{2})$/.exec(Be);
|
package/dist/onBoarding.umd.js
CHANGED
|
@@ -103,7 +103,7 @@ Check the top-level render call using <`+x0+">.")}return q0}}function br(b0,q0){
|
|
|
103
103
|
<%s {...props} />
|
|
104
104
|
React keys must be passed directly to JSX without using spread:
|
|
105
105
|
let props = %s;
|
|
106
|
-
<%s key={someKey} {...props} />`,Tn,bn,Ur,bn),xr[bn+Tn]=!0}}return b0===tt?Ir(T0):gr(T0),T0}}function Wn(b0,q0,x0){return mn(b0,q0,x0,!0)}function Z0(b0,q0,x0){return mn(b0,q0,x0,!1)}var In=Z0,Mn=Wn;reactJsxRuntime_development.Fragment=tt,reactJsxRuntime_development.jsx=In,reactJsxRuntime_development.jsxs=Mn}()),reactJsxRuntime_development}process.env.NODE_ENV==="production"?jsxRuntime.exports=requireReactJsxRuntime_production_min():jsxRuntime.exports=requireReactJsxRuntime_development();var jsxRuntimeExports=jsxRuntime.exports,__spreadArray$1=function(Be,Le,Ye){if(Ye||arguments.length===2)for(var tt=0,nt=Le.length,ft;tt<nt;tt++)(ft||!(tt in Le))&&(ft||(ft=Array.prototype.slice.call(Le,0,tt)),ft[tt]=Le[tt]);return Be.concat(ft||Array.prototype.slice.call(Le))},clipboardEvents=["onCopy","onCut","onPaste"],compositionEvents=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],focusEvents=["onFocus","onBlur"],formEvents=["onInput","onInvalid","onReset","onSubmit"],imageEvents=["onLoad","onError"],keyboardEvents=["onKeyDown","onKeyPress","onKeyUp"],mediaEvents=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],mouseEvents=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],dragEvents=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],selectionEvents=["onSelect"],touchEvents=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],pointerEvents=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],uiEvents=["onScroll"],wheelEvents=["onWheel"],animationEvents=["onAnimationStart","onAnimationEnd","onAnimationIteration"],transitionEvents=["onTransitionEnd"],otherEvents=["onToggle"],changeEvents=["onChange"],allEvents=__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1([],clipboardEvents,!0),compositionEvents,!0),focusEvents,!0),formEvents,!0),imageEvents,!0),keyboardEvents,!0),mediaEvents,!0),mouseEvents,!0),dragEvents,!0),selectionEvents,!0),touchEvents,!0),pointerEvents,!0),uiEvents,!0),wheelEvents,!0),animationEvents,!0),transitionEvents,!0),changeEvents,!0),otherEvents,!0);function makeEventProps(Be,Le){var Ye={};return allEvents.forEach(function(tt){var nt=Be[tt];nt&&(Le?Ye[tt]=function(ft){return nt(ft,Le(tt))}:Ye[tt]=nt)}),Ye}function makeCancellablePromise(Be){var Le=!1,Ye=new Promise(function(tt,nt){Be.then(function(ft){return!Le&&tt(ft)}).catch(function(ft){return!Le&&nt(ft)})});return{promise:Ye,cancel:function(){Le=!0}}}function r$4(Be){var Le,Ye,tt="";if(typeof Be=="string"||typeof Be=="number")tt+=Be;else if(typeof Be=="object")if(Array.isArray(Be)){var nt=Be.length;for(Le=0;Le<nt;Le++)Be[Le]&&(Ye=r$4(Be[Le]))&&(tt&&(tt+=" "),tt+=Ye)}else for(Ye in Be)Be[Ye]&&(tt&&(tt+=" "),tt+=Ye);return tt}function clsx$1(){for(var Be,Le,Ye=0,tt="",nt=arguments.length;Ye<nt;Ye++)(Be=arguments[Ye])&&(Le=r$4(Be))&&(tt&&(tt+=" "),tt+=Le);return tt}var isProduction=process.env.NODE_ENV==="production",prefix$1="Invariant failed";function invariant$1(Be,Le){if(!Be){if(isProduction)throw new Error(prefix$1);var Ye=typeof Le=="function"?Le():Le,tt=Ye?"".concat(prefix$1,": ").concat(Ye):prefix$1;throw new Error(tt)}}var __DEV__=process.env.NODE_ENV!=="production",warning$3=function(){};if(__DEV__){var printWarning=function(Le,Ye){var tt=arguments.length;Ye=new Array(tt>1?tt-1:0);for(var nt=1;nt<tt;nt++)Ye[nt-1]=arguments[nt];var ft=0,ht="Warning: "+Le.replace(/%s/g,function(){return Ye[ft++]});typeof console<"u"&&console.error(ht);try{throw new Error(ht)}catch{}};warning$3=function(Be,Le,Ye){var tt=arguments.length;Ye=new Array(tt>2?tt-2:0);for(var nt=2;nt<tt;nt++)Ye[nt-2]=arguments[nt];if(Le===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");Be||printWarning.apply(null,[Le].concat(Ye))}}var warning_1=warning$3;const warning$4=getDefaultExportFromCjs(warning_1);var has$1=Object.prototype.hasOwnProperty;function find$2(Be,Le,Ye){for(Ye of Be.keys())if(dequal(Ye,Le))return Ye}function dequal(Be,Le){var Ye,tt,nt;if(Be===Le)return!0;if(Be&&Le&&(Ye=Be.constructor)===Le.constructor){if(Ye===Date)return Be.getTime()===Le.getTime();if(Ye===RegExp)return Be.toString()===Le.toString();if(Ye===Array){if((tt=Be.length)===Le.length)for(;tt--&&dequal(Be[tt],Le[tt]););return tt===-1}if(Ye===Set){if(Be.size!==Le.size)return!1;for(tt of Be)if(nt=tt,nt&&typeof nt=="object"&&(nt=find$2(Le,nt),!nt)||!Le.has(nt))return!1;return!0}if(Ye===Map){if(Be.size!==Le.size)return!1;for(tt of Be)if(nt=tt[0],nt&&typeof nt=="object"&&(nt=find$2(Le,nt),!nt)||!dequal(tt[1],Le.get(nt)))return!1;return!0}if(Ye===ArrayBuffer)Be=new Uint8Array(Be),Le=new Uint8Array(Le);else if(Ye===DataView){if((tt=Be.byteLength)===Le.byteLength)for(;tt--&&Be.getInt8(tt)===Le.getInt8(tt););return tt===-1}if(ArrayBuffer.isView(Be)){if((tt=Be.byteLength)===Le.byteLength)for(;tt--&&Be[tt]===Le[tt];);return tt===-1}if(!Ye||typeof Be=="object"){tt=0;for(Ye in Be)if(has$1.call(Be,Ye)&&++tt&&!has$1.call(Le,Ye)||!(Ye in Le)||!dequal(Be[Ye],Le[Ye]))return!1;return Object.keys(Le).length===tt}}return Be!==Be&&Le!==Le}const documentContext=React.createContext(null);function Message$5({children:Be,type:Le}){return jsxRuntimeExports.jsx("div",{className:`react-pdf__message react-pdf__message--${Le}`,children:Be})}const DEFAULT_LINK_REL="noopener noreferrer nofollow";class LinkService{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(Le){this.pdfDocument=Le}setViewer(Le){this.pdfViewer=Le}setExternalLinkRel(Le){this.externalLinkRel=Le}setExternalLinkTarget(Le){this.externalLinkTarget=Le}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return invariant$1(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(Le){invariant$1(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=Le}get rotation(){return 0}set rotation(Le){}goToDestination(Le){return new Promise(Ye=>{invariant$1(this.pdfDocument,"PDF document not loaded."),invariant$1(Le,"Destination is not specified."),typeof Le=="string"?this.pdfDocument.getDestination(Le).then(Ye):Array.isArray(Le)?Ye(Le):Le.then(Ye)}).then(Ye=>{invariant$1(Array.isArray(Ye),`"${Ye}" is not a valid destination array.`);const tt=Ye[0];new Promise(nt=>{invariant$1(this.pdfDocument,"PDF document not loaded."),tt instanceof Object?this.pdfDocument.getPageIndex(tt).then(ft=>{nt(ft)}).catch(()=>{invariant$1(!1,`"${tt}" is not a valid page reference.`)}):typeof tt=="number"?nt(tt):invariant$1(!1,`"${tt}" is not a valid destination reference.`)}).then(nt=>{const ft=nt+1;invariant$1(this.pdfViewer,"PDF viewer is not initialized."),invariant$1(ft>=1&&ft<=this.pagesCount,`"${ft}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:Ye,pageIndex:nt,pageNumber:ft})})})}navigateTo(Le){this.goToDestination(Le)}goToPage(Le){const Ye=Le-1;invariant$1(this.pdfViewer,"PDF viewer is not initialized."),invariant$1(Le>=1&&Le<=this.pagesCount,`"${Le}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:Ye,pageNumber:Le})}addLinkAttributes(Le,Ye,tt){Le.href=Ye,Le.rel=this.externalLinkRel||DEFAULT_LINK_REL,Le.target=tt?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}const PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},isBrowser$2=typeof window<"u",isLocalFileSystem=isBrowser$2&&window.location.protocol==="file:";function isDefined$1(Be){return typeof Be<"u"}function isProvided(Be){return isDefined$1(Be)&&Be!==null}function isString$4(Be){return typeof Be=="string"}function isArrayBuffer(Be){return Be instanceof ArrayBuffer}function isBlob(Be){return invariant$1(isBrowser$2,"isBlob can only be used in a browser environment"),Be instanceof Blob}function isDataURI(Be){return isString$4(Be)&&/^data:/.test(Be)}function dataURItoByteString(Be){invariant$1(isDataURI(Be),"Invalid data URI.");const[Le="",Ye=""]=Be.split(",");return Le.split(";").indexOf("base64")!==-1?atob(Ye):unescape(Ye)}function getDevicePixelRatio(){return isBrowser$2&&window.devicePixelRatio||1}const allowFileAccessFromFilesTip="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function displayCORSWarning(){warning$4(!isLocalFileSystem,`Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${allowFileAccessFromFilesTip}`)}function displayWorkerWarning(){warning$4(!isLocalFileSystem,`Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ${allowFileAccessFromFilesTip}`)}function cancelRunningTask(Be){Be!=null&&Be.cancel&&Be.cancel()}function makePageCallback(Be,Le){return Object.defineProperty(Be,"width",{get(){return this.view[2]*Le},configurable:!0}),Object.defineProperty(Be,"height",{get(){return this.view[3]*Le},configurable:!0}),Object.defineProperty(Be,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(Be,"originalHeight",{get(){return this.view[3]},configurable:!0}),Be}function isCancelException(Be){return Be.name==="RenderingCancelledException"}function loadFromFile(Be){return new Promise((Le,Ye)=>{const tt=new FileReader;tt.onload=()=>{if(!tt.result)return Ye(new Error("Error while reading a file."));Le(tt.result)},tt.onerror=nt=>{if(!nt.target)return Ye(new Error("Error while reading a file."));const{error:ft}=nt.target;if(!ft)return Ye(new Error("Error while reading a file."));switch(ft.code){case ft.NOT_FOUND_ERR:return Ye(new Error("Error while reading a file: File not found."));case ft.SECURITY_ERR:return Ye(new Error("Error while reading a file: Security error."));case ft.ABORT_ERR:return Ye(new Error("Error while reading a file: Aborted."));default:return Ye(new Error("Error while reading a file."))}},tt.readAsArrayBuffer(Be)})}function reducer$1(Be,Le){switch(Le.type){case"RESOLVE":return{value:Le.value,error:void 0};case"REJECT":return{value:!1,error:Le.error};case"RESET":return{value:void 0,error:void 0};default:return Be}}function useResolver(){return React.useReducer(reducer$1,{value:void 0,error:void 0})}var __awaiter$6=function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})},__rest$2=function(Be,Le){var Ye={};for(var tt in Be)Object.prototype.hasOwnProperty.call(Be,tt)&&Le.indexOf(tt)<0&&(Ye[tt]=Be[tt]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,tt=Object.getOwnPropertySymbols(Be);nt<tt.length;nt++)Le.indexOf(tt[nt])<0&&Object.prototype.propertyIsEnumerable.call(Be,tt[nt])&&(Ye[tt[nt]]=Be[tt[nt]]);return Ye};const{PDFDataRangeTransport}=pdfjs,defaultOnPassword=(Be,Le)=>{switch(Le){case PasswordResponses.NEED_PASSWORD:{const Ye=prompt("Enter the password to open this PDF file.");Be(Ye);break}case PasswordResponses.INCORRECT_PASSWORD:{const Ye=prompt("Invalid password. Please try again.");Be(Ye);break}}};function isParameterObject(Be){return typeof Be=="object"&&Be!==null&&("data"in Be||"range"in Be||"url"in Be)}const Document$1=React.forwardRef(function(Le,Ye){var{children:tt,className:nt,error:ft="Failed to load PDF file.",externalLinkRel:ht,externalLinkTarget:gt,file:At,inputRef:xt,imageResourcesPath:Et,loading:kt="Loading PDF…",noData:Ct="No PDF file specified.",onItemClick:yt,onLoadError:vt,onLoadProgress:bt,onLoadSuccess:Rt,onPassword:wt=defaultOnPassword,onSourceError:Tt,onSourceSuccess:Bt,options:Ot,renderMode:Pt,rotate:Lt}=Le,jt=__rest$2(Le,["children","className","error","externalLinkRel","externalLinkTarget","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadProgress","onLoadSuccess","onPassword","onSourceError","onSourceSuccess","options","renderMode","rotate"]);const[Mt,Xt]=useResolver(),{value:zt,error:$t}=Mt,[Kt,Qt]=useResolver(),{value:_t,error:Wt}=Kt,Ht=React.useRef(new LinkService),Ft=React.useRef([]),Ut=React.useRef(void 0),Jt=React.useRef(void 0);At&&At!==Ut.current&&isParameterObject(At)&&(warning$4(!dequal(At,Ut.current),`File prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.`),Ut.current=At),Ot&&Ot!==Jt.current&&(warning$4(!dequal(Ot,Jt.current),`Options prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.`),Jt.current=Ot);const Gt=React.useRef({scrollPageIntoView:I0=>{const{dest:S0,pageNumber:_0,pageIndex:X0=_0-1}=I0;if(yt){yt({dest:S0,pageIndex:X0,pageNumber:_0});return}const d0=Ft.current[X0];if(d0){d0.scrollIntoView();return}warning$4(!1,`An internal link leading to page ${_0} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});React.useImperativeHandle(Ye,()=>({linkService:Ht,pages:Ft,viewer:Gt}),[]);function e0(){Bt&&Bt()}function t0(){$t&&(warning$4(!1,$t.toString()),Tt&&Tt($t))}function Yt(){Xt({type:"RESET"})}React.useEffect(Yt,[At,Xt]);const a0=React.useCallback(()=>__awaiter$6(this,void 0,void 0,function*(){if(!At)return null;if(typeof At=="string")return isDataURI(At)?{data:dataURItoByteString(At)}:(displayCORSWarning(),{url:At});if(At instanceof PDFDataRangeTransport)return{range:At};if(isArrayBuffer(At))return{data:At};if(isBrowser$2&&isBlob(At))return{data:yield loadFromFile(At)};if(invariant$1(typeof At=="object","Invalid parameter in file, need either Uint8Array, string or a parameter object"),invariant$1(isParameterObject(At),"Invalid parameter object: need either .data, .range or .url"),"url"in At&&typeof At.url=="string"){if(isDataURI(At.url)){const{url:I0}=At,S0=__rest$2(At,["url"]),_0=dataURItoByteString(I0);return Object.assign({data:_0},S0)}displayCORSWarning()}return At}),[At]);React.useEffect(()=>{const I0=makeCancellablePromise(a0());return I0.promise.then(S0=>{Xt({type:"RESOLVE",value:S0})}).catch(S0=>{Xt({type:"REJECT",error:S0})}),()=>{cancelRunningTask(I0)}},[a0,Xt]),React.useEffect(()=>{if(!(typeof zt>"u")){if(zt===!1){t0();return}e0()}},[zt]);function n0(){_t&&(Rt&&Rt(_t),Ft.current=new Array(_t.numPages),Ht.current.setDocument(_t))}function Zt(){Wt&&(warning$4(!1,Wt.toString()),vt&&vt(Wt))}React.useEffect(function(){Qt({type:"RESET"})},[Qt,zt]),React.useEffect(function(){if(!zt)return;const S0=Ot?Object.assign(Object.assign({},zt),Ot):zt,_0=__webpack_exports__getDocument(S0);bt&&(_0.onProgress=bt),wt&&(_0.onPassword=wt);const X0=_0,d0=X0.promise.then(W0=>{Qt({type:"RESOLVE",value:W0})}).catch(W0=>{X0.destroyed||Qt({type:"REJECT",error:W0})});return()=>{d0.finally(()=>X0.destroy())}},[Ot,Qt,zt]),React.useEffect(()=>{if(!(typeof _t>"u")){if(_t===!1){Zt();return}n0()}},[_t]),React.useEffect(function(){Ht.current.setViewer(Gt.current),Ht.current.setExternalLinkRel(ht),Ht.current.setExternalLinkTarget(gt)},[ht,gt]);const l0=React.useCallback((I0,S0)=>{Ft.current[I0]=S0},[]),h0=React.useCallback(I0=>{delete Ft.current[I0]},[]),E0=React.useMemo(()=>({imageResourcesPath:Et,linkService:Ht.current,onItemClick:yt,pdf:_t,registerPage:l0,renderMode:Pt,rotate:Lt,unregisterPage:h0}),[Et,yt,_t,l0,Pt,Lt,h0]),C0=React.useMemo(()=>makeEventProps(jt,()=>_t),[jt,_t]);function R0(){return jsxRuntimeExports.jsx(documentContext.Provider,{value:E0,children:tt})}function B0(){return At?_t==null?jsxRuntimeExports.jsx(Message$5,{type:"loading",children:typeof kt=="function"?kt():kt}):_t===!1?jsxRuntimeExports.jsx(Message$5,{type:"error",children:typeof ft=="function"?ft():ft}):R0():jsxRuntimeExports.jsx(Message$5,{type:"no-data",children:typeof Ct=="function"?Ct():Ct})}return jsxRuntimeExports.jsx("div",Object.assign({className:clsx$1("react-pdf__Document",nt),ref:xt,style:{"--scale-factor":"1"}},C0,{children:B0()}))});function useDocumentContext(){return React.useContext(documentContext)}function mergeRefs$2(){for(var Be=[],Le=0;Le<arguments.length;Le++)Be[Le]=arguments[Le];var Ye=Be.filter(Boolean);if(Ye.length<=1){var tt=Ye[0];return tt||null}return function(ft){Ye.forEach(function(ht){typeof ht=="function"?ht(ft):ht&&(ht.current=ft)})}}const pageContext=React.createContext(null),PDF_ROLE_TO_HTML_ROLE={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},HEADING_PATTERN=/^H(\d+)$/;function isPdfRole(Be){return Be in PDF_ROLE_TO_HTML_ROLE}function isStructTreeNode(Be){return"children"in Be}function isStructTreeNodeWithOnlyContentChild(Be){return isStructTreeNode(Be)?Be.children.length===1&&0 in Be.children&&"id"in Be.children[0]:!1}function getRoleAttributes(Be){const Le={};if(isStructTreeNode(Be)){const{role:Ye}=Be,tt=Ye.match(HEADING_PATTERN);if(tt)Le.role="heading",Le["aria-level"]=Number(tt[1]);else if(isPdfRole(Ye)){const nt=PDF_ROLE_TO_HTML_ROLE[Ye];nt&&(Le.role=nt)}}return Le}function getBaseAttributes(Be){const Le={};if(isStructTreeNode(Be)){if(Be.alt!==void 0&&(Le["aria-label"]=Be.alt),Be.lang!==void 0&&(Le.lang=Be.lang),isStructTreeNodeWithOnlyContentChild(Be)){const[Ye]=Be.children;if(Ye){const tt=getBaseAttributes(Ye);return Object.assign(Object.assign({},Le),tt)}}}else"id"in Be&&(Le["aria-owns"]=Be.id);return Le}function getAttributes(Be){return Be?Object.assign(Object.assign({},getRoleAttributes(Be)),getBaseAttributes(Be)):null}function StructTreeItem({className:Be,node:Le}){const Ye=React.useMemo(()=>getAttributes(Le),[Le]),tt=React.useMemo(()=>!isStructTreeNode(Le)||isStructTreeNodeWithOnlyContentChild(Le)?null:Le.children.map((nt,ft)=>jsxRuntimeExports.jsx(StructTreeItem,{node:nt},ft)),[Le]);return jsxRuntimeExports.jsx("span",Object.assign({className:Be},Ye,{children:tt}))}function usePageContext(){return React.useContext(pageContext)}function StructTree(){const Be=usePageContext();invariant$1(Be,"Unable to find Page context.");const{onGetStructTreeError:Le,onGetStructTreeSuccess:Ye}=Be,[tt,nt]=useResolver(),{value:ft,error:ht}=tt,{customTextRenderer:gt,page:At}=Be;function xt(){ft&&Ye&&Ye(ft)}function Et(){ht&&(warning$4(!1,ht.toString()),Le&&Le(ht))}return React.useEffect(function(){nt({type:"RESET"})},[nt,At]),React.useEffect(function(){if(gt||!At)return;const Ct=makeCancellablePromise(At.getStructTree()),yt=Ct;return Ct.promise.then(vt=>{nt({type:"RESOLVE",value:vt})}).catch(vt=>{nt({type:"REJECT",error:vt})}),()=>cancelRunningTask(yt)},[gt,At,nt]),React.useEffect(()=>{if(ft!==void 0){if(ft===!1){Et();return}xt()}},[ft]),ft?jsxRuntimeExports.jsx(StructTreeItem,{className:"react-pdf__Page__structTree structTree",node:ft}):null}const ANNOTATION_MODE=__webpack_exports__AnnotationMode;function Canvas$1(Be){const Le=usePageContext();invariant$1(Le,"Unable to find Page context.");const Ye=Object.assign(Object.assign({},Le),Be),{_className:tt,canvasBackground:nt,devicePixelRatio:ft=getDevicePixelRatio(),onRenderError:ht,onRenderSuccess:gt,page:At,renderForms:xt,renderTextLayer:Et,rotate:kt,scale:Ct}=Ye,{canvasRef:yt}=Be;invariant$1(At,"Attempted to render page canvas, but no page was specified.");const vt=React.useRef(null);function bt(){At&>&>(makePageCallback(At,Ct))}function Rt(Ot){isCancelException(Ot)||(warning$4(!1,Ot.toString()),ht&&ht(Ot))}const wt=React.useMemo(()=>At.getViewport({scale:Ct*ft,rotation:kt}),[ft,At,kt,Ct]),Tt=React.useMemo(()=>At.getViewport({scale:Ct,rotation:kt}),[At,kt,Ct]);React.useEffect(function(){if(!At)return;At.cleanup();const{current:Pt}=vt;if(!Pt)return;Pt.width=wt.width,Pt.height=wt.height,Pt.style.width=`${Math.floor(Tt.width)}px`,Pt.style.height=`${Math.floor(Tt.height)}px`,Pt.style.visibility="hidden";const Lt={annotationMode:xt?ANNOTATION_MODE.ENABLE_FORMS:ANNOTATION_MODE.ENABLE,canvasContext:Pt.getContext("2d",{alpha:!1}),viewport:wt};nt&&(Lt.background=nt);const jt=At.render(Lt),Mt=jt;return jt.promise.then(()=>{Pt.style.visibility="",bt()}).catch(Rt),()=>cancelRunningTask(Mt)},[nt,At,xt,wt,Tt]);const Bt=React.useCallback(()=>{const{current:Ot}=vt;Ot&&(Ot.width=0,Ot.height=0)},[]);return React.useEffect(()=>Bt,[Bt]),jsxRuntimeExports.jsx("canvas",{className:`${tt}__canvas`,dir:"ltr",ref:mergeRefs$2(yt,vt),style:{display:"block",userSelect:"none"},children:Et?jsxRuntimeExports.jsx(StructTree,{}):null})}function isTextItem(Be){return"str"in Be}function TextLayer(){const Be=usePageContext();invariant$1(Be,"Unable to find Page context.");const{customTextRenderer:Le,onGetTextError:Ye,onGetTextSuccess:tt,onRenderTextLayerError:nt,onRenderTextLayerSuccess:ft,page:ht,pageIndex:gt,pageNumber:At,rotate:xt,scale:Et}=Be;invariant$1(ht,"Attempted to load page text content, but no page was specified.");const[kt,Ct]=useResolver(),{value:yt,error:vt}=kt,bt=React.useRef(null);warning$4(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10)===1,"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer");function Rt(){yt&&tt&&tt(yt)}function wt(){vt&&(warning$4(!1,vt.toString()),Ye&&Ye(vt))}React.useEffect(function(){Ct({type:"RESET"})},[ht,Ct]),React.useEffect(function(){if(!ht)return;const Mt=makeCancellablePromise(ht.getTextContent()),Xt=Mt;return Mt.promise.then(zt=>{Ct({type:"RESOLVE",value:zt})}).catch(zt=>{Ct({type:"REJECT",error:zt})}),()=>cancelRunningTask(Xt)},[ht,Ct]),React.useEffect(()=>{if(yt!==void 0){if(yt===!1){wt();return}Rt()}},[yt]);const Tt=React.useCallback(()=>{ft&&ft()},[ft]),Bt=React.useCallback(jt=>{warning$4(!1,jt.toString()),nt&&nt(jt)},[nt]);function Ot(){const jt=bt.current;jt&&jt.classList.add("selecting")}function Pt(){const jt=bt.current;jt&&jt.classList.remove("selecting")}const Lt=React.useMemo(()=>ht.getViewport({scale:Et,rotation:xt}),[ht,xt,Et]);return React.useLayoutEffect(function(){if(!ht||!yt)return;const{current:Mt}=bt;if(!Mt)return;Mt.innerHTML="";const Xt=ht.streamTextContent({includeMarkedContent:!0}),zt={container:Mt,textContentSource:Xt,viewport:Lt},$t=new __webpack_exports__TextLayer(zt),Kt=$t;return $t.render().then(()=>{const Qt=document.createElement("div");Qt.className="endOfContent",Mt.append(Qt);const _t=Mt.querySelectorAll('[role="presentation"]');if(Le){let Wt=0;yt.items.forEach((Ht,Ft)=>{if(!isTextItem(Ht))return;const Ut=_t[Wt];if(!Ut)return;const Jt=Le(Object.assign({pageIndex:gt,pageNumber:At,itemIndex:Ft},Ht));Ut.innerHTML=Jt,Wt+=Ht.str&&Ht.hasEOL?2:1})}Tt()}).catch(Bt),()=>cancelRunningTask(Kt)},[Le,Bt,Tt,ht,gt,At,yt,Lt]),jsxRuntimeExports.jsx("div",{className:clsx$1("react-pdf__Page__textContent","textLayer"),onMouseUp:Pt,onMouseDown:Ot,ref:bt})}function AnnotationLayer(){const Be=useDocumentContext(),Le=usePageContext();invariant$1(Le,"Unable to find Page context.");const Ye=Object.assign(Object.assign({},Be),Le),{imageResourcesPath:tt,linkService:nt,onGetAnnotationsError:ft,onGetAnnotationsSuccess:ht,onRenderAnnotationLayerError:gt,onRenderAnnotationLayerSuccess:At,page:xt,pdf:Et,renderForms:kt,rotate:Ct,scale:yt=1}=Ye;invariant$1(Et,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),invariant$1(xt,"Attempted to load page annotations, but no page was specified."),invariant$1(nt,"Attempted to load page annotations, but no linkService was specified.");const[vt,bt]=useResolver(),{value:Rt,error:wt}=vt,Tt=React.useRef(null);warning$4(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10)===1,"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations");function Bt(){Rt&&ht&&ht(Rt)}function Ot(){wt&&(warning$4(!1,wt.toString()),ft&&ft(wt))}React.useEffect(function(){bt({type:"RESET"})},[bt,xt]),React.useEffect(function(){if(!xt)return;const Xt=makeCancellablePromise(xt.getAnnotations()),zt=Xt;return Xt.promise.then($t=>{bt({type:"RESOLVE",value:$t})}).catch($t=>{bt({type:"REJECT",error:$t})}),()=>{cancelRunningTask(zt)}},[bt,xt]),React.useEffect(()=>{if(Rt!==void 0){if(Rt===!1){Ot();return}Bt()}},[Rt]);function Pt(){At&&At()}function Lt(Mt){warning$4(!1,`${Mt}`),gt&>(Mt)}const jt=React.useMemo(()=>xt.getViewport({scale:yt,rotation:Ct}),[xt,Ct,yt]);return React.useEffect(function(){if(!Et||!xt||!nt||!Rt)return;const{current:Xt}=Tt;if(!Xt)return;const zt=jt.clone({dontFlip:!0}),$t={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:Xt,l10n:null,page:xt,structTreeLayer:null,viewport:zt},Kt={annotations:Rt,annotationStorage:Et.annotationStorage,div:Xt,imageResourcesPath:tt,linkService:nt,page:xt,renderForms:kt,viewport:zt};Xt.innerHTML="";try{new __webpack_exports__AnnotationLayer($t).render(Kt),Pt()}catch(Qt){Lt(Qt)}return()=>{}},[Rt,tt,nt,xt,Et,kt,jt]),jsxRuntimeExports.jsx("div",{className:clsx$1("react-pdf__Page__annotations","annotationLayer"),ref:Tt})}var __rest$1=function(Be,Le){var Ye={};for(var tt in Be)Object.prototype.hasOwnProperty.call(Be,tt)&&Le.indexOf(tt)<0&&(Ye[tt]=Be[tt]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,tt=Object.getOwnPropertySymbols(Be);nt<tt.length;nt++)Le.indexOf(tt[nt])<0&&Object.prototype.propertyIsEnumerable.call(Be,tt[nt])&&(Ye[tt[nt]]=Be[tt[nt]]);return Ye};const defaultScale=1;function Page$1(Be){const Le=useDocumentContext(),Ye=Object.assign(Object.assign({},Le),Be),{_className:tt="react-pdf__Page",_enableRegisterUnregisterPage:nt=!0,canvasBackground:ft,canvasRef:ht,children:gt,className:At,customRenderer:xt,customTextRenderer:Et,devicePixelRatio:kt,error:Ct="Failed to load the page.",height:yt,inputRef:vt,loading:bt="Loading page…",noData:Rt="No page specified.",onGetAnnotationsError:wt,onGetAnnotationsSuccess:Tt,onGetStructTreeError:Bt,onGetStructTreeSuccess:Ot,onGetTextError:Pt,onGetTextSuccess:Lt,onLoadError:jt,onLoadSuccess:Mt,onRenderAnnotationLayerError:Xt,onRenderAnnotationLayerSuccess:zt,onRenderError:$t,onRenderSuccess:Kt,onRenderTextLayerError:Qt,onRenderTextLayerSuccess:_t,pageIndex:Wt,pageNumber:Ht,pdf:Ft,registerPage:Ut,renderAnnotationLayer:Jt=!0,renderForms:Gt=!1,renderMode:e0="canvas",renderTextLayer:t0=!0,rotate:Yt,scale:a0=defaultScale,unregisterPage:n0,width:Zt}=Ye,l0=__rest$1(Ye,["_className","_enableRegisterUnregisterPage","canvasBackground","canvasRef","children","className","customRenderer","customTextRenderer","devicePixelRatio","error","height","inputRef","loading","noData","onGetAnnotationsError","onGetAnnotationsSuccess","onGetStructTreeError","onGetStructTreeSuccess","onGetTextError","onGetTextSuccess","onLoadError","onLoadSuccess","onRenderAnnotationLayerError","onRenderAnnotationLayerSuccess","onRenderError","onRenderSuccess","onRenderTextLayerError","onRenderTextLayerSuccess","pageIndex","pageNumber","pdf","registerPage","renderAnnotationLayer","renderForms","renderMode","renderTextLayer","rotate","scale","unregisterPage","width"]),[h0,E0]=useResolver(),{value:C0,error:R0}=h0,B0=React.useRef(null);invariant$1(Ft,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");const I0=isProvided(Ht)?Ht-1:Wt??null,S0=Ht??(isProvided(Wt)?Wt+1:null),_0=Yt??(C0?C0.rotate:null),X0=React.useMemo(()=>{if(!C0)return null;let D0=1;const H0=a0??defaultScale;if(Zt||yt){const $0=C0.getViewport({scale:1,rotation:_0});Zt?D0=Zt/$0.width:yt&&(D0=yt/$0.height)}return H0*D0},[yt,C0,_0,a0,Zt]);React.useEffect(function(){return()=>{isProvided(I0)&&nt&&n0&&n0(I0)}},[nt,Ft,I0,n0]);function d0(){if(Mt){if(!C0||!X0)return;Mt(makePageCallback(C0,X0))}if(nt&&Ut){if(!isProvided(I0)||!B0.current)return;Ut(I0,B0.current)}}function W0(){R0&&(warning$4(!1,R0.toString()),jt&&jt(R0))}React.useEffect(function(){E0({type:"RESET"})},[E0,Ft,I0]),React.useEffect(function(){if(!Ft||!S0)return;const H0=makeCancellablePromise(Ft.getPage(S0)),$0=H0;return H0.promise.then(un=>{E0({type:"RESOLVE",value:un})}).catch(un=>{E0({type:"REJECT",error:un})}),()=>cancelRunningTask($0)},[E0,Ft,S0]),React.useEffect(()=>{if(C0!==void 0){if(C0===!1){W0();return}d0()}},[C0,X0]);const u0=React.useMemo(()=>C0&&isProvided(I0)&&S0&&isProvided(_0)&&isProvided(X0)?{_className:tt,canvasBackground:ft,customTextRenderer:Et,devicePixelRatio:kt,onGetAnnotationsError:wt,onGetAnnotationsSuccess:Tt,onGetStructTreeError:Bt,onGetStructTreeSuccess:Ot,onGetTextError:Pt,onGetTextSuccess:Lt,onRenderAnnotationLayerError:Xt,onRenderAnnotationLayerSuccess:zt,onRenderError:$t,onRenderSuccess:Kt,onRenderTextLayerError:Qt,onRenderTextLayerSuccess:_t,page:C0,pageIndex:I0,pageNumber:S0,renderForms:Gt,renderTextLayer:t0,rotate:_0,scale:X0}:null,[tt,ft,Et,kt,wt,Tt,Bt,Ot,Pt,Lt,Xt,zt,$t,Kt,Qt,_t,C0,I0,S0,Gt,t0,_0,X0]),Y0=React.useMemo(()=>makeEventProps(l0,()=>C0&&(X0?makePageCallback(C0,X0):void 0)),[l0,C0,X0]),m0=`${I0}@${X0}/${_0}`;function w0(){switch(e0){case"custom":return invariant$1(xt,'renderMode was set to "custom", but no customRenderer was passed.'),jsxRuntimeExports.jsx(xt,{},`${m0}_custom`);case"none":return null;case"canvas":default:return jsxRuntimeExports.jsx(Canvas$1,{canvasRef:ht},`${m0}_canvas`)}}function y0(){return t0?jsxRuntimeExports.jsx(TextLayer,{},`${m0}_text`):null}function L0(){return Jt?jsxRuntimeExports.jsx(AnnotationLayer,{},`${m0}_annotations`):null}function N0(){return jsxRuntimeExports.jsxs(pageContext.Provider,{value:u0,children:[w0(),y0(),L0(),gt]})}function A0(){return S0?Ft===null||C0===void 0||C0===null?jsxRuntimeExports.jsx(Message$5,{type:"loading",children:typeof bt=="function"?bt():bt}):Ft===!1||C0===!1?jsxRuntimeExports.jsx(Message$5,{type:"error",children:typeof Ct=="function"?Ct():Ct}):N0():jsxRuntimeExports.jsx(Message$5,{type:"no-data",children:typeof Rt=="function"?Rt():Rt})}return jsxRuntimeExports.jsx("div",Object.assign({className:clsx$1(tt,At),"data-page-number":S0,ref:mergeRefs$2(vt,B0),style:{"--scale-factor":`${X0}`,backgroundColor:ft||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},Y0,{children:A0()}))}displayWorkerWarning(),__webpack_exports__GlobalWorkerOptions.workerSrc="pdf.worker.mjs";let options={darkMode:!1,hostingApp:"Web SDK",unsafeMode:!1,redirectFromUnsupportedBrowsers:!1,recorderProvider:"openVidu",useSha256:!1,maxContentWidth:800,maxContentHeight:840};const setOptions=Be=>(options={...options,...Be},options),tutorialBaseDefault="https://sdk.incode.com/sdk/tutorials",wasmBaseDefault="https://cdn.incodesmile.com/ml-wasm-kit-release",pdfWorkerDefaultBase="//cdnjs.cloudflare.com/ajax/libs/pdf.js",ffmpegBaseDefault="https://cdn.incodesmile.com/ffmpeg-release/",lottieScriptDefault="https://cdn.jsdelivr.net/npm/lottie-web@5.13.0/build/player/lottie_light.min.js",trimTrailingSlash=Be=>Be.endsWith("/")?Be.slice(0,-1):Be,ensureRequiredWhenOffline=(Be,Le)=>{if(options.offline&&!Be)throw new Error(`Missing required offline resource config: ${Le}`);return Be},isOfflineMode=()=>!!options.offline,getWasmBaseUrl=()=>{const Be=ensureRequiredWhenOffline(options.wasmBaseUrl,"wasmBaseUrl");return trimTrailingSlash(Be||wasmBaseDefault)},getPdfWorkerUrl=Be=>ensureRequiredWhenOffline(options.pdfWorkerUrl,"pdfWorkerUrl")||`${pdfWorkerDefaultBase}/${Be}/pdf.worker.min.mjs`,getTutorialsBaseUrl=()=>{const Be=ensureRequiredWhenOffline(options.tutorialsBaseUrl,"tutorialsBaseUrl");return trimTrailingSlash(Be||tutorialBaseDefault)},getTutorialUrl=Be=>`${getTutorialsBaseUrl()}/${Be.replace(/^\//,"")}`,getFfmpegBaseUrl=()=>{const Le=ensureRequiredWhenOffline(options.ffmpegBaseUrl,"ffmpegBaseUrl")||ffmpegBaseDefault;return Le.endsWith("/")?Le:`${Le}/`},getLottieScriptUrl=()=>ensureRequiredWhenOffline(options.lottieScriptUrl,"lottieScriptUrl")||lottieScriptDefault,setPdfWorkerUrl=()=>{__webpack_exports__GlobalWorkerOptions.workerSrc=getPdfWorkerUrl(__webpack_exports__version)},getTranslationsUrl=()=>ensureRequiredWhenOffline(options.translationsUrl,"translationsUrl"),FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","id_face_detector","ml_capture_core_enabled","new_id_capture_ux_least_risky_clients","enable_sentry_web","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id","darwinium_profiling","id_quality_backend_validation","id_video_recording_enabled","enable_app_logs"],GLOBAL_FLAGS=["new_fingerprint","enable_sentry_web","enable_app_logs"],ID_MODULE_FLAGS=["id_face_readability","id_face_detector","ml_capture_core_enabled","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability","id_quality_backend_validation","id_video_recording_enabled"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web"];function getStatsigEnvironment(Be){return isStageK8sEnv(Be)?{tier:"development"}:isStageEnv(Be)||isDemoEnv(Be)?{tier:"staging"}:isSaasEnv(Be)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,id_face_detector:!1,ml_capture_core_enabled:!1,new_id_capture_ux_least_risky_clients:!1,enable_sentry_web:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1,darwinium_profiling:!1,id_quality_backend_validation:!1,id_video_recording_enabled:!1,enable_app_logs:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise$1=null,statsigClientInstance=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(!isOfflineMode()){if(initPromise$1)return initPromise$1;initPromise$1=(async()=>{var gt;const ft={customIDs:{client_api_key:Le,hashed_onboarding_id:Ye,flow_id:Be},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),statsigClientInstance=ht,FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise$1}},getFeatureFlag=Be=>featureFlagsValues[Be]??!1,getDynamicConfig=Be=>{if(!statsigClientInstance)return null;try{const Le=statsigClientInstance.getDynamicConfig(Be);return(Le==null?void 0:Le.value)??null}catch{return null}},getModuleFeatureFlags=async Be=>{const Le={};GLOBAL_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]});const Ye=Be.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}),Le};function getFramesAggregationInterval(){return 1700}function IdCaptureParamsConfigurator(Be,Le,Ye,tt){Object.assign(Be,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:getFramesAggregationInterval()})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:!1,faceOcclusionThreshold:.3,getReadyDelay:2e3,framesAggregationInterval:2e3,minFramesWithFace:3}}const getWasmWorkflowProfiles=()=>[new WasmWorkflowProfile(WasmWorkflow.IdBlurGlareWorkflow,WasmWorkflowProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new WasmWorkflowProfile(WasmWorkflow.IdBlurGlareWorkflow,WasmWorkflowProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new WasmWorkflowProfile(WasmWorkflow.IdBarcodeAndTextQualityWorkflow,WasmWorkflowProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new WasmWorkflowProfile(WasmWorkflow.IdFaceQualityWorkflow,WasmWorkflowProfileName.IdCapture_2_01_FaceQuality,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2","id_facedetector_v2_1_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Id Capture with face quality check - IdFaceQualityPipeline with id_capture_2_01 + id_fiqa + id_facedetector models"),new WasmWorkflowProfile(WasmWorkflow.IdFaceDetectionWorkflow,WasmWorkflowProfileName.IdCapture_2_01_FaceDetection,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_facedetector_v2_1_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Id Capture with face detection only - IdFaceDetectionPipeline with id_capture_2_01 + id_facedetector models"),new WasmWorkflowProfile(WasmWorkflow.IdBlurGlareCoreWorkflow,WasmWorkflowProfileName.IdCapture_2_01_Core,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"ml-capture-core equivalent of IdCapture_2_01 (current prod), gated behind ml_capture_core_enabled"),new WasmWorkflowProfile(WasmWorkflow.IdBlurGlareCoreWorkflow,WasmWorkflowProfileName.IdCapture_2_02_Core,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"ml-capture-core equivalent of IdCapture_2_02 (Hebrew back ID), gated behind ml_capture_core_enabled"),new WasmWorkflowProfile(WasmWorkflow.IdBarcodeAndTextQualityCoreWorkflow,WasmWorkflowProfileName.IdCapture_3_02_Core,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"ml-capture-core equivalent of IdCapture_3_02 (text/barcode quality), gated behind ml_capture_core_enabled"),new WasmWorkflowProfile(WasmWorkflow.IdFaceQualityCoreWorkflow,WasmWorkflowProfileName.IdCapture_2_01_FaceQuality_Core,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2","id_facedetector_v2_1_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"ml-capture-core equivalent of IdCapture_2_01_FaceQuality (FD + FIQA), gated behind ml_capture_core_enabled"),new WasmWorkflowProfile(WasmWorkflow.IdVideoSelfieWorkflow,WasmWorkflowProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new WasmWorkflowProfile(WasmWorkflow.SelfieWithAggregationMetrics,WasmWorkflowProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_2_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new WasmWorkflowProfile(WasmWorkflow.SelfieWithQualityMetrics,WasmWorkflowProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_2_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new WasmWorkflowProfile(WasmWorkflow.SelfieWithAggregationMetrics,WasmWorkflowProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_2_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile"),new WasmWorkflowProfile(WasmWorkflow.OnDeviceSelfieWorkflow,WasmWorkflowProfileName.OnDeviceSelfieWorkflow,DetectionType.OnDeviceSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_2_fp16.ortmodelv2","ondevice_physical_liveness_v2_1_fp16.ortmodelv2","age_estimation_v2_2_2_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"On-device selfie workflow with liveness and age estimation")];function getWasmWorkflowProfile(Be){const Le=getWasmWorkflowProfiles().find(Ye=>Ye.name===Be);if(!Le)throw new Error(`WasmWorkflowProfile not found for type: ${Be}`);return Le}const wasmVersion="v2.14.49";function getBarcodeEnhanceModelUrl(){return`${getWasmBaseUrl()}/${wasmVersion}/models/barcode_enhance_896x224_fp16.ortmodelv2`}function resolveModelPath(Be,Le){if(Be.includes("/models/current/")||Be.includes("/models/legacy/"))return Be;const Ye=Le?"current":"legacy";return Be.replace("/models/",`/models/${Ye}/`)}const coreIdCaptureProfileByRegular={[WasmWorkflowProfileName.IdCapture_2_01]:WasmWorkflowProfileName.IdCapture_2_01_Core,[WasmWorkflowProfileName.IdCapture_2_02]:WasmWorkflowProfileName.IdCapture_2_02_Core,[WasmWorkflowProfileName.IdCapture_3_02]:WasmWorkflowProfileName.IdCapture_3_02_Core,[WasmWorkflowProfileName.IdCapture_2_01_FaceQuality]:WasmWorkflowProfileName.IdCapture_2_01_FaceQuality_Core};function generateBundle(Be=!1){const Le=getFeatureFlag("id_face_readability"),Ye=getFeatureFlag("id_face_detector"),tt=getFeatureFlag("id_text_barcode_readability")?WasmWorkflowProfileName.IdCapture_3_02:Le?WasmWorkflowProfileName.IdCapture_2_01_FaceQuality:Ye?WasmWorkflowProfileName.IdCapture_2_01_FaceDetection:getFeatureFlag("id_model_hebrew_back_id")?WasmWorkflowProfileName.IdCapture_2_02:WasmWorkflowProfileName.IdCapture_2_01,nt=getFeatureFlag("ml_capture_core_enabled")?coreIdCaptureProfileByRegular[tt]??tt:tt,ft=Be?WasmWorkflowProfileName.OnDeviceSelfieWorkflow:WasmWorkflowProfileName.SelfieWithQualityMetrics,ht=WasmWorkflowProfileName.SelfieVideoSelfie,gt=WasmWorkflowProfileName.IdVideoSelfie_2_01;return[nt,gt,ft,ht]}function getInitializationParams(Be=!1){const Ye=generateBundle(Be),tt=getWasmBaseUrl(),nt=`${tt}/${wasmVersion}/webLib.wasm`,ft=`${tt}/${wasmVersion}/webLibSimd.wasm`,ht=`${tt}/${wasmVersion}/webLib.js`,gt=`${tt}/${wasmVersion}/versions.json`;let At=new Map,xt=new Map;for(const Et of Ye){const kt=getWasmWorkflowProfile(Et);if(!kt)throw new Error(`WasmWorkflowProfile not found: ${Et}`);const Ct=kt.modelNames;let yt=[];for(const vt of Ct)yt.push(`${tt}/${wasmVersion}/models/${vt}`);At.set(kt.wasmWorkflowType,yt),xt.set(kt.detectionType,kt)}return{wasmModulePath:nt,wasmSimdModulePath:ft,glueCodePath:ht,versionsFilePath:gt,workflowModels:At,enableSIMD:!0,profiles:xt,wasmVersion}}typeof window<"u"&&(window.wasmArrayBuffer=null);async function fetchGlueCode(Be){return import(Be.replace(/\.wasm($|\?)/,".js$1"))}async function loadWasmBinary(Be,Le,Ye=!0){const tt=Ye&&Le?Le:Be;try{const nt=await fetchGlueCode(tt);if(!(nt!=null&&nt.Module))throw new Error(`No Module export in glue for ${tt}`);return window.Module=nt.Module,window.wasmArrayBuffer=await fetch(tt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),{module:await nt.Module({wasmBinary:window.wasmArrayBuffer}),simdUsed:Ye}}catch(nt){if(console.error("WASM init error:",nt),Ye&&Le)return await loadWasmBinary(Be,void 0,!1);throw nt}}let initPromise=null,wasmResult=null;async function initializeWasm(Be,Le,Ye,tt){return wasmResult||(initPromise||(initPromise=(async()=>{try{const{module:nt,simdUsed:ft}=await loadWasmBinary(Le,Ye,tt),ht={wasmModule:nt,simdUsed:ft,webClientApi:new nt.WebClient,workflowApiUtilities:new nt.WorkflowApiUtilities,utilityApi:new nt.UtilityApi,idCaptureWasmApi:new nt.IdCaptureApi,faceProcessingWasmApi:new nt.FaceProcessingApi,cameraCycleWasmApi:new nt.CameraCycleApi,wasmObjectMarshalerWasmApi:new nt.WasmObjectMarshaler,storageWasmApi:nt.StorageApi?new nt.StorageApi:null};return wasmResult=ht,ht}catch(nt){throw initPromise=null,nt}})()),initPromise)}function safeDelete(Be){if(Be&&typeof Be.delete=="function")try{Be.delete()}catch(Le){console.warn("Error during WASM object cleanup:",Le)}}function resetWasmInit(){var Be,Le;wasmResult&&((Le=(Be=wasmResult.webClientApi)==null?void 0:Be.clear)==null||Le.call(Be),safeDelete(wasmResult.webClientApi),safeDelete(wasmResult.workflowApiUtilities),safeDelete(wasmResult.utilityApi),safeDelete(wasmResult.idCaptureWasmApi),safeDelete(wasmResult.faceProcessingWasmApi),safeDelete(wasmResult.cameraCycleWasmApi),safeDelete(wasmResult.wasmObjectMarshalerWasmApi),safeDelete(wasmResult.storageWasmApi)),initPromise=null,wasmResult=null,window.wasmArrayBuffer=null,window.Module=null}async function wasmCallWrapper(Be,Le,Ye=!0,...tt){const nt=async()=>{try{for(;;){if(Le(...tt))return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){throw console.error("Error in wasmCallWrapper:",ft),ft}};return Ye?await Be.withLock(nt):await nt()}let webClientReadyPromise=null;function setWebClientReadyPromise(Be){const Le=Be.catch(Ye=>{throw webClientReadyPromise===Le&&(webClientReadyPromise=null),Ye});webClientReadyPromise=Le}async function waitForWebClientReady(){webClientReadyPromise&&await webClientReadyPromise}class WebClientError extends Error{constructor(Le,Ye,tt){super(Le),this.name="WebClientError",this.status=Ye,this.statusCode=Ye,(Ye>0||tt)&&(this.response={status:Ye,data:tt})}}const MAX_CONCURRENT_REQUESTS=4,WASM_DEFAULT_TIMEOUT=0;class WebClient{constructor(){this.wasmModule=null,this.webClientApi=null,this.webClientInitialized_=!1,this.semaphore=new Semaphore(MAX_CONCURRENT_REQUESTS),this.requestTimeout=WASM_DEFAULT_TIMEOUT}async initializeWebClient(Le,Ye,tt=!0,nt){const ft=await initializeWasm(nt,Le,Ye,tt);this.wasmModule=ft.wasmModule,this.webClientApi=ft.webClientApi,this.webClientInitialized_=!0}async setupConnection(Le,Ye="",tt=!0,nt=!0){await this.semaphore.withLock(async()=>{this.checkInit(),this.webClientApi.resetSessionState(),await wasmCallWrapper(this.semaphore,()=>this.webClientApi.createApi(Le,Ye,tt,nt),!1),this.checkError()})}setRequestTimeout(Le){if(Le!==void 0){if(!Number.isFinite(Le)||Le<=0){console.warn(`WebClient: ignoring invalid request timeout "${Le}" — expected a positive number of milliseconds.`);return}this.requestTimeout=Le}}getRequestTimeout(){return this.requestTimeout}setToken(Le){this.checkInit(),this.webClientApi.setToken(Le)}getToken(){var Le,Ye;return this.checkInit(),((Ye=(Le=this.webClientApi).getToken)==null?void 0:Ye.call(Le))??""}setDefaultHeaders(Le){this.checkInit(),this.webClientApi.setDefaultHeaders(Le)}getDefaultHeaders(){var Le,Ye;return this.checkInit(),((Ye=(Le=this.webClientApi).getDefaultHeaders)==null?void 0:Ye.call(Le))??{}}async get(Le,Ye){const tt=Ye!=null&&Ye.params?this.toValObject(Ye.params):void 0,nt=Ye!=null&&Ye.headers?this.toValObject(Ye.headers):void 0,ft=(Ye==null?void 0:Ye.timeout)??this.requestTimeout;return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((Ye==null?void 0:Ye.withCredentials)===!0),this.setupProgressCallbacks(void 0,Ye==null?void 0:Ye.onDownloadProgress)},ht=>this.webClientApi.get(ht,Le,tt,nt,ft),ht=>this.checkError(ht),ht=>this.clearProgressCallbacks(ht))}async post(Le,Ye,tt){const nt=tt!=null&&tt.headers?this.toValObject(tt.headers):void 0,ft=tt!=null&&tt.params?this.toValObject(tt.params):void 0,ht=(tt==null?void 0:tt.timeout)??this.requestTimeout,gt=this.prepareBody(Ye);return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((tt==null?void 0:tt.withCredentials)===!0),this.setupProgressCallbacks(tt==null?void 0:tt.onUploadProgress,tt==null?void 0:tt.onDownloadProgress)},At=>this.webClientApi.post(At,Le,gt,nt,ft,ht,(tt==null?void 0:tt.ie)===!0),At=>this.checkError(At),At=>this.clearProgressCallbacks(At))}async put(Le,Ye,tt){const nt=tt!=null&&tt.headers?this.toValObject(tt.headers):void 0,ft=tt!=null&&tt.params?this.toValObject(tt.params):void 0,ht=(tt==null?void 0:tt.timeout)??this.requestTimeout,gt=this.prepareBody(Ye);return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((tt==null?void 0:tt.withCredentials)===!0),this.setupProgressCallbacks(tt==null?void 0:tt.onUploadProgress,tt==null?void 0:tt.onDownloadProgress)},At=>this.webClientApi.put(At,Le,gt,nt,ft,ht,(tt==null?void 0:tt.ie)===!0),At=>this.checkError(At),At=>this.clearProgressCallbacks(At))}async patch(Le,Ye,tt){const nt=tt!=null&&tt.headers?this.toValObject(tt.headers):void 0,ft=tt!=null&&tt.params?this.toValObject(tt.params):void 0,ht=(tt==null?void 0:tt.timeout)??this.requestTimeout,gt=this.prepareBody(Ye);return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((tt==null?void 0:tt.withCredentials)===!0),this.setupProgressCallbacks(tt==null?void 0:tt.onUploadProgress,tt==null?void 0:tt.onDownloadProgress)},At=>this.webClientApi.patch(At,Le,gt,nt,ft,ht,(tt==null?void 0:tt.ie)===!0),At=>this.checkError(At),At=>this.clearProgressCallbacks(At))}async delete(Le,Ye){const tt=Ye!=null&&Ye.headers?this.toValObject(Ye.headers):void 0,nt=Ye!=null&&Ye.params?this.toValObject(Ye.params):void 0,ft=(Ye==null?void 0:Ye.timeout)??this.requestTimeout,ht=Ye!=null&&Ye.data?this.prepareBody(Ye.data):void 0;return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((Ye==null?void 0:Ye.withCredentials)===!0),this.setupProgressCallbacks(void 0,Ye==null?void 0:Ye.onDownloadProgress)},gt=>this.webClientApi.del(gt,Le,ht,tt,nt,ft,(Ye==null?void 0:Ye.ie)===!0),gt=>this.checkError(gt),gt=>this.clearProgressCallbacks(gt))}isReady(){var Le,Ye;return this.webClientInitialized_&&((Ye=(Le=this.webClientApi)==null?void 0:Le.isReady)==null?void 0:Ye.call(Le))}closeConnection(){var Le,Ye;(Ye=(Le=this.webClientApi)==null?void 0:Le.clear)==null||Ye.call(Le)}async freeResources(){this.webClientApi=null,this.wasmModule=null,this.webClientInitialized_=!1,resetWasmInit(),this.semaphore.reset()}checkInit(){if(!this.webClientInitialized_||!this.webClientApi)throw new Error("WebClient not initialized. Call initialize() first.")}getRequestResult(Le=-1){var Ye,tt,nt,ft,ht,gt,At,xt;return this.webClientApi.getRequestResult?this.webClientApi.getRequestResult(Le):{result:(tt=(Ye=this.webClientApi).getResult)==null?void 0:tt.call(Ye,Le),errorMessage:((ft=(nt=this.webClientApi).getErrorMessage)==null?void 0:ft.call(nt,Le))||"",hasError:((gt=(ht=this.webClientApi).hasError)==null?void 0:gt.call(ht,Le))||!1,statusCode:((xt=(At=this.webClientApi).getStatusCode)==null?void 0:xt.call(At,Le))||0}}setupProgressCallbacks(Le,Ye){if(Le)if(this.webClientApi.setOnUploadProgress){const tt=nt=>{try{Le(nt)}catch(ft){console.error("WebClient: Error in onUploadProgress callback:",ft)}};this.webClientApi.setOnUploadProgress(tt)}else console.warn("WebClient: onUploadProgress callback requested but not supported by WASM module");if(Ye)if(this.webClientApi.setOnDownloadProgress){const tt=nt=>{try{Ye(nt)}catch(ft){console.error("WebClient: Error in onDownloadProgress callback:",ft)}};this.webClientApi.setOnDownloadProgress(tt)}else console.warn("WebClient: onDownloadProgress callback requested but not supported by WASM module")}clearProgressCallbacks(Le){var Ye,tt,nt,ft;(tt=(Ye=this.webClientApi).clearOnUploadProgress)==null||tt.call(Ye,Le),(ft=(nt=this.webClientApi).clearOnDownloadProgress)==null||ft.call(nt,Le)}prepareBody(Le){return Le??{}}async executeWebRequest(Le,Ye,tt,nt){return await waitForWebClientReady(),await this.semaphore.withLock(async ft=>{Le();try{return await wasmCallWrapper(this.semaphore,()=>Ye(ft),!1),tt(ft)}finally{nt(ft)}})}toValObject(Le){const Ye={};for(const tt of Object.keys(Le)){const nt=Le[tt];nt!=null&&(Ye[tt]=String(nt))}return Ye}checkError(Le=-1){const Ye=this.getRequestResult(Le);if(Ye.hasError)throw new WebClientError(Ye.errorMessage||"Unknown WebClient error",Ye.statusCode,Ye.result);return{data:Ye.result,status:Ye.statusCode}}}class CameraCycleApi{constructor(Le){this.wasmApi=Le}freeResources(){this.wasmApi=null}ads(Le,Ye,tt={}){return this.wasmApi.ads(Le,Ye,tt)}pfc(Le,Ye){return this.wasmApi.pfc(Le,Ye)}mcp(Le){return this.wasmApi.mcp(Le)}odc(Le,Ye){return this.wasmApi.odc(Le,Ye)}sdc(){this.wasmApi.sdc()}gcs(){return this.wasmApi.gcs()}sfc(Le,Ye){this.wasmApi.sfc(Le,Ye)}gus(){return this.wasmApi.gus()}async rcc(){await this.wasmApi.rcc()}}class WasmObjectMarshaler{constructor(Le){this.wasmApi=Le}freeResources(){this.wasmApi=null}wrp(Le,Ye){return this.wasmApi.wrp(Le,Ye)}}const DEFAULT_STORAGE=1,OPERATION_TIMEOUT_MS=3e4;class StorageApi{constructor(Le){this.semaphore=new Semaphore(1),this.wasmApi=Le}freeResources(){if(this.wasmApi)try{this.wasmApi.reset()}catch{}this.semaphore.reset(),this.wasmApi=null}isAvailable(Le){return this.requireWasm(),this.wasmApi.isAvailable(Le)}async save(Le,Ye,tt){const{storageType:nt,encrypted:ft}=this.resolveOptions(tt);await this.runOpVoid(()=>this.wasmApi.save(Le,Ye,nt,ft),"Storage save failed")}async load(Le,Ye){const{storageType:tt,encrypted:nt}=this.resolveOptions(Ye);return this.runOp(()=>this.wasmApi.load(Le,tt,nt),ft=>ft?null:this.wasmApi.getResult())}async remove(Le,Ye){const{storageType:tt}=this.resolveOptions(Ye);await this.runOpVoid(()=>this.wasmApi.remove(Le,tt),"Storage remove failed")}async clear(Le){await this.runOpVoid(()=>this.wasmApi.clearAll(Le),"Storage clear failed")}runOpVoid(Le,Ye){return this.runOp(Le,tt=>{if(tt)throw new Error(this.wasmApi.getError()||Ye)})}async runOp(Le,Ye){return this.semaphore.withLock(async()=>(this.beginOp(Le),await this.poll(),Ye(this.wasmApi.hasError())))}beginOp(Le){if(this.requireWasm(),this.wasmApi.reset(),!Le())throw new Error("Storage operation already in progress")}resolveOptions(Le){return{storageType:(Le==null?void 0:Le.storageType)??DEFAULT_STORAGE,encrypted:(Le==null?void 0:Le.encrypted)??!0}}poll(){return withTimeout$1(pollUntilDone(()=>this.wasmApi.isDone()),OPERATION_TIMEOUT_MS,"Storage operation timed out",()=>this.cancelPendingOnTimeout())}cancelPendingOnTimeout(){if(this.wasmApi)try{this.wasmApi.cancelPendingAsync()}catch{}}requireWasm(){if(!this.wasmApi)throw new Error("StorageApi has not been initialized")}}var SignalDataType=(Be=>(Be[Be.Device=1]="Device",Be[Be.Behaviour=2]="Behaviour",Be[Be.PID=3]="PID",Be))(SignalDataType||{});class MlWasmJSApi extends WebClient{constructor(){super(...arguments),this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.workflowApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceProcessingWasmApi=null,this.cameraCycleApi=null,this.wasmObjectMarshaler=null,this.storageApi=null,this.imageWidth_=null,this.imageHeight_=null,this.workflows_=null,this.simdUsed_=!0,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallSemaphore=new Semaphore,this.pseInFlight_=null,this.webApi=null,this.fpCompletionTask_=null}async postFaceResults(Le){return this.checkWasmInitialization("Unable to post face results, cpp API hasn't been initialized"),this.webApi.postFaceResults(Le)}async pse(Le,Ye,tt){this.checkWasmInitialization("Unable to post a pse image, cpp API hasn't been initialized");const nt=this.webApi.pse(Le,Ye??{},tt??{});this.pseInFlight_=nt;try{return await nt}finally{this.pseInFlight_===nt&&(this.pseInFlight_=null)}}get pseInFlight(){return this.pseInFlight_}async initialize(Le,Ye,tt,nt,ft,ht){this.workflows_=ht,this.versionsFile=ft;const gt=await initializeWasm(tt,Le,Ye,nt);return this.wasmModule=gt.wasmModule,this.webClientApi=gt.webClientApi,this.webClientInitialized_=!0,this.workflowApiUtilities=gt.workflowApiUtilities,this.utilityApi=gt.utilityApi,this.idCaptureWasmApi=gt.idCaptureWasmApi,this.faceProcessingWasmApi=gt.faceProcessingWasmApi,this.fpCompletionTask_=this.prefetchFpData(),this.cameraCycleApi=new CameraCycleApi(gt.cameraCycleWasmApi),this.wasmObjectMarshaler=new WasmObjectMarshaler(gt.wasmObjectMarshalerWasmApi),this.storageApi=new StorageApi(gt.storageWasmApi),this.webApi=this.webApi??new this.wasmModule.WebApi(this),this.simdUsed_=gt.simdUsed,this.isInitialized_=!0,gt.simdUsed}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}wrp(Le,Ye){return this.checkWasmInitialization("Unable to wrp, cpp API hasn't been initialized"),this.wasmObjectMarshaler.wrp(Le,Ye)}ads(Le,Ye,tt={}){return this.checkWasmInitialization("Unable to ads, cpp API hasn't been initialized"),this.cameraCycleApi.ads(Le,Ye,tt)}mcp(Le){return this.checkWasmInitialization("Unable to mcp, cpp API hasn't been initialized"),this.cameraCycleApi.mcp(Le)}pfc(Le,Ye){return this.checkWasmInitialization("Unable to pfc, cpp API hasn't been initialized"),this.cameraCycleApi.pfc(Le,Ye)}odc(Le,Ye){return this.checkWasmInitialization("Unable to odc, cpp API hasn't been initialized"),this.cameraCycleApi.odc(Le,Ye)}sdc(){this.checkWasmInitialization("Unable to sdc, cpp API hasn't been initialized"),this.cameraCycleApi.sdc()}gcs(){return this.checkWasmInitialization("Unable to gcs, cpp API hasn't been initialized"),this.cameraCycleApi.gcs()}gus(){return this.checkWasmInitialization("Unable to gus, cpp API hasn't been initialized"),this.cameraCycleApi.gus()}async rcc(){this.checkWasmInitialization("Unable to rcc, cpp API hasn't been initialized"),await this.cameraCycleApi.rcc()}isInitialized(){return this.workflowApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceProcessingWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Le,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Le&&Ye&&Le==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Le*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Le,this.imageHeight_=Ye,this.inputImageBuffer=this.workflowApiUtilities.allocateInputImageBuffer(Le,Ye,4))}async handleDetectionCallAndUpdateState(Le){this.checkWasmInitialization("Unable to update workflow state, cpp API hasn't been initialized"),this.workflowApiUtilities.handleDetectionCallAndUpdateState(this.workflowTypeToWasmEnum(Le))}setWorkflowConsuming(Le,Ye){return this.checkWasmInitialization("Unable to set workflow consuming, cpp API hasn't been initialized"),this.workflowApiUtilities.setWorkflowConsuming(this.workflowTypeToWasmEnum(Le),Ye)}ens(Le){return this.checkWasmInitialization("Unable to ens, cpp API hasn't been initialized"),this.utilityApi.ens(Le)}ckvcks(Le){this.checkWasmInitialization("Unable to ckvcks, cpp API hasn't been initialized"),this.utilityApi.ckvcks(Le)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Le){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Le.width,Le.height),this.inputImageBuffer.set(Le.data),this.utilityApi.analyzeFrame()}async freeResources(){var Le,Ye,tt;this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.workflows_=null,this.simdUsed_=!0,this.workflowApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceProcessingWasmApi=null,(Le=this.cameraCycleApi)==null||Le.freeResources(),this.cameraCycleApi=null,(Ye=this.wasmObjectMarshaler)==null||Ye.freeResources(),this.wasmObjectMarshaler=null,(tt=this.storageApi)==null||tt.freeResources(),this.storageApi=null,this.webApi=null,this.isInitialized_=!1,await super.freeResources()}resetWorkflow(Le){this.checkWasmInitialization("Unable to reset workflow, cpp API hasn't been initialized"),this.workflowApiUtilities.resetWorkflow(this.workflowTypeToWasmEnum(Le))}resetAllWorkflows(){this.checkWasmInitialization("Unable to reset workflows, cpp API hasn't been initialized");for(const[Le,Ye]of this.workflows_)this.resetWorkflow(Le)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllWorkflows(),this.resetOther()}sfc(Le,Ye){this.checkWasmInitialization("Unable to sfc, cpp API hasn't been initialized"),this.cameraCycleApi.sfc(Le,Ye)}async process(Le,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),Ye){if(this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");this.inputImageBuffer.set(Ye.data)}switch(Le){case WasmWorkflow.IdBlurGlareWorkflow:case WasmWorkflow.IdBarcodeAndTextQualityWorkflow:case WasmWorkflow.IdFaceQualityWorkflow:case WasmWorkflow.IdFaceDetectionWorkflow:case WasmWorkflow.IdBlurGlareCoreWorkflow:case WasmWorkflow.IdBarcodeAndTextQualityCoreWorkflow:case WasmWorkflow.IdFaceQualityCoreWorkflow:return this.idCaptureWasmApi.runIdCaptureWorkflow(this.workflowTypeToWasmEnum(Le));case WasmWorkflow.IdVideoSelfieWorkflow:return this.idCaptureWasmApi.runIdVideoSelfieWorkflow();case WasmWorkflow.SelfieWithAggregationMetrics:case WasmWorkflow.SelfieWithQualityMetrics:case WasmWorkflow.OnDeviceSelfieWorkflow:return this.faceProcessingWasmApi.runSelfieWorkflow(this.workflowTypeToWasmEnum(Le));default:throw new Error("Unknown workflow type")}}async runIdCapture(Le){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return Le&&this.inputImageBuffer.set(Le.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Le){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return Le&&this.inputImageBuffer.set(Le.data),this.faceProcessingWasmApi.runSelfieCapture()}async setFacePositionConstraints(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFacePositionConstraints(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceProcessingThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt){this.checkWasmInitialization("Unable to set face processing thresholds, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceProcessingThresholds(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt)}async setFaceAttributesThresholds(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceAttributesThresholds(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceChecksEnabled(Le,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceChecksEnabled(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht)}async setFaceProcessingMode(Le,Ye){this.checkWasmInitialization("Unable to set face processing mode, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceProcessingMode(this.workflowTypeToWasmEnum(Le),Ye)}async setFaceProcessingCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt,bt,Rt,wt,Tt){this.checkWasmInitialization("Unable to set face processing callbacks, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceProcessingCallbacks(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt,bt,Rt,wt,Tt)}async setIdCaptureThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et)}async setIdCaptureCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt)}async setIdCaptureGeometryParams(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt)}async setIdCaptureConfigParams(Le,Ye,tt,nt,ft,ht,gt){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt)}setIdCaptureModelType(Le,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.workflowTypeToWasmEnum(Le),this.idCaptureModelTypeToWasmEnum(Ye))}setIdBarcodeCaptureEnabled(Le,Ye){this.checkWasmInitialization("Unable to set barcode capture enabled, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdBarcodeCaptureEnabled(this.workflowTypeToWasmEnum(Le),Ye)}setIdBarcodeAutoCaptureOnDecode(Le,Ye){this.checkWasmInitialization("Unable to set barcode auto-capture-on-decode, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdBarcodeAutoCaptureOnDecode(this.workflowTypeToWasmEnum(Le),Ye)}setIdBarcodeDecodedCallback(Le,Ye){this.checkWasmInitialization("Unable to set barcode decoded callback, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdBarcodeDecodedCallback(this.workflowTypeToWasmEnum(Le),Ye)}async setIdBarcodeEnhancementModel(Le,Ye){this.checkWasmInitialization("Unable to set barcode enhancement model, cpp API hasn't been initialized");const tt=await fetch(resolveModelPath(Ye,this.simdUsed_)).then(nt=>nt.arrayBuffer()).then(nt=>new Uint8Array(nt));return this.idCaptureWasmApi.setBarcodeEnhancementModel(this.workflowTypeToWasmEnum(Le),tt)}IdPerspectiveTransform(Le,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Le,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadModels(){var ft;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Le=new this.wasmModule.WorkflowTypeToIntMap,Ye=new Map,tt=new Map,nt=new Set;for(let[,ht]of this.workflows_)for(let gt of ht)nt.add(gt);await Promise.all(Array.from(nt).map(async ht=>{let gt=await fetch(resolveModelPath(ht,this.simdUsed_)).then(At=>At.arrayBuffer()).then(At=>new Uint8Array(At));tt.set(ht,gt)}));for(let[ht,gt]of this.workflows_){let At=this.workflowTypeToWasmEnum(ht),xt=[],Et=new this.wasmModule.VectorInt;for(let kt of gt){let Ct=tt.get(kt);Et.push_back(Ct.byteLength),xt.push(Ct)}Le.set(At,Et),Ye.set(At,xt)}this.modelsBuffers=this.workflowApiUtilities.allocateModelsBuffers(Le);for(let[ht,gt]of Ye){let At=(ft=this.modelsBuffers)==null?void 0:ft.get(ht);for(let xt=0;xt<At.size();xt++){let Et=At==null?void 0:At.get(xt);if(Et)Et.set(gt[xt]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializeWorkflows(){this.checkWasmInitialization("Unable to initialize workflows, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.workflowApiUtilities.initializeWorkflows()}async setProductionMode(Le){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Le)}getWorkflowState(){return this.checkWasmInitialization("Unable to get workflow state, cpp API hasn't been initialized"),this.workflowApiUtilities.getWorkflowState()}getCurrentWorkflow(){return this.checkWasmInitialization("Unable to get current workflow, cpp API hasn't been initialized"),this.workflowTypeFromWasmEnum(this.workflowApiUtilities.getCurrentWorkflow())}setSdkVersion(Le){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Le)}setSdkPlatform(Le){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Le)}setDeviceInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Le,Ye)}setBrowserInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Le,Ye)}setCameraInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Le,Ye)}setZc(Le){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Le)}setMotionStatus(Le){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Le)}lg(Le,Ye,tt){this.utilityApi!=null&&this.utilityApi.lg(Le,Ye,tt)}getAppLogs(){return this.utilityApi==null?"":this.utilityApi.getAppLogs()}setMetadataField(Le,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Le,Ye)}setInspectorOpened(Le){this.inspectorOpened_=Le}setBackgroundMode(Le){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Le)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(Le,Ye=!1){this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await wasmCallWrapper(this.wasmCallSemaphore,()=>this.utilityApi.prc(Le,Ye),!0)}async poc(Le,Ye){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await wasmCallWrapper(this.wasmCallSemaphore,()=>this.utilityApi.poc(Le,Ye),!0)}ssl(Le){this.checkWasmInitialization("Unable to ssl, cpp API hasn't been initialized"),this.utilityApi.ssl(Le)}stl(){this.checkWasmInitialization("Unable to stl, cpp API hasn't been initialized"),this.utilityApi.stl()}async rsp(Le){this.checkWasmInitialization("Unable to rsp, cpp API hasn't been initialized"),await wasmCallWrapper(this.wasmCallSemaphore,()=>this.utilityApi.rsp(Le),!0)}osv(){this.checkWasmInitialization("Unable to set sensor beginning timestamp, cpp API hasn't been initialized"),this.utilityApi.osv()}oev(){this.checkWasmInitialization("Unable to set sensor ending timestamp, cpp API hasn't been initialized"),this.utilityApi.oev()}async getFPData(Le){return this.checkWasmInitialization("Unable to get fingerprint data, cpp API hasn't been initialized"),await this.fpCompletionTask_,this.utilityApi.getFPData(Le??1)}sbc(Le){this.checkWasmInitialization("Unable to sbc, cpp API hasn't been initialized"),this.utilityApi.sbc(Le)}prefetchFpData(){return wasmCallWrapper(this.wasmCallSemaphore,()=>this.utilityApi.ppf(),!0)}workflowTypeToWasmEnum(Le){switch(Le){case WasmWorkflow.IdBlurGlareWorkflow:return this.wasmModule.WorkflowType.IdBlurGlareWorkflow;case WasmWorkflow.IdBarcodeAndTextQualityWorkflow:return this.wasmModule.WorkflowType.IdBarcodeAndTextQualityWorkflow;case WasmWorkflow.IdVideoSelfieWorkflow:return this.wasmModule.WorkflowType.IdVideoSelfieWorkflow;case WasmWorkflow.SelfieWithAggregationMetrics:return this.wasmModule.WorkflowType.SelfieWithAggregationMetrics;case WasmWorkflow.SelfieWithQualityMetrics:return this.wasmModule.WorkflowType.SelfieWithQualityMetrics;case WasmWorkflow.IdFaceQualityWorkflow:return this.wasmModule.WorkflowType.IdFaceQualityWorkflow;case WasmWorkflow.IdFaceDetectionWorkflow:return this.wasmModule.WorkflowType.IdFaceDetectionWorkflow;case WasmWorkflow.OnDeviceSelfieWorkflow:return this.wasmModule.WorkflowType.OnDeviceSelfieWorkflow;case WasmWorkflow.IdBlurGlareCoreWorkflow:return this.wasmModule.WorkflowType.IdBlurGlareCoreWorkflow;case WasmWorkflow.IdBarcodeAndTextQualityCoreWorkflow:return this.wasmModule.WorkflowType.IdBarcodeAndTextQualityCoreWorkflow;case WasmWorkflow.IdFaceQualityCoreWorkflow:return this.wasmModule.WorkflowType.IdFaceQualityCoreWorkflow;default:throw new Error("Unknown workflow type")}}workflowTypeFromWasmEnum(Le){switch(Le){case this.wasmModule.WorkflowType.IdBlurGlareWorkflow:return WasmWorkflow.IdBlurGlareWorkflow;case this.wasmModule.WorkflowType.IdBarcodeAndTextQualityWorkflow:return WasmWorkflow.IdBarcodeAndTextQualityWorkflow;case this.wasmModule.WorkflowType.IdVideoSelfieWorkflow:return WasmWorkflow.IdVideoSelfieWorkflow;case this.wasmModule.WorkflowType.SelfieWithAggregationMetrics:return WasmWorkflow.SelfieWithAggregationMetrics;case this.wasmModule.WorkflowType.SelfieWithQualityMetrics:return WasmWorkflow.SelfieWithQualityMetrics;case this.wasmModule.WorkflowType.IdFaceQualityWorkflow:return WasmWorkflow.IdFaceQualityWorkflow;case this.wasmModule.WorkflowType.IdFaceDetectionWorkflow:return WasmWorkflow.IdFaceDetectionWorkflow;case this.wasmModule.WorkflowType.OnDeviceSelfieWorkflow:return WasmWorkflow.OnDeviceSelfieWorkflow;case this.wasmModule.WorkflowType.IdBlurGlareCoreWorkflow:return WasmWorkflow.IdBlurGlareCoreWorkflow;case this.wasmModule.WorkflowType.IdBarcodeAndTextQualityCoreWorkflow:return WasmWorkflow.IdBarcodeAndTextQualityCoreWorkflow;case this.wasmModule.WorkflowType.IdFaceQualityCoreWorkflow:return WasmWorkflow.IdFaceQualityCoreWorkflow;default:throw new Error("Unknown workflow type")}}idCaptureModelTypeToWasmEnum(Le){switch(Le){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Le){if(!this.isInitialized())throw new Error(Le)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),api=MlWasmJSApi$1;function setToken(Be){api.setToken(Be)}let storedApiURL="",storedUseSha256=!1,storedClientId="";function configureConnection(Be,Le){storedApiURL=Be,storedUseSha256=Le}function setClientId(Be){storedClientId=Be}function getClientId(){return storedClientId}function setHttpRequestTimeout(Be){api.setRequestTimeout(Be)}function getHttpRequestTimeout(){return api.getRequestTimeout()}function getConnectionConfig(){return{apiURL:storedApiURL,useSha256:storedUseSha256}}const eventsQueue=[],eventListeners=new Set;function subscribeToInterviewEvents(Be){return eventListeners.add(Be),()=>{eventListeners.delete(Be)}}function notifyEventListeners(Be){eventListeners.forEach(Le=>{try{Le(Be)}catch{}})}function addEvent(Be){const{token:Le,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Be;if(!Le){eventsQueue.push(Be);return}return notifyEventListeners(Be),api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Le}}).catch(()=>{})}function emptyQueue(Be){eventsQueue.forEach(Le=>{addEvent({...Le,token:Be})})}const state={token:null},version$3="1.92.0",devDependencies={"@fingerprintjs/fingerprintjs-pro":"3.12.3","@thumbmarkjs/thumbmarkjs":"0.20.6"},deviceFingerprintSignalsUrl="/omni/add/device-fingerprint-signals",triggerEventCodes=new Set(["modelLoadEnd","captureAttemptFinished"]),sessionInitEventCode="modelLoadEnd";class FingerprintSignalsReporter{constructor(){this.fingerprintDataUpdated=!0,this.started=!1}static getInstance(){return FingerprintSignalsReporter.instance||(FingerprintSignalsReporter.instance=new FingerprintSignalsReporter),FingerprintSignalsReporter.instance}start(){this.started||(this.started=!0,subscribeToInterviewEvents(this.handleInterviewEvent.bind(this)))}markFingerprintDataUpdated(){this.fingerprintDataUpdated=!0}handleInterviewEvent(Le){triggerEventCodes.has(Le.code)&&this.sendScheduledData(Le.code)}async sendScheduledData(Le){var ft;const Ye=Le===sessionInitEventCode,tt=(ft=state.token)==null?void 0:ft.token;let nt=null;try{if(Ye&&(nt=SignalDataType.Behaviour,MlWasmJSApi$1.sbc(!0)),tt){if(Ye){nt=SignalDataType.PID;const ht=await MlWasmJSApi$1.getFPData(nt);await this.sendDeviceSignals(tt,Le,ht)}if(this.consumeFingerprintDataUpdatedFlag()||Ye){nt=SignalDataType.Device;const ht=await MlWasmJSApi$1.getFPData(nt);await this.sendDeviceSignals(tt,Le,ht)}if(!Ye){nt=SignalDataType.Behaviour;const ht=await MlWasmJSApi$1.getFPData(nt);await this.sendDeviceSignals(tt,Le,ht)}}}catch(ht){addEvent({code:"deviceFPSignalsCollectionFailed",payload:{message:(ht==null?void 0:ht.message)??String(ht),signalsType:nt,interviewEvent:Le},token:tt})}}async sendDeviceSignals(Le,Ye,tt){tt&&await api.post(deviceFingerprintSignalsUrl,{interviewEvent:Ye,metadata:tt},{headers:{"X-Incode-Hardware-Id":Le}})}consumeFingerprintDataUpdatedFlag(){const Le=this.fingerprintDataUpdated;return this.fingerprintDataUpdated=!1,Le}}const FingerprintSignalsReporter$1=FingerprintSignalsReporter.getInstance();function e$2(Be,Le){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Be,Le)?Be[Le]:void 0}function t$2(Be,Le,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Be,location.href),{blockedURI:kt}=xt;kt!==Et.href&&kt!==Et.protocol.slice(0,-1)&&kt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Le).then(xt=>(At(),xt),xt=>new Promise(Et=>{const kt=new MessageChannel;kt.port1.onmessage=()=>Et(),kt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Be){let Le="";for(let Ye=0;Ye<Be.length;++Ye)if(Ye>0){const tt=Be[Ye].toLowerCase();tt!==Be[Ye]?Le+=` ${tt}`:Le+=Be[Ye]}else Le+=Be[Ye].toUpperCase();return Le}const r$3={default:"endpoint"},o$1={default:"tlsEndpoint"},i$4="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$f=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$e="API key required",m$2="API key not found",A$1="API key expired",w$f="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$e,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Be,Le){const Ye=[],[tt,nt]=function(gt){const At=function(kt){const Ct=[...kt];return{current:()=>Ct[0],postpone(){const yt=Ct.shift();yt!==void 0&&Ct.push(yt)},exclude(){Ct.shift()}}}(gt),xt=function(kt,Ct){let yt=0;return()=>Math.random()*Math.min(Ct,kt*Math.pow(2,yt++))}(100,3e3),Et=new Set;return[At.current(),(kt,Ct)=>{let yt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),yt=0;else if(vt===K)At.exclude();else if(vt===M$1){const Rt=Date.now()-kt.getTime()<50,wt=At.current();wt&&Rt&&!Et.has(wt)&&(Et.add(wt),yt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,yt??kt.getTime()+xt()-Date.now()]}]}(Be);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=kt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:kt}),Et=Le(gt);return Et.then(()=>xt(),xt),Et.catch(kt=>{if(ft!=null||(ft=kt),Ye.length>=5)throw ft;const Ct=nt(At,kt);if(!Ct)throw ft;const[yt,vt]=Ct;return(bt=vt,new Promise(Rt=>setTimeout(Rt,bt))).then(()=>ht(yt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Be){var Le,Ye;const{picked:tt,rest:nt}=function(Et,kt){const Ct={},yt={};for(const[vt,bt]of Object.entries(Et))kt.includes(vt)?Ct[vt]=bt:yt[vt]=bt;return{picked:Ct,rest:yt}}(Be,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Le=tt.apiKey)!==null&&Le!==void 0?Le:ft,gt=(Ye=e$2(Be,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],kt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(yt,vt,bt,Rt){return yt.addEventListener(vt,bt,Rt),()=>yt.removeEventListener(vt,bt,Rt)}(document,"visibilitychange",kt);return kt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$e);const Et=function(kt,Ct){return(Array.isArray(kt)?kt:[kt]).map(yt=>function(vt,bt){const Rt=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?Rt(bt):wt==="<loaderVersion>"?Rt(b$2):wt)}(String(yt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(kt){return kt instanceof Error&&kt.message===K?new Error(M$1):kt}(Et)}).then(([Et,kt])=>(xt(),Et.load({...nt,ldi:{attempts:kt,visibilityStates:At}})))}function F$1(Be){return t$2(Be,()=>function(Le){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Le))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Le,ht.appendChild(nt)})}(Be),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Be=window,Le="__fpjs_p_l_b",Ye=Be[Le];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Be,Le),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$e,ERROR_BAD_REQUEST_FORMAT:w$f,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$4,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$f,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$3,defaultTlsEndpoint:o$1};function e$1(Be,Le,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(kt){kt(Et)})).then(ht,gt)}At((tt=tt.apply(Be,[])).next())})}function n$1(Be,Le){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Le.call(Be,ht)}catch(kt){Et=[6,kt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$2={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$3=function(Be,Le){typeof window<"u"&&(o[Be]=Le)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Be){var Le,Ye=Be[0];return!(!((Le=r$2==null?void 0:r$2.exclude)===null||Le===void 0)&&Le.includes(Ye))}).filter(function(Be){var Le,Ye,tt,nt,ft=Be[0];return!((Le=r$2==null?void 0:r$2.include)===null||Le===void 0)&&Le.some(function(ht){return ht.includes(".")})?(Ye=r$2==null?void 0:r$2.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$2==null?void 0:r$2.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$2==null?void 0:r$2.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Be){return[Be[0],(0,Be[1])()]}))};function c$2(Be){return Be^=Be>>>16,Be=Math.imul(Be,2246822507),Be^=Be>>>13,Be=Math.imul(Be,3266489909),(Be^=Be>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Be,Le){return Be<<Le|Be>>>32-Le}function d(Be,Le){var Ye;if(Le===void 0&&(Le=0),Le=Le?0|Le:0,typeof Be=="string"&&(Ye=Be,Be=new TextEncoder().encode(Ye).buffer),!(Be instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Le,Le,Le,Le]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Be,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Be,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Be,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Be,Le){return new Promise(function(Ye){setTimeout(function(){return Ye(Le)},Be)})}function m$1(Be,Le,Ye){return Promise.all(Be.map(function(tt){return Promise.race([tt,f$1(Le,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Be,Le,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Be=u(),Le=Object.keys(Be),[4,m$1(Object.values(Be),(r$2==null?void 0:r$2.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Le[gt]]=ht}),[2,p(nt,r$2.exclude||[],r$2.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Be,Le,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var kt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Le.some(function(bt){return kt.startsWith(bt)}),yt=Ye.some(function(bt){return kt.startsWith(bt)});Ct&&!yt||(nt[xt]=Et)}else{var vt=p(Et,Le,Ye,kt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Be);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$e(Be){return e$1(this,void 0,void 0,function(){var Le,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Le=tt.sent(),Ye=d(JSON.stringify(Le)),Math.random()<1e-5&&r$2.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Le),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Be=navigator.userAgent,Le={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Be.match(nt);if(ft&&ft.groups)return{name:Le[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Be){for(var Le=0,Ye=0;Ye<Be.length;++Ye)Le+=Math.abs(Be[Ye]);return Le}var M=b$1();function E(Be,Le,Ye){for(var tt=[],nt=0;nt<Be[0].data.length;nt++){for(var ft=[],ht=0;ht<Be.length;ht++)ft.push(Be[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Le,Ye)}function P(Be){if(Be.length===0)return 0;for(var Le={},Ye=0,tt=Be;Ye<tt.length;Ye++)Le[ft=tt[Ye]]=(Le[ft]||0)+1;var nt=Be[0];for(var ft in Le)Le[ft]>Le[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$3("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Be){return[2,new Promise(function(Le,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Le({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$3("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Be){var Le=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Be({commonImageDataHash:d(E(Le,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Be,Le){if(!Be)throw new Error("Canvas context not supported");return Be.font,Be.font="72px ".concat(Le),Be.measureText("WwMmLli0Oo").width}function _$1(){var Be,Le=document.createElement("canvas"),Ye=(Be=Le.getContext("webgl"))!==null&&Be!==void 0?Be:Le.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Be=new Float32Array(1),Le=new Uint8Array(Be.buffer);return Be[0]=1/0,Be[0]=Be[0]-Be[0],Le[3]}function B(Be,Le){var Ye={};return Le.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Be.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Be=[],Le={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Le).forEach(function(Ye){Le[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Be.push("".concat(Ye,": ").concat(tt))})}),Be}b$1().name!="Firefox"&&i$3("fonts",function(){var Be=this;return new Promise(function(Le,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(kt){return setTimeout(kt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Be,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var kt=L(ht,Et);gt.includes(kt)||(At[Et]=kt)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$3("hardware",function(){return new Promise(function(Be,Le){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Be({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$3("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$3("permissions",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){return k=(r$2==null?void 0:r$2.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Be=Array.from({length:(r$2==null?void 0:r$2.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Be).then(function(Ye){return B(Ye,k)})]})})}),i$3("plugins",function(){var Be=[];if(navigator.plugins)for(var Le=0;Le<navigator.plugins.length;Le++){var Ye=navigator.plugins[Le];Be.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Be})})}),i$3("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$3("system",function(){return new Promise(function(Be){var Le=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Le.name,version:Le.version}};Le.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Be(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$3("webgl",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Be=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
106
|
+
<%s key={someKey} {...props} />`,Tn,bn,Ur,bn),xr[bn+Tn]=!0}}return b0===tt?Ir(T0):gr(T0),T0}}function Wn(b0,q0,x0){return mn(b0,q0,x0,!0)}function Z0(b0,q0,x0){return mn(b0,q0,x0,!1)}var In=Z0,Mn=Wn;reactJsxRuntime_development.Fragment=tt,reactJsxRuntime_development.jsx=In,reactJsxRuntime_development.jsxs=Mn}()),reactJsxRuntime_development}process.env.NODE_ENV==="production"?jsxRuntime.exports=requireReactJsxRuntime_production_min():jsxRuntime.exports=requireReactJsxRuntime_development();var jsxRuntimeExports=jsxRuntime.exports,__spreadArray$1=function(Be,Le,Ye){if(Ye||arguments.length===2)for(var tt=0,nt=Le.length,ft;tt<nt;tt++)(ft||!(tt in Le))&&(ft||(ft=Array.prototype.slice.call(Le,0,tt)),ft[tt]=Le[tt]);return Be.concat(ft||Array.prototype.slice.call(Le))},clipboardEvents=["onCopy","onCut","onPaste"],compositionEvents=["onCompositionEnd","onCompositionStart","onCompositionUpdate"],focusEvents=["onFocus","onBlur"],formEvents=["onInput","onInvalid","onReset","onSubmit"],imageEvents=["onLoad","onError"],keyboardEvents=["onKeyDown","onKeyPress","onKeyUp"],mediaEvents=["onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onError","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting"],mouseEvents=["onClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp"],dragEvents=["onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop"],selectionEvents=["onSelect"],touchEvents=["onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],pointerEvents=["onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onGotPointerCapture","onLostPointerCapture","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut"],uiEvents=["onScroll"],wheelEvents=["onWheel"],animationEvents=["onAnimationStart","onAnimationEnd","onAnimationIteration"],transitionEvents=["onTransitionEnd"],otherEvents=["onToggle"],changeEvents=["onChange"],allEvents=__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1(__spreadArray$1([],clipboardEvents,!0),compositionEvents,!0),focusEvents,!0),formEvents,!0),imageEvents,!0),keyboardEvents,!0),mediaEvents,!0),mouseEvents,!0),dragEvents,!0),selectionEvents,!0),touchEvents,!0),pointerEvents,!0),uiEvents,!0),wheelEvents,!0),animationEvents,!0),transitionEvents,!0),changeEvents,!0),otherEvents,!0);function makeEventProps(Be,Le){var Ye={};return allEvents.forEach(function(tt){var nt=Be[tt];nt&&(Le?Ye[tt]=function(ft){return nt(ft,Le(tt))}:Ye[tt]=nt)}),Ye}function makeCancellablePromise(Be){var Le=!1,Ye=new Promise(function(tt,nt){Be.then(function(ft){return!Le&&tt(ft)}).catch(function(ft){return!Le&&nt(ft)})});return{promise:Ye,cancel:function(){Le=!0}}}function r$4(Be){var Le,Ye,tt="";if(typeof Be=="string"||typeof Be=="number")tt+=Be;else if(typeof Be=="object")if(Array.isArray(Be)){var nt=Be.length;for(Le=0;Le<nt;Le++)Be[Le]&&(Ye=r$4(Be[Le]))&&(tt&&(tt+=" "),tt+=Ye)}else for(Ye in Be)Be[Ye]&&(tt&&(tt+=" "),tt+=Ye);return tt}function clsx$1(){for(var Be,Le,Ye=0,tt="",nt=arguments.length;Ye<nt;Ye++)(Be=arguments[Ye])&&(Le=r$4(Be))&&(tt&&(tt+=" "),tt+=Le);return tt}var isProduction=process.env.NODE_ENV==="production",prefix$1="Invariant failed";function invariant$1(Be,Le){if(!Be){if(isProduction)throw new Error(prefix$1);var Ye=typeof Le=="function"?Le():Le,tt=Ye?"".concat(prefix$1,": ").concat(Ye):prefix$1;throw new Error(tt)}}var __DEV__=process.env.NODE_ENV!=="production",warning$3=function(){};if(__DEV__){var printWarning=function(Le,Ye){var tt=arguments.length;Ye=new Array(tt>1?tt-1:0);for(var nt=1;nt<tt;nt++)Ye[nt-1]=arguments[nt];var ft=0,ht="Warning: "+Le.replace(/%s/g,function(){return Ye[ft++]});typeof console<"u"&&console.error(ht);try{throw new Error(ht)}catch{}};warning$3=function(Be,Le,Ye){var tt=arguments.length;Ye=new Array(tt>2?tt-2:0);for(var nt=2;nt<tt;nt++)Ye[nt-2]=arguments[nt];if(Le===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");Be||printWarning.apply(null,[Le].concat(Ye))}}var warning_1=warning$3;const warning$4=getDefaultExportFromCjs(warning_1);var has$1=Object.prototype.hasOwnProperty;function find$2(Be,Le,Ye){for(Ye of Be.keys())if(dequal(Ye,Le))return Ye}function dequal(Be,Le){var Ye,tt,nt;if(Be===Le)return!0;if(Be&&Le&&(Ye=Be.constructor)===Le.constructor){if(Ye===Date)return Be.getTime()===Le.getTime();if(Ye===RegExp)return Be.toString()===Le.toString();if(Ye===Array){if((tt=Be.length)===Le.length)for(;tt--&&dequal(Be[tt],Le[tt]););return tt===-1}if(Ye===Set){if(Be.size!==Le.size)return!1;for(tt of Be)if(nt=tt,nt&&typeof nt=="object"&&(nt=find$2(Le,nt),!nt)||!Le.has(nt))return!1;return!0}if(Ye===Map){if(Be.size!==Le.size)return!1;for(tt of Be)if(nt=tt[0],nt&&typeof nt=="object"&&(nt=find$2(Le,nt),!nt)||!dequal(tt[1],Le.get(nt)))return!1;return!0}if(Ye===ArrayBuffer)Be=new Uint8Array(Be),Le=new Uint8Array(Le);else if(Ye===DataView){if((tt=Be.byteLength)===Le.byteLength)for(;tt--&&Be.getInt8(tt)===Le.getInt8(tt););return tt===-1}if(ArrayBuffer.isView(Be)){if((tt=Be.byteLength)===Le.byteLength)for(;tt--&&Be[tt]===Le[tt];);return tt===-1}if(!Ye||typeof Be=="object"){tt=0;for(Ye in Be)if(has$1.call(Be,Ye)&&++tt&&!has$1.call(Le,Ye)||!(Ye in Le)||!dequal(Be[Ye],Le[Ye]))return!1;return Object.keys(Le).length===tt}}return Be!==Be&&Le!==Le}const documentContext=React.createContext(null);function Message$5({children:Be,type:Le}){return jsxRuntimeExports.jsx("div",{className:`react-pdf__message react-pdf__message--${Le}`,children:Be})}const DEFAULT_LINK_REL="noopener noreferrer nofollow";class LinkService{constructor(){this.externalLinkEnabled=!0,this.externalLinkRel=void 0,this.externalLinkTarget=void 0,this.isInPresentationMode=!1,this.pdfDocument=void 0,this.pdfViewer=void 0}setDocument(Le){this.pdfDocument=Le}setViewer(Le){this.pdfViewer=Le}setExternalLinkRel(Le){this.externalLinkRel=Le}setExternalLinkTarget(Le){this.externalLinkTarget=Le}setHistory(){}get pagesCount(){return this.pdfDocument?this.pdfDocument.numPages:0}get page(){return invariant$1(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber||0}set page(Le){invariant$1(this.pdfViewer,"PDF viewer is not initialized."),this.pdfViewer.currentPageNumber=Le}get rotation(){return 0}set rotation(Le){}goToDestination(Le){return new Promise(Ye=>{invariant$1(this.pdfDocument,"PDF document not loaded."),invariant$1(Le,"Destination is not specified."),typeof Le=="string"?this.pdfDocument.getDestination(Le).then(Ye):Array.isArray(Le)?Ye(Le):Le.then(Ye)}).then(Ye=>{invariant$1(Array.isArray(Ye),`"${Ye}" is not a valid destination array.`);const tt=Ye[0];new Promise(nt=>{invariant$1(this.pdfDocument,"PDF document not loaded."),tt instanceof Object?this.pdfDocument.getPageIndex(tt).then(ft=>{nt(ft)}).catch(()=>{invariant$1(!1,`"${tt}" is not a valid page reference.`)}):typeof tt=="number"?nt(tt):invariant$1(!1,`"${tt}" is not a valid destination reference.`)}).then(nt=>{const ft=nt+1;invariant$1(this.pdfViewer,"PDF viewer is not initialized."),invariant$1(ft>=1&&ft<=this.pagesCount,`"${ft}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({dest:Ye,pageIndex:nt,pageNumber:ft})})})}navigateTo(Le){this.goToDestination(Le)}goToPage(Le){const Ye=Le-1;invariant$1(this.pdfViewer,"PDF viewer is not initialized."),invariant$1(Le>=1&&Le<=this.pagesCount,`"${Le}" is not a valid page number.`),this.pdfViewer.scrollPageIntoView({pageIndex:Ye,pageNumber:Le})}addLinkAttributes(Le,Ye,tt){Le.href=Ye,Le.rel=this.externalLinkRel||DEFAULT_LINK_REL,Le.target=tt?"_blank":this.externalLinkTarget||""}getDestinationHash(){return"#"}getAnchorUrl(){return"#"}setHash(){}executeNamedAction(){}cachePageRef(){}isPageVisible(){return!0}isPageCached(){return!0}executeSetOCGState(){}}const PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},isBrowser$2=typeof window<"u",isLocalFileSystem=isBrowser$2&&window.location.protocol==="file:";function isDefined$1(Be){return typeof Be<"u"}function isProvided(Be){return isDefined$1(Be)&&Be!==null}function isString$4(Be){return typeof Be=="string"}function isArrayBuffer(Be){return Be instanceof ArrayBuffer}function isBlob(Be){return invariant$1(isBrowser$2,"isBlob can only be used in a browser environment"),Be instanceof Blob}function isDataURI(Be){return isString$4(Be)&&/^data:/.test(Be)}function dataURItoByteString(Be){invariant$1(isDataURI(Be),"Invalid data URI.");const[Le="",Ye=""]=Be.split(",");return Le.split(";").indexOf("base64")!==-1?atob(Ye):unescape(Ye)}function getDevicePixelRatio(){return isBrowser$2&&window.devicePixelRatio||1}const allowFileAccessFromFilesTip="On Chromium based browsers, you can use --allow-file-access-from-files flag for debugging purposes.";function displayCORSWarning(){warning$4(!isLocalFileSystem,`Loading PDF as base64 strings/URLs may not work on protocols other than HTTP/HTTPS. ${allowFileAccessFromFilesTip}`)}function displayWorkerWarning(){warning$4(!isLocalFileSystem,`Loading PDF.js worker may not work on protocols other than HTTP/HTTPS. ${allowFileAccessFromFilesTip}`)}function cancelRunningTask(Be){Be!=null&&Be.cancel&&Be.cancel()}function makePageCallback(Be,Le){return Object.defineProperty(Be,"width",{get(){return this.view[2]*Le},configurable:!0}),Object.defineProperty(Be,"height",{get(){return this.view[3]*Le},configurable:!0}),Object.defineProperty(Be,"originalWidth",{get(){return this.view[2]},configurable:!0}),Object.defineProperty(Be,"originalHeight",{get(){return this.view[3]},configurable:!0}),Be}function isCancelException(Be){return Be.name==="RenderingCancelledException"}function loadFromFile(Be){return new Promise((Le,Ye)=>{const tt=new FileReader;tt.onload=()=>{if(!tt.result)return Ye(new Error("Error while reading a file."));Le(tt.result)},tt.onerror=nt=>{if(!nt.target)return Ye(new Error("Error while reading a file."));const{error:ft}=nt.target;if(!ft)return Ye(new Error("Error while reading a file."));switch(ft.code){case ft.NOT_FOUND_ERR:return Ye(new Error("Error while reading a file: File not found."));case ft.SECURITY_ERR:return Ye(new Error("Error while reading a file: Security error."));case ft.ABORT_ERR:return Ye(new Error("Error while reading a file: Aborted."));default:return Ye(new Error("Error while reading a file."))}},tt.readAsArrayBuffer(Be)})}function reducer$1(Be,Le){switch(Le.type){case"RESOLVE":return{value:Le.value,error:void 0};case"REJECT":return{value:!1,error:Le.error};case"RESET":return{value:void 0,error:void 0};default:return Be}}function useResolver(){return React.useReducer(reducer$1,{value:void 0,error:void 0})}var __awaiter$6=function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(kt){ht(kt)}}function At(Et){try{xt(tt.throw(Et))}catch(kt){ht(kt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})},__rest$2=function(Be,Le){var Ye={};for(var tt in Be)Object.prototype.hasOwnProperty.call(Be,tt)&&Le.indexOf(tt)<0&&(Ye[tt]=Be[tt]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,tt=Object.getOwnPropertySymbols(Be);nt<tt.length;nt++)Le.indexOf(tt[nt])<0&&Object.prototype.propertyIsEnumerable.call(Be,tt[nt])&&(Ye[tt[nt]]=Be[tt[nt]]);return Ye};const{PDFDataRangeTransport}=pdfjs,defaultOnPassword=(Be,Le)=>{switch(Le){case PasswordResponses.NEED_PASSWORD:{const Ye=prompt("Enter the password to open this PDF file.");Be(Ye);break}case PasswordResponses.INCORRECT_PASSWORD:{const Ye=prompt("Invalid password. Please try again.");Be(Ye);break}}};function isParameterObject(Be){return typeof Be=="object"&&Be!==null&&("data"in Be||"range"in Be||"url"in Be)}const Document$1=React.forwardRef(function(Le,Ye){var{children:tt,className:nt,error:ft="Failed to load PDF file.",externalLinkRel:ht,externalLinkTarget:gt,file:At,inputRef:xt,imageResourcesPath:Et,loading:kt="Loading PDF…",noData:Ct="No PDF file specified.",onItemClick:yt,onLoadError:vt,onLoadProgress:bt,onLoadSuccess:Rt,onPassword:wt=defaultOnPassword,onSourceError:Tt,onSourceSuccess:Bt,options:Ot,renderMode:Pt,rotate:Lt}=Le,jt=__rest$2(Le,["children","className","error","externalLinkRel","externalLinkTarget","file","inputRef","imageResourcesPath","loading","noData","onItemClick","onLoadError","onLoadProgress","onLoadSuccess","onPassword","onSourceError","onSourceSuccess","options","renderMode","rotate"]);const[Mt,Xt]=useResolver(),{value:zt,error:$t}=Mt,[Kt,Qt]=useResolver(),{value:_t,error:Wt}=Kt,Ht=React.useRef(new LinkService),Ft=React.useRef([]),Ut=React.useRef(void 0),Jt=React.useRef(void 0);At&&At!==Ut.current&&isParameterObject(At)&&(warning$4(!dequal(At,Ut.current),`File prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "file" prop.`),Ut.current=At),Ot&&Ot!==Jt.current&&(warning$4(!dequal(Ot,Jt.current),`Options prop passed to <Document /> changed, but it's equal to previous one. This might result in unnecessary reloads. Consider memoizing the value passed to "options" prop.`),Jt.current=Ot);const Gt=React.useRef({scrollPageIntoView:I0=>{const{dest:S0,pageNumber:_0,pageIndex:X0=_0-1}=I0;if(yt){yt({dest:S0,pageIndex:X0,pageNumber:_0});return}const d0=Ft.current[X0];if(d0){d0.scrollIntoView();return}warning$4(!1,`An internal link leading to page ${_0} was clicked, but neither <Document> was provided with onItemClick nor it was able to find the page within itself. Either provide onItemClick to <Document> and handle navigating by yourself or ensure that all pages are rendered within <Document>.`)}});React.useImperativeHandle(Ye,()=>({linkService:Ht,pages:Ft,viewer:Gt}),[]);function e0(){Bt&&Bt()}function t0(){$t&&(warning$4(!1,$t.toString()),Tt&&Tt($t))}function Yt(){Xt({type:"RESET"})}React.useEffect(Yt,[At,Xt]);const a0=React.useCallback(()=>__awaiter$6(this,void 0,void 0,function*(){if(!At)return null;if(typeof At=="string")return isDataURI(At)?{data:dataURItoByteString(At)}:(displayCORSWarning(),{url:At});if(At instanceof PDFDataRangeTransport)return{range:At};if(isArrayBuffer(At))return{data:At};if(isBrowser$2&&isBlob(At))return{data:yield loadFromFile(At)};if(invariant$1(typeof At=="object","Invalid parameter in file, need either Uint8Array, string or a parameter object"),invariant$1(isParameterObject(At),"Invalid parameter object: need either .data, .range or .url"),"url"in At&&typeof At.url=="string"){if(isDataURI(At.url)){const{url:I0}=At,S0=__rest$2(At,["url"]),_0=dataURItoByteString(I0);return Object.assign({data:_0},S0)}displayCORSWarning()}return At}),[At]);React.useEffect(()=>{const I0=makeCancellablePromise(a0());return I0.promise.then(S0=>{Xt({type:"RESOLVE",value:S0})}).catch(S0=>{Xt({type:"REJECT",error:S0})}),()=>{cancelRunningTask(I0)}},[a0,Xt]),React.useEffect(()=>{if(!(typeof zt>"u")){if(zt===!1){t0();return}e0()}},[zt]);function n0(){_t&&(Rt&&Rt(_t),Ft.current=new Array(_t.numPages),Ht.current.setDocument(_t))}function Zt(){Wt&&(warning$4(!1,Wt.toString()),vt&&vt(Wt))}React.useEffect(function(){Qt({type:"RESET"})},[Qt,zt]),React.useEffect(function(){if(!zt)return;const S0=Ot?Object.assign(Object.assign({},zt),Ot):zt,_0=__webpack_exports__getDocument(S0);bt&&(_0.onProgress=bt),wt&&(_0.onPassword=wt);const X0=_0,d0=X0.promise.then(W0=>{Qt({type:"RESOLVE",value:W0})}).catch(W0=>{X0.destroyed||Qt({type:"REJECT",error:W0})});return()=>{d0.finally(()=>X0.destroy())}},[Ot,Qt,zt]),React.useEffect(()=>{if(!(typeof _t>"u")){if(_t===!1){Zt();return}n0()}},[_t]),React.useEffect(function(){Ht.current.setViewer(Gt.current),Ht.current.setExternalLinkRel(ht),Ht.current.setExternalLinkTarget(gt)},[ht,gt]);const l0=React.useCallback((I0,S0)=>{Ft.current[I0]=S0},[]),h0=React.useCallback(I0=>{delete Ft.current[I0]},[]),E0=React.useMemo(()=>({imageResourcesPath:Et,linkService:Ht.current,onItemClick:yt,pdf:_t,registerPage:l0,renderMode:Pt,rotate:Lt,unregisterPage:h0}),[Et,yt,_t,l0,Pt,Lt,h0]),C0=React.useMemo(()=>makeEventProps(jt,()=>_t),[jt,_t]);function R0(){return jsxRuntimeExports.jsx(documentContext.Provider,{value:E0,children:tt})}function B0(){return At?_t==null?jsxRuntimeExports.jsx(Message$5,{type:"loading",children:typeof kt=="function"?kt():kt}):_t===!1?jsxRuntimeExports.jsx(Message$5,{type:"error",children:typeof ft=="function"?ft():ft}):R0():jsxRuntimeExports.jsx(Message$5,{type:"no-data",children:typeof Ct=="function"?Ct():Ct})}return jsxRuntimeExports.jsx("div",Object.assign({className:clsx$1("react-pdf__Document",nt),ref:xt,style:{"--scale-factor":"1"}},C0,{children:B0()}))});function useDocumentContext(){return React.useContext(documentContext)}function mergeRefs$2(){for(var Be=[],Le=0;Le<arguments.length;Le++)Be[Le]=arguments[Le];var Ye=Be.filter(Boolean);if(Ye.length<=1){var tt=Ye[0];return tt||null}return function(ft){Ye.forEach(function(ht){typeof ht=="function"?ht(ft):ht&&(ht.current=ft)})}}const pageContext=React.createContext(null),PDF_ROLE_TO_HTML_ROLE={Document:null,DocumentFragment:null,Part:"group",Sect:"group",Div:"group",Aside:"note",NonStruct:"none",P:null,H:"heading",Title:null,FENote:"note",Sub:"group",Lbl:null,Span:null,Em:null,Strong:null,Link:"link",Annot:"note",Form:"form",Ruby:null,RB:null,RT:null,RP:null,Warichu:null,WT:null,WP:null,L:"list",LI:"listitem",LBody:null,Table:"table",TR:"row",TH:"columnheader",TD:"cell",THead:"columnheader",TBody:null,TFoot:null,Caption:null,Figure:"figure",Formula:null,Artifact:null},HEADING_PATTERN=/^H(\d+)$/;function isPdfRole(Be){return Be in PDF_ROLE_TO_HTML_ROLE}function isStructTreeNode(Be){return"children"in Be}function isStructTreeNodeWithOnlyContentChild(Be){return isStructTreeNode(Be)?Be.children.length===1&&0 in Be.children&&"id"in Be.children[0]:!1}function getRoleAttributes(Be){const Le={};if(isStructTreeNode(Be)){const{role:Ye}=Be,tt=Ye.match(HEADING_PATTERN);if(tt)Le.role="heading",Le["aria-level"]=Number(tt[1]);else if(isPdfRole(Ye)){const nt=PDF_ROLE_TO_HTML_ROLE[Ye];nt&&(Le.role=nt)}}return Le}function getBaseAttributes(Be){const Le={};if(isStructTreeNode(Be)){if(Be.alt!==void 0&&(Le["aria-label"]=Be.alt),Be.lang!==void 0&&(Le.lang=Be.lang),isStructTreeNodeWithOnlyContentChild(Be)){const[Ye]=Be.children;if(Ye){const tt=getBaseAttributes(Ye);return Object.assign(Object.assign({},Le),tt)}}}else"id"in Be&&(Le["aria-owns"]=Be.id);return Le}function getAttributes(Be){return Be?Object.assign(Object.assign({},getRoleAttributes(Be)),getBaseAttributes(Be)):null}function StructTreeItem({className:Be,node:Le}){const Ye=React.useMemo(()=>getAttributes(Le),[Le]),tt=React.useMemo(()=>!isStructTreeNode(Le)||isStructTreeNodeWithOnlyContentChild(Le)?null:Le.children.map((nt,ft)=>jsxRuntimeExports.jsx(StructTreeItem,{node:nt},ft)),[Le]);return jsxRuntimeExports.jsx("span",Object.assign({className:Be},Ye,{children:tt}))}function usePageContext(){return React.useContext(pageContext)}function StructTree(){const Be=usePageContext();invariant$1(Be,"Unable to find Page context.");const{onGetStructTreeError:Le,onGetStructTreeSuccess:Ye}=Be,[tt,nt]=useResolver(),{value:ft,error:ht}=tt,{customTextRenderer:gt,page:At}=Be;function xt(){ft&&Ye&&Ye(ft)}function Et(){ht&&(warning$4(!1,ht.toString()),Le&&Le(ht))}return React.useEffect(function(){nt({type:"RESET"})},[nt,At]),React.useEffect(function(){if(gt||!At)return;const Ct=makeCancellablePromise(At.getStructTree()),yt=Ct;return Ct.promise.then(vt=>{nt({type:"RESOLVE",value:vt})}).catch(vt=>{nt({type:"REJECT",error:vt})}),()=>cancelRunningTask(yt)},[gt,At,nt]),React.useEffect(()=>{if(ft!==void 0){if(ft===!1){Et();return}xt()}},[ft]),ft?jsxRuntimeExports.jsx(StructTreeItem,{className:"react-pdf__Page__structTree structTree",node:ft}):null}const ANNOTATION_MODE=__webpack_exports__AnnotationMode;function Canvas$1(Be){const Le=usePageContext();invariant$1(Le,"Unable to find Page context.");const Ye=Object.assign(Object.assign({},Le),Be),{_className:tt,canvasBackground:nt,devicePixelRatio:ft=getDevicePixelRatio(),onRenderError:ht,onRenderSuccess:gt,page:At,renderForms:xt,renderTextLayer:Et,rotate:kt,scale:Ct}=Ye,{canvasRef:yt}=Be;invariant$1(At,"Attempted to render page canvas, but no page was specified.");const vt=React.useRef(null);function bt(){At&>&>(makePageCallback(At,Ct))}function Rt(Ot){isCancelException(Ot)||(warning$4(!1,Ot.toString()),ht&&ht(Ot))}const wt=React.useMemo(()=>At.getViewport({scale:Ct*ft,rotation:kt}),[ft,At,kt,Ct]),Tt=React.useMemo(()=>At.getViewport({scale:Ct,rotation:kt}),[At,kt,Ct]);React.useEffect(function(){if(!At)return;At.cleanup();const{current:Pt}=vt;if(!Pt)return;Pt.width=wt.width,Pt.height=wt.height,Pt.style.width=`${Math.floor(Tt.width)}px`,Pt.style.height=`${Math.floor(Tt.height)}px`,Pt.style.visibility="hidden";const Lt={annotationMode:xt?ANNOTATION_MODE.ENABLE_FORMS:ANNOTATION_MODE.ENABLE,canvasContext:Pt.getContext("2d",{alpha:!1}),viewport:wt};nt&&(Lt.background=nt);const jt=At.render(Lt),Mt=jt;return jt.promise.then(()=>{Pt.style.visibility="",bt()}).catch(Rt),()=>cancelRunningTask(Mt)},[nt,At,xt,wt,Tt]);const Bt=React.useCallback(()=>{const{current:Ot}=vt;Ot&&(Ot.width=0,Ot.height=0)},[]);return React.useEffect(()=>Bt,[Bt]),jsxRuntimeExports.jsx("canvas",{className:`${tt}__canvas`,dir:"ltr",ref:mergeRefs$2(yt,vt),style:{display:"block",userSelect:"none"},children:Et?jsxRuntimeExports.jsx(StructTree,{}):null})}function isTextItem(Be){return"str"in Be}function TextLayer(){const Be=usePageContext();invariant$1(Be,"Unable to find Page context.");const{customTextRenderer:Le,onGetTextError:Ye,onGetTextSuccess:tt,onRenderTextLayerError:nt,onRenderTextLayerSuccess:ft,page:ht,pageIndex:gt,pageNumber:At,rotate:xt,scale:Et}=Be;invariant$1(ht,"Attempted to load page text content, but no page was specified.");const[kt,Ct]=useResolver(),{value:yt,error:vt}=kt,bt=React.useRef(null);warning$4(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"),10)===1,"TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer");function Rt(){yt&&tt&&tt(yt)}function wt(){vt&&(warning$4(!1,vt.toString()),Ye&&Ye(vt))}React.useEffect(function(){Ct({type:"RESET"})},[ht,Ct]),React.useEffect(function(){if(!ht)return;const Mt=makeCancellablePromise(ht.getTextContent()),Xt=Mt;return Mt.promise.then(zt=>{Ct({type:"RESOLVE",value:zt})}).catch(zt=>{Ct({type:"REJECT",error:zt})}),()=>cancelRunningTask(Xt)},[ht,Ct]),React.useEffect(()=>{if(yt!==void 0){if(yt===!1){wt();return}Rt()}},[yt]);const Tt=React.useCallback(()=>{ft&&ft()},[ft]),Bt=React.useCallback(jt=>{warning$4(!1,jt.toString()),nt&&nt(jt)},[nt]);function Ot(){const jt=bt.current;jt&&jt.classList.add("selecting")}function Pt(){const jt=bt.current;jt&&jt.classList.remove("selecting")}const Lt=React.useMemo(()=>ht.getViewport({scale:Et,rotation:xt}),[ht,xt,Et]);return React.useLayoutEffect(function(){if(!ht||!yt)return;const{current:Mt}=bt;if(!Mt)return;Mt.innerHTML="";const Xt=ht.streamTextContent({includeMarkedContent:!0}),zt={container:Mt,textContentSource:Xt,viewport:Lt},$t=new __webpack_exports__TextLayer(zt),Kt=$t;return $t.render().then(()=>{const Qt=document.createElement("div");Qt.className="endOfContent",Mt.append(Qt);const _t=Mt.querySelectorAll('[role="presentation"]');if(Le){let Wt=0;yt.items.forEach((Ht,Ft)=>{if(!isTextItem(Ht))return;const Ut=_t[Wt];if(!Ut)return;const Jt=Le(Object.assign({pageIndex:gt,pageNumber:At,itemIndex:Ft},Ht));Ut.innerHTML=Jt,Wt+=Ht.str&&Ht.hasEOL?2:1})}Tt()}).catch(Bt),()=>cancelRunningTask(Kt)},[Le,Bt,Tt,ht,gt,At,yt,Lt]),jsxRuntimeExports.jsx("div",{className:clsx$1("react-pdf__Page__textContent","textLayer"),onMouseUp:Pt,onMouseDown:Ot,ref:bt})}function AnnotationLayer(){const Be=useDocumentContext(),Le=usePageContext();invariant$1(Le,"Unable to find Page context.");const Ye=Object.assign(Object.assign({},Be),Le),{imageResourcesPath:tt,linkService:nt,onGetAnnotationsError:ft,onGetAnnotationsSuccess:ht,onRenderAnnotationLayerError:gt,onRenderAnnotationLayerSuccess:At,page:xt,pdf:Et,renderForms:kt,rotate:Ct,scale:yt=1}=Ye;invariant$1(Et,"Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."),invariant$1(xt,"Attempted to load page annotations, but no page was specified."),invariant$1(nt,"Attempted to load page annotations, but no linkService was specified.");const[vt,bt]=useResolver(),{value:Rt,error:wt}=vt,Tt=React.useRef(null);warning$4(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"),10)===1,"AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations");function Bt(){Rt&&ht&&ht(Rt)}function Ot(){wt&&(warning$4(!1,wt.toString()),ft&&ft(wt))}React.useEffect(function(){bt({type:"RESET"})},[bt,xt]),React.useEffect(function(){if(!xt)return;const Xt=makeCancellablePromise(xt.getAnnotations()),zt=Xt;return Xt.promise.then($t=>{bt({type:"RESOLVE",value:$t})}).catch($t=>{bt({type:"REJECT",error:$t})}),()=>{cancelRunningTask(zt)}},[bt,xt]),React.useEffect(()=>{if(Rt!==void 0){if(Rt===!1){Ot();return}Bt()}},[Rt]);function Pt(){At&&At()}function Lt(Mt){warning$4(!1,`${Mt}`),gt&>(Mt)}const jt=React.useMemo(()=>xt.getViewport({scale:yt,rotation:Ct}),[xt,Ct,yt]);return React.useEffect(function(){if(!Et||!xt||!nt||!Rt)return;const{current:Xt}=Tt;if(!Xt)return;const zt=jt.clone({dontFlip:!0}),$t={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:Xt,l10n:null,page:xt,structTreeLayer:null,viewport:zt},Kt={annotations:Rt,annotationStorage:Et.annotationStorage,div:Xt,imageResourcesPath:tt,linkService:nt,page:xt,renderForms:kt,viewport:zt};Xt.innerHTML="";try{new __webpack_exports__AnnotationLayer($t).render(Kt),Pt()}catch(Qt){Lt(Qt)}return()=>{}},[Rt,tt,nt,xt,Et,kt,jt]),jsxRuntimeExports.jsx("div",{className:clsx$1("react-pdf__Page__annotations","annotationLayer"),ref:Tt})}var __rest$1=function(Be,Le){var Ye={};for(var tt in Be)Object.prototype.hasOwnProperty.call(Be,tt)&&Le.indexOf(tt)<0&&(Ye[tt]=Be[tt]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,tt=Object.getOwnPropertySymbols(Be);nt<tt.length;nt++)Le.indexOf(tt[nt])<0&&Object.prototype.propertyIsEnumerable.call(Be,tt[nt])&&(Ye[tt[nt]]=Be[tt[nt]]);return Ye};const defaultScale=1;function Page$1(Be){const Le=useDocumentContext(),Ye=Object.assign(Object.assign({},Le),Be),{_className:tt="react-pdf__Page",_enableRegisterUnregisterPage:nt=!0,canvasBackground:ft,canvasRef:ht,children:gt,className:At,customRenderer:xt,customTextRenderer:Et,devicePixelRatio:kt,error:Ct="Failed to load the page.",height:yt,inputRef:vt,loading:bt="Loading page…",noData:Rt="No page specified.",onGetAnnotationsError:wt,onGetAnnotationsSuccess:Tt,onGetStructTreeError:Bt,onGetStructTreeSuccess:Ot,onGetTextError:Pt,onGetTextSuccess:Lt,onLoadError:jt,onLoadSuccess:Mt,onRenderAnnotationLayerError:Xt,onRenderAnnotationLayerSuccess:zt,onRenderError:$t,onRenderSuccess:Kt,onRenderTextLayerError:Qt,onRenderTextLayerSuccess:_t,pageIndex:Wt,pageNumber:Ht,pdf:Ft,registerPage:Ut,renderAnnotationLayer:Jt=!0,renderForms:Gt=!1,renderMode:e0="canvas",renderTextLayer:t0=!0,rotate:Yt,scale:a0=defaultScale,unregisterPage:n0,width:Zt}=Ye,l0=__rest$1(Ye,["_className","_enableRegisterUnregisterPage","canvasBackground","canvasRef","children","className","customRenderer","customTextRenderer","devicePixelRatio","error","height","inputRef","loading","noData","onGetAnnotationsError","onGetAnnotationsSuccess","onGetStructTreeError","onGetStructTreeSuccess","onGetTextError","onGetTextSuccess","onLoadError","onLoadSuccess","onRenderAnnotationLayerError","onRenderAnnotationLayerSuccess","onRenderError","onRenderSuccess","onRenderTextLayerError","onRenderTextLayerSuccess","pageIndex","pageNumber","pdf","registerPage","renderAnnotationLayer","renderForms","renderMode","renderTextLayer","rotate","scale","unregisterPage","width"]),[h0,E0]=useResolver(),{value:C0,error:R0}=h0,B0=React.useRef(null);invariant$1(Ft,"Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");const I0=isProvided(Ht)?Ht-1:Wt??null,S0=Ht??(isProvided(Wt)?Wt+1:null),_0=Yt??(C0?C0.rotate:null),X0=React.useMemo(()=>{if(!C0)return null;let D0=1;const H0=a0??defaultScale;if(Zt||yt){const $0=C0.getViewport({scale:1,rotation:_0});Zt?D0=Zt/$0.width:yt&&(D0=yt/$0.height)}return H0*D0},[yt,C0,_0,a0,Zt]);React.useEffect(function(){return()=>{isProvided(I0)&&nt&&n0&&n0(I0)}},[nt,Ft,I0,n0]);function d0(){if(Mt){if(!C0||!X0)return;Mt(makePageCallback(C0,X0))}if(nt&&Ut){if(!isProvided(I0)||!B0.current)return;Ut(I0,B0.current)}}function W0(){R0&&(warning$4(!1,R0.toString()),jt&&jt(R0))}React.useEffect(function(){E0({type:"RESET"})},[E0,Ft,I0]),React.useEffect(function(){if(!Ft||!S0)return;const H0=makeCancellablePromise(Ft.getPage(S0)),$0=H0;return H0.promise.then(un=>{E0({type:"RESOLVE",value:un})}).catch(un=>{E0({type:"REJECT",error:un})}),()=>cancelRunningTask($0)},[E0,Ft,S0]),React.useEffect(()=>{if(C0!==void 0){if(C0===!1){W0();return}d0()}},[C0,X0]);const u0=React.useMemo(()=>C0&&isProvided(I0)&&S0&&isProvided(_0)&&isProvided(X0)?{_className:tt,canvasBackground:ft,customTextRenderer:Et,devicePixelRatio:kt,onGetAnnotationsError:wt,onGetAnnotationsSuccess:Tt,onGetStructTreeError:Bt,onGetStructTreeSuccess:Ot,onGetTextError:Pt,onGetTextSuccess:Lt,onRenderAnnotationLayerError:Xt,onRenderAnnotationLayerSuccess:zt,onRenderError:$t,onRenderSuccess:Kt,onRenderTextLayerError:Qt,onRenderTextLayerSuccess:_t,page:C0,pageIndex:I0,pageNumber:S0,renderForms:Gt,renderTextLayer:t0,rotate:_0,scale:X0}:null,[tt,ft,Et,kt,wt,Tt,Bt,Ot,Pt,Lt,Xt,zt,$t,Kt,Qt,_t,C0,I0,S0,Gt,t0,_0,X0]),Y0=React.useMemo(()=>makeEventProps(l0,()=>C0&&(X0?makePageCallback(C0,X0):void 0)),[l0,C0,X0]),m0=`${I0}@${X0}/${_0}`;function w0(){switch(e0){case"custom":return invariant$1(xt,'renderMode was set to "custom", but no customRenderer was passed.'),jsxRuntimeExports.jsx(xt,{},`${m0}_custom`);case"none":return null;case"canvas":default:return jsxRuntimeExports.jsx(Canvas$1,{canvasRef:ht},`${m0}_canvas`)}}function y0(){return t0?jsxRuntimeExports.jsx(TextLayer,{},`${m0}_text`):null}function L0(){return Jt?jsxRuntimeExports.jsx(AnnotationLayer,{},`${m0}_annotations`):null}function N0(){return jsxRuntimeExports.jsxs(pageContext.Provider,{value:u0,children:[w0(),y0(),L0(),gt]})}function A0(){return S0?Ft===null||C0===void 0||C0===null?jsxRuntimeExports.jsx(Message$5,{type:"loading",children:typeof bt=="function"?bt():bt}):Ft===!1||C0===!1?jsxRuntimeExports.jsx(Message$5,{type:"error",children:typeof Ct=="function"?Ct():Ct}):N0():jsxRuntimeExports.jsx(Message$5,{type:"no-data",children:typeof Rt=="function"?Rt():Rt})}return jsxRuntimeExports.jsx("div",Object.assign({className:clsx$1(tt,At),"data-page-number":S0,ref:mergeRefs$2(vt,B0),style:{"--scale-factor":`${X0}`,backgroundColor:ft||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},Y0,{children:A0()}))}displayWorkerWarning(),__webpack_exports__GlobalWorkerOptions.workerSrc="pdf.worker.mjs";let options={darkMode:!1,hostingApp:"Web SDK",unsafeMode:!1,redirectFromUnsupportedBrowsers:!1,recorderProvider:"openVidu",useSha256:!1,maxContentWidth:800,maxContentHeight:840};const setOptions=Be=>(options={...options,...Be},options),tutorialBaseDefault="https://sdk.incode.com/sdk/tutorials",wasmBaseDefault="https://cdn.incodesmile.com/ml-wasm-kit-release",pdfWorkerDefaultBase="//cdnjs.cloudflare.com/ajax/libs/pdf.js",ffmpegBaseDefault="https://cdn.incodesmile.com/ffmpeg-release/",lottieScriptDefault="https://cdn.jsdelivr.net/npm/lottie-web@5.13.0/build/player/lottie_light.min.js",trimTrailingSlash=Be=>Be.endsWith("/")?Be.slice(0,-1):Be,ensureRequiredWhenOffline=(Be,Le)=>{if(options.offline&&!Be)throw new Error(`Missing required offline resource config: ${Le}`);return Be},isOfflineMode=()=>!!options.offline,getWasmBaseUrl=()=>{const Be=ensureRequiredWhenOffline(options.wasmBaseUrl,"wasmBaseUrl");return trimTrailingSlash(Be||wasmBaseDefault)},getPdfWorkerUrl=Be=>ensureRequiredWhenOffline(options.pdfWorkerUrl,"pdfWorkerUrl")||`${pdfWorkerDefaultBase}/${Be}/pdf.worker.min.mjs`,getTutorialsBaseUrl=()=>{const Be=ensureRequiredWhenOffline(options.tutorialsBaseUrl,"tutorialsBaseUrl");return trimTrailingSlash(Be||tutorialBaseDefault)},getTutorialUrl=Be=>`${getTutorialsBaseUrl()}/${Be.replace(/^\//,"")}`,getFfmpegBaseUrl=()=>{const Le=ensureRequiredWhenOffline(options.ffmpegBaseUrl,"ffmpegBaseUrl")||ffmpegBaseDefault;return Le.endsWith("/")?Le:`${Le}/`},getLottieScriptUrl=()=>ensureRequiredWhenOffline(options.lottieScriptUrl,"lottieScriptUrl")||lottieScriptDefault,setPdfWorkerUrl=()=>{__webpack_exports__GlobalWorkerOptions.workerSrc=getPdfWorkerUrl(__webpack_exports__version)},getTranslationsUrl=()=>ensureRequiredWhenOffline(options.translationsUrl,"translationsUrl"),FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","id_face_detector","ml_capture_core_enabled","new_id_capture_ux_least_risky_clients","enable_sentry_web","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id","darwinium_profiling","id_quality_backend_validation","id_video_recording_enabled","enable_app_logs"],GLOBAL_FLAGS=["new_fingerprint","enable_sentry_web","enable_app_logs"],ID_MODULE_FLAGS=["id_face_readability","id_face_detector","ml_capture_core_enabled","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability","id_quality_backend_validation","id_video_recording_enabled"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web"];function getStatsigEnvironment(Be){return isStageK8sEnv(Be)?{tier:"development"}:isStageEnv(Be)||isDemoEnv(Be)?{tier:"staging"}:isSaasEnv(Be)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,id_face_detector:!1,ml_capture_core_enabled:!1,new_id_capture_ux_least_risky_clients:!1,enable_sentry_web:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1,darwinium_profiling:!1,id_quality_backend_validation:!1,id_video_recording_enabled:!1,enable_app_logs:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise$1=null,statsigClientInstance=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(!isOfflineMode()){if(initPromise$1)return initPromise$1;initPromise$1=(async()=>{var gt;const ft={customIDs:{client_api_key:Le,hashed_onboarding_id:Ye,flow_id:Be},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),statsigClientInstance=ht,FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise$1}},getFeatureFlag=Be=>featureFlagsValues[Be]??!1,getDynamicConfig=Be=>{if(!statsigClientInstance)return null;try{const Le=statsigClientInstance.getDynamicConfig(Be);return(Le==null?void 0:Le.value)??null}catch{return null}},getModuleFeatureFlags=async Be=>{const Le={};GLOBAL_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]});const Ye=Be.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}),Le};function getFramesAggregationInterval(){return 1700}function IdCaptureParamsConfigurator(Be,Le,Ye,tt){Object.assign(Be,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:getFramesAggregationInterval()})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:!1,faceOcclusionThreshold:.3,getReadyDelay:2e3,framesAggregationInterval:2e3,minFramesWithFace:3}}const getWasmWorkflowProfiles=()=>[new WasmWorkflowProfile(WasmWorkflow.IdBlurGlareWorkflow,WasmWorkflowProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new WasmWorkflowProfile(WasmWorkflow.IdBlurGlareWorkflow,WasmWorkflowProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new WasmWorkflowProfile(WasmWorkflow.IdBarcodeAndTextQualityWorkflow,WasmWorkflowProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new WasmWorkflowProfile(WasmWorkflow.IdFaceQualityWorkflow,WasmWorkflowProfileName.IdCapture_2_01_FaceQuality,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2","id_facedetector_v2_1_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Id Capture with face quality check - IdFaceQualityPipeline with id_capture_2_01 + id_fiqa + id_facedetector models"),new WasmWorkflowProfile(WasmWorkflow.IdFaceDetectionWorkflow,WasmWorkflowProfileName.IdCapture_2_01_FaceDetection,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_facedetector_v2_1_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Id Capture with face detection only - IdFaceDetectionPipeline with id_capture_2_01 + id_facedetector models"),new WasmWorkflowProfile(WasmWorkflow.IdBlurGlareCoreWorkflow,WasmWorkflowProfileName.IdCapture_2_01_Core,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"ml-capture-core equivalent of IdCapture_2_01 (current prod), gated behind ml_capture_core_enabled"),new WasmWorkflowProfile(WasmWorkflow.IdBlurGlareCoreWorkflow,WasmWorkflowProfileName.IdCapture_2_02_Core,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"ml-capture-core equivalent of IdCapture_2_02 (Hebrew back ID), gated behind ml_capture_core_enabled"),new WasmWorkflowProfile(WasmWorkflow.IdBarcodeAndTextQualityCoreWorkflow,WasmWorkflowProfileName.IdCapture_3_02_Core,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"ml-capture-core equivalent of IdCapture_3_02 (text/barcode quality), gated behind ml_capture_core_enabled"),new WasmWorkflowProfile(WasmWorkflow.IdFaceQualityCoreWorkflow,WasmWorkflowProfileName.IdCapture_2_01_FaceQuality_Core,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2","id_facedetector_v2_1_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"ml-capture-core equivalent of IdCapture_2_01_FaceQuality (FD + FIQA), gated behind ml_capture_core_enabled"),new WasmWorkflowProfile(WasmWorkflow.IdVideoSelfieWorkflow,WasmWorkflowProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new WasmWorkflowProfile(WasmWorkflow.SelfieWithAggregationMetrics,WasmWorkflowProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_2_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new WasmWorkflowProfile(WasmWorkflow.SelfieWithQualityMetrics,WasmWorkflowProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_2_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new WasmWorkflowProfile(WasmWorkflow.SelfieWithAggregationMetrics,WasmWorkflowProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_2_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile"),new WasmWorkflowProfile(WasmWorkflow.OnDeviceSelfieWorkflow,WasmWorkflowProfileName.OnDeviceSelfieWorkflow,DetectionType.OnDeviceSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_2_fp16.ortmodelv2","ondevice_physical_liveness_v2_1_fp16.ortmodelv2","age_estimation_v2_2_2_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"On-device selfie workflow with liveness and age estimation")];function getWasmWorkflowProfile(Be){const Le=getWasmWorkflowProfiles().find(Ye=>Ye.name===Be);if(!Le)throw new Error(`WasmWorkflowProfile not found for type: ${Be}`);return Le}const wasmVersion="v2.14.49";function getBarcodeEnhanceModelUrl(){return`${getWasmBaseUrl()}/${wasmVersion}/models/barcode_enhance_896x224_fp16.ortmodelv2`}function resolveModelPath(Be,Le){if(Be.includes("/models/current/")||Be.includes("/models/legacy/"))return Be;const Ye=Le?"current":"legacy";return Be.replace("/models/",`/models/${Ye}/`)}const coreIdCaptureProfileByRegular={[WasmWorkflowProfileName.IdCapture_2_01]:WasmWorkflowProfileName.IdCapture_2_01_Core,[WasmWorkflowProfileName.IdCapture_2_02]:WasmWorkflowProfileName.IdCapture_2_02_Core,[WasmWorkflowProfileName.IdCapture_3_02]:WasmWorkflowProfileName.IdCapture_3_02_Core,[WasmWorkflowProfileName.IdCapture_2_01_FaceQuality]:WasmWorkflowProfileName.IdCapture_2_01_FaceQuality_Core};function generateBundle(Be=!1){const Le=getFeatureFlag("id_face_readability"),Ye=getFeatureFlag("id_face_detector"),tt=getFeatureFlag("id_text_barcode_readability")?WasmWorkflowProfileName.IdCapture_3_02:Le?WasmWorkflowProfileName.IdCapture_2_01_FaceQuality:Ye?WasmWorkflowProfileName.IdCapture_2_01_FaceDetection:getFeatureFlag("id_model_hebrew_back_id")?WasmWorkflowProfileName.IdCapture_2_02:WasmWorkflowProfileName.IdCapture_2_01,nt=getFeatureFlag("ml_capture_core_enabled")?coreIdCaptureProfileByRegular[tt]??tt:tt,ft=Be?WasmWorkflowProfileName.OnDeviceSelfieWorkflow:WasmWorkflowProfileName.SelfieWithQualityMetrics,ht=WasmWorkflowProfileName.SelfieVideoSelfie,gt=WasmWorkflowProfileName.IdVideoSelfie_2_01;return[nt,gt,ft,ht]}function getInitializationParams(Be=!1){const Ye=generateBundle(Be),tt=getWasmBaseUrl(),nt=`${tt}/${wasmVersion}/webLib.wasm`,ft=`${tt}/${wasmVersion}/webLibSimd.wasm`,ht=`${tt}/${wasmVersion}/webLib.js`,gt=`${tt}/${wasmVersion}/versions.json`;let At=new Map,xt=new Map;for(const Et of Ye){const kt=getWasmWorkflowProfile(Et);if(!kt)throw new Error(`WasmWorkflowProfile not found: ${Et}`);const Ct=kt.modelNames;let yt=[];for(const vt of Ct)yt.push(`${tt}/${wasmVersion}/models/${vt}`);At.set(kt.wasmWorkflowType,yt),xt.set(kt.detectionType,kt)}return{wasmModulePath:nt,wasmSimdModulePath:ft,glueCodePath:ht,versionsFilePath:gt,workflowModels:At,enableSIMD:!0,profiles:xt,wasmVersion}}typeof window<"u"&&(window.wasmArrayBuffer=null);async function fetchGlueCode(Be){return import(Be.replace(/\.wasm($|\?)/,".js$1"))}async function loadWasmBinary(Be,Le,Ye=!0){const tt=Ye&&Le?Le:Be;try{const nt=await fetchGlueCode(tt);if(!(nt!=null&&nt.Module))throw new Error(`No Module export in glue for ${tt}`);return window.Module=nt.Module,window.wasmArrayBuffer=await fetch(tt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),{module:await nt.Module({wasmBinary:window.wasmArrayBuffer}),simdUsed:Ye}}catch(nt){if(console.error("WASM init error:",nt),Ye&&Le)return await loadWasmBinary(Be,void 0,!1);throw nt}}let initPromise=null,wasmResult=null;async function initializeWasm(Be,Le,Ye,tt){return wasmResult||(initPromise||(initPromise=(async()=>{try{const{module:nt,simdUsed:ft}=await loadWasmBinary(Le,Ye,tt),ht={wasmModule:nt,simdUsed:ft,webClientApi:new nt.WebClient,workflowApiUtilities:new nt.WorkflowApiUtilities,utilityApi:new nt.UtilityApi,idCaptureWasmApi:new nt.IdCaptureApi,faceProcessingWasmApi:new nt.FaceProcessingApi,cameraCycleWasmApi:new nt.CameraCycleApi,wasmObjectMarshalerWasmApi:new nt.WasmObjectMarshaler,storageWasmApi:nt.StorageApi?new nt.StorageApi:null};return wasmResult=ht,ht}catch(nt){throw initPromise=null,nt}})()),initPromise)}function safeDelete(Be){if(Be&&typeof Be.delete=="function")try{Be.delete()}catch(Le){console.warn("Error during WASM object cleanup:",Le)}}function resetWasmInit(){var Be,Le;wasmResult&&((Le=(Be=wasmResult.webClientApi)==null?void 0:Be.clear)==null||Le.call(Be),safeDelete(wasmResult.webClientApi),safeDelete(wasmResult.workflowApiUtilities),safeDelete(wasmResult.utilityApi),safeDelete(wasmResult.idCaptureWasmApi),safeDelete(wasmResult.faceProcessingWasmApi),safeDelete(wasmResult.cameraCycleWasmApi),safeDelete(wasmResult.wasmObjectMarshalerWasmApi),safeDelete(wasmResult.storageWasmApi)),initPromise=null,wasmResult=null,window.wasmArrayBuffer=null,window.Module=null}async function wasmCallWrapper(Be,Le,Ye=!0,...tt){const nt=async()=>{try{for(;;){if(Le(...tt))return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){throw console.error("Error in wasmCallWrapper:",ft),ft}};return Ye?await Be.withLock(nt):await nt()}let webClientReadyPromise=null;function setWebClientReadyPromise(Be){const Le=Be.catch(Ye=>{throw webClientReadyPromise===Le&&(webClientReadyPromise=null),Ye});webClientReadyPromise=Le}async function waitForWebClientReady(){webClientReadyPromise&&await webClientReadyPromise}class WebClientError extends Error{constructor(Le,Ye,tt){super(Le),this.name="WebClientError",this.status=Ye,this.statusCode=Ye,(Ye>0||tt)&&(this.response={status:Ye,data:tt})}}const MAX_CONCURRENT_REQUESTS=4,WASM_DEFAULT_TIMEOUT=0;class WebClient{constructor(){this.wasmModule=null,this.webClientApi=null,this.webClientInitialized_=!1,this.semaphore=new Semaphore(MAX_CONCURRENT_REQUESTS),this.requestTimeout=WASM_DEFAULT_TIMEOUT}async initializeWebClient(Le,Ye,tt=!0,nt){const ft=await initializeWasm(nt,Le,Ye,tt);this.wasmModule=ft.wasmModule,this.webClientApi=ft.webClientApi,this.webClientInitialized_=!0}async setupConnection(Le,Ye="",tt=!0,nt=!0){await this.semaphore.withLock(async()=>{this.checkInit(),this.webClientApi.resetSessionState(),await wasmCallWrapper(this.semaphore,()=>this.webClientApi.createApi(Le,Ye,tt,nt),!1),this.checkError()})}setRequestTimeout(Le){if(Le!==void 0){if(!Number.isFinite(Le)||Le<=0){console.warn(`WebClient: ignoring invalid request timeout "${Le}" — expected a positive number of milliseconds.`);return}this.requestTimeout=Le}}getRequestTimeout(){return this.requestTimeout}setToken(Le){this.checkInit(),this.webClientApi.setToken(Le)}getToken(){var Le,Ye;return this.checkInit(),((Ye=(Le=this.webClientApi).getToken)==null?void 0:Ye.call(Le))??""}setDefaultHeaders(Le){this.checkInit(),this.webClientApi.setDefaultHeaders(Le)}getDefaultHeaders(){var Le,Ye;return this.checkInit(),((Ye=(Le=this.webClientApi).getDefaultHeaders)==null?void 0:Ye.call(Le))??{}}async get(Le,Ye){const tt=Ye!=null&&Ye.params?this.toValObject(Ye.params):void 0,nt=Ye!=null&&Ye.headers?this.toValObject(Ye.headers):void 0,ft=(Ye==null?void 0:Ye.timeout)??this.requestTimeout;return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((Ye==null?void 0:Ye.withCredentials)===!0),this.setupProgressCallbacks(void 0,Ye==null?void 0:Ye.onDownloadProgress)},ht=>this.webClientApi.get(ht,Le,tt,nt,ft),ht=>this.checkError(ht),ht=>this.clearProgressCallbacks(ht))}async post(Le,Ye,tt){const nt=tt!=null&&tt.headers?this.toValObject(tt.headers):void 0,ft=tt!=null&&tt.params?this.toValObject(tt.params):void 0,ht=(tt==null?void 0:tt.timeout)??this.requestTimeout,gt=this.prepareBody(Ye);return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((tt==null?void 0:tt.withCredentials)===!0),this.setupProgressCallbacks(tt==null?void 0:tt.onUploadProgress,tt==null?void 0:tt.onDownloadProgress)},At=>this.webClientApi.post(At,Le,gt,nt,ft,ht,(tt==null?void 0:tt.ie)===!0),At=>this.checkError(At),At=>this.clearProgressCallbacks(At))}async put(Le,Ye,tt){const nt=tt!=null&&tt.headers?this.toValObject(tt.headers):void 0,ft=tt!=null&&tt.params?this.toValObject(tt.params):void 0,ht=(tt==null?void 0:tt.timeout)??this.requestTimeout,gt=this.prepareBody(Ye);return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((tt==null?void 0:tt.withCredentials)===!0),this.setupProgressCallbacks(tt==null?void 0:tt.onUploadProgress,tt==null?void 0:tt.onDownloadProgress)},At=>this.webClientApi.put(At,Le,gt,nt,ft,ht,(tt==null?void 0:tt.ie)===!0),At=>this.checkError(At),At=>this.clearProgressCallbacks(At))}async patch(Le,Ye,tt){const nt=tt!=null&&tt.headers?this.toValObject(tt.headers):void 0,ft=tt!=null&&tt.params?this.toValObject(tt.params):void 0,ht=(tt==null?void 0:tt.timeout)??this.requestTimeout,gt=this.prepareBody(Ye);return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((tt==null?void 0:tt.withCredentials)===!0),this.setupProgressCallbacks(tt==null?void 0:tt.onUploadProgress,tt==null?void 0:tt.onDownloadProgress)},At=>this.webClientApi.patch(At,Le,gt,nt,ft,ht,(tt==null?void 0:tt.ie)===!0),At=>this.checkError(At),At=>this.clearProgressCallbacks(At))}async delete(Le,Ye){const tt=Ye!=null&&Ye.headers?this.toValObject(Ye.headers):void 0,nt=Ye!=null&&Ye.params?this.toValObject(Ye.params):void 0,ft=(Ye==null?void 0:Ye.timeout)??this.requestTimeout,ht=Ye!=null&&Ye.data?this.prepareBody(Ye.data):void 0;return await this.executeWebRequest(()=>{this.checkInit(),this.webClientApi.setWithCredentials((Ye==null?void 0:Ye.withCredentials)===!0),this.setupProgressCallbacks(void 0,Ye==null?void 0:Ye.onDownloadProgress)},gt=>this.webClientApi.del(gt,Le,ht,tt,nt,ft,(Ye==null?void 0:Ye.ie)===!0),gt=>this.checkError(gt),gt=>this.clearProgressCallbacks(gt))}isReady(){var Le,Ye;return this.webClientInitialized_&&((Ye=(Le=this.webClientApi)==null?void 0:Le.isReady)==null?void 0:Ye.call(Le))}closeConnection(){var Le,Ye;(Ye=(Le=this.webClientApi)==null?void 0:Le.clear)==null||Ye.call(Le)}async freeResources(){this.webClientApi=null,this.wasmModule=null,this.webClientInitialized_=!1,resetWasmInit(),this.semaphore.reset()}checkInit(){if(!this.webClientInitialized_||!this.webClientApi)throw new Error("WebClient not initialized. Call initialize() first.")}getRequestResult(Le=-1){var Ye,tt,nt,ft,ht,gt,At,xt;return this.webClientApi.getRequestResult?this.webClientApi.getRequestResult(Le):{result:(tt=(Ye=this.webClientApi).getResult)==null?void 0:tt.call(Ye,Le),errorMessage:((ft=(nt=this.webClientApi).getErrorMessage)==null?void 0:ft.call(nt,Le))||"",hasError:((gt=(ht=this.webClientApi).hasError)==null?void 0:gt.call(ht,Le))||!1,statusCode:((xt=(At=this.webClientApi).getStatusCode)==null?void 0:xt.call(At,Le))||0}}setupProgressCallbacks(Le,Ye){if(Le)if(this.webClientApi.setOnUploadProgress){const tt=nt=>{try{Le(nt)}catch(ft){console.error("WebClient: Error in onUploadProgress callback:",ft)}};this.webClientApi.setOnUploadProgress(tt)}else console.warn("WebClient: onUploadProgress callback requested but not supported by WASM module");if(Ye)if(this.webClientApi.setOnDownloadProgress){const tt=nt=>{try{Ye(nt)}catch(ft){console.error("WebClient: Error in onDownloadProgress callback:",ft)}};this.webClientApi.setOnDownloadProgress(tt)}else console.warn("WebClient: onDownloadProgress callback requested but not supported by WASM module")}clearProgressCallbacks(Le){var Ye,tt,nt,ft;(tt=(Ye=this.webClientApi).clearOnUploadProgress)==null||tt.call(Ye,Le),(ft=(nt=this.webClientApi).clearOnDownloadProgress)==null||ft.call(nt,Le)}prepareBody(Le){return Le??{}}async executeWebRequest(Le,Ye,tt,nt){return await waitForWebClientReady(),await this.semaphore.withLock(async ft=>{Le();try{return await wasmCallWrapper(this.semaphore,()=>Ye(ft),!1),tt(ft)}finally{nt(ft)}})}toValObject(Le){const Ye={};for(const tt of Object.keys(Le)){const nt=Le[tt];nt!=null&&(Ye[tt]=String(nt))}return Ye}checkError(Le=-1){const Ye=this.getRequestResult(Le);if(Ye.hasError)throw new WebClientError(Ye.errorMessage||"Unknown WebClient error",Ye.statusCode,Ye.result);return{data:Ye.result,status:Ye.statusCode}}}class CameraCycleApi{constructor(Le){this.wasmApi=Le}freeResources(){this.wasmApi=null}ads(Le,Ye,tt={}){return this.wasmApi.ads(Le,Ye,tt)}pfc(Le,Ye){return this.wasmApi.pfc(Le,Ye)}mcp(Le){return this.wasmApi.mcp(Le)}odc(Le,Ye){return this.wasmApi.odc(Le,Ye)}sdc(){this.wasmApi.sdc()}gcs(){return this.wasmApi.gcs()}sfc(Le,Ye){this.wasmApi.sfc(Le,Ye)}gus(){return this.wasmApi.gus()}async rcc(){await this.wasmApi.rcc()}}class WasmObjectMarshaler{constructor(Le){this.wasmApi=Le}freeResources(){this.wasmApi=null}wrp(Le,Ye){return this.wasmApi.wrp(Le,Ye)}}const DEFAULT_STORAGE=1,OPERATION_TIMEOUT_MS=3e4;class StorageApi{constructor(Le){this.semaphore=new Semaphore(1),this.wasmApi=Le}freeResources(){if(this.wasmApi)try{this.wasmApi.reset()}catch{}this.semaphore.reset(),this.wasmApi=null}isAvailable(Le){return this.requireWasm(),this.wasmApi.isAvailable(Le)}async save(Le,Ye,tt){const{storageType:nt,encrypted:ft}=this.resolveOptions(tt);await this.runOpVoid(()=>this.wasmApi.save(Le,Ye,nt,ft),"Storage save failed")}async load(Le,Ye){const{storageType:tt,encrypted:nt}=this.resolveOptions(Ye);return this.runOp(()=>this.wasmApi.load(Le,tt,nt),ft=>ft?null:this.wasmApi.getResult())}async remove(Le,Ye){const{storageType:tt}=this.resolveOptions(Ye);await this.runOpVoid(()=>this.wasmApi.remove(Le,tt),"Storage remove failed")}async clear(Le){await this.runOpVoid(()=>this.wasmApi.clearAll(Le),"Storage clear failed")}runOpVoid(Le,Ye){return this.runOp(Le,tt=>{if(tt)throw new Error(this.wasmApi.getError()||Ye)})}async runOp(Le,Ye){return this.semaphore.withLock(async()=>(this.beginOp(Le),await this.poll(),Ye(this.wasmApi.hasError())))}beginOp(Le){if(this.requireWasm(),this.wasmApi.reset(),!Le())throw new Error("Storage operation already in progress")}resolveOptions(Le){return{storageType:(Le==null?void 0:Le.storageType)??DEFAULT_STORAGE,encrypted:(Le==null?void 0:Le.encrypted)??!0}}poll(){return withTimeout$1(pollUntilDone(()=>this.wasmApi.isDone()),OPERATION_TIMEOUT_MS,"Storage operation timed out",()=>this.cancelPendingOnTimeout())}cancelPendingOnTimeout(){if(this.wasmApi)try{this.wasmApi.cancelPendingAsync()}catch{}}requireWasm(){if(!this.wasmApi)throw new Error("StorageApi has not been initialized")}}var SignalDataType=(Be=>(Be[Be.Device=1]="Device",Be[Be.Behaviour=2]="Behaviour",Be[Be.PID=3]="PID",Be))(SignalDataType||{});class MlWasmJSApi extends WebClient{constructor(){super(...arguments),this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.workflowApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceProcessingWasmApi=null,this.cameraCycleApi=null,this.wasmObjectMarshaler=null,this.storageApi=null,this.imageWidth_=null,this.imageHeight_=null,this.workflows_=null,this.simdUsed_=!0,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallSemaphore=new Semaphore,this.pseInFlight_=null,this.webApi=null,this.fpCompletionTask_=null}async postFaceResults(Le){return this.checkWasmInitialization("Unable to post face results, cpp API hasn't been initialized"),this.webApi.postFaceResults(Le)}async pse(Le,Ye,tt){this.checkWasmInitialization("Unable to post a pse image, cpp API hasn't been initialized");const nt=this.webApi.pse(Le,Ye??{},tt??{});this.pseInFlight_=nt;try{return await nt}finally{this.pseInFlight_===nt&&(this.pseInFlight_=null)}}get pseInFlight(){return this.pseInFlight_}async initialize(Le,Ye,tt,nt,ft,ht){this.workflows_=ht,this.versionsFile=ft;const gt=await initializeWasm(tt,Le,Ye,nt);return this.wasmModule=gt.wasmModule,this.webClientApi=gt.webClientApi,this.webClientInitialized_=!0,this.workflowApiUtilities=gt.workflowApiUtilities,this.utilityApi=gt.utilityApi,this.idCaptureWasmApi=gt.idCaptureWasmApi,this.faceProcessingWasmApi=gt.faceProcessingWasmApi,this.fpCompletionTask_=this.prefetchFpData(),this.cameraCycleApi=new CameraCycleApi(gt.cameraCycleWasmApi),this.wasmObjectMarshaler=new WasmObjectMarshaler(gt.wasmObjectMarshalerWasmApi),this.storageApi=new StorageApi(gt.storageWasmApi),this.webApi=this.webApi??new this.wasmModule.WebApi(this),this.simdUsed_=gt.simdUsed,this.isInitialized_=!0,gt.simdUsed}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}wrp(Le,Ye){return this.checkWasmInitialization("Unable to wrp, cpp API hasn't been initialized"),this.wasmObjectMarshaler.wrp(Le,Ye)}ads(Le,Ye,tt={}){return this.checkWasmInitialization("Unable to ads, cpp API hasn't been initialized"),this.cameraCycleApi.ads(Le,Ye,tt)}mcp(Le){return this.checkWasmInitialization("Unable to mcp, cpp API hasn't been initialized"),this.cameraCycleApi.mcp(Le)}pfc(Le,Ye){return this.checkWasmInitialization("Unable to pfc, cpp API hasn't been initialized"),this.cameraCycleApi.pfc(Le,Ye)}odc(Le,Ye){return this.checkWasmInitialization("Unable to odc, cpp API hasn't been initialized"),this.cameraCycleApi.odc(Le,Ye)}sdc(){this.checkWasmInitialization("Unable to sdc, cpp API hasn't been initialized"),this.cameraCycleApi.sdc()}gcs(){return this.checkWasmInitialization("Unable to gcs, cpp API hasn't been initialized"),this.cameraCycleApi.gcs()}gus(){return this.checkWasmInitialization("Unable to gus, cpp API hasn't been initialized"),this.cameraCycleApi.gus()}async rcc(){this.checkWasmInitialization("Unable to rcc, cpp API hasn't been initialized"),await this.cameraCycleApi.rcc()}isInitialized(){return this.workflowApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceProcessingWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Le,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Le&&Ye&&Le==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Le*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Le,this.imageHeight_=Ye,this.inputImageBuffer=this.workflowApiUtilities.allocateInputImageBuffer(Le,Ye,4))}async handleDetectionCallAndUpdateState(Le){this.checkWasmInitialization("Unable to update workflow state, cpp API hasn't been initialized"),this.workflowApiUtilities.handleDetectionCallAndUpdateState(this.workflowTypeToWasmEnum(Le))}setWorkflowConsuming(Le,Ye){return this.checkWasmInitialization("Unable to set workflow consuming, cpp API hasn't been initialized"),this.workflowApiUtilities.setWorkflowConsuming(this.workflowTypeToWasmEnum(Le),Ye)}ens(Le){return this.checkWasmInitialization("Unable to ens, cpp API hasn't been initialized"),this.utilityApi.ens(Le)}ckvcks(Le){this.checkWasmInitialization("Unable to ckvcks, cpp API hasn't been initialized"),this.utilityApi.ckvcks(Le)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Le){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Le.width,Le.height),this.inputImageBuffer.set(Le.data),this.utilityApi.analyzeFrame()}async freeResources(){var Le,Ye,tt;this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.workflows_=null,this.simdUsed_=!0,this.workflowApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceProcessingWasmApi=null,(Le=this.cameraCycleApi)==null||Le.freeResources(),this.cameraCycleApi=null,(Ye=this.wasmObjectMarshaler)==null||Ye.freeResources(),this.wasmObjectMarshaler=null,(tt=this.storageApi)==null||tt.freeResources(),this.storageApi=null,this.webApi=null,this.isInitialized_=!1,await super.freeResources()}resetWorkflow(Le){this.checkWasmInitialization("Unable to reset workflow, cpp API hasn't been initialized"),this.workflowApiUtilities.resetWorkflow(this.workflowTypeToWasmEnum(Le))}resetAllWorkflows(){this.checkWasmInitialization("Unable to reset workflows, cpp API hasn't been initialized");for(const[Le,Ye]of this.workflows_)this.resetWorkflow(Le)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllWorkflows(),this.resetOther()}sfc(Le,Ye){this.checkWasmInitialization("Unable to sfc, cpp API hasn't been initialized"),this.cameraCycleApi.sfc(Le,Ye)}async process(Le,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),Ye){if(this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");this.inputImageBuffer.set(Ye.data)}switch(Le){case WasmWorkflow.IdBlurGlareWorkflow:case WasmWorkflow.IdBarcodeAndTextQualityWorkflow:case WasmWorkflow.IdFaceQualityWorkflow:case WasmWorkflow.IdFaceDetectionWorkflow:case WasmWorkflow.IdBlurGlareCoreWorkflow:case WasmWorkflow.IdBarcodeAndTextQualityCoreWorkflow:case WasmWorkflow.IdFaceQualityCoreWorkflow:return this.idCaptureWasmApi.runIdCaptureWorkflow(this.workflowTypeToWasmEnum(Le));case WasmWorkflow.IdVideoSelfieWorkflow:return this.idCaptureWasmApi.runIdVideoSelfieWorkflow();case WasmWorkflow.SelfieWithAggregationMetrics:case WasmWorkflow.SelfieWithQualityMetrics:case WasmWorkflow.OnDeviceSelfieWorkflow:return this.faceProcessingWasmApi.runSelfieWorkflow(this.workflowTypeToWasmEnum(Le));default:throw new Error("Unknown workflow type")}}async runIdCapture(Le){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return Le&&this.inputImageBuffer.set(Le.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Le){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return Le&&this.inputImageBuffer.set(Le.data),this.faceProcessingWasmApi.runSelfieCapture()}async setFacePositionConstraints(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFacePositionConstraints(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceProcessingThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt){this.checkWasmInitialization("Unable to set face processing thresholds, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceProcessingThresholds(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt)}async setFaceAttributesThresholds(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceAttributesThresholds(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceChecksEnabled(Le,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceChecksEnabled(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht)}async setFaceProcessingMode(Le,Ye){this.checkWasmInitialization("Unable to set face processing mode, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceProcessingMode(this.workflowTypeToWasmEnum(Le),Ye)}async setFaceProcessingCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt,bt,Rt,wt,Tt){this.checkWasmInitialization("Unable to set face processing callbacks, cpp API hasn't been initialized"),this.faceProcessingWasmApi.setFaceProcessingCallbacks(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt,bt,Rt,wt,Tt)}async setIdCaptureThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et)}async setIdCaptureCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt,vt)}async setIdCaptureGeometryParams(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,kt,Ct,yt)}async setIdCaptureConfigParams(Le,Ye,tt,nt,ft,ht,gt){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.workflowTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt)}setIdCaptureModelType(Le,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.workflowTypeToWasmEnum(Le),this.idCaptureModelTypeToWasmEnum(Ye))}setIdBarcodeCaptureEnabled(Le,Ye){this.checkWasmInitialization("Unable to set barcode capture enabled, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdBarcodeCaptureEnabled(this.workflowTypeToWasmEnum(Le),Ye)}setIdBarcodeAutoCaptureOnDecode(Le,Ye){this.checkWasmInitialization("Unable to set barcode auto-capture-on-decode, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdBarcodeAutoCaptureOnDecode(this.workflowTypeToWasmEnum(Le),Ye)}setIdBarcodeDecodedCallback(Le,Ye){this.checkWasmInitialization("Unable to set barcode decoded callback, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdBarcodeDecodedCallback(this.workflowTypeToWasmEnum(Le),Ye)}async setIdBarcodeEnhancementModel(Le,Ye){this.checkWasmInitialization("Unable to set barcode enhancement model, cpp API hasn't been initialized");const tt=await fetch(resolveModelPath(Ye,this.simdUsed_)).then(nt=>nt.arrayBuffer()).then(nt=>new Uint8Array(nt));return this.idCaptureWasmApi.setBarcodeEnhancementModel(this.workflowTypeToWasmEnum(Le),tt)}IdPerspectiveTransform(Le,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Le,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadModels(){var ft;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Le=new this.wasmModule.WorkflowTypeToIntMap,Ye=new Map,tt=new Map,nt=new Set;for(let[,ht]of this.workflows_)for(let gt of ht)nt.add(gt);await Promise.all(Array.from(nt).map(async ht=>{let gt=await fetch(resolveModelPath(ht,this.simdUsed_)).then(At=>At.arrayBuffer()).then(At=>new Uint8Array(At));tt.set(ht,gt)}));for(let[ht,gt]of this.workflows_){let At=this.workflowTypeToWasmEnum(ht),xt=[],Et=new this.wasmModule.VectorInt;for(let kt of gt){let Ct=tt.get(kt);Et.push_back(Ct.byteLength),xt.push(Ct)}Le.set(At,Et),Ye.set(At,xt)}this.modelsBuffers=this.workflowApiUtilities.allocateModelsBuffers(Le);for(let[ht,gt]of Ye){let At=(ft=this.modelsBuffers)==null?void 0:ft.get(ht);for(let xt=0;xt<At.size();xt++){let Et=At==null?void 0:At.get(xt);if(Et)Et.set(gt[xt]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializeWorkflows(){this.checkWasmInitialization("Unable to initialize workflows, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.workflowApiUtilities.initializeWorkflows()}async setProductionMode(Le){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Le)}getWorkflowState(){return this.checkWasmInitialization("Unable to get workflow state, cpp API hasn't been initialized"),this.workflowApiUtilities.getWorkflowState()}getCurrentWorkflow(){return this.checkWasmInitialization("Unable to get current workflow, cpp API hasn't been initialized"),this.workflowTypeFromWasmEnum(this.workflowApiUtilities.getCurrentWorkflow())}setSdkVersion(Le){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Le)}setSdkPlatform(Le){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Le)}setDeviceInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Le,Ye)}setBrowserInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Le,Ye)}setCameraInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Le,Ye)}setZc(Le){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Le)}setMotionStatus(Le){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Le)}lg(Le,Ye,tt){this.utilityApi!=null&&this.utilityApi.lg(Le,Ye,tt)}getAppLogs(){return this.utilityApi==null?"":this.utilityApi.getAppLogs()}setMetadataField(Le,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Le,Ye)}setInspectorOpened(Le){this.inspectorOpened_=Le}setBackgroundMode(Le){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Le)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(Le,Ye=!1){this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await wasmCallWrapper(this.wasmCallSemaphore,()=>this.utilityApi.prc(Le,Ye),!0)}async poc(Le,Ye){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await wasmCallWrapper(this.wasmCallSemaphore,()=>this.utilityApi.poc(Le,Ye),!0)}ssl(Le){this.checkWasmInitialization("Unable to ssl, cpp API hasn't been initialized"),this.utilityApi.ssl(Le)}stl(){this.checkWasmInitialization("Unable to stl, cpp API hasn't been initialized"),this.utilityApi.stl()}async rsp(Le){this.checkWasmInitialization("Unable to rsp, cpp API hasn't been initialized"),await wasmCallWrapper(this.wasmCallSemaphore,()=>this.utilityApi.rsp(Le),!0)}osv(){this.checkWasmInitialization("Unable to set sensor beginning timestamp, cpp API hasn't been initialized"),this.utilityApi.osv()}oev(){this.checkWasmInitialization("Unable to set sensor ending timestamp, cpp API hasn't been initialized"),this.utilityApi.oev()}async getFPData(Le){return this.checkWasmInitialization("Unable to get fingerprint data, cpp API hasn't been initialized"),await this.fpCompletionTask_,this.utilityApi.getFPData(Le??1)}sbc(Le){this.checkWasmInitialization("Unable to sbc, cpp API hasn't been initialized"),this.utilityApi.sbc(Le)}prefetchFpData(){return wasmCallWrapper(this.wasmCallSemaphore,()=>this.utilityApi.ppf(),!0)}workflowTypeToWasmEnum(Le){switch(Le){case WasmWorkflow.IdBlurGlareWorkflow:return this.wasmModule.WorkflowType.IdBlurGlareWorkflow;case WasmWorkflow.IdBarcodeAndTextQualityWorkflow:return this.wasmModule.WorkflowType.IdBarcodeAndTextQualityWorkflow;case WasmWorkflow.IdVideoSelfieWorkflow:return this.wasmModule.WorkflowType.IdVideoSelfieWorkflow;case WasmWorkflow.SelfieWithAggregationMetrics:return this.wasmModule.WorkflowType.SelfieWithAggregationMetrics;case WasmWorkflow.SelfieWithQualityMetrics:return this.wasmModule.WorkflowType.SelfieWithQualityMetrics;case WasmWorkflow.IdFaceQualityWorkflow:return this.wasmModule.WorkflowType.IdFaceQualityWorkflow;case WasmWorkflow.IdFaceDetectionWorkflow:return this.wasmModule.WorkflowType.IdFaceDetectionWorkflow;case WasmWorkflow.OnDeviceSelfieWorkflow:return this.wasmModule.WorkflowType.OnDeviceSelfieWorkflow;case WasmWorkflow.IdBlurGlareCoreWorkflow:return this.wasmModule.WorkflowType.IdBlurGlareCoreWorkflow;case WasmWorkflow.IdBarcodeAndTextQualityCoreWorkflow:return this.wasmModule.WorkflowType.IdBarcodeAndTextQualityCoreWorkflow;case WasmWorkflow.IdFaceQualityCoreWorkflow:return this.wasmModule.WorkflowType.IdFaceQualityCoreWorkflow;default:throw new Error("Unknown workflow type")}}workflowTypeFromWasmEnum(Le){switch(Le){case this.wasmModule.WorkflowType.IdBlurGlareWorkflow:return WasmWorkflow.IdBlurGlareWorkflow;case this.wasmModule.WorkflowType.IdBarcodeAndTextQualityWorkflow:return WasmWorkflow.IdBarcodeAndTextQualityWorkflow;case this.wasmModule.WorkflowType.IdVideoSelfieWorkflow:return WasmWorkflow.IdVideoSelfieWorkflow;case this.wasmModule.WorkflowType.SelfieWithAggregationMetrics:return WasmWorkflow.SelfieWithAggregationMetrics;case this.wasmModule.WorkflowType.SelfieWithQualityMetrics:return WasmWorkflow.SelfieWithQualityMetrics;case this.wasmModule.WorkflowType.IdFaceQualityWorkflow:return WasmWorkflow.IdFaceQualityWorkflow;case this.wasmModule.WorkflowType.IdFaceDetectionWorkflow:return WasmWorkflow.IdFaceDetectionWorkflow;case this.wasmModule.WorkflowType.OnDeviceSelfieWorkflow:return WasmWorkflow.OnDeviceSelfieWorkflow;case this.wasmModule.WorkflowType.IdBlurGlareCoreWorkflow:return WasmWorkflow.IdBlurGlareCoreWorkflow;case this.wasmModule.WorkflowType.IdBarcodeAndTextQualityCoreWorkflow:return WasmWorkflow.IdBarcodeAndTextQualityCoreWorkflow;case this.wasmModule.WorkflowType.IdFaceQualityCoreWorkflow:return WasmWorkflow.IdFaceQualityCoreWorkflow;default:throw new Error("Unknown workflow type")}}idCaptureModelTypeToWasmEnum(Le){switch(Le){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Le){if(!this.isInitialized())throw new Error(Le)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),api=MlWasmJSApi$1;function setToken(Be){api.setToken(Be)}let storedApiURL="",storedUseSha256=!1,storedClientId="";function configureConnection(Be,Le){storedApiURL=Be,storedUseSha256=Le}function setClientId(Be){storedClientId=Be}function getClientId(){return storedClientId}function setHttpRequestTimeout(Be){api.setRequestTimeout(Be)}function getHttpRequestTimeout(){return api.getRequestTimeout()}function getConnectionConfig(){return{apiURL:storedApiURL,useSha256:storedUseSha256}}const eventsQueue=[],eventListeners=new Set;function subscribeToInterviewEvents(Be){return eventListeners.add(Be),()=>{eventListeners.delete(Be)}}function notifyEventListeners(Be){eventListeners.forEach(Le=>{try{Le(Be)}catch{}})}function addEvent(Be){const{token:Le,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Be;if(!Le){eventsQueue.push(Be);return}return notifyEventListeners(Be),api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Le}}).catch(()=>{})}function emptyQueue(Be){eventsQueue.forEach(Le=>{addEvent({...Le,token:Be})})}const state={token:null},version$3="1.92.1",devDependencies={"@fingerprintjs/fingerprintjs-pro":"3.12.3","@thumbmarkjs/thumbmarkjs":"0.20.6"},deviceFingerprintSignalsUrl="/omni/add/device-fingerprint-signals",triggerEventCodes=new Set(["modelLoadEnd","captureAttemptFinished"]),sessionInitEventCode="modelLoadEnd";class FingerprintSignalsReporter{constructor(){this.fingerprintDataUpdated=!0,this.started=!1}static getInstance(){return FingerprintSignalsReporter.instance||(FingerprintSignalsReporter.instance=new FingerprintSignalsReporter),FingerprintSignalsReporter.instance}start(){this.started||(this.started=!0,subscribeToInterviewEvents(this.handleInterviewEvent.bind(this)))}markFingerprintDataUpdated(){this.fingerprintDataUpdated=!0}handleInterviewEvent(Le){triggerEventCodes.has(Le.code)&&this.sendScheduledData(Le.code)}async sendScheduledData(Le){var ft;const Ye=Le===sessionInitEventCode,tt=(ft=state.token)==null?void 0:ft.token;let nt=null;try{if(Ye&&(nt=SignalDataType.Behaviour,MlWasmJSApi$1.sbc(!0)),tt){if(Ye){nt=SignalDataType.PID;const ht=await MlWasmJSApi$1.getFPData(nt);await this.sendDeviceSignals(tt,Le,ht)}if(this.consumeFingerprintDataUpdatedFlag()||Ye){nt=SignalDataType.Device;const ht=await MlWasmJSApi$1.getFPData(nt);await this.sendDeviceSignals(tt,Le,ht)}if(!Ye){nt=SignalDataType.Behaviour;const ht=await MlWasmJSApi$1.getFPData(nt);await this.sendDeviceSignals(tt,Le,ht)}}}catch(ht){addEvent({code:"deviceFPSignalsCollectionFailed",payload:{message:(ht==null?void 0:ht.message)??String(ht),signalsType:nt,interviewEvent:Le},token:tt})}}async sendDeviceSignals(Le,Ye,tt){tt&&await api.post(deviceFingerprintSignalsUrl,{interviewEvent:Ye,metadata:tt},{headers:{"X-Incode-Hardware-Id":Le}})}consumeFingerprintDataUpdatedFlag(){const Le=this.fingerprintDataUpdated;return this.fingerprintDataUpdated=!1,Le}}const FingerprintSignalsReporter$1=FingerprintSignalsReporter.getInstance();function e$2(Be,Le){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Be,Le)?Be[Le]:void 0}function t$2(Be,Le,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Be,location.href),{blockedURI:kt}=xt;kt!==Et.href&&kt!==Et.protocol.slice(0,-1)&&kt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Le).then(xt=>(At(),xt),xt=>new Promise(Et=>{const kt=new MessageChannel;kt.port1.onmessage=()=>Et(),kt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Be){let Le="";for(let Ye=0;Ye<Be.length;++Ye)if(Ye>0){const tt=Be[Ye].toLowerCase();tt!==Be[Ye]?Le+=` ${tt}`:Le+=Be[Ye]}else Le+=Be[Ye].toUpperCase();return Le}const r$3={default:"endpoint"},o$1={default:"tlsEndpoint"},i$4="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$f=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$e="API key required",m$2="API key not found",A$1="API key expired",w$f="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$e,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Be,Le){const Ye=[],[tt,nt]=function(gt){const At=function(kt){const Ct=[...kt];return{current:()=>Ct[0],postpone(){const yt=Ct.shift();yt!==void 0&&Ct.push(yt)},exclude(){Ct.shift()}}}(gt),xt=function(kt,Ct){let yt=0;return()=>Math.random()*Math.min(Ct,kt*Math.pow(2,yt++))}(100,3e3),Et=new Set;return[At.current(),(kt,Ct)=>{let yt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),yt=0;else if(vt===K)At.exclude();else if(vt===M$1){const Rt=Date.now()-kt.getTime()<50,wt=At.current();wt&&Rt&&!Et.has(wt)&&(Et.add(wt),yt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,yt??kt.getTime()+xt()-Date.now()]}]}(Be);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=kt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:kt}),Et=Le(gt);return Et.then(()=>xt(),xt),Et.catch(kt=>{if(ft!=null||(ft=kt),Ye.length>=5)throw ft;const Ct=nt(At,kt);if(!Ct)throw ft;const[yt,vt]=Ct;return(bt=vt,new Promise(Rt=>setTimeout(Rt,bt))).then(()=>ht(yt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Be){var Le,Ye;const{picked:tt,rest:nt}=function(Et,kt){const Ct={},yt={};for(const[vt,bt]of Object.entries(Et))kt.includes(vt)?Ct[vt]=bt:yt[vt]=bt;return{picked:Ct,rest:yt}}(Be,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Le=tt.apiKey)!==null&&Le!==void 0?Le:ft,gt=(Ye=e$2(Be,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],kt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(yt,vt,bt,Rt){return yt.addEventListener(vt,bt,Rt),()=>yt.removeEventListener(vt,bt,Rt)}(document,"visibilitychange",kt);return kt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$e);const Et=function(kt,Ct){return(Array.isArray(kt)?kt:[kt]).map(yt=>function(vt,bt){const Rt=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?Rt(bt):wt==="<loaderVersion>"?Rt(b$2):wt)}(String(yt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(kt){return kt instanceof Error&&kt.message===K?new Error(M$1):kt}(Et)}).then(([Et,kt])=>(xt(),Et.load({...nt,ldi:{attempts:kt,visibilityStates:At}})))}function F$1(Be){return t$2(Be,()=>function(Le){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Le))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Le,ht.appendChild(nt)})}(Be),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Be=window,Le="__fpjs_p_l_b",Ye=Be[Le];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Be,Le),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$e,ERROR_BAD_REQUEST_FORMAT:w$f,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$4,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$f,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$3,defaultTlsEndpoint:o$1};function e$1(Be,Le,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(kt){kt(Et)})).then(ht,gt)}At((tt=tt.apply(Be,[])).next())})}function n$1(Be,Le){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Le.call(Be,ht)}catch(kt){Et=[6,kt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$2={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$3=function(Be,Le){typeof window<"u"&&(o[Be]=Le)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Be){var Le,Ye=Be[0];return!(!((Le=r$2==null?void 0:r$2.exclude)===null||Le===void 0)&&Le.includes(Ye))}).filter(function(Be){var Le,Ye,tt,nt,ft=Be[0];return!((Le=r$2==null?void 0:r$2.include)===null||Le===void 0)&&Le.some(function(ht){return ht.includes(".")})?(Ye=r$2==null?void 0:r$2.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$2==null?void 0:r$2.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$2==null?void 0:r$2.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Be){return[Be[0],(0,Be[1])()]}))};function c$2(Be){return Be^=Be>>>16,Be=Math.imul(Be,2246822507),Be^=Be>>>13,Be=Math.imul(Be,3266489909),(Be^=Be>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Be,Le){return Be<<Le|Be>>>32-Le}function d(Be,Le){var Ye;if(Le===void 0&&(Le=0),Le=Le?0|Le:0,typeof Be=="string"&&(Ye=Be,Be=new TextEncoder().encode(Ye).buffer),!(Be instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Le,Le,Le,Le]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Be,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Be,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Be,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Be,Le){return new Promise(function(Ye){setTimeout(function(){return Ye(Le)},Be)})}function m$1(Be,Le,Ye){return Promise.all(Be.map(function(tt){return Promise.race([tt,f$1(Le,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Be,Le,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Be=u(),Le=Object.keys(Be),[4,m$1(Object.values(Be),(r$2==null?void 0:r$2.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Le[gt]]=ht}),[2,p(nt,r$2.exclude||[],r$2.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Be,Le,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var kt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Le.some(function(bt){return kt.startsWith(bt)}),yt=Ye.some(function(bt){return kt.startsWith(bt)});Ct&&!yt||(nt[xt]=Et)}else{var vt=p(Et,Le,Ye,kt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Be);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$e(Be){return e$1(this,void 0,void 0,function(){var Le,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Le=tt.sent(),Ye=d(JSON.stringify(Le)),Math.random()<1e-5&&r$2.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Le),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Be=navigator.userAgent,Le={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Be.match(nt);if(ft&&ft.groups)return{name:Le[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Be){for(var Le=0,Ye=0;Ye<Be.length;++Ye)Le+=Math.abs(Be[Ye]);return Le}var M=b$1();function E(Be,Le,Ye){for(var tt=[],nt=0;nt<Be[0].data.length;nt++){for(var ft=[],ht=0;ht<Be.length;ht++)ft.push(Be[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Le,Ye)}function P(Be){if(Be.length===0)return 0;for(var Le={},Ye=0,tt=Be;Ye<tt.length;Ye++)Le[ft=tt[Ye]]=(Le[ft]||0)+1;var nt=Be[0];for(var ft in Le)Le[ft]>Le[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$3("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Be){return[2,new Promise(function(Le,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Le({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$3("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Be){var Le=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Be({commonImageDataHash:d(E(Le,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Be,Le){if(!Be)throw new Error("Canvas context not supported");return Be.font,Be.font="72px ".concat(Le),Be.measureText("WwMmLli0Oo").width}function _$1(){var Be,Le=document.createElement("canvas"),Ye=(Be=Le.getContext("webgl"))!==null&&Be!==void 0?Be:Le.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Be=new Float32Array(1),Le=new Uint8Array(Be.buffer);return Be[0]=1/0,Be[0]=Be[0]-Be[0],Le[3]}function B(Be,Le){var Ye={};return Le.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Be.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Be=[],Le={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Le).forEach(function(Ye){Le[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Be.push("".concat(Ye,": ").concat(tt))})}),Be}b$1().name!="Firefox"&&i$3("fonts",function(){var Be=this;return new Promise(function(Le,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(kt){return setTimeout(kt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Be,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var kt=L(ht,Et);gt.includes(kt)||(At[Et]=kt)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$3("hardware",function(){return new Promise(function(Be,Le){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Be({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$3("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$3("permissions",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){return k=(r$2==null?void 0:r$2.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Be=Array.from({length:(r$2==null?void 0:r$2.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Be).then(function(Ye){return B(Ye,k)})]})})}),i$3("plugins",function(){var Be=[];if(navigator.plugins)for(var Le=0;Le<navigator.plugins.length;Le++){var Ye=navigator.plugins[Le];Be.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Be})})}),i$3("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$3("system",function(){return new Promise(function(Be){var Le=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Le.name,version:Le.version}};Le.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Be(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$3("webgl",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Be=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
107
107
|
attribute vec2 position;
|
|
108
108
|
void main() {
|
|
109
109
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
@@ -10487,7 +10487,7 @@ Event: ${getEventDescription(Be)}`),!0;if(_isDeniedUrl(Be,Le.denyUrls))return DE
|
|
|
10487
10487
|
Event: ${getEventDescription(Be)}.
|
|
10488
10488
|
Url: ${_getEventFilterUrl(Be)}`),!0;if(!_isAllowedUrl(Be,Le.allowUrls))return DEBUG_BUILD$2&&debug.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
10489
10489
|
Event: ${getEventDescription(Be)}.
|
|
10490
|
-
Url: ${_getEventFilterUrl(Be)}`),!0}return!1}function _isIgnoredError(Be,Le){return Le!=null&&Le.length?getPossibleEventMessages(Be).some(Ye=>stringMatchesSomePattern(Ye,Le)):!1}function _isIgnoredTransaction(Be,Le){if(!(Le!=null&&Le.length))return!1;const Ye=Be.transaction;return Ye?stringMatchesSomePattern(Ye,Le):!1}function _isDeniedUrl(Be,Le){if(!(Le!=null&&Le.length))return!1;const Ye=_getEventFilterUrl(Be);return Ye?stringMatchesSomePattern(Ye,Le):!1}function _isAllowedUrl(Be,Le){if(!(Le!=null&&Le.length))return!0;const Ye=_getEventFilterUrl(Be);return Ye?stringMatchesSomePattern(Ye,Le):!0}function _getLastValidUrl(Be=[]){for(let Le=Be.length-1;Le>=0;Le--){const Ye=Be[Le];if(Ye&&Ye.filename!=="<anonymous>"&&Ye.filename!=="[native code]")return Ye.filename||null}return null}function _getEventFilterUrl(Be){var Le,Ye;try{const tt=[...((Le=Be.exception)==null?void 0:Le.values)??[]].reverse().find(ft=>{var ht,gt,At;return((ht=ft.mechanism)==null?void 0:ht.parent_id)===void 0&&((At=(gt=ft.stacktrace)==null?void 0:gt.frames)==null?void 0:At.length)}),nt=(Ye=tt==null?void 0:tt.stacktrace)==null?void 0:Ye.frames;return nt?_getLastValidUrl(nt):null}catch{return DEBUG_BUILD$2&&debug.error(`Cannot extract url for event ${getEventDescription(Be)}`),null}}function _isUselessError(Be){var Le,Ye;return(Ye=(Le=Be.exception)==null?void 0:Le.values)!=null&&Ye.length?!Be.message&&!Be.exception.values.some(tt=>tt.stacktrace||tt.type&&tt.type!=="Error"||tt.value):!1}function applyAggregateErrorsToEvent(Be,Le,Ye,tt,nt,ft){var gt;if(!((gt=nt.exception)!=null&>.values)||!ft||!isInstanceOf(ft.originalException,Error))return;const ht=nt.exception.values.length>0?nt.exception.values[nt.exception.values.length-1]:void 0;ht&&(nt.exception.values=aggregateExceptionsFromError(Be,Le,tt,ft.originalException,Ye,nt.exception.values,ht,0))}function aggregateExceptionsFromError(Be,Le,Ye,tt,nt,ft,ht,gt){if(ft.length>=Ye+1)return ft;let At=[...ft];if(isInstanceOf(tt[nt],Error)){applyExceptionGroupFieldsForParentException(ht,gt);const xt=Be(Le,tt[nt]),Et=At.length;applyExceptionGroupFieldsForChildException(xt,nt,Et,gt),At=aggregateExceptionsFromError(Be,Le,Ye,tt[nt],nt,[xt,...At],xt,Et)}return Array.isArray(tt.errors)&&tt.errors.forEach((xt,Et)=>{if(isInstanceOf(xt,Error)){applyExceptionGroupFieldsForParentException(ht,gt);const kt=Be(Le,xt),Ct=At.length;applyExceptionGroupFieldsForChildException(kt,`errors[${Et}]`,Ct,gt),At=aggregateExceptionsFromError(Be,Le,Ye,xt,nt,[kt,...At],kt,Ct)}}),At}function applyExceptionGroupFieldsForParentException(Be,Le){Be.mechanism={handled:!0,type:"auto.core.linked_errors",...Be.mechanism,...Be.type==="AggregateError"&&{is_exception_group:!0},exception_id:Le}}function applyExceptionGroupFieldsForChildException(Be,Le,Ye,tt){Be.mechanism={handled:!0,...Be.mechanism,type:"chained",source:Le,exception_id:Ye,parent_id:tt}}function addConsoleInstrumentationHandler(Be){const Le="console";addHandler(Le,Be),maybeInstrument(Le,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach(function(Be){Be in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,Be,function(Le){return originalConsoleMethods[Be]=Le,function(...Ye){triggerHandlers("console",{args:Ye,level:Be});const nt=originalConsoleMethods[Be];nt==null||nt.apply(GLOBAL_OBJ.console,Ye)}})})}function severityLevelFromString(Be){return Be==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(Be)?Be:"log"}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let Be;return{name:INTEGRATION_NAME$4,processEvent(Le){if(Le.type)return Le;try{if(_shouldDropEvent(Le,Be))return DEBUG_BUILD$2&&debug.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return Be=Le}}},dedupeIntegration=_dedupeIntegration;function _shouldDropEvent(Be,Le){return Le?!!(_isSameMessageEvent(Be,Le)||_isSameExceptionEvent(Be,Le)):!1}function _isSameMessageEvent(Be,Le){const Ye=Be.message,tt=Le.message;return!(!Ye&&!tt||Ye&&!tt||!Ye&&tt||Ye!==tt||!_isSameFingerprint(Be,Le)||!_isSameStacktrace(Be,Le))}function _isSameExceptionEvent(Be,Le){const Ye=_getExceptionFromEvent(Le),tt=_getExceptionFromEvent(Be);return!(!Ye||!tt||Ye.type!==tt.type||Ye.value!==tt.value||!_isSameFingerprint(Be,Le)||!_isSameStacktrace(Be,Le))}function _isSameStacktrace(Be,Le){let Ye=getFramesFromEvent(Be),tt=getFramesFromEvent(Le);if(!Ye&&!tt)return!0;if(Ye&&!tt||!Ye&&tt||(Ye=Ye,tt=tt,tt.length!==Ye.length))return!1;for(let nt=0;nt<tt.length;nt++){const ft=tt[nt],ht=Ye[nt];if(ft.filename!==ht.filename||ft.lineno!==ht.lineno||ft.colno!==ht.colno||ft.function!==ht.function)return!1}return!0}function _isSameFingerprint(Be,Le){let Ye=Be.fingerprint,tt=Le.fingerprint;if(!Ye&&!tt)return!0;if(Ye&&!tt||!Ye&&tt)return!1;Ye=Ye,tt=tt;try{return Ye.join("")===tt.join("")}catch{return!1}}function _getExceptionFromEvent(Be){var Le,Ye;return(Ye=(Le=Be.exception)==null?void 0:Le.values)==null?void 0:Ye[0]}function getBreadcrumbLogLevelFromHttpStatusCode(Be){if(Be!==void 0)return Be>=400&&Be<500?"warning":Be>=500?"error":void 0}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){return"history"in WINDOW$2&&!!WINDOW$2.history}function _isFetchSupported(){if(!("fetch"in WINDOW$2))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function isNativeFunction(Be){return Be&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(Be.toString())}function supportsNativeFetch(){var Ye;if(typeof EdgeRuntime=="string")return!0;if(!_isFetchSupported())return!1;if(isNativeFunction(WINDOW$2.fetch))return!0;let Be=!1;const Le=WINDOW$2.document;if(Le&&typeof Le.createElement=="function")try{const tt=Le.createElement("iframe");tt.hidden=!0,Le.head.appendChild(tt),(Ye=tt.contentWindow)!=null&&Ye.fetch&&(Be=isNativeFunction(tt.contentWindow.fetch)),Le.head.removeChild(tt)}catch(tt){DEBUG_BUILD$2&&debug.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",tt)}return Be}function addFetchInstrumentationHandler(Be,Le){const Ye="fetch";addHandler(Ye,Be),maybeInstrument(Ye,()=>instrumentFetch(void 0,Le))}function instrumentFetch(Be,Le=!1){Le&&!supportsNativeFetch()||fill(GLOBAL_OBJ,"fetch",function(Ye){return function(...tt){const nt=new Error,{method:ft,url:ht}=parseFetchArgs(tt),gt={args:tt,fetchData:{method:ft,url:ht},startTimestamp:timestampInSeconds()*1e3,virtualError:nt,headers:getHeadersFromFetchArgs(tt)};return triggerHandlers("fetch",{...gt}),Ye.apply(GLOBAL_OBJ,tt).then(async At=>(triggerHandlers("fetch",{...gt,endTimestamp:timestampInSeconds()*1e3,response:At}),At),At=>{if(triggerHandlers("fetch",{...gt,endTimestamp:timestampInSeconds()*1e3,error:At}),isError(At)&&At.stack===void 0&&(At.stack=nt.stack,addNonEnumerableProperty(At,"framesToPop",1)),At instanceof TypeError&&(At.message==="Failed to fetch"||At.message==="Load failed"||At.message==="NetworkError when attempting to fetch resource."))try{const xt=new URL(gt.fetchData.url);At.message=`${At.message} (${xt.host})`}catch{}throw At})}})}function hasProp(Be,Le){return!!Be&&typeof Be=="object"&&!!Be[Le]}function getUrlFromResource(Be){return typeof Be=="string"?Be:Be?hasProp(Be,"url")?Be.url:Be.toString?Be.toString():"":""}function parseFetchArgs(Be){if(Be.length===0)return{method:"GET",url:""};if(Be.length===2){const[Ye,tt]=Be;return{url:getUrlFromResource(Ye),method:hasProp(tt,"method")?String(tt.method).toUpperCase():"GET"}}const Le=Be[0];return{url:getUrlFromResource(Le),method:hasProp(Le,"method")?String(Le.method).toUpperCase():"GET"}}function getHeadersFromFetchArgs(Be){const[Le,Ye]=Be;try{if(typeof Ye=="object"&&Ye!==null&&"headers"in Ye&&Ye.headers)return new Headers(Ye.headers);if(isRequest(Le))return new Headers(Le.headers)}catch{}}function getSDKSource(){return"npm"}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout(()=>{ignoreOnError--})}function wrap(Be,Le={}){function Ye(nt){return typeof nt=="function"}if(!Ye(Be))return Be;try{const nt=Be.__sentry_wrapped__;if(nt)return typeof nt=="function"?nt:Be;if(getOriginalFunction(Be))return Be}catch{return Be}const tt=function(...nt){try{const ft=nt.map(ht=>wrap(ht,Le));return Be.apply(this,ft)}catch(ft){throw ignoreNextOnError(),withScope(ht=>{ht.addEventProcessor(gt=>(Le.mechanism&&(addExceptionTypeValue(gt,void 0),addExceptionMechanism(gt,Le.mechanism)),gt.extra={...gt.extra,arguments:nt},gt)),captureException(ft)}),ft}};try{for(const nt in Be)Object.prototype.hasOwnProperty.call(Be,nt)&&(tt[nt]=Be[nt])}catch{}markFunctionWrapped(tt,Be),addNonEnumerableProperty(Be,"__sentry_wrapped__",tt);try{Object.getOwnPropertyDescriptor(tt,"name").configurable&&Object.defineProperty(tt,"name",{get(){return Be.name}})}catch{}return tt}function getHttpRequestData(){const Be=getLocationHref(),{referrer:Le}=WINDOW$1.document||{},{userAgent:Ye}=WINDOW$1.navigator||{},tt={...Le&&{Referer:Le},...Ye&&{"User-Agent":Ye}};return{url:Be,headers:tt}}function exceptionFromError(Be,Le){const Ye=parseStackFrames(Be,Le),tt={type:extractType(Le),value:extractMessage(Le)};return Ye.length&&(tt.stacktrace={frames:Ye}),tt.type===void 0&&tt.value===""&&(tt.value="Unrecoverable error caught"),tt}function eventFromPlainObject(Be,Le,Ye,tt){const nt=getClient(),ft=nt==null?void 0:nt.getOptions().normalizeDepth,ht=getErrorPropertyFromObject(Le),gt={__serialized__:normalizeToSize(Le,ft)};if(ht)return{exception:{values:[exceptionFromError(Be,ht)]},extra:gt};const At={exception:{values:[{type:isEvent(Le)?Le.constructor.name:tt?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(Le,{isUnhandledRejection:tt})}]},extra:gt};if(Ye){const xt=parseStackFrames(Be,Ye);xt.length&&(At.exception.values[0].stacktrace={frames:xt})}return At}function eventFromError(Be,Le){return{exception:{values:[exceptionFromError(Be,Le)]}}}function parseStackFrames(Be,Le){const Ye=Le.stacktrace||Le.stack||"",tt=getSkipFirstStackStringLines(Le),nt=getPopFirstTopFrames(Le);try{return Be(Ye,tt,nt)}catch{}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(Be){return Be&&reactMinifiedRegexp.test(Be.message)?1:0}function getPopFirstTopFrames(Be){return typeof Be.framesToPop=="number"?Be.framesToPop:0}function isWebAssemblyException(Be){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?Be instanceof WebAssembly.Exception:!1}function extractType(Be){const Le=Be==null?void 0:Be.name;return!Le&&isWebAssemblyException(Be)?Be.message&&Array.isArray(Be.message)&&Be.message.length==2?Be.message[0]:"WebAssembly.Exception":Le}function extractMessage(Be){const Le=Be==null?void 0:Be.message;return isWebAssemblyException(Be)?Array.isArray(Be.message)&&Be.message.length==2?Be.message[1]:"wasm exception":Le?Le.error&&typeof Le.error.message=="string"?Le.error.message:Le:"No error message"}function eventFromException(Be,Le,Ye,tt){const nt=(Ye==null?void 0:Ye.syntheticException)||void 0,ft=eventFromUnknownInput(Be,Le,nt,tt);return addExceptionMechanism(ft),ft.level="error",Ye!=null&&Ye.event_id&&(ft.event_id=Ye.event_id),resolvedSyncPromise(ft)}function eventFromMessage(Be,Le,Ye="info",tt,nt){const ft=(tt==null?void 0:tt.syntheticException)||void 0,ht=eventFromString(Be,Le,ft,nt);return ht.level=Ye,tt!=null&&tt.event_id&&(ht.event_id=tt.event_id),resolvedSyncPromise(ht)}function eventFromUnknownInput(Be,Le,Ye,tt,nt){let ft;if(isErrorEvent$1(Le)&&Le.error)return eventFromError(Be,Le.error);if(isDOMError(Le)||isDOMException(Le)){const ht=Le;if("stack"in Le)ft=eventFromError(Be,Le);else{const gt=ht.name||(isDOMError(ht)?"DOMError":"DOMException"),At=ht.message?`${gt}: ${ht.message}`:gt;ft=eventFromString(Be,At,Ye,tt),addExceptionTypeValue(ft,At)}return"code"in ht&&(ft.tags={...ft.tags,"DOMException.code":`${ht.code}`}),ft}return isError(Le)?eventFromError(Be,Le):isPlainObject(Le)||isEvent(Le)?(ft=eventFromPlainObject(Be,Le,Ye,nt),addExceptionMechanism(ft,{synthetic:!0}),ft):(ft=eventFromString(Be,Le,Ye,tt),addExceptionTypeValue(ft,`${Le}`),addExceptionMechanism(ft,{synthetic:!0}),ft)}function eventFromString(Be,Le,Ye,tt){const nt={};if(tt&&Ye){const ft=parseStackFrames(Be,Ye);ft.length&&(nt.exception={values:[{value:Le,stacktrace:{frames:ft}}]}),addExceptionMechanism(nt,{synthetic:!0})}if(isParameterizedString(Le)){const{__sentry_template_string__:ft,__sentry_template_values__:ht}=Le;return nt.logentry={message:ft,params:ht},nt}return nt.message=Le,nt}function getNonErrorObjectExceptionValue(Be,{isUnhandledRejection:Le}){const Ye=extractExceptionKeysForMessage(Be),tt=Le?"promise rejection":"exception";return isErrorEvent$1(Be)?`Event \`ErrorEvent\` captured as ${tt} with message \`${Be.message}\``:isEvent(Be)?`Event \`${getObjectClassName(Be)}\` (type=${Be.type}) captured as ${tt}`:`Object captured as ${tt} with keys: ${Ye}`}function getObjectClassName(Be){try{const Le=Object.getPrototypeOf(Be);return Le?Le.constructor.name:void 0}catch{}}function getErrorPropertyFromObject(Be){for(const Le in Be)if(Object.prototype.hasOwnProperty.call(Be,Le)){const Ye=Be[Le];if(Ye instanceof Error)return Ye}}class BrowserClient extends Client{constructor(Le){var Et;const Ye=applyDefaultOptions(Le),tt=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();applySdkMetadata(Ye,"browser",["browser"],tt),(Et=Ye._metadata)!=null&&Et.sdk&&(Ye._metadata.sdk.settings={infer_ip:Ye.sendDefaultPii?"auto":"never",...Ye._metadata.sdk.settings}),super(Ye);const{sendDefaultPii:nt,sendClientReports:ft,enableLogs:ht,_experiments:gt,enableMetrics:At}=this._options,xt=At??(gt==null?void 0:gt.enableMetrics)??!0;WINDOW$1.document&&(ft||ht||xt)&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&(ft&&this._flushOutcomes(),ht&&_INTERNAL_flushLogsBuffer(this),xt&&_INTERNAL_flushMetricsBuffer(this))}),nt&&this.on("beforeSendSession",addAutoIpAddressToSession)}eventFromException(Le,Ye){return eventFromException(this._options.stackParser,Le,Ye,this._options.attachStacktrace)}eventFromMessage(Le,Ye="info",tt){return eventFromMessage(this._options.stackParser,Le,Ye,tt,this._options.attachStacktrace)}_prepareEvent(Le,Ye,tt,nt){return Le.platform=Le.platform||"javascript",super._prepareEvent(Le,Ye,tt,nt)}}function applyDefaultOptions(Be){var Le;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(Le=WINDOW$1.SENTRY_RELEASE)==null?void 0:Le.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...Be}}const DEBUG_BUILD$1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId;function addClickKeypressInstrumentationHandler(Be){const Le="dom";addHandler(Le,Be),maybeInstrument(Le,instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const Be=triggerHandlers.bind(null,"dom"),Le=makeDOMEventHandler(Be,!0);WINDOW.document.addEventListener("click",Le,!1),WINDOW.document.addEventListener("keypress",Le,!1),["EventTarget","Node"].forEach(Ye=>{var ft,ht;const nt=(ft=WINDOW[Ye])==null?void 0:ft.prototype;(ht=nt==null?void 0:nt.hasOwnProperty)!=null&&ht.call(nt,"addEventListener")&&(fill(nt,"addEventListener",function(gt){return function(At,xt,Et){if(At==="click"||At=="keypress")try{const kt=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},Ct=kt[At]=kt[At]||{refCount:0};if(!Ct.handler){const yt=makeDOMEventHandler(Be);Ct.handler=yt,gt.call(this,At,yt,Et)}Ct.refCount++}catch{}return gt.call(this,At,xt,Et)}}),fill(nt,"removeEventListener",function(gt){return function(At,xt,Et){if(At==="click"||At=="keypress")try{const kt=this.__sentry_instrumentation_handlers__||{},Ct=kt[At];Ct&&(Ct.refCount--,Ct.refCount<=0&&(gt.call(this,At,Ct.handler,Et),Ct.handler=void 0,delete kt[At]),Object.keys(kt).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return gt.call(this,At,xt,Et)}}))})}function isSimilarToLastCapturedEvent(Be){if(Be.type!==lastCapturedEventType)return!1;try{if(!Be.target||Be.target._sentryId!==lastCapturedEventTargetId)return!1}catch{}return!0}function shouldSkipDOMEvent(Be,Le){return Be!=="keypress"?!1:Le!=null&&Le.tagName?!(Le.tagName==="INPUT"||Le.tagName==="TEXTAREA"||Le.isContentEditable):!0}function makeDOMEventHandler(Be,Le=!1){return Ye=>{if(!Ye||Ye._sentryCaptured)return;const tt=getEventTarget(Ye);if(shouldSkipDOMEvent(Ye.type,tt))return;addNonEnumerableProperty(Ye,"_sentryCaptured",!0),tt&&!tt._sentryId&&addNonEnumerableProperty(tt,"_sentryId",uuid4());const nt=Ye.type==="keypress"?"input":Ye.type;isSimilarToLastCapturedEvent(Ye)||(Be({event:Ye,name:nt,global:Le}),lastCapturedEventType=Ye.type,lastCapturedEventTargetId=tt?tt._sentryId:void 0),clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout(()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0},DEBOUNCE_DURATION)}}function getEventTarget(Be){try{return Be.target}catch{return null}}let lastHref;function addHistoryInstrumentationHandler(Be){const Le="history";addHandler(Le,Be),maybeInstrument(Le,instrumentHistory)}function instrumentHistory(){if(WINDOW.addEventListener("popstate",()=>{const Le=WINDOW.location.href,Ye=lastHref;if(lastHref=Le,Ye===Le)return;triggerHandlers("history",{from:Ye,to:Le})}),!supportsHistory())return;function Be(Le){return function(...Ye){const tt=Ye.length>2?Ye[2]:void 0;if(tt){const nt=lastHref,ft=getAbsoluteUrl(String(tt));if(lastHref=ft,nt===ft)return Le.apply(this,Ye);triggerHandlers("history",{from:nt,to:ft})}return Le.apply(this,Ye)}}fill(WINDOW.history,"pushState",Be),fill(WINDOW.history,"replaceState",Be)}function getAbsoluteUrl(Be){try{return new URL(Be,WINDOW.location.origin).toString()}catch{return Be}}const cachedImplementations={};function getNativeImplementation(Be){const Le=cachedImplementations[Be];if(Le)return Le;let Ye=WINDOW[Be];if(isNativeFunction(Ye))return cachedImplementations[Be]=Ye.bind(WINDOW);const tt=WINDOW.document;if(tt&&typeof tt.createElement=="function")try{const nt=tt.createElement("iframe");nt.hidden=!0,tt.head.appendChild(nt);const ft=nt.contentWindow;ft!=null&&ft[Be]&&(Ye=ft[Be]),tt.head.removeChild(nt)}catch(nt){DEBUG_BUILD$1&&debug.warn(`Could not create sandbox iframe for ${Be} check, bailing to window.${Be}: `,nt)}return Ye&&(cachedImplementations[Be]=Ye.bind(WINDOW))}function clearCachedImplementation(Be){cachedImplementations[Be]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(Be){const Le="xhr";addHandler(Le,Be),maybeInstrument(Le,instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const Be=XMLHttpRequest.prototype;Be.open=new Proxy(Be.open,{apply(Le,Ye,tt){const nt=new Error,ft=timestampInSeconds()*1e3,ht=isString(tt[0])?tt[0].toUpperCase():void 0,gt=parseXhrUrlArg(tt[1]);if(!ht||!gt)return Le.apply(Ye,tt);Ye[SENTRY_XHR_DATA_KEY]={method:ht,url:gt,request_headers:{}},ht==="POST"&>.match(/sentry_key/)&&(Ye.__sentry_own_request__=!0);const At=()=>{const xt=Ye[SENTRY_XHR_DATA_KEY];if(xt&&Ye.readyState===4){try{xt.status_code=Ye.status}catch{}const Et={endTimestamp:timestampInSeconds()*1e3,startTimestamp:ft,xhr:Ye,virtualError:nt};triggerHandlers("xhr",Et)}};return"onreadystatechange"in Ye&&typeof Ye.onreadystatechange=="function"?Ye.onreadystatechange=new Proxy(Ye.onreadystatechange,{apply(xt,Et,kt){return At(),xt.apply(Et,kt)}}):Ye.addEventListener("readystatechange",At),Ye.setRequestHeader=new Proxy(Ye.setRequestHeader,{apply(xt,Et,kt){const[Ct,yt]=kt,vt=Et[SENTRY_XHR_DATA_KEY];return vt&&isString(Ct)&&isString(yt)&&(vt.request_headers[Ct.toLowerCase()]=yt),xt.apply(Et,kt)}}),Le.apply(Ye,tt)}}),Be.send=new Proxy(Be.send,{apply(Le,Ye,tt){const nt=Ye[SENTRY_XHR_DATA_KEY];if(!nt)return Le.apply(Ye,tt);tt[0]!==void 0&&(nt.body=tt[0]);const ft={startTimestamp:timestampInSeconds()*1e3,xhr:Ye};return triggerHandlers("xhr",ft),Le.apply(Ye,tt)}})}function parseXhrUrlArg(Be){if(isString(Be))return Be;try{return Be.toString()}catch{}}const DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE=40;function makeFetchTransport(Be,Le=getNativeImplementation("fetch")){let Ye=0,tt=0;async function nt(ft){const ht=ft.body.length;Ye+=ht,tt++;const gt={body:ft.body,method:"POST",referrerPolicy:"strict-origin",headers:Be.headers,keepalive:Ye<=6e4&&tt<15,...Be.fetchOptions};try{const At=await Le(Be.url,gt);return{statusCode:At.status,headers:{"x-sentry-rate-limits":At.headers.get("X-Sentry-Rate-Limits"),"retry-after":At.headers.get("Retry-After")}}}catch(At){throw clearCachedImplementation("fetch"),At}finally{Ye-=ht,tt--}}return createTransport(Be,nt,makePromiseBuffer(Be.bufferSize||DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE))}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(Be,Le,Ye,tt){const nt={filename:Be,function:Le==="<anonymous>"?UNKNOWN_FUNCTION:Le,in_app:!0};return Ye!==void 0&&(nt.lineno=Ye),tt!==void 0&&(nt.colno=tt),nt}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeDataUriRegex=/at (.+?) ?\(data:(.+?),/,chromeStackParserFn=Be=>{const Le=Be.match(chromeDataUriRegex);if(Le)return{filename:`<data:${Le[2]}>`,function:Le[1]};const Ye=chromeRegexNoFnName.exec(Be);if(Ye){const[,nt,ft,ht]=Ye;return createFrame(nt,UNKNOWN_FUNCTION,+ft,+ht)}const tt=chromeRegex.exec(Be);if(tt){if(tt[2]&&tt[2].indexOf("eval")===0){const gt=chromeEvalRegex.exec(tt[2]);gt&&(tt[2]=gt[1],tt[3]=gt[2],tt[4]=gt[3])}const[ft,ht]=extractSafariExtensionDetails(tt[1]||UNKNOWN_FUNCTION,tt[2]);return createFrame(ht,ft,tt[3]?+tt[3]:void 0,tt[4]?+tt[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=Be=>{const Le=geckoREgex.exec(Be);if(Le){if(Le[3]&&Le[3].indexOf(" > eval")>-1){const ft=geckoEvalRegex.exec(Le[3]);ft&&(Le[1]=Le[1]||"eval",Le[3]=ft[1],Le[4]=ft[2],Le[5]="")}let tt=Le[3],nt=Le[1]||UNKNOWN_FUNCTION;return[nt,tt]=extractSafariExtensionDetails(nt,tt),createFrame(tt,nt,Le[4]?+Le[4]:void 0,Le[5]?+Le[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(Be,Le)=>{const Ye=Be.indexOf("safari-extension")!==-1,tt=Be.indexOf("safari-web-extension")!==-1;return Ye||tt?[Be.indexOf("@")!==-1?Be.split("@")[0]:UNKNOWN_FUNCTION,Ye?`safari-extension:${Le}`:`safari-web-extension:${Le}`]:[Be,Le]},DEBUG_BUILD=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(Be={})=>{const Le={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...Be};return{name:INTEGRATION_NAME$3,setup(Ye){Le.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(Ye)),Le.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(Ye,Le.dom)),Le.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(Ye)),Le.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(Ye)),Le.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(Ye)),Le.sentry&&Ye.on("beforeSendEvent",_getSentryBreadcrumbHandler(Ye))}}},breadcrumbsIntegration=_breadcrumbsIntegration;function _getSentryBreadcrumbHandler(Be){return function(Ye){getClient()===Be&&addBreadcrumb({category:`sentry.${Ye.type==="transaction"?"transaction":"event"}`,event_id:Ye.event_id,level:Ye.level,message:getEventDescription(Ye)},{event:Ye})}}function _getDomBreadcrumbHandler(Be,Le){return function(tt){if(getClient()!==Be)return;let nt,ft,ht=typeof Le=="object"?Le.serializeAttribute:void 0,gt=typeof Le=="object"&&typeof Le.maxStringLength=="number"?Le.maxStringLength:void 0;gt&>>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD&&debug.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${gt} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),gt=MAX_ALLOWED_STRING_LENGTH),typeof ht=="string"&&(ht=[ht]);try{const xt=tt.event,Et=_isEvent(xt)?xt.target:xt;nt=htmlTreeAsString(Et,{keyAttrs:ht,maxStringLength:gt}),ft=getComponentName(Et)}catch{nt="<unknown>"}if(nt.length===0)return;const At={category:`ui.${tt.name}`,message:nt};ft&&(At.data={"ui.component_name":ft}),addBreadcrumb(At,{event:tt.event,name:tt.name,global:tt.global})}}function _getConsoleBreadcrumbHandler(Be){return function(Ye){if(getClient()!==Be)return;const tt={category:"console",data:{arguments:Ye.args,logger:"console"},level:severityLevelFromString(Ye.level),message:safeJoin(Ye.args," ")};if(Ye.level==="assert")if(Ye.args[0]===!1)tt.message=`Assertion failed: ${safeJoin(Ye.args.slice(1)," ")||"console.assert"}`,tt.data.arguments=Ye.args.slice(1);else return;addBreadcrumb(tt,{input:Ye.args,level:Ye.level})}}function _getXhrBreadcrumbHandler(Be){return function(Ye){if(getClient()!==Be)return;const{startTimestamp:tt,endTimestamp:nt}=Ye,ft=Ye.xhr[SENTRY_XHR_DATA_KEY];if(!tt||!nt||!ft)return;const{method:ht,url:gt,status_code:At,body:xt}=ft,Et={method:ht,url:gt,status_code:At},kt={xhr:Ye.xhr,input:xt,startTimestamp:tt,endTimestamp:nt},Ct={category:"xhr",data:Et,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(At)};Be.emit("beforeOutgoingRequestBreadcrumb",Ct,kt),addBreadcrumb(Ct,kt)}}function _getFetchBreadcrumbHandler(Be){return function(Ye){if(getClient()!==Be)return;const{startTimestamp:tt,endTimestamp:nt}=Ye;if(nt&&!(Ye.fetchData.url.match(/sentry_key/)&&Ye.fetchData.method==="POST"))if(Ye.fetchData.method,Ye.fetchData.url,Ye.error){const ft=Ye.fetchData,ht={data:Ye.error,input:Ye.args,startTimestamp:tt,endTimestamp:nt},gt={category:"fetch",data:ft,level:"error",type:"http"};Be.emit("beforeOutgoingRequestBreadcrumb",gt,ht),addBreadcrumb(gt,ht)}else{const ft=Ye.response,ht={...Ye.fetchData,status_code:ft==null?void 0:ft.status};Ye.fetchData.request_body_size,Ye.fetchData.response_body_size,ft==null||ft.status;const gt={input:Ye.args,response:ft,startTimestamp:tt,endTimestamp:nt},At={category:"fetch",data:ht,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(ht.status_code)};Be.emit("beforeOutgoingRequestBreadcrumb",At,gt),addBreadcrumb(At,gt)}}}function _getHistoryBreadcrumbHandler(Be){return function(Ye){if(getClient()!==Be)return;let tt=Ye.from,nt=Ye.to;const ft=parseUrl(WINDOW$1.location.href);let ht=tt?parseUrl(tt):void 0;const gt=parseUrl(nt);ht!=null&&ht.path||(ht=ft),ft.protocol===gt.protocol&&ft.host===gt.host&&(nt=gt.relative),ft.protocol===ht.protocol&&ft.host===ht.host&&(tt=ht.relative),addBreadcrumb({category:"navigation",data:{from:tt,to:nt}})}}function _isEvent(Be){return!!Be&&!!Be.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(Be={})=>{const Le={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...Be};return{name:INTEGRATION_NAME$2,setupOnce(){Le.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),Le.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),Le.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),Le.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const Ye=Le.eventTarget;Ye&&(Array.isArray(Ye)?Ye:DEFAULT_EVENT_TARGET).forEach(nt=>_wrapEventTarget(nt,Le))}}},browserApiErrorsIntegration=_browserApiErrorsIntegration;function _wrapTimeFunction(Be){return function(...Le){const Ye=Le[0];return Le[0]=wrap(Ye,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${getFunctionName(Be)}`}}),Be.apply(this,Le)}}function _wrapRAF(Be){return function(Le){return Be.apply(this,[wrap(Le,{mechanism:{data:{handler:getFunctionName(Be)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function _wrapXHR(Be){return function(...Le){const Ye=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(nt=>{nt in Ye&&typeof Ye[nt]=="function"&&fill(Ye,nt,function(ft){const ht={mechanism:{data:{handler:getFunctionName(ft)},handled:!1,type:`auto.browser.browserapierrors.xhr.${nt}`}},gt=getOriginalFunction(ft);return gt&&(ht.mechanism.data.handler=getFunctionName(gt)),wrap(ft,ht)})}),Be.apply(this,Le)}}function _wrapEventTarget(Be,Le){var nt,ft;const tt=(nt=WINDOW$1[Be])==null?void 0:nt.prototype;(ft=tt==null?void 0:tt.hasOwnProperty)!=null&&ft.call(tt,"addEventListener")&&(fill(tt,"addEventListener",function(ht){return function(gt,At,xt){try{isEventListenerObject(At)&&(At.handleEvent=wrap(At.handleEvent,{mechanism:{data:{handler:getFunctionName(At),target:Be},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return Le.unregisterOriginalCallbacks&&unregisterOriginalCallback(this,gt,At),ht.apply(this,[gt,wrap(At,{mechanism:{data:{handler:getFunctionName(At),target:Be},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),xt])}}),fill(tt,"removeEventListener",function(ht){return function(gt,At,xt){try{const Et=At.__sentry_wrapped__;Et&&ht.call(this,gt,Et,xt)}catch{}return ht.call(this,gt,At,xt)}}))}function isEventListenerObject(Be){return typeof Be.handleEvent=="function"}function unregisterOriginalCallback(Be,Le,Ye){Be&&typeof Be=="object"&&"removeEventListener"in Be&&typeof Be.removeEventListener=="function"&&Be.removeEventListener(Le,Ye)}const browserSessionIntegration=()=>({name:"BrowserSession",setupOnce(){if(typeof WINDOW$1.document>"u"){DEBUG_BUILD&&debug.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler(({from:Be,to:Le})=>{Be!==void 0&&Be!==Le&&(startSession({ignoreDuration:!0}),captureSession())})}}),INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(Be={})=>{const Le={onerror:!0,onunhandledrejection:!0,...Be};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(Ye){Le.onerror&&(_installGlobalOnErrorHandler(Ye),globalHandlerLog("onerror")),Le.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(Ye),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=_globalHandlersIntegration;function _installGlobalOnErrorHandler(Be){addGlobalErrorInstrumentationHandler(Le=>{const{stackParser:Ye,attachStacktrace:tt}=getOptions();if(getClient()!==Be||shouldIgnoreOnError())return;const{msg:nt,url:ft,line:ht,column:gt,error:At}=Le,xt=_enhanceEventWithInitialFrame(eventFromUnknownInput(Ye,At||nt,void 0,tt,!1),ft,ht,gt);xt.level="error",captureEvent(xt,{originalException:At,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function _installGlobalOnUnhandledRejectionHandler(Be){addGlobalUnhandledRejectionInstrumentationHandler(Le=>{const{stackParser:Ye,attachStacktrace:tt}=getOptions();if(getClient()!==Be||shouldIgnoreOnError())return;const nt=_getUnhandledRejectionError(Le),ft=isPrimitive(nt)?_eventFromRejectionWithPrimitive(nt):eventFromUnknownInput(Ye,nt,void 0,tt,!0);ft.level="error",captureEvent(ft,{originalException:nt,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function _getUnhandledRejectionError(Be){if(isPrimitive(Be))return Be;try{if("reason"in Be)return Be.reason;if("detail"in Be&&"reason"in Be.detail)return Be.detail.reason}catch{}return Be}function _eventFromRejectionWithPrimitive(Be){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(Be)}`}]}}}function _enhanceEventWithInitialFrame(Be,Le,Ye,tt){const nt=Be.exception=Be.exception||{},ft=nt.values=nt.values||[],ht=ft[0]=ft[0]||{},gt=ht.stacktrace=ht.stacktrace||{},At=gt.frames=gt.frames||[],xt=tt,Et=Ye,kt=getFilenameFromUrl(Le)??getLocationHref();return At.length===0&&At.push({colno:xt,filename:kt,function:UNKNOWN_FUNCTION,in_app:!0,lineno:Et}),Be}function globalHandlerLog(Be){DEBUG_BUILD&&debug.log(`Global Handler attached: ${Be}`)}function getOptions(){const Be=getClient();return(Be==null?void 0:Be.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function getFilenameFromUrl(Be){if(!(!isString(Be)||Be.length===0)){if(Be.startsWith("data:")){const Le=Be.match(/^data:([^;]+)/),Ye=Le?Le[1]:"text/javascript",tt=Be.includes("base64,");return`<data:${Ye}${tt?",base64":""}>`}return Be}}const httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(Be){var tt;if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const Le=getHttpRequestData(),Ye={...Le.headers,...(tt=Be.request)==null?void 0:tt.headers};Be.request={...Le,...Be.request,headers:Ye}}}),DEFAULT_KEY="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(Be={})=>{const Le=Be.limit||DEFAULT_LIMIT,Ye=Be.key||DEFAULT_KEY;return{name:INTEGRATION_NAME,preprocessEvent(tt,nt,ft){const ht=ft.getOptions();applyAggregateErrorsToEvent(exceptionFromError,ht.stackParser,Ye,Le,tt,nt)}}},linkedErrorsIntegration=_linkedErrorsIntegration;function checkAndWarnIfIsEmbeddedBrowserExtension(){return _isEmbeddedBrowserExtension()?(DEBUG_BUILD&&consoleSandbox(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function _isEmbeddedBrowserExtension(){var ft;if(typeof WINDOW$1.window>"u")return!1;const Be=WINDOW$1;if(Be.nw)return!1;const Le=Be.chrome||Be.browser;if(!((ft=Le==null?void 0:Le.runtime)!=null&&ft.id))return!1;const Ye=getLocationHref(),tt=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(WINDOW$1===WINDOW$1.top&&tt.some(ht=>Ye.startsWith(`${ht}://`)))}function getDefaultIntegrations(Be){return[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration(),browserSessionIntegration()]}function init(Be={}){const Le=!Be.skipBrowserExtensionCheck&&checkAndWarnIfIsEmbeddedBrowserExtension();let Ye=Be.defaultIntegrations==null?getDefaultIntegrations():Be.defaultIntegrations;const tt={...Be,enabled:Le?!1:Be.enabled,stackParser:stackParserFromStackParserOptions(Be.stackParser||defaultStackParser),integrations:getIntegrationsToSetup({integrations:Be.integrations,defaultIntegrations:Ye}),transport:Be.transport||makeFetchTransport};return initAndBind(BrowserClient,tt)}const DEPRECATION_PERIOD_MONTHS=12,SDK_RELEASE_DATE="2026-08-20",DEPRECATED_SDK_WARNING_MESSAGE="You are using a deprecated SDK version. Please upgrade to the latest version to avoid any disruption.";let hasWarned=!1;const parseReleaseDate=Be=>{const Le=/^(\d{4})-(\d{2})-(\d{2})$/.exec(Be);if(!Le)return null;const Ye=Number(Le[1]),tt=Number(Le[2])-1,nt=Number(Le[3]),ft=new Date(Date.UTC(Ye,tt,nt));return ft.getUTCFullYear()!==Ye||ft.getUTCMonth()!==tt||ft.getUTCDate()!==nt?null:ft},isSdkDeprecated=(Be,Le=new Date)=>{const Ye=parseReleaseDate(Be);if(!Ye)return!1;const tt=new Date(Date.UTC(Ye.getUTCFullYear(),Ye.getUTCMonth()+DEPRECATION_PERIOD_MONTHS,Ye.getUTCDate()));return Le.getTime()>=tt.getTime()},warnIfSdkDeprecated=(Be=SDK_RELEASE_DATE,Le=new Date)=>{hasWarned||!isSdkDeprecated(Be,Le)||(hasWarned=!0,console.warn(DEPRECATED_SDK_WARNING_MESSAGE))};function setupFiles(){const Be={pollingIntervalSeconds:.25,maxMillisBeforeAckWhenClosed:100,moreAnnoyingDebuggerStatements:1,onDetectOpen:()=>{var xt;addDeviceStats((xt=state.token)==null?void 0:xt.token,{inspectorOpened:!0}),MlWasmJSApi$1.setInspectorOpened(!0)},onDetectClose:void 0,startup:"asap",onCheckOpennessWhilePaused:"throw"};Object.seal(Be);const Le=new Worker(URL.createObjectURL(new Blob([`"use strict";
|
|
10490
|
+
Url: ${_getEventFilterUrl(Be)}`),!0}return!1}function _isIgnoredError(Be,Le){return Le!=null&&Le.length?getPossibleEventMessages(Be).some(Ye=>stringMatchesSomePattern(Ye,Le)):!1}function _isIgnoredTransaction(Be,Le){if(!(Le!=null&&Le.length))return!1;const Ye=Be.transaction;return Ye?stringMatchesSomePattern(Ye,Le):!1}function _isDeniedUrl(Be,Le){if(!(Le!=null&&Le.length))return!1;const Ye=_getEventFilterUrl(Be);return Ye?stringMatchesSomePattern(Ye,Le):!1}function _isAllowedUrl(Be,Le){if(!(Le!=null&&Le.length))return!0;const Ye=_getEventFilterUrl(Be);return Ye?stringMatchesSomePattern(Ye,Le):!0}function _getLastValidUrl(Be=[]){for(let Le=Be.length-1;Le>=0;Le--){const Ye=Be[Le];if(Ye&&Ye.filename!=="<anonymous>"&&Ye.filename!=="[native code]")return Ye.filename||null}return null}function _getEventFilterUrl(Be){var Le,Ye;try{const tt=[...((Le=Be.exception)==null?void 0:Le.values)??[]].reverse().find(ft=>{var ht,gt,At;return((ht=ft.mechanism)==null?void 0:ht.parent_id)===void 0&&((At=(gt=ft.stacktrace)==null?void 0:gt.frames)==null?void 0:At.length)}),nt=(Ye=tt==null?void 0:tt.stacktrace)==null?void 0:Ye.frames;return nt?_getLastValidUrl(nt):null}catch{return DEBUG_BUILD$2&&debug.error(`Cannot extract url for event ${getEventDescription(Be)}`),null}}function _isUselessError(Be){var Le,Ye;return(Ye=(Le=Be.exception)==null?void 0:Le.values)!=null&&Ye.length?!Be.message&&!Be.exception.values.some(tt=>tt.stacktrace||tt.type&&tt.type!=="Error"||tt.value):!1}function applyAggregateErrorsToEvent(Be,Le,Ye,tt,nt,ft){var gt;if(!((gt=nt.exception)!=null&>.values)||!ft||!isInstanceOf(ft.originalException,Error))return;const ht=nt.exception.values.length>0?nt.exception.values[nt.exception.values.length-1]:void 0;ht&&(nt.exception.values=aggregateExceptionsFromError(Be,Le,tt,ft.originalException,Ye,nt.exception.values,ht,0))}function aggregateExceptionsFromError(Be,Le,Ye,tt,nt,ft,ht,gt){if(ft.length>=Ye+1)return ft;let At=[...ft];if(isInstanceOf(tt[nt],Error)){applyExceptionGroupFieldsForParentException(ht,gt);const xt=Be(Le,tt[nt]),Et=At.length;applyExceptionGroupFieldsForChildException(xt,nt,Et,gt),At=aggregateExceptionsFromError(Be,Le,Ye,tt[nt],nt,[xt,...At],xt,Et)}return Array.isArray(tt.errors)&&tt.errors.forEach((xt,Et)=>{if(isInstanceOf(xt,Error)){applyExceptionGroupFieldsForParentException(ht,gt);const kt=Be(Le,xt),Ct=At.length;applyExceptionGroupFieldsForChildException(kt,`errors[${Et}]`,Ct,gt),At=aggregateExceptionsFromError(Be,Le,Ye,xt,nt,[kt,...At],kt,Ct)}}),At}function applyExceptionGroupFieldsForParentException(Be,Le){Be.mechanism={handled:!0,type:"auto.core.linked_errors",...Be.mechanism,...Be.type==="AggregateError"&&{is_exception_group:!0},exception_id:Le}}function applyExceptionGroupFieldsForChildException(Be,Le,Ye,tt){Be.mechanism={handled:!0,...Be.mechanism,type:"chained",source:Le,exception_id:Ye,parent_id:tt}}function addConsoleInstrumentationHandler(Be){const Le="console";addHandler(Le,Be),maybeInstrument(Le,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach(function(Be){Be in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,Be,function(Le){return originalConsoleMethods[Be]=Le,function(...Ye){triggerHandlers("console",{args:Ye,level:Be});const nt=originalConsoleMethods[Be];nt==null||nt.apply(GLOBAL_OBJ.console,Ye)}})})}function severityLevelFromString(Be){return Be==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(Be)?Be:"log"}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let Be;return{name:INTEGRATION_NAME$4,processEvent(Le){if(Le.type)return Le;try{if(_shouldDropEvent(Le,Be))return DEBUG_BUILD$2&&debug.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return Be=Le}}},dedupeIntegration=_dedupeIntegration;function _shouldDropEvent(Be,Le){return Le?!!(_isSameMessageEvent(Be,Le)||_isSameExceptionEvent(Be,Le)):!1}function _isSameMessageEvent(Be,Le){const Ye=Be.message,tt=Le.message;return!(!Ye&&!tt||Ye&&!tt||!Ye&&tt||Ye!==tt||!_isSameFingerprint(Be,Le)||!_isSameStacktrace(Be,Le))}function _isSameExceptionEvent(Be,Le){const Ye=_getExceptionFromEvent(Le),tt=_getExceptionFromEvent(Be);return!(!Ye||!tt||Ye.type!==tt.type||Ye.value!==tt.value||!_isSameFingerprint(Be,Le)||!_isSameStacktrace(Be,Le))}function _isSameStacktrace(Be,Le){let Ye=getFramesFromEvent(Be),tt=getFramesFromEvent(Le);if(!Ye&&!tt)return!0;if(Ye&&!tt||!Ye&&tt||(Ye=Ye,tt=tt,tt.length!==Ye.length))return!1;for(let nt=0;nt<tt.length;nt++){const ft=tt[nt],ht=Ye[nt];if(ft.filename!==ht.filename||ft.lineno!==ht.lineno||ft.colno!==ht.colno||ft.function!==ht.function)return!1}return!0}function _isSameFingerprint(Be,Le){let Ye=Be.fingerprint,tt=Le.fingerprint;if(!Ye&&!tt)return!0;if(Ye&&!tt||!Ye&&tt)return!1;Ye=Ye,tt=tt;try{return Ye.join("")===tt.join("")}catch{return!1}}function _getExceptionFromEvent(Be){var Le,Ye;return(Ye=(Le=Be.exception)==null?void 0:Le.values)==null?void 0:Ye[0]}function getBreadcrumbLogLevelFromHttpStatusCode(Be){if(Be!==void 0)return Be>=400&&Be<500?"warning":Be>=500?"error":void 0}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){return"history"in WINDOW$2&&!!WINDOW$2.history}function _isFetchSupported(){if(!("fetch"in WINDOW$2))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function isNativeFunction(Be){return Be&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(Be.toString())}function supportsNativeFetch(){var Ye;if(typeof EdgeRuntime=="string")return!0;if(!_isFetchSupported())return!1;if(isNativeFunction(WINDOW$2.fetch))return!0;let Be=!1;const Le=WINDOW$2.document;if(Le&&typeof Le.createElement=="function")try{const tt=Le.createElement("iframe");tt.hidden=!0,Le.head.appendChild(tt),(Ye=tt.contentWindow)!=null&&Ye.fetch&&(Be=isNativeFunction(tt.contentWindow.fetch)),Le.head.removeChild(tt)}catch(tt){DEBUG_BUILD$2&&debug.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",tt)}return Be}function addFetchInstrumentationHandler(Be,Le){const Ye="fetch";addHandler(Ye,Be),maybeInstrument(Ye,()=>instrumentFetch(void 0,Le))}function instrumentFetch(Be,Le=!1){Le&&!supportsNativeFetch()||fill(GLOBAL_OBJ,"fetch",function(Ye){return function(...tt){const nt=new Error,{method:ft,url:ht}=parseFetchArgs(tt),gt={args:tt,fetchData:{method:ft,url:ht},startTimestamp:timestampInSeconds()*1e3,virtualError:nt,headers:getHeadersFromFetchArgs(tt)};return triggerHandlers("fetch",{...gt}),Ye.apply(GLOBAL_OBJ,tt).then(async At=>(triggerHandlers("fetch",{...gt,endTimestamp:timestampInSeconds()*1e3,response:At}),At),At=>{if(triggerHandlers("fetch",{...gt,endTimestamp:timestampInSeconds()*1e3,error:At}),isError(At)&&At.stack===void 0&&(At.stack=nt.stack,addNonEnumerableProperty(At,"framesToPop",1)),At instanceof TypeError&&(At.message==="Failed to fetch"||At.message==="Load failed"||At.message==="NetworkError when attempting to fetch resource."))try{const xt=new URL(gt.fetchData.url);At.message=`${At.message} (${xt.host})`}catch{}throw At})}})}function hasProp(Be,Le){return!!Be&&typeof Be=="object"&&!!Be[Le]}function getUrlFromResource(Be){return typeof Be=="string"?Be:Be?hasProp(Be,"url")?Be.url:Be.toString?Be.toString():"":""}function parseFetchArgs(Be){if(Be.length===0)return{method:"GET",url:""};if(Be.length===2){const[Ye,tt]=Be;return{url:getUrlFromResource(Ye),method:hasProp(tt,"method")?String(tt.method).toUpperCase():"GET"}}const Le=Be[0];return{url:getUrlFromResource(Le),method:hasProp(Le,"method")?String(Le.method).toUpperCase():"GET"}}function getHeadersFromFetchArgs(Be){const[Le,Ye]=Be;try{if(typeof Ye=="object"&&Ye!==null&&"headers"in Ye&&Ye.headers)return new Headers(Ye.headers);if(isRequest(Le))return new Headers(Le.headers)}catch{}}function getSDKSource(){return"npm"}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout(()=>{ignoreOnError--})}function wrap(Be,Le={}){function Ye(nt){return typeof nt=="function"}if(!Ye(Be))return Be;try{const nt=Be.__sentry_wrapped__;if(nt)return typeof nt=="function"?nt:Be;if(getOriginalFunction(Be))return Be}catch{return Be}const tt=function(...nt){try{const ft=nt.map(ht=>wrap(ht,Le));return Be.apply(this,ft)}catch(ft){throw ignoreNextOnError(),withScope(ht=>{ht.addEventProcessor(gt=>(Le.mechanism&&(addExceptionTypeValue(gt,void 0),addExceptionMechanism(gt,Le.mechanism)),gt.extra={...gt.extra,arguments:nt},gt)),captureException(ft)}),ft}};try{for(const nt in Be)Object.prototype.hasOwnProperty.call(Be,nt)&&(tt[nt]=Be[nt])}catch{}markFunctionWrapped(tt,Be),addNonEnumerableProperty(Be,"__sentry_wrapped__",tt);try{Object.getOwnPropertyDescriptor(tt,"name").configurable&&Object.defineProperty(tt,"name",{get(){return Be.name}})}catch{}return tt}function getHttpRequestData(){const Be=getLocationHref(),{referrer:Le}=WINDOW$1.document||{},{userAgent:Ye}=WINDOW$1.navigator||{},tt={...Le&&{Referer:Le},...Ye&&{"User-Agent":Ye}};return{url:Be,headers:tt}}function exceptionFromError(Be,Le){const Ye=parseStackFrames(Be,Le),tt={type:extractType(Le),value:extractMessage(Le)};return Ye.length&&(tt.stacktrace={frames:Ye}),tt.type===void 0&&tt.value===""&&(tt.value="Unrecoverable error caught"),tt}function eventFromPlainObject(Be,Le,Ye,tt){const nt=getClient(),ft=nt==null?void 0:nt.getOptions().normalizeDepth,ht=getErrorPropertyFromObject(Le),gt={__serialized__:normalizeToSize(Le,ft)};if(ht)return{exception:{values:[exceptionFromError(Be,ht)]},extra:gt};const At={exception:{values:[{type:isEvent(Le)?Le.constructor.name:tt?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(Le,{isUnhandledRejection:tt})}]},extra:gt};if(Ye){const xt=parseStackFrames(Be,Ye);xt.length&&(At.exception.values[0].stacktrace={frames:xt})}return At}function eventFromError(Be,Le){return{exception:{values:[exceptionFromError(Be,Le)]}}}function parseStackFrames(Be,Le){const Ye=Le.stacktrace||Le.stack||"",tt=getSkipFirstStackStringLines(Le),nt=getPopFirstTopFrames(Le);try{return Be(Ye,tt,nt)}catch{}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(Be){return Be&&reactMinifiedRegexp.test(Be.message)?1:0}function getPopFirstTopFrames(Be){return typeof Be.framesToPop=="number"?Be.framesToPop:0}function isWebAssemblyException(Be){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?Be instanceof WebAssembly.Exception:!1}function extractType(Be){const Le=Be==null?void 0:Be.name;return!Le&&isWebAssemblyException(Be)?Be.message&&Array.isArray(Be.message)&&Be.message.length==2?Be.message[0]:"WebAssembly.Exception":Le}function extractMessage(Be){const Le=Be==null?void 0:Be.message;return isWebAssemblyException(Be)?Array.isArray(Be.message)&&Be.message.length==2?Be.message[1]:"wasm exception":Le?Le.error&&typeof Le.error.message=="string"?Le.error.message:Le:"No error message"}function eventFromException(Be,Le,Ye,tt){const nt=(Ye==null?void 0:Ye.syntheticException)||void 0,ft=eventFromUnknownInput(Be,Le,nt,tt);return addExceptionMechanism(ft),ft.level="error",Ye!=null&&Ye.event_id&&(ft.event_id=Ye.event_id),resolvedSyncPromise(ft)}function eventFromMessage(Be,Le,Ye="info",tt,nt){const ft=(tt==null?void 0:tt.syntheticException)||void 0,ht=eventFromString(Be,Le,ft,nt);return ht.level=Ye,tt!=null&&tt.event_id&&(ht.event_id=tt.event_id),resolvedSyncPromise(ht)}function eventFromUnknownInput(Be,Le,Ye,tt,nt){let ft;if(isErrorEvent$1(Le)&&Le.error)return eventFromError(Be,Le.error);if(isDOMError(Le)||isDOMException(Le)){const ht=Le;if("stack"in Le)ft=eventFromError(Be,Le);else{const gt=ht.name||(isDOMError(ht)?"DOMError":"DOMException"),At=ht.message?`${gt}: ${ht.message}`:gt;ft=eventFromString(Be,At,Ye,tt),addExceptionTypeValue(ft,At)}return"code"in ht&&(ft.tags={...ft.tags,"DOMException.code":`${ht.code}`}),ft}return isError(Le)?eventFromError(Be,Le):isPlainObject(Le)||isEvent(Le)?(ft=eventFromPlainObject(Be,Le,Ye,nt),addExceptionMechanism(ft,{synthetic:!0}),ft):(ft=eventFromString(Be,Le,Ye,tt),addExceptionTypeValue(ft,`${Le}`),addExceptionMechanism(ft,{synthetic:!0}),ft)}function eventFromString(Be,Le,Ye,tt){const nt={};if(tt&&Ye){const ft=parseStackFrames(Be,Ye);ft.length&&(nt.exception={values:[{value:Le,stacktrace:{frames:ft}}]}),addExceptionMechanism(nt,{synthetic:!0})}if(isParameterizedString(Le)){const{__sentry_template_string__:ft,__sentry_template_values__:ht}=Le;return nt.logentry={message:ft,params:ht},nt}return nt.message=Le,nt}function getNonErrorObjectExceptionValue(Be,{isUnhandledRejection:Le}){const Ye=extractExceptionKeysForMessage(Be),tt=Le?"promise rejection":"exception";return isErrorEvent$1(Be)?`Event \`ErrorEvent\` captured as ${tt} with message \`${Be.message}\``:isEvent(Be)?`Event \`${getObjectClassName(Be)}\` (type=${Be.type}) captured as ${tt}`:`Object captured as ${tt} with keys: ${Ye}`}function getObjectClassName(Be){try{const Le=Object.getPrototypeOf(Be);return Le?Le.constructor.name:void 0}catch{}}function getErrorPropertyFromObject(Be){for(const Le in Be)if(Object.prototype.hasOwnProperty.call(Be,Le)){const Ye=Be[Le];if(Ye instanceof Error)return Ye}}class BrowserClient extends Client{constructor(Le){var Et;const Ye=applyDefaultOptions(Le),tt=WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource();applySdkMetadata(Ye,"browser",["browser"],tt),(Et=Ye._metadata)!=null&&Et.sdk&&(Ye._metadata.sdk.settings={infer_ip:Ye.sendDefaultPii?"auto":"never",...Ye._metadata.sdk.settings}),super(Ye);const{sendDefaultPii:nt,sendClientReports:ft,enableLogs:ht,_experiments:gt,enableMetrics:At}=this._options,xt=At??(gt==null?void 0:gt.enableMetrics)??!0;WINDOW$1.document&&(ft||ht||xt)&&WINDOW$1.document.addEventListener("visibilitychange",()=>{WINDOW$1.document.visibilityState==="hidden"&&(ft&&this._flushOutcomes(),ht&&_INTERNAL_flushLogsBuffer(this),xt&&_INTERNAL_flushMetricsBuffer(this))}),nt&&this.on("beforeSendSession",addAutoIpAddressToSession)}eventFromException(Le,Ye){return eventFromException(this._options.stackParser,Le,Ye,this._options.attachStacktrace)}eventFromMessage(Le,Ye="info",tt){return eventFromMessage(this._options.stackParser,Le,Ye,tt,this._options.attachStacktrace)}_prepareEvent(Le,Ye,tt,nt){return Le.platform=Le.platform||"javascript",super._prepareEvent(Le,Ye,tt,nt)}}function applyDefaultOptions(Be){var Le;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(Le=WINDOW$1.SENTRY_RELEASE)==null?void 0:Le.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...Be}}const DEBUG_BUILD$1=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId;function addClickKeypressInstrumentationHandler(Be){const Le="dom";addHandler(Le,Be),maybeInstrument(Le,instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const Be=triggerHandlers.bind(null,"dom"),Le=makeDOMEventHandler(Be,!0);WINDOW.document.addEventListener("click",Le,!1),WINDOW.document.addEventListener("keypress",Le,!1),["EventTarget","Node"].forEach(Ye=>{var ft,ht;const nt=(ft=WINDOW[Ye])==null?void 0:ft.prototype;(ht=nt==null?void 0:nt.hasOwnProperty)!=null&&ht.call(nt,"addEventListener")&&(fill(nt,"addEventListener",function(gt){return function(At,xt,Et){if(At==="click"||At=="keypress")try{const kt=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},Ct=kt[At]=kt[At]||{refCount:0};if(!Ct.handler){const yt=makeDOMEventHandler(Be);Ct.handler=yt,gt.call(this,At,yt,Et)}Ct.refCount++}catch{}return gt.call(this,At,xt,Et)}}),fill(nt,"removeEventListener",function(gt){return function(At,xt,Et){if(At==="click"||At=="keypress")try{const kt=this.__sentry_instrumentation_handlers__||{},Ct=kt[At];Ct&&(Ct.refCount--,Ct.refCount<=0&&(gt.call(this,At,Ct.handler,Et),Ct.handler=void 0,delete kt[At]),Object.keys(kt).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return gt.call(this,At,xt,Et)}}))})}function isSimilarToLastCapturedEvent(Be){if(Be.type!==lastCapturedEventType)return!1;try{if(!Be.target||Be.target._sentryId!==lastCapturedEventTargetId)return!1}catch{}return!0}function shouldSkipDOMEvent(Be,Le){return Be!=="keypress"?!1:Le!=null&&Le.tagName?!(Le.tagName==="INPUT"||Le.tagName==="TEXTAREA"||Le.isContentEditable):!0}function makeDOMEventHandler(Be,Le=!1){return Ye=>{if(!Ye||Ye._sentryCaptured)return;const tt=getEventTarget(Ye);if(shouldSkipDOMEvent(Ye.type,tt))return;addNonEnumerableProperty(Ye,"_sentryCaptured",!0),tt&&!tt._sentryId&&addNonEnumerableProperty(tt,"_sentryId",uuid4());const nt=Ye.type==="keypress"?"input":Ye.type;isSimilarToLastCapturedEvent(Ye)||(Be({event:Ye,name:nt,global:Le}),lastCapturedEventType=Ye.type,lastCapturedEventTargetId=tt?tt._sentryId:void 0),clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout(()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0},DEBOUNCE_DURATION)}}function getEventTarget(Be){try{return Be.target}catch{return null}}let lastHref;function addHistoryInstrumentationHandler(Be){const Le="history";addHandler(Le,Be),maybeInstrument(Le,instrumentHistory)}function instrumentHistory(){if(WINDOW.addEventListener("popstate",()=>{const Le=WINDOW.location.href,Ye=lastHref;if(lastHref=Le,Ye===Le)return;triggerHandlers("history",{from:Ye,to:Le})}),!supportsHistory())return;function Be(Le){return function(...Ye){const tt=Ye.length>2?Ye[2]:void 0;if(tt){const nt=lastHref,ft=getAbsoluteUrl(String(tt));if(lastHref=ft,nt===ft)return Le.apply(this,Ye);triggerHandlers("history",{from:nt,to:ft})}return Le.apply(this,Ye)}}fill(WINDOW.history,"pushState",Be),fill(WINDOW.history,"replaceState",Be)}function getAbsoluteUrl(Be){try{return new URL(Be,WINDOW.location.origin).toString()}catch{return Be}}const cachedImplementations={};function getNativeImplementation(Be){const Le=cachedImplementations[Be];if(Le)return Le;let Ye=WINDOW[Be];if(isNativeFunction(Ye))return cachedImplementations[Be]=Ye.bind(WINDOW);const tt=WINDOW.document;if(tt&&typeof tt.createElement=="function")try{const nt=tt.createElement("iframe");nt.hidden=!0,tt.head.appendChild(nt);const ft=nt.contentWindow;ft!=null&&ft[Be]&&(Ye=ft[Be]),tt.head.removeChild(nt)}catch(nt){DEBUG_BUILD$1&&debug.warn(`Could not create sandbox iframe for ${Be} check, bailing to window.${Be}: `,nt)}return Ye&&(cachedImplementations[Be]=Ye.bind(WINDOW))}function clearCachedImplementation(Be){cachedImplementations[Be]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(Be){const Le="xhr";addHandler(Le,Be),maybeInstrument(Le,instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const Be=XMLHttpRequest.prototype;Be.open=new Proxy(Be.open,{apply(Le,Ye,tt){const nt=new Error,ft=timestampInSeconds()*1e3,ht=isString(tt[0])?tt[0].toUpperCase():void 0,gt=parseXhrUrlArg(tt[1]);if(!ht||!gt)return Le.apply(Ye,tt);Ye[SENTRY_XHR_DATA_KEY]={method:ht,url:gt,request_headers:{}},ht==="POST"&>.match(/sentry_key/)&&(Ye.__sentry_own_request__=!0);const At=()=>{const xt=Ye[SENTRY_XHR_DATA_KEY];if(xt&&Ye.readyState===4){try{xt.status_code=Ye.status}catch{}const Et={endTimestamp:timestampInSeconds()*1e3,startTimestamp:ft,xhr:Ye,virtualError:nt};triggerHandlers("xhr",Et)}};return"onreadystatechange"in Ye&&typeof Ye.onreadystatechange=="function"?Ye.onreadystatechange=new Proxy(Ye.onreadystatechange,{apply(xt,Et,kt){return At(),xt.apply(Et,kt)}}):Ye.addEventListener("readystatechange",At),Ye.setRequestHeader=new Proxy(Ye.setRequestHeader,{apply(xt,Et,kt){const[Ct,yt]=kt,vt=Et[SENTRY_XHR_DATA_KEY];return vt&&isString(Ct)&&isString(yt)&&(vt.request_headers[Ct.toLowerCase()]=yt),xt.apply(Et,kt)}}),Le.apply(Ye,tt)}}),Be.send=new Proxy(Be.send,{apply(Le,Ye,tt){const nt=Ye[SENTRY_XHR_DATA_KEY];if(!nt)return Le.apply(Ye,tt);tt[0]!==void 0&&(nt.body=tt[0]);const ft={startTimestamp:timestampInSeconds()*1e3,xhr:Ye};return triggerHandlers("xhr",ft),Le.apply(Ye,tt)}})}function parseXhrUrlArg(Be){if(isString(Be))return Be;try{return Be.toString()}catch{}}const DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE=40;function makeFetchTransport(Be,Le=getNativeImplementation("fetch")){let Ye=0,tt=0;async function nt(ft){const ht=ft.body.length;Ye+=ht,tt++;const gt={body:ft.body,method:"POST",referrerPolicy:"strict-origin",headers:Be.headers,keepalive:Ye<=6e4&&tt<15,...Be.fetchOptions};try{const At=await Le(Be.url,gt);return{statusCode:At.status,headers:{"x-sentry-rate-limits":At.headers.get("X-Sentry-Rate-Limits"),"retry-after":At.headers.get("Retry-After")}}}catch(At){throw clearCachedImplementation("fetch"),At}finally{Ye-=ht,tt--}}return createTransport(Be,nt,makePromiseBuffer(Be.bufferSize||DEFAULT_BROWSER_TRANSPORT_BUFFER_SIZE))}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(Be,Le,Ye,tt){const nt={filename:Be,function:Le==="<anonymous>"?UNKNOWN_FUNCTION:Le,in_app:!0};return Ye!==void 0&&(nt.lineno=Ye),tt!==void 0&&(nt.colno=tt),nt}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeDataUriRegex=/at (.+?) ?\(data:(.+?),/,chromeStackParserFn=Be=>{const Le=Be.match(chromeDataUriRegex);if(Le)return{filename:`<data:${Le[2]}>`,function:Le[1]};const Ye=chromeRegexNoFnName.exec(Be);if(Ye){const[,nt,ft,ht]=Ye;return createFrame(nt,UNKNOWN_FUNCTION,+ft,+ht)}const tt=chromeRegex.exec(Be);if(tt){if(tt[2]&&tt[2].indexOf("eval")===0){const gt=chromeEvalRegex.exec(tt[2]);gt&&(tt[2]=gt[1],tt[3]=gt[2],tt[4]=gt[3])}const[ft,ht]=extractSafariExtensionDetails(tt[1]||UNKNOWN_FUNCTION,tt[2]);return createFrame(ht,ft,tt[3]?+tt[3]:void 0,tt[4]?+tt[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=Be=>{const Le=geckoREgex.exec(Be);if(Le){if(Le[3]&&Le[3].indexOf(" > eval")>-1){const ft=geckoEvalRegex.exec(Le[3]);ft&&(Le[1]=Le[1]||"eval",Le[3]=ft[1],Le[4]=ft[2],Le[5]="")}let tt=Le[3],nt=Le[1]||UNKNOWN_FUNCTION;return[nt,tt]=extractSafariExtensionDetails(nt,tt),createFrame(tt,nt,Le[4]?+Le[4]:void 0,Le[5]?+Le[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(Be,Le)=>{const Ye=Be.indexOf("safari-extension")!==-1,tt=Be.indexOf("safari-web-extension")!==-1;return Ye||tt?[Be.indexOf("@")!==-1?Be.split("@")[0]:UNKNOWN_FUNCTION,Ye?`safari-extension:${Le}`:`safari-web-extension:${Le}`]:[Be,Le]},DEBUG_BUILD=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(Be={})=>{const Le={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...Be};return{name:INTEGRATION_NAME$3,setup(Ye){Le.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(Ye)),Le.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(Ye,Le.dom)),Le.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(Ye)),Le.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(Ye)),Le.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(Ye)),Le.sentry&&Ye.on("beforeSendEvent",_getSentryBreadcrumbHandler(Ye))}}},breadcrumbsIntegration=_breadcrumbsIntegration;function _getSentryBreadcrumbHandler(Be){return function(Ye){getClient()===Be&&addBreadcrumb({category:`sentry.${Ye.type==="transaction"?"transaction":"event"}`,event_id:Ye.event_id,level:Ye.level,message:getEventDescription(Ye)},{event:Ye})}}function _getDomBreadcrumbHandler(Be,Le){return function(tt){if(getClient()!==Be)return;let nt,ft,ht=typeof Le=="object"?Le.serializeAttribute:void 0,gt=typeof Le=="object"&&typeof Le.maxStringLength=="number"?Le.maxStringLength:void 0;gt&>>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD&&debug.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${gt} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),gt=MAX_ALLOWED_STRING_LENGTH),typeof ht=="string"&&(ht=[ht]);try{const xt=tt.event,Et=_isEvent(xt)?xt.target:xt;nt=htmlTreeAsString(Et,{keyAttrs:ht,maxStringLength:gt}),ft=getComponentName(Et)}catch{nt="<unknown>"}if(nt.length===0)return;const At={category:`ui.${tt.name}`,message:nt};ft&&(At.data={"ui.component_name":ft}),addBreadcrumb(At,{event:tt.event,name:tt.name,global:tt.global})}}function _getConsoleBreadcrumbHandler(Be){return function(Ye){if(getClient()!==Be)return;const tt={category:"console",data:{arguments:Ye.args,logger:"console"},level:severityLevelFromString(Ye.level),message:safeJoin(Ye.args," ")};if(Ye.level==="assert")if(Ye.args[0]===!1)tt.message=`Assertion failed: ${safeJoin(Ye.args.slice(1)," ")||"console.assert"}`,tt.data.arguments=Ye.args.slice(1);else return;addBreadcrumb(tt,{input:Ye.args,level:Ye.level})}}function _getXhrBreadcrumbHandler(Be){return function(Ye){if(getClient()!==Be)return;const{startTimestamp:tt,endTimestamp:nt}=Ye,ft=Ye.xhr[SENTRY_XHR_DATA_KEY];if(!tt||!nt||!ft)return;const{method:ht,url:gt,status_code:At,body:xt}=ft,Et={method:ht,url:gt,status_code:At},kt={xhr:Ye.xhr,input:xt,startTimestamp:tt,endTimestamp:nt},Ct={category:"xhr",data:Et,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(At)};Be.emit("beforeOutgoingRequestBreadcrumb",Ct,kt),addBreadcrumb(Ct,kt)}}function _getFetchBreadcrumbHandler(Be){return function(Ye){if(getClient()!==Be)return;const{startTimestamp:tt,endTimestamp:nt}=Ye;if(nt&&!(Ye.fetchData.url.match(/sentry_key/)&&Ye.fetchData.method==="POST"))if(Ye.fetchData.method,Ye.fetchData.url,Ye.error){const ft=Ye.fetchData,ht={data:Ye.error,input:Ye.args,startTimestamp:tt,endTimestamp:nt},gt={category:"fetch",data:ft,level:"error",type:"http"};Be.emit("beforeOutgoingRequestBreadcrumb",gt,ht),addBreadcrumb(gt,ht)}else{const ft=Ye.response,ht={...Ye.fetchData,status_code:ft==null?void 0:ft.status};Ye.fetchData.request_body_size,Ye.fetchData.response_body_size,ft==null||ft.status;const gt={input:Ye.args,response:ft,startTimestamp:tt,endTimestamp:nt},At={category:"fetch",data:ht,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(ht.status_code)};Be.emit("beforeOutgoingRequestBreadcrumb",At,gt),addBreadcrumb(At,gt)}}}function _getHistoryBreadcrumbHandler(Be){return function(Ye){if(getClient()!==Be)return;let tt=Ye.from,nt=Ye.to;const ft=parseUrl(WINDOW$1.location.href);let ht=tt?parseUrl(tt):void 0;const gt=parseUrl(nt);ht!=null&&ht.path||(ht=ft),ft.protocol===gt.protocol&&ft.host===gt.host&&(nt=gt.relative),ft.protocol===ht.protocol&&ft.host===ht.host&&(tt=ht.relative),addBreadcrumb({category:"navigation",data:{from:tt,to:nt}})}}function _isEvent(Be){return!!Be&&!!Be.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(Be={})=>{const Le={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...Be};return{name:INTEGRATION_NAME$2,setupOnce(){Le.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),Le.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),Le.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),Le.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const Ye=Le.eventTarget;Ye&&(Array.isArray(Ye)?Ye:DEFAULT_EVENT_TARGET).forEach(nt=>_wrapEventTarget(nt,Le))}}},browserApiErrorsIntegration=_browserApiErrorsIntegration;function _wrapTimeFunction(Be){return function(...Le){const Ye=Le[0];return Le[0]=wrap(Ye,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${getFunctionName(Be)}`}}),Be.apply(this,Le)}}function _wrapRAF(Be){return function(Le){return Be.apply(this,[wrap(Le,{mechanism:{data:{handler:getFunctionName(Be)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function _wrapXHR(Be){return function(...Le){const Ye=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(nt=>{nt in Ye&&typeof Ye[nt]=="function"&&fill(Ye,nt,function(ft){const ht={mechanism:{data:{handler:getFunctionName(ft)},handled:!1,type:`auto.browser.browserapierrors.xhr.${nt}`}},gt=getOriginalFunction(ft);return gt&&(ht.mechanism.data.handler=getFunctionName(gt)),wrap(ft,ht)})}),Be.apply(this,Le)}}function _wrapEventTarget(Be,Le){var nt,ft;const tt=(nt=WINDOW$1[Be])==null?void 0:nt.prototype;(ft=tt==null?void 0:tt.hasOwnProperty)!=null&&ft.call(tt,"addEventListener")&&(fill(tt,"addEventListener",function(ht){return function(gt,At,xt){try{isEventListenerObject(At)&&(At.handleEvent=wrap(At.handleEvent,{mechanism:{data:{handler:getFunctionName(At),target:Be},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return Le.unregisterOriginalCallbacks&&unregisterOriginalCallback(this,gt,At),ht.apply(this,[gt,wrap(At,{mechanism:{data:{handler:getFunctionName(At),target:Be},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),xt])}}),fill(tt,"removeEventListener",function(ht){return function(gt,At,xt){try{const Et=At.__sentry_wrapped__;Et&&ht.call(this,gt,Et,xt)}catch{}return ht.call(this,gt,At,xt)}}))}function isEventListenerObject(Be){return typeof Be.handleEvent=="function"}function unregisterOriginalCallback(Be,Le,Ye){Be&&typeof Be=="object"&&"removeEventListener"in Be&&typeof Be.removeEventListener=="function"&&Be.removeEventListener(Le,Ye)}const browserSessionIntegration=()=>({name:"BrowserSession",setupOnce(){if(typeof WINDOW$1.document>"u"){DEBUG_BUILD&&debug.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler(({from:Be,to:Le})=>{Be!==void 0&&Be!==Le&&(startSession({ignoreDuration:!0}),captureSession())})}}),INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(Be={})=>{const Le={onerror:!0,onunhandledrejection:!0,...Be};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(Ye){Le.onerror&&(_installGlobalOnErrorHandler(Ye),globalHandlerLog("onerror")),Le.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(Ye),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=_globalHandlersIntegration;function _installGlobalOnErrorHandler(Be){addGlobalErrorInstrumentationHandler(Le=>{const{stackParser:Ye,attachStacktrace:tt}=getOptions();if(getClient()!==Be||shouldIgnoreOnError())return;const{msg:nt,url:ft,line:ht,column:gt,error:At}=Le,xt=_enhanceEventWithInitialFrame(eventFromUnknownInput(Ye,At||nt,void 0,tt,!1),ft,ht,gt);xt.level="error",captureEvent(xt,{originalException:At,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function _installGlobalOnUnhandledRejectionHandler(Be){addGlobalUnhandledRejectionInstrumentationHandler(Le=>{const{stackParser:Ye,attachStacktrace:tt}=getOptions();if(getClient()!==Be||shouldIgnoreOnError())return;const nt=_getUnhandledRejectionError(Le),ft=isPrimitive(nt)?_eventFromRejectionWithPrimitive(nt):eventFromUnknownInput(Ye,nt,void 0,tt,!0);ft.level="error",captureEvent(ft,{originalException:nt,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function _getUnhandledRejectionError(Be){if(isPrimitive(Be))return Be;try{if("reason"in Be)return Be.reason;if("detail"in Be&&"reason"in Be.detail)return Be.detail.reason}catch{}return Be}function _eventFromRejectionWithPrimitive(Be){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(Be)}`}]}}}function _enhanceEventWithInitialFrame(Be,Le,Ye,tt){const nt=Be.exception=Be.exception||{},ft=nt.values=nt.values||[],ht=ft[0]=ft[0]||{},gt=ht.stacktrace=ht.stacktrace||{},At=gt.frames=gt.frames||[],xt=tt,Et=Ye,kt=getFilenameFromUrl(Le)??getLocationHref();return At.length===0&&At.push({colno:xt,filename:kt,function:UNKNOWN_FUNCTION,in_app:!0,lineno:Et}),Be}function globalHandlerLog(Be){DEBUG_BUILD&&debug.log(`Global Handler attached: ${Be}`)}function getOptions(){const Be=getClient();return(Be==null?void 0:Be.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function getFilenameFromUrl(Be){if(!(!isString(Be)||Be.length===0)){if(Be.startsWith("data:")){const Le=Be.match(/^data:([^;]+)/),Ye=Le?Le[1]:"text/javascript",tt=Be.includes("base64,");return`<data:${Ye}${tt?",base64":""}>`}return Be}}const httpContextIntegration=()=>({name:"HttpContext",preprocessEvent(Be){var tt;if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const Le=getHttpRequestData(),Ye={...Le.headers,...(tt=Be.request)==null?void 0:tt.headers};Be.request={...Le,...Be.request,headers:Ye}}}),DEFAULT_KEY="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(Be={})=>{const Le=Be.limit||DEFAULT_LIMIT,Ye=Be.key||DEFAULT_KEY;return{name:INTEGRATION_NAME,preprocessEvent(tt,nt,ft){const ht=ft.getOptions();applyAggregateErrorsToEvent(exceptionFromError,ht.stackParser,Ye,Le,tt,nt)}}},linkedErrorsIntegration=_linkedErrorsIntegration;function checkAndWarnIfIsEmbeddedBrowserExtension(){return _isEmbeddedBrowserExtension()?(DEBUG_BUILD&&consoleSandbox(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function _isEmbeddedBrowserExtension(){var ft;if(typeof WINDOW$1.window>"u")return!1;const Be=WINDOW$1;if(Be.nw)return!1;const Le=Be.chrome||Be.browser;if(!((ft=Le==null?void 0:Le.runtime)!=null&&ft.id))return!1;const Ye=getLocationHref(),tt=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(WINDOW$1===WINDOW$1.top&&tt.some(ht=>Ye.startsWith(`${ht}://`)))}function getDefaultIntegrations(Be){return[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration(),browserSessionIntegration()]}function init(Be={}){const Le=!Be.skipBrowserExtensionCheck&&checkAndWarnIfIsEmbeddedBrowserExtension();let Ye=Be.defaultIntegrations==null?getDefaultIntegrations():Be.defaultIntegrations;const tt={...Be,enabled:Le?!1:Be.enabled,stackParser:stackParserFromStackParserOptions(Be.stackParser||defaultStackParser),integrations:getIntegrationsToSetup({integrations:Be.integrations,defaultIntegrations:Ye}),transport:Be.transport||makeFetchTransport};return initAndBind(BrowserClient,tt)}const DEPRECATION_PERIOD_MONTHS=12,SDK_RELEASE_DATE="2026-08-26",DEPRECATED_SDK_WARNING_MESSAGE="You are using a deprecated SDK version. Please upgrade to the latest version to avoid any disruption.";let hasWarned=!1;const parseReleaseDate=Be=>{const Le=/^(\d{4})-(\d{2})-(\d{2})$/.exec(Be);if(!Le)return null;const Ye=Number(Le[1]),tt=Number(Le[2])-1,nt=Number(Le[3]),ft=new Date(Date.UTC(Ye,tt,nt));return ft.getUTCFullYear()!==Ye||ft.getUTCMonth()!==tt||ft.getUTCDate()!==nt?null:ft},isSdkDeprecated=(Be,Le=new Date)=>{const Ye=parseReleaseDate(Be);if(!Ye)return!1;const tt=new Date(Date.UTC(Ye.getUTCFullYear(),Ye.getUTCMonth()+DEPRECATION_PERIOD_MONTHS,Ye.getUTCDate()));return Le.getTime()>=tt.getTime()},warnIfSdkDeprecated=(Be=SDK_RELEASE_DATE,Le=new Date)=>{hasWarned||!isSdkDeprecated(Be,Le)||(hasWarned=!0,console.warn(DEPRECATED_SDK_WARNING_MESSAGE))};function setupFiles(){const Be={pollingIntervalSeconds:.25,maxMillisBeforeAckWhenClosed:100,moreAnnoyingDebuggerStatements:1,onDetectOpen:()=>{var xt;addDeviceStats((xt=state.token)==null?void 0:xt.token,{inspectorOpened:!0}),MlWasmJSApi$1.setInspectorOpened(!0)},onDetectClose:void 0,startup:"asap",onCheckOpennessWhilePaused:"throw"};Object.seal(Be);const Le=new Worker(URL.createObjectURL(new Blob([`"use strict";
|
|
10491
10491
|
onmessage = (ev) => { postMessage({isOpenBeat:true});
|
|
10492
10492
|
debugger; for (let i = 0; i < ev.data.moreDebugs; i++) { debugger; }
|
|
10493
10493
|
postMessage({isOpenBeat:false});
|
package/package.json
CHANGED
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
"main": "./dist/onBoarding.umd.js",
|
|
4
4
|
"module": "./dist/onBoarding.mjs",
|
|
5
5
|
"types": "./dist/onBoarding.d.ts",
|
|
6
|
-
"version": "1.92.
|
|
6
|
+
"version": "1.92.1",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/IncodeTechnologies/ms-incodesmile-web.git",
|
|
10
|
+
"directory": "packages/incode-welcome"
|
|
11
|
+
},
|
|
7
12
|
"publishConfig": {},
|
|
8
13
|
"exports": {
|
|
9
14
|
".": {
|