PageSourceSearch

https://www.xconvert.com/_next/static/chunks/pages/_app-5d9d7bf0a6287da7.js

js xconvert.com collected 2026-10-02 06:08:03 UTC 750,093 bytes, 52 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[636],{92:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(71463)}])},990:(e,t,r)=>{"use strict";r.d(t,{Z:()=>u});var n=r(45019),i=r(2943),o=r(99991),s=r(65104),a=r(32277);function l(e,t,r,n,o,l,c,u){var d=[],h=0,p=0,f=!1,g=function(){!f||d.length||h||t.complete()},m=function(e){return h<n?v(e):d.push(e)},v=function(e){l&&t.next(e),h++;var u=!1;(0,i.Tg)(r(e,p++)).subscribe((0,a._)(t,function(e){null==o||o(e),l?m(e):t.next(e)},function(){u=!0},void 0,function(){if(u)try{h--;for(var e=function(){var e=d.shift();c?(0,s.N)(t,c,function(){return v(e)}):v(e)};d.length&&h<n;)e();g()}catch(e){t.error(e)}}))};return e.subscribe((0,a._)(t,m,function(){f=!0,g()})),function(){null==u||u()}}var c=r(77698);function u(e,t,r){return(void 0===r&&(r=1/0),(0,c.T)(t))?u(function(r,o){return(0,n.T)(function(e,n){return t(r,e,o,n)})((0,i.Tg)(e(r,o)))},r):("number"==typeof t&&(r=t),(0,o.N)(function(t,n){return l(t,n,e,r)}))}},1097:(e,t,r)=>{"use strict";e.exports=r.g.location||{origin:"http://localhost:80",protocol:"http:",host:"localhost",port:80,href:"http://localhost/",hash:""}},1458:(e,t,r)=>{"use strict";r.d(t,{w:()=>d});var n=r(39030),i=r(99270),o=r(99991),s=r(2943),a=r(78204),l=r(32277),c=r(65104),u=(0,a.L)(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function d(e,t){var r=(0,i.v)(e)?{first:e}:"number"==typeof e?{each:e}:e,a=r.first,u=r.each,d=r.with,p=void 0===d?h:d,f=r.scheduler,g=void 0===f?null!=t?t:n.E:f,m=r.meta,v=void 0===m?null:m;if(null==a&&null==u)throw TypeError("No timeout provided.");return(0,o.N)(function(e,t){var r,n,i=null,o=0,d=function(e){n=(0,c.N)(t,g,function(){try{r.unsubscribe(),(0,s.Tg)(p({meta:v,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}},e)};r=e.subscribe((0,l._)(t,function(e){null==n||n.unsubscribe(),o++,t.next(i=e),u>0&&d(u)},void 0,void 0,function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null})),o||d(null!=a?"number"==typeof a?a:a-g.now():u)})}function h(e){throw new u(e)}},1576:(e,t,r)=>{"use strict";r.d(t,{U:()=>n});var n={now:function(){return(n.delegate||Date).now()},delegate:void 0}},1636:(e,t,r)=>{"use strict";r.d(t,{R:()=>v});var n=r(4902),i=r(45019),o=r(86728);function s(e){switch(e.responseType){case"json":if("response"in e)return e.response;var t=e;return JSON.parse(t.responseText);case"document":return e.responseXML;default:if("response"in e)return e.response;var t=e;return t.responseText}}var a=function(){return function(e,t,r,n){void 0===n&&(n="download_load"),this.originalEvent=e,this.xhr=t,this.request=r,this.type=n;var i=t.status,o=t.responseType;this.status=null!=i?i:0,this.responseType=null!=o?o:"";var a=t.getAllResponseHeaders();this.responseHeaders=a?a.split("\n").reduce(function(e,t){var r=t.indexOf(": ");return e[t.slice(0,r)]=t.slice(r+2),e},{}):{},this.response=s(t);var l=e.loaded,c=e.total;this.loaded=l,this.total=c}}(),l=(0,r(78204).L)(function(e){return function(e,t,r){var n;this.message=e,this.name="AjaxError",this.xhr=t,this.request=r,this.status=t.status,this.responseType=t.responseType;try{n=s(t)}catch(e){n=t.responseText}this.response=n}}),c=function(){function e(e,t){return l.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this}return e.prototype=Object.create(l.prototype),e}();function u(e,t){return v({method:"GET",url:e,headers:t})}function d(e,t,r){return v({method:"POST",url:e,body:t,headers:r})}function h(e,t){return v({method:"DELETE",url:e,headers:t})}function p(e,t,r){return v({method:"PUT",url:e,body:t,headers:r})}function f(e,t,r){return v({method:"PATCH",url:e,body:t,headers:r})}var g=(0,i.T)(function(e){return e.response});function m(e,t){return g(v({method:"GET",url:e,headers:t}))}var v=function(){var e=function(e){return _("string"==typeof e?{url:e}:e)};return e.get=u,e.post=d,e.delete=h,e.put=p,e.patch=f,e.getJSON=m,e}(),y="upload",b="download",S="loadstart",E="progress",w="load";function _(e){return new o.c(function(t){var r,i,o,s,u=(0,n.Cl)({async:!0,crossDomain:!1,withCredentials:!1,method:"GET",timeout:0,responseType:"json"},e),d=u.queryParams,h=u.body,p=u.headers,f=u.url;if(!f)throw TypeError("url is required");if(d)if(f.includes("?")){var g=f.split("?");if(2<g.length)throw TypeError("invalid url");
1o=new URLSearchParams(g[1]),new URLSearchParams(d).forEach(function(e,t){return o.set(t,e)}),f=g[0]+"?"+o}else f=f+"?"+(o=new URLSearchParams(d));var m={};if(p)for(var v in p)p.hasOwnProperty(v)&&(m[v.toLowerCase()]=p[v]);var _=u.crossDomain;_||"x-requested-with"in m||(m["x-requested-with"]="XMLHttpRequest");var T=u.withCredentials,O=u.xsrfCookieName,C=u.xsrfHeaderName;if((T||!_)&&O&&C){var I=null!=(i=null==(r=null==document?void 0:document.cookie.match(RegExp("(^|;\\s*)("+O+")=([^;]*)")))?void 0:r.pop())?i:"";I&&(m[C]=I)}var P=A(h,m),x=(0,n.Cl)((0,n.Cl)({},u),{url:f,headers:m,body:P});s=e.createXHR?e.createXHR():new XMLHttpRequest;var k=e.progressSubscriber,M=e.includeDownloadProgress,D=void 0!==M&&M,R=e.includeUploadProgress,F=void 0!==R&&R,N=function(e,r){s.addEventListener(e,function(){var e,n=r();null==(e=null==k?void 0:k.error)||e.call(k,n),t.error(n)})};N("timeout",function(){return new c(s,x)}),N("abort",function(){return new l("aborted",s,x)});var L=function(e,t){return new a(t,s,x,e+"_"+t.type)},j=function(e,r,n){e.addEventListener(r,function(e){t.next(L(n,e))})};F&&[S,E,w].forEach(function(e){return j(s.upload,e,y)}),k&&[S,E].forEach(function(e){return s.upload.addEventListener(e,function(e){var t;return null==(t=null==k?void 0:k.next)?void 0:t.call(k,e)})}),D&&[S,E].forEach(function(e){return j(s,e,b)});var U=function(e){var r="ajax error"+(e?" "+e:"");t.error(new l(r,s,x))};s.addEventListener("error",function(e){var t;null==(t=null==k?void 0:k.error)||t.call(k,e),U()}),s.addEventListener(w,function(e){var r,n,i=s.status;if(i<400){null==(r=null==k?void 0:k.complete)||r.call(k);var o=void 0;try{o=L(b,e)}catch(e){t.error(e);return}t.next(o),t.complete()}else null==(n=null==k?void 0:k.error)||n.call(k,e),U(i)});var $=x.user,B=x.method,W=x.async;for(var v in $?s.open(B,f,W,$,x.password):s.open(B,f,W),W&&(s.timeout=x.timeout,s.responseType=x.responseType),"withCredentials"in s&&(s.withCredentials=x.withCredentials),m)m.hasOwnProperty(v)&&s.setRequestHeader(v,m[v]);return P?s.send(P):s.send(),function(){s&&4!==s.readyState&&s.abort()}})}function A(e,t){var r;if(!e||"string"==typeof e||k(e)||M(e)||C(e)||I(e)||P(e)||D(e))return e;if(x(e))return e.buffer;if("object"==typeof e)return t["content-type"]=null!=(r=t["content-type"])?r:"application/json;charset=utf-8",JSON.stringify(e);throw TypeError("Unknown body type")}var T=Object.prototype.toString;function O(e,t){return T.call(e)==="[object "+t+"]"}function C(e){return O(e,"ArrayBuffer")}function I(e){return O(e,"File")}function P(e){return O(e,"Blob")}function x(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView(e)}function k(e){return"u">typeof FormData&&e instanceof FormData}function M(e){return"u">typeof URLSearchParams&&e instanceof URLSearchParams}function D(e){return"u">typeof ReadableStream&&e instanceof ReadableStream}},1878:(e,t,r)=>{"use strict";var n=r(93570),i=r(76976);function o(e,t,r,n){i.call(this,e,t,r,n)}n(o,i),o.enabled=i.enabled&&i.supportsCORS,e.exports=o},1936:(e,t,r)=>{"use strict";r.d(t,{w:()=>u});var n=r(4902),i=r(43604),o=r(9968),s=r(31962),a=r(2807),l=r(79347),c=r(29238);class u{constructor(e,t,r,n){this.env=e,this.apiConfig=t,this.authService=r,this.loginService=n,l.jo.registerCommonHttpHeadersProvider(this)}getCommonHttpHeaders(){let e={};e.sitename=`${this.apiConfig.apiDomainName}`,e.domainname=`${this.env.domainname}`,this.loginService.userIpAddress&&(e["ip-address"]=`${this.loginService.userIpAddress}`),this.loginService.userCountry&&(e.country=`${this.loginService.userCountry}`);let t=this.authService.getToken();return t&&(e.Authorization=`Bearer ${t}`),e}}u=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a.v)),(0,n.Qj)(1,(0,i.WQ)(o.ApiConfig)),(0,n.Qj)(2,(0,i.WQ)(s.u)),(0,n.Qj)(3,(0,i.WQ)(c.H)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.v?Object:a.v,void 0===o.ApiConfig?Object:o.ApiConfig,void 0===s.u?Object:s.u,void 0===c.H?Object:c.H])],u)},2170:(e,t,r)=>{"use strict";e.exports=[r(53299),r(92367),r(67059),r(69537),r(90451)(r(69537)),r(69071),r(90451)(r(69071)),r(80400),r(91732),r(90451)(r
vendor: 6,507 bytes, line 1
1(80400)),r(61652)]},2331:(e,t,r)=>{var n=r(94552),i=r(35536),o=r(17565),s=r(76217),a=r(47129);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},2544:(e,t,r)=>{"use strict";var n=r(87711),i=r(49794),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,s=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(o,"")}var h=[["#","hash"],["?","query"],function(e,t){return g(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],p={hash:1,query:1};function f(e){var t,n,i=(t="u">typeof window?window:void 0!==r.g?r.g:"u">typeof self?self:{}).location||{},o={},s=typeof(e=e||i);if("blob:"===e.protocol)o=new y(unescape(e.pathname),{});else if("string"===s)for(n in o=new y(e,{}),p)delete o[n];else if("object"===s){for(n in e)n in p||(o[n]=e[n]);void 0===o.slashes&&(o.slashes=a.test(e.href))}return o}function g(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function m(e,t){e=(e=d(e)).replace(s,""),t=t||{};var r,n=c.exec(e),i=n[1]?n[1].toLowerCase():"",o=!!n[2],a=!!n[3],l=0;return o?a?(r=n[2]+n[3]+n[4],l=n[2].length+n[3].length):(r=n[2]+n[4],l=n[2].length):a?(r=n[3]+n[4],l=n[3].length):r=n[4],"file:"===i?l>=2&&(r=r.slice(2)):g(i)?r=n[4]:i?o&&(r=r.slice(2)):l>=2&&g(t.protocol)&&(r=n[4]),{protocol:i,slashes:o||g(i),slashesCount:l,rest:r}}function v(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,i=r[n-1],o=!1,s=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),s++):s&&(0===n&&(o=!0),r.splice(n,1),s--);return o&&r.unshift(""),("."===i||".."===i)&&r.push(""),r.join("/")}function y(e,t,r){if(e=(e=d(e)).replace(s,""),!(this instanceof y))return new y(e,t,r);var o,a,l,c,p,b,S=h.slice(),E=typeof t,w=this,_=0;for("object"!==E&&"string"!==E&&(r=t,t=null),r&&"function"!=typeof r&&(r=i.parse),o=!(a=m(e||"",t=f(t))).protocol&&!a.slashes,w.slashes=a.slashes||o&&t.slashes,w.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||u.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!g(w.protocol)))&&(S[3]=[/(.*)/,"pathname"]);_<S.length;_++){if("function"==typeof(c=S[_])){e=c(e,w);continue}l=c[0],b=c[1],l!=l?w[b]=e:"string"==typeof l?~(p="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(w[b]=e.slice(0,p),e=e.slice(p+c[2])):(w[b]=e.slice(p),e=e.slice(0,p))):(p=l.exec(e))&&(w[b]=p[1],e=e.slice(0,p.index)),w[b]=w[b]||o&&c[3]&&t[b]||"",c[4]&&(w[b]=w[b].toLowerCase())}r&&(w.query=r(w.query)),o&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=v(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&g(w.protocol)&&(w.pathname="/"+w.pathname),n(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(p=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,p),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(p+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}y.prototype={set:function(e,t,r){var o=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||i.parse)(t)),o[e]=t;break;case"port":o[e]=t,n(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,l.test(t)?(o.port=(t=t.split(":")).pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!r;break;case"pathname":case"hash":if(t){var s="pathname"===e?"/":"#";o[e]=t.charAt(0)!==s?s+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(o.username=t.slice(0,a),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(a+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<h.length;c++){var u=h[c];u[4]&&(o[u[1]]=o[u[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&g(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"==typeof e||(e=i.stringify);var t,r=this,n=r.host,o=r.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var s=o+(r.protocol&&r.slashes||g(r.protocol)?"//":"");return r.username?(s+=r.username,r.password&&(s+=":"+r.password),s+="@"):r.password?(s+=":"+r.password,s+="@"):"file:"!==r.protocol&&g(r.protocol)&&!n&&"/"!==r.pathname&&(s+="@"),(":"===n[n.length-1]||l.test(r.hostname)&&!r.port)&&(n+=":"),s+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(s+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(s+=r.hash),s}},y.extractProtocol=m,y.location=f,y.trimLeft=d,y.qs=i,e.exports=y},2807:(e,t,r)=>{"use strict";r.d(t,{v:()=>s});var n=r(4902),i=r(43604);let o={production:!0,debug:!1,debugLevel:"warn",templatePrefix:"xconvert",id:"xconvert",sitename:"xconvert",siteDisplayName:"XConvert",siteSupportEmail:"[email protected]",domainname:"xconvert.com",apiDomainname:"xconvert.com",podDomainname:"xconvert.com",dev:!1,qa:!1,localhostSiteDomain:"www.xconvert.com",localhostAPIDomain:"api.xconvert.com",localhostPODDomain:"pod.xconvert.com",showHistory:!1,constants:{imageresizerId:"imageresizer",ps2pdfId:"ps2pdf",xconvertId:"xconvert"}};class s{loadEnvironmentFromCLIData(e){try{let t=e?.pageProps?.environment;t&&(this.environment=t)}catch(e){console.error(e)}}get env(){return this.environment}get xconvert(){return"xconvert"===this.environment.sitename}get imageresizer(){return"imageresizer"===this.environment.sitename}get sitename(){return this.environment.sitename}get domainname(){return this.environment.domainname}get email(){return this.environment.siteSupportEmail}getSiteName(){return this.environment.sitename}getDomainName(){return this.environment.domainname}isXConvert(){return"xconvert"===this.getSiteName()}apiDomainname(){return this.environment&&this.environment.apiDomainname}
1podDomainname(){return this.environment&&this.environment.podDomainname}constructor(){this.environment=o}}!function(e){function t(t){return"true"===e.getEnv(t)}function r(t){return e.env[t]}e.env={NEXT_PUBLIC_DEBUG:"false",NEXT_PUBLIC_SENTRY_ENABLED:"false",NEXT_PUBLIC_ENVIRONMENT:"prod"},e.getBoolEnv=t,e.getEnv=r}((s=(0,n.Cg)([(0,i._G)()],s))||(s={}))},2943:(e,t,r)=>{"use strict";r.d(t,{Tg:()=>g});var n=r(4902),i=r(77256),o=r(72011),s=r(86728),a=r(61930),l=r(63672),c=r(21370),u=r(29572),d=r(22449),h=r(77698),p=r(86823),f=r(84471);function g(e){if(e instanceof s.c)return e;if(null!=e){if((0,a.l)(e))return m(e);if((0,i.X)(e))return v(e);if((0,o.y)(e))return y(e);if((0,l.T)(e))return S(e);if((0,u.x)(e))return b(e);if((0,d.U)(e))return E(e)}throw(0,c.L)(e)}function m(e){return new s.c(function(t){var r=e[f.s]();if((0,h.T)(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")})}function v(e){return new s.c(function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()})}function y(e){return new s.c(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,p.m)})}function b(e){return new s.c(function(t){var r,i;try{for(var o=(0,n.Ju)(e),s=o.next();!s.done;s=o.next()){var a=s.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}t.complete()})}function S(e){return new s.c(function(t){w(e,t).catch(function(e){return t.error(e)})})}function E(e){return S((0,d.C)(e))}function w(e,t){var r,i,o,s;return(0,n.sH)(this,void 0,void 0,function(){var a;return(0,n.YH)(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),r=(0,n.xN)(e),l.label=1;case 1:return[4,r.next()];case 2:if((i=l.sent()).done)return[3,4];if(a=i.value,t.next(a),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o={error:l.sent()},[3,11];case 6:if(l.trys.push([6,,9,10]),!(i&&!i.done&&(s=r.return)))return[3,8];return[4,s.call(r)];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}},3466:(e,t,r)=>{"use strict";var n,i,o,s;r.d(t,{q:()=>w});class a{constructor(e){this.versions=e}supportedVersions(){return this.versions.join(",")}protocolVersions(){return this.versions.map(e=>`v${e.replace(".","")}.stomp`)}}function l(e,t){e.terminate=function(){let r=()=>{};this.onerror=r,this.onmessage=r,this.onopen=r;let n=new Date,i=Math.random().toString().substring(2,8),o=this.onclose;this.onclose=e=>{let r=new Date().getTime()-n.getTime();t(`Discarded socket (#${i})  closed after ${r}ms, with code/reason: ${e.code}/${e.reason}`)},this.close(),o?.call(e,{code:4001,reason:`Quick discarding socket (#${i}) without waiting for the shutdown sequence.`,wasClean:!1})}}a.V1_0="1.0",a.V1_1="1.1",a.V1_2="1.2",a.default=new a([a.V1_2,a.V1_1,a.V1_0]);let c="\n",u="\0";class d{get body(){return!this._body&&this.isBinaryBody&&(this._body=new TextDecoder().decode(this._binaryBody)),this._body||""}get binaryBody(){return this._binaryBody||this.isBinaryBody||(this._binaryBody=new TextEncoder().encode(this._body)),this._binaryBody}constructor(e){const{command:t,headers:r,body:n,binaryBody:i,escapeHeaderValues:o,skipContentLengthHeader:s}=e;this.command=t,this.headers=Object.assign({},r||{}),i?(this._binaryBody=i,this.isBinaryBody=!0):(this._body=n||"",this.isBinaryBody=!1),this.escapeHeaderValues=o||!1,this.skipContentLengthHeader=s||!1}static fromRawFrame(e,t){let r={},n=e=>e.replace(/^\s+|\s+$/g,"");for(let i of e.headers.reverse()){i.indexOf(":");let o=n(i[0]),s=n(i[1]);t&&"CONNECT"!==e.command&&"CONNECTED"!==e.command&&(s=d.hdrValueUnEscape(s)),r[o]=s}return new d({command:e.command,headers:r,binaryBody:e.binaryBody,escapeHeaderValues:t})}toString(){return this.serializeCmdAndHeaders()}serialize(){let e=this.serializeCmdAndHeaders();return this.isBinaryBody?d.toUnit8Array(e,this._binaryBody).buffer:e+this._body+u}serializeCmdAndHeaders(){let e=[this.command];for(let t of(this.skipContentLengthHeader&&delete this.headers["content-length"],Object.keys(this.headers||{}))){let r=this.headers[t];this.escapeHeaderValues&&"CONNECT"!==this.command&&"CONNECTED"!==this.command?e.push(`${t}:${d.hdrValueEscape(`${r}`)}`):e.push(`${t}:${r}`)}return!this.isBinaryBody&&(this.isBodyEmpty()||this.skipContentLengthHeader)||e.push(`content-length:${this.bodyLength()}`),e.join(c)+c+c}isBodyEmpty(){return 0===this.bodyLength()}bodyLength(){let e=this.binaryBody;return e?e.length:0}static sizeOfUTF8(e){return e?new TextEncoder().encode(e).length:0}static toUnit8Array(e,t){let r=new TextEncoder().encode(e),n=new Uint8Array([0]),i=new Uint8Array(r.length+t.length+n.length);return i.set(r),i.set(t,r.length),i.set(n,r.length+t.length),i}static marshall(e){return new d(e).serialize()}static hdrValueEscape(e){return e.replace(/\\/g,"\\\\").replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/:/g,"\\c")}static hdrValueUnEscape(e){return e.replace(/\\r/g,"\r").replace(/\\n
1/g,"\n").replace(/\\c/g,":").replace(/\\\\/g,"\\")}}let h=0,p=10,f=13,g=58;class m{constructor(e,t){this.onFrame=e,this.onIncomingPing=t,this._encoder=new TextEncoder,this._decoder=new TextDecoder,this._token=[],this._initState()}parseChunk(e,t=!1){let r;if(r="string"==typeof e?this._encoder.encode(e):new Uint8Array(e),t&&0!==r[r.length-1]){let e=new Uint8Array(r.length+1);e.set(r,0),e[r.length]=0,r=e}for(let e=0;e<r.length;e++){let t=r[e];this._onByte(t)}}_collectFrame(e){if(e!==h&&e!==f){if(e===p)return void this.onIncomingPing();this._onByte=this._collectCommand,this._reinjectByte(e)}}_collectCommand(e){if(e!==f){if(e===p){this._results.command=this._consumeTokenAsUTF8(),this._onByte=this._collectHeaders;return}this._consumeByte(e)}}_collectHeaders(e){if(e!==f){if(e===p)return void this._setupCollectBody();this._onByte=this._collectHeaderKey,this._reinjectByte(e)}}_reinjectByte(e){this._onByte(e)}_collectHeaderKey(e){if(e===g){this._headerKey=this._consumeTokenAsUTF8(),this._onByte=this._collectHeaderValue;return}this._consumeByte(e)}_collectHeaderValue(e){if(e!==f){if(e===p){this._results.headers.push([this._headerKey,this._consumeTokenAsUTF8()]),this._headerKey=void 0,this._onByte=this._collectHeaders;return}this._consumeByte(e)}}_setupCollectBody(){let e=this._results.headers.filter(e=>"content-length"===e[0])[0];e?(this._bodyBytesRemaining=parseInt(e[1],10),this._onByte=this._collectBodyFixedSize):this._onByte=this._collectBodyNullTerminated}_collectBodyNullTerminated(e){e===h?this._retrievedBody():this._consumeByte(e)}_collectBodyFixedSize(e){0==this._bodyBytesRemaining--?this._retrievedBody():this._consumeByte(e)}_retrievedBody(){this._results.binaryBody=this._consumeTokenAsRaw();try{this.onFrame(this._results)}catch(e){console.log("Ignoring an exception thrown by a frame handler. Original exception: ",e)}this._initState()}_consumeByte(e){this._token.push(e)}_consumeTokenAsUTF8(){return this._decoder.decode(this._consumeTokenAsRaw())}_consumeTokenAsRaw(){let e=new Uint8Array(this._token);return this._token=[],e}_initState(){this._results={command:void 0,headers:[],binaryBody:void 0},this._token=[],this._headerKey=void 0,this._onByte=this._collectFrame}}!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"}(n||(n={})),function(e){e[e.ACTIVE=0]="ACTIVE",e[e.DEACTIVATING=1]="DEACTIVATING",e[e.INACTIVE=2]="INACTIVE"}(i||(i={})),function(e){e[e.LINEAR=0]="LINEAR",e[e.EXPONENTIAL=1]="EXPONENTIAL"}(o||(o={})),function(e){e.Interval="interval",e.Worker="worker"}(s||(s={}));class v{constructor(e,t=s.Interval,r){this._interval=e,this._strategy=t,this._debug=r,this._workerScript=`
2    var startTime = Date.now();
3    setInterval(function() {
4        self.postMessage(Date.now() - startTime);
5    }, ${this._interval});
6  `}start(e){this.stop(),this.shouldUseWorker()?this.runWorker(e):this.runInterval(e)}stop(){this.disposeWorker(),this.disposeInterval()}shouldUseWorker(){return"u">typeof Worker&&this._strategy===s.Worker}runWorker(e){this._debug("Using runWorker for outgoing pings"),this._worker||(this._worker=new Worker(URL.createObjectURL(new Blob([this._workerScript],{type:"text/javascript"}))),this._worker.onmessage=t=>e(t.data))}runInterval(e){if(this._debug("Using runInterval for outgoing pings"),!this._timer){let t=Date.now();this._timer=setInterval(()=>{e(Date.now()-t)},this._interval)}}disposeWorker(){this._worker&&(this._worker.terminate(),delete this._worker,this._debug("Outgoing ping disposeWorker"))}disposeInterval(){this._timer&&(clearInterval(this._timer),delete this._timer,this._debug("Outgoing ping disposeInterval"))}}class y{get connectedVersion(){return this._connectedVersion}get connected(){return this._connected}constructor(e,t,r){this._client=e,this._webSocket=t,this._connected=!1,this._serverFrameHandlers={CONNECTED:e=>{this.debug(`connected to server ${e.headers.server}`),this._connected=!0,this._connectedVersion=e.headers.version,this._connectedVersion===a.V1_2&&(this._escapeHeaderValues=!0),this._setupHeartbeat(e.headers),this.onConnect(e)},MESSAGE:e=>{let t=e.headers.subscription,r=this._subscriptions[t]||this.onUnhandledMessage,n=e,i=this,o=this._connectedVersion===a.V1_2?n.headers.ack:n.headers["message-id"];n.ack=(e={})=>i.ack(o,t,e),n.nack=(e={})=>i.nack(o,t,e),r(n)},RECEIPT:e=>{let t=this._receiptWatchers[e.headers["receipt-id"]];t?(t(e),delete this._receiptWatchers[e.headers["receipt-id"]]):this.onUnhandledReceipt(e)},ERROR:e=>{this.onStompError(e)}},this._counter=0,this._subscriptions={},this._receiptWatchers={},this._partialData="",this._escapeHeaderValues=!1,this._lastServerActivityTS=Date.now(),this.debug=r.debug,this.stompVersions=r.stompVersions,this.connectHeaders=r.connectHeaders,this.disconnectHeaders=r.disconnectHeaders,this.heartbeatIncoming=r.heartbeatIncoming,this.heartbeatToleranceMultiplier=r.heartbeatGracePeriods,this.heartbeatOutgoing=r.heartbeatOutgoing,this.splitLargeFrames=r.splitLargeFrames,this.maxWebSocketChunkSize=r.maxWebSocketChunkSize,this.forceBinaryWSFrames=r.forceBinaryWSFrames,this.logRawCommunication=r.logRawCommunication,this.appendMissingNULLonIncoming=r.appendMissingNULLonIncoming,this.discardWebsocketOnCommFailure=r.discardWebsocketOnCommFailure,this.onConnect=r.onConnect,this.onDisconnect=r.onDisconnect,this.onStompError=r.onStompError,this.onWeb
6SocketClose=r.onWebSocketClose,this.onWebSocketError=r.onWebSocketError,this.onUnhandledMessage=r.onUnhandledMessage,this.onUnhandledReceipt=r.onUnhandledReceipt,this.onUnhandledFrame=r.onUnhandledFrame,this.onHeartbeatReceived=r.onHeartbeatReceived,this.onHeartbeatLost=r.onHeartbeatLost}start(){let e=new m(e=>{let t=d.fromRawFrame(e,this._escapeHeaderValues);this.logRawCommunication||this.debug(`<<< ${t}`),(this._serverFrameHandlers[t.command]||this.onUnhandledFrame)(t)},()=>{this.debug("<<< PONG"),this.onHeartbeatReceived()});this._webSocket.onmessage=t=>{if(this.debug("Received data"),this._lastServerActivityTS=Date.now(),this.logRawCommunication){let e=t.data instanceof ArrayBuffer?new TextDecoder().decode(t.data):t.data;this.debug(`<<< ${e}`)}e.parseChunk(t.data,this.appendMissingNULLonIncoming)},this._webSocket.onclose=e=>{this.debug(`Connection closed to ${this._webSocket.url}`),this._cleanUp(),this.onWebSocketClose(e)},this._webSocket.onerror=e=>{this.onWebSocketError(e)},this._webSocket.onopen=()=>{let e=Object.assign({},this.connectHeaders);this.debug("Web Socket Opened..."),e["accept-version"]=this.stompVersions.supportedVersions(),e["heart-beat"]=[this.heartbeatOutgoing,this.heartbeatIncoming].join(","),this._transmit({command:"CONNECT",headers:e})}}_setupHeartbeat(e){if(e.version!==a.V1_1&&e.version!==a.V1_2||!e["heart-beat"])return;let[t,r]=e["heart-beat"].split(",").map(e=>parseInt(e,10));if(0!==this.heartbeatOutgoing&&0!==r){let e=Math.max(this.heartbeatOutgoing,r);this.debug(`send PING every ${e}ms`),this._pinger=new v(e,this._client.heartbeatStrategy,this.debug),this._pinger.start(()=>{this._webSocket.readyState===n.OPEN&&(this._webSocket.send(c),this.debug(">>> PING"))})}if(0!==this.heartbeatIncoming&&0!==t){let e=Math.max(this.heartbeatIncoming,t);this.debug(`check PONG every ${e}ms`),this._ponger=setInterval(()=>{let t=Date.now()-this._lastServerActivityTS;t>e*this.heartbeatToleranceMultiplier&&(this.debug(`did not receive server activity for the last ${t}ms`),this.onHeartbeatLost(),this._closeOrDiscardWebsocket())},e)}}_closeOrDiscardWebsocket(){this.discardWebsocketOnCommFailure?(this.debug("Discarding websocket, the underlying socket may linger for a while"),this.discardWebsocket()):(this.debug("Issuing close on the websocket"),this._closeWebsocket())}forceDisconnect(){this._webSocket&&(this._webSocket.readyState===n.CONNECTING||this._webSocket.readyState===n.OPEN)&&this._closeOrDiscardWebsocket()}_closeWebsocket(){this._webSocket.onmessage=()=>{},this._webSocket.close()}discardWebsocket(){"function"!=typeof this._webSocket.terminate&&l(this._webSocket,e=>this.debug(e)),this._webSocket.terminate()}
6_transmit(e){let{command:t,headers:r,body:n,binaryBody:i,skipContentLengthHeader:o}=e,s=new d({command:t,headers:r,body:n,binaryBody:i,escapeHeaderValues:this._escapeHeaderValues,skipContentLengthHeader:o}),a=s.serialize();if(this.logRawCommunication?this.debug(`>>> ${a}`):this.debug(`>>> ${s}`),this.forceBinaryWSFrames&&"string"==typeof a&&(a=new TextEncoder().encode(a)),"string"==typeof a&&this.splitLargeFrames){let e=a;for(;e.length>0;){let t=e.substring(0,this.maxWebSocketChunkSize);e=e.substring(this.maxWebSocketChunkSize),this._webSocket.send(t),this.debug(`chunk sent = ${t.length}, remaining = ${e.length}`)}}else this._webSocket.send(a)}dispose(){if(this.connected)try{let e=Object.assign({},this.disconnectHeaders);e.receipt||(e.receipt=`close-${this._counter++}`),this.watchForReceipt(e.receipt,e=>{this._closeWebsocket(),this._cleanUp(),this.onDisconnect(e)}),this._transmit({command:"DISCONNECT",headers:e})}catch(e){this.debug(`Ignoring error during disconnect ${e}`)}else(this._webSocket.readyState===n.CONNECTING||this._webSocket.readyState===n.OPEN)&&this._closeWebsocket()}_cleanUp(){this._connected=!1,this._pinger&&(this._pinger.stop(),this._pinger=void 0),this._ponger&&(clearInterval(this._ponger),this._ponger=void 0)}publish(e){let{destination:t,headers:r,body:n,binaryBody:i,skipContentLengthHeader:o}=e,s=Object.assign({destination:t},r);this._transmit({command:"SEND",headers:s,body:n,binaryBody:i,skipContentLengthHeader:o})}watchForReceipt(e,t){this._receiptWatchers[e]=t}subscribe(e,t,r={}){(r=Object.assign({},r)).id||(r.id=`sub-${this._counter++}`),r.destination=e,this._subscriptions[r.id]=t,this._transmit({command:"SUBSCRIBE",headers:r});let n=this;return{id:r.id,unsubscribe:e=>n.unsubscribe(r.id,e)}}unsubscribe(e,t={}){t=Object.assign({},t),delete this._subscriptions[e],t.id=e,this._transmit({command:"UNSUBSCRIBE",headers:t})}begin(e){let t=e||`tx-${this._counter++}`;this._transmit({command:"BEGIN",headers:{transaction:t}});let r=this;return{id:t,commit(){r.commit(t)},abort(){r.abort(t)}}}commit(e){this._transmit({command:"COMMIT",headers:{transaction:e}})}abort(e){this._transmit({command:"ABORT",headers:{transaction:e}})}ack(e,t,r={}){r=Object.assign({},r),this._connectedVersion===a.V1_2?r.id=e:r["message-id"]=e,r.subscription=t,this._transmit({command:"ACK",headers:r})}nack(e,t,r={}){return r=Object.assign({},r),this._connectedVersion===a.V1_2?r.id=e:r["message-id"]=e,r.subscription=t,this._transmit({command:"NACK",headers:r})}}class b{get webSocket(){return this._stompHandler?._webSocket}get disconnectHeaders(){return this._disconnectHeaders}set disconnectHeaders(e){this._disconnectHeaders=e,this._stompHandler&&(this._stompHandler.disconnectHeaders=this._disconnectHeaders)}get connected(){return!!this._stompHandler&&this._stompHandler.connected}get connectedVersion(){return this._stompHandler?this._stompHandler.connectedVersion:void 0}get active(){return this.state===i.ACTIVE}_changeState(e){this.state=e,this.onChangeState(e)}constructor(e={}){this.stompVersions=a.default,this.connectionTimeout=0,this.reconnectDelay=5e3,this._nextReconnectDelay=0,this.maxReconnectDelay=9e5,this.reconnectTimeMode=o.LINEAR,this.heartbeatIncoming=1e4,this.heartbeatToleranceMultiplier=2,this.heartbeatOutgoing=1e4,this.heartbeatStrategy=s.Interval,this.splitLargeFrames=!1,this.maxWebSocketChunkSize=8192,this.forceBinaryWSFrames=!1,this.appendMissingNULLonIncoming=!1,this.discardWebsocketOnCommFailure=!1,this.state=i.INACTIVE;const t=()=>{};this.debug=t,this.beforeConnect=t,this.onConnect=t,this.onDisconnect=t,this.onUnhandledMessage=t,this.onUnhandledReceipt=t,this.onUnhandledFrame=t,this.onHeartbeatReceived=t,this.onHeartbeatLost=t,this.onStompError=t,this.onWebSocketClose=t,this.onWebSocketError=t,this.logRawCommunication=!1,this.onChangeState=t,this.connectHeaders={},this._disconnectHeaders={},this.configure(e)}configure(e){Object.assign(this,e),this.maxReconnectDelay>0&&this.maxReconnectDelay<this.reconnectDelay&&(this.debug(`Warning: maxReconnectDelay (${this.maxReconnectDelay}ms) is less than reconnectDelay (${this.reconnectDelay}ms). Using reconnectDelay as the maxReconnectDelay delay.`),this.maxReconnectDelay=this.reconnectDelay)}activate(){let e=()=>{this.active?this.debug("Already ACTIVE, ignoring request to activate"):(this._changeState(i.ACTIVE),this._nextReconnectDelay=this.reconnectDelay,this._connect())};this.state===i.DEACTIVATING?(this.debug("Waiting for deactivation to finish before activating"),this.deactivate().then(()=>{e()})):e()}async _connect(){if(await this.beforeConnect(this),this._stompHandler)return void this.debug("There is already a stompHandler, skipping the call to connect");
6if(!this.active)return void this.debug("Client has been marked inactive, will not attempt to connect");this.connectionTimeout>0&&(this._connectionWatcher&&clearTimeout(this._connectionWatcher),this._connectionWatcher=setTimeout(()=>{this.connected||(this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`),this.forceDisconnect())},this.connectionTimeout)),this.debug("Opening Web Socket...");let e=this._createWebSocket();this._stompHandler=new y(this,e,{debug:this.debug,stompVersions:this.stompVersions,connectHeaders:this.connectHeaders,disconnectHeaders:this._disconnectHeaders,heartbeatIncoming:this.heartbeatIncoming,heartbeatGracePeriods:this.heartbeatToleranceMultiplier,heartbeatOutgoing:this.heartbeatOutgoing,heartbeatStrategy:this.heartbeatStrategy,splitLargeFrames:this.splitLargeFrames,maxWebSocketChunkSize:this.maxWebSocketChunkSize,forceBinaryWSFrames:this.forceBinaryWSFrames,logRawCommunication:this.logRawCommunication,appendMissingNULLonIncoming:this.appendMissingNULLonIncoming,discardWebsocketOnCommFailure:this.discardWebsocketOnCommFailure,onConnect:e=>{if(this._connectionWatcher&&(clearTimeout(this._connectionWatcher),this._connectionWatcher=void 0),this._nextReconnectDelay=this.reconnectDelay,!this.active){this.debug("STOMP got connected while deactivate was issued, will disconnect now"),this._disposeStompHandler();return}this.onConnect(e)},onDisconnect:e=>{this.onDisconnect(e)},onStompError:e=>{this.onStompError(e)},onWebSocketClose:e=>{this._stompHandler=void 0,this.state===i.DEACTIVATING&&this._changeState(i.INACTIVE),this.onWebSocketClose(e),this.active&&this._schedule_reconnect()},onWebSocketError:e=>{this.onWebSocketError(e)},onUnhandledMessage:e=>{this.onUnhandledMessage(e)},onUnhandledReceipt:e=>{this.onUnhandledReceipt(e)},onUnhandledFrame:e=>{this.onUnhandledFrame(e)},onHeartbeatReceived:()=>{this.onHeartbeatReceived()},onHeartbeatLost:()=>{this.onHeartbeatLost()}}),this._stompHandler.start()}_createWebSocket(){let e;if(this.webSocketFactory)e=this.webSocketFactory();else if(this.brokerURL)e=new WebSocket(this.brokerURL,this.stompVersions.protocolVersions());else throw Error("Either brokerURL or webSocketFactory must be provided");return e.binaryType="arraybuffer",e}_schedule_reconnect(){this._nextReconnectDelay>0&&(this.debug(`STOMP: scheduling reconnection in ${this._nextReconnectDelay}ms`),this._reconnector=setTimeout(()=>{this.reconnectTimeMode===o.EXPONENTIAL&&(this._nextReconnectDelay=2*this._nextReconnectDelay,0!==this.maxReconnectDelay&&(this._nextReconnectDelay=Math.min(this._nextReconnectDelay,this.maxReconnectDelay))),this._connect()},this._nextReconnectDelay))}async deactivate(e={}){let t,r=e.force||!1,o=this.active;if(this.state===i.INACTIVE)return this.debug("Already INACTIVE, nothing more to do"),Promise.resolve();if(this._changeState(i.DEACTIVATING),this._nextReconnectDelay=0,this._reconnector&&(clearTimeout(this._reconnector),this._reconnector=void 0),!this._stompHandler||this.webSocket.readyState===n.CLOSED)return this._changeState(i.INACTIVE),Promise.resolve();{let e=this._stompHandler.onWebSocketClose;t=new Promise((t,r)=>{this._stompHandler.onWebSocketClose=r=>{e(r),t()}})}return r?this._stompHandler?.discardWebsocket():o&&this._disposeStompHandler(),t}forceDisconnect(){this._stompHandler&&this._stompHandler.forceDisconnect()}_disposeStompHandler(){this._stompHandler&&this._stompHandler.dispose()}publish(e){this._checkConnection(),this._stompHandler.publish(e)}_checkConnection(){if(!this.connected)throw TypeError("There is no underlying STOMP connection")}watchForReceipt(e,t){this._checkConnection(),this._stompHandler.watchForReceipt(e,t)}subscribe(e,t,r={}){return this._checkConnection(),this._stompHandler.subscribe(e,t,r)}unsubscribe(e,t={}){this._checkConnection(),this._stompHandler.unsubscribe(e,t)}begin(e){return this._checkConnection(),this._stompHandler.begin(e)}commit(e){this._checkConnection(),this._stompHandler.commit(e)}abort(e){this._checkConnection(),this._stompHandler.abort(e)}ack(e,t,r={}){this._checkConnection(),this._stompHandler.ack(e,t,r)}nack(e,t,r={}){this._checkConnection(),this._stompHandler.nack(e,t,r)}}class S{constructor(e){this.client=e}get outgoing(){return this.client.heartbeatOutgoing}set outgoing(e){this.client.heartbeatOutgoing=e}get incoming(){return this.client.heartbeatIncoming}set incoming(e){this.client.heartbeatIncoming=e}}class E extends b{constructor(e){super(),this.maxWebSocketFrameSize=16384,this._heartbeatInfo=new S(this),this.reconnect_delay=0,this.webSocketFactory=e,this.debug=(...e)=>{console.log(...e)}}_parseConnect(...e){let t,r,n,i={};if(e.length<2)throw Error("Connect requires at least 2 arguments");return"function"==typeof e[1]?[i,r,n,t]=e:6===e.length?[i.login,i.passcode,r,n,t,i.host]=e
6:[i.login,i.passcode,r,n,t]=e,[i,r,n,t]}connect(...e){let t=this._parseConnect(...e);t[0]&&(this.connectHeaders=t[0]),t[1]&&(this.onConnect=t[1]),t[2]&&(this.onStompError=t[2]),t[3]&&(this.onWebSocketClose=t[3]),super.activate()}disconnect(e,t={}){e&&(this.onDisconnect=e),this.disconnectHeaders=t,super.deactivate()}send(e,t={},r=""){let n=!1===(t=Object.assign({},t))["content-length"];n&&delete t["content-length"],this.publish({destination:e,headers:t,body:r,skipContentLengthHeader:n})}set reconnect_delay(e){this.reconnectDelay=e}get ws(){return this.webSocket}get version(){return this.connectedVersion}get onreceive(){return this.onUnhandledMessage}set onreceive(e){this.onUnhandledMessage=e}get onreceipt(){return this.onUnhandledReceipt}set onreceipt(e){this.onUnhandledReceipt=e}get heartbeat(){return this._heartbeatInfo}set heartbeat(e){this.heartbeatIncoming=e.incoming,this.heartbeatOutgoing=e.outgoing}}class w{static client(e,t){return null==t&&(t=a.default.protocolVersions()),new E(()=>new(w.WebSocketClass||WebSocket)(e,t))}static over(e){let t;return"function"==typeof e?t=e:(console.warn("Stomp.over did not receive a factory, auto reconnect will not work. Please see https://stomp-js.github.io/api-docs/latest/classes/Stomp.html#over"),t=()=>e),new E(t)}}w.WebSocketClass=null},3472:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(13909);let i=function(e){return(null==e?0:e.length)?(0,n.A)(e,1):[]}},3560:(e,t,r)=>{"use strict";function n(e){return new Promise((t,r)=>{try{loadImage(e,e=>{let n=new Image;n.onload=()=>t(n),n.onerror=e=>r(e),n.src=URL.createObjectURL(dataURLtoBlob(e.toDataURL("image/jpeg",1)))},{canvas:!0})}catch(e){r(e)}})}function i(e){return new Promise((t,r)=>{try{loadImage(e,e=>{let n=new Image;n.onload=()=>t(n),n.onerror=e=>r(e),n.src=URL.createObjectURL(dataURLtoBlob(e.toDataURL("image/png",1)))},{canvas:!0})}catch(e){r(e)}})}function o(e,t=.9){return new Promise((r,n)=>{try{loadImage(e,e=>{let i=new Image;i.onload=()=>r(i),i.onerror=e=>n(e),i.src=URL.createObjectURL(dataURLtoBlob(e.toDataURL("image/webp",t)))},{canvas:!0})}catch(e){n(e)}})}function s(e,t,r=1){return new Promise((n,i)=>{try{loadImage(e,e=>{let i=dataURLtoBlob(e.toDataURL(t,r));n(i)},{canvas:!0})}catch(e){i(e)}})}function a(e){return new Promise((t,r)=>{let n=new Image,i=URL.createObjectURL(e);n.onload=()=>{URL.revokeObjectURL(i),t({width:n.naturalWidth,height:n.naturalHeight})},n.onerror=e=>{URL.revokeObjectURL(i),r(e)},n.src=i})}r.r(t),r.d(t,{fileToImageBlob:()=>s,fileToJpgImage:()=>n,fileToTransparentPngImage:()=>i,fileToWebPImage:()=>o,getImageDimensions:()=>a})},3649:(e,t,r)=>{"use strict";r.d(t,{B:()=>c});var n=r(4902),i=r(86728),o=r(18947),s=(0,r(78204).L)(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),a=r(85689),l=r(75555),c=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,n.C6)(t,e),t.prototype.lift=function(e){var t=new u(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new s},t.prototype.next=function(e){var t=this;(0,l.Y)(function(){var r,i;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=(0,n.Ju)(t.currentObservers),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;(0,l.Y)(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;(0,l.Y)(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0}
6,enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,s=r.observers;return n||i?o.Kn:(this.currentObservers=null,s.push(e),new o.yU(function(){t.currentObservers=null,(0,a.o)(s,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new i.c;return e.source=this,e},t.create=function(e,t){return new u(e,t)},t}(i.c),u=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return(0,n.C6)(t,e),t.prototype.next=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.next)||r.call(t,e)},t.prototype.error=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.error)||r.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!=(r=null==(t=this.source)?void 0:t.subscribe(e))?r:o.Kn},t}(c)},3882:(e,t,r)=>{e.exports=r.g.EventSource},3943:(e,t,r)=>{"use strict";r(29656);var n,i=r(2544),o=r(93570),s=r(59355),a=r(38211),l=r(72649),c=r(39944),u=r(4341),d=r(70087),h=r(10020),p=r(5262),f=r(10009),g=r(72876),m=r(1097),v=r(48205),y=r(24829),b=r(65976),S=function(){};function E(e,t,r){if(!(this instanceof E))return new E(e,t,r);if(arguments.length<1)throw TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");g.call(this),this.readyState=E.CONNECTING,this.extensions="",this.protocol="",(r=r||{}).protocols_whitelist&&p.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=r.transports,this._transportOptions=r.transportOptions||{},this._timeout=r.timeout||0;var n=r.sessionId||8;if("function"==typeof n)this._generateSessionId=n;else if("number"==typeof n)this._generateSessionId=function(){return s.string(n)};else throw TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._server=r.server||s.numberString(1e3);var o=new i(e);if(o.host&&o.protocol){if(o.hash)throw SyntaxError("The URL must not contain a fragment");else if("http:"!==o.protocol&&"https:"!==o.protocol)throw SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+o.protocol+"' is not allowed.")}else throw SyntaxError("The URL '"+e+"' is invalid");var a="https:"===o.protocol;if("https:"===m.protocol&&!a&&!l.isLoopbackAddr(o.hostname))throw Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");t?Array.isArray(t)||(t=[t]):t=[];var c=t.sort();c.forEach(function(e,t){if(!e)throw SyntaxError("The protocols entry '"+e+"' is invalid.");if(t<c.length-1&&e===c[t+1])throw SyntaxError("The protocols entry '"+e+"' is duplicated.")});var u=l.getOrigin(m.href);this._origin=u?u.toLowerCase():null,o.set("pathname",o.pathname.replace(/\/+$/,"")),this.url=o.href,S("using url",this.url),this._urlInfo={nullOrigin:!h.hasDomain(),sameOrigin:l.isOriginEqual(this.url,m.href),sameScheme:l.isSchemeEqual(this.url,m.href)},this._ir=new b(this.url,this._urlInfo),this._ir.once("finish",this._receiveInfo.bind(this))}function w(e){return 1e3===e||e>=3e3&&e<=4999}o(E,g),E.prototype.close=function(e,t){if(e&&!w(e))throw Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw SyntaxError("reason argument has an invalid length");if(this.readyState!==E.CLOSING&&this.readyState!==E.CLOSED){var r=!0;this._close(e||1e3,t||"Normal closure",r)}},E.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===E.CONNECTING)throw Error("InvalidStateError: The connection has not been established yet");this.readyState===E.OPEN&&this._transport.send(a.quote(e))},E.version=r(77718),E.CONNECTING=0,E.OPEN=1,E.CLOSING=2,E.CLOSED=3,E.prototype._receiveInfo=function(e,t){if(S("_receiveInfo",t),this._ir=null,!e)return void this._close(1002,"Cannot connect to server");this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,S("info",e=d.extend(e,this._urlInfo));var r=n.filterToEnabled(this._transportsWhitelist,e);this._transports=r.main,S(this._transports.length+" enabled transports"),this._connect()},E.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(S("attempt",e.transportName),e.needBody&&(!r.g.document.body||void 0!==r.g.document.readyState&&"complete"!==r.g.document.readyState&&"interactive"!==r.g.document.readyState)){S("waiting for body"),this._transports.unshift(e),c.attachEvent("load",this._connect.bind(this));return}var t=Math.max(this._timeout,this._rto*e.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t),S("using timeout",t);var n=l.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),i=this._transportOptions[e.transportName];S("transport url",n);var o=new e(n,this._transUrl,i);o.on("message",this._transportMessage.bind(this)),o.once("close",this._transportClose.bind(this)),o.transportName=e.transportName,this._transport=o;return}this._close(2e3,"All transports failed",!1)},E.prototype._transportTimeout=function(){S("_transportTimeout"),this.readyState===E.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,"Transport timed out"))}
6,E.prototype._transportMessage=function(e){S("_transportMessage",e);var t,r=this,n=e.slice(0,1),i=e.slice(1);switch(n){case"o":this._open();return;case"h":this.dispatchEvent(new f("heartbeat")),S("heartbeat",this.transport);return}if(i)try{t=JSON.parse(i)}catch(e){S("bad json",i)}if(void 0===t)return void S("empty payload",i);switch(n){case"a":Array.isArray(t)&&t.forEach(function(e){S("message",r.transport,e),r.dispatchEvent(new y(e))});break;case"m":S("message",this.transport,t),this.dispatchEvent(new y(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}},E.prototype._transportClose=function(e,t){(S("_transportClose",this.transport,e,t),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),w(e)||2e3===e||this.readyState!==E.CONNECTING)?this._close(e,t):this._connect()},E.prototype._open=function(){S("_open",this._transport&&this._transport.transportName,this.readyState),this.readyState===E.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=E.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new f("open")),S("connected",this.transport)):this._close(1006,"Server lost session")},E.prototype._close=function(e,t,r){S("_close",this.transport,e,t,r,this.readyState);var n=!1;if(this._ir&&(n=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===E.CLOSED)throw Error("InvalidStateError: SockJS has already been closed");this.readyState=E.CLOSING,setTimeout((function(){this.readyState=E.CLOSED,n&&this.dispatchEvent(new f("error"));var i=new v("close");i.wasClean=r||!1,i.code=e||1e3,i.reason=t,this.dispatchEvent(i),this.onmessage=this.onclose=this.onerror=null,S("disconnected")}).bind(this),0)},E.prototype.countRTO=function(e){return e>100?4*e:300+e},e.exports=function(e){return n=u(e),r(53237)(E,e),E}},4341:e=>{"use strict";var t=function(){};e.exports=function(e){return{filterToEnabled:function(r,n){var i={main:[],facade:[]};return r?"string"==typeof r&&(r=[r]):r=[],e.forEach(function(e){if(e){if("websocket"===e.transportName&&!1===n.websocket)return void t("disabled from server","websocket");if(r.length&&-1===r.indexOf(e.transportName))return void t("not in whitelist",e.transportName);e.enabled(n)?(t("enabled",e.transportName),i.main.push(e),e.facadeTransport&&i.facade.push(e.facadeTransport)):t("disabled",e.transportName)}}),i}}}},4361:(e,t,r)=>{e.exports=r(48763)},4515:(e,t,r)=>{"use strict";r.d(t,{C:()=>i});var n=r(98683);class i{static{this.TRACE_7=1300}static{this.TRACE_6=1200}static{this.TRACE_5=1100}static{this.TRACE_4=1e3}static{this.TRACE_3=900}static{this.TRACE_2=800}static{this.TRACE_1=700}static{this.TRACE=600}static{this.DEBUG=500}static{this.INFO=400}static{this.WARN=300}static{this.ERROR=200}static{this.FATAL=100}static{this.logTypeOrder={[i.TRACE_7]:1,[i.TRACE_6]:2,[i.TRACE_5]:3,[i.TRACE_4]:4,[i.TRACE_3]:5,[i.TRACE_2]:6,[i.TRACE_1]:7,[i.TRACE]:8,[i.DEBUG]:9,[i.INFO]:10,[i.WARN]:11,[i.ERROR]:12,[i.FATAL]:13}}static logLevelToReadableString(e){switch(e){case i.TRACE_7:return"TRACE_7";case i.TRACE_6:return"TRACE_6";case i.TRACE_5:return"TRACE_5";case i.TRACE_4:return"TRACE_4";case i.TRACE_3:return"TRACE_3";case i.TRACE_2:return"TRACE_2";case i.TRACE_1:return"TRACE_1";case i.TRACE:return"TRACE";case i.DEBUG:return"DEBUG";case i.INFO:return"INFO";case i.WARN:return"WARN";case i.ERROR:return"ERROR";case i.FATAL:return"FATAL";default:return"UNKNOWN"}}static logReadableStringToLevel(e){switch(e){case"TRACE_7":return i.TRACE_7;case"TRACE_6":return i.TRACE_6;case"TRACE_5":return i.TRACE_5;case"TRACE_4":return i.TRACE_4;case"TRACE_3":return i.TRACE_3;case"TRACE_2":return i.TRACE_2;case"TRACE_1":return i.TRACE_1;case"TRACE":return i.TRACE;case"DEBUG":default:return i.DEBUG;case"INFO":return i.INFO;case"WARN":return i.WARN;case"ERROR":return i.ERROR;case"FATAL":return i.FATAL}}static isLogTypeEnabled(e){return this.logTypeOrder[e]>=this.logTypeOrder[n.FO.DEBUG_LEVEL]}}},4527:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=Array.isArray},4585:(e,t,r)=>{"use strict";r.d(t,{D:()=>g});var n=r(4902),i=r(43604),o=r(9120),s=r(83594),a=r(45019),l=r(44492),c=r(51352),u=r(9968),d=r(79347),h=r(29238);function p(e){switch(e){case"PAID_TOPUP":return"Credit top-up";case"SUBSCRIPTION_ALLOTMENT":return"Subscription grant";case"ADMIN_PROMO":return"Admin promo";case"REFUND_REVERSAL":return"Refund reversal";default:return e}}function f(e){let t="string"==typeof e?Date.parse(e):e,r=Math.floor((Date.now()-t)/36e5);if(r<1)return"Just now";if(r<24)return`${r} hour${1===r?"":"s"} ago`;let n=Math.floor(r/24);return 1===n?"Yesterday":n<7?`${n} days ago`:new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}class g{constructor(e,t,r){this.apiConfig=e,this.http=t,this.loginService=r}overview(){return this.requireLogin(),this.http.get(this.apiConfig.getMeBillingEndpoint()).pipe(c.UW)}
6history(e={}){this.requireLogin();let t=new URLSearchParams;void 0!==e.limit&&t.set("limit",String(e.limit)),void 0!==e.skip&&t.set("skip",String(e.skip)),void 0!==e.eventType&&t.set("eventType",e.eventType),e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.category&&t.set("category",e.category),e.hideTechnical&&t.set("hideTechnical","true");let r=this.appendQuery(this.apiConfig.getMeBillingHistoryEndpoint(),t);return this.http.get(r).pipe(c.UW)}usage(e={}){this.requireLogin();let t=new URLSearchParams;e.since&&t.set("since",e.since),e.until&&t.set("until",e.until);let r=this.appendQuery(this.apiConfig.getMeBillingUsageEndpoint(),t);return this.http.get(r).pipe(c.UW)}createPortalSession(e){return this.requireLogin(),this.http.post(`${this.apiConfig.getMeBillingHistoryEndpoint().replace("/history","/portal-session")}`,e?{returnUrl:e}:{}).pipe(c.UW)}grants(e=100){this.requireLogin();let t=this.appendQuery(this.apiConfig.getMeBillingGrantsEndpoint(),new URLSearchParams({limit:String(e)}));return this.http.get(t).pipe(c.UW)}recentLedger(e){this.requireLogin();let t=Math.max(1,e.limit),r=this.appendQuery(this.apiConfig.getMeBillingGrantsEndpoint(),new URLSearchParams({limit:String(t)})),n=this.http.get(r).pipe(c.UW,(0,a.T)(e=>e.grants??[]),(0,l.W)(()=>(0,o.of)([]))),i=(0,o.of)([]);return(0,s.p)({grants:n,debits:i}).pipe((0,a.T)(({grants:e,debits:r})=>{let n=[...e.map(e=>({type:"grant",label:p(e.type),date:e.grantedAt,delta:e.creditsGranted})),...r.map(e=>({type:"debit",label:e.label??"API usage",date:e.occurredAt??new Date(0).toISOString(),delta:-Math.abs(e.creditsDebited??e.amount??0)}))];return n.sort((e,t)=>Date.parse(t.date)-Date.parse(e.date)),n.slice(0,t)}))}exportJson(e={}){this.requireLogin();let t=new URLSearchParams;e.since&&t.set("since",e.since),e.until&&t.set("until",e.until);let r=this.appendQuery(this.apiConfig.getMeBillingExportJsonEndpoint(),t);return this.http.get(r).pipe(c.UW)}exportCsvUrl(e={}){this.requireLogin();let t=new URLSearchParams;return e.since&&t.set("since",e.since),e.until&&t.set("until",e.until),this.appendQuery(this.apiConfig.getMeBillingExportCsvEndpoint(),t)}listTopupPacks(){return this.requireLogin(),this.http.get(this.apiConfig.getMeBillingTopupPacksEndpoint()).pipe(c.UW)}startTopup(e){return this.requireLogin(),this.http.post(this.apiConfig.getMeBillingTopupEndpoint(),e).pipe(c.UW)}listApiSubscriptionPlans(){return this.requireLogin(),this.http.get(this.apiConfig.getMeBillingApiSubscriptionPlansEndpoint()).pipe(c.UW)}listWebsitePlans(){return this.requireLogin(),this.http.get(this.apiConfig.getMeBillingWebsitePlansEndpoint()).pipe(c.UW)}startApiSubscription(e){return this.requireLogin(),this.http.post(this.apiConfig.getMeBillingApiSubscriptionEndpoint(),e).pipe(c.UW)}cancelApiSubscription({reason:e}={reason:null}){return this.requireLogin(),this.http.post(this.apiConfig.getMeBillingApiSubscriptionCancelEndpoint(),{reason:e}).pipe(c.UW)}cancelWebsiteSubscription({reason:e}={reason:null}){return this.requireLogin(),this.http.post(this.apiConfig.getCancelPaymentsEndpoint(),{reason:e}).pipe(c.UW)}recentActivity(e){this.requireLogin();let t=new Date(Date.now()-24*e.daysBack*36e5).toISOString(),r=new URLSearchParams;r.set("limit",String(e.limit)),r.set("from",t);let n=this.appendQuery(this.apiConfig.getConversionHistoryEndpoint(),r);return this.http.get(n).pipe(c.UW,(0,a.T)(e=>(e.events??[]).map(e=>({id:String(e.id??e._id??Math.random()),filename:e.filename??e.workflowName??"Conversion",happenedAt:f(e.timestamp),source:"API_KEY"===e.workflowSource||"api_key"===e.workflowSource?e.apiKeyPrefix?`API \xb7 ${e.apiKeyPrefix}`:"API":"Web upload",status:"JOB_COMPLETED"===e.eventType?"success":"BLOCKED"===e.eventType||"JOB_ABORTED"===e.eventType?"blocked":"failed"}))))}usageLast7Days(){return this.requireLogin(),this.http.get(this.apiConfig.getUsageLast7DaysEndpoint()).pipe(c.UW,(0,a.T)(e=>(e.days??[]).map(e=>({label:new Date(e.date).toLocaleDateString(void 0,{weekday:"short"}),credits:e.credits}))))}appendQuery(e,t){let r=t.toString();return r?e.includes("?")?`${e}&${r}`:`${e}?${r}`:e}requireLogin(){if(!this.loginService.isUserLoggedIn)throw Error("User must be logged in to access billing endpoints")}}g=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(u.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(d.jo
6)),(0,n.Qj)(2,(0,i.WQ)(h.H)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===u.ApiConfig?Object:u.ApiConfig,void 0===d.jo?Object:d.jo,void 0===h.H?Object:h.H])],g)},4756:(e,t,r)=>{e=r.nmd(e);var n=r(19031),i=r(34705),o=t&&!t.nodeType&&t,s=o&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,l=(a?a.isBuffer:void 0)||i;e.exports=l},4902:(e,t,r)=>{"use strict";r.d(t,{AQ:()=>g,C6:()=>i,Cg:()=>s,Cl:()=>o,Ju:()=>d,N3:()=>f,Qj:()=>a,Sn:()=>l,YH:()=>u,fX:()=>p,sH:()=>c,xN:()=>m,zs:()=>h});var n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function a(e,t){return function(r,n){t(r,n,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,r,n){function i(e){return e instanceof r?e:new r(function(t){t(e)})}return new(r||(r=Promise))(function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){e.done?r(e.value):i(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())})}function u(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function d(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function p(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function f(e){return this instanceof f?(this.v=e,this):new f(e)}function g(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),n[Symbol.asyncIterator]=function(){return this},n;function s(e){return function(t){return Promise.resolve(t).then(e,d)}}function a(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||l(e,t)})},t&&(n[e]=t(n[e])))}function l(e,t){try{c(i[e](t))}catch(e){h(o[0][3],e)}}function c(e){e.value instanceof f?Promise.resolve(e.value.v).then(u,d):h(o[0][2],e)}function u(e){l("next",e)}function d(e){l("throw",e)}function h(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}}function m(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=d(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){i(n,o,(t=e[r](t)).done,t.value)})}}function i(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}}"function"==typeof SuppressedError&&SuppressedError},5262:(e,t,r)=>{"use strict";var n={};["log","debug","warn"].forEach(function(e){var t;try{t=r.g.console&&r.g.console[e]&&r.g.console[e].apply}catch(e){}n[e]=t?function(){return r.g.console[e].apply(r.g.console,arguments)}:"log"===e?function(){}:n.log}),e.exports=n},5518:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s,getInitialProps:()=>o});var n=r(37876),i=r(14232);async function o({res:e,err:t}){return{statusCode:e?e.statusCode:t?t.statusCode:404}}class s extends i.Component{constructor(e){super(e),this.statusCode=e.statusCode}render(){return(0,n.jsxs)("div",{style:{textAlign:"center",width:"100%"},children:[(0,n.jsx)("div",{children:this.statusCode?`An error ${this.statusCode} occurred on server`:(0,n.jsx)("img",{style:{width:"100%",maxWidth:"500px",maxHeight:"400px"},src:"/img/404.svg"})}),(0,n.jsx)("div",{children:(0,n.jsx)("h4",{children:"The page you're looking for can't be found."})}),(0,n.jsx)("div",{children:(0,n.jsx)("a",{className:"btn btn-primary",href:"/",children:"Navigate To Home Page"})})]})}}},5915:(e,t,r)=>{"use strict";r.d(t,{A:()=>
6o});var n=r(66128),i=r(54743);let o=(0,n.A)(i.A,"Map")},5920:(e,t,r)=>{"use strict";var n=r.g.WebSocket||r.g.MozWebSocket;n?e.exports=function(e){return new n(e)}:e.exports=void 0},6102:(e,t,r)=>{"use strict";r.d(t,{h:()=>l});var n=r(4902),i=r(43604),o=r(27714),s=r(9711),a=r(33353);class l{constructor(e){this.uiContext=e,this.logger=s.V.getLogger("GoogleDriverService"),this.cid="1002349272285-rb84b9urep0jghvnf5c04vfp2tf58quv.apps.googleusercontent.com",this.scope="https://www.googleapis.com/auth/drive.file",this.appId="1002349272285",this.token=null,this.tokenClient=null,this.pickerLoaded=!1,this.pendingCallback=null}showFileSelectDialog(e){(this.pendingCallback=e,this.token&&this.pickerLoaded)?this.showPicker():(this.initTokenClient(),this.loadPickerApi(),this.requestToken())}initTokenClient(){this.tokenClient||(this.tokenClient=google.accounts.oauth2.initTokenClient({client_id:this.cid,scope:this.scope,callback:e=>{e.error?this.logger.error({message:`Google Drive auth error: ${e.error}`}):(this.token=e.access_token,this.tryShowPicker())},error_callback:e=>{"popup_blocked"===e.type?this.uiContext.showErrorDialog({title:"Popup Blocked",text:"Google Drive couldn't open the sign-in dialog because popups are blocked. Please enable popups and try again."}):this.logger.error({message:`Google Drive token error: ${e.type||e.message}`})}}))}loadPickerApi(){this.pickerLoaded||gapi.load("picker",()=>{this.pickerLoaded=!0,this.tryShowPicker()})}requestToken(){this.token?this.tryShowPicker():this.tokenClient.requestAccessToken({prompt:""})}tryShowPicker(){this.token&&this.pickerLoaded&&this.showPicker()}showPicker(){let e=new google.picker.View(google.picker.ViewId.DOCS);new google.picker.PickerBuilder().addView(e).enableFeature(google.picker.Feature.MULTISELECT_ENABLED).setOAuthToken(this.token).setAppId(this.appId).setCallback(e=>this.onDriveFileOpen(e)).build().setVisible(!0)}onDriveFileOpen(e){if(e.action===google.picker.Action.PICKED){let t=e.docs;t.forEach(e=>e.token=this.token);let r=o.Y.createFromFileList(t);this.pendingCallback&&(this.pendingCallback(r),this.pendingCallback=null)}else e.action===google.picker.Action.CANCEL&&(this.logger.trace7("Google Drive picker cancelled."),this.pendingCallback=null)}}l=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a._)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a._?Object:a._])],l)},6113:(e,t,r)=>{"use strict";r.d(t,{t:()=>f});var n=r(4902),i=r(43604),o=r(3649),s=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return(0,n.C6)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return r.closed||t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(o.B),a=r(7262),l=r(33441),c=r(9968),u=r(9324),d=r(79347),h=r(71605);let p="bulk-zip-download";class f{constructor(e,t,r,n){this.http=e,this.ws=t,this.apiConfig=r,this.fileManager=n,this.events$=new o.B,this.jobs$=new s([]),this.openRequested$=new o.B,this.knownProofs=new Map,this.wsSubscription=this.ws.getWebsocketMessageObserver().pipe((0,l.p)(e=>this.isBulkZipMessage(e))).subscribe(e=>this.handleWsMessage(e))}async submit(e){let t=[...e].sort(),r=this.proofsFor(t),n=!!this.fileManager,i=new Set(r.map(e=>e.fileId)),o=n?t.filter(e=>i.has(e)):t,s=n?t.filter(e=>!i.has(e)):[];if(0===o.length)throw Object.assign(Error("bulk-zip: none of these files can be proven to be this browser's"),{status:404,unprovable:s});let l=await (0,a._)(this.http.post(this.apiConfig.getBulkZipBaseEndpoint(),{fileIds:o,files:r})),c=s.length>0?{...l,skipped:s}:l;return"ALL_FILES_COVERED"===c.status?this.events$.next({kind:"COVERED",coverage:c.coverage}):c.job&&(this.upsertJob(c.job),this.events$.next({kind:"JOB_CREATED"===c.status?"CREATED":"EXISTING",job:c.job})),c}async list(){let e=await (0,a._)(this.http.get(this.apiConfig.getBulkZipBaseEndpoint()));return this.jobs$.next(e??[]),e??[]}async delete(e){await (0,a._)(this.http.delete(`${this.apiConfig.getBulkZipBaseEndpoint()}/${e}`)),this.jobs$.next(this.jobs$.value.filter(t=>t.jobId!==e))}downloadUrl(e){let t=`${this.apiConfig.getBulkZipBaseEndpoint()}/${e}/download`,r=this.jobs$.value.find(t=>t.jobId===e)?.downloadToken;return r?`${t}?dt=${encodeURIComponent(r)}`:t}proofsFor(e){try{for(let e of this.fileManager?.getFileUploads()??[])for(let t of e?.result?.outputFiles??[])t&&e?.id&&this.knownProofs.set(t,e.id)}catch{}return e.flatMap(e=>{let t=this.knownProofs.get(e);return t?[{fileId:e,uuid:t}]:[]})}getCachedJobs(){return this.jobs$.value}openCenter(){this.list(),this.openRequested$.next()}dispose(){this.wsSubscription&&(this.wsSubscription.unsubscribe(),this.wsSubscription=void 0)}isBulkZipMessage(e){return e.processType===p&&this.jobs$.value.some(t=>t.jobId===e.uuid)}handleWsMessage(e){let t=e.data?g(e.data):{},r=String(e.processStage);if("BUILDING"===r){let r={type:"BULK_ZIP_PROGRESS",jobId:e.uuid,bytesFlushed:t.bytesFlushed??0,totalBytes:t.totalBytes??0,filesCompleted:t.filesCompleted??0,totalFiles:t.totalFiles??0,currentFile:t.currentFile??null,ts:t.ts??new Date().toISOString()};this.applyProgress(r),this.events$.next({kind:"PROGRESS",ev:r})}else if("COMPLETED"===r){let r={type:"FAILED"===String(e.processStageSubState).toUpperCase()?"BULK_ZIP_FAILED":"BULK_ZIP_COMPLETED",jobId:e.uuid,errorCode:t.errorCode,t
6s:t.ts??new Date().toISOString()};this.applyTerminal(r),this.events$.next({kind:"TERMINAL",ev:r})}}upsertJob(e){let t=this.jobs$.value.filter(t=>t.jobId!==e.jobId);t.unshift(e),this.jobs$.next(t)}applyProgress(e){this.jobs$.next(this.jobs$.value.map(t=>t.jobId===e.jobId?{...t,bytesFlushed:e.bytesFlushed,totalBytes:e.totalBytes||t.totalBytes,filesCompleted:e.filesCompleted,totalFiles:e.totalFiles||t.totalFiles,currentFile:e.currentFile,processStage:"BUILDING",processStageSubState:"IN_PROGRESS"}:t))}applyTerminal(e){this.jobs$.next(this.jobs$.value.map(t=>t.jobId===e.jobId?{...t,processStage:"COMPLETED",processStageSubState:"BULK_ZIP_FAILED"===e.type?"FAILED":"COMPLETED",failed:"BULK_ZIP_FAILED"===e.type}:t))}}function g(e){try{return JSON.parse(e)}catch{return{}}}f=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(d.jo)),(0,n.Qj)(1,(0,i.WQ)(h.V)),(0,n.Qj)(2,(0,i.WQ)(c.ApiConfig)),(0,n.Qj)(3,(0,i.WQ)(u.D)),(0,n.Qj)(3,(0,i.lq)()),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===d.jo?Object:d.jo,void 0===h.V?Object:h.V,void 0===c.ApiConfig?Object:c.ApiConfig,"u"<typeof Pick?Object:Pick])],f)},6155:(e,t,r)=>{"use strict";r.d(t,{H:()=>O});var n=r(2943),i=r(65104),o=r(99991),s=r(32277);function a(e,t){return void 0===t&&(t=0),(0,o.N)(function(r,n){r.subscribe((0,s._)(n,function(r){return(0,i.N)(n,e,function(){return n.next(r)},t)},function(){return(0,i.N)(n,e,function(){return n.complete()},t)},function(r){return(0,i.N)(n,e,function(){return n.error(r)},t)}))})}function l(e,t){return void 0===t&&(t=0),(0,o.N)(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function c(e,t){return(0,n.Tg)(e).pipe(l(t),a(t))}function u(e,t){return(0,n.Tg)(e).pipe(l(t),a(t))}var d=r(86728);function h(e,t){return new d.c(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})})}var p=r(63136),f=r(77698);function g(e,t){return new d.c(function(r){var n;return(0,i.N)(r,t,function(){n=e[p.l](),(0,i.N)(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){r.error(e);return}i?r.complete():r.next(t)},0,!0)}),function(){return(0,f.T)(null==n?void 0:n.return)&&n.return()}})}function m(e,t){if(!e)throw Error("Iterable cannot be null");return new d.c(function(r){(0,i.N)(r,t,function(){var n=e[Symbol.asyncIterator]();(0,i.N)(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}var v=r(61930),y=r(72011),b=r(77256),S=r(29572),E=r(63672),w=r(21370),_=r(22449);function A(e,t){return m((0,_.C)(e),t)}function T(e,t){if(null!=e){if((0,v.l)(e))return c(e,t);if((0,b.X)(e))return h(e,t);if((0,y.y)(e))return u(e,t);if((0,E.T)(e))return m(e,t);if((0,S.x)(e))return g(e,t);if((0,_.U)(e))return A(e,t)}throw(0,w.L)(e)}function O(e,t){return t?T(e,t):(0,n.Tg)(e)}},6216:(e,t,r)=>{e.exports=r(97791)(Object.keys,Object)},6266:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(80279);let i=function(e,t){return(0,n.A)(e,t)}},6548:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var n=r(64083);class i{constructor(e,t,r,i,o){this.storageType=n.Tc.DROPBOX_FILE,this.id=t,this.name=r,this.token=e,this.type=i,this.size=o,this.lastModified=Date.now()}static createFromFileList(e){return e.map(e=>new i(e.link,e.link,e.name,"UNKNOWN",e.bytes))}}},6843:(e,t,r)=>{"use strict";r.d(t,{v:()=>A});var n=r(4902),i=r(43604),o=r(68246),s=r(9711),a=r(4527),l=r(56634),c=r(9079),u=r(16233),d=r(77697),h=r(99809),p=r(51461),f=Math.min;let g=function(e,t,r){for(var n=r?d.A:u.A,i=e[0].length,o=e.length,s=o,a=Array(o),g=1/0,m=[];s--;){var v=e[s];s&&t&&(v=(0,l.A)(v,(0,h.A)(t))),g=f(v.length,g),a[s]=!r&&(t||i>=120&&v.length>=120)?new c.A(s&&v):void 0}v=e[0];var y=-1,b=a[0];e:for(;++y<i&&m.length<g;){var S=v[y],E=t?t(S):S;if(S=r||0!==S?S:0,!(b?(0,p.A)(b,E):n(m,E,r))){for(s=o;--s;){var w=a[s];if(!(w?(0,p.A)(w,E):n(e[s],E,r)))continue e}b&&b.push(E),m.push(S)}}return m};var m=r(91336),v=r(84055);let y=function(e){return(0,v.A)(e)?e:[]},b=(0,m.A)(function(e){var t=(0,l.A)(e,y);return t.length&&t[0]===e[0]?g(t):[]});var S=200;let E=function(e,t,r,n){var i=-1,o=u.A,s=!0,a=e.length,f=[],g=t.length;if(!a)return f;r&&(t=(0,l.A)(t,(0,h.A)(r))),n?(o=d.A,s=!1):t.length>=S&&(o=p.A,s=!1,t=new c.A(t));e:for(;++i<a;){var m=e[i],v=null==r?m:r(m);if(m=n||0!==m?m:0,s&&v==v){for(var y=g;y--;)if(t[y]===v)continue e;f.push(m)}else o(t,v,n)||f.push(m)}return f};var w=r(13909);let _=(0,m.A)(function(e,t){return(0,v.A)(e)?E(e,(0,w.A)(t,1,v.A,!0)):[]});class A{initializeForCompatibility(e,t){this.fromType=e,this.acceptedExtensions=t}addFile(e,t){e.originalInputFiles=t&&t.originalInputFiles,this.files.unshift(e),this.notyfyAll()}getOnFileAddedSubscriber(){return this.onFileAdded.asObservable()}getOnRequestFileReuploadSubscriber(){return this.onRequestFileReupload.asObservable()}notifyReAddEvent(e){this.onRequestFileReupload.next(e)}removeAndNotifyReAddEvent(e){this.onRequestFileReupload.next(e),this.removeFile(e)}removeFile(e){this.notyfyAll()}removeFileFromFileList(e){let t=this.files.find(t=>
6t.id===e.id);t&&this.hidden.push(t),this.notyfyAll()}getAndRemoveFile(e,t){let r=this.files.find(t=>t.id===e);return t&&r&&this.removeAndNotifyReAddEvent(r),r}getAndRemoveFileByFiles(e,t){try{let t=this.files.find(t=>{if(e.length!==t.file.length)return!1;let r=!0;for(let n of e)r=r&&!!t.file.find(e=>e.name===n.name&&e.size===n.size);return r}),r=this.hidden.find(t=>{if(e.length!==t.file.length)return!1;let r=!0;for(let n of e)r=r&&!!t.file.find(e=>e.name===n.name&&e.size===n.size);return r}),n=t||r;return this.logger.trace7({message:`Removing file ${n.name}`,data:JSON.stringify(n)}),n}catch(e){return}}getFiles(...e){if(!e)return this.files;if(e.length>0&&e[0]){let t=this.files.filter(t=>t.toType===e[0]);return e.length>1&&e[1]&&t.length&&t.forEach(e=>this.removeAndNotifyReAddEvent(e)),t}return this.files}notyfyAll(){if(this.fromType)if((0,a.A)(this.fromType)){let e=this.files.filter(e=>b(this.fromType,e.fromType).length>0),t=this.acceptedExtensions.replace(/\./ig,"").split(","),r=this.files.filter(e=>0===_(e.extension,t).length);this.onFileAdded.next(b(e,r))}else{let e=this.files.filter(e=>e.fromType.indexOf(this.fromType)>-1),t=this.acceptedExtensions.replace(/\./ig,"").split(","),r=this.files.filter(e=>0===_(e.extension,t).length);this.onFileAdded.next(b(e,r))}else this.onFileAdded.next(this.files)}constructor(){this.logger=s.V.getLogger("UploadedFilesService"),this.files=[],this.hidden=[],this.onFileAdded=new o.m(1),this.onRequestFileReupload=new o.m(1)}}A=(0,n.Cg)([(0,i._G)()],A)},6992:(e,t,r)=>{"use strict";r.d(t,{ik:()=>i});var n=r(64083);r(69870),r(9737),r(74034);class i{static{this.IMAGE_EXTENSIONS=["HEIC","HEIF","JFIF","JPEG","PNG","TIF","TIFF","WEBP","JPG","AVIF","BMP","EPS","GIF","ICO","PPM","PSD","3FR","ARW","CR2","CR3","CRW","DCR","DNG","ERF","MOS","MRW","NEF","ORF","PEF","RAF","RW2","X3F","XCF"]}static{this.AUDIO_EXTENSIONS=["AAC","AC3","AIF","AIFF","AIFC","AMR","AU","DSS","FLAC","M4A","M4B","MP3","OGA","OGG","OPUS","WAV","WEBA","WMA","VOC"]}static{this.VIDEO_EXTENSIONS=["3G2","3GP","ASF","AV1","AVCHD","AVI","DIVX","F4V","FLV","HEVC","M2TS","M2V","M4V","MJPEG","MKV","MOV","MP4","MPEG","MPEG2","MPG","MTS","MXF","OGV","RM","RMVB","SWF","TS","VOB","WEBM","WMV","WTV","XVID","3GPP","CAF","CAVS","DV","DVR"]}static{this.ARCHIVE_EXTENSIONS=["7Z","RAR","TAR","TAR.GZ","TAR.XZ","TAR.BZ2","TGZ","TB2","TZ2","ZIP"]}static{this.DOCUMENT_EXTENSIONS=["PDF","DOC","DOCX","PS"]}static{this.EBOOK_EXTENSIONS=["EPUB","MOBI"]}static{this.PRESENTATION_EXTENSIONS=["PPT","PPTX"]}static{this.VECTOR_EXTENSIONS=["SVG","PS"]}static{this.MS_OFFICE_EXTENSION=["PPT","PPTX","XLS","XLT","XLM","XLSX","XLSM","XLTX","XLTM","DOC","DOT","WBK","DOCX","DOCM","DOTX","DOTM","DOCB"]}static{this.PDF_EXTENSION=["PDF"]}static{this.PS_EXTENSION=["PS"]}static{this.ALL_EXTENSIONS=[...i.IMAGE_EXTENSIONS,...i.AUDIO_EXTENSIONS,...i.VIDEO_EXTENSIONS,...i.ARCHIVE_EXTENSIONS,...i.DOCUMENT_EXTENSIONS,...i.EBOOK_EXTENSIONS,...i.PRESENTATION_EXTENSIONS,...i.VECTOR_EXTENSIONS,...i.MS_OFFICE_EXTENSION]}static{this.ALL_EXTENSIONS_SET=new Set(i.ALL_EXTENSIONS)}static{this.DISALLOWED_EXTENSTIONS=new Set(["ADE","ADP","APK","APPX","APPXBUNDLE","BAT","CAB","CHM","CMD","COM","CPL","DIAGCAB","DIAGCFG","DIAGPACK","DLL","DMG","EX","EX_","EXE","HTA","IMG","INS","ISO","ISP","JAR","JNLP","JS","JSE","LIB","LNK","MDE","MSC","MSI","MSIX","MSIXBUNDLE","MSP","MST","NSH","PIF","PS1","SCR","SCT","SHB","SYS","VB","VBE","VBS","VHD","VXD","WSC","WSF","WSH","XLL","BAK","BCK","BKP","CFG","CONF","CONFIG","INI","LOG","OLD","SAV","SAVE","TEMP","TMP","BIN","CGI","SHTM","SHTML","STM","CER","CRT","DER","KEY","P12","P7B","P7C","PEM","PFX","DAT","EML","HTR","HTW","IDA","IDC","IDQ","NWS","POL","PRINTER","REG","WMZ"])}static{this.THUMBNAIL_SUPPORTED_EXTENSIONS=[...i.IMAGE_EXTENSIONS,...i.PDF_EXTENSION,...i.VIDEO_EXTENSIONS]}static isVideoToType(e){return(e=e.toLowerCase())===n.HP.VIDEO||i.VIDEO_EXTENSIONS.map(e=>e.toLowerCase()).includes(e)}static isAudioToType(e){return(e=e.toLowerCase())===n.HP.AUDIO||i.AUDIO_EXTENSIONS.map(e=>e.toLowerCase()).includes(e)}static isImageToType(e){return(e=e.toLowerCase())===n.HP.IMAGE||i.IMAGE_EXTENSIONS.map(e=>e.toLowerCase()).includes(e)}static isVideoFromType(e){let t=[n.HP.VIDEO,...i.VIDEO_EXTENSIONS].map(e=>e.toLowerCase());return(e=e.map(e=>e.toLowerCase())).some(e=>t.includes(e))}static isAudioFromType(e){let t=[n.HP.AUDIO,...i.AUDIO_EXTENSIONS].map(e=>e.toLowerCase());return(e=e.map(e=>e.toLowerCase())).some(e=>t.includes(e))}static isImageFromType(e){let t=[n.HP.IMAGE,...i.IMAGE_EXTENSIONS].map(e=>e.toLowerCase());return(e=e.map(e=>e.toLowerCase())).some(e=>t.includes(e))}static fileToJpgImage(e){let{fileToJpgImage:t}=r(3560);return t(e)}static fileToTransparentPngImage(e){let{fileToTransparentPngImage:t}=r(3560);return t(e)}static getExtensionFallback(e){return -1===e.lastIndexOf(".")?e:e.substring(e.lastIndexOf(".")+1)}
6static getExtension(e){let t=i.ARCHIVE_EXTENSIONS.find(t=>e.toUpperCase().endsWith(t));return t?e.substring(e.length-t.length):i.getExtensionFallback(e)}static getExtensionList(e){return e.map(e=>i.getExtension(e))}static isKnownSupportedExtension(e){return -1!==i.ALL_EXTENSIONS.indexOf(i.getExtension(e).toUpperCase())}static isExtensionAllowed(e){return i.DISALLOWED_EXTENSTIONS.has(i.getExtension(e).toUpperCase())}static isThumbnailSupported(e){let t=i.getExtension(e).toUpperCase();return -1!==i.THUMBNAIL_SUPPORTED_EXTENSIONS.indexOf(t)}static toReadableBytes(e,t){let r="quantity"==t?"B":"Bps",n=parseInt(e+"",10);return n>1e9?parseFloat(`${n/1e9}`).toFixed(2)+` G${r}`:n>1e6?parseFloat(`${n/1e6}`).toFixed(2)+` M${r}`:n>1e3?parseFloat(`${n/1e3}`).toFixed(2)+` K${r}`:n+("quantity"==t?" Bytes":"Bps")}static toReadableBits(e,t){let r="quantity"==t?"b":"bps",n=parseInt(e+"",10);return n>1e9?parseFloat(`${n/1e9}`).toFixed(2)+` G${r}`:n>1e6?parseFloat(`${n/1e6}`).toFixed(2)+` M${r}`:n>1e3?parseFloat(`${n/1e3}`).toFixed(2)+` K${r}`:"quantity"==t?`${n} bits`:`${n} bps`}}},7249:(e,t,r)=>{"use strict";var n=r(93570),i=r(66384),o=r(72649),s=r(82007).b,a=r(59355),l=function(){};function c(e){l(e),s.call(this);var t=this;i.polluteGlobalNamespace(),this.id="a"+a.string(6),e=o.addQuery(e,"c="+decodeURIComponent(i.WPrefix+"."+this.id)),l("using htmlfile",c.htmlfileEnabled);var n=c.htmlfileEnabled?i.createHtmlfile:i.createIframe;r.g[i.WPrefix][this.id]={start:function(){l("start"),t.iframeObj.loaded()},message:function(e){l("message",e),t.emit("message",e)},stop:function(){l("stop"),t._cleanup(),t._close("network")}},this.iframeObj=n(e,function(){l("callback"),t._cleanup(),t._close("permanent")})}n(c,s),c.prototype.abort=function(){l("abort"),this._cleanup(),this._close("user")},c.prototype._cleanup=function(){l("_cleanup"),this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete r.g[i.WPrefix][this.id]},c.prototype._close=function(e){l("_close",e),this.emit("close",null,e),this.removeAllListeners()},c.htmlfileEnabled=!1;var u=["Active"].concat("Object").join("X");if(u in r.g)try{new r.g[u]("htmlfile"),c.htmlfileEnabled=!0}catch(e){}c.enabled=c.htmlfileEnabled||i.iframeEnabled,e.exports=c},7262:(e,t,r)=>{"use strict";r.d(t,{_:()=>o});var n=r(14103),i=r(80967);function o(e,t){var r="object"==typeof t;return new Promise(function(o,s){var a=new i.Ms({next:function(e){o(e),a.unsubscribe()},error:s,complete:function(){r?o(t.defaultValue):s(new n.G)}});e.subscribe(a)})}},7431:(e,t,r)=>{"use strict";r.d(t,{K:()=>i});var n=Array.isArray;function i(e){return 1===e.length&&n(e[0])?e[0]:e}},7566:(e,t,r)=>{"use strict";r.d(t,{Sb:()=>u,Vy:()=>m,oR:()=>d,y_:()=>b});let n=.575,i=10,o=e=>"number"==typeof e&&isFinite(e)&&e>0?Math.min(e,i):i,s=14400,a=8192,l=120,c=2e3,u=["mp4","mov","webm","mkv","avi","wmv","m4v","mpg","mpeg","3gp","flv","ts","mts"],d=e=>{let t=((e||"").split(".").pop()||"").toLowerCase();return"gif"===t?"gif":u.includes(t)?"video":"other"},h=(e,t,r)=>Math.round(e*t*r*n),p=(e,t,r,n)=>h(e,t,r*n),f=e=>"number"==typeof e&&isFinite(e)&&e>0&&e<=a,g=e=>"number"==typeof e&&isFinite(e)&&e>0&&e<=s,m=e=>e?e.approxSize??e.naturalGifEstimate:void 0,v=e=>"number"==typeof e&&isFinite(e)&&e>0?e:void 0;class y{subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}get(e){return this.records.get(e)}isTracked(e){return this.tracked.has(e)}track(e){this.tracked.add(e)}remove(e){let t=this.stage0Cancels.get(e);t&&t(),this.tracked.delete(e),this.records.delete(e)&&this.notify()}clear(){Array.from(this.stage0Cancels.values()).forEach(e=>e()),this.stage0Cancels.clear(),this.records.clear(),this.tracked.clear(),this.probeAttempted.clear()}beginClientEstimate(e,t){let r;if(this.track(e),this.records.has(e)||this.stage0Cancels.has(e)||"u"<typeof document||"u"<typeof URL||!URL.createObjectURL||"u"<typeof File||!(t instanceof File))return;try{r=URL.createObjectURL(t)}catch(e){return}let n=document.createElement("video");n.preload="metadata",n.muted=!0;let o=!1,s=()=>{if(!o){o=!0,clearTimeout(l),n.removeEventListener("loadedmetadata",a),n.removeEventListener("error",s);try{n.removeAttribute("src"),n.load()}catch(e){}URL.revokeObjectURL(r),this.stage0Cancels.delete(e)}},a=()=>{let t=n.videoWidth,r=n.videoHeight,o=n.duration;s(),f(t)&&f(r)&&g(o)&&this.apply(e,0,{naturalGifEstimate:p(t,r,i,o)})}
6,l=setTimeout(s,c);n.addEventListener("loadedmetadata",a),n.addEventListener("error",s),this.stage0Cancels.set(e,s),n.src=r}recordInputFileInfo(e,t){if(!t)return;let{width:r,height:n,framerate:i,numberOfFrames:s,duration:a}=t;if(!f(r)||!f(n)||"number"==typeof i&&i>l)return;let c="number"==typeof i&&isFinite(i)&&i>0?i:void 0,u="number"==typeof s&&isFinite(s)&&s>0?s:void 0,d=g(a)?a:void 0;if(void 0===d&&void 0!==u&&void 0!==c){let e=u/c;d=g(e)?e:void 0}if(void 0===d)return;let p=o(c??(void 0!==u?u/d:void 0))*d;this.apply(e,1,{naturalGifEstimate:h(r,n,p)})}recordKnownNaturalSize(e,t){this.track(e),"number"==typeof t&&isFinite(t)&&t>0&&this.apply(e,2,{naturalGifEstimate:Math.round(t),quickOnly:!1})}async runServerProbe(e,t){let r;if(this.track(e),!this.probeAttempted.has(e)){this.probeAttempted.add(e);try{r=await t()}catch(e){return}this.tracked.has(e)&&r&&!r.error&&this.apply(e,2,{naturalGifEstimate:v(r.naturalGifEstimate),approxSize:v(r.approxSize),floorSize:v(r.floorSize),quickOnly:!!r.quickOnly})}}apply(e,t,r){if(!this.tracked.has(e))return;let n=this.records.get(e);if(n&&n.stage>t)return;let i={...n??{},stage:t};Object.keys(r).forEach(e=>{let t=r[e];void 0!==t&&(i[e]=t)}),this.records.set(e,i),this.notify()}notify(){this.listeners.forEach(e=>{try{e()}catch(e){console.error(e)}})}constructor(){this.records=new Map,this.tracked=new Set,this.listeners=new Set,this.probeAttempted=new Set,this.stage0Cancels=new Map}}let b=new y},8090:e=>{e.exports={toast:"toast_component_toast___IeBZ",toastSlideIn:"toast_component_toastSlideIn__bJyxp",content:"toast_component_content__vMTLO",head:"toast_component_head__SwGQz","header-content":"toast_component_header-content__SQGbP",close:"toast_component_close__LlEuY",body:"toast_component_body__UQBCb",actions:"toast_component_actions__o2j04",action:"toast_component_action__I25Rp"}},8323:(e,t,r)=>{"use strict";r.d(t,{g:()=>a,k:()=>o});var n=r(43604),i=r(44101);let o=new n.mc({autobind:!0,defaultScope:"Singleton"}),{lazyInject:s}=(0,i.A)(o),a=function(e){return(...t)=>(r,n,...i)=>(e(...t)(r,n,...i),Object.getOwnPropertyDescriptor(r,n))}(s)},8365:(e,t,r)=>{"use strict";r.d(t,{C:()=>o});var n=r(52652),i=r(9711);class o{static get logger(){return i.V.getLogger("BrowserUtils")}static isMobile(){if(!o.hasWindow())return void console.error("Requested execution aborted since window was not avalilable");let e=!1;try{let t=window;!function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||t.opera)}catch(e){o.logger.error({message:"Failed to get Platform, Window was not available",error:e})}return e}static isSafari(){if(!o.hasWindow())return console.error("Requested execution aborted since window was not avalilable"),!1;try{return navigator.vendor&&navigator.vendor.indexOf("Apple")>-1&&navigator.userAgent&&-1==navigator.userAgent.indexOf("CriOS")&&-1==navigator.userAgent.indexOf("FxiOS")}catch(e){return!1}}static isIOS(){if(!o.hasWindow())return console.error("Requested execution aborted since window was not avalilable"),!1;try{return!!(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/iPod/i))}catch(e){o.logger.error({message:"Failed to get Platform, Window was not available",error:e})}return!1}static isAndroid(){if(!o.hasWindow())return console.error("Requested execution aborted since window was not avalilable"),!1;try{return!!navigator.userAgent.match(/Android/i)}catch(e){o.logger.error({message:"Failed to get Platform, Window was not available",error:e})}return!1}static dispatchResizeEvent(e=0){return new Promise(t=>{setTimeout(()=>{window.dispatchEvent(new Event("resize")),t()},e)})}static getBrowserInfo(){try{return(0,n.o0)()}catch(e){o.logger.error({message:"Failed at getBrowserInfo: "+e,error:e})}return{}}static click(e){document.querySelector(e).dispatchEvent(new Event("click"))}static waitForElement(e,t){return new Promise((r,n)=>{let i=()=>
6{if(o.hasDocument()){let o=document.querySelector(e);o?r(o):(t<=0&&n(),t-=100,setTimeout(()=>i(),100))}else n()};i()})}static hasDocument(){try{return!!globalThis.document}catch(e){return o.hasWindowOrDocument()}}static hasWindow(){try{return!!globalThis.window}catch(e){return o.hasWindowOrDocument()}}static runIfWindowExists(e,t){if(o.hasWindow())try{return e()}catch(e){}return t}static hasWindowOrDocument(){try{return!!window||!!document}catch(e){return!1}}}},9079:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(35072),i="__lodash_hash_undefined__";let o=function(e){return this.__data__.set(e,i),this},s=function(e){return this.__data__.has(e)};function a(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n.A;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=s;let l=a},9120:(e,t,r)=>{"use strict";r.d(t,{of:()=>o});var n=r(67375),i=r(6155);function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,n.lI)(e);return(0,i.H)(e,r)}},9123:(e,t,r)=>{"use strict";r.d(t,{L:()=>k}
6);var n=r(4902),i=r(43604),o=r(90186);function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function a(e,t){var r=document.querySelector('script[src="'.concat(e,'"]'));if(null===r)return null;var n=p(e,t),i=r.cloneNode();if(delete i.dataset.uidAuto,Object.keys(i.dataset).length!==Object.keys(n.dataset).length)return null;var o=!0;return Object.keys(i.dataset).forEach(function(e){i.dataset[e]!==n.dataset[e]&&(o=!1)}),o?r:null}function l(e){var t=e.url,r=e.attributes,n=e.onSuccess,i=e.onError,o=p(t,r);o.onerror=i,o.onload=n,document.head.insertBefore(o,document.head.firstElementChild)}function c(e){var t=e.sdkBaseUrl,r=e.environment,n=s(e,["sdkBaseUrl","environment"]),i=t||h(r),o=n,a=Object.keys(o).filter(function(e){return void 0!==o[e]&&null!==o[e]&&""!==o[e]}).reduce(function(e,t){var r=o[t].toString();return"data"===(t=u(t)).substring(0,4)||"crossorigin"===t?e.attributes[t]=r:e.queryParams[t]=r,e},{queryParams:{},attributes:{}}),l=a.queryParams,c=a.attributes;return l["merchant-id"]&&-1!==l["merchant-id"].indexOf(",")&&(c["data-merchant-id"]=l["merchant-id"],l["merchant-id"]="*"),{url:"".concat(i,"?").concat(d(l)),attributes:c}}function u(e){var t=function(e,t){return(t?"-":"")+e.toLowerCase()};return e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,t)}function d(e){var t="";return Object.keys(e).forEach(function(r){0!==t.length&&(t+="&"),t+=r+"="+e[r]}),t}function h(e){return"sandbox"===e?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}function p(e,t){void 0===t&&(t={});var r=document.createElement("script");return r.src=e,Object.keys(t).forEach(function(e){r.setAttribute(e,t[e]),"data-csp-nonce"===e&&r.setAttribute("nonce",t["data-csp-nonce"])}),r}function f(e,t){if(void 0===t&&(t=Promise),v(e,t),"u"<typeof document)return t.resolve(null);var r=c(e),n=r.url,i=r.attributes,o=i["data-namespace"]||"paypal",s=m(o);return(i["data-js-sdk-library"]||(i["data-js-sdk-library"]="paypal-js"),a(n,i)&&s)?t.resolve(s):g({url:n,attributes:i},t).then(function(){var e=m(o);if(e)return e;throw Error("The window.".concat(o," global variable is not available."))})}function g(e,t){void 0===t&&(t=Promise),v(e,t);var r=e.url,n=e.attributes;if("string"!=typeof r||0===r.length)throw Error("Invalid url.");if(void 0!==n&&"object"!=typeof n)throw Error("Expected attributes to be an object.");return new t(function(e,t){if("u"<typeof document)return e();l({url:r,attributes:n,onSuccess:function(){return e()},onError:function(){return t(Error('The script "'.concat(r,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.')))}})})}function m(e){return window[e]}function v(e,t){if("object"!=typeof e||null===e)throw Error("Expected an options object.");var r=e.environment;if(r&&"production"!==r&&"sandbox"!==r)throw Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==t&&"function"!=typeof t)throw Error("Expected PromisePonyfill to be a function.")}"function"==typeof SuppressedError&&SuppressedError;var y=r(68246),b=r(9120),S=r(6155);r(44492);var E=r(990),w=r(44555),_=r(98683),A=r(9711),T=r(8365),O=r(22902),C=r(47500),I=r(82803),P=r(2807),x=r(92288);class k{get dropboxApiReady(){return this._dropboxApiReady}get googleApiReady(){return this._googleApiReady}get googleIdentityServicesReady(){return this._googleIdentityServicesReady}get saveToGoogleDriveReady(){return this._saveToGoogleDriveReady.asObservable()}constructor(e,t,r){this.windowService=e,this.env=t,this.connectivityService=r,this.logger=A.V.getLogger("ScriptLoadService"),this.scriptStateMap=new Map,this._dropboxApiReady=!0,this._googleApiReady=!0,this._googleIdentityServicesReady=!1,this._saveToGoogleDriveReady=new y.m(1),this.scriptsWithValidations=[{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/resumable.min.js",readableName:"File Upload Service",loadFn:e=>this.waitForWindowItem(e,"Resumable")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/html2canvas.min.js",readableName:"HTML Canvas Utils",loadFn:e=>this.waitForWindowItem(e,"html2canvas")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/load-image.all.min.js",readableName:"Image Load Service",loadFn:e=>this.waitForWindowItem(e,"loadImage")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/canvas-to-blob.min.js",readableName:"Blob Service",loadFn:e=>this.waitForWindowItem(e,"dataURLtoBlob")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/lib/download.js",readableName:"Download Service",loadFn:e=>this.waitForWindowItem(e,"download")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/lib/glfx.6.min.js",readableName:"WebGL Service Service",loadFn:e=>this.waitForWindowItem(e,"fx")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/lib/libwebp-0.1.min.js",readableName:"WebP Encoder Service",loadFn:e=>this.waitForWindowItem(e,"WebPEncoder")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/lib/UTIF.min.min.js",readableName:"TIFF Service",loadFn:e=>this.waitForWindowItem(e,"UTIF")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/marked.min.js",readableName:"Markdown Service",loadFn:e=>this.waitForWindowItem(e,"marked")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/lib/canvastotiff.min.js",readableName:"TIF Service",loadFn:e=>this.waitForWindowItem(e,"CanvasToTIFF")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/hammer.min.js",readableName:"Touch Event Service",loadFn:e=>this.waitForWindowItem(e,"Hammer")},{url:"https://storage.googleapis.com/ps2pdf-static/gzip-libs/js/hammer.min.js",readableName:"Touch Event Service",loadFn:e=>this.waitForWindowItem(e,"Hammer")}],this.executed=!1,this.loadedPomise=new Promise((e,t)=>
6{this.loadedPomiseResolve=e,this.loadedPomiseReject=t})}runScriptAtFirstMouseEvent(){this.lazyLoadCSS(),this.loadMaterialIcons()}async waitForGlobal(e,t=1e4){if(!window[e])return new Promise(r=>{let n=setInterval(()=>{window[e]&&(clearInterval(n),r())},100);setTimeout(()=>{clearInterval(n),r()},t)})}async loadAllScriptsIfNotLoaded(e=!1){return!0}loadRequiredVarifiableScripts(){let e=[];return this.scriptsWithValidations.forEach(t=>{this.scriptStateMap.set(t.url,this.createScriptStateObjectFor(t.readableName,!0)),e.push(t.loadFn(t.url))}),this.scriptsWithValidations.forEach(e=>{this.loadScript(e.url).catch(console.log)}),e}loadScript(e,t){return T.C.hasDocument()?(this.uploadStateObject(e,!1),new Promise((r,n)=>{(0,b.of)({}).pipe((0,E.Z)(()=>{let r=new Promise((r,n)=>{if(Array.from(document.querySelectorAll("head script")).map(e=>e.src).filter(e=>!!e&&e.length>4).find(t=>C.r.isURLHasSameFileName(e,t)))return void r();try{let i=document.createElement("script");if(i.src=e,i.type="text/javascript",t&&t.attributes)for(let e in t.attributes)t.attributes[e]&&i.setAttribute(e,t.attributes[e]);i.onload=()=>{r()},i.onerror=e=>{n(e)},document.getElementsByTagName("head")[0].appendChild(i)}catch(e){n(e)}});return(0,S.H)(r)}),(0,w.L)(6)).subscribe({next:()=>{this.getValidatableScriptStateObject(e).error=!1,r()},error:t=>{this.getValidatableScriptStateObject(e).error=!0,this.logger.error({message:`Failed to load script ${e}.`,error:t}),n(t)}})})):(console.log("Request to load the script ignored. globalThis.document is missing."),Promise.resolve())}uploadStateObject(e,t){let r=this.getValidatableScriptStateObject(e);r&&r.executed||(r||(r=this.createScriptStateObjectFor(e,t),this.scriptStateMap.set(e,r)),r.executed=!0)}loadMaterialIcons(){}loadStyleSheet(e){return T.C.hasDocument()?new Promise((t,r)=>{if(this.windowService.runOnWindow(t=>t[e])){let n=i=>{!this.windowService.runOnWindow(t=>t[e])&&i>0?setTimeout(()=>n(i--),1e3):(i<=0&&!this.windowService.runOnWindow(t=>t[e])&&r(),t())};n(20)}else{this.windowService.runOnWindow(t=>t[e]=!0);let n=document.createElement("link");n.rel="stylesheet",n.href=e,document.head.appendChild(n),n.onload=()=>{t()},n.onerror=()=>{r()}}}):void console.log("Requested execution aborted since document was not avalilable")}lazyLoadCSS(){}waitForWindowItem(e,t){return new Promise((r,n)=>{let i=()=>{let o=this.scriptStateMap.get(e);T.C.hasWindow()?o.error?n():window&&(0,O.A)(window,t)?(o.error=!1,o.loaded=!0,o.checkCount++,r()):(o.checkCount++,o.checkCount<=20?this.logger.trace1({message:`Script, ${t} is not ready yet after ${o.checkCount}s!. If you see this message repeat for more than 20s then there was a fatal error loading this page. Please let us know at [email protected]`}):o.errorLogged||(o.errorLogged=!0,this.logger.error(`Script, ${t} is not ready yet after ${o.checkCount}s!. If you see this message repeat for more than 20s then there was a fatal error loading this page. Please let us know at [email protected]`)),setTimeout(()=>i(),1e3)):r()};setTimeout(()=>i(),1e3)})}getValidatableScriptStateObject(e){return this.scriptStateMap.get(e)}createScriptStateObjectFor(e,t,r=!0){return{checkCount:0,loaded:!1,readableName:e,error:!1,errorLogged:!1,executed:!1,tracked:t,required:r}}async loadDropbox(){let e="https://www.dropbox.com/static/api/2/dropins.js",t="Dropbox Service",r=e=>this.waitForWindowItem(e,"Dropbox"),n=this.scriptStateMap.get(e);if(!n||!n.loaded)return this.scriptStateMap.set(e,this.createScriptStateObjectFor(t,!0,!1)),this.loadScript(e,{attributes:{id:"dropboxjs","data-app-key":"crbrplpove29sb2"}}).then(()=>this._dropboxApiReady=!0,()=>this._dropboxApiReady=!1),r(e)}async loadAdsense(){if(!T.C.hasWindow())return void console.log("Exit loadAllScriptsIfNotLoaded fn. No window.");let e=`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${o.a}`,t=this.scriptStateMap.get(e);if(!t||!t.loaded)return this.scriptStateMap.set(e,this.createScriptStateObjectFor("Google Adsense",!0,!1)),this.loadScript(e,{attributes:{crossorigin:"anonymous",async:"true"}}).catch(console.log),this.waitForAdsense(e)}waitForAdsense(e){return new Promise((t,r)=>{let n=!1,i=e=>{n||(n=!0,e())};try{let t=document.querySelector(`script[src="${e}"]`);t?.addEventListener("error",()=>i(()=>r(Error("The AdSense library did not load (blocked)."))),{once:!0})}catch{}let o=()=>
6{if(!n){if(!T.C.hasWindow()||(0,O.A)(window,"adsbygoogle")){let r=this.scriptStateMap.get(e);r&&(r.error=!1,r.loaded=!0),i(t);return}setTimeout(o,1e3)}};setTimeout(o,1e3)})}loadGoogleDriveSave(){let e="https://apis.google.com/js/platform.js",t="Google API Service",r=e=>this.waitForWindowItem(e,"gapi.platform"),n=this.scriptStateMap.get(e);if(!n||!n.loaded)return this.scriptStateMap.set(e,this.createScriptStateObjectFor(t,!1,!1)),this.loadScript(e).then(()=>this._saveToGoogleDriveReady.next(!0),e=>{console.error(e)}),r(e)}loadGoogleApi(){let e="https://apis.google.com/js/api.js",t="Google API Service",r=e=>this.waitForWindowItem(e,"gapi"),n=this.scriptStateMap.get(e);if(!n||!n.loaded)return this.scriptStateMap.set(e,this.createScriptStateObjectFor(t,!0,!1)),this.loadScript(e).then(()=>this._googleApiReady=!0,()=>this._googleApiReady=!1),r(e)}loadGoogleIdentityServices(){let e="https://accounts.google.com/gsi/client",t="Google Identity Services",r=e=>this.waitForWindowItem(e,"google.accounts"),n=this.scriptStateMap.get(e);if(!n||!n.loaded)return this.scriptStateMap.set(e,this.createScriptStateObjectFor(t,!1,!1)),this.loadScript(e).then(()=>this._googleIdentityServicesReady=!0,()=>this._googleIdentityServicesReady=!1),r(e)}async loadStripe(){let{getStripe:e}=await r.e(4520).then(r.bind(r,4520));await e()}async loadReCaptcha(){let e="https://www.google.com/recaptcha/api.js",t="Google Recaptcha Service",r=e=>this.waitForWindowItem(e,"grecaptcha"),n=this.scriptStateMap.get(e);if(!n||!n.loaded)return this.scriptStateMap.set(e,this.createScriptStateObjectFor(t,!0)),await this.loadScript(e),r(e)}static async loadPayPal(){let e={clientId:_.FO.PAYPAL_CLIENT_ID,intent:"subscription",vault:!0,components:"buttons"};console.log("[PayPal] loadPayPal start",{clientIdPrefix:e.clientId.substring(0,8)+"..."});let t=await f(e);return console.log("[PayPal] loadPayPal done",{hasPaypal:null!=t}),t}loadFacebookSDK(){!function(e,t,r){let n,i=e.getElementsByTagName(t)[0];e.getElementById(r)||((n=e.createElement(t)).id=r,n.src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2&appId=1700010840091346&autoLogAppEvents=1",i.parentNode.insertBefore(n,i))}(document,"script","facebook-jssdk")}getFailedScripts(){let e=[];return this.scriptStateMap.forEach(t=>{t.error&&e.push(t.readableName+(t.required?" (Required)":" (Optional)"))}),e}
6async loadBootstrapJS(){if(!T.C.hasWindow())return;let e="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js",t="Popper.js",r=this.scriptStateMap.get(e);r?.loaded||(this.scriptStateMap.set(e,this.createScriptStateObjectFor(t,!1,!1)),await this.loadScript(e).catch(console.log));let n="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.1/js/bootstrap.bundle.min.js",i="Bootstrap JS",o=e=>this.waitForWindowItem(e,"bootstrap"),s=this.scriptStateMap.get(n);if(!s?.loaded)return this.scriptStateMap.set(n,this.createScriptStateObjectFor(i,!1,!1)),await this.loadScript(n).catch(console.log),o(n)}async loadImageProcessingLibs(){if(!T.C.hasWindow())return;let e=[{url:"/js/lib/html2canvas.min.js",windowItem:"html2canvas",name:"HTML2Canvas"},{url:"/js/lib/load-image.all.min.js",windowItem:"loadImage",name:"LoadImage"},{url:"/js/lib/canvas-to-blob.min.js",windowItem:"dataURLtoBlob",name:"Canvas to Blob"},{url:"/js/lib/download.js",windowItem:"download",name:"Download"},{url:"/js/lib/libwebp-0.1.min.js",windowItem:"WebPEncoder",name:"WebP Encoder"},{url:"/js/lib/UTIF.min.min.js",windowItem:"UTIF",name:"UTIF"},{url:"/js/lib/marked.min.js",windowItem:"marked",name:"Marked"},{url:"/js/lib/canvastotiff.min.js",windowItem:"CanvasToTIFF",name:"Canvas to TIFF"},{url:"/js/lib/hammer.min.js",windowItem:"Hammer",name:"Hammer"}].map(e=>{let t=e.url.startsWith("http")?e.url:`${window.location.origin}${e.url}`,r=this.scriptStateMap.get(t);return r?.loaded?Promise.resolve():(this.scriptStateMap.set(t,this.createScriptStateObjectFor(e.name,!1,!1)),this.loadScript(t).catch(()=>Promise.resolve()))});await Promise.all(e)}}k=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(x.s)),(0,n.Qj)(1,(0,i.WQ)(P.v)),(0,n.Qj)(2,(0,i.WQ)(I.Tv)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===x.s?Object:x.s,void 0===P.v?Object:P.v,void 0===I.Tv?Object:I.Tv])],
6k)},9282:(e,t,r)=>{"use strict";var n=r(93570),i=r(76976);function o(e,t,r){i.call(this,e,t,r,{noCredentials:!0})}n(o,i),o.enabled=i.enabled,e.exports=o},9298:(e,t,r)=>{"use strict";r.d(t,{l:()=>o,x:()=>s});var n=r(8365);let i=()=>n.C.hasWindow()?window.requestIdleCallback||window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||(e=>setTimeout(e,0)):e=>e();function o(e,t,r){let o=r.value;if(o)return r.value=async function(...e){return n.C.hasWindow()?new Promise((t,r)=>{i()(async()=>{try{t(await o.apply(this,e))}catch(e){r(e)}})}):o.apply(this,e)},r}function s(e,t,r){let o=r.value;if(o)return r.value=function(...e){n.C.hasWindow()?i()(()=>{o.apply(this,e)}):o.apply(this,e)},r}},9324:(e,t,r)=>{"use strict";r.d(t,{D:()=>x});var n=r(4902),i=r(43604),o=r(68246),s=r(61564),a=r(7262),l=r(32128),c=r(51947),u=r(3472),d=r(22902),h=r(47785),p=r(97315),f=r(64688),g=r(64083),m=r(17671),v=r(9968),y=r(79347),b=r(23806),S=r(66555),E=r(75146),w=r(90125),_=r(41451),A=r(33353),T=r(71605),O=r(44189),C=r(15506),I=r(76369);let P="/file-manager/delete/";class x{get fileUploadsListChanged(){return this._fileUploadsListChanged.asObservable()}get fileUploadChanged(){return this._fileUploadChanged.asObservable()}constructor(e,t,r,n,i,s,a,l){this.http=e,this.apiConfig=t,this.storageService=r,this.uiContext=n,this.processCompleteCheckService=i,this.wsService=s,this.settingsService=a,this.metricsService=l,this.instanceId=Math.random().toString(36).substring(7),this.logger={error:(...e)=>console.log,trace7:(...e)=>console.log},this.fileUploadTrackers=[],this._fileUploadsListChanged=new o.m(1,1/0),this._fileUploadChanged=new o.m(1),this.convertTerminalEmitted=new Set,this.fileTrackerInitialized=!1,this.useWebsockets=!1,this.useTaskScheduling=!1,this.podTracker=null,this.pollMetrics=(e,t)=>{try{this.metricsService.emit(e,t)}catch{}},this.settingsService.featureFlags.subscribe(e=>{let t=this.useWebsockets;this.useWebsockets=e?.useWebsockets??!1,this.useTaskScheduling=e?.useTaskScheduling??!1,console.log("[FileManager] Settings loaded: useTaskScheduling=",this.useTaskScheduling,"useWebsockets=",this.useWebsockets),this.useTaskScheduling&&(this.ensurePodTracker(),this.migrateFilesToPodTracker()),this.useWebsockets&&!t&&this.initFileTrackingUsingWebSocket(),(!this.useWebsockets||this.useTaskScheduling)&&this.initFileTracker()})}initFileTrackingUsingWebSocket(){this.wsService.getWebsocketMessageObserver().subscribe({next:e=>{"FALLBACK_TO_POLLING"===e.type?this.switchToPolling():this.applyHistory(null,e,{mode:"websocket",pollFallback:!1})},error:e=>this.uiContext.handleError(e)})}switchToPolling(){this.useWebsockets=!1;let e=this.getFileUploads().filter(e=>!(e.isCompleted()||e.isFailed()));this.initFileTracker(),e.forEach(e=>{if(!this.getFileUploadTracker(e)){let t=p.FileUploadStatusTracker.createFromFileUpload(e);t&&(this.fileUploadTrackers.push(t),t.addFileUpload(e))}})}initFileTracker(){this.fileTrackerInitialized||(this.fileTrackerInitialized=!0,(0,s.Y)(1e3).subscribe(async()=>{let e=[];for(let t of this.fileUploadTrackers)t.isPollInFlight||e.push(t.replayHistory(this.http,(e,r)=>{this.applyHistory(e,r,{mode:"poll",pollFallback:t.isUsingEdgeFallback})},this.pollMetrics));await Promise.allSettled(e)}))}async removeFile(e){let t=!1;for(let r of this.fileUploadTrackers)r.hasFileUpload(e.id)&&(r.removeFileUpload(e.id),t=!0);t||console.error("File does not exist on any Tracker"),O.Ue.forget(e.id),this.notifyFileUploadsListChanged(),this.removeStoredFileUpload(e),this.removeRemoteFileAsync(e)}discardFileUpload(e){for(let t of this.fileUploadTrackers)t.hasFileUpload(e.id)&&t.removeFileUpload(e.id);O.Ue.forget(e.id),this.notifyFileUploadsListChanged(),this.removeStoredFileUpload(e)}removeStoredFileUpload(e){this.storageService.remove(_.N.FILE_UPLOAD_KEY_PREFIX,e.id)}removeRemoteFileAsync(e){(async()=>{try{try{for(let t of this.getFileDeleteUrls(e))try{await (0,a._)(this.http.get(t))}catch(t){this.logger.error({message:"Error while removing file from remote server",error:t,data:h.e.toLoggableObject(e)})}}catch(t){this.logger.error({message:"Error while getting URL for removing file from storage",error:t,data:h.e.toLoggableObject(e)})}}catch(t){this.logger.error({message:"Error while removing file from local storage",error:t,data:h.e.toLoggableObject(e)})}})()}removeFileUploadFromTracker(e,t){e.removeFileUpload(t),this.notifyFileUploadsListChanged()}notifyFileUploadsListChanged(){let e=this.getFileUploads();this._fileUploadsListChanged.next(e)}notifyFileUploadChanged(e){this._fileUploadChanged.next(e)}async removeAllFiles(e){for(let t of e)await this.removeFile(t)}getFileDeleteUrls(e){let t=e.endpointData.processorMetadataList[0],r=[t.downloadDomain,t.uploadDomain,t.processDomain];return(0,c.A)(r).map(t=>v.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(t)+P+e.id)}getFileUploads(){return(0,u.A)(this.fileUploadTrackers.map(e=>e.getFileUploads())).filter(e=>e)}getFileUploadsById(e){return this.getFileUploads().filter(t=>t.id===e)}migrateFilesToPodTracker(){if(this.podTracker){for(let e of this.fileUploadTrackers)if(e!==this.podTracker)for(let t of e.getFileUploads())this.podTracker.hasFileUpload(t.id)||this.podTracker.addFileUpload(t),e.removeFileUpload(t.id)}}ensurePodTracker(){return this.podTracker?(console.log("[FileManager] podTracker exists"),!0):(this.useTaskScheduling||this.settingsService.featureFlags.pipe((0,l.s)(1)).subscribe(e=>{this.useTaskScheduling=e?.useTaskScheduling??!1,console.log("[FileManager] ensurePodTracker sync read: useTaskScheduling=",this.useTaskScheduling)}),this.useTaskScheduling)?(console.log("[FileManager] Creating pod tracker for",this.apiConfig.podEndpoint),this.podTracker=p.FileUploadStatusTracker.createForPod(this.apiConfig.podEndpoint),this.fileUploadTrackers.push(this.podTracker),!0):(console.log("[FileManager] useTaskScheduling=false, skipping pod"),!1)}addFileUpload(e){this.addFileUploads([e])}addFileUploads(e){this.useWebsockets||this.initFileTracker(),e.forEach((e,t)=>{if(this.ensurePodTracker())console.log("[FileManager] Adding file to pod tracker:",e.id),this.podTracker.addFileUpload(e);else{console.log("[FileManager] Adding file to edge tracker:",e.id);let t=this.getFileUploadTracker(e);!t&&(t=p.FileUploadStatusTracker.createFromFileUpload(e))&&this.fileUploadTrackers.push(t),t&&t.addFileUpload(e)}}),this.notifyFileUploadsListChanged()}getFileUploadTracker(e){return this.fileUploadTrackers.find(t=>t.sameAs(e))}retrackFileUpload(e){for(let t of this.fileUploadTrackers)t.hasFileUpload(e.id)&&t.removeFileUpload(e.id);this.addFileUpload(e)}saveFileUploadToStorage(e){this.storageService.store(_.N.FILE_UPLOAD_KEY_PREFIX,e.id,e);let t=this.fileUploadTrackers.find(e=>!e.canTrack);
6t&&(t.getFileUploads()||[]).forEach(e=>{p.FileUploadStatusTracker.canCreateTrackedFileUploadTracker(e)&&(this.removeFileUploadFromTracker(t,e.id),this.addFileUpload(e))})}saveFileUploadToStorageWithoutRecomputingUntrackedFileUploads(e){this.storageService.store(_.N.FILE_UPLOAD_KEY_PREFIX,e.id,e)}checkStatus(e){if(!b.v.isOnline())return Promise.resolve(void 0);let t=(0,d.A)(e,"endpointData.processorMetadataList[0].processDomain",null)||null;return this.processCompleteCheckService.requestToSendFileCompleteDataThroughWS(t,e.id,!0).then(e=>(this.logger.trace7({message:"Check fileUpload status.",data:e}),e)).catch(e=>{this.logger.error({message:"Error checking fileUpload status.",error:e})})}applyHistory(e,t,r={mode:"websocket",pollFallback:!1}){let n=e&&[e]||this.getFileUploadsById(t.uuid);n&&n.length>0&&n.forEach(e=>{if(t.processStage===g.fl.COMPLETED||!t.eventId||!e._lastEventId||!(t.eventId<=e._lastEventId)){if(t.eventId&&(e._lastEventId=t.eventId),!e.discartWSReply){let r=t.processStage===g.fl.COMPLETED;if(e.result&&!e.result.error&&!r)return;e.ws=t,!e.result||e.result.error||r?(e.result=t.result&&JSON.parse(t.result),e.result?.processDomain&&e.endpointData?.processorMetadataList?.[0]&&(e.endpointData.processorMetadataList[0].processDomain=e.result.processDomain),e.result?.downloadDomain&&e.endpointData?.processorMetadataList?.[0]&&(e.endpointData.processorMetadataList[0].downloadDomain=e.result.downloadDomain),this.saveFileUploadToStorageWithoutRecomputingUntrackedFileUploads(e)):e.processEndTime||(e.processEndTime=new Date)}if(e&&e.result){let r=e.result;t.processStage===g.fl.COMPLETED&&t.processStageSubState===g.Gi.COMPLETED&&(e.processEndTime=r.end,e.processStartTime=r.start||e.processStartTime,this.saveFileUploadToStorage(e)),t.processStage===g.fl.ZIP&&(!e.zipResult||e.zipResult&&e.zipResult.processStageSubState!==g.Gi.COMPLETED)&&(e.zipResult=t,t.processStageSubState===g.Gi.COMPLETED&&this.saveFileUploadToStorageWithoutRecomputingUntrackedFileUploads(e))}O.Ue.has(e.id)&&(t.processStage===g.fl.COMPLETED?O.Ue.onCompleted(e.id):O.Ue.onProgress(e.id)),this.emitConvertTerminal(e,t,r),this.notifyFileUploadChanged(e)}})}emitConvertTerminal(e,t,r){try{if(t.processStage!==g.fl.COMPLETED&&t.processStageSubState!==g.Gi.FAILED||!e?.id||this.convertTerminalEmitted.has(e.id))return;let n=e.result,i=t.processStageSubState===g.Gi.FAILED||n?.error===!0;if(!i&&t.processStageSubState!==g.Gi.COMPLETED)return;this.convertTerminalEmitted.add(e.id);let o=this.metricsService.takeConvertStartMs(e.id),s={page:e.pageData?.path||e.uniqueProcessType||"",workflowId:String(n?.workflowId||e.id),mode:r.mode,pollFallback:r.pollFallback,source:(0,C.Wv)(e)?"studio":(0,I.zR)(n?.processingNotes)?"picker":"convert"};null!=o&&(s.ms=o),i&&(s.failureCode=String(n?.failureCode||"UNKNOWN")),this.metricsService.emit(i?f.O.CONVERT_ERROR:f.O.CONVERT_COMPLETE,s)}catch{}}stringifyAllUploadedFileUploads(){try{let e=[];return(this.getFileUploads()||[]).forEach(t=>{try{e.push(h.e.toLoggableObject(t))}catch(e){this.logger.error({message:"Failed to serialize a file upload",error:e})}}),m.e.safeStringify(e)}catch(e){this.logger.error({message:"Failed to serialize file uploads",error:e})}}}x=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(y.jo)),(0,n.Qj)(1,(0,i.WQ)(v.ApiConfig)),(0,n.Qj)(2,(0,i.WQ)(_.n)),(0,n.Qj)(3,(0,i.WQ)(A._)),(0,n.Qj)(4,(0,i.WQ)(E.a)),(0,n.Qj)(5,(0,i.WQ)(T.V)),(0,n.Qj)(6,(0,i.WQ)(w.h)),(0,n.Qj)(7,(0,i.WQ)(S.Z)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===y.jo?Object:y.jo,void 0===v.ApiConfig?Object:v.ApiConfig,void 0===_.n?Object:_.n,void 0===A._?Object:A._,void 0===E.a?Object:E.a,void 0===T.V?Object:T.V,void 0===w.h?Object:w.h,void 0===S.Z?Object:S.Z])],x)},9711:(e,t,r)=>{"use strict";r.d(t,{V:()=>o});var n=r(98683),i=r(4515);class o{static{this.cachedBrowserInfo=void 0}static{this.pendingLogs=[]}static getCachedBrowserInfo(){return void 0===o.cachedBrowserInfo&&o.loggerService&&(o.cachedBrowserInfo=o.loggerService.getBrowserInfo()),o.cachedBrowserInfo}static getLogger(e){return new o(e)}constructor(e){this.name=e}static setLoggerService(e){return o.loggerService=e}static setWSId(e){return o.wsId=e}
6static setSessionDetails(e){return o.sessionDetails=e}_log(e,t,r,s){let a=o.getCachedBrowserInfo();if(a?.type==="bot-device"||a?.bot)return;n.FO.DEBUG&&(e&&console.log(e),s&&console.error(s),r&&console.log(r));let l=s?.requestAcceptHeader,c=Object.assign({},this.getBaseObject(),{message:e,errorName:s?s.name:null,errorMessage:s?s.message:null,errorStack:s?s.stack:null,loggerName:this.name,level:i.C.logLevelToReadableString(t),sessionDetails:o.sessionDetails,browserDetails:a||null,url:window.location?.href,userTimestamp:`${new Date().toISOString()}`},null!=r?{data:r}:{},void 0!==l?{requestAcceptHeader:l}:{});o.loggerService?(o.flushPendingLogs(),o.loggerService.log(c)):(o.pendingLogs.push(c),n.FO.DEBUG&&console.log("LogService not ready, buffered:",e))}static flushPendingLogs(){if(0===o.pendingLogs.length)return;let e=o.pendingLogs;o.pendingLogs=[],e.forEach(e=>{e.browserDetails||(e.browserDetails=o.getCachedBrowserInfo()),o.loggerService.log(e)})}log(e,t){null==t?this._log("No message provided",e,null):"string"==typeof t||t instanceof String?this._log(t.toString(),e,null):t instanceof Error?this._log(t.message,e,null,t):this._log(t.message,e,t.data,t.error)}trace1(e){!e||"object"!=typeof e||e instanceof Error||e instanceof String||(e.message=e.message||"No message provided"),this.log(i.C.TRACE_1,e)}trace7(e){!e||"object"!=typeof e||e instanceof Error||e instanceof String||(e.message=e.message||"No message provided"),this.log(i.C.TRACE_7,e)}debug(e){!e||"object"!=typeof e||e instanceof Error||e instanceof String||(e.message=e.message||"No message provided"),this.log(i.C.DEBUG,e)}info(e){!e||"object"!=typeof e||e instanceof Error||e instanceof String||(e.message=e.message||"No message provided"),this.log(i.C.INFO,e)}warn(e){!e||"object"!=typeof e||e instanceof Error||e instanceof String||(e.message=e.message||"No message provided"),this.log(i.C.WARN,e)}error(e){!e||"object"!=typeof e||e instanceof Error||e instanceof String||(e.message=e.message||"No message provided"),this.log(i.C.ERROR,e)}fatal(e){!e||"object"!=typeof e||e instanceof Error||e instanceof String||(e.message=e.message||"No message provided"),this.log(i.C.FATAL,e)}getBaseObject(){return{wsId:o.wsId,date:new Date}}}},9737:(e,t,r)=>{"use strict";r.d(t,{B8:()=>m,BA:()=>c,DS:()=>d,Lr:()=>p,UR:()=>u,cB:()=>h,sC:()=>f,sM:()=>g});var n=r(64083),i=r(69870);let o=new Set(i.f9.map(e=>e.toLowerCase())),s=new Set(i.In.map(e=>e.toLowerCase())),a=new Set(i.Vf.map(e=>e.toLowerCase()));function l(e){return e.toLowerCase().replace(/^\./,"")}function c(e){let t=l(e);return t===n.HP.VIDEO.toLowerCase()||a.has(t)}function u(e){let t=l(e);return t===n.HP.AUDIO.toLowerCase()||s.has(t)}function d(e){let t=l(e);return t===n.HP.IMAGE.toLowerCase()||o.has(t)}function h(e){return e.some(e=>{let t=l(e);return t===n.HP.VIDEO.toLowerCase()||a.has(t)})}function p(e){return e.some(e=>{let t=l(e);return t===n.HP.AUDIO.toLowerCase()||s.has(t)})}function f(e){return e.some(e=>{let t=l(e);return t===n.HP.IMAGE.toLowerCase()||o.has(t)})}function g(e){let t=l(e);return a.has(t)?"video":s.has(t)?"audio":o.has(t)?"image":"unknown"}function m(e){return a.has(l(e))}},9968:(e,t,r)=>{"use strict";r.d(t,{ApiConfig:()=>l});var n=r(4902),i=r(43604),o=r(47500),s=r(78297),a=r(2807);class l{static{this.apiPathPrefix="/v1/api"}static{this.edgePathPrefix="/v2/edge"}static{this.fileViewPathPrefix="/downloads"}static{this.localhostDomainName="127.0.0.1"}get apiDomainName(){return this.envService&&this.envService.apiDomainname()}get podDomainName(){return this.envService&&this.envService.podDomainname()}get apiSubdomain(){return"api-v1"}get qaApiSubdomain(){return"qa-api-v1"}get subdomainPrefixForNCF(){return"ncf-"}get podSubdomain(){return"pod"}get qaPodSubdomain(){return"qa-pod"}get QA_API_ENDPOINT_1(){return`https://qa-1.${this.apiDomainName}`}get QA_WS_ENDPOINT_3(){return`https://qa-2.${this.apiDomainName}`}constructor(e){this.envService=e,this.apiEndpoint=null,this.podEndpoint=null,this.apiEndpoint=`https://${this.apiSubdomain}.${this.apiDomainName}`,this.podEndpoint=`https://${this.podSubdomain}.${this.podDomainName}`;try{(0,s.jD)()?(this.apiEndpoint="",this.podEndpoint=(0,s.ci)(`${this.qaPodSubdomain}.${this.podDomainName}`)):l.isLocalhost()||this.envService.env.dev?(this.apiEndpoint=`https://${this.envService.env.localhostAPIDomain}`,this.podEndpoint=`https://${this.envService.env.localhostPODDomain}`):l.isQA()&&(this.apiEndpoint=`https://${this.qaApiSubdomain}.${this.apiDomainName}`,this.podEndpoint=`https://${this.qaPodSubdomain}.${this.podDomainName}`)}catch(e){console.error("Suppressed ApiConfig constructor error: "+e.message)}}getLogoutEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/logout`}getLoginEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/login`}getRefreshEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/refresh`}getReauthEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/reauth`}getAuthenticateEndpoint(){return`${this.getApiHttpsDomain()}${l.apiPathPrefix}/auth/authenticate`}getWebSocketEndpoint(e){let t=this.envService.env?.qa||l.isQA(),r
6=this.envService.env?.dev||!1;return l.isLocalhost()||r||t?`${this.getApiWSQADomains()}${l.apiPathPrefix}/servers/resolve/ws-domain`:`${this.getApiWSProductionDomains()}${l.apiPathPrefix}/servers/resolve/ws-domain`}getHttpsEndpoint(e){return this.envService.env?.qa||l.isQA()?this.getQAApiHttpsDomain():`${this.getApiHttpsDomain()}${l.apiPathPrefix}`}static originForDomain(e){return(0,s.jD)()?(0,s.ci)(e):o.r.toHttpsProtocol(e)}static suffixDomainWithHttpsEdgeEndpoint(e){return`${l.originForDomain(e)}${l.edgePathPrefix}`}static suffixDomainWithHttpsViewEndpoint(e){return`${l.originForDomain(e)}${l.fileViewPathPrefix}`}static isLocalhost(){try{return window.location.host.startsWith("localhost")}catch{return!1}}static isQA(){try{let e=window.location.host;return e.startsWith("qa")||e.startsWith("ncf-qa")}catch{return!1}}getApiHttpsDomain(){return this.apiEndpoint}getQAApiHttpsDomain(){return`${this.QA_API_ENDPOINT_1}${l.apiPathPrefix}`}getApiWSQADomains(){return this.apiEndpoint}getApiWSProductionDomains(){return this.apiEndpoint}getQAApiWSDomains(){return this.QA_WS_ENDPOINT_3}getPaymentsPayEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/payments/pay`}getPaymentsConfirmStripeEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/payments/confirm-stripe`}getPaymentsPayPalEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/payments/pay-paypal`}getCancelPaymentsEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/payments/cancel`}getRegisterEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/register`}getEmailValidateEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/validate-email`}getUserDetailsEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/user-details`}getRecoverPasswordEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/recover-password`}getResetPasswordEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/reset-password`}getAccountVerifyEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/verify`}getProcessAuthEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/auth/authorize-request`}getSupportEmailEndpoint(){return this.podEndpoint+`${l.edgePathPrefix}/comm/captcha_validate`}getHistoryTrackEndpoint(){return this.podEndpoint+`${l.edgePathPrefix}/comm/history-track/v2`}getUserTraceEndpoint(){return this.podEndpoint+`${l.edgePathPrefix}/users/trace`}getVersionCheckEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/settings/web_version`}getAdminWorkflowSearchEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/admin/workflows/search`}getAdminWorkflowRecreateEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/admin/workflows/${e}/recreate`}getUploadAndProcessEndpointResolveEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/servers/resolve`}getScheduleTaskEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/tasks/schedule`}generateFileId(){return this.apiEndpoint+`${l.apiPathPrefix}/uploads/new-file-id`}getUserSettingsEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/settings`}getFeatureSearchEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/search/features?q=${encodeURIComponent(e)}`}getMetricsEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/metrics/events`}getUserAnalyticsSaveEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/comm/analytics`}getMotiveStatEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/comm/motive`}getGlobalStatsEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/stats/global`}getApiKeysEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/portal/api-keys`}getDevicesEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/portal/devices`}getRevokeDeviceEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/portal/devices/revoke`}getConversionHistoryEndpoint(e,t,r,n){let i=this.apiEndpoint+`${l.apiPathPrefix}/portal/conversion-history`,o=[];return e&&o.push(`source=${encodeURIComponent(e)}`),t&&o.push(`limit=${t}`),r&&o.push(`from=${encodeURIComponent(r)}`),n&&o.push(`until=${encodeURIComponent(n)}`),o.length>0?`${i}?${o.join("&")}`:i}getMeBillingEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing`}getMeBillingHistoryEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/history`}getMeBillingUsageEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/usage`}getMeBillingGrantsEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/grants`}getMeBillingExportJsonEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/export.json`}getMeBillingExportCsvEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/export.csv`}getMeBillingTopupEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/topup`}getMeBillingTopupPacksEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/topup/packs`}getMeBillingApiSubscriptionEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/api-subscription`}getMeBillingApiSubscriptionPlansEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/api-subscription/plans`}getMeBillingApiSubscriptionCancelEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/api-subscription/cancel`}getMeBillingWebsitePlansEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/website-plans`}getUsageLast7DaysEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/me/billing/usage-7day`}getAdminUserBillingOverviewEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/admin/users/${encodeURIComponent(e)}/billing`}getAdminUserBillingGrantEntitlementEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/admin/users/${encodeURIComponent(e)}/billing/grant-entitlement`}getAdminUserBillingRevokeEntitlementEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/admin/users/${encodeURIComponent(e)}/billing/revoke-entitlement`}getAdminUserBillingGrantCreditsEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/admin/users/${encodeURIComponent(e)}/billing/grant-credits`}getAdminBillingGrantBulkEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/admin/billing/grant-bulk`}getAdminBillingValidateEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/admin/billing/validate/${encodeURIComponent(e)}`}getApiKeyByIdEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/portal/api-keys/${encodeURIComponent(e)}`}getApiKeyRotateEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/portal/api-keys/${encodeURIComponent(e)}/rotate`}getApiKeyRevokeEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/portal/api-keys/${encodeURIComponent(e)}/revoke`}getWebhookEndpointsEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/portal/webhook-endpoints`}getWebhookEndpointByIdEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/portal/webhook-endpoints/${encodeURIComponent(e)}`}getWebhookEndpointRotateSecretEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/portal/webhook-endpoints/${encodeURIComponent(e)}/rotate-secret`}getWebhookEndpointResumeEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/portal/webhook-endpoints/${encodeURIComponent(e)}/resume`}getWebhookEndpointAckSecretEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/portal/webhook-endpoints/${encodeURIComponent(e)}/acknowledge-secret`}getWebhookDeliveriesEndpoint(e){let t=this.apiEndpoint+`${l.apiPathPrefix}/portal/webhook-deliveries`;return e?`${t}?endpointId=${encodeURIComponent(e)}`:t}getWebhookDeliveryRedeliverEndpoint(e){return this.apiEndpoint+`${l.apiPathPrefix}/portal/webhook-deliveries/${encodeURIComponent(e)}/redeliver`}getBulkZipBaseEndpoint(){return this.apiEndpoint+`${l.apiPathPrefix}/bulk-zip`}}l=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a.v)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.v?Object:a.v])],l)},10009:e=>{"use strict";function t(e){this.type=e}t.prototype.initEvent=function(e,t,r){return this.type=e,this.bubbles=t,this.cancelable=r,this.timeStamp=+new Date,this},t.prototype.stopPropagation=function(){},t.prototype.preventDefault=function(){},t.CAPTURING_PHASE=1,t.AT_TARGET=2,t.BUBBLING_PHASE=3,e.exports=t},10020:(e,t,r)=>{"use strict";e.exports={isOpera:function(){return r.g.navigator&&/opera/i.test(r.g.navigator.userAgent)},isKonqueror:function(){return r.g.navigator&&/konqueror/i.test(r.g.navigator.userAgent)},hasDomain:function(){if(!r.g.document)return!0;try{return!!r.g.document.domain}catch(e){return!1}}}},10441:(e,t,r)=>{var n=r(36187);e.exports=function(e){return n(this.__data__,e)>-1}},10479:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(72747);let i=function(e){return(0,n.A)(e)&&e!=+e}},10793:()=>{},11002:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(76611),i=r(56634),o=r(4527),s=r(86702),a=1/0,l=n.A?n.A.prototype:void 0,c=l?l.toString:void 0;function u(e){if("string"==typeof e)return e;if((0,o.A)(e))return(0,i.A)(e,u)+"";if((0,s.A)(e))return c?c.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}let d=u,h=function(e){return null==e?"":d(e)}},11027:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return -1}},11396:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e,t){return e===t||e!=e&&t!=t}},12316:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});var n=r(21523),i=Math.floor,o=Math.random;let s=function(e,t){return e+i(o()*(t-e+1))},a=function(e,t){var r=-1,n=e.length,i=n-1;for(t=void 0===t?n:t;++r<t;){var o=s(r,i),a=e[o];e[o]=e[r],e[r]=a}return e.length=t,e},l=function(e){return a((0,n.A)(e))};var c=r(89216);let u=function(e){return a((0,c.A)(e))};var d=r(4527);let h=function(e){return((0,d.A)(e)?l:u)(e)}},12533:(e,t,r)=>{"use strict";r.d(t,{FJ:()=>a,Mb:()=>l,hC:()=>s});var n=r(83503),i=r(66338);let o=60;function s(e){if(!e)return!0;try{let{exp:t}=(0,n.i)(e);if(!t)return!0;return t<=(0,i.RV)()+o}catch{return!0}}function a(e){if(!e)return!1;try{return"undefined"===(0,n.i)(e).email}catch{return!1}}function l(e){if(!e)return null;try{let{exp:t}=(0,n.i)(e);return t??null}catch{return null}}},12610:(e,t,r)=>{"use strict";r.d(t,{A:()=>R});var n=r(21710),i=r(48710),o=r(75438),s="[object Arguments]",a="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",h="[object Map]",p="[object Number]",f="[object Object]",g="[object RegExp]",m="[object Set]",v="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",S="[object DataView]",E="[object Float64Array
6]",w="[object Int8Array]",_="[object Int16Array]",A="[object Int32Array]",T="[object Uint8Array]",O="[object Uint8ClampedArray]",C="[object Uint16Array]",I="[object Uint32Array]",P={};P["[object Float32Array]"]=P[E]=P[w]=P[_]=P[A]=P[T]=P[O]=P[C]=P[I]=!0,P[s]=P[a]=P[b]=P[l]=P[S]=P[c]=P[u]=P[d]=P[h]=P[p]=P[f]=P[g]=P[m]=P[v]=P[y]=!1;let x=function(e){return(0,o.A)(e)&&(0,i.A)(e.length)&&!!P[(0,n.A)(e)]};var k=r(99809),M=r(43091),D=M.A&&M.A.isTypedArray;let R=D?(0,k.A)(D):x},13674:(e,t,r)=>{var n=r(17099);e.exports=function(){this.__data__=new n,this.size=0}},13909:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(95528),i=r(76611),o=r(50076),s=r(4527),a=i.A?i.A.isConcatSpreadable:void 0;let l=function(e){return(0,s.A)(e)||(0,o.A)(e)||!!(a&&e&&e[a])};function c(e,t,r,i,o){var s=-1,a=e.length;for(r||(r=l),o||(o=[]);++s<a;){var u=e[s];t>0&&r(u)?t>1?c(u,t-1,r,i,o):(0,n.A)(o,u):i||(o[o.length]=u)}return o}let u=c},14103:(e,t,r)=>{"use strict";r.d(t,{G:()=>n});var n=(0,r(78204).L)(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})},14188:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e){return e}},14216:e=>{e.exports=function(){this.__data__=[],this.size=0}},14364:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=/\s/;let i=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t};var o=/^\s+/;let s=function(e){return e?e.slice(0,i(e)+1).replace(o,""):e};var a=r(83497),l=r(86702),c=0/0,u=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,h=/^0o[0-7]+$/i,p=parseInt;let f=function(e){if("number"==typeof e)return e;if((0,l.A)(e))return c;if((0,a.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var r=d.test(e);return r||h.test(e)?p(e.slice(2),r?2:8):u.test(e)?c:+e}},14659:(e,t,r)=>{"use strict";r.d(t,{h:()=>l});var n=r(74588),i=r(2943),o=r(56706),s=r(67375),a=r(6155);function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,s.lI)(e),l=(0,s.R0)(e,1/0),c=e;return c.length?1===c.length?(0,i.Tg)(c[0]):(0,n.U)(l)((0,a.H)(c,r)):o.w}},15365:(e,t,r)=>{"use strict";r.d(t,{E:()=>h});var n=r(48393),i=r(28663),o=r(44013),s=r(48348),a=r(78304),l=r(84147),c=r(69014),u=Object.prototype.hasOwnProperty;let d=(0,s.A)(function(e,t){if((0,l.A)(t)||(0,a.A)(t))return void(0,o.A)(t,(0,c.A)(t),e);for(var r in t)u.call(t,r)&&(0,i.A)(e,r,t[r])});class h{constructor(e,t){this.processorMetadataList=e,this.file=t}getProcessorMetadata(e){return this.processorMetadataList[e]}getProcessorMetadataList(){return this.processorMetadataList}replceProcessMetadataWithPostProcessMetadata(e){let t=this.processorMetadataList[e],r=(0,n.A)(t.postProcessMetadata);d(t,r)}getFile(){return this.file}}},15506:(e,t,r)=>{"use strict";r.d(t,{Kk:()=>d,Wv:()=>u,eJ:()=>f,eR:()=>p,gI:()=>l,z8:()=>h});var n=r(89099),i=r.n(n),o=r(68459),s=r(34753),a=r(94242);function l(e){let t=e?.options;if("string"==typeof t)try{t=JSON.parse(t)}catch{return null}if(!t||"object"!=typeof t)return null;let r=t.composition;return!r||"object"!=typeof r||Array.isArray(r)?null:r}function c(e){return l(e)}function u(e){return null!==c(e)}function d(e){let t=c(e)?.projectId;return"string"==typeof t&&(0,o.pz)(t)?t:null}function h(e,t){let r=d(e);if(!r)return null;let n=e?.pageData?.path||e?.uniqueProcessType;return n?`/${n}?tab=${a.bF}&sid=${encodeURIComponent(r)}${t?`&src=${t}`:""}`:null}function p(e,t=Date.now()){let r=d(e);if(!r)return!1;try{return null!==(0,s.Wh)(r,t)}catch{return!1}}function f(e,t){let r=h(e,t);if(!r)return!1;try{return i().push(r),!0}catch{return!1}}},15744:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},15750:(e,t,r)=>{"use strict";r.d(t,{G:()=>m});var n=r(4902),i=r(3466),o=r(43604),s=r(81334),a=r.n(s),l=r(41946),c=r.n(l),u=r(30598),d=r.n(u),h=r(9711),p=r(18291),f=r(41451);let g="LAST_SAVED_WEBSOCKET_MESSAGE_ID";class m{get sessionId(){return this._sessionId}constructor(e){this.storageService=e,this.logger=h.V.getLogger("SocketJSService"),this._sessionId=p.$.getRandomString(),this.lastMessageReceivedTime=new Date,this.isProcessingMessages=!1}setupAutoClientResponse(){}sendMessage(e){this.lastMessageReceivedTime=new Date,this.stompClient?.connected&&this.stompClient.publish({destination:`/app/${this.wsId}/client-responses`,body:JSON.stringify(e)})}sendNextMessage(){this.lastMessageReceivedTime=new Date,this.stompClient?.connected&&this.stompClient.publish({destination:`/app/${this.wsId}/client-responses`,body:JSON.stringify({latestMessageIds:this.lastMessageIds,wsId:this.wsId,sessionId:this.sessionId})})}connect(e,t,r){this.isConnected||(this.restoreLastReceivedMessageIdsFromStorage(),this.logger.debug("SockJS connect called."),this.disconnect(),this.messageReceiver=r,this.wsId=t,this.wsDomain=e,this.initializeStompClientWithSockJS(),this.setupAutoClientResponse())}initializeStompClientWithSockJS(){let e=`${this.wsDomain}/api/notifications/user`;this.stompClient=i.q.over(()=>(this.socket=new(d())(e,null,{transports:["websocket","xhr-polling"]}),this.socket)),this.stompClient.debug=()=>{}
6,this.stompClient.reconnectDelay=0,this.connectStompClient(),this.stompClient.onDisconnect=()=>{this.logger.debug("SockJS onDisconnect called. Reconnecting"),this.clearReconnectInterval(),this.recInterval=setInterval(()=>{this.connectStompClient()},2e3)}}clearReconnectInterval(){this.recInterval&&(clearInterval(this.recInterval),this.recInterval=null)}connectStompClient(){this.stompClient.connect({},e=>{this.clearReconnectInterval(),this.logger.debug("Stomp client is connected: "+e),this.stompClient.subscribe(`/topic/messages/${this.wsId}/${this.sessionId}`,e=>{this.processReceivedMessage(e),this.sendNextMessage()}),this.sendNextMessage()})}processReceivedMessage(e){this.isProcessingMessages=!0;try{let t=JSON.parse(e.body);this.lastMessages=t||[],this.saveLastMessageIds(this.lastMessages),this.messagesData=(t||[]).map(e=>JSON.parse(e?.jsonStringifiedMessageContent)).filter(e=>e),this.saveLastReceivedMessageId(),this.messagesData.forEach(e=>this.messageReceiver(e))}catch(e){this.logger.error({message:"Error was thrown while decoding Stomp client message.",error:e})}this.isProcessingMessages=!1}saveLastMessageIds(e){let t=e.sort((e,t)=>new Date(t.createdDate).getTime()-new Date(e.createdDate).getTime()),r=t.map(e=>e.messageId).filter(e=>e);if(c()(r,this.lastMessageIds)){let e=t[0].messageId;this.lastMessageIds=[e]}else this.lastMessageIds=r}get isConnected(){return this.stompClient?.connected??!1}disconnect(){this.logger.debug("SockJS disconnect called"),this.stompClient?.disconnect(),this.socket?.close()}restoreLastReceivedMessageIdsFromStorage(){let e=g,t=f.N.USER_SETTING_KEY_PREFIX,r=this.storageService.get(t,e)??void 0;this.lastMessageIds=a()(r).filter(e=>e)}saveLastReceivedMessageId(){this.storageService.store(f.N.USER_SETTING_KEY_PREFIX,g,this.lastMessageIds)}}m=(0,n.Cg)([(0,o._G)(),(0,n.Qj)(0,(0,o.WQ)(f.n)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===f.n?Object:f.n])],m)},16006:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return f}});let n=r(64252)._(r(14232)),i=r(72936);function o(e){return e&&e.default?e.default:e}let s=[],a=[],l=!1;function c(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}function u(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),s=null;function c(){if(!s){let t=new d(e,r);s={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return s.promise()}if(!l){let e=r.webpack&&1?r.webpack():r.modules;e&&a.push(t=>{for(let r of e)if(t.includes(r))return c()})}function u(){c();let e=n.default.useContext(i.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}function h(e,t){u();let i=n.default.useSyncExternalStore(s.subscribe,s.getCurrentValue,s.getCurrentValue);return n.default.useImperativeHandle(t,()=>({retry:s.retry}),[]),n.default.useMemo(()=>i.loading||i.error?n.default.createElement(r.loading,{isLoading:i.loading,pastDelay:i.pastDelay,timedOut:i.timedOut,error:i.error,retry:s.retry}):i.loaded?n.default.createElement(o(i.loaded),e):null,[e,i])}return h.preload=()=>c(),h.displayName="LoadableComponent",n.default.forwardRef(h)}class d{constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e}
6,this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}}function h(e){return u(c,e)}function p(e,t){let r=[];for(;e.length;){let n=e.pop();r.push(n(t))}return Promise.all(r).then(()=>{if(e.length)return p(e,t)})}h.preloadAll=()=>new Promise((e,t)=>{p(s).then(e,t)}),h.preloadReady=(e=[])=>new Promise(t=>{let r=()=>(l=!0,t());p(a,e).then(r,r)}),window.__NEXT_PRELOADREADY=h.preloadReady;let f=h},16127:(e,t,r)=>{"use strict";r.d(t,{Ch:()=>P,Vw:()=>O,gN:()=>T,j:()=>w,oF:()=>_,ov:()=>C,r5:()=>A,zT:()=>I});var n=r(6992),i=r(88988),o=r(7566);let s=.45,a=.15,l=.7,c=e=>{if(!e||"string"!=typeof e)return null;let t=e.split("::");if(2!==t.length)return null;let r=parseFloat(t[0]);if(!isFinite(r)||r<=0)return null;let n=t[1];return"MEGABYTES"===n||"MB"===n?1e3*r*1e3:"KILOBYTES"===n||"kB"===n||"KB"===n?1e3*r:r},u=e=>e>=s?"Likely ✓":e>=a?"Best-effort ⚠":"Aggressive \uD83D\uDD34",d={PRESET_DISCORD:1e7,PRESET_EMAIL:25e6,PRESET_FORUM:2e6},h=[{severity:"green",minFraction:.7,marker:"\uD83D\uDFE2",label:"light compression"},{severity:"yellow",minFraction:.45,marker:"\uD83D\uDFE1",label:"moderate compression"},{severity:"red",minFraction:0,marker:"\uD83D\uDD34",label:"strong compression"}],p="<div><strong>Per file:</strong></div>",f=" (GIFs store every frame — much larger than video)",g="<div>GIFs store every frame, so a GIF is much larger than its source video.</div>",m=' <span class="gif-estimate-refining">refining estimate… (~10 s)</span>',v='<span class="gif-estimate-refining">estimating GIF size…</span>',y=" — already under your max ✓",b=e=>` (for good quality allow ≥ ${e})`,S=e=>h.find(t=>e>=t.minFraction)??h[h.length-1],E=(e,t)=>{switch(e.sizeLimit){case"CUSTOM_SIZE_PERCENT":{let r=Number(e.sizePercentage);if(!isFinite(r)||r<=0||"number"!=typeof t||!isFinite(t)||t<=0)return null;return Math.round(r/100*t)}case"CUSTOM_SIZE_VALUE":return c(e.fileSize);default:return e.sizeLimit?d[e.sizeLimit]??null:null}},w=(e,t)=>{let r=t??[],n=e??[];if(0===n.length)return r;let i=new Set(r.map(e=>e.file)),o=new Set(r.map(e=>{let t=e.getFile?e.getFile():e.file;return t?`${t.name}::${t.size}`:""}));return[...n.filter(e=>{if(i.has(e.file))return!1;let t=e.getFile?e.getFile():e.file;return!(t&&o.has(`${t.name}::${t.size}`))}),...r]},_=e=>{try{let t=e?.results??{};if("MAX_FILE_SIZE"!==t.compression)return"";let r=t.sizeLimit,n="CUSTOM_SIZE_PERCENT"===r,s=null;if(n){let e=Number(t.sizePercentage);if(!isFinite(e)||e<=0)return""}else if(s=E(t,1),null===s)return"";let a=n?`${Number(t.sizePercentage)}% of source size`:(0,i._6)(s),l="<div>Best effort — we aim just under your max. For very complex files the smallest good-quality output may come out larger; we'll tell you if that happens.</div><div>Max-size mode runs several encodes — large files can take a few minutes.</div>",c=e.uploadInProgressFiles;if(!c||0===c.length){let e=n&&Number(t.sizePercentage)>100;return p+`<div>Each file will be capped at ${a}.`+(e?" A GIF stores every frame, so it lands well above the size of the video it came from — the cap is a share of that larger GIF.":"")+" Add files to see per-file estimates and quality verdicts.</div>"+l}let u=h[0],d=c.length>1,w=0,_=0,A=!0,T=!1,O=[],C=c.map(e=>{let r,n=e.getFile(),s=n&&n.name||"file",l=n&&n.size>0?n.size:void 0,c=(0,o.oR)(s);"video"!==c&&(A=!1);let h=E(t,l),p=null!==h?(0,i._6)(h):a,g=o.y_.get(e.id),C="gif"===c?l:"video"===c?(0,o.Vy)(g):void 0;if(null===h||void 0===C||C<=0){if("video"===c){let e=l?`video ${(0,i._6)(l)} → `:"";return`<li><b>${s}</b>: ${e}${v} \xb7 max ${p}</li>`}return`<li><b>${s}</b>: max ${p}</li>`}let I=(0,i._6)(C),P="video"===c&&g&&g.stage<2?m:"";if("video"===c){T=!0;let e=l?`video ${(0,i._6)(l)} → `:"";r=`${e}GIF ≈ ${I}${d?"":f}`}else r=`original ${I}`;if(g?.floorSize&&h<g.floorSize){let e=(0,i._6)(g.floorSize),t=d?`<b>${s}</b>: `:"";O.push(`<div class="mt-2 fw-semibold text-danger">${t}${p} is below what this file can reach with acceptable quality (~${e}) — we'll get as close as possible.</div>`)}if(h>=C)return`<li><b>${s}</b>: ${r}${y}${P}</li>`;let x=h/C,k=S(x);"red"===k.severity?w++:"yellow"===k.severity&&_++;let M=k.marker;"video"===c&&g&&(g.stage<2?M=`<span class="gif-estimate-provisional gif-estimate-pulse">${k.marker}</span>`:g.quickOnly&&(M=`<span class="gif-estimate-provisional">${k.marker}</span>`));let D=Math.round(100*x);if("video"===c){let e="green"!==k.severity?b((0,i._6)(u.minFraction*C)):"";return`<li><b>${s}</b>: ${r} \xb7 your max ${p} keeps ${D}% → ${k.label} ${M}${e}${P}</li>`}return`<li><b>${s}</b>: ${r} → max ${p} (${D}%) → ${k.label} ${M}${P}</li>`}).join(""),I=p;if(d&&T&&(I+=g),I+=`<ul>${C}</ul>`,d&&w>0){let e=A?"videos":"files";I+=`<div class="mt-2 fw-semibold text-danger">${w} of ${c.length} ${e} will lose significant quality at ${a}
6.</div>`}if(d&&_>0){let e=A?"videos":"files";I+=`<div class="mt-2 fw-semibold">${_} of ${c.length} ${e} may lose some quality at ${a}.</div>`}return I+=O.join(""),I+=l}catch(e){console.error(e)}return""},A=e=>{try{let t=e?.results??{};if("MAX_FILE_SIZE"===t.compression)return _(e);if("FILE_SIZE_EXACT_WITH_AUTO_SCALE"!==t.compression)return"";let r=e.uploadInProgressFiles;if(!r||0===r.length)return"<div><strong>Target size per file:</strong></div><div>Add a GIF to see its current size and how far your target is from it. As a guide: a 5 MB GIF targeted at 3.5 MB (70%) usually looks unchanged; targeted at 1.5 MB (30%) expect fewer colors, smaller dimensions or fewer frames.</div><div>Target mode runs several encodes — large GIFs can take a few minutes.</div>";let i=c(t.fileSize);if(null===i)return"";let s=!1,a=r.map(e=>{let t=e.getFile(),r=t&&t.name||"file",a=t?t.size:0,c=n.ik.toReadableBytes(i,"quantity");if(!a||a<=0)return`<li><b>${r}</b>: target ${c}</li>`;let d=(r.split(".").pop()||"").toLowerCase();if(o.Sb.includes(d)){let e=Math.round(4.9*a),t=n.ik.toReadableBytes(e,"quantity");if(i>=e)return`<li><b>${r}</b>: estimated GIF ≈ ${t} (videos grow when converted to GIF) — likely already under target</li>`;let o=i/e,d=u(o);return o<l&&(s=!0),`<li><b>${r}</b>: estimated GIF ≈ ${t} → ${c} (${Math.round(100*o)}% of estimate) — ${d}</li>`}let h=n.ik.toReadableBytes(a,"quantity");if(i>=a)return`<li><b>${r}</b>: ${h} — already under target — output will simply be optimized</li>`;let p=i/a,f=Math.round(100*p),g=u(p);return p<l&&(s=!0),`<li><b>${r}</b>: ${h} → ${c} (${f}% of original) — ${g}</li>`}).join(""),d=`<div><strong>Target size per file:</strong></div><ul>${a}</ul><div>Target mode runs several encodes — large GIFs can take a few minutes.</div>`;return s&&(d+='<div class="mt-2 fw-semibold text-danger">Targets below 70% of the original usually change how the GIF looks (fewer colors, smaller dimensions, or fewer frames). We\'ll disclose exactly what changed on the result.</div>'),d}catch(e){console.error(e)}return""},T=(e,t)=>{if(0==e||!t||0==t.length)return"";try{let r=Number(e);return"<ul>"+t.map(e=>{let t=e.getFile(),i=t.size,o=i*(r/100)**2,s=n.ik.toReadableBytes(o,"quantity"),a=t.name,l=n.ik.toReadableBytes(i,"quantity");return`<li><b>${a}</b> will reduce from ${l} to ${s}</li>`}).join("")+"</ul>"}catch(e){console.error(e)}return""},O=(e,t)=>{if(0==e||!t||0==t.length)return"";try{return`Target Size: ${e}% of Original <br/>`+t.map(t=>{let r=t.getFile(),i=r.name,o=n.ik.toReadableBytes(r.size,"quantity"),s=n.ik.toReadableBytes(r.size*e/100,"quantity");return`- <b>${i}:</b> Will reduce from ${o} to ${s} (${e}% of original)`}).join("<br/>")}catch(e){console.error(e)}return""},C=(e,t)=>"seconds"!==t||e.match(/^\d+(\.\d{1,3}){0,1}$/)?"formated_time"!==t||e.match(/^(\d{1,2}:){0,2}(\d{1,2})(\.\d{1,3}){0,1}$/)?null:`Accepted value examples i.e 23 (for 23 seconds) \
7            or 23.453 for (23 seconds and 453 milliseconds)
8            or 12:23.453 for (12 minutes 23 seconds and 453 milliseconds)
9            or 3:1:23.453 for (3 hours 1 minute 23 seconds and 453 milliseconds)`:"Accepted value examples i.e 23 (for 23 seconds)             or 23.453 for (23 seconds and 453 milliseconds)",I=e=>{if(e.formCategories){let t=e.formCategories.find(e=>"outputExt"===e.category),r=t&&t.formGroups[0];return r?r.selections.find(e=>e.selected).formValue:null}return null},P=(e,t,r)=>{let n=e.formCategories.find(e=>e.category===t);if(n){let e=n.formGroups.find(e=>e.formGroupName===r);if(e){let t=e.selections.find(e=>e.selected);if(t)return t.formValue;for(let t of e.selections)if(t.formChildren){for(let e of t.formChildren)if(e.formGroup&&e.formGroup.selections){let t=e.formGroup.selections.find(e=>e.selected);if(t)return t.formValue}}}}return null}},16233:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(82509);let i=function(e,t){return!!(null==e?0:e.length)&&(0,n.A)(e,t,0)>-1}},16257:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},16579:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var n=r(86728),i=r(77698);function o(e,t){var r=(0,i.T)(e)?e:function(){return e}
9,o=function(e){return e.error(r())};return new n.c(t?function(e){return t.schedule(o,0,e)}:o)}},16791:(e,t,r)=>{var n;!function(e){!function(t){var n="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:l(),i=o(e);function o(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}function s(){try{return Function("return this;")()}catch(e){}}function a(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}function l(){return s()||a()}void 0!==n.Reflect&&(i=o(n.Reflect,i)),t(i,n),void 0===n.Reflect&&(n.Reflect=e)}(function(e,t){var r=Object.prototype.hasOwnProperty,n="function"==typeof Symbol,i=n&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=n&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,a=({__proto__:[]})instanceof Array,l=!s&&!a,c={create:s?function(){return et(Object.create(null))}:a?function(){return et({__proto__:null})}:function(){return et({})},has:l?function(e,t){return r.call(e,t)}:function(e,t){return t in e},get:l?function(e,t){return r.call(e,t)?e[t]:void 0}:function(e,t){return e[t]}},u=Object.getPrototypeOf(Function),d="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:Y(),h="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:Z(),p="function"==typeof WeakMap?WeakMap:ee(),f=n?Symbol.for("@reflect-metadata:registry"):void 0,g=q(),m=K(g);function v(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!C(n)&&!I(n)){if(!j(n))throw TypeError();t=n}}return t}function y(e,t,r,n){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,r,n);if(!C(o)&&!I(o)){if(!x(o))throw TypeError();n=o}}return n}function b(e,t,r){if(S(e,t,r))return!0;var n=V(t);return!I(n)&&b(e,n,r)}function S(e,t,r){var n=J(t,r,!1);return!C(n)&&D(n.OrdinaryHasOwnMetadata(e,t,r))}function E(e,t,r){if(S(e,t,r))return w(e,t,r);var n=V(t);if(!I(n))return E(e,n,r)}function w(e,t,r){var n=J(t,r,!1);if(!C(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function _(e,t,r,n){J(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function A(e,t){var r=T(e,t),n=V(e);if(null===n)return r;var i=A(n,t);if(i.length<=0)return r;if(r.length<=0)return i;for(var o=new h,s=[],a=0,l=r;a<l.length;a++){var c=l[a],u=o.has(c);u||(o.add(c),s.push(c))}for(var d=0,p=i;d<p.length;d++){var c=p[d],u=o.has(c);u||(o.add(c),s.push(c))}return s}function T(e,t){var r=J(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function O(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function C(e){return void 0===e}function I(e){return null===e}function P(e){return"symbol"==typeof e}function x(e){return"object"==typeof e?null!==e:"function"==typeof e}function k(e,t){switch(O(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",n=B(e,i);if(void 0!==n){var o=n.call(e,r);if(x(o))throw TypeError();return o}return M(e,"default"===r?"number":r)}function M(e,t){if("string"===t){var r=e.toString;if(L(r)){var n=r.call(e);if(!x(n))return n}var i=e.valueOf;if(L(i)){var n=i.call(e);if(!x(n))return n}}else{var i=e.valueOf;if(L(i)){var n=i.call(e);if(!x(n))return n}var o=e.toString;if(L(o)){var n=o.call(e);if(!x(n))return n}}throw TypeError()}function D(e){return!!e}function R(e){return""+e}function F(e){var t=k(e,3);return P(t)?t:R(t)}function N(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function L(e){return"function"==typeof e}function j(e){return"function"==typeof e}function U(e){switch(O(e)){case 3:case 4:return!0;default:return!1}}function $(e,t){return e===t||e!=e&&t!=t}function B(e,t){var r=e[t];if(null!=r){if(!L(r))throw TypeError();return r}}function W(e){var t=B(e,o);if(!L(t))throw TypeError();var r=t.call(e);if(!x(r))throw TypeError();return r}function z(e){return e.value}function H(e){var t=e.next();return!t.done&&t}function G(e){var t=e.return;t&&t.call(e)}function V(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===u||t!==u)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var i=n.constructor;return"function"!=typeof i||i===e?t:i}function Q(){C(f)||void 0===t.Reflect||f in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=X(t.Reflect));var e,r,n,i,o=new p,s={registerProvider:a,getProvider:c,setProvider:g};return s;function a(t){if(!Object.isExtensible(s))throw Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case C(r):r=t;break;case r===t:break;case C(n):n=t;break;case n===t:break;default:void 0===i&&(i=new h),i.add(t)}}function l(t,o){if(!C(r)){if(r.isProviderFor(t,o))return r;if(!C(n)){if(n.isProviderFor(t,o))return r;if(!C(i))for(var s=W(i);;){var a=H(s);if(!a)return;var l=z(a);if(l.isProviderFor(t,o))return G(s),l}}}if(!C(e)&&e.isProviderFor(t,o))return e}function c(e,t){var r,n=o.get(e);return C(n)||(r=n.get(t)),C(r)&&(C(r=l(e,t))||(C(n)&&(n=new d,o.set(e,n)),n.set(t,r))),r}function u(e){if(C(e))throw TypeError();return r===e||n===e||!C(i)&&i.has(e)}function g(e,t,r){if(!u(r))throw Error("Metadata provider not registered.");var n=c(e,t);if(n!==r){if(!C(n))return!1;var i=o.get(e);C(i)&&(i=new d,o.set(e,i)),i.set(t,r)}return!0}}function q(){var e;return!C(f)&&x(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[f]),C(e)&&(e=Q()),!C(f)&&x(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,f,{enumerable:!1,
vendor: 6,753 bytes, line 9
9configurable:!1,writable:!1,value:e}),e}function K(e){var t=new p,r={isProviderFor:function(e,r){var n=t.get(e);return!C(n)&&n.has(r)},OrdinaryDefineOwnMetadata:s,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:o,OrdinaryOwnMetadataKeys:a,OrdinaryDeleteMetadata:l};return g.registerProvider(r),r;function n(n,i,o){var s=t.get(n),a=!1;if(C(s)){if(!o)return;s=new d,t.set(n,s),a=!0}var l=s.get(i);if(C(l)){if(!o)return;if(l=new d,s.set(i,l),!e.setProvider(n,i,r))throw s.delete(i),a&&t.delete(n),Error("Wrong provider for target.")}return l}function i(e,t,r){var i=n(t,r,!1);return!C(i)&&D(i.has(e))}function o(e,t,r){var i=n(t,r,!1);if(!C(i))return i.get(e)}function s(e,t,r,i){n(r,i,!0).set(e,t)}function a(e,t){var r=[],i=n(e,t,!1);if(C(i))return r;for(var o=W(i.keys()),s=0;;){var a=H(o);if(!a)return r.length=s,r;var l=z(a);try{r[s]=l}catch(e){try{G(o)}finally{throw e}}s++}}function l(e,r,i){var o=n(r,i,!1);if(C(o)||!o.delete(e))return!1;if(0===o.size){var s=t.get(r);C(s)||(s.delete(i),0===s.size&&t.delete(s))}return!0}}function X(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,i=e.getOwnMetadataKeys,o=e.deleteMetadata,s=new p;return{isProviderFor:function(e,t){var r=s.get(e);return!!(!C(r)&&r.has(t))||!!i(e,t).length&&(C(r)&&(r=new h,s.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:o}}function J(e,t,r){var n=g.getProvider(e,t);if(!C(n))return n;if(r){if(g.setProvider(e,t,m))return m;throw Error("Illegal state.")}}function Y(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[o]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,i=r+1;i<n;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,$(t,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,i)},t.prototype.entries=function(){return new r(this._keys,this._values,s)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[o]=function(){return this.entries()},t.prototype._find=function(e,t){if(!$(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if($(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function i(e,t){return t}function s(e,t){return[e,t]}}function Z(){return function(){function e(){this._map=new d}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[o]=function(){return this.keys()},e}()}function ee(){var e=16,t=c.create(),n=i();return function(){function e(){this._key=i()}return e.prototype.has=function(e){var t=o(e,!1);return void 0!==t&&c.has(t,this._key)},e.prototype.get=function(e){var t=o(e,!1);return void 0!==t?c.get(t,this._key):void 0},e.prototype.set=function(e,t){return o(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=o(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=i()},e}();function i(){var e;do e="@@WeakMap@@"+l();while(c.has(t,e));return t[e]=!0,e}function o(e,t){if(!r.call(e,n)){if(!t)return;Object.defineProperty(e,n,{value:c.create()})}return e[n]}function s(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function a(e){if("function"==typeof Uint8Array){var t=new Uint8Array(e);return"u">typeof crypto?crypto.getRandomValues(t):"u">typeof msCrypto?msCrypto.getRandomValues(t):s(t,e),t}return s(Array(e),e)}function l(){var t=a(e);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",n=0;n<e;++n){var i=t[n];(4===n||6===n||8===n)&&(r+="-"),i<16&&(r+="0"),r+=i.toString(16).toLowerCase()}return r}}function et(e){return e.__=void 0,delete e.__,e}e("decorate",function(e,t,r,n){if(C(r)){if(!N(e)||!j(t))throw TypeError();return v(e,t)}if(!N(e)||!x(t)||!x(n)&&!C(n)&&!I(n))throw TypeError();return I(n)&&(n=void 0),y(e,t,r=F(r),n)}),e("metadata",function(e,t){return function(r,n){if(!x(r)||!C(n)&&!U(n))throw TypeError();_(e,t,r,n)}}),e("defineMetadata",function(e,t,r,n){if(!x(r))throw TypeError();return C(n)||(n=F(n)),_(e,t,r,n)}),e("hasMetadata",function(e,t,r){if(!x(t))throw TypeError();return C(r)||(r=F(r)),b(e,t,r)}),e("hasOwnMetadata",function(e,t,r){if(!x(t))throw TypeError();return C(r)||(r=F(r)),S(e,t,r)}),e("getMetadata",function(e,t,r){if(!x(t))throw TypeError();return C(r)||(r=F(r)),E(e,t,r)}),e("getOwnMetadata",function(e,t,r){if(!x(t))throw TypeError();return C(r)||(r=F(r)),w(e,t,r)}),e("getMetadataKeys",function(e,t){if(!x(e))throw TypeError();return C(t)||(t=F(t)),A(e,t)}),e("getOwnMetadataKeys",function(e,t){if(!x(e))throw TypeError();return C(t)||(t=F(t)),T(e,t)}),e("deleteMetadata",function(e,t,r){if(!x(t)||(C(r)||(r=F(r)),!x(t)))throw TypeError();C(r)||(r=F(r));var n=J(t,r,!1);return!C(n)&&n.OrdinaryDeleteMetadata(e,t,r)})})}(n||(n={}))},17099:(e,t,r)=>
9{var n=r(14216),i=r(17248),o=r(45261),s=r(10441),a=r(45705);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},17214:(e,t,r)=>{"use strict";r.d(t,{k:()=>d});var n,i=r(4902),o=r(43604),s=r(9298);!function(e){e._brand=Symbol("GAType")}(n||(n={}));var a=r(8365),l=r(68479),c=r(52267),u=r(71605);class d{constructor(e,t){if(this.websocketService=e,this.userTraceService=t,a.C.hasWindow())try{gtag("set",{user_id:this.websocketService.getOrCreateStoredWSId()})}catch(e){}}pageview(e){}send(e,t,r,n,i,o=0){this.sendAsync(e,t,r,n,i,o)}async sendAsync(e,t,r,n,i,o=0){a.C.hasWindow()&&("gtag"in window?(gtag=window.gtag)&&this.shouldSendEvent(r)&&gtag(e,r,{event_category:t,event_label:n,value:i}):setTimeout(()=>{o<100&&this.sendAsync(e,t,r,n,i,o+1)},100),this.userTraceService.trace(r,{event_category:t,event_label:n,value:i,hitType:e,eventAction:r}))}shouldSendEvent(e){let t=["offline-engine-downloaded","model-open","file-select-dialog-opened"];return!(0,l.A)(t,e)}}(0,i.Cg)([s.x,(0,i.Sn)("design:type",Function),(0,i.Sn)("design:paramtypes",[void 0===n||void 0===n.HitType?Object:n.HitType,void 0===n||void 0===n.EventCategory?Object:n.EventCategory,void 0===n||void 0===n.EventAction?Object:n.EventAction,void 0===n||void 0===n.EventLabel?Object:n.EventLabel,Object,void 0]),(0,i.Sn)("design:returntype",void 0)],d.prototype,"send",null),d=(0,i.Cg)([(0,o._G)(),(0,i.Qj)(0,(0,o.WQ)(u.V)),(0,i.Qj)(1,(0,o.WQ)(c.U)),(0,i.Sn)("design:type",Function),(0,i.Sn)("design:paramtypes",[void 0===u.V?Object:u.V,void 0===c.U?Object:c.U])],d)},17248:(e,t,r)=>{var n=r(36187),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():i.call(t,r,1),--this.size,!0)}},17494:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(64982);function i(e,t){return void 0===t&&(t={}),function(r,i){var o=Reflect.getMetadata("design:type",r,i);n.s.addTypeMetadata({target:r.constructor,propertyName:i,reflectedType:o,typeFunction:e,options:t})}}},17565:(e,t,r)=>{var n=r(66521);e.exports=function(e){return n(this,e).get(e)}},17671:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{e:()=>JSONUtils});var _lodash_min__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(83497),_lodash_min__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(70907),_utils_options_utils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(16127);class JSONUtils{static parse(jsonString){let jsonObjWithSerializedFunctions=eval(jsonString);return JSONUtils.convertStringFnToFnInPlace(jsonObjWithSerializedFunctions),jsonObjWithSerializedFunctions}static convertStringFnToFnInPlace(obj){try{if(Array.isArray(obj)){let converted=[];for(let item of obj)converted.push(JSONUtils.convertStringFnToFnInPlace(item));obj.splice(0,obj.length,...converted)}else if((0,_lodash_min__WEBPACK_IMPORTED_MODULE_1__.A)(obj))try{for(let key in obj)obj[key]=JSONUtils.convertStringFnToFnInPlace(obj[key])}catch(e){}else if((0,_lodash_min__WEBPACK_IMPORTED_MODULE_2__.A)(obj))try{if
9(obj.startsWith("xxxxx"))return globalThis&&(globalThis.OUTPUT_VIDEO_ENCODER_FROM_OPTIONS_FN=_utils_options_utils__WEBPACK_IMPORTED_MODULE_0__.Ch,globalThis.OUTPUT_EXT_FROM_OPTIONS_FN=_utils_options_utils__WEBPACK_IMPORTED_MODULE_0__.zT,globalThis.TIME_VALIDATE_FN=_utils_options_utils__WEBPACK_IMPORTED_MODULE_0__.ov,globalThis.UPLOADED_FILE_TARGET_SIZE_FN=_utils_options_utils__WEBPACK_IMPORTED_MODULE_0__.Vw,globalThis.UPLOADED_FILE_TARGET_SIZE_BY_DIMENSION_FN=_utils_options_utils__WEBPACK_IMPORTED_MODULE_0__.gN),eval(`var ${obj}; xxxxx`)}catch(e){console.error(e)}}catch(e){console.error(e)}return obj}static safeStringify(e){return JSON.stringify(e,(()=>{let e=new WeakSet;return(t,r)=>{if("object"==typeof r&&null!==r){if(e.has(r))return;e.add(r)}return r}})())}}},18112:(e,t,r)=>{"use strict";r.d(t,{k:()=>n.k,g:()=>n.g});var n=r(8323),i=r(17214),o=r(9968),s=r(31962),a=r(82803),l=r(79794),c=r(56104),u=r(2807),d=r(46935),h=r(4902),p=r(43604),f=r(3649),g=r(68246),m=r(72577);class v{get canClick(){return this._canClick.asObservable()}get onFileSelect(){return this._onFileSelect.asObservable()}constructor(e){this.gaService=e,this._onFileSelect=new f.B,this._canClick=new g.m(1)}registerFileInputRef(e){!this.fileInputEl&&e&&(this.fileInputEl=e,this.setFileInputAttributes(),this.fileInputEl?.addEventListener("change",e=>{this._onFileSelect.next({requestId:this.fileSelectRequestId,fileSelectEvent:e})}),this._canClick.next({}),this._canClick.complete(),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.NETWORK,m.z.EventAction["FILE-UPLOAD-READY"],m.z.EventLabel.UPLOAD,""))}setAttributes(e){this.attributes=e,this.setFileInputAttributes()}setFileInputAttributes(){this.fileInputEl&&this.attributes&&Object.assign(this.fileInputEl,this.attributes)}click(e){this.fileSelectRequestId=e,this.fileInputEl?.click(),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.NETWORK,m.z.EventAction["FILE-UPLOAD-CLICKED"],m.z.EventLabel.UPLOAD,"")}clearInput(){this.fileInputEl.value="",this.fileInputEl.type="text",this.fileInputEl.type="file"}}v=(0,h.Cg)([(0,p._G)(),(0,h.Qj)(0,(0,p.WQ)(i.k)),(0,h.Sn)("design:type",Function),(0,h.Sn)("design:paramtypes",[void 0===i.k?Object:i.k])],v);var y=r(9324),b=r(67554),S=r(89852),E=r(63948),w=r(77066),_=r(6102),A=r(1936),T=r(35231),O=r(79347),C=r(24916),I=r(29238),P=r(60121),x=r(71464),k=r(37413),M=r(93214),D=r(21883),R=r(99964),F=r(37643),N=r(75146),L=r(89863),j=r(9123),U=r(90125),$=r(15750),B=r(95243),W=r(41451),z=r(95026),H=r(46183),G=r(33353),V=r(6843),Q=r(18689),q=r(52267),K=r(71605),X=r(92288),J=r(98479),Y=r(95295),Z=r(81914),ee=r(98853),et=r(4585),er=r(86055),en=r(6113),ei=r(69319),eo=r(49955),es=r(40001),ea=r(90997),el=r(61791),ec=r(95077);n.k.bind(u.v).to(u.v).inSingletonScope(),n.k.bind(o.ApiConfig).to(o.ApiConfig).inSingletonScope(),n.k.bind(l.O).to(l.O).inSingletonScope(),n.k.bind(O.jo).to(O.jo).inSingletonScope(),n.k.bind(T.Q).to(T.Q).inSingletonScope(),n.k.bind(D.g1).to(D.g1).inSingletonScope(),n.k.bind(W.n).to(W.n).inSingletonScope(),n.k.bind(K.V).to(K.V).inSingletonScope(),n.k.bind(U.h).to(U.h).inSingletonScope(),n.k.bind(I.H).to(I.H).inSingletonScope(),n.k.bind(X.s).to(X.s).inSingletonScope(),n.k.bind(G._).to(G._).inSingletonScope(),n.k.bind(N.a).to(N.a).inSingletonScope(),n.k.bind(M.P_).to(M.P_).inSingletonScope(),n.k.bind(s.u).to(s.u).inSingletonScope(),n.k.bind(j.L).to(j.L).inSingletonScope(),n.k.bind(R.C).to(R.C).inSingletonScope(),n.k.bind(i.k).to(i.k).inSingletonScope(),n.k.bind(_.h).to(_.h).inSingletonScope(),n.k.bind(c.M).to(c.M).inSingletonScope(),n.k.bind(B.D).to(B.D).inSingletonScope(),n.k.bind(w.Pn).to(w.Pn).inSingletonScope(),n.k.bind(A.w).to(A.w).inSingletonScope(),n.k.bind(E.c).to(E.c).inSingletonScope(),n.k.bind(y.D).to(y.D).inSingletonScope(),n.k.bind(a.Tv).to(a.Tv).inSingletonScope(),n.k.bind(L.K).to(L.K).inSingletonScope(),n.k.bind(V.v).to(V.v).inSingletonScope(),n.k.bind(b.d).to(b.d).inSingletonScope(),n.k.bind(H.f).to(H.f).inSingletonScope(),n.k.bind(k.T).to(k.T).inSingletonScope(),n.k.bind(P.R).to(P.R).inSingletonScope(),n.k.bind(z.e).to(z.e).inSingletonScope(),n.k.bind(d.y).to(d.y).inSingletonScope(),n.k.bind(F.W).to(F.W).inSingletonScope(),n.k.bind(Q.QC).to(Q.QC).inSingletonScope(),n.k.bind(x.p).to(x.p).inSingletonScope(),n.k.bind(S.B).to(S.B).inSingletonScope(),n.k.bind(C.Kc).to(C.Kc).inSingletonScope(),n.k.bind(v).to(v).inSingletonScope(),n.k.bind($.G).to($.G).inSingletonScope(),n.k.bind(q.U).to(q.U).inSingletonScope(),n.k.bind(J.C).to(J.C).inSingletonScope(),n.k.bind(Y.i).to(Y.i).inSingletonScope(),n.k.bind(Z.s).to(Z.s).inSingletonScope(),n.k.bind(ee._).to(ee._).inSingletonScope(),n.k.bind(et.D).to(et.D).inSingletonScope(),n.k.bind(er.u).to(er.u).inSingletonScope(),n.k.bind(en.t).to(en.t).inSingletonScope(),n.k.bind(ei.E).to(ei.E).inSingletonScope(),n.k.bind(eo.W).to(eo.W).inSingletonScope(),n.k.bind(es.f).to(es.f).inSingletonScope(),n.k.bind(ea.L).to(ea.L).inSingletonScope(),n.k.bind(el.B).to(el.B).inSingletonScope(),n.k.bind(ec.N).to(ec.N).inSingletonScope()},18240:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(72209);let i=function(e,t,r){"__proto__"==t&&n.A?(0,n.A)(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},18291:(e,t,r)=>{"use strict";r.d(t,{$:()=>a});var n=r(51265),i=r(10479),o=r(14364),s=r(8365);class a{static removeNewLineAndMultipleContigeousWhiteSpaces(e){return e?e=(e=(e=e.trim()).replace(/\n/g," ")).replace(/[ ]+/g," "):e}static capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}static{this.TITLE_CASE_ACRONYMS={iso:"ISO",mime:"MIME",http:"HTTP",https:"HTTPS",html:"HTML",css:"CSS",xml:"XML",json:"JSON",yaml:"YAML",toml:"TOML",sql:"SQL",csv:"CSV",tsv:"TSV",svg:"SVG",pdf:"PDF",xlsx:"XLSX",url:"URL",uri:"URI",api:"API",rfc:"RFC",wcag:"WCAG",utf:"UTF",jwt:"JWT",pem:"PEM",der:"DER",rsa:"RSA",sha:"SHA",md5:"MD5",hmac:"HMAC",ssh:"SSH",dns:"DNS",cidr:"CIDR",ipv4:"IPv4",ipv6:"IPv6",mac:"MAC",dom:"DOM",dpi:"DPI",ppi:"PPI",rgb:"RGB",rgba:"RGBA",hsl:"HSL",hsla:"HSLA",hwb:"HWB",cmyk:"CMYK",srgb:"sRGB",og:"OG",seo:"SEO",faq:"FAQ",ttf:"TTF",otf:"OTF",woff:"WOFF",woff2:"WOFF2",eot:"EOT",srt:"SRT",vtt:"VTT",ass:"ASS",ssa:"SSA",sbv:"SBV",dfxp:"DFXP",lrc:"LRC",stl:"STL",obj:"OBJ",gltf:"glTF",glb:"GLB","3mf":"3MF",x509:"X.509",ascii:"ASCII",ksuid:"KSUID",ulid:"ULID",uuid:"UUID",nanoid:"NanoID","401k":"401(k)",bmr:"BMR",bmi:"BMI",tdee:"TDEE",gpa:"GPA",gst:"GST",vat:"VAT",ad:"AD",ai:"AI",us:"US",uk:"UK",eu:"EU",usa:"USA"}}static toTitleCase(e){return(0,n.A)(e)?e:e.replace(/\w\S*/g,function(e){let t=a.TITLE_CASE_ACRONYMS[e.toLowerCase()];return t||e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})}static toBase64(e){return btoa(e)}static parseString(e){if(!("undefined"===e||(0,n.A)(e)))return"null"===e?null:(0,i.A)((0,o.A)(e))?e:(0,o.A)(e)}static getRandomString(e=""){return e+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}static uuid(){try{var e=()=>{let e=new Uint32Array(8);window.crypto.getRandomValues(e);let t="";for(let r=0;r<e.length;r++)t+=(r<2||r>5?"":"-")+e[r].toString(16).slice(-4);return t};if(s.C.hasWindow()&&window&&window.crypto&&window.crypto.getRandomValues)return e()}catch(e){}let t=()=>Math.random().toString(16).slice(-4);
9return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}static async hash(e){let t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>e.toString(16).padStart(2,"0")).join("")}static supportedTextEncoding(){return[["UTF-8","UTF-8"],["ASCII","US-ASCII"],["ISO-8859-1","ISO-8859-1"],["ISO-8859-15","ISO-8859-15"],["ISO-8859-2","ISO-8859-2"],["ISO-8859-6","ISO-8859-6"],["windows-1252","windows-1252"],["Big5","Big5"],["Big5-HKSCS","Big5-HKSCS"],["CESU-8","CESU-8"],["EUC-JP","EUC-JP"],["EUC-KR","EUC-KR"],["GB18030","GB18030"],["GB2312","GB2312"],["GBK","GBK"],["IBM-Thai","IBM-Thai"],["IBM00858","IBM00858"],["IBM01140","IBM01140"],["IBM01141","IBM01141"],["IBM01142","IBM01142"],["IBM01143","IBM01143"],["IBM01144","IBM01144"],["IBM01145","IBM01145"],["IBM01146","IBM01146"],["IBM01147","IBM01147"],["IBM01148","IBM01148"],["IBM01149","IBM01149"],["IBM037","IBM037"],["IBM1026","IBM1026"],["IBM1047","IBM1047"],["IBM273","IBM273"],["IBM277","IBM277"],["IBM278","IBM278"],["IBM280","IBM280"],["IBM284","IBM284"],["IBM285","IBM285"],["IBM290","IBM290"],["IBM297","IBM297"],["IBM420","IBM420"],["IBM424","IBM424"],["IBM437","IBM437"],["IBM500","IBM500"],["IBM775","IBM775"],["IBM850","IBM850"],["IBM852","IBM852"],["IBM855","IBM855"],["IBM857","IBM857"],["IBM860","IBM860"],["IBM861","IBM861"],["IBM862","IBM862"],["IBM863","IBM863"],["IBM864","IBM864"],["IBM865","IBM865"],["IBM866","IBM866"],["IBM868","IBM868"],["IBM869","IBM869"],["IBM870","IBM870"],["IBM871","IBM871"],["IBM918","IBM918"],["ISO-2022-CN","ISO-2022-CN"],["ISO-2022-JP","ISO-2022-JP"],["ISO-2022-JP-2","ISO-2022-JP-2"],["ISO-2022-KR","ISO-2022-KR"],["ISO-8859-13","ISO-8859-13"],["ISO-8859-16","ISO-8859-16"],["ISO-8859-3","ISO-8859-3"],["ISO-8859-4","ISO-8859-4"],["ISO-8859-5","ISO-8859-5"],["ISO-8859-7","ISO-8859-7"],["ISO-8859-8","ISO-8859-8"],["ISO-8859-9","ISO-8859-9"],["JIS_X0201","JIS_X0201"],["JIS_X0212-1990","JIS_X0212-1990"],["KOI8-R","KOI8-R"],["KOI8-U","KOI8-U"],["Shift_JIS","Shift_JIS"],["TIS-620","TIS-620"],["UTF-16","UTF-16"],["UTF-16BE","UTF-16BE"],["UTF-16LE","UTF-16LE"],["UTF-32","UTF-32"],["UTF-32BE","UTF-32BE"],["UTF-32LE","UTF-32LE"],["windows-1250","windows-1250"],["windows-1251","windows-1251"],["windows-1253","windows-1253"],["windows-1254","windows-1254"],["windows-1255","windows-1255"],["windows-1256","windows-1256"],["windows-1257","windows-1257"],["windows-1258","windows-1258"],["windows-31j","windows-31j"],["Big5-HKSCS-2001","x-Big5-HKSCS-2001"],["Big5-Solaris","x-Big5-Solaris"],["euc-jp-linux","x-euc-jp-linux"],["EUC-TW","x-EUC-TW"],["eucJP-Open","x-eucJP-Open"],["IBM1006","x-IBM1006"],["IBM1025","x-IBM1025"],["IBM1046","x-IBM1046"],["IBM1097","x-IBM1097"],["IBM1098","x-IBM1098"],["IBM1112","x-IBM1112"],["IBM1122","x-IBM1122"],["IBM1123","x-IBM1123"],["IBM1124","x-IBM1124"],["IBM1166","x-IBM1166"],["IBM1364","x-IBM1364"],["IBM1381","x-IBM1381"],["IBM1383","x-IBM1383"],["IBM300","x-IBM300"],["IBM33722","x-IBM33722"],["IBM737","x-IBM737"],["IBM833","x-IBM833"],["IBM834","x-IBM834"],["IBM856","x-IBM856"],["IBM874","x-IBM874"],["IBM875","x-IBM875"],["IBM921","x-IBM921"],["IBM922","x-IBM922"],["IBM930","x-IBM930"],["IBM933","x-IBM933"],["IBM935","x-IBM935"],["IBM937","x-IBM937"],["IBM939","x-IBM939"],["IBM942","x-IBM942"],["IBM942C","x-IBM942C"],["IBM943","x-IBM943"],["IBM943C","x-IBM943C"],["IBM948","x-IBM948"],["IBM949","x-IBM949"],["IBM949C","x-IBM949C"],["IBM950","x-IBM950"],["IBM964","x-IBM964"],["IBM970","x-IBM970"],["ISCII91","x-ISCII91"],["ISO-2022-CN-CNS","x-ISO-2022-CN-CNS"],["ISO-2022-CN-GB","x-ISO-2022-CN-GB"],["iso-8859-11","x-iso-8859-11"],["JIS0208","x-JIS0208"],["JISAutoDetect","x-JISAutoDetect"],["Johab","x-Johab"],["MacArabic","x-MacArabic"],["MacCentralEurope","x-MacCentralEurope"],["MacCroatian","x-MacCroatian"],["MacCyrillic","x-MacCyrillic"],["MacDingbat","x-MacDingbat"],["MacGreek","x-MacGreek"],["MacHebrew","x-MacHebrew"],["MacIceland","x-MacIceland"],["MacRoman","x-MacRoman"],["MacRomania","x-MacRomania"],["MacSymbol","x-MacSymbol"],["MacThai","x-MacThai"],["MacTurkish","x-MacTurkish"],["MacUkraine","x-MacUkraine"],["MS932_0213","x-MS932_0213"],["MS950-HKSCS","x-MS950-HKSCS"],["MS950-HKSCS-XP","x-MS950-HKSCS-XP"],["mswin-936","x-mswin-936"],["PCK","x-PCK"],["SJIS_0213","x-SJIS_0213"],["UTF-16LE-BOM","x-UTF-16LE-BOM"],["UTF-32BE-BOM","X-UTF-32BE-BOM"],["UTF-32LE-BOM","X-UTF-32LE-BOM"],["windows-50220","x-windows-50220"],["windows-50221","x-windows-50221"],["windows-874","x-windows-874"],["
9windows-949","x-windows-949"],["windows-950","x-windows-950"],["windows-iso2022jp","x-windows-iso2022jp"]]}}},18476:(e,t,r)=>{"use strict";r.d(t,{M:()=>a});var n=r(77698),i=r(99991),o=r(32277),s=r(97460);function a(e,t,r){var a=(0,n.T)(e)||t||r?{next:e,error:t,complete:r}:e;return a?(0,i.N)(function(e,t){null==(r=a.subscribe)||r.call(a);var r,n=!0;e.subscribe((0,o._)(t,function(e){var r;null==(r=a.next)||r.call(a,e),t.next(e)},function(){var e;n=!1,null==(e=a.complete)||e.call(a),t.complete()},function(e){var r;n=!1,null==(r=a.error)||r.call(a,e),t.error(e)},function(){var e,t;n&&(null==(e=a.unsubscribe)||e.call(a)),null==(t=a.finalize)||t.call(a)}))}):s.D}},18689:(e,t,r)=>{"use strict";r.d(t,{J5:()=>c,QC:()=>u,kD:()=>l});var n=r(4902),i=r(17494),o=r(43604),s=r(68246),a=r(41451);class l{static{this.MOTIVES_DISABLED_DATE="MOTIVES_DISABLED_DATE"}static{this.MOBILE_APP_PROMO_CLOSED_DATE="MOBILE_APP_PROMO_CLOSED_DATE"}static{this.CACHED_IS_PAID_USER="CACHED_IS_PAID_USER"}static{this.GROW_PITCH_CLOSED_DATE="GROW_PITCH_CLOSED_DATE"}}class c{}(0,n.Cg)([(0,i.Z)(()=>Date),(0,n.Sn)("design:type","u"<typeof Date?Object:Date)],c.prototype,"date",void 0);class u{get preferenceChange(){return this._preferenceChange.asObservable()}constructor(e){this.storage=e,this._preferenceChange=new s.m}setPreference(e,t){this.storage.store(a.N.USER_PREFERENCE_KEY_PREFIX,e,t),this._preferenceChange.next({preferenceKey:e,value:t})}getPreference(e,t){return this.storage.get(a.N.USER_PREFERENCE_KEY_PREFIX,e,t)}}u=(0,n.Cg)([(0,o._G)(),(0,n.Qj)(0,(0,o.WQ)(a.n)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.n?Object:a.n])],u)},18847:(e,t,r)=>{e.exports=r(20705)},18947:(e,t,r)=>{"use strict";r.d(t,{Kn:()=>l,yU:()=>a,Uv:()=>c});var n=r(4902),i=r(77698),o=(0,r(78204).L)(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}}),s=r(85689),a=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,s,a,l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var c=(0,n.Ju)(l),d=c.next();!d.done;d=c.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}else l.remove(this);var h=this.initialTeardown;if((0,i.T)(h))try{h()}catch(e){a=e instanceof o?e.errors:[e]}var p=this._finalizers;if(p){this._finalizers=null;
9try{for(var f=(0,n.Ju)(p),g=f.next();!g.done;g=f.next()){var m=g.value;try{u(m)}catch(e){a=null!=a?a:[],e instanceof o?a=(0,n.fX)((0,n.fX)([],(0,n.zs)(a)),(0,n.zs)(e.errors)):a.push(e)}}}catch(e){r={error:e}}finally{try{g&&!g.done&&(s=f.return)&&s.call(f)}finally{if(r)throw r.error}}}if(a)throw new o(a)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)u(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&(0,s.o)(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&(0,s.o)(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),l=a.EMPTY;function c(e){return e instanceof a||e&&"closed"in e&&(0,i.T)(e.remove)&&(0,i.T)(e.add)&&(0,i.T)(e.unsubscribe)}function u(e){(0,i.T)(e)?e():e.unsubscribe()}},19031:(e,t,r)=>{var n=r(24298),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=n||i||Function("return this")()},19465:(e,t,r)=>{var n=r(2331),i=r(39004),o=r(66783);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},19850:(e,t,r)=>{var n=r(89950),i=r(98825),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",l="[object Proxy]";e.exports=function(e){if(!i(e))return!1;var t=n(e);return t==s||t==a||t==o||t==l}},19887:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},20705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return c},noSSR:function(){return l}});let n=r(64252),i=r(37876);r(14232);let o=n._(r(16006)),s=!1;function a(e){return{default:e?.default||e}}function l(e,t){if(delete t.webpack,delete t.modules,!s)return e(t);let r=t.loading;return()=>(0,i.jsx)(r,{error:null,isLoading:!0,pastDelay:!1,timedOut:!1})}function c(e,t){let r=o.default,n={loading:({error:e,isLoading:t,pastDelay:r})=>null};e instanceof Promise?n.loader=()=>e:"function"==typeof e?n.loader=e:"object"==typeof e&&(n={...n,...e});let i=(n={...n,...t}).loader,s=()=>null!=i?i().then(a):Promise.resolve(a(()=>null));return(n.loadableGenerated&&(n={...n,...n.loadableGenerated},delete n.loadableGenerated),"boolean"!=typeof n.ssr||n.ssr)?r({...n,loader:s}):(delete n.webpack,delete n.modules,l(r,n))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},20830:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(64982);function i(e){return void 0===e&&(e={}),function(t,r){n.s.addExposeMetadata({target:t instanceof Function?t:t.constructor,propertyName:r,options:e})}}},20986:(e,t,r)=>{"use strict";function n(){}r.d(t,{l:()=>n})},21194:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=r(54743).A.Uint8Array},21370:(e,t,r)=>{"use strict";function n(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}r.d(t,{L:()=>n})},21523:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},21710:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(76611),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n.A?n.A.toStringTag:void 0;let l=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i};var c=Object.prototype.toString;let u=function(e){return c.call(e)};
9var d="[object Null]",h="[object Undefined]",p=n.A?n.A.toStringTag:void 0;let f=function(e){return null==e?void 0===e?h:d:p&&p in Object(e)?l(e):u(e)}},21883:(e,t,r)=>{"use strict";r.d(t,{g1:()=>u});var n=r(4902),i=r(43604),o=r(68246),s=r(8365),a=r(41451);let l="OFFLINE_FILE_PROCESS_STATUS_STORAGE_KEY",c="CAN_GO_OFFLINE_MODE_STORAGE_KEY";class u{constructor(e){if(this.storageService=e,this.offlineModeOn=!1,this.canGoOfflineMode=!1,this.changed=new o.m(1),s.C.hasWindow()){const e=!1;this.storageService.store(a.N.USER_SETTING_KEY_PREFIX,l,e),this.setOfflineMode(e)}}getOfflineMode(){return this.offlineModeOn}getCanGoOfflineMode(){return this.canGoOfflineMode}setOfflineMode(e){this.offlineModeOn=!!e,this.storageService.store(a.N.USER_SETTING_KEY_PREFIX,l,this.offlineModeOn),this.changed.next({offlineModeOn:this.offlineModeOn,canGoOfflineMode:this.canGoOfflineMode})}setCanGoOfflineMode(e){this.canGoOfflineMode=!!e,this.storageService.store(a.N.USER_SETTING_KEY_PREFIX,c,this.canGoOfflineMode),e||this.setOfflineMode(!1),this.changed.next({offlineModeOn:this.offlineModeOn,canGoOfflineMode:this.canGoOfflineMode})}}u=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a.n)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.n?Object:a.n])],u)},22225:(e,t,r)=>{var n=r(72200),i=r(93007);e.exports=function(e,t,r){var o=t(e);return i(e)?o:n(o,r(e))}},22449:(e,t,r)=>{"use strict";r.d(t,{C:()=>o,U:()=>s});var n=r(4902),i=r(77698);function o(e){return(0,n.AQ)(this,arguments,function(){var t,r,i;return(0,n.YH)(this,function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,(0,n.N3)(t.read())];case 3:if(i=(r=o.sent()).value,!r.done)return[3,5];return[4,(0,n.N3)(void 0)];case 4:return[2,o.sent()];case 5:return[4,(0,n.N3)(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function s(e){return(0,i.T)(null==e?void 0:e.getReader)}},22553:(e,t,r)=>{"use strict";var n=r(82007).b,i=r(93570),o=r(39944),s=r(23488),a=r(98173),l=function(){};function c(e,t){var i=this;n.call(this);var c=function(){var r=i.ifr=new s(a.transportName,t,e);r.once("message",function(e){if(e){try{t=JSON.parse(e)}catch(t){l("bad json",e),i.emit("finish"),i.close();return}var t,r=t[0],n=t[1];i.emit("finish",r,n)}i.close()}),r.once("close",function(){i.emit("finish"),i.close()})};r.g.document.body?c():o.attachEvent("load",c)}i(c,n),c.enabled=function(){return s.enabled()},c.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},e.exports=c},22902:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(67966);let i=function(e,t,r){var i=null==e?void 0:(0,n.A)(e,t);return void 0===i?r:i}},23218:(e,t,r)=>{e.exports=r(43622)(r(19031),"DataView")},23488:(e,t,r)=>{"use strict";var n=r(93570),i=r(82007).b,o=r(77718),s=r(72649),a=r(66384),l=r(39944),c=r(59355),u=function(){};function d(e,t,r){if(!d.enabled())throw Error("Transport created when disabled");i.call(this);var n=this;this.origin=s.getOrigin(r),this.baseUrl=r,this.transUrl=t,this.transport=e,this.windowId=c.string(8);var o=s.addPath(r,"/iframe.html")+"#"+this.windowId;u(e,t,o),this.iframeObj=a.createIframe(o,function(e){u("err callback"),n.emit("close",1006,"Unable to load an iframe ("+e+")"),n.close()}),this.onmessageCallback=this._message.bind(this),l.attachEvent("message",this.onmessageCallback)}n(d,i),d.prototype.close=function(){if(u("close"),this.removeAllListeners(),this.iframeObj){l.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},d.prototype._message=function(e){var t,r;if(u("message",e.data),!s.isOriginEqual(e.origin,this.origin))return void u("not same origin",e.origin,this.origin);try{t=JSON.parse(e.data)}catch(t){u("bad json",e.data);return}if(t.windowId!==this.windowId)return void u("mismatched window id",t.windowId,this.windowId);switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",JSON.stringify([o,this.transport,this.transUrl,this.baseUrl]));break;
9case"t":this.emit("message",t.data);break;case"c":try{r=JSON.parse(t.data)}catch(e){u("bad json",t.data);return}this.emit("close",r[0],r[1]),this.close()}},d.prototype.postMessage=function(e,t){u("postMessage",e,t),this.iframeObj.post(JSON.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},d.prototype.send=function(e){u("send",e),this.postMessage("m",e)},d.enabled=function(){return a.iframeEnabled},d.transportName="iframe",d.roundTrips=2,e.exports=d},23806:(e,t,r)=>{"use strict";r.d(t,{v:()=>n});class n{static isOnline(){return"u"<typeof navigator||navigator.onLine}static async canReachServer(e,t=3e3){if(!n.isOnline())return!1;try{let r=new AbortController,n=setTimeout(()=>r.abort(),t),i=await fetch(e,{method:"GET",signal:r.signal,cache:"no-store"});return clearTimeout(n),i.ok}catch{return!1}}static isConnectivityError(e){return e?.name==="UnknownHTTPError"||e?.name==="NetworkError"}static isRetryableUploadError(e){return n.isConnectivityError(e)||e?.name==="ServiceError"}static onStatusChange(e){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t),window.addEventListener("offline",r),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}},24015:(e,t,r)=>{var n=r(23218),i=r(36315),o=r(54316),s=r(37973),a=r(96703),l=r(89950),c=r(82675),u="[object Map]",d="[object Object]",h="[object Promise]",p="[object Set]",f="[object WeakMap]",g="[object DataView]",m=c(n),v=c(i),y=c(o),b=c(s),S=c(a),E=l;(n&&E(new n(new ArrayBuffer(1)))!=g||i&&E(new i)!=u||o&&E(o.resolve())!=h||s&&E(new s)!=p||a&&E(new a)!=f)&&(E=function(e){var t=l(e),r=t==d?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case m:return g;case v:return u;case y:return h;case b:return p;case S:return f}return t}),e.exports=E},24101:(e,t,r)=>{"use strict";r.d(t,{Mi:()=>a,S$:()=>i,eS:()=>l,lm:()=>o});var n=r(89853);function i(e){if("string"!=typeof e||e.length>261)return null;let t=e.replace(/^https:\/\//i,"").replace(/\/+$/,"");if(!/^[A-Za-z0-9.-]+(:\d{1,5})?$/.test(t))return null;let r=t.replace(/:\d+$/,"").toLowerCase();return"xconvert.com"===r||r.endsWith(".xconvert.com")||"localhost"===r?e.replace(/\/+$/,""):null}function o(e){try{let t=new URL(e);return("https:"===t.protocol||"localhost"===t.hostname)&&null!==i(t.host)}catch{return!1}}function s(e){try{let t=void 0===e?"u">typeof localStorage?localStorage:null:e,r=(0,n.I5)(t,n.up,n.XU);return"string"==typeof r&&""!==r.trim()?r.trim():null}catch{return null}}function a(e,t){if(!o(e))return{};let r=s(t);return r?{Authorization:`Bearer ${r}`}:{}}async function l(e,t,r,n){try{let i=e.replace(/\/+$/,""),s=`${/\/v2\/edge$/.test(i)?i:`${i}/v2/edge`}/files/input/token`;if(!o(s))return null;let l=await r(s,{method:"POST",mode:"cors",credentials:"omit",headers:{"Content-Type":"application/json",...a(s,n)},body:JSON.stringify({filename:t})});if(!l.ok)return null;let c=await l.json(),u=c&&"object"==typeof c?c.token:null;return"string"==typeof u&&""!==u?u:null}catch{return null}}},24298:(e,t,r)=>{e.exports="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},24829:(e,t,r)=>{"use strict";var n=r(93570),i=r(10009);function o(e){i.call(this),this.initEvent("message",!1,!1),this.data=e}n(o,i),e.exports=o},24916:(e,t,r)=>{"use strict";r.d(t,{Kc:()=>y});var n=r(4902),i=r(43604),o=r(7262),s=r(98683),a=r(9711),l=r(4515),c=r(8365),u=r(56362),d=r(45019);class h{static async run(e,t=!1){try{return await e()}catch(e){if(!t)throw e}}static async delay(e){return(0,o._)((0,u.O)(e).pipe((0,d.T)(e=>null)))}}var p=r(9968),f=r(2807),g=r(79347),m=r(29238),v=r(71605);class y{constructor(e,t,r,n,i){this.http=e,this.websocketService=t,this.apiConfig=r,this.loginService=n,this.envService=i,this.wsId="undefined",this.logQueue=[],this.isFlushing=!1}initialize(){this.setUp(),this.loginService.onSessionDetails.subscribe({next:e=>{a.V.setSessionDetails(e),this.wsId=this.websocketService.getOrCreateStoredWSId(),a.V.setLoggerService(this),a.V.setWSId(this.wsId)}})}getBrowserInfo(){return c.C.getBrowserInfo()}setUp(){if(c.C.hasWindow()){this.url=this.apiConfig.getHistoryTrackEndpoint();try{(window.location.host.startsWith("localhost")||this.envService.env.dev)&&(this.url=this.url.replace(/https:\/\/.*?\//,"/localhost"))}catch{}}}static{this.MAX_QUEUE_SIZE=100}log(e){c.C.hasWindow()&&l.C.isLogTypeEnabled(l.C.logReadableStringToLevel(e.level))&&s.FO.IS_PROD&&(this.logQueue.length<y.MAX_QUEUE_SIZE&&this.logQueue.push(e),this.isFlushing||(this.isFlushing=!0,setTimeout(()=>this.flushQueue(),2e3)))}static{this.MAX_RETRIES=3}static{this.RETRY_DELAY_MS=1e3}async flushQueue(){for(;this.logQueue.length>0;){let e=this.logQueue.shift();await this.sendWithRetry(e)}this.isFlushing=!1,this.logQueue.length>0&&(this.isFlushing=!0,setTimeout(()=>this.flushQueue(),2e3))}async sendWithRetry(e){for(let t=0;t<=y.MAX_RETRIES;t++)try{await (0,o._)(this.http.post(this.url,e));return}catch{t<y.MAX_RETRIES&&await h.delay(y.RETRY_DELAY_MS*(t+1))}}}y=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(g.jo)),(0,n.Qj)(1,(0,i.WQ)(v.V)),(0,n.Qj)(2,(0,i.WQ)(p.ApiConfig)),(0,n.Qj)(3,(0,i.WQ)(m.H)),(0,n.Qj)(4,(0,i.WQ)(f.v)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===g.jo?Object:g.jo,void 0===v.V?Object:v.V,void 0===p.ApiConfig?Object:p.ApiConfig,void 0===m.H?Object:m.H,void 0===f.v?Object:f.v])],y)},25050:(e,t,r)=>{"use strict";r.d(t,{Dh:()=>a});var n=r(62755);let i="/metrics/events";function o(e){try{let t=e?.xhr||e?.request||e?.response?.request,r=t?.getAllResponseHeaders?.();if("string"==typeof r&&r.length){let e=/^x-request-id:\s*(.+)$/im.exec(r);if(e)return e[1].trim()}let n=e?.response?.headers?.["x-request-id"];if("string"==typeof n&&n.length)return n}catch{}}function s(e,t,r,s){let a=(0,n.c)(e);return -1!==a.indexOf(i)?null:{endpoint:a,method:(t||"GET").toUpperCase(),status:(0,n.c2)(r),ms:s,...o(r)?{requestId:o(r)}:{}}}function a(e,t,r,n,i){if(e)try{let o=s(t,r,n,i);o&&e.reportApiError(o)}catch{}}},25388:(e,t,r)=>{"use strict";r.d(t,{D8:()=>u,EU:()=>w,F8:()=>l,GS:()=>_,RU:()=>C,Rc:()=>k,TN:()=>o,a_:()=>P,az:()=>I,fP:()=>g,l3:()=>f,l_:()=>h,mv:()=>c,oM:()=>d,p3:()=>O,s5:()=>
9M,sM:()=>A,vZ:()=>E,y:()=>a,yJ:()=>y});var n=r(24101),i=r(79699);let o="picker",s=Object.freeze(["tab","nudge","nudge_thumb","time_link","downloads_link","url"]),a="psrc",l="downloads_link",c="pfresh",u="pwf",d="pdom",h="pjob",p=/^[A-Za-z0-9-]{8,64}$/;function f(e){return"string"==typeof e&&p.test(e)}function g(e){return(0,n.S$)(e)}function m(e){return e&&s.includes(e)?e:null}let v=null;function y(e){v=e}let b=["edit","check"],S=/^[A-Za-z0-9_-]{4,64}$/;function E(e){return"string"==typeof e&&!!S.test(e)&&!/^LATEST(-|$)/i.test(e)}function w(e){return e===o}function _(e){let t=(0,i.xB)(["tab","psid","pstep","psrc",c,u,d,h],e),r=f(t[u])?t[u]:null,n=r?g(t[d]):null,o=t.pstep&&b.includes(t.pstep)?t.pstep:"edit";return{tab:t.tab,psid:E(t.psid)?t.psid:null,pstep:o,psrc:m(t.psrc),..."1"===t[c]?{pfresh:!0}:{},...r&&n?{pwf:r,pdom:n}:{},...E(t[h])?{pjob:t[h]}:{}}}function A(e,t){let r=!!e&&E(e),n=t??v??(r?"downloads_link":"tab");v=null,r?(0,i.n2)({tab:o,psid:e,psrc:n}):(0,i.n2)({tab:o,psrc:n})}function T(){return"string"==typeof(0,i.xB)([c])?.[c]?{[c]:null}:{}}function O(e){E(e)&&(0,i.b7)({psid:e,psrc:null,...T()})}function C(e){(0,i.n2)({pstep:e})}function I(){(0,i.n2)({pstep:null})}function P(e,t){let r=/^(.*\/)?convert-[a-z0-9]+-to-([a-z0-9]+)\/?$/i.exec(e||""),n=String(t||"").toLowerCase().replace(/^\./,"");return r&&/^[a-z0-9]{1,8}$/.test(n)?`${r[1]??"/"}convert-${n}-to-${r[2].toLowerCase()}?tab=${o}`:null}function x(){let e=(0,i.xB)([u,d])??{};return{..."string"==typeof e[u]?{[u]:null}:{},..."string"==typeof e[d]?{[d]:null}:{}}}function k(e){E(e)&&(0,i.b7)({psid:e,psrc:null,[u]:null,[d]:null})}function M(){(0,i.n2)({tab:null,psid:null,pstep:null,psrc:null,...T(),...x()})}},25435:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{o:()=>appPropsToRouteProps});var _utils_lodash_min__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(70907),_utils_json_utils__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(17671);function appPropsToRouteProps(props){if(props?.pageProps){let routeData=props?.pageProps;if(routeData.convertOptionCategoriesOriginal&&(0,_utils_lodash_min__WEBPACK_IMPORTED_MODULE_1__.A)(routeData.convertOptionCategoriesOriginal)){let json=JSON.parse(routeData.convertOptionCategoriesOriginal);routeData.convertOptionCategories=_utils_json_utils__WEBPACK_IMPORTED_MODULE_0__.e.parse(json)}return routeData.extensionSEOData&&Array.isArray(routeData.extensionSEOData)&&(routeData.extensionSEOData=routeData.extensionSEOData.map(data=>eval(data))),routeData}return console.error("Null props were fed to the component"),{}}},27136:(e,t,r)=>{var n=r(19850),i=r(52742);e.exports=function(e){return null!=e&&i(e.length)&&!n(e)}},27371:e=>{e.exports=function(){return[]}},27540:(e,t,r)=>{"use strict";var n=r(93570),i=r(82007).b,o=function(){};function s(e,t){o(e),i.call(this);var r=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(e,t){o("finish",e,t),r._chunkHandler(e,t),r.xo=null;var n=200===e?"network":"permanent";o("close",n),r.emit("close",null,n),r._cleanup()})}n(s,i),s.prototype._chunkHandler=function(e,t){if(o("_chunkHandler",e),200===e&&t)for(var r=-1;;this.bufferPosition+=r+1){var n=t.slice(this.bufferPosition);if(-1===(r=n.indexOf("\n")))break;var i=n.slice(0,r);i&&(o("message",i),this.emit("message",i))}},s.prototype._cleanup=function(){o("_cleanup"),this.removeAllListeners()},s.prototype.abort=function(){o("abort"),this.xo&&(this.xo.close(),o("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},e.exports=s},27714:(e,t,r)=>{"use strict";r.d(t,{Y:()=>i});var n=r(64083);class i{constructor(e,t,r,i,o){this.storageType=n.Tc.GOOGLE_DRIVE_FILE,this.id=t,this.name=r,this.token=e,this.type=i,this.size=o,this.lastModified=Date.now()}static createFromFileList(e){return e.map(e=>new i(e.token,e.id,e.name,e.mimeType,e.sizeBytes))}}},27845:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});let n=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)};var i=Math.max;let o=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),l=Array(a);++s<a;)l[s]=o[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=o[s];return c[t]=r(l),n(e,this,c)}}},28375:(e,t,r)=>{var n=r(19465),i=r(15744),o=r(28389),s=1,a=2;e.exports=function(e,t,r,l,c,u){var d=r&s,h=e.length,p=t.length;if(h!=p&&!(d&&p>h))return!1;var f=u.get(e),g=u.get(t);if(f&&g)return f==t&&g==e;var m=-1,v=!0,y=r&a?new n:void 0;for(u.set(e,t),u.set(t,e);++m<h;){var b=e[m],S=t[m];if(l)var E=d?l(S,b,m,t,e,u):l(b,S,m,e,t,u);if(void 0!==E){if(E)continue;v=!1;break}if(y){if(!i(t,function(e,t){if(!o(y,t)&&(b===e||c(b,e,r,l,u)))return y.push(t)})){v=!1;break}}else if(!(b===S||c(b,S,r,l,u))){v=!1;break}}return u.delete(e),u.delete(t),v}},28389:e=>{e.exports=function(e,t){return e.has(t)}},28461:(e,t,r)=>{"use strict";r.d(t,{A:()=>
9o});var n=r(86702),i=1/0;let o=function(e){if("string"==typeof e||(0,n.A)(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}},28654:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},28663:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(18240),i=r(11396),o=Object.prototype.hasOwnProperty;let s=function(e,t,r){var s=e[t];o.call(e,t)&&(0,i.A)(s,r)&&(void 0!==r||t in e)||(0,n.A)(e,t,r)}},29238:(e,t,r)=>{"use strict";r.d(t,{H:()=>j,Y:()=>N});var n=r(4902),i=r(71717),o=r(43604),s=r(68246),a=r(7262),l=r(9120),c=r(54003),u=r(6155),d=r(56362),h=r(16579),p=r(59971),f=r(990),g=r(18476),m=r(44492),v=r(45019),y=r(44555),b=r(54631),S=r(35209),E=r(87780),w=r(98683),_=r(9711),A=r(17494),T=r(51352);class O{get fileSizeLimitMB(){return this.userLimits&&this.userLimits.av||400}get numberOfConcurrentProcessLimit(){return this.userLimits&&this.userLimits.numberOfConcurrentTasks||4}}(0,n.Cg)([(0,A.Z)(()=>T.Xn),(0,n.Sn)("design:type",void 0===T.Xn?Object:T.Xn)],O.prototype,"fileSizeLimitsInMB",void 0),(0,n.Cg)([(0,A.Z)(()=>T.LU),(0,n.Sn)("design:type",void 0===T.LU?Object:T.LU)],O.prototype,"userLimits",void 0);var C=r(8365),I=r(9968),P=r(31962),x=r(79347),k=r(21883),M=r(9123),D=r(41451),R=r(33353),F=r(92288),N=function(e){return e.UNKNOWN="UNKNOWN",e.ANONYMOUS="ANONYMOUS",e.LOGGED_IN="LOGGED_IN",e}({});async function L(e){if(!e)return e;let t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>("00"+e.toString(16)).slice(-2)).join("")}class j{get userDetails(){return this._userDetails}get onUserDetailsChanged(){return this._onUserDetailsChanged.asObservable()}get userIpAddress(){return this._userIpAddress}get userCountry(){return this._userCountry}get onSessionState(){return this._onSessionState.asObservable()}get currentSessionState(){return this._currentSessionState}emitSessionState(e){this._currentSessionState!==e&&(this._currentSessionState=e,this._onSessionState.next(e),"UNKNOWN"!==e&&this.identityEventsSubject?.next(e))}get onSessionDetails(){return this._onSessionDetails.asObservable()}constructor(e,t,r,n,i,o,a,l){this.apiConfig=e,this.authService=t,this.offlineTaskService=r,this.storageService=n,this.scriptLoadService=i,this.uiContext=o,this.windowService=a,this.lightHttp=l,this.logger=_.V.getLogger("LoginService"),this.isUserLoggedIn=!1,this.canGoOffline=!1,this.isUserAuthenticated=!1,this.loginRequestDispatched=!1,this.inFlightLogin$=null,this._userDetails=null,this._onUserDetailsChanged=new s.m(1),this._userIpAddress=null,this._userCountry=null,this._onSessionState=new s.m(1),this._currentSessionState="UNKNOWN",this._onSessionDetails=new s.m(1),this.identityFailure=null,this.identityRetryNoticed=!1,this.identityEventsSubject=null,x.jo.registerLoginUserDetailsProvider(this),x.jo.registerIdentityGate({wait:()=>this.identityWait()})}static{this.ANON_429_TRIES=2}static{this.ANON_429_MAX_WAIT_MS=6e4}identityWait(){return this.authService.getToken()?null:this.inFlightLogin$?(0,a._)(this.inFlightLogin$).then(()=>{if(!this.authService.getToken()&&this.identityFailure)throw this.identityFailure},e=>{throw this.identityFailure??e}):this.identityFailure?Promise.reject(this.identityFailure):"UNKNOWN"===this._currentSessionState&&C.C.hasWindow()?new Promise((e,t)=>{let r=()=>{clearTimeout(n),i.unsubscribe()},n=setTimeout(()=>{r(),this.authService.getToken()?e():t(new x.LK("We could not start your session. Please reload the page and try again."))},j.IDENTITY_FIRST_WAIT_MS),i=this.identityEvents$().subscribe(n=>{r(),"string"==typeof n?e():t(n)})}):null}static{this.IDENTITY_FIRST_WAIT_MS=12e3}identityEvents$(){return this.identityEventsSubject||(this.identityEventsSubject=new s.m(1)),this.identityEventsSubject.asObservable()}static anon429DelayMs(e){let t=Number(e?.retryAfterSeconds);return Math.max(250,Math.min(Number.isFinite(t)&&t>0?1e3*t:5e3,j.ANON_429_MAX_WAIT_MS))}loadSessionInfo(){let e=this.apiConfig.getHttpsEndpoint();return(0,l.of)({}).pipe((0,p.$)(),(0,f.Z)(()=>this.lightHttp.post(`${e}/users/session/settings`,{}))).pipe((0,g.M)({next:e=>{let t=(0,i.om)(O,e);this._userIpAddress=t&&(t.ipv4||t.ip),this._userCountry=t&&t.country,this._onSessionDetail
9s.next(t)}}),(0,m.W)(t=>(this.scriptLoadService.loadAllScriptsIfNotLoaded(!0).then(()=>{this.uiContext.showErrorDialog({title:"Error",text:"Failed to get session info. Please let us know about this issue @ [email protected]. Please reload the page and try again."})}).catch(console.error),this.logger.error({message:`Failed to get SessionDetails using ${e} domain.`,error:t}),(0,l.of)({}))))}clearLocalSession(){this.authService.unsetAuthToken(),this.isUserLoggedIn=!1,this.isUserAuthenticated=!1,this.canGoOffline=!1,this.offlineTaskService.setCanGoOfflineMode(!1),this.updateUserDetails(null),this.emitSessionState("ANONYMOUS")}logout(){return this.loginRequestDispatched=!1,(0,c.x)(this.lightHttp.post(this.apiConfig.getLogoutEndpoint(),{},{withCredentials:!0}).pipe(T.UW).pipe((0,f.Z)(e=>(this.authService.unsetAuthToken(),this.canGoOffline=!1,this.offlineTaskService.setCanGoOfflineMode(!1),this.isUserLoggedIn=!1,this.isUserAuthenticated=!1,this.authenticate())),(0,g.M)(()=>{this.updateUserDetails(null)}),(0,f.Z)(e=>this.login(null,null,null).pipe((0,v.T)(()=>e)))))}authenticate(){if(this.authService.getToken())return this.isUserAuthenticated=!0,this.logger.trace7(`%cUser already has a valid token. Authentication skipped. Token state: ${!!this.authService.getToken()}`),(0,l.of)({});let e=this.lightHttp.post(this.apiConfig.getAuthenticateEndpoint(),{authToken:this.authService.getToken()},{withCredentials:!0}).pipe(T.UW,(0,m.W)(e=>(0,l.of)(e))),t=new s.m(1);return this.isUserAuthenticated||this.loginRequestDispatched||e.subscribe({next:e=>{let r=e.bearer;r?(this.authService.setAuthToken(r),this.storageService.store(D.N.USER_SETTING_KEY_PREFIX,w.uu.MOTIVE_STORAGE_KEY,e.motive),this.isUserAuthenticated=!0,this.logger.trace7("%cUser authentication successful. Token updated!")):this.logger.trace7(`%cSkipped respond from auth service. setAuthToken was already called. Token state: ${!!this.authService.getToken()} and PSToken: ${!!r}`),t.next(e),t.complete()},error:e=>{t.error(e)}}),t.asObservable()}resetPassword(e,t,r,n){return(0,u.H)(L(t||"")).pipe((0,f.Z)(t=>this.lightHttp.post(this.apiConfig.getResetPasswordEndpoint(),{email:e,password:t,token:r,k:n},{withCredentials:!0}).pipe(T.UW)))}verifyAccount(e){return this.lightHttp.post(this.apiConfig.getAccountVerifyEndpoint(),{k:e},{withCredentials:!0}).pipe(T.UW)}getDefaultHeaders(){return{...C.C.hasWindow()?{location:window.location.href}:void 0}}retryIdentityOnce(e=Date.now()){let t=Math.max(0,Math.min((this.identityFailure?.retryAt??0)-e,j.ANON_429_MAX_WAIT_MS));return t>0&&this.uiContext.warnToast("Too many sign-ins from your network",`Retrying in ${Math.ceil(t/1e3)} s…`,!1,!1),(0,d.O)(t).pipe((0,f.Z)(()=>this.login(null,null,null,{singleAttempt:!0})))}login(e,t,r,n={}){let o=!e&&!t&&!r,s=!0===n.singleAttempt;if(o&&this.inFlightLogin$)return this.inFlightLogin$;this.loginRequestDispatched=!0;let a=!this.authService.getToken(),c=(0,u.H)(L(t)).pipe((0,f.Z)(t=>this.lightHttp.post(this.apiConfig.getLoginEndpoint(),{email:e,password:t,token:r,...this.getDefaultHeaders()},{withCredentials:!0}).pipe((0,y.L)({count:Math.max(2,j.ANON_429_TRIES-1),delay:(e,t)=>{let r=e&&e.status||0;if(0===r&&t<=2)return(0,d.O)(3e3);if(429===r&&o&&a&&!s&&t<j.ANON_429_TRIES){let t=j.anon429DelayMs(e);return this.identityRetryNoticed||(this.identityRetryNoticed=!0,this.uiContext.warnToast("Too many sign-ins from your network",`Retrying in ${Math.ceil(t/1e3)} s…`,!1,!1)),(0,d.O)(t)}throw e}}),(0,m.W)(e=>o&&a&&429===(e&&e.status||0)?(this.identityFailure=new x.LK(void 0,Date.now()+j.anon429DelayMs(e)),this.identityEventsSubject?.next(this.identityFailure),(0,h.$)(()=>this.identityFailure)):(o&&a&&this.identityEventsSubject?.next(e??Error("login failed")),(0,h.$)(()=>e))),(0,g.M)(()=>{this.identityFailure=null,this.identityRetryNoticed=!1}),T.UW,(0,f.Z)(e=>{if(e.bearer&&this.authService.setAuthToken(e.bearer),e.registered?(this.offlineTaskService.setCanGoOfflineMode(e.canGoOffline),this.isUserLoggedIn=!0,this.canGoOffline=e.canGoOffline,this.emitSessionState("LOGGED_IN")):(this.offlineTaskService.setCanGoOfflineMode(!!e.canGoOffline),this.canGoOffline=!!e.canGoOffline,this.isUserLoggedIn=!1,this.emitSessionState("ANONYMOUS")),this.storageService.store(D.N.USER_
9SETTING_KEY_PREFIX,w.uu.MOTIVE_STORAGE_KEY,e.motive),this.loginRequestDispatched=!1,e.registered)return this.getUserDetailsOnce$().pipe((0,b.n)(t=>(this.updateUserDetails((0,i.om)(T.ck,t)),(0,l.of)(e))),(0,m.W)(t=>{let r=t&&t.status||0;if(401===r||403===r)return this.logger.info({message:"/user-details rejected bearer after login; clearing session",data:{status:r}}),this.authService.unsetAuthToken(),this.isUserLoggedIn=!1,this.canGoOffline=!1,this.offlineTaskService.setCanGoOfflineMode(!1),this.updateUserDetails(null),(0,l.of)({...e,registered:!1,bearer:null,error:!0});throw t}));try{this.updateUserDetails(null)}catch(e){}return(0,l.of)(e)}),(0,f.Z)(e=>this.loadSessionInfo().pipe((0,v.T)(()=>e)))))).pipe((0,S.j)(()=>{this.inFlightLogin$===c&&(this.inFlightLogin$=null)}),(0,E.t)({bufferSize:1,refCount:!1}));return o&&(this.inFlightLogin$=c),c}updateUserDetails(e){this._userDetails=e,this._onUserDetailsChanged.next(e)}register(e,t,r){return(0,u.H)(L(t)).pipe((0,f.Z)(t=>this.lightHttp.post(this.apiConfig.getRegisterEndpoint(),{email:e,password:t,token:r},{withCredentials:!0}).pipe(T.UW,(0,f.Z)(e=>(e.bearer&&this.authService.setAuthToken(e.bearer),e.registered)?(this.offlineTaskService.setCanGoOfflineMode(e.canGoOffline),this.isUserLoggedIn=!0,this.canGoOffline=e.canGoOffline,this.getUserDetailsOnce$().pipe((0,b.n)(t=>(this.updateUserDetails((0,i.om)(T.ck,t)),(0,l.of)(e))),(0,m.W)(t=>{let r=t&&t.status||0;if(401===r||403===r)return this.clearLocalSession(),(0,l.of)({...e,registered:!1,bearer:null,error:!0});throw t}))):(0,l.of)(e)))))}validateEmail(e){return this.lightHttp.post(this.apiConfig.getEmailValidateEndpoint(),{email:e}).pipe(T.UW)}getUserDetailsOnce$(){return this.lightHttp.post(this.apiConfig.getUserDetailsEndpoint(),{}).pipe(T.UW,(0,v.T)(e=>(0,i.om)(T.ck,e)))}recover(e,t){return this.lightHttp.post(this.apiConfig.getRecoverPasswordEndpoint(),{email:e,token:t}).pipe(T.UW)}authorizeFileProcessRequest(){return this.lightHttp.post(this.apiConfig.getProcessAuthEndpoint(),{}).pipe(T.UW)}}j=(0,n.Cg)([(0,o._G)(),(0,n.Qj)(0,(0,o.WQ)(I.ApiConfig)),(0,n.Qj)(1,(0,o.WQ)(P.u)),(0,n.Qj)(2,(0,o.WQ)(k.g1)),(0,n.Qj)(3,(0,o.WQ)(D.n)),(0,n.Qj)(4,(0,o.WQ)(M.L)),(0,n.Qj)(5,(0,o.WQ)(R._)),(0,n.Qj)(6,(0,o.WQ)(F.s)),(0,n.Qj)(7,(0,o.WQ)(x.jo)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===I.ApiConfig?Object:I.ApiConfig,void 0===P.u?Object:P.u,void 0===k.g1?Object:k.g1,void 0===D.n?Object:D.n,void 0===M.L?Object:M.L,void 0===R._?Object:R._,void 0===F.s?Object:F.s,void 0===x.jo?Object:x.jo])],j)},29404:(e,t,r)=>{"use strict";r.d(t,{transferTray:()=>S});let n="xconvert-transfer",i="files",o="session",s=2,a=18e5,l=8,c=262144e3,u=144e5,d=6,h=262144e3,p=0x3c00000,f="xconvert-session-file-count";function g(e){try{if("u"<typeof localStorage)return;e>0?localStorage.setItem(f,String(e)):localStorage.removeItem(f)}catch{}}function m(){try{if("u"<typeof localStorage)return 0;let e=parseInt(localStorage.getItem(f)||"0",10);return Number.isFinite(e)&&e>0?Math.min(e,d):0}catch{return 0}}function v(){return new Promise(e=>{try{if("u"<typeof indexedDB)return e(null);let t=indexedDB.open(n,s);t.onupgradeneeded=()=>{let e=t.result;e.objectStoreNames.contains(i)||e.createObjectStore(i,{keyPath:"xferId"}),e.objectStoreNames.contains(o)||e.createObjectStore(o,{keyPath:"id"})},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null)}catch{e(null)}})}function y(e,t,r=i){return v().then(n=>n?new Promise(i=>{try{let o=n.transaction(r,e),s=t(o.objectStore(r));s.onsuccess=()=>i(s.result),s.onerror=()=>i(null),o.oncomplete=()=>n.close()}catch{i(null)}}):null)}class b{async put(e,t,r){if(!e||0===e.length||e.length>l||e.reduce((e,t)=>e+(t.size||0),0)>c)return null;let n=this.mintId();await this.clear();let i={xferId:n,createdAt:Date.now(),files:e,fromSlug:t,fromTitle:r};return null===await y("readwrite",e=>e.put(i))?null:n}async take(e){if(!e)return null;let t=await y("readonly",t=>t.get(e));return(await y("readwrite",t=>t.delete(e)),!t||!t.files||0===t.files.length||Date.now()-(t.createdAt||0)>a)?null:t}async clear(){await y("readwrite",e=>e.clear())}async sweepExpired(){let e=await y("readonly",e=>e.getAll());if(e&&e.length>0){let t=Date.now();for(let r of e)t-(r.createdAt||0)>a&&await y("readwrite",e=>e.delete(r.xferId))}await this.sweepSession()}async remember(e,t,r){try{if(!e||0===e.length)return;let n=e.filter(e=>e&&e.size>0&&e.size<=p);if(0===n.length)return;let i=await this.session(),s=[];for(let e of n)s.some(t=>t.name===e.name&&t.size===e.size)||s.push({id:this.mintId(),createdAt:Date.now(),file:e,name:e.name,size:e.size,extension:(e.name.split(".").pop()||"").toLowerCase(),fromSlug:t,fromTitle:r});for(let e of i)s.some(t=>t.name===e.name&&t.size===e.size)||s.push(e);s.sort((e,t)=>
9t.createdAt-e.createdAt);let a=[],l=0;for(let e of s){if(a.length>=d)break;l+e.size>h||(l+=e.size,a.push(e))}for(let e of(await y("readwrite",e=>e.clear(),o),a))await y("readwrite",t=>t.put(e),o);g(a.length)}catch{}}async session(){let e=await y("readonly",e=>e.getAll(),o);if(!e||0===e.length)return g(0),[];let t=Date.now(),r=e.filter(e=>e&&e.file&&t-(e.createdAt||0)<=u).sort((e,t)=>t.createdAt-e.createdAt);return g(r.length),r}async forget(e){e&&(await y("readwrite",t=>t.delete(e),o),g(Math.max(0,m()-1)))}async forgetAll(){await y("readwrite",e=>e.clear(),o),g(0)}async sweepSession(){let e=await y("readonly",e=>e.getAll(),o);if(!e||0===e.length)return;let t=Date.now();for(let r of e)t-(r.createdAt||0)>u&&await y("readwrite",e=>e.delete(r.id),o)}mintId(){try{if("u">typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID()}catch{}return`xfer-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}}let S=new b},29572:(e,t,r)=>{"use strict";r.d(t,{x:()=>o});var n=r(63136),i=r(77698);function o(e){return(0,i.T)(null==e?void 0:e[n.l])}},29656:()=>{"use strict";var e,t=Array.prototype,r=Object.prototype,n=Function.prototype,i=String.prototype,o=t.slice,s=r.toString,a=function(e){return"[object Function]"===r.toString.call(e)},l=function(e){return"[object Array]"===s.call(e)},c=function(e){return"[object String]"===s.call(e)};e=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}()?function(e,t,r,n){!n&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:r})}:function(e,t,r,n){!n&&t in e||(e[t]=r)};var u=function(t,n,i){for(var o in n)r.hasOwnProperty.call(n,o)&&e(t,o,n[o],i)},d=function(e){if(null==e)throw TypeError("can't convert "+e+" to object");return Object(e)};function h(e){var t=+e;return t!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function p(e){return e>>>0}function f(){}u(n,{bind:function(e){var t=this;if(!a(t))throw TypeError("Function.prototype.bind called on incompatible "+t);for(var r=o.call(arguments,1),n=function(){if(!(this instanceof c))return t.apply(e,r.concat(o.call(arguments)));var n=t.apply(this,r.concat(o.call(arguments)));return Object(n)===n?n:this},i=Math.max(0,t.length-r.length),s=[],l=0;l<i;l++)s.push("$"+l);var c=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this, arguments); }")(n);return t.prototype&&(f.prototype=t.prototype,c.prototype=new f,f.prototype=null),c}}),u(Array,{isArray:l});var g=Object("a"),m="a"!==g[0]||!(0 in g);u(t,{forEach:function(e){var t=d(this),r=m&&c(this)?this.split(""):t,n=arguments[1],i=-1,o=r.length>>>0;if(!a(e))throw TypeError();for(;++i<o;)i in r&&e.call(n,r[i],i,t)}},!function(e){var t=!0,r=!0;return e&&(e.call("foo",function(e,r,n){"object"!=typeof n&&(t=!1)}),e.call([1],function(){r="string"==typeof this},"x")),!!e&&t&&r}(t.forEach)),u(t,{indexOf:function(e){var t=m&&c(this)?this.split(""):d(this),r=t.length>>>0;if(!r)return -1;var n=0;for(arguments.length>1&&(n=h(arguments[1])),n=n>=0?n:Math.max(0,r+n);n<r;n++)if(n in t&&t[n]===e)return n;return -1}},Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2));var v=i.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?function(){var e=void 0===/()??/.exec("")[1];i.split=function(r,n){var i=this;if(void 0===r&&0===n)return[];if("[object RegExp]"!==s.call(r))return v.call(this,r,n);var o,a,l,c,u=[],d=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.extended?"x":"")+(r.sticky?"y":""),h=0;for(r=RegExp(r.source,d+"g"),i+="",e||(o=RegExp("^"+r.source+"$(?!\\s)",d)),n=void 0===n?0xffffffff:p(n);(a=r.exec(i))&&(!((l=a.index+a[0].length)>h)||(u.push(i.slice(h,a.index)),!e&&a.length>1&&a[0].replace(o,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(a[e]=void 0)}),a.length>1&&a.index<i.length&&t.push.apply(u,a.slice(1)),c=a[0].length,h=l,!(u.length>=n)));)r.lastIndex===a.index&&r.lastIndex++;return h===i.length?(c||!r.test(""))&&u.push(""):u.push(i.slice(h)),u.length>n?u.slice(0,n):u}}():"0".split(void 0,0).length&&(i.split=function(e,t){return void 0===e&&0===t?[]:v.call(this,e,t)});var y=i.substr;
9u(i,{substr:function(e,t){return y.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},"".substr&&"b"!=="0b".substr(-1))},29907:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=Function.prototype.toString;let i=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},29934:(e,t,r)=>{var n=r(59059),i=r(6216),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},30243:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(21194);let i=function(e){var t=new e.constructor(e.byteLength);return new n.A(t).set(new n.A(e)),t}},30580:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});let n=new Set,i={add(e){e&&n.add(e)},delete(e){e&&n.delete(e)},has:e=>!!e&&n.has(e),clear(){n.clear()}}},30591:(e,t,r)=>{"use strict";r.d(t,{l:()=>a});var n=r(2943),i=r(3649),o=r(99991),s=r(32277);function a(e){return(0,o.N)(function(t,r){var o,a,l=!1,c=function(){o=t.subscribe((0,s._)(r,void 0,void 0,function(t){a||(a=new i.B,(0,n.Tg)(e(a)).subscribe((0,s._)(r,function(){return o?c():l=!0}))),a&&a.next(t)})),l&&(o.unsubscribe(),o=null,l=!1,c())};c()})}},30598:(e,t,r)=>{"use strict";var n=r(2170);e.exports=r(3943)(n),"_sockjs_onload"in r.g&&setTimeout(r.g._sockjs_onload,1)},30839:(e,t,r)=>{"use strict";var n=r(82007).b,i=r(93570),o=r(70087),s=function(){};function a(e,t){n.call(this);var r=this,i=+new Date;this.xo=new t("GET",e),this.xo.once("finish",function(e,t){var n,a;if(200===e){if(a=new Date-i,t)try{n=JSON.parse(t)}catch(e){s("bad json",t)}o.isObject(n)||(n={})}r.emit("finish",n,a),r.removeAllListeners()})}i(a,n),a.prototype.close=function(){this.removeAllListeners(),this.xo.close()},e.exports=a},31504:e=>{e.exports={"spinner-container":"spinner_modal_spinner-container__zGFV3","spinner-inner":"spinner_modal_spinner-inner__ciK5G","spinner-border":"spinner_modal_spinner-border__lcNJl",message:"spinner_modal_message__10vU7"}},31962:(e,t,r)=>{"use strict";r.d(t,{u:()=>l});var n=r(4902),i=r(43604),o=r(98683),s=r(79347),a=r(41451);class l{constructor(e){this.storageService=e,s.jo.registerAuthTokenProvider(this)}getToken(){return this.authToken||this.storageService.get(a.N.USER_SETTING_KEY_PREFIX,o.K1.AUTH_BEARER_STORAGE_KEY)}setAuthToken(e){this.storageService.store(a.N.USER_SETTING_KEY_PREFIX,o.K1.AUTH_BEARER_STORAGE_KEY,e),this.authToken=e}unsetAuthToken(){this.storageService.remove(a.N.USER_SETTING_KEY_PREFIX,o.K1.AUTH_BEARER_STORAGE_KEY),this.authToken=null}}l=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a.n)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.n?Object:a.n])],l)},32128:(e,t,r)=>{"use strict";r.d(t,{s:()=>s});var n=r(56706),i=r(99991),o=r(32277);function s(e){return e<=0?function(){return n.w}:(0,i.N)(function(t,r){var n=0;t.subscribe((0,o._)(r,function(t){++n<=e&&(r.next(t),e<=n&&r.complete())}))})}},32277:(e,t,r)=>{"use strict";r.d(t,{_:()=>i});var n=r(4902);function i(e,t,r,n,i){return new o(e,t,r,n,i)}var o=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return(0,n.C6)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null==(t=this.onFinalize)||t.call(this)}},t}(r(80967).vU)},32607:(e,t,r)=>{"use strict";r.d(t,{Ah:()=>u,kC:()=>h});let n=/^[A-Za-z0-9._-]{8,64}$/,i=48,o=8,s=!1,a="",l=0;function c(e){let t=(e||"").replace(/[^A-Za-z0-9._-]/g,"").slice(0,i);return t.length>=o?t:(t+(Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2))).slice(0,i)}function u(e){s=!!e.enabled,null!=e.sessionId&&(a=c(e.sessionId))}function d(){if(!s)return null;a||(a=c("")),l+=1;let e=`${a}-${l}`;return n.test(e)?e:null}function h(){let e=d();return e?{"X-Request-Id":e}:null}},32981:(e,t,r)=>{"use strict";function n(e){if(Uint8Array.prototype.toBase64)return e.toBase64();let t=32768,r=[];for(let n=0;n<e.length;n+=t)r.push(String.fromCharCode.apply(null,e.subarray(n,n+t)));return btoa(r.join(""))}function i(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}r.d(t,{W:()=>n,y:()=>i})},33065:(e,t,r)=>{var n=r(50224),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},33270:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(67783),i=r(50076),o=r(4527),s=r(87125),a=r(48710),l=r(28461);let c=function(e,t,r){t=(0,n.A)(t,e);for(var c=-1,u=t.length,d=!1;++c<u;){var h=(0,l.A)(t[c]);if(!(d=null!=e&&r(e,h)))break;e=e[h]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&(0,a.A)(u)&&(0,s.A)(h,u)&&((0,o.A)(e)||(0,i.A)(e))}},33353:(e,t,r)=>{"use strict";r.d(t,{_:()=>l});var n=r(4902),i=r(43604),o=r(67705),s=r(9711),a=r(46183);class l{constructor(e){this.toastr=e,this.logger=s.V.getLogger("UIContext")}successToast(e,t,r=5e3){this.toastr.success(t,e,{timeout:r})}errorToast(e,t,r,n){this.logger.error({message:t}),this.toastr.error(t,e)}warnToast(e,t,r,n){this.logger.warn({message:t}),this.toastr.warning(t,e)}noticeWithAction(e,t,r,n){this.logger.warn({message:t}),this.toastr.warning(e,t,{role:"status",mustClose:!0,actionLabel:r,onAction:n})}handleError(e,t){this.logger.error(e);let r=e&&e.name||"Error",n=e&&e.message||"Something went wrong!";o.A.create({title:r,text:n,type:"danger",showCancelButton:!1,confirmButtonText:t?.confirmButtonText||"Ok!",confirmButtonCallback:t?.confirmButtonCallback})}logToSentry(e,t,r=!0,n=!0){}stackTrace(){return Error().stack}showErrorDialog(e){let t=e.text||(e.html?e.html.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim():"No details");try{this.logger.error({message:`${e.title} ${t}`,data:e})}catch(r){this.logger.error({message:`${e.title} ${t}`})}o.A.create({title:e.title,text:e.text,html:e.html,type:"danger",showCancelButton:e.showCancelButton||!1,confirmButtonText:e.confirmButtonText||"Ok!",cancelButtonText:e.cancelButtonText||"Cancel",confirmButtonCallback:e.successCallback,cancelButtonCallback:e.cancelCallback})}showSuccessDialog(e,t,r){o.A.create({title:e,text:t,html:r,type:"success",showCancelButton:!1,confirmButtonText:"Ok!"})}showConfirmationWarningDialog(e,t,r,n=!0,i="No",s="Yes",a=()=>null){o.A.create({title:e,text:t,type:"warning",showCancelButton:n,cancelButtonText:i,confirmButtonText:s,confirmButtonCallback:r,cancelButtonCallback:a})}showDialogWithInput(e,t,r){return Promise.reject("Not implemented!")}}l=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a.f)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.f?Object:a.f])],l)},33395:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(83497),i=Object.create;let o=function(){function e(){}return function(t){if(!(0,n.A)(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var s=r(81365),a=r(84147);let l=function(e){return"function"!=typeof e.constructor||(0,a.A)(e)?{}:o((0,s.A)(e))}},33441:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});
9var n=r(99991),i=r(32277);function o(e,t){return(0,n.N)(function(r,n){var o=0;r.subscribe((0,i._)(n,function(r){return e.call(t,r,o++)&&n.next(r)}))})}},33872:(e,t,r)=>{var n=r(92441),i=r(28375),o=r(63700),s=r(78583),a=r(24015),l=r(93007),c=r(4756),u=r(82731),d=1,h="[object Arguments]",p="[object Array]",f="[object Object]",g=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,m,v,y){var b=l(e),S=l(t),E=b?p:a(e),w=S?p:a(t);E=E==h?f:E,w=w==h?f:w;var _=E==f,A=w==f,T=E==w;if(T&&c(e)){if(!c(t))return!1;b=!0,_=!1}if(T&&!_)return y||(y=new n),b||u(e)?i(e,t,r,m,v,y):o(e,t,E,r,m,v,y);if(!(r&d)){var O=_&&g.call(e,"__wrapped__"),C=A&&g.call(t,"__wrapped__");if(O||C){var I=O?e.value():e,P=C?t.value():t;return y||(y=new n),v(I,P,r,m,y)}}return!!T&&(y||(y=new n),s(e,t,r,m,v,y))}},34203:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(89034),i=r(66641),o=r(50076),s=r(4527),a=r(78304),l=r(36670),c=r(84147),u=r(12610),d="[object Map]",h="[object Set]",p=Object.prototype.hasOwnProperty;let f=function(e){if(null==e)return!0;if((0,a.A)(e)&&((0,s.A)(e)||"string"==typeof e||"function"==typeof e.splice||(0,l.A)(e)||(0,u.A)(e)||(0,o.A)(e)))return!e.length;var t=(0,i.A)(e);if(t==d||t==h)return!e.size;if((0,c.A)(e))return!(0,n.A)(e).length;for(var r in e)if(p.call(e,r))return!1;return!0}},34705:e=>{e.exports=function(){return!1}},34753:(e,t,r)=>{"use strict";r.d(t,{A8:()=>a,Bu:()=>U,Eg:()=>B,HV:()=>c,Hi:()=>X,J3:()=>O,J9:()=>E,Jt:()=>W,QJ:()=>V,Wh:()=>L,Y6:()=>j,_H:()=>T,__:()=>K,_y:()=>u,aN:()=>_,ft:()=>l,gc:()=>H,gp:()=>v,jL:()=>w,lx:()=>A,oE:()=>$,rZ:()=>I,sx:()=>k,yK:()=>z});var n=r(8323),i=r(41451),o=r(68459);let s="STUDIO",a=1,l=3,c=9e6,u=2.5,d=5,h=750,p="INDEX",f="LATEST-",g="INTERRUPTED-",m="__xc_studio_probe__";function v(e){let t=e?.getResponse?.(),r=e?.getMetadata?.()?.processorMetadataList?.[0];return t&&t.location&&r&&r.uploadDomain?{originalInputFile:{...t},processorMetadata:{...r},uniqueProcessType:String(e?.uniqueProcessType??"")}:null}let y=new Set(["fileMetadata","postProcessMetadata"]);function b(e){let t=e.clips.filter(e=>e?.wire?.processorMetadata);if(0===t.length)return e;let r=t[0].wire.processorMetadata,n={};for(let e of Object.keys(r)){if(y.has(e))continue;let i=JSON.stringify(r[e]);t.every(t=>JSON.stringify(t.wire.processorMetadata[e])===i)&&(n[e]=r[e])}if(0===Object.keys(n).length)return e;let i=e.clips.map(e=>{if(!e?.wire?.processorMetadata)return e;let t={};for(let[r,i]of Object.entries(e.wire.processorMetadata))r in n||(t[r]=i);return{...e,wire:{...e.wire,processorMetadata:t}}});return{...e,clips:i,shared:{processorMetadata:n}}}function S(e){let t=e?.shared?.processorMetadata;if(!t||"object"!=typeof t)return e;let r=e.clips.map(e=>e?.wire?.processorMetadata?{...e,wire:{...e.wire,processorMetadata:{...t,...e.wire.processorMetadata}}}:e),{shared:n,...i}=e;return{...i,clips:r}}function E(e){let t="number"==typeof e.rules&&Number.isFinite(e.rules)?e.rules:1;if(t>=l)return e;let r=e.doc;if(t<2&&Array.isArray(r?.clips)){let e=r.clips.map(e=>{if("VIDEO"!==e.kind||e.audio?.mode!=="MUTE")return e;let{mode:t,...r}=e.audio,{audio:n,...i}=e;return Object.keys(r).length>0?{...i,audio:r}:i});r={...r,clips:e}}return t<3&&r?.transition?.type==="CROSSFADE"&&500===r.transition.durationMs&&(r={...r,transition:{...r.transition,type:"NONE"}}),{...e,doc:r,rules:l}}function w(){let e="u">typeof crypto&&"function"==typeof crypto.getRandomValues?Array.from(crypto.getRandomValues(new Uint8Array(6))).map(e=>e.toString(16).padStart(2,"0")).join(""):Math.random().toString(16).slice(2,14);return`t${e}`}function _(e,t=0){return Math.max("number"==typeof e?.generation&&Number.isFinite(e.generation)?e.generation:0,t)+1}function A(e,t,r,n){let i;if(!e||e.key!==x(t)||!e.newValue)return null;try{i=JSON.parse(e.newValue)}catch{return null}return F(i)&&i.v===a&&i.writer!==r&&"number"==typeof i.generation&&i.generation>n?S(i):null}function T(e,t){return C(e)===C(t)}function O(e,t){if(!Array.isArray(e)||!Array.isArray(t)||t.length<e.length)return!1;for(let r=0;r<e.length;r+=1){let n=e[r],i=t[r];if(!n||!i)return!1;let o=n.uploadedFileId||"",s=i.uploadedFileId||"",a=!0===n.removed,l=!0===i.removed;if((o!==s||a!==l)&&(""!==o||a||""===s||l))return!1}return!0}function C(e){if(null===e||"object"!=typeof e)return JSON.stringify(e)??"undefined";if(Array.isArray(e))return`[${e.map(e=>C(e)).join(",")}]`;let t=e,r=Object.keys(t).filter(e=>void 0!==t[e]).sort();return`{${r.map(e=>`${JSON.stringify(e)}:${C(t[e])}`).join(",")}}`}function I(e,t,r,n=Date.now()){let i=L(e,n);if(!i||!Array.isArray(i.clips)||0===t.length)return null;let o=i.clips.slice(),s=new Set,a=e=>
9{let t=o[e];return!!t&&!s.has(e)&&!t.uploadedFileId&&!0!==t.removed},l=0;for(let e of t){if(!e?.uploadedFileId)continue;let t=o.findIndex((t,r)=>a(r)&&t.clipId===e.clipId);t<0&&(t=o.findIndex((t,r)=>a(r)&&!!e.name&&t.name===e.name&&(!t.size||!e.size||t.size===e.size))),t<0||(s.add(t),o[t]={...e,clipId:o[t].clipId},l+=1)}if(0===l)return null;let c={...i,clips:o,savedAt:n,generation:_(i),writer:r};return{result:U(c),record:c}}function P(){try{return n.k.get(i.n)}catch{return null}}function x(e){return`${s}-${e}`}function k(){try{let e=`probe-${Date.now()}`;window.localStorage.setItem(m,e);let t=window.localStorage.getItem(m);return window.localStorage.removeItem(m),t===e?"ok":"disabled"}catch{return"disabled"}}function M(e){try{let t=window.localStorage.getItem(x(e));return null==t?null:JSON.parse(t)}catch{return null}}function D(e,t){let r,n=P();if(!n)return!1;try{r=JSON.stringify(t)}catch{return!1}try{return n.store(s,e,t),window.localStorage.getItem(x(e))===r}catch{return!1}}function R(e){let t=P();try{t?t.remove(s,e):window.localStorage.removeItem(x(e))}catch{}}function F(e){if(!e||"object"!=typeof e)return!1;let t=e;return"project"===t.kind&&"string"==typeof t.projectId&&"object"==typeof t.doc&&null!==t.doc}function N(e){let t=M(e);return F(t)?t:null}function L(e,t=Date.now()){if(!(0,o.pz)(e))return null;let r=N(e);return!r||r.v!==a||"number"==typeof r.savedAt&&t-r.savedAt>=c?null:S(r)}function j(e){let t=e?.submission;if(!t||"object"!=typeof t)return null;let{signature:r,revision:n}=t;return"string"!=typeof r||0===r.length||"number"!=typeof n||!Number.isFinite(n)||n<1?null:{signature:r,revision:Math.trunc(n)}}function U(e){if(!(0,o.pz)(e.projectId)||(0,o.Bz)(e.projectId))return{status:"disabled"};let t=N(e.projectId);if(t&&t.v!==a)return{status:"foreign-version",version:"number"==typeof t.v?t.v:0};let r=t,n=null!=r&&"string"==typeof r.writer&&r.writer===e.writer;if(r&&(n?r.generation>e.generation:r.generation>=e.generation))return{status:"conflict",stored:r};let{shared:i,...s}=r??{},l=b({...s,...e,v:a,kind:"project"});return D(e.projectId,l)?{status:"saved"}:{status:"disabled"}}function $(e){if(!(0,o.pz)(e))return;R(e);let t=G(),r=t.filter(t=>t.projectId!==e);r.length!==t.length&&D(p,r)}function B(e){let t=M(`${f}${e}`);return"string"==typeof t&&(0,o.pz)(t)?t:null}function W(e,t){(0,o.pz)(t)&&D(`${f}${e}`,t)}function z(e,t,r){let n=`${g}${e}`;t&&0!==t.length?D(n,{names:t.slice(0,50).map(e=>String(e)),at:Date.now(),...r?{projectId:r}:{}}):R(n)}function H(e,t){let r=`${g}${e}`,n=M(r);return(R(r),n&&"object"==typeof n&&Array.isArray(n.names)&&(!t||"string"!=typeof n.projectId||n.projectId===t))?n.names.filter(e=>"string"==typeof e):[]}function G(){let e=M(p);return Array.isArray(e)?e.filter(e=>!!e&&"object"==typeof e&&"string"==typeof e.projectId):[]}function V(e){let t=G(),r=t.filter(t=>t.projectId!==e.projectId),n=[e,...r],i=n.slice(0,d);for(let e of n.slice(d))R(e.projectId);return Q(t,i)||D(p,i),i}function Q(e,t){return e.length===t.length&&e.every((e,r)=>e.projectId===t[r].projectId&&e.pageSlug===t[r].pageSlug&&e.savedAt===t[r].savedAt&&e.clips===t[r].clips)}function q(){let e=[];try{for(let t=0;t<window.localStorage.length;t+=1){let r=window.localStorage.key(t);null!==r&&e.push(r)}}catch{return[]}return e}function K(e=Date.now()){let t=[];for(let r of q()){if(!r.startsWith(`${s}-`))continue;let n=r.slice(s.length+1);if(n===p||n.startsWith(f)||n.startsWith(g))continue;let i=M(n),o=F(i)&&"number"==typeof i.savedAt?i.savedAt:null;null!==o&&e-o<c||(R(n),t.push(n))}return t.length>0&&D(p,G().filter(e=>!t.includes(e.projectId))),t}function X(e,t=h,r){let n=null,i=null,o=!1,s=!1,a="saved",l=null,c=e=>{e!==a&&(a=e,r&&r(e))},u=()=>{null!==n&&(clearTimeout(n),n=null)},d=t=>{let r=e(t);if("saved"===r.status){s=!1,l=null,c("saved");return}l=t,"disabled"===r.status&&(s=!0),c("disabled")},p=()=>{if(u(),!i||o||s)return;let e=i;i=null,d(e)},f=()=>p();return window.addEventListener("pagehide",f),{schedule(e){if(!o){if(i=e,s)return void c("disabled");c("saving"),u(),n=setTimeout(p,t)}},flush(){if(u(),o)return;let e=i??l;e&&(i=null,d(e))},status:()=>a,stop(){o=!0,u(),i=null,l=null,window.removeEventListener("pagehide",f)}}}},35072:(e,t,r)=>{"use strict";r.d(t,{A:()=>T});let n=(0,r(66128).A)(Object,"create"),i=function(){this.__data__=n?n(null):{},this.size=0},o=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t};var s="__lodash_hash_undefined__",a=Object.prototype.hasOwnProperty;let l=function(e){var t=this.__data__;if(n){var r=t[e];return r===s?void 0:r}return a.call(t,e)?t[e]:void 0};var c=Object.prototype.hasOwnProperty;let u=function(e){var t=this.__data__;return n?void 0!==t[e]:c.call(t,e)};var d="__lodash_hash_undefined__";let h=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=n&&void 0===t?d:t,this};function p(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}p.prototype.clear=i,p.prototype.delete=o,p.prototype.get=l,p.prototype.has=u,p.prototype.set=h;let f=p;var g=r(97591),m=r(5915);let v=function(){this.size=0,this.__data__={hash:new f,map:new(m.A||g.A),string:new f}},y=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},b=function(e,t){var r=e.__data__;
9return y(t)?r["string"==typeof t?"string":"hash"]:r.map},S=function(e){var t=b(this,e).delete(e);return this.size-=!!t,t},E=function(e){return b(this,e).get(e)},w=function(e){return b(this,e).has(e)},_=function(e,t){var r=b(this,e),n=r.size;return r.set(e,t),this.size+=+(r.size!=n),this};function A(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}A.prototype.clear=v,A.prototype.delete=S,A.prototype.get=E,A.prototype.has=w,A.prototype.set=_;let T=A},35209:(e,t,r)=>{"use strict";r.d(t,{j:()=>i});var n=r(99991);function i(e){return(0,n.N)(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}},35231:(e,t,r)=>{"use strict";r.d(t,{Q:()=>g});var n=r(4902),i=r(91040),o=r(43604),s=r(25050),a=r(32607),l=r(61827),c=r(51352),u=r(9968),d=r(79794),h=r(2807),p=r(79347),f=r(22902);class g{static{this.wsDataProvider={getOrCreateStoredWSId:()=>null,getStoredWSDomain:()=>null}}static{this.loginUserDetailsProvider={userIpAddress:null,userCountry:null}}static{this.commonHttpHeadersProvider={getCommonHttpHeaders:()=>({})}}static{this.authTokenProvider={getToken:()=>null}}static{this.apiErrorSink=null}constructor(e,t,r){this.apiConfig=e,this.env=t,this.domStorage=r}get(e,t){let r=this.convertHttpRequestOptionsToAxiosRequestConfig(e,t);return this.withApiErrorReporting(e,"GET",i.A.get(e,r))}withApiErrorReporting(e,t,r){let n=Date.now();return r.catch(r=>{throw(0,s.Dh)(g.apiErrorSink,e,t,r,Date.now()-n),r})}request(e,t,r,n){switch(t){case"GET":return this.get(e,n);case"POST":return this.post(e,r,n);case"PUT":return this.put(e,r,n);case"PATCH":return this.patch(e,r,n);case"DELETE":return this.delete(e,n);case"HEAD":throw Error("Not supported")}}post(e,t,r){let n=this.convertHttpRequestOptionsToAxiosRequestConfig(e,r);return this.withApiErrorReporting(e,"POST",i.A.post(e,t,n))}put(e,t,r){let n=this.convertHttpRequestOptionsToAxiosRequestConfig(e,r);return this.withApiErrorReporting(e,"PUT",i.A.put(e,t,n))}patch(e,t,r){let n=this.convertHttpRequestOptionsToAxiosRequestConfig(e,r);return this.withApiErrorReporting(e,"PATCH",i.A.patch(e,t,n))}delete(e,t){let r=this.convertHttpRequestOptionsToAxiosRequestConfig(e,t);return this.withApiErrorReporting(e,"DELETE",i.A.delete(e,r))}convertHttpRequestOptionsToAxiosRequestConfig(e,t){let r={},n=this.getCommonHeaders(e);return t?(r.headers=Object.assign({},n,t.headers),r.withCredentials=t.withCredentials,r.params=t.params,r.responseType=t.responseType,r.timeout=t.timeout):r.headers=n,r}convertToProgressEvent(e){return"upload_progress"===e.type||"download_progress"===e.type?{event:{loaded:e.loaded,total:e.total},type:"upload_progress"===e.type?"upload_progress":"download_progress"}:{event:e,type:e.type}}convertErrorResponse(e,t){let r=(0,l._)(e);if(0==e.status){let r=(0,f.A)(e||{},"xhr.responseURL",t?.requestUrl);(!r||0==r.length)&&t?.requestUrl&&(r=t?.requestUrl);let n=new c.$t(`Unable to reach the server. Possible causes could be server is offline, your connection to the server is blocked or you are offline. ${r}`);return n.status=0,n}let n=parseInt(e.status/100+"");if(4===n){let n=new c.MZ(this.getErrorMessage(e,t),e.response,e.status);return void 0!==r&&(n.retryAfterSeconds=r),n}if(5===n){let n=new c._7(this.getErrorMessage(e,t),e.status);return n.response=e.response,void 0!==r&&(n.retryAfterSeconds=r),n}{let n=new c.$t(this.getErrorMessage(e,t));return n.status=e.status,void 0!==r&&(n.retryAfterSeconds=r),n}}getErrorMessage(e,t){let r=(0,f.A)(e,"response.message"),n=(0,f.A)(e,"xhr.responseURL");if(r)return r;if(e.status||0===e.status)return e.response?`${e.status} - ${e.response}`:n?`${e.status} - unknow error while connecting to ${n}`:`${e.status} - unknow error`;var i=n||t?.requestUrl;return i?`Unknow error while connecting to ${i}`:"Unknow error"}getCommonHeaders(e){let t={},r=g.authTokenProvider.getToken();if(!p.S6.find(t=>t.test(e))){t=Object.assign({},t=g.commonHttpHeadersProvider.getCommonHttpHeaders(),{sitename:`${this.apiConfig.apiDomainName}`,domainname:`${this.env.domainname}`,...g.loginUserDetailsProvider.userIpAddress?{"ip-address":g.loginUserDetailsProvider.userI
9pAddress}:null,...g.loginUserDetailsProvider.userCountry?{country:g.loginUserDetailsProvider.userCountry}:null,wsId:`${g.wsDataProvider.getOrCreateStoredWSId()}`,wsDomain:`${g.wsDataProvider.getStoredWSDomain()}`}),r&&(t.Authorization=`Bearer ${r}`);let e=(0,a.kC)();e&&Object.assign(t,e)}return t}static registerWSDetailProvider(e){g.wsDataProvider=e}static registerLoginUserDetailsProvider(e){g.loginUserDetailsProvider=e}static registerCommonHttpHeadersProvider(e){g.commonHttpHeadersProvider=e}static registerAuthTokenProvider(e){g.authTokenProvider=e}static registerApiErrorSink(e){g.apiErrorSink=e}}g=(0,n.Cg)([(0,o._G)(),(0,n.Qj)(0,(0,o.WQ)(u.ApiConfig)),(0,n.Qj)(1,(0,o.WQ)(h.v)),(0,n.Qj)(2,(0,o.WQ)(d.O)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===u.ApiConfig?Object:u.ApiConfig,void 0===h.v?Object:h.v,void 0===d.O?Object:d.O])],g)},35536:(e,t,r)=>{var n=r(66521);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=!!t,t}},35705:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=Object.prototype.hasOwnProperty;let i=function(e,t){return null!=e&&n.call(e,t)};var o=r(33270);let s=function(e,t){return null!=e&&(0,o.A)(e,t,i)}},36187:(e,t,r)=>{var n=r(79364);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return -1}},36265:(e,t,r)=>{"use strict";r.d(t,{Bc:()=>es,Ck:()=>X,F3:()=>ep,Hh:()=>U,Hy:()=>_,Ik:()=>T,JD:()=>eI,Jm:()=>ei,Lb:()=>eb,Lv:()=>q,NX:()=>Z,OY:()=>s.OY,Q2:()=>eT,Rr:()=>en,S4:()=>ex,TE:()=>eC,Uo:()=>ea,W4:()=>eP,WQ:()=>ef,X0:()=>ek,YZ:()=>$,a0:()=>eO,bD:()=>eo,cB:()=>eh,gr:()=>I,hK:()=>eS,hi:()=>J,iA:()=>K,nN:()=>a,oD:()=>c,oF:()=>ec,sx:()=>P,zc:()=>f,zi:()=>y});var n=r(8323),i=r(41451),o=r(38238),s=r(89692);let a="FRAMEPICKER",l=1,c=750,u="LATEST-",d="__xc_framepicker_probe__",h=/^[A-Za-z0-9_-]{1,64}$/;function p(e){return"string"==typeof e&&h.test(e)&&!e.startsWith(u)}function f(e){return!!e&&"string"==typeof e.location&&""!==e.location&&"string"==typeof e.token&&""!==e.token}let g=6,m=24576,v=65536,y="data:image/jpeg;base64,",b=24,S=32,E=6e4,w=6e5;function _(e){return`${a}-${e}`}function A(e){return`${a}-${u}${e}`}function T(e){let t=`${a}-`;if(!e.startsWith(t))return null;let r=e.slice(t.length);return p(r)?r:null}function O(){try{return n.k.get(i.n)}catch{return null}}function C(e){let t=`${a}-`;return e.startsWith(t)?[a,e.slice(t.length)]:null}function I(){return{read(e){try{let t=window.localStorage.getItem(e);return null==t?null:JSON.parse(t)}catch{return null}},write(e,t){let r;try{r=JSON.stringify(t)}catch{return!1}try{let n=O(),i=C(e);return n&&i?n.store(i[0],i[1],t):window.localStorage.setItem(e,r),window.localStorage.getItem(e)===r}catch{return!1}},remove(e){try{let t=O(),r=C(e);t&&r?t.remove(r[0],r[1]):window.localStorage.removeItem(e)}catch{}},keys(){try{let e=[];for(let t=0;t<window.localStorage.length;t++){let r=window.localStorage.key(t);r&&e.push(r)}return e}catch{return[]}}}}function P(e=I(),t=Date.now){if(!e)return"disabled";try{let r=`probe-${t()}`,n=e.write(d,r),i=e.read(d);return e.remove(d),n&&i===r?"ok":"disabled"}catch{return"disabled"}}function x(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function k(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function M(e){return"ONE"===e||"SEQUENCE"===e||"SHEET"===e?e:"ONE"}function D(e){return"BY_COUNT"===e?"BY_COUNT":"BY_INTERVAL"}function R(e){if(!x(e))return null;let t=k(e.start);if(null===t||t<0)return null;let r=null===e.end?null:k(e.end);return null!==r&&r<0?null:{start:t,end:r}}function F(e){let t={...s.Ae};if(!x(e))return t;let r=k(e.columns);null!==r&&(t.columns=Math.min(s.zE.maxSheetColumns,Math.max(1,Math.round(r))));let n=k(e.width);return null!==n&&(t.width=Math.min(s.zE.maxSheetWidthPx,Math.max(s.zE.minSheetWidthPx,Math.round(n)))),"boolean"==typeof e.timestamps&&(t.timestamps=e.timestamps),"boolean"==typeof e.header&&(t.header=e.header),t}function N(e){return"string"==typeof e&&""!==e?e:void 0}function L(e){let t=k(e);return null!==t&&t>0?t:void 0}function j(e){if(!x(e)||"string"!=typeof e.uuid||""===e.uuid)return null;let t={uuid:e.uuid,name:"string"==typeof e.name?e.name:"",size:k(e.size)??0},r=N(e.location),n=N(e.token),i=N(e.uploadDomain),o=N(e.uniqueProcessType),s=N(e.type);r&&(t.location=r),n&&(t.token=n),i&&(t.uploadDomain=i),x(e.processorMetadata)&&(t.processorMetadata={...e.processorMetadata}),o&&(t.uniqueProcessType=o),s&&(t.type=s);let a=L(e.duration),l=L(e.fps),c=L(e.width),u=L(e.height);a&&(t.duration=a),l&&(t.fps=l),c&&(t.width=c),u&&(t.height=u);let d=L(e.frameCount),h=L(e.avgFps),p=L(e.displayWidth),f=L(e.displayHeight);return d&&(t.frameCount=Math.round(d)),h&&(t.avgFps=h),("CFR"===e.frameRateMode||"VFR"===e.frameRateMode)&&(t.frameRateMode=e.frameRateMode),p&&(t.displayWidth=p),f&&(t.displayHeight=f),t}function U(e){if(!x(e)||e.v!==l||!p(e.sid))return null;let t=k(e.savedAt);if(null===t)return null;let r=k(e.interval),n=k(e.count),i=k(e.t),o=Array.isArray(e.pins)?e.pins.filter(e=>"number"==typeof e&&Number.isFinite(e)&&e>=0).sort((e,t)=>
9e-t).filter((e,t,r)=>0===t||Math.abs(e-r[t-1])>=s.p2).slice(0,s.Ym):[],a=!0===e.picked&&o.length>0,c=V(e.frameTimes),u=H(e.staged),d=G(e.jobs),h=B(e.thumbs);return{v:l,sid:e.sid,pageSlug:"string"==typeof e.pageSlug?e.pageSlug:"",file:j(e.file),workflowIds:Array.isArray(e.workflowIds)?e.workflowIds.filter(e=>"string"==typeof e&&""!==e):[],mode:M(e.mode),t:null!==i&&i>=0?i:0,range:R(e.range),spacing:D(e.spacing),interval:null!==r&&s.QJ.some(e=>1e-9>Math.abs(e.seconds-r))?r:1,count:null!==n&&Number.isInteger(n)&&n>=s.zE.minCount?n:12,sheet:F(e.sheet),savedAt:t,generation:Math.max(0,Math.floor(k(e.generation)??0)),pins:o,picked:a,...c?{frameTimes:c}:{},...u?{staged:u}:{},...d?{jobs:d}:{},...h?{thumbs:h}:{}}}function $(e){return"string"==typeof e&&e.length<=m&&e.startsWith(y)&&e.length>y.length&&/^[A-Za-z0-9+/]+=*$/.test(e.slice(y.length))}function B(e){if(!x(e))return null;let t=[];for(let[r,n]of Object.entries(e))if(r&&Array.isArray(n))for(let e of n){if(!x(e))continue;let n="string"==typeof e.seek||"number"==typeof e.seek?eO(e.seek):null,i=k(e.at);null!==n&&null!==i&&$(e.url)&&t.push({file:r,seek:n,url:e.url,at:i})}return W(t)}function W(e){let t=new Map;for(let r of e){let e=`${r.file}|${r.seek}`,n=t.get(e);n&&r.at<n.at||(n&&t.delete(e),t.set(e,r))}let r=Array.from(t.values()).sort((e,t)=>e.at-t.at).slice(-g),n=()=>r.reduce((e,t)=>e+t.url.length,0);for(;r.length>0&&n()>v;)r.shift();if(!r.length)return null;let i={};for(let{file:e,seek:t,url:n,at:o}of r)(i[e]??=[]).push({seek:t,url:n,at:o});return i}function z(e){let t=[];for(let[r,n]of Object.entries(e??{}))for(let e of n??[])t.push({file:r,...e});return t}function H(e){if(!Array.isArray(e))return null;let t=[],r=new Set;for(let n of e){let e=j(n);if(!(!e||r.has(e.uuid))&&(r.add(e.uuid),t.push(e),t.length>=S))break}return t.length?t:null}function G(e){if(!Array.isArray(e))return null;let t=[];for(let r of e){if(!x(r)||"string"!=typeof r.fileUuid||""===r.fileUuid)continue;let e=k(r.startedAt);if(null===e)continue;let n={id:N(r.id)??null,fileUuid:r.fileUuid,mode:M(r.mode),startedAt:e},i=k(r.t);null!==i&&i>=0&&(n.t=i);let o=N(r.wire);if(o&&(n.wire=o),Array.isArray(r.picks)){let e=r.picks.map(k).filter(e=>null!==e&&e>=0);e.length&&(n.picks=e.slice(0,s.Ym))}"lifetime"===r.guard&&(n.guard="lifetime"),("done"===r.status||"failed"===r.status)&&(n.status=r.status);let a=k(r.finishedAt);null!==a&&n.status&&(n.finishedAt=a),t.push(n)}return t.length?t.slice(-b):null}function V(e){if(!x(e))return null;let t={};for(let[r,n]of Object.entries(e)){let e=eO(r),i=k(n);null!==e&&null!==i&&i>=0&&(t[e]=i)}return Object.keys(t).length?t:null}function Q(e){return x(e)?k(e.v):null}function q(e,t,r){let n=e.range?{start:e.range.start,end:Number.isFinite(e.range.end)?e.range.end:null}:null;return{v:l,sid:e.sid,pageSlug:t.pageSlug,file:t.file,workflowIds:[...t.workflowIds??[]],mode:e.mode,t:e.t,range:n,spacing:e.spacing,interval:e.interval,count:e.count,sheet:{...e.sheet},savedAt:r(),generation:t.generation??0,pins:[...e.pins],picked:e.picked&&e.pins.length>0,...t.frameTimes&&Object.keys(t.frameTimes).length?{frameTimes:{...t.frameTimes}}:{},...t.staged?{staged:t.staged.slice(0,S).map(e=>({...e}))}:{},...t.jobs?{jobs:t.jobs.slice(-b).map(e=>({...e}))}:{},...t.thumbs&&B(t.thumbs)?{thumbs:B(t.thumbs)}:{}}}function K(e){let t=e.range?{start:e.range.start,end:null===e.range.end?1/0:e.range.end}:null;return{sid:e.sid,fileId:e.file?e.file.uuid:null,mode:e.mode,t:e.t,range:t,spacing:e.spacing,interval:e.interval,count:e.count,sheet:{...e.sheet},pins:[...e.pins??[]],picked:!0===e.picked&&(e.pins?.length??0)>0}}function X(e,t=I()){return t&&p(e)?U(t.read(_(e))):null}function J(e,t=I(),r){if(!t||!p(e.sid))return{status:"disabled"};let n=_(e.sid),i=t.read(n),o=Q(i);if(null!==o&&o>l)return{status:"foreign-version",version:o};let s=U(i);if(s&&s.generation>e.generation&&Y(s,e,r))return{status:"conflict",stored:s};let a={...s?ee(e,s):e,generation:Math.max(e.generation,s?.generation??0)+1};return t.write(n,a)?{status:"saved",record:a}:{status:"disabled"}}function Y(e,t,r){let n=Z(e);return n!==Z(t)&&("string"!=typeof r||""===r||n!==r)}function Z(e){return JSON.stringify({mode:e.mode,t:e.t,range:e.range,spacing:e.spacing,interval:e.interval,count:e.count,sheet:e.sheet,pins:e.pins??[],picked:!0===e.picked,file:e.file?.uuid??null})}function ee(e,t){let r={...e,workflowIds:Array.from(new Set([...t.workflowIds,...e.workflowIds]))},n=V({...t.frameTimes??{},...e.frameTimes??{}});n?r.frameTimes=n:delete r.frameTimes;let i=er(t.jobs,e.jobs);i?r.jobs=i:delete r.jobs,void 0===e.staged&&t.staged&&(r.staged=t.staged);let o=et(t.thumbs,e.thumbs);return o?r.thumbs=o:delete r.thumbs,r}function et(e,t){return e||t?W([...z(e),...z(t)].filter(e=>!!e.file&&null!==eO(e.seek)&&Number.isFinite(e.at)&&$(e.url)).map(e=>({...e,seek:eO(e.seek)}))):null}function er(e,t){if(!e&&!t)return null;let r=new Map;for(let n of[...e??[],...t??[]]){let e=`${n.fileUuid}|${n.mode}|${n.t??""}|${n.wire??""}|${n.startedAt}`,t=r.get(e);r.set(e,t?{...t,...n,id:t.id??n.id,status:n.status??t.status,finishedAt:n.finishedAt??t.finishedAt}:{...n})}let n=Array.from(r.values()).sort((e,t)=>
9e.startedAt-t.startedAt).slice(-b);return n.length?n:null}function en(e,t=I(),r){let n=X(e.sid,t);return!n||n.generation<=e.generation?{kind:"none"}:Y(n,e,r)?{kind:"other-tab",stored:n}:{kind:"bookkeeping",record:n}}function ei(e,t,r=I(),n=Date.now,i,o){if(!r||!p(e))return{status:"disabled"};let s=t.filter(e=>"string"==typeof e&&""!==e),a=X(e,r);if(!a){if(!i)return{status:"disabled"};a=q(i.state,{pageSlug:i.pageSlug,file:i.file,staged:i.staged},n)}let l=Array.from(new Set([...a.workflowIds,...s])),c=V({...a.frameTimes??{},...o??{}}),u={...a,workflowIds:l,savedAt:n()};c?u.frameTimes=c:delete u.frameTimes;let d=s.filter(e=>!a.workflowIds.includes(e)),h=a.jobs?a.jobs.map(e=>({...e})):[];for(let e of d){let t=h.find(e=>null===e.id&&(!i?.file||e.fileUuid===i.file.uuid))??h.find(e=>null===e.id);t&&(t.id=e)}return h.length&&(u.jobs=h),J(u,r)}function eo(e,t,r=I(),n=Date.now,i){if(!r||!p(e)||0===t.length)return{status:"disabled"};let o=X(e,r);if(!o){if(!i)return{status:"disabled"};o=q(i.state,{pageSlug:i.pageSlug,file:i.file,staged:i.staged},n)}let s=er(o.jobs,t.map(e=>({...e}))),a={...o,savedAt:n()};return s&&(a.jobs=s),J(a,r)}function es(e,t,r,n=I(),i=Date.now,o){if(!n||!p(e)||"string"!=typeof t||""===t)return{status:"disabled"};let s=i(),a=B({[t]:Object.entries(r??{}).map(([e,t])=>({seek:e,url:t,at:s}))});if(!a)return{status:"disabled"};let l=X(e,n);if(!l){if(!o)return{status:"disabled"};l=q(o.state,{pageSlug:o.pageSlug,file:o.file,staged:o.staged},i)}let c=et(l.thumbs,a),u={...l,savedAt:i()};return c&&(u.thumbs=c),J(u,n)}function ea(e,t,r){let n=eO(t);if(null===n||!e?.thumbs)return null;let i="string"==typeof r&&""!==r?z({[r]:e.thumbs[r]??[]}):z(e.thumbs),o=null;for(let e of i)eO(e.seek)===n&&$(e.url)&&(!o||e.at>=o.at)&&(o=e);return o?o.url:null}function el(e,t,r=E){return"lifetime"!==e.guard?t-e.startedAt<=r:"failed"!==e.status&&(null===e.id?t-e.startedAt<=r:t-e.startedAt<=w)}function ec(e,t,r,n=I(),i=Date.now){if(!n||!p(e))return{status:"disabled"};let o=new Set(t.filter(e=>"string"==typeof e&&""!==e));if(0===o.size)return{status:"disabled"};let s=X(e,n);if(!s?.jobs?.some(e=>null!==e.id&&o.has(e.id)))return{status:"disabled"};let a=i(),l=s.jobs.map(e=>null!==e.id&&o.has(e.id)?{...e,status:r,finishedAt:a}:{...e});return J({...s,jobs:l,savedAt:a},n)}function eu(e,t){let r=e?.jobs??[];return t?r.filter(e=>e.fileUuid===t):[...r]}function ed(e,t){return e.id?"sent":t-e.startedAt<E?"pending":"unknown"}function eh(e,t,r){let n=eu(e,t);if(!n.length)return null;let i=n.reduce((e,t)=>t.startedAt>=e.startedAt?t:e);return{job:i,status:ed(i,r)}}function ep(e,t,r,n=E){let i=eu(e,t.fileUuid).filter(e=>e.mode===t.mode&&el(e,r,n));if("ONE"===t.mode){let e=t.t;return"number"==typeof e&&Number.isFinite(e)?i.filter(r=>"number"==typeof r.t&&Math.abs(r.t-e)<s.p2&&eA(r.wire,t.wire)).pop()??null:null}return t.wire&&i.some(e=>"string"==typeof e.wire)?i.filter(e=>e_(e.wire,t.wire)).pop()??null:i.pop()??null}function ef(e){return e.filter(e=>"string"==typeof e&&""!==e).join(",")}let eg=["@fp","2"],em=new Set(["process","fromMedia","toMedia","fromExtension","uploadedFileExtensions"]);function ev(e){return"videoToImageFrameSelection"===e||e.startsWith("screenshot")}function ey(e){return null==e?null:"object"==typeof e?JSON.stringify(e):String(e)}function eb(e,t){let r=new Map;for(let[e,n]of Object.entries(t??{}))em.has(e)||ev(e)||r.set(e,ey(n));for(let[t,n]of Object.entries(e??{}))r.set(t,ey(n));return JSON.stringify([eg,...[...r.keys()].sort().map(e=>[e,r.get(e)??null])])}function eS(e){let t=eE(e?.wire);if(!t)return null;let r={};for(let[e,n]of t)r[e]="true"===n||"false"!==n&&n;return r}function eE(e){if("string"!=typeof e||""===e)return null;try{let t=JSON.parse(e);if(!Array.isArray(t)||0===t.length)return null;let r=t[0];if(!Array.isArray(r)||r[0]!==eg[0]||r[1]!==eg[1])return null;return t.slice(1).filter(e=>Array.isArray(e)&&"string"==typeof e[0])}catch{return null}}function ew(e){return JSON.stringify(e.filter(([e])=>ev(e)))}function e_(e,t){if("string"!=typeof e)return!1;let r=eE(e),n=eE(t);return r&&n?e===t:r?ew(r)===t:n?e===ew(n):e===t}function eA(e,t){let r=eE(e),n=eE(t);if(!r||!n)return!0;let i=e=>JSON.stringify(e.filter(([e])=>"screenshotTime"!==e));return i(r)===i(n)}function eT(e,t,r){if(!r||r.provisional||!(r.fps>0))return{pins:[...e],range:t?{...t}:null,moved:!1};let n=e=>(0,o.wc)(Math.round(e*r.fps),r),i=!1,a=[];for(let t of e){let e=n(t);Math.abs(e-t)>1e-9&&(i=!0),a.some(t=>Math.abs(t-e)<s.p2)||a.push(e)}a.length!==e.length&&(i=!0),a.sort((e,t)=>
9e-t);let l=t?{...t}:null;if(l){let e=n(l.start);if(Math.abs(e-l.start)>1e-9&&(l.start=e,i=!0),Number.isFinite(l.end)){let e=n(l.end);Math.abs(e-l.end)>1e-9&&e>l.start&&(l.end=e,i=!0)}}return{pins:a,range:l,moved:i}}function eO(e){let t="string"==typeof e?e.split("::")[0].trim():e,r="number"==typeof t?t:""===t||null==t?NaN:Number(t);return!Number.isFinite(r)||r<0?null:String(Math.round(1e3*r)/1e3)}function eC(e,t){let r=eO(t);if(null===r||!e?.frameTimes)return null;let n=e.frameTimes[r];return"number"==typeof n&&Number.isFinite(n)&&n>=0?n:null}function eI(e,t=I()){if(!t||!e)return null;for(let r of t.keys()){if(!T(r))continue;let n=U(t.read(r));if(n&&n.workflowIds.includes(e))return n}return null}function eP(e,t,r=I()){return!!r&&!!e&&!!p(t)&&r.write(A(e),t)}function ex(e,t=I()){if(!t||!e)return null;let r=t.read(A(e));return p(r)?r:null}function ek(e=I(),t=Date.now,r=s.oH){if(!e)return[];let n=[],i=t()-r,o=e.keys();for(let t of o){if(!T(t))continue;let r=U(e.read(t));(!r||r.savedAt<i)&&(e.remove(t),n.push(t))}let l=`${a}-${u}`;for(let t of o){if(!t.startsWith(l))continue;let r=e.read(t);p(r)&&null!==e.read(_(r))||e.remove(t)}return n}},36315:(e,t,r)=>{e.exports=r(43622)(r(19031),"Map")},36670:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(54743);let i=function(){return!1};var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=s&&s.exports===o?n.A.Buffer:void 0;let l=(a?a.isBuffer:void 0)||i},36982:(e,t,r)=>{"use strict";var n;r.d(t,{_:()=>n}),function(e){e[e.PLAIN_TO_CLASS=0]="PLAIN_TO_CLASS",e[e.CLASS_TO_PLAIN=1]="CLASS_TO_PLAIN",e[e.CLASS_TO_CLASS=2]="CLASS_TO_CLASS"}(n||(n={}))},37413:(e,t,r)=>{"use strict";r.d(t,{T:()=>l});var n=r(4902),i=r(43604),o=r(8365),s=r(22902),a=r(2807);class l{constructor(e){this.envService=e}setMetaTags(e){if(!e)return void console.error(Error("Null value was passed to metadata"));for(let t of[{elementType:"link",elementSelector:'link[rel="canonical"]',elementAttributes:{rel:"canonical",href:`https://www.${this.envService.getDomainName()}/${(e.canonical||e.path||"").replace(/^\/+/,"")}`}},{elementSelector:"title",elementType:"title",elementAttributes:{},innerText:e.title},{elementType:"meta",elementSelector:'meta[name="description"]',elementAttributes:{name:"description",content:e.description}},{elementType:"meta",elementSelector:'meta[property="og:title"]',elementAttributes:{property:"og:title",content:e.title}},{elementType:"meta",elementSelector:'meta[property="og:type"]',elementAttributes:{property:"og:type",content:"website"}},{elementType:"meta",elementSelector:'meta[property="og:url"]',elementAttributes:{property:"og:url",content:`https://www.${this.envService.getSiteName()}.com/`+e.path}},{elementType:"meta",elementSelector:'meta[property="og:image"]',elementAttributes:{property:"og:image",content:"https://www.xconvert.com/img/xconvert/og_image.jpg"}},{elementType:"meta",elementSelector:'meta[property="og:site_name"]',elementAttributes:{property:"og:site_name",content:`https://www.${this.envService.getSiteName()}.com`}},{elementType:"meta",elementSelector:'meta[property="og:description"]',elementAttributes:{property:"og:description",content:e.description}},{elementType:"meta",elementSelector:'meta[name="twitter:card"]',elementAttributes:{name:"twitter:card",content:"summary_large_image"}},{elementType:"meta",elementSelector:'meta[name="twitter:site"]',elementAttributes:{name:"twitter:site",content:`@${this.envService.getSiteName()}_io`}},{elementType:"meta",elementSelector:'meta[name="twitter:creator"]',elementAttributes:{name:"twitter:creator",content:`@${this.envService.getSiteName()}_io`}},{elementType:"meta",elementSelector:'meta[name="twitter:title"]',elementAttributes:{name:"twitter:title",content:e.title}},{elementType:"meta",elementSelector:'meta[name="twitter:description"]',elementAttributes:{name:"twitter:description",content:e.description}},{elementType:"meta",elementSelector:'meta[name="twitter:image:src"]',elementAttributes:{name:"twitter:image:src",content:(0,s.A)(e,"page_seo.image")||`https://www.${this.envService.getSiteName()}.com/static/im/sm/default.png`}}])this.setHeaderElementProperty(t)}setHeaderElementProperty(e){if(!o.C.hasDocument())return void console.error("Requested execution aborted since document was not available");let t=this.getOrCreateHeaderElement(e.elementSelector,e.elementType);for(let r of Object.keys(e.elementAttributes))t.setAttribute(r,(e.elementAttributes[r]||`${r} not set`).replace(/\s+/g," "));e.innerText&&(t.innerText=e.innerText)}getOrCreateHeaderElement(e,t){let r=document.querySelector(e);
9if(!r){let e=document.querySelector("head");r=document.createElement(t),e.appendChild(r)}return r}}l=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a.v)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.v?Object:a.v])],l)},37643:(e,t,r)=>{"use strict";r.d(t,{W:()=>c});var n=r(4902),i=r(43604),o=r(51352),s=r(9968),a=r(79347),l=r(29238);class c{constructor(e,t,r){this.apiConfig=e,this.http=t,this.loginService=r}payStripe(e,t){if(!this.loginService.isUserLoggedIn)throw Error("Only logged in users can make a payment");return this.http.post(this.apiConfig.getPaymentsPayEndpoint(),{paymentMethodId:e,planName:t}).pipe(o.UW)}confirmStripe(e){if(!this.loginService.isUserLoggedIn)throw Error("Only logged in users can confirm a payment");return this.http.post(this.apiConfig.getPaymentsConfirmStripeEndpoint(),{subscriptionId:e}).pipe(o.UW)}payPayPal(e,t){if(!this.loginService.isUserLoggedIn)throw Error("Only logged in users can make a payment");return this.http.post(this.apiConfig.getPaymentsPayPalEndpoint(),{subscriptionId:e,planName:t}).pipe(o.UW)}}c=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(s.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(a.jo)),(0,n.Qj)(2,(0,i.WQ)(l.H)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===s.ApiConfig?Object:s.ApiConfig,void 0===a.jo?Object:a.jo,void 0===l.H?Object:l.H])],c)},37956:e=>{e.exports={"alert-icon":"alert-dialog_component_alert-icon__7tmpi"}},37973:(e,t,r)=>{e.exports=r(43622)(r(19031),"Set")},38211:e=>{"use strict";var t,r=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,n=function(e){var t,r={},n=[];for(t=0;t<65536;t++)n.push(String.fromCharCode(t));return e.lastIndex=0,n.join("").replace(e,function(e){return r[e]="\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4),""}),e.lastIndex=0,r};e.exports={quote:function(e){var i=JSON.stringify(e);return(r.lastIndex=0,r.test(i))?(t||(t=n(r)),i.replace(r,function(e){return t[e]})):i}}},38238:(e,t,r)=>{"use strict";r.d(t,{E0:()=>h,Ev:()=>m,KP:()=>x,MM:()=>a,Md:()=>v,T0:()=>_,TT:()=>A,UG:()=>y,V$:()=>P,XS:()=>w,dK:()=>g,eQ:()=>f,fl:()=>o,iy:()=>O,pJ:()=>E,uo:()=>T,wc:()=>S,zM:()=>b});let n=2,i=5e-4,o=30,s=.5;function a(e,t,r){let i=Number.isFinite(e)&&e>0?e:0,s="number"==typeof t&&Number.isFinite(t)&&t>0?t:o,a=l(r?.frameCount);if(r?.mode==="VFR"){let e=l(r.avgFps)??(null!==a&&i>0?a/i:s),t=null!==a?Math.round(a):Math.round(i*e);return{duration:i,fps:e,frameCount:t,variable:!0}}let c=Math.round(i*s),u=r?.mode==="CFR"&&null!==a&&Math.round(a)<c;return{duration:i,fps:s,frameCount:null!==a&&(u||Math.abs(Math.round(a)-c)<=n)?Math.round(a):c}}function l(e){return"number"==typeof e&&Number.isFinite(e)&&e>0?e:null}function c(e){return 1/e.fps}function u(e){return Math.max(0,(e.frameCount-1)/e.fps)}function d(e,t){return"number"!=typeof e||Number.isNaN(e)||e<0?"invalid":e<=u(t)?"in-range":e<=t.duration+s?"tail-clamp":"past-end"}function h(e,t){switch(d(e,t)){case"invalid":return 0;case"in-range":return e;default:return u(t)}}let p=.001,f=5e-4;function g(e,t){return t.variable?h(e,t):S(y(e,t),t)}let m=.07;function v(e,t){return t.variable?h(e,t):S(Math.min(Math.max(0,Math.floor(h(e,t)*t.fps+m)),Math.max(0,t.frameCount-1)),t)}function y(e,t){return Math.max(0,Math.min(Math.floor(h(e,t)*t.fps+p),Math.max(0,t.frameCount-1)))}function b(e,t){let r=Math.ceil(e*t.fps-.001);return Math.max(0,Math.min(Number.isFinite(r)?r:0,Math.max(0,t.frameCount-1)))}function S(e,t){return h((Number.isFinite(e)?Math.max(0,Math.floor(e)):0)/t.fps,t)}function E(e,t){if(!t||!(t.fps>0)||t.provisional)return Math.max(0,Number.isFinite(e)?e:0);if(t.variable){let r=h(e,t)+i;return t.duration>0?Math.min(r,t.duration):r}let r=(y(e,t)+.5)/t.fps;return t.duration>0?Math.min(r,t.duration):r}function w(e,t){return y(e,t)+1}function _(e,t,r){return"number"==typeof r&&Number.isFinite(r)&&r>=0&&r<e-1e-4?A(r):t&&t.fps>0&&!t.variable?Math.max(0,A((y(e,t)-.5)/t.fps)):A(Math.max(0,e))}function A(e){return Math.floor(1e3*e+1e-6)/1e3}function T(e){return e.duration<=10?.25:1}function O(e){return e.duration<=5?c(e):e.duration<=30?.25:e.duration<=120?1:5}function C(e,t,r){let n=Number.isFinite(e)&&e>0?e:0,i=Number.isFinite(t)&&t>0?t:1;return Math.max(1,Math.min(Math.max(1,Math.floor(Number.isFinite(r)?r:1)),Math.floor(n/i)||1))}function I(e,t){let r=Math.max(1,Math.floor(t)),n=[];for(let t=0;t<r;t++)n.push(g(t*e.duration/r,e));return n}function P(e,t,r,n){let i=Number.isFinite(n)&&n>0?Math.floor(n):1/0,o=Math.min(C(t,r,e.frameCount),i),s=Number.isFinite(t)&&t>0?t:r*o;return{count:o,tileWidth:s/o,times:I(e,o)}}function x(e){let{h:t,m:r,s:n,ms:i}=k(e),o=t>0?M(r,2):String(r);return`${t>0?`${t}:`:""}${o}:${M(n,2)}.${M(i,3)}`}function k(e){let t=Math.round(1e3*(Number.isFinite(e)&&e>0?e:0)),r=Math.floor(t/36e5),n=Math.floor((t-=36e5*r)/6e4),i=Math.floor((t-=6e4*n)/1e3);return t-=1e3*i,{h:r,m:n,s:i,ms:t}}function M(e,t){return String(e).padStart(t,"0")}},38331:(e,t,r)=>{"use strict";r.d(t,{B6:()=>b,BS:()=>s,N1:()=>f,P3:()=>c,PK:()=>w,RP:()=>S,cg:()=>y,gj:()=>E,n2:()=>v,qs:()=>_,v3:()=>m});var n=r(38238);let i=2,o=.25;function s(e,t,r){let n=Number.isFinite(r)&&r>0?r:0,i=A(e)?e:0,o=A(t)?t:n;return{start:T(i,0,n),end:T(o,0,n)}}function a(e,t){return A(e)&&A(t)&&e<t}function l(e,t,r){return a(t,r)&&Number.isInteger(e)&&!(e<i)?(r-t)/(e-1):NaN}function c(e,t,r,n,o){return a(n,o)?"BY_COUNT"===e?!Number.isInteger(r)||r<i?0:r:!A(t)||t<=0?0:Math.floor((o-n)/t)+1:0}let u=.001,d=1e-9;function h(e){return Math.round(1e6*e)/1e6}function p(e){return Math.round(1e3*e)/1e3}function f(e,t,r,n){let i=Math.max(0,Math.ceil(t*n-d)),o=Math.ceil((t+e*
9h(r)-u)*n-d);return Math.max(i+e,o)}function g(e,t){return Math.max(0,Math.round(e*t)-1)}function m(e,t,r,i,o,s){if(!(e>0)||!A(t)||t<=0||!a(r,i))return 0;let l=Math.floor(e);if(!A(o)||o<=0)return l;let c=A(s)&&s>0?s:n.fl,m=g(o,c),v=p(i+t/2),y=e=>{let n=f(e,r,t,c);return n<=m&&n/c<v},b=Math.min(m,Math.ceil(v*c-d)-1),S=Math.min(l,b-Math.max(0,Math.ceil(r*c-d))+1,Math.floor(((b+d)/c-r+u)/h(t))+1);for(S=Math.max(0,Math.min(l,Number.isFinite(S)?S:0));S<l&&y(S);)S++;for(;S>0&&!y(S-1);)S--;return S}function v(e,t,r,n,o){if(!a(t,r)||!Number.isInteger(e)||e<i||!A(n)||n<=0||r<n-1e-6)return r;if(A(o)&&o>0)return Math.max(t,Math.min(r,g(n,o)/o));let s=t+(e-1)/(e-.5)*(r-t)*.999;return Math.max(t,Math.min(r,s))}function y(e,t,r,n,i,o=1/0,s){return"BY_COUNT"===e?l(r,n,v(r,n,i,o,s)):t}function b(e,t,r,n,i,o=1/0,s){let a=c(e,t,r,n,i);return 0===a?0:m(a,y(e,t,r,n,i,o,s),n,i,o,s)}function S(e,t){let r=Number.isInteger(e)&&e>0?e:0,n=Number.isInteger(t)&&t>0?t:0;if(0===r||0===n)return{cols:r,rows:0,cells:0,ragged:0};let i=Math.ceil(n/r),o=n%r;return{cols:r,rows:i,cells:n,ragged:o}}let E=16,w=8;function _(e){return Math.max(0,A(e)?e:0)*o}function A(e){return"number"==typeof e&&Number.isFinite(e)}function T(e,t,r){return e<t?t:e>r?r:e}},39004:e=>{var t="__lodash_hash_undefined__";e.exports=function(e){return this.__data__.set(e,t),this}},39030:(e,t,r)=>{"use strict";r.d(t,{b:()=>d,E:()=>u});var n=r(4902),i=function(e){function t(t,r){return e.call(this)||this}return(0,n.C6)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(18947).yU),o={setInterval:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var s=o.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,(0,n.fX)([e,t],(0,n.zs)(r))):setInterval.apply(void 0,(0,n.fX)([e,t],(0,n.zs)(r)))},clearInterval:function(e){var t=o.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},s=r(85689),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;
9return n.scheduler=t,n.work=r,n.pending=!1,n}return(0,n.C6)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var r,n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!=(r=this.id)?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),o.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&o.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this,r=t.id,n=t.scheduler,i=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,s.o)(i,this),null!=r&&(this.id=this.recycleAsyncId(n,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(i),l=r(1576),c=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=l.U.now,e}(),u=new(function(e){function t(t,r){void 0===r&&(r=c.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return(0,n.C6)(t,e),t.prototype.flush=function(e){var t,r=this.actions;if(this._active)return void r.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}},t}(c))(a),d=u},39944:(e,t,r)=>{"use strict";var n=r(59355),i={},o=!1,s=void 0!==r.g.chrome&&r.g.chrome&&r.g.chrome.app&&r.g.chrome.app.runtime;e.exports={attachEvent:function(e,t){void 0!==r.g.addEventListener?r.g.addEventListener(e,t,!1):r.g.document&&r.g.attachEvent&&(r.g.document.attachEvent("on"+e,t),r.g.attachEvent("on"+e,t))},detachEvent:function(e,t){void 0!==r.g.addEventListener?r.g.removeEventListener(e,t,!1):r.g.document&&r.g.detachEvent&&(r.g.document.detachEvent("on"+e,t),r.g.detachEvent("on"+e,t))},unloadAdd:function(e){if(s)return null;var t=n.string(8);return i[t]=e,o&&setTimeout(this.triggerUnloadCallbacks,0),t},unloadDel:function(e){e in i&&delete i[e]},triggerUnloadCallbacks:function(){for(var e in i)i[e](),delete i[e]}};var a=function(t){o||t&&t.persisted||(o=!0,e.exports.triggerUnloadCallbacks())};s||void 0===r.g.addEventListener||r.g.addEventListener("pagehide",a,!1)},40001:(e,t,r)=>{"use strict";r.d(t,{f:()=>y});var n=r(4902),i=r(43604),o=r(3649),s=r(7262),a=r(6155),l=r(45019),c=r(44492),u=r(16579),d=r(87780),h=r(9120),p=r(79347),f=r(9968),g=r(31962),m=r(29238),v=r(12533);class y{constructor(e,t,r,n){this.http=e,this.apiConfig=t,this.authService=r,this.loginService=n,this.inFlight$=null,this.cookieSessionUnavailable=!1,this.cookieUnavailable$=new o.B}refreshAcrossTabs(){if("u"<typeof navigator||!("locks"in navigator))return this.refresh();let e=async()=>navigator.locks.request("xc-refresh",async()=>{let e=this.authService.getToken();return!e||(0,v.FJ)(e)||(0,v.hC)(e)?(0,s._)(this.refresh()):e});return(0,a.H)(e())}hasPresenceCookie(){return"u">typeof document&&document.cookie.split("; ").some(e=>e.startsWith("rt_present="))}refresh(){return this.inFlight$||(this.inFlight$=this.http.request(this.apiConfig.getRefreshEndpoint(),"POST",{},{withCredentials:!0,headers:{"X-Requested-With":"XMLHttpRequest"}}).response$.pipe((0,l.T)(e=>(this.authService.setAuthToken(e.bearer),this.inFlight$=null,e.bearer)),(0,c.W)(e=>(this.inFlight$=null,401===(e&&e.status||0)&&(this.hasPresenceCookie()?this.loginService.clearLocalSession():(this.cookieSessionUnavailable=!0,this.cookieUnavailable$.next())),(0,u.$)(()=>e))),(0,d.t)({bufferSize:1,refCount:!1}))),this.inFlight$}ensureFreshAccessToken(e){if(!p.jo.refreshEnabled||this.cookieSessionUnavailable)return(0,h.of)(void 0);let t=this.authService.getToken();return!t||(0,v.FJ)(t)||!(0,v.hC)(t)?(0,h.of)(void 0):this.refresh().pipe((0,l.T)(()=>void 0),(0,c.W)(()=>(0,h.of)(void 0)))}}y=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(p.jo)),(0,n.Qj)(1,(0,i.WQ)(f.ApiConfig)),(0,n.Qj)(2,(0,i.WQ)(g.u)),(0,n.Qj)(3,(0,i.WQ)(new i.FU(()=>m.H))),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===p.jo?Object:p.jo,void 0===f.ApiConfig?Object:f.ApiConfig,void 0===g.u?Object:g.u,void 0===m.H?Object:m.H])],y)},40087:(e,t,r)=>{e.exports=r(19031)["__core-js_shared__"]},40405:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(54743),i=r(11002),o=/^\s+/,s=n.A.parseInt;let a=function(e,t,r){return r||null==t?t=0:t&&(t*=1),s((0,i.A)(e).replace(o,""),t||0)}},40470:(e,t,r)=>{"use strict";r.d(t,{F:()=>i,m:()=>o});var n=r(97460);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o(e)}function o(e){return 0===e.length?n.D:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}},40738:(e,t,r)=>{"use strict";r.d(t,{Gv:()=>i,M3:()=>l,W2:()=>a,fz:()=>o,ll:()=>s,t9:()=>c});let n=e=>"object"==typeof e&&null!==e;function i(e){if(!n(e)||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function o(...e){let t,r=e.filter(Boolean);if(0===r.length||1===r.length)return!0;for(let e of r){let r=Object.keys(e);if(!t||0===t.size){t=new Set(r);continue}for(let e of r){if(t.has(e))return!1;t.add(e)}}return!0}let s=e=>i(e)&&"string"==typeof e.kty,a=e=>"oct"!==e.kty&&("AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d),l=e=>"oct"!==e.kty&&void 0===e.d&&void 0===e.priv,c=e=>"oct"===e.kty&&"string"==typeof e.k},41423:(e,t,r)=>{"use strict";r.d(t,{A5:()=>c,Ih:()=>i});let n=[2e3,5e3,1e4,2e4,3e4],i=3e5,o=.2;function s(e){if(!e||"object"!=typeof e)return!1;let{status:t,response:r}=e;if(429!==t&&402!==t||!r||"object"!=typeof r)return!1;let n=r;return"enforcement_error"===n.dataType||"insufficient_credits"===n.co
9de}function a(e,t){if(null==e||""===e)return null;if("number"==typeof e)return Number.isFinite(e)&&e>=0?Math.round(1e3*e):null;let r=String(e).trim();if(""===r)return null;if(/^\d+$/.test(r))return 1e3*Number(r);if(!/\d{4}/.test(r)||!/[A-Za-z]/.test(r))return null;let n=Date.parse(r);return Number.isNaN(n)?null:Math.max(0,n-t)}class l{constructor(e={}){this.now=e.now??(()=>Date.now()),this.random=e.random??(()=>Math.random()),this.delaysMs=e.delaysMs??n,this.budgetMs=e.budgetMs??i,this.isEnforcement=e.isEnforcementError??s,this.startedAtMs=e.startedAtMs??this.now()}get deadlineMs(){return this.startedAtMs+this.budgetMs}classify(e){if(this.isEnforcement(e))return"enforcement";let t=e?.status;return 409===t&&e?.response?.code==="schedule_key_conflict"?"terminal":409===t?"in-flight":429===t?"retryable":"number"==typeof t&&t>=400&&t<500?"terminal":"retryable"}decide(e,t){let r=this.classify(e),n={attempt:t,fromRetryAfter:!1};if("enforcement"===r)return{...n,kind:"bail-enforcement",reason:"enforcement-or-billing-rejection"};if("terminal"===r)return{...n,kind:"terminal",reason:`non-retryable-status-${e?.status}`};let i=this.now();if(i>=this.deadlineMs)return{...n,kind:"budget-exhausted",reason:"budget-spent-before-next-attempt"};let o=Math.min(Math.max(t,1)-1,this.delaysMs.length-1),s=a(e?.retryAfter,i),l=null!==s,c=l?s:this.jitter(this.delaysMs[o]);return i+c>this.deadlineMs?{...n,kind:"budget-exhausted",fromRetryAfter:l,reason:"next-attempt-would-exceed-budget"}:{...n,kind:"retry",delayMs:c,fromRetryAfter:l,reason:"in-flight"===r?"schedule-in-flight":"transient-failure"}}jitter(e){let t=o;return Math.round(e*(1-t+2*t*this.random()))}}function c(e){return new l(e)}},41451:(e,t,r)=>{"use strict";r.d(t,{N:()=>l,n:()=>u});var n=r(4902),i=r(71717),o=r(43604),s=r(18291),a=r(89853);class l{static{this.USER_SETTING_KEY_PREFIX=a.up}static{this.USER_PREFERENCE_KEY_PREFIX="USER_PREFERENCE_PREFIX"}static{this.FILE_UPLOAD_KEY_PREFIX="FILE_UPLOAD"}}let c={};class u{constructor(){try{this.storage=localStorage}catch{this.storage={length:0,clear:()=>{c={}},getItem:e=>c[e],key:e=>null,removeItem:e=>{delete c[e]},setItem:(e,t)=>{c[e]=t}}}}store(e,t,r){try{return this.storage.setItem((0,a.KM)(e,t),JSON.stringify(r))}catch(e){return console.error(e),null}}get(e,t,r,n){let o=null;try{o=(0,a.I5)(this.storage,e,t);try{r&&(o=(0,i.om)(r,o))}catch(e){console.error(e)}try{n&&(o=n(o))}catch(e){console.error(e)}}catch(e){try{return s.$.parseString(o)}catch(e){console.error(e)}}return o}remove(e,t){try{return this.storage.removeItem(`${e}-${t}`)}catch(e){console.error(e)}}keySet(e){try{let t=new Set;for(let r in this.storage)e?r.startsWith(e)&&t.add(r):t.add(r);return t}catch(e){console.error(e)}}timestampValue(e){return{updatedTime:Date.now(),value:e}}clearAll(){localStorage.clear()}}u=(0,n.Cg)([(0,o._G)(),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[])],u)},41946:(e,t,r)=>{var n=r(71266);e.exports=function(e,t){return n(e,t)}},43091:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(64682),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===i&&n.A.process;let a=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return s&&s.binding&&s.binding("util")}catch(e){}}()},43604:(e,t,r)=>{"use strict";var n,i,o,s,a,l,c,u,d,h;function p(e){return("object"==typeof e&&null!==e||"function"==typeof e)&&"function"==typeof e.then}function f(e){switch(typeof e){case"string":case"symbol":return e.toString();case"function":return e.name;default:throw Error(`Unexpected ${typeof e} service id type`)}}r.d(t,{mc:()=>t2,FU:()=>m,WQ:()=>er,_G:()=>es,lq:()=>eu});let g=Symbol.for("@inversifyjs/common/islazyServiceIdentifier");class m{[g];#e;constructor(e){this.#e=e,this[g]=!0}static is(e){return"object"==typeof e&&null!==e&&!0===e[g]}unwrap(){return this.#e()}}function v(e,t,r){return Reflect.getOwnMetadata(t,e,r)}function y(e,t,r,n){Reflect.defineMetadata(t,r,e,n)}function b(e,t,r,n,i){let o=n(v(e,t,i)??r());Reflect.defineMetadata(t,o,e,i)}r(52787);let S="@inversifyjs/container/bindingId";function E(){let e=v(Object,S)??0;return e===Number.MAX_SAFE_INTEGER?y(Object,S,Number.MIN_SAFE_INTEGER):b(Object,S,()=>e,e=>e+1),e}let w="Request",_="Singleton",A="Transient",T="ConstantValue",O="DynamicValue",C="Factory",I="Instance",P="Provider",x="ResolvedValue",k="ServiceRedirection";function*M(...e){for(let t of e)yield*t}class D{#e;#t;#r;constructor(e){for(const t of(this.#e=new Map,this.#t={},Reflect.ownKeys(e)))this.#t[t]=new Map;this.#r=e}add(e,t){for(let r of(this.#n(e).push(t),Reflect.ownKeys(t)))this.#i(r,t[r]).push(e)}clone(){let e=this.#o(),t=this.#s(),r=Reflect.ownKeys(this.#r),n=this._buildNewInstance(this.#r);for(let i of(this.#a(this.#e,n.#e,e,t),r))this.#l(this.#t[i],n.#t[i],e);return n}get(e,t){return this.#t[e].get(t)}getAllKeys(e){return this.#t[e].keys()}removeByRelation(e,t){let r=this.get(e,t);if(void 0!==r)for(let n of new Set(r)){let r=this.#e.get(n);if(void 0===r)throw Error("Expecting model relation, none found");for(let i of r)i[e]===t&&this.#c(n,i);this.#e.delete(n)}}_buildNewInstance(e){return new D(e)}_cloneModel(e){return e}_cloneRelation(e){return e}#o(){let e=new Map;for(let t of this.#e.keys()){let r=this._cloneModel(t);e.set(t,r)}return e}#s(){let e=new Map;for(let t of this.#e.values())for(let r of t){let t=this._cloneRelation(r);e.set(r,t)}return e}#n(e){let t=this.#e.get(e);return void 0===t&&(t=[],this.#e.set(e,t)),t}#i(e,t){let r=this.#t[e].get(t);return void 0===r&&(r=[],this.#t[e].set(t,r)),r}#u(e,t){let r=t.get(e);if(void 0===r)throw Error("Expecting model to be cloned, none found");return r}#d(e,t){let r=t.get(e);if(void 0===r)throw Error("Expecting relation to be cloned, none found");return r}#l(e,t,r){for(let[n,i]of e){let e=[];for(let t of i)e.push(this.#u(t,r));t.set(n,e)}}#a(e,t,r,n){for(let[i,o]of e){let e=[];
9for(let t of o)e.push(this.#d(t,n));t.set(this.#u(i,r),e)}}#c(e,t){for(let r of Reflect.ownKeys(t))this.#h(e,r,t[r])}#h(e,t,r){let n=this.#t[t].get(r);if(void 0!==n){let i=n.indexOf(e);-1!==i&&n.splice(i,1),0===n.length&&this.#t[t].delete(r)}}}!function(e){e.moduleId="moduleId",e.serviceId="serviceId"}(n||(n={}));class R{#p;#f;constructor(e,t){this.#p=t??new D({moduleId:{isOptional:!0},serviceId:{isOptional:!1}}),this.#f=e}static build(e){return new R(e)}add(e,t){this.#p.add(e,t)}clone(){return new R(this.#f,this.#p.clone())}get(e){let t=[],r=this.#p.get(n.serviceId,e);void 0!==r&&t.push(r);let i=this.#f()?.get(e);if(void 0!==i&&t.push(i),0!==t.length)return M(...t)}removeAllByModuleId(e){this.#p.removeByRelation(n.moduleId,e)}removeAllByServiceId(e){this.#p.removeByRelation(n.serviceId,e)}}let F="@inversifyjs/core/classMetadataReflectKey";function N(){return{constructorArguments:[],lifecycle:{postConstructMethodNames:new Set,preDestroyMethodNames:new Set},properties:new Map,scope:void 0}}let L="@inversifyjs/core/pendingClassMetadataCountReflectKey",j=Symbol.for("@inversifyjs/core/InversifyCoreError");class U extends Error{[j];kind;constructor(e,t,r){super(t,r),this[j]=!0,this.kind=e}static is(e){return"object"==typeof e&&null!==e&&!0===e[j]}static isErrorOfKind(e,t){return U.is(e)&&e.kind===t}}function $(e){let t=v(e,F)??N();if(!function(e){let t=v(e,L);return void 0!==t&&0!==t}(e))return function(e,t){let r=[];if(t.length<e.length)throw new U(i.missingInjectionDecorator,`Found unexpected missing metadata on type "${e.name}". "${e.name}" constructor requires at least ${e.length.toString()} arguments, found ${t.length.toString()} instead.
10Are you using @inject, @multiInject or @unmanaged decorators in every non optional constructor argument?
11
12If you're using typescript and want to rely on auto injection, set "emitDecoratorMetadata" compiler option to true`);for(let e=0;e<t.length;++e)void 0===t[e]&&r.push(e);if(r.length>0)throw new U(i.missingInjectionDecorator,`Found unexpected missing metadata on type "${e.name}" at constructor indexes "${r.join('", "')}".
13
14Are you using @inject, @multiInject or @unmanaged decorators at those indexes?
15
16If you're using typescript and want to rely on auto injection, set "emitDecoratorMetadata" compiler option to true`)}(e,t.constructorArguments),t;!function(e,t){let r=[];for(let n=0;n<t.constructorArguments.length;++n){let i=t.constructorArguments[n];void 0!==i&&i.kind!==o.unknown||r.push(`  - Missing or incomplete metadata for type "${e.name}" at constructor argument with index ${n.toString()}.
17Every constructor parameter must be decorated either with @inject, @multiInject or @unmanaged decorator.`)}for(let[n,i]of t.properties)i.kind===o.unknown&&r.push(`  - Missing or incomplete metadata for type "${e.name}" at property "${n.toString()}".
18This property must be decorated either with @inject or @multiInject decorator.`);if(0===r.length)throw new U(i.unknown,`Unexpected class metadata for type "${e.name}" with uncompletion traces.
19This might be caused by one of the following reasons:
20
211. A third party library is targeting inversify reflection metadata.
222. A bug is causing the issue. Consider submiting an issue to fix it.`);throw new U(i.missingInjectionDecorator,`Invalid class metadata at type ${e.name}:
23
24${r.join("\n\n")}`)}(e,t)}function B(e,t){let r=$(t).scope??e.scope;return{cache:{isRight:!1,value:void 0},id:E(),implementationType:t,isSatisfiedBy:()=>!0,moduleId:void 0,onActivation:void 0,onDeactivation:void 0,scope:r,serviceIdentifier:t,type:I}}function W(e){return e.isRight?{isRight:!0,value:e.value}:e}function z(e){switch(e.type){case T:case O:return function(e){return{cache:W(e.cache),id:e.id,isSatisfiedBy:e.isSatisfiedBy,moduleId:e.moduleId,onActivation:e.onActivation,onDeactivation:e.onDeactivation,scope:e.scope,serviceIdentifier:e.serviceIdentifier,type:e.type,value:e.value}}(e);case C:return function(e){return{cache:W(e.cache),factory:e.factory,id:e.id,isSatisfiedBy:e.isSatisfiedBy,moduleId:e.moduleId,onActivation:e.onActivation,onDeactivation:e.onDeactivation,scope:e.scope,serviceIdentifier:e.serviceIdentifier,type:e.type}}(e);
24case I:return function(e){return{cache:W(e.cache),id:e.id,implementationType:e.implementationType,isSatisfiedBy:e.isSatisfiedBy,moduleId:e.moduleId,onActivation:e.onActivation,onDeactivation:e.onDeactivation,scope:e.scope,serviceIdentifier:e.serviceIdentifier,type:e.type}}(e);case P:return function(e){return{cache:W(e.cache),id:e.id,isSatisfiedBy:e.isSatisfiedBy,moduleId:e.moduleId,onActivation:e.onActivation,onDeactivation:e.onDeactivation,provider:e.provider,scope:e.scope,serviceIdentifier:e.serviceIdentifier,type:e.type}}(e);case x:return function(e){return{cache:W(e.cache),factory:e.factory,id:e.id,isSatisfiedBy:e.isSatisfiedBy,metadata:e.metadata,moduleId:e.moduleId,onActivation:e.onActivation,onDeactivation:e.onDeactivation,scope:e.scope,serviceIdentifier:e.serviceIdentifier,type:e.type}}(e);case k:return function(e){return{id:e.id,isSatisfiedBy:e.isSatisfiedBy,moduleId:e.moduleId,serviceIdentifier:e.serviceIdentifier,targetServiceIdentifier:e.targetServiceIdentifier,type:e.type}}(e)}}!function(e){e[e.injectionDecoratorConflict=0]="injectionDecoratorConflict",e[e.missingInjectionDecorator=1]="missingInjectionDecorator",e[e.planning=2]="planning",e[e.resolution=3]="resolution",e[e.unknown=4]="unknown"}(i||(i={})),function(e){e[e.unknown=32]="unknown"}(o||(o={})),function(e){e.id="id",e.moduleId="moduleId",e.serviceId="serviceId"}(s||(s={}));class H extends D{_buildNewInstance(e){return new H(e)}_cloneModel(e){return z(e)}}class G{#g;#m;#f;constructor(e,t,r){this.#m=r??new H({id:{isOptional:!1},moduleId:{isOptional:!0},serviceId:{isOptional:!1}}),this.#f=e,this.#g=t}static build(e,t){return new G(e,t)}clone(){return new G(this.#f,this.#g,this.#m.clone())}get(e){let t=this.getNonParentBindings(e)??this.#f()?.get(e);if(void 0!==t)return t;let r=this.#v(e);return void 0===r?r:[r]}*getChained(e){let t=this.getNonParentBindings(e);void 0!==t&&(yield*t);let r=this.#f();if(void 0===r){if(void 0===t){let t=this.#v(e);void 0!==t&&(yield t)}}else yield*r.getChained(e)}getBoundServices(){let e=new Set(this.#m.getAllKeys(s.serviceId)),t=this.#f();if(void 0!==t)for(let r of t.getBoundServices())e.add(r);return e}getById(e){return this.#m.get(s.id,e)??this.#f()?.getById(e)}getByModuleId(e){return this.#m.get(s.moduleId,e)??this.#f()?.getByModuleId(e)}getNonParentBindings(e){return this.#m.get(s.serviceId,e)}getNonParentBoundServices(){return this.#m.getAllKeys(s.serviceId)}removeById(e){this.#m.removeByRelation(s.id,e)}removeAllByModuleId(e){this.#m.removeByRelation(s.moduleId,e)}removeAllByServiceId(e){this.#m.removeByRelation(s.serviceId,e)}set(e){let t={[s.id]:e.id,[s.serviceId]:e.serviceIdentifier};void 0!==e.moduleId&&(t[s.moduleId]=e.moduleId),this.#m.add(e,t)}#v(e){if(void 0===this.#g||"function"!=typeof e)return;let t=B(this.#g,e);return this.set(t),t}}!function(e){e.moduleId="moduleId",e.serviceId="serviceId"}(a||(a={}));class V{#y;#f;constructor(e,t){this.#y=t??new D({moduleId:{isOptional:!0},serviceId:{isOptional:!1}}),this.#f=e}static build(e){return new V(e)}add(e,t){this.#y.add(e,t)}clone(){return new V(this.#f,this.#y.clone())}get(e){let t=[],r=this.#y.get(a.serviceId,e);void 0!==r&&t.push(r);let n=this.#f()?.get(e);if(void 0!==n&&t.push(n),0!==t.length)return M(...t)}removeAllByModuleId(e){this.#y.removeByRelation(a.moduleId,e)}removeAllByServiceId(e){this.#y.removeByRelation(a.serviceId,e)}}function Q(){return 0}function q(e){return t=>{void 0!==t&&t.kind===o.unknown&&b(e,L,Q,e=>e-1)}}function K(e,t){return(...r)=>n=>{if(void 0===n)return e(...r);if(n.kind===l.unmanaged)throw new U(i.injectionDecoratorConflict,"Unexpected injection found. Multiple @inject, @multiInject or @unmanaged decorators found");return t(n,...r)}}function X(e){if(e.kind!==o.unknown&&!0!==e.isFromTypescriptParamType)throw new U(i.injectionDecoratorConflict,"Unexpected injection found. Multiple @inject, @multiInject or @unmanaged decorators found")}!function(e){e[e.multipleInjection=0]="multipleInjection",e[e.singleInjection=1]="singleInjection",e[e.unmanaged=2]="unmanaged"}(l||(l={}));let J=K(function(e,t,r){return e===l.multipleInjection?{chained:r?.chained??!1,kind:e,name:void 0,optional:!1,tags:new Map,value:t}:{kind:e,name:void 0,optional:!1,tags:new Map,value:t}},function(e,t,r,n){return X(e),t===l.multipleInjection?{...e,chained:n?.chained??!1,kind:t,value:r}:{...e,kind:t,value:r}});function Y(e,t){return r=>{let n=r.properties.get(t);return r.properties.set(t,e(n)),r}}function Z(e,t,r,n){if(U.isErrorOfKind(n,i.injectionDecoratorConflict)){let o=function(e,t,r){if(void 0===r){if(void 0===t)throw new U(i.unknown,"Unexpected undefined property and index values");return{kind:c.property,property:t,targetClass:e.constructor}}return"number"==typeof r?{index:r,kind:c.parameter,targetClass:e}:{kind:c.method,method:t,targetClass:e}}(e,t,r);throw new U(i.injectionDecoratorConflict,`Unexpected injection error.
25
26Cause:
27
28${n.message}
29
30Details
31
32${function(e){switch(e.kind){case c.method:return`[class: "${e.targetClass.name}", method: "${e.method.toString()}"]`;case c.parameter:return`[class: "${e.targetClass.name}", index: "${e.index.toString()}"]`;case c.property:return`[class: "${e.targetClass.name}", property: "${e.property.toString()}"]`}}(o)}`,{cause:n})}throw n}function ee(e,t){return(r,n,o)=>{try{void 0===o?(function(e,t){let r=et(e,t);return(e,t)=>{b(e.constructor,F,N,Y(r(e),t))}})(e,t)(r,n):"number"==typeof o?(function(e,t){let r=et(e,t);return(e,t,n)=>{if(!function(e,t){return"function"==typeof e&&void 0===t}(e,t))throw new U(i.injectionDecoratorConflict,`Found an @inject decorator in a non constructor parameter.
33Found @inject decorator at method "${t?.toString()??""}" at class "${e.constructor.name}"`);b(e,F,N,function(e,t){return r=>{let n=r.constructorArguments[t];return r.constructorArguments[t]=e(n),r}}(r(e),n))}})(e,t)(r,n,o):(function(e,t){let r=et(e,t);return(e,t,n)=>{if(!function(e){return void 0!==e.set}(n))throw new U(i.injectionDecoratorConflict,`Found an @inject decorator in a non setter property method.
34Found @inject decorator at method "${t.toString()}" at class "${e.constructor.name}"`);b(e.constructor,F,N,Y(r(e),t))}})(e,t)(r,n,o)}catch(e){Z(r,n,o,e)}}}function et(e,t){return r=>{let n=t(r);return t=>(n(t),e(t))}}function er(e){return ee(J(l.singleInjection,e),q)}!function(e){e[e.method=0]="method",e[e.parameter=1]="parameter",e[e.property=2]="property"}(c||(c={}));let en="@inversifyjs/core/classIsInjectableFlagReflectKey",ei=[Array,BigInt,Boolean,Function,Number,Object,String];function eo(e){let t=v(e,"design:paramtypes");void 0!==t&&b(e,F,N,function(e){return t=>(e.forEach((e,r)=>{var n;void 0!==t.constructorArguments[r]||(n=e,ei.includes(n))||(t.constructorArguments[r]=function(e){return{isFromTypescriptParamType:!0,kind:l.singleInjection,name:void 0,optional:!1,tags:new Map,value:e}}(e))}),t)}(t))}function es(e){return t=>{!function(e){if(void 0!==v(e,en))throw new U(i.injectionDecoratorConflict,`Cannot apply @injectable decorator multiple times at class "${e.name}"`);y(e,en,!0)}(t),eo(t),void 0!==e&&b(t,F,N,t=>({...t,scope:e}))}}function ea(e){return t=>{void 0===t&&b(e,L,Q,e=>e+1)}}function el(e){return t=>{let r=t??{kind:o.unknown,name:void 0,optional:!1,tags:new Map};if(r.kind===l.unmanaged)throw new U(i.injectionDecoratorConflict,"Unexpected injection found. Found @unmanaged injection with additional @named, @optional, @tagged or @targetName injections");return e(r)}}function ec(e){if(e.optional)throw new U(i.injectionDecoratorConflict,"Unexpected duplicated optional decorator");return e.optional=!0,e}function eu(){return ee(el(ec),ea)}function ed(){return{kind:l.unmanaged}}K(ed,function(e){if(X(e),function(e){return void 0!==e.name||e.optional||e.tags.size>0}(e))throw new U(i.injectionDecoratorConflict,"Unexpected injection found. Found @unmanaged injection with additional @named, @optional, @tagged or @targetName injections");return ed()}),function(e){e[e.multipleInjection=0]="multipleInjection",e[e.singleInjection=1]="singleInjection"}(u||(u={}));let eh=/stack space|call stack|too much recursion/i,ep=/too much recursion/;function ef(e){try{return e instanceof Error&&(e instanceof RangeError&&eh.test(e.message)||"InternalError"===e.name&&ep.test(e.message))}catch(e){return e instanceof SyntaxError&&e.message.includes("Stack overflow")}}function eg(e,t){if(ef(t)){let r=function(e){let t=[...e];return 0===t.length?"(No dependency trace)":t.map(f).join(" -> ")}(function(e){let t=new Set;for(let r of e.servicesBranch){if(t.has(r))return[...t,r];t.add(r)}return[...t]}(e));throw new U(i.planning,`Circular dependency found: ${r}`,{cause:t})}throw t}let em=Symbol.for("@inversifyjs/core/LazyPlanServiceNode");class ev{[em];_serviceIdentifier;_serviceNode;constructor(e,t){this[em]=!0,this._serviceNode=e,this._serviceIdentifier=t}get bindings(){return this._getNode().bindings}get isContextFree(){return this._getNode().isContextFree}get serviceIdentifier(){return this._serviceIdentifier}set bindings(e){this._getNode().bindings=e}set isContextFree(e){this._getNode().isContextFree=e}static is(e){return"object"==typeof e&&null!==e&&!0===e[em]}invalidate(){this._serviceNode=void 0}isExpanded(){return void 0!==this._serviceNode}_getNode(){return void 0===this._serviceNode&&(this._serviceNode=this._buildPlanServiceNode()),this._serviceNode}}class ey{#b;constructor(e){this.#b=e}get name(){return this.#b.elem.name}get serviceIdentifier(){return this.#b.elem.serviceIdentifier}get tags(){return this.#b.elem.tags}getAncestor(){if(this.#b.elem.getAncestorsCalled=!0,void 0!==this.#b.previous)return new ey(this.#b.previous)}}function eb(e,t,r){let n=r?.customServiceIdentifier??t.serviceIdentifier,i=(!0===r?.chained?[...e.operations.getBindingsChained(n)]:[...e.operations.getBindings(n)??[]]).filter(e=>e.isSatisfiedBy(t));if(0===i.length&&void 0!==e.autobindOptions&&"function"==typeof n){let r=B(e.autobindOptions,n);e.operations.setBinding(r),r.isSatisfiedBy(t)&&i.push(r)}return i}class eS{last;constructor(e){this.last=e}concat(e){return new eS({elem:e,previous:this.last})}[Symbol.iterator](){let e=this.last;return{next:()=>{if(void 0===e)return{done:!0,value:void 0};let t=e.elem;return e=e.previous,{done:!1,value:t}}}}}function eE(e){let t=new Map;return void 0!==e.rootConstraints.tag&&t.set(e.rootConstraints.tag.key,e.rootConstraints.tag.value),new eS({elem:{getAncestorsCalled:!1,name:e.rootConstraints.name,serviceIdentifier:e.rootConstraints.serviceIdentifier,tags:t},previous:void 0})}function ew(e){return void 0!==e.redirections}function e_(e,t,r,n){let o=r.elem.serviceIdentifier,s=r.previous?.elem.serviceIdentifier;
34Array.isArray(e)?function(e,t,r,n,o,s){if(0!==e.length){let t=s[s.length-1]??r,a=`Ambiguous bindings found for service: "${f(t)}".${eC(s)}
35
36Registered bindings:
37
38${e.map(e=>(function(e){switch(e.type){case I:return`[ type: "${e.type}", serviceIdentifier: "${f(e.serviceIdentifier)}", scope: "${e.scope}", implementationType: "${e.implementationType.name}" ]`;case k:return`[ type: "${e.type}", serviceIdentifier: "${f(e.serviceIdentifier)}", redirection: "${f(e.targetServiceIdentifier)}" ]`;default:return`[ type: "${e.type}", serviceIdentifier: "${f(e.serviceIdentifier)}", scope: "${e.scope}" ]`}})(e.binding)).join("\n")}
39
40Trying to resolve bindings for "${eT(r,n)}".${eO(o)}`;throw new U(i.planning,a)}t||eA(r,n,o,s)}(e,t,o,s,r.elem,n):function(e,t,r,n,i,o){void 0!==e||t||eA(r,n,i,o)}(e,t,o,s,r.elem,n)}function eA(e,t,r,n){let o=n[n.length-1]??e,s=`No bindings found for service: "${f(o)}".
41
42Trying to resolve bindings for "${eT(e,t)}".${eC(n)}${eO(r)}`;throw new U(i.planning,s)}function eT(e,t){return void 0===t?`${f(e)} (Root service)`:f(t)}function eO(e){let t=0===e.tags.size?"":`
43- tags:
44  - ${[...e.tags.keys()].map(e=>e.toString()).join("\n  - ")}`;return`
45
46Binding constraints:
47- service identifier: ${f(e.serviceIdentifier)}
48- name: ${e.name?.toString()??"-"}${t}`}function eC(e){return 0===e.length?"":`
49
50- service redirections:
51  - ${e.map(e=>f(e)).join("\n  - ")}`}function eI(e,t,r,n){if(1===e.redirections.length){let[i]=e.redirections;return void(ew(i)&&eI(i,t,r,[...n,i.binding.targetServiceIdentifier]))}e_(e.redirections,t,r,n)}function eP(e,t,r){if(Array.isArray(e.bindings)&&1===e.bindings.length){let[n]=e.bindings;return void(ew(n)&&eI(n,t,r,[n.binding.targetServiceIdentifier]))}e_(e.bindings,t,r,[])}function ex(e){return m.is(e)?e.unwrap():e}function ek(e){return(t,r,n)=>{let i=ex(n.value),o=r.concat({getAncestorsCalled:!1,name:n.name,serviceIdentifier:i,tags:n.tags}),s=new ey(o.last),a=n.kind===l.multipleInjection&&n.chained,c=eb(t,s,{chained:a}),u=[],d={bindings:u,isContextFree:!0,serviceIdentifier:i};if(u.push(...e(t,o,c,d,a)),d.isContextFree=!o.last.elem.getAncestorsCalled,n.kind===l.singleInjection){eP(d,n.optional,o.last);let[e]=u;d.bindings=e}return d}}function eM(e){return(t,r,n)=>{let i=ex(n.value),o=r.concat({getAncestorsCalled:!1,name:n.name,serviceIdentifier:i,tags:n.tags}),s=new ey(o.last),a=n.kind===u.multipleInjection&&n.chained,l=eb(t,s,{chained:a}),c=[],d={bindings:c,isContextFree:!0,serviceIdentifier:i};if(c.push(...e(t,o,l,d,a)),d.isContextFree=!o.last.elem.getAncestorsCalled,n.kind===u.singleInjection){eP(d,n.optional,o.last);let[e]=c;d.bindings=e}return d}}function eD(e){let t=function(e){return(t,r,n)=>{let i={binding:r,classMetadata:t.operations.getClassMetadata(r.implementationType),constructorParams:[],propertyParams:new Map};return e({autobindOptions:t.autobindOptions,node:i,operations:t.operations,servicesBranch:t.servicesBranch},n)}}(e),r=function(e){return(t,r,n)=>{let i={binding:r,params:[]};return e({autobindOptions:t.autobindOptions,node:i,operations:t.operations,servicesBranch:t.servicesBranch},n)}}(e),n=(e,n,o,s,a)=>{let l=ew(s)?s.binding.targetServiceIdentifier:s.serviceIdentifier;e.servicesBranch.push(l);let c=[];for(let s of o)switch(s.type){case I:c.push(t(e,s,n));break;case x:c.push(r(e,s,n));break;case k:{let t=i(e,n,s,a);c.push(t);break}default:c.push({binding:s})}return e.servicesBranch.pop(),c},i=function(e){return(t,r,n,i)=>{let o={binding:n,redirections:[]},s=eb(t,new ey(r.last),{chained:i,customServiceIdentifier:n.targetServiceIdentifier});return o.redirections.push(...e(t,r,s,o,i)),o}}(n);return n}function eR(e,t,r,n){if(void 0!==e&&(ev.is(r)&&!r.isExpanded()||r.isContextFree)){let n={tree:{root:r}};t.setPlan(e,n)}else t.setNonCachedServiceNode(r,n)}class eF extends ev{#S;#E;#w;#_;constructor(e,t,r,n,i){super(i,ex(n.value)),this.#E=t,this.#S=e,this.#w=r,this.#_=n}_buildPlanServiceNode(){return this.#E(this.#S,this.#w,this.#_)}}class eN extends ev{#S;#A;#w;#T;constructor(e,t,r,n,i){super(i,ex(n.value)),this.#S=e,this.#A=t,this.#w=r,this.#T=n}_buildPlanServiceNode(){return this.#A(this.#S,this.#w,this.#T)}}function eL(e,t,r,n){let i=function(e,t){let r=function(e,t){return(r,n,i)=>{if(i.kind===l.unmanaged)return;let o=function(e){let t;if(0===e.tags.size)t=void 0;else{if(1!==e.tags.size)return;{let[r,n]=e.tags.entries().next().value;t={key:r,value:n}}}let r=m.is(e.value)?e.value.unwrap():e.value;return e.kind===l.multipleInjection?{chained:e.chained,isMultiple:!0,name:e.name,optional:e.optional,serviceIdentifier:r,tag:t}:{isMultiple:!1,name:e.name,optional:e.optional,serviceIdentifier:r,tag:t}}(i);if(void 0!==o){let e=r.operations.getPlan(o);if(void 0!==e&&e.tree.root.isContextFree)return e.tree.root}let s=t(r,n,i),a=new eF(r,e,n,i,s);return eR(o,r.operations,a,{bindingConstraintsList:n,chainedBindings:i.kind===l.multipleInjection&&i.chained,optionalBindings:i.optional}),a}}(e,t);return(e,t,n)=>{let i=t.classMetadata;for(let[o,s]of i.constructorArguments.entries())t.constructorParams[o]=r(e,n,s);for(let[o,s]of i.properties){let i=r(e,n,s);void 0!==i&&t.propertyParams.set(o,i)}
51return e.node}}(e,r),o=function(e,t){let r=function(e,t){return(r,n,i)=>{let o=function(e){let t;if(0===e.tags.size)t=void 0;else{if(1!==e.tags.size)return;{let[r,n]=e.tags.entries().next().value;t={key:r,value:n}}}let r=m.is(e.value)?e.value.unwrap():e.value;return e.kind===u.multipleInjection?{chained:e.chained,isMultiple:!0,name:e.name,optional:e.optional,serviceIdentifier:r,tag:t}:{isMultiple:!1,name:e.name,optional:e.optional,serviceIdentifier:r,tag:t}}(i);if(void 0!==o){let e=r.operations.getPlan(o);if(void 0!==e&&e.tree.root.isContextFree)return e.tree.root}let s=t(r,n,i),a=new eN(r,e,n,i,s);return eR(o,r.operations,a,{bindingConstraintsList:n,chainedBindings:i.kind===u.multipleInjection&&i.chained,optionalBindings:i.optional}),a}}(e,t);return(e,t,n)=>{for(let[i,o]of t.binding.metadata.arguments.entries())t.params[i]=r(e,n,o);return e.node}}(t,n);return(e,t)=>e.node.binding.type===I?i(e,e.node,t):o(e,e.node,t)}class ej extends ev{#S;constructor(e,t){super(t,t.serviceIdentifier),this.#S=e}_buildPlanServiceNode(){return ez(this.#S)}}let eU=ek(eW),e$=eM(eW),eB=eD(eL(eU,e$,eU,e$));function eW(e,t,r,n,i){return eB(e,t,r,n,i)}let ez=function(e){return t=>{let r=eE(t),n=new ey(r.last),i=t.rootConstraints.isMultiple&&t.rootConstraints.chained,o=eb(t,n,{chained:i}),s=[],a={bindings:s,isContextFree:!0,serviceIdentifier:t.rootConstraints.serviceIdentifier};if(s.push(...e(t,r,o,a,i)),a.isContextFree=!r.last.elem.getAncestorsCalled,!t.rootConstraints.isMultiple){eP(a,t.rootConstraints.isOptional??!1,r.last);let[e]=s;a.bindings=e}return a}}(eB);function eH(e){try{let t=function(e){return e.rootConstraints.isMultiple?{chained:e.rootConstraints.chained,isMultiple:!0,name:e.rootConstraints.name,optional:e.rootConstraints.isOptional??!1,serviceIdentifier:e.rootConstraints.serviceIdentifier,tag:e.rootConstraints.tag}:{isMultiple:!1,name:e.rootConstraints.name,optional:e.rootConstraints.isOptional??!1,serviceIdentifier:e.rootConstraints.serviceIdentifier,tag:e.rootConstraints.tag}}(e),r=e.operations.getPlan(t);if(void 0!==r)return r;let n=ez(e),i={tree:{root:new ej(e,n)}};return e.operations.setPlan(t,i),i}catch(t){eg(e,t)}}!function(e){e.bindingAdded="bindingAdded",e.bindingRemoved="bindingRemoved"}(d||(d={}));class eG{#O;#C;#I;constructor(){this.#O=[],this.#C=8,this.#I=1024}*[Symbol.iterator](){let e=0;for(let t of this.#O){let r=t.deref();void 0===r?++e:yield r}this.#O.length>=this.#C&&this.#P(e)&&this.#x(e)}push(e){let t=new WeakRef(e);if(this.#O.push(t),this.#O.length>=this.#C&&this.#O.length%this.#I==0){let e=0;for(let t of this.#O)void 0===t.deref()&&++e;this.#P(e)&&this.#x(e)}}#x(e){let t=Array(this.#O.length-e),r=0;for(let e of this.#O)e.deref()&&(t[r++]=e);this.#O=t}#P(e){return e>=.5*this.#O.length}}let eV=eD(eL(eU,e$,function(e,t,r){return eQ(e,t,r)},function(e,t,r){return eq(e,t,r)})),eQ=function(e){let t=ek(e);return(e,r,n)=>{try{return t(e,r,n)}catch(e){if(U.isErrorOfKind(e,i.planning))return;throw e}}}(eV),eq=function(e){let t=eM(e);return(e,r,n)=>{try{return t(e,r,n)}catch(e){if(U.isErrorOfKind(e,i.planning))return;throw e}}}(eV);function eK(e,t,r,n,o){if(ev.is(t)&&!t.isExpanded())return{isContextFreeBinding:!0,shouldInvalidateServiceNode:!1};let s=new ey(n.last);return!r.isSatisfiedBy(s)||n.last.elem.getAncestorsCalled?{isContextFreeBinding:!n.last.elem.getAncestorsCalled,shouldInvalidateServiceNode:!1}:function(e,t,r,n,o){let s;try{[s]=eV(e,n,[r],t,o)}catch(e){if(ef(e))return{isContextFreeBinding:!1,shouldInvalidateServiceNode:!0};throw e}return function(e,t){if(Array.isArray(e.bindings))e.bindings.push(t);else{if(void 0!==e.bindings){if(!ev.is(e))throw new U(i.planning,"Unexpected non-lazy plan service node. This is likely a bug in the planning logic. Please, report this issue");return{isContextFreeBinding:!0,shouldInvalidateServiceNode:!0}}e.bindings=t}return{isContextFreeBinding:!0,shouldInvalidateServiceNode:!1}}(t,s)}(e,t,r,n,o)}function eX(e,t,r,n){let o;if(ev.is(e)&&!e.isExpanded())return{bindingNodeRemoved:void 0,isContextFreeBinding:!0};let s=new ey(r.last);if(!t.isSatisfiedBy(s)||r.last.elem.getAncestorsCalled)return{bindingNodeRemoved:void 0,isContextFreeBinding:!r.last.elem.getAncestorsCalled};if(Array.isArray(e.bindings))e.bindings=e.bindings.filter(e=>e.binding!==t||(o=e,!1));else if(e.bindings?.binding===t)if(o=e.bindings,n)e.bindings=void 0;else{if(!ev.is(e))throw new U(i.planning,"Unexpected non-lazy plan service node. This is likely a bug in the planning logic. Please, report this issue");
51e.invalidate()}return{bindingNodeRemoved:o,isContextFreeBinding:!0}}class eJ{#k;#M;#D;#R;#F;#N;constructor(){this.#k=new Map,this.#M=this.#L(),this.#D=this.#L(),this.#R=this.#L(),this.#F=this.#L(),this.#N=new eG}clearCache(){for(let e of this.#j())e.clear();for(let e of this.#N)e.clearCache()}get(e){return void 0===e.name?void 0===e.tag?this.#U(this.#M,e).get(e.serviceIdentifier):this.#U(this.#F,e).get(e.serviceIdentifier)?.get(e.tag.key)?.get(e.tag.value):void 0===e.tag?this.#U(this.#D,e).get(e.serviceIdentifier)?.get(e.name):this.#U(this.#R,e).get(e.serviceIdentifier)?.get(e.name)?.get(e.tag.key)?.get(e.tag.value)}invalidateServiceBinding(e){for(let t of(this.#$(e),this.#B(e),this.#W(e),this.#z(e),this.#H(e),this.#N))t.invalidateServiceBinding(e)}set(e,t){void 0===e.name?void 0===e.tag?this.#U(this.#M,e).set(e.serviceIdentifier,t):this.#G(this.#G(this.#U(this.#F,e),e.serviceIdentifier),e.tag.key).set(e.tag.value,t):void 0===e.tag?this.#G(this.#U(this.#D,e),e.serviceIdentifier).set(e.name,t):this.#G(this.#G(this.#G(this.#U(this.#R,e),e.serviceIdentifier),e.name),e.tag.key).set(e.tag.value,t)}setNonCachedServiceNode(e,t){let r=this.#k.get(e.serviceIdentifier);void 0===r&&(r=new Map,this.#k.set(e.serviceIdentifier,r)),r.set(e,t)}subscribe(e){this.#N.push(e)}#L(){let e=Array(8);for(let t=0;t<e.length;++t)e[t]=new Map;return e}#V(e,t,r,n){let i,o=!!(2&t);return i=o?{chained:!!(0&t),isMultiple:o,serviceIdentifier:e.binding.serviceIdentifier}:{isMultiple:o,serviceIdentifier:e.binding.serviceIdentifier},1&t&&(i.isOptional=!0),void 0!==r&&(i.name=r),void 0!==n&&(i.tag=n),{autobindOptions:void 0,operations:e.operations,rootConstraints:i,servicesBranch:[]}}#G(e,t){let r=e.get(t);return void 0===r&&(r=new Map,e.set(t,r)),r}#U(e,t){return e[this.#Q(t)]}#j(){return[this.#k,...this.#M,...this.#D,...this.#R,...this.#F]}#Q(e){return e.isMultiple?4*!!e.chained|!!e.optional|2:+!!e.optional}#B(e){for(let[t,r]of this.#D.entries()){let n=r.get(e.binding.serviceIdentifier);if(void 0!==n)for(let[r,i]of n.entries())this.#q(e,i,t,r,void 0)}}#W(e){for(let[t,r]of this.#R.entries()){let n=r.get(e.binding.serviceIdentifier);if(void 0!==n)for(let[r,i]of n.entries())for(let[n,o]of i.entries())for(let[i,s]of o.entries())this.#q(e,s,t,r,{key:n,value:i})}}#K(e){switch(e.binding.type){case k:for(let t of e.redirections)this.#K(t);break;case I:for(let t of e.constructorParams)void 0!==t&&this.#X(t);for(let t of e.propertyParams.values())this.#X(t);break;case x:for(let t of e.params)this.#X(t)}}#X(e){let t=this.#k.get(e.serviceIdentifier);void 0!==t&&t.has(e)&&(t.delete(e),this.#J(e))}#J(e){if((!ev.is(e)||e.isExpanded())&&void 0!==e.bindings)if(Array.isArray(e.bindings))for(let t of e.bindings)this.#K(t);else this.#K(e.bindings)}#H(e){let t=this.#k.get(e.binding.serviceIdentifier);if(void 0!==t)switch(e.kind){case d.bindingAdded:for(let[r,n]of t){let t=eK({autobindOptions:void 0,operations:e.operations,servicesBranch:[]},r,e.binding,n.bindingConstraintsList,n.chainedBindings);t.isContextFreeBinding?t.shouldInvalidateServiceNode&&ev.is(r)&&(this.#J(r),r.invalidate()):this.clearCache()}break;case d.bindingRemoved:for(let[r,n]of t){let t=eX(r,e.binding,n.bindingConstraintsList,n.optionalBindings);t.isContextFreeBinding?void 0!==t.bindingNodeRemoved&&this.#K(t.bindingNodeRemoved):this.clearCache()}}}#$(e){for(let[t,r]of this.#M.entries()){let n=r.get(e.binding.serviceIdentifier);this.#q(e,n,t,void 0,void 0)}}#z(e){for(let[t,r]of this.#F.entries()){let n=r.get(e.binding.serviceIdentifier);if(void 0!==n)for(let[r,i]of n.entries())for(let[n,o]of i.entries())this.#q(e,o,t,void 0,{key:r,value:n})}}#q(e,t,r,n,i){var o,s,a;if(void 0!==t&&ev.is(t.tree.root)){let l=this.#V(e,r,n,i);switch(e.kind){case d.bindingAdded:{let r=(o=l,s=t.tree.root,a=e.binding,ev.is(s)&&!s.isExpanded()?{isContextFreeBinding:!0,shouldInvalidateServiceNode:!1}:eK(o,s,a,eE(o),o.rootConstraints.isMultiple&&o.rootConstraints.chained));r.isContextFreeBinding?r.shouldInvalidateServiceNode&&(this.#J(t.tree.root),t.tree.root.invalidate()):this.clearCache()}break;case d.bindingRemoved:{let r=function(e,t,r){return ev.is(t)&&!t.isExpanded()?{bindingNodeRemoved:void 0,isContextFreeBinding:!0}:eX(t,r,eE(e),e.rootConstraints.isOptional??!1)}(l,t.tree.root,e.binding);r.isContextFreeBinding?void 0!==r.bindingNodeRemoved&&this.#K(r.bindingNodeRemoved):this.clearCache()}}}}}function eY(e,t){if(ef(t)){let r=function(e){let t=[...e];return 0===t.length?"(No dependency trace)":t.map(f).join(" -> ")}(function(e){let t=e.planResult.tree.root,r=[];function n(e){let t=r.indexOf(e);if(-1!==t)return[...r.slice(t),e].map(e=>e.serviceIdentifier);r.push(e);try{for(let t of function(e){let t=[],r=e.bindings;if(void 0===r)return t;let n=e=>{if(ew(e))for(let t of e.redirections)n(t);else switch(e.binding.type){case I:{let r=e;for(let e of r.constructorParams)void 0!==e&&t.push(e);for(let e of r.propertyParams.values())t.push(e);break}case x:for(let r of e.params)t.push(r)}};if(Array.isArray(r))for(let e of r)n(e);else n(r);return t}(e)){let e=n(t);if(void 0!==e)return e}}finally{r.pop()}}return n(t)??[]}(e));
51throw new U(i.planning,`Circular dependency found: ${r}`,{cause:t})}throw t}function eZ(e,t){return p(t)?(e.cache={isRight:!0,value:t},t.then(t=>e0(e,t))):e0(e,t)}function e0(e,t){return e.cache={isRight:!0,value:t},t}function e1(e,t,r){let n=e.getActivations(t);return void 0===n?r:p(r)?e2(e,r,n[Symbol.iterator]()):function(e,t,r){let n=t,i=r.next();for(;!0!==i.done;){let t=i.value(e.context,n);if(p(t))return e2(e,t,r);n=t,i=r.next()}return n}(e,r,n[Symbol.iterator]())}async function e2(e,t,r){let n=await t,i=r.next();for(;!0!==i.done;)n=await i.value(e.context,n),i=r.next();return n}function e3(e,t,r){let n=r;if(void 0!==t.onActivation){let r=t.onActivation;n=p(n)?n.then(t=>r(e.context,t)):r(e.context,n)}return e1(e,t.serviceIdentifier,n)}function e4(e){return(t,r)=>r.cache.isRight?r.cache.value:eZ(r,e3(t,r,e(t,r)))}let e9=e4(function(e,t){return t.value});function e6(e,t){return(r,n)=>{let i=e(n);switch(i.scope){case _:if(i.cache.isRight)return i.cache.value;return eZ(i,e3(r,i,t(r,n)));case w:{if(r.requestScopeCache.has(i.id))return r.requestScopeCache.get(i.id);let e=e3(r,i,t(r,n));return r.requestScopeCache.set(i.id,e),e}case A:return e3(r,i,t(r,n))}}}let e5=e6(function e(e){return e},function(e,t){return t.value(e.context)}),e7=e4(function(e,t){return t.factory(e.context)});function e8(e,t,r){let n=function(e,t,r){if(!(r in e))throw new U(i.resolution,`Expecting a "${r.toString()}" property when resolving "${t.implementationType.name}" class @postConstruct decorated method, none found.`);if("function"!=typeof e[r])throw new U(i.resolution,`Expecting a "${r.toString()}" method when resolving "${t.implementationType.name}" class @postConstruct decorated method, a non function property was found instead.`);{let n;try{n=e[r]()}catch(e){throw new U(i.resolution,`Unexpected error found when calling "${r.toString()}" @postConstruct decorated method on class "${t.implementationType.name}"`,{cause:e})}if(p(n))return async function(e,t,r){try{await r}catch(r){throw new U(i.resolution,`Unexpected error found when calling "${t.toString()}" @postConstruct decorated method on class "${e.implementationType.name}"`,{cause:r})}}(t,r,n)}}(e,t,r);return p(n)?n.then(()=>e):e}function te(e,t,r){if(0===r.size)return e;let n=e;for(let e of r)n=p(n)?n.then(r=>e8(r,t,e)):e8(n,t,e);return n}function tt(e){return(t,r,n)=>{let i=new n.binding.implementationType(...t),o=e(r,i,n);return p(o)?o.then(()=>te(i,n.binding,n.classMetadata.lifecycle.postConstructMethodNames)):te(i,n.binding,n.classMetadata.lifecycle.postConstructMethodNames)}}let tr=e4(function(e,t){return t.provider(e.context)});function tn(e){return e.binding}function ti(e){return e.binding}let to=function(e){return(t,r,n)=>{let o=[];for(let[s,a]of n.propertyParams){let c=n.classMetadata.properties.get(s);if(void 0===c)throw new U(i.resolution,`Expecting metadata at property "${s.toString()}", none found`);c.kind!==l.unmanaged&&void 0!==a.bindings&&(r[s]=e(t,a),p(r[s])&&o.push((async()=>{r[s]=await r[s]})()))}if(o.length>0)return Promise.all(o).then(()=>{})}}(tp),ts=function(e){return function t(r,n){let i=[];for(let o of n.redirections)ew(o)?i.push(...t(r,o)):i.push(e(r,o));return i}}(th),ta=function(e,t,r){return(n,i)=>{let o=e(n,i);return p(o)?t(o,n,i):r(o,n,i)}}(function(e){return(t,r)=>{let n=[];for(let i of r.constructorParams)void 0===i?n.push(void 0):n.push(e(t,i));return n.some(p)?Promise.all(n):n}}(tp),function(e){return async(t,r,n)=>e(await t,r,n)}(tt(to)),tt(to)),tl=function(e){return(t,r)=>{let n=e(t,r);return p(n)?n.then(e=>r.binding.factory(...e)):r.binding.factory(...n)}}(function(e){return(t,r)=>{let n=[];for(let i of r.params)n.push(e(t,i));return n.some(p)?Promise.all(n):n}}(tp)),tc=e6(tn,ta),tu=e6(ti,tl);function td(e){try{return tp(e,e.planResult.tree.root)}catch(t){eY(e,t)}}function th(e,t){switch(t.binding.type){case T:return e9(e,t.binding);case O:return e5(e,t.binding);case C:return e7(e,t.binding);case I:return tc(e,t);case P:return tr(e,t.binding);case x:return tu(e,t)}}function tp(e,t){if(void 0!==t.bindings)return Array.isArray(t.bindings)?function(e,t){let r=[];for(let n of t)ew(n)?r.push(...ts(e,n)):r.push(th(e,n));return r.some(p)?Promise.all(r):r}(e,t.bindings):function(e,t){if(ew(t)){let r=ts(e,t);if(1===r.length)return r[0];throw new U(i.resolution,"Unexpected multiple resolved values on single injection")}return th(e,t)}(e,t.bindings)}function tf(e){return void 0!==e.scope}function tg(e,t){if("function"==typeof e[t])return e[t]()}function tm(e,t){let r,n=e.lifecycle.preDestroyMethodNames;if(0!==n.size){for(let e of n)r=void 0===r?tg(t,e):r.then(()=>tg(t,e));return r}}function tv(e,t,r){let n=e.getDeactivations(t);if(void 0!==n)return p(r)?ty(r,n[Symbol.iterator]()):function(e,t){let r=t.next();for(;!0!==r.done;){if(p(r.value(e)))return ty(e,t);r=t.next()}}(r,n[Symbol.iterator]())}async function ty(e,t){let r=await e,n=t.next();for(;!0!==n.done;)await n.value(r),n=t.next()}function tb(e,t){let r=function(e,t){if(t.type===I){let r=e.getClassMetadata(t.
51implementationType),n=t.cache.value;return p(n)?n.then(e=>tm(r,e)):tm(r,n)}}(e,t);return void 0===r?tS(e,t):r.then(()=>tS(e,t))}function tS(e,t){let r=t.cache;return p(r.value)?r.value.then(r=>tE(e,t,r)):tE(e,t,r.value)}function tE(e,t,r){let n;return void 0!==t.onDeactivation&&(n=(0,t.onDeactivation)(r)),void 0===n?tv(e,t.serviceIdentifier,r):n.then(()=>tv(e,t.serviceIdentifier,r))}function tw(e,t){if(void 0===t)return;let r=function(e){let t=[];for(let r of e)tf(r)&&r.scope===_&&r.cache.isRight&&t.push(r);return t}(t),n=[];for(let t of r){let r=tb(e,t);void 0!==r&&n.push(r)}return n.length>0?Promise.all(n).then(()=>{}):void 0}function t_(e,t){let r=e.getBindingsFromModule(t);return tw(e,r)}function tA(e,t){let r=e.getBindings(t);return tw(e,r)}let tT=Symbol.for("@inversifyjs/plugin/isPlugin"),tO=Symbol.for("@inversifyjs/container/bindingIdentifier");function tC(e){return"object"==typeof e&&null!==e&&!0===e[tO]}class tI{static always=e=>!0}let tP=Symbol.for("@inversifyjs/container/InversifyContainerError");class tx extends Error{[tP];kind;constructor(e,t,r){super(t,r),this[tP]=!0,this.kind=e}static is(e){return"object"==typeof e&&null!==e&&!0===e[tP]}
51static isErrorOfKind(e,t){return tx.is(e)&&e.kind===t}}function tk(e){return{[tO]:!0,id:e.id}}function tM(e){return t=>{for(let r=t.getAncestor();void 0!==r;r=r.getAncestor())if(e(r))return!0;return!1}}function tD(e){return t=>t.name===e}function tR(e){return t=>t.serviceIdentifier===e}function tF(e,t){return r=>r.tags.has(e)&&r.tags.get(e)===t}function tN(e){return void 0===e.name&&0===e.tags.size}function tL(e){let t=tM(e);return e=>!t(e)}function tj(e){return t=>{let r=t.getAncestor();return void 0===r||!e(r)}}function tU(e){return t=>{let r=t.getAncestor();return void 0!==r&&e(r)}}!function(e){e[e.invalidOperation=0]="invalidOperation"}(h||(h={}));class t${#n;constructor(e){this.#n=e}getIdentifier(){return tk(this.#n)}inRequestScope(){return this.#n.scope=w,new tH(this.#n)}inSingletonScope(){return this.#n.scope=_,new tH(this.#n)}inTransientScope(){return this.#n.scope=A,new tH(this.#n)}}class tB{#t;#o;#a;#s;constructor(e,t,r,n){this.#t=e,this.#o=t,this.#a=r,this.#s=n}to(e){let t=$(e),r={cache:{isRight:!1,value:void 0},id:E(),implementationType:e,isSatisfiedBy:tI.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:t.scope??this.#a,serviceIdentifier:this.#s,type:I};return this.#t(r),new tG(r)}toSelf(){if("function"!=typeof this.#s)throw Error('"toSelf" function can only be applied when a newable function is used as service identifier');return this.to(this.#s)}toConstantValue(e){let t={cache:{isRight:!1,value:void 0},id:E(),isSatisfiedBy:tI.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:_,serviceIdentifier:this.#s,type:T,value:e};return this.#t(t),new tH(t)}toDynamicValue(e){let t={cache:{isRight:!1,value:void 0},id:E(),isSatisfiedBy:tI.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:this.#a,serviceIdentifier:this.#s,type:O,value:e};return this.#t(t),new tG(t)}toResolvedValue(e,t){let r={cache:{isRight:!1,value:void 0},factory:e,id:E(),isSatisfiedBy:tI.always,metadata:this.#i(t),moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:this.#a,serviceIdentifier:this.#s,type:x};return this.#t(r),new tG(r)}toFactory(e){let t={cache:{isRight:!1,value:void 0},factory:e,id:E(),isSatisfiedBy:tI.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:_,serviceIdentifier:this.#s,type:C};return this.#t(t),new tH(t)}toProvider(e){let t={cache:{isRight:!1,value:void 0},id:E(),isSatisfiedBy:tI.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,provider:e,scope:_,serviceIdentifier:this.#s,type:P};return this.#t(t),new tH(t)}toService(e){let t={id:E(),isSatisfiedBy:tI.always,moduleId:this.#o,serviceIdentifier:this.#s,targetServiceIdentifier:e,type:k};this.#t(t)}#i(e){return{arguments:(e??[]).map(e=>!function(e){return"object"==typeof e&&!m.is(e)}(e)?{kind:u.singleInjection,name:void 0,optional:!1,tags:new Map,value:e}:!function(e){return!0===e.isMultiple}(e)?{kind:u.singleInjection,name:e.name,optional:e.optional??!1,tags:new Map((e.tags??[]).map(e=>[e.key,e.value])),value:e.serviceIdentifier}:{chained:e.chained??!1,kind:u.multipleInjection,name:e.name,optional:e.optional??!1,tags:new Map((e.tags??[]).map(e=>[e.key,e.value])),value:e.serviceIdentifier})}}}class tW{#n;constructor(e){this.#n=e}getIdentifier(){return tk(this.#n)}onActivation(e){return this.#n.onActivation=e,new tz(this.#n)}onDeactivation(e){if(this.#n.onDeactivation=e,this.#n.scope!==_)throw new tx(h.invalidOperation,`Binding for service "${f(this.#n.serviceIdentifier)}" has a deactivation function, but its scope is not singleton. Deactivation functions can only be used with singleton bindings.`);return new tz(this.#n)}}class tz{#n;constructor(e){this.#n=e}getIdentifier(){return tk(this.#n)}when(e){return this.#n.isSatisfiedBy=e,new tW(this.#n)}whenAnyAncestor(e){return this.when(tM(e))}whenAnyAncestorIs(e){return this.when(tM(tR(e)))}whenAnyAncestorNamed(e){return this.when(function(e){return tM(tD(e))}(e))}whenAnyAncestorTagged(e,t){return this.when(function(e,t){return tM(tF(e,t))}(e,t))}whenDefault(){return this.when(tN)}whenNamed(e){return this.when(tD(e))}whenNoParent(e){return this.when(tj(e))}whenNoParentIs(e){return this.when(tj(tR(e)))}whenNoParentNamed(e){return this.when(function(e){return tj(tD(e))}(e))}whenNoParentTagged(e,t){return this.when(function(e,t){return tj(tF(e,t))}(e,t))}whenParent(e){return this.when(tU(e))}whenParentIs(e){return this.when(tU(tR(e)))}whenParentNamed(e){return this.when(function(e){return tU(tD(e))}(e))}whenParentTagged(e,t){return this.when(function(e,t){return tU(tF(e,t))}(e,t))}whenTagged(e,t){return this.when(tF(e,t))}
51whenNoAncestor(e){return this.when(tL(e))}whenNoAncestorIs(e){return this.when(tL(tR(e)))}whenNoAncestorNamed(e){return this.when(function(e){return tL(tD(e))}(e))}whenNoAncestorTagged(e,t){return this.when(function(e,t){return tL(tF(e,t))}(e,t))}}class tH extends tz{#l;constructor(e){super(e),this.#l=new tW(e)}onActivation(e){return this.#l.onActivation(e)}onDeactivation(e){return this.#l.onDeactivation(e)}}class tG extends tH{#c;constructor(e){super(e),this.#c=new t$(e)}inRequestScope(){return this.#c.inRequestScope()}inSingletonScope(){return this.#c.inSingletonScope()}inTransientScope(){return this.#c.inTransientScope()}}class tV{#d;#a;#u;#g;constructor(e,t,r,n){this.#d=e,this.#a=t,this.#u=r,this.#g=n}bind(e){return new tB(e=>{this.#f(e)},void 0,this.#a,e)}isBound(e,t){let r=this.#g.bindingService.get(e);return this.#m(e,r,t)}isCurrentBound(e,t){let r=this.#g.bindingService.getNonParentBindings(e);return this.#m(e,r,t)}async rebind(e){return await this.unbind(e),this.bind(e)}rebindSync(e){return this.unbindSync(e),this.bind(e)}async unbind(e){await this.#E(e)}async unbindAll(){await this.#p()}unbindAllSync(){if(void 0!==this.#p())throw new tx(h.invalidOperation,"Unexpected asynchronous deactivation when unbinding all services. Consider using Container.unbindAll() instead.")}unbindSync(e){void 0!==this.#E(e)&&this.#h(e)}#f(e){this.#g.bindingService.set(e),this.#u.invalidateService({binding:e,kind:d.bindingAdded})}#h(e){var t;let r;if(tC(e)){let n=this.#g.bindingService.getById(e.id),i=(t=n,function(e){if(void 0===e)return;let t=e.next();return!0!==t.done?t.value:void 0}(t?.[Symbol.iterator]()))?.serviceIdentifier;r=void 0===i?"Unexpected asynchronous deactivation when unbinding binding identifier. Consider using Container.unbind() instead.":`Unexpected asynchronous deactivation when unbinding "${f(i)}" binding. Consider using Container.unbind() instead.`}else r=`Unexpected asynchronous deactivation when unbinding "${f(e)}" service. Consider using Container.unbind() instead.`;throw new tx(h.invalidOperation,r)}#E(e){return tC(e)?this.#A(e):this.#b(e)}#A(e){let t=this.#g.bindingService.getById(e.id),r=void 0===t?void 0:[...t],n=tw(this.#d,t);if(void 0!==n)return n.then(()=>{this.#P(r,e)});this.#P(r,e)}#P(e,t){if(this.#g.bindingService.removeById(t.id),void 0!==e)for(let t of e)this.#u.invalidateService({binding:t,kind:d.bindingRemoved})}#p(){let e=[...this.#g.bindingService.getNonParentBoundServices()],t=e.map(e=>tA(this.#d,e));if(t.some(e=>p(e)))return Promise.all(t).then(()=>{this.#y(e)});this.#y(e)}#y(e){for(let t of e)this.#g.activationService.removeAllByServiceId(t),this.#g.bindingService.removeAllByServiceId(t),this.#g.deactivationService.removeAllByServiceId(t);this.#g.planResultCacheService.clearCache()}#b(e){let t=this.#g.bindingService.get(e),r=void 0===t?void 0:[...t],n=tw(this.#d,t);if(void 0!==n)return n.then(()=>{this.#v(e,r)});this.#v(e,r)}#v(e,t){if(this.#g.activationService.removeAllByServiceId(e),this.#g.bindingService.removeAllByServiceId(e),this.#g.deactivationService.removeAllByServiceId(e),void 0!==t)for(let e of t)this.#u.invalidateService({binding:e,kind:d.bindingRemoved})}#m(e,t,r){if(void 0===t)return!1;let n={getAncestor:()=>{},name:r?.name,serviceIdentifier:e,tags:new Map};for(let e of(void 0!==r?.tag&&n.tags.set(r.tag.key,r.tag.value),t))if(e.isSatisfiedBy(n))return!0;return!1}}class tQ{#w;#d;#a;#u;#g;constructor(e,t,r,n,i){this.#w=e,this.#d=t,this.#a=r,this.#u=n,this.#g=i}async load(...e){await Promise.all(this.#r(...e))}loadSync(...e){for(let t of this.#r(...e))if(void 0!==t)throw new tx(h.invalidOperation,"Unexpected asynchronous module load. Consider using Container.load() instead.")}async unload(...e){await Promise.all(this.#C(...e)),this.#S(e)}unloadSync(...e){for(let t of this.#C(...e))if(void 0!==t)throw new tx(h.invalidOperation,"Unexpected asynchronous module unload. Consider using Container.unload() instead.");this.#S(e)}#O(e){return{bind:t=>new tB(e=>{this.#f(e)},e,this.#a,t),isBound:this.#w.isBound.bind(this.#w),onActivation:(t,r)=>{this.#g.activationService.add(r,{moduleId:e,serviceId:t})},onDeactivation:(t,r)=>{this.#g.deactivationService.add(r,{moduleId:e,serviceId:t})},rebind:this.#w.rebind.bind(this.#w),rebindSync:this.#w.rebindSync.bind(this.#w),unbind:this.#w.unbind.bind(this.#w),unbindSync:this.#w.unbindSync.bind(this.#w)}}#S(e){for(let t of e)this.#g.activationService.removeAllByModuleId(t.id),this.#g.bindingService.removeAllByModuleId(t.id),this.#g.deactivationService.removeAllByModuleId(t.id);this.#g.planResultCacheService.clearCache()}#r(...e){return e.map(e=>e.load(this.#O(e.id)))}
51#f(e){this.#g.bindingService.set(e),this.#u.invalidateService({binding:e,kind:d.bindingAdded})}#C(...e){return e.map(e=>t_(this.#d,e.id))}}class tq{deactivationParams;constructor(e){this.deactivationParams=function(e){return{getBindings:e.bindingService.get.bind(e.bindingService),getBindingsFromModule:e.bindingService.getByModuleId.bind(e.bindingService),getClassMetadata:$,getDeactivations:e.deactivationService.get.bind(e.deactivationService)}}(e),e.onReset(()=>{!function(e,t){t.getBindings=e.bindingService.get.bind(e.bindingService),t.getBindingsFromModule=e.bindingService.getByModuleId.bind(e.bindingService),t.getDeactivations=e.deactivationService.get.bind(e.deactivationService)}(e,this.deactivationParams)})}}class tK{planParamsOperations;#g;constructor(e){this.#g=e,this.planParamsOperations={getBindings:this.#g.bindingService.get.bind(this.#g.bindingService),getBindingsChained:this.#g.bindingService.getChained.bind(this.#g.bindingService),getClassMetadata:$,getPlan:this.#g.planResultCacheService.get.bind(this.#g.planResultCacheService),setBinding:this.#f.bind(this),setNonCachedServiceNode:this.#g.planResultCacheService.setNonCachedServiceNode.bind(this.#g.planResultCacheService),setPlan:this.#g.planResultCacheService.set.bind(this.#g.planResultCacheService)},this.#g.onReset(()=>{this.#_()})}#_(){this.planParamsOperations.getBindings=this.#g.bindingService.get.bind(this.#g.bindingService),this.planParamsOperations.getBindingsChained=this.#g.bindingService.getChained.bind(this.#g.bindingService),this.planParamsOperations.setBinding=this.#f.bind(this)}#f(e){this.#g.bindingService.set(e),this.#g.planResultCacheService.invalidateServiceBinding({binding:e,kind:d.bindingAdded,operations:this.planParamsOperations})}}class tX{#M;#g;constructor(e,t){this.#M=e,this.#g=t}invalidateService(e){this.#g.planResultCacheService.invalidateServiceBinding({...e,operations:this.#M.planParamsOperations})}}class tJ{#j;#I;#R;#g;constructor(e,t,r){this.#g=t,this.#R=r,this.#j=this.#T(e),this.#I=this.#z()}register(e,t){let r=new t(e,this.#I);if(!0!==r[tT])throw new tx(h.invalidOperation,"Invalid plugin. The plugin must extend the Plugin class");r.load(this.#j)}#T(e){return{define:(t,r)=>{if(Object.prototype.hasOwnProperty.call(e,t))throw new tx(h.invalidOperation,`Container already has a method named "${String(t)}"`);e[t]=r},onPlan:this.#R.onPlan.bind(this.#R)}}#z(){let e=this.#g;return{get activationService(){return e.activationService},get bindingService(){return e.bindingService},get deactivationService(){return e.deactivationService},get planResultCacheService(){return e.planResultCacheService}}}}class tY{activationService;bindingService;deactivationService;planResultCacheService;#D;constructor(e,t,r,n){this.activationService=e,this.bindingService=t,this.deactivationService=r,this.planResultCacheService=n,this.#D=[]}reset(e,t,r){for(let n of(this.activationService=e,this.bindingService=t,this.deactivationService=r,this.planResultCacheService.clearCache(),this.#D))n()}onReset(e){this.#D.push(e)}}class tZ{#N;#a;#k;#x;#L;#M;#g;constructor(e,t,r,n){this.#M=e,this.#g=t,this.#x=this.#U(),this.#N=r,this.#a=n,this.#k=e=>this.#g.activationService.get(e),this.#L=[],this.#g.onReset(()=>{this.#_()})}get(e,t){let r=this.#W(!1,e,t),n=this.#F(r);if(p(n))throw new tx(h.invalidOperation,`Unexpected asynchronous service when resolving service "${f(e)}"`);return n}getAll(e,t){let r=this.#W(!0,e,t),n=this.#F(r);if(p(n))throw new tx(h.invalidOperation,`Unexpected asynchronous service when resolving service "${f(e)}"`);return n}async getAllAsync(e,t){let r=this.#W(!0,e,t);return this.#F(r)}async getAsync(e,t){let r=this.#W(!1,e,t);return this.#F(r)}onPlan(e){this.#L.push(e)}#_(){this.#x=this.#U()}#G(e,t,r){let n=r?.name,i=r?.optional??!1,o=r?.tag;return e?{chained:r?.chained??!1,isMultiple:e,name:n,optional:i,serviceIdentifier:t,tag:o}:{isMultiple:e,name:n,optional:i,serviceIdentifier:t,tag:o}}#V(e,t,r){let n={autobindOptions:r?.autobind??this.#N?{scope:this.#a}:void 0,operations:this.#M.planParamsOperations,rootConstraints:this.#K(e,t,r),servicesBranch:[]};return this.#$(n,r),n}#K(e,t,r){return t?{chained:r?.chained??!1,isMultiple:t,serviceIdentifier:e}:{isMultiple:t,serviceIdentifier:e}}#W(e,t,r){let n=this.#G(e,t,r),i=this.#g.planResultCacheService.get(n);if(void 0!==i)return i;let o=eH(this.#V(t,e,r));for(let e of this.#L)e(n,o);return o}#U(){return{get:this.get.bind(this),getAll:this.getAll.bind(this),getAllAsync:this.getAllAsync.bind(this),getAsync:this.getAsync.bind(this)}}#F(e){return td({context:this.#x,getActivations:this.#k,planResult:e,requestScopeCache:new Map})}#$(e,t){void 0!==t&&(void 0!==t.name&&(e.rootConstraints.name=t.name),!0===t.optional&&(e.rootConstraints.isOptional=!0),void 0!==t.tag&&(e.rootConstraints.tag={key:t.tag.key,value:t.tag.value}),e.rootConstraints.isMultiple&&(e.rootConstraints.chained=t?.chained??!1))}}class t0{#g;#B;constructor(e){this.#g=e,this.#B=[]}restore(){let e=this.#B.pop();if(void 0===e)throw new tx(h.invalidOperation,"No snapshot available to restore");this.#g.reset(e.activationService,e.bindingService,e.deactivationService)}snapshot(){this.#B.push({activationService:this.#g.activationService.clone(),bindingService:this.#g.bindingService.clone(),deactivationService:this.#g.deactivationService.clone()})}}let t1=A;class t2{#w;#H;#q;#g;#R;#X;constructor(e){const t=e?.autobind??!1,r=e?.defaultScope??t1;this.#g=this.#J(e,t,r);const n=new tK(this.#g),i=new tX(n,this.#g),o=new tq(this.#g);this.#w=new tV(o.deactivationParams,r,i,this.#g),this.#H=new tQ(this.#w,o.deactivationParams,r,i,this.#g),this.#R=new tZ(n,this.#g,t,r),this.#q=new tJ(this,this.#g,this.#R),this.#X=new t0(this.#g)}bind(e){return this.#w.bind(e)}get(e,t){return this.#R.get(e,t)}getAll(e,t){return this.#R.getAll(e,t)}async getAllAsync(e,t){return this.#R.getAllAsync(e,t)}async getAsync(e,t){return this.#R.getAsync(e,t)}isBound(e,t){return this.#w.isBound(e,t)}isCurrentBound(e,t){return this.#w.isCurrentBound(e,t)}async load(...e){return this.#H.load(...e)}loadSync(...e){this.#H.loadSync(...e)}onActivation(e,t){this.#g.activationService.add(t,{serviceId:e})}onDeactivation(e,t){this.#g.deactivationService.add(t,{serviceId:e})}register(e){this.#q.register(this,e)}
51restore(){this.#X.restore()}async rebind(e){return this.#w.rebind(e)}rebindSync(e){return this.#w.rebindSync(e)}snapshot(){this.#X.snapshot()}async unbind(e){await this.#w.unbind(e)}async unbindAll(){await this.#w.unbindAll()}unbindAllSync(){this.#w.unbindAllSync()}unbindSync(e){this.#w.unbindSync(e)}async unload(...e){return this.#H.unload(...e)}unloadSync(...e){this.#H.unloadSync(...e)}#Q(e,t){if(e)return{scope:t}}#J(e,t,r){let n=this.#Q(t,r);if(void 0===e?.parent)return new tY(R.build(()=>{}),G.build(()=>{},n),V.build(()=>{}),new eJ);let i=new eJ,o=e.parent;return o.#g.planResultCacheService.subscribe(i),new tY(R.build(()=>o.#g.activationService),G.build(()=>o.#g.bindingService,n),V.build(()=>o.#g.deactivationService),i)}}},43622:(e,t,r)=>{var n=r(46141),i=r(49318);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},43629:(e,t,r)=>{"use strict";r.d(t,{N:()=>i,W:()=>o});let n=36e5;class i{constructor(e){this.date=e}fromNow(){return this.fromDate(new Date)}fromDate(e){return this.durationToReadable(Math.abs(o.from(e).getTime()-this.date.getTime()))}durationToReadable(e){function t(e){return e>1?"s":""}var r=Math.floor(e/1e3),n=Math.floor(r/31536e3);if(n)return n+" year"+t(n);var i=Math.floor((r%=31536e3)/86400);if(i)return i+" day"+t(i);var o=Math.floor((r%=86400)/3600);if(o)return o+" hour"+t(o);var s=Math.floor((r%=3600)/60);if(s)return s+" minute"+t(s);var a=r%60;return a?a+" second"+t(a):"less than a second"}}class o{constructor(e){this.date=e,this.time=e.getTime()}static fromString(e){return new o(new Date(e))}static fromDate(e){return new o(new Date(e))}static from(e){return e||(e=new Date),e instanceof o?e:e instanceof Date?o.fromDate(e):o.fromString(e)}add(e,t="hours"){let r=e;return r="hours"===t?e*n:24*e*n,this.time=this.time+r,this}subtract(e,t="hours"){return this.add(-1*e,t)}toDate(){return new Date(this.time)}getTime(){return this.time}isBefore(e){return this.time<o.from(e).getTime()}isAfter(e){return this.time>o.from(e).getTime()}isValid(){try{return this.date instanceof Date&&!isNaN(this.date.getTime())}catch(e){}return!1}}},43754:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(21710),i=r(83497),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",l="[object Proxy]";let c=function(e){if(!(0,i.A)(e))return!1;var t=(0,n.A)(e);return t==s||t==a||t==o||t==l}},44013:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(28663),i=r(18240);let o=function(e,t,r,o){var s=!r;r||(r={});for(var a=-1,l=t.length;++a<l;){var c=t[a],u=o?o(r[c],e[c],c,r,e):void 0;void 0===u&&(u=e[c]),s?(0,i.A)(r,c,u):(0,n.A)(r,c,u)}return r}},44101:(e,t,r)=>{"use strict";var n=r(86041);t.A=function(e,t){return void 0===t&&(t=!0),{lazyInject:n.makePropertyInjectDecorator(e,t),lazyInjectNamed:n.makePropertyInjectNamedDecorator(e,t),lazyInjectTagged:n.makePropertyInjectTaggedDecorator(e,t),lazyMultiInject:n.makePropertyMultiInjectDecorator(e,t)}}},44110:(e,t,r)=>{"use strict";var n=r(82007).b;function i(){var e=this;n.call(this),this.to=setTimeout(function(){e.emit("finish",200,"{}")},i.timeout)}r(93570)(i,n),i.prototype.close=function(){clearTimeout(this.to)},i.timeout=2e3,e.exports=i},44189:(e,t,r)=>{"use strict";r.d(t,{Ue:()=>w});var n=r(64688),i=r(45878);let o=4,s=6;class a{constructor(e={}){this.queue=[],this.running=0,this.pausedUntil=null,this.timerHandle=null;const t=e.concurrency??o;this.concurrency=Math.min(Math.max(1,Math.floor(t)),s),this.now=e.now??(()=>Date.now()),this.setTimer=e.setTimer??((e,t)=>setTimeout(e,t)),this.clearTimer=e.clearTimer??(e=>clearTimeout(e))}get inFlight(){return this.running}get queued(){return this.queue.length}get pausedUntilMs(){return this.pausedUntil}get isPaused(){return null!==this.pausedUntil&&this.now()<this.pausedUntil}run(e){return new Promise((t,r)=>{this.queue.push({task:e,resolve:t,reject:r}),this.pump()})}pauseUntil(e){null!==this.pausedUntil&&e<=this.pausedUntil||(this.pausedUntil=e,this.armTimer())}pauseFor(e){this.pauseUntil(this.now()+Math.max(0,e))}resume(){this.pausedUntil=null,this.disarmTimer(),this.pump()}armTimer(){if(this.disarmTimer(),null===this.pausedUntil)return;let e=Math.max(0,this.pausedUntil-this.now());this.timerHandle=this.setTimer(()=>{(this.timerHandle=null,this.isPaused)?this.armTimer():(this.pausedUntil=null,this.pump())},e)}disarmTimer(){null!==this.timerHandle&&(this.clearTimer(this.timerHandle),this.timerHandle=null)}pump(){if(this.isPaused)return void this.armTimer();for(null!==this.pausedUntil&&(this.pausedUntil=null,this.disarmTimer());this.running<this.concurrency&&this.queue.length>0;){let e,t=this.queue.shift();this.running++;try{e=Promise.resolve(t.task())}catch(t){e=Promise.reject(t)}e.then(e=>{this.settle(t,()=>t.resolve(e))},e=>{this.settle(t,()=>t.reject(e))})}}settle(e,t){this.running--,t(),this.pump()}}let l=":";function c(e,t){if(!e)throw Error("idempotency key needs a fileUpload id");if(!t)throw Error("idempotency key needs an attempt nonce");return`${e}${l}${t}`}function u(){let e=Math.random().toString(36).slice(2,10),t=Date.now().toString(36);return`${t}${e}`}class d{constructor(e={}){this.nonces=new Map,this.mintNonce=e.mintNonce??u;const t=e.snapshot?.nonces;
51t&&Object.keys(t).forEach(e=>this.nonces.set(e,t[e]))}keyFor(e){return c(e,this.nonceFor(e))}nonceFor(e){if(!e)throw Error("idempotency key needs a fileUpload id");let t=this.nonces.get(e);return void 0===t&&(t=this.mintNonce(),this.nonces.set(e,t)),t}adopt(e,t){if(!e)throw Error("idempotency key needs a fileUpload id");return t?(this.nonces.has(e)||this.nonces.set(e,t),this.nonces.get(e)):this.nonceFor(e)}renewFor(e){if(!e)throw Error("idempotency key needs a fileUpload id");return this.nonces.set(e,this.mintNonce()),this.keyFor(e)}has(e){return this.nonces.has(e)}forget(e){this.nonces.delete(e)}get size(){return this.nonces.size}allKeys(){return Array.from(this.nonces.keys()).map(e=>this.keyFor(e))}toSnapshot(){let e={};return this.nonces.forEach((t,r)=>{e[r]=t}),{version:1,nonces:e}}toJSON(){return this.toSnapshot()}static fromSnapshot(e,t={}){let r=e&&1===e.version&&e.nonces?e:null;return new d({...t,snapshot:r})}}let h=Object.freeze({status:"idle",attempt:0,maxAttempts:5,retryAfterMs:null,expectedStartAtMs:null,lastProgressAtMs:null,reason:null,keepUploadedBytes:!0});function p(e,t){return{...e,...t,keepUploadedBytes:!0}}function f(e){return null!==e.lastProgressAtMs&&(null===e.expectedStartAtMs||e.lastProgressAtMs>=e.expectedStartAtMs)}function g(e=h,t){switch(t?.type){case"scheduled":return p(e,{status:"queued",attempt:0,retryAfterMs:null,expectedStartAtMs:t.expectedStartAtMs??null,reason:"scheduled"});case"server-busy":return p(e,{status:"queued",retryAfterMs:t.retryAfterMs??null,reason:409===t.status?"schedule-in-flight":"server-busy"});case"retry-scheduled":return p(e,{status:"retrying",attempt:t.attempt,maxAttempts:t.maxAttempts??e.maxAttempts,retryAfterMs:t.delayMs??e.retryAfterMs,reason:"retry-scheduled"});case"expected-start-passed":if(f(e)||"retry-all-available"===e.status)return e;return p(e,{status:"stalled",reason:"expected-start-deadline-passed"});case"budget-exhausted":return p(e,{status:"retry-all-available",retryAfterMs:null,reason:"retry-budget-exhausted"});case"progress":return p(e,{status:"idle",attempt:0,retryAfterMs:null,lastProgressAtMs:t.atMs,reason:"progress"});case"completed":return p(e,{status:"idle",attempt:0,retryAfterMs:null,lastProgressAtMs:t.atMs??e.lastProgressAtMs,reason:"completed"});case"user-retry-all":return p(e,{status:"queued",attempt:0,retryAfterMs:null,reason:"user-retry-all"});default:return e}}var m=r(41423);let v=3e5;class y{constructor(e={}){this.now=e.now??(()=>Date.now()),this.budgetMs=e.budgetMs??v}check(e){let t=this.now(),{startedAtMs:r}=e,n=e.expectedStartAtMs??null,i=e.lastProgressAtMs??null,o=t-r,s=Math.max(0,this.budgetMs-o),a=0===s;return null!==i&&(null===n||i>=n)?{status:"ok",terminal:!1,reason:"progress-observed",remainingBudgetMs:s}:a?{status:"stalled",terminal:!0,reason:"budget-exhausted",remainingBudgetMs:0}:null===n?{status:"ok",terminal:!1,reason:"no-expected-start-deadline",remainingBudgetMs:s}:t>=n?{status:"stalled",terminal:!1,reason:"expected-start-deadline-passed",remainingBudgetMs:s}:{status:"ok",terminal:!1,reason:"before-expected-start",remainingBudgetMs:s}}}let b=90;class S{constructor(e={}){this.enabled=!1,this.cards=new Map,this.listeners=new Set,this.dispatcher=null,this.now=e.now??(()=>Date.now()),this.setTimer=e.setTimer??((e,t)=>setTimeout(e,t)),this.clearTimer=e.clearTimer??(e=>clearTimeout(e)),this.emit=e.emit??((e,t)=>(0,i.emitMetric)(e,t)),this.budgetMs=e.budgetMs??m.Ih,this.gate=new a({concurrency:e.concurrency??o,now:this.now,setTimer:this.setTimer,clearTimer:this.clearTimer}),this.nonces=new d({mintNonce:e.mintNonce}),this.watchdog=new y({now:this.now,budgetMs:this.budgetMs})}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}has(e){return this.cards.has(e)}view(e){let t=this.cards.get(e);if(!t||"idle"===t.state.status)return null;let{status:r,attempt:n,maxAttempts:i,reason:o}=t.state;return{status:r,attempt:n,maxAttempts:i,stalled:"stalled"===r||"retry-all-available"===r,message:E(t.state),reason:o}}summary(){let e=0,t=0,r=0;return this.cards.forEach(n=>{let i=n.state.status;"queued"===i||"retrying"===i?e++:"stalled"===i||"retry-all-available"===i?r++:!n.settled&&null!==n.lastProgressAtMs&&t++}),{queued:e,processing:t,waiting:this.gate.queued,stalled:r,paused:this.gate.isPau
51sed}}stalledCardIds(){let e=[];return this.cards.forEach((t,r)=>{("stalled"===t.state.status||"retry-all-available"===t.state.status)&&e.push(r)}),e}keyFor(e,t){return t&&!this.nonces.has(e)?c(e,this.adoptNonce(e,t)):this.nonces.keyFor(e)}nonceFor(e,t){return this.keyFor(e,t),this.nonces.nonceFor(e)}renewNonce(e){return this.nonces.renewFor(e),this.nonces.nonceFor(e)}adoptNonce(e,t){return this.nonces.adopt(e,t)}begin(e){if(!e)return;let t=this.cards.get(e);if(t){t.settled=!1;return}this.cards.set(e,{state:h,startedAtMs:this.now(),lastProgressAtMs:null,expectedStartAtMs:null,watchdogHandle:null,settled:!1})}startedAtMs(e){return this.cards.get(e)?.startedAtMs??this.now()}onServerBusy(e,t={}){let r=this.cards.get(e);if(!r)return;let i="queued"!==r.state.status&&"retrying"!==r.state.status;this.apply(r,{type:"server-busy",status:t.status,retryAfterMs:t.retryAfterMs??null}),null!=t.retryAfterMs&&t.retryAfterMs>=0&&this.gate.pauseFor(t.retryAfterMs),i&&this.emit(n.O.SCHEDULE_QUEUED,{attempt:t.attempt??r.state.attempt,status:t.status??0,reason:r.state.reason??"server-busy"})}onRetryScheduled(e,t){let r=this.cards.get(e);r&&(this.apply(r,{type:"retry-scheduled",attempt:t.attempt,delayMs:t.delayMs}),this.emit(n.O.SCHEDULE_RETRY,{attempt:t.attempt,delayMs:t.delayMs,fromRetryAfter:t.fromRetryAfter,reason:t.reason,status:t.status??0}))}onScheduled(e,t={}){let r=this.cards.get(e);if(!r)return;let i="number"==typeof t.expectedStartSeconds&&Number.isFinite(t.expectedStartSeconds)&&t.expectedStartSeconds>0?t.expectedStartSeconds:b,o=this.now()+1e3*i;r.expectedStartAtMs=o,this.apply(r,{type:"scheduled",expectedStartAtMs:o}),t.dedup&&this.emit(n.O.SCHEDULE_DEDUP_HIT,{attempt:t.attempt??r.state.attempt}),this.armWatchdog(e,r)}onBudgetExhausted(e,t={}){let r=this.cards.get(e);r&&(this.clearWatchdog(r),this.apply(r,{type:"budget-exhausted"}),this.emit(n.O.SCHEDULE_STALLED,{attempt:t.attempt??r.state.attempt,reason:t.reason??"retry-budget-exhausted"}))}onProgress(e){let t=this.cards.get(e);if(!t)return;let r=this.now();t.lastProgressAtMs=r,this.clearWatchdog(t),"idle"!==t.state.status?this.apply(t,{type:"progress",atMs:r}):t.state={...t.state,lastProgressAtMs:r,keepUploadedBytes:!0}}onCompleted(e){let t=this.cards.get(e);t&&(t.settled=!0,this.clearWatchdog(t),this.apply(t,{type:"completed",atMs:this.now()}))}forget(e){let t=this.cards.get(e);t&&this.clearWatchdog(t),this.cards.delete(e),this.nonces.forget(e),this.notify()}registerDispatcher(e){this.dispatcher=e}retryAll(){let e=this.stalledCardIds();if(0===e.length)return e;this.emit(n.O.SCHEDULE_RETRY_ALL,{cards:e.length}),e.forEach(e=>{this.renewNonce(e);let t=this.cards.get(e);t&&(t.startedAtMs=this.now(),t.expectedStartAtMs=null,t.settled=!1,this.apply(t,{type:"user-retry-all"}))}),this.gate.resume();let t=this.dispatcher;return t&&e.forEach(e=>t(e)),e}armWatchdog(e,t){if(this.clearWatchdog(t),null===t.expectedStartAtMs)return;let r=Math.max(0,t.expectedStartAtMs-this.now());t.watchdogHandle=this.setTimer(()=>{t.watchdogHandle=null;let r=this.cards.get(e);if(!r||r.settled)return;let i=this.watchdog.check({startedAtMs:r.startedAtMs,expectedStartAtMs:r.expectedStartAtMs,lastProgressAtMs:r.lastProgressAtMs});"stalled"===i.status&&(this.apply(r,{type:"expected-start-passed",atMs:this.now()}),this.emit(n.O.SCHEDULE_STALLED,{attempt:r.state.attempt,reason:i.reason}))},r)}clearWatchdog(e){null!==e.watchdogHandle&&void 0!==e.watchdogHandle&&(this.clearTimer(e.watchdogHandle),e.watchdogHandle=null)}apply(e,t){let r=g({...e.state,lastProgressAtMs:e.lastProgressAtMs},t);r!==e.state&&(e.state=r,this.notify())}notify(){this.listeners.forEach(e=>{try{e()}catch{}})}reset(){this.cards.forEach(e=>this.clearWatchdog(e)),this.cards.clear(),this.nonces.allKeys().forEach(e=>{let t=e.indexOf(":");this.nonces.forget(t>0?e.slice(0,t):e)}),this.gate.resume(),this.dispatcher=null,this.enabled=!1}}function E(e){switch(e.status){case"queued":return"server-busy"===e.reason||"schedule-in-flight"===e.reason?"Queued — server busy, retrying":"Queued — starting soon";case"retrying":return e.attempt>0?`Queued — server busy, retrying (${e.attempt} of ${e.maxAttempts})`:"Queued — server busy, retrying";case"stalled":case"retry-all-available":return"Not started — your file is still here";default:return""}}let w=new S},44492:(e,t,r)=>{"use strict";r.d(t,{W:()=>s});
51var n=r(2943),i=r(32277),o=r(99991);function s(e){return(0,o.N)(function(t,r){var o,a=null,l=!1;a=t.subscribe((0,i._)(r,void 0,void 0,function(i){o=(0,n.Tg)(e(i,s(e)(t))),a?(a.unsubscribe(),a=null,o.subscribe(r)):l=!0})),l&&(a.unsubscribe(),a=null,o.subscribe(r))})}},44555:(e,t,r)=>{"use strict";r.d(t,{L:()=>l});var n=r(99991),i=r(32277),o=r(97460),s=r(56362),a=r(2943);function l(e){void 0===e&&(e=1/0);var t=e&&"object"==typeof e?e:{count:e},r=t.count,l=void 0===r?1/0:r,c=t.delay,u=t.resetOnSuccess,d=void 0!==u&&u;return l<=0?o.D:(0,n.N)(function(e,t){var r,n=0,o=function(){var u=!1;r=e.subscribe((0,i._)(t,function(e){d&&(n=0),t.next(e)},void 0,function(e){if(n++<l){var d=function(){r?(r.unsubscribe(),r=null,o()):u=!0};if(null!=c){var h="number"==typeof c?(0,s.O)(c):(0,a.Tg)(c(e,n)),p=(0,i._)(t,function(){p.unsubscribe(),d()},function(){t.complete()});h.subscribe(p)}else d()}else t.error(e)})),u&&(r.unsubscribe(),r=null,o())};o()})}},44577:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},45019:(e,t,r)=>{"use strict";r.d(t,{T:()=>o});var n=r(99991),i=r(32277);function o(e,t){return(0,n.N)(function(r,n){var o=0;r.subscribe((0,i._)(n,function(r){n.next(e.call(t,r,o++))}))})}},45217:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});let n=function(e,t){return null!=e&&t in Object(e)};var i=r(33270);let o=function(e,t){return null!=e&&(0,i.A)(e,t,n)}},45261:(e,t,r)=>{var n=r(36187);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},45705:(e,t,r)=>{var n=r(36187);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},45878:(e,t,r)=>{"use strict";r.r(t),r.d(t,{emitMetric:()=>o,metricsOrNull:()=>s});var n=r(8323),i=r(66555);function o(e,t={}){try{n.k.get(i.Z).emit(e,t)}catch{}}function s(){try{return n.k.get(i.Z)}catch{return null}}},46141:(e,t,r)=>{var n=r(19850),i=r(98506),o=r(98825),s=r(82675),a=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,c=Object.prototype,u=Function.prototype.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?h:l).test(s(e))}},46183:(e,t,r)=>{"use strict";r.d(t,{f:()=>p,$:()=>h});var n=r(4902),i=r(43604),o=r(37876),s=r(14232),a=r(78944),l=r(8365),c=r(8090),u=r.n(c);class d extends s.Component{static showToast(e){e.timeout=e.timeout||3e3,e.canClose=!Object.keys(e).includes("canClose")||e.canClose,this.createToast((0,o.jsx)(d,{...e}),e)}static createToast(e,t){if(!l.C.hasDocument())return void console.error("Requested execution aborted since document was not avalilable");let r=document.createElement("div");r.classList.add(`${Date.now()}`);let n=(t.host&&t.host.isConnected?t.host:null)||document.querySelector("#toasts");if(n||((n=document.createElement("div")).id="toasts",document.body.appendChild(n)),n){n.appendChild(r);let t=(0,a.createRoot)(r);r.__toastRoot=t,t.render(e)}else console.error("Toasts not found")}constructor(e){super(e),this.state={shown:!0},this.closed=!1,!e.mustClose&&e.canClose&&(this.timer=setTimeout(()=>{this.unmount()},e.timeout))}setParentElement(e){this.parentElement=e&&e.parentElement}componentDidMount(){this.props.onOpen&&this.props.onOpen(this)}unmount(){if(this.closed)return;this.closed=!0,void 0!==this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.setState({shown:!1}),this.props.onClose&&this.props.onClose(this);try{this.parentElement&&this.parentElement.remove()}catch(e){console.error("Error while removing modal")}let e=this.parentElement,t=e?.__toastRoot;t&&(e.__toastRoot=void 0,setTimeout(()=>t.unmount(),0))}render(){return(0,o.jsx)("div",{ref:e=>this.setParentElement(e),className:u().toast,"data-type":this.props.type||"primary","data-copy-key":this.props.copyKey,role:this.props.role,children:(0,o.jsxs)("div",{className:u().content,children:[(this.props.title||this.props.canClose)&&(0,o.jsxs)("div",{className:u().head,children:[(0,o.jsx)("div",{className:u()["header-content"],children:this.props.title}),this.props.canClose&&(0,o.jsx)("button",{type:"button",className:u().close,"aria-label":this.props.closeLabel,style:{border:0,padding:0,background:"transparent"},onClick:()=>this.unmount(),children:(0,o.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,o.jsx)("path",{d:"M9 1L1 9M1 1L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),(0,o.jsx)("div",{className:u().body,children:this.props.message}),this.props.actionLabel&&this.props.onAction&&(0,o.jsx)("div",{className:u().actions,children:(0,o.jsx)("button",{type:"button",className:u().action,"data-testid":"toast-action",onClick:()=>{this.props.onAction(this),this.unmount()},children:this.props.actionLabel})})]})})}}let h="Dismiss";class p{success(e,t,r={}){d.showToast({...r,title:e,message:t,type:"success"})}warning(e,t,r={}){d.showToast({...r,title:e,message:t,type:"warning"})}error(e,t,r={}){d.showToast({...r,title:e,message:t,type:"danger"})}info(e,t,r={}){d.showToast({...r,title:e,message:t,type:"info"})}undoable(e,t,r,n={}){d.showToast({timeout:8e3,role:"status",closeLabel:h,...n,message:e,actionLabel:t,onAction:r,type:"info"})}}p=(0,n.Cg)([(0,i._G)()],p)},46935:(e,t,r)=>{"use strict";r.d(t,{y:()=>d});var n=r(4902),i=r(43604),o=r(9711),s=r(72577),a=r(83831),l=r(17214),c=r(9968),u=r(79347);class d{constructor(e,t){this.gaService=e,this.http=t,this.logger=o.V.getLogger("FileDownloadService")}emailDownload(e,t){}getDirectDownloadLink(e,t){let r=e.endpointData?.processorMetadataList?.[0]?.downloadDomain,n=a.N.getDownloadEndpoint(e.endpointData?.processorMetadataList?.[0]);if(!n||!r)return null;let i=n+(-1!==r.indexOf("googleapis")?"":"/")+t;return`${i}?uuid=${e.id}`}getRangeSupportedDirectDownloadLink(e,t,r=!1){let n=e.endpointData.processorMetadataList[0].downloadDomain,i=c.ApiConfig.suffixDomainWithHttpsViewEndpoint(n)+(-1!==n.indexOf("googleapis")?"":"/")+t;return`${i}?uuid=${e.id}${r?"&preview=true":""}`}getOutputThumbnailLink(e,t){let r=e?.endpointData?.processorMetadataList?.[0]?.downloadDomain;if(!r||!t||!e.id||-1!==r.indexOf("googleapis"))return null;let n=c.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(r);return`${n}/downloads/thumb/${encodeURIComponent(t)}?uuid=${encodeURIComponent(e.id)}`}downloadFile(e,t){let r=this.getDirectDownloadLink(e,t),n=window.open(r);return r.endsWith("zip")?this.gaService.send(s.z.HitType.EVENT,s.z.EventCategory.BUTTON,s.z.EventAction["FILE-DOWNLOAD-ZIP"],s.z.EventLabel.DOWNLOAD,e.name):this.gaService.send(s.z.HitType.EVENT,s.z.EventCategory.BUTTON,s.z.EventAction["FILE-DOWNLOAD"],s.z.EventLabel.DOWNLOAD,""),!!n&&!n.closed&&void 0!==n.closed}downloadFileInputFile(e,t){let r=e.endpointData.processorMetadataList[0].uploadDomain,n=a.N.getUploadedFileDownloadEndpoint(e.endpointData.processorMetadataList[0])+(-1!==r.indexOf("googleapis")?"":"/")+t,i=window.open(n);return n.endsWith("zip")?this.gaService.send(s.z.HitType.EVENT,s.z.EventCategory.BUTTON,s.z.EventAction["FILE-DOWNLOAD-ZIP"],s.z.EventLabel.DOWNLOAD,e.name):this.gaService.send(s.z.HitType.EVENT,s.z.EventCategory.BUTTON,s.z.EventAction["FILE-DOWNLOAD"],s.z.EventLabel.DOWNLOAD,""),!!i&&!i.closed&&void 0!==i.closed}downloadGCSTempFile(e){let t=(e.endpointData.processorMetadataList[0].processDomain||e.endpointData.processorMetadataList[0].uploadDomain)+e.endpointData.processorMetadataList[0].gcpTempDownloadEndpoint+"/"+e.endpointData.processorMetadataList[0].fileMetadata.gcName;window.open(t),this.logger.trace7(t),t.endsWith("zip")?this.gaService.send(s.z.HitType.EVENT,s.z.EventCategory.BUTTON,s.z.EventAction["FILE-DOWNLOAD-ZIP"],s.z.EventLabel.DOWNLOAD,e.name):this.gaService.send(s.z.HitType.EVENT,s.z.EventCategory.BUTTON,s.z.EventAction["FILE-DOWNLOAD"],s.z.EventLabel.DOWNLOAD,"")}getDownloadURL(e,t){let r=e.endpointData.processorMetadataList[0].downloadDomain,n=a.N.getDownloadEndpoint(e.endpointData.processorMetadataList[0])+(-1!==r.indexOf("googleapis")?"":"/")+t;return`${n}?uuid=${e.id}`}getDownloadURLWithFilenameAsAQueryParam(e,t){let r=e.endpointData.processorMetadataList[0].downloadDomain;return a.N.getDownloadEndpoint(e.endpointData.processorMetadataList[0])+(-1!==r.indexOf("googleapis")?"":"/?file_name=")+t}}d=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(l.k)),(0,n.Qj)(1,(0,i.WQ)(u.jo)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===l.k?Object:l.k,void 0===u.jo?Object:u.jo])],d)},47129:(e,t,r)=>{var n=r(66521);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=+(r.size!=i),this}},47500:(e,t,r)=>{"use strict";r.d(t,{r:()=>i});var n=r(8365);
51class i{static getUrlParameter(e){if(!n.C.hasWindow())return null;let t=RegExp("[\\?&]"+(e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"))+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}static getParameterByName(e,t){if(!n.C.hasWindow())return null;var r=RegExp("[?&]"+(t=t.replace(/[\[\]]/g,"\\$&"))+"(=([^&#]*)|&|#|$)").exec(e);return r?r[2]?decodeURIComponent(r[2].replace(/\+/g," ")):"":null}static getUrlPathnameWithoutSlash(e){if(!n.C.hasWindow())return null;let t=e.pathname.split("-")[0];return t.startsWith("/")?t.substring(1):t}static getFilenameFromURL(e){try{return decodeURIComponent(new URL(e).pathname.split("/").pop())}catch(t){console.log(e),console.log(t)}}static isURLHasSameFileName(e,t){return i.getFilenameFromURL(e)===i.getFilenameFromURL(t)}static toHttpsProtocol(e){return"https://"+e.replace(/^.*?:\/\//ig,"")}}},47785:(e,t,r)=>{"use strict";r.d(t,{e:()=>S});var n=r(4902),i=r(71717),o=r(17494),s=r(56362),a=r(16579),l=r(44555),c=r(18476),u=r(44492),d=r(64083),h=r(94459),p=r(48393),f=r(84214),g=r(22902),m=r(83831),v=r(51352),y=r(15365),b=r(9711);class S{static fastDeserialize(e){let t=Object.assign(new S,e);if(t.uploadStartTime&&(t.uploadStartTime=new Date(t.uploadStartTime)),t.processEndTime&&(t.processEndTime=new Date(t.processEndTime)),t.processStartTime&&(t.processStartTime=new Date(t.processStartTime)),t.endpointData){let e=new y.E(t.endpointData.processorMetadataList,t.endpointData.file);t.endpointData=e}if(t.metadata){let e=new y.E(t.metadata.processorMetadataList,t.metadata.file);t.metadata=e}if(t.metadataList&&t.metadataList.length>0){let e=[];t.metadataList.forEach(t=>{let r=new y.E(t.processorMetadataList,t.file);e.push(r)}),t.metadataList=e}return t}static isUploadedFile(e){return!!e.originalInputFiles&&!!e.originalInputFiles.length}static toLoggableObject(e){if(S.isUploadedFile(e))try{let t=(0,p.A)(e);delete t.endpointData,delete t.originalInputFiles,delete t.optionsSnapshot,delete t.metadata,delete t.metadataList,delete t.optionsSnapshot;try{t.inputDownloadLinks=e.getInputDownloadURLsIfAvailable()}catch{}try{t.outputDownloadLinks=e.getOutputDownloadURLsIfAvailable()}catch{}return t}catch(e){b.V.getLogger("FileUpload").error({message:"Failed to convert FileUpload to loggable object..",error:e})}return{}}static fromPlain(e){return(0,i.om)(S,e)}getDomainToBeUsed(){try{let e=window.useDomain||null,t=window.useDomainValidator||null;if(!e)return{};return{useDomain:e,useDomainValidator:t}}catch(e){return{}}}updateProcessDomain(e,t,r,n){let i=this.getProcessorMetadata(),{useDomain:o,useDomainValidator:p}=this.getDomainToBeUsed(),g=(0,f.A)(this.file),m={timeout:1e4,params:{from:this.fromType,to:this.toType,operation:d.jU.PROCESS,contentNames:g[0].name,contentTypes:(0,h.rB)(g[0]),contentSizes:g[0].size+"",test:"false",wsId:n.getId(),wsDomain:n.getDomain(),requireActiveDownload:"false",currentFileHostDomain:i.uploadDomain,...o?{useDomain:o,useDomainValidator:p}:null}};return v.Nb.getSuccessValueOrThrow$([e.get(`${r}`,m)],8e3).pipe((0,l.L)({count:3,delay:(e,t)=>{if("u">typeof navigator&&!navigator.onLine)throw e;return(0,s.O)(Math.min(1e3*Math.pow(2,t-1),8e3))}}),(0,c.M)(e=>{i.processDomain=e[0].processDomain,i.downloadDomain=e[0].downloadDomain,this.persistFileUpload(t)}),(0,u.W)(e=>"u">typeof navigator&&!navigator.onLine?(0,a.$)(()=>Error("You appear to be offline. Please check your connection and try again.")):(0,a.$)(()=>Error("Could not connect to a processing server. Please check your connection and try again."))))}persistFileUpload(e){e.saveFileUploadToStorage(this)}getProcessorMetadata(){return this.endpointData.processorMetadataList[0]}isCompleted(){let e=(0,g.A)(this,"ws.processStage"),t=(0,g.A)(this,"ws.processStageSubState");return e===d.fl.COMPLETED&&t===d.Gi.COMPLETED}isFailed(){return(0,g.A)(this,"ws.processStageSubState")===d.Gi.FAILED}isFileResultReady(e){return!!e.result&&(!e.result||0!==Object.keys(e.result).length)}getOutputDownloadURLsIfAvailable(){let e=e=>{let t=e.split("\\"),r=t[t.length-1],n=this.endpointData?.processorMetadataList?.[0]?.downloadDomain;return n?m.N.getDownloadEndpoint(this.endpointData.processorMetadataList[0])+(-1!==n.indexOf("googleapis")?"":"/")+r:null};try{if(this.isFileResultReady(this))if(!0===this.result.error);else if(Array.isArray(this.result.output))return this.result.output.map(t=>e(t));else return[e(this.result.output)]}catch(e){console.error(e)}return null}getInputDownloadURLsIfAvailable(){let e=e=>{let t=e.split("\\"),r=t[t.length-1],n=this.endpointData?.processorMetadataList?.[0]?.uploadDomain;return n?m.N.getUploadedFileDownloadEndpoint(this.endpointData.processorMetadataList[0])+(-1!==n.indexOf("googleapis")?"":"/")+r:null};try{if(Array.isArray(this.result.input))return this.result.input.map(t=>e(t));return[e(this.result.input)]}catch{}return null}constructor(){this.settings={email:""}}}(0,n.Cg)([(0,o.Z)(()=>Date),(0,n.Sn)("design:type","u"<typeof Date?Object:Date)],S.prototype,"uploadStartTime",void 0),(0,n.Cg)([(0,o.Z)(()=>Date),(0,n.Sn)("design:type","u"<typeof Date?Object:Date)],S.prototype,"processEndTime",void 0),(0,n.Cg)([(0,o.Z)(()=>Date),(0,n.Sn)("design:type","u"<typeof Date?Object:Date)],S.prototype,"processStartTime",void 0)},48205:(e,t,r)=>{"use strict";var n=r(93570),i=r(10009);function o(){i.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}n(o,i),e.exports=o},48348:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(91336),i=r(11396),o=r(78304),s=r(87125),a=r(83497);let l=function(e,t,r){if(!(0,a.A)(r))return!1;var n=typeof t;return("number"==n?!!((0,o.A)(r)&&(0,s.A)(t,r.length)):"string"==n&&t in r)&&(0,i.A)(r[t],e)},c=function(e){return(0,n.A)(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&l(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var a=r[n];a&&e(t,a,n,o)}return t})}},48393:(e,t,r)=>{"use strict";r.d(t,{A:()=>eX});var n=r(97725);let i=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e};var o=r(28663),s=r(44013),a=r(69014);let l=function(e,t){return e&&(0,s.A)(t,(0,a.A)(t),e)};var c=r(98720);let u=function(e,t){return e&&(0,s.A)(t,(0,c.A)(t),e)};var d=r(67846),h=r(21523),p=r(78710);let f=function(e,t){return(0,s.A)(e,(0,p.A)(e),t)};var g=r(95528),m=r(81365),v=r(90667);let y=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)(0,g.A)(t,(0,p.A)(e)),e=(0,m.A)(e);return t}:v.A,b=function(e,t){return(0,s.A)(e,y(e),t)};var S=r(98376),E=r(82993);let w=function(e){return(0,E.A)(e,c.A,y)};var _=r(66641),A=Object.prototype.hasOwnProperty;let T=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&A.call(e,"index")&&(r.index=e.index,r.input
51=e.input),r};var O=r(30243);let C=function(e,t){var r=t?(0,O.A)(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)};var I=/\w*$/;let P=function(e){var t=new e.constructor(e.source,I.exec(e));return t.lastIndex=e.lastIndex,t};var x=r(76611),k=x.A?x.A.prototype:void 0,M=k?k.valueOf:void 0;let D=function(e){return M?Object(M.call(e)):{}};var R=r(92349),F="[object Boolean]",N="[object Date]",L="[object Map]",j="[object Number]",U="[object RegExp]",$="[object Set]",B="[object String]",W="[object Symbol]",z="[object ArrayBuffer]",H="[object DataView]",G="[object Float32Array]",V="[object Float64Array]",Q="[object Int8Array]",q="[object Int16Array]",K="[object Int32Array]",X="[object Uint8Array]",J="[object Uint8ClampedArray]",Y="[object Uint16Array]",Z="[object Uint32Array]";let ee=function(e,t,r){var n=e.constructor;switch(t){case z:return(0,O.A)(e);case F:case N:return new n(+e);case H:return C(e,r);case G:case V:case Q:case q:case K:case X:case J:case Y:case Z:return(0,R.A)(e,r);case L:return new n;case j:case B:return new n(e);case U:return P(e);case $:return new n;case W:return D(e)}};var et=r(33395),er=r(4527),en=r(36670),ei=r(75438),eo="[object Map]";let es=function(e){return(0,ei.A)(e)&&(0,_.A)(e)==eo};var ea=r(99809),el=r(43091),ec=el.A&&el.A.isMap;let eu=ec?(0,ea.A)(ec):es;var ed=r(83497),eh="[object Set]";let ep=function(e){return(0,ei.A)(e)&&(0,_.A)(e)==eh};var ef=el.A&&el.A.isSet;let eg=ef?(0,ea.A)(ef):ep;var em=1,ev=2,ey=4,eb="[object Arguments]",eS="[object Array]",eE="[object Boolean]",ew="[object Date]",e_="[object Error]",eA="[object Function]",eT="[object GeneratorFunction]",eO="[object Map]",eC="[object Number]",eI="[object Object]",eP="[object RegExp]",ex="[object Set]",ek="[object String]",eM="[object Symbol]",eD="[object WeakMap]",eR="[object ArrayBuffer]",eF="[object DataView]",eN="[object Float32Array]",eL="[object Float64Array]",ej="[object Int8Array]",eU="[object Int16Array]",e$="[object Int32Array]",eB="[object Uint8Array]",eW="[object Uint8ClampedArray]",ez="[object Uint16Array]",eH="[object Uint32Array]",eG={};function eV(e,t,r,s,p,g){var m,v=t&em,y=t&ev,E=t&ey;if(r&&(m=p?r(e,s,p,g):r(e)),void 0!==m)return m;if(!(0,ed.A)(e))return e;var A=(0,er.A)(e);if(A){if(m=T(e),!v)return(0,h.A)(e,m)}else{var O=(0,_.A)(e),C=O==eA||O==eT;if((0,en.A)(e))return(0,d.A)(e,v);if(O==eI||O==eb||C&&!p){if(m=y||C?{}:(0,et.A)(e),!v)return y?b(e,u(m,e)):f(e,l(m,e))}else{if(!eG[O])return p?e:{};m=ee(e,O,v)}}g||(g=new n.A);var I=g.get(e);if(I)return I;g.set(e,m),eg(e)?e.forEach(function(n){m.add(eV(n,t,r,n,e,g))}):eu(e)&&e.forEach(function(n,i){m.set(i,eV(n,t,r,i,e,g))});var P=E?y?w:S.A:y?c.A:a.A,x=A?void 0:P(e);return i(x||e,function(n,i){x&&(n=e[i=n]),(0,o.A)(m,i,eV(n,t,r,i,e,g))}),m}eG[eb]=eG[eS]=eG[eR]=eG[eF]=eG[eE]=eG[ew]=eG[eN]=eG[eL]=eG[ej]=eG[eU]=eG[e$]=eG[eO]=eG[eC]=eG[eI]=eG[eP]=eG[ex]=eG[ek]=eG[eM]=eG[eB]=eG[eW]=eG[ez]=eG[eH]=!0,eG[e_]=eG[eA]=eG[eD]=!1;let eQ=eV;var eq=1,eK=4;let eX=function(e){return eQ(e,eq|eK)}},48710:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=0x1fffffffffffff;let i=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}},48872:(e,t,r)=>{var n=r(22225),i=r(94806),o=r(69750);e.exports=function(e){return n(e,o,i)}},48894:(e,t,r)=>{var n=r(85590),i=r(28654),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable;e.exports=n(function(){return arguments}())?n:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")}},49318:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},49749:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(66128),i=r(54743);let o=(0,n.A)(i.A,"Set")},49794:(e,t)=>{"use strict";var r,n=Object.prototype.hasOwnProperty;function i(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}function s(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,n={};t=r.exec(e);){var o=i(t[1]),s=i(t[2]);null===o||null===s||o in n||(n[o]=s)}return n}t.stringify=function(e,t){var i,s,a=[];for(s in"string"!=typeof(t=t||"")&&(t="?"),e)if(n.call(e,s)){if(!(i=e[s])&&(null===i||i===r||isNaN(i))&&(i=""),s=o(s),i=o(i),null===s||null===i)continue;a.push(s+"="+i)}return a.length?t+a.join("&"):""},t.parse=s},49955:(e,t,r)=>{"use strict";r.d(t,{W:()=>f});var n=r(4902),i=r(43604),o=r(31962),s=r(40001),a=r(12533),l=r(66338);let c=18e5,u=3600,d=.1;function h(e){let t=e*d;return e+(2*Math.random()-1)*t}function p(e,t,r){return Math.max(t,Math.min(r,e))}class f{constructor(e,t){this.refreshService=e,this.authService=t,this.timer=null,this.listenersRegistered=!1,this.boundOnWake=()=>this.onWake()}
51start(){if(this.refreshService.cookieSessionUnavailable)return;let e=this.authService.getToken();if(!e||(0,a.FJ)(e))return;let t=(0,a.Mb)(e);if(null===t)return;let r=t-(0,l.RV)();if(r>=u)return;let n=p(h(1e3*r*.75),0,c);this.stop(),this.timer=setTimeout(()=>{this.refreshService.refreshAcrossTabs().subscribe({next:()=>this.start(),error:()=>{}})},n),this.listenersRegistered||(window.addEventListener("focus",this.boundOnWake),window.addEventListener("online",this.boundOnWake),this.listenersRegistered=!0)}onWake(){if(this.refreshService.cookieSessionUnavailable)return;let e=this.authService.getToken();if(!(!e||(0,a.FJ)(e))){if(!(0,a.hC)(e))return void this.start();this.refreshService.refreshAcrossTabs().subscribe({next:()=>this.start(),error:()=>{}})}}stop(){clearTimeout(this.timer),this.timer=null,this.listenersRegistered&&(window.removeEventListener("focus",this.boundOnWake),window.removeEventListener("online",this.boundOnWake),this.listenersRegistered=!1)}}f=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(new i.FU(()=>s.f))),(0,n.Qj)(1,(0,i.WQ)(o.u)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===s.f?Object:s.f,void 0===o.u?Object:o.u])],f)},50076:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(21710),i=r(75438),o="[object Arguments]";let s=function(e){return(0,i.A)(e)&&(0,n.A)(e)==o};var a=Object.prototype,l=a.hasOwnProperty,c=a.propertyIsEnumerable;let u=s(function(){return arguments}())?s:function(e){return(0,i.A)(e)&&l.call(e,"callee")&&!c.call(e,"callee")}},50224:(e,t,r)=>{e.exports=r(43622)(Object,"create")},51265:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e){return null==e}},51352:(e,t,r)=>{"use strict";r.d(t,{$L:()=>T,$t:()=>A,Dr:()=>E,LU:()=>P,MZ:()=>_,Nb:()=>N,Rf:()=>k,UW:()=>F,Xn:()=>I,_7:()=>w,ck:()=>D,gH:()=>x,tl:()=>R,xU:()=>O});var n=r(4902),i=r(20830),o=r(17494),s=r(40470),a=r(68246),l=r(3649),c=r(16579),u=r(83594),d=r(9120),h=r(44492),p=r(45019),f=r(18476),g=r(44555),m=r(1458),v=r(990),y=r(98683),b=r(9711),S=r(34203);class E extends Error{static is(e){return e instanceof E}constructor(e){super(e),this.name="NetworkError",Object.setPrototypeOf(this,E.prototype)}}class w extends Error{static is(e){return e instanceof w}constructor(e,t,r){super(e),this.name="ServiceError",this.status=t,this.requestAcceptHeader=r,Object.setPrototypeOf(this,w.prototype)}}class _ extends Error{static is(e){return e instanceof _}constructor(e,t,r,n,i){super(e),this.name="ClientError",this.response=t,this.status=r,this.authError=n,this.requestAcceptHeader=i,Object.setPrototypeOf(this,_.prototype)}}class A extends Error{static is(e){return e instanceof A}constructor(e,t){super(e),this.name="UnknownHTTPError",this.requestAcceptHeader=t,Object.setPrototypeOf(this,A.prototype)}}class T{static{this.appPageTop="appPageTop"}static{this.singlePageBaseTop="singlePageBaseTop"}static{this.singlePageBaseLeft="singlePageBaseLeft"}static{this.singlePageBaseRight="singlePageBaseRight"}static{this.fileUploadPageTop="fileUploadPageTop"}static{this.fileUploadPageBottom="fileUploadPageBottom"}static{this.fileDownloadPageTop="fileDownloadPageTop"}static{this.fileDownloadPageWithInCurrentDownloads="fileDownloadPageWithInCurrentDownloads"}static{this.fileDownloadPageWithInRecoveredDownloads="fileDownloadPageWithInRecoveredDownloads"}static{this.fileDownloadPageBottom="fileDownloadPageBottom"}static{this.fileDownloadPageLeft="fileDownloadPageLeft"}static{this.fileDownloadPageRight="fileDownloadPageRight"}static{this.homePageTop="homePageTop"}static{this.memePageTop="memePageTop"}static{this.convertPageTop="convertPageTop"}static{this.convertPageBelowFeatureTitle="convertPageBelowFeatureTitle"}static{this.convertPageInContent="convertPageInContent"}static{this.convertPageLeft="convertPageLeft"}static{this.convertPageRight="convertPageRight"}static{this.convertPageBottom="convertPageBottom"}static{this.howToPageTop="howToPageTop"}static{this.pageAnchor="pageAnchor"}}class O{}(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"appPageTop",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"singlePageBaseTop",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"singlePageBaseLeft",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"singlePageBaseRight",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"fileUploadPageTop",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"fileUploadPageBottom",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"fileDownloadPageTop",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"fileDownloadPageWithInCurrentDownloads",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"fileDownloadPageWithInRecoveredDownloads",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"fileDownloadPageBottom",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"fileDownloadPageLeft",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"fileDownloadPageRight",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"homePageTop",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"memePageTop",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"convertPageTop",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",String)],O.prototype,"convertPageBelowFeatureTitle",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"convertPageInContent",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"convertPageLeft",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"convertPageRight",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"convertPageBottom",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"howToPageTop",void 0),(0,n.Cg)([(0,i.v)(),(0,n.Sn)("design:type",Boolean)],O.prototype,"pageAnchor",void 0);class C{}class I{}class P extends I{}class x{}class k{static{this.unknown="unknown"}static{this.signup="signup"}static{this.paid="paid"}static{this.cancelled="cancelled"}}class M{static{this.none="none"}static{this.paypal="paypal"}static{this.stripe="stripe"}}class D{isPaidUser(){let e=Date.now();return!!(this.entitlementsCache??[]).some(t=>t?.type==="WEBSITE"&&("ACTIVE"===t.state||"CANCELED_ACCESS_UNTIL_PERIOD_END"===t.state)&&(!t.activeUntil||(t.activeUntil instanceof Date?t.activeUntil:new Date(t.activeUntil)).getTime()>e))||(this.packageType===y.uM.PACKAGE_TYPE_BASIC||this.packageType===y.uM.PACKAGE_TYPE_PRO)&&(this.paid||this.subscriptionNextBillingDate&&this.subscriptionNextBillingDate.getTime()>e-864e5)}}(0,n.Cg)([(0,o.Z)(()=>Date),(0,n.Sn)("design:type","u"<typeof Date?Object:Date)],D.prototype,"createdDate",void 0),(0,n.Cg)([(0,o.Z)(()=>Date),(0,n.Sn)("design:type","u"<typeof Date?Object:Date)],D.prototype,"lastUpdatedDate",void 0),(0,n.Cg)([(0,o.Z)(()=>Date),(0,n.Sn)("design:type","u"<typeof Date?Object:Date)],D.prototype,"subscriptionNextBillingDate",void 0);class R{}(0,n.Cg)([(0,o.Z)(()=>I),(0,n.Sn)("design:type",I)],R.prototype,"highPriorityCountryFromTypeFileSizeLimitInMB",void 0),(0,n.Cg)([(0,o.Z)(()=>I),(0,n.Sn)("design:type",I)],R.prototype,"fromTypeFileSizeLimitInMB",void 0),(0,n.Cg)([(0,o.Z)(()=>P),(0,n.Sn)("design:type",P)],R.prototype,"freeUserLimits",void 0),(0,n.Cg)([(0,o.Z)(()=>P),(0,n.Sn)("design:type",P)],R.prototype,"basicUserLimits",void 0),(0,n.Cg)([(0,o.Z)(()=>P),(0,n.Sn)("design:type",P)],R.prototype,"proUserLimits",void 0),(0,n.Cg)([(0,o.Z)(()=>C),(0,n.Sn)("design:type",C)],R.prototype,"motive",void 0),(0,s.F)((0,h.W)(e=>{if(e instanceof w||e instanceof E)throw e;if(0===e.status)throw new E("Not connected to internet. Some services will not work.");if(e.error&&e.error.error)throw new w(e.error.message||e.error.errorMessage||"Oops... Something went wrong.");throw e}),(0,p.T)(e=>e));let F=(0,s.F)((0,h.W)(e=>{if(e instanceof w||e instanceof E)throw e;if(0===e.status)throw new E("Not connected to internet. Some services will not work.");if(e.error&&e.error.error)throw new w(e.error.message||e.error.errorMessage||"Oops... Something went wrong.");if(console.error(e),e instanceof Error)throw e;throw Error(`Ooops! There was error. Error: ${e.statusText}`)}),(0,p.T)(e=>e));class N{static get logger(){return b.V.getLogger("RequestUtils")}static getSuccessValuesOrThrowSequential$(e){let t=new a.m(1),r=t.asObservable(),n=e.map(e=>e),i=e=>{let r=n.pop();if((0,S.A)(r))return void t.error(e);try{r.subscribe({next:e=>{t.next(e),t.complete()},error:e=>{i(e)}})}catch(e){i(e)}};return setTimeout(()=>i(null),0),r}static getSuccessValuesOrThrow$(e,t=3,r=3e4){let n=new l.B,i=[],o=[],s=()=>{i.length+o.length===e.length&&(i.length>0?(n.next(i),n.complete()):o.length>0?n.error(o[0]):n.error(Error("Unknown error")))},a=[];for(let r of e){let e=r.pipe((0,f.M)(()=>N.logger.trace1("retry")),(0,h.W)(e=>(N.logger.trace1("catchError"),(0,c.$)(e))),(0,g.L)(t)).subscribe({next:e=>{i.push(e),s()},error:e=>{o.push(e),s()}});a.push(e)}return n.subscribe({complete:()=>
51a.forEach(e=>e.unsubscribe()),error:()=>a.forEach(e=>e.unsubscribe())}),n.asObservable()}static getSuccessValueOrThrow$(e,t=3e4){return(0,u.p)(e.map(e=>e.pipe((0,m.w)(t),(0,h.W)(e=>(0,d.of)({error:!0,originalError:e}))))).pipe((0,v.Z)(([...e])=>{if(e.every(e=>e.error)){let t=e.find(e=>e&&e.originalError);if(t&&t.originalError)throw t.originalError;throw Error("All requests failed")}return(0,d.of)(e.find(e=>!e.originalError))}))}static async getSuccessValueOrThrow(...e){return new Promise((t,r)=>{this.getSuccessValueOrThrow$(e).subscribe(e=>{t(e)},e=>{r(e)})})}static toErrorSuppressedObservable(e){return e.pipe((0,h.W)(e=>(0,d.of)(null)))}}},51461:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e,t){return e.has(t)}},51947:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(9079),i=r(16233),o=r(77697),s=r(51461),a=r(49749);let l=function(){};var c=r(16257),u=1/0;let d=a.A&&1/(0,c.A)(new a.A([,-0]))[1]==u?function(e){return new a.A(e)}:l;var h=200;let p=function(e,t,r){var a=-1,l=i.A,u=e.length,p=!0,f=[],g=f;if(r)p=!1,l=o.A;else if(u>=h){var m=t?null:d(e);if(m)return(0,c.A)(m);p=!1,l=s.A,g=new n.A}else g=t?[]:f;e:for(;++a<u;){var v=e[a],y=t?t(v):v;if(v=r||0!==v?v:0,p&&y==y){for(var b=g.length;b--;)if(g[b]===y)continue e;t&&g.push(y),f.push(v)}else l(g,y,r)||(g!==f&&g.push(y),f.push(v))}return f},f=function(e){return e&&e.length?p(e):[]}},52267:(e,t,r)=>{"use strict";r.d(t,{U:()=>u});var n=r(4902),i=r(43604),o=r(8365),s=r(53224),a=r(9968),l=r(35231),c=r(71605);class u{constructor(e,t,r){this.apiConfig=e,this.http=t,this.webSocketService=r,o.C.runIfWindowExists(()=>{window.emitClickEvent=e=>{try{let t=e.target,r=s.v.getPathTo(t);this.trace("Clicked on element: "+r,{classList:t.classList.toString(),id:t.id,text:t.textContent})}catch(e){console.log(e)}}})}trace(e,t){}}u=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(l.Q)),(0,n.Qj)(2,(0,i.WQ)(c.V)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.ApiConfig?Object:a.ApiConfig,void 0===l.Q?Object:l.Q,void 0===c.V?Object:c.V])],u)},52652:(e,t,r)=>{"use strict";r.d(t,{o0:()=>f});var n=r(99742),i=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))},o=function(){return function(e,t,r){this.name=e,this.version=t,this.os=r,this.type="browser"}}(),s=function(){return function(e){this.version=e,this.type="node",this.name="node",this.os=n.platform}}(),a=function(){return function(e,t,r,n){this.name=e,this.version=t,this.os=r,this.bot=n,this.type="bot-device"}}(),l=function(){return function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}}(),c=function(){return function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}}(),u=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,d=3,h=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;
51\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],p=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function f(e){return e?m(e):"u"<typeof document&&"u">typeof navigator&&"ReactNative"===navigator.product?new c:"u">typeof navigator?m(navigator.userAgent):y()}function g(e){return""!==e&&h.reduce(function(t,r){var n=r[0],i=r[1];if(t)return t;var o=i.exec(e);return!!o&&[n,o]},!1)}function m(e){var t=g(e);if(!t)return null;var r=t[0],n=t[1];if("searchbot"===r)return new l;var s=n[1]&&n[1].split(".").join("_").split("_").slice(0,3);s?s.length<d&&(s=i(i([],s,!0),b(d-s.length),!0)):s=[];var c=s.join("."),h=v(e),p=u.exec(e);return p&&p[1]?new a(r,c,h,p[1]):new o(r,c,h)}function v(e){for(var t=0,r=p.length;t<r;t++){var n=p[t],i=n[0];if(n[1].exec(e))return i}return null}function y(){return void 0!==n&&n.version?new s(n.version.slice(1)):null}function b(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}},52742:e=>{var t=0x1fffffffffffff;e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=t}},52787:(e,t,r)=>{var n;!function(e){!function(t){var n="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:s(),i=o(e);function o(e,t){return function(r,n){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}function s(){throw ReferenceError("globalThis could not be found. Please polyfill globalThis before loading this module.")}void 0!==n.Reflect&&(i=o(n.Reflect,i)),t(i,n),void 0===n.Reflect&&(n.Reflect=e)}(function(e,t){var r="function"==typeof Symbol,n=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:B("Symbol.toPrimitive not found."),i=r&&void 0!==Symbol.iterator?Symbol.iterator:B("Symbol.iterator not found."),o=Object.getPrototypeOf(Function),s="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:B("A valid Map constructor could not be found."),a="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:B("A valid Set constructor could not be found."),l="function"==typeof WeakMap?WeakMap:B("A valid WeakMap constructor could not be found."),c=r?Symbol.for("@reflect-metadata:registry"):void 0,u=z(),d=H(u);function h(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!w(n)&&!_(n)){if(!D(n))throw TypeError();t=n}}return t}function p(e,t,r,n){for(var i=e.length-1;i>=0;--i){var o=(0,e[i])(t,r,n);if(!w(o)&&!_(o)){if(!T(o))throw TypeError();n=o}}return n}function f(e,t,r){if(g(e,t,r))return!0;var n=$(t);return!_(n)&&f(e,n,r)}function g(e,t,r){var n=V(t,r,!1);return!w(n)&&I(n.OrdinaryHasOwnMetadata(e,t,r))}function m(e,t,r){if(g(e,t,r))return v(e,t,r);var n=$(t);if(!_(n))return m(e,n,r)}function v(e,t,r){var n=V(t,r,!1);if(!w(n))return n.OrdinaryGetOwnMetadata(e,t,r)}function y(e,t,r,n){V(r,n,!0).OrdinaryDefineOwnMetadata(e,t,r,n)}function b(e,t){var r=S(e,t),n=$(e);if(null===n)return r;var i=b(n,t);if(i.length<=0)return r;if(r.length<=0)return i;for(var o=new a,s=[],l=0,c=r;l<c.length;l++){var u=c[l],d=o.has(u);d||(o.add(u),s.push(u))}for(var h=0,p=i;h<p.length;h++){var u=p[h],d=o.has(u);d||(o.add(u),s.push(u))}return s}function S(e,t){var r=V(e,t,!1);return r?r.OrdinaryOwnMetadataKeys(e,t):[]}function E(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function w(e){return void 0===e}function _(e){return null===e}function A(e){return"symbol"==typeof e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}function O(e,t){switch(E(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",i=F(e,n);if(void 0!==i){var o=i.call(e,r);if(T(o))throw TypeError();return o}return C(e,"default"===r?"number":r)}function C(e,t){if("string"===t){var r=e.toString;if(M(r)){var n=r.call(e);
51if(!T(n))return n}var i=e.valueOf;if(M(i)){var n=i.call(e);if(!T(n))return n}}else{var i=e.valueOf;if(M(i)){var n=i.call(e);if(!T(n))return n}var o=e.toString;if(M(o)){var n=o.call(e);if(!T(n))return n}}throw TypeError()}function I(e){return!!e}function P(e){return""+e}function x(e){var t=O(e,3);return A(t)?t:P(t)}function k(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function M(e){return"function"==typeof e}function D(e){return"function"==typeof e}function R(e){switch(E(e)){case 3:case 4:return!0;default:return!1}}function F(e,t){var r=e[t];if(null!=r){if(!M(r))throw TypeError();return r}}function N(e){var t=F(e,i);if(!M(t))throw TypeError();var r=t.call(e);if(!T(r))throw TypeError();return r}function L(e){return e.value}function j(e){var t=e.next();return!t.done&&t}function U(e){var t=e.return;t&&t.call(e)}function $(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===o||t!==o)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var i=n.constructor;return"function"!=typeof i||i===e?t:i}function B(e){throw e}function W(){w(c)||void 0===t.Reflect||c in t.Reflect||"function"!=typeof t.Reflect.defineMetadata||(e=G(t.Reflect));var e,r,n,i,o=new l,u={registerProvider:d,getProvider:p,setProvider:g};return u;function d(t){if(!Object.isExtensible(u))throw Error("Cannot add provider to a frozen registry.");switch(!0){case e===t:break;case w(r):r=t;break;case r===t:break;case w(n):n=t;break;case n===t:break;default:void 0===i&&(i=new a),i.add(t)}}function h(t,o){if(!w(r)){if(r.isProviderFor(t,o))return r;if(!w(n)){if(n.isProviderFor(t,o))return r;if(!w(i))for(var s=N(i);;){var a=j(s);if(!a)return;var l=L(a);if(l.isProviderFor(t,o))return U(s),l}}}if(!w(e)&&e.isProviderFor(t,o))return e}function p(e,t){var r,n=o.get(e);return w(n)||(r=n.get(t)),w(r)&&(w(r=h(e,t))||(w(n)&&(n=new s,o.set(e,n)),n.set(t,r))),r}function f(e){if(w(e))throw TypeError();return r===e||n===e||!w(i)&&i.has(e)}function g(e,t,r){if(!f(r))throw Error("Metadata provider not registered.");var n=p(e,t);if(n!==r){if(!w(n))return!1;var i=o.get(e);w(i)&&(i=new s,o.set(e,i)),i.set(t,r)}return!0}}function z(){var e;return!w(c)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&(e=t.Reflect[c]),w(e)&&(e=W()),!w(c)&&T(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,c,{enumerable:!1,configurable:!1,writable:!1,value:e}),e}function H(e){var t=new l,r={isProviderFor:function(e,r){var n=t.get(e);return!w(n)&&n.has(r)},OrdinaryDefineOwnMetadata:a,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:o,OrdinaryOwnMetadataKeys:c,OrdinaryDeleteMetadata:d};return u.registerProvider(r),r;function n(n,i,o){var a=t.get(n),l=!1;if(w(a)){if(!o)return;a=new s,t.set(n,a),l=!0}var c=a.get(i);if(w(c)){if(!o)return;if(c=new s,a.set(i,c),!e.setProvider(n,i,r))throw a.delete(i),l&&t.delete(n),Error("Wrong provider for target.")}return c}function i(e,t,r){var i=n(t,r,!1);return!w(i)&&I(i.has(e))}function o(e,t,r){var i=n(t,r,!1);if(!w(i))return i.get(e)}function a(e,t,r,i){n(r,i,!0).set(e,t)}function c(e,t){var r=[],i=n(e,t,!1);if(w(i))return r;for(var o=N(i.keys()),s=0;;){var a=j(o);if(!a)return r.length=s,r;var l=L(a);try{r[s]=l}catch(e){try{U(o)}finally{throw e}}s++}}function d(e,r,i){var o=n(r,i,!1);if(w(o)||!o.delete(e))return!1;if(0===o.size){var s=t.get(r);w(s)||(s.delete(i),0===s.size&&t.delete(s))}return!0}}function G(e){var t=e.defineMetadata,r=e.hasOwnMetadata,n=e.getOwnMetadata,i=e.getOwnMetadataKeys,o=e.deleteMetadata,s=new l;return{isProviderFor:function(e,t){var r=s.get(e);return!!(!w(r)&&r.has(t))||!!i(e,t).length&&(w(r)&&(r=new a,s.set(e,r)),r.add(t),!0)},OrdinaryDefineOwnMetadata:t,OrdinaryHasOwnMetadata:r,OrdinaryGetOwnMetadata:n,OrdinaryOwnMetadataKeys:i,OrdinaryDeleteMetadata:o}}function V(e,t,r){var n=u.getProvider(e,t);if(!w(n))return n;if(r){if(u.setProvider(e,t,d))return d;throw Error("Illegal state.")}}e("decorate",function(e,t,r,n){if(w(r)){if(!k(e)||!D(t))throw TypeError();return h(e,t)}if(!k(e)||!T(t)||!T(n)&&!w(n)&&!_(n))throw TypeError();return _(n)&&(n=void 0),p(e,t,r=x(r),n)}),e("metadata",function(e,t){return function(r,n){if(!T(r)||!w(n)&&!R(n))throw TypeError();y(e,t,r,n)}}),e("defineMetadata",function(e,t,r,n){if(!T(r))throw TypeError();return w(n)||(n=x(n)),y(e,t,r,n)}),e("hasMetadata",function(e,t,r){if(!T(t))throw TypeError();return w(r)||(r=x(r)),f(e,t,r)}),e("hasOwnMetadata",function(e,t,r){if(!T(t))throw TypeError();return w(r)||(r=x(r)),g(e,t,r)}),e("getMetadata",function(e,t,r){if(!T(t))throw TypeError();return w(r)||(r=x(r)),m(e,t,r)}),e("getOwnMetadata",function(e,t,r){if(!T(t))throw TypeError();return w(r)||(r=x(r)),v(e,t,r)}),e("getMetadataKeys",function(e,t){if(!T(e))throw TypeError();return w(t)||(t=x(t)),b(e,t)}),e("getOwnMetadataKeys",function(e,t){if(!T(e))throw TypeError();return w(t)||(t=x(t)),S(e,t)}),e("deleteMetadata",function(e,t,r){if(!T(t))throw TypeError();w(r)||(r=x(r));var n=V(t,r,!1);return!w(n)&&n.OrdinaryDeleteMetadata(e,t,r)})})}(n||(n={}))},53224:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});var n=r(92556);
51class i{static css(e,t,r){e.style[t]=r}static addClass(e,...t){t&&t.forEach(t=>{e.classList.add(t)})}static removeClass(e,t){e.classList.remove(t)}static attr(e,t,r){e.setAttribute(t,r)}static getParent(e){return e.parentElement}static getParentBoundingRectangle(e,t){let r=i.getParent(e).getBoundingClientRect(),n=t?window.scrollY:0,o=t?window.scrollX:0;return{top:r.top+n,left:r.left+o,height:r.height,width:r.width}}static getImageNatualDimension(e){return{height:e.naturalHeight,width:e.naturalWidth}}static getCanvasNatualDimension(e){return{height:e.height,width:e.width}}static getElementBoundingRectangle(e,t){let r=e.getBoundingClientRect(),n=t?window.scrollY:0,i=t?window.scrollX:0;return{top:r.top+n,left:r.left+i,height:r.height,width:r.width}}static getMouseOffset(e,t,r){let o=i.getElementBoundingRectangle(e,!0),s=0,a=0;"topright"===r?s=o.width:"bottomleft"===r?a=o.height:"bottomright"===r&&(s=o.width,a=o.height);let l=n.e.toGenericMouseEvent(t);return{dx:s+o.left-l.pageX,dy:a+o.top-l.pageY}}static getElementOffsetTop(e,t){return i.getElementBoundingRectangle(t).top-i.getElementBoundingRectangle(e).top}static getElementOffsetLeft(e,t){return i.getElementBoundingRectangle(t).left-i.getElementBoundingRectangle(e).left}static waitForElement(e,t){return new Promise((r,n)=>{let i=t,o=()=>{let t=document.querySelector(e);if(t)r(t);else{if(i<=0)return void n();i-=100,setTimeout(o,100)}};i--,setTimeout(o,100)})}static getPathTo(e){if("HTML"==e.tagName)return"/HTML[1]";if(e===document.body)return"/HTML[1]/BODY[1]";for(var t=0,r=e.parentNode.childNodes,n=0;n<r.length;n++){var o=r[n];if(o===e)return i.getPathTo(e.parentNode)+"/"+e.tagName+"["+(t+1)+"]";1===o.nodeType&&o.tagName===e.tagName&&t++}}static getElementByXpath(e){return document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}}},53237:(e,t,r)=>{"use strict";var n=r(72649),i=r(39944),o=r(60284),s=r(98173),a=r(66384),l=r(1097),c=function(){};e.exports=function(e,t){var r,u={};t.forEach(function(e){e.facadeTransport&&(u[e.facadeTransport.transportName]=e.facadeTransport)}),u[s.transportName]=s,e.bootstrap_iframe=function(){a.currentWindowId=l.hash.slice(1);var t,s=function(i){if(i.source===parent){if(void 0===r&&(r=i.origin),i.origin===r){try{s=JSON.parse(i.data)}catch(e){c("bad json",i.data);return}if(s.windowId===a.currentWindowId)switch(s.type){case"s":try{d=JSON.parse(s.data)}catch(e){c("bad json",s.data);break}var s,d,h=d[0],p=d[1],f=d[2],g=d[3];if(c(h,p,f,g),h!==e.version)throw Error('Incompatible SockJS! Main site uses: "'+h+'", the iframe: "'+e.version+'".');if(!n.isOriginEqual(f,l.href)||!n.isOriginEqual(g,l.href))throw Error("Can't connect to different domain from within an iframe. ("+l.href+", "+f+", "+g+")");t=new o(new u[p](f,g));break;case"m":t._send(s.data);break;case"c":t&&t._close(),t=null}}}};i.attachEvent("message",s),a.postMessage("s")}}},53299:(e,t,r)=>{"use strict";var n=r(39944),i=r(72649),o=r(93570),s=r(82007).b,a=r(5920),l=function(){};function c(e,t,r){if(!c.enabled())throw Error("Transport created when disabled");s.call(this),l("constructor",e);var o=this,u=i.addPath(e,"/websocket");u="https"===u.slice(0,5)?"wss"+u.slice(5):"ws"+u.slice(4),this.url=u,this.ws=new a(this.url,[],r),this.ws.onmessage=function(e){l("message event",e.data),o.emit("message",e.data)},this.unloadRef=n.unloadAdd(function(){l("unload"),o.ws.close()}),this.ws.onclose=function(e){l("close event",e.code,e.reason),o.emit("close",e.code,e.reason),o._cleanup()},this.ws.onerror=function(e){l("error event",e),o.emit("close",1006,"WebSocket connection broken"),o._cleanup()}}o(c,s),c.prototype.send=function(e){var t="["+e+"]";l("send",t),this.ws.send(t)},c.prototype.close=function(){l("close");var e=this.ws;this._cleanup(),e&&e.close()},c.prototype._cleanup=function(){l("_cleanup");var e=this.ws;e&&(e.onmessage=e.onclose=e.onerror=null),n.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},c.enabled=function(){return l("enabled"),!!a},c.transportName="websocket",c.roundTrips=2,e.exports=c},53509:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getBasename:()=>s,getFileMimeType:()=>u,getFileMimeTypeFromFilename:()=>d,getFilename:()=>l,getFilenameFromPath:()=>a,replaceExtension:()=>o,sanitizeFilename:()=>h,truncateFilename:()=>p});var n=r(63667),i=r(74034);function o(e,t){let r=e.lastIndexOf(".");if(-1===r)return t.startsWith(".")?`${e}${t}`:`${e}.${t}`;let n=e.substring(0,r);return t.startsWith(".")?`${n}${t}`:`${n}.${t}`}function s(e){let t=a(e),r=t.lastIndexOf(".");return -1===r||0===r?t:t.substring(0,r)}function a(e){let t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\"));return -1===t?e:e.substring(t+1)}function l(e){let t=(0,i.getExtension)(e);return e===t?e:e.replace(RegExp(`\\.${c(t)}$`),"")}function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function u(e){return e.type&&e.type.length>0?e.type:d(e.name)}function d(e){let t=((0,i.getExtension)(e)||"").toLowerCase();return n.JQ.EXTENTIONS.includes(t)?`image/${t}`:n.X.EXTENTIONS.includes(t)?`video/${t}`:n.az.EXTENTIONS.includes(t)?`audio/${t}`:t}function h(e){return e.replace(/[<>:"/\\|?*\x00-\x1f]/g,"_")}function p(e,t){if(e.length<=t)return e;let r=(0,i.getExtension)(e),n=s(e),o=r?`.${r}`:"",a=t-o.length-3;return a<=0?e.substring(0,t):`${n.substring(0,a)}...${o}`}},53512:(e,t,r)=>{var n=r(50224);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},54003:(e,t,r)=>{"use strict";r.d(t,{x:()=>a});var n=r(74588);function i(){return(0,n.U)(1)}var o=r(67375),s=r(6155);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i()((0,s.H)(e,(0,o.lI)(e)))}},54316:(e,t,r)=>{e.exports=r(43622)(r(19031),"Promise")},54631:(e,t,r)=>{"use strict";r.d(t,{n:()=>s});
51var n=r(2943),i=r(99991),o=r(32277);function s(e,t){return(0,i.N)(function(r,i){var s=null,a=0,l=!1,c=function(){return l&&!s&&i.complete()};r.subscribe((0,o._)(i,function(r){null==s||s.unsubscribe();var l=0,u=a++;(0,n.Tg)(e(r,u)).subscribe(s=(0,o._)(i,function(e){return i.next(t?t(r,e,u,l++):e)},function(){s=null,c()}))},function(){l=!0,c()}))})}},54743:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(64682),i="object"==typeof self&&self&&self.Object===Object&&self;let o=n.A||i||Function("return this")()},55239:(e,t,r)=>{"use strict";r.d(t,{v:()=>o});var n=r(86728),i=r(2943);function o(e){return new n.c(function(t){(0,i.Tg)(e()).subscribe(t)})}},55776:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(37876),i=r(14232),o=r(78944),s=r(9711),a=r(8365),l=r(73206),c=r.n(l);class u extends i.Component{static{this.logger=s.V.getLogger("Modal")}static createModal(e,t){if(!a.C.hasDocument())return void u.logger.error("Requested execution aborted since document was not avalilable");let r=document.createElement("div");r.className=`${Date.now()}`,r.style.position="relative",r.style.zIndex="9999",document.body.appendChild(r);let i=(0,n.jsx)(e,{...t});return(0,o.createRoot)(r).render(i),i}constructor(e){super(e),this.setParentElement=e=>{this.parentElement=e&&e.parentElement},this.state={shown:!0}}componentDidMount(){this.props.onOpen&&this.props.onOpen(this)}getHeader(){return Array.isArray(this.props.children)?this.props.children.find(e=>e&&e.props&&e.props["data-modalheader"]):""}getBody(){return Array.isArray(this.props.children)?this.props.children.find(e=>e&&e.props&&e.props["data-modalbody"]):""}getFooter(){return Array.isArray(this.props.children)?this.props.children.find(e=>e&&e.props&&e.props["data-modalfooter"]):""}unmount(){this.setState({shown:!1}),this.props.onClose&&this.props.onClose(this);try{this.parentElement&&this.parentElement.remove()}catch(e){u.logger.error({message:"Error while removing modal",error:e})}}render(){return this.state.shown&&(0,n.jsx)("div",{ref:e=>this.setParentElement(e),className:`${this.props.modalClass} modal ${c().modal}`,children:(0,n.jsxs)("div",{className:`content ${c().content}`,children:[(0,n.jsxs)("div",{className:`head ${c().head}`,children:[(0,n.jsx)("div",{className:`header-content ${c()["header-content"]}`,children:this.getHeader()}),!this.props.disableCloseButton&&(0,n.jsx)("button",{className:`close ${c().close}`,onClick:()=>this.unmount(),onTouchEnd:()=>this.unmount(),children:"✖"})]}),(0,n.jsx)("div",{className:`body ${c().body}`,children:this.getBody()}),(0,n.jsx)("div",{className:`footer ${c().footer}`,children:this.getFooter()})]})})}}},56104:(e,t,r)=>{"use strict";r.d(t,{M:()=>l});var n=r(4902),i=r(43604),o=r(6548),s=r(9711),a=r(33353);class l{constructor(e){this.uiContext=e,this.logger=s.V.getLogger("DropboxService"),this.cid="1002349272285-rb84b9urep0jghvnf5c04vfp2tf58quv.apps.googleusercontent.com",this.scope="https://www.googleapis.com/auth/drive",this.initialized=!1,this.authenticated=!1,this.pickerLoaded=!1,this.auth=null,this.user=null,this.response=null,this.token=null,this.tryOnce=!1,this.options={success:e=>{this.logger.trace7("Here's the file link: "+e[0].link)},cancel:()=>{this.logger.trace7("Cancelled Here's the file link: ")},linkType:"direct",multiselect:!0,folderselect:!1}}showFileSelectDialog(e){this.options.success=t=>this.onDropboxFileOpen(t,e),Dropbox.choose(this.options)}onDropboxFileOpen(e,t){this.logger.trace7(e);let r=e,n=o.T.createFromFileList(r);t&&t(n)}}l=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a._)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a._?Object:a._])],l)},56362:(e,t,r)=>{"use strict";r.d(t,{O:()=>a});var n=r(86728),i=r(39030),o=r(86223),s=r(99270);function a(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.b);var a=-1;return null!=t&&((0,o.m)(t)?r=t:a=t),new n.c(function(t){var n=(0,s.v)(e)?e-r.now():e;n<0&&(n=0);var i=0;return r.schedule(function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())},n)})}},56634:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},56706:(e,t,r)=>{"use strict";r.d(t,{w:()=>n});var n=new(r(86728)).c(function(e){return e.complete()})},56751:(e,t,r)=>{var n=r(63592),i=r(48894),o=r(93007),s=r(4756),a=r(68373),l=r(82731),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=o(e),u=!r&&i(e),d=!r&&!u&&s(e),h=!r&&!u&&!d&&l(e),p=r||u||d||h,f=p?n(e.length,String):[],g=f.length;for(var m in e)(t||c.call(e,m))&&!(p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g)))&&f.push(m);return f}},57612:(e,t,r)=>{"use strict";var n=r(59355),i={},o=!1,s=r.g.chrome&&r.g.chrome.app&&r.g.chrome.app.runtime;e.exports={attachEvent:function(e,t){void 0!==r.g.addEventListener?r.g.addEventListener(e,t,!1):r.g.document&&r.g.attachEvent&&(r.g.document.attachEvent("on"+e,t),r.g.attachEvent("on"+e,t))},detachEvent:function(e,t){void 0!==r.g.addEventListener?r.g.removeEventListener(e,t,!1):r.g.document&&r.g.detachEvent&&(r.g.document.detachEvent("on"+e,t),r.g.detachEvent("on"+e,t))},unloadAdd:function(e){if(s)return null;var t=n.string(8);return i[t]=e,o&&setTimeout(this.triggerUnloadCallbacks,0),t},unloadDel:function(e){e in i&&delete i[e]},triggerUnloadCallbacks:function(){for(var e in i)i[e](),delete i[e]}};var a=function(){o||(o=!0,e.exports.triggerUnloadCallbacks())};s||e.exports.attachEvent("unload",a)},58513:(e,t,r)=>{"use strict";var n=r(93570),i=r(72649),o=r(84847),s=r(89043),a=function(){};function l(e,t,r,n,l){var c=i.addPath(e,t);a(c);var u=this;o.call(this,e,r),this.poll=new s(n,c,l),this.poll.on("message",function(e){a("poll message",e),u.emit("message",e)}),this.poll.once("close",function(e,t){a("poll close",e,t),u.poll=null,u.emit("close",e,t),u.close()})}n(l,o),l.prototype.close=function(){o.prototype.close.call(this),a("close"),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},e.exports=l},58528:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=!!t,t}},59059:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},59355:(e,t,r)=>{"use strict";var n=r(76338),i="abcdefghijklmnopqrstuvwxyz012345";e.exports={string:function(e){for(var t=i.length,r=n.randomBytes(e),o=[],s=0;s<e;s++)o.push(i.substr(r[s]%t,1));return o.join("")},number:function(e){return Math.floor(Math.random()*e)},numberString:function(e){var t=(""+(e-1)).length;return(Array(t+1).join("0")+this.number(e)).slice(-t)}}},59971:(e,t,r)=>{"use strict";r.d(t,{$:()=>h});
51var n=r(14103),i=r(33441),o=r(32128),s=r(99991),a=r(32277);function l(e){return(0,s.N)(function(t,r){var n=!1;t.subscribe((0,a._)(r,function(e){n=!0,r.next(e)},function(){n||r.next(e),r.complete()}))})}function c(e){return void 0===e&&(e=u),(0,s.N)(function(t,r){var n=!1;t.subscribe((0,a._)(r,function(e){n=!0,r.next(e)},function(){return n?r.complete():r.error(e())}))})}function u(){return new n.G}var d=r(97460);function h(e,t){var r=arguments.length>=2;return function(s){return s.pipe(e?(0,i.p)(function(t,r){return e(t,r,s)}):d.D,(0,o.s)(1),r?l(t):c(function(){return new n.G}))}}},60121:(e,t,r)=>{"use strict";r.d(t,{R:()=>a});var n=r(4902),i=r(43604),o=r(9968),s=r(79347);class a{constructor(e,t){this.http=e,this.apiConfig=t}convertMarkdownToHtmlString(e){let t=this.apiConfig.getHttpsEndpoint()+"/markdown/markdown-to-html";return this.http.get(t,{responseType:"text",headers:{"get-data":e}})}}a=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(s.jo)),(0,n.Qj)(1,(0,i.WQ)(o.ApiConfig)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===s.jo?Object:s.jo,void 0===o.ApiConfig?Object:o.ApiConfig])],a)},60284:(e,t,r)=>{"use strict";var n=r(66384);function i(e){this._transport=e,e.on("message",this._transportMessage.bind(this)),e.on("close",this._transportClose.bind(this))}i.prototype._transportClose=function(e,t){n.postMessage("c",JSON.stringify([e,t]))},i.prototype._transportMessage=function(e){n.postMessage("t",e)},i.prototype._send=function(e){this._transport.send(e)},i.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},e.exports=i},61028:(e,t,r)=>{"use strict";r.d(t,{R:()=>n});class n{static getPathFromProps(e){return n.pathTextOnly(e.url)}static pathTextOnly(e){return e.startsWith("/")&&(e=e.substring(1)),e.endsWith("/")&&(e=e.substring(0,e.length-1)),e}static getPageDataFromProps(e){return e.pageData}}},61142:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});let n=function(e){return function(){return e}};var i=r(72209),o=r(14188);let s=i.A?function(e,t){return(0,i.A)(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o.A;var a=800,l=16,c=Date.now;let u=function(e){var t=0,r=0;return function(){var n=c(),i=l-(n-r);if(r=n,i>0){if(++t>=a)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(s)},61384:(e,t,r)=>{"use strict";r.r(t),r.d(t,{JOSEAlgNotAllowed:()=>s,JOSEError:()=>n,JOSENotSupported:()=>a,JWEDecryptionFailed:()=>l,JWEInvalid:()=>c,JWKInvalid:()=>h,JWKSInvalid:()=>p,JWKSMultipleMatchingKeys:()=>g,JWKSNoMatchingKey:()=>f,JWKSTimeout:()=>m,JWSInvalid:()=>u,JWSSignatureVerificationFailed:()=>v,JWTClaimValidationFailed:()=>i,JWTExpired:()=>o,JWTInvalid:()=>d});
51class n extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class i extends n{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(e,t,r="unspecified",n="unspecified"){super(e,{cause:{claim:r,reason:n,payload:t}}),this.claim=r,this.reason=n,this.payload=t}}class o extends n{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(e,t,r="unspecified",n="unspecified"){super(e,{cause:{claim:r,reason:n,payload:t}}),this.claim=r,this.reason=n,this.payload=t}}class s extends n{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class a extends n{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class l extends n{static code="ERR_JWE_DECRYPTION_FAILED";code="ERR_JWE_DECRYPTION_FAILED";constructor(e="decryption operation failed",t){super(e,t)}}class c extends n{static code="ERR_JWE_INVALID";code="ERR_JWE_INVALID"}class u extends n{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"}class d extends n{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}class h extends n{static code="ERR_JWK_INVALID";code="ERR_JWK_INVALID"}class p extends n{static code="ERR_JWKS_INVALID";code="ERR_JWKS_INVALID"}
51class f extends n{static code="ERR_JWKS_NO_MATCHING_KEY";code="ERR_JWKS_NO_MATCHING_KEY";constructor(e="no applicable key found in the JSON Web Key Set",t){super(e,t)}}class g extends n{[Symbol.asyncIterator];static code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t)}}class m extends n{static code="ERR_JWKS_TIMEOUT";code="ERR_JWKS_TIMEOUT";constructor(e="request timed out",t){super(e,t)}}class v extends n{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(e="signature verification failed",t){super(e,t)}}},61564:(e,t,r)=>{"use strict";r.d(t,{Y:()=>o});var n=r(39030),i=r(56362);function o(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.E),e<0&&(e=0),(0,i.O)(e,e,t)}},61652:(e,t,r)=>{"use strict";var n=r(93570),i=r(58513),o=r(88212),s=r(83724);function a(e){if(!a.enabled())throw Error("Transport created when disabled");i.call(this,e,"/jsonp",s,o)}n(a,i),a.enabled=function(){return!!r.g.document},a.transportName="jsonp-polling",a.roundTrips=1,a.needBody=!0,e.exports=a},61791:(e,t,r)=>{"use strict";r.d(t,{B:()=>a});var n=r(4902),i=r(43604),o=r(29238),s=r(40001);class a{constructor(e,t){this.loginService=e,this.refreshService=t,this.channel=null,this.applyingRemote=!1,this.lastState=null,this.subs=[]}init(){"u">typeof BroadcastChannel&&!this.channel&&(this.channel=new BroadcastChannel("xc-auth"),this.channel.onmessage=e=>{this.applyingRemote=!0;try{e.data?.type==="logout"?this.loginService.clearLocalSession():e.data?.type==="cookies-unavailable"&&(this.refreshService.cookieSessionUnavailable=!0)}finally{this.applyingRemote=!1}},this.subs.push(this.loginService.onSessionState.subscribe(e=>{this.applyingRemote||this.lastState!==o.Y.LOGGED_IN||e!==o.Y.ANONYMOUS||this.channel?.postMessage({type:"logout"}),this.lastState=e})),this.subs.push(this.refreshService.cookieUnavailable$.subscribe(()=>{this.applyingRemote||this.channel?.postMessage({type:"cookies-unavailable"})})))}dispose(){this.subs.forEach(e=>e.unsubscribe()),this.channel?.close(),this.channel=null}}a=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(new i.FU(()=>o.H))),(0,n.Qj)(1,(0,i.WQ)(new i.FU(()=>s.f))),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===o.H?Object:o.H,void 0===s.f?Object:s.f])],a)},61827:(e,t,r)=>{"use strict";function n(e,t=Date.now()){try{if(!e)return;let r=o(e);if(r){let e=i(r,t);if(void 0!==e)return e}let n=e.response?.retryAfterSeconds;if("number"==typeof n&&Number.isFinite(n)&&n>=0)return Math.round(n)}catch{}}function i(e,t=Date.now()){if(null==e)return;let r=String(e).trim();if(""===r)return;if(/^\d+$/.test(r))return Number(r);if(!/\d{4}/.test(r)||!/[A-Za-z]/.test(r))return;let n=Date.parse(r);if(!Number.isNaN(n))return Math.max(0,Math.round((n-t)/1e3))}function o(e){let t=e.xhr?.getAllResponseHeaders?.()||"",r=/^retry-after:\s*(.+)$/im.exec(t);if(r)return r[1].trim();let n=e.headers;if(n&&"object"==typeof n){let e=Object.keys(n).find(e=>"retry-after"===e.toLowerCase());if(e&&null!=n[e])return String(n[e]).trim()}return""}r.d(t,{_:()=>n})},61930:(e,t,r)=>{"use strict";r.d(t,{l:()=>o});var n=r(84471),i=r(77698);function o(e){return(0,i.T)(e[n.s])}},62755:(e,t,r)=>{"use strict";r.d(t,{Do:()=>l,MG:()=>s,PC:()=>g,Xd:()=>f,c:()=>p,c2:()=>m});let n="other",i=1048576,o=0x40000000;function s(e){let t="number"==typeof e&&isFinite(e)&&e>0?e:0;return t<i?"<1MB":t<10*i?"1-10MB":t<100*i?"10-100MB":t<o?"100MB-1GB":">1GB"}let a=8;function l(e){if("string"!=typeof e)return n;let t=e.split(/[\\/]/).pop()||"",r=t.lastIndexOf(".");if(r<0||r===t.length-1)return n;let i=t.slice(r+1).toLowerCase();return 0===i.length||i.length>a||!/^[a-z0-9]+$/.test(i)?n:i}let c=80,u=/^[0-9a-f]{24}$/i,d=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,h=/^\d+$/;function p(e){if("string"!=typeof e||0===e.length)return"/";let t=e;try{t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e)?new URL(e).pathname:e.split("#")[0].split("?")[0]}catch{t=e.split("#")[0].split("?")[0]}t.startsWith("/")||(t="/"+t);let r=t.split("/").map(e=>u.test(e)||d.test(e)||h.test(e)?":id":e).join("/"),n=r.length>1&&r.endsWith("/")?r.slice(0,-1):r;return n.length>c?n.slice(0,c):n}function f(e){if("string"!=typeof e||0===e.length)return"";try{if(/^[a-z][a-z0-9+.-]*:\/\//i.test(e))return new URL(e).hostname;if(window.location)return new URL(e,window.location.origin).hostname}catch{}return""}function g(e,t,r){if(t)return t;let n="number"==typeof e&&isFinite(e)?e:0;if(n>=400&&n<500)return"http4xx";if(n>=500)return"http5xx";let i="string"==typeof r?r.toLowerCase():"";return -1!==i.indexOf("timeout")||-1!==i.indexOf("timed out")?"timeout":-1!==i.indexOf("abort")?"aborted":0===n?"network":"unknown"}function m(e){for(let t of[e?.status,e?.response?.status,e?.xhr?.status,e?.originalError?.status]){let e="number"==typeof t?t:parseInt(t,10);if("number"==typeof e&&isFinite(e)&&e>0)return e}return 0}},63136:(e,t,r)=>{"use strict";r.d(t,{l:()=>n});var n=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},63536:(e,t,r)=>{"use strict";var n=r(93570),i=r(72649),o=r(58513),s=function(){};function a(e){return function(t,r,n){s("create ajax sender",t,r);var o={};"string"==typeof r&&(o.headers={"Content-type":"text/plain"});var a=new e("POST",i.addPath(t,"/xhr_send"),r,o);return a.once("finish",function(e){if(s("finish",e),a=null,200!==e&&204!==e)return n(Error("http status "+e));n()}),function(){s("abort"),a.close(),a=null;var e=Error("Aborted");e.code=1e3,n(e)}}}function l(e,t,r,n){o.call(this,e,t,a(n),r,n)}n(l,o),e.exports=l},63592:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},63667:(e,t,r)=>{"use strict";r.d(t,{JQ:()=>d,X:()=>p,az:()=>v});var n=r(64083);
51class i{static{this.ps="PostScript"}static{this.pdf="Adobe PDF"}static{this.ebook="E-Book"}static{this.office="MS Office"}static{this.imageResize="Image Resize"}static{this.imageConvert="Image Convert"}static{this.imageCompress="Image Compress"}static{this.meme="Meme"}static{this.videoConvert="Video Convert"}static{this.videoCompress="Video Compress"}static{this.audio="Audio"}static{this.webtool="Web Tools"}static{this.imageMerge="Image Merge"}static{this.audioCompress="Audio Compress"}static{this.fileArchive="File Archive"}static{this.files="Files"}}class o{}class s extends o{static{this.TYPE=n._h.WORD}static{this.EXTENTIONS=["doc","docx"]}}class a extends o{static{this.TYPE=n._h.EXCEL}static{this.EXTENTIONS=["xls","xlsx"]}}class l extends o{static{this.TYPE=n._h.POWERPOINT}static{this.EXTENTIONS=["ppt","pptx"]}}class c extends o{static{this.TYPE=n._h.PDF}static{this.EXTENTIONS=["pdf"]}}class u extends o{static{this.TYPE=n._h.PS}static{this.EXTENTIONS=["ps"]}}class d extends o{static{this.TYPE=n._h.IMAGE}static{this.EXTENTIONS=["jpeg","jpg","png","bmp","webp","gif","tif","tiff","cr2","nef","heic"]}}class h extends o{static{this.TYPE=n._h.EBOOK}static{this.EXTENTIONS=["epub","mobi","pdf"]}}class p extends o{static{this.TYPE=n._h.VIDEO}static{this.EXTENTIONS=["mts","3gp","avi","flv","m4v","mkv","mp4","mpeg","mpg","vob","webm","wmv","mov"]}}class f extends o{static{this.TYPE=n._h.FILES}static{this.EXTENTIONS=[]}}class g extends o{static{this.TYPE=n._h.FILES}static{this.EXTENTIONS=[]}}class m extends o{static{this.TYPE=n._h.ARCHIVE}static{this.EXTENTIONS=["rar","7z","tar.gz","tar.bz2","tar.xz","zip","rar","tar","bz2","gz","lz4","lzma","xz"]}}class v extends o{static{this.TYPE=n._h.AUDIO}static{this.EXTENTIONS=["mp3","aac","ogg","flac","aiff","mmf","m4a","wma","wav","m4r","opus"]}}class y extends o{static{this.TYPE=n._h.AV}static{this.EXTENTIONS=["mts","3gp","avi","flv","m4v","mkv","mp4","mpeg","mpg","vob","webm","wmv","mov","mp3","aac","ogg","flac","aiff","mmf","m4a","wma","wav","m4r","opus"]}}},63672:(e,t,r)=>{"use strict";r.d(t,{T:()=>i});var n=r(77698);function i(e){return Symbol.asyncIterator&&(0,n.T)(null==e?void 0:e[Symbol.asyncIterator])}},63700:(e,t,r)=>{var n=r(64451),i=r(75082),o=r(79364),s=r(28375),a=r(19887),l=r(44577),c=1,u=2,d="[object Boolean]",h="[object Date]",p="[object Error]",f="[object Map]",g="[object Number]",m="[object RegExp]",v="[object Set]",y="[object String]",b="[object Symbol]",S="[object ArrayBuffer]",E="[object DataView]",w=n?n.prototype:void 0,_=w?w.valueOf:void 0;e.exports=function(e,t,r,n,w,A,T){switch(r){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case S:if(e.byteLength!=t.byteLength||!A(new i(e),new i(t)))break;return!0;case d:case h:case g:return o(+e,+t);case p:return e.name==t.name&&e.message==t.message;case m:case y:return e==t+"";case f:var O=a;case v:var C=n&c;if(O||(O=l),e.size!=t.size&&!C)break;var I=T.get(e);if(I)return I==t;n|=u,T.set(e,t);var P=s(O(e),O(t),n,w,A,T);return T.delete(e),P;case b:if(_)return _.call(e)==_.call(t)}return!1}},63948:(e,t,r)=>{"use strict";r.d(t,{c:()=>h});var n=r(4902),i=r(43604),o=r(98683),s=r(47785),a=r(9711),l=r(43629),c=r(9324),u=r(79347),d=r(41451);class h{constructor(e,t,r){this.storageService=e,this.httpClient=t,this.fileManagerService=r,this.logger=a.V.getLogger("FileUploadRecoveryService")}initialize(){this.recoverFileUploadFromStorage()}recoverFileUploadFromStorage(){let e=this.storageService.keySet(d.N.FILE_UPLOAD_KEY_PREFIX),t=[],r=[];for(let n of Array.from(e)){let e=n.replace(`${d.N.FILE_UPLOAD_KEY_PREFIX}-`,""),i=this.storageService.get(d.N.FILE_UPLOAD_KEY_PREFIX,e,null,s.e.fastDeserialize);if(i.uploadStartTime){let r=l.W.fromDate(i.uploadStartTime);if(r.isValid()&&r.isBefore(l.W.fromDate(new Date).subtract(o.FO.REMOVE_STORED_FILE_AFTER_HOURS,"hours"))){t.push(e);continue}}i.recoveredFileUpload=!0,r.push(i)}this.fileManagerService.addFileUploads(r),t.forEach(e=>{try{this.storageService.remove(d.N.FILE_UPLOAD_KEY_PREFIX,e)}catch(t){this.logger.error({error:t,message:"Failed to remove file: "+e})}})}}h=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(d.n)),(0,n.Qj)(1,(0,i.WQ)(u.jo)),(0,n.Qj)(2,(0,i.WQ)(c.D)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===d.n?Object:d.n,void 0===u.jo?Object:u.jo,void 0===c.D?Object:c.D])],h)},64083:(e,t,r)=>{"use strict";var n;r.d(t,{Gi:()=>l,HP:()=>o,Tc:()=>p,Yg:()=>d,_h:()=>i,b:()=>s,cl:()=>a,fl:()=>c,jU:()=>g,qn:()=>f});
51class i{static{this.POWERPOINT="powerpoint"}static{this.EXCEL="excel"}static{this.WORD="word"}static{this.PDF="pdf"}static{this.IMAGE="image"}static{this.PS="ps"}static{this.VIDEO="video"}static{this.AUDIO="audio"}static{this.AV="av"}static{this.EBOOK="ebook"}static{this.ARCHIVE="archive"}static{this.FILES="files"}static{this.TEXT="text"}}class o{static{this.POWERPOINT="powerpoint"}static{this.WORD="word"}static{this.PDF="pdf"}static{this.IMAGE="image"}static{this.PS="ps"}static{this.PNG="png"}static{this.JPG="jpg"}static{this.TIFF="tiff"}static{this.WEBP="webp"}static{this.VIDEO="video"}static{this.AUDIO="audio"}static{this.EBOOK="ebook"}static{this.JPEG="jpeg"}static{this.HEIC="heic"}}class s{static{this.CONVERT="convert"}static{this.COMPRESS="compress"}static{this.EXTRACT="extract"}static{this.ARCHIVE="archive"}static{this.SPLIT="split"}static{this.MERGE="merge"}static{this.RESIZE="resize"}static{this.CROP="crop"}static{this.ENCODE="encode"}static{this.DECODE="decode"}static{this.COUNT="count"}static{this.URL_ENCODER="url-encoder"}static{this.URL_DECODER="url-decoder"}static{this.BASE64_ENCODE="base64-encode"}static{this.BASE64_DECODE="base64-decode"}static{this.WORD_COUNT="word-count"}static{this.MEME="meme"}}class a{static{this.COMPLETED="completed"}static{this.STARTED="started"}static{this.FAILED="failed"}static{this.UNDEFINED="undefined"}}class l{static{this.STARTED="started"}static{this.PARTIAL="partial"}static{this.FAILED="failed"}static{this.UNKNOWN="unknown"}static{this.COMPLETED="completed"}}class c{static{this.UPLOAD="upload"}static{this.QUEUED="queued"}static{this.PREPROCESS="preprocess"}static{this.PROCESSING="processing"}static{this.READY="ready"}static{this.ZIP="zip"}static{this.COMPLETED="completed"}}class u{static{this.PERCENTAGE="percentage"}static{this.RATIO="ratio"}static{this.NOTIFICATION="notification"}}class d{static{this.CONVERT_ONE_TO_ONE="convert-one-to-one"}static{this.CONVERT_ONE_TO_MANY="convert-one-to-many"}}class h{static{this.LOCAL="local"}}class p{static{this.GOOGLE_DRIVE_FILE="GOOGLE_DRIVE_FILE"}static{this.DROPBOX_FILE="DROPBOX_FILE"}static{this.FILE="FILE"}}class f{static{this.SERVER="server"}}class g{static{this.UPLOAD="upload"}static{this.PROCESS="process"}static{this.GENERIC="generic"}}!function(e){e.getFileIdFromSafeName=function(e){let t=e.split(/\-|\./),r=t.length-1;for(;r>=0;){if(24===t[r].length)return t[r];r--}throw Error("Failed to get uploaded file id from the given safe file name.")}}(n||(n={}))},64451:(e,t,r)=>{e.exports=r(19031).Symbol},64682:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n="object"==typeof global&&global&&global.Object===Object&&global},64688:(e,t,r)=>{"use strict";r.d(t,{O:()=>n});var n=function(e){return e.FILE_SELECTED="FILE_SELECTED",e.INVALID_FILE_SELECTED="INVALID_FILE_SELECTED",e.FILE_UPLOAD_START="FILE_UPLOAD_START",e.FILE_UPLOAD_COMPLETE="FILE_UPLOAD_COMPLETE",e.FILE_UPLOAD_ERROR="FILE_UPLOAD_ERROR",e.VALIDATION_BANNER_SHOWN="VALIDATION_BANNER_SHOWN",e.VALIDATION_BANNER_DISMISSED="VALIDATION_BANNER_DISMISSED",e.SUGGESTION_LINK_CLICKED="SUGGESTION_LINK_CLICKED",e.SUGGESTION_LOADED="SUGGESTION_LOADED",e.FILE_HANDOFF_STARTED="FILE_HANDOFF_STARTED",e.FILE_HANDOFF_COMPLETED="FILE_HANDOFF_COMPLETED",e.FILE_HANDOFF_MISSED="FILE_HANDOFF_MISSED",e.THUMBNAIL_LOAD_FAILED="THUMBNAIL_LOAD_FAILED",e.NEXT_TOOL_CLICKED="NEXT_TOOL_CLICKED",e.NEXT_TOOL_CHAINED="NEXT_TOOL_CHAINED",e.RECENT_REEDIT_CLICKED="RECENT_REEDIT_CLICKED",e.SESSION_FILE_PICKED="SESSION_FILE_PICKED",e.SESSION_FILE_ROUTED="SESSION_FILE_ROUTED",e.CONVERT_START="CONVERT_START",e.CONVERT_COMPLETE="CONVERT_COMPLETE",e.CONVERT_ERROR="CONVERT_ERROR",e.FILE_DOWNLOAD="FILE_DOWNLOAD",e.LOGIN_SUCCESS="LOGIN_SUCCESS",e.LOGIN_ERROR="LOGIN_ERROR",e.API_ERROR="API_ERROR",e.WEBSOCKET_DISCONNECT="WEBSOCKET_DISCONNECT",e.PAGE_VIEW="PAGE_VIEW",e.FEATURE_SEARCH="FEATURE_SEARCH",e.FEATURE_SEARCH_CLICK="FEATURE_SEARCH_CLICK",e.PREVIEW_OPENED="PREVIEW_OPENED",e.EDITOR_FILES_STAGED="EDITOR_FILES_STAGED",e.EDITOR_PICKER_OPENED="EDITOR_PICKER_OPENED",e.EDITOR_FILE_OPENED="EDITOR_FILE_OPENED",e.EDITOR_FILE_FAILED="EDITOR_FILE_FAILED",e.EDITOR_TOOL="EDITOR_TOOL",e.EDITOR_EXPORT_START="EDITOR_EXPORT_START",e.EDITOR_EXPORT_DONE="EDITOR_EXPORT_DONE",e.EDITOR_EXPORT_FAILED="EDITOR_EXPORT_FAILED",e.UPLOAD_ABANDONED="UPLOAD_ABANDONED",e.OPTION_CHANGED="OPTION_CHANGED",e.DOWNLOADS_PAGE_VIEW="DOWNLOADS_PAGE_VIEW",e.DOWNLOAD_BTN_VISIBLE="DOWNLOAD_BTN_VISIBLE",e.DOWNLOADS_PAGE_CLICK="DOWNLOADS_PAGE_CLICK",e.DOWNLOADS_PAGE_EXIT="DOW
51NLOADS_PAGE_EXIT",e.GROW_PITCH_SHOWN="GROW_PITCH_SHOWN",e.GROW_PITCH_DISMISSED="GROW_PITCH_DISMISSED",e.GROW_PITCH_CTA_CLICKED="GROW_PITCH_CTA_CLICKED",e.SHARE_CLICKED="SHARE_CLICKED",e.INTERNAL_LINK_CLICK="INTERNAL_LINK_CLICK",e.CREDIT_PANEL_OPENED="CREDIT_PANEL_OPENED",e.CREDIT_COPIED="CREDIT_COPIED",e.LINKUS_SNIPPET_COPIED="LINKUS_SNIPPET_COPIED",e.POD_POLL_RTT="POD_POLL_RTT",e.POD_POLL_FALLBACK="POD_POLL_FALLBACK",e.WEB_VITALS="WEB_VITALS",e.SCHEDULE_QUEUED="schedule.queued",e.SCHEDULE_RETRY="schedule.retry",e.SCHEDULE_DEDUP_HIT="schedule.dedup_hit",e.SCHEDULE_STALLED="schedule.stalled",e.SCHEDULE_RETRY_ALL="schedule.retry_all",e.STUDIO_OPENED="STUDIO_OPENED",e.STUDIO_FIRST_EDIT="STUDIO_FIRST_EDIT",e.STUDIO_EXPORT_START="STUDIO_EXPORT_START",e.STUDIO_EXPORT_COMPLETE="STUDIO_EXPORT_COMPLETE",e.STUDIO_EXPORT_FAILED="STUDIO_EXPORT_FAILED",e.STUDIO_EXPORT_BLOCKED="STUDIO_EXPORT_BLOCKED",e.STUDIO_FEATURE_USED="STUDIO_FEATURE_USED",e.STUDIO_SESSION_END="STUDIO_SESSION_END",e.STUDIO_ABANDON="STUDIO_ABANDON",e.STUDIO_RESTORED="STUDIO_RESTORED",e.STUDIO_PROXY_WAIT="STUDIO_PROXY_WAIT",e.STUDIO_CAPS="STUDIO_CAPS",e.NUDGE_SHOWN="NUDGE_SHOWN",e.NUDGE_ACCEPTED="NUDGE_ACCEPTED",e.NUDGE_DECLINED="NUDGE_DECLINED",e.NUDGE_DISMISSED="NUDGE_DISMISSED",e.FRAMEPICKER_OPENED="FRAMEPICKER_OPENED",e.FRAMEPICKER_CAPS="FRAMEPICKER_CAPS",e.FRAMEPICKER_SOURCE="FRAMEPICKER_SOURCE",e.FRAMEPICKER_SCRUB="FRAMEPICKER_SCRUB",e.FRAMEPICKER_CHECK="FRAMEPICKER_CHECK",e.FRAMEPICKER_CONVERT="FRAMEPICKER_CONVERT",e.FRAMEPICKER_ABANDON="FRAMEPICKER_ABANDON",e}({})},64982:(e,t,r)=>{"use strict";r.d(t,{s:()=>i});var n=r(36982),i=new(function(){function e(){this._typeMetadatas=new Map,this._transformMetadatas=new Map,this._exposeMetadatas=new Map,this._excludeMetadatas=new Map,this._ancestorsMap=new Map}return e.prototype.addTypeMetadata=function(e){this._typeMetadatas.has(e.target)||this._typeMetadatas.set(e.target,new Map),this._typeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addTransformMetadata=function(e){this._transformMetadatas.has(e.target)||this._transformMetadatas.set(e.target,new Map),this._transformMetadatas.get(e.target).has(e.propertyName)||this._transformMetadatas.get(e.target).set(e.propertyName,[]),this._transformMetadatas.get(e.target).get(e.propertyName).push(e)},e.prototype.addExposeMetadata=function(e){this._exposeMetadatas.has(e.target)||this._exposeMetadatas.set(e.target,new Map),this._exposeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.addExcludeMetadata=function(e){this._excludeMetadatas.has(e.target)||this._excludeMetadatas.set(e.target,new Map),this._excludeMetadatas.get(e.target).set(e.propertyName,e)},e.prototype.findTransformMetadatas=function(e,t,r){return this.findMetadatas(this._transformMetadatas,e,t).filter(function(e){return!e.options||!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?r===n._.CLASS_TO_CLASS||r===n._.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||r===n._.CLASS_TO_PLAIN)})},e.prototype.findExcludeMetadata=function(e,t){return this.findMetadata(this._excludeMetadatas,e,t)},e.prototype.findExposeMetadata=function(e,t){return this.findMetadata(this._exposeMetadatas,e,t)},e.prototype.findExposeMetadataByCustomName=function(e,t){return this.getExposedMetadatas(e).find(function(e){return e.options&&e.options.name===t})},e.prototype.findTypeMetadata=function(e,t){return this.findMetadata(this._typeMetadatas,e,t)},e.prototype.getStrategy=function(e){var t=this._excludeMetadatas.get(e),r=t&&t.get(void 0),n=this._exposeMetadatas.get(e),i=n&&n.get(void 0);return r&&i||!r&&!i?"none":r?"excludeAll":"exposeAll"},e.prototype.getExposedMetadatas=function(e){return this.getMetadata(this._exposeMetadatas,e)},e.prototype.getExcludedMetadatas=function(e){return this.getMetadata(this._excludeMetadatas,e)},e.prototype.getExposedProperties=function(e,t){return this.getExposedMetadatas(e).filter(function(e){return!e.options||!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===n._.CLASS_TO_CLASS||t===n._.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===n._.CLASS_TO_PLAIN)}).map(function(e){return e.propertyName})},e.prototype.getExcludedProperties=function(e,t){return this.getExcludedMetadatas(e).filter(function(e){return!e.options||!0===e.options.toClassOnly&&!0===e.options.toPlainOnly||(!0===e.options.toClassOnly?t===n._.CLASS_TO_CLASS||t===n._.PLAIN_TO_CLASS:!0!==e.options.toPlainOnly||t===n._.CLASS_TO_PLAIN)}).map(function(e){return e.propertyName})},e.prototype.clear=function(){this._typeMetadatas.clear(),this._exposeMetadatas.clear(),this._excludeMetadatas.clear(),this._ancestorsMap.clear()},e.prototype.getMetadata=function(e,t){var r,n=e.get(t);n&&(r=Array.from(n.values()).filter(function(e){return void 0!==e.propertyName}));for(var i=[],o=0,s=this.getAncestors(t);o<s.length;o++){var a=s[o],l=e.get(a);if(l){var c=Array.from(l.values()).filter(function(e){return void 0!==e.propertyName});i.push.apply(i,c)}}return i.concat(r||[])},e.prototype.findMetadata=function(e,t,r){var n=e.get(t);if(n){var i=n.get(r);if(i)return i}for(var o=0,s=this.getAncestors(t);o<s.length;o++){var a=s[o],l=e.get(a);if(l){var c=l.get(r);if(c)return c}}},e.prototype.findMetadatas=function(e,t,r){var n,i=e.get(t);i&&(n=i.get(r));for(var o=[],s=0,a=this.getAncestors(t);s<a.length;s++){var l=a[s],c=e.get(l);c&&c.has(r)&&o.push.apply(o,c.get(r))}return o.slice().reverse().concat((n||[]).slice().reverse())},e.prototype.getAncestors=function(e){if(!e)return[];if(!this._ancestorsMap.has(e)){for(var t=[],r=Object.getPrototypeOf(e.prototype.constructor);void 0!==r.prototype;r=Object.getPrototypeOf(r.prototype.constructor))t.push(r);this._ancestorsMap.set(e,t)}return this._ancestorsMap.get(e)},e}())},65104:(e,t,r)=>{"use strict";function n(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(o),!i)return o}r.d(t,{N:()=>n})},65111:(e,t,r)=>{"use strict";r.d(t,{f:()=>i});var n=r(4902),i={setTimeout:function(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];var s=i.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,(0,n.fX)([e,t],(0,n.zs)(r))):setTimeout.apply(void 0,(0,n.fX)([e,t],(0,n.zs)(r)))},clearTimeout:function(e){var t=i.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}},65456:e=>{!function(){"use strict";var t=function(e){if(!(this instanceof t))return new t(e);if(this.version=1,this.support="u">typeof File&&"u">typeof Blob&&"u">typeof FileList&&(!!Blob.prototype.webkitSlice||!!Blob.prototype.mozSlice||!!Blob.prototype.slice),!this.support)return!1;var r=this;r.files=[],r.defaults={chunkSize:1048576,forceChunkSize:!1,simultaneousUploads:3,fileParameterName:"file",chunkNumberParameterName:"resumableChunkNumber",chunkSizeParameterName:"resumableChunkSize",currentChunkSizeParameterName:"resumableCurrentChunkSize",totalSizeParameterName:"resumableTotalSize",typeParameterName:"resumableType",identifierParameterName:"resumableIdentifier",fileNameParameterName:"resumableFilename",relativePathParameterName:"resumableRelativePath",totalChunksParameterName:"resumableTotalChunks",throttleProgressCallbacks:.5,query:{},headers:{},preprocess:null,method:"multipart",uploadMethod:"POST",testMethod:"GET",prioritizeFirstAndLastChunk:!1,target:"/",testTarget:null,parameterNamespace:"",testChunks:!0,generateUniqueIdentifier:null,getTarget:null,maxChunkRetries:100,chunkRetryInterval:void 0,permanentErrors:[400,404,415,500,501],maxFiles:void 0,withCredentials:!1,xhrTimeout:0,clearInput:!0,chunkFormat:"blob",setChunkTypeFromFile:!1,maxFilesErrorCallback:function(e,t){var n=r.getOpt("maxFiles");alert("Please upload no more than "+n+" file"+(1===n?"":"s")+" at a time.")},minFileSize:1,minFileSizeErrorCallback:function(e,t){alert(e.fileName||e.name+" is too small, please upload files larger than "+n.formatSize(r.getOpt("minFileSize"))+".")},maxFileSize:void 0,maxFileSizeErrorCallback:function(e,t){alert(e.fileName||e.name+" is too large, please upload files less than "+n.formatSize(r.getOpt("maxFileSize"))+".")},fileType:[],fileTypeErrorCallback:function(e,t){alert(e.fileName||e.name+" has type not allowed, please upload files of type "+r.getOpt("fileType")+".")}},r.opts=e||{},r.getOpt=function(e){var r=this;if(e instanceof Array){var i={};return n.each(e,function(e){i[e]=r.getOpt(e)}),i}if(r instanceof h)if(void 0!==r.opts[e])return r.opts[e];else r=r.fileObj;if(r instanceof d)if(void 0!==r.opts[e])return r.opts[e];else r=r.resumableObj;if(r instanceof t)if(void 0!==r.opts[e])return r.opts[e];else return r.defaults[e]},r.events=[],r.on=function(e,t){r.events.push(e.toLowerCase(),t)},r.fire=function(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);for(var n=e[0].toLowerCase(),t=0;t<=r.events.length;
51t+=2)r.events[t]==n&&r.events[t+1].apply(r,e.slice(1)),"catchall"==r.events[t]&&r.events[t+1].apply(null,e);"fileerror"==n&&r.fire("error",e[2],e[1]),"fileprogress"==n&&r.fire("progress")};var n={stopEvent:function(e){e.stopPropagation(),e.preventDefault()},each:function(e,t){if(void 0!==e.length){for(var r=0;r<e.length;r++)if(!1===t(e[r]))return}else for(r in e)if(!1===t(r,e[r]))return},generateUniqueIdentifier:function(e,t){var n=r.getOpt("generateUniqueIdentifier");if("function"==typeof n)return n(e,t);var i=e.webkitRelativePath||e.fileName||e.name;return e.size+"-"+i.replace(/[^0-9a-zA-Z_-]/img,"")},contains:function(e,t){var r=!1;return n.each(e,function(e){return e!=t||(r=!0,!1)}),r},formatSize:function(e){return e<1024?e+" bytes":e<1048576?(e/1024).toFixed(0)+" KB":e<0x40000000?(e/1024/1024).toFixed(1)+" MB":(e/1024/1024/1024).toFixed(1)+" GB"},getTarget:function(e,t){var n=r.getOpt("target");if("test"===e&&r.getOpt("testTarget")&&(n="/"===r.getOpt("testTarget")?r.getOpt("target"):r.getOpt("testTarget")),"function"==typeof n)return n(t);var i=0>n.indexOf("?")?"?":"&";return n+i+t.join("&")}},i=function(e){n.stopEvent(e),e.dataTransfer&&e.dataTransfer.items?c(e.dataTransfer.items,e):e.dataTransfer&&e.dataTransfer.files&&c(e.dataTransfer.files,e)},o=function(e){e.preventDefault()};function s(e,t,r,n){var i;return e.isFile?e.file(function(e){e.relativePath=t+e.name,r.push(e),n()}):(e.isDirectory?i=e:e instanceof File&&r.push(e),"function"==typeof e.webkitGetAsEntry&&(i=e.webkitGetAsEntry()),i&&i.isDirectory)?l(i,t+i.name+"/",r,n):void("function"==typeof e.getAsFile&&(e=e.getAsFile())instanceof File&&(e.relativePath=t+e.name,r.push(e)),n())}function a(e,t){if(!e||0===e.length)return t();e[0](function(){a(e.slice(1),t)})}function l(e,t,r,n){e.createReader().readEntries(function(e){if(!e.length)return n();a(e.map(function(e){return s.bind(null,e,t,r)}),n)})}function c(e,t){if(e.length){r.fire("beforeAdd");var n=[];a(Array.prototype.map.call(e,function(e){return s.bind(null,e,"",n)}),function(){n.length&&u(n,t)})}}var u=function(e,t){var i=0,o=r.getOpt(["maxFiles","minFileSize","maxFileSize","maxFilesErrorCallback","minFileSizeErrorCallback","maxFileSizeErrorCallback","fileType","fileTypeErrorCallback"]);if(void 0!==o.maxFiles&&o.maxFiles<e.length+r.files.length)if(1!==o.maxFiles||1!==r.files.length||1!==e.length)return o.maxFilesErrorCallback(e,i++),!1;else r.removeFile(r.files[0]);var s=[],a=[],l=e.length,c=function(){--l||(s.length||a.length)&&window.setTimeout(function(){r.fire("filesAdded",s,a)},0)};n.each(e,function(e){var l=e.name;if(o.fileType.length>0){var u=!1;for(var h in o.fileType){var p="."+o.fileType[h];if(-1!==l.toLowerCase().indexOf(p.toLowerCase(),l.length-p.length)){u=!0;break}}if(!u)return o.fileTypeErrorCallback(e,i++),!1}if(void 0!==o.minFileSize&&e.size<o.minFileSize)return o.minFileSizeErrorCallback(e,i++),!1;if(void 0!==o.maxFileSize&&e.size>o.maxFileSize)return o.maxFileSizeErrorCallback(e,i++),!1;function f(n){r.getFromUniqueIdentifier(n)?a.push(e):function(){e.uniqueIdentifier=n;var i=new d(r,e,n);r.files.push(i),s.push(i),i.container=void 0!==t?t.srcElement:null,window.setTimeout(function(){r.fire("fileAdded",i,t)},0)}(),c()}var g=n.generateUniqueIdentifier(e,t);g&&"function"==typeof g.then?g.then(function(e){f(e)},function(){c()}):f(g)})};function d(e,t,r){var i=this;i.opts={},i.getOpt=e.getOpt,i._prevProgress=0,i.resumableObj=e,i.file=t,i.fileName=t.fileName||t.name,i.size=t.size,i.relativePath=t.relativePath||t.webkitRelativePath||i.fileName,i.uniqueIdentifier=r,i._pause=!1,i.container="";var o=void 0!==r,s=function(e,t){switch(e){case"progress":i.resumableObj.fire("fileProgress",i,t);break;case"error":i.abort(),o=!0,i.chunks=[],i.resumableObj.fire("fileError",i,t);break;case"success":if(o)return;i.resumableObj.fire("fileProgress",i),i.isComplete()&&i.resumableObj.fire("fileSuccess",i,t);break;case"retry":i.resumableObj.fire("fileRetry",i)}};return i.chunks=[],i.abort=function(){var e=0;n.each(i.chunks,function(t){"uploading"==t.status()&&(t.abort(),e++)}),e>0&&i.resumableObj.fire("fileProgress",i)},i.cancel=function(){var e=i.chunks;i.chunks=[],n.each(e,function(e){"uploading"==e.status()&&(e.abort(),i.resumableObj.uploadNextChunk())}),i.resumableObj.removeFile(i),i.resumableObj.fire("fileProgress",i)},i.retry=function(){i.bootstrap();var e=!1;i.resumableObj.on("chunkingComplete",function(){e||i.resumableObj.upload(),e=!0})},i.bootstrap=function(){i.abort(),o=!1,i.chunks=[],i._prevProgress=0;for(var e=Math.max((i.getOpt("forceChunkSize")?Math.ceil:Math.floor)(i.file.size/i.getOpt("chunkSize")),1),t=0;t<e;t++)!function(t){window.setTimeout(function(){i.chunks.push(new h(i.resumableObj,i,t,s)),i.resumableObj.fire("chunkingProgress",i,t/e)},0)}(t);window.setTimeout(function(){i.resumableObj.fire("chunkingComplete",i)},0)},i.progress=function(){if(o)return 1;var e=0,t=!1;return n.each(i.chunks,function(r){"error"==r.status()&&(t=!0),e+=r.progress(!0)}),e=t||e>.99999?1:e,e=Math.max(i._prevProgress,e),i._prevProgress=e,e},i.isUploading=function(){var e=!1;return n.each(i.chunks,function(t){if("uploading"==t.status())return e=!0,!1}),e},i.isComplete=function(){var e=!1;return n.each(i.chunks,function(t){var r=t.status();if("pending"==r||"uploading"==r||1===t.preprocessState)return e=!0,!1}),!e},i.pause=function(e){void 0===e?i._pause=!i._pause:i._pause=e},i.isPaused=function(){return i._pause},i.resumableObj.fire("chunkingStart",i),i.bootstrap(),this}function h(e,t,r,i){var o=this;o.opts={},o.getOpt=e.getOpt,o.resumableObj=e,o.fileObj=t,o.fileObjSize=t.size,o.fileObjType=t.file.type,o.offset=r,o.callback=i,o.lastProgressCallback=new Date,o.tested=!1,o.retries=0,o.pendingRetry=!1,o.preprocessState=0;var s=o.getOpt("chunkSize");return o.loaded=0,o.startByte=o.offset*s,o.endByte=Math.min(o.fileObjSize,(o.offset+1)*s),o.fileObjSize-o.endByte<s&&!o.getOpt("forceChunkSize")&&(o.endByte=o.fileObjSize),o.xhr=null,o.test=function(){o.xhr=new XMLHttpRequest;var e=function(e){o.tested=!0;var t=o.status();"success"==t?(o.callback(t,o.message()),o.resumableObj.uploadNextChunk()):o.send()};o.xhr.addEventListener("load",e,!1),o.xhr.addEventListener("error",e,!1),o.xhr.addEventListener("timeout",e,!1);var t=[],r=o.getOpt("parameterNamespace"),i=o.getOpt("query");"function"==typeof i&&(i=i(o.fileObj,o)),n.each(i,function(e,n){t.push([encodeURIComponent(r+e),encodeURIComponent(n)].join("="))}),t=t.concat([["chunkNumberParameterName",o.offset+1],["chunkSizeParameterName",o.getOpt("chunkSize")],["currentChunkSizeParameterName",o.endByte-o.startByte],["totalSizeParameterName",o.fileObjSize],["typeParameterName",o.fileObjType],["identifierParameterName",o.fileObj.uniqueIdentifier],["fileNameParameterName",o.fileObj.fileName],["relativePathParameterName",o.fileObj.relativePath],["totalChunksParameterName",o.fileObj.chunks.length]].filter(function(e){return o.getOpt(e[0])}).map(function(e){return[r+o.getOpt(e[0]),encodeURIComponent(e[1])].join("=")})),o.xhr.open(o.getOpt("testMethod"),n.getTarget("test",t)),o.xhr.timeout=o.getOpt("xhrTimeout"),o.xhr.withCredentials=o.getOpt("withCredentials");var s=o.getOpt("headers");"function"==typeof s&&(s=s(o.fileObj,o)),n.each(s,function(e,t){o.xhr.setRequestHeader(e,t)}),o.xhr.send(null)},o.preprocessFinished=function(){o.preprocessState=2,o.send()},o.send=function(){var e=o.getOpt("preprocess");if("function"==typeof e)switch(o.preprocessState){case 0:o.preprocessState=1,e(o);return;case 1:return}if(o.getOpt("testChunks")&&!o.tested)return void o.test();o.xhr=new XMLHttpRequest,o.xhr.upload.addEventListener("progress",function(e){new Date-o.lastProgressCallback>1e3*o.getOpt("throttleProgressCallbacks")&&(o.callback("progress"),o.lastProgressCallback=new Date),o.loaded=e.loaded||0},!1),o.loaded=0,o.pendingRetry=!1,o.callback("progress");var t=function(e){var t=o.status();if("success"==t||"error"==t)o.callback(t,o.message()),o.resumableObj.uploadNextChunk();else{o.callback("retry",o.message()),o.abort(),o.retries++;var r=o.getOpt("chunkRetryInterval");void 0!==r?(o.pendingRetry=!0,setTimeout(o.send,r)):o.send()}};o.xhr.addEventListener("load",t,!1),o.xhr.addEventListener("error",t,!1),o.xhr.addEventListener("timeout",t,!1);var r=[["chunkNumberParameterName",o.offset+1],["chunkSizeParameterName",o.getOpt("chunkSize")],["currentChunkSizeParameterName",o.endByte-o.startByte],["totalSizeParameterName",o.fileObjSize],["typeParameterName",o.fileObjType],["identifierParameterName",o.fileObj.uniqueIdentifier],["fileNameParameterName",o.fileObj.fileName],["relativePathParameterName",o.fileObj.relativePath],["totalChunksParameterName",o.fileObj.chunks.length]].filter(function(e){return o.getOpt(e[0])}).reduce(function(e,t){return e[o.getOpt(t[0])]=t[1],e},{}),i=o.getOpt("query");"function"==typeof i&&(i=i(o.fileObj,o)),n.each(i,function(e,t){r[e]=t});var s=o.fileObj.file.slice?"slice":o.fileObj.file.mozSlice?"mozSlice":o.fileObj.file.webkitSlice?"webkitSlice":"slice",a=o.fileObj.file[s](o.startByte,o.endByte,o.getOpt("setChunkTypeFromFile")?o.fileObj.file.type:""),l=null,c=[],u=o.getOpt("parameterNamespace");if("octet"===o.getOpt("method"))l=a,n.each(r,function(e,t){c.push([encodeURIComponent(u+e),encodeURIComponent(t)].join("="))});else if(l=new FormData,n.each(r,function(e,t){l.append(u+e,t),c.push([encodeURIComponent(u+e),encodeURIComponent(t)].join("="))}),"blob"==o.getOpt("chunkFormat"))l.append(u+o.getOpt("fileParameterName"),a,o.fileObj.fileName);else if("base64"==o.getOpt("chunkFormat")){var d=new FileReader;d.onload=function(e){l.append(u+o.getOpt("fileParameterName"),d.result),o.xhr.send(l)},d.readAsDataURL(a)}var h=n.getTarget("upload",c),p=o.getOpt("uploadMethod");o.xhr.open(p,h),"octet"===o.getOpt("method")&&o.xhr.setRequestHeader("Content-Type","application/octet-stream"),o.xhr.timeout=o.getOpt("xhrTimeout"),o.xhr.withCredentials=o.getOpt("withCredentials");var f=o.getOpt("headers");"function"==typeof f&&(f=f(o.fileObj,o)),n.each(f,function(e,t){o.xhr.setRequestHeader(e,t)}),"blob"==o.getOpt("chunkFormat")&&o.xhr.send(l)},o.abort=function(){o.xhr&&o.xhr.abort(),o.xhr=null},o.status=function(){return o.pendingRetry?"uploading":o.xhr?o.xhr.readyState<4?"uploading":200==o.xhr.status||201==o.xhr.status?"success":n.contains(o.getOpt("permanentErrors"),o.xhr.status)||o.retries>=o.getOpt("maxChunkRetries")?"error":(o.abort(),"pending"):"pending"},o.message=function(){return o.xhr?o.xhr.responseText:""},o.progress=function(e){void 0===e&&(e=!1);var t=e?(o.endByte-o.startByte)/o.fileObjSize:1;if(o.pendingRetry)return 0;switch((!o.xhr||!o.xhr.status)&&(t*=.95),o.status()){case"success":case"error":return+t;
51case"pending":return 0*t;default:return o.loaded/(o.endByte-o.startByte)*t}},this}return r.uploadNextChunk=function(){var e=!1;if(r.getOpt("prioritizeFirstAndLastChunk")&&(n.each(r.files,function(t){return t.chunks.length&&"pending"==t.chunks[0].status()&&0===t.chunks[0].preprocessState?(t.chunks[0].send(),e=!0,!1):t.chunks.length>1&&"pending"==t.chunks[t.chunks.length-1].status()&&0===t.chunks[t.chunks.length-1].preprocessState?(t.chunks[t.chunks.length-1].send(),e=!0,!1):void 0}),e)||(n.each(r.files,function(t){if(!1===t.isPaused()&&n.each(t.chunks,function(t){if("pending"==t.status()&&0===t.preprocessState)return t.send(),e=!0,!1}),e)return!1}),e))return!0;var t=!1;return n.each(r.files,function(e){if(!e.isComplete())return t=!0,!1}),t||r.fire("complete"),!1},r.assignBrowse=function(e,t){void 0===e.length&&(e=[e]),n.each(e,function(e){"INPUT"===e.tagName&&"file"===e.type?n=e:((n=document.createElement("input")).setAttribute("type","file"),n.style.display="none",e.addEventListener("click",function(){n.style.opacity=0,n.style.display="block",n.focus(),n.click(),n.style.display="none"},!1),e.appendChild(n));var n,i=r.getOpt("maxFiles");void 0===i||1!=i?n.setAttribute("multiple","multiple"):n.removeAttribute("multiple"),t?n.setAttribute("webkitdirectory","webkitdirectory"):n.removeAttribute("webkitdirectory");var o=r.getOpt("fileType");void 0!==o&&o.length>=1?n.setAttribute("accept",o.map(function(e){return"."+e}).join(",")):n.removeAttribute("accept"),n.addEventListener("change",function(e){u(e.target.files,e),r.getOpt("clearInput")&&(e.target.value="")},!1)})},r.assignDrop=function(e){void 0===e.length&&(e=[e]),n.each(e,function(e){e.addEventListener("dragover",o,!1),e.addEventListener("dragenter",o,!1),e.addEventListener("drop",i,!1)})},r.unAssignDrop=function(e){void 0===e.length&&(e=[e]),n.each(e,function(e){e.removeEventListener("dragover",o),e.removeEventListener("dragenter",o),e.removeEventListener("drop",i)})},r.isUploading=function(){var e=!1;return n.each(r.files,function(t){if(t.isUploading())return e=!0,!1}),e},r.upload=function(){if(!r.isUploading()){r.fire("uploadStart");for(var e=1;e<=r.getOpt("simultaneousUploads");e++)r.uploadNextChunk()}},r.pause=function(){n.each(r.files,function(e){e.abort()}),r.fire("pause")},r.cancel=function(){r.fire("beforeCancel");for(var e=r.files.length-1;e>=0;e--)r.files[e].cancel();r.fire("cancel")},r.progress=function(){var e=0,t=0;return n.each(r.files,function(r){e+=r.progress()*r.size,t+=r.size}),t>0?e/t:0},r.addFile=function(e,t){u([e],t)},r.addFiles=function(e,t){u(e,t)},r.removeFile=function(e){for(var t=r.files.length-1;t>=0;t--)r.files[t]===e&&r.files.splice(t,1)},r.getFromUniqueIdentifier=function(e){var t=!1;return n.each(r.files,function(r){r.uniqueIdentifier==e&&(t=r)}),t},r.getSize=function(){var e=0;return n.each(r.files,function(t){e+=t.size}),e},r.handleDropEvent=function(e){i(e)},r.handleChangeEvent=function(e){u(e.target.files,e),e.target.value=""},r.updateQuery=function(e){r.opts.query=e},this};e.exports=t}()},65976:(e,t,r)=>{"use strict";var n=r(82007).b,i=r(93570),o=r(72649),s=r(75576),a=r(1878),l=r(9282),c=r(44110),u=r(22553),d=r(30839),h=function(){};function p(e,t){h(e);var r=this;n.call(this),setTimeout(function(){r.doXhr(e,t)},0)}i(p,n),p._getReceiver=function(e,t,r){return r.sameOrigin?new d(t,l):a.enabled?new d(t,a):s.enabled&&r.sameScheme?new d(t,s):u.enabled()?new u(e,t):new d(t,c)},p.prototype.doXhr=function(e,t){var r=this,n=o.addPath(e,"/info");h("doXhr",n),this.xo=p._getReceiver(e,n,t),this.timeoutRef=setTimeout(function(){h("timeout"),r._cleanup(!1),r.emit("finish")},p.timeout),this.xo.once("finish",function(e,t){h("finish",e,t),r._cleanup(!0),r.emit("finish",e,t)})},p.prototype._cleanup=function(e){h("_cleanup"),clearTimeout(this.timeoutRef),this.timeoutRef=null,!e&&this.xo&&this.xo.close(),this.xo=null},p.prototype.close=function(){h("close"),this.removeAllListeners(),this._cleanup(!1)},p.timeout=8e3,e.exports=p},66128:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(43754);let i=r(54743).A["__core-js_shared__"];var o=function(){var e=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");
51return e?"Symbol(src)_1."+e:""}();let s=function(e){return!!o&&o in e};var a=r(83497),l=r(29907),c=/[\\^$.*+?()[\]{}|]/g,u=/^\[object .+?Constructor\]$/,d=Object.prototype,h=Function.prototype.toString,p=d.hasOwnProperty,f=RegExp("^"+h.call(p).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");let g=function(e){return!(!(0,a.A)(e)||s(e))&&((0,n.A)(e)?f:u).test((0,l.A)(e))},m=function(e,t){return null==e?void 0:e[t]},v=function(e,t){var r=m(e,t);return g(r)?r:void 0}},66338:(e,t,r)=>{"use strict";r.d(t,{RV:()=>o,zj:()=>i});let n=0;function i(e){if(!e)return;let t=Date.parse(e);Number.isNaN(t)||(n=t-Date.now())}function o(){return Math.floor((Date.now()+n)/1e3)}},66384:(e,t,r)=>{"use strict";var n=r(57612),i=r(10020),o=function(){};e.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){e.exports.WPrefix in r.g||(r.g[e.exports.WPrefix]={})},postMessage:function(t,n){r.g.parent!==r.g?r.g.parent.postMessage(JSON.stringify({windowId:e.exports.currentWindowId,type:t,data:n||""}),"*"):o("Cannot postMessage, no parent window.",t,n)},createIframe:function(e,t){var i,s,a=r.g.document.createElement("iframe"),l=function(){o("unattach"),clearTimeout(i);try{a.onload=null}catch(e){}a.onerror=null},c=function(){o("cleanup"),a&&(l(),setTimeout(function(){a&&a.parentNode.removeChild(a),a=null},0),n.unloadDel(s))},u=function(e){o("onerror",e),a&&(c(),t(e))},d=function(e,t){o("post",e,t),setTimeout(function(){try{a&&a.contentWindow&&a.contentWindow.postMessage(e,t)}catch(e){}},0)};return a.src=e,a.style.display="none",a.style.position="absolute",a.onerror=function(){u("onerror")},a.onload=function(){o("onload"),clearTimeout(i),i=setTimeout(function(){u("onload timeout")},2e3)},r.g.document.body.appendChild(a),i=setTimeout(function(){u("timeout")},15e3),s=n.unloadAdd(c),{post:d,cleanup:c,loaded:l}},createHtmlfile:function(t,i){var s,a,l,c=["Active"].concat("Object").join("X"),u=new r.g[c]("htmlfile"),d=function(){clearTimeout(s),l.onerror=null},h=function(){u&&(d(),n.unloadDel(a),l.parentNode.removeChild(l),l=u=null,CollectGarbage())},p=function(e){o("onerror",e),u&&(h(),i(e))},f=function(e,t){try{setTimeout(function(){l&&l.contentWindow&&l.contentWindow.postMessage(e,t)},0)}catch(e){}};u.open(),u.write('<html><script>document.domain="'+r.g.document.domain+'";<\/script></html>'),u.close(),u.parentWindow[e.exports.WPrefix]=r.g[e.exports.WPrefix];var g=u.createElement("div");return u.body.appendChild(g),l=u.createElement("iframe"),g.appendChild(l),l.src=t,l.onerror=function(){p("onerror")},s=setTimeout(function(){p("timeout")},15e3),a=n.unloadAdd(h),{post:f,cleanup:h,loaded:d}}},e.exports.iframeEnabled=!1,r.g.document&&(e.exports.iframeEnabled=("function"==typeof r.g.postMessage||"object"==typeof r.g.postMessage)&&!i.isKonqueror())},66521:(e,t,r)=>{var n=r(78598);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},66555:(e,t,r)=>{"use strict";r.d(t,{Z:()=>g});var n=r(4902),i=r(43604),o=r(9711),s=r(64688),a=r(8365),l=r(32607),c=r(9968),u=r(35231),d=r(79347),h=r(90125),p=r(15750),f=r(71605);class g{markConvertStart(e){e&&this.convertStartedAt.set(e,Date.now())}takeConvertStartMs(e){if(!e)return null;let t=this.convertStartedAt.get(e);return null==t?null:(this.convertStartedAt.delete(e),Date.now()-t)}constructor(e,t,r,n,i){this.apiConfig=e,this.http=t,this.wsService=r,this.socketJSService=n,this.settingsService=i,this.optionChangesThisPage=0,this.logger=o.V.getLogger("MetricsService"),this.buffer=[],this.flushTimer=null,this.downloadedThisSession=!1,this.MAX_BUFFER_SIZE=10,this.FLUSH_INTERVAL_MS=5e3,this.convertStartedAt=new Map,u.Q.registerApiErrorSink(this),d.jo.registerApiErrorSink(this),this.wireRequestIdHeader()}wireRequestIdHeader(){try{this.settingsService.featureFlags.subscribe(e=>{(0,l.Ah)({enabled:e?.requestIdHeader===!0,sessionId:this.socketJSService.sessionId})})}catch{}}reportApiError(e){this.emit(s.O.API_ERROR,{endpoint:e.endpoint,method:e.method,status:e.status,ms:e.ms,...e.requestId?{requestId:e.requestId}:{}})}emit(e,t={}){a.C.hasWindow()&&(this.buffer.push({event:e,attributes:t,timestamp:new Date().toISOString(),pageUrl:window.location.pathname,wsId:this.wsService.getOrCreateStoredWSId(),sessionId:this.socketJSService.sessionId,platform:this.detectPlatform()}),this.buffer.length>=this.MAX_BUFFER_SIZE?this.flush():this.flushTimer||(this.flushTimer=setTimeout(()=>this.flush(),this.FLUSH_INTERVAL_MS)))}flush(){if(0===this.buffer.length)return;let e=this.buffer.splice(0);this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null);try{this.http.post(this.apiConfig.getMetricsEndpoint(),JSON.stringify({events:e}),{headers:{"Content-Type":"text/plain"}}).catch(e=>this.logger.error(e))}catch{}}flushOnUnload(){if(0!==this.buffer.length)if("u">typeof navigator&&navigator.sendBeacon){let e=JSON.stringify({events:this.buffer.splice(0)});navigator.sendBeacon(this.apiConfig.getMetricsEndpoint(),e)}else this.flush()}detectPlatform(){let e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"}}g=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(c.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(u.Q)),(0,n.Qj)(2,(0,i.WQ)(f.V)),(0,n.Qj)(3,(0,i.WQ)(p.G)),(0,n.Qj)(4,(0,i.WQ)(h.h)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===c.ApiConfig?Object:c.ApiConfig,void 0===u.Q?Object:u.Q,void 0===f.V?Object:f.V,void 0===p.G?Object:p.G,void 0===h.h?Object:h.h])],g)},66641:(e,t,r)=>{"use strict";r.d(t,{A:()=>A});var n=r(66128),i=r(54743);let o=(0,n.A)(i.A,"DataView");var s=r(5915);let a=(0,n.A)(i.A,"Promise");var l=r(49749);let c=(0,n.A)(i.A,"WeakMap");var u=r(21710),d=r(29907),h="[object Map]",p="[object Object]",f="[object Promise]",g="[object Set]",m="[object WeakMap]",v="[object DataView]",y=(0,d.A)(o),b=(0,d.A)(s.A),S=(0,d.A)(a),E=(0,d.A)(l.A),w=(0,d.A)(c),_=u.A;
51(o&&_(new o(new ArrayBuffer(1)))!=v||s.A&&_(new s.A)!=h||a&&_(a.resolve())!=f||l.A&&_(new l.A)!=g||c&&_(new c)!=m)&&(_=function(e){var t=(0,u.A)(e),r=t==p?e.constructor:void 0,n=r?(0,d.A)(r):"";if(n)switch(n){case y:return v;case b:return h;case S:return f;case E:return g;case w:return m}return t});let A=_},66783:e=>{e.exports=function(e){return this.__data__.has(e)}},67059:(e,t,r)=>{"use strict";var n=r(93570),i=r(63536),o=r(27540),s=r(75576);function a(e){if(!s.enabled)throw Error("Transport created when disabled");i.call(this,e,"/xhr_streaming",o,s)}n(a,i),a.enabled=function(e){return!e.cookie_needed&&!e.nullOrigin&&s.enabled&&e.sameScheme},a.transportName="xdr-streaming",a.roundTrips=2,e.exports=a},67375:(e,t,r)=>{"use strict";r.d(t,{R0:()=>l,lI:()=>a,ms:()=>s});var n=r(77698),i=r(86223);function o(e){return e[e.length-1]}function s(e){return(0,n.T)(o(e))?e.pop():void 0}function a(e){return(0,i.m)(o(e))?e.pop():void 0}function l(e,t){return"number"==typeof o(e)?e.pop():t}},67554:(e,t,r)=>{"use strict";r.d(t,{d:()=>D});var n=r(4902),i=r(43604),o=r(16579),s=r(56362),a=r(6155),l=r(7262),c=r(990),u=r(32128),d=r(44555),h=r(18476),p=r(44492),f=r(47785),g=r(9711),m=r(72577),v=r(70907),y=r(84214),b=r(45878),S=r(83831),E=r(17214),w=r(9968),_=r(69319),A=r(9324),T=r(1936),O=r(79347),C=r(21883),I=r(90125),P=r(71605),x=r(44189),k=r(41423),M=r(30580);class D{constructor(e,t,r,n,i,o,s,a,l){this.http=e,this.wsService=t,this.fileManagerService=r,this.gaService=n,this.offlineTaskService=i,this.helperService=o,this.apiConfig=s,this.settingsService=a,this.enforcementErrorService=l,this.logger=g.V.getLogger("FileProcessService"),this.scheduleTargets=new Map,this.cancelledSchedules=new Set}retryConfigWithEnforcementBailout(e,t){return{count:e,delay:e=>_.E.isEnforcementError(e)?(this.enforcementErrorService.show(_.E.extractDetails(e)),(0,o.$)(()=>e)):(0,s.O)(t)}}processFile(e){return(0,a.H)(this.wsService.ensureWsDomain()).pipe((0,c.Z)(()=>this._processFileInternal(e)))}_processFileInternal(e){this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.BUTTON,m.z.EventAction["FILE-CONVERT-START"],m.z.EventLabel.CONVERT,""),(0,b.metricsOrNull)()?.markConvertStart(e.id),this.fileManagerService.saveFileUploadToStorage(e),this.logger.trace7({message:"FileUpload sent for processing",data:f.e.toLoggableObject(e)});let t=e.endpointData.processorMetadataList[0];return(0,a.H)((0,l._)(this.settingsService.featureFlags.pipe((0,u.s)(1)))).pipe((0,c.Z)(r=>{let n=e.file&&!f.e.isUploadedFile(e);return r?.useTaskScheduling&&!n?(x.Ue.enabled=r?.clientQueuedState===!0,x.Ue.enabled)?this._scheduleTaskHandsOff(e,t):this._scheduleTask(e,t):e.updateProcessDomain(this.http,this.fileManagerService,this.apiConfig.getUploadAndProcessEndpointResolveEndpoint(),this.wsService).pipe((0,c.Z)(()=>this._processFile(e,t)))}))}_scheduleTask(e,t){let r=this.apiConfig.getScheduleTaskEndpoint(),n=this._buildFormData(e);return this.http.request(r,"POST",n,{headers:this.helperService.getCommonHttpHeaders(),timeout:3e4}).response$.pipe((0,d.L)(this.retryConfigWithEnforcementBailout(2,1e3)),(0,h.M)(r=>{r.processDomain&&(t.processDomain=r.processDomain),r.downloadDomain&&(t.downloadDomain=r.downloadDomain),r.workflowId&&(e.workflowId=String(r.workflowId)),e.persistFileUpload(this.fileManagerService),this.logger.trace7({message:"Task scheduled",data:{workflowId:r.workflowId}}),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.BUTTON,m.z.EventAction["FILE-CONVERT-END"],m.z.EventLabel.CONVERT,"")}),(0,p.W)(e=>(this.logger.error({message:`Error scheduling task: ${e.message}`,error:e}),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.BUTTON,m.z.EventAction["FILE-CONVERT-FAILED"],m.z.EventLabel.CONVERT,""),e.response?.dataType==="enforcement_error"&&(e.isEnforcementError=!0,e.enforcementData=e.response),(0,o.$)(()=>e))))}_scheduleTaskHandsOff(e,t){return this.scheduleTargets.set(e.id,{fileUpload:e,processorMetadata:t}),x.Ue.registerDispatcher(e=>this._redispatchSchedule(e)),x.Ue.begin(e.id),(0,a.H)(this._runScheduleLadder(e,t))}cancelSchedule(e){e&&(this.cancelledSchedules.add(e),this.scheduleTargets.delete(e),x.Ue.forget(e))}_redispatchSchedule(e){let t=this.scheduleTargets.get(e);t&&(x.Ue.renewNonce(e),t.fileUpload.scheduleAttemptNonce=x.Ue.nonceFor(e),this.fileManagerService.saveFileUploadToStorage(t.fileUpload),this._runScheduleLadder(t.fileUpload,t.processorMetadata).catch(e=>this.logger.error({message:`Retry-all schedule failed: ${e?.message}`,error:e})))}_runScheduleLadder(e,t){let r,n,i=!1,o=new Promise((e,t)=>
51{r=e,n=t}),s=e=>{i||(i=!0,r(e))},a=e=>{i||(i=!0,n(e))};return M.Z.add(e?.id),this._scheduleLadderLoop(e,t,s,a).finally(()=>M.Z.delete(e?.id)),o}async _scheduleLadderLoop(e,t,r,n){let i=(0,k.A5)({startedAtMs:x.Ue.startedAtMs(e.id)}),o=0;for(;;){o++;try{let n=await x.Ue.gate.run(()=>(0,l._)(this._scheduleOnce(e,t)));this._onScheduleAccepted(e,t,n,o),r(n);return}catch(l){let t=D.toScheduleFailure(l),s=i.decide(t,o);if(this.logger.error({message:`Schedule attempt ${o} failed (${s.kind}): ${l?.message}`,error:l}),"bail-enforcement"===s.kind){this._tagEnforcementError(l),this._endScheduleAttempt(e.id,"enforcement"),n(l);return}if("terminal"===s.kind){l.scheduleTerminal=!0,this._endScheduleAttempt(e.id,"terminal"),n(l);return}if("budget-exhausted"===s.kind){x.Ue.onBudgetExhausted(e.id,{attempt:o,reason:s.reason}),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.BUTTON,m.z.EventAction["FILE-CONVERT-FAILED"],m.z.EventLabel.CONVERT,""),r({queued:!0,stalled:!0,fileUploadId:e.id});return}let a=s.fromRetryAfter?s.delayMs??null:null;if(x.Ue.onServerBusy(e.id,{status:t.status,retryAfterMs:a,attempt:o}),x.Ue.onRetryScheduled(e.id,{attempt:o+1,delayMs:s.delayMs??0,fromRetryAfter:s.fromRetryAfter,reason:s.reason,status:t.status}),r({queued:!0,fileUploadId:e.id}),await D.wait(s.delayMs??0),this.cancelledSchedules.has(e.id)){this.cancelledSchedules.delete(e.id),this.logger.trace7({message:"Schedule ladder cancelled by the user",data:{fileUploadId:e.id,attempt:o}});return}}}}_scheduleOnce(e,t){let r=this.apiConfig.getScheduleTaskEndpoint(),n=this._buildFormData(e),i=x.Ue.nonceFor(e.id,e.scheduleAttemptNonce);e.scheduleAttemptNonce!==i&&(e.scheduleAttemptNonce=i,this.fileManagerService.saveFileUploadToStorage(e));let o={...this.helperService.getCommonHttpHeaders(),"Idempotency-Key":`${e.id}:${i}`};return this.http.request(r,"POST",n,{headers:o,timeout:3e4}).response$}_onScheduleAccepted(e,t,r,n){r?.processDomain&&(t.processDomain=r.processDomain),r?.downloadDomain&&(t.downloadDomain=r.downloadDomain),r?.workflowId&&(e.workflowId=String(r.workflowId)),e.persistFileUpload(this.fileManagerService);let i=n>1||r?.idempotentReplay===!0;x.Ue.onScheduled(e.id,{expectedStartSeconds:r?.expectedStartBySeconds,attempt:n,dedup:i}),this.logger.trace7({message:"Task scheduled",data:{workflowId:r?.workflowId,attempt:n,dedup:i}}),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.BUTTON,m.z.EventAction["FILE-CONVERT-END"],m.z.EventLabel.CONVERT,"")}_endScheduleAttempt(e,t){this.scheduleTargets.delete(e),x.Ue.forget(e),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.BUTTON,m.z.EventAction["FILE-CONVERT-FAILED"],m.z.EventLabel.CONVERT,""),this.logger.trace7({message:`Schedule ended: ${t}`,data:{fileUploadId:e}})}_tagEnforcementError(e){e&&(e.isEnforcementError=!0,e.enforcementData=e.response,this.enforcementErrorService.show(_.E.extractDetails(e)))}static toScheduleFailure(e){return{status:e?.status,name:e?.name,response:e?.response,retryAfter:"number"==typeof e?.retryAfterSeconds?e.retryAfterSeconds:null}}static wait(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}static metadataListForWire(e){let t=e.metadataList||[],r=e.options?.composition;return r&&"object"==typeof r&&t.length>1?[t[0]]:t}_buildFormData(e){let t=new FormData;return e.originalInputFiles&&t.append("originalInputFiles",JSON.stringify(e.originalInputFiles)),t.append("id",e.id),t.append("processType",e.processType),t.append("fromType",e.fromType.toString()),t.append("toType",e.toType),t.append("wsId",this.wsService.getId()),t.append("wsDomain",this.wsService.getDomain()),t.append("email",e.settings.email),t.append("featurePage",e.pageData?.path||""),(e.preferredEdgeDomains||[]).forEach(e=>{e&&t.append("preferredEdgeDomains",e)}),e.metadataList.map(e=>e.processorMetadataList[0]).forEach(e=>{t.append("fileUploadedServerEndpointList",S.N.getUploadedFileDownloadEndpointForServer(e))}),t.append("metadataList",JSON.stringify(D.metadataListForWire(e))),t.append("options",JSON.stringify(e.options)),t.append("optionsSnapshot",JSON.stringify(e.optionsSnapshot)),t}_processFile(e,t){let r=S.N.getProcessorEndpoint(t),n=new FormData;
51return e.file&&!f.e.isUploadedFile(e)?e.file.forEach(e=>{n.append("files",e,e.name)}):e.originalInputFiles&&n.append("originalInputFiles",JSON.stringify(e.originalInputFiles)),n.append("id",e.id),n.append("processType",e.processType),n.append("fromType",e.fromType.toString()),n.append("toType",e.toType),n.append("wsId",this.wsService.getId()),n.append("wsDomain",this.wsService.getDomain()),n.append("email",e.settings.email),n.append("featurePage",e.pageData?.path||""),e.metadataList.map(e=>e.processorMetadataList[0]).forEach(e=>{n.append("fileUploadedServerEndpointList",S.N.getUploadedFileDownloadEndpointForServer(e))}),n.append("metadataList",JSON.stringify(e.metadataList)),n.append("options",JSON.stringify(e.options)),n.append("optionsSnapshot",JSON.stringify(e.optionsSnapshot)),this.http.request(r,"POST",n,{headers:this.helperService.getCommonHttpHeaders(),timeout:3e4}).response$.pipe((0,d.L)(this.retryConfigWithEnforcementBailout(2,1e3)),(0,h.M)(()=>{this.logger.trace7({message:"File process success: ",data:f.e.toLoggableObject(e)}),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.BUTTON,m.z.EventAction["FILE-CONVERT-END"],m.z.EventLabel.CONVERT,"")}),(0,p.W)(e=>(this.logger.error({message:`Error processing file: ${e.message}`,error:e}),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.BUTTON,m.z.EventAction["FILE-CONVERT-FAILED"],m.z.EventLabel.CONVERT,""),(0,o.$)(()=>e))))}async createZip(e){this.logger.trace7({message:"Creating zip file.",data:f.e.toLoggableObject(e)});let t=e.endpointData.processorMetadataList[0];return new Promise(async(r,n)=>{if(!t.processDomain)return void n(Error("File is not processed!"));let i=S.N.getZipEndpoint(t),o=new FormData,s=e.result;if((0,v.A)(s))try{s=JSON.parse(e.result)}catch(e){n(e);return}let a=s.zip,c=(0,y.A)(s.output);o.append("id",e.id),o.append("wsId",this.wsService.getId()),o.append("wsDomain",this.wsService.getDomain()),o.append("zipFile",a),e.workflowId?o.append("workflowUuid",e.workflowId):(c||[]).forEach(e=>{o.append("outputFiles",e)}),await (0,l._)(this.http.request(i,"POST",o,{headers:this.helperService.getCommonHttpHeaders()}).response$).then(t=>{this.logger.trace7({message:"Creating zip file success.",data:t}),r(e)}).catch(t=>{this.logger.error({message:"Error creating zip file.",data:f.e.toLoggableObject(e),error:t}),n(t)})})}async probeSourceForInfo(e){let t=w.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.processorMetadata.uploadDomain)+"/files/source/probe",r=new FormData;r.append("originalInputFiles",JSON.stringify(e.originalInputFiles)),r.append("probeDuration",String(e.probeDuration??1)),r.append("id",e.id),e.processType&&r.append("processType",e.processType),r.append("fromType",(0,y.A)(e.fromType).toString()),r.append("toType",e.toType),r.append("wsId",this.wsService.getId()),r.append("wsDomain",this.wsService.getDomain()),r.append("options",JSON.stringify(e.options??{})),r.append("log","false"),r.append("estimateOnly",String(!!e.estimateOnly)),this.logger.trace7({message:"Probing source for info.",data:{id:e.id,toType:e.toType,estimateOnly:!!e.estimateOnly}});try{let e=await (0,l._)(this.http.request(t,"POST",r,{headers:this.helperService.getCommonHttpHeaders(),timeout:18e4}).response$);return this.logger.trace7({message:"Success probing source for info.",data:e}),e?.body??e}catch(t){throw this.logger.error({message:"Error probing source for info.",data:{id:e.id},error:t}),t}}}D=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(O.jo)),(0,n.Qj)(1,(0,i.WQ)(P.V)),(0,n.Qj)(2,(0,i.WQ)(A.D)),(0,n.Qj)(3,(0,i.WQ)(E.k)),(0,n.Qj)(4,(0,i.WQ)(C.g1)),(0,n.Qj)(5,(0,i.WQ)(T.w)),(0,n.Qj)(6,(0,i.WQ)(w.ApiConfig)),(0,n.Qj)(7,(0,i.WQ)(I.h)),(0,n.Qj)(8,(0,i.WQ)(_.E)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===O.jo?Object:O.jo,void 0===P.V?Object:P.V,void 0===A.D?Object:A.D,void 0===E.k?Object:E.k,void 0===C.g1?Object:C.g1,void 0===T.w?Object:T.w,void 0===w.ApiConfig?Object:w.ApiConfig,void 0===I.h?Object:I.h,void 0===_.E?Object:_.E])],D)},67705:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(37876),i=r(14232);class o{static getColor(e){switch(e){case"primary":default:return"#007bff";case"secondary":return"#6c757d";case"success":return"#28a745";case"danger":return"#dc3545";case"warning":return"#ffc107";case"info":return"#17a2b8";case"light":return"#f8f9fa";
51case"dark":return"#343a40";case"white":return"#fff"}}}var s=r(55776),a=r(37956),l=r.n(a);let c={type:"success",confirmButtonText:"Ok",confirmButtonClass:"btn btn-primary me-2",cancelButtonText:"Dismiss",cancelButtonClass:"btn btn-secondary"};class u extends i.Component{static create(e){let t=e;s.A.createModal(u,t)}constructor(e){super(e),this.modalRef=(0,i.createRef)()}getOptionsFromProps(e){return Object.assign({},c,e)}getSvgIconForType(e){let t=2;switch(e){case"danger":return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:t,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});case"warning":return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:t,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})});case"info":return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:t,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})});default:return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:t,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}}getIconTextColorFromType(e){return e?`text-${e}`:"text-primary"}getMainIcon(e){let t=o.getColor(e),r={backgroundColor:`${t}33`,color:t};return(0,n.jsx)("div",{className:`${l()["alert-icon"]}`,style:r,children:this.getSvgIconForType(e)})}getOkButtonBgColorClassFromType(e){return"danger"===e?"btn-danger":"btn-primary"}dismissClose(){this.props.cancelButtonCallback&&this.props.cancelButtonCallback(),this.modalRef.current.unmount()}confirmClose(){this.props.confirmButtonCallback&&this.props.confirmButtonCallback(),this.modalRef.current.unmount()}render(){let e=this.getOptionsFromProps(this.props);return(0,n.jsxs)(s.A,{ref:this.modalRef,disableCloseButton:!0,modalClass:"alert-dialog fit",children:[(0,n.jsxs)("div",{"data-modalbody":!0,style:{textAlign:"center"},children:[this.getMainIcon(e.type),(0,n.jsx)("h2",{style:{margin:"0 0 12px",fontSize:"1.25rem",fontWeight:700,color:"#32325d"},children:this.props.title}),this.props.text&&(0,n.jsx)("p",{style:{margin:0,color:"#525f7f",lineHeight:1.5},children:this.props.text}),this.props.html&&(0,n.jsx)("p",{style:{margin:0,color:"#525f7f",lineHeight:1.5},dangerouslySetInnerHTML:{__html:this.props.html}})]}),(0,n.jsxs)("div",{"data-modalfooter":!0,children:[(0,n.jsx)("button",{onClick:()=>this.confirmClose(),className:`x-btn x-btn-sm x-btn-gray${this.getOkButtonBgColorClassFromType(e.type)}`,children:e.confirmButtonText||"Ok"},"confirmation-button"),e.showCancelButton&&(0,n.jsx)("button",{className:"x-btn x-btn-sm x-btn-gray btn-secondary ms-2",onClick:()=>this.dismissClose(),children:e.cancelButtonText||"Dismiss"})]})]})}}},67783:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(4527),i=r(98158),o=r(35072),s="Expected a function";function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError(s);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(a.Cache||o.A),r}a.Cache=o.A;let l=a;var c=500,u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,d=/\\(\\)?/g;let h=function(e){var t=l(e,function(e){return r.size===c&&r.clear(),e}),r=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(u,function(e,r,n,i){t.push(n?i.replace(d,"$1"):r||e)}),t});var p=r(11002);let f=function(e,t){return(0,n.A)(e)?e:(0,i.A)(e,t)?[e]:h((0,p.A)(e))}},67790:(e,t,r)=>{"use strict";r.d(t,{D0:()=>i,Rd:()=>n,VS:()=>c,lF:()=>u,mx:()=>l,xW:()=>s});let n=new TextEncoder,i=new TextDecoder,o=0x100000000;function s(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t}function a(e,t,r){if(t<0||t>=o)throw RangeError(`value must be >= 0 and <= ${o-1}. Received ${t}`);e.set([t>>>24,t>>>16,t>>>8,255&t],r)}function l(e){let t=Math.floor(e/o),r=e%o,n=new Uint8Array(8);return a(n,t,0),a(n,r,4),n}function c(e){let t=new Uint8Array(4);return a(t,e),t}function u(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n>127)throw TypeError("non-ASCII string encountered in encode()");t[r]=n}return t}},67846:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(54743),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===i?n.A.Buffer:void 0,a=s?s.allocUnsafe:void 0;let l=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}},67966:(e,t,r)=>{"use strict";r.d(t,{A:()=>
51o});var n=r(67783),i=r(28461);let o=function(e,t){t=(0,n.A)(t,e);for(var r=0,o=t.length;null!=e&&r<o;)e=e[(0,i.A)(t[r++])];return r&&r==o?e:void 0}},68246:(e,t,r)=>{"use strict";r.d(t,{m:()=>s});var n=r(4902),i=r(3649),o=r(1576),s=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=o.U);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return(0,n.C6)(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;!n&&(i.push(t),o||i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this,n=r._infiniteTimeWindow,i=r._buffer.slice(),o=0;o<i.length&&!e.closed;o+=n?1:2)e.next(i[o]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,l=1;l<n.length&&n[l]<=s;l+=2)a=l;a&&n.splice(0,a+1)}},t}(i.B)},68329:(e,t,r)=>{var n=r(50224),i="__lodash_hash_undefined__";e.exports=function(e,t){var r=this.__data__;return this.size+=+!this.has(e),r[e]=n&&void 0===t?i:t,this}},68373:e=>{var t=0x1fffffffffffff,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var i=typeof e;return!!(n=null==n?t:n)&&("number"==i||"symbol"!=i&&r.test(e))&&e>-1&&e%1==0&&e<n}},68434:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(14364),i=1/0,o=17976931348623157e292;let s=function(e){return e?(e=(0,n.A)(e))===i||e===-i?(e<0?-1:1)*o:e==e?e:0:0===e?e:0},a=function(e){var t=s(e),r=t%1;return t==t?r?t-r:t:0}},68459:(e,t,r)=>{"use strict";function n(e){return Object.keys(e).filter(t=>void 0!==e[t]).sort()}function i(e){if(null==e)return"null";if(Array.isArray(e))return`[${e.map(i).join(",")}]`;if("object"==typeof e){let t=n(e).map(t=>`${JSON.stringify(t)}:${i(e[t])}`).join(",");return`{${t}}`}return"number"==typeof e?Number.isFinite(e)?JSON.stringify(e):"null":JSON.stringify(e)}function o(e){return i(e)}r.d(t,{kL:()=>p,g3:()=>c,cw:()=>u,DM:()=>l,vV:()=>f,jN:()=>d,X_:()=>F,Qh:()=>I,sQ:()=>E,j_:()=>T,dZ:()=>C,Cf:()=>w,CC:()=>_,ny:()=>A,vM:()=>ee,j6:()=>el,kn:()=>Z,Bz:()=>ea,pz:()=>es,aG:()=>N,Jr:()=>S,BV:()=>ei,cU:()=>O,et:()=>k,XC:()=>M,ow:()=>j,xe:()=>D,BW:()=>J,Xv:()=>eu,jP:()=>R,Ld:()=>b,u5:()=>L});let s=1,a="studio/1",l=500,c=6e4,u=2e3,d=63,h=1e6,p=.01,f=.05,g=0x7fffffff,m=-0x80000000;function v(e){let t=e.tracks.find(e=>"VISUAL"===e.kind);if(!t)throw Error("a v1 composition has exactly one VISUAL track");return t}function y(e){return e.tracks.find(e=>"AUDIO"===e.kind)??null}function b(e){return v(e).clips}function S(e){let t=y(e);return t&&t.clips.length>0?t.clips[0]:null}function E(e){return{mode:e.audio?.mode??"KEEP",volume:e.audio?.volume??1}}function w(e){return e&&"NONE"!==e.type?e.durationMs??0:0}function _(e,t){return t<=0?{type:"NONE",durationMs:0}:b(e)[t]?.transitionIn??e.transition}function A(e,t){return null!=e.trimEndMs?e.trimEndMs:null!=t?t:void 0}function T(e,t){if("PHOTO"===e.kind)return e.holdMs;let r=A(e,t);return null==r?0:r-(e.trimStartMs??0)}function O(e){return null==e||!Number.isFinite(e)||e<=0?null:Math.max(1,Math.floor(e))}function C(e){return null==e||!Number.isFinite(e)||e<=0?l:Math.min(l,Math.max(1,Math.floor(e)))}function I(e,t){if(null==t||!Number.isFinite(t)||t<=0)return e;let r=Math.max(1,Math.floor(t));if(e.trimEndMs<=r)return e;let n=C(r),i=Math.min(e.trimStartMs,Math.max(0,r-n));return{...e,trimStartMs:i,trimEndMs:r}}function P(e){return e>g?g:e<m?m:e}function x(e,t){if("PHOTO"===e.kind)return!1;let r=t?t[e.input]:void 0;return"KEEP"===E(e).mode&&(r?.hasAudio??!0)}
51function k(e,t){let r=b(e),n=[],i=0,o=0;return r.forEach((r,s)=>{o+=w(_(e,s));let a=T(r,t?.[r.input]?.durationMs);n.push({index:s,input:r.input,startMs:P(i-o),durationMs:a,hasAudio:x(r,t)}),i+=a}),{clips:n,totalMs:P(i-o),transitionMs:w(e.transition)}}function M(e,t){return k(J(e,t),t)}function D(e,t){let r=e.map(e=>"PHOTO"===e.kind||null!=A(e,t?.[e.input]?.durationMs)?T(e,t?.[e.input]?.durationMs):null).filter(e=>null!=e);return 0===r.length?0:r.reduce((e,t)=>Math.min(e,t),1/0)}function R(e){return Math.max(0,Math.min(u,Math.trunc((e-d)/2)))}function F(e,t){return Math.max(0,Math.min(Math.trunc(e),R(t)))}function N(e){return Math.max(l,2*Math.max(0,Math.trunc(e))+d)}function L(e){if(e.clips.length<2)return e;let t=R(D(e.clips)),r=Math.min(w(e.transition),t),n=r!==e.transition.durationMs&&"NONE"!==e.transition.type,i=e.clips.map(e=>{let r=e.transitionIn;if(!r||"NONE"===r.type)return e;let i=r.durationMs??0,o=Math.min(i,t);return o===i?e:(n=!0,{...e,transitionIn:{...r,durationMs:o}})});return n?{...e,transition:"NONE"===e.transition.type?e.transition:{...e.transition,durationMs:r},clips:i}:e}let j=e=>Math.round(1e6*e)/1e6;function U(e){let t={};for(let r of Object.keys(e)){let n=e[r];void 0!==n&&(t[r]=n)}return t}function $(e){return{x:j(e.x),y:j(e.y),w:j(e.w),h:j(e.h)}}function B(e,t){if(e.crop&&(e.fit??t)==="COVER"&&(!(e.crop.w>=1-1e-6)||!(e.crop.h>=1-1e-6)))return $(e.crop)}let W={type:"NONE",durationMs:500};function z(e){let t="NONE"!==e.type&&e.durationMs?Math.round(e.durationMs):void 0;return U({type:e.type,durationMs:t})}function H(e){return e?z(e):void 0}function G(e,t,r){return U({input:e.input,kind:"PHOTO",holdMs:Math.round(e.holdMs),motion:e.motion&&"NONE"!==e.motion?e.motion:void 0,fit:e.fit,rotate:e.rotate?e.rotate:void 0,flipH:!!e.flipH||void 0,flipV:!!e.flipV||void 0,crop:B(e,r),transitionIn:0===t?void 0:H(e.transitionIn)})}function V(e,t,r){let n=Math.floor(e.trimEndMs),i=Math.floor(e.trimStartMs);return{trimStartMs:e.trimEndMs-e.trimStartMs>=l?Math.min(i,Math.max(0,n-l)):i,trimEndMs:Q(r)&&q(n,t,r?.durationMs)?void 0:n}}function Q(e){return e?.animated!==!0}function q(e,t,r){if(null==r||!(r>0))return!1;let n=1e3/Math.max(1,t),i=Math.floor(r);return e>=i-n&&e<=i+n}function K(e,t,r,n,i){let o=e.audio?E(e):null,s=null!==o&&("KEEP"!==o.mode||1!==o.volume),a=V(e,n,i);return U({input:e.input,kind:"VIDEO",trimStartMs:a.trimStartMs,trimEndMs:a.trimEndMs,audio:s?U({mode:o.mode,volume:1===o.volume?void 0:o.volume}):void 0,fit:e.fit,rotate:e.rotate?e.rotate:void 0,flipH:!!e.flipH||void 0,flipV:!!e.flipV||void 0,crop:B(e,r),transitionIn:0===t?void 0:H(e.transitionIn)})}function X(e){return U({input:e.input,kind:"AUDIO",atMs:e.atMs?Math.round(e.atMs):void 0,trimStartMs:e.trimStartMs?Math.floor(e.trimStartMs):void 0,trimEndMs:e.toEnd?void 0:Math.floor(e.trimEndMs),volume:(e.volume??1)===1?void 0:e.volume,fadeInMs:e.fadeInMs?Math.round(e.fadeInMs):void 0,fadeOutMs:e.fadeOutMs?Math.round(e.fadeOutMs):void 0,duck:!!e.duck||void 0})}function J(e,t){let r=e.frame.fit,n=[{kind:"VISUAL",layout:"SEQUENTIAL",clips:e.clips.map((n,i)=>"PHOTO"===n.kind?G(n,i,r):K(n,i,r,e.frame.fps,t?.[n.input]))}];return e.music&&n.push({kind:"AUDIO",layout:"POSITIONED",clips:[X(e.music)]}),{version:s,projectId:e.projectId,revision:e.revision,createdWith:a,frame:{width:e.frame.width,height:e.frame.height,fps:e.frame.fps,fit:e.frame.fit,backgroundColor:e.frame.backgroundColor},transition:z(e.transition??W),tracks:n}}function Y(e){let t={...e};return e.crop&&(t.crop={...e.crop}),e.transitionIn&&(t.transitionIn={...e.transitionIn}),"VIDEO"===e.kind&&e.audio&&(t.audio={...e.audio}),t}function Z(e){let t=S(e);return{projectId:e.projectId,revision:e.revision,frame:{...e.frame},transition:{type:e.transition.type,durationMs:w(e.transition)},clips:b(e).map(Y),music:t?{...t}:null}}function ee(e,t){return{projectId:e,revision:1,frame:{...t},transition:{...W},clips:[],music:null}}let et=/^[A-Za-z0-9_-]{1,64}$/,er=12,en="abcdefghijkmnpqrstuvwxyz23456789";function ei(){let e=[],t=en.length,r=eo(er);if(r)for(let n=0;n<er;n+=1)e.push(en[r[n]%t]);else for(let r=0;r<er;r+=1)e.push(en[Math.floor(Math.random()*t)]);return e.join("")}function eo(e){let t="u"<typeof globalThis?void 0:globalThis.crypto;if(!t||"function"!=typeof t.getRandomValues)return null;try{return t.getRandomValues(new Uint8Array(e))}catch{return null}}function es(e){return"string"==typeof e&&et.test(e)&&!ea(e)}function ea(e){return"INDEX"===e||e.startsWith("LATEST-")}function el(e,t,r){return o({composition:J({...e,revision:1}),inputs:[...t],options:r})}function ec(e,t,r){return r?r.signature===t?r.revision:Math.min(h,Math.max(e.revision,r.revision)+1):e.revision}function eu(e,t,r,n){let i=el(e,t,r),o=ec(e,i,n);return{document:o===e.revision?e:{...e,revision:o},submission:{signature:i,revision:o}}}},68479:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});
51var n=r(82509),i=r(78304),o=r(70907),s=r(68434),a=r(89216),l=Math.max;let c=function(e,t,r,c){e=(0,i.A)(e)?e:(0,a.A)(e),r=r&&!c?(0,s.A)(r):0;var u=e.length;return r<0&&(r=l(u+r,0)),(0,o.A)(e)?r<=u&&e.indexOf(t,r)>-1:!!u&&(0,n.A)(e,t,r)>-1}},69014:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(92430),i=r(89034),o=r(78304);let s=function(e){return(0,o.A)(e)?(0,n.A)(e):(0,i.A)(e)}},69071:(e,t,r)=>{"use strict";var n=r(93570),i=r(7249),o=r(9282),s=r(63536);function a(e){if(!i.enabled)throw Error("Transport created when disabled");s.call(this,e,"/htmlfile",i,o)}n(a,s),a.enabled=function(e){return i.enabled&&e.sameOrigin},a.transportName="htmlfile",a.roundTrips=2,e.exports=a},69319:(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var n=r(4902),i=r(43604),o=r(3649);class s{get event$(){return this.subject.asObservable()}show(e){this.subject.next(e)}static isEnforcementError(e){if(!e||"object"!=typeof e)return!1;let t=e.status;if(429===t||402===t){let t=e.response;return s.bodyLooksLikeEnforcement(t)}return!1}static bodyLooksLikeEnforcement(e){if(!e||"object"!=typeof e)return!1;let t=e;return"enforcement_error"===t.dataType||"insufficient_credits"===t.code}static extractDetails(e){let t=429,r={};if(e&&"object"==typeof e){t=e.status??429;let n=e.response;n&&"object"==typeof n?r=n:"string"==typeof n?r=s.safeJsonParse(n):e.response||"string"!=typeof e.message||(r=s.safeJsonParse(e.message))}return s.fromBody(r,t)}static fromBody(e,t=429){let r=e.reason||("insufficient_credits"===e.code?"insufficient_credits":void 0),n=e.title||s.titleFromReason(r,t),i=e.userMessage||e.detail||s.fallbackMessage(r,e),o=e.upgradeRequired??402===t;return{httpStatus:t,reason:r,title:n,userMessage:i,currentValue:e.currentValue,limitValue:e.limitValue,currentTier:e.currentTier,upgradeRequired:o,subscribeUrl:e.subscribeUrl,topupUrl:e.topupUrl,matchedPattern:e.matchedPattern}}static titleFromReason(e,t){if(402===t)return"Insufficient credits";switch(e){case"daily_limit":case"primary_daily_limit":return"Daily conversion limit reached";case"daily_cpu_limit":return"Daily processing-time limit reached";case"concurrent_limit":case"session_concurrent_limit":return"Concurrent conversion limit reached";case"ip_family_daily_limit":return"Network daily limit reached";case"ip_family_concurrent_limit":return"Network concurrent limit reached";case"no_active_subscription":return"No active API subscription";case"insufficient_balance":return"Insufficient credit balance";default:return"You've hit a limit"}}static fallbackMessage(e,t){return null!=t.currentValue&&null!=t.limitValue?`Used ${t.currentValue} of ${t.limitValue}. Try again later or upgrade your plan.`:"no_active_subscription"===e?"Your API subscription is not active. Subscribe to use the API.":"Your request was rejected by usage limits. Try again later or upgrade your plan."}static safeJsonParse(e){try{return JSON.parse(e)}catch{return{}}}constructor(){this.subject=new o.B}}s=(0,n.Cg)([(0,i._G)()],s)},69455:e=>{e.exports=function(e){return this.__data__.has(e)}},69537:(e,t,r)=>{"use strict";var n=r(93570),i=r(63536),o=r(84123),s=r(1878),a=r(3882);function l(e){if(!l.enabled())throw Error("Transport created when disabled");i.call(this,e,"/eventsource",o,s)}n(l,i),l.enabled=function(){return!!a},l.transportName="eventsource",l.roundTrips=2,e.exports=l},69750:(e,t,r)=>{var n=r(56751),i=r(29934),o=r(27136);e.exports=function(e){return o(e)?n(e):i(e)}},69870:(e,t,r)=>{"use strict";r.d(t,{EX:()=>s,Gm:()=>u,In:()=>i,ON:()=>d,Vf:()=>o,f9:()=>n,q0:()=>h});let n=["HEIC","HEIF","JFIF","JPEG","PNG","TIF","TIFF","WEBP","JPG","AVIF","BMP","EPS","GIF","ICO","PPM","PSD","3FR","ARW","CR2","CR3","CRW","DCR","DNG","ERF","MOS","MRW","NEF","ORF","PEF","RAF","RW2","X3F","XCF"],i=["AAC","AC3","AIF","AIFF","AIFC","AMR","AU","DSS","FLAC","M4A","M4B","MP3","OGA","OGG","OPUS","WAV","WEBA","WMA","VOC"],o=["3G2","3GP","ASF","AV1","AVCHD","AVI","DIVX","F4V","FLV","HEVC","M2TS","M2V","M4V","MJPEG","MKV","MOV","MP4","MPEG","MPEG2","MPG","MTS","MXF","OGV","RM","RMVB","SWF","TS","VOB","WEBM","WMV","WTV","XVID","3GPP","CAF","CAVS","DV","DVR"],s=["7Z","RAR","TAR","TAR.GZ","TAR.XZ","TAR.BZ2","TGZ","TB2","TZ2","ZIP"],a=["PPT","PPTX"],l=["PDF"],c=[...a,"XLS","XLT","XLM","XLSX","XLSM","XLTX","XLTM","DOC","DOT","WBK","DOCX","DOCM","DOTX","DOTM","DOCB"],u=new Set([...n,...i,...o,...s,"PDF","DOC","DOCX","PS","EPUB","MOBI",...a,"SVG","PS",...c]),d=new Set([...n,...l,...o]),h=new Set(["ADE","ADP","APK","APPX","APPXBUNDLE","BAT","CAB","CHM","CMD","COM","CPL","DIAGCAB","DIAGCFG","DIAGPACK","DLL","DMG","EX","EX_","EXE","HTA","IMG","INS","ISO","ISP","JAR","JNLP","JS","JSE","LIB","LNK","MDE","MSC","MSI","MSIX","MSIXBUNDLE","MSP","MST","NSH","PIF","PS1","SCR","SCT","SHB","SYS","VB","VBE","VBS","VHD","VXD","WSC","WSF","WSH","XLL","BAK","BCK","BKP","CFG","CONF","CONFIG","INI","LOG","OLD","SAV","SAVE","TEMP","TMP","BIN","CGI","SHTM","SHTML","STM","CER","CRT","DER","KEY","P12","P7B","P7C","PEM","PFX","DAT","EML","HTR","HTW","IDA","IDC","IDQ","NWS","POL","PRINTER","REG","WMZ"])},70087:e=>{"use strict";e.exports={isObject:function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},extend:function(e){if(!this.isObject(e))return e;for(var t,r,n=1,i=arguments.length;n<i;n++)for(r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}}},70907:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(21710),i=r(4527),o=r(75438),s="[object String]";let a=function(e){return"string"==typeof e||!(0,i.A)(e)&&(0,o.A)(e)&&(0,n.A)(e)==s}},71266:(e,t,r)=>{var n=r(33872),i=r(28654);function o(e,t,r,s,a){return e===t||(null!=e&&null!=t&&(i(e)||i(t))?n(e,t,r,s,o,a):e!=e&&t!=t)}e.exports=o},71463:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ej});var n=r(4902),i=r(37876);r(16791),r(10793);var o=r(4361),s=r.n(o),a=r(77328),l=r.n(a),c=r(14232),u=r(33441),d=r(32128),h=r(44555),p=r(30591),f=r(92384),g=r(18847),m=r.n(g),v=r(18112);let y=(0,c.createContext)({container:v.k});class b extends c.Component{constructor(e){super(e)}render(){return(0,i.jsx)(y.Provider,{value:{container:this.props.container},children:this.props.children})}}var S=r(66555),E=r(64688),w=r(45878);let _=.1,A=!1;function T(e=Math.random(),t=_){return e<t}function O(e,t){let r=e.name,n="CLS"===r?Math.round(1e3*(e.value||0)):Math.round(e.value||0);return{metric:r,value:n,rating:e.rating||"unknown",page:t,navType:e.navigationType||"unknown"}}let C=()=>r.e(788).then(r.bind(r,70788));function I(e=T(),t=C){if(A||(A=!0,!e))return;let r=window.location.pathname,n=e=>{try{(0,w.emitMetric)(E.O.WEB_VITALS,O(e,r))}catch{}};t().then(({onCLS:e,onINP:t,onLCP:r,onTTFB:i})=>{r(n,{reportAllChanges:!1}),t(n,{reportAllChanges:!1}),e(n,{reportAllChanges:!1}),i(n,{reportAllChanges:!1})}).catch(()=>{})}var P=r(9711),x=r(17214),k=r(9968),M=r(79794),D=r(2807),R=r(63948),F=r(29404),N=r(77066),L=r(79347),j=r(24916),U=r(29238),$=r(16579),B=r(9120),W=r(990),z=r(44492),H=r(8323),G=r(40001),V=r(49955),Q=r(61791),q=r(90997),K=r(31962),X=r(8365),J=r(12533);let Y=P.V.getLogger("SessionBootstrap"),Z=!1,ee=!1;function et(){return"u">typeof document&&document.cookie.split("; ").some(e=>e.startsWith("rt_present="))}function er(){Z||X.C.hasWindow()&&(Z=!0,L.jo.registerRefreshProvi
51der(H.k.get(G.f)),L.jo.registerStepUpProvider(H.k.get(q.L)),L.jo.setRefreshEnabled(!0),H.k.get(Q.B).init())}function en(){if(ee||!X.C.hasWindow())return;ee=!0;let e=H.k.get(V.W);H.k.get(U.H).onSessionState.subscribe(t=>{if(t===U.Y.LOGGED_IN&&et())er(),e.start();else if(t===U.Y.ANONYMOUS)try{e.stop()}catch{}})}function ei(){let e=H.k.get(U.H);if(!X.C.hasWindow())return e.login(null,null,null);en();let t=H.k.get(K.u).getToken(),r=et(),n=t=>t.pipe((0,W.Z)(()=>e.login(null,null,null)),(0,z.W)(e=>{let t=e&&e.status||0;return 401===t||403===t||e instanceof L.LK?(0,$.$)(()=>e):(Y.info({message:"Startup bootstrap exchange failed (transient); staying anon-capable",error:e}),(0,B.of)({error:!0,registered:!1}))}));return r?(er(),n(!t||(0,J.FJ)(t)||(0,J.hC)(t)?H.k.get(G.f).refresh().pipe((0,z.W)(e=>(Y.info({message:"Startup refresh failed; continuing boot",error:e}),(0,B.of)(null)))):(0,B.of)(null))):n((0,B.of)(null))}let eo="Downloading your finished files still works; only a ZIP needs this.";function es(e,t){e.uiContext.noticeWithAction(t.name,`${t.message} ${eo}`,"Retry",t=>{t.unmount(),e.loginService.retryIdentityOnce().subscribe({error:t=>{t instanceof L.LK&&es(e,t)}})})}var ea=r(37413),el=r(93214),ec=r(9123),eu=r(90125),ed=r(33353),eh=r(71605),ep=r(92288),ef=r(25435),eg=r(22902),em=r(6266),ev=r(51352),ey=r(61028),eb=r(18291),eS=r(89365),eE=r(23806),ew=r(5518),e_=r(95243),eA=r(52267),eT=r(9298),eO=r(82803);let eC="other";function eI(e){if("string"!=typeof e||!e)return eC;let t=e.split(/[?#]/)[0].toLowerCase().replace(/\/+$/,"");return""===t||"/"===t?"home":t.startsWith("/product")?"product":t.startsWith("/portal")?"portal":t.startsWith("/docs")?"docs":t.startsWith("/blog")?"blog":t.startsWith("/downloads")?"downloads":"/privacy-policy"===t||"/terms-of-service"===t?"legal":t.startsWith("/convert-")?"converter":t.startsWith("/compress")?"compress":/-editor$/.test(t)||t.startsWith("/edit-")?"editor":/-converter$/.test(t)?"hub":eC}let eP=[['[class*="upgrade-offer"]',"ad_offer"],["footer","footer"],["header, nav","header"],['[class*="related"], [class*="next-tool"]',"related"],['article, main, [class*="markdown"]',"content"]];function ex(e){if(!e||"function"!=typeof e.closest)return eC;for(let[t,r]of eP)try{if(e.closest(t))return r}catch{}return eC}function ek(e,t){let r;if(!e)return null;let n=e.getAttribute("href");if(!n||null!==e.getAttribute("download"))return null;if(n.startsWith("/"))r=n;else if(!/^https?:\/\//i.test(n))return null;else try{let e=new URL(n);if(e.host!==t)return null;r=e.pathname+e.search}catch{return null}return{dest:eI(r),location:ex(e)}}var eM=r(88766);m()(()=>Promise.all([r.e(516),r.e(858)]).then(r.bind(r,70858)).then(e=>({default:e.FooterComponent})),{loadableGenerated:{webpack:()=>[70858]}}),m()(()=>Promise.all([r.e(516),r.e(8230),r.e(5483),r.e(1928)]).then(r.bind(r,36427)),{loadableGenerated:{webpack:()=>[36427]}}),m()(()=>Promise.resolve().then(r.bind(r,94962)),{loadableGenerated:{webpack:()=>[94962]}});let eD=m()(()=>Promise.all([r.e(5843),r.e(440)]).then(r.bind(r,30440)).then(e=>({default:e.EnforcementErrorModal})),{loadableGenerated:{webpack:()=>[30440]},ssr:!1}),eR=m()(()=>Promise.all([r.e(6863),r.e(516),r.e(5753),r.e(7306)]).then(r.bind(r,57306)),{loadableGenerated:{webpack:()=>[57306]}}),eF=m()(()=>Promise.all([r.e(5311),r.e(8888)]).then(r.bind(r,28888)),{loadableGenerated:{webpack:()=>[28888]}}),eN=m()(()=>Promise.all([r.e(3110),r.e(755)]).then(r.bind(r,40755)).then(e=>({default:e.DownloadsCenter})),{loadableGenerated:{webpack:()=>[40755]}}),eL=m()(()=>Promise.all([r.e(3101),r.e(3560)]).then(r.bind(r,93560)).then(e=>({default:e.AnchorMotiveComponent})),{loadableGenerated:{webpack:()=>[93560]},ssr:!1});class ej extends s(){get isIOS(){return X.C.isIOS()}get isAndroid(){return X.C.isAndroid()}constructor(e){if(super(e),this.props=e,this.logger=P.V.getLogger("MyApp"),this.fileInputRef=(0,c.createRef)(),this.downloadableFileCount=0,this.version=1.023,this.local_version=0,this.remote_version=0,this.shouldReload=!1,this.performedVersionCheckAndAutoLogin=!1,this.extensionInstalled=!1,this.helpMaximized=!1,this.currentUrl=null,this.state={fileSelectBtnClicked:!1},this.environmentService.loadEnvironmentFromCLIData(e),this.logService.initialize(),404===e.pageProps.statusCode)return;this.routeProps=(0,ef.o)(e),this.motivesService.initialMotives=(0,eg.A)(this.routeProps,"settings.motive"),this.settingsService.initializeFromProps(this.routeProps),this.init();const t=Date.now();this.windowService.onFileSelectBtnClicked.pipe((0,u.p)(e=>e.dispatchedAt.getTime()>t)).subscribe({next:()=>{this.state.fileSelectBtnClicked||this.setState({fileSelectBtnClicked:!0})}})}componentDidMount(){if(this.userTraceService.trace("App component mounted"),X.C.hasWindow())try{let e=window.location.hostname||"";if(e.startsWith("qa.")||e.includes("qa.xconvert")){let e=new URLSearchParams(window.location.search).get("adDebug");"1"===e?window.localStorage.setItem("xc_ad_debug","1"):"0"===e&&window.localStorage.removeItem("xc_ad_debug"),"1"===window.localStorage.getItem("xc_ad_debug")&&document.documentElement.setAttribute("data-xc-ad-debug","1")}}catch{}if(X.C.hasWindow()&&(0,eM.GE)(),X.C.hasWindow()){let e=v.k.get(S.Z);window.addEventListener("pagehide",()=>e.flushOnUnload()),window.addEventListener("beforeunload",()=>e.flushOnUnload()),I(),document.addEventListener("click",t=>{try{let r=t.target,n=r&&"function"==typeof r.closest?r.closest("a"):null,i=ek(n,window.location.host);i&&e.emit(E.O.INTERNAL_LINK_CLICK,i)}catch{}},{capture:!0,passive:!0})}this.webSocketService.initWS(),X.C.hasWindow()&&eS.u.runWhenIdeal(()=>{r.e(522).then(r.bind(r,40522)).then(({default:e})=>{e.init("qpfzjffr8a");let t=this.webSocketService.getOrCreateStoredWSId();e.identify(t)}
51).catch(console.error)});let e=null;if(eE.v.onStatusChange(t=>{this.uiContext&&(t?(e&&(clearTimeout(e),e=null),this.uiContext.successToast("Back Online","Your connection has been restored.")):e=setTimeout(()=>{this.uiContext.warnToast("Connection Lost","You appear to be offline.",!1,!1)},5e3))}),X.C.hasWindow()){let e=Date.now(),t=3e4;document.addEventListener("visibilitychange",()=>{"visible"!==document.visibilityState||Date.now()-e<t||(e=Date.now(),this.loginService.login(null,null,null).subscribe({error:e=>{this.logger.info({message:"Background session revalidate failed",error:e})}}))})}}componentDidUpdate(){}init(){let{Component:e,pageProps:t}=this.props;if(404===this.props.pageProps.statusCode)return;if(!t.url)return void console.error("Page loaded without a url",t);this.sitename=this.environmentService.env.sitename,this.siteDisplayName=this.environmentService.env.siteDisplayName,this.motivesService.onEffectiveMotiveSettingsChange.subscribe(e=>{this.showExtension=(0,em.A)((0,eg.A)(X.C.getBrowserInfo(),"name"),"chrome")&&!X.C.isMobile()&&e&&e.showExtensionDownloadDialog,this.effectiveMotives=e},e=>this.logger.error(e)),this.loginService.onUserDetailsChanged.subscribe(e=>{this.handleAccountDetails(e)}),X.C.hasWindow()&&this.windowService.initialize().subscribe();let r=this.props.path,n=null;try{n=r.match(/[\-0-9a-zA-Z]+/)[0]}catch(e){}eS.u.runWhenIdeal(()=>{this.fileUploadService.initialize()}),eS.u.runWhenIdeal(()=>{this.fileUploadRecoveryService.initialize()}),eS.u.runWhenIdeal(()=>{F.transferTray.sweepExpired().catch(()=>{})}),X.C.hasWindow()&&(this.setUpLoginService(),this.setUpPreferredDomains(),this.setUpSettingsService(),this.setUpGoogleAnalytics()),eS.u.runWhenIdeal(()=>{this.motivesService.initialize()}),X.C.hasWindow()&&this.scriptLoadService.loadBootstrapJS().catch(console.log),eS.u.runWhenIdeal(()=>{this.windowService.userClicked.pipe((0,d.s)(1)).subscribe(()=>{this.scriptLoadService.loadImageProcessingLibs().catch(console.log)})}),this.domStorage.setAppComponentReadyAndFreezeContentIfNeeded()}handleAccountDetails(e){e&&(this.canShowMotives=this.windowService&&this.windowService.mousedowned&&this.motivesService.motiveReady&&this.settingsService.motivesEnabled&&!e.isPaidUser()),this.canGoOffline=this.loginService.canGoOffline}setUpSettingsService(){this.settingsService.initialize().pipe((0,h.L)({count:2,delay:1e3})).subscribe({next:()=>{},error:e=>{this.logger.error(e)}})}setUpPreferredDomains(){this.connectivityService.initialize$().subscribe({error:e=>{this.logger.error({message:"Failed to initialize preferred domains",error:e})}})}setUpLoginService(e=null){this.initializeWSService$(),ei().subscribe({next:()=>{e&&(this.spinnerService.hide(e),e=null,this.uiContext.successToast("Successfully initialized services!"))},error:t=>{e&&(this.spinnerService.hide(e),e=null);let r=ev.MZ.is(t)?t.status:0;if(401===r||403===r){this.loginService.clearLocalSession(),this.uiContext.showErrorDialog({title:"Session expired",text:"Your session has expired. Please log in again to continue."}),this.logger.info({message:"Auto-login rejected",data:{status:r}});return}if(t instanceof L.LK){es({uiContext:this.uiContext,loginService:this.loginService},t),this.logger.info({message:"Anonymous sign-in gave up on 429; notice shown",error:t});return}ev.Dr.is(t)&&(t.message="Unable to initialize services. Please connect and reload the page again!"),this.uiContext.handleError(t,{confirmButtonText:"Retry",confirmButtonCallback:async()=>{this.setUpLoginService(await this.spinnerService.show("Retrying..."))}}),this.logger.error(t)}})}initializeWSService$(e=[]){this.webSocketService.reinitialize(e).then(()=>{this.webSocketService.initialize()}).catch(e=>{console.error("Failed to initialize WebSocket service",e)})}setUpVersionCheck(){let e=!1,t=()=>{this.windowService.userClicked.subscribe({next:()=>{this.lightHttp.get(this.apiConfig.getVersionCheckEndpoint()).pipe((0,p.l)(e=>e.pipe((0,f.c)(1e3),(0,d.s)(2)))).subscribe({next:t=>{this.remote_version=t.web_version,e||(this.logger.trace1({message:`HTML version: ${this.local_version}, JS version: ${this.version} and Remote version: ${this.remote_version}`}),e=!0)},error:e=>{this.logger.trace7({message:"Unable to get the web version",data:e})}})}})},r=setInterval(t,2e4);setTimeout(()=>{clearInterval(r),r=setInterval(t,12e5)},2e4)}setUpGoogleAnalytics(){if(X.C.hasWindow()){let e=this.ga;try{e=window&&window.ga}catch(e){this.logger.error(e)}e&&e("set","page",this.currentUrl)}}getComponent(e){if(!e||!e.url)return ew.default;let t=ey.R.pathTextOnly(e.url);X.C.hasWindow()&&ey.R.pathTextOnly(window.location.pathname),this.loadRouteSpecificScripts(t)}loadRouteSpecificScripts(e){if(X.C.hasWindow()&&e.endsWith("downloads")){try{this.scriptLoadService.loadGoogleDriveSave()}catch(e){console.error(e)}try{this.scriptLoadService.loadDropbox()}catch(e){console.error(e)}}}getTitle(e){let t=(e.seoHeaderTagsJson||[]).find(e=>"title"==e.elementType);return t&&t.innerText&&t.innerText.trim()||"XConvert.com"}getCustomHeaders(e){return e.seoHeaderTagsJson?(0,i.jsxs)(c.Fragment,{children:[e.seoHeaderTagsJson.map((e,t)=>{let r=e.elementAttributes||{};return r.content&&(r.content=eb.$.removeNewLineAndMultipleContigeousWhiteSpaces(r.content)),(0,c.createElement)(e.elementType,{key:`header-tag-${t}`,...r},eb.$.removeNewLineAndMultipleContigeousWhiteSpaces(e.innerText)||void 0)}),(e?.path?.match(/product/i)||e?.path?.match(/portal/i))&&(0,i.jsx)(c.Fragment,{})]}):(0,i.jsx)("link",{href:"https://www.google.com"})}render(){let{Component:e,pageProps:t}=this.props;return 404===this.props.pageProps.statusCode?(0,i.jsx)(e,{...t}):(this.routeProps=(0,ef.o)(this.props),this.getComponent(this.routeProps),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(l(),{children:[(0,i.jsx)("meta",{name:"viewport",content:"width=device-width,initial-scale=1"}),"downloads"===t.path&&(0,i.jsx)("meta",{name:"robots",content:"noindex"}),this.getCustomHeaders(t)]}),(0,i.jsx)(b,{container:v.k,children:(0,i.jsxs)(c.Fragment,{children:[t.url&&(0,i.jsx)(eR,{toolsDropdownData:t.toolsDropdownData}),(0,i.jsx)(e,{...t}),(0,i.jsx)(eN,{}),(0,i.jsx)(eD,{}),(0,i.jsx)(eF,{}),(0,i.jsx)(eL,{}),!1]})})]}))}}(0,n.Cg)([(0,v.g)(j.Kc),(0,n.Sn)("design:type",void 0===j.Kc?Object:j.Kc)],ej.prototype,"logService",void 0),(0,n.Cg)([(0,v.g)(U.H),(0,n.Sn)("design:type",void 0===U.H?Object:U.H)],ej.prototype,"loginService",void 0),(0,n.Cg)([(0,v.g)(D.v),(0,n.Sn)("design:type",void 0===D.v?Object:D.v)],ej.prototype,"environmentService",void 0),(0,n.Cg)([(0,v.g)(ep.s),(0,n.Sn)("design:type",void 0===ep.s?Object:ep.s)],ej.prototype,"windowService",void 0),(0,n.Cg)([(0,v.g)(el.P_),(0,n.Sn)("design:type",void 0===el.P_?Object:el.P_)],ej.prototype,"motivesService",void 0),(0,n.Cg)([(0,v.g)(eu.h),(0,n.Sn)("design:type",void 0===eu.h?Object:eu.h)],ej.prototype,"settingsService",void 0),(0,n.Cg)([(0,v.g)(eh.V),(0,n.Sn)("design:type",void 0===eh.
51V?Object:eh.V)],ej.prototype,"webSocketService",void 0),(0,n.Cg)([(0,v.g)(M.O),(0,n.Sn)("design:type",void 0===M.O?Object:M.O)],ej.prototype,"domStorage",void 0),(0,n.Cg)([(0,v.g)(N.Pn),(0,n.Sn)("design:type",void 0===N.Pn?Object:N.Pn)],ej.prototype,"fileUploadService",void 0),(0,n.Cg)([(0,v.g)(R.c),(0,n.Sn)("design:type",void 0===R.c?Object:R.c)],ej.prototype,"fileUploadRecoveryService",void 0),(0,n.Cg)([(0,v.g)(ed._),(0,n.Sn)("design:type",void 0===ed._?Object:ed._)],ej.prototype,"uiContext",void 0),(0,n.Cg)([(0,v.g)(k.ApiConfig),(0,n.Sn)("design:type",void 0===k.ApiConfig?Object:k.ApiConfig)],ej.prototype,"apiConfig",void 0),(0,n.Cg)([(0,v.g)(L.jo),(0,n.Sn)("design:type",void 0===L.jo?Object:L.jo)],ej.prototype,"lightHttp",void 0),(0,n.Cg)([(0,v.g)(ec.L),(0,n.Sn)("design:type",void 0===ec.L?Object:ec.L)],ej.prototype,"scriptLoadService",void 0),(0,n.Cg)([(0,v.g)(ea.T),(0,n.Sn)("design:type",void 0===ea.T?Object:ea.T)],ej.prototype,"metadataService",void 0),(0,n.Cg)([(0,v.g)(x.k),(0,n.Sn)("design:type",void 0===x.k?Object:x.k)],ej.prototype,"gaService",void 0),(0,n.Cg)([(0,v.g)(e_.D),(0,n.Sn)("design:type",void 0===e_.D?Object:e_.D)],ej.prototype,"spinnerService",void 0),(0,n.Cg)([(0,v.g)(eA.U),(0,n.Sn)("design:type",void 0===eA.U?Object:eA.U)],ej.prototype,"userTraceService",void 0),(0,n.Cg)([(0,v.g)(eO.Tv),(0,n.Sn)("design:type",void 0===eO.Tv?Object:eO.Tv)],ej.prototype,"connectivityService",void 0),(0,n.Cg)([eT.x,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[]),(0,n.Sn)("design:returntype",void 0)],ej.prototype,"setUpSett
51ingsService",null),(0,n.Cg)([eT.x,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[]),(0,n.Sn)("design:returntype",void 0)],ej.prototype,"setUpPreferredDomains",null),(0,n.Cg)([eT.x,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[Object]),(0,n.Sn)("design:returntype",void 0)],ej.prototype,"setUpLoginService",null),(0,n.Cg)([eT.x,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[Array]),(0,n.Sn)("design:returntype",void 0)],ej.prototype,"initializeWSService$",null),(0,n.Cg)([eT.x,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[]),(0,n.Sn)("design:returntype",void 0)],ej.prototype,"setUpGoogleAnalytics",null)},71464:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});var n=r(4902),i=r(43604);class o{canvastoFile(e){let t=e.toDataURL("image/jpeg"),r=atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],i=new Uint8Array(new ArrayBuffer(r.length));for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);let o="file";switch(n){case"image/jpeg":o="meme.jpg";break;case"image/png":o="meme.png"}return new File([i],o,{type:n,lastModified:new Date().getTime()})}}o=(0,n.Cg)([(0,i._G)()],o)},71598:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},71605:(e,t,r)=>{"use strict";r.d(t,{V:()=>D});var n=r(4902),i=r(43604),o=r(68246),s=r(7262),a=r(14659),l=r(9120),c=r(16579),u=r(56706),d=r(56362),h=r(61564),p=r(32128),f=r(1458),g=r(990),m=r(44492),v=r(44555),y=r(45019),b=r(9711),S=r(12316),E=r(35705),w=r(75172),_=r(18291),A=r(9968),T=r(79347),O=r(21883),C=r(90125),I=r(15750),P=r(41451);let x=(0,S.A)(["https://ws-2.xconvert.com","https://ws-5.xconvert.com","https://ws-6.xconvert.com"]),k="WS_ID",M="WS_DOMAIN";class D{get status(){return this._status.asObservable()}constructor(e,t,r,n,i,s){this.apiConfig=e,this.http=t,this.settingsService=r,this.storageService=n,this.offlineTaskService=i,this.socketJSService=s,this.logger=b.V.getLogger("WebSocketService"),this.uid=_.$.getRandomString(),this.useWebsockets=!0,this.wsMessageSubject=new o.m(100),this.opt={subscriber:"websocket",reconnect:"persist"},this.connectedWebSocketInfo={status:!1,socket:null},this.callback=[],this.ready=!1,this.executed=!1,this._status=new o.m(1),this._wsDomainPromise=null,this.wsId=this.getOrCreateStoredWSId(),T.jo.registerWSDetailProvider(this)}async initWS(){}setConnected(e){}showMessageOutput(e){console.log(e)}async reinitialize(e=[]){let t=this.getMode();if(this.executed=!1,"offline"!==t&&this.localhostWebsoket)try{this.localhostWebsoket.close()}catch(e){console.error("Failed to properly stop the local WS. Continue to start the remote WS.")}this.settingsSubscription&&this.settingsSubscription.unsubscribe(),this.settingsSubscription=this.settingsService.featureFlags.pipe((0,p.s)(1)).subscribe(e=>{(0,E.A)(e,"useWebsockets")&&(this.useWebsockets=e.useWebsockets)}),this.executed||(this.logger.trace1({message:"Loading WS..."}),"offline"===t?await this.connectWSForOffline():await this.initializeWSEndpointOutsideOfNgZone(),this.executed=!0)}startSubscription(){}async connectWSForOffline(){return new Promise((e,t)=>{this.stopAndStartHeartbeat();let r=`ws://${A.ApiConfig.localhostDomainName}:9080/file/converter/ws`;this.updateWSDomain(`ws://${A.ApiConfig.localhostDomainName}:9080`),this.localhostWebsoket=new WebSocket(r),this.connectedWebSocketInfo.socket=this.localhostWebsoket,this.localhostWebsoket.onopen=t=>{this.onConnect(t),e()},this.localhostWebsoket.onclose=e=>{this.onDisconnect(e)},this.localhostWebsoket.onmessage=e=>{this.onMessage(e.data)},this.localhostWebsoket.onerror=e=>{this.onError(e),t()}})}async initializeWSEndpointOutsideOfNgZone(){this.wsId||(this.wsId=this.getOrCreateStoredWSId());let e=[this.createStoredDomainStrategy(),this.createProfessorxStrategy(),this.createFallbackStrategy()].filter(Boolean);try{let t=await (0,s._)((0,a.h)(...e).pipe((0,p.s)(1)));t?.data===x[0]&&this.logger.warn({message:"WS domain resolution fell back to default."}),this.updateAndStoreWSEndpointData(t)}catch(e){this.logger.warn({message:"WS domain resolution failed entirely, using default.",error:e}),this.updateAndStoreWSEndpointData({data:x[0],status:!0})}}createStoredDomainStrategy(){let e=this.getStoredWSDomain();return e&&x.find(t=>t.match(e))?this.http.get(e+"/status",{responseType:"text"}).pipe((0,f.w)(2e3),(0,g.Z)(t=>!0===t||"true"===t?(0,l.of)({data:e,status:!0}):(0,c.$)(()=>Error("Stored WS domain unhealthy"))),(0,m.W)(()=>u.w)):null}createProfessorxStrategy(){return this.http.get(this.apiConfig.getWebSocketEndpoint()).pipe((0,f.w)(3e3),(0,v.L)({count:2,delay:500}),(0,g.Z)(e=>{let t=Array.isArray(e)?e[0]:e?.data;if(!t)return(0,c.$)(()=>Error("Invalid WS domain response"));let r=t.startsWith("https://")?t:`https://${t}`;return(0,l.of)({data:r,status:!0})}),(0,m.W)(()=>u.w))}createFallbackStrategy(){return(0,d.O)(4e3).pipe((0,y.T)(()=>({data:x[0],status:!0})))}updateAndStoreWSEndpointData(e){this.logger.trace1({message:`WS endpoint: ${this.wsEndpoint}`}),this.wsEndpoint=`${e.data}/smq/${this.wsId}`,this.updateWSDomain(e.data),this.storeStoredWSDomain(e.data)}initialize(){let e=this.getMode();this.socketJSService.connect(this.wsDomain,this.wsId,e=>{this.onMessage(e)}),"offline"!==e&&this.startSubscription()}updateWSDomain(e){this.wsDomain=e}getWebsocketMessageObserver(){return this.wsMessageSubject.asObservable()}onMessage(e,t){let r="object"==typeof e?e:JSON.parse(e);this._callback(r);try{this.wsMessageSubject.next(r)}catch(e){this.logger.error(e)}}onError(e,t){this.logger.error({message:"WS error. msg "+this.wsId+" "+t,error:e}),this.ready=!0,this._status.next({connected:!1})}onDisconnect(e){this.logger.trace1({message:"WS Disconnected. msg "+this.wsId}),this.ready=!0,this._status.next({connected:!1})}onConnect(e){this.logger.trace1({message:"WS Connected. msg "+this.wsId}),this.ready=!0,this._status.next({connected:!0})}isServiceReady(){return this.ready}isConnected(){if(this.socketJSService.isConnected)return!0;try{if(this.connectedWebSocketInfo.socket)return this.connectedWebSocketInfo.socket.readyState===WebSocket.OPEN}catch(e){console.error(e)}return!1}stopHeartbeat(){w.m.safeCloseSubscriber(this.heartbeatSubscription)}stopAndStartHeartbeat(){this.stopHeartbeat(),this.heartbeatSubscription=(0,h.Y)(1e3).subscribe(()=>{try{this.localhostWebsoket&&this.localhostWebsoket.readyState===this.localhostWebsoket.OPEN&&this.localhostWebsoket.send(JSON.stringify({heart:"beat"}))}catch(e){console.error(e)}},()=>{console.error("Failed to start heartbeat")})}_callback(e){return this.callback&&this.callback.forEach(t=>t(e))}getId(){return this.wsId}getDomain(){return this.wsDomain}async ensureWsDomain(e=4e3){return!!this.wsDomain||(this._wsDomainPromise||(this._wsDomainPromise=new Promise(t=>{let r=setInterval(()=>{this.wsDomain&&(clearInterval(r),this._wsDomainPromise=null,t(!0))},200);setTimeout(()=>{clearInterval(r),this._wsDomainPromise=null,t(!!this.wsDomain)},e)})),this._wsDomainPromise)}registerCallback(e){this.callback.push(e)}unregisterCallback(e){let t=this.callback.indexOf(e);-1!==t&&this.callback.splice(t,1)}getOrCreateStoredWSId(){let e=this.storageService.get(P.N.USER_SETTING_KEY_PREFIX,k);return e||(e=_.$.getRandomString("w"),this.storageService.store(P.N.USER_SETTING_KEY_PREFIX,k,e)),e}getStoredWSDomain(){let e=M,t=P.N.USER_SETTING_KEY_PREFIX;return this.storageService.get(t,e)}storeStoredWSDomain(e){this.storageService.store(P.N.USER_SETTING_KEY_PREFIX,M,e)}getMode(){return this.offlineTaskService.getOfflineMode()?"offline":null}}D=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(A.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(T.jo)),(0,n.Qj)(2,(0,i.WQ)(C.h)),(0,n.Qj)(3,(0,i.WQ)(P.n)),(0,n.Qj)(4,(0,i.WQ)(O.g1)),(0,n.Qj)(5,(0,i.WQ)(I.G)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===A.ApiConfig?Object:A.ApiConfig,void 0===T.jo?Object:T.jo,void 0===C.h?Object:C.h,void 0===P.n?Object:P.n,void 0===O.g1?Object:O.g1,void 0===I.G?Object:I.G])],D)},71717:(e,t,r)=>{"use strict";r.d(t,{fL:()=>f,om:()=>g});var n=r(64982),i=r(36982);function o(){return"u">typeof globalThis?globalThis:void 0!==r.g?r.g:"u">typeof window?window:"u">typeof self?self:void 0}function s(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var a=r(82909).Buffer,l=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))};function c(e){var t=new e;return t instanceof Set||"push"in t?t:[]}var u=function(){function e(e,t){this.transformationType=e,this.options=t,this.recursionStack=new Set}return e.prototype.transform=function(e,t,r,l,u,d){var h=this;if(void 0===d&&(d=0),Array.isArray(t)||t instanceof Set){var p=l&&this.transformationType===i._.PLAIN_TO_CLASS?c(l):[];return t.forEach(function(t,n){var o=e?e[n]:void 0;if(h.options.enableCircularCheck&&h.isCircular(t))h.transformationType===i._.CLASS_TO_CLASS&&(p instanceof Set?p.add(t):p.push(t));else{var s=void 0;if("function"!=typeof r&&r&&r.options&&r.options.discriminator&&r.options.discriminator.property&&r.options.discriminator.subTypes){if(h.transformationType===i._.PLAIN_TO_CLASS){s=r.options.discriminator.subTypes.find(function(e){return e.name===t[r.options.discriminator.property]});var a={newObject:p,object:t,property:void 0},l=r.typeFunction(a);s=void 0===s?l:s.value,r.options.keepDiscriminatorProperty||delete t[r.options.discriminator.property]}h.transformationType===i._.CLASS_TO_CLASS&&(s=t.constructor),h.transformationType===i._.CLASS_TO_PLAIN&&(t[r.options.discriminator.property]=r.options.discriminator.subTypes.find(function(e){return e.value===t.constructor}).name)}else s=r;var c=h.transform(o,t,s,void 0,t instanceof Map,d+1);p instanceof Set?p.add(c):p.push(c)}}),p}if(r!==String||u)if(r===Number&&!u)return null==t?t:Number(t);else{if(r===Boolean&&!u)return null==t?t:!!t;if((r===Date||t instanceof Date)&&!u)return t instanceof Date?new Date(t.valueOf()):null==t?t:new Date(t);if(o().Buffer&&(r===a||t instanceof a)&&!u)return null==t?t:a.from(t);if(s(t)&&!u)return new Promise(function(e,n){t.then(function(t){return e(h.transform(void 0,t,r,void 0,void 0,d+1))},n)});if(!u&&null!==t&&"object"==typeof t&&"function"==typeof t.then||"object"!=typeof t||null===t)return t;!r&&t.constructor!==Object&&(Array.isArray(t)||t.constructor!==Array)&&(r=t.constructor),!r&&e&&(r=e.constructor),this.options.enableCircularCheck&&this.recursionStack.add(t);var f=this.getKeys(r,t,u),g=e||{};e||this.transformationType!==i._.PLAIN_TO_CLASS&&this.transformationType!==i._.CLASS_TO_CLASS||(g=u?new Map:r?new r:{});
51for(var m=function(o){if("__proto__"===o||"constructor"===o)return"continue";var s=o,a=o,l=o;if(!v.options.ignoreDecorators&&r){if(v.transformationType===i._.PLAIN_TO_CLASS){var c=n.s.findExposeMetadataByCustomName(r,o);c&&(l=c.propertyName,a=c.propertyName)}else if(v.transformationType===i._.CLASS_TO_PLAIN||v.transformationType===i._.CLASS_TO_CLASS){var c=n.s.findExposeMetadata(r,o);c&&c.options&&c.options.name&&(a=c.options.name)}}var h=void 0;h=v.transformationType===i._.PLAIN_TO_CLASS?t[s]:t instanceof Map?t.get(s):t[s]instanceof Function?t[s]():t[s];var p=void 0,f=h instanceof Map;if(r&&u)p=r;else if(r){var m=n.s.findTypeMetadata(r,l);if(m){var y={newObject:g,object:t,property:l},b=m.typeFunction?m.typeFunction(y):m.reflectedType;m.options&&m.options.discriminator&&m.options.discriminator.property&&m.options.discriminator.subTypes?t[s]instanceof Array?p=m:(v.transformationType===i._.PLAIN_TO_CLASS&&(p=void 0===(p=m.options.discriminator.subTypes.find(function(e){if(h&&h instanceof Object&&m.options.discriminator.property in h)return e.name===h[m.options.discriminator.property]}))?b:p.value,!m.options.keepDiscriminatorProperty&&h&&h instanceof Object&&m.options.discriminator.property in h&&delete h[m.options.discriminator.property]),v.transformationType===i._.CLASS_TO_CLASS&&(p=h.constructor),v.transformationType===i._.CLASS_TO_PLAIN&&h&&(h[m.options.discriminator.property]=m.options.discriminator.subTypes.find(function(e){return e.value===h.constructor}).name)):p=b,f=f||m.reflectedType===Map}else if(v.options.targetMaps)v.options.targetMaps.filter(function(e){return e.target===r&&!!e.properties[l]}).forEach(function(e){return p=e.properties[l]});else if(v.options.enableImplicitConversion&&v.transformationType===i._.PLAIN_TO_CLASS){var S=Reflect.getMetadata("design:type",r.prototype,l);S&&(p=S)}}var E=Array.isArray(t[s])?v.getReflectedType(r,l):void 0,w=e?e[s]:void 0;if(g.constructor.prototype){var _=Object.getOwnPropertyDescriptor(g.constructor.prototype,a);if((v.transformationType===i._.PLAIN_TO_CLASS||v.transformationType===i._.CLASS_TO_CLASS)&&(_&&!_.set||g[a]instanceof Function))return"continue"}if(v.options.enableCircularCheck&&v.isCircular(h)){if(v.transformationType===i._.CLASS_TO_CLASS){var A=h;(void 0!==(A=v.applyCustomTransformations(A,r,o,t,v.transformationType))||v.options.exposeUnsetFields)&&(g instanceof Map?g.set(a,A):g[a]=A)}}else{var T=v.transformationType===i._.PLAIN_TO_CLASS?a:o,A=void 0;v.transformationType===i._.CLASS_TO_PLAIN?(A=t[T],A=v.applyCustomTransformations(A,r,T,t,v.transformationType),A=t[T]===A?h:A,A=v.transform(w,A,p,E,f,d+1)):void 0===h&&v.options.exposeDefaultValues?A=g[a]:(A=v.transform(w,h,p,E,f,d+1),A=v.applyCustomTransformations(A,r,T,t,v.transformationType)),(void 0!==A||v.options.exposeUnsetFields)&&(g instanceof Map?g.set(a,A):g[a]=A)}},v=this,y=0,b=f;y<b.length;y++)m(b[y]);return this.options.enableCircularCheck&&this.recursionStack.delete(t),g}return null==t?t:String(t)},e.prototype.applyCustomTransformations=function(e,t,r,i,o){var s=this,a=n.s.findTransformMetadatas(t,r,this.transformationType);return void 0!==this.options.version&&(a=a.filter(function(e){return!e.options||s.checkVersion(e.options.since,e.options.until)})),(a=this.options.groups&&this.options.groups.length?a.filter(function(e){return!e.options||s.checkGroups(e.options.groups)}):a.filter(function(e){return!e.options||!e.options.groups||!e.options.groups.length})).forEach(function(t){e=t.transformFn({value:e,key:r,obj:i,type:o,options:s.options})}),e},e.prototype.isCircular=function(e){return this.recursionStack.has(e)},e.prototype.getReflectedType=function(e,t){if(e){var r=n.s.findTypeMetadata(e,t);return r?r.reflectedType:void 0}},e.prototype.getKeys=function(e,t,r){var o=this,s=n.s.getStrategy(e);"none"===s&&(s=this.options.strategy||"exposeAll");var a=[];if(("exposeAll"===s||r)&&(a=t instanceof Map?Array.from(t.keys()):Object.keys(t)),r)return a;
51if(this.options.ignoreDecorators&&this.options.excludeExtraneousValues&&e){var c=n.s.getExposedProperties(e,this.transformationType),u=n.s.getExcludedProperties(e,this.transformationType);a=l(l([],c,!0),u,!0)}if(!this.options.ignoreDecorators&&e){var c=n.s.getExposedProperties(e,this.transformationType);this.transformationType===i._.PLAIN_TO_CLASS&&(c=c.map(function(t){var r=n.s.findExposeMetadata(e,t);return r&&r.options&&r.options.name?r.options.name:t})),a=this.options.excludeExtraneousValues?c:a.concat(c);var d=n.s.getExcludedProperties(e,this.transformationType);d.length>0&&(a=a.filter(function(e){return!d.includes(e)})),void 0!==this.options.version&&(a=a.filter(function(t){var r=n.s.findExposeMetadata(e,t);return!r||!r.options||o.checkVersion(r.options.since,r.options.until)})),a=this.options.groups&&this.options.groups.length?a.filter(function(t){var r=n.s.findExposeMetadata(e,t);return!r||!r.options||o.checkGroups(r.options.groups)}):a.filter(function(t){var r=n.s.findExposeMetadata(e,t);return!r||!r.options||!r.options.groups||!r.options.groups.length})}return this.options.excludePrefixes&&this.options.excludePrefixes.length&&(a=a.filter(function(e){return o.options.excludePrefixes.every(function(t){return e.substr(0,t.length)!==t})})),a=a.filter(function(e,t,r){return r.indexOf(e)===t})},e.prototype.checkVersion=function(e,t){var r=!0;return e&&(r=this.options.version>=e),r&&t&&(r=this.options.version<t),r},e.prototype.checkGroups=function(e){return!e||this.options.groups.some(function(t){return e.includes(t)})},e}(),d={enableCircularCheck:!1,enableImplicitConversion:!1,excludeExtraneousValues:!1,excludePrefixes:void 0,exposeDefaultValues:!1,exposeUnsetFields:!0,groups:void 0,ignoreDecorators:!1,strategy:void 0,targetMaps:void 0,version:void 0},h=function(){return(h=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},p=new(function(){function e(){}return e.prototype.instanceToPlain=function(e,t){return new u(i._.CLASS_TO_PLAIN,h(h({},d),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToPlainFromExist=function(e,t,r){return new u(i._.CLASS_TO_PLAIN,h(h({},d),r)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.plainToInstance=function(e,t,r){return new u(i._.PLAIN_TO_CLASS,h(h({},d),r)).transform(void 0,t,e,void 0,void 0,void 0)},e.prototype.plainToClassFromExist=function(e,t,r){return new u(i._.PLAIN_TO_CLASS,h(h({},d),r)).transform(e,t,void 0,void 0,void 0,void 0)},e.prototype.instanceToInstance=function(e,t){return new u(i._.CLASS_TO_CLASS,h(h({},d),t)).transform(void 0,e,void 0,void 0,void 0,void 0)},e.prototype.classToClassFromExist=function(e,t,r){return new u(i._.CLASS_TO_CLASS,h(h({},d),r)).transform(t,e,void 0,void 0,void 0,void 0)},e.prototype.serialize=function(e,t){return JSON.stringify(this.instanceToPlain(e,t))},e.prototype.deserialize=function(e,t,r){var n=JSON.parse(t);return this.plainToInstance(e,n,r)},e.prototype.deserializeArray=function(e,t,r){var n=JSON.parse(t);return this.plainToInstance(e,n,r)},e}());function f(e,t){return p.instanceToPlain(e,t)}function g(e,t,r){return p.plainToInstance(e,t,r)}},72011:(e,t,r)=>{"use strict";r.d(t,{y:()=>i});var n=r(77698);function i(e){return(0,n.T)(null==e?void 0:e.then)}},72115:(e,t,r)=>{e=r.nmd(e);var n=r(24298),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i&&n.process,a=function(){try{var e=o&&o.require&&o.require("util").types;if(e)return e;return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},72200:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},72209:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(66128);let i=function(){try{var e=(0,n.A)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},72577:(e,t,r)=>{"use strict";r.d(t,{z:()=>n});class n{static{this.EventType={SEND:"send"}}static{this.HitType={EVENT:"event",PAGEVIEW:"pageview"}}static{this.EventCategory={ANCHOR:"anchor",BUTTON:"button",MESSAGE:"message","SELECT-DIALOG":"select-dialog",NETWORK:"network",AUTO:"auto"}}static{this.EventAction={"PAGE-CHANGE":"page-change","FILE-UPLOAD-START":"file-upload-start","FILE-UPLOAD-END":"file-upload-end","FILE-UPLOAD-FAILED":"file-upload-failed","FILE-UPLOAD-READY":"file-upload-ready","FILE-UPLOAD-CLICKED":"file-upload-clicked","FILE-DOWNLOAD":"file-download","MODEL-OPEN":"model-open","FILE-DOWNLOAD-ZIP":"file-download-zip","FILE-SELECT-DIALOG-OPENED":"file-select-dialog-opened","FILE-SELECTED":"file-selected","FILE-CONVERT-START":"file-convert-start","FILE-CONVERT-END":"file-convert-end","FILE-CONVERT-FAILED":"file-convert-failed","OFFLINE-ENGINE-DOWNLOADED":"offline-engine-downloaded","FILE-PROCESSOR-RESOLVE-START":"file-processor-resolve-start","FILE-PROCESSOR-RESOLVE-END":"file-processor-resolve-end","FILE-PROCESSOR-RESOLVE-FAILED":"file-processor-resolve-failed","SHARE-CLICK":"share-click"}}static{this.EventLabel={NAVIGATE:"navigate",DOWNLOAD:"download",UPLOAD:"upload",SELECT:"select",CONVERT:"convert",ER
51ROR:"error",COMPLETE:"complete",PACKAGE_DOWNLOAD:"package_download"}}static{this.EventValue={}}}},72649:(e,t,r)=>{"use strict";var n=r(2544),i=function(){};e.exports={getOrigin:function(e){if(!e)return null;var t=new n(e);if("file:"===t.protocol)return null;var r=t.port;return r||(r="https:"===t.protocol?"443":"80"),t.protocol+"//"+t.hostname+":"+r},isOriginEqual:function(e,t){var r=this.getOrigin(e)===this.getOrigin(t);return i("same",e,t,r),r},isSchemeEqual:function(e,t){return e.split(":")[0]===t.split(":")[0]},addPath:function(e,t){var r=e.split("?");return r[0]+t+(r[1]?"?"+r[1]:"")},addQuery:function(e,t){return e+(-1===e.indexOf("?")?"?"+t:"&"+t)},isLoopbackAddr:function(e){return/^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^\[::1\]$/.test(e)}}},72747:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(21710),i=r(75438),o="[object Number]";let s=function(e){return"number"==typeof e||(0,i.A)(e)&&(0,n.A)(e)==o}},72876:e=>{"use strict";function t(){this._listeners={}}t.prototype.addEventListener=function(e,t){e in this._listeners||(this._listeners[e]=[]);var r=this._listeners[e];-1===r.indexOf(t)&&(r=r.concat([t])),this._listeners[e]=r},t.prototype.removeEventListener=function(e,t){var r=this._listeners[e];if(r){var n=r.indexOf(t);if(-1!==n)return void(r.length>1?this._listeners[e]=r.slice(0,n).concat(r.slice(n+1)):delete this._listeners[e])}},t.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,r=1==arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,r),t in this._listeners)for(var n=this._listeners[t],i=0;i<n.length;i++)n[i].apply(this,r)},e.exports=t},72936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return n}});let n=r(64252)._(r(14232)).default.createContext(null)},73206:e=>{e.exports={modal:"modal_component_modal__d_QgE",content:"modal_component_content__ZpBqX",fit:"modal_component_fit__4iPMr",head:"modal_component_head__Axer7","header-content":"modal_component_header-content__o4uN6",close:"modal_component_close__RgdDD",body:"modal_component_body__2frZY",footer:"modal_component_footer__iexw_"}},74034:(e,t,r)=>{"use strict";r.r(t),r.d(t,{extensionsMatch:()=>h,getExtension:()=>o,getExtensionList:()=>s,getExtensionSimple:()=>i,isExtensionAllowed:()=>c,isExtensionDisallowed:()=>l,isKnownSupportedExtension:()=>a,isThumbnailSupported:()=>u,normalizeExtension:()=>d});var n=r(69870);function i(e){return -1===e.lastIndexOf(".")?e:e.substring(e.lastIndexOf(".")+1)}function o(e){let t=e.toUpperCase(),r=n.EX.find(e=>t.endsWith(e));return r?e.substring(e.length-r.length):i(e)}function s(e){return e.map(o)}function a(e){let t=o(e).toUpperCase();return n.Gm.has(t)}function l(e){let t=o(e).toUpperCase();return n.q0.has(t)}function c(e){return!l(e)}function u(e){let t=o(e).toUpperCase();return n.ON.has(t)}function d(e){return e.toUpperCase().replace(/^\./,"")}function h(e,t){return d(e)===d(t)}},74588:(e,t,r)=>{"use strict";r.d(t,{U:()=>o});var n=r(990),i=r(97460);function o(e){return void 0===e&&(e=1/0),(0,n.Z)(i.D,e)}},75082:(e,t,r)=>{e.exports=r(19031).Uint8Array},75146:(e,t,r)=>{"use strict";r.d(t,{a:()=>d});var n=r(4902),i=r(43604),o=r(7262),s=r(32128),a=r(9968),l=r(79347),c=r(90125),u=r(71605);class d{constructor(e,t,r,n){this.http=e,this.apiConfig=t,this.wsService=r,this.settingsService=n,this.endpointPostfix="/workflows/process-complete-data/"}async requestToSendFileCompleteDataThroughWS(e,t,r=!1){let n=await (0,o._)(this.settingsService.featureFlags.pipe((0,s.s)(1))),i=r&&e?a.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e):n?.useTaskScheduling?`${this.apiConfig.podEndpoint}${a.ApiConfig.edgePathPrefix}`:a.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e),l=`${i}${this.endpointPostfix}${t}/${this.wsService.getId()}`;return new Promise((e,t)=>{this.http.get(l).subscribe({next:t=>{t&&!1===t.error?e({state:"success",data:t}):t&&!0===t.error?e({state:"error",data:t}):e({state:"unknown",data:t})},error:e=>{t(e)}})})}}d=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(l.jo)),(0,n.Qj)(1,(0,i.WQ)(a.ApiConfig)),(0,n.Qj)(2,(0,i.WQ)(u.V)),(0,n.Qj)(3,(0,i.WQ)(c.h)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===l.jo?Object:l.jo,void 0===a.ApiConfig?Object:a.ApiConfig,void 0===u.V?Object:u.V,void 0===c.h?Object:c.h])],d)},75172:(e,t,r)=>{"use strict";r.d(t,{m:()=>n});
51class n{static safeCloseSubscriber(e){e&&!e.closed&&e.unsubscribe()}static safeCloseSubscribers(e){(e||[]).forEach(e=>n.safeCloseSubscriber(e))}}},75438:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e){return null!=e&&"object"==typeof e}},75555:(e,t,r)=>{"use strict";r.d(t,{Y:()=>o,l:()=>s});var n=r(78619),i=null;function o(e){if(n.$.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else e()}function s(e){n.$.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},75576:(e,t,r)=>{"use strict";var n=r(82007).b,i=r(93570),o=r(39944),s=r(10020),a=r(72649),l=function(){};function c(e,t,r){l(e,t);var i=this;n.call(this),setTimeout(function(){i._start(e,t,r)},0)}i(c,n),c.prototype._start=function(e,t,n){l("_start");var i=this,s=new r.g.XDomainRequest;t=a.addQuery(t,"t="+ +new Date),s.onerror=function(){l("onerror"),i._error()},s.ontimeout=function(){l("ontimeout"),i._error()},s.onprogress=function(){l("progress",s.responseText),i.emit("chunk",200,s.responseText)},s.onload=function(){l("load"),i.emit("finish",200,s.responseText),i._cleanup(!1)},this.xdr=s,this.unloadRef=o.unloadAdd(function(){i._cleanup(!0)});try{this.xdr.open(e,t),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(n)}catch(e){this._error()}},c.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},c.prototype._cleanup=function(e){if(l("cleanup",e),this.xdr){if(this.removeAllListeners(),o.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},c.prototype.close=function(){l("close"),this._cleanup(!0)},c.enabled=!!(r.g.XDomainRequest&&s.hasDomain()),e.exports=c},75999:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e,t){return function(r){return e(t(r))}}},76217:(e,t,r)=>{var n=r(66521);e.exports=function(e){return n(this,e).has(e)}},76338:(e,t,r)=>{"use strict";r.g.crypto&&r.g.crypto.getRandomValues?e.exports.randomBytes=function(e){var t=new Uint8Array(e);return r.g.crypto.getRandomValues(t),t}:e.exports.randomBytes=function(e){for(var t=Array(e),r=0;r<e;r++)t[r]=Math.floor(256*Math.random());return t}},76369:(e,t,r)=>{"use strict";r.d(t,{Bh:()=>q,Fs:()=>C,Ij:()=>l,KD:()=>A,LI:()=>ei,Oy:()=>P,PH:()=>T,Qk:()=>_,WQ:()=>Q,bX:()=>es,dp:()=>v,e4:()=>B,gZ:()=>ea,i_:()=>O,n5:()=>I,qD:()=>M,qw:()=>x,vd:()=>S,xj:()=>eu,zR:()=>m,zZ:()=>E});var n=r(96361),i=r(38238),o=r(36265),s=r(89692),a=r(25388);let l=n.sF.sheetLabelsDropped,c="framePicker",u=o.nN,d="psid",h={ONE:"ONE",ONE_FRAME:"ONE",SEQUENCE:"SEQUENCE",SHEET:"SHEET",CONTACT_SHEET:"SHEET",PICKED:"PICKED",[o.OY]:"PICKED"};function p(e){if("string"!=typeof e||""===e)return[];let t=[];for(let r of e.split(",")){let e=/^(\d*)@([0-9]*\.?[0-9]+)$/.exec(r.trim());if(!e)continue;let n=Number(e[2]);if(!Number.isFinite(n)||n<0)continue;let i={at:n},o=""===e[1]?NaN:Number(e[1]);Number.isInteger(o)&&o>=1&&(i.frame=o),t.push(i)}return t.sort((e,t)=>e.at-t.at)}function f(e){if("string"!=typeof e)return null;let t=e.trim().split(/\s+/);if(0===t.length||t[0]!==c)return null;let r={};for(let e of t.slice(1)){let t=e.indexOf("=");t<=0||(r[e.slice(0,t)]=e.slice(t+1))}let n=h[r.mode];if(!n)return null;let i=null;if("ONE"===n&&void 0!==r.t){let e=Number(r.t);i=Number.isFinite(e)&&e>=0?e:null}let o="SHEET"===n&&("true"===r.labelsDropped||"false"===r.labelsDropped)?"true"===r.labelsDropped:null,s={mode:n,t:i,labelsDropped:o};if("ONE"===n){let e=/^\d+$/.test(r.frame??"")?Number(r.frame):NaN,t=Number(r.at);Number.isInteger(e)&&e>=1&&(s.frame=e),void 0!==r.at&&Number.isFinite(t)&&t>=0&&(s.at=t)}else if("PICKED"===n){let e=p(r.picks);e.length&&(s.picks=e);let t=/^\d+$/.test(r.frames??"")?Number(r.frames):NaN;Number.isInteger(t)&&t>=1?s.frames=t:e.length&&(s.frames=e.length)}else{let e=Number(r.start),t=Number(r.end),n=/^\d+$/.test(r.frames??"")?Number(r.frames):NaN;void 0!==r.start&&Number.isFinite(e)&&e>=0&&(s.start=e),void 0!==r.end&&Number.isFinite(t)&&t>=0&&(void 0===s.start||t>=s.start)&&(s.end=t),Number.isInteger(n)&&n>=1&&(s.frames=n)}return s}function g(e){return"string"==typeof e&&e.trim().split(/\s+/)[0]===c}function m(e){if(!Array.isArray(e))return null;for(let t of e){let e=f(t);if(e)return e}return null}function v(e){return Array.isArray(e)?e.filter(e=>!g(e)):[]}function y(e,t){if(!t||!e||"object"!=typeof e)return null;let r=e;if(r.videoToImageFrameSelection===o.OY){let e=p(("string"==typeof r.screenshotTimes?r.screenshotTimes:Array.isArray(r.screenshotTimes)?r.screenshotTimes.join(","):"").split(",").map(e=>`@${String(e).split("::")[0].trim()}
51`).join(",")),t=new Set,n=e.filter(e=>!t.has(e.at)&&(t.add(e.at),!0)),i={mode:"PICKED",t:null,labelsDropped:null};return n.length&&(i.picks=n,i.frames=n.length),i}let n=(0,s.fY)(r.videoToImageFrameSelection);if(!n)return null;let i=null;if("ONE"===n){let e=Number("string"==typeof r.screenshotTime?r.screenshotTime.split("::")[0]:r.screenshotTime);return{mode:n,t:i=Number.isFinite(e)&&e>=0?e:null,labelsDropped:null}}let a=Number("string"==typeof r.screenshotFrameCount?r.screenshotFrameCount.split("::")[0]:r.screenshotFrameCount),l={mode:n,t:i,labelsDropped:null};return Number.isInteger(a)&&a>=1&&(l.frames=a),l}function b(e){let t=`${u}-`;return{read(r){if(!r.startsWith(t))return null;try{return e.get(u,r.slice(t.length))??null}catch{return null}},write:()=>!1,remove(){},keys(){try{return Array.from(e.keySet(t)??[])}catch{return[]}}}}function S(e,t,r){if("string"!=typeof e||!e||!r)return null;try{let n=(0,o.JD)(e,b(r));return n?(0,o.TE)(n,t):null}catch{return null}}function E(e,t){if("string"!=typeof e||0===e.length||!t)return null;try{return(0,o.JD)(e,b(t))?.sid??null}catch{return null}}function w(e){let t=b(e),r=`${u}-`;return{...t,write(n,i){if("function"!=typeof e.store||!n.startsWith(r))return!1;try{let o=JSON.stringify(i);return e.store(u,n.slice(r.length),i),JSON.stringify(t.read(n))===o}catch{return!1}}}}function _(e){if(!e||"object"!=typeof e)return null;let t=e,r=t.result&&"object"==typeof t.result?t.result:null,n=t.ws&&"object"==typeof t.ws?t.ws:null;return"failed"===t.status||r?.error===!0||n?.processStageSubState==="failed"||r?.compositionFailure&&"object"==typeof r.compositionFailure?"failed":r&&("string"==typeof r.output&&""!==r.output||Array.isArray(r.output)&&r.output.length>0||Array.isArray(r.outputFiles)&&r.outputFiles.length>0)||n?.processStage==="completed"?"done":null}function A(e,t,r,n=Date.now){if(!t||"string"!=typeof e||!e||!r)return null;try{let i=w(r),s=(0,o.JD)(e,i)?.sid??null;if(!s)return null;return"saved"===(0,o.oF)(s,[e],t,i,n).status?s:null}catch{return null}}function T(e,t,r){if(!e)return null;let n=new URLSearchParams;return n.set("tab",a.TN),(0,a.vZ)(t)&&n.set(d,t),(0,a.vZ)(t)&&(0,a.vZ)(r)&&n.set(a.l_,r),n.set(a.y,a.F8),`/${e.replace(/^\/+/,"")}?${n.toString()}`}function O(e,t){if(!e)return null;let r=m(e.result?.processingNotes);return r||y(e.options,null!==E(e.workflowId,t))}function C(e,t){return null!==O(e,t)}function I(e){let t=e?.pageData?.path||e?.uniqueProcessType;return"string"==typeof t&&""!==t?t:null}function P(e){return e?`/${e.replace(/^\/+/,"")}?tab=${encodeURIComponent(a.TN)}&${a.mv}=1`:null}function x(e,t,r){if(!e)return{kind:"modal"};if(r.isStudio(e)){if(r.studioOpen(e))return{kind:"studio"};let t=r.studioRehydrateHref?.(e)??null;return t?{kind:"studio",href:t}:{kind:"expired",editor:"studio"}}if(!C(e,t))return{kind:"modal"};let n=E(e.workflowId,t),i=n?T(I(e),n,e.workflowId):k(e);return i?{kind:"picker",href:i}:{kind:"expired",editor:"picker"}}function k(e){let t=e?.workflowId,r=e?.id;if(!(0,a.vZ)(t)||!(0,a.l3)(r))return null;let n=e?.endpointData?.processorMetadataList?.[0],i=(0,a.fP)(n?.processDomain)??(0,a.fP)(n?.uploadDomain),o=i?T(I(e),t):null;if(!o)return null;let s=new URLSearchParams;return s.set(a.D8,r),s.set(a.oM,i),`${o}&${s.toString()}`}let M={picker:{line:"This video is no longer on our servers.",action:"Pick frames from a new video"},studio:{line:"This project's files are no longer on our servers.",action:"Make another video"}};function D(e){if(!e||"object"!=typeof e)return!1;let t=e;return!0===t.vfr||"VFR"===t.frameRateMode}
51function R(e,t){let r=b(t);for(let t of r.keys()){if(!(0,o.Ik)(t))continue;let n=r.read(t),i=(0,o.Hh)(n);if(i&&i.workflowIds.includes(e))return{record:i,raw:n}}return null}function F(e,t,r){let n=e.jobs?.find(e=>e.id===r),i=n?e.staged?.find(e=>e.uuid===n.fileUuid)??(e.file?.uuid===n.fileUuid?e.file:null):e.file;if(!i)return null;let o=t?.staged,s=[t?.file,...Array.isArray(o)?o:[]].find(e=>!!e&&"object"==typeof e&&e.uuid===i.uuid);return{ref:i,rawRef:s}}function N(e,t){if("string"!=typeof e||!e||!t)return null;try{let r=R(e,t);if(!r)return null;let n=F(r.record,r.raw,e);if(!n)return null;let{duration:i,fps:o,frameCount:s,avgFps:a}=n.ref,l=e=>"number"==typeof e&&Number.isFinite(e)&&e>0?e:null,c=n.ref.frameRateMode??n.rawRef?.frameRateMode;return{duration:l(i)??0,fps:l(o),vfr:D(n.rawRef),frameCount:l(s),avgFps:l(a),mode:"CFR"===c||"VFR"===c?c:void 0}}catch{return null}}function L(e){if("string"!=typeof e)return null;let t=/-f(\d+)-(\d+)_(\d{2})\.(\d{3})\.[A-Za-z0-9]+$/.exec(e.trim());if(!t)return null;let r=Number(t[1]);return!Number.isInteger(r)||r<1?null:{frame:r,at:60*Number(t[2])+Number(t[3])+Number(t[4])/1e3}}function j(e){if(!e||"object"!=typeof e)return null;let t=e;if("string"==typeof t.output)return t.output;let r=t.outputFiles;return Array.isArray(r)&&"string"==typeof r[0]?r[0]:null}function U(e,t){if(!e||"ONE"!==e.mode)return null;if(void 0!==e.frame){let t=e.at??e.t;if(null!==t)return{frame:e.frame,at:t}}return L(t)}function $(e){let t="string"==typeof e?e.split("::")[0].trim():e,r="number"==typeof t?t:""===t||null==t?NaN:Number(t);return Number.isFinite(r)&&r>=0?r:null}function B(e,t,r,n){let i=e&&"ONE"===e.mode?e:null;return{delivered:U(i,j(t)),resultT:i?.t??null,userT:n,wireT:$(r)}}function W(e){if(!e||null===e.fps||e.duration<=0)return null;let t=(0,i.MM)(e.duration,e.fps,{frameCount:e.frameCount,avgFps:e.avgFps,mode:e.vfr?"VFR":e.mode??null});return t.frameCount>0?t:null}function z(e,t){return(0,i.zM)(e,t)}function H(e,t){return(0,i.UG)(e+i.eQ,t)}function G(e,t){return`Frame ${e+1} of ${t.frameCount} \xb7 ${(0,i.KP)((0,i.wc)(e,t))}`}function V(e,t){let r=W(t),n=r&&!r.variable?r:null;if(e.delivered){let{frame:t,at:r}=e.delivered;return n?`Frame ${t} of ${n.frameCount} \xb7 ${(0,i.KP)(r)}`:`Frame ${t} \xb7 ${(0,i.KP)(r)}`}if(null!==e.resultT)return n?G(null!==e.userT?H(e.userT,n):z(e.resultT,n),n):`Frame at ${(0,i.KP)(e.resultT)}`;if(!n){let r=t?.vfr?e.wireT??e.userT:e.userT??e.wireT;return null===r?null:`Frame at ${(0,i.KP)(r)}`}return null!==e.userT?G(H(e.userT,n),n):null!==e.wireT?G(z(e.wireT,n),n):null}function Q(e,t,r){return V(t,N(e,r))}function q(e,t){if("string"!=typeof e||!e||!t)return null;try{let r=R(e,t);if(!r)return null;let{record:n}=r,i=n.jobs?.find(t=>t.id===e),a=i?.mode??n.mode;if("ONE"===a)return null;let l=F(n,r.raw,e),c="number"==typeof l?.ref.duration&&Number.isFinite(l.ref.duration)&&l.ref.duration>0?l.ref.duration:null,u="number"==typeof l?.ref.fps&&Number.isFinite(l.ref.fps)&&l.ref.fps>0?l.ref.fps:null,d=null;if(n.range){let e=n.range.end??c;null!==e&&e>=n.range.start&&(d={start:n.range.start,end:e})}let h=null;if(null!==c){let e=(0,s.zz)({...(0,o.iA)(n),mode:a},c,u);Number.isInteger(e)&&e>=1&&(h=e)}return null===h&&"BY_COUNT"===n.spacing&&Number.isInteger(n.count)&&n.count>=1&&(h=n.count),{mode:a,range:d,count:h}}catch{return null}}let K=n.sF.modeLabel("CONTACT_SHEET")??"Contact sheet",X="Frames",J=n.sF.sheetToggleSheet??"Sheet";function Y(e){if(!e||"object"!=typeof e)return null;let t=e,r=Array.isArray(t.outputFiles)?t.outputFiles:Array.isArray(t.output)?t.output:null;return r&&r.length>0?r.length:null}let Z="Picked frames",ee="Picked",et=3;function er(e,t){let r=e.picks??[],n=e.frames??Y(t)??(r.length||null),o=[];if(null!==n&&o.push(String(n)),r.length){let e=r.slice(0,et).map(e=>void 0!==e.frame?`${e.frame} (${(0,i.KP)(e.at)})`:(0,i.KP)(e.at)),t=r.length-e.length;o.push(e.join(", ")+(t>0?` +${t} more`:""))}let s=o.length?` \xb7 ${o.join(" \xb7 ")}`:"";return{text:Z+s,lead:Z,shortLead:ee,rest:s}}function en(e,t,r){if(e?.mode==="PICKED")return er(e,r);let n=t?.mode??(e&&"ONE"!==e.mode?e.mode:null);if(!n)return null;let o=t?.range??(e&&void 0!==e.start&&void 0!==e.end?{start:e.start,end:e.end}:null),s=t?.count??e?.frames??("SEQUENCE"===n?Y(r):null),a=[];null!==s&&a.push("SHEET"===n?`${s} ${1===s?"frame":"frames"}`:String(s)),o&&a.push(`${(0,i.KP)(o.start)} – ${(0,i.KP)(o.end)}`);let l="SHEET"===n?K:X,c="SHEET"===n?J:X,u=a.length?` \xb7 ${a.join(" \xb7 ")}`:"";return{text:l+u,lead:l,shortLead:c,rest:u}}function ei(e,t,r,n){return en(eo(e,t,r,n),q(e,n),r)}function eo(e,t,r,n){if(t?.mode!=="PICKED"||!t.picks?.length||m(r?.processingNotes))return t;let i=t.picks.map(t=>{if(void 0!==t.frame)return t;let r=S(e,t.at,n);return null===r?t:{...t,at:r}});return{...t,picks:i}}function es(e,t,r){if("string"!=typeof e||!e||!r)return null;try{let n=(0,o.JD)(e,b(r)),i=n?.jobs?.find(t=>t?.id===e)?.fileUuid;return(0,o.Uo)(n,t,"string"==typeof i?i:void 0)}catch{return null}}function ea(e,t){return e?{src:e,kind:"edge",fallback:t||null}:t?{src:t,kind:"record",fallback:null}:null}function el(e){let t=Math.round(1e3*Math.max(0,Number(e)||0)),r=Math.floor(t/6e4),n=t%6e4;return`${r}_${String(Math.floor(n/1e3)).padStart(2,"0")}.${String(n%1e3).padStart(3,"0")}`}let ec=e=>String(e).padStart(4,"0");function eu(e,t,r){if(!e)return null;let n=String(r??"").split("\\").pop()||"",i=n.lastIndexOf("."),o=i>=0?n.slice(i+1):"",s=String(t??""),a=s.lastIndexOf("."),l=a>0?s.slice(0,a):s;if("zip"===o.toLowerCase())return`${l}-frames.${o}`;let c=/-z-(\d+)-y-/.exec(n),u=c?Number(c[1]):0;switch(e.mode){case"ONE":return"number"==typeof e.frame?`${l}-f${ec(e.frame)}-${el(e.at??e.t??0)}.${o}`:`${l}-${el(e.t??0)}.${o}`;case"SEQUENCE":return`${l}-frame-${ec(u+1)}.${o}`;case"PICKED":{let t=e.picks?.[u];if(!t)return`${l}-frame-${ec(u+1)}.${o}`;return"number"==typeof t.frame?`${l}-f${ec(t.frame)}-${el(t.at)}.${o}`:`${l}-${el(t.at)}.${o}`}case"SHEET":return void 0!==e.start&&void 0!==e.end?`${l}-sheet-${el(e.start)}-${el(e.end)}.${o}`:`${l}-sheet.${o}`;default:return null}}},76611:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=r(54743).A.Symbol},76976:(e,t,r)=>{"use strict";var n=r(82007).b,i=r(93570),o=r(39944),s=r(72649),a=r.g.XMLHttpRequest,l=function(){};function c(e,t,r,i){l(e,t);var o=this;
51n.call(this),setTimeout(function(){o._start(e,t,r,i)},0)}i(c,n),c.prototype._start=function(e,t,r,n){var i=this;try{this.xhr=new a}catch(e){}if(!this.xhr){l("no xhr"),this.emit("finish",0,"no xhr support"),this._cleanup();return}t=s.addQuery(t,"t="+ +new Date),this.unloadRef=o.unloadAdd(function(){l("unload cleanup"),i._cleanup(!0)});try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){l("xhr timeout"),i.emit("finish",0,""),i._cleanup(!1)})}catch(e){l("exception",e),this.emit("finish",0,""),this._cleanup(!1);return}if(n&&n.noCredentials||!c.supportsCORS||(l("withCredentials"),this.xhr.withCredentials=!0),n&&n.headers)for(var u in n.headers)this.xhr.setRequestHeader(u,n.headers[u]);this.xhr.onreadystatechange=function(){if(i.xhr){var e,t,r=i.xhr;switch(l("readyState",r.readyState),r.readyState){case 3:try{t=r.status,e=r.responseText}catch(e){}l("status",t),1223===t&&(t=204),200===t&&e&&e.length>0&&(l("chunk"),i.emit("chunk",t,e));break;case 4:l("status",t=r.status),1223===t&&(t=204),(12005===t||12029===t)&&(t=0),l("finish",t,r.responseText),i.emit("finish",t,r.responseText),i._cleanup(!1)}}};try{i.xhr.send(r)}catch(e){i.emit("finish",0,""),i._cleanup(!1)}},c.prototype._cleanup=function(e){if(l("cleanup"),this.xhr){if(this.removeAllListeners(),o.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},c.prototype.close=function(){l("close"),this._cleanup(!0)},c.enabled=!!a;var u=["Active"].concat("Object").join("X");!c.enabled&&u in r.g&&(l("overriding xmlhttprequest"),new(a=function(){try{return new r.g[u]("Microsoft.XMLHTTP")}catch(e){return null}}),c.enabled=!0);var d=!1;try{d="withCredentials"in new a}catch(e){}c.supportsCORS=d,e.exports=c},77066:(e,t,r)=>{"use strict";r.d(t,{Pn:()=>B});var n=r(4902),i=r(43604),o=r(65456),s=r.n(o),a=r(68246),l=r(7262),c=r(9120),u=r(16579),d=r(44555),h=r(990),p=r(92384),f=r(9711),g=r(97131),m=r(72577),v=r(64083),y=r(94459),b=r(22902),S=r(40405),E=r(70907),w=r(62755),_=r(45878),A=r(64688),T=r(83831),O=r(18291),C=r(17214),I=r(31962),P=r(1936),x=r(79347),k=r(29238),M=r(40001),D=r(90125),R=r(33353),F=r(71605);let N="__xcFinalizeMissing",L="File is empty",j="File is too large";function U(e){let t=Error(`"${e||"This file"}" is empty (0 bytes), so there is nothing to convert. Pick the file again, or choose a different one.`);return t.name=L,t}function $(e,t){let r=Error(`"${e||"This file"}" is larger than the ${t} MB upload limit.`);return r.name=j,r}class B{get chunkUploads(){return this.activeChunkUploads||(this.activeChunkUploads=new Map),this.activeChunkUploads}get onFileUploadStart(){return this._onFileUploadStart}get onFileSelected(){return this._onFileSelected}fileSelected(){this._onFileSelected.next({dispatchedAt:new Date})}constructor(e,t,r,n,i,o,s,l,c){this.http=e,this.wsService=t,this.gaService=r,this.uiContext=n,this.authService=i,this.helperService=o,this.settingsService=s,this.loginService=l,this.refreshService=c,this.logger=f.V.getLogger("FileUploadService"),this.maxFileSizeInBytes=6e8,this.maxFileSizeInMB=600,this.concurrentProcessLimit=4,this.chunkSize=1048577,this.simultaneousUploads=6,this.chunkUploadEnabled=!0,this.chunkSize1MB=0,this.chunkSize10MB=0,this.chunkSize100MB=0,this.chunkSize500MB=0,this.chunkSizeLargeFiles=0,this._onFileUploadStart=new a.m(1),this._onFileSelected=new a.m(1)}initialize(){this.loginService.onSessionDetails.subscribe({next:e=>{this.maxFileSizeInBytes=1e3*(e&&e.fileSizeLimitMB||400)*1e3,this.maxFileSizeInMB=e&&e.fileSizeLimitMB||400,this.concurrentProcessLimit=e&&e.numberOfConcurrentProcessLimit||4}}),this.settingsService.userSettings.subscribe({next:e=>{this.chunkSize=(0,b.A)(e,"chunkSize",0x2800001),this.chunkUploadEnabled=(0,b.A)(e,"chunkUploadEnabled",!0),this.simultaneousUploads=(0,b.A)(e,"simultaneousUploads",2),this.chunkSize1MB=(0,b.A)(e,"chunkSize1MB",0),this.chunkSize10MB=(0,b.A)(e,"chunkSize10MB",0),this.chunkSize100MB=(0,b.A)(e,"chunkSize100MB",0),this.chunkSize500MB=(0,b.A)(e,"chunkSize500MB",0),this.chunkSizeLargeFiles=(0,b.A)(e,"chunkSizeLargeFiles",0)}})}notifyFileUploadStart(){this._onFileUploadStart.next({dispatchedAt:new Date})}cancelChunkUpload(e){let t=this.chunkUploads.get(e);return!!t&&(t.cancel(),!0)}emitUploadEvent(e,t,r={}){(0,_.emitMetric)(e,{kind:t.kind,sizeBucket:(0,w.MG)(t.size),edgeHost:(0,w.Xd)(t.endpoint),retries:t.attempt||0,...r})}uploadErrorAttributes(e){let t=(0,w.c2)(e),r=e?.[N]?"finalize_missing":void 0;return{status:t,errorClass:(0,w.PC)(t,r,e?.message)}}async uploadFileFromURL(e,t,r){this.notifyFileUploadStart();let n=e.getMetadata();if(-1!==n.processorMetadataList[0].uploadDomain.indexOf("localhost")&&this.uiContext.errorToast("Error","Running in Test Mode.",!1,!1),r?.suppressGAStart||this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.NETWORK,m.z.EventAction["FILE-UPLOAD-START"],m.z.EventLabel.CONVERT,`${e.metadata.file.name}`),n.processorMetadataList[0].uploadType===v.qn.SERVER){let t,i=(e=>{let t=0,r=e;return e=>{if(this.logger.trace7({message:"URL file upload progress response",data:e}),e.uuid===r.getFile().name){let n=100*(t=parseFloat(e.data)>t?parseFloat(e.data):t)/r.getFile().size;(t===r.getFile().size||100===(0,S.A)(n+"",10))&&r.setComplete(),"completed"===e.processStageSubState&&(r.setComplete(),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.NETWORK,m.z.EventAction["FILE-UPLOAD-END"],m.z.EventLabel.CONVERT,`${r.metadata.file.name}`),this.wsService.unregisterCallback(i)),r.getComplete()?r.setProgress(parseFloat(parseFloat("100").toFixed(2))):r.setProgress(parseFloat(parseFloat(n+"").toFixed(2)))}}})(e);this.wsService.registerCallback(i);let o=T.N.getUploadEndpoint(n.processorMetadataList[0])+"/url",s={kind:"url",size:e.getFile().size,endpoint:o,attempt:r?.attempt},a=Date.now();this.emitUploadEvent(A.O.FILE_UPLOAD_START,s);try{t=await (0,l._)(this.http.post(o,e.getFile(),{params:{wsId:this.wsService.getId(),wsDomain:this.wsService.getDomain(),safeFilename:e.metadata.processorMetadataList[0].fileMetadata.safeName}}))}catch(e){throw this.emitUploadEvent(A.O.FILE_UPLOAD_ERROR,s,{ms:Date.now()-a,...this.uploadErrorAttributes(e)}),this.wsService.unregisterCallback(i),e}this.emitUploadEvent(A.O.FILE_UPLOAD_COMPLETE,s,{ms:Date.now()-a});let c={ftype:(0,y.rB)(e.getFile()),fname:e.getFile().name,fsize:e.getFile().size,flastModified:e.getFile().lastModified},u=t.originalInputFiles[0];return u.metadata=c,u}throw Error(`Unsupported upload type for URL upload: ${n.processorMetadataList[0].uploadType}`)}async uploadFileFromGoogleDrive(e,t,r){this.notifyFileUploadStart();let n=e.getMetadata();if(-1!==n.processorMetadataList[0].uploadDomain.indexOf("localhost")&&this.uiContext.errorToast("Error","Running in Test Mode.",!1,!1),r?.suppressGAStart||this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.NETWORK,m.z.EventAction["FILE-UPLOAD-START"],m.z.EventLabel.CONVERT,`${e.metadata.file.name}`),n.processorMetadataList[0].uploadType===v.qn.SERVER){let t,i=(e=>{let t=0,r=e;return e=>{if(this.logger.trace7({message:"GoogleDrive file upload progress response",data:e}),e.uuid===r.getFile().name){let n=100*(t=parseFloat(e.data)>t?parseFloat(e.data):t)/r.getFile().size;(t===r.getFile().size||100===(0,S.A)(n+"",10))&&r.setComplete(),"completed"===e.processStageSubState&&(r.setComplete(),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.NETWORK,m.z.EventAction["FILE-UPLOAD-END"],m.z.EventLabel.CONVERT,`${r.metadata.file.name}`),this.wsService.unregisterCallback(i)),r.getComplete()?r.setProgress(parseFloat(parseFloat("100").toFixed(2))):r.setProgress(parseFloat(parseFloat(n+"").toFixed(2)))}}})(e);this.wsService.registerCallback(i);let o=T.N.getUploadEndpoint(n.processorMetadataList[0])+"/google-drive",s={kind:"drive",size:e.getFile().size,endpoint:o,attempt:r?.attempt},a=Date.now();this.emitUploadEvent(A.O.FILE_UPLOAD_START,s);try{t=await (0,l._)(this.http.post(o,e.getFile(),{params:{wsId:this.wsService.getId(),wsDomain:this.wsService.getDomain(),safeFilename:e.metadata.processorMetadataList[0].fileMetadata.safeName}}))}catch(e){throw this.emitUploadEvent(A.O.FILE_UPLOAD_ERROR,s,{ms:Date.now()-a,...this.uploadErrorAttributes(e)}),this.wsService.unregisterCallback(i),e}this.emitUploadEvent(A.O.FILE_UPLOAD_COMPLETE,s,{ms:Date.now()-a});let c={ftype:(0,y.rB)(e.getFile()),fname:e.getFile().name,fsize:e.getFile().size,flastModified:e.getFile().lastModified},u=t.originalInputFiles[0];return u.metadata=c,u}throw Error(`Unsupported upload type for Google Drive upload: ${n.processorMetadataList[0].uploadType}`)}async uploadFileFromLocalDisk(e,t,r){this.notifyFileUploadStart();let n=e.getMetadata();if(this.logger.trace7({message:"File upload from disk",data:n}),-1!==n.processorMetadataList[0].uploadDomain.indexOf("localhost")&&this.uiContext.errorToast("Error","Running in Test Mode.",!1,!1),r?.suppressGAStart||this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.NETWORK,m.z.EventAction["FILE-UPLOAD-START"],m.z.EventLabel.CONVERT,`${e.metadata.file.name}`),n.processorMetadataList[0].uploadType===v.qn.SERVER){let i=this.chunkUploadEnabled?"res":"file",o=T.N.getUploadEndpoint(n.processorMetadataList[0])+`/${i}`,s=e.getFile(),a={kind:this.chunkUploadEnabled?"local_chunk":"local_single",size:s.size,endpoint:o,attempt:r?.attempt},l=this.chunkUploadEnabled?{chunks:Math.max(1,Math.ceil(s.size/this.getChunkSize(s.size)))}:{},c=Date.now();return this.emitUploadEvent(A.O.FILE_UPLOAD_START,a,l),this.uploadSingleFile(o,e.getMetadata(),e.getFile(),t,e).then(t=>(this.emitUploadEvent(A.O.FILE_UPLOAD_COMPLETE,a,{...l,ms:Date.now()-c}),this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.NETWORK,m.z.EventAction["FILE-UPLOAD-END"],m.z.EventLabel.CONVERT,`${e.metadata.file.name}`),t)).catch(t=>{if((0,g.N1)(t))throw this.logger.trace7({message:`Disk file upload cancelled ${e.uuid}`,data:l}),t;throw this.emitUploadEvent(A.O.FILE_UPLOAD_ERROR,a,{...l,ms:Date.now()-c,...this.uploadErrorAttributes(t)}),this.logger.error({message:`Disk file upload failed due to ${t.message}`,error:t}),r?.suppressGAFailed||this.gaService.send(m.z.HitType.EVENT,m.z.EventCategory.MESSAGE,m.z.EventAction["FILE-UPLOAD-FAILED"],m.z.EventLabel.CONVERT,""),r?.suppressErrorDialog||this.uiContext.showErrorDialog({title:"Error",text:"Could not update the file"}),t})}throw Error(`Unsupported upload type: ${n.processorMetadataList[0].uploadType}`)}uploadSingleFile(e,t,r,n,i){return this.chunkUploadEnabled?r&&0===r.size?Promise.reject(U(r.name)):new Promise((o,s)=>{let a={ftype:(0,y.rB)(r),fname:r.name,fsize:r.size,flastModified:r.lastModified};this.chunkUploadSingleFile(e,t,r,n,i).then(e=>{o(Object.assign(e.originalInputFiles[0],{metadata:a}))}).catch(s)}):this.directUploadSingleFile(e,t,r,n)}directUploadSingleFile(e,t,r,n){let i=t.processorMetadataList[0].fileMetadata.safeName,o=O.$.uuid(),s=new FormData;s.append("files",r);let a={ftype:(0,y.rB)(r),fname:r.name,fsize:r.size,flastModified:r.lastModified};return new Promise((t,l)=>{this.refreshService.ensureFreshAccessToken(e).subscribe(()=>{let c=r.size,{response$:u,events$:d}=this.http.request(e,"POST",s,{headers:this.http.getCommonHeaders(e),params:{safeName:i,uuid:o}}),h=d.subscribe(e=>{if("upload_progress"===e.type){let t=Math.round(100*e.event.loaded/c);n.next(t)}});u.subscribe({next:e=>{h.unsubscribe(),t(Object.assign(e.originalInputFiles[0],{metadata:a})),n.complete()},error:e=>{h.unsubscribe(),l(e)}})})})}getChunkSize(e){let t=1048576,r=0,n=0;return e<1048576?(r=this.chunkSize1MB,n=102400):e<10*t?(r=this.chunkSize10MB,n=524288):e<100*t?(r=this.chunkSize100MB,n=+t):e<500*t?(r=this.chunkSize500MB,n=2*t):(r=this.chunkSizeLargeFiles,n=5*t),(r||this.chunkSize||n)+1}chunkUploadSingleFile(e,t,r,n,i){return new Promise((()=>{let o=t.processorMetadataList[0].fileMetadata.safeName;return(t,a)=>{this.refreshService.ensureFreshAccessToken(e).subscribe(()=>{let l=e,c={originalInputFiles:[]},u=O.$.uuid(),d=!1,h=!1,p=new(s())({target:l,chunkSize:this.getChunkSize(r.size),forceChunkSize:!0,simultaneousUploads:this.simultaneousUploads,testChunks:!1,method:"octet",prioritizeFirstAndLastChunk:!0,maxChunkRetries:5,chunkRetryInterval:3e3,...{permanentErrors:[400,404,406,409,415,501]},query:{safeName:o,uuid:u},maxFileSize:this.maxFileSizeInBytes,minFileSizeErrorCallback:e=>{d||h||(d=!0,a(U(e?.fileName||e?.name||r.name)))},maxFileSizeErrorCallback:e=>{d||h||(d=!0,a($(e?.fileName||e?.name||r.name,this.maxFileSizeInMB)))},headers:this.http.getCommonHeaders(l)});p.support||(alert("Your browser does not support this feature"),this.logger.error({message:"Your browser does not support this feature",data:{url:e}}));let f=()=>{this.chunkUploads.delete(u)};this.chunkUploads.set(u,{resumable:p,cancel:()=>{if(!h){h=!0,f();try{p.cancel()}catch(e){this.logger.error({message:`Error thrown by file uploader on cancel ${u}`,error:e,data:{uploadUUID:u}})}this.logger.trace7({message:`Chunk file upload cancelled ${u}`,data:{url:e,uploadUUID:u}}),a(new g.xT(i?.uuid??u))}}}),i&&"function"==typeof i.bindCancel&&i.bindCancel(()=>{this.cancelChunkUpload(u)}),p.on("fileProgress",(e,t)=>{if(h)return;let r=p.progress();n.next(parseFloat(parseFloat(100*r+"").toFixed(2)))}),p.on("fileSuccess",(t,r)=>{if(!h){this.logger.trace7({message:`Chunk file upload succcessfully ended. ${r}`});try{if((0,E.A)(r)){let e=JSON.parse(r);e.originalInputFiles&&c.originalInputFiles.push(...e.originalInputFiles)}}catch(t){this.logger.fatal({message:"Error thrown while generating accuReply.originalInputFiles: "+r+` ${u}`,error:t,data:{url:e,uploadUUID:u}}),d=!0}}}),p.on("complete",(r,i)=>{h||(f(),d||0===c.originalInputFiles.length?this.updateFileUploadFileOriginalInputFilesAndResolve(e,u,o,c,n,t,a):(this.logger.trace7({message:`Chunk file upload completed. ${i}`}),n.complete(),t(c)))}),p.on("catchAll",(e,...t)=>{}),p.on("cancel",()=>{f()}),p.on("fileAdded",(e,t)=>{p.upload()}),p.on("error",(e,t)=>{h||(f(),this.logger.error({error:Error(e),message:` Error thrown by file uploader: ${e} ${u}`,data:{uploadUUID:u}}),d=!0,a(e))}),p.addFile(r)})}})())}updateFileUploadFileOriginalInputFilesAndResolve(e,t,r,n,i,o,s){this.http.get(e+"/original-input-files",{params:{uuid:t,safeName:r}}).pipe((0,h.Z)(r=>r&&r.originalInputFiles?(0,c.of)(r):(0,c.of)({}).pipe((0,p.c)(2e3),(0,h.Z)(()=>(0,u.$)(()=>{let n=Error(`Request to get original uploaded file data returned null. ${t} ${r} ${e}`);return n[N]=!0,n})))),(0,d.L)({count:3,delay:2e3})).subscribe({next:r=>{this.logger.trace7({message:`Chunk upload completed ${t}`,data:{url:e,resp:r}}),n.originalInputFiles.push(...r.originalInputFiles),i.complete(),o(n)},error:r=>{s(r),this.logger.error({message:`Error file upload through chunk upload.${t}`,error:r,data:{url:e}}),this.uiContext.showErrorDialog({title:"Upload failed",text:"We could not upload your file. Please refresh the page and try again."})}})}}B=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(x.jo)),(0,n.Qj)(1,(0,i.WQ)(F.V)),(0,n.Qj)(2,(0,i.WQ)(C.k)),(0,n.Qj)(3,(0,i.WQ)(R._)),(0,n.Qj)(4,(0,i.WQ)(I.u)),(0,n.Qj)(5,(0,i.WQ)(P.w)),(0,n.Qj)(6,(0,i.WQ)(D.h)),(0,n.Qj)(7,(0,i.WQ)(k.H)),(0,n.Qj)(8,(0,i.WQ)(M.f)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===x.jo?Object:x.jo,void 0===F.V?Object:F.V,void 0===C.k?Object:C.k,void 0===R._?Object:R._,void 0===I.u?Object:I.u,void 0===P.w?Object:P.w,void 0===D.h?Object:D.h,void 0===k.H?Object:k.H,void 0===M.f?Object:M.f])],B)},77256:(e,t,r)=>{"use strict";r.d(t,{X:()=>n});var n=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},77328:(e,t,r)=>{e.exports=r(88022)},77697:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}},77698:(e,t,r)=>{"use strict";function n(e){return"function"==typeof e}r.d(t,{T:()=>n})},77718:e=>{e.exports="1.6.1"},78204:(e,t,r)=>{"use strict";function n(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}r.d(t,{L:()=>n})},78297:(e,t,r)=>{"use strict";r.d(t,{ci:()=>s,jD:()=>o});var n=r(99742);let i="/__xcdev/h";function o(){return"1"===n.env.NEXT_PUBLIC_XC_DEV_PROXY}function s(e){let t=String(e||"").replace(/^.*?:\/\//i,"").replace(/\/+$/,"");return`${i}/${t}`}},78304:(e,t,r)=>{"use strict";r.d(t,
51{A:()=>o});var n=r(43754),i=r(48710);let o=function(e){return null!=e&&(0,i.A)(e.length)&&!(0,n.A)(e)}},78483:e=>{e.exports=function(e){return this.__data__.get(e)}},78583:(e,t,r)=>{var n=r(48872),i=1,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,s,a,l){var c=r&i,u=n(e),d=u.length;if(d!=n(t).length&&!c)return!1;for(var h=d;h--;){var p=u[h];if(!(c?p in t:o.call(t,p)))return!1}var f=l.get(e),g=l.get(t);if(f&&g)return f==t&&g==e;var m=!0;l.set(e,t),l.set(t,e);for(var v=c;++h<d;){var y=e[p=u[h]],b=t[p];if(s)var S=c?s(b,y,p,t,e,l):s(y,b,p,e,t,l);if(!(void 0===S?y===b||a(y,b,r,s,l):S)){m=!1;break}v||(v="constructor"==p)}if(m&&!v){var E=e.constructor,w=t.constructor;E!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof E&&E instanceof E&&"function"==typeof w&&w instanceof w)&&(m=!1)}return l.delete(e),l.delete(t),m}},78598:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},78619:(e,t,r)=>{"use strict";r.d(t,{$:()=>n});var n={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},78710:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(90634),i=r(90667),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;let a=s?function(e){return null==e?[]:(e=Object(e),(0,n.A)(s(e),function(t){return o.call(e,t)}))}:i.A},79347:(e,t,r)=>{"use strict";r.d(t,{LK:()=>C,S6:()=>I,jo:()=>x});var n=r(4902),i=r(43604),o=r(68246),s=r(18476),a=r(33441),l=r(45019),c=r(44492),u=r(16579),d=r(35209),h=r(54631),p=r(6155),f=r(1636),g=r(22902),m=r(40405),v=r(66338),y=r(12533),b=r(25050),S=r(32607),E=r(61827),w=r(51352),_=r(9968),A=r(79794),T=r(2807);let O=/\/v1\/api\/bulk-zip(\/|\?|$)/;class C extends Error{constructor(e="Too many sign-ins from your network. Please wait a minute and try again.",t=0){super(e),this.name="Too many sign-ins",this.retryAt=t}}let I=[RegExp("^https://storage.googleapis.com.*","i"),RegExp("^https://checkip.amazonaws.com.*","i"),RegExp(".*style.*","i")];class P{static{this.UPLOAD_LOADSTART="upload_loadstart"}static{this.UPLOAD_LOAD="upload_load"}static{this.UPLOAD_PROGRESS="upload_progress"}static{this.DOWNLOAD_LOADSTART="download_loadstart"}static{this.DOWNLOAD_LOAD="download_load"}static{this.DOWNLOAD_PROGRESS="download_progress"}}class x{static{this.wsDataProvider={getOrCreateStoredWSId:()=>null,getStoredWSDomain:()=>null}}static{this.loginUserDetailsProvider={userIpAddress:null,userCountry:null}}static{this.commonHttpHeadersProvider={getCommonHttpHeaders:()=>({})}}static{this.authTokenProvider={getToken:()=>null}}static{this.refreshEnabled=!1}
51static{this.refreshProvider=null}static{this.stepUpProvider=null}static{this.apiErrorSink=null}static{this.identityGate={wait:()=>null}}constructor(e,t,r){this.apiConfig=e,this.env=t,this.domStorage=r}post(e,t,r){return this.request(e,"POST",t,r).response$}put(e,t,r){return this.request(e,"PUT",t,r).response$}patch(e,t,r){return this.request(e,"PATCH",t,r).response$}get(e,t){return this.request(e,"GET",null,t).response$}delete(e,t){return this.request(e,"DELETE",null,t).response$}request(e,t,r,n={}){if(!n?.__identityWaited&&O.test(e)&&!x.authTokenProvider.getToken()){let i=x.identityGate.wait();if(i)return this.afterIdentity(e,t,r,n,i)}if(x.refreshEnabled&&null!=x.refreshProvider&&!x.refreshProvider.cookieSessionUnavailable&&!n?.__isAuthRetry&&!this.isAuthEndpoint(e)&&!I.find(t=>t.test(e))){let i=x.authTokenProvider.getToken();if(i&&!(0,y.FJ)(i)&&(0,y.hC)(i))return this.refreshThenRequest(e,t,r,n)}this.mergeUserRequestedHeadersWithDefaultHeaders(e,n);let i=this.resolveAcceptHeader(n.headers),h={url:e,method:t,includeDownloadProgress:!0,includeUploadProgress:!0,body:r,...n.params&&{queryParams:n.params},...n.headers&&{headers:n.headers},...n.withCredentials&&{withCredentials:n.withCredentials},...n.responseType&&{responseType:n.responseType},...n.timeout&&{timeout:n.timeout}},p=new o.m(1),g=Date.now();return{response$:(0,f.R)(h).pipe((0,s.M)(e=>{if("download_load"!=e.type)p.next(this.convertToProgressEvent(e));else{let t=e.xhr?.getAllResponseHeaders?.()||"",r=/^date:\s*(.+)$/im.exec(t);(0,v.zj)(r?r[1].trim():null)}}),(0,a.p)(e=>"download_load"==e.type),(0,l.T)(e=>e.response),(0,c.W)(o=>{let s=Date.now()-g;(0,b.Dh)(x.apiErrorSink,e,t,o,s);let a=this.convertErrorResponse(o,{requestUrl:e,elapsedMs:s,requestAcceptHeader:i}),l=this.maybeReactiveRefreshReplay(e,t,r,n,a);if(l)return l;let c=this.maybeStepUpReplay(e,t,r,n,a);return c||(0,u.$)(()=>a)}),(0,d.j)(()=>p.complete())),events$:p.asObservable()}}isAuthEndpoint(e){return -1!==e.indexOf("/v1/api/auth/")}isUserDetailsEndpoint(e){return -1!==e.indexOf("/v1/api/auth/user-details")}maybeReactiveRefreshReplay(e,t,r,n,i){if(!x.refreshEnabled||null==x.refreshProvi
51der||x.refreshProvider.cookieSessionUnavailable||n?.__isAuthRetry||this.isAuthEndpoint(e)||this.isUserDetailsEndpoint(e)||I.find(t=>t.test(e)))return null;let o=i?.status,s=i?.authError,a="invalid_token"===s,l=null==s&&401===o;if(!a&&!l)return null;let c=x.authTokenProvider.getToken();if(!c||(0,y.FJ)(c))return null;let u={...n,__isAuthRetry:!0};if(u.headers&&(u.headers.Authorization||u.headers.authorization)){let e={...u.headers};delete e.Authorization,delete e.authorization,u.headers=e}return x.refreshProvider.refresh().pipe((0,h.n)(()=>this.request(e,t,r,u).response$))}maybeStepUpReplay(e,t,r,n,i){if(!x.refreshEnabled||null==x.stepUpProvider||n?.__isAuthRetry||this.isAuthEndpoint(e)||I.find(t=>t.test(e))||"step_up_required"!==i?.authError)return null;let o=x.authTokenProvider.getToken();if(!o||(0,y.FJ)(o))return null;let s={...n,__isAuthRetry:!0};if(s.headers&&(s.headers.Authorization||s.headers.authorization)){let e={...s.headers};delete e.Authorization,delete e.authorization,s.headers=e}return x.stepUpProvider.elevate().pipe((0,h.n)(()=>this.request(e,t,r,s).response$))}afterIdentity(e,t,r,n,i){let s=new o.m(1),a=null,l=()=>(a||(a=this.request(e,t,r,{...n,__identityWaited:!0})).events$.subscribe({next:e=>s.next(e),error:e=>s.error(e),complete:()=>s.complete()}),a);return{response$:(0,p.H)(i).pipe((0,c.W)(e=>{let t=e??new C("We could not start your session. Please reload the page and try again.");return s.error(t),(0,u.$)(()=>t)}),(0,h.n)(()=>l().response$)),events$:s.asObservable()}}refreshThenRequest(e,t,r,n){let i=new o.m(1),s=null,a={...n,__isAuthRetry:!0};if(a.headers&&(a.headers.Authorization||a.headers.authorization)){let e={...a.headers};delete e.Authorization,delete e.authorization,a.headers=e}let l=()=>(s||(s=this.request(e,t,r,a)).events$.subscribe({next:e=>i.next(e),error:e=>i.error(e),complete:()=>i.complete()}),s);
51return{response$:x.refreshProvider.refreshAcrossTabs().pipe((0,h.n)(()=>l().response$)),events$:i.asObservable()}}convertToProgressEvent(e){return"upload_progress"===e.type||"download_progress"===e.type?{event:{loaded:e.loaded,total:e.total},type:"upload_progress"===e.type?"upload_progress":"download_progress"}:{event:{loaded:0,total:0},type:e.type}}convertErrorResponse(e,t){let r=t?.elapsedMs!=null?` (${t.elapsedMs}ms)`:"",n=(0,E._)(e);if(0==e.status){let n=(0,g.A)(e||{},"xhr.responseURL",t?.requestUrl);(!n||0==n.length)&&t?.requestUrl&&(n=t?.requestUrl);let i=new w.$t(`Unable to reach the server. Possible causes could be server is offline, your connection to the server is blocked or you are offline. ${n}${r}`,t?.requestAcceptHeader);return i.status=0,i}let i=(0,m.A)(e.status/100+"");if(4===i){let i=new w.MZ(this.getErrorMessage(e,t)+r,e.response,e.status,this.parseAuthErrorMarker(e),t?.requestAcceptHeader);return void 0!==n&&(i.retryAfterSeconds=n),i}if(5===i){let i=new w._7(this.getErrorMessage(e,t)+r,e.status,t?.requestAcceptHeader);return i.response=e.response,void 0!==n&&(i.retryAfterSeconds=n),i}{let i=new w.$t(this.getErrorMessage(e,t)+r,t?.requestAcceptHeader);return i.status=e.status,void 0!==n&&(i.retryAfterSeconds=n),i}}resolveAcceptHeader(e){let t=e?.Accept??e?.accept;return null!=t&&""!==t?String(t):"<none>"}parseAuthErrorMarker(e){try{let t=e?.xhr?.getResponseHeader?.("WWW-Authenticate");if(!t)return;let r=/error="([^"]+)"/i.exec(t);return r?r[1]:void 0}catch{return}}getErrorMessage(e,t){let r=(0,g.A)(e,"response.message")||(0,g.A)(e,"response.error"),n=(0,g.A)(e,"xhr.responseURL");if(r)return r;if(e.status||0===e.status)return e.response?`${e.status} - ${"object"==typeof e.response?JSON.stringify(e.response):e.response}`:n?`${e.status} - unknow error while connecting to ${n}`:`${e.status} - unknow error`;var i=n||t?.requestUrl;return i?`Unknow error while connecting to ${i}`:"Unknow error"}mergeUserRequestedHeadersWithDefaultHeaders(e,t){t.headers||(t.headers={});let r=Object.assign({},this.getCommonHeaders(e),t.headers);t.headers=r}getCommonHeaders(e){let t={},r=x.authTokenProvider.getToken();if(!I.find(t=>t.test(e))){t=Object.assign({},t=x.commonHttpHeadersProvider.getCommonHttpHeaders(),{sitename:`${this.apiConfig.apiDomainName}`,domainname:`${this.env?.domainname??window.location.host}`,...x.loginUserDetailsProvider.userIpAddress?{"ip-address":x.loginUserDetailsProvider.userIpAddress}:null,...x.loginUserDetailsProvider.userCountry?{country:x.loginUserDetailsProvider.userCountry}:null,wsId:`${x.wsDataProvider.getOrCreateStoredWSId()}`,wsDomain:`${x.wsDataProvider.getStoredWSDomain()}`}),r&&(t.Authorization=`Bearer ${r}`);let e=(0,S.kC)();e&&Object.assign(t,e)}return t}static registerWSDetailProvider(e){x.wsDataProvider=e}static registerLoginUserDetailsProvider(e){x.loginUserDetailsProvider=e}static registerCommonHttpHeadersProvider(e){x.commonHttpHeadersProvider=e}static registerAuthTokenProvider(e){x.authTokenProvider=e}static registerIdentityGate(e){x.identityGate=e}
51static registerRefreshProvider(e){x.refreshProvider=e}static registerStepUpProvider(e){x.stepUpProvider=e}static setRefreshEnabled(e){x.refreshEnabled=e}static registerApiErrorSink(e){x.apiErrorSink=e}}x=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(_.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(T.v)),(0,n.Qj)(2,(0,i.WQ)(A.O)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===_.ApiConfig?Object:_.ApiConfig,void 0===T.v?Object:T.v,void 0===A.O?Object:A.O])],x)},79364:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},79699:(e,t,r)=>{"use strict";r.d(t,{A9:()=>I,b7:()=>C,in:()=>E,n2:()=>O,xB:()=>w,zP:()=>P});var n=r(89099),i=r.n(n);let o=/\[\.{0,3}([^\]]+)\]/g;function s(){return window.location.search||""}let a=null,l=!1,c=!1;function u(e){return"?"===e.charAt(0)?e.slice(1):e}function d(){return window.location.pathname||""}function h(e){return d()===e.pathname&&u(s())===e.search}function p(e){return d()!==e.pathname}function f(){null!==a&&(h(a)||p(a))&&(a=null)}function g(e,t){if(null!==a){if("string"!=typeof t||t===a.as){a=null;return}f()}}function m(){a=null}function v(){if(c||(window.addEventListener("popstate",m),window.addEventListener("pageshow",m),c=!0),l)return;let e=i().events;e&&(e.on("routeChangeComplete",f),e.on("routeChangeError",g),l=!0)}function y(){return null===a?s():h(a)||p(a)?(a=null,s()):a.search}let b=!1;function S(e){b||(b=!0,console.debug("[route-state] no mounted Next router; URL left unchanged",e))}function E(e,t){let r=void 0!==t?t:s();return r?new URLSearchParams(r).get(e):null}function w(e,t){let r=new URLSearchParams((void 0!==t?t:s())||""),n={};for(let t of e)n[t]=r.get(t);return n}function _(){try{let e=i().pathname;if("string"!=typeof e||0===e.length)return null;let t=i().query||{},r={};for(let n of e.matchAll(o)){let e=n[1],i=t[e];void 0!==i&&(r[e]=i)}return{pathname:e,params:r}}catch(e){return S(e),null}}function A(e){e&&"function"==typeof e.then&&Promise.resolve(e).catch(()=>void 0)}function T(e,t){let r=new URLSearchParams(y());for(let t of Object.keys(e)){let n=e[t];null===n||""===n?r.delete(t):r.set(t,n)}let n=r.toString(),o=_();if(!o)return;let s=window.location.pathname,l=`${s}${n?`?${n}`:""}${window.location.hash||""}`,c={...o.params};r.forEach((e,t)=>{c[t]=e});let u={pathname:o.pathname,query:c},d={shallow:!0,scroll:!1};v();try{A("push"===t?i().push(u,l,d):i().replace(u,l,d))}catch(e){S(e);return}a={search:n,pathname:s,as:l}}function O(e){T(e,"push")}function C(e){T(e,"replace")}function I(e,t){t?.replace?C({tab:e}):O({tab:e})}function P(e){let t=()=>e(),r=i().events;return r&&r.on("routeChangeComplete",t),window.addEventListener("pageshow",t),()=>{r&&r.off("routeChangeComplete",t),window.removeEventListener("pageshow",t)}}},79794:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(4902),i=r(43604),o=r(8365);class s{static{this.TYPE="DOMStorage"}constructor(){this.appComponentReady=!1,this.baseComponentReady=!1}setAppComponentReadyAndFreezeContentIfNeeded(){this.appComponentReady=!0}setBaseComponentReadyAndFreezeContentIfNeeded(){this.baseComponentReady=!0}freezeIfNeeded(){this.appComponentReady&&this.baseComponentReady&&(this.load(),this.content.frozen=!0,this.persist())}memStore(e,t){if(this.load(),this.content){if(this.content.frozen)return void console.error(`Content is frozen. Not storing key: ${e}`)}else this.content={};this.content[e]=t,this.persist()}get(e){return this.load(),this.content&&this.content[e]}persist(){let e=encodeURIComponent(JSON.stringify(this.content));if(!o.C.hasDocument())return void console.error("Requested execution aborted since document was not available");let t=document,r=t.querySelector('script[type="__PS_DATA__"]');r||((r=t.createElement("script")).type="__PS_DATA__",t.body.appendChild(r)),r.textContent=e}load(){if(!o.C.hasDocument())return void console.error("Requested execution aborted since document was not available");let e=document,t=e.querySelector('script[type="__PS_DATA__"]');t||((t=e.createElement("script")).type="__PS_DATA__",e.body.appendChild(t));let r=t.textContent;try{r&&r.length>0?this.content=JSON.parse(decodeURIComponent(r)):this.content={}}catch(e){this.content={}}}}s=(0,n.Cg)([(0,i._G)(),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[])],s)},80279:(e,t,r)=>{"use strict";r.d(t,{A:()=>Q});var n=r(97725),i=r(9079);let o=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};var s=r(51461),a=1,l=2;let c=function(e,t,r,n,c,u){var d=r&a,h=e.length,p=t.length;if(h!=p&&!(d&&p>h))return!1;var f=u.get(e),g=u.get(t);if(f&&g)return f==t&&g==e;var m=-1,v=!0,y=r&l?new i.A:void 0;for(u.set(e,t),u.set(t,e);++m<h;){var b=e[m],S=t[m];if(n)var E=d?n(S,b,m,t,e,u):n(b,S,m,e,t,u);if(void 0!==E){if(E)continue;v=!1;break}if(y){if(!o(t,function(e,t){if(!(0,s.A)(y,t)&&(b===e||c(b,e,r,n,u)))return y.push(t)})){v=!1;break}}else if(!(b===S||c(b,S,r,n,u))){v=!1;break}}return u.delete(e),u.delete(t),v};var u=r(76611),d=r(21194),h=r(11396);let p=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r};var f=r(16257),g=1,m=2,v="[object Boolean]",y="[object Date]",b="[object Error]",S="[object Map]",E="[object Number]",w="[object RegExp]",_="[object Set]",A="[object String]",T="[object Symbol]",O="[object ArrayBuffer]",C="[object DataView]",I=u.A?u.A.prototype:void 0,P=I?I.valueOf
51:void 0;let x=function(e,t,r,n,i,o,s){switch(r){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case O:if(e.byteLength!=t.byteLength||!o(new d.A(e),new d.A(t)))break;return!0;case v:case y:case E:return(0,h.A)(+e,+t);case b:return e.name==t.name&&e.message==t.message;case w:case A:return e==t+"";case S:var a=p;case _:var l=n&g;if(a||(a=f.A),e.size!=t.size&&!l)break;var u=s.get(e);if(u)return u==t;n|=m,s.set(e,t);var I=c(a(e),a(t),n,i,o,s);return s.delete(e),I;case T:if(P)return P.call(e)==P.call(t)}return!1};var k=r(98376),M=1,D=Object.prototype.hasOwnProperty;let R=function(e,t,r,n,i,o){var s=r&M,a=(0,k.A)(e),l=a.length;if(l!=(0,k.A)(t).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in t:D.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var p=!0;o.set(e,t),o.set(t,e);for(var f=s;++c<l;){var g=e[u=a[c]],m=t[u];if(n)var v=s?n(m,g,u,t,e,o):n(g,m,u,e,t,o);if(!(void 0===v?g===m||i(g,m,r,n,o):v)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var y=e.constructor,b=t.constructor;y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(p=!1)}return o.delete(e),o.delete(t),p};var F=r(66641),N=r(4527),L=r(36670),j=r(12610),U=1,$="[object Arguments]",B="[object Array]",W="[object Object]",z=Object.prototype.hasOwnProperty;let H=function(e,t,r,i,o,s){var a=(0,N.A)(e),l=(0,N.A)(t),u=a?B:(0,F.A)(e),d=l?B:(0,F.A)(t);u=u==$?W:u,d=d==$?W:d;var h=u==W,p=d==W,f=u==d;if(f&&(0,L.A)(e)){if(!(0,L.A)(t))return!1;a=!0,h=!1}if(f&&!h)return s||(s=new n.A),a||(0,j.A)(e)?c(e,t,r,i,o,s):x(e,t,u,r,i,o,s);if(!(r&U)){var g=h&&z.call(e,"__wrapped__"),m=p&&z.call(t,"__wrapped__");
51if(g||m){var v=g?e.value():e,y=m?t.value():t;return s||(s=new n.A),o(v,y,r,i,s)}}return!!f&&(s||(s=new n.A),R(e,t,r,i,o,s))};var G=r(75438);function V(e,t,r,n,i){return e===t||(null!=e&&null!=t&&((0,G.A)(e)||(0,G.A)(t))?H(e,t,r,n,V,i):e!=e&&t!=t)}let Q=V},80400:(e,t,r)=>{"use strict";var n=r(93570),i=r(63536),o=r(27540),s=r(1878),a=r(9282);function l(e){if(!a.enabled&&!s.enabled)throw Error("Transport created when disabled");i.call(this,e,"/xhr",o,s)}n(l,i),l.enabled=function(e){return!e.nullOrigin&&(!!a.enabled&&!!e.sameOrigin||s.enabled)},l.transportName="xhr-polling",l.roundTrips=2,e.exports=l},80967:(e,t,r)=>{"use strict";r.d(t,{Ms:()=>b,vU:()=>g});var n=r(4902),i=r(77698),o=r(18947),s=r(78619),a=r(86823),l=r(20986),c=function(){return h("C",void 0,void 0)}();function u(e){return h("E",void 0,e)}function d(e){return h("N",e,void 0)}function h(e,t,r){return{kind:e,value:t,error:r}}var p=r(65111),f=r(75555),g=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,(0,o.Uv)(t)&&t.add(r)):r.destination=_,r}return(0,n.C6)(t,e),t.create=function(e,t,r){return new b(e,t,r)},t.prototype.next=function(e){this.isStopped?w(d(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?w(u(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?w(c,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(o.yU),m=Function.prototype.bind;function v(e,t){return m.call(e,t)}var y=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){S(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){S(e)}else S(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){S(e)}},e}(),b=function(e){function t(t,r,n){var o,a,l=e.call(this)||this;return(0,i.T)(t)||!t?o={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:l&&s.$.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return l.unsubscribe()},o={next:t.next&&v(t.next,a),error:t.error&&v(t.error,a),complete:t.complete&&v(t.complete,a)}):o=t,l.destination=new y(o),l}return(0,n.C6)(t,e),t}(g);function S(e){s.$.useDeprecatedSynchronousErrorHandling?(0,f.l)(e):(0,a.m)(e)}function E(e){throw e}function w(e,t){var r=s.$.onStoppedNotification;r&&p.f.setTimeout(function(){return r(e,t)})}var _={closed:!0,next:l.l,error:E,complete:l.l}},81334:(e,t,r)=>{var n=r(93007);e.exports=function(){if(!arguments.length)return[];var e=arguments[0];return n(e)?e:[e]}},81365:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=(0,r(75999).A)(Object.getPrototypeOf,Object)},81370:(e,t)=>{"use strict";t.byteLength=c,t.toByteArray=d,t.fromByteArray=f;for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function c(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n}function u(e,t,r){return(t+r)*3/4-r}function d(e){var t,r,o=l(e),s=o[0],a=o[1],c=new i(u(e,s,a)),d=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[d++]=t>>16&255,c[d++]=t>>8&255,c[d++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[d++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[d++]=t>>8&255,c[d++]=255&t),c}function h(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function p(e,t,r){for(var n=[],i=t;i<r;i+=3)n.push(h((e[i]<<16&0xff0000)+(e[i+1]<<8&65280)+(255&e[i+2])));return n.join("")}function f(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,l=n-i;a<l;a+=s)o.push(p(e,a,a+s>l?l:a+s));return 1===i?o.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&o.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),o.join("")}n[45]=62,n[95]=63},81914:(e,t,r)=>{"use strict";r.d(t,{s:()=>u});var n=r(4902),i=r(43604),o=r(45019),s=r(51352),a=r(9968),l=r(79347),c=r(29238);class u{constructor(e,t,r){this.apiConfig=e,this.http=t,this.loginService=r}list(e=!1){this.requireLogin();let t=`${this.apiConfig.getWebhookEndpointsEndpoint()}?includeStopped=${e?"true":"false"}`;return this.http.get(t).pipe(s.UW,(0,o.T)(e=>e?.endpoints??[]))}get(e){return this.requireLogin(),this.http.get(this.apiConfig.getWebhookEndpointByIdEndpoint(e)).pipe(s.UW)}create(e){if(this.requireLogin(),this.validateUrl(e.url),!e.enabledEvents||0===e.enabledEvents.length)throw Error("enabledEvents[] must be non-empty");return this.http.post(this.apiConfig.getWebhookEndpointsEndpoint(),e).pipe(s.UW)}update(e,t){return this.requireLogin(),this.http.put(this.apiConfig.getWebhookEndpointByIdEndpoint(e),t).pipe(s.UW)}stop(e){return this.requireLogin(),this.http.delete(this.apiConfig.getWebhookEndpointByIdEndpoint(e)).pipe(s.UW)}resume(e){return this.requireLogin(),this.http.post(this.apiConfig.getWebhookEndpointResumeEndpoint(e),{}).pipe(s.UW)}rotateSecret(e){return this.requireLogin(),this.http.post(this.apiConfig.getWebhookEndpointRotateSecretEndpoint(e),{}).pipe(s.UW)}acknowledgeSecret(e){return this.requireLogin(),this.http.post(this.apiConfig.getWebhookEndpointAckSecretEndpoint(e),{}).pipe(s.UW)}listDeliveries(e){return this.requireLogin(),this.http.get(this.apiConfig.getWebhookDeliveriesEndpoint(e)).pipe(s.UW,(0,o.T)(e=>e?.deliveries??[]))}redeliver(e,t){this.requireLogin();let r=this.apiConfig.getWebhookDeliveryRedeliverEndpoint(e),n=t?`${r}?targetEndpointId=${encodeURIComponent(t)}`:r;return this.http.post(n,{}).pipe(s.UW)}getDelivery(e){this.requireLogin();let t=this.apiConfig.getWebhookDeliveriesEndpoint().split("?")[0],r=`${t}/${encodeURIComponent(e)}`;return this.http.get(r).pipe(s.UW)}revealSecret(e,t){this.requireLogin();let r=`${this.apiConfig.getWebhookEndpointByIdEndpoint(e)}/reveal-secret`;return this.http.post(r,{password:t}).pipe(s.UW)}probeUrl(e){this.requireLogin();let t=`${this.apiConfig.getWebhookEndpointsEndpoint()}/probe-url`;return this.http.post(t,{url:e}).pipe(s.UW)}requireLogin(){if(!this.loginService.isUserLoggedIn)throw Error("WebhooksService: user must be logged in")}validateUrl(e){let t;if(!e||0===e.trim().length)throw Error("Webhook endpoint URL is required");try{t=new URL(e)}catch(t){throw Error(`Webhook endpoint URL is not a valid URL: ${e}`)}if("https:"!==t.protocol)throw Error("Webhook endpoint URL must use https:// (\xa75.5.6)")}}u=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(l.j
51o)),(0,n.Qj)(2,(0,i.WQ)(c.H)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.ApiConfig?Object:a.ApiConfig,void 0===l.jo?Object:l.jo,void 0===c.H?Object:c.H])],u)},82007:(e,t,r)=>{"use strict";var n=r(93570),i=r(72876);function o(){i.call(this)}n(o,i),o.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},o.prototype.once=function(e,t){var r=this,n=!1;function i(){r.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}this.on(e,i)},o.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var r=arguments.length,n=Array(r-1),i=1;i<r;i++)n[i-1]=arguments[i];for(var o=0;o<t.length;o++)t[o].apply(this,n)}},o.prototype.on=o.prototype.addListener=i.prototype.addEventListener,o.prototype.removeListener=i.prototype.removeEventListener,e.exports.b=o},82509:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(11027);let i=function(e){return e!=e},o=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1},s=function(e,t,r){return t==t?o(e,t,r):(0,n.A)(e,i,r)}},82675:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},82731:(e,t,r)=>{var n=r(91667),i=r(99969),o=r(72115),s=o&&o.isTypedArray;e.exports=s?i(s):n},82803:(e,t,r)=>{"use strict";r.d(t,{Tv:()=>M});var n=r(4902),i=r(71717),o=r(43604),s=r(86728),a=r(2943),l=r(7431),c=r(56706),u=r(32277),d=r(67375);function h(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,d.ms)(e),i=(0,l.K)(e);return i.length?new s.c(function(e){var t=i.map(function(){return[]}),o=i.map(function(){return!1});e.add(function(){t=o=null});for(var s=function(s){(0,a.Tg)(i[s]).subscribe((0,u._)(e,function(i){if(t[s].push(i),t.every(function(e){return e.length})){var a=t.map(function(e){return e.shift()});e.next(r?r.apply(void 0,(0,n.fX)([],(0,n.zs)(a))):a),t.some(function(e,t){return!e.length&&o[t]})&&e.complete()}},function(){o[s]=!0,t[s].length||e.complete()}))},l=0;!e.closed&&l<i.length;l++)s(l);return function(){t=o=null}}):c.w}var p=r(9120),f=r(68246),g=r(990),m=r(45019),v=r(1458),y=r(44492),b=r(18476),S=r(43629),E=r(12316),w=r(34203),_=r(51352),A=r(89365),T=r(9968),O=r(79347),C=r(90125),I=r(41451),P=r(92288);let x="/servers/resolve/domains",k="/servers/resolve/domains/echo";class M{constructor(e,t,r,n,i){this.apiConfig=e,this.http=t,this.storageService=r,this.settingsService=n,this.windowService=i}initialize$(){return h(this.settingsService.userSettings,this.windowService.userClicked).pipe((0,g.Z)(([e])=>(e.useEdgeTTL&&this.updateRTT(),(0,p.of)(e))))}updateRTT(){this.shouldUpdateEdgesRTT().pipe((0,g.Z)(e=>{if(e.update){var t=new f.m(1);return A.u.runWhenIdeal(()=>{this.updateEdgeRTTAndSave$().subscribe({next:e=>{t.next(e),t.complete()},error:e=>{t.error(e)}})}),t.asObservable()}return(0,p.of)({})})).subscribe({error:e=>{console.error("ConnectivityService: Failed to update RTT",e)}})}getEdgesRandomized(e){let t=this.storageService.get("ConnectivityService","ENDPOINT_RTT");return(0,E.A)((t||[]).slice(0,e))}preWarm(){this.updateRTT()}saveEdgesRTT(e){this.storageService.store("ConnectivityService","ENDPOINT_RTT",e),this.storageService.store("ConnectivityService","ENDPOINT_RTT_LAST_SAVED_DATE",new Date)}shouldUpdateEdgesRTT(){let e=this.storageService.get("ConnectivityService","ENDPOINT_RTT_LAST_SAVED_DATE"),t=this.storageService.get("ConnectivityService","ENDPOINT_RTT");if(!e||(0,w.A)(t))return(0,p.of)({update:!0});try{let t=(0,i.om)(Date,e);return(0,p.of)({update:S.W.fromDate(t).add(4,"hours").isBefore(S.W.fromDate(new Date))})}catch(e){return(0,p.of)({update:!0})}}updateEdgeRTTAndSave$(){let e=new ArrayBuffer(1024);return _.Nb.getSuccessValueOrThrow$([this.http.get(`${this.apiConfig.getHttpsEndpoint()}${x}`)]).pipe((0,g.Z)(t=>h(...t.map(e=>({start:new Date,end:null,domain:e.d,ncfEndpoint:`${T.ApiConfig.originForDomain(e.ncf)}${T.ApiConfig.edgePathPrefix}${k}`,rtt:Number.MAX_SAFE_INTEGER})).map(t=>this.http.post(t.ncfEndpoint,e).pipe((0,m.T)(()=>(t.end=new Date,t)),(0,v.w)(3500),(0,y.W)(e=>(0,p.of)(t))))).pipe((0,m.T)(e=>e.filter(e=>e.end).map(e=>(e.rtt=e.end.getTime()-e.start.getTime(),e)).sort((e,t)=>
51e.rtt-t.rtt)))),(0,b.M)(e=>{this.saveEdgesRTT(e)}))}}M=(0,n.Cg)([(0,o._G)(),(0,n.Qj)(0,(0,o.WQ)(T.ApiConfig)),(0,n.Qj)(1,(0,o.WQ)(O.jo)),(0,n.Qj)(2,(0,o.WQ)(I.n)),(0,n.Qj)(3,(0,o.WQ)(C.h)),(0,n.Qj)(4,(0,o.WQ)(P.s)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===T.ApiConfig?Object:T.ApiConfig,void 0===O.jo?Object:O.jo,void 0===I.n?Object:I.n,void 0===C.h?Object:C.h,void 0===P.s?Object:P.s])],M)},82909:(e,t,r)=>{"use strict";var n=r(81370),i=r(87247),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=S,t.INSPECT_MAX_BYTES=50;var s=0x7fffffff;function a(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}function l(e){if(e>s)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return p(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return f(e,t);if(ArrayBuffer.isView(e))return m(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return v(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return c.from(n,t,r);var i=y(e);if(i)return i;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function h(e,t,r){return(d(e),e<=0)?l(e):void 0!==t?"string"==typeof r?l(e).fill(t,r):l(e).fill(t):l(e)}function p(e){return d(e),l(e<0?0:0|b(e))}function f(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!c.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|E(e,t),n=l(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function g(e){for(var t=e.length<0?0:0|b(e.length),r=l(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function m(e){if(J(e,Uint8Array)){var t=new Uint8Array(e);return v(t.buffer,t.byteOffset,t.byteLength)}return g(e)}function v(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),c.prototype),n}function y(e){if(c.isBuffer(e)){var t=0|b(e.length),r=l(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?l(0):g(e):"Buffer"===e.type&&Array.isArray(e.data)?g(e.data):void 0}function b(e){if(e>=s)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function S(e){return+e!=e&&(e=0),c.alloc(+e)}function E(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function w(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return M(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return N(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function _(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function A(e,t,r,n,i){if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),Y(r*=1)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:T(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return T(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function T(e,t,r,n,i){var o,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,l/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=r;o<a;
vendor: 14,032 bytes, line 51
51o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*s}else -1!==u&&(o-=o-u),u=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){for(var d=!0,h=0;h<l;h++)if(c(e,o+h)!==c(t,h)){d=!1;break}if(d)return o}return -1}function O(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(Y(a))break;e[r+s]=a}return s}function C(e,t,r,n){return X(V(t,e.length-r),e,r,n)}function I(e,t,r,n){return X(Q(t),e,r,n)}function P(e,t,r,n){return X(K(t),e,r,n)}function x(e,t,r,n){return X(q(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function M(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=r)switch(d){case 1:c<128&&(u=c);break;case 2:(192&(o=e[i+1]))==128&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],s=e[i+2],(192&o)==128&&(192&s)==128&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],(192&o)==128&&(192&s)==128&&(192&a)==128&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=d}return R(n)}t.kMaxLength=0x7fffffff,c.TYPED_ARRAY_SUPPORT=a(),!c.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return h(e,t,r)},c.allocUnsafe=function(e){return p(e)},c.allocUnsafeSlow=function(e){return p(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:+(n<r)},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=c.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(J(o,Uint8Array))i+o.length>n.length?c.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else if(c.isBuffer(o))o.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n},c.byteLength=E,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)_(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this},c.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?M(this,0,e):w.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r),d=0;d<a;++d)if(l[d]!==u[d]){o=l[d],s=u[d];break}return o<s?-1:+(s<o)},c.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return A(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return A(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return O(this,e,t,r);case"utf8":case"utf-8":return C(this,e,t,r);case"ascii":case"latin1":case"binary":return I(this,e,t,r);case"base64":return P(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function R(e){var t=e.length;if(t<=D)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=D));return r}function F(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function N(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function L(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=Z[e[o]];return i}function j(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function U(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function $(e,t,r,n,i,o){if(!c.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function B(e,t,r,n,i,o){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function W(e,t,r,n,o){return t*=1,r>>>=0,o||B(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,o){return t*=1,r>>>=0,o||B(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||U(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||U(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||U(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||U(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||U(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||U(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return(e>>>=0,t||U(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||U(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||U(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||U(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||U(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||U(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||U(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;$(this,e,t,r,i,0)}var o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;$(this,e,t,r,i,0)}var o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);$(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);$(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||$(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,r){return W(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return W(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},c.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=c.isBuffer(e)?e:c.from(e,n),a=s.length;
51if(0===a)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var H=/[^+/0-9A-Za-z-_]/g;function G(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function V(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319||s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function Q(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function q(e,t){for(var r,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}function K(e){return n.toByteArray(G(e))}function X(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}var Z=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},82993:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(95528),i=r(4527);let o=function(e,t,r){var o=t(e);return(0,i.A)(e)?o:(0,n.A)(o,r(e))}},83497:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},83503:(e,t,r)=>{"use strict";r.d(t,{i:()=>a});var n=r(88485),i=r(67790),o=r(40738),s=r(61384);function a(e){let t,r;if("string"!=typeof e)throw new s.JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");let{1:a,length:l}=e.split(".");if(5===l)throw new s.JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");if(3!==l)throw new s.JWTInvalid("Invalid JWT");if(!a)throw new s.JWTInvalid("JWTs must contain a payload");try{t=(0,n.decode)(a)}catch{throw new s.JWTInvalid("Failed to base64url decode the payload")}try{r=JSON.parse(i.D0.decode(t))}catch{throw new s.JWTInvalid("Failed to parse the decoded payload as JSON")}if(!(0,o.Gv)(r))throw new s.JWTInvalid("Invalid JWT Claims Set");return r}},83594:(e,t,r)=>{"use strict";r.d(t,{p:()=>g});var n=r(86728),i=Array.isArray,o=Object.getPrototypeOf,s=Object.prototype,a=Object.keys;function l(e){if(1===e.length){var t=e[0];if(i(t))return{args:t,keys:null};if(c(t)){var r=a(t);return{args:r.map(function(e){return t[e]}),keys:r}}}return{args:e,keys:null}}function c(e){return e&&"object"==typeof e&&o(e)===s}var u=r(2943),d=r(67375),h=r(32277),p=r(88651);function f(e,t){return e.reduce(function(e,r,n){return e[r]=t[n],e},{})}function g(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=(0,d.ms)(e),i=l(e),o=i.args,s=i.keys,a=new n.c(function(e){var t=o.length;if(!t)return void e.complete();for(var r=Array(t),n=t,i=t,a=function(t){var a=!1;(0,u.Tg)(o[t]).subscribe((0,h._)(e,function(e){!a&&(a=!0,i--),r[t]=e},function(){return n--},void 0,function(){n&&a||(i||e.next(s?f(s,r):r),e.complete())}))},l=0;l<t;l++)a(l)});return r?a.pipe((0,p.I)(r)):a}},83724:(e,t,r)=>{"use strict";var n,i,o=r(59355),s=r(72649),a=function(){};function l(e){a("createIframe",e);try{return r.g.document.createElement('<iframe name="'+e+'">')}catch(n){var t=r.g.document.createElement("iframe");return t.name=e,t}}function c(){a("createForm"),(n=r.g.document.createElement("form")).style.display="none",n.style.position="absolute",n.method="POST",n.enctype="application/x-www-form-urlencoded",n.acceptCharset="UTF-8",(i=r.g.document.createElement("textarea")).name="d",n.appendChild(i),r.g.document.body.appendChild(n)}e.exports=function(e,t,r){a(e,t),n||c();var u="a"+o.string(8);n.target=u,n.action=s.addQuery(s.addPath(e,"/jsonp_send"),"i="+u);var d=l(u);d.id=u,d.style.display="none",n.appendChild(d);try{i.value=t}catch(e){}n.submit();var h=function(e){a("completed",u,e),d.onerror&&(d.onreadystatechange=d.onerror=d.onload=null,
51setTimeout(function(){a("cleaning up",u),d.parentNode.removeChild(d),d=null},500),i.value="",r(e))};return d.onerror=function(){a("onerror",u),h()},d.onload=function(){a("onload",u),h()},d.onreadystatechange=function(e){a("onreadystatechange",u,d.readyState,e),"complete"===d.readyState&&h()},function(){a("aborted",u),h(Error("Aborted"))}}},83831:(e,t,r)=>{"use strict";r.d(t,{N:()=>n});var n,i=r(9968),o=r(47500);!function(e){e.getUploadEndpoint=function(e){return e?.uploadDomain?`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.uploadDomain)}${e.uploadEndpoint}`:null},e.getProcessorEndpoint=function(e){return e?.processDomain?`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.processDomain)}${e.processorEndpoint}`:null},e.getUploadedFileDownloadEndpoint=function(e){return e?.uploadDomain?-1!==e.uploadDomain.indexOf("googleapis")?`${e.uploadDomain}${e.uploadedFileDownloadEndpoint}`:`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.uploadDomain)}${e.uploadedFileDownloadEndpoint}`:null},e.getUploadedFileDownloadEndpointForServer=function(e){return e?.uploadDomain?-1!==e.uploadDomain.indexOf("googleapis")?`${e.uploadDomain}${e.uploadedFileDownloadEndpoint}`:`${o.r.toHttpsProtocol(e.uploadDomain)}${i.ApiConfig.edgePathPrefix}${e.uploadedFileDownloadEndpoint}`:null},e.getDownloadEndpoint=function(e){return e?.downloadDomain?-1!==e.downloadDomain.indexOf("googleapis")?`${e.downloadDomain}${e.downloadEndpoint}`:`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.downloadDomain)}${e.downloadEndpoint}`:null},e.getGcpTempDownloadEndpoint=function(e){return e?.downloadDomain?`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.downloadDomain)}${e.gcpTempDownloadEndpoint}`:null},e.getEmailDownloadEndpoint=function(e){return e?.downloadDomain?`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.downloadDomain)}${e.emailDownloadEndpoint}`:null},e.getImageShareEndpoint=function(e){return e?.processDomain?`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.processDomain)}${e.imageShareEndpoint}`:null},e.getThumbnailEndpoint=function(e){return e?.thumbnailDomain?`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.thumbnailDomain)}${e.thumbnailEndpoint}`:null},e.getUploadCommEndpoint=function(e){return e?.uploadDomain?`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.uploadDomain)}${e.commEndpoint}`:null},e.getProcessCommEndpoint=function(e){return e?.processDomain?`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.processDomain)}${e.commEndpoint}`:null},e.getZipEndpoint=function(e){return e?.processDomain?`${i.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.processDomain)}${e.zipEndpoint}`:null}}(n||(n={}))},84055:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(78304),i=r(75438);let o=function(e){return(0,i.A)(e)&&(0,n.A)(e)}},84123:(e,t,r)=>{"use strict";var n=r(93570),i=r(82007).b,o=r(3882),s=function(){};function a(e){s(e),i.call(this);var t=this,r=this.es=new o(e);r.onmessage=function(e){s("message",e.data),t.emit("message",decodeURI(e.data))},r.onerror=function(e){s("error",r.readyState,e);var n=2!==r.readyState?"network":"permanent";t._cleanup(),t._close(n)}}n(a,i),a.prototype.abort=function(){s("abort"),this._cleanup(),this._close("user")},a.prototype._cleanup=function(){s("cleanup");var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},a.prototype._close=function(e){s("close",e);var t=this;setTimeout(function(){t.emit("close",null,e),t.removeAllListeners()},200)},e.exports=a},84147:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=Object.prototype;let i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},84214:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(4527);let i=function(){if(!arguments.length)return[];var e=arguments[0];return(0,n.A)(e)?e:[e]}},84237:(e,t,r)=>{var n=r(50224),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return r===i?void 0:r}return o.call(t,e)?t[e]:void 0}},84471:(e,t,r)=>{"use strict";r.d(t,{s:()=>n});var n=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}()},84779:(e,t,r)=>{var n=r(53512),i=r(58528),o=r(84237),s=r(33065),a=r(68329);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=i,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l},84847:(e,t,r)=>{"use strict";var n=r(93570),i=r(82007).b,o=function(){};function s(e,t){o(e),i.call(this),this.sendBuffer=[],this.sender=t,this.url=e}n(s,i),s.prototype.send=function(e){o("send",e),this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},s.prototype.sendScheduleWait=function(){o("sendScheduleWait");var e,t=this;this.sendStop=function(){o("sendStop"),t.sendStop=null,clearTimeout(e)},e=setTimeout(function(){o("timeout"),t.sendStop=null,t.sendSchedule()},25)},s.prototype.sendSchedule=function(){o("sendSchedule",this.sendBuffer.length);var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,function(t){e.sendStop=null,t?(o("error",t),e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()}),this.sendBuffer=[]}},s.prototype._cleanup=function(){o("_cleanup"),this.removeAllListeners()},s.prototype.close=function(){o("close"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},e.exports=s},85590:(e,t,r)=>{var n=r(89950),i=r(28654),o="[object Arguments]";e.exports=function(e){return i(e)&&n(e)==o}},85689:(e,t,r)=>{"use strict";function n(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}r.d(t,{o:()=>n})},86041:(e,t)=>{"use strict";
51Object.defineProperty(t,"__esModule",{value:!0});var r=Symbol.for("INJECTION");function n(e,t,n,i){function o(){return(i&&!Reflect.hasMetadata(r,this,t)&&Reflect.defineMetadata(r,n(),this,t),Reflect.hasMetadata(r,this,t))?Reflect.getMetadata(r,this,t):n()}function s(e){Reflect.defineMetadata(r,e,this,t)}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:o,set:s})}t.makePropertyInjectDecorator=function(e,t){return function(r){return function(i,o){n(i,o,function(){return e.get(r)},t)}}},t.makePropertyInjectNamedDecorator=function(e,t){return function(r,i){return function(o,s){n(o,s,function(){return e.getNamed(r,i)},t)}}},t.makePropertyInjectTaggedDecorator=function(e,t){return function(r,i,o){return function(s,a){n(s,a,function(){return e.getTagged(r,i,o)},t)}}},t.makePropertyMultiInjectDecorator=function(e,t){return function(r){return function(i,o){n(i,o,function(){return e.getAll(r)},t)}}}},86055:(e,t,r)=>{"use strict";r.d(t,{u:()=>c});var n=r(4902),i=r(43604),o=r(51352),s=r(9968),a=r(79347),l=r(29238);class c{constructor(e,t,r){this.apiConfig=e,this.http=t,this.loginService=r}overview(e){return this.requireLogin(),this.http.get(this.apiConfig.getAdminUserBillingOverviewEndpoint(e)).pipe(o.UW)}grantEntitlement(e,t){return this.requireLogin(),this.http.post(this.apiConfig.getAdminUserBillingGrantEntitlementEndpoint(e),t).pipe(o.UW)}revokeEntitlement(e,t){return this.requireLogin(),this.http.post(this.apiConfig.getAdminUserBillingRevokeEntitlementEndpoint(e),t).pipe(o.UW)}grantCredits(e,t){return this.requireLogin(),this.http.post(this.apiConfig.getAdminUserBillingGrantCreditsEndpoint(e),t).pipe(o.UW)}grantBulk(e){return this.requireLogin(),this.http.post(this.apiConfig.getAdminBillingGrantBulkEndpoint(),e).pipe(o.UW)}validate(e){return this.requireLogin(),this.http.post(this.apiConfig.getAdminBillingValidateEndpoint(e),{}).pipe(o.UW)}requireLogin(){if(!this.loginService.isUserLoggedIn)throw Error("Admin login required. Sign in with an admin account to access admin billing endpoints.")}}c=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(s.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(a.jo)),(0,n.Qj)(2,(0,i.WQ)(l.H)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===s.ApiConfig?Object:s.ApiConfig,void 0===a.jo?Object:a.jo,void 0===l.H?Object:l.H])],c)},86223:(e,t,r)=>{"use strict";r.d(t,{m:()=>i});var n=r(77698);function i(e){return e&&(0,n.T)(e.schedule)}},86702:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(21710),i=r(75438),o="[object Symbol]";let s=function(e){return"symbol"==typeof e||(0,i.A)(e)&&(0,n.A)(e)==o}},86728:(e,t,r)=>{"use strict";r.d(t,{c:()=>u});var n=r(80967),i=r(18947),o=r(84471),s=r(40470),a=r(78619),l=r(77698),c=r(75555),u=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var i=this,o=p(e)?e:new n.Ms(e,t,r);return(0,c.Y)(function(){var e=i,t=e.operator,r=e.source;o.add(t?t.call(o,r):r?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=d(t))(function(t,i){var o=new n.Ms({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[o.s]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,s.m)(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=d(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function d(e){var t;return null!=(t=null!=e?e:a.$.Promise)?t:Promise}function h(e){return e&&(0,l.T)(e.next)&&(0,l.T)(e.error)&&(0,l.T)(e.complete)}function p(e){return e&&e instanceof n.vU||h(e)&&(0,i.Uv)(e)}},86823:(e,t,r)=>{"use strict";r.d(t,{m:()=>o});var n=r(78619),i=r(65111);function o(e){i.f.setTimeout(function(){var t=n.$.onUnhandledError;if(t)t(e);else throw e})}},87125:(e,t,r)=>{"use strict";r.d(t,{A:()=>
51o});var n=0x1fffffffffffff,i=/^(?:0|[1-9]\d*)$/;let o=function(e,t){var r=typeof e;return!!(t=null==t?n:t)&&("number"==r||"symbol"!=r&&i.test(e))&&e>-1&&e%1==0&&e<t}},87247:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,l=(1<<a)-1,c=l>>1,u=-7,d=r?i-1:0,h=r?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,h=5960464477539062e-23*(23===i),p=n?0:o-1,f=n?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=f,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+p]=255&s,p+=f,s/=256,c-=8);e[r+p-f]|=128*g}},87711:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e*=1))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},87780:(e,t,r)=>{"use strict";r.d(t,{t:()=>d});var n=r(68246),i=r(4902),o=r(2943),s=r(3649),a=r(80967),l=r(99991);function c(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.B}:t,n=e.resetOnError,i=void 0===n||n,c=e.resetOnComplete,d=void 0===c||c,h=e.resetOnRefCountZero,p=void 0===h||h;return function(e){var t,n,s,c=0,h=!1,f=!1,g=function(){null==n||n.unsubscribe(),n=void 0},m=function(){g(),t=s=void 0,h=f=!1},v=function(){var e=t;m(),null==e||e.unsubscribe()};return(0,l.N)(function(e,l){c++,f||h||g();var y=s=null!=s?s:r();l.add(function(){0!=--c||f||h||(n=u(v,p))}),y.subscribe(l),!t&&c>0&&(t=new a.Ms({next:function(e){return y.next(e)},error:function(e){f=!0,g(),n=u(m,i,e),y.error(e)},complete:function(){h=!0,g(),n=u(m,d),y.complete()}}),(0,o.Tg)(e).subscribe(t))})(e)}}function u(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!0===t)return void e();if(!1!==t){var s=new a.Ms({next:function(){s.unsubscribe(),e()}});return(0,o.Tg)(t.apply(void 0,(0,i.fX)([],(0,i.zs)(r)))).subscribe(s)}}function d(e,t,r){var i,o,s,a,l=!1;return e&&"object"==typeof e?(a=void 0===(i=e.bufferSize)?1/0:i,t=void 0===(o=e.windowTime)?1/0:o,l=void 0!==(s=e.refCount)&&s,r=e.scheduler):a=null!=e?e:1/0,c({connector:function(){return new n.m(a,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})}},88212:(e,t,r)=>{"use strict";var n=r(66384),i=r(59355),o=r(10020),s=r(72649),a=r(93570),l=r(82007).b,c=function(){};function u(e){c(e);var t=this;l.call(this),n.polluteGlobalNamespace(),this.id="a"+i.string(6);var o=s.addQuery(e,"c="+encodeURIComponent(n.WPrefix+"."+this.id));r.g[n.WPrefix][this.id]=this._callback.bind(this),this._createScript(o),this.timeoutId=setTimeout(function(){c("timeout"),t._abort(Error("JSONP script loaded abnormally (timeout)"))},u.timeout)}a(u,l),u.prototype.abort=function(){if(c("abort"),r.g[n.WPrefix][this.id]){var e=Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},u.timeout=35e3,u.scriptErrorTimeout=1e3,u.prototype._callback=function(e){c("_callback",e),this._cleanup(),this.aborting||(e&&(c("message",e),this.emit("message",e)),this.emit("close",null,"network"),this.removeAllListeners())},u.prototype._abort=function(e){c("_abort",e),this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},u.prototype._cleanup=function(){if(c("_cleanup"),clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete r.g[n.WPrefix][this.id]},u.prototype._scriptError=function(){c("_scriptError");var e=this;this.errorTimer||(this.errorTimer=setTimeout(function(){e.loadedOkay||e._abort(Error("JSONP script loaded abnormally (onerror)"))},u.scriptErrorTimeout))},u.prototype._createScript=function(e){c("_createScript",e);var t,n=this,s=this.script=r.g.document.createElement("script");
51if(s.id="a"+i.string(8),s.src=e,s.type="text/javascript",s.charset="UTF-8",s.onerror=this._scriptError.bind(this),s.onload=function(){c("onload"),n._abort(Error("JSONP script loaded abnormally (onload)"))},s.onreadystatechange=function(){if(c("onreadystatechange",s.readyState),/loaded|closed/.test(s.readyState)){if(s&&s.htmlFor&&s.onclick){n.loadedOkay=!0;try{s.onclick()}catch(e){}}s&&n._abort(Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===s.async&&r.g.document.attachEvent)if(o.isOpera())(t=this.script2=r.g.document.createElement("script")).text="try{var a = document.getElementById('"+s.id+"'); if(a)a.onerror();}catch(x){};",s.async=t.async=!1;else{try{s.htmlFor=s.id,s.event="onclick"}catch(e){}s.async=!0}void 0!==s.async&&(s.async=!0);var a=r.g.document.getElementsByTagName("head")[0];a.insertBefore(s,a.firstChild),t&&a.insertBefore(t,a.firstChild)},e.exports=u},88485:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>o,encode:()=>s});var n=r(67790),i=r(32981);function o(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64("string"==typeof e?e:n.D0.decode(e),{alphabet:"base64url"});let t=e;t instanceof Uint8Array&&(t=n.D0.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/");try{return(0,i.y)(t)}catch{throw TypeError("The input to be decoded is not correctly encoded.")}}function s(e){let t=e;return("string"==typeof t&&(t=n.Rd.encode(t)),Uint8Array.prototype.toBase64)?t.toBase64({alphabet:"base64url",omitPadding:!0}):(0,i.W)(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}},88651:(e,t,r)=>{"use strict";r.d(t,{I:()=>a});var n=r(4902),i=r(45019),o=Array.isArray;function s(e,t){return o(t)?e.apply(void 0,(0,n.fX)([],(0,n.zs)(t))):e(t)}function a(e){return(0,i.T)(function(t){return s(e,t)})}},88766:(e,t,r)=>{"use strict";r.d(t,{GE:()=>u,y4:()=>d});var n=r(89099),i=r.n(n);let o={read:()=>"u"<typeof document?0:Math.max(document.body?.scrollTop||0,document.documentElement?.scrollTop||0,window.scrollY||0),write:e=>{if("u">typeof document)try{document.body&&(document.body.scrollTop=e),document.documentElement&&(document.documentElement.scrollTop=e),window.scrollTo(0,e)}catch{}},historyKey:()=>{try{let e="u">typeof history&&history.state&&history.state.key;return"string"==typeof e?e:null}catch{return null}}};function s(e){let t=e.indexOf("?"),r=e.indexOf("#"),n=Math.min(-1===t?e.length:t,-1===r?e.length:r);return e.slice(0,n)||"/"}class a{constructor(e){this.env=e,this.arrival="initial",this.popPending=!1,this.currentKey=null,this.currentPath=null,this.positions=new Map,this.landing={kind:"none"}}begin(e,t){this.currentPath=s(e),this.currentKey=t}markPop(){this.popPending=!0}routeError(){this.popPending=!1}routeStart(){null!==this.currentKey&&this.positions.set(this.currentKey,this.env.read())}routeComplete(e,t=!1){let r=this.popPending;this.popPending=!1;let n=s(e),i=null!==this.currentPath&&n!==this.currentPath;if(this.currentKey=this.env.historyKey(),this.currentPath=n,r){this.arrival="pop";let e=i&&null!==this.currentKey?this.positions.get(this.currentKey):void 0;this.landing=void 0===e?{kind:"none"}:{kind:"restore",y:e}}else i&&!t?(this.arrival="push",this.landing={kind:"top"}):(this.arrival="same",this.landing={kind:"none"});return this.apply(),this.landing}settle(){return this.apply(),this.landing}apply(){"top"===this.landing.kind?this.env.write(0):"restore"===this.landing.kind&&this.env.write(this.landing.y)}}let l=new a(o),c=!1;function u(){if(c)return;let e=i().events;e&&(c=!0,l.begin(window.location.pathname,o.historyKey()),i().beforePopState(()=>(l.markPop(),!0)),e.on("routeChangeStart",()=>l.routeStart()),e.on("routeChangeError",()=>l.routeError()),e.on("routeChangeComplete",(e,t)=>l.routeComplete(String(e),!!(t&&t.shallow))))}function d(){return l.settle()}},88988:(e,t,r)=>{"use strict";function n(e,t){let r="quantity"===t?"B":"Bps",n=Math.floor(e);return n>=1e9?`${(n/1e9).toFixed(2)} G${r}`:n>=1e6?`${(n/1e6).toFixed(2)} M${r}`:n>=1e3?`${(n/1e3).toFixed(2)} K${r}`:"quantity"===t?`${n} Bytes`:`${n} Bps`}function i(e){let t=Math.floor(e),r=e=>{let t=e>=100?0:e>=10?1:2;return parseFloat(e.toFixed(t)).toString()};return t>=1e9?`${r(t/1e9)} GB`:t>=1e6?`${r(t/1e6)} MB`:t>=1e3?`${r(t/1e3)} KB`:`${t} Bytes`}function o(e,t){let r="quantity"===t?"b":"bps",n=Math.floor(e);return n>=1e9?`${(n/1e9).toFixed(2)} G${r}`:n>=1e6?`${(n/1e6).toFixed(2)} M${r}`:n>=1e3?`${(n/1e3).toFixed(2)} K${r}`:"quantity"===t?`${n} bits`:`${n} bps`}r.d(t,{K_:()=>o,PS:()=>n,_6:()=>i})},89034:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(84147);let i=(0,r(75999).A)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;let s=function(e){if(!(0,n.A)(e))return i(e);var t=[];for(var r in Object(e))o.call(e,r)&&"constructor"!=r&&t.push(r);return t}},89043:(e,t,r)=>{"use strict";var n=r(93570),i=r(82007).b,o=function(){};function s(e,t,r){o(t),i.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=r,this._scheduleReceiver()}n(s,i),s.prototype._scheduleReceiver=function(){o("_scheduleReceiver");var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",function(t){o("message",t),e.emit("message",t)}),t.once("close",function(r,n){o("close",r,n,e.pollIsClosing),e.poll=t=null,e.pollIsClosing||("network"===n?e._scheduleReceiver():(e.emit("close",r||1006,n),e.removeAllListeners()))})},s.prototype.abort=function(){o("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},e.exports=s},89099:(e,t,r)=>{e.exports=r(59603)},89216:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(56634);let i=function(e,t){return(0,n.A)(t,function(t){return e[t]})};var o=r(69014);let s=function(e){return null==e?[]:i(e,(0,o.A)(e))}},89226:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}},89365:(e,t,r)=>{"use strict";r.d(t,{g:()=>n,u:()=>l});var n,i=r(3649),o=r(9711),s=r(8365),a=r(92556);!function(e){e.XS=1,e.SM=e.XS<<1,e.MD=e.XS<<2,e.LG=e.XS<<3,e.XL=e.XS<<4,e.XXL=e.XS<<5}(n||(n={}));class l{static get logger(){return o.V.getLogger("WindowUtils")}static dispatchResizeEvent(e=0){s.C.runIfWindowExists(()=>{setTimeout(()=>window.dispatchEvent(new Event("resize")),0)})}static resizeObserver(e){let t=new i.B;return new globalThis.ResizeObserver(e=>t.next(null)).observe(e),t.asObservable()}static runWhenIdeal(e){s.C.runIfWindowExists(()=>{let t=window.requestIdleCallback||window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;return t?t(e):e()})}static addMoveMoveHandlerToWindow(e,t=!0,r){if(!s.C.hasWindow())return;let n=t=>{e(a.e.toGenericMouseEvent(t))};window.addEventListener("mousemove",n,{passive:!1}),window.addEventListener("touchmove",n,{passive:!1});let i=e=>{window.removeEventListener("mousemove",n),window.removeEventListener("touchmove",n),r&&r(a.e.toGenericMouseEvent(e)),t&&(l.logger.trace7({message:"Removed mouse up handler"}),window.removeEventListener("mouseup",i),window.removeEventListener("touchend",i)),l.logger.trace7({message:"Removed mouse move handler"})};return t&&(l.logger.trace7({message:"Added mouse up handler"}),window.addEventListener("mouseup",i,{passive:!1}),window.addEventListener("touchend",i,{passive:!1})),l.logger.trace7({message:"Added mouse move handler"}),i}static addMoveUpHandlerToWindow(e,t=!0){if(!s.C.hasWindow())return;let r=t=>{e(a.e.toGenericMouseEvent(t)),window.removeEventListener("mouseup",r),window.removeEventListener("touchend",r)};return window.addEventListener("mouseup",r,{passive:!1}),window.addEventListener("touchend",r,{passive:!1}),l.logger.trace1({message:"Added mouse up event"}),r}
51static getWindowSize(){let e=window.innerWidth;return e<576?n.XS:e<768?n.SM:e<992?n.MD:e<1200?n.LG:e<1400?n.XL:n.XXL}}},89692:(e,t,r)=>{"use strict";r.d(t,{Ae:()=>m,C$:()=>f,E4:()=>z,G5:()=>v,Hk:()=>T,OY:()=>p,Oh:()=>j,P3:()=>P,PH:()=>K,PP:()=>$,QJ:()=>h,Rt:()=>s,UD:()=>b,YV:()=>M,Ym:()=>a,_O:()=>U,cw:()=>E,dO:()=>N,fY:()=>g,gd:()=>R,j9:()=>G,ln:()=>V,o7:()=>W,oH:()=>o,p2:()=>l,sc:()=>B,uC:()=>d,wd:()=>_,zE:()=>c,zz:()=>x});var n=r(38331),i=r(38238);let o=9e6,s=2.5,a=20,l=5e-4,c=Object.freeze({amberAt:300,maxFramesPerJob:600,maxSheetCells:100,maxSheetWidthPx:4096,minSheetWidthPx:640,maxSheetColumns:12,minCount:2}),u=Object.freeze({frames:50,durationS:120,heightPx:1080}),d=0x3200000,h=Object.freeze([{option:"1/60",seconds:1/60},{option:"1/50",seconds:.02},{option:"1/30",seconds:1/30},{option:"1/25",seconds:.04},{option:"1/24",seconds:1/24},{option:"1/10",seconds:.1},{option:"1/5",seconds:.2},{option:"1/3",seconds:1/3},{option:"1/2",seconds:.5},{option:"1",seconds:1},{option:"2",seconds:2},{option:"3",seconds:3},{option:"4",seconds:4},{option:"5",seconds:5},{option:"6",seconds:6},{option:"7",seconds:7},{option:"8",seconds:8},{option:"9",seconds:9},{option:"10",seconds:10}]),p="SCREENSHOT_PICKED_FRAMES",f=Object.freeze({ONE:"SCREENSHOT_SPECIFIC_FRAME",SEQUENCE:"SCREENSHOT_MULTIPLE_FRAMES",SHEET:"CONTACT_SHEET"});function g(e){switch(e){case"SCREENSHOT_SPECIFIC_FRAME":return"ONE";case"SCREENSHOT_MULTIPLE_FRAMES":return"SEQUENCE";case"CONTACT_SHEET":return"SHEET";default:return null}}let m=Object.freeze({columns:4,width:1920,timestamps:!0,header:!0});function v(e,t=null){return{sid:e,fileId:t,t:0,mode:"ONE",range:null,spacing:"BY_INTERVAL",interval:1,count:12,sheet:{...m},step:"edit",zoom:1,sharpnessReady:!1,source:"none",pins:[],picked:!1}}function y(e){return Math.round(1e3*e)/1e3}function b(e){return`${y(Math.max(0,e))}::SECONDS`}function S(e){return`${Math.round(e)}::PIXEL`}function E(e){if("number"==typeof e)return Number.isFinite(e)?e:null;if("string"!=typeof e)return null;let t=e.split("::")[0].trim();if(""===t)return null;let r=Number(t);return Number.isFinite(r)?r:null}function w(e){if("string"!=typeof e)return null;let t=h.find(t=>t.option===e.trim());return t?t.seconds:null}function _(e){let t=h[0];for(let r of h)Math.abs(r.seconds-e)<Math.abs(t.seconds-e)&&(t=r);return t.option}function A(e){return w(_(e))}function T(e,t){let r=Math.max(0,t);return e.range?{start:Math.min(Math.max(0,e.range.start),r),end:Math.min(Math.max(0,e.range.end),r)}:{start:0,end:r}}function O(e,t){let r=T(e,t);return r.start<r.end}function C(e,t,r){let n=Math.max(0,Number.isFinite(e)?e:0);if(!("number"==typeof r&&r>0)||!(t>0))return n;let o=(0,i.MM)(t,r);return Math.max(0,(0,i.TT)(((0,i.UG)(n,o)-.25)/r))}function I(e,t,r){let n=T(e,t),i=e.range?C(n.start,t,r):0,o=F(e,t,r);return{start:i,end:o<n.end||e.range?y(o):n.end}}function P(e,t,r){if("ONE"===e.mode)return 1;let n=T(e,t);if(n.start>=n.end)return 0;if("BY_COUNT"===e.spacing)return Math.max(c.minCount,Math.floor(e.count));if(!(e.interval>0))return 0;let i=I(e,t,r);return i.start>=i.end?0:Math.floor((i.end-i.start)/e.interval)+1}function x(e,t,r,i=!1){if("ONE"===e.mode)return 1;let o=P(e,t,r);if(0===o)return 0;let s=I(e,t,r);return i?k(o,D(e,t,r),s.start,t):(0,n.v3)(o,D(e,t,r),s.start,s.end,t,r)}function k(e,t,r,n){if(!(e>0))return 0;if(!(n>0)||!Number.isFinite(n))return e;if(!(t>0))return r<n?Math.min(e,1):0;let i=0;for(;i<e&&r+i*t<n;)i++;return i}function M(e,t,r,o=!1){if("ONE"===e.mode)return[e.t];let s=x(e,t,r,o);if(0===s)return[];let a=D(e,t,r);if("number"==typeof r&&r>0&&t>0){let o=(0,i.MM)(t,r),l=I(e,t,r);return Array.from({length:s},(e,t)=>(0,i.wc)((0,n.N1)(t,l.start,a,r),o))}let l=T(e,t),c=Array.from({length:s},(e,t)=>l.start+t*a);return"BY_COUNT"===e.spacing&&s===P(e,t,r)&&(c[s-1]=F(e,t,r)),c}function D(e,t,r){if("BY_INTERVAL"===e.spacing)return e.interval;let n=P(e,t,r);if(n<=1)return 0;let i=I(e,t,r);return(i.end-i.start)/(n-1)}function R(e,t,r){if("BY_INTERVAL"===e.spacing)return e.interval;let n=P(e,t,r);if(n<=1)return 0;let o=T(e,t),s="number"==typeof r&&r>0&&t>0?(0,i.wc)((0,i.UG)(o.start,(0,i.MM)(t,r)),(0,i.MM)(t,r)):o.start;return Math.max(0,(e.range?y(F(e,t,r)):F(e,t,r))-s)/(n-1)}function F(e,t,r){let i=T(e,t);if("ONE"===e.mode||"BY_COUNT"!==e.spacing)return i.end;let o=e.range?C(i.start,t,r):0;return(0,n.n2)(Math.max(c.minCount,Math.floor(e.count)),o,i.end,t,r)}function N(e,t,r){return L(e,t,r)}function L(e,t,r){return"number"==typeof r&&Number.isFinite(r)&&r>0?Math.round(r):Math.max(0,Math.round(e*t))}function j(e,t,r,n){if("ONE"===e.mode||"BY_COUNT"!==e.spacing||!("number"==typeof r&&r>0)||!(t>0))return null;let i=T(e,t),o=U(i.start,i.end,t,r,n);return o>0?o:null}function U(e,t,r,n,i){if(!(n>0)||!(t>=e))return 0;let o=.001,s=Math.max(0,L(r,n,i)-1),a=Math.max(0,Math.ceil((e-o)*n));return Math.max(0,Math.min(s,Math.floor((t+o)*n))-a+1)}function $(e,t){let r=Math.max(1,Math.floor(t)),n=Math.ceil(e/r);return{cols:r,rows:n,cells:e,remainder:e%r}}function B(e,t,r){if("ONE"===e.mode)return null;if(!O(e,t))return"RANGE_INVALID";if("BY_COUNT"===e.spacing&&e.count<c.minCount)return"COUNT_TOO_SMALL";let n=P(e,t,r),i=j(e,t,r);return null!==i&&n>i?"MORE_THAN_CLIP":"SHEET"===e.mode&&(n>c.maxSheetCells||e.sheet.width>c.maxSheetWidthPx)?"SHEET_TOO_LARGE":n>c.maxFramesPerJob?"TOO_MANY_FRAMES":null}function W(e){return e>c.amberAt}function z(e,t,r,n){return"ONE"!==e.mode&&(P(e,t,n)>=u.frames||t>u.durationS&&r>u.heightPx)}function H(e,t,r){return Number.isFinite(e)?Math.min(r,Math.max(t,Math.round(e))):t}function G(e,t){switch(t.type){case"file":return e.fileId===t.fileId?e:{...e,fileId:t.fileId,pins:[],picked:!1};case"seek":{let r=Number.isFinite(t.t)?Math.max(0,t.t):e.t;return 1e-9>Math.abs(r-e.t)?e:{...e,t:r}}case"mode":if(e.mode===t.mode)return e.picked?{...e,picked:!1}:e;return{...e,mode:t.mode,picked:!1};case"pin":{let r=Number.isFinite(t.t)?Math.max(0,t.t):NaN;if(!Number.isFinite(r)||e.pins.some(e=>Math.abs(e-r)<l)||e.pins.length>=a)return e;let n=[...e.pins,r].sort((e,t)=>
51e-t);return{...e,pins:n,picked:!0,mode:"ONE"}}case"unpin":{let r=e.pins.filter(e=>Math.abs(e-t.t)>=l);if(r.length===e.pins.length)return e;return{...e,pins:r,picked:0!==r.length&&e.picked}}case"clearPins":return 0!==e.pins.length||e.picked?{...e,pins:[],picked:!1}:e;case"picked":{let r=t.picked&&e.pins.length>0;if(r===e.picked&&(!r||"ONE"===e.mode))return e;return r?{...e,picked:!0,mode:"ONE"}:{...e,picked:!1}}case"range":return{...e,range:t.range?{...t.range}:null};case"rangeStart":{let r=e.range?e.range.end:1/0;return{...e,range:{start:Math.max(0,t.start),end:r}}}case"rangeEnd":{let r=e.range?e.range.start:0;return{...e,range:{start:r,end:Math.max(0,t.end)}}}case"spacing":return e.spacing===t.spacing?e:{...e,spacing:t.spacing};case"interval":{let r=A(t.interval);return r===e.interval?e:{...e,interval:r}}case"count":{let r=H(t.count,c.minCount,c.maxFramesPerJob);return r===e.count?e:{...e,count:r}}case"sheet":{let r={...e.sheet,...t.sheet};return r.columns=H(r.columns,1,c.maxSheetColumns),r.width=H(r.width,c.minSheetWidthPx,c.maxSheetWidthPx),{...e,sheet:r}}case"step":return e.step===t.step?e:{...e,step:t.step};case"zoom":return e.zoom===t.zoom?e:{...e,zoom:t.zoom};case"sharpnessReady":return e.sharpnessReady===t.ready?e:{...e,sharpnessReady:t.ready};case"source":return e.source===t.source?e:{...e,source:t.source};case"summary":return V(e,t.summary,t.duration,t.fps);default:return e}}function V(e,t,r,n){if(!t||"object"!=typeof t)return e;let i=e,o=(t,r)=>{i===e&&(i={...e}),i[t]=r},s=g(t.videoToImageFrameSelection);s&&s!==e.mode&&(o("mode",s),e.picked&&o("picked",!1));let a=E(t.screenshotTime);null!==a&&a>=0&&(s??e.mode)==="ONE"&&0===e.t&&a!==e.t&&o("t",a),("BY_INTERVAL"===t.screenshotSpacing||"BY_COUNT"===t.screenshotSpacing)&&t.screenshotSpacing!==e.spacing&&o("spacing",t.screenshotSpacing);let l=w(t.screenshotFramerate);null!==l&&l!==e.interval&&o("interval",l);let u=E(t.screenshotFrameCount);null!==u&&Number.isInteger(u)&&u>=c.minCount&&u!==e.count&&o("count",u);let d=E(t.screenshotStartTime),h=E(t.screenshotEndTime);if(null!==d||null!==h){let t={start:d??0,end:h??1/0},i=void 0!==r?Q(e,r,n):null;null!==i&&q(i.start,d)&&q(i.end,h)||null===e.range&&null===t||null!==e.range&&null!==t&&e.range.start===t.start&&e.range.end===t.end||o("range",t)}let p={...e.sheet},f=!1,m=E(t.sheetColumns);null!==m&&m!==p.columns&&(p.columns=H(m,1,c.maxSheetColumns),f=!0);let v=E(t.sheetWidth);return null!==v&&v!==p.width&&(p.width=H(v,c.minSheetWidthPx,c.maxSheetWidthPx),f=!0),"boolean"==typeof t.sheetTimestamps&&t.sheetTimestamps!==p.timestamps&&(p.timestamps=t.sheetTimestamps,f=!0),"boolean"==typeof t.sheetHeader&&t.sheetHeader!==p.header&&(p.header=t.sheetHeader,f=!0),f&&o("sheet",p),i}function Q(e,t,r){if("ONE"===e.mode)return{start:null,end:null};let n=T(e,t),i=F(e,t,r),o=Number.isFinite(t)&&t>0&&i<n.end;return e.range?{start:C(n.start,t,r),end:o?i:n.end}:o?{start:null,end:i}:{start:null,end:null}}function q(e,t){return null===e||null===t?e===t:.0015>Math.abs(e-t)}function K(e,t,r,n){let i={videoToImageFrameSelection:f[e.mode]};if("ONE"===e.mode)return i.screenshotTime=b(r?r(e.t):e.t),i;i.screenshotSpacing=e.spacing,"BY_INTERVAL"===e.spacing?i.screenshotFramerate=_(e.interval):i.screenshotFrameCount=String(Math.max(c.minCount,Math.floor(e.count)));let o=Q(e,t,n);return i.screenshotStartTime=null===o.start?"":b(o.start),i.screenshotEndTime=null===o.end?"":b(o.end),"SHEET"===e.mode&&(i.sheetColumns=String(e.sheet.columns),i.sheetWidth=S(e.sheet.width),i.sheetTimestamps=e.sheet.timestamps,i.sheetHeader=e.sheet.header),i}},89852:(e,t,r)=>{"use strict";r.d(t,{B:()=>d});var n=r(4902),i=r(43604),o=r(9711),s=r(72577),a=r(83831),l=r(17214),c=r(1936),u=r(79347);class d{constructor(e,t,r){this.http=e,this.gaService=t,this.helperService=r,this.logger=o.V.getLogger("FileShareService")}shareGCSPermenentFile(e,t,r,n){return new Promise((i,o)=>{let s=(e.endpointData.processorMetadataList[0].processDomain||e.endpointData.processorMetadataList[0].uploadDomain)+e.endpointData.processorMetadataList[0].imageShareEndpoint,a=new FormData;a.append("gcName",e.endpointData.processorMetadataList[0].fileMetadata.gcName),a.append("localFilename",t),a.append("isInputFile",n?"true":"false"),a.append("text",r),this.http.request(s,"POST",a,{headers:this.helperService.getCommonHttpHeaders()}).response$.toPromise().then(e=>{i({pageUrl:`https://www.imgsock.com/meme/${e.id}/${e.slug}`,imgUrl:`https://www.imgsock.com/api/image/${e.id}`})}).catch(e=>o(e))})}
51downloadMemeImageFile(e){window.open("/download?url="+encodeURIComponent(e)),this.gaService.send(s.z.HitType.EVENT,s.z.EventCategory.BUTTON,s.z.EventAction["FILE-DOWNLOAD"],s.z.EventLabel.DOWNLOAD,"")}getDownloadURL(e,t){let r=e.endpointData?.processorMetadataList?.[0]?.downloadDomain,n=a.N.getDownloadEndpoint(e.endpointData?.processorMetadataList?.[0]);return n&&r?n+(-1!==r.indexOf("googleapis")?"":"/")+t:null}}d=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(u.jo)),(0,n.Qj)(1,(0,i.WQ)(l.k)),(0,n.Qj)(2,(0,i.WQ)(c.w)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===u.jo?Object:u.jo,void 0===l.k?Object:l.k,void 0===c.w?Object:c.w])],d)},89853:(e,t,r)=>{"use strict";r.d(t,{I5:()=>s,KM:()=>o,XU:()=>i,up:()=>n});let n="USER_SETTING_PREFIX",i="AUTH";function o(e,t){return`${e}-${t}`}function s(e,t,r){try{let n=e?.getItem(o(t,r));if(!n)return null;return JSON.parse(n)}catch{return null}}},89863:(e,t,r)=>{"use strict";r.d(t,{K:()=>G});var n=r(4902),i=r(43604),o=r(32128),s=r(1458),a=r(44492),l=r(44555);function c(e){return"number"==typeof e&&!!Number.isFinite(e)&&!(e<400)&&!(e>=500)&&408!==e&&429!==e}var u=r(7262),d=r(9120),h=r(16579),p=r(2943),f=r(86728),g=r(990),m=r(77256),v=r(77698),y=r(88651),b=["addListener","removeListener"],S=["addEventListener","removeEventListener"],E=["on","off"];function w(e,t,r,i){if((0,v.T)(r)&&(i=r,r=void 0),i)return w(e,t,r).pipe((0,y.I)(i));var o=(0,n.zs)(O(e)?S.map(function(n){return function(i){return e[n](t,i,r)}}):A(e)?b.map(_(e,t)):T(e)?E.map(_(e,t)):[],2),s=o[0],a=o[1];if(!s&&(0,m.X)(e))return(0,g.Z)(function(e){return w(e,t,r)})((0,p.Tg)(e));if(!s)throw TypeError("Invalid event target");return new f.c(function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return s(t),function(){return a(t)}})}function _(e,t){return function(r){return function(n){return e[r](t,n)}}}function A(e){return(0,v.T)(e.addListener)&&(0,v.T)(e.removeListener)}function T(e){return(0,v.T)(e.on)&&(0,v.T)(e.off)}function O(e){return(0,v.T)(e.addEventListener)&&(0,v.T)(e.removeEventListener)}var C=r(56362),I=r(23806),P=r(15365),x=r(9711),k=r(72577),M=r(64083),D=r(8365),R=r(94459),F=r(51352),N=r(47500),L=r(17214),j=r(9968),U=r(82803),$=r(69319),B=r(2807),W=r(79347),z=r(90125),H=r(71605);class G{constructor(e,t,r,n,i,o,s,a){this.http=e,this.gaService=t,this.wsService=r,this.env=n,this.apiConfig=i,this.connectivityService=o,this.settingsService=s,this.enforcementErrorService=a,this.logger=x.V.getLogger("ProcessorResolverService")}getDomainToBeUsed(){try{let e=null,t=null;if(D.C.hasWindow()&&(e=N.r.getParameterByName(window.location.href,"useDomain")||window.useDomain||null,t=N.r.getParameterByName(window.location.href,"useDomainValidator")||window.useDomainValidator||null),!e)return{};return{useDomain:e,useDomainValidator:t}}catch(e){return{}}}async generateFileUploadRequestMetadata(e,t,r,n,i){await this.wsService.ensureWsDomain(),this.wsService.getDomain()||this.logger.warn({message:"upload.resolve.wsDomainEmpty",data:{wsId:this.wsService.getId()}}),await (0,u._)(this.settingsService.userSettings.pipe((0,o.s)(1),(0,s.w)(5e3),(0,a.W)(()=>(0,d.of)(null))));let p="false";D.C.hasWindow()&&(p=N.r.getParameterByName(window.location.href,"test")||"false");let{useDomain:f,useDomainValidator:g}=this.getDomainToBeUsed();i?.suppressGA||this.gaService.send(k.z.HitType.EVENT,k.z.EventCategory.NETWORK,k.z.EventAction["FILE-PROCESSOR-RESOLVE-START"],k.z.EventLabel.CONVERT,`${e.name}-${e.size}`);try{let a={params:{from:t,to:r,operation:n,contentNames:e.name,contentTypes:(0,R.rB)(e),contentSizes:e.size+"",test:p,wsId:this.wsService.getId(),wsDomain:this.wsService.getDomain(),requireActiveDownload:e instanceof File||e instanceof Blob?"false":"true",...f?{useDomain:f,useDomainValidator:g}:null,...n===M.jU.UPLOAD?{preferedDomains:this.connectivityService.getEdgesRandomized(4).map(e=>e.domain).filter(e=>!i?.excludeDomains?.includes(e))}:{}}},d=F.Nb.getSuccessValueOrThrow$([this.http.get(`${this.apiConfig.getUploadAndProcessEndpointResolveEndpoint()}`,a)],8e3).pipe((0,l.L)({count:5,delay:(e,t)=>
51c(e?.status)?(0,h.$)(()=>e):$.E.isEnforcementError(e)?(this.enforcementErrorService.show($.E.extractDetails(e)),(0,h.$)(()=>e)):"u">typeof navigator&&!navigator.onLine?w(window,"online").pipe((0,o.s)(1),(0,s.w)(3e4)):(0,C.O)(Math.min(1e3*Math.pow(2,t-1),16e3))})),m=await (0,u._)(d);return i?.suppressGA||this.gaService.send(k.z.HitType.EVENT,k.z.EventCategory.NETWORK,k.z.EventAction["FILE-PROCESSOR-RESOLVE-END"],k.z.EventLabel.CONVERT,`${e.name}-${e.size}`),new P.E(m,e)}catch(r){if(i?.suppressGA||this.gaService.send(k.z.HitType.EVENT,k.z.EventCategory.NETWORK,k.z.EventAction["FILE-PROCESSOR-RESOLVE-FAILED"],k.z.EventLabel.CONVERT,`${e.name}-${e.size}`),console.error(r),$.E.isEnforcementError(r))throw r;if(!I.v.isOnline())throw new F.Dr("You appear to be offline. Please check your connection and try again.");let t=" Error was thrown while trying to resolve edge servers.";if(r instanceof F.Dr)throw new F.Dr(r.message+t);throw Error(r.message+t)}}async generateFileUploadRequestMetadataForGenericDataProcessing(){let e="false";D.C.hasWindow()&&(e=N.r.getParameterByName(window.location.href,"test")||"false"),this.gaService.send(k.z.HitType.EVENT,k.z.EventCategory.NETWORK,k.z.EventAction["FILE-PROCESSOR-RESOLVE-START"],k.z.EventLabel.CONVERT,"generic-generic");try{let t={params:{from:"generic",to:"generic",operation:M.jU.PROCESS,contentNames:"generic.txt",contentTypes:"text/plain",contentSizes:"0",test:e,wsId:this.wsService.getId(),wsDomain:this.wsService.getDomain(),requireActiveDownload:"false"}},r=await F.Nb.getSuccessValueOrThrow(this.http.get(`${this.apiConfig.getUploadAndProcessEndpointResolveEndpoint()}`,t));return this.logger.trace1({message:"ProcessMetadata",data:JSON.stringify(r)}),this.gaService.send(k.z.HitType.EVENT,k.z.EventCategory.NETWORK,k.z.EventAction["FILE-PROCESSOR-RESOLVE-END"],k.z.EventLabel.CONVERT,"generic-generic"),new P.E(r,null)}catch(e){this.logger.error({message:e.message||"Error getting process metadata",error:e}),this.gaService.send(k.z.HitType.EVENT,k.z.EventCategory.NETWORK,k.z.EventAction["FILE-PROCESSOR-RESOLVE-FAILED"],k.z.EventLabel.CONVERT,"generic-generic")}}}G=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(W.jo)),(0,n.Qj)(1,(0,i.WQ)(L.k)),(0,n.Qj)(2,(0,i.WQ)(H.V)),(0,n.Qj)(3,(0,i.WQ)(B.v)),(0,n.Qj)(4,(0,i.WQ)(j.ApiConfig)),(0,n.Qj)(5,(0,i.WQ)(U.Tv)),(0,n.Qj)(6,(0,i.WQ)(z.h)),(0,n.Qj)(7,(0,i.WQ)($.E)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===W.jo?Object:W.jo,void 0===L.k?Object:L.k,void 0===H.V?Object:H.V,void 0===B.v?Object:B.v,void 0===j.ApiConfig?Object:j.ApiConfig,void 0===U.Tv?Object:U.Tv,void 0===z.h?Object:z.h,void 0===$.E?Object:$.E])],G)},89950:(e,t,r)=>{var n=r(64451),i=r(97023),o=r(99828),s="[object Null]",a="[object Undefined]",l=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?a:s:l&&l in Object(e)?i(e):o(e)}},90125:(e,t,r)=>{"use strict";r.d(t,{h:()=>f});var n=r(4902),i=r(71717),o=r(43604),s=r(68246),a=r(55239),l=r(45019),c=r(18476),u=r(9711),d=r(51352),h=r(9968),p=r(79347);class f{get userSettings(){return this._userSettings.asObservable()}get featureFlags(){return this._featureFlags.asObservable().pipe((0,l.T)(e=>e.flags))}constructor(e,t){this.apiConfig=e,this.http=t,this.logger=u.V.getLogger("SettingsService"),this._motivesEnabled=!0,this._serverSettingsLoaded=!1,this._userSettings=new s.m(1),this._featureFlags=new s.m(1),this.featureFlags$=this._featureFlags.asObservable(),this.userToggleShowMotives=new s.m(1)}initializeFromProps(e){if(this._serverSettingsLoaded)return;let t=e.settings||{};this.emitSplit(t,"props")}emitSplit(e,t){let{featureFlags:r,...n}=e,o=(0,i.om)(d.tl,n),s=r?(0,i.om)(d.gH,r):new d.gH;return this._userSettings.next(o),this._featureFlags.next({flags:s,source:t}),o}initialize(){return(0,a.v)(()=>this.http.get(this.apiConfig.getUserSettingsEndpoint())).pipe((0,l.T)(e=>this.emitSplit(e,"api")),(0,c.M)({next:()=>{this._serverSettingsLoaded=!0},error:e=>{this.logger.error({message:"Failed to get user settings.",error:e})}}))}get motivesEnabled(){return this._motivesEnabled}set motivesEnabled(e){this._motivesEnabled=e,this.userToggleShowMotives.next(this._motivesEnabled)}get onUserToggleShowMotives(){return this.userToggleShowMotives.asObservable()}}f=(0,n.Cg)([(0,o._G)(),(0,n.Qj)(0,(0,o.WQ)(h.ApiConfig)),(0,n.Qj)(1,(0,o.WQ)(p.jo)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===h.ApiConfig?Object:h.ApiConfig,void 0===p.jo?Object:p.jo])],f)},90186:(e,t,r)=>{"use strict";r.d(t,{B:()=>n,a:()=>i});let n={belowTool:"2097852120",pageTop:"9666235439",inContent:"3219362107",aboveFooter:"7040072094",desktopRail:"1906280432"},i="ca-pub-7820192138716446"},90451:(e,t,r)=>{"use strict";
51var n=r(93570),i=r(23488),o=r(70087);e.exports=function(e){function t(t,r){i.call(this,e.transportName,t,r)}return n(t,i),t.enabled=function(t,n){if(!r.g.document)return!1;var s=o.extend({},n);return s.sameOrigin=!0,e.enabled(s)&&i.enabled()},t.transportName="iframe-"+e.transportName,t.needBody=!0,t.roundTrips=i.roundTrips+e.roundTrips-1,t.facadeTransport=e,t}},90634:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}},90667:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(){return[]}},90997:(e,t,r)=>{"use strict";r.d(t,{L:()=>v});var n=r(4902),i=r(43604),o=r(54631),s=r(86728),a=r(6155),l=r(45019),c=r(37876),u=r(14232),d=r(55776);class h extends u.Component{static show(e){d.A.createModal(h,e)}constructor(e){super(e),this.modalRef=(0,u.createRef)(),this.resolved=!1,this.state={password:"",error:null}}hide(){this.modalRef.current?.unmount()}submit(){this.state.password?(this.resolved=!0,this.props.onSubmit(this.state.password),this.hide()):this.setState({error:"Please enter your password."})}cancel(){this.resolved||(this.resolved=!0,this.props.onCancel())}render(){return(0,c.jsxs)(d.A,{ref:this.modalRef,onClose:()=>this.cancel(),children:[(0,c.jsx)("div",{"data-modalheader":!0,children:(0,c.jsx)("h2",{children:"Confirm your password"})}),(0,c.jsxs)("div",{"data-modalbody":!0,children:[(0,c.jsx)("p",{children:"For your security, please re-enter your password to continue."}),(0,c.jsx)("form",{method:"post",onSubmit:e=>{e.preventDefault(),this.submit()},children:(0,c.jsx)("input",{type:"password",name:"password",autoComplete:"current-password",autoFocus:!0,value:this.state.password,placeholder:"Password",onChange:e=>this.setState({password:e.target.value,error:null})})}),this.state.error&&(0,c.jsx)("p",{className:"error",children:this.state.error})]}),(0,c.jsxs)("div",{"data-modalfooter":!0,children:[(0,c.jsx)("button",{type:"button",onClick:()=>this.hide(),children:"Cancel"}),(0,c.jsx)("button",{type:"button",onClick:()=>this.submit(),children:"Confirm"})]})]})}}var p=r(9968),f=r(31962),g=r(79347);async function m(e){if(!e)return e;let t=new TextEncoder().encode(e);return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>("00"+e.toString(16)).slice(-2)).join("")}class v{constructor(e,t,r){this.http=e,this.apiConfig=t,this.authService=r}elevate(){return this.promptPassword().pipe((0,o.n)(e=>this.reauth(e)))}promptPassword(){return new s.c(e=>{h.show({onSubmit:t=>{t?(e.next(t),e.complete()):e.error(Error("step-up cancelled"))},onCancel:()=>{e.error(Error("step-up cancelled"))}})})}reauth(e){return(0,a.H)(m(e)).pipe((0,o.n)(e=>this.http.request(this.apiConfig.getReauthEndpoint(),"POST",{password:e},{withCredentials:!0,headers:{"X-Requested-With":"XMLHttpRequest"},__isAuthRetry:!0}).response$.pipe((0,l.T)(e=>{this.authService.setAuthToken(e.bearer)}))))}}v=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(g.jo)),(0,n.Qj)(1,(0,i.WQ)(p.ApiConfig)),(0,n.Qj)(2,(0,i.WQ)(f.u)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===g.jo?Object:g.jo,void 0===p.ApiConfig?Object:p.ApiConfig,void 0===f.u?Object:f.u])],v)},91040:(e,t,r)=>{"use strict";let n,i,o,s,a,l,c,u;r.d(t,{A:()=>t6});var d={};function h(e,t){return function(){return e.apply(t,arguments)}}r.r(d),r.d(d,{hasBrowserEnv:()=>eH,hasStandardBrowserEnv:()=>eV,hasStandardBrowserWebWorkerEnv:()=>eQ,navigator:()=>eG,origin:()=>eq});var p=r(99742);let{toString:f}=Object.prototype,{getPrototypeOf:g}=Object,{iterator:m,toStringTag:v}=Symbol,y=(n=Object.create(null),e=>{let t=f.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())}),b=e=>(e=e.toLowerCase(),t=>y(t)===e),S=e=>t=>typeof t===e,{isArray:E}=Array,w=S("undefined");function _(e){return null!==e&&!w(e)&&null!==e.constructor&&!w(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let A=b("ArrayBuffer");function T(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&A(e.buffer)}let O=S("string"),C=S("function"),I=S("number"),P=e=>null!==e&&"object"==typeof e,x=e=>!0===e||!1===e,k=e=>{if("object"!==y(e))return!1;let t=g(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(v in e)&&!(m in e)},M=e=>{if(!P(e)||_(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},D=b("Date"),R=b("File"),F=b("Blob"),N=b("FileList"),L=e=>P(e)&&C(e.pipe),j=e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||C(e.append)&&("formdata"===(t=y(e))||"object"===t&&C(e.toString)&&"[object FormData]"===e.toString()))},U=b("URLSearchParams"),[$,B,W,z]=["ReadableStream","Request","Response","Headers"].map(b),H=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function G(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),E(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;if(_(e))return;let o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;for(n=0;n<s;n++)i=o[n],t.call(null,e[i],i,e)}}function V(e,t){let r;if(_(e))return null;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}let Q="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:global,q=e=>!w(e)&&e!==Q;function K(){let{caseless:e,skipUndefined:t}=q(this)&&this||{},r={},n=(n,i)=>{let o=e&&V(r,i)||i;k(r[o])&&k(n)?r[o]=K(r[o],n):k(n)?r[o]=K({},n):E(n)?r[o]=n.slice():t&&w(n)||(r[o]=n)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&G(arguments[e],n);return r}let X=(e,t,r,{allOwnKeys:n}={})=>(G(t,(t,n)=>{r&&C(t)?e[n]=h(t,r):e[n]=t},{allOwnKeys:n}),e),J=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),Y=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Z=(e,t,r,n)=>{let i,o,s,a={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)s=i[o],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=!1!==r&&g(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},ee=(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},et=e=>{if(!e)return null;if(E(e))return e;let t=e.length;if(!I(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},er=(i="u">typeof Uint8Array&&g(Uint8Array),e=>i&&e instanceof i),en=(e,t)=>{let r,n=(e&&e[m]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},ei=(e,t)=>{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},eo=b("HTMLFormElement"),es=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),ea=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),el=b("RegExp"),ec=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};G(r,(r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)},eu=e=>{ec(e,(t,r)=>{if(C(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(C(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},ed=(e,t)=>{let r={};return(e=>
51{e.forEach(e=>{r[e]=!0})})(E(e)?e:String(e).split(t)),r},eh=()=>{},ep=(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t;function ef(e){return!!(e&&C(e.append)&&"FormData"===e[v]&&e[m])}let eg=e=>{let t=Array(10),r=(e,n)=>{if(P(e)){if(t.indexOf(e)>=0)return;if(_(e))return e;if(!("toJSON"in e)){t[n]=e;let i=E(e)?[]:{};return G(e,(e,t)=>{let o=r(e,n+1);w(o)||(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},em=b("AsyncFunction"),ev=e=>e&&(P(e)||C(e))&&C(e.then)&&C(e.catch),ey=(a="function"==typeof setImmediate,l=C(Q.postMessage),a?setImmediate:l?(c=`axios@${Math.random()}`,u=[],Q.addEventListener("message",({source:e,data:t})=>{e===Q&&t===c&&u.length&&u.shift()()},!1),e=>{u.push(e),Q.postMessage(c,"*")}):e=>setTimeout(e)),eb="u">typeof queueMicrotask?queueMicrotask.bind(Q):void 0!==p&&p.nextTick||ey,eS=e=>null!=e&&C(e[m]),eE={isArray:E,isArrayBuffer:A,isBuffer:_,isFormData:j,isArrayBufferView:T,isString:O,isNumber:I,isBoolean:x,isObject:P,isPlainObject:k,isEmptyObject:M,isReadableStream:$,isRequest:B,isResponse:W,isHeaders:z,isUndefined:w,isDate:D,isFile:R,isBlob:F,isRegExp:el,isFunction:C,isStream:L,isURLSearchParams:U,isTypedArray:er,isFileList:N,forEach:G,merge:K,extend:X,trim:H,stripBOM:J,inherits:Y,toFlatObject:Z,kindOf:y,kindOfTest:b,endsWith:ee,toArray:et,forEachEntry:en,matchAll:ei,isHTMLForm:eo,hasOwnProperty:ea,hasOwnProp:ea,reduceDescriptors:ec,freezeMethods:eu,toObjectSet:ed,toCamelCase:es,noop:eh,toFiniteNumber:ep,findKey:V,global:Q,isContextDefined:q,isSpecCompliantForm:ef,toJSONObject:eg,isAsyncFn:em,isThenable:ev,setImmediate:ey,asap:eb,isIterable:eS};function ew(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}eE.inherits(ew,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:eE.toJSONObject(this.config),code:this.code,status:this.status}}});let e_=ew.prototype,eA={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{eA[e]={value:e}}),Object.defineProperties(ew,eA),Object.defineProperty(e_,"isAxiosError",{value:!0}),ew.from=(e,t,r,n,i,o)=>{let s=Object.create(e_);eE.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);let a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return ew.call(s,a,l,r,n,i),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",o&&Object.assign(s,o),s};let eT=ew,eO=null;var eC=r(82909).Buffer;function eI(e){return eE.isPlainObject(e)||eE.isArray(e)}function eP(e){return eE.endsWith(e,"[]")?e.slice(0,-2):e}function ex(e,t,r){return e?e.concat(t).map(function(e,t){return e=eP(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}function ek(e){return eE.isArray(e)&&!e.some(eI)}let eM=eE.toFlatObject(eE,{},null,function(e){return/^is[A-Z]/.test(e)}),eD=function(e,t,r){if(!eE.isObject(e))throw TypeError("target must be an object");t=t||new(eO||FormData);let n=(r=eE.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!eE.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,s=r.indexes,a=(r.Blob||"u">typeof Blob&&Blob)&&eE.isSpecCompliantForm(t);if(!eE.isFunction(i))throw TypeError("visitor must be a function");function l(e){if(null===e)return"";if(eE.isDate(e))return e.toISOString();if(eE.isBoolean(e))return e.toString();if(!a&&eE.isBlob(e))throw new eT("Blob is not supported. Use a Buffer instead.");return eE.isArrayBuffer(e)||eE.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):eC.from(e):e}function c(e,r,i){let a=e;if(e&&!i&&"object"==typeof e){if(eE.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(eE.isArray(e)&&ek(e)||(eE.isFileList(e)||eE.endsWith(r,"[]"))&&(a=eE.toArray(e)))return r=eP(r),a.forEach(function(e,n){eE.isUndefined(e)||null===e||t.append(!0===s?ex([r],n,o):null===s?r:r+"[]",l(e))}),!1}return!!eI(e)||(t.append(ex(i,r,o),l(e)),!1)}let u=[],d=Object.assign(eM,{defaultVisitor:c,convertValue:l,isVisitable:eI});function h(e,r){if(!eE.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+r.join("."));
51u.push(e),eE.forEach(e,function(e,n){!0===(!(eE.isUndefined(e)||null===e)&&i.call(t,e,eE.isString(n)?n.trim():n,r,d))&&h(e,r?r.concat(n):[n])}),u.pop()}}if(!eE.isObject(e))throw TypeError("data must be an object");return h(e),t};function eR(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function eF(e,t){this._pairs=[],e&&eD(e,this,t)}let eN=eF.prototype;eN.append=function(e,t){this._pairs.push([e,t])},eN.toString=function(e){let t=e?function(t){return e.call(this,t,eR)}:eR;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};let eL=eF;function ej(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function eU(e,t,r){let n;if(!t)return e;let i=r&&r.encode||ej;eE.isFunction(r)&&(r={serialize:r});let o=r&&r.serialize;if(n=o?o(t,r):eE.isURLSearchParams(t)?t.toString():new eL(t,r).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}class e${constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){eE.forEach(this.handlers,function(t){null!==t&&e(t)})}}let eB=e$,eW={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ez={isBrowser:!0,classes:{URLSearchParams:"u">typeof URLSearchParams?URLSearchParams:eL,FormData:"u">typeof FormData?FormData:null,Blob:"u">typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},eH="u">typeof window&&"u">typeof document,eG="object"==typeof navigator&&navigator||void 0,eV=eH&&(!eG||0>["ReactNative","NativeScript","NS"].indexOf(eG.product)),eQ="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eq=eH&&window.location.href||"http://localhost",eK={...d,...ez};function eX(e,t){return eD(e,new eK.classes.URLSearchParams,{visitor:function(e,t,r,n){return eK.isNode&&eE.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}function eJ(e){return eE.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}function eY(e){let t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}let eZ=function(e){function t(e,r,n,i){let o=e[i++];if("__proto__"===o)return!0;let s=Number.isFinite(+o),a=i>=e.length;return(o=!o&&eE.isArray(n)?n.length:o,a)?eE.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r:(n[o]&&eE.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&eE.isArray(n[o])&&(n[o]=eY(n[o]))),!s}if(eE.isFormData(e)&&eE.isFunction(e.entries)){let r={};return eE.forEachEntry(e,(e,n)=>{t(eJ(e),n,r,0)}),r}return null};function e0(e,t,r){if(eE.isString(e))try{return(t||JSON.parse)(e),eE.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}let e1={transitional:eW,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=eE.isObject(e);if(o&&eE.isHTMLForm(e)&&(e=new FormData(e)),eE.isFormData(e))return i?JSON.stringify(eZ(e)):e;if(eE.isArrayBuffer(e)||eE.isBuffer(e)||eE.isStream(e)||eE.isFile(e)||eE.isBlob(e)||eE.isReadableStream(e))return e;if(eE.isArrayBufferView(e))return e.buffer;if(eE.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return eX(e,this.formSerializer).toString();if((r=eE.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return eD(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),e0(e)):e}],transformResponse:[function(e){let t=this.transitional||e1.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(eE.isResponse(e)||eE.isReadableStream(e))return e;
51if(e&&eE.isString(e)&&(r&&!this.responseType||n)){let r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw eT.from(e,eT.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eK.classes.FormData,Blob:eK.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};eE.forEach(["delete","get","head","post","put","patch"],e=>{e1.headers[e]={}});let e2=e1,e3=eE.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),e4=e=>{let t,r,n,i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&e3[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i},e9=Symbol("internals");function e6(e){return e&&String(e).trim().toLowerCase()}function e5(e){return!1===e||null==e?e:eE.isArray(e)?e.map(e5):String(e)}function e7(e){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
51for(;t=n.exec(e);)r[t[1]]=t[2];return r}let e8=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function te(e,t,r,n,i){if(eE.isFunction(n))return n.call(this,t,r);if(i&&(t=r),eE.isString(t)){if(eE.isString(n))return -1!==t.indexOf(n);if(eE.isRegExp(n))return n.test(t)}}function tt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}function tr(e,t){let r=eE.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}class tn{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=e6(t);if(!i)throw Error("header name must be a non-empty string");let o=eE.findKey(n,i);o&&void 0!==n[o]&&!0!==r&&(void 0!==r||!1===n[o])||(n[o||t]=e5(e))}let o=(e,t)=>eE.forEach(e,(e,r)=>i(e,r,t));if(eE.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(eE.isString(e)&&(e=e.trim())&&!e8(e))o(e4(e),t);else if(eE.isObject(e)&&eE.isIterable(e)){let r={},n,i;for(let t of e){if(!eE.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?eE.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}o(r,t)}else null!=e&&i(t,e,r);return this}get(e,t){if(e=e6(e)){let r=eE.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t)return e7(e);if(eE.isFunction(t))return t.call(this,e,r);if(eE.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=e6(e)){let r=eE.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||te(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=e6(e)){let i=eE.findKey(r,e);i&&(!t||te(r,r[i],i,t))&&(delete r[i],n=!0)}}return eE.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||te(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return eE.forEach(this,(n,i)=>{let o=eE.findKey(r,i);if(o){t[o]=e5(n),delete t[i];return}let s=e?tt(i):String(i).trim();s!==i&&delete t[i],t[s]=e5(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return eE.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&eE.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[e9]=this[e9]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=e6(e);t[n]||(tr(r,e),t[n]=!0)}return eE.isArray(e)?e.forEach(n):n(e),this}}tn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),eE.reduceDescriptors(tn.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),eE.freezeMethods(tn);let ti=tn;function to(e,t){let r=this||e2,n=t||r,i=ti.from(n.headers),o=n.data;return eE.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function ts(e){return!!(e&&e.__CANCEL__)}function ta(e,t,r){eT.call(this,null==e?"canceled":e,eT.ERR_CANCELED,t,r),this.name="CanceledError"}eE.inherits(ta,eT,{__CANCEL__:!0});let tl=ta;function tc(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new eT("Request failed with status code "+r.status,[eT.ERR_BAD_REQUEST,eT.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function tu(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}let td=function(e,t){let r,n=Array(e=e||10),i=Array(e),o=0,s=0;return t=void 0!==t?t:1e3,function(a){let l=Date.now(),c=i[s];r||(r=l),n[o]=a,i[o]=l;let u=s,d=0;for(;u!==o;)d+=n[u++],u%=e;if((o=(o+1)%e)===s&&(s=(s+1)%e),l-r<t)return;let h=c&&l-c;return h?Math.round(1e3*d/h):void 0}},th=function(e,t){let r,n,i=0,o=1e3/t,s=(t,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{let t=Date.now(),a=t-i;a>=o?s(e,t):(r=e,n||(n=setTimeout(()=>
51{n=null,s(r)},o-a)))},()=>r&&s(r)]},tp=(e,t,r=3)=>{let n=0,i=td(50,250);return th(r=>{let o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,l=i(a),c=o<=s;n=o,e({loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-o)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},tf=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},tg=e=>(...t)=>eE.asap(()=>e(...t)),tm=eK.hasStandardBrowserEnv?(o=new URL(eK.origin),s=eK.navigator&&/(msie|trident)/i.test(eK.navigator.userAgent),e=>(e=new URL(e,eK.origin),o.protocol===e.protocol&&o.host===e.host&&(s||o.port===e.port))):()=>!0,tv=eK.hasStandardBrowserEnv?{write(e,t,r,n,i,o,s){if("u"<typeof document)return;let a=[`${e}=${encodeURIComponent(t)}`];eE.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),eE.isString(n)&&a.push(`path=${n}`),eE.isString(i)&&a.push(`domain=${i}`),!0===o&&a.push("secure"),eE.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("u"<typeof document)return null;let t=document.cookie.match(RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function ty(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function tb(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function tS(e,t,r){let n=!ty(t);return e&&(n||!1==r)?tb(e,t):t}let tE=e=>e instanceof ti?{...e}:e;function tw(e,t){t=t||{};let r={};function n(e,t,r,n){return eE.isPlainObject(e)&&eE.isPlainObject(t)?eE.merge.call({caseless:n},e,t):eE.isPlainObject(t)?eE.merge({},t):eE.isArray(t)?t.slice():t}function i(e,t,r,i){return eE.isUndefined(t)?eE.isUndefined(e)?void 0:n(void 0,e,r,i):n(e,t,r,i)}function o(e,t){if(!eE.isUndefined(t))return n(void 0,t)}function s(e,t){return eE.isUndefined(t)?eE.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}let l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>i(tE(e),tE(t),r,!0)};return eE.forEach(Object.keys({...e,...t}),function(n){let o=l[n]||i,s=o(e[n],t[n],n);eE.isUndefined(s)&&o!==a||(r[n]=s)}),r}let t_=e=>{let t=tw({},e),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=ti.from(s),t.url=eU(tS(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),eE.isFormData(r)){if(eK.hasStandardBrowserEnv||eK.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(eE.isFunction(r.getHeaders)){let e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)})}}if(eK.hasStandardBrowserEnv&&(n&&eE.isFunction(n)&&(n=n(t)),n||!1!==n&&tm(t.url))){let e=i&&o&&tv.read(o);e&&s.set(i,e)}return t},tA="u">typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){let n,i,o,s,a,l=t_(e),c=l.data,u=ti.from(l.headers).normalize(),{responseType:d,onUploadProgress:h,onDownloadProgress:p}=l;function f(){s&&s(),a&&a(),l.cancelToken&&l.cancelToken.unsubscribe(n),l.signal&&l.signal.removeEventListener("abort",n)}let g=new XMLHttpRequest;function m(){if(!g)return;let n=ti.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());tc(function(e){t(e),f()},function(e){r(e),f()},{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(l.method.toUpperCase(),l.url,!0),g.timeout=l.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){!g||4!==g.readyState||(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(r(new eT("Request aborted",eT.ECONNABORTED,e,g)),g=null)},g.onerror=function(t){let n=new eT(t&&t.message?t.message:"Network Error",eT.ERR_NETWORK,e,g);n.event=t||null,r(n),g=null},g.ontimeout=function(){let t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",n=l.transitional||eW;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),r(new eT(t,n.clarifyTimeoutError?eT.ETIMEDOUT:eT.ECONNABORTED,e,g)),g=null},void 0===c&&u.setContentType(null),"setRequestHeader"in g&&eE.forEac
51h(u.toJSON(),function(e,t){g.setRequestHeader(t,e)}),eE.isUndefined(l.withCredentials)||(g.withCredentials=!!l.withCredentials),d&&"json"!==d&&(g.responseType=l.responseType),p&&([o,a]=tp(p,!0),g.addEventListener("progress",o)),h&&g.upload&&([i,s]=tp(h),g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",s)),(l.cancelToken||l.signal)&&(n=t=>{g&&(r(!t||t.type?new tl(null,e,g):t),g.abort(),g=null)},l.cancelToken&&l.cancelToken.subscribe(n),l.signal&&(l.signal.aborted?n():l.signal.addEventListener("abort",n)));let v=tu(l.url);v&&-1===eK.protocols.indexOf(v)?r(new eT("Unsupported protocol "+v+":",eT.ERR_BAD_REQUEST,e)):g.send(c||null)})},tT=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,i=function(e){if(!r){r=!0,s();let t=e instanceof Error?e:this.reason;n.abort(t instanceof eT?t:new tl(t instanceof Error?t.message:t))}},o=t&&setTimeout(()=>{o=null,i(new eT(`timeout ${t} of ms exceeded`,eT.ETIMEDOUT))},t),s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));let{signal:a}=n;return a.unsubscribe=()=>eE.asap(s),a}},tO=function*(e,t){let r,n=e.byteLength;if(!t||n<t)return void(yield e);let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},tC=async function*(e,t){for await(let r of tI(e))yield*tO(r,t)},tI=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},tP=(e,t,r,n)=>{let i,o=tC(e,t),s=0,a=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await o.next();if(t){a(),e.close();return}let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},tx=65536,{isFunction:tk}=eE,tM=(({Request:e,Response:t})=>({Request:e,Response:t}))(eE.global),{ReadableStream:tD,TextEncoder:tR}=eE.global,tF=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},tN=e=>{let t,{fetch:r,Request:n,Response:i}=e=eE.merge.call({skipUndefined:!0},tM,e),o=r?tk(r):"function"==typeof fetch,s=tk(n),a=tk(i);if(!o)return!1;let l=o&&tk(tD),c=o&&("function"==typeof tR?(t=new tR,e=>t.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer())),u=s&&l&&tF(()=>{let e=!1,t=new n(eK.origin,{body:new tD,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=a&&l&&tF(()=>eE.isReadableStream(new i("").body)),h={stream:d&&(e=>e.body)};o&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{h[e]||(h[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new eT(`Response type '${e}' is not supported`,eT.ERR_NOT_SUPPORT,r)})})})();let p=async e=>{if(null==e)return 0;if(eE.isBlob(e))return e.size;if(eE.isSpecCompliantForm(e)){let t=new n(eK.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return eE.isArrayBufferView(e)||eE.isArrayBuffer(e)?e.byteLength:(eE.isURLSearchParams(e)&&(e+=""),eE.isString(e))?(await c(e)).byteLength:void 0},f=async(e,t)=>{let r=eE.toFiniteNumber(e.getContentLength());return null==r?p(t):r};return async e=>{let t,{url:o,method:a,data:l,signal:c,cancelToken:p,timeout:g,onDownloadProgress:m,onUploadProgress:v,responseType:y,headers:b,withCredentials:S="same-origin",fetchOptions:E}=t_(e),w=r||fetch;y=y?(y+"").toLowerCase():"text";let _=tT([c,p&&p.toAbortSignal()],g),A=null,T=_&&_.unsubscribe&&(()=>{_.unsubscribe()});try{if(v&&u&&"get"!==a&&"head"!==a&&0!==(t=await f(b,l))){let e,r=new n(o,{method:"POST",body:l,duplex:"half"});if(eE.isFormData(l)&&(e=r.headers.get("content-type"))&&b.setContentType(e),r.body){let[e,n]=tf(t,tp(tg(v)));l=tP(r.body,tx,e,n)}}eE.isString(S)||(S=S?"include":"omit");let r=s&&"credentials"in n.prototype,c={...E,signal:_,method:a.toUpperCase(),headers:b.normalize().toJSON(),body:l,duplex:"half",credentials:r?S:void 0};A=s&&new n(o,c);let p=await (s?w(A,E):w(o,c)),g=d&&("stream"===y||"response"===y);if(d&&(m||g&&T)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});let t=eE.toFiniteNumber(p.headers.get("content-length")),[r,n]=m&&tf(t,tp(tg(m),!0))||[];p=new i(tP(p.body,tx,r,()=>{n&&n(),T&&T()}),e)}y=y||"text";let O=await h[eE.findKey(h,y)||"text"](p,e);return!g&&T&&T(),await new Promise((t,r)=>{tc(t,r,{data:O,headers:ti.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:A})})}catch(t){if(T&&T(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new eT("Network Error",eT.ERR_NETWORK,e,A),{cause:t.cause||t});throw eT.from(t,t&&t.code,e,A)}}},tL=new Map,tj=e=>{let t=e&&e.env||{},{fetch:r,Request:n,Response:i}=t,o=[n,i,r],s=o.length,a,l,c=tL;for(;s--;)a=o[s],void 0===(l=c.get(a))&&c.set(a,l=s?new Map:tN(t)),c=l;return l};tj();let tU={http:eO,xhr:tA,fetch:{get:tj}};
51eE.forEach(tU,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let t$=e=>`- ${e}`,tB=e=>eE.isFunction(e)||null===e||!1===e,tW=function(e,t){let r,n,{length:i}=e=eE.isArray(e)?e:[e],o={};for(let s=0;s<i;s++){let i;if(n=r=e[s],!tB(r)&&void 0===(n=tU[(i=String(r)).toLowerCase()]))throw new eT(`Unknown adapter '${i}'`);if(n&&(eE.isFunction(n)||(n=n.get(t))))break;o[i||"#"+s]=n}if(!n){let e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new eT("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(t$).join("\n"):" "+t$(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function tz(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new tl(null,e)}function tH(e){return tz(e),e.headers=ti.from(e.headers),e.data=to.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tW(e.adapter||e2.adapter,e)(e).then(function(t){return tz(e),t.data=to.call(e,e.transformResponse,t),t.headers=ti.from(t.headers),t},function(t){return!ts(t)&&(tz(e),t&&t.response&&(t.response.data=to.call(e,e.transformResponse,t.response),t.response.headers=ti.from(t.response.headers))),Promise.reject(t)})}let tG="1.13.2",tV={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{tV[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let tQ={};tV.transitional=function(e,t,r){function n(e,t){return"[Axios v"+tG+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new eT(n(i," has been removed"+(t?" in "+t:"")),eT.ERR_DEPRECATED);return t&&!tQ[i]&&(tQ[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},tV.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};let tq=function(e,t,r){if("object"!=typeof e)throw new eT("options must be an object",eT.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let o=n[i],s=t[o];if(s){let t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new eT("option "+o+" must be "+r,eT.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new eT("Unknown option "+o,eT.ERR_BAD_OPTION)}},tK=tV;class tX{constructor(e){this.defaults=e||{},this.interceptors={request:new eB,response:new eB}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:o,headers:s}=t=tw(this.defaults,t);void 0!==i&&tq(i,{silentJSONParsing:tK.transitional(tK.boolean),forcedJSONParsing:tK.transitional(tK.boolean),clarifyTimeoutError:tK.transitional(tK.boolean)},!1),null!=o&&(eE.isFunction(o)?t.paramsSerializer={serialize:o}:tq(o,{encode:tK.function,serialize:tK.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),tq(t,{baseUrl:tK.spelling("baseURL"),withXsrfToken:tK.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&eE.merge(s.common,s[t.method]);s&&eE.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=ti.concat(a,s);let l=[],c=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(c=c&&e.synchronous,l.unshift(e.fulfilled,e.rejected))});let u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let d=0;if(!c){let e=[tH.bind(this),void 0];for(e.unshift(...l),e.push(...u),n=e.length,r=Promise.resolve(t);d<n;)r=r.then(e[d++],e[d++]);return r}n=l.length;let h=t;for(;d<n;){let e=l[d++],t=l[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{r=tH.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,n=u.length;d<n;)r=r.then(u[d++],u[d++]);return r}getUri(e){return eU(tS((e=tw(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}
51eE.forEach(["delete","get","head","options"],function(e){tX.prototype[e]=function(t,r){return this.request(tw(r||{},{method:e,url:t,data:(r||{}).data}))}}),eE.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(tw(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}tX.prototype[e]=t(),tX.prototype[e+"Form"]=t(!0)});let tJ=tX;class tY{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new tl(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new tY(function(t){e=t}),cancel:e}}}let tZ=tY;function t0(e){return function(t){return e.apply(null,t)}}function t1(e){return eE.isObject(e)&&!0===e.isAxiosError}let t2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
51alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(t2).forEach(([e,t])=>{t2[t]=e});let t3=t2;function t4(e){let t=new tJ(e),r=h(tJ.prototype.request,t);return eE.extend(r,tJ.prototype,t,{allOwnKeys:!0}),eE.extend(r,t,null,{allOwnKeys:!0}),r.create=function(t){return t4(tw(e,t))},r}let t9=t4(e2);t9.Axios=tJ,t9.CanceledError=tl,t9.CancelToken=tZ,t9.isCancel=ts,t9.VERSION=tG,t9.toF
51ormData=eD,t9.AxiosError=eT,t9.Cancel=t9.CanceledError,t9.all=function(e){return Promise.all(e)},t9.spread=t0,t9.isAxiosError=t1,t9.mergeConfig=tw,t9.AxiosHeaders=ti,t9.formToJSON=e=>eZ(eE.isHTMLForm(e)?new FormData(e):e),t9.getAdapter=tW,t9.HttpStatusCode=t3,t9.default=t9;let t6=t9},91336:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(14188),i=r(27845),o=r(61142);let s=function(e,t){return(0,o.A)((0,i.A)(e,t,n.A),e+"")}},91667:(e,t,r)=>{var n=r(89950),i=r(52742),o=r(28654),s="[object Arguments]",a="[object Array]",l="[object Boolean]",c="[object Date]",u="[object Error]",d="[object Function]",h="[object Map]",p="[object Number]",f="[object Object]",g="[object RegExp]",m="[object Set]",v="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",S="[object DataView]",E="[object Float64Array]",w="[object Int8Array]",_="[object Int16Array]",A="[object Int32Array]",T="[object Uint8Array]",O="[object Uint8ClampedArray]",C="[object Uint16Array]",I="[object Uint32Array]",P={};P["[object Float32Array]"]=P[E]=P[w]=P[_]=P[A]=P[T]=P[O]=P[C]=P[I]=!0,P[s]=P[a]=P[b]=P[l]=P[S]=P[c]=P[u]=P[d]=P[h]=P[p]=P[f]=P[g]=P[m]=P[v]=P[y]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!P[n(e)]}},91732:(e,t,r)=>{"use strict";var n=r(93570),i=r(63536),o=r(67059),s=r(27540),a=r(75576);function l(e){if(!a.enabled)throw Error("Transport created when disabled");i.call(this,e,"/xhr",s,a)}n(l,i),l.enabled=o.enabled,l.transportName="xdr-polling",l.roundTrips=2,e.exports=l},92288:(e,t,r)=>{"use strict";r.d(t,{s:()=>p});var n=r(4902),i=r(43604),o=r(68246),s=r(32128),a=r(1458),l=r(18476),c=r(9298),u=r(8365),d=r(16127),h=r(90125);class p{get clicked(){return this.windowClicked}get mousemoved(){return this.windowMouseMoved}get mousedowned(){return this.windowMouseDowned}get userEngaged(){return this._userEngaged.asObservable()}get userClicked(){return this._userClicked.asObservable()}get onResize(){return this._onResize.asObservable()}get onScroll(){return this._onScroll.asObservable()}get onFileSelectBtnClicked(){return this._onFileSelectBtnClicked.asObservable()}fileSelectBtnClicked(){this._onFileSelectBtnClicked.next({dispatchedAt:new Date})}constructor(e){this.settingsService=e,this.windowClicked=!0,this.windowMouseMoved=!1,this.windowMouseDowned=!1,this._userEngagedTriggered=!1,this._userEngaged=new o.m(1),this._userClickedTriggered=!1,this._userClicked=new o.m(1),this._onResize=new o.m(1),this._onScroll=new o.m(1),this._onFileSelectBtnClicked=new o.m(1),u.C.hasWindow()&&(window.TIME_VALIDATE_FN=d.ov,window.OUTPUT_EXT_FROM_OPTIONS_FN=d.zT,window.OUTPUT_VIDEO_ENCODER_FROM_OPTIONS_FN=d.Ch,window.UPLOADED_FILE_TARGET_SIZE_FN=d.Vw,window.UPLOADED_FILE_TARGET_SIZE_BY_DIMENSION_FN=d.gN)}initialize(){return this.registerWindowEvents(),this.settingsService.userSettings.pipe((0,s.s)(1),(0,a.w)(4e3)).pipe((0,l.M)({next:e=>{e.resolveMousemoveEventsStartup&&this.updateUserEngagedState()},error:()=>{}}))}registerWindowEvents(){this.setWindowClickListener(),this.setWindowMouseMoveListener(),this.setWindowMouseDownListener(),this.setWindowResizeListener(),this.setWindowScrollListener()}setWindowMouseMoveListener(){let e=()=>{this.windowMouseMoved=!0,window.removeEventListener("mousemove",e),window.removeEventListener("touchmove",e),this.updateUserEngagedState()};window.addEventListener("mousemove",e,{passive:!0}),window.addEventListener("touchmove",e,{passive:!0})}setWindowMouseDownListener(){let e=()=>{this.windowMouseDowned=!0,window.removeEventListener("mousedown",e),window.removeEventListener("touchstart",e),this.updateUserEngagedState()};window.addEventListener("mousedown",e,{passive:!0}),window.addEventListener("touchstart",e,{passive:!0})}setWindowClickListener(){let e=()=>{this.windowClicked=!0,window.removeEventListener("click",e),window.removeEventListener("touchend",e),this.updateUserEngagedState(),this.updateUserClickedState()};window.addEventListener("click",e),window.addEventListener("touchend",e)}setWindowResizeListener(){let e=e=>{this._onResize.next(e)};window.addEventListener("resize",e)}setWindowScrollListener(){let e=e=>{this._onScroll.next(e)};window.addEventListener("scroll",e)}runOnWindow(e){try{return e(window||{})}catch(e){console.error("Error executing window cmd",e)}return null}updateUserEngagedState(){this._userEngagedTriggered||(this._userEngagedTriggered=!0,this._userEngaged.next(),this._userEngaged.complete())}updateUserClickedState(){this._userClickedTriggered||(this._userClickedTriggered=!0,this._userClicked.next(),this._userClicked.complete())}manuallyActivateTriggers(){this.updateUserEngagedState(),this.updateUserClickedState()}}(0,n.Cg)([c.x,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[]),(0,n.Sn)("design:returntype",void 0)],p.prototype,"updateUserEngagedState",null),(0,n.Cg)([c.x,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[]),(0,n.Sn)("design:returntype",void 0)],p.prototype,"updateUserClickedState",null),(0,n.Cg)([c.x,(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[]),(0,n.Sn)("design:returntype",void 0)],p.prototype,"manuallyActivateTriggers",null),p=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(h.h)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===h.h?Object:h.h])],p)},92349:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(30243);let i=function(e,t){var r=t?(0,n.A)(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},92367:(e,t,r)=>{"use strict";var n=r(93570),i=r(63536),o=r(27540),s=r(1878),a=r(9282),l=r(10020);function c(e){if(!a.enabled&&!s.enabled)throw Error("Transport created when disabled");i.call(this,e,"/xhr_streaming",o,s)}n(c,i),c.enabled=function(e){return!(e.nullOrigin||l.isOpera())&&s.enabled}
51,c.transportName="xhr-streaming",c.roundTrips=2,c.needBody=!!r.g.document,e.exports=c},92384:(e,t,r)=>{"use strict";r.d(t,{c:()=>m});var n=r(39030),i=r(54003),o=r(32128),s=r(99991),a=r(32277),l=r(20986);function c(){return(0,s.N)(function(e,t){e.subscribe((0,a._)(t,l.l))})}var u=r(45019);function d(e){return(0,u.T)(function(){return e})}var h=r(990),p=r(2943);function f(e,t){return t?function(r){return(0,i.x)(t.pipe((0,o.s)(1),c()),r.pipe(f(e)))}:(0,h.Z)(function(t,r){return(0,p.Tg)(e(t,r)).pipe((0,o.s)(1),d(t))})}var g=r(56362);function m(e,t){void 0===t&&(t=n.E);var r=(0,g.O)(e,t);return f(function(){return r})}},92430:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});let n=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n};var i=r(50076),o=r(4527),s=r(36670),a=r(87125),l=r(12610),c=Object.prototype.hasOwnProperty;let u=function(e,t){var r=(0,o.A)(e),u=!r&&(0,i.A)(e),d=!r&&!u&&(0,s.A)(e),h=!r&&!u&&!d&&(0,l.A)(e),p=r||u||d||h,f=p?n(e.length,String):[],g=f.length;for(var m in e)(t||c.call(e,m))&&!(p&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||(0,a.A)(m,g)))&&f.push(m);return f}},92441:(e,t,r)=>{var n=r(17099),i=r(13674),o=r(71598),s=r(78483),a=r(69455),l=r(92999);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},92556:(e,t,r)=>{"use strict";r.d(t,{e:()=>y});var n=r(22902),i=r(67966),o=r(28663),s=r(67783),a=r(87125),l=r(83497),c=r(28461);let u=function(e,t,r,n){if(!(0,l.A)(e))return e;t=(0,s.A)(t,e);for(var i=-1,u=t.length,d=u-1,h=e;null!=h&&++i<u;){var p=(0,c.A)(t[i]),f=r;if("__proto__"===p||"constructor"===p||"prototype"===p)break;if(i!=d){var g=h[p];void 0===(f=n?n(g,p,h):void 0)&&(f=(0,l.A)(g)?g:(0,a.A)(t[i+1])?[]:{})}(0,o.A)(h,p,f),h=h[p]}return e},d=function(e,t,r){for(var n=-1,o=t.length,a={};++n<o;){var l=t[n],c=(0,i.A)(e,l);r(c,l)&&u(a,(0,s.A)(l,e),c)}return a};var h=r(45217);let p=function(e,t){return d(e,t,function(t,r){return(0,h.A)(e,r)})};var f=r(3472),g=r(27845),m=r(61142);let v=function(e){return(0,m.A)((0,g.A)(e,void 0,f.A),e+"")}(function(e,t){return null==e?{}:p(e,t)});class y{static getElementScrollPosition(e){if(e.parentElement){let t=y.getElementScrollPosition(e.parentElement);return{x:(e.scrollLeft||0)+t.x,y:(e.scrollTop||0)+t.y}}return{x:e.scrollLeft||0,y:e.scrollTop||0}}static getElementWindowPosition(e){return{x:window.scrollX||0,y:window.scrollY||0}}static toGenericMouseEvent(e){let t=(0,n.A)(e,"targetTouches"),r=t&&t[0],i=r?e.targetTouches[0]:e;i.nativeEvent&&(i=i.nativeEvent);let o=e.offsetX||i.offsetX;if(r)try{o=e.targetTouches[0].pageX-e.target.getBoundingClientRect().left}catch(e){return null}return{offsetX:o,type:e.type,...v(i,["clientX","clientY","pageX","pageY","target"])}}static hasParentWithCSSSelector(e,t){return!!this.getParentWithCSSSelector(e,t)}static getParentWithCSSSelector(e,t){return e.closest(t)}static isElementParentOrSelfOf(e,t){if(!e||!t)return!1;try{let r=e;for(;t&&t.tagName!==document.body.tagName;){if(t===r)return!0;r=r.parentElement}}catch(e){console.error("Error on getClosestElements supressed. "+e.message)}return!1}static getClosestElements(e,t){try{let r=e;for(;r&&r.tagName!==document.body.tagName;){let e=r.querySelectorAll(t);if(e.length>0)return e;r=r.parentElement}}catch(e){console.error("Error on getClosestElements supressed. "+e.message)}return null}static scrollToTop(){navigator.userAgent.match(/MSIE 10/i)||navigator.userAgent.match(/Trident\/7\./)||navigator.userAgent.match(/Edge\/12\./)?window.scrollTo&&window.scrollTo(0,0):window.scroll&&window.scroll({left:0,top:0,behavior:"smooth"})}static scrollToNav(){let e=document.querySelector("nav").getBoundingClientRect();navigator.userAgent.match(/MSIE 10/i)||navigator.userAgent.match(/Trident\/7\./)||navigator.userAgent.match(/Edge\/12\./)?window.scrollTo&&window.scrollTo(0,e.top):window.scroll&&window.scroll({left:0,top:e.top,behavior:"smooth"})}static alignNavToWindowTop(){try{let e=document.querySelector("nav").getBoundingClientRect();navigator.userAgent.match(/MSIE 10/i)||navigator.userAgent.match(/Trident\/7\./)||navigator.userAgent.match(/Edge\/12\./)?window.scrollTo(0,e.top):window.scroll({left:0,top:e.top,behavior:"smooth"})}catch(e){console.error(e)}}static setAttribute(e,t,r){e.setAttribute(t,r)}static setStyle(e,t,r){e.style[t]=r}}},92999:(e,t,r)=>{var n=r(17099),i=r(36315),o=r(2331),s=200;e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<s-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(e,t),this.size=r.size,this}},93007:e=>{e.exports=Array.isArray},93214:(e,t,r)=>{"use strict";r.d(t,{P_:()=>R});var n=r(4902),i=r(71717),o=r(43604),s=r(68246),a=r(86728),l=r(2943),c=r(7431),u=r(32277);function d(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=(0,c.K)(e)).length?(0,l.Tg)(e[0]):new a.c(h(e))}function h(e){return function(t){for(var r=[],n=function(n){r.push((0,l.Tg)(e[n]).subscribe((0,u._)(t,function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)})))},i=0;r&&!t.closed&&i<e.length;i++)n(i)}}var p=r(56362),f=r(33441),g=r(59971),m=r(990),v=r(30591),y=r(92384),b=r(32128),S=r(8365),E=r(43629),w=r(51352),_=r(9968),A=r(79347),T=r(29238),O=r(90125),C=r(33353),I=r(18689),P=r(92288),x=r(9123);let k=12e3,M=45e3,D=500;class R{get initialMotives(){return this._initialMotives}set initialMotives(e){this._initialMotives=e,this.setMotives(this._initialMotives),this.updateCurrentUserMotiveConfig()}get freeUserMotives(){return this.initialMotives?this.initialMotives.free:{}}get internalAdsEnabled(){return this.motives&&this.motives&&this.motives.free.internalMotivesEnabled}get motiveReady(){return!this.forceNoMotives&&this.canDisplayAdsense}get onMotiveSettingsChange(){return this._onMotiveSettingsChange.asObservable()}get onEffectiveMotiveSettingsChange(){return this._onEffectiveMotiveSettingsChange.asObservable()}get effectiveMotives(){return this._effectiveMotives}get currentUserMotiveConfig(){return this._motiveConfig}constructor(e,t,r,n,i,o,a,l){this.settingsService=e,this.userPreferenceService=t,this.loginService=r,this.uiContext=n,this.http=i,this.apiConfig=o,this.windowService=a,this.scriptLoadService=l,this.motivesEnabled=!0,this.forceNoMotives=!1,this.canDisplayAdsense=!1,this.motiveSourceLoadStarted=!1,this.adsenseBlocked=!1,this.adsenseWatch=null,this._onMotiveSettingsChange=new s.m(1),this._onEffectiveMotiveSettingsChange=new s.m(1);const c=this.userPreferenceService.getPreference(I.kD.MOTIVES_DISABLED_DATE,I.J5);c&&c.date&&E.W.from(c.date).isAfter(E.W.from(new Date).subtract(1,"hours"))&&(this.motivesEnabled=!1),this.loginService.onUserDetailsChanged.subscribe(()=>{this.cachePaidUserStatus(),this.updateCurrentUserMotiveConfig(),this.calculateEffictiveMotives()}),this.settingsService.userSettings.subscribe({next:e=>{this.setMotives(e.motive),this.updateCurrentUserMotiveConfig(),this.calculateEffictiveMotives()}}),this.userPreferenceService.preferenceChange.pipe((0,f.p)(e=>e.preferenceKey===I.kD.MOTIVES_DISABLED_DATE)).subscribe({next:e=>{let t=e.value;t&&t.date&&E.W.from(t.date).isAfter(E.W.from(new Date).subtract(1,"hours"))?this.motivesEnabled=!1:this.motivesEnabled=!0,this.calculateEffictiveMotives()}})}initialize(){this.loadMotiveSource();try{if(!S.C.hasDocument())return void console.error("Requested execution aborted since document was not avalilable");this.forceNoMotives=!!document.location.search.match(/noMotives/
51)}catch{}}async loadMotiveSource(){try{if(!this.motiveSourceLoadStarted){this.motiveSourceLoadStarted=!0;let e=this.userPreferenceService.getPreference(I.kD.CACHED_IS_PAID_USER);if(!0===e){this.canDisplayAdsense=!1;return}if(!1===e)return void await this.loadAdsenseScript();if(await new Promise(e=>{d(this.loginService.onUserDetailsChanged.pipe((0,g.$)()),(0,p.O)(1e4)).subscribe(()=>e())}),this.loginService.userDetails&&this.loginService.userDetails.isPaidUser()){this.canDisplayAdsense=!1;return}await this.loadAdsenseScript()}}catch(e){this.uiContext.errorToast("Please consider whitelisting xconvert.com on your AdBlocker.","Hi Friend",!1,!1);try{this.saveMotiveStatics(!1)}catch(e){}}}saveMotiveStatics(e){try{let t="/users",r=`${t}/session/info`;this.windowService.userClicked.pipe((0,m.Z)(()=>this.http.post(`${this.apiConfig.getHttpsEndpoint()}${r}`,{enabled:e},{headers:{"Content-Type":"application/json"}})),(0,v.l)(e=>e.pipe((0,y.c)(1e3),(0,b.s)(2)))).subscribe({error:e=>{}})}catch(e){}}calculateEffictiveMotives(){let e=(0,i.om)(w.xU,this.currentUserMotiveConfig||{},{strategy:"excludeAll"}),t=Object.assign({},this.currentUserMotiveConfig,e),r=this.motivesEnabled&&!this.adsenseBlocked,n={};Object.keys(e).forEach(e=>{t[e]=this.currentUserMotiveConfig[e]&&r,n[e]=!!this.currentUserMotiveConfig[e]}),t.reservedSlots=n,this._effectiveMotives=t,this._onEffectiveMotiveSettingsChange.next(this.effectiveMotives)}async loadAdsenseScript(){this.watchAdsenseLoaded();try{await this.scriptLoadService.loadAdsense()}catch(e){this.markAdsenseBlocked();try{this.saveMotiveStatics(!1)}catch(e){}return}let e=window;e.adsbygoogle=e.adsbygoogle||[],this.canDisplayAdsense=!0;try{this.saveMotiveStatics(!0)}catch(e){}}watchAdsenseLoaded(e=Date.now,t=D){if(null!==this.adsenseWatch||!S.C.hasWindow())return;let r=e(),n=()=>window.adsbygoogle?.loaded===!0,i=()=>{null!==this.adsenseWatch&&(clearInterval(this.adsenseWatch),this.adsenseWatch=null)};this.adsenseWatch=setInterval(()=>{let t=e()-r;if(n()){i(),this.adsenseBlocked&&(this.adsenseBlocked=!1,this.calculateEffictiveMotives());return}if(t>=k&&this.markAdsenseBlocked(),t>=M)return void i()},t)}markAdsenseBlocked(){this.adsenseBlocked||(this.adsenseBlocked=!0,this.calculateEffictiveMotives())}cachePaidUserStatus(){let e=!!this.loginService.userDetails&&this.loginService.userDetails.isPaidUser();this.userPreferenceService.setPreference(I.kD.CACHED_IS_PAID_USER,e)}updateCurrentUserMotiveConfig(){this.motives?this.loginService.userDetails&&this.loginService.userDetails.isPaidUser()?this._motiveConfig=this.motives.paid:this._motiveConfig=this.motives.free:this._motiveConfig={}}setMotives(e){this.motives=e,this._onMotiveSettingsChange.next(e)}}R=(0,n.Cg)([(0,o._G)(),(0,n.Qj)(0,(0,o.WQ)(O.h)),(0,n.Qj)(1,(0,o.WQ)(I.QC)),(0,n.Qj)(2,(0,o.WQ)(T.H)),(0,n.Qj)(3,(0,o.WQ)(C._)),(0,n.Qj)(4,(0,o.WQ)(A.jo)),(0,n.Qj)(5,(0,o.WQ)(_.ApiConfig)),(0,n.Qj)(6,(0,o.WQ)(P.s)),(0,n.Qj)(7,(0,o.WQ)(x.L)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===O.h?Object:O.h,void 0===I.QC?Object:I.QC,void 0===T.H?Object:T.H,void 0===C._?Object:C._,void 0===A.jo?Object:A.jo,void 0===_.ApiConfig?Object:_.ApiConfig,void 0===P.s?Object:P.s,void 0===x.L?Object:x.L])],R)},93570:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},94242:(e,t,r)=>{"use strict";r.d(t,{$v:()=>o,Cu:()=>i,EF:()=>a,K:()=>f,On:()=>s,Pz:()=>d,Rb:()=>h,bF:()=>n});let n="studio",i="convert",o="Quick convert",s="Studio",a=new Set(["3fr","apng","arw","avif","bmp","cr2","cr3","crw","dcr","dng","eps","erf","gif","heic","heif","ico","jfif","jpeg","jpg","mos","mrw","nef","odg","orf","pef","png","ppm","psd","pub","raf","rw2","tif","tiff","webp","x3f","xcf"]),l=new Set(["3g2","3gp","asf","av1","avchd","avi","divx","f4v","flv","hevc","m2ts","m2v","m4v","mjpeg","mkv","mov","mp4","mpeg","mpeg2","mpg","mts","mxf","ogv","rm","rmvb","swf","ts","vob","webm","wmv","wtv","xvid"]),c=new Set(["gif","apng"]);function u(e){let t=String(null==e?"":e).trim().toLowerCase();return"."===t.charAt(0)?t.slice(1):t}function d(e){if(!e)return!1;let{toType:t}=e;if(!("video"===t||"string"==typeof t&&l.has(t)))return!1;let r=e.acceptedExtensions;
51if(!Array.isArray(r)||0===r.length||!r.every(e=>a.has(u(e))))return!1;let{fromType:n}=e;return!(Array.isArray(n)&&1===n.length&&c.has(u(n[0])))}function h(e){let t=u(e?.toType);return t&&"mp4"!==t&&l.has(t)?t.toUpperCase():null}function p(e){return e?.source==="api"&&e?.flags?.studio===!1}function f(e,t){return d(e)&&!p(t)}},94459:(e,t,r)=>{"use strict";r.d(t,{K_:()=>o.K_,PS:()=>o.PS,Yl:()=>i.getFileMimeTypeFromFilename,ak:()=>i.replaceExtension,hA:()=>i.getBasename,rB:()=>i.getFileMimeType,tr:()=>n.isThumbnailSupported,uQ:()=>n.getExtension});var n=r(74034),i=r(53509),o=r(88988)},94552:(e,t,r)=>{var n=r(84779),i=r(17099),o=r(36315);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},94806:(e,t,r)=>{var n=r(89226),i=r(27371),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;e.exports=s?function(e){return null==e?[]:n(s(e=Object(e)),function(t){return o.call(e,t)})}:i},94962:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u});var n=r(37876),i=r(14232),o=r(78944),s=r(8365),a=r(18291),l=r(31504),c=r.n(l);class u extends i.Component{static get generateId(){return a.$.getRandomString("id_")}static show(e){if(!s.C.hasDocument())return void console.error("Requested execution aborted since document was not available");let t=this.generateId,r=document.createElement("div");return r.id=t,r.className=`spinner ${Date.now()}`,document.body.appendChild(r),e.id=t,new Promise(t=>{let i=(0,n.jsx)(u,{...e,instantCreateCallback:e=>{t(e)}});(0,o.createRoot)(r).render(i)})}updateMessage(e){this.setState({message:e})}constructor(e){super(e),this.state={message:this.props.message},this.props.instantCreateCallback(this)}getContainerId(){return this.props.id}render(){return(0,n.jsx)("div",{className:c()["spinner-container"],children:(0,n.jsxs)("div",{className:c()["spinner-inner"],children:[(0,n.jsx)("div",{className:c()["spinner-border"],role:"status",children:(0,n.jsx)("span",{className:c()["sr-only"],children:"Loading..."})}),(0,n.jsx)("div",{className:c().message,style:{color:"white",textAlign:"center"},children:this.state.message})]})})}}},95026:(e,t,r)=>{"use strict";r.d(t,{e:()=>d});var n=r(4902),i=r(43604),o=r(9711),s=r(83831),a=r(9968),l=r(1936),c=r(79347),u=r(41451);class d{constructor(e,t,r){this.http=e,this.storageService=t,this.helperService=r,this.logger=o.V.getLogger("ThumbnailService")}getInputFileInfo(e){let t=`${a.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e.uploadDomain)}/files/input/info`;return this.http.post(t,{filename:e.fileMetadata.safeName})}async getImageFor(e,t){let r=s.N.getThumbnailEndpoint(t)+"/thumbnail?token="+e;await this.http.request(r,"GET",null,{headers:this.helperService.getCommonHttpHeaders(),params:{token:e}}).response$.toPromise().then(e=>{}).catch(e=>{this.logger.error({message:"Error getting thumbnail.",error:e})})}}d=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(c.jo)),(0,n.Qj)(1,(0,i.WQ)(u.n)),(0,n.Qj)(2,(0,i.WQ)(l.w)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===c.jo?Object:c.jo,void 0===u.n?Object:u.n,void 0===l.w?Object:l.w])],d)},95077:(e,t,r)=>{"use strict";r.d(t,{N:()=>c});var n=r(4902),i=r(43604),o=r(45019),s=r(51352),a=r(9968),l=r(79347);class c{constructor(e,t){this.http=e,this.apiConfig=t}list(){return this.http.get(this.apiConfig.getDevicesEndpoint()).pipe(s.UW,(0,o.T)(e=>e??[]))}revoke(e){return this.http.post(this.apiConfig.getRevokeDeviceEndpoint(),{sessionId:e}).pipe(s.UW)}}c=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(l.jo)),(0,n.Qj)(1,(0,i.WQ)(a.ApiConfig)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===l.jo?Object:l.jo,void 0===a.ApiConfig?Object:a.ApiConfig])],c)},95243:(e,t,r)=>{"use strict";r.d(t,{D:()=>a});var n=r(4902),i=r(43604),o=r(94962),s=r(53224);class a{async show(e){let t=await o.default.show({message:e});return setTimeout(()=>{s.v.addClass(this.getElement(t),"display-block"),s.v.removeClass(this.getElement(t),"display-none")},1),t}updateMessage(e,t){e.updateMessage(t)}hide(e){setTimeout(()=>{try{s.v.removeClass(this.getElement(e),"display-block"),s.v.addClass(this.getElement(e),"dis
51play-none"),e.updateMessage("")}catch(e){console.error(e)}},10)}getElement(e){return document.querySelector(`#${e.getContainerId()}.spinner`)}getBody(e){return document.querySelector("body")}async runWithLoader(e,t){return new Promise(async(r,n)=>{let i=await this.show(t);try{setTimeout(async()=>{try{await e(),r({})}catch(e){n()}finally{this.hide(i)}},0)}catch(e){console.error(e)}})}}a=(0,n.Cg)([(0,i._G)()],a)},95295:(e,t,r)=>{"use strict";r.d(t,{i:()=>u});var n=r(4902),i=r(43604),o=r(45019),s=r(51352),a=r(9968),l=r(79347),c=r(29238);class u{constructor(e,t,r){this.apiConfig=e,this.http=t,this.loginService=r}list(e=!1){this.requireLogin();let t=`${this.apiConfig.getApiKeysEndpoint()}?includeRevoked=${e?"true":"false"}`;return this.http.get(t).pipe(s.UW,(0,o.T)(e=>e?.keys??[]))}create(e){if(this.requireLogin(),!e.name||0===e.name.trim().length)throw Error("ApiKey name is required");if(!e.preset&&(!e.scopes||0===e.scopes.length))throw Error("ApiKey preset or explicit scopes[] is required");return this.http.post(this.apiConfig.getApiKeysEndpoint(),e).pipe(s.UW)}revoke(e,t){return this.requireLogin(),this.http.post(this.apiConfig.getApiKeyRevokeEndpoint(e),{reason:t??"user_revoked"}).pipe(s.UW)}rotate(e){return this.requireLogin(),this.http.post(this.apiConfig.getApiKeyRotateEndpoint(e),{}).pipe(s.UW)}get(e){return this.requireLogin(),this.http.get(this.apiConfig.getApiKeyByIdEndpoint(e)).pipe(s.UW)}requireLogin(){if(!this.loginService.isUserLoggedIn)throw Error("ApiKeysService: user must be logged in")}}u=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(a.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(l.jo)),(0,n.Qj)(2,(0,i.WQ)(c.H)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===a.ApiConfig?Object:a.ApiConfig,void 0===l.jo?Object:l.jo,void 0===c.H?Object:c.H])],u)},95528:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},96361:(e,t,r)=>{"use strict";r.d(t,{WT:()=>d,pm:()=>o,sF:()=>y,th:()=>a});var n=r(89692),i=r(38238);function o(e){let t=Math.max(0,Math.floor(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function s(e){let t=Math.round(1e3*Math.max(0,Number.isFinite(e)?e:0)),r=Math.floor(t/6e4),n=Math.floor(t%6e4/1e3);return`${r}_${String(n).padStart(2,"0")}.${String(t%1e3).padStart(3,"0")}`}function a(e){let t=Math.max(0,e),r=Math.floor(t),n=Math.round((t-r)*1e3),i=Math.floor(r/3600),o=Math.floor(r%3600/60),s=r%60;return`${i}:${String(o).padStart(2,"0")}:${String(s).padStart(2,"0")}.${String(n).padStart(3,"0")}`}function l(e){return String(Math.round(1e3*Math.max(0,e))/1e3)}function c(e){let t=e/1048576;return t<1?"<1 MB":`${Math.round(t)} MB`}function u(e,t,r){return 1===e?t:r}let d=5;function h(e,t){if("number"!=typeof t||!Number.isFinite(t)||t<=0)return null;if(e>0&&e<=1/t+1e-6)return 1;if(t>d)return null;let r=e*t,n=Math.round(r);return n>=1&&1e-6>=Math.abs(r-n)?n:null}function p(e){let t=Math.max(0,Math.floor(Number.isFinite(e)?e:0)),r=t%100,n=r>=11&&r<=13?"th":t%10==1?"st":t%10==2?"nd":t%10==3?"rd":"th";return`${t}${n}`}function f(e){return e.length<=1?e[0]??"":`${e.slice(0,-1).join(", ")} or ${e[e.length-1]}`}let g=Object.freeze({SCREENSHOT_SPECIFIC_FRAME:{label:"One frame",hint:"The frame you’re on, as one image."},SCREENSHOT_MULTIPLE_FRAMES:{label:"Several frames",hint:"A set of frames, zipped together."},CONTACT_SHEET:{label:"Contact sheet",hint:"Chosen frames, tiled in one image."}});function m(e){let t=e.trim().replace(/,/g,"."),r=/^(\d+(?:\.\d+)?|\.\d+)s?$/.exec(t);return r?`${r[1]} s`:t}let v="Only videos open in the Frame picker.",y=Object.freeze({convertOne:e=>`Convert frame to ${e.toUpperCase()}`,convertMany:e=>`Convert ${e} ${u(e,"frame","frames")}`,convertSheet:e=>`Convert grid to ${e.toUpperCase()}`,convertShort:"Convert",gridTitle:"Frames you will get",sheetToggleVideo:"Video",sheetToggleSheet:"Sheet",wholeClip:"Whole clip",nearThisFrame:"Fine \xb7 around this frame",startHere:"Start here",endHere:"End here",reset:"Reset",jumpToSharpest:"Sharpest in clip",sharpestNear:"Sharpest near here",sharpestNearHint:"The sharpest frame close to this one",sharpestFrame:"Sharpest frame",typeATime:"Type a time",looksSharp:"Looks sharp",looksSoft:"Looks soft",looksSharpInPreview:"Looks sharp in this preview",looksSoftInPreview:"Looks soft in this preview",sharp:"Sharp",sharpnessLegend:"Green = the sharpest moments",sharpnessLegendSoft:"Orange = looks soft",intervalEveryFrame:"Every frame",intervalEveryNth:e
51=>1>=Math.floor(e)?y.intervalEveryFrame:`Every ${p(e)} frame`,summaryChip:(e,t,r,n,s)=>{let a=h(t,s),c=null===a?`every ${l(t)} s`:1===a?"every frame":`every ${p(a)} frame`,[d,f]=o(r)===o(n)?[(0,i.KP)(r),(0,i.KP)(n)]:[o(r),o(n)];return`${e} ${u(e,"frame","frames")} \xb7 ${c} \xb7 ${d}–${f}`},raggedRows:(e,t,r,n)=>0===n?`${e} in ${t} ${u(t,"column","columns")} = ${r} ${u(r,"row","rows")}`:`${e} in ${t} ${u(t,"column","columns")} = ${r-1} ${u(r-1,"row","rows")} + ${n}`,frameCell:(e,t,r)=>`Frame ${e} of ${t} \xb7 ${o(r)}`,frameInSequence:(e,t)=>`Frame ${e} of your ${t}`,detailsOnceUploaded:e=>`${e.toUpperCase()} \xb7 details once uploaded`,uploadingFilmstrip:"Uploading… the filmstrip appears in a moment.",uploading:e=>`Uploading \u00b7 ${Math.max(0,Math.min(100,Math.round(e)))} %`,convertDroppedUploadFailed:"The upload failed, so nothing was converted — add the file again, then Convert",findingLastFrame:"Finding the clip’s last frame — your frame converts in a moment",convertWhenUploaded:e=>`Uploading \u00b7 ${Math.max(0,Math.min(100,Math.round(e)))} % \u2014 your frames convert as soon as it\u2019s done`,uploadingName:e=>`Uploading ${e}`,restoring:"Restoring your video…",previewReady:"Ready \xb7 pick your frame",sharpnessMeasuring:"Checking which frames are sharpest…",fillingIn:"Filling in from the start.",noSource:"Preview isn’t available for this file yet. Go back to Quick convert and type a time instead.",preparingPreview:"Preparing preview…",convertingForPreview:e=>`Converting for preview \u00b7 ${Math.max(0,Math.min(100,Math.round(e)))} %`,noPlayback:"This browser can’t play this video. Pick a time on the filmstrip below — the conversion still works.",thumbsFromServer:"Thumbnails from our server \xb7 this browser can’t play this video",thumbsUnavailable:"Thumbnails aren’t available for this video’s codec",noSourceAction:"Go back to Quick convert",probeFailed:"We couldn’t read this video’s length, so Several frames and Contact sheet are off for now. One frame still works.",expired:"This video isn’t on our servers any more. Add it again to pick another frame.",sessionNotHere:"This picker session isn’t saved in this browser. Frames you converted from it are on Downloads; add the video again to pick more.",openDownloads:"Open Downloads",storageDisabled:"Your browser isn’t saving your picker settings, so Back from Downloads starts fresh.",checkTitle:"Check before converting",checkFrames:"Frames",checkFormat:"Format",checkSize:"Estimated size",checkHowLong:"How long",largeJob:e=>`Big download \xb7 about ${e} MB at 720p`,manyFrames:(e,t)=>`${e} frames is a lot. Every frame of this clip would be ${t}.`,zipNote:`Your ZIP will be on the Downloads page for ${n.Rt} hours.`,back:"Back",howLong:e=>e<5?"a few seconds":e<90?`about ${5*Math.round(e/5)} seconds`:`about ${Math.max(2,Math.round(e/60))} minutes`,estimatedSize:(e,t)=>t>1?`about ${c(e)} (${t} files)`:`about ${c(e)}`,tooManyFrames:e=>`That\u2019s ${e} frames \u2014 more than we can make at once. Use a longer gap between frames, a shorter range, or up to ${n.zE.maxFramesPerJob} frames.`,sheetTooLarge:e=>`A grid of ${e} frames is too big for one image. Use ${n.zE.maxSheetCells} frames or fewer, or a narrower sheet.`,moreThanClip:(e,t)=>`That\u2019s ${e} frames \u2014 more than this range has. Every frame in it would be ${t}, so ask for ${t} or fewer.`,rangeInvalid:"The start is after the end. Drag the start earlier, or press Reset.",countTooSmall:"For a single frame, switch to One frame. Otherwise ask for 2 frames or more.",intervalTooLong:"Longer than your range",limitsSequence:`Up to ${n.zE.maxFramesPerJob} frames at a time.`,limitsSheet:`Up to ${n.zE.maxSheetCells} frames in one grid, ${n.zE.maxSheetWidthPx} px wide at most.`,progressTitle:"Getting your frames…",progressCount:(e,t)=>`${e} of ${t}`,progressLeft:(e,t=!0)=>!t&&e<5?"starting…":e<5?"almost done":`about ${5*Math.round(e/5)} seconds left`,stageUploaded:"Your video is uploaded",stageFinding:"Saving each frame as an image",stageZip:"Packing the images into a ZIP",progressHint:"Long videos can take a minute — you can leave this tab open.",stopAndGoBack:"Stop and go back",progressAnnounce:e=>e>=100?"Done. Opening your downloads.":`${e} percent done`,downloadAllZip:e=>`Download all ${e} ${u(e,"frame","frames")} (ZIP)`,makingZip:"Making your ZIP…",showDownloads:e=>`Show Downloads (${e} ${u(e,"file","files")})`,phoneZipHint:"On a phone the ZIP opens in the Files app.",pickAnotherFrame:"Pick another frame",pickItOnTheVideo:"Pick it on the video",pickTheFrame:"Pick the frame",convertFirstFrame:"Convert first frame",newPill:"NEW",advertisement:"Advertisement",filesTitle:"Files",filesCount:(e,t="video")=>`${e} ${u(e,t,`${t}s`)}`,addVideo:"Add a video",dropAnywhere:"or drop it anywhere on this page",emptyTitle:"Pick the exact frame from your video",emptyBody:"Add a video, then step through it frame by frame or save many frames at once.",dropOverlay:"Drop your video to open it in the Frame picker",fileMeta:(e,t,r,n)=>`${e} \xb7 ${t} \xd7 ${r} \xb7 ${y.fpsLabel(n)}
51`,fileMetaNoRate:(e,t,r)=>`${e} \xb7 ${t} \xd7 ${r}`,fileMetaVariable:(e,t,r)=>`${e} \xb7 ${t} \xd7 ${r} \xb7 ${y.variableRate}`,variableRate:"frame rate varies",variableRateExplained:"This clip’s frame rate varies, so the picker shows times, not frame numbers.",fpsLabel:e=>`${Math.round(e)} fps`,filesButton:e=>`Files (${e})`,onlyVideos:v,refusedPick:(e,t)=>`${e} ${"audio"===t?"is an audio file":"image"===t?"is a still image":"isn’t a video"}. ${v}`,noFileYet:"Add a video first.",onlyAccepted:e=>`Only ${f(e.map(e=>e.toUpperCase()))} videos open here.`,wrongContainer:(e,t,r)=>`This page takes ${f(e.map(e=>e.toUpperCase()))} \u2014 use Video to ${r?r.toUpperCase():"image"} for .${t.toLowerCase()}`,pageRefusedContainer:(e,t,r,n)=>`Couldn\u2019t add ${e} here \u2014 this page uploads ${f(t.map(e=>e.toUpperCase()))}. Use Video to ${n?n.toUpperCase():"image"} for .${r.toLowerCase()}.`,openPageFor:e=>`Open Video to ${e?e.toUpperCase():"image"}`,couldNotAdd:(e,t)=>`Couldn’t add ${e}${t?` — ${t.replace(/[.\s]+$/,"")}`:""}.`,pageNotReady:"The page is still loading. Try adding the video again in a moment.",unreadable:e=>`We couldn\u2019t read ${e} \u2014 it may not be a video, or it may be damaged.`,stillImage:(e,t)=>`${e} is a still image \u2014 it has one frame, so there is nothing to pick. Quick convert turns it into a${/^[AEIOU]/i.test(t)?"n":""} ${t.toUpperCase()}.`,removeFile:"Remove",animatedOpensOn:(e,t)=>`${String(e).toUpperCase()} files open in the Frame picker on ${String(e).toUpperCase()} to ${String(t).toUpperCase()}.`,openAnimatedPage:(e,t)=>`Open ${String(e).toUpperCase()} to ${String(t).toUpperCase()}`,animatedNotYet:(e,t,r)=>`The Frame picker can\u2019t open ${e} yet. ${String(t).toUpperCase()} to ${String(r).toUpperCase()} saves its first frame as a ${String(r).toUpperCase()}.`,backTo:e=>`← ${e}`,pickerTitle:"Frame picker",whatYouGet:"What you get",formatLabel:"Format",qualityLabel:"Quality",sizeLabel:"Size",sizeOriginal:"Original",sizeCustom:"Custom",sizeOriginalNote:(e,t,r="video")=>`Original keeps ${y.yourNoun(r)}\u2019s own size, ${e} \xd7 ${t}.`,sizeLockAspect:"Keep the shape: one number sets the other",sizeUnlockAspect:"Shape unlocked: width and height on their own",sizeUpscaleNote:(e,t,r="video")=>`Bigger than the ${r} (${e} \xd7 ${t}), so the image will look soft.`,sizePresetCappedNote:(e,t,r,n="video")=>`${e} is larger than ${y.yourNoun(n)} (${t} \xd7 ${r}) — the frame keeps its size, ${t} \xd7 ${r}.`,resultLabel:"Result",resultRefused:"—",savesAsLabel:"Saves as",resultOne:(e,t,r)=>`one ${e.toUpperCase()} \xb7 ${t} \xd7 ${r}`,resultMany:(e,t)=>`${e} ${u(e,t.toUpperCase(),`${t.toUpperCase()}s`)} \xb7 one ZIP`,resultNoFrames:"No frames",resultSheet:(e,t,r)=>`one ${e.toUpperCase()} grid \xb7 ${t} \xd7 ${r}`,resultOneNoSize:e=>`one ${e.toUpperCase()}`,resultSheetNoSize:e=>`one ${e.toUpperCase()} grid`,estimatedSizeLabel:"Estimated size",about:e=>`About ${e}`,moreOptions:"More options",fewerOptions:"Fewer options",show:"Show",hide:"Hide",optionsButton:"Options",optionsSheetTitle:"Options",sheetClose:"Close",summaryLine:(e,t)=>`${e.toUpperCase()} \xb7 ${t}`,timeHint:"Type 7.267, 0:07.267 or 219f, then press Enter.",timeHintFor:e=>{if(!e||"object"!=typeof e||!(e.fps>0)||!(e.frameCount>0))return y.timeHint;if(e.provisional){let t=Math.max(0,e.duration/2),r=e.duration>=2?Math.floor(t):Math.floor(10*t)/10;return`Type ${r.toFixed(3)} or ${(0,i.KP)(r)}, then press Enter.`}let t=Math.max(0,(e.frameCount-1)/e.fps),r=t.toFixed(3),n=(0,i.KP)(t);return e.variable?`Type ${r} or ${n}, then press Enter. ${y.variableStepNote}`:`Type ${r}, ${n} or ${e.frameCount}f, then press Enter.`},variableStepNote:"The frame keys move about one frame at a time — this clip’s frame rate varies.",vfrTypeATime:"This clip has a variable frame rate — type a time.",frameTokenNotYet:"Frame numbers work once the clip’s frame rate is known — type a time for now.",readingClip:"Reading the clip…",renditionNote:"Preview: our server’s copy. Saved frame: the original.",renditionNoteLong:"The preview comes from our server’s copy of the clip; the saved frame is taken from your original, so the picture here can differ by up to one frame.",stepAboutOneFrame:e=>"back"===e?"Back about one frame":"Forward about one frame",stepAboutOneFrameCaption:"≈ 1 frame",movedToFrame:(e,t,r)=>`Moved to frame ${t} (${e}) — the frame showing at ${m(r)}.`,movedToClipEnd:(e,t)=>`Moved to ${e} — the clip ends there (you typed ${m(t)}
51).`,filmstripHint:"Whole clip \xb7 click anywhere on the strip, or drag.",filmstripHintTouch:"Whole clip \xb7 tap to jump about there; use Fine to land on one frame.",filmstripHintTouchNear:"Fine \xb7 one frame per tile — tap a frame, swipe along the clip, drag the knob.",filmstripHintNear:"Fine \xb7 one frame per tile, scroll sideways for more.",frameOf:(e,t,r)=>`Frame ${e} of ${t} \xb7 ${y.fpsLabel(r)}`,savesAs:(e,t,r,n)=>null===t?`${e}-${s(r)}.${n}`:`${e}-f${String(Math.max(1,Math.floor(t))).padStart(4,"0")}-${s(r)}.${n}`,sheetName:(e,t,r,n)=>null===t||null===r?`${e}-sheet.${n}`:`${e}-sheet-${s(t)}-${s(r)}.${n}`,zipName:(e,t="zip")=>`${e}-frames.${t}`,savesAsSequence:(e,t,r)=>{let n=Math.max(1,Math.floor(t)),i=t=>`${e}-frame-${String(t).padStart(4,"0")}.${r}`;return 1===n?`${i(1)}, in ${y.zipName(e)}`:`${i(1)} to ${i(n)}, in ${y.zipName(e)}`},savesAsPicked:e=>0===e.length?"":e.length<=3?e.join(", "):`${e[0]} and ${e.length-1} more (one per pinned frame)`,gridHint:"Click one to jump to it.",gridMore:e=>`\u2026and ${e} more ${1===e?"frame":"frames"} in this job.`,sheetHint:"The grid you will get. Click a cell to go to that frame.",sheetLabelsDropped:"Time stamps and the title couldn’t be added this time — the frames are fine.",sheetLabelsNote:"Time stamps and the title are added when the sheet is made — they may sit a little differently.",sheetLabelsUnavailable:"Time stamps and titles aren’t available on this server yet.",sheetFrameSize:(e,t)=>`Each frame ${e} \u00d7 ${t} px`,sheetFrameWidth:e=>`Each frame ${e} px wide`,sheetFrameSizeNote:"Set by Columns and Sheet width.",sheetTooTall:(e,t,r,n)=>`A ${e} px tall ${t} is more than ${t} can hold (${r} px). ${n?`Use ${n} columns or more.`:"Use fewer frames or a narrower sheet."}`,sheetColumnsRange:(e,t,r)=>`Columns go from ${e} to ${t} \u2014 kept ${r}.`,sheetMoreCells:e=>`\u2026and ${Math.max(0,Math.floor(e))} more`,sheetBlankCell:"Empty cell",endNotAFrame:"The clip’s very end isn’t a frame, so it isn’t counted.",previewToggleLabel:"Preview",inputLabel:"Input",inputSub:"your video",outputLabel:"Output",outputSub:"what you’ll get",outputFrameCaption:(e,t,r)=>`${e.toUpperCase()} \xb7 ${t} \xd7 ${r}`,outputFrameCaptionNoSize:e=>e.toUpperCase(),pinFrame:"Pin this frame",convertFramesPending:"Convert frames",pinTitle:"Pin this frame — Convert exports pinned frames until you choose One frame again",inputNotExported:(e,t)=>1===t?`Showing ${e} \u00b7 Convert exports your pinned frame`:`Showing ${e} \u00b7 Convert exports your ${t} pinned frames`,notExportedShort:(e,t)=>1===t?`Showing ${e} \u00b7 pinned frame exports`:`Showing ${e} \u00b7 pinned frames export`,notExportedOneLine:e=>`Exports your pins \u00b7 ${e}`,useThisFrame:"Use this frame instead",pictureIsPlaceholder:"Placeholder picture \xb7 not this exact frame",pinNeedsPreview:"Pin works once the preview is ready — the picture is not this exact frame yet",onPinMarker:(e,t,r)=>`Pinned frame ${t} of ${r} \u00b7 ${e}`,onPinOneLine:(e,t,r)=>`Pin ${t} of ${r} \u00b7 ${e}`,unpinThis:"Unpin",pinnedAnnounce:"Pinned \xb7 Convert now exports your pinned frames",pinnedCount:e=>`Pinned \u00b7 ${e}`,pinLimit:e=>`Up to ${e} pinned frames`,pinLimitNote:e=>`That\u2019s the most \u2014 ${e} frames. Remove one to pin another.`,pickedFrames:e=>`Picked frames \u00b7 ${e}`,pickedHint:e=>1===e?"The frame you pinned, as one image. Pin more to get one image each.":`The ${e} frames you pinned, one image each, in one download (ZIP).`,pickedTitle:e=>`Picked frames (${e})`,pickedHintGrid:"Tap one to go to it; \xd7 removes it.",goToPinned:e=>`Go to ${e}`,removePin:e=>`Remove ${e}`,clearAll:"Clear all",convertPicked:e=>`Convert ${e} pinned ${u(e,"frame","frames")}`,resultPicked:(e,t,r,n)=>`${e} ${t.toUpperCase()}${1===e?"":"s"} \u00b7 ${r} \u00d7 ${n} \u00b7 one download each`,resultPickedNoSize:(e,t)=>`${e} ${t.toUpperCase()}${1===e?"":"s"} \u00b7 one download each`,pickedCaption:(e,t,r,n)=>`${e} \u00d7 ${t.toUpperCase()} \u00b7 ${r} \u00d7 ${n}`,pickedProgress:(e,t)=>`Frame ${e} of ${t}`,zoomLabel:e=>`Zoom ${e}\xd7`,zoomIn:"Zoom in to 2\xd7 (the middle of the picture)",zoomOut:"Show the whole picture (1\xd7)",shortcutsTitle:"Keyboard shortcuts",close:"Close",modeLabel:e=>g[e]?.label??null,modeHint:e=>g[e]?.hint??null,howManyFrames:"How many frames",framesUnit:"frames",derivedFrames:e=>`= ${e} ${u(e,"frame","frames")}`,derivedEvery:e=>`= one every ${e} s`,addVideoToConvert:"Add a video to convert.",useLongerGap:"Use a longer gap between frames, or a shorter range.",useFewerFrames:e=>`Ask for ${e} ${u(e,"frame","frames")} or fewer \u2014 that\u2019s every frame in this range.`,rangeTooShortForSheet:e=>`This range has only ${e} ${u(e,"frame","frames")} \u2014 a contact sheet needs at least 2.`,overClip:(e,t)=>`That\u2019s ${e} frames \u2014 more than this range has. Every frame in it would be ${t}.`,rangeNeedsTwo:"Pick a range that ends after it starts and asks for 2 frames or more.",frameCountPending:"The frame c
51ount appears once we know how long the video is.",overBound:(e,t,r)=>"grid"===t?`That\u2019s ${e} frames — more than one grid can hold (${r}).`:`That\u2019s ${e} frames — more than we can make at once (${r}).`,largeJobLine:(e,t)=>null===t||t<=e?`A lot of frames \xb7 ${e}`:`A lot of frames \xb7 ${e} (every frame in this range would be ${t})`,ragged:(e,t,r,n)=>`${e} in ${t} columns = ${r} ${u(r,"row","rows")} + ${n}`,more:"More",fitScreen:"Fit to screen",aboutTool:"About this tool ↓",phonePanesLabel:"Frame picker panes",fullscreenEnter:"Fullscreen",fullscreenExit:"Exit fullscreen",outputHeading:"Options",panelHide:e=>`Hide ${e}`,panelShow:e=>`Show ${e}`,headReset:"Reset",headResetTitle:"Reset every option to the page’s defaults",headShortcuts:"Shortcuts",shortcutFrame:"One frame back or forward",shortcutBigStep:e=>`A bigger step (${e})`,shortcutEnds:"First or last frame",shortcutPlay:"Play or pause",shortcutRange:"Start or end the range at this frame",shortcutConvert:"Convert",shortcutTimeField:"In the time box: jump to that time",shortcutHelp:"Show these shortcuts",nudgeLead:"Want a specific frame?",nudgeSub:"Quick convert takes the very first frame. Pick the exact moment on the video, or choose a sharper one there.",nudgeThumbs:"Moments in your video",nudgeThumbName:e=>`Pick the frame at ${e}`,nudgeDismiss:"Dismiss the frame picker offer",noThanks:"No thanks",adsKeepFree:"Ads keep XConvert free.",closeAd:"Close ad",goAdFree:"Go ad-free",sourceNounFor:e=>{let t=String(e??"").trim().toLowerCase().replace(/^\./,"");return"gif"===t?"GIF":"webp"===t||"apng"===t||"png"===t?"image":"video"},sourceNounOfSlug:e=>{let t=/(?:^|\/)convert-([a-z0-9]+)-to-/i.exec(String(e??""));return y.sourceNounFor(t?t[1]:null)},nounPlural:(e,t="video")=>u(e,t,`${t}s`),aNoun:(e="video")=>`${/^[aeiou]/i.test(e)?"an":"a"} ${e}`,yourNoun:(e="video")=>`your ${e}`,unreadableCount:e=>`${e} ${u(e,"file","files")} couldn’t be read`,filesCountLine:(e,t,r="video")=>t>0?`${y.filesCount(e,r)} \xb7 ${y.unreadableCount(t)}`:y.filesCount(e,r),addSource:(e="video")=>`Add ${y.aNoun(e)}`,emptyTitleFor:(e="video")=>`Pick the exact frame from your ${e}`,emptyBodyFor:(e="video")=>`Add ${y.aNoun(e)}, then step through it frame by frame or save many frames at once.`,dropOverlayFor:(e="video")=>`Drop your ${e} to open it in the Frame picker`,inputSubFor:(e="video")=>`your ${e}`,previewRegionFor:(e="video")=>`${"video"===e?"Video":"GIF"===e?"GIF":"Image"} preview`,noFileYetFor:(e="video")=>`Add ${y.aNoun(e)} first.`,addToConvertFor:(e="video")=>`Add ${y.aNoun(e)} to convert.`,restoringFor:(e="video")=>`Restoring your ${e}…`,filesButtonFor:e=>`Files (${e})`,pickItOnFor:(e="video")=>`Pick the frame on your ${e}`,stillImageRow:"Still image \xb7 1 frame",quickConvert:"Quick convert",outputNone:"Nothing to show for this file.",otherTab:"This frame picker is also open in another tab — what you change here won’t be saved.",doneOpenDownloads:"Done \xb7 open in Downloads",downloadsHref:"/downloads",jobPending:"Being sent to Downloads…",jobUnknown:"Sent to Downloads earlier \xb7 check there",alreadyConverted:e=>`You already converted the frame at ${e} a moment ago \u2014 it is on Downloads.`,alreadyConvertedMany:(e,t,r)=>`You already converted these ${e} frames (${t}\u2013${r}) a moment ago \u2014 they are on Downloads.`,alreadyConvertedSheet:(e,t)=>`You already converted this contact sheet (${e}\u2013${t}) a moment ago \u2014 it is on Downloads.`,alreadyConvertedParts:e=>{let t=e.lastIndexOf(y.downloadsWord);return t<0?[e,"",""]:[e.slice(0,t),y.downloadsWord,e.slice(t+y.downloadsWord.length)]},downloadsWord:"Downloads",downloadsLinkLabel:"Open Downloads",convertAgain:"Convert it again",pickedAgainAnnounce:e=>1===e?"Picked frames again \xb7 Convert exports your pinned frame":`Picked frames again \xb7 Convert exports your ${e} pinned frames`,alreadyPinned:"This frame is already pinned.",stagedExpired:e=>1===e.length?`${e[0]} isn’t on our servers any more — add it again to pick from it.`:`${f(e)} aren’t on our servers any more — add them again to pick from them.`,decodingFrame:"Decoding this frame…",vfrEchoNote:"In this browser the saved frame can be one later than shown for variable-rate clips."})},96703:(e,t,r)=>{e.exports=r(43622)(r(19031),"WeakMap")},97023:(e,t,r)=>{var n=r(64451),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),r=e[a];try{e[a]=void 0;var n=!0}catch(e){}var i=s.call(e);return n&&(t?e[a]=r:delete e[a]),i}},97131:(e,t,r)=>{"use strict";r.d(t,{CZ:()=>u,N1:()=>c,g9:()=>n,xT:()=>l});var n,i=r(68246),o=r(83831),s=r(18291);let a="cancelled";
51class l extends Error{constructor(e){super(`Upload cancelled ${e}`),this.uuid=e,this.reason=a,this.name="UploadCancelledError"}}function c(e){return!!e&&e.reason===a}!function(e){e.newUploadInProgressFile=async function(e,t,r){return new u(e,t,r,s.$.uuid())}}(n||(n={}));class u{get id(){return this.uuid}get state(){return this.cancelled?"cancelled":this.error?"failed":this.completed?"completed":"uploading"}constructor(e,t,r,n){this.cancelled=!1,this._cancelFn=null,this._retryFn=null,this.completePromiseResolver=null,this.completePromiseRejector=null,this.completePromise=new Promise((e,t)=>{this.completePromiseResolver=e,this.completePromiseRejector=t}),this.responseReadyPromiseResolver=null,this.responseReadyPromise=new Promise(e=>{this.responseReadyPromiseResolver=e}),this._changes=new i.m(1),this.changes=this._changes.asObservable(),this.file=e,this.metadata=t,this.uuid=n,this.progress=0,this.completed=!1,this.uniqueProcessType=r}getMetadata(){return this.metadata}setMetadata(e){this.metadata=e}getFile(){return this.file}getProgress(){return this.progress}setProgress(e){this.cancelled||(this.progress=e,this._changes.next(this))}getComplete(){return this.completed}setComplete(){this.cancelled||(this.completePromiseResolver(this),this.completed=!0)}whenComplete(){return this.completePromise}getError(){return this.error}setError(e){!this.cancelled&&(this.error=!0,this._retryFn=e||null,this._changes.next(this),this.completePromiseRejector&&(this.completePromiseRejector(Error("Upload failed")),this.completePromiseRejector=null))}get canRetry(){return this.error&&null!==this._retryFn}async retry(){this._retryFn&&(this.error=!1,this.progress=0,this._changes.next(this),await this._retryFn())}bindCancel(e){this._cancelFn=e}cancel(){if(this.cancelled||this.completed||this.originalInputFile)return!1;this.cancelled=!0,this._retryFn=null;let e=this._cancelFn;if(this._cancelFn=null,e)try{e()}catch{}return this._changes.next(this),this.completePromiseRejector&&(this.completePromiseRejector(new l(this.uuid)),this.completePromiseRejector=null),!0}getResponse(){return this.originalInputFile}setResponse(e){this.cancelled||(this.originalInputFile=e,this._changes.next(this),this.responseReadyPromiseResolver(this))}whenResponseReady(){return this.responseReadyPromise}setOrientation(e){this.orientation=e,this._changes.next(this)}getOrientation(){return this.orientation}getCommURL(){return this.whenComplete().then(()=>o.N.getUploadCommEndpoint(this.metadata.getProcessorMetadata(0)))}}},97315:(e,t,r)=>{"use strict";r.d(t,{FileUploadStatusTracker:()=>E});var n=r(9120),i=r(83594),o=r(990),s=r(45019),a=r(44555),l=r(44492),c=r(9968),u=r(64688),d=r(22902),h=r(3472),p=r(51947),f=r(6266),g=r(48393);let m=15e3,v=3,y=30,b=20,S=200;class E{get canTrack(){return this._canTrack}get isPollInFlight(){return this.pollInFlight}get isUsingEdgeFallback(){return this.useEdgeFallback}get pollEndpointKind(){return this.usePodEndpoint?this.useEdgeFallback&&this.getIncompleteEdgeGroups().length>0?"edge":"pod":"edge"}static getEdgeEndpoints(e){return{commHistoryEndpoint:c.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e)+"/workflows/replay-history",commInputExistEndpoint:c.ApiConfig.suffixDomainWithHttpsEdgeEndpoint(e)+"/files/input/exists"}}static getCommEndpoints(e){let t=(0,d.A)(e,"endpointData.processorMetadataList[0].processDomain",null);return((0,d.A)(e,"endpointData.processorMetadataList[0].commEndpoint",null),t)?E.getEdgeEndpoints(t):{commHistoryEndpoint:null,commInputExistEndpoint:null}}constructor(e){if(this._canTrack=!0,this.commHistoryEndpoint=null,this.commInputExistEndpoint=null,this.fileUploads=new Map,this.messageCache={},this.fileExistsResponses=new Map,this.usePodEndpoint=!1,this.pollInFlight=!1,this.probeInFlight=!1,this.consecutivePollFailures=0,this.pollsSinceProbe=0,this.successfulPollsSinceSample=0,this.useEdgeFallback=!1,e){const t=E.getCommEndpoints(e);this.commHistoryEndpoint=t.commHistoryEndpoint,this.commInputExistEndpoint=t.commInputExistEndpoint}else this._canTrack=!1,this.commHistoryEndpoint=null,this.commInputExistEndpoint=null}static createForPod(e){let t=new E(null);return t._canTrack=!0,t.commHistoryEndpoint=e+`${c.ApiConfig.edgePathPrefix}/workflows/replay-history`,t.commInputExistEndpoint=null,t.usePodEndpoint=!0,t}static createFromFileUpload(e){return new E((0,d.A)(e,"endpointData.processorMetadataList[0].processDomain",null)?e:null)}static canCreateTrackedFileUploadTracker(e){return!!(0,d.A)(e,"endpointData.processorMetadataList[0].processDomain",null)}sameAs(e){let t=E.getCommEndpoints(e);return this.commHistoryEndpoint===t.commHistoryEndpoint}
51hasFileUpload(e){return this.fileUploads.has(e)}addFileUpload(e){this.fileUploads.set(e.id,[e]),this.messageCache[e.id]||(this.messageCache[e.id]=new Set)}removeFileUpload(e){this.fileUploads.delete(e)}getFileUploads(){return(0,h.A)(Array.from(this.fileUploads.values()))}getFileUploadsUniqIds(){return(0,p.A)(this.getFileUploads().map(e=>e.id))}getIncompletedFileUploads(){return this.getFileUploads().filter(e=>!(e.isCompleted()||e.isFailed()))}getIncompletedFileUploadsUniqueIds(){return(0,p.A)(this.getIncompletedFileUploads().map(e=>e.id))}getIncompleteEdgeGroups(){let e=new Map;return this.getIncompletedFileUploads().forEach(t=>{let r=(0,d.A)(t,"endpointData.processorMetadataList[0].processDomain",null)||null;if(!r)return;let n=e.get(r)||[];-1===n.indexOf(t.id)&&n.push(t.id),e.set(r,n)}),Array.from(e.entries()).map(([e,t])=>({processDomain:e,fileIds:t}))}checkForExistence(e,t,r){let i=this.fileExistsResponses.get(t);return null!=i&&(0,f.A)((0,g.A)(i.existingFileIds),(0,g.A)(r))?(0,n.of)(i):r&&r.length>0?e.post(t,{fileIds:r},{timeout:m}).pipe((0,o.Z)(e=>((0,f.A)((0,g.A)(e.existingFileIds),(0,g.A)(r))&&this.fileExistsResponses.set(t,e),(0,n.of)(e)))):(0,n.of)({existingFileIds:[]})}pollEdge(e,t,r){let i=t?E.getEdgeEndpoints(t):{commHistoryEndpoint:this.commHistoryEndpoint,commInputExistEndpoint:this.commInputExistEndpoint};return this.checkForExistence(e,i.commInputExistEndpoint,r).pipe((0,o.Z)(t=>t.existingFileIds&&t.existingFileIds.length>0?e.post(i.commHistoryEndpoint,{fileIds:t.existingFileIds},{timeout:m}):(0,n.of)({})))}pollPod(e){let t=this.getIncompletedFileUploadsUniqueIds();return console.log("[PodTracker] polling",t),e.post(this.commHistoryEndpoint,{fileIds:t},{timeout:m})}buildPollRequest(e,t){if("pod"===t)return this.pollPod(e);if(this.usePodEndpoint){let t=this.getIncompleteEdgeGroups();return(0,i.p)(t.map(t=>this.pollEdge(e,t.processDomain,t.fileIds))).pipe((0,s.T)(e=>Object.assign({},...e)))}return this.pollEdge(e,null,this.getIncompletedFileUploadsUniqueIds())}hasWorkFor(e){return"edge"===e&&this.usePodEndpoint?this.getIncompleteEdgeGroups().length>0:this.getIncompletedFileUploadsUniqueIds().length>0}runPoll(e,t,r){let i=Date.now();return new Promise(o=>{let s=null,c=!1,u=e=>{c||(c=!0,this.recordPollMetric(r,t,Date.now()-i,e.ok,s),o(e))};this.buildPollRequest(e,t).pipe((0,a.L)(1),(0,l.W)(e=>(s=e||Error("poll failed"),(0,n.of)({})))).subscribe({next:e=>u({ok:null==s,response:e||{}}),error:e=>{s=e,u({ok:!1,response:{}})},complete:()=>u({ok:null==s,response:{}})})})}recordPollMetric(e,t,r,n,i){if(e)try{if(!n)return void e(u.O.POD_POLL_RTT,{ms:r,ok:!1,status:(0,d.A)(i,"status",0)||0,endpoint:t});if(this.successfulPollsSinceSample++,this.successfulPollsSinceSample<b)return;this.successfulPollsSinceSample=0,e(u.O.POD_POLL_RTT,{ms:r,ok:!0,status:S,endpoint:t})}catch{}}registerPollFailure(e){this.consecutivePollFailures++,!this.usePodEndpoint||this.useEdgeFallback||this.consecutivePollFailures<v||0!==this.getIncompleteEdgeGroups().length&&(this.useEdgeFallback=!0,this.pollsSinceProbe=0,e&&e(u.O.POD_POLL_FALLBACK,{consecutiveFailures:this.consecutivePollFailures,endpoint:"pod->edge"}),this.consecutivePollFailures=0)}clearEdgeFallback(e){if(!this.useEdgeFallback)return;let t=this.consecutivePollFailures;this.useEdgeFallback=!1,this.consecutivePollFailures=0,e&&e(u.O.POD_POLL_FALLBACK,{consecutiveFailures:t,endpoint:"edge->pod"})}maybeProbePod(e,t,r){!this.useEdgeFallback||this.probeInFlight||"pod"===this.pollEndpointKind||(this.pollsSinceProbe++,this.pollsSinceProbe<y||(this.pollsSinceProbe=0,0!==this.getIncompletedFileUploadsUniqueIds().length&&(this.probeInFlight=!0,this.runPoll(e,"pod",r).then(e=>{e.ok&&(this.clearEdgeFallback(r),this.applyResponse(e.response,t))}).catch(()=>{}).then(()=>{this.probeInFlight=!1}))))}applyResponse(e,t){Object.keys(e||{}).forEach(r=>{let n=e[r],i=this.fileUploads.get(r);n&&(n.processCompleteData?i&&i.forEach(e=>{t(e,n.processCompleteData)}):(n.history||[]).forEach(e=>{e.uuid&&this.messageCache[e.uuid]&&!this.messageCache[e.uuid].has(e.eventId)&&(this.messageCache[e.uuid].add(e.eventId),i&&i.forEac
51h(r=>{t(r,e)}))}))})}replayHistory(e,t,r){if(!this.canTrack||this.pollInFlight)return Promise.resolve();let n=this.pollEndpointKind;return this.hasWorkFor(n)?(this.pollInFlight=!0,this.maybeProbePod(e,t,r),this.runPoll(e,n,r).then(e=>{if(e.ok){this.consecutivePollFailures=0,"pod"===n&&this.clearEdgeFallback(r);try{this.applyResponse(e.response,t)}catch(e){console.error("[FileUploadStatusTracker] failed to apply history",e)}}else this.registerPollFailure(r)}).catch(()=>{}).then(()=>{this.pollInFlight=!1})):Promise.resolve()}}},97460:(e,t,r)=>{"use strict";function n(e){return e}r.d(t,{D:()=>n})},97591:(e,t,r)=>{"use strict";r.d(t,{A:()=>h});let n=function(){this.__data__=[],this.size=0};var i=r(11396);let o=function(e,t){for(var r=e.length;r--;)if((0,i.A)(e[r][0],t))return r;return -1};var s=Array.prototype.splice;let a=function(e){var t=this.__data__,r=o(t,e);return!(r<0)&&(r==t.length-1?t.pop():s.call(t,r,1),--this.size,!0)},l=function(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]},c=function(e){return o(this.__data__,e)>-1},u=function(e,t){var r=this.__data__,n=o(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function d(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}d.prototype.clear=n,d.prototype.delete=a,d.prototype.get=l,d.prototype.has=c,d.prototype.set=u;let h=d},97725:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(97591);let i=function(){this.__data__=new n.A,this.size=0},o=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},s=function(e){return this.__data__.get(e)},a=function(e){return this.__data__.has(e)};var l=r(5915),c=r(35072),u=200;let d=function(e,t){var r=this.__data__;if(r instanceof n.A){var i=r.__data__;if(!l.A||i.length<u-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new c.A(i)}return r.set(e,t),this.size=r.size,this};function h(e){var t=this.__data__=new n.A(e);this.size=t.size}h.prototype.clear=i,h.prototype.delete=o,h.prototype.get=s,h.prototype.has=a,h.prototype.set=d;let p=h},97791:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},98158:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(4527),i=r(86702),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;let a=function(e,t){if((0,n.A)(e))return!1;var r=typeof e;return!!("number"==r||"symbol"==r||"boolean"==r||null==e||(0,i.A)(e))||s.test(e)||!o.test(e)||null!=t&&e in Object(t)}},98173:(e,t,r)=>{"use strict";var n=r(93570),i=r(82007).b,o=r(9282),s=r(30839);function a(e){var t=this;i.call(this),this.ir=new s(e,o),this.ir.once("finish",function(e,r){t.ir=null,t.emit("message",JSON.stringify([e,r]))})}n(a,i),a.transportName="iframe-info-receiver",a.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},e.exports=a},98376:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(82993),i=r(78710),o=r(69014);let s=function(e){return(0,n.A)(e,o.A,i.A)}},98479:(e,t,r)=>{"use strict";r.d(t,{C:()=>f});var n=r(4902),i=r(43604),o=r(9120),s=r(16579),a=r(44492),l=r(45019),c=r(47785),u=r(9968),d=r(9324),h=r(79347),p=r(29238);class f{constructor(e,t,r,n){this.http=e,this.apiConfig=t,this.loginService=r,this.fileManagerService=n}get isAdmin(){return this.loginService.userDetails?.admin===!0}searchWorkflows(e){if(!this.isAdmin)return(0,o.of)([]);let t=this.apiConfig.getAdminWorkflowSearchEndpoint();return this.http.get(t,{params:{q:e}}).pipe((0,a.W)(()=>(0,o.of)([])))}recreateWorkflow(e){if(!this.isAdmin)return(0,s.$)(()=>Error("Admin access required"));let t=this.apiConfig.getAdminWorkflowRecreateEndpoint(e);return this.http.get(t).pipe((0,l.T)(e=>this.buildFileUpload(e)))}buildFileUpload(e){let t=this.safeParse(e.options,{}),r=this.safeParse(e.optionsSnapshot,{}),n=this.safeParse(e.originalInputFiles,[]),i=this.safeParse(e.metadataList,[]),o=new c.e;return o.id=e.uuid,o.fromType=[e.fromType],o.toType=e.toType,o.processType=e.processType,o.options=t,o.optionsSnapshot=r,o.originalInputFiles=n,o.metadataList=i,o.endpointData=i[0]||null,o.name=e.uploadedFiles[0]?.readableFilename||"file",o.size=e.uploadedFiles[0]?.size||0,o.status="uploaded",o.pageData={path:e.featurePage},o.orientation=t?.orientationAngleList,o.file=[new File([],e.uploadedFiles[0]?.readableFilename||"file")],o}safeParse(e,t){if(!e)return t;try{return JSON.parse(e)}catch{return t}}}f=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(h.jo)),(0,n.Qj)(1,(0,i.WQ)(u.ApiConfig)),(0,n.Qj)(2,(0,i.WQ)(p.H)),(0,n.Qj)(3,(0,i.WQ)(d.D)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===h.jo?Object:h.jo,void 0===u.ApiConfig?Object:u.ApiConfig,void 0===p.H?Object:p.H,void 0===d.D?Object:d.D])],f)},98506:(e,t,r)=>{var n=r(40087),i=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");
51return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!i&&i in e}},98683:(e,t,r)=>{"use strict";r.d(t,{FO:()=>d,K1:()=>c,uM:()=>l,uu:()=>u});var n=r(2807),i=r(9968),o=r(4515),s=r(89853);class a{static{this.LOCAL_RELATIVE="local-relative"}static{this.LOCAL_ABSOLUTE="local-absolute"}static{this.REMOTE="remote"}}class l{static{this.PACKAGE_TYPE_BASIC="PACKAGE_TYPE_BASIC"}static{this.PACKAGE_TYPE_PRO="PACKAGE_TYPE_PRO"}}class c{static{this.AUTH_BEARER_STORAGE_KEY=s.XU}}class u{static{this.MOTIVE_STORAGE_KEY="MOTIVE"}}class d{static{this.DEBUG=n.v.getBoolEnv("NEXT_PUBLIC_DEBUG")}static get IS_PROD(){return"prod"==n.v.env.NEXT_PUBLIC_ENVIRONMENT}static get DEBUG_LEVEL(){return d.IS_PROD?o.C.INFO:o.C.TRACE_7}static get PAYMENT_GATEWAY_TEST_MODE(){return i.ApiConfig.isLocalhost()||i.ApiConfig.isQA()}static get PAYPAL_TEST_MODE(){return d.PAYMENT_GATEWAY_TEST_MODE}static get PAYPAL_CLIENT_ID(){return d.PAYPAL_TEST_MODE?"AdZHSnXdmvLFV3rl5BlvsV-C69wKsI2tKFymJUy8FElT7nwhB86mN9fWfW3BuKtlyQIkcNEnTG1uxMO6":"AXxQSmbb22oe4ZjbHHGlTGZPP1iTePApytBxhHBeooClTimic2uX8gQwkWnVJRjKcoQ5Wyksk9Nz2pkl"}static get PAYPAL_PLAN_BACKER_MONTHLY(){return d.PAYPAL_TEST_MODE?"P-2LS877027G7055319L3OWXGI":"P-8W460836KX511983SL3SFLRY"}static get PAYPAL_PLAN_BACKER_YEARLY(){return d.PAYPAL_TEST_MODE?"P-0C150984PD4532505L3OWWVQ":"P-4BE32205WC8099423L3SFM5Y"}static get PAYPAL_PLAN_PATRON_MONTHLY(){return d.PAYPAL_TEST_MODE?"P-21K9973416833342TL3OWXOA":"P-7R9961430T230120CL3SFMDA"}static get PAYPAL_PLAN_PATRON_YEARLY(){return d.PAYPAL_TEST_MODE?"P-4SW19357A6322715YL3OWXVA":"P-1H169679XR034493GL3SFMMI"}static{this.STRIPE_LIVE_PUBLIC_KEY="pk_live_CK9WSyLfkPFmZehZljDUlyUh"}static{this.STRIPE_TEST_PUBLIC_KEY="pk_test_JX5QjY8Dpl8OhznCmkro01S8"}static get STRIPE_PUBLIC_KEY(){return d.PAYMENT_GATEWAY_TEST_MODE?d.STRIPE_TEST_PUBLIC_KEY:d.STRIPE_LIVE_PUBLIC_KEY}static{this.REMOVE_STORED_FILE_AFTER_HOURS=6}static{this.DOMAINS={COMPRESSPDF_DEV:{key:"COMPRESSPDF_DEV",url:"https://www.compresspdf.dev",title:"PDF Compressor",description:"Compress PDF document files online for free",type:a.REMOTE},JPGTOPDF_DEV:{key:"JPGTOPDF_DEV",url:"https://www.jpgtopdf.dev",title:"JPG To PDF",description:"Convert JPG to PDF online for free",type:a.REMOTE},MERGEPDF_DEV:{key:"MERGEPDF_DEV",url:"https://www.mergepdf.dev",title:"Merge PDF",description:"Online Merge PDF document for free",type:a.REMOTE},PDFTOJPG_DEV:{key:"PDFTOJPG_DEV",url:"https://www.pdftojpg.dev",title:"PDF To JPG",description:"Free convert PDF to JPEG/JPG online",type:a.REMOTE},PDFTOWORD_DEV:{key:"PDFTOWORD_DEV",url:"https://www.pdftoword.dev",title:"PDF To Word",description:"Free online PDF to Word (DOCX/DOC) converter",type:a.REMOTE},VIDEOCOMPRESSOR_DEV:{key:"VIDEOCOMPRESSOR_DEV",url:"https://www.videocompressor.dev",title:"Compress Video",description:"Free online WEBM and MP4 video compressor",type:a.REMOTE},WORDTOPDF_DEV:{key:"WORDTOPDF_DEV",url:"https://www.wordtopdf.dev",title:"Word To PDF",description:"Convert Word/DOCX/DOC files to PDF documents for free",type:a.REMOTE},XCONVERT_COM:{key:"XCONVERT_COM",url:"https://www.xconvert.com",title:"File Tools",description:"Online File Convert/Merge/Split and Compress Tool",type:a.REMOTE}}}}},98720:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(92430),i=r(83497),o=r(84147);let s=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t};var a=Object.prototype.hasOwnProperty;let l=function(e){if(!(0,i.A)(e))return s(e);var t=(0,o.A)(e),r=[];for(var n in e)"constructor"==n&&(t||!a.call(e,n))||r.push(n);return r};var c=r(78304);let u=function(e){return(0,c.A)(e)?(0,n.A)(e,!0):l(e)}},98825:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},98853:(e,t,r)=>{"use strict";r.d(t,{_:()=>c});var n=r(4902),i=r(43604),o=r(51352),s=r(9968),a=r(79347),l=r(29238);class c{constructor(e,t,r){this.apiConfig=e,this.http=t,this.loginService=r}list(e,t=50,r,n){this.requireLogin();let i=this.apiConfig.getConversionHistoryEndpoint(e,t,r,n);return this.http.get(i).pipe(o.UW)}requireLogin(){if(!this.loginService.isUserLoggedIn)throw Error("Please sign in to view your conversion history.")}}c=(0,n.Cg)([(0,i._G)(),(0,n.Qj)(0,(0,i.WQ)(s.ApiConfig)),(0,n.Qj)(1,(0,i.WQ)(a.jo)),(0,n.Qj)(2,(0,i.WQ)(l.H)),(0,n.Sn)("design:type",Function),(0,n.Sn)("design:paramtypes",[void 0===s.ApiConfig?Object:s.ApiConfig,void 0===a.jo?Object:a.jo,void 0===l.H?Object:l.H])],c
51)},99270:(e,t,r)=>{"use strict";function n(e){return e instanceof Date&&!isNaN(e)}r.d(t,{v:()=>n})},99809:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});let n=function(e){return function(t){return e(t)}}},99828:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},99964:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{C:()=>PageDataProviderService});var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(4902),inversify__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(43604),_barrel_optimize_names_ReplaySubject_rxjs__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(68246),rxjs_operators__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(45019),rxjs_operators__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(44555),_models_logger__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9711),_utils_json_utils__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(17671),_utils_lodash_min__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(70907),_utils_route_utils__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(61028),_environment_service__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(2807),_light_http_service__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(79347),_ui_context__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(33353);class PageDataProviderService{constructor(e,t,r){this.http=e,this.env=t,this.uiContext=r,this.logger=_models_logger__WEBPACK_IMPORTED_MODULE_1__.V.getLogger("PageDataProviderService"),this.cache={}}loadConvertOptions(e){let t=(0,_utils_lodash_min__WEBPACK_IMPORTED_MODULE_6__.A)(e)?_utils_route_utils__WEBPACK_IMPORTED_MODULE_7__.R.pathTextOnly(e):_utils_route_utils__WEBPACK_IMPORTED_MODULE_7__.R.getPathFromProps(e);return this.http.get(`/convert-options-v2/${t}.json`).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_8__.T)(e=>_utils_json_utils__WEBPACK_IMPORTED_MODULE_2__.e.parse(e)))}loadFeaturePageDataForProps(e){let t=_utils_route_utils__WEBPACK_IMPORTED_MODULE_7__.R.getPathFromProps(e);return this.loadFeaturePageDataOrDefaults(t)}loadFeaturePageDataOrDefaults(featurePagePath,isRequried=!0){if(!this.cache[featurePagePath]){let subject=new _barrel_optimize_names_ReplaySubject_rxjs__WEBPACK_IMPORTED_MODULE_9__.m(1);this.cache[featurePagePath]=subject.asObservable();let url=`https://www.${this.env.domainname}/data/${this.env.sitename}/routes/${featurePagePath}.txt`;this.http.get(url,{responseType:"text"}).pipe((0,rxjs_operators__WEBPACK_IMPORTED_MODULE_10__.L)(5)).subscribe({next:pageDataString=>{try{let pageData=eval(pageDataString);if(Object.keys(pageData).length>0){subject.next(pageData),subject.complete();return}}catch(e){}isRequried&&(this.uiContext.showErrorDialog({title:"Error",text:"Something went wrong. Product may not work as intended."}),this.logger.error({message:`Failed to decode loaded page data for ${featurePagePath}.`})),subject.error(Error(`Failed to decoded loaded page data for ${featurePagePath}.`))},error:e=>{isRequried&&(this.uiContext.showErrorDialog({title:"Error",text:"Something went wrong. Product may not work as intended."}),this.logger.error({message:`Failed to load page data for ${featurePagePath} ${url}.`})),subject.error(Error(`Failed to load page data for ${featurePagePath} ${url}.`))}})}return this.cache[featurePagePath]}async resolveRouteDataRecursively(e,t){let r=[];try{let n=[];if("/"===t)n.push("/");else{let e=t.indexOf("?");e>
51-1&&(t=t.substring(0,e)),n=t.split("/"),""===n[0]&&(n[0]="/")}let i="/";for(let i of n){let n=null;for(let t of e)if(t.data&&t.data.path&&t.data.path===i){n=t.data;break}if(!n){let e=await this.loadFeaturePageDataOrDefaults(i).toPromise();e&&(n=e)}n?r.push(n):console.warn(`Found a URL part without pageData for path ${t}`)}r.forEach(e=>i+=e&&e.path||"")}catch(e){console.error(e)}return r}}PageDataProviderService=(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__.Cg)([(0,inversify__WEBPACK_IMPORTED_MODULE_0__._G)(),(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__.Qj)(0,(0,inversify__WEBPACK_IMPORTED_MODULE_0__.WQ)(_light_http_service__WEBPACK_IMPORTED_MODULE_4__.jo)),(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__.Qj)(1,(0,inversify__WEBPACK_IMPORTED_MODULE_0__.WQ)(_environment_service__WEBPACK_IMPORTED_MODULE_3__.v)),(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__.Qj)(2,(0,inversify__WEBPACK_IMPORTED_MODULE_0__.WQ)(_ui_context__WEBPACK_IMPORTED_MODULE_5__._)),(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__.Sn)("design:type",Function),(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_11__.Sn)("design:paramtypes",[void 0===_light_http_service__WEBPACK_IMPORTED_MODULE_4__.jo?Object:_light_http_service__WEBPACK_IMPORTED_MODULE_4__.jo,void 0===_environment_service__WEBPACK_IMPORTED_MODULE_3__.v?Object:_environment_service__WEBPACK_IMPORTED_MODULE_3__.v,void 0===_ui_context__WEBPACK_IMPORTED_MODULE_5__._?Object:_ui_context__WEBPACK_IMPORTED_MODULE_5__._])],PageDataProviderService)},99969:e=>{e.exports=function(e){return function(t){return e(t)}}},99991:(e,t,r)=>{"use strict";r.d(t,{N:()=>o});var n=r(77698);function i(e){return(0,n.T)(null==e?void 0:e.lift)}function o(e){return function(t){if(i(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}}},e=>{var t=t=>e(e.s=t);e.O(0,[6593,8792],()=>(t(92),t(59603))),_N_E=e.O()}]);
52//# sourceMappingURL=_app-5d9d7bf0a6287da7.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.