@incodetech/welcome 1.91.0-rc.20260716230206 → 1.91.0

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.
@@ -25114,7 +25114,7 @@ function getInitializationParams(Be = !1) {
25114
25114
  wasmVersion
25115
25115
  };
25116
25116
  }
25117
- const version$3 = "1.91.0-rc.20260716230206", devDependencies = {
25117
+ const version$3 = "1.91.0", devDependencies = {
25118
25118
  "@fingerprintjs/fingerprintjs-pro": "3.12.3",
25119
25119
  "@thumbmarkjs/thumbmarkjs": "0.20.6"
25120
25120
  }, deviceFingerprintSignalsUrl = "/omni/add/device-fingerprint-signals", triggerEventCodes = /* @__PURE__ */ new Set(["modelLoadEnd", "captureAttemptFinished"]), sessionInitEventCode = "modelLoadEnd";
@@ -316935,7 +316935,7 @@ const DocumentReview = ({
316935
316935
  & button:focus {
316936
316936
  text-decoration: none !important;
316937
316937
  }
316938
- `, resolveSubtitle = (Be, Le, Ye, tt) => !Le && (Be != null && Be.trim()) ? Be : tt(Le ? Ye ? "documentCapture.tutorial.multiPageDocument.optionalPage.subtitle" : "documentCapture.tutorial.multiPageDocument.subtitle" : "documentCapture.tutorial.subtitle"), DocumentTutorial = ({
316938
+ `, resolveSubtitle = (Be, Le, Ye, tt) => Be != null && Be.trim() ? Be : tt(Le ? Ye ? "documentCapture.tutorial.multiPageDocument.optionalPage.subtitle" : "documentCapture.tutorial.multiPageDocument.subtitle" : "documentCapture.tutorial.subtitle"), DocumentTutorial = ({
316939
316939
  onContinue: Be,
316940
316940
  onStartCamera: Le,
316941
316941
  onlyAllowCapture: Ye = !1,
@@ -316957,7 +316957,7 @@ const DocumentReview = ({
316957
316957
  }) => {
316958
316958
  const { t: Tt } = useTranslation$1(), Bt = useTokens(), Dt = useRef(null), [Pt, Lt] = useState(!1), [_t, Mt] = useState(!1);
316959
316959
  let zt;
316960
- ft ? zt = Tt("documentCapture.tutorial.multiPageDocument.title") : xt != null && xt.trim() ? zt = xt : zt = Tt("documentCapture.tutorial.title");
316960
+ xt != null && xt.trim() ? zt = xt : ft ? zt = Tt("documentCapture.tutorial.multiPageDocument.title") : zt = Tt("documentCapture.tutorial.title");
316961
316961
  const $t = resolveSubtitle(
316962
316962
  kt,
316963
316963
  ft,
@@ -103,7 +103,7 @@ Check the top-level render call using <`+sn+">.")}return z0}}function ra(k0,z0){
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} />`,j0,Zr,nn,Zr),yr[Zr+j0]=!0}}return k0===tt?Xr(zn):br(zn),zn}}function Kn(k0,z0,sn){return fn(k0,z0,sn,!0)}function R0(k0,z0,sn){return fn(k0,z0,sn,!1)}var q0=R0,wn=Kn;reactJsxRuntime_development.Fragment=tt,reactJsxRuntime_development.jsx=q0,reactJsxRuntime_development.jsxs=wn}()),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(kt){try{xt(tt.next(kt))}catch(Et){ht(Et)}}function At(kt){try{xt(tt.throw(kt))}catch(Et){ht(Et)}}function xt(kt){kt.done?ft(kt.value):nt(kt.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:kt,loading:Et="Loading PDF…",noData:Ct="No PDF file specified.",onItemClick:yt,onLoadError:vt,onLoadProgress:bt,onLoadSuccess:Rt,onPassword:wt=defaultOnPassword,onSourceError:Tt,onSourceSuccess:Bt,options:Dt,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,zt]=useResolver(),{value:$t,error:Xt}=Mt,[Kt,Vt]=useResolver(),{value:_t,error:Ht}=Kt,Gt=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),Dt&&Dt!==Jt.current&&(warning$4(!dequal(Dt,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=Dt);const Wt=React.useRef({scrollPageIntoView:B0=>{const{dest:b0,pageNumber:L0,pageIndex:G0=L0-1}=B0;if(yt){yt({dest:b0,pageIndex:G0,pageNumber:L0});return}const f0=Ft.current[G0];if(f0){f0.scrollIntoView();return}warning$4(!1,`An internal link leading to page ${L0} 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:Gt,pages:Ft,viewer:Wt}),[]);function e0(){Bt&&Bt()}function s0(){Xt&&(warning$4(!1,Xt.toString()),Tt&&Tt(Xt))}function Yt(){zt({type:"RESET"})}React.useEffect(Yt,[At,zt]);const n0=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:B0}=At,b0=__rest$2(At,["url"]),L0=dataURItoByteString(B0);return Object.assign({data:L0},b0)}displayCORSWarning()}return At}),[At]);React.useEffect(()=>{const B0=makeCancellablePromise(n0());return B0.promise.then(b0=>{zt({type:"RESOLVE",value:b0})}).catch(b0=>{zt({type:"REJECT",error:b0})}),()=>{cancelRunningTask(B0)}},[n0,zt]),React.useEffect(()=>{if(!(typeof $t>"u")){if($t===!1){s0();return}e0()}},[$t]);function a0(){_t&&(Rt&&Rt(_t),Ft.current=new Array(_t.numPages),Gt.current.setDocument(_t))}function Zt(){Ht&&(warning$4(!1,Ht.toString()),vt&&vt(Ht))}React.useEffect(function(){Vt({type:"RESET"})},[Vt,$t]),React.useEffect(function(){if(!$t)return;const b0=Dt?Object.assign(Object.assign({},$t),Dt):$t,L0=__webpack_exports__getDocument(b0);bt&&(L0.onProgress=bt),wt&&(L0.onPassword=wt);const G0=L0,f0=G0.promise.then(H0=>{Vt({type:"RESOLVE",value:H0})}).catch(H0=>{G0.destroyed||Vt({type:"REJECT",error:H0})});return()=>{f0.finally(()=>G0.destroy())}},[Dt,Vt,$t]),React.useEffect(()=>{if(!(typeof _t>"u")){if(_t===!1){Zt();return}a0()}},[_t]),React.useEffect(function(){Gt.current.setViewer(Wt.current),Gt.current.setExternalLinkRel(ht),Gt.current.setExternalLinkTarget(gt)},[ht,gt]);const l0=React.useCallback((B0,b0)=>{Ft.current[B0]=b0},[]),h0=React.useCallback(B0=>{delete Ft.current[B0]},[]),E0=React.useMemo(()=>({imageResourcesPath:kt,linkService:Gt.current,onItemClick:yt,pdf:_t,registerPage:l0,renderMode:Pt,rotate:Lt,unregisterPage:h0}),[kt,yt,_t,l0,Pt,Lt,h0]),g0=React.useMemo(()=>makeEventProps(jt,()=>_t),[jt,_t]);function v0(){return jsxRuntimeExports.jsx(documentContext.Provider,{value:E0,children:tt})}function y0(){return At?_t==null?jsxRuntimeExports.jsx(Message$5,{type:"loading",children:typeof Et=="function"?Et():Et}):_t===!1?jsxRuntimeExports.jsx(Message$5,{type:"error",children:typeof ft=="function"?ft():ft}):v0():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"}},g0,{children:y0()}))});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 kt(){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){kt();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:kt,rotate:Et,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&&gt&&gt(makePageCallback(At,Ct))}function Rt(Dt){isCancelException(Dt)||(warning$4(!1,Dt.toString()),ht&&ht(Dt))}const wt=React.useMemo(()=>At.getViewport({scale:Ct*ft,rotation:Et}),[ft,At,Et,Ct]),Tt=React.useMemo(()=>At.getViewport({scale:Ct,rotation:Et}),[At,Et,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:Dt}=vt;Dt&&(Dt.width=0,Dt.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:kt?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:kt}=Be;invariant$1(ht,"Attempted to load page text content, but no page was specified.");const[Et,Ct]=useResolver(),{value:yt,error:vt}=Et,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()),zt=Mt;return Mt.promise.then($t=>{Ct({type:"RESOLVE",value:$t})}).catch($t=>{Ct({type:"REJECT",error:$t})}),()=>cancelRunningTask(zt)},[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 Dt(){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:kt,rotation:xt}),[ht,xt,kt]);return React.useLayoutEffect(function(){if(!ht||!yt)return;const{current:Mt}=bt;if(!Mt)return;Mt.innerHTML="";const zt=ht.streamTextContent({includeMarkedContent:!0}),$t={container:Mt,textContentSource:zt,viewport:Lt},Xt=new __webpack_exports__TextLayer($t),Kt=Xt;return Xt.render().then(()=>{const Vt=document.createElement("div");Vt.className="endOfContent",Mt.append(Vt);const _t=Mt.querySelectorAll('[role="presentation"]');if(Le){let Ht=0;yt.items.forEach((Gt,Ft)=>{if(!isTextItem(Gt))return;const Ut=_t[Ht];if(!Ut)return;const Jt=Le(Object.assign({pageIndex:gt,pageNumber:At,itemIndex:Ft},Gt));Ut.innerHTML=Jt,Ht+=Gt.str&&Gt.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:Dt,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:kt,renderForms:Et,rotate:Ct,scale:yt=1}=Ye;invariant$1(kt,"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 Dt(){wt&&(warning$4(!1,wt.toString()),ft&&ft(wt))}React.useEffect(function(){bt({type:"RESET"})},[bt,xt]),React.useEffect(function(){if(!xt)return;const zt=makeCancellablePromise(xt.getAnnotations()),$t=zt;return zt.promise.then(Xt=>{bt({type:"RESOLVE",value:Xt})}).catch(Xt=>{bt({type:"REJECT",error:Xt})}),()=>{cancelRunningTask($t)}},[bt,xt]),React.useEffect(()=>{if(Rt!==void 0){if(Rt===!1){Dt();return}Bt()}},[Rt]);function Pt(){At&&At()}function Lt(Mt){warning$4(!1,`${Mt}`),gt&&gt(Mt)}const jt=React.useMemo(()=>xt.getViewport({scale:yt,rotation:Ct}),[xt,Ct,yt]);return React.useEffect(function(){if(!kt||!xt||!nt||!Rt)return;const{current:zt}=Tt;if(!zt)return;const $t=jt.clone({dontFlip:!0}),Xt={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:zt,l10n:null,page:xt,structTreeLayer:null,viewport:$t},Kt={annotations:Rt,annotationStorage:kt.annotationStorage,div:zt,imageResourcesPath:tt,linkService:nt,page:xt,renderForms:Et,viewport:$t};zt.innerHTML="";try{new __webpack_exports__AnnotationLayer(Xt).render(Kt),Pt()}catch(Vt){Lt(Vt)}return()=>{}},[Rt,tt,nt,xt,kt,Et,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:kt,devicePixelRatio:Et,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:Dt,onGetTextError:Pt,onGetTextSuccess:Lt,onLoadError:jt,onLoadSuccess:Mt,onRenderAnnotationLayerError:zt,onRenderAnnotationLayerSuccess:$t,onRenderError:Xt,onRenderSuccess:Kt,onRenderTextLayerError:Vt,onRenderTextLayerSuccess:_t,pageIndex:Ht,pageNumber:Gt,pdf:Ft,registerPage:Ut,renderAnnotationLayer:Jt=!0,renderForms:Wt=!1,renderMode:e0="canvas",renderTextLayer:s0=!0,rotate:Yt,scale:n0=defaultScale,unregisterPage:a0,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:g0,error:v0}=h0,y0=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 B0=isProvided(Gt)?Gt-1:Ht??null,b0=Gt??(isProvided(Ht)?Ht+1:null),L0=Yt??(g0?g0.rotate:null),G0=React.useMemo(()=>{if(!g0)return null;let T0=1;const Q0=n0??defaultScale;if(Zt||yt){const Y0=g0.getViewport({scale:1,rotation:L0});Zt?T0=Zt/Y0.width:yt&&(T0=yt/Y0.height)}return Q0*T0},[yt,g0,L0,n0,Zt]);React.useEffect(function(){return()=>{isProvided(B0)&&nt&&a0&&a0(B0)}},[nt,Ft,B0,a0]);function f0(){if(Mt){if(!g0||!G0)return;Mt(makePageCallback(g0,G0))}if(nt&&Ut){if(!isProvided(B0)||!y0.current)return;Ut(B0,y0.current)}}function H0(){v0&&(warning$4(!1,v0.toString()),jt&&jt(v0))}React.useEffect(function(){E0({type:"RESET"})},[E0,Ft,B0]),React.useEffect(function(){if(!Ft||!b0)return;const Q0=makeCancellablePromise(Ft.getPage(b0)),Y0=Q0;return Q0.promise.then(un=>{E0({type:"RESOLVE",value:un})}).catch(un=>{E0({type:"REJECT",error:un})}),()=>cancelRunningTask(Y0)},[E0,Ft,b0]),React.useEffect(()=>{if(g0!==void 0){if(g0===!1){H0();return}f0()}},[g0,G0]);const u0=React.useMemo(()=>g0&&isProvided(B0)&&b0&&isProvided(L0)&&isProvided(G0)?{_className:tt,canvasBackground:ft,customTextRenderer:kt,devicePixelRatio:Et,onGetAnnotationsError:wt,onGetAnnotationsSuccess:Tt,onGetStructTreeError:Bt,onGetStructTreeSuccess:Dt,onGetTextError:Pt,onGetTextSuccess:Lt,onRenderAnnotationLayerError:zt,onRenderAnnotationLayerSuccess:$t,onRenderError:Xt,onRenderSuccess:Kt,onRenderTextLayerError:Vt,onRenderTextLayerSuccess:_t,page:g0,pageIndex:B0,pageNumber:b0,renderForms:Wt,renderTextLayer:s0,rotate:L0,scale:G0}:null,[tt,ft,kt,Et,wt,Tt,Bt,Dt,Pt,Lt,zt,$t,Xt,Kt,Vt,_t,g0,B0,b0,Wt,s0,L0,G0]),Z0=React.useMemo(()=>makeEventProps(l0,()=>g0&&(G0?makePageCallback(g0,G0):void 0)),[l0,g0,G0]),m0=`${B0}@${G0}/${L0}`;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 S0(){return s0?jsxRuntimeExports.jsx(TextLayer,{},`${m0}_text`):null}function P0(){return Jt?jsxRuntimeExports.jsx(AnnotationLayer,{},`${m0}_annotations`):null}function M0(){return jsxRuntimeExports.jsxs(pageContext.Provider,{value:u0,children:[w0(),S0(),P0(),gt]})}function x0(){return b0?Ft===null||g0===void 0||g0===null?jsxRuntimeExports.jsx(Message$5,{type:"loading",children:typeof bt=="function"?bt():bt}):Ft===!1||g0===!1?jsxRuntimeExports.jsx(Message$5,{type:"error",children:typeof Ct=="function"?Ct():Ct}):M0():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":b0,ref:mergeRefs$2(vt,y0),style:{"--scale-factor":`${G0}`,backgroundColor:ft||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},Z0,{children:x0()}))}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","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_v2_reduced_aggregation_interval","id_video_recording_enabled","barcode_shadow_capture","enable_app_logs"],GLOBAL_FLAGS=["new_fingerprint","enable_sentry_web","enable_app_logs"],ID_MODULE_FLAGS=["id_face_readability","id_face_detector","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_v2_reduced_aggregation_interval","id_video_recording_enabled","barcode_shadow_capture"],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,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_v2_reduced_aggregation_interval:!1,id_video_recording_enabled:!1,barcode_shadow_capture:!1,enable_app_logs:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null,statsigClientInstance=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(!isOfflineMode()){if(initPromise)return initPromise;initPromise=(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}},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(Be){return Be?getFeatureFlag("id_v2_reduced_aggregation_interval")?1500:3e3:2e3}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(tt)})}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.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.36";function getBarcodeEnhanceModelUrl(){return`${getWasmBaseUrl()}/${wasmVersion}/models/barcode_enhance_896x224_fp16.ortmodelv2`}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=Be?WasmWorkflowProfileName.OnDeviceSelfieWorkflow:WasmWorkflowProfileName.SelfieWithQualityMetrics,ft=WasmWorkflowProfileName.SelfieVideoSelfie,ht=WasmWorkflowProfileName.IdVideoSelfie_2_01;return[tt,ht,nt,ft]}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 kt of Ye){const Et=getWasmWorkflowProfile(kt);if(!Et)throw new Error(`WasmWorkflowProfile not found: ${kt}`);const Ct=Et.modelNames;let yt=[];for(const vt of Ct)yt.push(`${tt}/${wasmVersion}/models/${vt}`);At.set(Et.wasmWorkflowType,yt),xt.set(Et.detectionType,Et)}return{wasmModulePath:nt,wasmSimdModulePath:ft,glueCodePath:ht,versionsFilePath:gt,workflowModels:At,enableSIMD:!0,profiles:xt,wasmVersion}}const version$3="1.91.0-rc.20260716230206",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 kt=new URL(Be,location.href),{blockedURI:Et}=xt;Et!==kt.href&&Et!==kt.protocol.slice(0,-1)&&Et!==kt.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(kt=>{const Et=new MessageChannel;Et.port1.onmessage=()=>kt(),Et.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$6="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(Et){const Ct=[...Et];return{current:()=>Ct[0],postpone(){const yt=Ct.shift();yt!==void 0&&Ct.push(yt)},exclude(){Ct.shift()}}}(gt),xt=function(Et,Ct){let yt=0;return()=>Math.random()*Math.min(Ct,Et*Math.pow(2,yt++))}(100,3e3),kt=new Set;return[At.current(),(Et,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()-Et.getTime()<50,wt=At.current();wt&&Rt&&!kt.has(wt)&&(kt.add(wt),yt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,yt??Et.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=Et=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:Et}),kt=Le(gt);return kt.then(()=>xt(),xt),kt.catch(Et=>{if(ft!=null||(ft=Et),Ye.length>=5)throw ft;const Ct=nt(At,Et);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(kt,Et){const Ct={},yt={};for(const[vt,bt]of Object.entries(kt))Et.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 kt=[],Et=()=>{kt.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",Et);return Et(),[kt,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$e);const kt=function(Et,Ct){return(Array.isArray(Et)?Et:[Et]).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(kt,F$1)}).catch(kt=>{throw xt(),function(Et){return Et instanceof Error&&Et.message===K?new Error(M$1):Et}(kt)}).then(([kt,Et])=>(xt(),kt.load({...nt,ldi:{attempts:Et,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$6,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(kt){ft(kt)}}function gt(xt){try{At(tt.throw(xt))}catch(kt){ft(kt)}}function At(xt){var kt;xt.done?nt(xt.value):(kt=xt.value,kt instanceof Ye?kt:new Ye(function(Et){Et(kt)})).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(kt){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,kt[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&kt[0]?tt.return:kt[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,kt[1])).done)return nt;switch(tt=0,nt&&(kt=[2&kt[0],nt.value]),kt[0]){case 0:case 1:nt=kt;break;case 4:return ht.label++,{value:kt[1],done:!1};case 5:ht.label++,tt=kt[1],kt=[0];continue;case 7:kt=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||kt[0]!==6&&kt[0]!==2)){ht=0;continue}if(kt[0]===3&&(!nt||kt[1]>nt[0]&&kt[1]<nt[3])){ht.label=kt[1];break}if(kt[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=kt;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(kt);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}kt=Le.call(Be,ht)}catch(Et){kt=[6,Et],tt=0}finally{Ye=nt=0}if(5&kt[0])throw kt[1];return{value:kt[0]?kt[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$5=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 kt=At.subarray(4*xt,4*(xt+1));kt[0]=Math.imul(kt[0],s$2[0]),kt[0]=l(kt[0],15),kt[0]=Math.imul(kt[0],s$2[1]),ht[0]=ht[0]^kt[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,kt[1]=Math.imul(kt[1],s$2[1]),kt[1]=l(kt[1],16),kt[1]=Math.imul(kt[1],s$2[2]),ht[1]=ht[1]^kt[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,kt[2]=Math.imul(kt[2],s$2[2]),kt[2]=l(kt[2],17),kt[2]=Math.imul(kt[2],s$2[3]),ht[2]=ht[2]^kt[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,kt[3]=Math.imul(kt[3],s$2[3]),kt[3]=l(kt[3],18),kt[3]=Math.imul(kt[3],s$2[0]),ht[3]=ht[3]^kt[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),kt=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^kt[14]<<16;case 14:xt[3]=xt[3]^kt[13]<<8;case 13:xt[3]=xt[3]^kt[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]^kt[11]<<24;case 11:xt[2]=xt[2]^kt[10]<<16;case 10:xt[2]=xt[2]^kt[9]<<8;case 9:xt[2]=xt[2]^kt[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]^kt[7]<<24;case 7:xt[1]=xt[1]^kt[6]<<16;case 6:xt[1]=xt[1]^kt[5]<<8;case 5:xt[1]=xt[1]^kt[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]^kt[3]<<24;case 3:xt[0]=xt[0]^kt[2]<<16;case 2:xt[0]=xt[0]^kt[1]<<8;case 1:xt[0]=xt[0]^kt[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,kt){var Et=tt+xt+".";if(typeof kt!="object"||Array.isArray(kt)){var Ct=Le.some(function(bt){return Et.startsWith(bt)}),yt=Ye.some(function(bt){return Et.startsWith(bt)});Ct&&!yt||(nt[xt]=kt)}else{var vt=p(kt,Le,Ye,Et);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$5("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$5("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 kt=String(xt);ht[kt]=(ht[kt]||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$5("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(Et){return setTimeout(Et,xt,kt)}))];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,kt})})})(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(kt){return L(ht,kt)}),At={},I.forEach(function(kt){var Et=L(ht,kt);gt.includes(Et)||(At[kt]=Et)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$5("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$5("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$5("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$5("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$5("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$5("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$5("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} />`,j0,Zr,nn,Zr),yr[Zr+j0]=!0}}return k0===tt?Xr(zn):br(zn),zn}}function Kn(k0,z0,sn){return fn(k0,z0,sn,!0)}function R0(k0,z0,sn){return fn(k0,z0,sn,!1)}var q0=R0,wn=Kn;reactJsxRuntime_development.Fragment=tt,reactJsxRuntime_development.jsx=q0,reactJsxRuntime_development.jsxs=wn}()),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(kt){try{xt(tt.next(kt))}catch(Et){ht(Et)}}function At(kt){try{xt(tt.throw(kt))}catch(Et){ht(Et)}}function xt(kt){kt.done?ft(kt.value):nt(kt.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:kt,loading:Et="Loading PDF…",noData:Ct="No PDF file specified.",onItemClick:yt,onLoadError:vt,onLoadProgress:bt,onLoadSuccess:Rt,onPassword:wt=defaultOnPassword,onSourceError:Tt,onSourceSuccess:Bt,options:Dt,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,zt]=useResolver(),{value:$t,error:Xt}=Mt,[Kt,Vt]=useResolver(),{value:_t,error:Ht}=Kt,Gt=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),Dt&&Dt!==Jt.current&&(warning$4(!dequal(Dt,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=Dt);const Wt=React.useRef({scrollPageIntoView:B0=>{const{dest:b0,pageNumber:L0,pageIndex:G0=L0-1}=B0;if(yt){yt({dest:b0,pageIndex:G0,pageNumber:L0});return}const f0=Ft.current[G0];if(f0){f0.scrollIntoView();return}warning$4(!1,`An internal link leading to page ${L0} 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:Gt,pages:Ft,viewer:Wt}),[]);function e0(){Bt&&Bt()}function s0(){Xt&&(warning$4(!1,Xt.toString()),Tt&&Tt(Xt))}function Yt(){zt({type:"RESET"})}React.useEffect(Yt,[At,zt]);const n0=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:B0}=At,b0=__rest$2(At,["url"]),L0=dataURItoByteString(B0);return Object.assign({data:L0},b0)}displayCORSWarning()}return At}),[At]);React.useEffect(()=>{const B0=makeCancellablePromise(n0());return B0.promise.then(b0=>{zt({type:"RESOLVE",value:b0})}).catch(b0=>{zt({type:"REJECT",error:b0})}),()=>{cancelRunningTask(B0)}},[n0,zt]),React.useEffect(()=>{if(!(typeof $t>"u")){if($t===!1){s0();return}e0()}},[$t]);function a0(){_t&&(Rt&&Rt(_t),Ft.current=new Array(_t.numPages),Gt.current.setDocument(_t))}function Zt(){Ht&&(warning$4(!1,Ht.toString()),vt&&vt(Ht))}React.useEffect(function(){Vt({type:"RESET"})},[Vt,$t]),React.useEffect(function(){if(!$t)return;const b0=Dt?Object.assign(Object.assign({},$t),Dt):$t,L0=__webpack_exports__getDocument(b0);bt&&(L0.onProgress=bt),wt&&(L0.onPassword=wt);const G0=L0,f0=G0.promise.then(H0=>{Vt({type:"RESOLVE",value:H0})}).catch(H0=>{G0.destroyed||Vt({type:"REJECT",error:H0})});return()=>{f0.finally(()=>G0.destroy())}},[Dt,Vt,$t]),React.useEffect(()=>{if(!(typeof _t>"u")){if(_t===!1){Zt();return}a0()}},[_t]),React.useEffect(function(){Gt.current.setViewer(Wt.current),Gt.current.setExternalLinkRel(ht),Gt.current.setExternalLinkTarget(gt)},[ht,gt]);const l0=React.useCallback((B0,b0)=>{Ft.current[B0]=b0},[]),h0=React.useCallback(B0=>{delete Ft.current[B0]},[]),E0=React.useMemo(()=>({imageResourcesPath:kt,linkService:Gt.current,onItemClick:yt,pdf:_t,registerPage:l0,renderMode:Pt,rotate:Lt,unregisterPage:h0}),[kt,yt,_t,l0,Pt,Lt,h0]),g0=React.useMemo(()=>makeEventProps(jt,()=>_t),[jt,_t]);function v0(){return jsxRuntimeExports.jsx(documentContext.Provider,{value:E0,children:tt})}function y0(){return At?_t==null?jsxRuntimeExports.jsx(Message$5,{type:"loading",children:typeof Et=="function"?Et():Et}):_t===!1?jsxRuntimeExports.jsx(Message$5,{type:"error",children:typeof ft=="function"?ft():ft}):v0():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"}},g0,{children:y0()}))});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 kt(){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){kt();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:kt,rotate:Et,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&&gt&&gt(makePageCallback(At,Ct))}function Rt(Dt){isCancelException(Dt)||(warning$4(!1,Dt.toString()),ht&&ht(Dt))}const wt=React.useMemo(()=>At.getViewport({scale:Ct*ft,rotation:Et}),[ft,At,Et,Ct]),Tt=React.useMemo(()=>At.getViewport({scale:Ct,rotation:Et}),[At,Et,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:Dt}=vt;Dt&&(Dt.width=0,Dt.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:kt?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:kt}=Be;invariant$1(ht,"Attempted to load page text content, but no page was specified.");const[Et,Ct]=useResolver(),{value:yt,error:vt}=Et,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()),zt=Mt;return Mt.promise.then($t=>{Ct({type:"RESOLVE",value:$t})}).catch($t=>{Ct({type:"REJECT",error:$t})}),()=>cancelRunningTask(zt)},[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 Dt(){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:kt,rotation:xt}),[ht,xt,kt]);return React.useLayoutEffect(function(){if(!ht||!yt)return;const{current:Mt}=bt;if(!Mt)return;Mt.innerHTML="";const zt=ht.streamTextContent({includeMarkedContent:!0}),$t={container:Mt,textContentSource:zt,viewport:Lt},Xt=new __webpack_exports__TextLayer($t),Kt=Xt;return Xt.render().then(()=>{const Vt=document.createElement("div");Vt.className="endOfContent",Mt.append(Vt);const _t=Mt.querySelectorAll('[role="presentation"]');if(Le){let Ht=0;yt.items.forEach((Gt,Ft)=>{if(!isTextItem(Gt))return;const Ut=_t[Ht];if(!Ut)return;const Jt=Le(Object.assign({pageIndex:gt,pageNumber:At,itemIndex:Ft},Gt));Ut.innerHTML=Jt,Ht+=Gt.str&&Gt.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:Dt,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:kt,renderForms:Et,rotate:Ct,scale:yt=1}=Ye;invariant$1(kt,"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 Dt(){wt&&(warning$4(!1,wt.toString()),ft&&ft(wt))}React.useEffect(function(){bt({type:"RESET"})},[bt,xt]),React.useEffect(function(){if(!xt)return;const zt=makeCancellablePromise(xt.getAnnotations()),$t=zt;return zt.promise.then(Xt=>{bt({type:"RESOLVE",value:Xt})}).catch(Xt=>{bt({type:"REJECT",error:Xt})}),()=>{cancelRunningTask($t)}},[bt,xt]),React.useEffect(()=>{if(Rt!==void 0){if(Rt===!1){Dt();return}Bt()}},[Rt]);function Pt(){At&&At()}function Lt(Mt){warning$4(!1,`${Mt}`),gt&&gt(Mt)}const jt=React.useMemo(()=>xt.getViewport({scale:yt,rotation:Ct}),[xt,Ct,yt]);return React.useEffect(function(){if(!kt||!xt||!nt||!Rt)return;const{current:zt}=Tt;if(!zt)return;const $t=jt.clone({dontFlip:!0}),Xt={accessibilityManager:null,annotationCanvasMap:null,annotationEditorUIManager:null,div:zt,l10n:null,page:xt,structTreeLayer:null,viewport:$t},Kt={annotations:Rt,annotationStorage:kt.annotationStorage,div:zt,imageResourcesPath:tt,linkService:nt,page:xt,renderForms:Et,viewport:$t};zt.innerHTML="";try{new __webpack_exports__AnnotationLayer(Xt).render(Kt),Pt()}catch(Vt){Lt(Vt)}return()=>{}},[Rt,tt,nt,xt,kt,Et,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:kt,devicePixelRatio:Et,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:Dt,onGetTextError:Pt,onGetTextSuccess:Lt,onLoadError:jt,onLoadSuccess:Mt,onRenderAnnotationLayerError:zt,onRenderAnnotationLayerSuccess:$t,onRenderError:Xt,onRenderSuccess:Kt,onRenderTextLayerError:Vt,onRenderTextLayerSuccess:_t,pageIndex:Ht,pageNumber:Gt,pdf:Ft,registerPage:Ut,renderAnnotationLayer:Jt=!0,renderForms:Wt=!1,renderMode:e0="canvas",renderTextLayer:s0=!0,rotate:Yt,scale:n0=defaultScale,unregisterPage:a0,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:g0,error:v0}=h0,y0=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 B0=isProvided(Gt)?Gt-1:Ht??null,b0=Gt??(isProvided(Ht)?Ht+1:null),L0=Yt??(g0?g0.rotate:null),G0=React.useMemo(()=>{if(!g0)return null;let T0=1;const Q0=n0??defaultScale;if(Zt||yt){const Y0=g0.getViewport({scale:1,rotation:L0});Zt?T0=Zt/Y0.width:yt&&(T0=yt/Y0.height)}return Q0*T0},[yt,g0,L0,n0,Zt]);React.useEffect(function(){return()=>{isProvided(B0)&&nt&&a0&&a0(B0)}},[nt,Ft,B0,a0]);function f0(){if(Mt){if(!g0||!G0)return;Mt(makePageCallback(g0,G0))}if(nt&&Ut){if(!isProvided(B0)||!y0.current)return;Ut(B0,y0.current)}}function H0(){v0&&(warning$4(!1,v0.toString()),jt&&jt(v0))}React.useEffect(function(){E0({type:"RESET"})},[E0,Ft,B0]),React.useEffect(function(){if(!Ft||!b0)return;const Q0=makeCancellablePromise(Ft.getPage(b0)),Y0=Q0;return Q0.promise.then(un=>{E0({type:"RESOLVE",value:un})}).catch(un=>{E0({type:"REJECT",error:un})}),()=>cancelRunningTask(Y0)},[E0,Ft,b0]),React.useEffect(()=>{if(g0!==void 0){if(g0===!1){H0();return}f0()}},[g0,G0]);const u0=React.useMemo(()=>g0&&isProvided(B0)&&b0&&isProvided(L0)&&isProvided(G0)?{_className:tt,canvasBackground:ft,customTextRenderer:kt,devicePixelRatio:Et,onGetAnnotationsError:wt,onGetAnnotationsSuccess:Tt,onGetStructTreeError:Bt,onGetStructTreeSuccess:Dt,onGetTextError:Pt,onGetTextSuccess:Lt,onRenderAnnotationLayerError:zt,onRenderAnnotationLayerSuccess:$t,onRenderError:Xt,onRenderSuccess:Kt,onRenderTextLayerError:Vt,onRenderTextLayerSuccess:_t,page:g0,pageIndex:B0,pageNumber:b0,renderForms:Wt,renderTextLayer:s0,rotate:L0,scale:G0}:null,[tt,ft,kt,Et,wt,Tt,Bt,Dt,Pt,Lt,zt,$t,Xt,Kt,Vt,_t,g0,B0,b0,Wt,s0,L0,G0]),Z0=React.useMemo(()=>makeEventProps(l0,()=>g0&&(G0?makePageCallback(g0,G0):void 0)),[l0,g0,G0]),m0=`${B0}@${G0}/${L0}`;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 S0(){return s0?jsxRuntimeExports.jsx(TextLayer,{},`${m0}_text`):null}function P0(){return Jt?jsxRuntimeExports.jsx(AnnotationLayer,{},`${m0}_annotations`):null}function M0(){return jsxRuntimeExports.jsxs(pageContext.Provider,{value:u0,children:[w0(),S0(),P0(),gt]})}function x0(){return b0?Ft===null||g0===void 0||g0===null?jsxRuntimeExports.jsx(Message$5,{type:"loading",children:typeof bt=="function"?bt():bt}):Ft===!1||g0===!1?jsxRuntimeExports.jsx(Message$5,{type:"error",children:typeof Ct=="function"?Ct():Ct}):M0():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":b0,ref:mergeRefs$2(vt,y0),style:{"--scale-factor":`${G0}`,backgroundColor:ft||"white",position:"relative",minWidth:"min-content",minHeight:"min-content"}},Z0,{children:x0()}))}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","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_v2_reduced_aggregation_interval","id_video_recording_enabled","barcode_shadow_capture","enable_app_logs"],GLOBAL_FLAGS=["new_fingerprint","enable_sentry_web","enable_app_logs"],ID_MODULE_FLAGS=["id_face_readability","id_face_detector","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_v2_reduced_aggregation_interval","id_video_recording_enabled","barcode_shadow_capture"],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,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_v2_reduced_aggregation_interval:!1,id_video_recording_enabled:!1,barcode_shadow_capture:!1,enable_app_logs:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null,statsigClientInstance=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(!isOfflineMode()){if(initPromise)return initPromise;initPromise=(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}},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(Be){return Be?getFeatureFlag("id_v2_reduced_aggregation_interval")?1500:3e3:2e3}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(tt)})}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.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.36";function getBarcodeEnhanceModelUrl(){return`${getWasmBaseUrl()}/${wasmVersion}/models/barcode_enhance_896x224_fp16.ortmodelv2`}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=Be?WasmWorkflowProfileName.OnDeviceSelfieWorkflow:WasmWorkflowProfileName.SelfieWithQualityMetrics,ft=WasmWorkflowProfileName.SelfieVideoSelfie,ht=WasmWorkflowProfileName.IdVideoSelfie_2_01;return[tt,ht,nt,ft]}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 kt of Ye){const Et=getWasmWorkflowProfile(kt);if(!Et)throw new Error(`WasmWorkflowProfile not found: ${kt}`);const Ct=Et.modelNames;let yt=[];for(const vt of Ct)yt.push(`${tt}/${wasmVersion}/models/${vt}`);At.set(Et.wasmWorkflowType,yt),xt.set(Et.detectionType,Et)}return{wasmModulePath:nt,wasmSimdModulePath:ft,glueCodePath:ht,versionsFilePath:gt,workflowModels:At,enableSIMD:!0,profiles:xt,wasmVersion}}const version$3="1.91.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 kt=new URL(Be,location.href),{blockedURI:Et}=xt;Et!==kt.href&&Et!==kt.protocol.slice(0,-1)&&Et!==kt.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(kt=>{const Et=new MessageChannel;Et.port1.onmessage=()=>kt(),Et.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$6="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(Et){const Ct=[...Et];return{current:()=>Ct[0],postpone(){const yt=Ct.shift();yt!==void 0&&Ct.push(yt)},exclude(){Ct.shift()}}}(gt),xt=function(Et,Ct){let yt=0;return()=>Math.random()*Math.min(Ct,Et*Math.pow(2,yt++))}(100,3e3),kt=new Set;return[At.current(),(Et,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()-Et.getTime()<50,wt=At.current();wt&&Rt&&!kt.has(wt)&&(kt.add(wt),yt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,yt??Et.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=Et=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:Et}),kt=Le(gt);return kt.then(()=>xt(),xt),kt.catch(Et=>{if(ft!=null||(ft=Et),Ye.length>=5)throw ft;const Ct=nt(At,Et);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(kt,Et){const Ct={},yt={};for(const[vt,bt]of Object.entries(kt))Et.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 kt=[],Et=()=>{kt.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",Et);return Et(),[kt,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$e);const kt=function(Et,Ct){return(Array.isArray(Et)?Et:[Et]).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(kt,F$1)}).catch(kt=>{throw xt(),function(Et){return Et instanceof Error&&Et.message===K?new Error(M$1):Et}(kt)}).then(([kt,Et])=>(xt(),kt.load({...nt,ldi:{attempts:Et,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$6,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(kt){ft(kt)}}function gt(xt){try{At(tt.throw(xt))}catch(kt){ft(kt)}}function At(xt){var kt;xt.done?nt(xt.value):(kt=xt.value,kt instanceof Ye?kt:new Ye(function(Et){Et(kt)})).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(kt){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,kt[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&kt[0]?tt.return:kt[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,kt[1])).done)return nt;switch(tt=0,nt&&(kt=[2&kt[0],nt.value]),kt[0]){case 0:case 1:nt=kt;break;case 4:return ht.label++,{value:kt[1],done:!1};case 5:ht.label++,tt=kt[1],kt=[0];continue;case 7:kt=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||kt[0]!==6&&kt[0]!==2)){ht=0;continue}if(kt[0]===3&&(!nt||kt[1]>nt[0]&&kt[1]<nt[3])){ht.label=kt[1];break}if(kt[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=kt;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(kt);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}kt=Le.call(Be,ht)}catch(Et){kt=[6,Et],tt=0}finally{Ye=nt=0}if(5&kt[0])throw kt[1];return{value:kt[0]?kt[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$5=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 kt=At.subarray(4*xt,4*(xt+1));kt[0]=Math.imul(kt[0],s$2[0]),kt[0]=l(kt[0],15),kt[0]=Math.imul(kt[0],s$2[1]),ht[0]=ht[0]^kt[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,kt[1]=Math.imul(kt[1],s$2[1]),kt[1]=l(kt[1],16),kt[1]=Math.imul(kt[1],s$2[2]),ht[1]=ht[1]^kt[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,kt[2]=Math.imul(kt[2],s$2[2]),kt[2]=l(kt[2],17),kt[2]=Math.imul(kt[2],s$2[3]),ht[2]=ht[2]^kt[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,kt[3]=Math.imul(kt[3],s$2[3]),kt[3]=l(kt[3],18),kt[3]=Math.imul(kt[3],s$2[0]),ht[3]=ht[3]^kt[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),kt=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^kt[14]<<16;case 14:xt[3]=xt[3]^kt[13]<<8;case 13:xt[3]=xt[3]^kt[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]^kt[11]<<24;case 11:xt[2]=xt[2]^kt[10]<<16;case 10:xt[2]=xt[2]^kt[9]<<8;case 9:xt[2]=xt[2]^kt[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]^kt[7]<<24;case 7:xt[1]=xt[1]^kt[6]<<16;case 6:xt[1]=xt[1]^kt[5]<<8;case 5:xt[1]=xt[1]^kt[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]^kt[3]<<24;case 3:xt[0]=xt[0]^kt[2]<<16;case 2:xt[0]=xt[0]^kt[1]<<8;case 1:xt[0]=xt[0]^kt[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,kt){var Et=tt+xt+".";if(typeof kt!="object"||Array.isArray(kt)){var Ct=Le.some(function(bt){return Et.startsWith(bt)}),yt=Ye.some(function(bt){return Et.startsWith(bt)});Ct&&!yt||(nt[xt]=kt)}else{var vt=p(kt,Le,Ye,Et);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$5("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$5("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 kt=String(xt);ht[kt]=(ht[kt]||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$5("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(Et){return setTimeout(Et,xt,kt)}))];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,kt})})})(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(kt){return L(ht,kt)}),At={},I.forEach(function(kt){var Et=L(ht,kt);gt.includes(Et)||(At[kt]=Et)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$5("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$5("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$5("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$5("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$5("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$5("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$5("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);
@@ -8146,7 +8146,7 @@ newPrivacyConsent.text4
8146
8146
  & button:focus {
8147
8147
  text-decoration: none !important;
8148
8148
  }
8149
- `,resolveSubtitle=(Be,Le,Ye,tt)=>!Le&&(Be!=null&&Be.trim())?Be:tt(Le?Ye?"documentCapture.tutorial.multiPageDocument.optionalPage.subtitle":"documentCapture.tutorial.multiPageDocument.subtitle":"documentCapture.tutorial.subtitle"),DocumentTutorial=({onContinue:Be,onStartCamera:Le,onlyAllowCapture:Ye=!1,onlyUpload:tt=!1,onlyPdf:nt=!1,isSubsequentPage:ft=!1,isOptionalSecondPage:ht=!1,onSkip:gt,skipButtonText:At,title:xt,subtitle:kt,buttonText:Et,token:Ct,documentType:yt,onNext:vt,onError:bt,hideHeaderBranding:Rt,hideFooterBranding:wt})=>{const{t:Tt}=useTranslation$1(),Bt=useTokens(),Dt=React.useRef(null),[Pt,Lt]=React.useState(!1),[jt,Mt]=React.useState(!1);let zt;ft?zt=Tt("documentCapture.tutorial.multiPageDocument.title"):xt!=null&&xt.trim()?zt=xt:zt=Tt("documentCapture.tutorial.title");const $t=resolveSubtitle(kt,ft,ht,Tt),Xt=Et??Tt("documentCapture.tutorial.captureButton"),Kt=Et??Tt("documentCapture.tutorial.uploadButton"),Vt=Et??Tt("documentCapture.tutorial.continue"),_t=At??Tt("documentCapture.tutorial.skipButton"),Ht=At??Tt("documentCapture.button.nextPage"),Gt=!Ye&&!tt,Ft=ht?"image/png,image/jpeg":nt?"application/pdf":"image/*,application/pdf",Ut=()=>Lt(!0),Jt=React.useCallback(()=>Lt(!1),[]),Wt=()=>{var Zt;Ye?Le==null||Le():tt||!isMobile$2?(Zt=Dt.current)==null||Zt.click():Ut()},e0=ht||ft?Ht:tt?Kt:Ye?Xt:Vt;React.useEffect(()=>{if(!Pt)return;const Zt=l0=>{l0.key==="Escape"&&Jt()};return document.addEventListener("keydown",Zt),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",Zt),document.body.style.overflow=""}},[Pt,Jt]);const s0=()=>{var Zt;(Zt=Dt.current)==null||Zt.click()},Yt=Zt=>{var h0;const l0=(h0=Zt.target.files)==null?void 0:h0[0];l0&&(Be(l0),Gt&&Jt()),Zt.target.value=""},n0=()=>{Jt(),Le==null||Le()},a0=async()=>{if(!(!Ct||!yt||jt)){Mt(!0);try{await finalizeDocument({token:Ct,docType:yt}),vt()}catch{bt()}finally{Mt(!1)}}};return jt?jsxRuntimeExports.jsx(Page,{hideFooterBranding:!0,children:jsxRuntimeExports.jsx(Flex$1,{hFull:!0,wFull:!0,children:jsxRuntimeExports.jsx(Spinner$4,{title:Tt("common.processing"),fullScreen:!1})})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("input",{ref:Dt,type:"file",accept:Ft,onChange:Yt,"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:1,height:1,opacity:0,pointerEvents:"none"}}),jsxRuntimeExports.jsx(Page,{title:zt,titleId:"document-capture-tutorial-heading",subtitle:$t,hideHeaderBranding:Rt,hideFooterBranding:wt,"data-testid":"document-tutorial-container",...ft?{"data-second-page-optional":String(ht)}:{},children:jsxRuntimeExports.jsxs(Flex$1,{direction:"column",justify:"space-between",flex:1,children:[jsxRuntimeExports.jsx(Box,{hFull:!0,xsH:"250px",xsPx:0,maxW:"400px",m:"auto","aria-hidden":"true",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntimeExports.jsx(Flex$1,{hFull:!0,w:"auto",align:"center",justify:"center",children:jsxRuntimeExports.jsx(Image$d,{src:documentCaptureTutorialSvg,alt:"",objectFit:"contain"})})}),jsxRuntimeExports.jsxs(Flex$1,{px:2,py:4,display:"flex",direction:"column",gap:3,children:[jsxRuntimeExports.jsx(Button$a,{onClick:Wt,"data-testid":"tutorial-open-options-button",disabled:jt,children:e0}),ht&&jsxRuntimeExports.jsx(Button$a,{variant:"link",onClick:a0,disabled:jt,className:"centered-link",children:Tt("documentCapture.button.allPagesCaptured")}),gt?jsxRuntimeExports.jsx(Box,{display:"flex",justifyContent:"center",children:jsxRuntimeExports.jsx(Button$a,{variant:"link",onClick:gt,"data-testid":"tutorial-skip-button",className:"centered-link",children:_t})}):null]})]})}),isMobile$2&&Gt&&Pt&&typeof document<"u"&&ReactDOM.createPortal(jsxRuntimeExports.jsx(Box,{position:"fixed",inset:0,w:"100vw",h:"100dvh",zIndex:999999,bg:"rgba(0, 0, 0, 0.8)",role:"dialog","aria-modal":!0,"aria-labelledby":"document-capture-choice-dialog-title","aria-describedby":"document-capture-choice-dialog-description",onClick:Zt=>Zt.target===Zt.currentTarget&&Jt(),children:jsxRuntimeExports.jsx(Flex$1,{direction:"column",flex:1,minH:"100%",justify:"flex-end",px:0,maxW:"468px",m:"0 auto",onClick:Jt,children:jsxRuntimeExports.jsxs(BottomSheet,{bg:Bt.color.surface.neutral.light,direction:"column",px:Bt.spacing[6],pb:Bt.spacing[6],pt:Bt.spacing[10],borderRadius:"40px 40px 0 0",position:"relative",onClick:Zt=>Zt.stopPropagation(),children:[jsxRuntimeExports.jsx(Flex$1,{position:"absolute",top:Bt.spacing[2],left:0,right:0,justify:"center","aria-hidden":"true",children:jsxRuntimeExports.jsx(SvgHandle,{})}),jsxRuntimeExports.jsxs(ModalButtonsWrapper,{direction:"column",wFull:!0,align:"flex-start",children:[!tt&&Le?jsxRuntimeExports.jsxs(Button$a,{onClick:n0,"data-testid":"tutorial-camera-button",variant:"link",w:"auto",children:[jsxRuntimeExports.jsx(SvgCameraIcon,{}),jsxRuntimeExports.jsx(Text$8,{letterSpacing:"-0.5px",lineHeight:"115%",fontWeight:Bt.typography.fontWeight.medium,pl:Bt.spacing[2],children:Tt("documentCapture.tutorial.takePhoto")})]}):null,Ye?null:jsxRuntimeExports.jsxs(Button$a,{onClick:s0,"data-testid":"tutorial-continue-button",variant:"link",w:"auto",children:[jsxRuntimeExports.jsx(SvgFileIcon,{}),jsxRuntimeExports.jsx(Text$8,{letterSpacing:"-0.5px",lineHeight:"115%",fontWeight:Bt.typography.fontWeight.medium,pl:Bt.spacing[2],children:Tt("documentCapture.tutorial.uploadButton")})]})]})]})})}),document.body)]})},DocumentCaptureInside=({goNext:Be,onError:Le,token:Ye,skipIntroScreen:tt=!1,title:nt,subtitle:ft,tutorialText:ht,uiConfig:gt,onClose:At,allowSkipDocumentCapture:xt=!0,onlyAllowCapture:kt=!1,onlyUpload:Et=!1,onlyPdf:Ct=!1,documentType:yt="addressStatement",sendBase64:vt=!1,numberOfTries:bt=3,isDeepsightEnabled:Rt=!1})=>{var h0,E0,g0,v0,y0,B0,b0,L0,G0,f0,H0,u0;useModuleEvents({module:eventModuleNames.document,token:Ye==null?void 0:Ye.token,screen:eventScreenNames.documentCameraCapture,payload:{moduleVersion:"2"}});const[wt,Tt]=React.useState(tt?"permissions":"tutorial"),[Bt,Dt]=React.useState(null),[Pt,Lt]=React.useState(null),[jt,Mt]=React.useState(0),zt=multiPageDocumentTypes.includes(yt),[$t,Xt]=React.useState(!1),[Kt,Vt]=React.useState(!1),[_t,Ht]=React.useState(!1),[Gt,Ft]=React.useState(void 0),Ut=yt==="capture"?"addressStatement":yt,Jt=(Z0,m0)=>{Dt(Z0),Lt(m0),Tt("review")},Wt=()=>Tt("permissions"),e0=()=>Tt("camera"),s0=()=>{Dt(null),Tt("tutorial")},Yt=()=>{Dt(null),Lt(null),Xt(!0),Tt("tutorial")},n0=()=>{if(Ht(!1),Ft(void 0),$t||Kt){s0(),Xt(!1),Vt(!1),Dt(null),Lt(null);return}Pt==="file-picker"?s0():e0()},a0=Z0=>{Mt(m0=>m0+1),Ft(Z0),Ht(!0)},Zt=(gt==null?void 0:gt.closeButton)!=null?{show:gt.closeButton.show??!0,position:gt.closeButton.position,offset:gt.closeButton.offset,onClose:At}:void 0,l0=gt!=null&&gt.branding?{...(h0=gt.branding.logo)!=null&&h0.src||(E0=gt.branding.logo)!=null&&E0.height?{logo:{src:(g0=gt.branding.logo)==null?void 0:g0.src,height:(v0=gt.branding.logo)==null?void 0:v0.height}}:{},hideHeaderBranding:gt.branding.hideHeaderBranding,hideFooterBranding:gt.branding.hideFooterBranding}:void 0;return _t?jsxRuntimeExports.jsx(PageThemeProvider,{closeButton:Zt,branding:l0,children:jsxRuntimeExports.jsx(DocumentCaptureError,{retriesExhausted:jt>=bt,onRetry:n0,onError:()=>Le==null?void 0:Le({type:"NO_MORE_TRIES",message:"Document capture retries exhausted"}),remainingAttempts:bt-jt,status:Gt})}):wt==="tutorial"?jsxRuntimeExports.jsx(PageThemeProvider,{closeButton:Zt,branding:l0,children:jsxRuntimeExports.jsx(DocumentTutorial,{onContinue:Z0=>Jt(Z0,"file-picker"),onStartCamera:Et?void 0:Wt,onlyAllowCapture:kt,onlyUpload:Et,onlyPdf:Ct,onSkip:xt&&!$t?Be:void 0,onError:a0,isSubsequentPage:$t,token:Ye==null?void 0:Ye.token,documentType:Ut,isOptionalSecondPage:$t&&Kt,title:$t?((B0=(y0=ht==null?void 0:ht.step2)==null?void 0:y0.title)==null?void 0:B0.trim())||void 0:((L0=(b0=ht==null?void 0:ht.step1)==null?void 0:b0.title)==null?void 0:L0.trim())||(nt==null?void 0:nt.trim())||void 0,subtitle:$t?((f0=(G0=ht==null?void 0:ht.step2)==null?void 0:G0.subtitle)==null?void 0:f0.trim())||void 0:((u0=(H0=ht==null?void 0:ht.step1)==null?void 0:H0.subtitle)==null?void 0:u0.trim())||(ft==null?void 0:ft.trim())||void 0,hideHeaderBranding:l0==null?void 0:l0.hideHeaderBranding,hideFooterBranding:l0==null?void 0:l0.hideFooterBranding,onNext:Be})}):wt==="permissions"?jsxRuntimeExports.jsx(Permissions,{onContinue:e0,emitError:()=>Le==null?void 0:Le({type:"PERMISSION_DENIED",message:"Camera permission denied"}),uiConfig:gt??{},onClose:At??(()=>{})}):wt==="camera"?jsxRuntimeExports.jsx(DocumentCameraView,{token:Ye==null?void 0:Ye.token,onCapture:Z0=>Jt(Z0,"camera"),uiConfig:gt,onClose:At,isDeepsightEnabled:Rt}):wt==="review"&&Bt!=null?jsxRuntimeExports.jsx(PageThemeProvider,{closeButton:Zt,branding:l0,children:jsxRuntimeExports.jsx(DocumentReview,{selectedFile:Bt,token:Ye==null?void 0:Ye.token,documentType:Ut,documentTitle:nt,sendBase64:vt,onError:a0,onAddSecondPage:zt?Yt:void 0,onSecondPageUploadResult:zt?Z0=>{Vt((Z0==null?void 0:Z0.isOptional)??!1)}:void 0,onRetry:n0,onNext:Be})}):null},DocumentCapture$1=Be=>{var Le;return jsxRuntimeExports.jsx(IncodeProvider,{token:(Le=Be.token)==null?void 0:Le.token,uiConfig:Be.uiConfig,children:jsxRuntimeExports.jsx(DocumentCaptureInside,{...Be})})};function DocumentCaptureModule({onSuccess:Be,token:Le,config:Ye,uiConfig:tt,flow:nt}){return jsxRuntimeExports.jsx(DocumentCapture$1,{goNext:Be,onError:()=>Be(),sendGeolocation:!1,token:{token:Le},isDeepsightEnabled:nt.ds===!0,sendBase64:!0,allowSkipDocumentCapture:Ye.allowSkipDocumentCapture,skipIntroScreen:!1,documentType:Ye.processingType,numberOfTries:3,title:Ye.title,subtitle:Ye.text,tutorialText:{step1:{title:Ye.title,subtitle:Ye.text}},uiConfig:tt})}const getLocationSuggestionsURL="/omni/externalVerification/addressAutocomplete";function getLocationSuggestions({token:Be,search:Le}){return api.post(getLocationSuggestionsURL,{search:Le},{headers:{"X-Incode-Hardware-Id":Be}}).then(Ye=>Ye.data).catch(Ye=>{var tt;return Promise.reject(((tt=Ye==null?void 0:Ye.response)==null?void 0:tt.data)??Ye)})}function sendEkyb({body:Be,token:Le}){return api.post("/omni/externalVerification/ekyb",Be,{headers:{"X-Incode-Hardware-Id":Le}}).then(Ye=>Ye.data)}const CheckIcon=()=>jsxRuntimeExports.jsx("svg",{width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntimeExports.jsx("path",{d:"M1 5L4.5 8.5L11 1.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),CIRCLE_SIZE=32,CONNECTOR_TOP=CIRCLE_SIZE/2,Stepper=({steps:Be,currentStep:Le})=>{const Ye=useTokens();return jsxRuntimeExports.jsx(Flex$1,{as:"ol",display:"flex",style:{listStyle:"none",padding:0,margin:0,width:"100%"},"aria-label":"Progress",children:Be.map((tt,nt)=>{const ft=nt<Le,ht=nt===Le,gt=nt===0,At=nt===Be.length-1,xt=nt<=Le?Ye.color.surface.primary[500]:Ye.color.surface.neutral[200],kt=nt<Le?Ye.color.surface.primary[500]:Ye.color.surface.neutral[200];return jsxRuntimeExports.jsxs(Box,{as:"li",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",position:"relative"},"aria-current":ht?"step":void 0,children:[!gt&&jsxRuntimeExports.jsx(Box,{style:{position:"absolute",top:CONNECTOR_TOP,left:0,right:"50%",height:2,backgroundColor:xt,transform:"translateY(-50%)"}}),!At&&jsxRuntimeExports.jsx(Box,{style:{position:"absolute",top:CONNECTOR_TOP,left:"50%",right:0,height:2,backgroundColor:kt,transform:"translateY(-50%)"}}),jsxRuntimeExports.jsx(Box,{style:{width:CIRCLE_SIZE,height:CIRCLE_SIZE,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative",zIndex:1,...ft&&{backgroundColor:Ye.color.surface.primary[500],border:"none"},...ht&&{backgroundColor:Ye.color.surface.neutral[0],border:`2px solid ${Ye.color.surface.primary[500]}`},...!ft&&!ht&&{backgroundColor:Ye.color.surface.neutral[0],border:`2px dashed ${Ye.color.surface.neutral[300]}`}},children:ft?jsxRuntimeExports.jsx(CheckIcon,{}):jsxRuntimeExports.jsx(Text$8,{style:{fontSize:13,fontWeight:ht?700:400,color:ht?Ye.color.surface.primary[500]:Ye.color.surface.neutral[400],lineHeight:1},children:nt+1})}),jsxRuntimeExports.jsx(Text$8,{style:{marginTop:6,fontSize:11,fontWeight:ht?700:400,color:ht?Ye.color.surface.primary[500]:Ye.color.surface.neutral[400],whiteSpace:"nowrap",textAlign:"center"},children:tt})]},tt)})})},UBO_INPUT_LIMIT=8,DIRECTOR_INPUT_LIMIT=8,DIRECTORS_SUPPORTED_COUNTRIES=["GB","FR","ES","NL","IT","DE","BG","MT","LT","DK","HK","IN"],FIELD_ORDER=["name-user_input","taxId-user_input","street-user_input","houseNo-user_input","address2-user_input","city-user_input","state-user_input","postalCode-user_input"],OPTIONAL_FIELDS={addressLine2:"addressLine2"},FIELD_NAME_MAPPING={"name-user_input":"businessName","street-user_input":"street","houseNo-user_input":"houseNo","address2-user_input":"addressLine2","city-user_input":"city","state-user_input":"state","postalCode-user_input":"postalCode","taxId-user_input":"taxId"},VERIFICATION_STATES={IDLE:"",VERIFYING:"verifying...",SUCCESS:"success",FAILED:"failed"},COUNTRIES_WITH_CNPJ_VALIDATION=["BR"],COUNTRIES_WITH_NO_TAX_ID_VALIDATION=["US","FR","CM","KE"],BUSINESS_NAME_OPTIONAL_COUNTRIES=[],ADDRESS_FIELDS$1=["street","houseNo","addressLine2","city","state","postalCode"],ALL_COUNTRIES_OPTIONAL_FIELDS=["ubo","director"],useDirectorManagement=()=>{const[Be,Le]=React.useState(1);return{directorCount:Be,handleAddDirector:()=>{Be<DIRECTOR_INPUT_LIMIT&&Le(Be+1)},extractDirectorNames:nt=>{var ht,gt;const ft=[];for(let At=1;At<=Be;At++){const xt=((ht=nt[`directorName-${At}`])==null?void 0:ht.trim())??"",kt=((gt=nt[`directorSurname-${At}`])==null?void 0:gt.trim())??"";(xt||kt)&&ft.push([xt,kt].filter(Boolean).join(" ")),delete nt[`directorName-${At}`],delete nt[`directorSurname-${At}`]}return ft}}},useUboManagement=()=>{const[Be,Le]=React.useState(1);return{uboCount:Be,handleAddUbo:()=>{Be<UBO_INPUT_LIMIT&&Le(Be+1)},extractUboNames:nt=>{var ht,gt;const ft=[];for(let At=1;At<=Be;At++){const xt=((ht=nt[`uboName-${At}`])==null?void 0:ht.trim())??"",kt=((gt=nt[`uboSurname-${At}`])==null?void 0:gt.trim())??"";(xt||kt)&&ft.push([xt,kt].filter(Boolean).join(" ")),delete nt[`uboName-${At}`],delete nt[`uboSurname-${At}`]}return ft}}},PREFILL_SOURCE_COUNTRY={MX_KYB_PREFILL:"MX"};function getPrefillCountry(Be){return Be?PREFILL_SOURCE_COUNTRY[Be]:void 0}const KYB_PREFILL_URL="/omni/externalVerification/ekyb-prefill";function buildKybPrefillRequest(Be,Le="MX"){return{plugins:["ekyb-prefill"],source:"MX_KYB_PREFILL",country:Le,taxId:Be}}const PREFILL_KEYS=["name","tin","registrationStatus","entityType","taxIdEffectiveDate","incorporationDate","email"],SENTINEL_VALUES=new Set(["unknown","not found"]);function normalizeKybPrefillResponse(Be){return PREFILL_KEYS.reduce((Le,Ye)=>{var nt;const tt=(nt=Be==null?void 0:Be[Ye])==null?void 0:nt.trim();return tt&&!SENTINEL_VALUES.has(tt.toLowerCase())&&Le.push({key:Ye,sub_label:tt}),Le},[])}async function requestKybPrefill({token:Be,taxId:Le,country:Ye="MX"}){const tt=buildKybPrefillRequest(Le,Ye),nt=await api.post(KYB_PREFILL_URL,tt,{headers:{"X-Incode-Hardware-Id":Be}});return normalizeKybPrefillResponse(nt.data)}async function sendKybPrefill(Be){return requestKybPrefill(Be)}const isFeatureAllowedOnEnvironment$1=Be=>{if(typeof window>"u")return!1;const Le=window.location.origin;return Be.some(Ye=>Le.includes(Ye))},BASE_EKYB_COUNTRIES=["BR","US","GB","ES","IT","FR","DE","IL","MX","NL","CN","BG","MT","LT","DK","HK","IN"],STAGING_DEMO_COUNTRIES=["NG","CM","KE"],getEkybCountryCodes=()=>{const Be=[...BASE_EKYB_COUNTRIES];return isFeatureAllowedOnEnvironment$1(["localhost","stage","demo"])&&Be.push(...STAGING_DEMO_COUNTRIES),Be},normalizeForSearch=Be=>Be.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),COUNTRY_NAME_OVERRIDES={US:"United States"},COUNTRY_SEARCH_ALIASES={US:["USA","US","United States of America"]},getCountryDisplayName=Be=>COUNTRY_NAME_OVERRIDES[Be]??countries$1[Be].name,getCountrySearchValue=Be=>[getCountryDisplayName(Be),...COUNTRY_SEARCH_ALIASES[Be]??[]].map(normalizeForSearch).join(" "),EKYB_COUNTRY_OPTIONS=getEkybCountryCodes().map(Be=>({code:Be,emoji:countries$1[Be].emoji,name:getCountryDisplayName(Be),searchableValue:getCountrySearchValue(Be)})).sort((Be,Le)=>Be.name.localeCompare(Le.name)),ClearIcon=()=>jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntimeExports.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),SearchIcon=({color:Be})=>jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntimeExports.jsx("path",{d:"M7 13A6 6 0 1 0 7 1a6 6 0 0 0 0 12ZM13 13l2 2",stroke:Be,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),CountryGridSelector=({value:Be,onChange:Le,title:Ye,subtitle:tt,searchPlaceholder:nt,countries:ft})=>{const ht=useTokens(),{t:gt}=useTranslation$1(),[At,xt]=React.useState(""),kt=Ye??gt("ekyb.countrySelector.title"),Et=tt??gt("ekyb.countrySelector.subtitle"),Ct=nt??gt("ekyb.countrySelector.searchPlaceholder"),yt=ft?EKYB_COUNTRY_OPTIONS.filter(Rt=>ft.includes(Rt.code)):EKYB_COUNTRY_OPTIONS,vt=normalizeForSearch(At),bt=yt.filter(Rt=>Rt.searchableValue.includes(vt));return jsxRuntimeExports.jsxs(Box,{display:"flex",style:{flexDirection:"column",gap:24},children:[jsxRuntimeExports.jsxs(Box,{display:"flex",style:{flexDirection:"column",gap:4},children:[jsxRuntimeExports.jsx(Text$8,{fontSize:ht.primitives.typography.fontSize.xl,fontWeight:ht.primitives.typography.fontWeight.bold,children:kt}),jsxRuntimeExports.jsx(Text$8,{color:ht.color.text.body.secondary,children:Et})]}),jsxRuntimeExports.jsxs(Box,{display:"flex",style:{alignItems:"center",gap:8,border:`1px solid ${At?ht.color.surface.primary[500]:ht.color.surface.neutral[300]}`,borderRadius:ht.radius.medium,padding:"10px 14px",backgroundColor:ht.color.surface.neutral[0],transition:"border-color 150ms ease"},children:[jsxRuntimeExports.jsx(SearchIcon,{color:ht.color.surface.neutral[400]}),jsxRuntimeExports.jsx(Box,{as:"input",style:{flex:1,border:"none",outline:"none",fontSize:14,color:ht.color.surface.neutral[900],backgroundColor:"transparent"},placeholder:Ct,value:At,"aria-label":Ct,onChange:Rt=>xt(Rt.target.value)}),At&&jsxRuntimeExports.jsx(Box,{as:"button",type:"button","aria-label":gt("common.clear"),style:{display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",color:ht.color.surface.neutral[400],flexShrink:0},onClick:()=>xt(""),children:jsxRuntimeExports.jsx(ClearIcon,{})})]}),jsxRuntimeExports.jsxs(Box,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(120px, 1fr))",gap:12},role:"listbox","aria-label":kt,children:[bt.map(({code:Rt,emoji:wt,name:Tt})=>{const Bt=Be===Rt;return jsxRuntimeExports.jsxs(Box,{as:"button",type:"button",role:"option","aria-selected":Bt,style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:8,padding:"16px 8px",borderRadius:ht.radius.medium,border:`2px solid ${Bt?ht.color.surface.primary[500]:ht.color.surface.neutral[200]}`,backgroundColor:Bt?ht.color.surface.primary[50]:ht.color.surface.neutral[0],cursor:"pointer",transition:"border-color 150ms ease, background-color 150ms ease",outline:"none"},onClick:()=>Le(Rt),children:[jsxRuntimeExports.jsx(Text$8,{style:{fontSize:36,lineHeight:1},children:wt}),jsxRuntimeExports.jsx(Text$8,{style:{fontSize:11,fontWeight:Bt?600:400,color:Bt?ht.color.surface.primary[500]:ht.color.surface.neutral[700],textAlign:"center",lineHeight:1.3,wordBreak:"break-word"},children:Tt})]},Rt)}),bt.length===0&&jsxRuntimeExports.jsx(Box,{style:{gridColumn:"1 / -1",textAlign:"center",padding:24},children:jsxRuntimeExports.jsx(Text$8,{style:{color:ht.color.surface.neutral[400],fontSize:14},children:gt("ekyb.countrySelector.noResults")})})]})]})},StyledStep=styled(Flex$1)({[mediaQueries.md]:{padding:tokens.spacing[8],backgroundColor:tokens.primitives.color.neutral.light,boxShadow:tokens.primitives.shadow.lg,borderRadius:tokens.radius.small}}),StyledFlexDiv=styled.div({[mediaQueries.md]:{display:"flex",flexDirection:"row-reverse",gap:tokens.spacing[4]}}),ResponsiveButton=styled(Button$a)({[mediaQueries.md]:{maxWidth:"fit-content",margin:0,fontSize:tokens.primitives.typography.fontSize.base}}),StepCountry=({value:Be,onChange:Le,onContinue:Ye,countries:tt})=>{const{t:nt}=useTranslation$1();return jsxRuntimeExports.jsxs(StyledStep,{direction:"column",wFull:!0,hFull:!0,children:[jsxRuntimeExports.jsx(CountryGridSelector,{value:Be,onChange:Le,countries:tt}),jsxRuntimeExports.jsx(Spacer$1,{size:tokens.spacing[6]}),jsxRuntimeExports.jsx(StyledFlexDiv,{children:jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"primary",disabled:!Be,onClick:Ye,children:nt("ekyb.continue")})})]})},FIELD_DISPLAY=[{key:"name",labelKey:"ekyb.prefill.label.name",fallback:"Business Name"},{key:"tin",labelKey:"ekyb.prefill.label.tin",fallback:"Tax ID"},{key:"entityType",labelKey:"ekyb.prefill.label.entityType",fallback:"Entity Type"},{key:"registrationStatus",labelKey:"ekyb.prefill.label.registrationStatus",fallback:"Registration Status"},{key:"incorporationDate",labelKey:"ekyb.prefill.label.incorporationDate",fallback:"Incorporation Date"},{key:"taxIdEffectiveDate",labelKey:"ekyb.prefill.label.taxIdEffectiveDate",fallback:"Tax ID Effective Date"},{key:"email",labelKey:"ekyb.prefill.label.email",fallback:"Email"}],PrefillSummary=({results:Be,error:Le,onBack:Ye,onDone:tt,country:nt})=>{const{t:ft}=useTranslation$1(),ht=useIsMobileViewportWidth(),gt=new Map(Be.map(xt=>[xt.key,xt.sub_label])),At=FIELD_DISPLAY.filter(xt=>gt.has(xt.key));return jsxRuntimeExports.jsxs(StyledStep,{direction:"column",wFull:!0,hFull:!0,gap:tokens.spacing[4],forceGap:!0,children:[Le?jsxRuntimeExports.jsxs(Flex$1,{direction:"column",align:"center",justify:"center",wFull:!0,gap:tokens.spacing[4],style:{padding:`${tokens.spacing[8]} 0`},children:[jsxRuntimeExports.jsx(ErrorIcon,{size:50}),jsxRuntimeExports.jsx(Text$8,{fontSize:tokens.primitives.typography.fontSize.xl,fontWeight:tokens.primitives.typography.fontWeight.bold,style:{textAlign:"center"},children:ft(`ekyb.prefill.${nt}.error.title`,"Business Registration Number not found")}),jsxRuntimeExports.jsx(Text$8,{color:tokens.color.text.body.secondary,style:{textAlign:"center"},children:ft(`ekyb.prefill.${nt}.error.subtitle`,"We were unable to find a match for this Tax ID with the official database.")})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box,{display:"flex",style:{flexDirection:"column",gap:4},children:[jsxRuntimeExports.jsx(Text$8,{fontSize:tokens.primitives.typography.fontSize.xl,fontWeight:tokens.primitives.typography.fontWeight.bold,children:ft("ekyb.prefill.summary.title","Business details")}),jsxRuntimeExports.jsx(Text$8,{color:tokens.color.text.body.secondary,children:ft("ekyb.prefill.summary.subtitle","Review the retrieved business information.")})]}),jsxRuntimeExports.jsx(Box,{display:"flex",style:{flexDirection:"column"},children:At.map(xt=>jsxRuntimeExports.jsxs(Flex$1,{justify:"space-between",align:"center",wFull:!0,gap:tokens.spacing[4],style:{padding:`${tokens.spacing[3]} 0`,borderBottom:`1px solid ${tokens.color.surface.neutral[200]}`},children:[jsxRuntimeExports.jsx(Text$8,{color:tokens.color.text.body.secondary,children:ft(xt.labelKey,xt.fallback)}),jsxRuntimeExports.jsx(Text$8,{fontWeight:tokens.primitives.typography.fontWeight.bold,style:{textAlign:"right",wordBreak:"break-word"},children:gt.get(xt.key)})]},xt.key))})]}),jsxRuntimeExports.jsx(Spacer$1,{size:tokens.spacing[2]}),jsxRuntimeExports.jsxs(StyledFlexDiv,{children:[jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"primary",onClick:tt,mb:ht?tokens.spacing[4]:0,children:ft("ekyb.prefill.done","Done")}),!Le&&jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"secondary",onClick:Ye,children:ft("common.back")})]})]})},usStates={AL:{code:"AL",name:"Alabama"},AK:{code:"AK",name:"Alaska"},AZ:{code:"AZ",name:"Arizona"},AR:{code:"AR",name:"Arkansas"},CA:{code:"CA",name:"California"},CO:{code:"CO",name:"Colorado"},CT:{code:"CT",name:"Connecticut"},DE:{code:"DE",name:"Delaware"},FL:{code:"FL",name:"Florida"},GA:{code:"GA",name:"Georgia"},HI:{code:"HI",name:"Hawaii"},ID:{code:"ID",name:"Idaho"},IL:{code:"IL",name:"Illinois"},IN:{code:"IN",name:"Indiana"},IA:{code:"IA",name:"Iowa"},KS:{code:"KS",name:"Kansas"},KY:{code:"KY",name:"Kentucky"},LA:{code:"LA",name:"Louisiana"},ME:{code:"ME",name:"Maine"},MD:{code:"MD",name:"Maryland"},MA:{code:"MA",name:"Massachusetts"},MI:{code:"MI",name:"Michigan"},MN:{code:"MN",name:"Minnesota"},MS:{code:"MS",name:"Mississippi"},MO:{code:"MO",name:"Missouri"},MT:{code:"MT",name:"Montana"},NE:{code:"NE",name:"Nebraska"},NV:{code:"NV",name:"Nevada"},NH:{code:"NH",name:"New Hampshire"},NJ:{code:"NJ",name:"New Jersey"},NM:{code:"NM",name:"New Mexico"},NY:{code:"NY",name:"New York"},NC:{code:"NC",name:"North Carolina"},ND:{code:"ND",name:"North Dakota"},OH:{code:"OH",name:"Ohio"},OK:{code:"OK",name:"Oklahoma"},OR:{code:"OR",name:"Oregon"},PA:{code:"PA",name:"Pennsylvania"},RI:{code:"RI",name:"Rhode Island"},SC:{code:"SC",name:"South Carolina"},SD:{code:"SD",name:"South Dakota"},TN:{code:"TN",name:"Tennessee"},TX:{code:"TX",name:"Texas"},UT:{code:"UT",name:"Utah"},VT:{code:"VT",name:"Vermont"},VA:{code:"VA",name:"Virginia"},WA:{code:"WA",name:"Washington"},WV:{code:"WV",name:"West Virginia"},WI:{code:"WI",name:"Wisconsin"},WY:{code:"WY",name:"Wyoming"}},usStateOptions=Object.values(usStates).map(Be=>({value:Be.code,label:Be.name})),idTypeOptions=[{value:"TIN",label:"TIN"},{value:"SSS",label:"SSS"},{value:"GSIS",label:"GSIS"}],usStateCode=Be=>{const Le=Object.values(usStates).find(Ye=>Ye.name.toLowerCase()===Be.toLowerCase());return Le?Le.code:null},brStates={AC:{code:"AC",name:"Acre"},AL:{code:"AL",name:"Alagoas"},AP:{code:"AP",name:"Amapá"},AM:{code:"AM",name:"Amazonas"},BA:{code:"BA",name:"Bahia"},CE:{code:"CE",name:"Ceará"},DF:{code:"DF",name:"Distrito Federal"},ES:{code:"ES",name:"Espírito Santo"},GO:{code:"GO",name:"Goiás"},MA:{code:"MA",name:"Maranhão"},MT:{code:"MT",name:"Mato Grosso"},MS:{code:"MS",name:"Mato Grosso do Sul"},MG:{code:"MG",name:"Minas Gerais"},PA:{code:"PA",name:"Pará"},PB:{code:"PB",name:"Paraíba"},PR:{code:"PR",name:"Paraná"},PE:{code:"PE",name:"Pernambuco"},PI:{code:"PI",name:"Piauí"},RJ:{code:"RJ",name:"Rio de Janeiro"},RN:{code:"RN",name:"Rio Grande do Norte"},RS:{code:"RS",name:"Rio Grande do Sul"},RO:{code:"RO",name:"Rondônia"},RR:{code:"RR",name:"Roraima"},SC:{code:"SC",name:"Santa Catarina"},SP:{code:"SP",name:"São Paulo"},SE:{code:"SE",name:"Sergipe"},TO:{code:"TO",name:"Tocantins"}},brStateOptions=Object.values(brStates).map(Be=>({value:Be.code,label:Be.name})),brStateCode=Be=>{const Le=Object.values(brStates).find(Ye=>Ye.name.toLowerCase()===Be.toLowerCase());return Le?Le.code:null},inStates={AN:{code:"AN",name:"Andaman and Nicobar Islands"},AP:{code:"AP",name:"Andhra Pradesh"},AR:{code:"AR",name:"Arunachal Pradesh"},AS:{code:"AS",name:"Assam"},BR:{code:"BR",name:"Bihar"},CH:{code:"CH",name:"Chandigarh"},CT:{code:"CT",name:"Chhattisgarh"},DH:{code:"DH",name:"Dadra and Nagar Haveli and Daman and Diu"},DL:{code:"DL",name:"Delhi"},GA:{code:"GA",name:"Goa"},GJ:{code:"GJ",name:"Gujarat"},HR:{code:"HR",name:"Haryana"},HP:{code:"HP",name:"Himachal Pradesh"},JK:{code:"JK",name:"Jammu and Kashmir"},JH:{code:"JH",name:"Jharkhand"},KA:{code:"KA",name:"Karnataka"},KL:{code:"KL",name:"Kerala"},LA:{code:"LA",name:"Ladakh"},LD:{code:"LD",name:"Lakshadweep"},MP:{code:"MP",name:"Madhya Pradesh"},MH:{code:"MH",name:"Maharashtra"},MN:{code:"MN",name:"Manipur"},ML:{code:"ML",name:"Meghalaya"},MZ:{code:"MZ",name:"Mizoram"},NL:{code:"NL",name:"Nagaland"},OR:{code:"OR",name:"Odisha"},PY:{code:"PY",name:"Puducherry"},PB:{code:"PB",name:"Punjab"},RJ:{code:"RJ",name:"Rajasthan"},SK:{code:"SK",name:"Sikkim"},TN:{code:"TN",name:"Tamil Nadu"},TG:{code:"TG",name:"Telangana"},TR:{code:"TR",name:"Tripura"},UP:{code:"UP",name:"Uttar Pradesh"},UK:{code:"UK",name:"Uttarakhand"},WB:{code:"WB",name:"West Bengal"}},inStateOptions=Object.values(inStates).map(Be=>({value:Be.code,label:Be.name})),inStateCode=Be=>{const Le=Object.values(inStates).find(Ye=>Ye.name.toLowerCase()===Be.toLowerCase());return Le?Le.code:null},PHONE_NATIONAL_NUMBER_SOURCES=["US_CREDIT_BUREAU_3"],CNPJ_FORMATTED_LENGTH=18,CNPJ_CLEAN_LENGTH=14,INVALID_CNPJ_PATTERNS=["00000000000000","11111111111111","22222222222222","33333333333333","44444444444444","55555555555555","66666666666666","77777777777777","88888888888888","99999999999999"],CNPJ_FIRST_DIGIT_FACTORS=[5,4,3,2,9,8,7,6,5,4,3,2],CNPJ_SECOND_DIGIT_FACTORS=[6,5,4,3,2,9,8,7,6,5,4,3,2];function cleanCnpjString(Be){return Be.replace(/\./g,"").replace(/\//g,"").replace(/-/g,"")}function calculateVerificationDigit(Be,Le){let tt=11-Le.reduce((nt,ft,ht)=>nt+Number.parseInt(Be.charAt(ht),10)*ft,0)%11;return tt>=10&&(tt=0),tt.toString()}function validateCnpjNumber(Be){if(!Be||typeof Be!="string")return!1;let Le=Be.trim();if(Le.length===CNPJ_FORMATTED_LENGTH&&(Le=cleanCnpjString(Le)),Le.length!==CNPJ_CLEAN_LENGTH||!/^\d+$/.test(Le)||INVALID_CNPJ_PATTERNS.includes(Le))return!1;const Ye=calculateVerificationDigit(Le,CNPJ_FIRST_DIGIT_FACTORS);if(Le.charAt(12)!==Ye)return!1;const tt=calculateVerificationDigit(Le,CNPJ_SECOND_DIGIT_FACTORS);return Le.charAt(13)===tt}const TAX_ID_VALIDATORS={GB:{validate:Be=>/^\d{7,9}$|^GB\d{9}$/i.test(Be),errorKey:"ekyb.error.taxId-gb"},ES:{validate:Be=>/^[A-Za-z]\d{8}$|^[A-Za-z]\d{7}[A-Za-z]$|^\d{8}[A-Za-z]$/.test(Be),errorKey:"ekyb.error.taxId-es"},NL:{validate:Be=>/^NL\d{9}B\d{2}$|^\d{8}$/i.test(Be),errorKey:"ekyb.error.taxId-nl"},IT:{validate:Be=>/^[A-Za-z]{2}\d{6,7}$|^IT\d{8}$|^\d{11}$/i.test(Be),errorKey:"ekyb.error.taxId-it"},DE:{validate:Be=>/^DE\d{9}$|^HRB\d{3,6}$|^HRB\d{6}[A-Za-z]$|^HRA\d{4,6}$|^\d{4,6}$/i.test(Be),errorKey:"ekyb.error.taxId-de"},CN:{validate:Be=>/^[A-Za-z0-9]{18}$/.test(Be),errorKey:"ekyb.error.taxId-cn"},IL:{validate:Be=>/^\d{9}$/.test(Be),errorKey:"ekyb.error.taxId-il"},NG:{validate:Be=>/^\d{10}$/.test(Be),errorKey:"ekyb.error.taxId-ng"},MX:{validate:Be=>/^[A-Za-z]{3,4}\d{6}[A-Za-z0-9]{3}$/.test(Be),errorKey:"ekyb.error.taxId-mx"}},FieldInput=({name:Be,country:Le,state:Ye,register:tt,unregister:nt,clearErrors:ft,setValue:ht,trigger:gt,errors:At,optional:xt=!1,watch:kt})=>{var Lt,jt,Mt;const{t:Et}=useTranslation$1(),Ct=kt(Be)??"",yt=Le==="HK",vt=Le==="US",bt=Le==="BR",Rt=Le==="IN",wt=Le==="CN",Bt=!((wt||yt)&&Be==="addressLine2")&&(xt||!!OPTIONAL_FIELDS[Be]);React.useEffect(()=>{if(Be==="state"&&(vt||bt||Rt))return;let zt;Be==="taxId"&&(zt=kt(Be),nt(Be),ft(Be));const $t={required:Bt?!1:Et("ekyb.error.requiredField")};if(Be==="taxId")if(COUNTRIES_WITH_CNPJ_VALIDATION.includes(Le))$t.validate=Xt=>validateCnpjNumber(Xt)||Et("ekyb.error.invalidTaxId");else if(TAX_ID_VALIDATORS[Le]){const{validate:Xt,errorKey:Kt}=TAX_ID_VALIDATORS[Le];$t.validate=Vt=>Xt(Vt)||Et(Kt)}else COUNTRIES_WITH_NO_TAX_ID_VALIDATION.includes(Le)||($t.pattern={value:/^[a-zA-Z0-9]+$/,message:Et("ekyb.error.taxId")});tt(Be,$t),Be==="taxId"&&zt!==void 0&&ht(Be,zt)},[Be,Le,Bt,vt,bt,Rt,tt,nt,ft,ht,kt,Et]);const Dt=()=>{gt(Be)};let Pt=Et(`ekyb.${Be}`);return(wt||yt)&&Be==="addressLine2"&&(Pt=Et("ekyb.address")),Be==="taxId"&&(Pt=Et([`ekyb.${Le}.taxId.label`,"ekyb.taxId"])),Be==="state"?vt||bt||Rt?jsxRuntimeExports.jsx(DropdownComposed,{id:"state",label:Et("verification.labels.chooseState"),placeholder:Et("common.state.placeholder"),searchable:!0,searchByValue:!0,searchPlaceholder:Et("common.state.searchPlaceholder"),value:Ye,onChange:zt=>{ht("state",zt),Dt()},onBlur:Dt,options:bt?brStateOptions:Rt?inStateOptions:usStateOptions,error:(Lt=At==null?void 0:At.state)==null?void 0:Lt.message,required:!Bt,maxW:"720px"}):jsxRuntimeExports.jsx(InputComposed,{id:Be,name:Be,label:Pt,value:Ct,onChange:zt=>{ht(Be,zt.target.value)},onBlur:zt=>{ht(Be,zt.target.value.trim()),Dt()},error:(jt=At[Be])==null?void 0:jt.message,required:!Bt,maxW:"720px"}):jsxRuntimeExports.jsx(InputComposed,{id:Be,name:Be,label:Pt,value:Ct,onChange:zt=>{ht(Be,zt.target.value)},onBlur:zt=>{ht(Be,zt.target.value.trim()),Dt()},error:(Mt=At[Be])==null?void 0:Mt.message,required:!Bt,maxW:"720px"})},StepTaxId=({country:Be,register:Le,unregister:Ye,clearErrors:tt,setValue:nt,trigger:ft,watch:ht,errors:gt,onContinue:At,onBack:xt})=>{const{t:kt}=useTranslation$1(),Et=useIsMobileViewportWidth();return jsxRuntimeExports.jsxs(StyledStep,{direction:"column",wFull:!0,hFull:!0,gap:tokens.spacing[4],forceGap:!0,children:[jsxRuntimeExports.jsxs(Box,{display:"flex",style:{flexDirection:"column",gap:4},children:[jsxRuntimeExports.jsx(Text$8,{fontSize:tokens.primitives.typography.fontSize.xl,fontWeight:tokens.primitives.typography.fontWeight.bold,children:kt(["ekyb.prefill.taxId.title","Business Registration Number or Tax ID"])}),jsxRuntimeExports.jsx(Text$8,{color:tokens.color.text.body.secondary,children:kt([`ekyb.prefill.${Be}.taxId.subtitle`,"Please enter the official business tax identification or registration"])})]}),jsxRuntimeExports.jsx(FieldInput,{name:"taxId",country:Be,state:"",register:Le,unregister:Ye,clearErrors:tt,setValue:nt,trigger:ft,errors:gt,watch:ht}),jsxRuntimeExports.jsx(Spacer$1,{size:tokens.spacing[2]}),jsxRuntimeExports.jsxs(StyledFlexDiv,{children:[jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"primary",onClick:At,mb:Et?tokens.spacing[4]:0,children:kt("ekyb.continue")}),jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"secondary",onClick:xt,children:kt("common.back")})]})]})},AutocompleteWrapper=dt.div`
8149
+ `,resolveSubtitle=(Be,Le,Ye,tt)=>Be!=null&&Be.trim()?Be:tt(Le?Ye?"documentCapture.tutorial.multiPageDocument.optionalPage.subtitle":"documentCapture.tutorial.multiPageDocument.subtitle":"documentCapture.tutorial.subtitle"),DocumentTutorial=({onContinue:Be,onStartCamera:Le,onlyAllowCapture:Ye=!1,onlyUpload:tt=!1,onlyPdf:nt=!1,isSubsequentPage:ft=!1,isOptionalSecondPage:ht=!1,onSkip:gt,skipButtonText:At,title:xt,subtitle:kt,buttonText:Et,token:Ct,documentType:yt,onNext:vt,onError:bt,hideHeaderBranding:Rt,hideFooterBranding:wt})=>{const{t:Tt}=useTranslation$1(),Bt=useTokens(),Dt=React.useRef(null),[Pt,Lt]=React.useState(!1),[jt,Mt]=React.useState(!1);let zt;xt!=null&&xt.trim()?zt=xt:ft?zt=Tt("documentCapture.tutorial.multiPageDocument.title"):zt=Tt("documentCapture.tutorial.title");const $t=resolveSubtitle(kt,ft,ht,Tt),Xt=Et??Tt("documentCapture.tutorial.captureButton"),Kt=Et??Tt("documentCapture.tutorial.uploadButton"),Vt=Et??Tt("documentCapture.tutorial.continue"),_t=At??Tt("documentCapture.tutorial.skipButton"),Ht=At??Tt("documentCapture.button.nextPage"),Gt=!Ye&&!tt,Ft=ht?"image/png,image/jpeg":nt?"application/pdf":"image/*,application/pdf",Ut=()=>Lt(!0),Jt=React.useCallback(()=>Lt(!1),[]),Wt=()=>{var Zt;Ye?Le==null||Le():tt||!isMobile$2?(Zt=Dt.current)==null||Zt.click():Ut()},e0=ht||ft?Ht:tt?Kt:Ye?Xt:Vt;React.useEffect(()=>{if(!Pt)return;const Zt=l0=>{l0.key==="Escape"&&Jt()};return document.addEventListener("keydown",Zt),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",Zt),document.body.style.overflow=""}},[Pt,Jt]);const s0=()=>{var Zt;(Zt=Dt.current)==null||Zt.click()},Yt=Zt=>{var h0;const l0=(h0=Zt.target.files)==null?void 0:h0[0];l0&&(Be(l0),Gt&&Jt()),Zt.target.value=""},n0=()=>{Jt(),Le==null||Le()},a0=async()=>{if(!(!Ct||!yt||jt)){Mt(!0);try{await finalizeDocument({token:Ct,docType:yt}),vt()}catch{bt()}finally{Mt(!1)}}};return jt?jsxRuntimeExports.jsx(Page,{hideFooterBranding:!0,children:jsxRuntimeExports.jsx(Flex$1,{hFull:!0,wFull:!0,children:jsxRuntimeExports.jsx(Spinner$4,{title:Tt("common.processing"),fullScreen:!1})})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("input",{ref:Dt,type:"file",accept:Ft,onChange:Yt,"aria-hidden":!0,tabIndex:-1,style:{position:"absolute",width:1,height:1,opacity:0,pointerEvents:"none"}}),jsxRuntimeExports.jsx(Page,{title:zt,titleId:"document-capture-tutorial-heading",subtitle:$t,hideHeaderBranding:Rt,hideFooterBranding:wt,"data-testid":"document-tutorial-container",...ft?{"data-second-page-optional":String(ht)}:{},children:jsxRuntimeExports.jsxs(Flex$1,{direction:"column",justify:"space-between",flex:1,children:[jsxRuntimeExports.jsx(Box,{hFull:!0,xsH:"250px",xsPx:0,maxW:"400px",m:"auto","aria-hidden":"true",display:"flex",alignItems:"center",justifyContent:"center",children:jsxRuntimeExports.jsx(Flex$1,{hFull:!0,w:"auto",align:"center",justify:"center",children:jsxRuntimeExports.jsx(Image$d,{src:documentCaptureTutorialSvg,alt:"",objectFit:"contain"})})}),jsxRuntimeExports.jsxs(Flex$1,{px:2,py:4,display:"flex",direction:"column",gap:3,children:[jsxRuntimeExports.jsx(Button$a,{onClick:Wt,"data-testid":"tutorial-open-options-button",disabled:jt,children:e0}),ht&&jsxRuntimeExports.jsx(Button$a,{variant:"link",onClick:a0,disabled:jt,className:"centered-link",children:Tt("documentCapture.button.allPagesCaptured")}),gt?jsxRuntimeExports.jsx(Box,{display:"flex",justifyContent:"center",children:jsxRuntimeExports.jsx(Button$a,{variant:"link",onClick:gt,"data-testid":"tutorial-skip-button",className:"centered-link",children:_t})}):null]})]})}),isMobile$2&&Gt&&Pt&&typeof document<"u"&&ReactDOM.createPortal(jsxRuntimeExports.jsx(Box,{position:"fixed",inset:0,w:"100vw",h:"100dvh",zIndex:999999,bg:"rgba(0, 0, 0, 0.8)",role:"dialog","aria-modal":!0,"aria-labelledby":"document-capture-choice-dialog-title","aria-describedby":"document-capture-choice-dialog-description",onClick:Zt=>Zt.target===Zt.currentTarget&&Jt(),children:jsxRuntimeExports.jsx(Flex$1,{direction:"column",flex:1,minH:"100%",justify:"flex-end",px:0,maxW:"468px",m:"0 auto",onClick:Jt,children:jsxRuntimeExports.jsxs(BottomSheet,{bg:Bt.color.surface.neutral.light,direction:"column",px:Bt.spacing[6],pb:Bt.spacing[6],pt:Bt.spacing[10],borderRadius:"40px 40px 0 0",position:"relative",onClick:Zt=>Zt.stopPropagation(),children:[jsxRuntimeExports.jsx(Flex$1,{position:"absolute",top:Bt.spacing[2],left:0,right:0,justify:"center","aria-hidden":"true",children:jsxRuntimeExports.jsx(SvgHandle,{})}),jsxRuntimeExports.jsxs(ModalButtonsWrapper,{direction:"column",wFull:!0,align:"flex-start",children:[!tt&&Le?jsxRuntimeExports.jsxs(Button$a,{onClick:n0,"data-testid":"tutorial-camera-button",variant:"link",w:"auto",children:[jsxRuntimeExports.jsx(SvgCameraIcon,{}),jsxRuntimeExports.jsx(Text$8,{letterSpacing:"-0.5px",lineHeight:"115%",fontWeight:Bt.typography.fontWeight.medium,pl:Bt.spacing[2],children:Tt("documentCapture.tutorial.takePhoto")})]}):null,Ye?null:jsxRuntimeExports.jsxs(Button$a,{onClick:s0,"data-testid":"tutorial-continue-button",variant:"link",w:"auto",children:[jsxRuntimeExports.jsx(SvgFileIcon,{}),jsxRuntimeExports.jsx(Text$8,{letterSpacing:"-0.5px",lineHeight:"115%",fontWeight:Bt.typography.fontWeight.medium,pl:Bt.spacing[2],children:Tt("documentCapture.tutorial.uploadButton")})]})]})]})})}),document.body)]})},DocumentCaptureInside=({goNext:Be,onError:Le,token:Ye,skipIntroScreen:tt=!1,title:nt,subtitle:ft,tutorialText:ht,uiConfig:gt,onClose:At,allowSkipDocumentCapture:xt=!0,onlyAllowCapture:kt=!1,onlyUpload:Et=!1,onlyPdf:Ct=!1,documentType:yt="addressStatement",sendBase64:vt=!1,numberOfTries:bt=3,isDeepsightEnabled:Rt=!1})=>{var h0,E0,g0,v0,y0,B0,b0,L0,G0,f0,H0,u0;useModuleEvents({module:eventModuleNames.document,token:Ye==null?void 0:Ye.token,screen:eventScreenNames.documentCameraCapture,payload:{moduleVersion:"2"}});const[wt,Tt]=React.useState(tt?"permissions":"tutorial"),[Bt,Dt]=React.useState(null),[Pt,Lt]=React.useState(null),[jt,Mt]=React.useState(0),zt=multiPageDocumentTypes.includes(yt),[$t,Xt]=React.useState(!1),[Kt,Vt]=React.useState(!1),[_t,Ht]=React.useState(!1),[Gt,Ft]=React.useState(void 0),Ut=yt==="capture"?"addressStatement":yt,Jt=(Z0,m0)=>{Dt(Z0),Lt(m0),Tt("review")},Wt=()=>Tt("permissions"),e0=()=>Tt("camera"),s0=()=>{Dt(null),Tt("tutorial")},Yt=()=>{Dt(null),Lt(null),Xt(!0),Tt("tutorial")},n0=()=>{if(Ht(!1),Ft(void 0),$t||Kt){s0(),Xt(!1),Vt(!1),Dt(null),Lt(null);return}Pt==="file-picker"?s0():e0()},a0=Z0=>{Mt(m0=>m0+1),Ft(Z0),Ht(!0)},Zt=(gt==null?void 0:gt.closeButton)!=null?{show:gt.closeButton.show??!0,position:gt.closeButton.position,offset:gt.closeButton.offset,onClose:At}:void 0,l0=gt!=null&&gt.branding?{...(h0=gt.branding.logo)!=null&&h0.src||(E0=gt.branding.logo)!=null&&E0.height?{logo:{src:(g0=gt.branding.logo)==null?void 0:g0.src,height:(v0=gt.branding.logo)==null?void 0:v0.height}}:{},hideHeaderBranding:gt.branding.hideHeaderBranding,hideFooterBranding:gt.branding.hideFooterBranding}:void 0;return _t?jsxRuntimeExports.jsx(PageThemeProvider,{closeButton:Zt,branding:l0,children:jsxRuntimeExports.jsx(DocumentCaptureError,{retriesExhausted:jt>=bt,onRetry:n0,onError:()=>Le==null?void 0:Le({type:"NO_MORE_TRIES",message:"Document capture retries exhausted"}),remainingAttempts:bt-jt,status:Gt})}):wt==="tutorial"?jsxRuntimeExports.jsx(PageThemeProvider,{closeButton:Zt,branding:l0,children:jsxRuntimeExports.jsx(DocumentTutorial,{onContinue:Z0=>Jt(Z0,"file-picker"),onStartCamera:Et?void 0:Wt,onlyAllowCapture:kt,onlyUpload:Et,onlyPdf:Ct,onSkip:xt&&!$t?Be:void 0,onError:a0,isSubsequentPage:$t,token:Ye==null?void 0:Ye.token,documentType:Ut,isOptionalSecondPage:$t&&Kt,title:$t?((B0=(y0=ht==null?void 0:ht.step2)==null?void 0:y0.title)==null?void 0:B0.trim())||void 0:((L0=(b0=ht==null?void 0:ht.step1)==null?void 0:b0.title)==null?void 0:L0.trim())||(nt==null?void 0:nt.trim())||void 0,subtitle:$t?((f0=(G0=ht==null?void 0:ht.step2)==null?void 0:G0.subtitle)==null?void 0:f0.trim())||void 0:((u0=(H0=ht==null?void 0:ht.step1)==null?void 0:H0.subtitle)==null?void 0:u0.trim())||(ft==null?void 0:ft.trim())||void 0,hideHeaderBranding:l0==null?void 0:l0.hideHeaderBranding,hideFooterBranding:l0==null?void 0:l0.hideFooterBranding,onNext:Be})}):wt==="permissions"?jsxRuntimeExports.jsx(Permissions,{onContinue:e0,emitError:()=>Le==null?void 0:Le({type:"PERMISSION_DENIED",message:"Camera permission denied"}),uiConfig:gt??{},onClose:At??(()=>{})}):wt==="camera"?jsxRuntimeExports.jsx(DocumentCameraView,{token:Ye==null?void 0:Ye.token,onCapture:Z0=>Jt(Z0,"camera"),uiConfig:gt,onClose:At,isDeepsightEnabled:Rt}):wt==="review"&&Bt!=null?jsxRuntimeExports.jsx(PageThemeProvider,{closeButton:Zt,branding:l0,children:jsxRuntimeExports.jsx(DocumentReview,{selectedFile:Bt,token:Ye==null?void 0:Ye.token,documentType:Ut,documentTitle:nt,sendBase64:vt,onError:a0,onAddSecondPage:zt?Yt:void 0,onSecondPageUploadResult:zt?Z0=>{Vt((Z0==null?void 0:Z0.isOptional)??!1)}:void 0,onRetry:n0,onNext:Be})}):null},DocumentCapture$1=Be=>{var Le;return jsxRuntimeExports.jsx(IncodeProvider,{token:(Le=Be.token)==null?void 0:Le.token,uiConfig:Be.uiConfig,children:jsxRuntimeExports.jsx(DocumentCaptureInside,{...Be})})};function DocumentCaptureModule({onSuccess:Be,token:Le,config:Ye,uiConfig:tt,flow:nt}){return jsxRuntimeExports.jsx(DocumentCapture$1,{goNext:Be,onError:()=>Be(),sendGeolocation:!1,token:{token:Le},isDeepsightEnabled:nt.ds===!0,sendBase64:!0,allowSkipDocumentCapture:Ye.allowSkipDocumentCapture,skipIntroScreen:!1,documentType:Ye.processingType,numberOfTries:3,title:Ye.title,subtitle:Ye.text,tutorialText:{step1:{title:Ye.title,subtitle:Ye.text}},uiConfig:tt})}const getLocationSuggestionsURL="/omni/externalVerification/addressAutocomplete";function getLocationSuggestions({token:Be,search:Le}){return api.post(getLocationSuggestionsURL,{search:Le},{headers:{"X-Incode-Hardware-Id":Be}}).then(Ye=>Ye.data).catch(Ye=>{var tt;return Promise.reject(((tt=Ye==null?void 0:Ye.response)==null?void 0:tt.data)??Ye)})}function sendEkyb({body:Be,token:Le}){return api.post("/omni/externalVerification/ekyb",Be,{headers:{"X-Incode-Hardware-Id":Le}}).then(Ye=>Ye.data)}const CheckIcon=()=>jsxRuntimeExports.jsx("svg",{width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntimeExports.jsx("path",{d:"M1 5L4.5 8.5L11 1.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),CIRCLE_SIZE=32,CONNECTOR_TOP=CIRCLE_SIZE/2,Stepper=({steps:Be,currentStep:Le})=>{const Ye=useTokens();return jsxRuntimeExports.jsx(Flex$1,{as:"ol",display:"flex",style:{listStyle:"none",padding:0,margin:0,width:"100%"},"aria-label":"Progress",children:Be.map((tt,nt)=>{const ft=nt<Le,ht=nt===Le,gt=nt===0,At=nt===Be.length-1,xt=nt<=Le?Ye.color.surface.primary[500]:Ye.color.surface.neutral[200],kt=nt<Le?Ye.color.surface.primary[500]:Ye.color.surface.neutral[200];return jsxRuntimeExports.jsxs(Box,{as:"li",style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",position:"relative"},"aria-current":ht?"step":void 0,children:[!gt&&jsxRuntimeExports.jsx(Box,{style:{position:"absolute",top:CONNECTOR_TOP,left:0,right:"50%",height:2,backgroundColor:xt,transform:"translateY(-50%)"}}),!At&&jsxRuntimeExports.jsx(Box,{style:{position:"absolute",top:CONNECTOR_TOP,left:"50%",right:0,height:2,backgroundColor:kt,transform:"translateY(-50%)"}}),jsxRuntimeExports.jsx(Box,{style:{width:CIRCLE_SIZE,height:CIRCLE_SIZE,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative",zIndex:1,...ft&&{backgroundColor:Ye.color.surface.primary[500],border:"none"},...ht&&{backgroundColor:Ye.color.surface.neutral[0],border:`2px solid ${Ye.color.surface.primary[500]}`},...!ft&&!ht&&{backgroundColor:Ye.color.surface.neutral[0],border:`2px dashed ${Ye.color.surface.neutral[300]}`}},children:ft?jsxRuntimeExports.jsx(CheckIcon,{}):jsxRuntimeExports.jsx(Text$8,{style:{fontSize:13,fontWeight:ht?700:400,color:ht?Ye.color.surface.primary[500]:Ye.color.surface.neutral[400],lineHeight:1},children:nt+1})}),jsxRuntimeExports.jsx(Text$8,{style:{marginTop:6,fontSize:11,fontWeight:ht?700:400,color:ht?Ye.color.surface.primary[500]:Ye.color.surface.neutral[400],whiteSpace:"nowrap",textAlign:"center"},children:tt})]},tt)})})},UBO_INPUT_LIMIT=8,DIRECTOR_INPUT_LIMIT=8,DIRECTORS_SUPPORTED_COUNTRIES=["GB","FR","ES","NL","IT","DE","BG","MT","LT","DK","HK","IN"],FIELD_ORDER=["name-user_input","taxId-user_input","street-user_input","houseNo-user_input","address2-user_input","city-user_input","state-user_input","postalCode-user_input"],OPTIONAL_FIELDS={addressLine2:"addressLine2"},FIELD_NAME_MAPPING={"name-user_input":"businessName","street-user_input":"street","houseNo-user_input":"houseNo","address2-user_input":"addressLine2","city-user_input":"city","state-user_input":"state","postalCode-user_input":"postalCode","taxId-user_input":"taxId"},VERIFICATION_STATES={IDLE:"",VERIFYING:"verifying...",SUCCESS:"success",FAILED:"failed"},COUNTRIES_WITH_CNPJ_VALIDATION=["BR"],COUNTRIES_WITH_NO_TAX_ID_VALIDATION=["US","FR","CM","KE"],BUSINESS_NAME_OPTIONAL_COUNTRIES=[],ADDRESS_FIELDS$1=["street","houseNo","addressLine2","city","state","postalCode"],ALL_COUNTRIES_OPTIONAL_FIELDS=["ubo","director"],useDirectorManagement=()=>{const[Be,Le]=React.useState(1);return{directorCount:Be,handleAddDirector:()=>{Be<DIRECTOR_INPUT_LIMIT&&Le(Be+1)},extractDirectorNames:nt=>{var ht,gt;const ft=[];for(let At=1;At<=Be;At++){const xt=((ht=nt[`directorName-${At}`])==null?void 0:ht.trim())??"",kt=((gt=nt[`directorSurname-${At}`])==null?void 0:gt.trim())??"";(xt||kt)&&ft.push([xt,kt].filter(Boolean).join(" ")),delete nt[`directorName-${At}`],delete nt[`directorSurname-${At}`]}return ft}}},useUboManagement=()=>{const[Be,Le]=React.useState(1);return{uboCount:Be,handleAddUbo:()=>{Be<UBO_INPUT_LIMIT&&Le(Be+1)},extractUboNames:nt=>{var ht,gt;const ft=[];for(let At=1;At<=Be;At++){const xt=((ht=nt[`uboName-${At}`])==null?void 0:ht.trim())??"",kt=((gt=nt[`uboSurname-${At}`])==null?void 0:gt.trim())??"";(xt||kt)&&ft.push([xt,kt].filter(Boolean).join(" ")),delete nt[`uboName-${At}`],delete nt[`uboSurname-${At}`]}return ft}}},PREFILL_SOURCE_COUNTRY={MX_KYB_PREFILL:"MX"};function getPrefillCountry(Be){return Be?PREFILL_SOURCE_COUNTRY[Be]:void 0}const KYB_PREFILL_URL="/omni/externalVerification/ekyb-prefill";function buildKybPrefillRequest(Be,Le="MX"){return{plugins:["ekyb-prefill"],source:"MX_KYB_PREFILL",country:Le,taxId:Be}}const PREFILL_KEYS=["name","tin","registrationStatus","entityType","taxIdEffectiveDate","incorporationDate","email"],SENTINEL_VALUES=new Set(["unknown","not found"]);function normalizeKybPrefillResponse(Be){return PREFILL_KEYS.reduce((Le,Ye)=>{var nt;const tt=(nt=Be==null?void 0:Be[Ye])==null?void 0:nt.trim();return tt&&!SENTINEL_VALUES.has(tt.toLowerCase())&&Le.push({key:Ye,sub_label:tt}),Le},[])}async function requestKybPrefill({token:Be,taxId:Le,country:Ye="MX"}){const tt=buildKybPrefillRequest(Le,Ye),nt=await api.post(KYB_PREFILL_URL,tt,{headers:{"X-Incode-Hardware-Id":Be}});return normalizeKybPrefillResponse(nt.data)}async function sendKybPrefill(Be){return requestKybPrefill(Be)}const isFeatureAllowedOnEnvironment$1=Be=>{if(typeof window>"u")return!1;const Le=window.location.origin;return Be.some(Ye=>Le.includes(Ye))},BASE_EKYB_COUNTRIES=["BR","US","GB","ES","IT","FR","DE","IL","MX","NL","CN","BG","MT","LT","DK","HK","IN"],STAGING_DEMO_COUNTRIES=["NG","CM","KE"],getEkybCountryCodes=()=>{const Be=[...BASE_EKYB_COUNTRIES];return isFeatureAllowedOnEnvironment$1(["localhost","stage","demo"])&&Be.push(...STAGING_DEMO_COUNTRIES),Be},normalizeForSearch=Be=>Be.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase(),COUNTRY_NAME_OVERRIDES={US:"United States"},COUNTRY_SEARCH_ALIASES={US:["USA","US","United States of America"]},getCountryDisplayName=Be=>COUNTRY_NAME_OVERRIDES[Be]??countries$1[Be].name,getCountrySearchValue=Be=>[getCountryDisplayName(Be),...COUNTRY_SEARCH_ALIASES[Be]??[]].map(normalizeForSearch).join(" "),EKYB_COUNTRY_OPTIONS=getEkybCountryCodes().map(Be=>({code:Be,emoji:countries$1[Be].emoji,name:getCountryDisplayName(Be),searchableValue:getCountrySearchValue(Be)})).sort((Be,Le)=>Be.name.localeCompare(Le.name)),ClearIcon=()=>jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntimeExports.jsx("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),SearchIcon=({color:Be})=>jsxRuntimeExports.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:jsxRuntimeExports.jsx("path",{d:"M7 13A6 6 0 1 0 7 1a6 6 0 0 0 0 12ZM13 13l2 2",stroke:Be,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),CountryGridSelector=({value:Be,onChange:Le,title:Ye,subtitle:tt,searchPlaceholder:nt,countries:ft})=>{const ht=useTokens(),{t:gt}=useTranslation$1(),[At,xt]=React.useState(""),kt=Ye??gt("ekyb.countrySelector.title"),Et=tt??gt("ekyb.countrySelector.subtitle"),Ct=nt??gt("ekyb.countrySelector.searchPlaceholder"),yt=ft?EKYB_COUNTRY_OPTIONS.filter(Rt=>ft.includes(Rt.code)):EKYB_COUNTRY_OPTIONS,vt=normalizeForSearch(At),bt=yt.filter(Rt=>Rt.searchableValue.includes(vt));return jsxRuntimeExports.jsxs(Box,{display:"flex",style:{flexDirection:"column",gap:24},children:[jsxRuntimeExports.jsxs(Box,{display:"flex",style:{flexDirection:"column",gap:4},children:[jsxRuntimeExports.jsx(Text$8,{fontSize:ht.primitives.typography.fontSize.xl,fontWeight:ht.primitives.typography.fontWeight.bold,children:kt}),jsxRuntimeExports.jsx(Text$8,{color:ht.color.text.body.secondary,children:Et})]}),jsxRuntimeExports.jsxs(Box,{display:"flex",style:{alignItems:"center",gap:8,border:`1px solid ${At?ht.color.surface.primary[500]:ht.color.surface.neutral[300]}`,borderRadius:ht.radius.medium,padding:"10px 14px",backgroundColor:ht.color.surface.neutral[0],transition:"border-color 150ms ease"},children:[jsxRuntimeExports.jsx(SearchIcon,{color:ht.color.surface.neutral[400]}),jsxRuntimeExports.jsx(Box,{as:"input",style:{flex:1,border:"none",outline:"none",fontSize:14,color:ht.color.surface.neutral[900],backgroundColor:"transparent"},placeholder:Ct,value:At,"aria-label":Ct,onChange:Rt=>xt(Rt.target.value)}),At&&jsxRuntimeExports.jsx(Box,{as:"button",type:"button","aria-label":gt("common.clear"),style:{display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",color:ht.color.surface.neutral[400],flexShrink:0},onClick:()=>xt(""),children:jsxRuntimeExports.jsx(ClearIcon,{})})]}),jsxRuntimeExports.jsxs(Box,{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(120px, 1fr))",gap:12},role:"listbox","aria-label":kt,children:[bt.map(({code:Rt,emoji:wt,name:Tt})=>{const Bt=Be===Rt;return jsxRuntimeExports.jsxs(Box,{as:"button",type:"button",role:"option","aria-selected":Bt,style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:8,padding:"16px 8px",borderRadius:ht.radius.medium,border:`2px solid ${Bt?ht.color.surface.primary[500]:ht.color.surface.neutral[200]}`,backgroundColor:Bt?ht.color.surface.primary[50]:ht.color.surface.neutral[0],cursor:"pointer",transition:"border-color 150ms ease, background-color 150ms ease",outline:"none"},onClick:()=>Le(Rt),children:[jsxRuntimeExports.jsx(Text$8,{style:{fontSize:36,lineHeight:1},children:wt}),jsxRuntimeExports.jsx(Text$8,{style:{fontSize:11,fontWeight:Bt?600:400,color:Bt?ht.color.surface.primary[500]:ht.color.surface.neutral[700],textAlign:"center",lineHeight:1.3,wordBreak:"break-word"},children:Tt})]},Rt)}),bt.length===0&&jsxRuntimeExports.jsx(Box,{style:{gridColumn:"1 / -1",textAlign:"center",padding:24},children:jsxRuntimeExports.jsx(Text$8,{style:{color:ht.color.surface.neutral[400],fontSize:14},children:gt("ekyb.countrySelector.noResults")})})]})]})},StyledStep=styled(Flex$1)({[mediaQueries.md]:{padding:tokens.spacing[8],backgroundColor:tokens.primitives.color.neutral.light,boxShadow:tokens.primitives.shadow.lg,borderRadius:tokens.radius.small}}),StyledFlexDiv=styled.div({[mediaQueries.md]:{display:"flex",flexDirection:"row-reverse",gap:tokens.spacing[4]}}),ResponsiveButton=styled(Button$a)({[mediaQueries.md]:{maxWidth:"fit-content",margin:0,fontSize:tokens.primitives.typography.fontSize.base}}),StepCountry=({value:Be,onChange:Le,onContinue:Ye,countries:tt})=>{const{t:nt}=useTranslation$1();return jsxRuntimeExports.jsxs(StyledStep,{direction:"column",wFull:!0,hFull:!0,children:[jsxRuntimeExports.jsx(CountryGridSelector,{value:Be,onChange:Le,countries:tt}),jsxRuntimeExports.jsx(Spacer$1,{size:tokens.spacing[6]}),jsxRuntimeExports.jsx(StyledFlexDiv,{children:jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"primary",disabled:!Be,onClick:Ye,children:nt("ekyb.continue")})})]})},FIELD_DISPLAY=[{key:"name",labelKey:"ekyb.prefill.label.name",fallback:"Business Name"},{key:"tin",labelKey:"ekyb.prefill.label.tin",fallback:"Tax ID"},{key:"entityType",labelKey:"ekyb.prefill.label.entityType",fallback:"Entity Type"},{key:"registrationStatus",labelKey:"ekyb.prefill.label.registrationStatus",fallback:"Registration Status"},{key:"incorporationDate",labelKey:"ekyb.prefill.label.incorporationDate",fallback:"Incorporation Date"},{key:"taxIdEffectiveDate",labelKey:"ekyb.prefill.label.taxIdEffectiveDate",fallback:"Tax ID Effective Date"},{key:"email",labelKey:"ekyb.prefill.label.email",fallback:"Email"}],PrefillSummary=({results:Be,error:Le,onBack:Ye,onDone:tt,country:nt})=>{const{t:ft}=useTranslation$1(),ht=useIsMobileViewportWidth(),gt=new Map(Be.map(xt=>[xt.key,xt.sub_label])),At=FIELD_DISPLAY.filter(xt=>gt.has(xt.key));return jsxRuntimeExports.jsxs(StyledStep,{direction:"column",wFull:!0,hFull:!0,gap:tokens.spacing[4],forceGap:!0,children:[Le?jsxRuntimeExports.jsxs(Flex$1,{direction:"column",align:"center",justify:"center",wFull:!0,gap:tokens.spacing[4],style:{padding:`${tokens.spacing[8]} 0`},children:[jsxRuntimeExports.jsx(ErrorIcon,{size:50}),jsxRuntimeExports.jsx(Text$8,{fontSize:tokens.primitives.typography.fontSize.xl,fontWeight:tokens.primitives.typography.fontWeight.bold,style:{textAlign:"center"},children:ft(`ekyb.prefill.${nt}.error.title`,"Business Registration Number not found")}),jsxRuntimeExports.jsx(Text$8,{color:tokens.color.text.body.secondary,style:{textAlign:"center"},children:ft(`ekyb.prefill.${nt}.error.subtitle`,"We were unable to find a match for this Tax ID with the official database.")})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Box,{display:"flex",style:{flexDirection:"column",gap:4},children:[jsxRuntimeExports.jsx(Text$8,{fontSize:tokens.primitives.typography.fontSize.xl,fontWeight:tokens.primitives.typography.fontWeight.bold,children:ft("ekyb.prefill.summary.title","Business details")}),jsxRuntimeExports.jsx(Text$8,{color:tokens.color.text.body.secondary,children:ft("ekyb.prefill.summary.subtitle","Review the retrieved business information.")})]}),jsxRuntimeExports.jsx(Box,{display:"flex",style:{flexDirection:"column"},children:At.map(xt=>jsxRuntimeExports.jsxs(Flex$1,{justify:"space-between",align:"center",wFull:!0,gap:tokens.spacing[4],style:{padding:`${tokens.spacing[3]} 0`,borderBottom:`1px solid ${tokens.color.surface.neutral[200]}`},children:[jsxRuntimeExports.jsx(Text$8,{color:tokens.color.text.body.secondary,children:ft(xt.labelKey,xt.fallback)}),jsxRuntimeExports.jsx(Text$8,{fontWeight:tokens.primitives.typography.fontWeight.bold,style:{textAlign:"right",wordBreak:"break-word"},children:gt.get(xt.key)})]},xt.key))})]}),jsxRuntimeExports.jsx(Spacer$1,{size:tokens.spacing[2]}),jsxRuntimeExports.jsxs(StyledFlexDiv,{children:[jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"primary",onClick:tt,mb:ht?tokens.spacing[4]:0,children:ft("ekyb.prefill.done","Done")}),!Le&&jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"secondary",onClick:Ye,children:ft("common.back")})]})]})},usStates={AL:{code:"AL",name:"Alabama"},AK:{code:"AK",name:"Alaska"},AZ:{code:"AZ",name:"Arizona"},AR:{code:"AR",name:"Arkansas"},CA:{code:"CA",name:"California"},CO:{code:"CO",name:"Colorado"},CT:{code:"CT",name:"Connecticut"},DE:{code:"DE",name:"Delaware"},FL:{code:"FL",name:"Florida"},GA:{code:"GA",name:"Georgia"},HI:{code:"HI",name:"Hawaii"},ID:{code:"ID",name:"Idaho"},IL:{code:"IL",name:"Illinois"},IN:{code:"IN",name:"Indiana"},IA:{code:"IA",name:"Iowa"},KS:{code:"KS",name:"Kansas"},KY:{code:"KY",name:"Kentucky"},LA:{code:"LA",name:"Louisiana"},ME:{code:"ME",name:"Maine"},MD:{code:"MD",name:"Maryland"},MA:{code:"MA",name:"Massachusetts"},MI:{code:"MI",name:"Michigan"},MN:{code:"MN",name:"Minnesota"},MS:{code:"MS",name:"Mississippi"},MO:{code:"MO",name:"Missouri"},MT:{code:"MT",name:"Montana"},NE:{code:"NE",name:"Nebraska"},NV:{code:"NV",name:"Nevada"},NH:{code:"NH",name:"New Hampshire"},NJ:{code:"NJ",name:"New Jersey"},NM:{code:"NM",name:"New Mexico"},NY:{code:"NY",name:"New York"},NC:{code:"NC",name:"North Carolina"},ND:{code:"ND",name:"North Dakota"},OH:{code:"OH",name:"Ohio"},OK:{code:"OK",name:"Oklahoma"},OR:{code:"OR",name:"Oregon"},PA:{code:"PA",name:"Pennsylvania"},RI:{code:"RI",name:"Rhode Island"},SC:{code:"SC",name:"South Carolina"},SD:{code:"SD",name:"South Dakota"},TN:{code:"TN",name:"Tennessee"},TX:{code:"TX",name:"Texas"},UT:{code:"UT",name:"Utah"},VT:{code:"VT",name:"Vermont"},VA:{code:"VA",name:"Virginia"},WA:{code:"WA",name:"Washington"},WV:{code:"WV",name:"West Virginia"},WI:{code:"WI",name:"Wisconsin"},WY:{code:"WY",name:"Wyoming"}},usStateOptions=Object.values(usStates).map(Be=>({value:Be.code,label:Be.name})),idTypeOptions=[{value:"TIN",label:"TIN"},{value:"SSS",label:"SSS"},{value:"GSIS",label:"GSIS"}],usStateCode=Be=>{const Le=Object.values(usStates).find(Ye=>Ye.name.toLowerCase()===Be.toLowerCase());return Le?Le.code:null},brStates={AC:{code:"AC",name:"Acre"},AL:{code:"AL",name:"Alagoas"},AP:{code:"AP",name:"Amapá"},AM:{code:"AM",name:"Amazonas"},BA:{code:"BA",name:"Bahia"},CE:{code:"CE",name:"Ceará"},DF:{code:"DF",name:"Distrito Federal"},ES:{code:"ES",name:"Espírito Santo"},GO:{code:"GO",name:"Goiás"},MA:{code:"MA",name:"Maranhão"},MT:{code:"MT",name:"Mato Grosso"},MS:{code:"MS",name:"Mato Grosso do Sul"},MG:{code:"MG",name:"Minas Gerais"},PA:{code:"PA",name:"Pará"},PB:{code:"PB",name:"Paraíba"},PR:{code:"PR",name:"Paraná"},PE:{code:"PE",name:"Pernambuco"},PI:{code:"PI",name:"Piauí"},RJ:{code:"RJ",name:"Rio de Janeiro"},RN:{code:"RN",name:"Rio Grande do Norte"},RS:{code:"RS",name:"Rio Grande do Sul"},RO:{code:"RO",name:"Rondônia"},RR:{code:"RR",name:"Roraima"},SC:{code:"SC",name:"Santa Catarina"},SP:{code:"SP",name:"São Paulo"},SE:{code:"SE",name:"Sergipe"},TO:{code:"TO",name:"Tocantins"}},brStateOptions=Object.values(brStates).map(Be=>({value:Be.code,label:Be.name})),brStateCode=Be=>{const Le=Object.values(brStates).find(Ye=>Ye.name.toLowerCase()===Be.toLowerCase());return Le?Le.code:null},inStates={AN:{code:"AN",name:"Andaman and Nicobar Islands"},AP:{code:"AP",name:"Andhra Pradesh"},AR:{code:"AR",name:"Arunachal Pradesh"},AS:{code:"AS",name:"Assam"},BR:{code:"BR",name:"Bihar"},CH:{code:"CH",name:"Chandigarh"},CT:{code:"CT",name:"Chhattisgarh"},DH:{code:"DH",name:"Dadra and Nagar Haveli and Daman and Diu"},DL:{code:"DL",name:"Delhi"},GA:{code:"GA",name:"Goa"},GJ:{code:"GJ",name:"Gujarat"},HR:{code:"HR",name:"Haryana"},HP:{code:"HP",name:"Himachal Pradesh"},JK:{code:"JK",name:"Jammu and Kashmir"},JH:{code:"JH",name:"Jharkhand"},KA:{code:"KA",name:"Karnataka"},KL:{code:"KL",name:"Kerala"},LA:{code:"LA",name:"Ladakh"},LD:{code:"LD",name:"Lakshadweep"},MP:{code:"MP",name:"Madhya Pradesh"},MH:{code:"MH",name:"Maharashtra"},MN:{code:"MN",name:"Manipur"},ML:{code:"ML",name:"Meghalaya"},MZ:{code:"MZ",name:"Mizoram"},NL:{code:"NL",name:"Nagaland"},OR:{code:"OR",name:"Odisha"},PY:{code:"PY",name:"Puducherry"},PB:{code:"PB",name:"Punjab"},RJ:{code:"RJ",name:"Rajasthan"},SK:{code:"SK",name:"Sikkim"},TN:{code:"TN",name:"Tamil Nadu"},TG:{code:"TG",name:"Telangana"},TR:{code:"TR",name:"Tripura"},UP:{code:"UP",name:"Uttar Pradesh"},UK:{code:"UK",name:"Uttarakhand"},WB:{code:"WB",name:"West Bengal"}},inStateOptions=Object.values(inStates).map(Be=>({value:Be.code,label:Be.name})),inStateCode=Be=>{const Le=Object.values(inStates).find(Ye=>Ye.name.toLowerCase()===Be.toLowerCase());return Le?Le.code:null},PHONE_NATIONAL_NUMBER_SOURCES=["US_CREDIT_BUREAU_3"],CNPJ_FORMATTED_LENGTH=18,CNPJ_CLEAN_LENGTH=14,INVALID_CNPJ_PATTERNS=["00000000000000","11111111111111","22222222222222","33333333333333","44444444444444","55555555555555","66666666666666","77777777777777","88888888888888","99999999999999"],CNPJ_FIRST_DIGIT_FACTORS=[5,4,3,2,9,8,7,6,5,4,3,2],CNPJ_SECOND_DIGIT_FACTORS=[6,5,4,3,2,9,8,7,6,5,4,3,2];function cleanCnpjString(Be){return Be.replace(/\./g,"").replace(/\//g,"").replace(/-/g,"")}function calculateVerificationDigit(Be,Le){let tt=11-Le.reduce((nt,ft,ht)=>nt+Number.parseInt(Be.charAt(ht),10)*ft,0)%11;return tt>=10&&(tt=0),tt.toString()}function validateCnpjNumber(Be){if(!Be||typeof Be!="string")return!1;let Le=Be.trim();if(Le.length===CNPJ_FORMATTED_LENGTH&&(Le=cleanCnpjString(Le)),Le.length!==CNPJ_CLEAN_LENGTH||!/^\d+$/.test(Le)||INVALID_CNPJ_PATTERNS.includes(Le))return!1;const Ye=calculateVerificationDigit(Le,CNPJ_FIRST_DIGIT_FACTORS);if(Le.charAt(12)!==Ye)return!1;const tt=calculateVerificationDigit(Le,CNPJ_SECOND_DIGIT_FACTORS);return Le.charAt(13)===tt}const TAX_ID_VALIDATORS={GB:{validate:Be=>/^\d{7,9}$|^GB\d{9}$/i.test(Be),errorKey:"ekyb.error.taxId-gb"},ES:{validate:Be=>/^[A-Za-z]\d{8}$|^[A-Za-z]\d{7}[A-Za-z]$|^\d{8}[A-Za-z]$/.test(Be),errorKey:"ekyb.error.taxId-es"},NL:{validate:Be=>/^NL\d{9}B\d{2}$|^\d{8}$/i.test(Be),errorKey:"ekyb.error.taxId-nl"},IT:{validate:Be=>/^[A-Za-z]{2}\d{6,7}$|^IT\d{8}$|^\d{11}$/i.test(Be),errorKey:"ekyb.error.taxId-it"},DE:{validate:Be=>/^DE\d{9}$|^HRB\d{3,6}$|^HRB\d{6}[A-Za-z]$|^HRA\d{4,6}$|^\d{4,6}$/i.test(Be),errorKey:"ekyb.error.taxId-de"},CN:{validate:Be=>/^[A-Za-z0-9]{18}$/.test(Be),errorKey:"ekyb.error.taxId-cn"},IL:{validate:Be=>/^\d{9}$/.test(Be),errorKey:"ekyb.error.taxId-il"},NG:{validate:Be=>/^\d{10}$/.test(Be),errorKey:"ekyb.error.taxId-ng"},MX:{validate:Be=>/^[A-Za-z]{3,4}\d{6}[A-Za-z0-9]{3}$/.test(Be),errorKey:"ekyb.error.taxId-mx"}},FieldInput=({name:Be,country:Le,state:Ye,register:tt,unregister:nt,clearErrors:ft,setValue:ht,trigger:gt,errors:At,optional:xt=!1,watch:kt})=>{var Lt,jt,Mt;const{t:Et}=useTranslation$1(),Ct=kt(Be)??"",yt=Le==="HK",vt=Le==="US",bt=Le==="BR",Rt=Le==="IN",wt=Le==="CN",Bt=!((wt||yt)&&Be==="addressLine2")&&(xt||!!OPTIONAL_FIELDS[Be]);React.useEffect(()=>{if(Be==="state"&&(vt||bt||Rt))return;let zt;Be==="taxId"&&(zt=kt(Be),nt(Be),ft(Be));const $t={required:Bt?!1:Et("ekyb.error.requiredField")};if(Be==="taxId")if(COUNTRIES_WITH_CNPJ_VALIDATION.includes(Le))$t.validate=Xt=>validateCnpjNumber(Xt)||Et("ekyb.error.invalidTaxId");else if(TAX_ID_VALIDATORS[Le]){const{validate:Xt,errorKey:Kt}=TAX_ID_VALIDATORS[Le];$t.validate=Vt=>Xt(Vt)||Et(Kt)}else COUNTRIES_WITH_NO_TAX_ID_VALIDATION.includes(Le)||($t.pattern={value:/^[a-zA-Z0-9]+$/,message:Et("ekyb.error.taxId")});tt(Be,$t),Be==="taxId"&&zt!==void 0&&ht(Be,zt)},[Be,Le,Bt,vt,bt,Rt,tt,nt,ft,ht,kt,Et]);const Dt=()=>{gt(Be)};let Pt=Et(`ekyb.${Be}`);return(wt||yt)&&Be==="addressLine2"&&(Pt=Et("ekyb.address")),Be==="taxId"&&(Pt=Et([`ekyb.${Le}.taxId.label`,"ekyb.taxId"])),Be==="state"?vt||bt||Rt?jsxRuntimeExports.jsx(DropdownComposed,{id:"state",label:Et("verification.labels.chooseState"),placeholder:Et("common.state.placeholder"),searchable:!0,searchByValue:!0,searchPlaceholder:Et("common.state.searchPlaceholder"),value:Ye,onChange:zt=>{ht("state",zt),Dt()},onBlur:Dt,options:bt?brStateOptions:Rt?inStateOptions:usStateOptions,error:(Lt=At==null?void 0:At.state)==null?void 0:Lt.message,required:!Bt,maxW:"720px"}):jsxRuntimeExports.jsx(InputComposed,{id:Be,name:Be,label:Pt,value:Ct,onChange:zt=>{ht(Be,zt.target.value)},onBlur:zt=>{ht(Be,zt.target.value.trim()),Dt()},error:(jt=At[Be])==null?void 0:jt.message,required:!Bt,maxW:"720px"}):jsxRuntimeExports.jsx(InputComposed,{id:Be,name:Be,label:Pt,value:Ct,onChange:zt=>{ht(Be,zt.target.value)},onBlur:zt=>{ht(Be,zt.target.value.trim()),Dt()},error:(Mt=At[Be])==null?void 0:Mt.message,required:!Bt,maxW:"720px"})},StepTaxId=({country:Be,register:Le,unregister:Ye,clearErrors:tt,setValue:nt,trigger:ft,watch:ht,errors:gt,onContinue:At,onBack:xt})=>{const{t:kt}=useTranslation$1(),Et=useIsMobileViewportWidth();return jsxRuntimeExports.jsxs(StyledStep,{direction:"column",wFull:!0,hFull:!0,gap:tokens.spacing[4],forceGap:!0,children:[jsxRuntimeExports.jsxs(Box,{display:"flex",style:{flexDirection:"column",gap:4},children:[jsxRuntimeExports.jsx(Text$8,{fontSize:tokens.primitives.typography.fontSize.xl,fontWeight:tokens.primitives.typography.fontWeight.bold,children:kt(["ekyb.prefill.taxId.title","Business Registration Number or Tax ID"])}),jsxRuntimeExports.jsx(Text$8,{color:tokens.color.text.body.secondary,children:kt([`ekyb.prefill.${Be}.taxId.subtitle`,"Please enter the official business tax identification or registration"])})]}),jsxRuntimeExports.jsx(FieldInput,{name:"taxId",country:Be,state:"",register:Le,unregister:Ye,clearErrors:tt,setValue:nt,trigger:ft,errors:gt,watch:ht}),jsxRuntimeExports.jsx(Spacer$1,{size:tokens.spacing[2]}),jsxRuntimeExports.jsxs(StyledFlexDiv,{children:[jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"primary",onClick:At,mb:Et?tokens.spacing[4]:0,children:kt("ekyb.continue")}),jsxRuntimeExports.jsx(ResponsiveButton,{type:"button",variant:"secondary",onClick:xt,children:kt("common.back")})]})]})},AutocompleteWrapper=dt.div`
8150
8150
  display: flex;
8151
8151
  position: relative;
8152
8152
  flex-direction: column;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./dist/onBoarding.umd.js",
4
4
  "module": "./dist/onBoarding.mjs",
5
5
  "types": "./dist/onBoarding.d.ts",
6
- "version": "1.91.0-rc.20260716230206",
6
+ "version": "1.91.0",
7
7
  "publishConfig": {},
8
8
  "exports": {
9
9
  ".": {