UNPKG

scanbot-web-sdk

Version:

Scanbot Web Document and Barcode Scanner SDK

2 lines 1.23 MB
/*! For license information please see ScanbotSDK.ui2.min.js.LICENSE.txt */ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(self,(()=>(()=>{var e={2:(e,t,n)=>{"use strict";n(4254)},10:(e,t,n)=>{"use strict";n.d(t,{x:()=>a});var i=n(1173),r=n(525),o=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};class a{constructor(e,t){this.workerBridge=e,this.objectId=t}static create(e,t){return o(this,void 0,void 0,(function*(){const n=yield e.copyArgs.DocumentClassifier.create(new i.hq(t));return new a(e,n)}))}run(e,t="COPY_IMAGE"){return o(this,void 0,void 0,(function*(){const n="COPY_IMAGE"===t?this.workerBridge.copyArgs:this.workerBridge.transferArgs,o=yield n.DocumentClassifier.run(this.objectId,e);return{result:new i.g$(o.result),originalImage:new r._(o.originalImage)}}))}destroy(){return o(this,void 0,void 0,(function*(){return this.workerBridge.copyArgs.DocumentClassifier.destroy(this.objectId)}))}static isAvailable(e){return o(this,void 0,void 0,(function*(){return e.copyArgs.DocumentClassifier.isAvailable()}))}}},21:(e,t,n)=>{"use strict";var i=n(4994);t.A=void 0;var r=i(n(2032)),o=n(9229);t.A=(0,r.default)((0,o.jsx)("path",{d:"M5 13h14v-2H5zm-2 4h14v-2H3zM7 7v2h14V7z"}),"ClearAll")},61:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var i=n(4751),r=n(6302);class o{static convertLinesToViewportLines(e,t){if(t&&e)return t.map((t=>({start:new r.b(t.start.x*(e.width-1),t.start.y*(e.height-1)),end:new r.b(t.end.x*(e.width-1),t.end.y*(e.height-1))})))}static convertToViewportPointsFromParentSize(e,t){return t?i.o.isEmpty(e)?void 0:t.map((t=>new r.b(t.x*(e.width-1),t.y*(e.height-1)))):i.o.toPolygon(e)}static calculateScale(e){let t,n=0,i=0;return 1>e.width/e.height?(t=e.height/1,n=(1-e.width/t)/2):(t=e.width/1,i=(1-e.height/t)/2),{x:n,y:i,containerScale:t}}static findScale(e,t){let n,i=0,r=0;return t.ratio(!0)>e.ratio(!0)?(n=e.width/t.width,r=(t.height-e.height/n)/2):(n=e.height/t.height,i=(t.width-e.width/n)/2),{x:i,y:r,scale:n}}static preventDefaultCallback(e){e.preventDefault()}static disableScreenMovement(){document.addEventListener("touchmove",o.preventDefaultCallback,{passive:!1}),document.body.scrollTop=document.documentElement.scrollTop=0,document.documentElement.style.overflow="hidden"}static enableScreenMovement(){document.removeEventListener("touchmove",o.preventDefaultCallback),document.documentElement.style.overflow="auto"}static findContainerOrThrow(e){var t;const n=null!==(t=e.container)&&void 0!==t?t:document.getElementById(e.containerId);if(!n)throw Error("Unable to initialize scanner: Cannot find container element either from 'container' property or with the containerId property provided.");return n}static unmountSafely(e){window.setTimeout((()=>{e.unmount()}),0)}}},73:(e,t,n)=>{"use strict";n.d(t,{$e:()=>r,X:()=>o,hZ:()=>i});const i=["EXACT","INTERPOLATE"];class r{constructor(e={}){this.confirmationMethod="EXACT",this.minConfirmations=3,this.minConfidenceForStableField=.8,this.autoClearThreshold=4,void 0!==e.confirmationMethod&&(this.confirmationMethod=e.confirmationMethod),void 0!==e.minConfirmations&&(this.minConfirmations=e.minConfirmations),void 0!==e.minConfidenceForStableField&&(this.minConfidenceForStableField=e.minConfidenceForStableField),void 0!==e.autoClearThreshold&&(this.autoClearThreshold=e.autoClearThreshold)}}class o{constructor(e={}){this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualScanningResult=2,void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualScanningResult&&(this.minimumNumberOfRequiredFramesWithEqualScanningResult=e.minimumNumberOfRequiredFramesWithEqualScanningResult)}}},170:(e,t,n)=>{"use strict";n.d(t,{Fc:()=>a,RX:()=>r,dn:()=>o,mN:()=>s});var i=n(6244);const r=["SUCCESS","BARCODE_WITHOUT_VIN","NO_BARCODE_FOUND","BARCODE_EXTRACTION_DISABLED"];class o{constructor(e={}){if(void 0===e.extractedVIN)throw new Error("extractedVIN must be present in constructor argument");if(this.extractedVIN=e.extractedVIN,void 0===e.rectangle)throw new Error("rectangle must be present in constructor argument");if(this.rectangle=e.rectangle.map((e=>({x:e.x,y:e.y}))),void 0===e.status)throw new Error("status must be present in constructor argument");this.status=e.status}}class a{constructor(e={}){if(void 0===e.textResult)throw new Error("textResult must be present in constructor argument");if(this.textResult=new i.n_(e.textResult),void 0===e.barcodeResult)throw new Error("barcodeResult must be present in constructor argument");this.barcodeResult=new o(e.barcodeResult)}}class s{constructor(e={}){this.optimizeSingleLine=!0,this.extractVINFromBarcode=!1,this.ocrResolutionLimit=0,this.maximumNumberOfAccumulatedFrames=3,this.minimumNumberOfRequiredFramesWithEqualScanningResult=2,void 0!==e.optimizeSingleLine&&(this.optimizeSingleLine=e.optimizeSingleLine),void 0!==e.extractVINFromBarcode&&(this.extractVINFromBarcode=e.extractVINFromBarcode),void 0!==e.ocrResolutionLimit&&(this.ocrResolutionLimit=e.ocrResolutionLimit),void 0!==e.maximumNumberOfAccumulatedFrames&&(this.maximumNumberOfAccumulatedFrames=e.maximumNumberOfAccumulatedFrames),void 0!==e.minimumNumberOfRequiredFramesWithEqualScanningResult&&(this.minimumNumberOfRequiredFramesWithEqualScanningResult=e.minimumNumberOfRequiredFramesWithEqualScanningResult)}}},172:(e,t,n)=>{"use strict";n.d(t,{FK:()=>v,Ob:()=>z,Qv:()=>H,XX:()=>Z,_3:()=>C,fF:()=>r,n:()=>E,q6:()=>G,uA:()=>_,v2:()=>R});var i,r,o,a,s,l,c,u,d={},m=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,p=Array.isArray;function f(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function E(e,t,n){var r,o,a,s={};for(a in t)"key"==a?r=t[a]:"ref"==a?o=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return A(e,s,r,o,null)}function A(e,t,n,i,a){var s={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++o:a,__i:-1,__u:0};return null==a&&null!=r.vnode&&r.vnode(s),s}function C(){return{current:null}}function v(e){return e.children}function _(e,t){this.props=e,this.context=t}function y(e,t){if(null==t)return e.__?y(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?y(e):null}function D(e,t,n){var i,o=e.__v,a=o.__e,s=e.__P;if(s)return(i=f({},o)).__v=o.__v+1,r.vnode&&r.vnode(i),P(s,i,o,e.__n,void 0!==s.ownerSVGElement,32&o.__u?[a]:null,t,null==a?y(o):a,!!(32&o.__u),n),i.__v=o.__v,i.__.__k[i.__i]=i,i.__d=void 0,i.__e!=a&&I(i),i}function I(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return I(e)}}function b(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!S.__r++||s!==r.debounceRendering)&&((s=r.debounceRendering)||l)(S)}function S(){var e,t,n,i=[],o=[];for(a.sort(c);e=a.shift();)e.__d&&(n=a.length,t=D(e,i,o)||t,0===n||a.length>n?(x(i,t,o),o.length=i.length=0,t=void 0,a.sort(c)):t&&r.__c&&r.__c(t,m));t&&x(i,t,o),S.__r=0}function N(e,t,n,i,r,o,a,s,l,c,u){var h,p,f,g,E,A=i&&i.__k||m,C=t.length;for(n.__d=l,M(n,t,A),l=n.__d,h=0;h<C;h++)null!=(f=n.__k[h])&&"boolean"!=typeof f&&"function"!=typeof f&&(p=-1===f.__i?d:A[f.__i]||d,f.__i=h,P(e,f,p,r,o,a,s,l,c,u),g=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&V(p.ref,null,f),u.push(f.ref,f.__c||g,f)),null==E&&null!=g&&(E=g),65536&f.__u||p.__k===f.__k?l=L(f,l,e):"function"==typeof f.type&&void 0!==f.__d?l=f.__d:g&&(l=g.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=l,n.__e=E}function M(e,t,n){var i,r,o,a,s,l=t.length,c=n.length,u=c,d=0;for(e.__k=[],i=0;i<l;i++)null!=(r=e.__k[i]=null==(r=t[i])||"boolean"==typeof r||"function"==typeof r?null:"string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?A(null,r,null,null,r):p(r)?A(v,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?A(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r)?(r.__=e,r.__b=e.__b+1,s=T(r,n,a=i+d,u),r.__i=s,o=null,-1!==s&&(u--,(o=n[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&d--,"function"!=typeof r.type&&(r.__u|=65536)):s!==a&&(s===a+1?d++:s>a?u>l-a?d+=s-a:d--:d=s<a&&s==a-1?s-a:0,s!==i+d&&(r.__u|=65536))):(o=n[i])&&null==o.key&&o.__e&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=y(o)),U(o,o,!1),n[i]=null,u--);if(u)for(i=0;i<c;i++)null!=(o=n[i])&&0==(131072&o.__u)&&(o.__e==e.__d&&(e.__d=y(o)),U(o,o))}function L(e,t,n){var i,r;if("function"==typeof e.type){for(i=e.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=e,t=L(i[r],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8===t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(p(e)?e.some((function(e){R(e,t)})):t.push(e)),t}function T(e,t,n,i){var r=e.key,o=e.type,a=n-1,s=n+1,l=t[n];if(null===l||l&&r==l.key&&o===l.type)return n;if(i>(null!=l&&0==(131072&l.__u)?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&0==(131072&l.__u)&&r==l.key&&o===l.type)return a;a--}if(s<t.length){if((l=t[s])&&0==(131072&l.__u)&&r==l.key&&o===l.type)return s;s++}}return-1}function w(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||h.test(t)?n:n+"px"}function O(e,t,n,i,r){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||w(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||w(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?i?n.u=i.u:(n.u=Date.now(),e.addEventListener(t,o?B:F,o)):e.removeEventListener(t,o?B:F,o);else{if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&"rowSpan"!==t&&"colSpan"!==t&&"role"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function F(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(r.event?r.event(e):e)}}function B(e){if(this.l)return this.l[e.type+!0](r.event?r.event(e):e)}function P(e,t,n,i,o,a,s,l,c,u){var d,m,h,g,E,A,C,y,D,I,b,S,M,L,R,T=t.type;if(void 0!==t.constructor)return null;128&n.__u&&(c=!!(32&n.__u),a=[l=t.__e=n.__e]),(d=r.__b)&&d(t);e:if("function"==typeof T)try{if(y=t.props,D=(d=T.contextType)&&i[d.__c],I=d?D?D.props.value:d.__:i,n.__c?C=(m=t.__c=n.__c).__=m.__E:("prototype"in T&&T.prototype.render?t.__c=m=new T(y,I):(t.__c=m=new _(y,I),m.constructor=T,m.render=W),D&&D.sub(m),m.props=y,m.state||(m.state={}),m.context=I,m.__n=i,h=m.__d=!0,m.__h=[],m._sb=[]),null==m.__s&&(m.__s=m.state),null!=T.getDerivedStateFromProps&&(m.__s==m.state&&(m.__s=f({},m.__s)),f(m.__s,T.getDerivedStateFromProps(y,m.__s))),g=m.props,E=m.state,m.__v=t,h)null==T.getDerivedStateFromProps&&null!=m.componentWillMount&&m.componentWillMount(),null!=m.componentDidMount&&m.__h.push(m.componentDidMount);else{if(null==T.getDerivedStateFromProps&&y!==g&&null!=m.componentWillReceiveProps&&m.componentWillReceiveProps(y,I),!m.__e&&(null!=m.shouldComponentUpdate&&!1===m.shouldComponentUpdate(y,m.__s,I)||t.__v===n.__v)){for(t.__v!==n.__v&&(m.props=y,m.state=m.__s,m.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<m._sb.length;b++)m.__h.push(m._sb[b]);m._sb=[],m.__h.length&&s.push(m);break e}null!=m.componentWillUpdate&&m.componentWillUpdate(y,m.__s,I),null!=m.componentDidUpdate&&m.__h.push((function(){m.componentDidUpdate(g,E,A)}))}if(m.context=I,m.props=y,m.__P=e,m.__e=!1,S=r.__r,M=0,"prototype"in T&&T.prototype.render){for(m.state=m.__s,m.__d=!1,S&&S(t),d=m.render(m.props,m.state,m.context),L=0;L<m._sb.length;L++)m.__h.push(m._sb[L]);m._sb=[]}else do{m.__d=!1,S&&S(t),d=m.render(m.props,m.state,m.context),m.state=m.__s}while(m.__d&&++M<25);m.state=m.__s,null!=m.getChildContext&&(i=f(f({},i),m.getChildContext())),h||null==m.getSnapshotBeforeUpdate||(A=m.getSnapshotBeforeUpdate(g,E)),N(e,p(R=null!=d&&d.type===v&&null==d.key?d.props.children:d)?R:[R],t,n,i,o,a,s,l,c,u),m.base=t.__e,t.__u&=-161,m.__h.length&&s.push(m),C&&(m.__E=m.__=null)}catch(e){t.__v=null,c||null!=a?(t.__e=l,t.__u|=c?160:32,a[a.indexOf(l)]=null):(t.__e=n.__e,t.__k=n.__k),r.__e(e,t,n)}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=k(n.__e,t,n,i,o,a,s,c,u);(d=r.diffed)&&d(t)}function x(e,t,n){for(var i=0;i<n.length;i++)V(n[i],n[++i],n[++i]);r.__c&&r.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){r.__e(e,t.__v)}}))}function k(e,t,n,r,o,a,s,l,c){var u,m,h,f,E,A,C,v=n.props,_=t.props,D=t.type;if("svg"===D&&(o=!0),null!=a)for(u=0;u<a.length;u++)if((E=a[u])&&"setAttribute"in E==!!D&&(D?E.localName===D:3===E.nodeType)){e=E,a[u]=null;break}if(null==e){if(null===D)return document.createTextNode(_);e=o?document.createElementNS("http://www.w3.org/2000/svg",D):document.createElement(D,_.is&&_),a=null,l=!1}if(null===D)v===_||l&&e.data===_||(e.data=_);else{if(a=a&&i.call(e.childNodes),v=n.props||d,!l&&null!=a)for(v={},u=0;u<e.attributes.length;u++)v[(E=e.attributes[u]).name]=E.value;for(u in v)E=v[u],"children"==u||("dangerouslySetInnerHTML"==u?h=E:"key"===u||u in _||O(e,u,null,E,o));for(u in _)E=_[u],"children"==u?f=E:"dangerouslySetInnerHTML"==u?m=E:"value"==u?A=E:"checked"==u?C=E:"key"===u||l&&"function"!=typeof E||v[u]===E||O(e,u,E,v[u],o);if(m)l||h&&(m.__html===h.__html||m.__html===e.innerHTML)||(e.innerHTML=m.__html),t.__k=[];else if(h&&(e.innerHTML=""),N(e,p(f)?f:[f],t,n,r,o&&"foreignObject"!==D,a,s,a?a[0]:n.__k&&y(n,0),l,c),null!=a)for(u=a.length;u--;)null!=a[u]&&g(a[u]);l||(u="value",void 0!==A&&(A!==e[u]||"progress"===D&&!A||"option"===D&&A!==v[u])&&O(e,u,A,v[u],!1),u="checked",void 0!==C&&C!==e[u]&&O(e,u,C,v[u],!1))}return e}function V(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){r.__e(e,n)}}function U(e,t,n){var i,o;if(r.unmount&&r.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||V(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){r.__e(e,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(o=0;o<i.length;o++)i[o]&&U(i[o],t,n||"function"!=typeof e.type);n||null==e.__e||g(e.__e),e.__=e.__e=e.__d=void 0}function W(e,t,n){return this.constructor(e,n)}function Z(e,t,n){var o,a,s,l;r.__&&r.__(e,t),a=(o="function"==typeof n)?null:n&&n.__k||t.__k,s=[],l=[],P(t,e=(!o&&n||t).__k=E(v,null,[e]),a||d,d,void 0!==t.ownerSVGElement,!o&&n?[n]:a?null:t.firstChild?i.call(t.childNodes):null,s,!o&&n?n:a?a.__e:t.firstChild,o,l),e.__d=void 0,x(s,e,l)}function H(e,t){Z(e,t,H)}function z(e,t,n){var r,o,a,s,l=f({},e.props);for(a in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)"key"==a?r=t[a]:"ref"==a?o=t[a]:l[a]=void 0===t[a]&&void 0!==s?s[a]:t[a];return arguments.length>2&&(l.children=arguments.length>3?i.call(arguments,2):n),A(e.type,l,r||e.key,o||e.ref,null)}function G(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,i;return this.getChildContext||(n=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,b(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}i=m.slice,r={__e:function(e,t,n,i){for(var r,o,a;t=t.__;)if((r=t.__c)&&!r.__)try{if((o=r.constructor)&&null!=o.getDerivedStateFromError&&(r.setState(o.getDerivedStateFromError(e)),a=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),a=r.__d),a)return r.__E=r}catch(t){e=t}throw e}},o=0,_.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=f({},this.state),"function"==typeof e&&(e=e(f({},n),this.props)),e&&f(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),b(this))},_.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),b(this))},_.prototype.render=v,a=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=function(e,t){return e.__v.__b-t.__v.__b},S.__r=0,u=0},173:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var i=n(5299);const r="undefined"!=typeof window?i.useLayoutEffect:i.useEffect},177:(e,t,n)=>{"use strict";n.d(t,{An:()=>a,Ni:()=>i,Oc:()=>r,Xb:()=>s,Y8:()=>l,YF:()=>d,f8:()=>p,hI:()=>o,hJ:()=>c,t:()=>u,vd:()=>m,w:()=>h,yH:()=>f});const i=["BINARY","ANTIALIASED"],r=["PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5"];var o;!function(e){e.from=function(e){const t=e._type;switch(t){case"LegacyFilter":return new a(e);case"ScanbotBinarizationFilter":return new s(e);case"CustomBinarizationFilter":return new l(e);case"ColorDocumentFilter":return new c(e);case"ColorDocumentShadowRemovalFilter":return new u(e);case"BrightnessFilter":return new d(e);case"ContrastFilter":return new m(e);case"GrayscaleFilter":return new h(e);case"WhiteBlackPointFilter":return new p(e);default:throw new Error(`Unknown child class name: ${t}`)}}}(o||(o={}));class a{constructor(e={}){this._type="LegacyFilter",this.filterType=0,void 0!==e.filterType&&(this.filterType=e.filterType)}}class s{constructor(e={}){this._type="ScanbotBinarizationFilter",this.outputMode="BINARY",void 0!==e.outputMode&&(this.outputMode=e.outputMode)}}class l{constructor(e={}){this._type="CustomBinarizationFilter",this.outputMode="BINARY",this.denoise=.5,this.radius=32,this.preset="PRESET_4",void 0!==e.outputMode&&(this.outputMode=e.outputMode),void 0!==e.denoise&&(this.denoise=e.denoise),void 0!==e.radius&&(this.radius=e.radius),void 0!==e.preset&&(this.preset=e.preset)}}class c{constructor(e={}){this._type="ColorDocumentFilter",this.contrastEnhancement=.5,this.colorEnhancement=.5,this.paperWhitening=1,this.paperWhiteningBias=0,void 0!==e.contrastEnhancement&&(this.contrastEnhancement=e.contrastEnhancement),void 0!==e.colorEnhancement&&(this.colorEnhancement=e.colorEnhancement),void 0!==e.paperWhitening&&(this.paperWhitening=e.paperWhitening),void 0!==e.paperWhiteningBias&&(this.paperWhiteningBias=e.paperWhiteningBias)}}class u{constructor(e={}){this._type="ColorDocumentShadowRemovalFilter",this.contrastEnhancement=.5,this.colorEnhancement=.5,this.paperSaturation=.5,this.paperLightness=.5,void 0!==e.contrastEnhancement&&(this.contrastEnhancement=e.contrastEnhancement),void 0!==e.colorEnhancement&&(this.colorEnhancement=e.colorEnhancement),void 0!==e.paperSaturation&&(this.paperSaturation=e.paperSaturation),void 0!==e.paperLightness&&(this.paperLightness=e.paperLightness)}}class d{constructor(e={}){this._type="BrightnessFilter",this.brightness=0,void 0!==e.brightness&&(this.brightness=e.brightness)}}class m{constructor(e={}){this._type="ContrastFilter",this.contrast=0,void 0!==e.contrast&&(this.contrast=e.contrast)}}class h{constructor(e={}){this._type="GrayscaleFilter",this.borderWidthFraction=.06,this.blackOutliersFraction=0,this.whiteOutliersFraction=.02,void 0!==e.borderWidthFraction&&(this.borderWidthFraction=e.borderWidthFraction),void 0!==e.blackOutliersFraction&&(this.blackOutliersFraction=e.blackOutliersFraction),void 0!==e.whiteOutliersFraction&&(this.whiteOutliersFraction=e.whiteOutliersFraction)}}class p{constructor(e={}){this._type="WhiteBlackPointFilter",this.blackPoint=0,this.whitePoint=1,void 0!==e.blackPoint&&(this.blackPoint=e.blackPoint),void 0!==e.whitePoint&&(this.whitePoint=e.whitePoint)}}const f=["DISABLED","ENABLED","ENABLED_IF_BINARIZATION_FILTER_SET"]},201:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Fragment:()=>i.FK,jsx:()=>c,jsxAttr:()=>h,jsxDEV:()=>c,jsxEscape:()=>p,jsxTemplate:()=>u,jsxs:()=>c});var i=n(172),r=/["&<]/;function o(e){if(0===e.length||!1===r.test(e))return e;for(var t=0,n=0,i="",o="";n<e.length;n++){switch(e.charCodeAt(n)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 60:o="&lt;";break;default:continue}n!==t&&(i+=e.slice(t,n)),i+=o,t=n+1}return n!==t&&(i+=e.slice(t,n)),i}var a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,s=0,l=Array.isArray;function c(e,t,n,r,o,a){var l,c,u={};for(c in t)"ref"==c?l=t[c]:u[c]=t[c];var d={type:e,props:u,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--s,__i:-1,__u:0,__source:o,__self:a};if("function"==typeof e&&(l=e.defaultProps))for(c in l)void 0===u[c]&&(u[c]=l[c]);return i.fF.vnode&&i.fF.vnode(d),d}function u(e){var t=c(i.FK,{tpl:e,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var d={},m=/[A-Z]/g;function h(e,t){if(i.fF.attr){var n=i.fF.attr(e,t);if("string"==typeof n)return n}if("ref"===e||"key"===e)return"";if("style"===e&&"object"==typeof t){var r="";for(var s in t){var l=t[s];if(null!=l&&""!==l){var c="-"==s[0]?s:d[s]||(d[s]=s.replace(m,"-$&").toLowerCase()),u=";";"number"!=typeof l||c.startsWith("--")||a.test(c)||(u="px;"),r=r+c+":"+l+u}}return e+'="'+r+'"'}return null==t||!1===t||"function"==typeof t||"object"==typeof t?"":!0===t?e:e+'="'+o(t)+'"'}function p(e){if(null==e||"boolean"==typeof e||"function"==typeof e)return null;if("object"==typeof e){if(void 0===e.constructor)return e;if(l(e)){for(var t=0;t<e.length;t++)e[t]=p(e[t]);return e}}return o(""+e)}},376:(e,t,n)=>{"use strict";n.d(t,{F:()=>r});var i=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};class r extends Error{constructor(e,t,n){super(t),this.name="",this.name=e,this.message=t,this.webApiError=n}static mediaDevicesUndefined(){return new r(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? If so, please use a secure context (HTTPS) or use 'localhost' explicitly.")}static enumerateDevicesFailed(){return new r(this.MESSAGE.DEVICES_UNDEFINED,"Does your device even have a camera? Because we're unable to query query navigator.mediaDevices?.enumerateDevices")}static mediaDeviceNotFound(e){return new r(this.MESSAGE.ENUMERATE_FAILED,"Does your device even have a camera? Because we were unable to query navigator.mediaDevices?.getUserMedia().",e)}static permissionDenied(e){return new r(this.MESSAGE.PERMISSION_DENIED,"Camera permission has not been granted. Please prompt your users again to grant permission.",e)}static unknown(e){return new r(this.MESSAGE.UNKNOWN,"\n Unfortunately we were unable to query navigator.mediaDevices.getUserMedia, \n and unable to determine the reason why. This may be caused by the user to denied the permission prompt. \n Or you may be using an in-app browser that itself has not been granted permission to use the camera.\n Or your users may be using a niche browser that does not support the media API at all!\n ",e)}static tryCheckPermission(){return i(this,void 0,void 0,(function*(){if(!this.permissionState)try{const e=yield navigator.permissions.query({name:"camera"});this.permissionState=e.state}catch(e){this.permissionState=this.PERMISSION_STATE.UNKNOWN}}))}static hasDeniedPermission(){return this.permissionState===this.PERMISSION_STATE.DENIED}static hasCheckedPermission(){return!!this.permissionState}static createFromDOMException(e){return e instanceof DOMException?"NotAllowedError"===e.name?r.permissionDenied("Specifically, the native 'NotAllowedError' was thrown."):"NotFoundError"===e.name?r.mediaDeviceNotFound("Specifically, the native 'NotFoundError' was thrown."):void 0:r.unknown(null==e?void 0:e.message)}}r.PERMISSION_STATE={GRANTED:"granted",DENIED:"denied",PROMPT:"prompt",UNKNOWN:"unknown"},r.MESSAGE={DEVICES_UNDEFINED:"MediaError_DevicesUndefined",DEVICE_NOT_FOUND:"MediaError_DeviceNotFound",ENUMERATE_FAILED:"MediaError_EnumerateFailed",PERMISSION_DENIED:"MediaError_PermissionDenied",UNKNOWN:"MediaError_Unknown"}},500:(e,t,n)=>{"use strict";n.d(t,{D7:()=>a,E_:()=>o});var i=n(5299),r=n(8382);function o(e){return{color:r.dI.getColorValue(e.color),textShadow:e.useShadow?"1px 1px 2px":""}}function a(e){var t;if(!e.config.visible)return null;const n=Object.assign(Object.assign({},e.style),o(e.config)),a=r.dI.getLocalizedText(e.config.text,e.replacementArgs),s={["data-sb-text-"+(null!==(t=e.debugName)&&void 0!==t?t:"default")]:!0};return e.asHtml?i.default.createElement("span",Object.assign({ref:e.innerRef,style:n,dangerouslySetInnerHTML:e.asHtml&&{__html:a}},s)):i.default.createElement("span",Object.assign({ref:e.innerRef,style:n},s),a)}},525:(e,t,n)=>{"use strict";n.d(t,{_:()=>s});var i=n(3221),r=n(718),o=n(5296),a=function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};class s extends i.pR{constructor(e){super(),this.___image_data="___image_data"in e?e.___image_data:function(e){if(!e)throw(0,o.$5)("InvalidImageRef","null image data or buffer");if("format"in e&&"string"==typeof e.format)return e;if("width"in e&&"number"==typeof e.width)return{data:e.data,width:e.width,height:e.height,format:"",step:0};return{data:ArrayBuffer.isView(e)?e:new Uint8Array(e),width:-1,height:-1,format:"",step:0}}(e)}get __image_data(){return this.___image_data}static fromUrl(e){return a(this,void 0,void 0,(function*(){const t=yield fetch(e);return new s(yield t.arrayBuffer())}))}static fromImageData(e){return new s(e)}static fromEncodedBinaryData(e){return new s(e)}static fromWrappedImage(e){return new s({___image_data:e})}toJpeg(e=80,t="COPY_IMAGE"){return a(this,void 0,void 0,(function*(){const n=r._.SINGLETON;return("COPY_IMAGE"===t?n.copyArgs:n.transferArgs).encodeJpeg(this,e)}))}}},586:(e,t,n)=>{"use strict";n.d(t,{gl:()=>o,pk:()=>i,sw:()=>r});class i{constructor(e={}){if(void 0===e.start)throw new Error("start must be present in constructor argument");if(this.start={x:e.start.x,y:e.start.y},void 0===e.end)throw new Error("end must be present in constructor argument");this.end={x:e.end.x,y:e.end.y}}}class r{constructor(e={}){if(void 0===e.start)throw new Error("start must be present in constructor argument");if(this.start={x:e.start.x,y:e.start.y},void 0===e.end)throw new Error("end must be present in constructor argument");this.end={x:e.end.x,y:e.end.y}}}class o{constructor(e={}){this.width=1,this.height=1,void 0!==e.width&&(this.width=e.width),void 0!==e.height&&(this.height=e.height)}}},681:(e,t,n)=>{"use strict";n.d(t,{TM:()=>i.TM,VG:()=>i.VG,Zf:()=>i.Zf});var i=n(8627)},718:(e,t,n)=>{"use strict";n.d(t,{_:()=>a});var i=n(3575),r=n(5581),o=n(5296);class a{constructor(e,t){this.errorInWorker=null,this.createProxy=e=>new Proxy({},{get:(t,n,i)=>new Proxy((()=>{}),{apply:(t,i,r)=>this.post(n,r,e),get:(t,i,r)=>(...t)=>this.post(n+"."+i,t,e)})}),this.handleUnrecoverableError=e=>{this.errorInWorker=e;for(const t in this.continuations)this.continuations[t].reject(e),delete this.continuations[t]},this.copyArgs=this.createProxy("copy"),this.transferArgs=this.createProxy("transfer"),this.api=new r.u(this),a.SINGLETON=this;const{requestSuffix:n=""}=t||{},s=(0,i.Jk)(t),l=`${e}${e.endsWith("/")?"":"/"}ScanbotSDK.Core${s}.js${n}`;if((0,i.Vx)(l)){const e=new Blob([`importScripts("${l}")`]);this.instance=new Worker(URL.createObjectURL(e))}else this.instance=new Worker(l);this.continuations={},this.nextTicketId=1,this.instance.onmessage=e=>{const{log:t,logError:n}=e.data;if(t)return void console.log(...t);if(n)return void console.error(...n);const{ticket:i,result:r,recoverableError:a,unrecoverableError:s}=e.data,l=this.continuations[i];if(!l)return;const{resolve:c,reject:u,command:d}=l;if(delete this.continuations[i],s)u(s),this.handleUnrecoverableError(s);else if(a){u("errorType"in e.data?(0,o.$5)(e.data.errorType,`Error in worker while running command '${d}'`,a):a)}else c(r)},this.instance.onerror=e=>{this.handleUnrecoverableError(e.error)}}post(e,t,n){return this.errorInWorker?Promise.reject(this.errorInWorker):new Promise(((r,o)=>{const a=(0,i.ef)(t,"copy"==n),s=this.nextTicketId++;this.continuations[s]={resolve:r,reject:o,command:e},this.instance.postMessage({command:e,args:t,ticket:s},a)}))}destroy(){this.instance.terminate()}}a.SINGLETON=null},780:(e,t,n)=>{"use strict";n.d(t,{Dx:()=>Bt,AH:()=>Ut,Ay:()=>Ht,i7:()=>zt});var i=n(5215),r=n(5299),o=n(2833),a=n.n(o),s="-ms-",l="-moz-",c="-webkit-",u="comm",d="rule",m="decl",h="@keyframes",p=Math.abs,f=String.fromCharCode,g=Object.assign;function E(e){return e.trim()}function A(e,t){return(e=t.exec(e))?e[0]:e}function C(e,t,n){return e.replace(t,n)}function v(e,t,n){return e.indexOf(t,n)}function _(e,t){return 0|e.charCodeAt(t)}function y(e,t,n){return e.slice(t,n)}function D(e){return e.length}function I(e){return e.length}function b(e,t){return t.push(e),e}function S(e,t){return e.filter((function(e){return!A(e,t)}))}var N=1,M=1,L=0,R=0,T=0,w="";function O(e,t,n,i,r,o,a,s){return{value:e,root:t,parent:n,type:i,props:r,children:o,line:N,column:M,length:a,return:"",siblings:s}}function F(e,t){return g(O("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function B(e){for(;e.root;)e=F(e.root,{children:[e]});b(e,e.siblings)}function P(){return T=R>0?_(w,--R):0,M--,10===T&&(M=1,N--),T}function x(){return T=R<L?_(w,R++):0,M++,10===T&&(M=1,N++),T}function k(){return _(w,R)}function V(){return R}function U(e,t){return y(w,e,t)}function W(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Z(e){return N=M=1,L=D(w=e),R=0,[]}function H(e){return w="",e}function z(e){return E(U(R-1,j(91===e?e+2:40===e?e+1:e)))}function G(e){for(;(T=k())&&T<33;)x();return W(e)>2||W(T)>3?"":" "}function Y(e,t){for(;--t&&x()&&!(T<48||T>102||T>57&&T<65||T>70&&T<97););return U(e,V()+(t<6&&32==k()&&32==x()))}function j(e){for(;x();)switch(T){case e:return R;case 34:case 39:34!==e&&39!==e&&j(T);break;case 40:41===e&&j(e);break;case 92:x()}return R}function q(e,t){for(;x()&&e+T!==57&&(e+T!==84||47!==k()););return"/*"+U(t,R-1)+"*"+f(47===e?e:x())}function X(e){for(;!W(k());)x();return U(e,R)}function Q(e,t){for(var n="",i=0;i<e.length;i++)n+=t(e[i],i,e,t)||"";return n}function $(e,t,n,i){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case m:return e.return=e.return||e.value;case u:return"";case h:return e.return=e.value+"{"+Q(e.children,i)+"}";case d:if(!D(e.value=e.props.join(",")))return""}return D(n=Q(e.children,i))?e.return=e.value+"{"+n+"}":""}function K(e,t,n){switch(function(e,t){return 45^_(e,0)?(((t<<2^_(e,0))<<2^_(e,1))<<2^_(e,2))<<2^_(e,3):0}(e,t)){case 5103:return c+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return c+e+e;case 4789:return l+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return c+e+l+e+s+e+e;case 5936:switch(_(e,t+11)){case 114:return c+e+s+C(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return c+e+s+C(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return c+e+s+C(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return c+e+s+e+e;case 6165:return c+e+s+"flex-"+e+e;case 5187:return c+e+C(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return c+e+s+"flex-item-"+C(e,/flex-|-self/g,"")+(A(e,/flex-|baseline/)?"":s+"grid-row-"+C(e,/flex-|-self/g,""))+e;case 4675:return c+e+s+"flex-line-pack"+C(e,/align-content|flex-|-self/g,"")+e;case 5548:return c+e+s+C(e,"shrink","negative")+e;case 5292:return c+e+s+C(e,"basis","preferred-size")+e;case 6060:return c+"box-"+C(e,"-grow","")+c+e+s+C(e,"grow","positive")+e;case 4554:return c+C(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return C(C(C(e,/(zoom-|grab)/,c+"$1"),/(image-set)/,c+"$1"),e,"")+e;case 5495:case 3959:return C(e,/(image-set\([^]*)/,c+"$1$`$1");case 4968:return C(C(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+c+e+e;case 4200:if(!A(e,/flex-|baseline/))return s+"grid-column-align"+y(e,t)+e;break;case 2592:case 3360:return s+C(e,"template-","")+e;case 4384:case 3616:return n&&n.some((function(e,n){return t=n,A(e.props,/grid-\w+-end/)}))?~v(e+(n=n[t].value),"span",0)?e:s+C(e,"-start","")+e+s+"grid-row-span:"+(~v(n,"span",0)?A(n,/\d+/):+A(n,/\d+/)-+A(e,/\d+/))+";":s+C(e,"-start","")+e;case 4896:case 4128:return n&&n.some((function(e){return A(e.props,/grid-\w+-start/)}))?e:s+C(C(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return C(e,/(.+)-inline(.+)/,c+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(D(e)-1-t>6)switch(_(e,t+1)){case 109:if(45!==_(e,t+4))break;case 102:return C(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+l+(108==_(e,t+3)?"$3":"$2-$3"))+e;case 115:return~v(e,"stretch",0)?K(C(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return C(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,n,i,r,o,a,l){return s+n+":"+i+l+(r?s+n+"-span:"+(o?a:+a-+i)+l:"")+e}));case 4949:if(121===_(e,t+6))return C(e,":",":"+c)+e;break;case 6444:switch(_(e,45===_(e,14)?18:11)){case 120:return C(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+c+(45===_(e,14)?"inline-":"")+"box$3$1"+c+"$2$3$1"+s+"$2box$3")+e;case 100:return C(e,":",":"+s)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return C(e,"scroll-","scroll-snap-")+e}return e}function J(e,t,n,i){if(e.length>-1&&!e.return)switch(e.type){case m:return void(e.return=K(e.value,e.length,n));case h:return Q([F(e,{value:C(e.value,"@","@"+c)})],i);case d:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,(function(t){switch(A(t,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":B(F(e,{props:[C(t,/:(read-\w+)/,":-moz-$1")]})),B(F(e,{props:[t]})),g(e,{props:S(n,i)});break;case"::placeholder":B(F(e,{props:[C(t,/:(plac\w+)/,":-webkit-input-$1")]})),B(F(e,{props:[C(t,/:(plac\w+)/,":-moz-$1")]})),B(F(e,{props:[C(t,/:(plac\w+)/,s+"input-$1")]})),B(F(e,{props:[t]})),g(e,{props:S(n,i)})}return""}))}}function ee(e){return H(te("",null,null,null,[""],e=Z(e),0,[0],e))}function te(e,t,n,i,r,o,a,s,l){for(var c=0,u=0,d=a,m=0,h=0,g=0,E=1,A=1,y=1,I=0,S="",N=r,M=o,L=i,R=S;A;)switch(g=I,I=x()){case 40:if(108!=g&&58==_(R,d-1)){-1!=v(R+=C(z(I),"&","&\f"),"&\f",p(c?s[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:R+=z(I);break;case 9:case 10:case 13:case 32:R+=G(g);break;case 92:R+=Y(V()-1,7);continue;case 47:switch(k()){case 42:case 47:b(ie(q(x(),V()),t,n,l),l);break;default:R+="/"}break;case 123*E:s[c++]=D(R)*y;case 125*E:case 59:case 0:switch(I){case 0:case 125:A=0;case 59+u:-1==y&&(R=C(R,/\f/g,"")),h>0&&D(R)-d&&b(h>32?re(R+";",i,n,d-1,l):re(C(R," ","")+";",i,n,d-2,l),l);break;case 59:R+=";";default:if(b(L=ne(R,t,n,c,u,r,s,S,N=[],M=[],d,o),o),123===I)if(0===u)te(R,t,L,L,N,o,d,s,M);else switch(99===m&&110===_(R,3)?100:m){case 100:case 108:case 109:case 115:te(e,L,L,i&&b(ne(e,L,L,0,0,r,s,S,r,N=[],d,M),M),r,M,d,s,i?N:M);break;default:te(R,L,L,L,[""],M,0,s,M)}}c=u=h=0,E=y=1,S=R="",d=a;break;case 58:d=1+D(R),h=g;default:if(E<1)if(123==I)--E;else if(125==I&&0==E++&&125==P())continue;switch(R+=f(I),I*E){case 38:y=u>0?1:(R+="\f",-1);break;case 44:s[c++]=(D(R)-1)*y,y=1;break;case 64:45===k()&&(R+=z(x())),m=k(),u=d=D(S=R+=X(V())),I++;break;case 45:45===g&&2==D(R)&&(E=0)}}return o}function ne(e,t,n,i,r,o,a,s,l,c,u,m){for(var h=r-1,f=0===r?o:[""],g=I(f),A=0,v=0,_=0;A<i;++A)for(var D=0,b=y(e,h+1,h=p(v=a[A])),S=e;D<g;++D)(S=E(v>0?f[D]+" "+b:C(b,/&\f/g,f[D])))&&(l[_++]=S);return O(e,t,n,0===r?d:s,l,c,u,m)}function ie(e,t,n,i){return O(e,t,n,u,f(T),y(e,2,-2),0,i)}function re(e,t,n,i,r){return O(e,t,n,m,y(e,0,i),y(e,i+1,-1),i,r)}const oe={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ae="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",se="active",le="data-styled-version",ce="6.1.8",ue="/*!sc*/\n",de="undefined"!=typeof window&&"HTMLElement"in window,me=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY)),he=(new Set,Object.freeze([])),pe=Object.freeze({});function fe(e,t,n){return void 0===n&&(n=pe),e.theme!==n.theme&&e.theme||t||n.theme}var ge=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Ee=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ae=/(^-|-$)/g;function Ce(e){return e.replace(Ee,"-").replace(Ae,"")}var ve=/(a)(d)/gi,_e=function(e){return String.fromCharCode(e+(e>25?39:97))};function ye(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=_e(t%52)+n;return(_e(t%52)+n).replace(ve,"$1-$2")}var De,Ie=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},be=function(e){return Ie(5381,e)};function Se(e){return ye(be(e)>>>0)}function Ne(e){return e.displayName||e.name||"Component"}function Me(e){return"string"==typeof e&&!0}var Le="function"==typeof Symbol&&Symbol.for,Re=Le?Symbol.for("react.memo"):60115,Te=Le?Symbol.for("react.forward_ref"):60112,we={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Oe={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Fe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Be=((De={})[Te]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},De[Re]=Fe,De);function Pe(e){return("type"in(t=e)&&t.type.$$typeof)===Re?Fe:"$$typeof"in e?Be[e.$$typeof]:we;var t}var xe=Object.defineProperty,ke=Object.getOwnPropertyNames,Ve=Object.getOwnPropertySymbols,Ue=Object.getOwnPropertyDescriptor,We=Object.getPrototypeOf,Ze=Object.prototype;function He(e,t,n){if("string"!=typeof t){if(Ze){var i=We(t);i&&i!==Ze&&He(e,i,n)}var r=ke(t);Ve&&(r=r.concat(Ve(t)));for(var o=Pe(e),a=Pe(t),s=0;s<r.length;++s){var l=r[s];if(!(l in Oe||n&&n[l]||a&&l in a||o&&l in o)){var c=Ue(t,l);try{xe(e,l,c)}catch(e){}}}}return e}function ze(e){return"function"==typeof e}function Ge(e){return"object"==typeof e&&"styledComponentId"in e}function Ye(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function je(e,t){if(0===e.length)return"";for(var n=e[0],i=1;i<e.length;i++)n+=t?t+e[i]:e[i];return n}function qe(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Xe(e,t,n){if(void 0===n&&(n=!1),!n&&!qe(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)e[i]=Xe(e[i],t[i]);else if(qe(t))for(var i in t)e[i]=Xe(e[i],t[i]);return e}function Qe(e,t){Object.defineProperty(e,"toString",{value:t})}function $e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var Ke=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,i=n.length,r=i;e>=r;)if((r<<=1)<0)throw $e(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var o=i;o<r;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),s=(o=0,t.length);o<s;o++)this.tag.insertRule(a,t[o])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),i=n+t;this.groupSizes[e]=0;for(var r=n;r<i;r++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],i=this.indexOfGroup(e),r=i+n,o=i;o<r;o++)t+="".concat(this.tag.getRule(o)).concat(ue);return t},e}(),Je=new Map,et=new Map,tt=1,nt=function(e){if(Je.has(e))return Je.get(e);for(;et.has(tt);)tt++;var t=tt++;return Je.set(e,t),et.set(t,e),t},it=function(e,t){tt=t+1,Je.set(e,t),et.set(t,e)},rt="style[".concat(ae,"][").concat(le,'="').concat(ce,'"]'),ot=new RegExp("^".concat(ae,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),at=function(e,t,n){for(var i,r=n.split(","),o=0,a=r.length;o<a;o++)(i=r[o])&&e.registerName(t,i)},st=function(e,t){for(var n,i=(null!==(n=t.textContent)&&void 0!==n?n:"").split(ue),r=[],o=0,a=i.length;o<a;o++){var s=i[o].trim();if(s){var l=s.match(ot);if(l){var c=0|parseInt(l[1],10),u=l[2];0!==c&&(it(u,c),at(e,u,l[3]),e.getTag().insertRules(c,r)),r.length=0}else r.push(s)}}};function lt(){return n.nc}var ct=function(e){var t=document.head,n=e||t,i=document.createElement("style"),r=function(e){var t=Array.from(e.querySelectorAll("style[".concat(ae,"]")));return t[t.length-1]}(n),o=void 0!==r?r.nextSibling:null;i.setAttribute(ae,se),i.setAttribute(le,ce);var a=lt();return a&&i.setAttribute("nonce",a),n.insertBefore(i,o),i},ut=function(){function e(e){this.element=ct(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,i=t.length;n<i;n++){var r=t[n];if(r.ownerNode===e)return r}throw $e(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),dt=function(){function e(e){this.element=ct(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),mt=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),ht=de,pt={isServer:!de,useCSSOMInjection:!me},ft=function(){function e(e,t,n){void 0===e&&(e=pe),void 0===t&&(t={});var r=this;this.options=(0,i.Cl)((0,i.Cl)({},pt),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&de&&ht&&(ht=!1,function(e){for(var t=document.querySelectorAll(rt),n=0,i=t.length;n<i;n++){var r=t[n];r&&r.getAttribute(ae)!==se&&(st(e,r),r.parentNode&&r.parentNode.removeChild(r))}}(this)),Qe(this,(function(){return function(e){for(var t=e.getTag(),n=t.length,i="",r=function(n){var r=function(e){return et.get(e)}(n);if(void 0===r)return"continue";var o=e.names.get(r),a=t.getGroup(n);if(void 0===o||0===a.length)return"continue";var s="".concat(ae,".g").concat(n,'[id="').concat(r,'"]'),l="";void 0!==o&&o.forEach((function(e){e.length>0&&(l+="".concat(e,","))})),i+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(ue)},o=0;o<n;o++)r(o);return i}(r)}))}return e.registerId=function(e){return nt(e)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e((0,i.Cl)((0,i.Cl)({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new mt(n):t?new ut(n):new dt(n)}(this.options),new Ke(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(nt(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(nt(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(nt(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),gt=/&/g,Et=/^\s*\/\/.*$/gm;function At(e,t){return e.map((function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map((function(e){return"".concat(t," ").concat(e)}))),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=At(e.children,t)),e}))}function Ct(e){var t,n,i,r=void 0===e?pe:e,o=r.options,a=void 0===o?pe:o,s=r.plugins,l=void 0===s?he:s,c=function(e,i,r){return r.startsWith(n)&&r.endsWith(n)&&r.replaceAll(n,"").length>0?".".concat(t):e},u=l.slice();u.push((function(e){e.type===d&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(gt,n).replace(i,c))})),a.prefix&&u.push(J),u.push($);var m=function(e,r,o,s){void 0===r&&(r=""),void 0===o&&(o=""),void 0===s&&(s="&"),t=s,n=r,i=new RegExp("\\".concat(n,"\\b"),"g");var l=e.replace(Et,""),c=ee(o||r?"".concat(o," ").concat(r," { ").concat(l," }"):l);a.namespace&&(c=At(c,a.namespace));var d,m,h,p=[];return Q(c,(d=u.concat((h=function(e){return p.push(e)},function(e){e.root||(e=e.return)&&h(e)})),m=I(d),function(e,t,n,i){for(var r="",o=0;o<m;o++)r+=d[o](e,t,n,i)||"";return r})),p};return m.hash=l.length?l.reduce((function(e,t){return t.name||$e(15),Ie(e,t.name)}),5381).toString():"",m}var vt=new ft,_t=Ct(),yt=r.default.createContext({shouldForwardProp:void 0,styleSheet:vt,stylis:_t}),Dt=(yt.Consumer,r.default.createContext(void 0));function It(){return(0,r.useContext)(yt)}function bt(e){var t=(0,r.useState)(e.stylisPlugins),n=t[0],i=t[1],o=It().styleSheet,s=(0,r.useMemo)((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target,o]),l=(0,r.useMemo)((function(){return Ct({options:{namespace:e.namespace,prefix:e.enableVendorPrefixes},plugins:n})}),[e.enableVendorPrefixes,e.namespace,n]);(0,r.useEffect)((function(){a()(n,e.stylisPlugins)||i(e.stylisPlugins)}),[e.stylisPlugins]);var c=(0,r.useMemo)((function(){return{shouldForwardProp:e.shouldForwardProp,styleSheet:s,stylis:l}}),[e.shouldForwardProp,s,l]);return r.default.createElement(yt.Provider,{value:c},r.default.createElement(Dt.Provider,{value:l},e.children))}var St=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=_t);var i=n.name+t.hash;e.hasNameForId(n.id,i)||e.insertRules(n.id,i,t(n.rules,i,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,Qe(this,(function(){throw $e(12,String(n.name))}))}return e.prototype.getName=function(e){return void 0===e&&(e=_t),this.name+e.hash},e}(),Nt=function(e){return e>="A"&&e<="Z"};function Mt(e){for(var t="",n=0;n<e.length;n++){var i=e[n];if(1===n&&"-"===i&&"-"===e[0])return e;Nt(i)?t+="-"+i.toL