gearboxdownloadmodal 5.0.79 → 5.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +5 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -47,7 +47,7 @@ Valid keys: `+JSON.stringify(Object.keys(v),null," "));var O=ue(E,B,j,P,N+"."+B
|
|
|
47
47
|
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&ja[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ur=Symbol("internals");function vt(e){return e&&String(e).trim().toLowerCase()}function Rt(e){return e===!1||e==null?e:b.isArray(e)?e.map(Rt):String(e)}function Na(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Da=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function In(e,t,n,r,o){if(b.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!b.isString(t)){if(b.isString(r))return t.indexOf(r)!==-1;if(b.isRegExp(r))return r.test(t)}}function Ra(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ga(e,t){const n=b.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class Gt{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(A,c,d){const s=vt(c);if(!s)throw new Error("header name must be a non-empty string");const m=b.findKey(o,s);(!m||o[m]===void 0||d===!0||d===void 0&&o[m]!==!1)&&(o[m||c]=Rt(A))}const a=(A,c)=>b.forEach(A,(d,s)=>i(d,s,c));return b.isPlainObject(t)||t instanceof this.constructor?a(t,n):b.isString(t)&&(t=t.trim())&&!Da(t)?a(Ja(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=vt(t),t){const r=b.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Na(o);if(b.isFunction(n))return n.call(this,o,r);if(b.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=vt(t),t){const r=b.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||In(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=vt(a),a){const A=b.findKey(r,a);A&&(!n||In(r,r[A],A,n))&&(delete r[A],o=!0)}}return b.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||In(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return b.forEach(this,(o,i)=>{const a=b.findKey(r,i);if(a){n[a]=Rt(o),delete n[i];return}const A=t?Ra(i):String(i).trim();A!==i&&delete n[i],n[A]=Rt(o),r[A]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return b.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&b.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
48
48
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ur]=this[Ur]={accessors:{}}).accessors,o=this.prototype;function i(a){const A=vt(a);r[A]||(Ga(o,a),r[A]=!0)}return b.isArray(t)?t.forEach(i):i(t),this}}Gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),b.reduceDescriptors(Gt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),b.freezeMethods(Gt);const Ne=Gt;function wn(e,t){const n=this||Zn,r=t||n,o=Ne.from(r.headers);let i=r.data;return b.forEach(e,function(A){i=A.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Fr(e){return!!(e&&e.__CANCEL__)}function bt(e,t,n){_.call(this,e??"canceled",_.ERR_CANCELED,t,n),this.name="CanceledError"}b.inherits(bt,_,{__CANCEL__:!0});function Ta(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new _("Request failed with status code "+n.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Ha=je.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,a,A){const c=[];c.push(n+"="+encodeURIComponent(r)),b.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),b.isString(i)&&c.push("path="+i),b.isString(a)&&c.push("domain="+a),A===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Xa(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qa(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function _r(e,t){return e&&!Xa(t)?Qa(e,t):t}const Va=je.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const A=b.isString(a)?o(a):a;return A.protocol===r.protocol&&A.host===r.host}}():function(){return function(){return!0}}();function Pa(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ba(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),s=r[i];a||(a=d),n[o]=c,r[o]=d;let m=i,q=0;for(;m!==o;)q+=n[m++],m=m%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),d-a<t)return;const g=s&&d-s;return g?Math.round(q*1e3/g):void 0}}function $r(e,t){let n=0;const r=Ba(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,A=i-n,c=r(A),d=i<=a;n=i;const s={loaded:i,total:a,progress:a?i/a:void 0,bytes:A,rate:c||void 0,estimated:c&&a&&d?(a-i)/c:void 0,event:o};s[t?"download":"upload"]=!0,e(s)}}const xn={http:Za,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let o=e.data;const i=Ne.from(e.headers).normalize(),a=e.responseType;let A;function c(){e.cancelToken&&e.cancelToken.unsubscribe(A),e.signal&&e.signal.removeEventListener("abort",A)}let d;b.isFormData(o)&&(je.isStandardBrowserEnv||je.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.getContentType(/^\s*multipart\/form-data/)?b.isString(d=i.getContentType())&&i.setContentType(d.replace(/^\s*(multipart\/form-data);+/,"$1")):i.setContentType("multipart/form-data"));let s=new XMLHttpRequest;if(e.auth){const f=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(f+":"+y))}const m=_r(e.baseURL,e.url);s.open(e.method.toUpperCase(),Qr(m,e.params,e.paramsSerializer),!0),s.timeout=e.timeout;function q(){if(!s)return;const f=Ne.from("getAllResponseHeaders"in s&&s.getAllResponseHeaders()),I={data:!a||a==="text"||a==="json"?s.responseText:s.response,status:s.status,statusText:s.statusText,headers:f,config:e,request:s};Ta(function(k){n(k),c()},function(k){r(k),c()},I),s=null}if("onloadend"in s?s.onloadend=q:s.onreadystatechange=function(){!s||s.readyState!==4||s.status===0&&!(s.responseURL&&s.responseURL.indexOf("file:")===0)||setTimeout(q)},s.onabort=function(){s&&(r(new _("Request aborted",_.ECONNABORTED,e,s)),s=null)},s.onerror=function(){r(new _("Network Error",_.ERR_NETWORK,e,s)),s=null},s.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const I=e.transitional||Pr;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),r(new _(y,I.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,e,s)),s=null},je.isStandardBrowserEnv){const f=(e.withCredentials||Va(m))&&e.xsrfCookieName&&Ha.read(e.xsrfCookieName);f&&i.set(e.xsrfHeaderName,f)}o===void 0&&i.setContentType(null),"setRequestHeader"in s&&b.forEach(i.toJSON(),function(y,I){s.setRequestHeader(I,y)}),b.isUndefined(e.withCredentials)||(s.withCredentials=!!e.withCredentials),a&&a!=="json"&&(s.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&s.addEventListener("progress",$r(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&s.upload&&s.upload.addEventListener("progress",$r(e.onUploadProgress)),(e.cancelToken||e.signal)&&(A=f=>{s&&(r(!f||f.type?new bt(null,e,s):f),s.abort(),s=null)},e.cancelToken&&e.cancelToken.subscribe(A),e.signal&&(e.signal.aborted?A():e.signal.addEventListener("abort",A)));const g=Pa(m);if(g&&je.protocols.indexOf(g)===-1){r(new _("Unsupported protocol "+g+":",_.ERR_BAD_REQUEST,e));return}s.send(o||null)})}};b.forEach(xn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const eo=e=>`- ${e}`,Ua=e=>b.isFunction(e)||e===null||e===!1,to={getAdapter:e=>{e=b.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){n=e[i];let a;if(r=n,!Ua(n)&&(r=xn[(a=String(n)).toLowerCase()],r===void 0))throw new _(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([A,c])=>`adapter ${A} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
|
|
49
49
|
`+i.map(eo).join(`
|
|
50
|
-
`):" "+eo(i[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:xn};function Kn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bt(null,e)}function no(e){return Kn(e),e.headers=Ne.from(e.headers),e.data=wn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),to.getAdapter(e.adapter||Zn.adapter)(e).then(function(r){return Kn(e),r.data=wn.call(e,e.transformResponse,r),r.headers=Ne.from(r.headers),r},function(r){return Fr(r)||(Kn(e),r&&r.response&&(r.response.data=wn.call(e,e.transformResponse,r.response),r.response.headers=Ne.from(r.response.headers))),Promise.reject(r)})}const ro=e=>e instanceof Ne?e.toJSON():e;function it(e,t){t=t||{};const n={};function r(d,s,m){return b.isPlainObject(d)&&b.isPlainObject(s)?b.merge.call({caseless:m},d,s):b.isPlainObject(s)?b.merge({},s):b.isArray(s)?s.slice():s}function o(d,s,m){if(b.isUndefined(s)){if(!b.isUndefined(d))return r(void 0,d,m)}else return r(d,s,m)}function i(d,s){if(!b.isUndefined(s))return r(void 0,s)}function a(d,s){if(b.isUndefined(s)){if(!b.isUndefined(d))return r(void 0,d)}else return r(void 0,s)}function A(d,s,m){if(m in t)return r(d,s);if(m in e)return r(void 0,d)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:A,headers:(d,s)=>o(ro(d),ro(s),!0)};return b.forEach(Object.keys(Object.assign({},e,t)),function(s){const m=c[s]||o,q=m(e[s],t[s],s);b.isUndefined(q)&&m!==A||(n[s]=q)}),n}const oo="1.5.1",Wn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Wn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const io={};Wn.transitional=function(t,n,r){function o(i,a){return"[Axios v"+oo+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,A)=>{if(t===!1)throw new _(o(a," has been removed"+(n?" in "+n:"")),_.ERR_DEPRECATED);return n&&!io[a]&&(io[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,A):!0}};function Fa(e,t,n){if(typeof e!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const A=e[i],c=A===void 0||a(A,i,e);if(c!==!0)throw new _("option "+i+" must be "+c,_.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _("Unknown option "+i,_.ERR_BAD_OPTION)}}const Mn={assertOptions:Fa,validators:Wn},He=Mn.validators;class Tt{constructor(t){this.defaults=t,this.interceptors={request:new Vr,response:new Vr}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=it(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Mn.assertOptions(r,{silentJSONParsing:He.transitional(He.boolean),forcedJSONParsing:He.transitional(He.boolean),clarifyTimeoutError:He.transitional(He.boolean)},!1),o!=null&&(b.isFunction(o)?n.paramsSerializer={serialize:o}:Mn.assertOptions(o,{encode:He.function,serialize:He.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&b.merge(i.common,i[n.method]);i&&b.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f]}),n.headers=Ne.concat(a,i);const A=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(c=c&&y.synchronous,A.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let s,m=0,q;if(!c){const f=[no.bind(this),void 0];for(f.unshift.apply(f,A),f.push.apply(f,d),q=f.length,s=Promise.resolve(n);m<q;)s=s.then(f[m++],f[m++]);return s}q=A.length;let g=n;for(m=0;m<q;){const f=A[m++],y=A[m++];try{g=f(g)}catch(I){y.call(this,I);break}}try{s=no.call(this,g)}catch(f){return Promise.reject(f)}for(m=0,q=d.length;m<q;)s=s.then(d[m++],d[m++]);return s}getUri(t){t=it(this.defaults,t);const n=_r(t.baseURL,t.url);return Qr(n,t.params,t.paramsSerializer)}}b.forEach(["delete","get","head","options"],function(t){Tt.prototype[t]=function(n,r){return this.request(it(r||{},{method:t,url:n,data:(r||{}).data}))}}),b.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,A){return this.request(it(A||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Tt.prototype[t]=n(),Tt.prototype[t+"Form"]=n(!0)});const Ht=Tt;class Sn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(A=>{r.subscribe(A),i=A}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,A){r.reason||(r.reason=new bt(i,a,A),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Sn(function(o){t=o}),cancel:t}}}const _a=Sn;function $a(e){return function(n){return e.apply(null,n)}}function eA(e){return b.isObject(e)&&e.isAxiosError===!0}const Ln={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent: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};Object.entries(Ln).forEach(([e,t])=>{Ln[t]=e});const tA=Ln;function ao(e){const t=new Ht(e),n=Sr(Ht.prototype.request,t);return b.extend(n,Ht.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return ao(it(e,o))},n}const de=ao(Zn);de.Axios=Ht,de.CanceledError=bt,de.CancelToken=_a,de.isCancel=Fr,de.VERSION=oo,de.toFormData=Dt,de.AxiosError=_,de.Cancel=de.CanceledError,de.all=function(t){return Promise.all(t)},de.spread=$a,de.isAxiosError=eA,de.mergeConfig=it,de.AxiosHeaders=Ne,de.formToJSON=e=>Br(b.isHTMLForm(e)?new FormData(e):e),de.getAdapter=to.getAdapter,de.HttpStatusCode=tA,de.default=de;const nA=de;/*! typescript-cookie v1.0.6 | MIT */const Ao=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),so=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),On=decodeURIComponent,En=e=>(e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function rA(e){return e=Object.assign({},e),typeof e.expires=="number"&&(e.expires=new Date(Date.now()+e.expires*864e5)),e.expires!=null&&(e.expires=e.expires.toUTCString()),Object.entries(e).filter(([t,n])=>n!=null&&n!==!1).map(([t,n])=>n===!0?`; ${t}`:`; ${t}=${n.split(";")[0]}`).join("")}function lo(e,t,n){const r=/(?:^|; )([^=]*)=([^;]*)/g,o={};let i;for(;(i=r.exec(document.cookie))!=null;)try{const a=n(i[1]);if(o[a]=t(i[2],a),e===a)break}catch{}return e!=null?o[e]:o}const uo=Object.freeze({decodeName:On,decodeValue:En,encodeName:Ao,encodeValue:so}),kn=Object.freeze({path:"/"});function co(e,t,n=kn,{encodeValue:r=so,encodeName:o=Ao}={}){return document.cookie=`${o(e)}=${r(t,e)}${rA(n)}`}function mo(e,{decodeValue:t=En,decodeName:n=On}={}){return lo(e,t,n)}function oA({decodeValue:e=En,decodeName:t=On}={}){return lo(void 0,e,t)}function iA(e,t=kn){co(e,"",Object.assign({},t,{expires:-1}))}function zn(e,t){const n={set:function(o,i,a){return co(o,i,Object.assign({},this.attributes,a),{encodeValue:this.converter.write})},get:function(o){if(arguments.length===0)return oA(this.converter.read);if(o!=null)return mo(o,this.converter.read)},remove:function(o,i){iA(o,Object.assign({},this.attributes,i))},withAttributes:function(o){return zn(this.converter,Object.assign({},this.attributes,o))},withConverter:function(o){return zn(Object.assign({},this.converter,o),this.attributes)}},r={attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}};return Object.create(n,r)}zn({read:uo.decodeValue,write:uo.encodeValue},kn);let po;typeof window<"u"&&(po=mo("token"));const fe=nA.create({headers:{Authorization:po}});async function aA(e,t){return e.network=="fb"&&(e.zip=1),(await fe.post(t+"/createFlexVersionLink",e||{})).data}async function AA(e,t,n){return(await fe.post(e+"/createImportedVersionLink",{_id:t,network:n})).data}async function sA(e,t,n,r){return console.log(r),(await fe.post(e+"/createPlayableVersionLink",{_id:t,network:n,isPfTest:r})).data}async function lA(e,t,n){return(await fe.post(e+"/createReadyVersionLink",{_id:t,network:n})).data}async function fo(e,t){return(await fe.post(t+"/updateFlexUrl",e||{})).data}async function ho(e,t,n){return(await fe.post(n+"/updatePlayableVersion",{...t,_id:e})).data}function Xt(e){const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select();try{return document.execCommand("copy")?(document.body.removeChild(t),!0):(document.body.removeChild(t),!1)}catch{return document.body.removeChild(t),!1}}function qo(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=qo(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Xe(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=qo(e))&&(r&&(r+=" "),r+=t);return r}const Ct=e=>typeof e=="number"&&!isNaN(e),Pe=e=>typeof e=="string",ve=e=>typeof e=="function",Qt=e=>Pe(e)||ve(e)?e:null,Yn=e=>Z.isValidElement(e)||Pe(e)||ve(e)||Ct(e);function uA(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Vt(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(a){let{children:A,position:c,preventExitTransition:d,done:s,nodeRef:m,isIn:q}=a;const g=r?`${t}--${c}`:t,f=r?`${n}--${c}`:n,y=Z.useRef(0);return Z.useLayoutEffect(()=>{const I=m.current,K=g.split(" "),k=D=>{D.target===m.current&&(I.dispatchEvent(new Event("d")),I.removeEventListener("animationend",k),I.removeEventListener("animationcancel",k),y.current===0&&D.type!=="animationcancel"&&I.classList.remove(...K))};I.classList.add(...K),I.addEventListener("animationend",k),I.addEventListener("animationcancel",k)},[]),Z.useEffect(()=>{const I=m.current,K=()=>{I.removeEventListener("animationend",K),o?uA(I,s,i):s()};q||(d?K():(y.current=1,I.className+=` ${f}`,I.addEventListener("animationend",K)))},[q]),Z.createElement(Z.Fragment,null,A)}}function go(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const xe={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(r=>r!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},Pt=e=>{let{theme:t,type:n,...r}=e;return Z.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},jn={info:function(e){return Z.createElement(Pt,{...e},Z.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return Z.createElement(Pt,{...e},Z.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return Z.createElement(Pt,{...e},Z.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return Z.createElement(Pt,{...e},Z.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return Z.createElement("div",{className:"Toastify__spinner"})}};function cA(e){const[,t]=Z.useReducer(g=>g+1,0),[n,r]=Z.useState([]),o=Z.useRef(null),i=Z.useRef(new Map).current,a=g=>n.indexOf(g)!==-1,A=Z.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:a,getToast:g=>i.get(g)}).current;function c(g){let{containerId:f}=g;const{limit:y}=A.props;!y||f&&A.containerId!==f||(A.count-=A.queue.length,A.queue=[])}function d(g){r(f=>g==null?[]:f.filter(y=>y!==g))}function s(){const{toastContent:g,toastProps:f,staleId:y}=A.queue.shift();q(g,f,y)}function m(g,f){let{delay:y,staleId:I,...K}=f;if(!Yn(g)||function(ne){return!o.current||A.props.enableMultiContainer&&ne.containerId!==A.props.containerId||i.has(ne.toastId)&&ne.updateId==null}(K))return;const{toastId:k,updateId:D,data:M}=K,{props:C}=A,U=()=>d(k),ee=D==null;ee&&A.count++;const Q={...C,style:C.toastStyle,key:A.toastKey++,...Object.fromEntries(Object.entries(K).filter(ne=>{let[X,W]=ne;return W!=null})),toastId:k,updateId:D,data:M,closeToast:U,isIn:!1,className:Qt(K.className||C.toastClassName),bodyClassName:Qt(K.bodyClassName||C.bodyClassName),progressClassName:Qt(K.progressClassName||C.progressClassName),autoClose:!K.isLoading&&(Ae=K.autoClose,ae=C.autoClose,Ae===!1||Ct(Ae)&&Ae>0?Ae:ae),deleteToast(){const ne=go(i.get(k),"removed");i.delete(k),xe.emit(4,ne);const X=A.queue.length;if(A.count=k==null?A.count-A.displayedToast:A.count-1,A.count<0&&(A.count=0),X>0){const W=k==null?A.props.limit:1;if(X===1||W===1)A.displayedToast++,s();else{const L=W>X?X:W;A.displayedToast=L;for(let J=0;J<L;J++)s()}}else t()}};var Ae,ae;Q.iconOut=function(ne){let{theme:X,type:W,isLoading:L,icon:J}=ne,p=null;const x={theme:X,type:W};return J===!1||(ve(J)?p=J(x):Z.isValidElement(J)?p=Z.cloneElement(J,x):Pe(J)||Ct(J)?p=J:L?p=jn.spinner():(G=>G in jn)(W)&&(p=jn[W](x))),p}(Q),ve(K.onOpen)&&(Q.onOpen=K.onOpen),ve(K.onClose)&&(Q.onClose=K.onClose),Q.closeButton=C.closeButton,K.closeButton===!1||Yn(K.closeButton)?Q.closeButton=K.closeButton:K.closeButton===!0&&(Q.closeButton=!Yn(C.closeButton)||C.closeButton);let te=g;Z.isValidElement(g)&&!Pe(g.type)?te=Z.cloneElement(g,{closeToast:U,toastProps:Q,data:M}):ve(g)&&(te=g({closeToast:U,toastProps:Q,data:M})),C.limit&&C.limit>0&&A.count>C.limit&&ee?A.queue.push({toastContent:te,toastProps:Q,staleId:I}):Ct(y)?setTimeout(()=>{q(te,Q,I)},y):q(te,Q,I)}function q(g,f,y){const{toastId:I}=f;y&&i.delete(y);const K={content:g,props:f};i.set(I,K),r(k=>[...k,I].filter(D=>D!==y)),xe.emit(4,go(K,K.props.updateId==null?"added":"updated"))}return Z.useEffect(()=>(A.containerId=e.containerId,xe.cancelEmit(3).on(0,m).on(1,g=>o.current&&d(g)).on(5,c).emit(2,A),()=>{i.clear(),xe.emit(3,A)}),[]),Z.useEffect(()=>{A.props=e,A.isToastActive=a,A.displayedToast=n.length}),{getToastToRender:function(g){const f=new Map,y=Array.from(i.values());return e.newestOnTop&&y.reverse(),y.forEach(I=>{const{position:K}=I.props;f.has(K)||f.set(K,[]),f.get(K).push(I)}),Array.from(f,I=>g(I[0],I[1]))},containerRef:o,isToastActive:a}}function yo(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function vo(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function dA(e){const[t,n]=Z.useState(!1),[r,o]=Z.useState(!1),i=Z.useRef(null),a=Z.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,A=Z.useRef(e),{autoClose:c,pauseOnHover:d,closeToast:s,onClick:m,closeOnClick:q}=e;function g(M){if(e.draggable){M.nativeEvent.type==="touchstart"&&M.nativeEvent.preventDefault(),a.didMove=!1,document.addEventListener("mousemove",K),document.addEventListener("mouseup",k),document.addEventListener("touchmove",K),document.addEventListener("touchend",k);const C=i.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=C.getBoundingClientRect(),C.style.transition="",a.x=yo(M.nativeEvent),a.y=vo(M.nativeEvent),e.draggableDirection==="x"?(a.start=a.x,a.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(a.start=a.y,a.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function f(M){if(a.boundingRect){const{top:C,bottom:U,left:ee,right:Q}=a.boundingRect;M.nativeEvent.type!=="touchend"&&e.pauseOnHover&&a.x>=ee&&a.x<=Q&&a.y>=C&&a.y<=U?I():y()}}function y(){n(!0)}function I(){n(!1)}function K(M){const C=i.current;a.canDrag&&C&&(a.didMove=!0,t&&I(),a.x=yo(M),a.y=vo(M),a.delta=e.draggableDirection==="x"?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),C.style.transform=`translate${e.draggableDirection}(${a.delta}px)`,C.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function k(){document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",k),document.removeEventListener("touchmove",K),document.removeEventListener("touchend",k);const M=i.current;if(a.canDrag&&a.didMove&&M){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),void e.closeToast();M.style.transition="transform 0.2s, opacity 0.2s",M.style.transform=`translate${e.draggableDirection}(0)`,M.style.opacity="1"}}Z.useEffect(()=>{A.current=e}),Z.useEffect(()=>(i.current&&i.current.addEventListener("d",y,{once:!0}),ve(e.onOpen)&&e.onOpen(Z.isValidElement(e.children)&&e.children.props),()=>{const M=A.current;ve(M.onClose)&&M.onClose(Z.isValidElement(M.children)&&M.children.props)}),[]),Z.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||I(),window.addEventListener("focus",y),window.addEventListener("blur",I)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",I))}),[e.pauseOnFocusLoss]);const D={onMouseDown:g,onTouchStart:g,onMouseUp:f,onTouchEnd:f};return c&&d&&(D.onMouseEnter=I,D.onMouseLeave=y),q&&(D.onClick=M=>{m&&m(M),a.canCloseOnClick&&s()}),{playToast:y,pauseToast:I,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:D}}function bo(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return Z.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:o=>{o.stopPropagation(),t(o)},"aria-label":r},Z.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Z.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function mA(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:A,controlledProgress:c,progress:d,rtl:s,isIn:m,theme:q}=e;const g=i||c&&d===0,f={...A,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:g?0:1};c&&(f.transform=`scaleX(${d})`);const y=Xe("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${q}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":s}),I=ve(a)?a({rtl:s,type:o,defaultClassName:y}):Xe(y,a);return Z.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:I,style:f,[c&&d>=1?"onTransitionEnd":"onAnimationEnd"]:c&&d<1?null:()=>{m&&r()}})}const pA=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o}=dA(e),{closeButton:i,children:a,autoClose:A,onClick:c,type:d,hideProgressBar:s,closeToast:m,transition:q,position:g,className:f,style:y,bodyClassName:I,bodyStyle:K,progressClassName:k,progressStyle:D,updateId:M,role:C,progress:U,rtl:ee,toastId:Q,deleteToast:Ae,isIn:ae,isLoading:te,iconOut:ne,closeOnClick:X,theme:W}=e,L=Xe("Toastify__toast",`Toastify__toast-theme--${W}`,`Toastify__toast--${d}`,{"Toastify__toast--rtl":ee},{"Toastify__toast--close-on-click":X}),J=ve(f)?f({rtl:ee,position:g,type:d,defaultClassName:L}):Xe(L,f),p=!!U||!A,x={closeToast:m,type:d,theme:W};let G=null;return i===!1||(G=ve(i)?i(x):Z.isValidElement(i)?Z.cloneElement(i,x):bo(x)),Z.createElement(q,{isIn:ae,done:Ae,position:g,preventExitTransition:n,nodeRef:r},Z.createElement("div",{id:Q,onClick:c,className:J,...o,style:y,ref:r},Z.createElement("div",{...ae&&{role:C},className:ve(I)?I({type:d}):Xe("Toastify__toast-body",I),style:K},ne!=null&&Z.createElement("div",{className:Xe("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!te})},ne),Z.createElement("div",null,a)),G,Z.createElement(mA,{...M&&!p?{key:`pb-${M}`}:{},rtl:ee,theme:W,delay:A,isRunning:t,isIn:ae,closeToast:m,hide:s,type:d,style:D,className:k,controlledProgress:p,progress:U||0})))},Bt=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},fA=Vt(Bt("bounce",!0));Vt(Bt("slide",!0)),Vt(Bt("zoom")),Vt(Bt("flip"));const Jn=Z.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=cA(e),{className:i,style:a,rtl:A,containerId:c}=e;function d(s){const m=Xe("Toastify__toast-container",`Toastify__toast-container--${s}`,{"Toastify__toast-container--rtl":A});return ve(i)?i({position:s,rtl:A,defaultClassName:m}):Xe(m,Qt(i))}return Z.useEffect(()=>{t&&(t.current=r.current)},[]),Z.createElement("div",{ref:r,className:"Toastify",id:c},n((s,m)=>{const q=m.length?{...a}:{...a,pointerEvents:"none"};return Z.createElement("div",{className:d(s),style:q,key:`container-${s}`},m.map((g,f)=>{let{content:y,props:I}=g;return Z.createElement(pA,{...I,isIn:o(I.toastId),style:{...I.style,"--nth":f+1,"--len":m.length},key:`toast-${I.key}`},y)}))}))});Jn.displayName="ToastContainer",Jn.defaultProps={position:"top-right",transition:fA,autoClose:5e3,closeButton:bo,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let Nn,Be=new Map,Zt=[],hA=1;function Co(){return""+hA++}function qA(e){return e&&(Pe(e.toastId)||Ct(e.toastId))?e.toastId:Co()}function It(e,t){return Be.size>0?xe.emit(0,e,t):Zt.push({content:e,options:t}),t.toastId}function Ut(e,t){return{...t,type:t&&t.type||e,toastId:qA(t)}}function Ft(e){return(t,n)=>It(t,Ut(e,n))}function le(e,t){return It(e,Ut("default",t))}le.loading=(e,t)=>It(e,Ut("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),le.promise=function(e,t,n){let r,{pending:o,error:i,success:a}=t;o&&(r=Pe(o)?le.loading(o,n):le.loading(o.render,{...n,...o}));const A={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(s,m,q)=>{if(m==null)return void le.dismiss(r);const g={type:s,...A,...n,data:q},f=Pe(m)?{render:m}:m;return r?le.update(r,{...g,...f}):le(f.render,{...g,...f}),q},d=ve(e)?e():e;return d.then(s=>c("success",a,s)).catch(s=>c("error",i,s)),d},le.success=Ft("success"),le.info=Ft("info"),le.error=Ft("error"),le.warning=Ft("warning"),le.warn=le.warning,le.dark=(e,t)=>It(e,Ut("default",{theme:"dark",...t})),le.dismiss=e=>{Be.size>0?xe.emit(1,e):Zt=Zt.filter(t=>e!=null&&t.options.toastId!==e)},le.clearWaitingQueue=function(e){return e===void 0&&(e={}),xe.emit(5,e)},le.isActive=e=>{let t=!1;return Be.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},le.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=function(r,o){let{containerId:i}=o;const a=Be.get(i||Nn);return a&&a.getToast(r)}(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:Co()};i.toastId!==e&&(i.staleId=e);const a=i.render||o;delete i.render,It(a,i)}},0)},le.done=e=>{le.update(e,{progress:1})},le.onChange=e=>(xe.on(4,e),()=>{xe.off(4,e)}),le.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},le.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},xe.on(2,e=>{Nn=e.containerId||e,Be.set(Nn,e),Zt.forEach(t=>{xe.emit(0,t.content,t.options)}),Zt=[]}).on(3,e=>{Be.delete(e.containerId||e),Be.size===0&&xe.off(0).off(1).off(5)});function at(e){le.success(e,{position:"top-center",autoClose:650,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"})}let Dn="";const gA=e=>{let t=Dn+"/"+e,n=e;fetch(t).then(r=>r.blob()).then(r=>{const o=window.URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=n.split("/").reduce((a,A)=>A,""),document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(o),at("Download successfully")}).catch(r=>{console.error("File error:",r)})},yA=(e,t)=>{let n=Dn+"/"+e;Xt(n)?at("Link Copied"):t(n)};async function _t(e,t,n,r,o,i="download",a,A=!1){return new Promise(async(c,d)=>{let s=m=>{i==="download"?gA(m):i==="copy"&&yA(m,a)};e==="Playable"?(r&&await ho(t,{iosLink:r==null?void 0:r.iosUrl,androidLink:r==null?void 0:r.googleUrl},o),sA(o,t,n,A).then(async m=>{let{url:q}=m;s(q),c(q)}).catch(m=>{let q=m.response.data.error.msg;d({message:q})})):e==="Flex"?(r&&await fo({_id:t,iosLink:r==null?void 0:r.iosUrl,androidLink:r==null?void 0:r.googleUrl},o),aA({_id:t,network:n},o).then(async m=>{if(m.message){d(m);return}let{url:q}=m;s(q),c(q)}).catch(m=>{let q=m.response.data.error.msg;d({message:q})})):e==="Import"?AA(o,t,n).then(m=>{let q=m.url;s(q),c(q)}).catch(m=>{let q=m.response.data.error.msg;d({message:q})}):e==="Ready"&&lA(o,t,n).then(m=>{let q=m.url;s(q),c(q)}).catch(m=>{let q=m.response.data.error.msg;d({message:q})})})}function vA(e){Dn=e}const bA=({versionId:e,typeOfProduct:t,api:n,fetchFileUrl:r,copyLinkUrl:o,setSafariCopyLink:i})=>{const[a,A]=Z.useState(!1),c=async()=>{A(!0),_t(t,e,"default",null,n,null,i).then(d=>{A(!1);let s;t==="Flex"?s=`${o}/preview?versionId=${e}`:t==="Import"?s=`${o}/preview?versionId=${e}_`:s=`${o}/preview?versionId=${e}_`,Xt(s)?at("Link copied"):i(s),A(!1)}).catch(d=>{A(!1)})};return u.jsxs("div",{style:{display:"flex",height:"125px",width:"100%",borderRadius:"10px",backgroundColor:"#000000",padding:"10px"},children:[u.jsx("div",{style:{marginRight:"0.75rem",width:"50%"},children:u.jsx(Ti,{bgColor:"#0F0F1E",fgColor:"#ffffff",style:{height:"auto",maxWidth:"100%",width:"100%"},value:`${o}/preview?versionId=${e}`+(t==="Flex"?"":"_")})}),u.jsxs("div",{children:[u.jsx("div",{style:{marginBottom:"0.25rem",fontSize:"0.875rem",fontWeight:"bold",color:"white"},children:"Mobile testing"}),u.jsx("div",{style:{marginBottom:"1rem",fontSize:"0.75rem",color:"gray"},children:"Scan QR Code to test in any browser"}),u.jsxs("div",{style:{display:"flex",cursor:"pointer",borderRadius:"0.375rem",backgroundColor:"#00A3FF1A",color:"secondary-blue"},children:[u.jsx(Mr,{style:{marginRight:"0.25rem",height:"1.5rem",width:"1.5rem",stroke:"secondary-blue",color:"white"}}),a?u.jsx("div",{style:{height:"24px",display:"flex",alignItems:"center",margin:"auto"},children:u.jsx("img",{style:{height:"90%"},src:rt,alt:"loading"})}):u.jsx("button",{style:{fontSize:"1rem",color:"white",background:"rgba(0, 163, 255, 0)"},onClick:c,children:"Copy Link"})]})]})]})},CA=({versionName:e,versionId:t,typeOfProduct:n,api:r,iframeUrl:o,fetchFileUrl:i,copyLinkUrl:a,setSafariCopyLink:A})=>{const[c,d]=Z.useState(window.innerWidth);Z.useEffect(()=>{const m=()=>{d(window.innerWidth)};return window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[]);const s=(e==null?void 0:e.length)>25?e.slice(0,25)+"...":e;return u.jsxs("div",{style:{display:"flex",width:"300px",flexDirection:"column",justifyContent:"space-between",padding:"5px",height:c>1440?"680px":"620px",borderRadius:"0px 0px 0px 16px",marginTop:"20px"},children:[u.jsx(Ai,{iframeUrl:o}),u.jsx(si,{name:s}),u.jsx(bA,{versionId:t,typeOfProduct:n,api:r,fetchFileUrl:i,copyLinkUrl:a,setSafariCopyLink:A})]})};var me=(e=>(e.Flex="#7101FF",e.Playable="#F9830B",e.Import="#00a3ff",e.Ready="#0060A5",e))(me||{});const ZA=({typeOfProduct:e})=>u.jsxs("div",{style:{fontSize:"2xl",fontWeight:"bold"},children:[u.jsx("span",{style:{color:me[e]},children:"Select a Network"}),u.jsx("span",{style:{whiteSpace:"pre"},children:" From List"})]});async function IA(e,t){return(await fe.post(t+"/buyRequest",{requestType:e})).data}const wA=()=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsxs("g",{"clip-path":"url(#clip0_518_12094)",children:[u.jsx("path",{d:"M4.50977 11.99L19.4898 11.99",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),u.jsx("path",{d:"M13.5068 17.977L19.4828 12L13.5068 6.02299",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),u.jsx("defs",{children:u.jsx("clipPath",{id:"clip0_518_12094",children:u.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 24) rotate(-90)"})})})]}),xA=({creditDownload:e,api:t})=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:{marginTop:"0.5rem",paddingLeft:"1.5rem",paddingRight:"1.5rem",fontWeight:100},children:"If you continue to export, you will spend 1 credit."}),u.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"0.25rem",fontSize:"12px",fontWeight:100},children:["You have"," ",u.jsx("span",{style:{paddingLeft:"0.25rem",paddingRight:"0.25rem",fontWeight:"bold",color:"#yourColorHere"},children:(e==null?void 0:e.downloadLimit)-(e==null?void 0:e.downloadLimitUsed)<0?0:(e==null?void 0:e.downloadLimit)-(e==null?void 0:e.downloadLimitUsed)})," ","credits remaining.",u.jsxs("button",{style:{marginLeft:"0.5rem",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",textDecoration:"underline",color:"#yourColorHere"},onClick:()=>IA("Flex Credit",t).then(n=>at("You will be contacted regarding your request.")),children:["Get more",u.jsx(wA,{})]})]})]}),KA=({typeOfProduct:e,fileSize:t,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i,api:a,creditDownload:A,user:c,isTest:d,setIsTest:s})=>{const m=g=>{r(g.target.value)},q=g=>{o(g.target.value)};return u.jsxs(u.Fragment,{children:[t&&u.jsxs("span",{style:{fontSize:"16px",fontWeight:"bold"},children:["File size: ",parseFloat(t).toFixed(2)," mb"]}),e!=="Import"&&u.jsxs("div",{style:{display:"flex",width:"100%",flexDirection:"column"},children:[u.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[u.jsx("span",{style:{width:"5rem",fontWeight:"bold"},children:"App Store:"}),u.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"70%",alignItems:"center",borderRadius:"0.375rem",border:n.iosUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:me[e]},type:"text",value:n.iosUrl,onChange:m,placeholder:"Ios Url",disabled:i})]}),u.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[u.jsxs("span",{style:{width:"5rem",fontWeight:"bold"},children:["Google Play:"," "]}),u.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"70%",alignItems:"center",borderRadius:"0.375rem",border:n.googleUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:me[e]},type:"text",value:n.googleUrl,onChange:q,placeholder:"Google Url",disabled:i})]}),c.customer=="playableFactoryInternal"&&e==="Playable"&&u.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[u.jsxs("span",{style:{width:"5rem",fontWeight:"bold"},children:["Enable Test:"," "]}),u.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"20px",alignItems:"center",borderRadius:"0.375rem",border:n.googleUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:me[e]},type:"checkbox",checked:d,onChange:()=>{s(!d)},placeholder:"Google Url",disabled:i})]}),(A==null?void 0:A.willSpendCredit)&&u.jsx(xA,{creditDownload:A,api:a})]})]})},WA=({typeOfProduct:e,title:t})=>u.jsx("div",{style:{fontSize:"1.5rem",fontWeight:"bold",paddingTop:"20px"},children:u.jsx("span",{style:{color:me[e]},children:t})}),MA=({typeOfProduct:e,fileSize:t,urls:n,title:r,handleIosChange:o,handleGoogleChange:i,disabled:a,creditDownload:A,api:c,user:d,isTest:s,setIsTest:m})=>u.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",justifyContent:"space-between",alignItems:"flex-start",borderBottom:"1px solid #D1D5DB",paddingLeft:"1.25rem",paddingRight:"1.25rem",gap:"1rem"},children:[u.jsx(WA,{typeOfProduct:e,title:r}),u.jsx(KA,{typeOfProduct:e,fileSize:t,urls:n,handleIosChange:o,handleGoogleChange:i,disabled:a,creditDownload:A,api:c,user:d,isTest:s,setIsTest:m}),u.jsx(ZA,{typeOfProduct:e})]}),Zo=({fill:e,stroke:t,className:n,style:r})=>u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:e,stroke:t,strokeWidth:n,style:r,className:"w-6 h-6",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.563.563 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.563.563 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5z"})}),Io=({children:e,className:t,onClickDonwload:n,downloading:r,disabled:o})=>u.jsx("button",{onClick:n,className:t,style:{display:"flex",height:"40px",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",border:"1px solid lightgray",padding:"0.25rem",fontSize:"0.875rem",width:200,backgroundColor:"#FFFFFF"},disabled:r||o,children:e}),SA=({checked:e,typeOfProduct:t,id:n})=>{const[r,o]=Z.useState(e);Z.useEffect(()=>{o(e)},[e]);const i=()=>{o(!r)};return u.jsx("div",{style:{display:"inline-flex",alignItems:"center"},children:u.jsxs("label",{onClick:i,style:{position:"relative",display:"flex",cursor:"pointer",alignItems:"center"},htmlFor:n,children:[u.jsx("input",{type:"checkbox",style:{position:"relative",height:"20px",width:"20px",cursor:"pointer",appearance:"none",borderRadius:"0.25rem",transition:"all ease-in-out",border:"1px solid lightgray",opacity:1},id:n,checked:r,onChange:i}),u.jsxs("div",{style:{pointerEvents:"none",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"white",opacity:r?1:0,transition:"opacity ease-in-out"},children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{height:"14px",width:"14px"},viewBox:"0 0 20 20",fill:me[t],stroke:me[t],strokeWidth:"1",children:u.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})," "]})]})})},kl="",LA=({typeOfProduct:e})=>u.jsx("div",{style:{backgroundColor:"transparent",display:"flex",alignItems:"center",flexDirection:"column"},children:u.jsxs("div",{style:{position:"relative",width:"64px",height:"16px",marginTop:"8px"},children:[u.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:me[e]}}),u.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:me[e]}}),u.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:me[e]}}),u.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:me[e]}})]})}),Rn=({isNetworksLoading:e=!1})=>u.jsx("div",{style:{display:"flex",height:"100%",width:"90px",alignItems:"center",justifyContent:"center"},children:u.jsx("img",{width:e?"100px":"25px",height:e?"100px":"25px",src:rt,alt:"pf-logo-gif"})}),OA=({title:e,titleId:t,...n})=>u.jsxs("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em","aria-labelledby":t,...n,children:[e?u.jsx("title",{id:t,children:e}):null,u.jsx("path",{stroke:"currentColor",d:"m15.985 11.111-3.556 3.556-3.556-3.556M12.429 4v10.667M20.429 16.444A3.556 3.556 0 0 1 16.873 20H7.985a3.556 3.556 0 0 1-3.556-3.556",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]}),EA=({onClose:e,iosLink:t,googleLink:n,buttonType:r,handleCopyLink:o,download:i})=>{let a="";return!t&&!n?a="Both links are empty. Are you sure you want to continue?":t?n||(a="Google link is empty. Are you sure you want to continue?"):a="iOS link is empty. Are you sure you want to continue?",u.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"120%",width:"130%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},children:[u.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),u.jsxs("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",maxWidth:"350px",borderRadius:"0.375rem",backgroundColor:"white",padding:"1rem",pointerEvents:"auto"},children:[u.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:a}),u.jsxs("div",{style:{display:"flex",gap:"5px"},children:[u.jsx("button",{onClick:()=>{e(!1)},style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid #666666",padding:"0.5rem",fontWeight:"bold",transition:"all 0.15s ease-linear"},children:"No"}),u.jsx("button",{onClick:async A=>{r==="download"?await i():r==="copyLink"&&await o(),e()},style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid red",backgroundColor:"darkorange",padding:"0.5rem",fontWeight:"bold",color:"white",transition:"all 0.15s ease-linear"},children:"Yes"})]})]})]})},wo=({onClose:e,handleCopyLink:t,download:n,creditConfirmType:r,getDownloadCount:o})=>u.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"120%",width:"130%",alignItems:"center",justifyContent:"center",backgroundColor:"#00000080"},children:[u.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%"}}),u.jsxs("div",{style:{position:"absolute",zIndex:50,display:"flex",height:"max-content",width:350,flexDirection:"column",gap:"5px",borderRadius:"8px",backgroundColor:"white",padding:"20px"},children:[u.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:"You are going to spend 1 credit for this download, do you want to continue?"}),u.jsxs("div",{style:{display:"flex",gap:"5px"},children:[u.jsx("button",{onClick:e,style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"dark-50",padding:"2px",fontWeight:"bold"},children:"No"}),u.jsx("button",{style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"#F9830B",backgroundColor:"#F9830B",padding:"2px",fontWeight:"bold",color:"white"},onClick:async i=>{i.preventDefault(),i.stopPropagation(),r==="download"?(await n(),await o()):r==="copy"&&(await t(),await o()),e()},children:"Yes"})]})]})]}),kA=({onClose:e,handleDownload:t,handleDownloadMolocoTest:n,downloadingMoloco:r,downloadingMolocoTest:o})=>u.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"120%",width:"130%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},children:[u.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),u.jsx("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",minWidth:"500px",borderRadius:"0.375rem",backgroundColor:"white",padding:"1rem",pointerEvents:"auto"},children:u.jsxs("div",{style:{display:"flex",gap:"5px"},children:[r?u.jsx("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear"},children:u.jsx("img",{width:"25px",height:"25px",src:rt,alt:"pf-logo-gif"})}):u.jsx("button",{onClick:t,style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear"},children:"Download"}),o?u.jsx("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear"},children:u.jsx("img",{width:"25px",height:"25px",src:rt,alt:"pf-logo-gif"})}):u.jsx("button",{onClick:n,style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear"},children:"Download Moloco Test"})]})})]});async function zA(e,t,n,r){return(await fe.post(e+"/createMolocoTestPage",{_id:t,network:n,typeOfProduct:r})).data}const YA=["adcolony","ironsource","applovin","unity","mobvista","criteo","kayzen","vungle","moloco","inmobi"],jA=({id:e,imageUrl:t,handleCardClick:n,selected:r,name:o,networkVersionSize:i,fileSizeLoading:a,showCheckBox:A,typeOfProduct:c,versionId:d,api:s,handleDownloadError:m,fetchFileUrl:q,urls:g,game:f,setIsConfirmActive:y,creditDownload:I,getDownloadCount:K,disabled:k,user:D,setSafariCopyLink:M,isTest:C})=>{const[U,ee]=Z.useState(!1),[Q,Ae]=Z.useState(""),[ae,te]=Z.useState(!1),[ne,X]=Z.useState(!1),[W,L]=Z.useState(!1),[J,p]=Z.useState("download"),[x,G]=Z.useState(!1),[v,h]=Z.useState(!1);let z={aarki:"html,copy",adcolony:"copy,html",adjoe:"copy,html",applovin:"copy,html",appreciate:"zip",chartboost:"copy,html",criteo:"zip",crossinstall:"copy,html",default:"copy",fb:"zip",fyber:"copy,html",google:"zip",google360:"zip",ironsource:"copy,html",kayzen:"apikey",kaden:"html",kidoz:"html",lifestreet:"copy,html",liftoff:"copy,zip",mobvista:"html",moloco:"html,molocotest",molocoV2:"html,molocotest",nucleo:"copy,html",oceanengine:"copy,zip",pointblank:"html",smadex:"zip",snapchat:"zip",tapjoy:"copy,html",tencent:"zip",toutiao:"copy,zip",toutiao_cn:"copy,zip",unity:"copy,html",vungle:"html",web:"copy,html",yandex:"zip",zucks:"copy,html",luna:"zip",inmobi:"copy,html,",nend:"html",adikteev:"html",jammp:"copy,html"};const Y=()=>{n(e)},j=async(E,R)=>(ee(!0),new Promise((V,B)=>{_t(c,d,E,g,s,R,M,C).then(ue=>{ee(!1),V(ue)}).catch(ue=>{ee(!1),m(ue.message,ue),B(ue)})})),P=async()=>{G(!0),_t(c,d,o,g,s,"download",M).then(E=>{G(!1),L(!1)}).catch(E=>{m(E.message,E)})},N=async()=>{h(!0);const E=await zA(s,d,o,c);let R=`${q}/${E==null?void 0:E.url}`;Xt(R)?(at("Link Copied"),h(!1)):M(R)};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",gap:"20px",padding:"16px",borderColor:r?me[c]:"lightgray",borderWidth:"1px",borderStyle:"solid",backgroundColor:"white",width:"100%",height:"175px",borderRadius:"16px",cursor:"pointer"},className:"border-hover-"+c,onClick:Y,children:[u.jsxs("div",{style:{marginTop:"40px",display:"flex",justifyContent:"center"},children:[u.jsxs("div",{style:{position:"absolute",right:"0",top:"0",padding:"8px"},children:[YA.includes(o)&&c!=="Import"&&u.jsx(Zo,{fill:me[c],stroke:me[c],className:"mb-1 inline-block w-6",style:{marginBottom:"0.25rem",display:"inline-block",width:"1.5rem"}}),u.jsx("div",{children:i&&i.map(E=>E.network).includes(o)?a?u.jsx("div",{style:{position:"absolute",right:"0",top:"0.5rem",padding:"0.5rem",height:"1.5rem",display:"flex",justifyContent:"center",alignItems:"center",marginRight:"2rem"},children:u.jsx(LA,{typeOfProduct:c})}):i.map(E=>u.jsx("div",{style:{position:"absolute",right:"0",top:"0.5rem",padding:"0.5rem",marginRight:"2rem",fontSize:"1rem",height:"1.5rem",display:"flex",justifyContent:"center",alignItems:"center"},children:E.network===o?E.size.toString().slice(0,5)+"Mb":""},E.network)):null})]}),u.jsx("div",{style:{position:"absolute",top:"0",left:"0",padding:"0.5rem"},children:(c==="Playable"||c==="Ready"||c==="Flex")&&A&&u.jsx(SA,{checked:r,typeOfProduct:c,id:e})}),u.jsx("img",{onClick:Y,style:{width:"30rem",height:"50px",objectFit:"contain"},src:t})]}),u.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem"},children:[u.jsxs(Io,{className:"w-2/3 border-hover-"+c,downloading:U,onClickDonwload:async E=>{if(E.stopPropagation(),(o==="moloco"||o==="molocoV2")&&D.customer==="playableFactoryInternal"){L(!0);return}else{Ae("download");const R=g.iosUrl,V=g.googleUrl;I&&I.willSpendCredit?(y(!0),p("download"),te(!0)):c!=="Import"&&(!R||!V)?(y(!0),X(!0)):(X(!1),te(!1),await j(o,"download"))}},children:[!U&&u.jsxs(u.Fragment,{children:[u.jsx(OA,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1.5rem",stroke:"dark-full"}}),"Download"]}),U&&u.jsx(Rn,{})]}),z[o].includes("copy")&&u.jsx(Io,{className:"w-1/3 border-hover-"+c,onClickDonwload:async E=>{E.stopPropagation(),Ae("copyLink");const R=g.iosUrl,V=g.googleUrl;I&&(I!=null&&I.willSpendCredit)?(p("copy"),y(!0),te(!0)):c!=="Import"&&(!R||!V)?(y(!0),X(!0)):(te(!1),X(!1),await j(o,"copy"))},disabled:k,children:u.jsx(Mr,{className:"h-6 w-6 stroke-dark-full"})})]})]}),ae&&u.jsx(wo,{creditConfirmType:J,handleCopyLink:async()=>{X(!1),y(!1),await j(o,"copy")},download:async()=>{X(!1),y(!1),await j(o,"download")},onClose:()=>{te(!1),y(!1)},getDownloadCount:K}),ne&&u.jsx(EA,{onClose:()=>{X(!1),y(!1)},iosLink:g.iosUrl,googleLink:g.googleUrl,buttonType:Q,handleCopyLink:async()=>{X(!1),y(!1),await j(o,"copy")},download:async()=>{X(!1),y(!1),await j(o,"download")}}),W&&D.customer==="playableFactoryInternal"&&u.jsx(kA,{onClose:()=>{L(!1)},handleDownload:P,handleDownloadMolocoTest:N,downloadingMoloco:x,donwloadintMolocoTest:v})]})},Gn=[{id:"1",name:"unity",imageSrc:"https://gearbox.playablefactory.com/unity.png"},{id:"2",name:"applovin",imageSrc:"https://gearbox.playablefactory.com/applovin.png"},{id:"3",name:"ironsource",imageSrc:"https://gearbox.playablefactory.com/ironsource.png"},{id:"4",name:"vungle",imageSrc:"https://gearbox.playablefactory.com/vungle.png"},{id:"5",name:"mobvista",imageSrc:"https://gearbox.playablefactory.com/mobvista.png"},{id:"6",name:"fb",imageSrc:"https://gearbox.playablefactory.com/fb.png"},{id:"7",name:"toutiao",imageSrc:"https://gearbox.playablefactory.com/toutiao.png"},{id:"8",name:"toutiao_cn",imageSrc:"https://gearbox.playablefactory.com/toutiao_cn.png"},{id:"9",name:"adcolony",imageSrc:"https://gearbox.playablefactory.com/adcolony.png"},{id:"10",name:"criteo",imageSrc:"https://gearbox.playablefactory.com/criteo.png"},{id:"11",name:"chartboost",imageSrc:"https://gearbox.playablefactory.com/chartboost.png"},{id:"12",name:"kayzen",imageSrc:"https://gearbox.playablefactory.com/kayzen.png"},{id:"13",name:"crossinstall",imageSrc:"https://gearbox.playablefactory.com/crossinstall.png"},{id:"14",name:"default",imageSrc:"https://gearbox.playablefactory.com/default.png"},{id:"15",name:"fyber",imageSrc:"https://gearbox.playablefactory.com/fyber.png"},{id:"16",name:"appreciate",imageSrc:"https://gearbox.playablefactory.com/appreciate.png"},{id:"17",name:"google360",imageSrc:"https://gearbox.playablefactory.com/google360.png"},{id:"18",name:"kaden",imageSrc:"https://gearbox.playablefactory.com/kaden.png"},{id:"19",name:"kidoz",imageSrc:"https://gearbox.playablefactory.com/kidoz.png"},{id:"20",name:"lifestreet",imageSrc:"https://gearbox.playablefactory.com/lifestreet.png"},{id:"21",name:"liftoff",imageSrc:"https://gearbox.playablefactory.com/liftoff.png"},{id:"22",name:"moloco",imageSrc:"https://gearbox.playablefactory.com/moloco.png"},{id:"23",name:"nucleo",imageSrc:"https://gearbox.playablefactory.com/nucleo.png"},{id:"24",name:"oceanengine",imageSrc:"https://gearbox.playablefactory.com/oceanengine.png"},{id:"25",name:"pointblank",imageSrc:"https://gearbox.playablefactory.com/pointblank.png"},{id:"26",name:"snapchat",imageSrc:"https://gearbox.playablefactory.com/snapchat.png"},{id:"27",name:"tapjoy",imageSrc:"https://gearbox.playablefactory.com/tapjoy.png"},{id:"28",name:"tencent",imageSrc:"https://gearbox.playablefactory.com/tencent.png"},{id:"31",name:"aarki",imageSrc:"https://gearbox.playablefactory.com/aarki.png"},{id:"32",name:"yandex",imageSrc:"https://gearbox.playablefactory.com/yandex.png"},{id:"33",name:"web",imageSrc:"https://gearbox.playablefactory.com/web.png"},{id:"34",name:"zucks",imageSrc:"https://gearbox.playablefactory.com/zucks.png"},{id:"35",name:"google",imageSrc:"https://gearbox.playablefactory.com/google.png"},{id:"36",name:"inmobi",imageSrc:"https://gearbox.playablefactory.com/inmobi.png"},{id:"38",name:"smadex",imageSrc:"https://gearbox.playablefactory.com/smadex.png"},{id:"39",name:"instantGame",imageSrc:"https://gearbox.playablefactory.com/instantGame.png"},{id:"40",name:"luna",imageSrc:"https://gearbox.playablefactory.com/luna.png"},{id:"41",name:"nend",imageSrc:"https://gearbox.playablefactory.com/nend.png"},{id:"42",name:"jammp",imageSrc:"https://gearbox.playablefactory.com/nend.png"},{id:"43",name:"adjoe",imageSrc:"https://gearbox.playablefactory.com/adjoe.png"},{id:"44",name:"molocoV2",imageSrc:"https://gearbox.playablefactory.com/molocoV2.png"},{id:"45",name:"adikteev",imageSrc:"https://gearbox.playablefactory.com/adikteev.png"}],JA=({typeOfProduct:e})=>u.jsx("div",{style:{flex:1,overflowY:"auto",padding:"0.75rem"},children:u.jsx("div",{style:{display:"flex",justifyContent:"center",textAlign:"center",fontSize:"0.875rem",fontWeight:"bold",height:"1.5rem"},children:e!=="Import"&&u.jsxs(u.Fragment,{children:[u.jsx(Zo,{fill:me[e],stroke:me[e],style:{display:"inline-block",width:"1.5rem"},className:""}),u.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Data tracking functionality is turned on by default for marked network downloads"})]})})}),NA=({children:e,typeOfProduct:t,className:n,onClick:r})=>{const o={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"12rem",height:"2.5rem",backgroundColor:me[t],color:"white",fontSize:"0.875rem",borderRadius:"0.875rem"};return u.jsx("button",{onClick:r,className:n,style:o,children:e})},DA=({networksVersionTotalSize:e,typeOfProduct:t,onClickMultiDownload:n,multiDownloading:r})=>u.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"},children:r?u.jsx("div",{style:{display:"flex",width:"12rem",height:"2.5rem",borderRadius:"0.875rem",alignItems:"center",justifyContent:"center",backgroundColor:me[t]},children:u.jsx(Rn,{})}):u.jsx(NA,{typeOfProduct:t,onClick:n,children:u.jsx("span",{style:{fontSize:"1.25rem",padding:"0.5rem",color:"#fff"},children:"Multi Download"})})});async function RA(e,t,n){return(await fe.post(n+"/createPlayableVersionLinkMulti",{_id:e,networks:t})).data}async function GA(e,t,n){return(await fe.post(n+"/createFlexVersionLinkMulti",{_id:e,networks:t})).data}const TA=({playable:e,creditDownload:t,visible:n,versionId:r,typeOfProduct:o,api:i,user:a,handleDownloadError:A,fetchFileUrl:c,urls:d,game:s,getDownloadCount:m,disabled:q,setSafariCopyLink:g,isTest:f})=>{const[y,I]=Z.useState([]),[K,k]=Z.useState([]),[D,M]=Z.useState(!1),[C,U]=Z.useState(""),[ee,Q]=Z.useState(!1),[Ae,ae]=Z.useState(!1),[te,ne]=Z.useState("download"),[X,W]=Z.useState(!1),L=async x=>{const G=[...y];if(y.includes(x)){const v=G.findIndex(h=>h===x);G.splice(v,1),I(G)}else G.push(x),I([...y,x]);Gn.filter(v=>[...G].includes(v.id)).map(v=>v.name)},J=async()=>{try{const x=Gn.filter(Y=>[...y].includes(Y.id)).map(Y=>Y.name);Q(!0);let G;o==="Flex"?(await ho(r,{iosLink:d==null?void 0:d.iosUrl,androidLink:d==null?void 0:d.googleUrl},i),G=await GA(r,x,i)):(await fo({_id:r,iosLink:d==null?void 0:d.iosUrl,androidLink:d==null?void 0:d.googleUrl},i),G=await RA(r,x,i));const{url:v}=G;let h;const z=c+"/"+v;h=document.createElement("iframe"),h.setAttribute("src",z),h.style.display="none",document.body.appendChild(h),h.click(),Q(!1),at("Multi downloaded completed successfully")}catch(x){Q(!1),A(x.response.data.error.msg,x.response),console.error(x)}},p=async()=>{d.iosUrl,d.googleUrl,t&&t.willSpendCredit?(ae(!0),ne("download"),W(!0)):(W(!1),await J())};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{style:{position:"relative",flex:1,overflowY:Ae?"hidden":"auto",padding:"1.5rem",paddingTop:"0"},children:[u.jsx("div",{style:{display:"grid",gridTemplateColumns:"180px 180px 180px",gap:"1rem",overflowY:"auto",padding:"0.75rem"},children:n&&Gn.filter(x=>{var G;return t&&((G=t==null?void 0:t.networks)==null?void 0:G.length)>0?t==null?void 0:t.networks.includes(x.name):o==="Import"?e==null?void 0:e.networks.filter(v=>v.status==="paid").some(v=>v.name===x.name):e==null?void 0:e.networks.includes(x.name)}).filter(x=>x.name==="voodoo"?a.customer==="customer:20":!0).map(x=>u.jsx(jA,{id:x.id,name:x.name,imageUrl:x.imageSrc,selected:y.includes(x.id),handleCardClick:L,networkVersionSize:K,fileSizeLoading:D,showCheckBox:!0,typeOfProduct:o,versionId:r,api:i,handleDownloadError:A,fetchFileUrl:c,urls:d,game:s,creditDownload:t,setIsConfirmActive:ae,getDownloadCount:m,disabled:q,user:a,setSafariCopyLink:g,isTest:f},x.id))}),u.jsx(JA,{typeOfProduct:o})]}),y.length>1&&(o==="Playable"||o==="Ready"||o==="Flex")&&u.jsx("div",{style:{position:"fixed",bottom:"0",left:"65%",zIndex:20,transform:"translateX(-50%)",display:"flex",flexDirection:"column",paddingTop:"5px"},children:u.jsx(DA,{onClickMultiDownload:p,networksVersionTotalSize:C,typeOfProduct:o,multiDownloading:ee})}),X&&u.jsx(wo,{creditConfirmType:te,handleCopyLink:async()=>{},download:async()=>{W(!1),ae(!1),await J()},onClose:()=>{W(!1),ae(!1)},getDownloadCount:m})]})};async function HA(e,t){return(await fe.post(t+"/findPlayable",{_id:e})).data}async function XA(e,t){return(await fe.post(t+"/getFlexDownloadCount",e)).data}async function QA(e,t){try{return(await fe.post(t+"/findGame",{_id:e})).data}catch{}}async function VA(e,t){return(await fe.post(t+"/getPlayableVersionMarketLink",{_id:e})).data}async function PA(e,t){return(await fe.post(t+"/getFlexData",{_id:e})).data}async function BA(e,t){return(await fe.post(t+"/getImportedPlayable",{id:e})).data}async function UA(e,t){return(await fe.post(t+"/getReadyDownloadCount",e)).data}const FA=["adcolony","ironsource","applovin","unity","mobvista","criteo","kayzen","vungle","moloco","inmobi"],_A=["adcolony","applovin","chartboost","crossinstall","fb","google","ironsource","lifestreet","liftoff","mobvista","nucleo","tapjoy","toutiao","unity","vungle","moloco"],$A=({playableId:e,versionId:t,gameId:n,typeOfProduct:r,visible:o,api:i,user:a,title:A,handleDownloadError:c,fetchFileUrl:d,fileSize:s,setFileSize:m,setSafariCopyLink:q})=>{const[g,f]=Z.useState(null),[y,I]=Z.useState(null),[K,k]=Z.useState(null),[D,M]=Z.useState(!1),[C,U]=Z.useState("Loading..."),[ee,Q]=Z.useState("Loading..."),[Ae,ae]=Z.useState(!0),[te,ne]=Z.useState(window.innerWidth),[X,W]=Z.useState(!1);Z.useEffect(()=>{const h=()=>{ne(window.innerWidth)};return window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[]);const L=async()=>{M(!0);const h=await HA(e,i);return h!=null&&h.networks||(h.networks=FA),f(h),h},J=h=>{U(h)},p=h=>{Q(h)},x=async(h,z)=>{var Y,j;try{let P;if(r==="Playable"||r==="Ready"){const N=await VA(t,i);if(N){U(N.iosLink),Q(N.androidLink),M(!1);return}if(h&&(h.iosUrl||h.googleUrl)){U(h.iosUrl),Q(h.googleUrl),M(!1);return}if(z&&z.html){let E=await fetch(d+"/"+z.html).then(B=>B.text());const R=((Y=E.match(/var\s+iosLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:Y.at(1))||"";U(R);const V=((j=E.match(/var\s+androidLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:j.at(1))||"";Q(V),M(!1)}else Q(""),U(""),M(!1)}else if(r==="Flex"){const N=await PA(t,i);if(N.googleUrl||N.iosUrl){Q(N.googleUrl),U(N.iosUrl),M(!1);return}h&&(h.iosUrl||h.googleUrl)?(U(h.iosUrl),Q(h.googleUrl),M(!1)):(Q(""),U(""),M(!1))}}catch(P){c(P.response.data.error.msg)}},G=async()=>{M(!0);let h;r==="Flex"?h=await XA({_id:t},i):r==="Ready"&&(h=await UA({_id:t},i)),h&&(["admin","pm","tester"].includes(a.role)?k({...h,networks:_A}):k(h)),M(!1)},v=async()=>await QA(n,i);return Z.useEffect(()=>{o||(f(null),I(null),k(null),m(null)),o&&(r==="Playable"||r==="Ready"?(L().then(h=>{x(null,h)}),ae(!1)):r==="Flex"?G().then(h=>{ae(!1),v().then(z=>{o&&(x(z,null),ae(!1),I(z))})}):r==="Import"&&BA(t,i).then(h=>{console.log(h),f(h),U(h.iosUrl||""),Q(h.googleUrl||""),M(!1),ae(!1)}))},[n,e,t,o]),u.jsxs("div",{style:{display:"flex",height:te>1440?"700px":"650px",width:te>1440?"675px":"680px",flexDirection:"column",borderRadius:"rounded",backgroundColor:"#F7F7F8",paddingTop:"0px"},children:[u.jsx(MA,{title:A,typeOfProduct:r,fileSize:s,urls:{iosUrl:C,googleUrl:ee},handleIosChange:J,handleGoogleChange:p,disabled:Ae,api:i,creditDownload:K,user:a,isTest:X,setIsTest:W}),D?u.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center"},children:u.jsx(Rn,{isNetworksLoading:!0})}):(g||K)&&(r==="Flex"?y:!0)&&!D&&C!=="Loading..."&&ee!=="Loading..."&&u.jsx(TA,{playable:g,creditDownload:K,visible:o,versionId:t,typeOfProduct:r,api:i,user:a,handleDownloadError:c,fetchFileUrl:d,urls:{iosUrl:C,googleUrl:ee},game:y,getDownloadCount:G,disabled:Ae,setSafariCopyLink:q,isTest:X})]})},zl="";var Tn={exports:{}},Ue={},Hn={exports:{}},Se={},Xn={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;/*!
|
|
50
|
+
`):" "+eo(i[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:xn};function Kn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new bt(null,e)}function no(e){return Kn(e),e.headers=Ne.from(e.headers),e.data=wn.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),to.getAdapter(e.adapter||Zn.adapter)(e).then(function(r){return Kn(e),r.data=wn.call(e,e.transformResponse,r),r.headers=Ne.from(r.headers),r},function(r){return Fr(r)||(Kn(e),r&&r.response&&(r.response.data=wn.call(e,e.transformResponse,r.response),r.response.headers=Ne.from(r.response.headers))),Promise.reject(r)})}const ro=e=>e instanceof Ne?e.toJSON():e;function it(e,t){t=t||{};const n={};function r(d,s,m){return b.isPlainObject(d)&&b.isPlainObject(s)?b.merge.call({caseless:m},d,s):b.isPlainObject(s)?b.merge({},s):b.isArray(s)?s.slice():s}function o(d,s,m){if(b.isUndefined(s)){if(!b.isUndefined(d))return r(void 0,d,m)}else return r(d,s,m)}function i(d,s){if(!b.isUndefined(s))return r(void 0,s)}function a(d,s){if(b.isUndefined(s)){if(!b.isUndefined(d))return r(void 0,d)}else return r(void 0,s)}function A(d,s,m){if(m in t)return r(d,s);if(m in e)return r(void 0,d)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:A,headers:(d,s)=>o(ro(d),ro(s),!0)};return b.forEach(Object.keys(Object.assign({},e,t)),function(s){const m=c[s]||o,q=m(e[s],t[s],s);b.isUndefined(q)&&m!==A||(n[s]=q)}),n}const oo="1.5.1",Wn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Wn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const io={};Wn.transitional=function(t,n,r){function o(i,a){return"[Axios v"+oo+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,A)=>{if(t===!1)throw new _(o(a," has been removed"+(n?" in "+n:"")),_.ERR_DEPRECATED);return n&&!io[a]&&(io[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,A):!0}};function Fa(e,t,n){if(typeof e!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const A=e[i],c=A===void 0||a(A,i,e);if(c!==!0)throw new _("option "+i+" must be "+c,_.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _("Unknown option "+i,_.ERR_BAD_OPTION)}}const Mn={assertOptions:Fa,validators:Wn},He=Mn.validators;class Tt{constructor(t){this.defaults=t,this.interceptors={request:new Vr,response:new Vr}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=it(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Mn.assertOptions(r,{silentJSONParsing:He.transitional(He.boolean),forcedJSONParsing:He.transitional(He.boolean),clarifyTimeoutError:He.transitional(He.boolean)},!1),o!=null&&(b.isFunction(o)?n.paramsSerializer={serialize:o}:Mn.assertOptions(o,{encode:He.function,serialize:He.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&b.merge(i.common,i[n.method]);i&&b.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f]}),n.headers=Ne.concat(a,i);const A=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(c=c&&y.synchronous,A.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let s,m=0,q;if(!c){const f=[no.bind(this),void 0];for(f.unshift.apply(f,A),f.push.apply(f,d),q=f.length,s=Promise.resolve(n);m<q;)s=s.then(f[m++],f[m++]);return s}q=A.length;let g=n;for(m=0;m<q;){const f=A[m++],y=A[m++];try{g=f(g)}catch(I){y.call(this,I);break}}try{s=no.call(this,g)}catch(f){return Promise.reject(f)}for(m=0,q=d.length;m<q;)s=s.then(d[m++],d[m++]);return s}getUri(t){t=it(this.defaults,t);const n=_r(t.baseURL,t.url);return Qr(n,t.params,t.paramsSerializer)}}b.forEach(["delete","get","head","options"],function(t){Tt.prototype[t]=function(n,r){return this.request(it(r||{},{method:t,url:n,data:(r||{}).data}))}}),b.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,A){return this.request(it(A||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Tt.prototype[t]=n(),Tt.prototype[t+"Form"]=n(!0)});const Ht=Tt;class Sn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(A=>{r.subscribe(A),i=A}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,A){r.reason||(r.reason=new bt(i,a,A),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Sn(function(o){t=o}),cancel:t}}}const _a=Sn;function $a(e){return function(n){return e.apply(null,n)}}function eA(e){return b.isObject(e)&&e.isAxiosError===!0}const Ln={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent: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};Object.entries(Ln).forEach(([e,t])=>{Ln[t]=e});const tA=Ln;function ao(e){const t=new Ht(e),n=Sr(Ht.prototype.request,t);return b.extend(n,Ht.prototype,t,{allOwnKeys:!0}),b.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return ao(it(e,o))},n}const de=ao(Zn);de.Axios=Ht,de.CanceledError=bt,de.CancelToken=_a,de.isCancel=Fr,de.VERSION=oo,de.toFormData=Dt,de.AxiosError=_,de.Cancel=de.CanceledError,de.all=function(t){return Promise.all(t)},de.spread=$a,de.isAxiosError=eA,de.mergeConfig=it,de.AxiosHeaders=Ne,de.formToJSON=e=>Br(b.isHTMLForm(e)?new FormData(e):e),de.getAdapter=to.getAdapter,de.HttpStatusCode=tA,de.default=de;const nA=de;/*! typescript-cookie v1.0.6 | MIT */const Ao=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),so=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),On=decodeURIComponent,En=e=>(e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent));function rA(e){return e=Object.assign({},e),typeof e.expires=="number"&&(e.expires=new Date(Date.now()+e.expires*864e5)),e.expires!=null&&(e.expires=e.expires.toUTCString()),Object.entries(e).filter(([t,n])=>n!=null&&n!==!1).map(([t,n])=>n===!0?`; ${t}`:`; ${t}=${n.split(";")[0]}`).join("")}function lo(e,t,n){const r=/(?:^|; )([^=]*)=([^;]*)/g,o={};let i;for(;(i=r.exec(document.cookie))!=null;)try{const a=n(i[1]);if(o[a]=t(i[2],a),e===a)break}catch{}return e!=null?o[e]:o}const uo=Object.freeze({decodeName:On,decodeValue:En,encodeName:Ao,encodeValue:so}),kn=Object.freeze({path:"/"});function co(e,t,n=kn,{encodeValue:r=so,encodeName:o=Ao}={}){return document.cookie=`${o(e)}=${r(t,e)}${rA(n)}`}function mo(e,{decodeValue:t=En,decodeName:n=On}={}){return lo(e,t,n)}function oA({decodeValue:e=En,decodeName:t=On}={}){return lo(void 0,e,t)}function iA(e,t=kn){co(e,"",Object.assign({},t,{expires:-1}))}function zn(e,t){const n={set:function(o,i,a){return co(o,i,Object.assign({},this.attributes,a),{encodeValue:this.converter.write})},get:function(o){if(arguments.length===0)return oA(this.converter.read);if(o!=null)return mo(o,this.converter.read)},remove:function(o,i){iA(o,Object.assign({},this.attributes,i))},withAttributes:function(o){return zn(this.converter,Object.assign({},this.attributes,o))},withConverter:function(o){return zn(Object.assign({},this.converter,o),this.attributes)}},r={attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}};return Object.create(n,r)}zn({read:uo.decodeValue,write:uo.encodeValue},kn);let po;typeof window<"u"&&(po=mo("token"));const fe=nA.create({headers:{Authorization:po}});async function aA(e,t){return e.network=="fb"&&(e.zip=1),(await fe.post(t+"/createFlexVersionLink",e||{})).data}async function AA(e,t,n){return(await fe.post(e+"/createImportedVersionLink",{_id:t,network:n})).data}async function sA(e,t,n,r){return console.log(r),(await fe.post(e+"/createPlayableVersionLink",{_id:t,network:n,isPfTest:r})).data}async function lA(e,t,n){return(await fe.post(e+"/createReadyVersionLink",{_id:t,network:n})).data}async function fo(e,t){return(await fe.post(t+"/updateFlexUrl",e||{})).data}async function ho(e,t,n){return(await fe.post(n+"/updatePlayableVersion",{...t,_id:e})).data}function Xt(e){const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select();try{return document.execCommand("copy")?(document.body.removeChild(t),!0):(document.body.removeChild(t),!1)}catch{return document.body.removeChild(t),!1}}function qo(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=qo(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Xe(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=qo(e))&&(r&&(r+=" "),r+=t);return r}const Ct=e=>typeof e=="number"&&!isNaN(e),Pe=e=>typeof e=="string",ve=e=>typeof e=="function",Qt=e=>Pe(e)||ve(e)?e:null,Yn=e=>Z.isValidElement(e)||Pe(e)||ve(e)||Ct(e);function uA(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Vt(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(a){let{children:A,position:c,preventExitTransition:d,done:s,nodeRef:m,isIn:q}=a;const g=r?`${t}--${c}`:t,f=r?`${n}--${c}`:n,y=Z.useRef(0);return Z.useLayoutEffect(()=>{const I=m.current,K=g.split(" "),k=D=>{D.target===m.current&&(I.dispatchEvent(new Event("d")),I.removeEventListener("animationend",k),I.removeEventListener("animationcancel",k),y.current===0&&D.type!=="animationcancel"&&I.classList.remove(...K))};I.classList.add(...K),I.addEventListener("animationend",k),I.addEventListener("animationcancel",k)},[]),Z.useEffect(()=>{const I=m.current,K=()=>{I.removeEventListener("animationend",K),o?uA(I,s,i):s()};q||(d?K():(y.current=1,I.className+=` ${f}`,I.addEventListener("animationend",K)))},[q]),Z.createElement(Z.Fragment,null,A)}}function go(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const xe={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(r=>r!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},Pt=e=>{let{theme:t,type:n,...r}=e;return Z.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},jn={info:function(e){return Z.createElement(Pt,{...e},Z.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return Z.createElement(Pt,{...e},Z.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return Z.createElement(Pt,{...e},Z.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return Z.createElement(Pt,{...e},Z.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return Z.createElement("div",{className:"Toastify__spinner"})}};function cA(e){const[,t]=Z.useReducer(g=>g+1,0),[n,r]=Z.useState([]),o=Z.useRef(null),i=Z.useRef(new Map).current,a=g=>n.indexOf(g)!==-1,A=Z.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:a,getToast:g=>i.get(g)}).current;function c(g){let{containerId:f}=g;const{limit:y}=A.props;!y||f&&A.containerId!==f||(A.count-=A.queue.length,A.queue=[])}function d(g){r(f=>g==null?[]:f.filter(y=>y!==g))}function s(){const{toastContent:g,toastProps:f,staleId:y}=A.queue.shift();q(g,f,y)}function m(g,f){let{delay:y,staleId:I,...K}=f;if(!Yn(g)||function(ne){return!o.current||A.props.enableMultiContainer&&ne.containerId!==A.props.containerId||i.has(ne.toastId)&&ne.updateId==null}(K))return;const{toastId:k,updateId:D,data:M}=K,{props:C}=A,U=()=>d(k),ee=D==null;ee&&A.count++;const Q={...C,style:C.toastStyle,key:A.toastKey++,...Object.fromEntries(Object.entries(K).filter(ne=>{let[X,W]=ne;return W!=null})),toastId:k,updateId:D,data:M,closeToast:U,isIn:!1,className:Qt(K.className||C.toastClassName),bodyClassName:Qt(K.bodyClassName||C.bodyClassName),progressClassName:Qt(K.progressClassName||C.progressClassName),autoClose:!K.isLoading&&(Ae=K.autoClose,ae=C.autoClose,Ae===!1||Ct(Ae)&&Ae>0?Ae:ae),deleteToast(){const ne=go(i.get(k),"removed");i.delete(k),xe.emit(4,ne);const X=A.queue.length;if(A.count=k==null?A.count-A.displayedToast:A.count-1,A.count<0&&(A.count=0),X>0){const W=k==null?A.props.limit:1;if(X===1||W===1)A.displayedToast++,s();else{const L=W>X?X:W;A.displayedToast=L;for(let J=0;J<L;J++)s()}}else t()}};var Ae,ae;Q.iconOut=function(ne){let{theme:X,type:W,isLoading:L,icon:J}=ne,p=null;const x={theme:X,type:W};return J===!1||(ve(J)?p=J(x):Z.isValidElement(J)?p=Z.cloneElement(J,x):Pe(J)||Ct(J)?p=J:L?p=jn.spinner():(G=>G in jn)(W)&&(p=jn[W](x))),p}(Q),ve(K.onOpen)&&(Q.onOpen=K.onOpen),ve(K.onClose)&&(Q.onClose=K.onClose),Q.closeButton=C.closeButton,K.closeButton===!1||Yn(K.closeButton)?Q.closeButton=K.closeButton:K.closeButton===!0&&(Q.closeButton=!Yn(C.closeButton)||C.closeButton);let te=g;Z.isValidElement(g)&&!Pe(g.type)?te=Z.cloneElement(g,{closeToast:U,toastProps:Q,data:M}):ve(g)&&(te=g({closeToast:U,toastProps:Q,data:M})),C.limit&&C.limit>0&&A.count>C.limit&&ee?A.queue.push({toastContent:te,toastProps:Q,staleId:I}):Ct(y)?setTimeout(()=>{q(te,Q,I)},y):q(te,Q,I)}function q(g,f,y){const{toastId:I}=f;y&&i.delete(y);const K={content:g,props:f};i.set(I,K),r(k=>[...k,I].filter(D=>D!==y)),xe.emit(4,go(K,K.props.updateId==null?"added":"updated"))}return Z.useEffect(()=>(A.containerId=e.containerId,xe.cancelEmit(3).on(0,m).on(1,g=>o.current&&d(g)).on(5,c).emit(2,A),()=>{i.clear(),xe.emit(3,A)}),[]),Z.useEffect(()=>{A.props=e,A.isToastActive=a,A.displayedToast=n.length}),{getToastToRender:function(g){const f=new Map,y=Array.from(i.values());return e.newestOnTop&&y.reverse(),y.forEach(I=>{const{position:K}=I.props;f.has(K)||f.set(K,[]),f.get(K).push(I)}),Array.from(f,I=>g(I[0],I[1]))},containerRef:o,isToastActive:a}}function yo(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function vo(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function dA(e){const[t,n]=Z.useState(!1),[r,o]=Z.useState(!1),i=Z.useRef(null),a=Z.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,A=Z.useRef(e),{autoClose:c,pauseOnHover:d,closeToast:s,onClick:m,closeOnClick:q}=e;function g(M){if(e.draggable){M.nativeEvent.type==="touchstart"&&M.nativeEvent.preventDefault(),a.didMove=!1,document.addEventListener("mousemove",K),document.addEventListener("mouseup",k),document.addEventListener("touchmove",K),document.addEventListener("touchend",k);const C=i.current;a.canCloseOnClick=!0,a.canDrag=!0,a.boundingRect=C.getBoundingClientRect(),C.style.transition="",a.x=yo(M.nativeEvent),a.y=vo(M.nativeEvent),e.draggableDirection==="x"?(a.start=a.x,a.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(a.start=a.y,a.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function f(M){if(a.boundingRect){const{top:C,bottom:U,left:ee,right:Q}=a.boundingRect;M.nativeEvent.type!=="touchend"&&e.pauseOnHover&&a.x>=ee&&a.x<=Q&&a.y>=C&&a.y<=U?I():y()}}function y(){n(!0)}function I(){n(!1)}function K(M){const C=i.current;a.canDrag&&C&&(a.didMove=!0,t&&I(),a.x=yo(M),a.y=vo(M),a.delta=e.draggableDirection==="x"?a.x-a.start:a.y-a.start,a.start!==a.x&&(a.canCloseOnClick=!1),C.style.transform=`translate${e.draggableDirection}(${a.delta}px)`,C.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function k(){document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",k),document.removeEventListener("touchmove",K),document.removeEventListener("touchend",k);const M=i.current;if(a.canDrag&&a.didMove&&M){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),void e.closeToast();M.style.transition="transform 0.2s, opacity 0.2s",M.style.transform=`translate${e.draggableDirection}(0)`,M.style.opacity="1"}}Z.useEffect(()=>{A.current=e}),Z.useEffect(()=>(i.current&&i.current.addEventListener("d",y,{once:!0}),ve(e.onOpen)&&e.onOpen(Z.isValidElement(e.children)&&e.children.props),()=>{const M=A.current;ve(M.onClose)&&M.onClose(Z.isValidElement(M.children)&&M.children.props)}),[]),Z.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||I(),window.addEventListener("focus",y),window.addEventListener("blur",I)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",I))}),[e.pauseOnFocusLoss]);const D={onMouseDown:g,onTouchStart:g,onMouseUp:f,onTouchEnd:f};return c&&d&&(D.onMouseEnter=I,D.onMouseLeave=y),q&&(D.onClick=M=>{m&&m(M),a.canCloseOnClick&&s()}),{playToast:y,pauseToast:I,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:D}}function bo(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return Z.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:o=>{o.stopPropagation(),t(o)},"aria-label":r},Z.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Z.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function mA(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:A,controlledProgress:c,progress:d,rtl:s,isIn:m,theme:q}=e;const g=i||c&&d===0,f={...A,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:g?0:1};c&&(f.transform=`scaleX(${d})`);const y=Xe("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${q}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":s}),I=ve(a)?a({rtl:s,type:o,defaultClassName:y}):Xe(y,a);return Z.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:I,style:f,[c&&d>=1?"onTransitionEnd":"onAnimationEnd"]:c&&d<1?null:()=>{m&&r()}})}const pA=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o}=dA(e),{closeButton:i,children:a,autoClose:A,onClick:c,type:d,hideProgressBar:s,closeToast:m,transition:q,position:g,className:f,style:y,bodyClassName:I,bodyStyle:K,progressClassName:k,progressStyle:D,updateId:M,role:C,progress:U,rtl:ee,toastId:Q,deleteToast:Ae,isIn:ae,isLoading:te,iconOut:ne,closeOnClick:X,theme:W}=e,L=Xe("Toastify__toast",`Toastify__toast-theme--${W}`,`Toastify__toast--${d}`,{"Toastify__toast--rtl":ee},{"Toastify__toast--close-on-click":X}),J=ve(f)?f({rtl:ee,position:g,type:d,defaultClassName:L}):Xe(L,f),p=!!U||!A,x={closeToast:m,type:d,theme:W};let G=null;return i===!1||(G=ve(i)?i(x):Z.isValidElement(i)?Z.cloneElement(i,x):bo(x)),Z.createElement(q,{isIn:ae,done:Ae,position:g,preventExitTransition:n,nodeRef:r},Z.createElement("div",{id:Q,onClick:c,className:J,...o,style:y,ref:r},Z.createElement("div",{...ae&&{role:C},className:ve(I)?I({type:d}):Xe("Toastify__toast-body",I),style:K},ne!=null&&Z.createElement("div",{className:Xe("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!te})},ne),Z.createElement("div",null,a)),G,Z.createElement(mA,{...M&&!p?{key:`pb-${M}`}:{},rtl:ee,theme:W,delay:A,isRunning:t,isIn:ae,closeToast:m,hide:s,type:d,style:D,className:k,controlledProgress:p,progress:U||0})))},Bt=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},fA=Vt(Bt("bounce",!0));Vt(Bt("slide",!0)),Vt(Bt("zoom")),Vt(Bt("flip"));const Jn=Z.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:o}=cA(e),{className:i,style:a,rtl:A,containerId:c}=e;function d(s){const m=Xe("Toastify__toast-container",`Toastify__toast-container--${s}`,{"Toastify__toast-container--rtl":A});return ve(i)?i({position:s,rtl:A,defaultClassName:m}):Xe(m,Qt(i))}return Z.useEffect(()=>{t&&(t.current=r.current)},[]),Z.createElement("div",{ref:r,className:"Toastify",id:c},n((s,m)=>{const q=m.length?{...a}:{...a,pointerEvents:"none"};return Z.createElement("div",{className:d(s),style:q,key:`container-${s}`},m.map((g,f)=>{let{content:y,props:I}=g;return Z.createElement(pA,{...I,isIn:o(I.toastId),style:{...I.style,"--nth":f+1,"--len":m.length},key:`toast-${I.key}`},y)}))}))});Jn.displayName="ToastContainer",Jn.defaultProps={position:"top-right",transition:fA,autoClose:5e3,closeButton:bo,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let Nn,Be=new Map,Zt=[],hA=1;function Co(){return""+hA++}function qA(e){return e&&(Pe(e.toastId)||Ct(e.toastId))?e.toastId:Co()}function It(e,t){return Be.size>0?xe.emit(0,e,t):Zt.push({content:e,options:t}),t.toastId}function Ut(e,t){return{...t,type:t&&t.type||e,toastId:qA(t)}}function Ft(e){return(t,n)=>It(t,Ut(e,n))}function le(e,t){return It(e,Ut("default",t))}le.loading=(e,t)=>It(e,Ut("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),le.promise=function(e,t,n){let r,{pending:o,error:i,success:a}=t;o&&(r=Pe(o)?le.loading(o,n):le.loading(o.render,{...n,...o}));const A={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(s,m,q)=>{if(m==null)return void le.dismiss(r);const g={type:s,...A,...n,data:q},f=Pe(m)?{render:m}:m;return r?le.update(r,{...g,...f}):le(f.render,{...g,...f}),q},d=ve(e)?e():e;return d.then(s=>c("success",a,s)).catch(s=>c("error",i,s)),d},le.success=Ft("success"),le.info=Ft("info"),le.error=Ft("error"),le.warning=Ft("warning"),le.warn=le.warning,le.dark=(e,t)=>It(e,Ut("default",{theme:"dark",...t})),le.dismiss=e=>{Be.size>0?xe.emit(1,e):Zt=Zt.filter(t=>e!=null&&t.options.toastId!==e)},le.clearWaitingQueue=function(e){return e===void 0&&(e={}),xe.emit(5,e)},le.isActive=e=>{let t=!1;return Be.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},le.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=function(r,o){let{containerId:i}=o;const a=Be.get(i||Nn);return a&&a.getToast(r)}(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:Co()};i.toastId!==e&&(i.staleId=e);const a=i.render||o;delete i.render,It(a,i)}},0)},le.done=e=>{le.update(e,{progress:1})},le.onChange=e=>(xe.on(4,e),()=>{xe.off(4,e)}),le.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},le.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},xe.on(2,e=>{Nn=e.containerId||e,Be.set(Nn,e),Zt.forEach(t=>{xe.emit(0,t.content,t.options)}),Zt=[]}).on(3,e=>{Be.delete(e.containerId||e),Be.size===0&&xe.off(0).off(1).off(5)});function at(e){le.success(e,{position:"top-center",autoClose:650,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,theme:"light"})}let Dn="";const gA=e=>{let t=Dn+"/"+e,n=e;fetch(t).then(r=>r.blob()).then(r=>{const o=window.URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=n.split("/").reduce((a,A)=>A,""),document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(o),at("Download successfully")}).catch(r=>{console.error("File error:",r)})},yA=(e,t)=>{let n=Dn+"/"+e;Xt(n)?at("Link Copied"):t(n)};async function _t(e,t,n,r,o,i="download",a,A=!1){return new Promise(async(c,d)=>{let s=m=>{i==="download"?gA(m):i==="copy"&&yA(m,a)};e==="Playable"?(r&&await ho(t,{iosLink:r==null?void 0:r.iosUrl,androidLink:r==null?void 0:r.googleUrl},o),sA(o,t,n,A).then(async m=>{let{url:q}=m;s(q),c(q)}).catch(m=>{let q=m.response.data.error.msg;d({message:q})})):e==="Flex"?(r&&await fo({_id:t,iosLink:r==null?void 0:r.iosUrl,androidLink:r==null?void 0:r.googleUrl},o),aA({_id:t,network:n},o).then(async m=>{if(m.message){d(m);return}let{url:q}=m;s(q),c(q)}).catch(m=>{let q=m.response.data.error.msg;d({message:q})})):e==="Import"?AA(o,t,n).then(m=>{let q=m.url;s(q),c(q)}).catch(m=>{let q=m.response.data.error.msg;d({message:q})}):e==="Ready"&&lA(o,t,n).then(m=>{let q=m.url;s(q),c(q)}).catch(m=>{let q=m.response.data.error.msg;d({message:q})})})}function vA(e){Dn=e}const bA=({versionId:e,typeOfProduct:t,api:n,fetchFileUrl:r,copyLinkUrl:o,setSafariCopyLink:i})=>{const[a,A]=Z.useState(!1),c=async()=>{A(!0),_t(t,e,"default",null,n,null,i).then(d=>{A(!1);let s;t==="Flex"?s=`${o}/preview?versionId=${e}`:t==="Import"?s=`${o}/preview?versionId=${e}_`:s=`${o}/preview?versionId=${e}_`,Xt(s)?at("Link copied"):i(s),A(!1)}).catch(d=>{A(!1)})};return u.jsxs("div",{style:{display:"flex",height:"125px",width:"100%",borderRadius:"10px",backgroundColor:"#000000",padding:"10px"},children:[u.jsx("div",{style:{marginRight:"0.75rem",width:"50%"},children:u.jsx(Ti,{bgColor:"#0F0F1E",fgColor:"#ffffff",style:{height:"auto",maxWidth:"100%",width:"100%"},value:`${o}/preview?versionId=${e}`+(t==="Flex"?"":"_")})}),u.jsxs("div",{children:[u.jsx("div",{style:{marginBottom:"0.25rem",fontSize:"0.875rem",fontWeight:"bold",color:"white"},children:"Mobile testing"}),u.jsx("div",{style:{marginBottom:"1rem",fontSize:"0.75rem",color:"gray"},children:"Scan QR Code to test in any browser"}),u.jsxs("div",{style:{display:"flex",cursor:"pointer",borderRadius:"0.375rem",backgroundColor:"#00A3FF1A",color:"secondary-blue"},children:[u.jsx(Mr,{style:{marginRight:"0.25rem",height:"1.5rem",width:"1.5rem",stroke:"secondary-blue",color:"white"}}),a?u.jsx("div",{style:{height:"24px",display:"flex",alignItems:"center",margin:"auto"},children:u.jsx("img",{style:{height:"90%"},src:rt,alt:"loading"})}):u.jsx("button",{style:{fontSize:"1rem",color:"white",background:"rgba(0, 163, 255, 0)"},onClick:c,children:"Copy Link"})]})]})]})},CA=({versionName:e,versionId:t,typeOfProduct:n,api:r,iframeUrl:o,fetchFileUrl:i,copyLinkUrl:a,setSafariCopyLink:A})=>{const[c,d]=Z.useState(window.innerWidth);Z.useEffect(()=>{const m=()=>{d(window.innerWidth)};return window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[]);const s=(e==null?void 0:e.length)>25?e.slice(0,25)+"...":e;return u.jsxs("div",{style:{display:"flex",width:"300px",flexDirection:"column",justifyContent:"space-between",padding:"5px",height:c>1440?"680px":"620px",borderRadius:"0px 0px 0px 16px",marginTop:"20px"},children:[u.jsx(Ai,{iframeUrl:o}),u.jsx(si,{name:s}),u.jsx(bA,{versionId:t,typeOfProduct:n,api:r,fetchFileUrl:i,copyLinkUrl:a,setSafariCopyLink:A})]})};var me=(e=>(e.Flex="#7101FF",e.Playable="#F9830B",e.Import="#00a3ff",e.Ready="#0060A5",e))(me||{});const ZA=({typeOfProduct:e})=>u.jsxs("div",{style:{fontSize:"2xl",fontWeight:"bold"},children:[u.jsx("span",{style:{color:me[e]},children:"Select a Network"}),u.jsx("span",{style:{whiteSpace:"pre"},children:" From List"})]});async function IA(e,t){return(await fe.post(t+"/buyRequest",{requestType:e})).data}const wA=()=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsxs("g",{"clip-path":"url(#clip0_518_12094)",children:[u.jsx("path",{d:"M4.50977 11.99L19.4898 11.99",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),u.jsx("path",{d:"M13.5068 17.977L19.4828 12L13.5068 6.02299",stroke:"#7101FF","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})]}),u.jsx("defs",{children:u.jsx("clipPath",{id:"clip0_518_12094",children:u.jsx("rect",{width:"24",height:"24",fill:"white",transform:"translate(0 24) rotate(-90)"})})})]}),xA=({creditDownload:e,api:t})=>u.jsxs(u.Fragment,{children:[u.jsx("div",{style:{marginTop:"0.5rem",paddingLeft:"1.5rem",paddingRight:"1.5rem",fontWeight:100},children:"If you continue to export, you will spend 1 credit."}),u.jsxs("div",{style:{display:"flex",alignItems:"center",width:"100%",paddingLeft:"1.5rem",paddingRight:"1.5rem",paddingTop:"0.25rem",fontSize:"12px",fontWeight:100},children:["You have"," ",u.jsx("span",{style:{paddingLeft:"0.25rem",paddingRight:"0.25rem",fontWeight:"bold",color:"#yourColorHere"},children:(e==null?void 0:e.downloadLimit)-(e==null?void 0:e.downloadLimitUsed)<0?0:(e==null?void 0:e.downloadLimit)-(e==null?void 0:e.downloadLimitUsed)})," ","credits remaining.",u.jsxs("button",{style:{marginLeft:"0.5rem",display:"flex",alignItems:"center",fontSize:"12px",fontWeight:"bold",textDecoration:"underline",color:"#yourColorHere"},onClick:()=>IA("Flex Credit",t).then(n=>at("You will be contacted regarding your request.")),children:["Get more",u.jsx(wA,{})]})]})]}),KA=({typeOfProduct:e,fileSize:t,urls:n,handleIosChange:r,handleGoogleChange:o,disabled:i,api:a,creditDownload:A,user:c,isTest:d,setIsTest:s})=>{const m=g=>{r(g.target.value)},q=g=>{o(g.target.value)};return u.jsxs(u.Fragment,{children:[t&&u.jsxs("span",{style:{fontSize:"16px",fontWeight:"bold"},children:["File size: ",parseFloat(t).toFixed(2)," mb"]}),e!=="Import"&&u.jsxs("div",{style:{display:"flex",width:"100%",flexDirection:"column"},children:[u.jsxs("div",{style:{display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"200"},children:[u.jsx("span",{style:{width:"5rem",fontWeight:"bold"},children:"App Store:"}),u.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"70%",alignItems:"center",borderRadius:"0.375rem",border:n.iosUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:me[e]},type:"text",value:n.iosUrl,onChange:m,placeholder:"Ios Url",disabled:i})]}),u.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[u.jsxs("span",{style:{width:"5rem",fontWeight:"bold"},children:["Google Play:"," "]}),u.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"70%",alignItems:"center",borderRadius:"0.375rem",border:n.googleUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:me[e]},type:"text",value:n.googleUrl,onChange:q,placeholder:"Google Url",disabled:i})]}),c.customer=="playableFactoryInternal"&&e==="Playable"&&u.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",height:"2rem",width:"100%",alignItems:"center",fontSize:"12px",fontWeight:"100"},children:[u.jsxs("span",{style:{width:"5rem",fontWeight:"bold"},children:["Enable Test:"," "]}),u.jsx("input",{style:{marginLeft:"1.25rem",display:"flex",height:"100%",width:"20px",alignItems:"center",borderRadius:"0.375rem",border:n.googleUrl?"1px solid lightgray":"1px solid red",paddingLeft:"0.5rem",color:"#000000",borderColor:me[e]},type:"checkbox",checked:d,onChange:()=>{s(!d)},placeholder:"Google Url",disabled:i})]}),(A==null?void 0:A.willSpendCredit)&&u.jsx(xA,{creditDownload:A,api:a})]})]})},WA=({typeOfProduct:e,title:t})=>u.jsx("div",{style:{fontSize:"1.5rem",fontWeight:"bold",paddingTop:"20px"},children:u.jsx("span",{style:{color:me[e]},children:t})}),MA=({typeOfProduct:e,fileSize:t,urls:n,title:r,handleIosChange:o,handleGoogleChange:i,disabled:a,creditDownload:A,api:c,user:d,isTest:s,setIsTest:m})=>u.jsxs("div",{style:{display:"flex",flexDirection:"column",width:"100%",justifyContent:"space-between",alignItems:"flex-start",borderBottom:"1px solid #D1D5DB",paddingLeft:"1.25rem",paddingRight:"1.25rem",gap:"1rem"},children:[u.jsx(WA,{typeOfProduct:e,title:r}),u.jsx(KA,{typeOfProduct:e,fileSize:t,urls:n,handleIosChange:o,handleGoogleChange:i,disabled:a,creditDownload:A,api:c,user:d,isTest:s,setIsTest:m}),u.jsx(ZA,{typeOfProduct:e})]}),Zo=({fill:e,stroke:t,className:n,style:r})=>u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:e,stroke:t,strokeWidth:n,style:r,className:"w-6 h-6",viewBox:"0 0 24 24",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.563.563 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.563.563 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5z"})}),Io=({children:e,className:t,onClickDonwload:n,downloading:r,disabled:o})=>u.jsx("button",{onClick:n,className:t,style:{display:"flex",height:"40px",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",border:"1px solid lightgray",padding:"0.25rem",fontSize:"0.875rem",width:200,backgroundColor:"#FFFFFF"},disabled:r||o,children:e}),SA=({checked:e,typeOfProduct:t,id:n})=>{const[r,o]=Z.useState(e);Z.useEffect(()=>{o(e)},[e]);const i=()=>{o(!r)};return u.jsx("div",{style:{display:"inline-flex",alignItems:"center"},children:u.jsxs("label",{onClick:i,style:{position:"relative",display:"flex",cursor:"pointer",alignItems:"center"},htmlFor:n,children:[u.jsx("input",{type:"checkbox",style:{position:"relative",height:"20px",width:"20px",cursor:"pointer",appearance:"none",borderRadius:"0.25rem",transition:"all ease-in-out",border:"1px solid lightgray",opacity:1},id:n,checked:r,onChange:i}),u.jsxs("div",{style:{pointerEvents:"none",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:"white",opacity:r?1:0,transition:"opacity ease-in-out"},children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{height:"14px",width:"14px"},viewBox:"0 0 20 20",fill:me[t],stroke:me[t],strokeWidth:"1",children:u.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})," "]})]})})},kl="",LA=({typeOfProduct:e})=>u.jsx("div",{style:{backgroundColor:"transparent",display:"flex",alignItems:"center",flexDirection:"column"},children:u.jsxs("div",{style:{position:"relative",width:"64px",height:"16px",marginTop:"8px"},children:[u.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:me[e]}}),u.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:me[e]}}),u.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:me[e]}}),u.jsx("div",{style:{position:"absolute",top:0,width:"8px",height:"8px",borderRadius:"50%",backgroundColor:me[e]}})]})}),Rn=({isNetworksLoading:e=!1})=>u.jsx("div",{style:{display:"flex",height:"100%",width:"90px",alignItems:"center",justifyContent:"center"},children:u.jsx("img",{width:e?"100px":"25px",height:e?"100px":"25px",src:rt,alt:"pf-logo-gif"})}),OA=({title:e,titleId:t,...n})=>u.jsxs("svg",{viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em","aria-labelledby":t,...n,children:[e?u.jsx("title",{id:t,children:e}):null,u.jsx("path",{stroke:"currentColor",d:"m15.985 11.111-3.556 3.556-3.556-3.556M12.429 4v10.667M20.429 16.444A3.556 3.556 0 0 1 16.873 20H7.985a3.556 3.556 0 0 1-3.556-3.556",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"})]}),EA=({onClose:e,iosLink:t,googleLink:n,buttonType:r,handleCopyLink:o,download:i})=>{let a="";return!t&&!n?a="Both links are empty. Are you sure you want to continue?":t?n||(a="Google link is empty. Are you sure you want to continue?"):a="iOS link is empty. Are you sure you want to continue?",u.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"120%",width:"130%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},children:[u.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),u.jsxs("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",maxWidth:"350px",borderRadius:"0.375rem",backgroundColor:"white",padding:"1rem",pointerEvents:"auto"},children:[u.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:a}),u.jsxs("div",{style:{display:"flex",gap:"5px"},children:[u.jsx("button",{onClick:()=>{e(!1)},style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid #666666",padding:"0.5rem",fontWeight:"bold",transition:"all 0.15s ease-linear"},children:"No"}),u.jsx("button",{onClick:async A=>{r==="download"?await i():r==="copyLink"&&await o(),e()},style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid red",backgroundColor:"darkorange",padding:"0.5rem",fontWeight:"bold",color:"white",transition:"all 0.15s ease-linear"},children:"Yes"})]})]})]})},wo=({onClose:e,handleCopyLink:t,download:n,creditConfirmType:r,getDownloadCount:o})=>u.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"120%",width:"130%",alignItems:"center",justifyContent:"center",backgroundColor:"#00000080"},children:[u.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%"}}),u.jsxs("div",{style:{position:"absolute",zIndex:50,display:"flex",height:"max-content",width:350,flexDirection:"column",gap:"5px",borderRadius:"8px",backgroundColor:"white",padding:"20px"},children:[u.jsx("h1",{style:{textAlign:"center",fontSize:"18px",lineHeight:"24px"},children:"You are going to spend 1 credit for this download, do you want to continue?"}),u.jsxs("div",{style:{display:"flex",gap:"5px"},children:[u.jsx("button",{onClick:e,style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"dark-50",padding:"2px",fontWeight:"bold"},children:"No"}),u.jsx("button",{style:{flex:1,cursor:"pointer",borderRadius:"4px",borderWidth:"1px",borderColor:"#F9830B",backgroundColor:"#F9830B",padding:"2px",fontWeight:"bold",color:"white"},onClick:async i=>{i.preventDefault(),i.stopPropagation(),r==="download"?(await n(),await o()):r==="copy"&&(await t(),await o()),e()},children:"Yes"})]})]})]}),kA=({onClose:e,handleDownload:t,handleDownloadMolocoTest:n,downloadingMoloco:r,downloadingMolocoTest:o})=>u.jsxs("div",{style:{position:"fixed",top:0,left:0,zIndex:50,display:"flex",height:"120%",width:"130%",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.2)"},children:[u.jsx("div",{onClick:e,style:{position:"absolute",zIndex:30,height:"100%",width:"100%",pointerEvents:"none"}}),u.jsx("div",{style:{position:"absolute",zIndex:50,display:"flex",flexDirection:"column",gap:"5px",minWidth:"500px",borderRadius:"0.375rem",backgroundColor:"white",padding:"1rem",pointerEvents:"auto"},children:u.jsxs("div",{style:{display:"flex",gap:"5px"},children:[r?u.jsx("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear"},children:u.jsx("img",{width:"25px",height:"25px",src:rt,alt:"pf-logo-gif"})}):u.jsx("button",{onClick:t,style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear"},children:"Download"}),o?u.jsx("div",{style:{flex:1,display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear"},children:u.jsx("img",{width:"25px",height:"25px",src:rt,alt:"pf-logo-gif"})}):u.jsx("button",{onClick:n,style:{flex:1,cursor:"pointer",borderRadius:"0.375rem",border:"1px solid darkorange",backgroundColor:"darkorange",color:"white",transition:"all 0.15s ease-linear"},children:"Download Moloco Test"})]})})]});async function zA(e,t,n,r){return(await fe.post(e+"/createMolocoTestPage",{_id:t,network:n,typeOfProduct:r})).data}const YA=["adcolony","ironsource","applovin","unity","mobvista","criteo","kayzen","vungle","moloco","inmobi"],jA=({id:e,imageUrl:t,handleCardClick:n,selected:r,name:o,networkVersionSize:i,fileSizeLoading:a,showCheckBox:A,typeOfProduct:c,versionId:d,api:s,handleDownloadError:m,fetchFileUrl:q,urls:g,game:f,setIsConfirmActive:y,creditDownload:I,getDownloadCount:K,disabled:k,user:D,setSafariCopyLink:M,isTest:C})=>{const[U,ee]=Z.useState(!1),[Q,Ae]=Z.useState(""),[ae,te]=Z.useState(!1),[ne,X]=Z.useState(!1),[W,L]=Z.useState(!1),[J,p]=Z.useState("download"),[x,G]=Z.useState(!1),[v,h]=Z.useState(!1);let z={aarki:"html,copy",adcolony:"copy,html",adjoe:"copy,html",applovin:"copy,html",appreciate:"zip",chartboost:"copy,html",criteo:"zip",crossinstall:"copy,html",default:"copy",fb:"zip",fyber:"copy,html",google:"zip",google360:"zip",ironsource:"copy,html",kayzen:"apikey",kaden:"html",kidoz:"html",lifestreet:"copy,html",liftoff:"copy,zip",mobvista:"html",moloco:"html,molocotest",molocoV2:"html,molocotest",nucleo:"copy,html",oceanengine:"copy,zip",pointblank:"html",smadex:"zip",snapchat:"zip",tapjoy:"copy,html",tencent:"zip",toutiao:"copy,zip",toutiao_cn:"copy,zip",unity:"copy,html",vungle:"html",web:"copy,html",yandex:"zip",zucks:"copy,html",luna:"zip",inmobi:"copy,html,",nend:"html",adikteev:"html",jammp:"copy,html"};const Y=()=>{n(e)},j=async(E,R)=>(ee(!0),new Promise((V,B)=>{_t(c,d,E,g,s,R,M,C).then(ue=>{ee(!1),V(ue)}).catch(ue=>{ee(!1),m(ue.message,ue),B(ue)})})),P=async()=>{G(!0),_t(c,d,o,g,s,"download",M).then(E=>{G(!1),L(!1)}).catch(E=>{m(E.message,E)})},N=async()=>{h(!0);const E=await zA(s,d,o,c);let R=`${q}/${E==null?void 0:E.url}`;Xt(R)?(at("Link Copied"),h(!1)):M(R)};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column",gap:"20px",padding:"16px",borderColor:r?me[c]:"lightgray",borderWidth:"1px",borderStyle:"solid",backgroundColor:"white",width:"100%",height:"175px",borderRadius:"16px",cursor:"pointer"},className:"border-hover-"+c,onClick:Y,children:[u.jsxs("div",{style:{marginTop:"40px",display:"flex",justifyContent:"center"},children:[u.jsxs("div",{style:{position:"absolute",right:"0",top:"0",padding:"8px"},children:[YA.includes(o)&&c!=="Import"&&u.jsx(Zo,{fill:me[c],stroke:me[c],className:"mb-1 inline-block w-6",style:{marginBottom:"0.25rem",display:"inline-block",width:"1.5rem"}}),u.jsx("div",{children:i&&i.map(E=>E.network).includes(o)?a?u.jsx("div",{style:{position:"absolute",right:"0",top:"0.5rem",padding:"0.5rem",height:"1.5rem",display:"flex",justifyContent:"center",alignItems:"center",marginRight:"2rem"},children:u.jsx(LA,{typeOfProduct:c})}):i.map(E=>u.jsx("div",{style:{position:"absolute",right:"0",top:"0.5rem",padding:"0.5rem",marginRight:"2rem",fontSize:"1rem",height:"1.5rem",display:"flex",justifyContent:"center",alignItems:"center"},children:E.network===o?E.size.toString().slice(0,5)+"Mb":""},E.network)):null})]}),u.jsx("div",{style:{position:"absolute",top:"0",left:"0",padding:"0.5rem"},children:(c==="Playable"||c==="Ready"||c==="Flex")&&A&&u.jsx(SA,{checked:r,typeOfProduct:c,id:e})}),u.jsx("img",{onClick:Y,style:{width:"30rem",height:"50px",objectFit:"contain"},src:t})]}),u.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem"},children:[u.jsxs(Io,{className:"w-2/3 border-hover-"+c,downloading:U,onClickDonwload:async E=>{if(E.stopPropagation(),(o==="moloco"||o==="molocoV2")&&D.customer==="playableFactoryInternal"){L(!0);return}else{Ae("download");const R=g.iosUrl,V=g.googleUrl;I&&I.willSpendCredit?(y(!0),p("download"),te(!0)):c!=="Import"&&(!R||!V)?(y(!0),X(!0)):(X(!1),te(!1),await j(o,"download"))}},children:[!U&&u.jsxs(u.Fragment,{children:[u.jsx(OA,{style:{marginRight:"0.5rem",height:"1.5rem",width:"1.5rem",stroke:"dark-full"}}),"Download"]}),U&&u.jsx(Rn,{})]}),z[o].includes("copy")&&u.jsx(Io,{className:"w-1/3 border-hover-"+c,onClickDonwload:async E=>{E.stopPropagation(),Ae("copyLink");const R=g.iosUrl,V=g.googleUrl;I&&(I!=null&&I.willSpendCredit)?(p("copy"),y(!0),te(!0)):c!=="Import"&&(!R||!V)?(y(!0),X(!0)):(te(!1),X(!1),await j(o,"copy"))},disabled:k,children:u.jsx(Mr,{className:"h-6 w-6 stroke-dark-full"})})]})]}),ae&&u.jsx(wo,{creditConfirmType:J,handleCopyLink:async()=>{X(!1),y(!1),await j(o,"copy")},download:async()=>{X(!1),y(!1),await j(o,"download")},onClose:()=>{te(!1),y(!1)},getDownloadCount:K}),ne&&u.jsx(EA,{onClose:()=>{X(!1),y(!1)},iosLink:g.iosUrl,googleLink:g.googleUrl,buttonType:Q,handleCopyLink:async()=>{X(!1),y(!1),await j(o,"copy")},download:async()=>{X(!1),y(!1),await j(o,"download")}}),W&&D.customer==="playableFactoryInternal"&&u.jsx(kA,{onClose:()=>{L(!1)},handleDownload:P,handleDownloadMolocoTest:N,downloadingMoloco:x,donwloadintMolocoTest:v})]})},Gn=[{id:"1",name:"unity",imageSrc:"https://gearbox.playablefactory.com/unity.png"},{id:"2",name:"applovin",imageSrc:"https://gearbox.playablefactory.com/applovin.png"},{id:"3",name:"ironsource",imageSrc:"https://gearbox.playablefactory.com/ironsource.png"},{id:"4",name:"vungle",imageSrc:"https://gearbox.playablefactory.com/vungle.png"},{id:"5",name:"mobvista",imageSrc:"https://gearbox.playablefactory.com/mobvista.png"},{id:"6",name:"fb",imageSrc:"https://gearbox.playablefactory.com/fb.png"},{id:"7",name:"toutiao",imageSrc:"https://gearbox.playablefactory.com/toutiao.png"},{id:"8",name:"toutiao_cn",imageSrc:"https://gearbox.playablefactory.com/toutiao_cn.png"},{id:"9",name:"adcolony",imageSrc:"https://gearbox.playablefactory.com/adcolony.png"},{id:"10",name:"criteo",imageSrc:"https://gearbox.playablefactory.com/criteo.png"},{id:"11",name:"chartboost",imageSrc:"https://gearbox.playablefactory.com/chartboost.png"},{id:"12",name:"kayzen",imageSrc:"https://gearbox.playablefactory.com/kayzen.png"},{id:"13",name:"crossinstall",imageSrc:"https://gearbox.playablefactory.com/crossinstall.png"},{id:"14",name:"default",imageSrc:"https://gearbox.playablefactory.com/default.png"},{id:"15",name:"fyber",imageSrc:"https://gearbox.playablefactory.com/fyber.png"},{id:"16",name:"appreciate",imageSrc:"https://gearbox.playablefactory.com/appreciate.png"},{id:"17",name:"google360",imageSrc:"https://gearbox.playablefactory.com/google360.png"},{id:"18",name:"kaden",imageSrc:"https://gearbox.playablefactory.com/kaden.png"},{id:"19",name:"kidoz",imageSrc:"https://gearbox.playablefactory.com/kidoz.png"},{id:"20",name:"lifestreet",imageSrc:"https://gearbox.playablefactory.com/lifestreet.png"},{id:"21",name:"liftoff",imageSrc:"https://gearbox.playablefactory.com/liftoff.png"},{id:"22",name:"moloco",imageSrc:"https://gearbox.playablefactory.com/moloco.png"},{id:"23",name:"nucleo",imageSrc:"https://gearbox.playablefactory.com/nucleo.png"},{id:"24",name:"oceanengine",imageSrc:"https://gearbox.playablefactory.com/oceanengine.png"},{id:"25",name:"pointblank",imageSrc:"https://gearbox.playablefactory.com/pointblank.png"},{id:"26",name:"snapchat",imageSrc:"https://gearbox.playablefactory.com/snapchat.png"},{id:"27",name:"tapjoy",imageSrc:"https://gearbox.playablefactory.com/tapjoy.png"},{id:"28",name:"tencent",imageSrc:"https://gearbox.playablefactory.com/tencent.png"},{id:"31",name:"aarki",imageSrc:"https://gearbox.playablefactory.com/aarki.png"},{id:"32",name:"yandex",imageSrc:"https://gearbox.playablefactory.com/yandex.png"},{id:"33",name:"web",imageSrc:"https://gearbox.playablefactory.com/web.png"},{id:"34",name:"zucks",imageSrc:"https://gearbox.playablefactory.com/zucks.png"},{id:"35",name:"google",imageSrc:"https://gearbox.playablefactory.com/google.png"},{id:"36",name:"inmobi",imageSrc:"https://gearbox.playablefactory.com/inmobi.png"},{id:"38",name:"smadex",imageSrc:"https://gearbox.playablefactory.com/smadex.png"},{id:"39",name:"instantGame",imageSrc:"https://gearbox.playablefactory.com/instantGame.png"},{id:"40",name:"luna",imageSrc:"https://gearbox.playablefactory.com/luna.png"},{id:"41",name:"nend",imageSrc:"https://gearbox.playablefactory.com/nend.png"},{id:"42",name:"jammp",imageSrc:"https://gearbox.playablefactory.com/nend.png"},{id:"43",name:"adjoe",imageSrc:"https://gearbox.playablefactory.com/adjoe.png"},{id:"44",name:"molocoV2",imageSrc:"https://gearbox.playablefactory.com/molocoV2.png"},{id:"45",name:"adikteev",imageSrc:"https://gearbox.playablefactory.com/adikteev.png"}],JA=({typeOfProduct:e})=>u.jsx("div",{style:{flex:1,overflowY:"auto",padding:"0.75rem"},children:u.jsx("div",{style:{display:"flex",justifyContent:"center",textAlign:"center",fontSize:"0.875rem",fontWeight:"bold",height:"1.5rem"},children:e!=="Import"&&u.jsxs(u.Fragment,{children:[u.jsx(Zo,{fill:me[e],stroke:me[e],style:{display:"inline-block",width:"1.5rem"},className:""}),u.jsx("span",{style:{display:"flex",alignItems:"center"},children:"Data tracking functionality is turned on by default for marked network downloads"})]})})}),NA=({children:e,typeOfProduct:t,className:n,onClick:r})=>{const o={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"0.5rem",width:"12rem",height:"2.5rem",backgroundColor:me[t],color:"white",fontSize:"0.875rem",borderRadius:"0.875rem"};return u.jsx("button",{onClick:r,className:n,style:o,children:e})},DA=({networksVersionTotalSize:e,typeOfProduct:t,onClickMultiDownload:n,multiDownloading:r})=>u.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"},children:r?u.jsx("div",{style:{display:"flex",width:"12rem",height:"2.5rem",borderRadius:"0.875rem",alignItems:"center",justifyContent:"center",backgroundColor:me[t]},children:u.jsx(Rn,{})}):u.jsx(NA,{typeOfProduct:t,onClick:n,children:u.jsx("span",{style:{fontSize:"1.25rem",padding:"0.5rem",color:"#fff"},children:"Multi Download"})})});async function RA(e,t,n){return(await fe.post(n+"/createPlayableVersionLinkMulti",{_id:e,networks:t})).data}async function GA(e,t,n){return(await fe.post(n+"/createFlexVersionLinkMulti",{_id:e,networks:t})).data}const TA=({playable:e,creditDownload:t,visible:n,versionId:r,typeOfProduct:o,api:i,user:a,handleDownloadError:A,fetchFileUrl:c,urls:d,game:s,getDownloadCount:m,disabled:q,setSafariCopyLink:g,isTest:f})=>{const[y,I]=Z.useState([]),[K,k]=Z.useState([]),[D,M]=Z.useState(!1),[C,U]=Z.useState(""),[ee,Q]=Z.useState(!1),[Ae,ae]=Z.useState(!1),[te,ne]=Z.useState("download"),[X,W]=Z.useState(!1),L=async x=>{const G=[...y];if(y.includes(x)){const v=G.findIndex(h=>h===x);G.splice(v,1),I(G)}else G.push(x),I([...y,x]);Gn.filter(v=>[...G].includes(v.id)).map(v=>v.name)},J=async()=>{try{const x=Gn.filter(Y=>[...y].includes(Y.id)).map(Y=>Y.name);Q(!0);let G;o==="Flex"?(await fo({_id:r,iosLink:d==null?void 0:d.iosUrl,androidLink:d==null?void 0:d.googleUrl},i),G=await GA(r,x,i)):(await ho(r,{iosLink:d==null?void 0:d.iosUrl,androidLink:d==null?void 0:d.googleUrl},i),G=await RA(r,x,i));const{url:v}=G;let h;const z=c+"/"+v;h=document.createElement("iframe"),h.setAttribute("src",z),h.style.display="none",document.body.appendChild(h),h.click(),Q(!1),at("Multi downloaded completed successfully")}catch(x){Q(!1),A(x.response.data.error.msg,x.response),console.error(x)}},p=async()=>{d.iosUrl,d.googleUrl,t&&t.willSpendCredit?(ae(!0),ne("download"),W(!0)):(W(!1),await J())};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{style:{position:"relative",flex:1,overflowY:Ae?"hidden":"auto",padding:"1.5rem",paddingTop:"0"},children:[u.jsx("div",{style:{display:"grid",gridTemplateColumns:"180px 180px 180px",gap:"1rem",overflowY:"auto",padding:"0.75rem"},children:n&&Gn.filter(x=>{var G;return t&&((G=t==null?void 0:t.networks)==null?void 0:G.length)>0?t==null?void 0:t.networks.includes(x.name):o==="Import"?e==null?void 0:e.networks.filter(v=>v.status==="paid").some(v=>v.name===x.name):e==null?void 0:e.networks.includes(x.name)}).filter(x=>x.name==="voodoo"?a.customer==="customer:20":!0).map(x=>u.jsx(jA,{id:x.id,name:x.name,imageUrl:x.imageSrc,selected:y.includes(x.id),handleCardClick:L,networkVersionSize:K,fileSizeLoading:D,showCheckBox:!0,typeOfProduct:o,versionId:r,api:i,handleDownloadError:A,fetchFileUrl:c,urls:d,game:s,creditDownload:t,setIsConfirmActive:ae,getDownloadCount:m,disabled:q,user:a,setSafariCopyLink:g,isTest:f},x.id))}),u.jsx(JA,{typeOfProduct:o})]}),y.length>1&&(o==="Playable"||o==="Ready"||o==="Flex")&&u.jsx("div",{style:{position:"fixed",bottom:"0",left:"65%",zIndex:20,transform:"translateX(-50%)",display:"flex",flexDirection:"column",paddingTop:"5px"},children:u.jsx(DA,{onClickMultiDownload:p,networksVersionTotalSize:C,typeOfProduct:o,multiDownloading:ee})}),X&&u.jsx(wo,{creditConfirmType:te,handleCopyLink:async()=>{},download:async()=>{W(!1),ae(!1),await J()},onClose:()=>{W(!1),ae(!1)},getDownloadCount:m})]})};async function HA(e,t){return(await fe.post(t+"/findPlayable",{_id:e})).data}async function XA(e,t){return(await fe.post(t+"/getFlexDownloadCount",e)).data}async function QA(e,t){try{return(await fe.post(t+"/findGame",{_id:e})).data}catch{}}async function VA(e,t){return(await fe.post(t+"/getPlayableVersionMarketLink",{_id:e})).data}async function PA(e,t){return(await fe.post(t+"/getFlexData",{_id:e})).data}async function BA(e,t){return(await fe.post(t+"/getImportedPlayable",{id:e})).data}async function UA(e,t){return(await fe.post(t+"/getReadyDownloadCount",e)).data}const FA=["adcolony","ironsource","applovin","unity","mobvista","criteo","kayzen","vungle","moloco","inmobi"],_A=["adcolony","applovin","chartboost","crossinstall","fb","google","ironsource","lifestreet","liftoff","mobvista","nucleo","tapjoy","toutiao","unity","vungle","moloco"],$A=({playableId:e,versionId:t,gameId:n,typeOfProduct:r,visible:o,api:i,user:a,title:A,handleDownloadError:c,fetchFileUrl:d,fileSize:s,setFileSize:m,setSafariCopyLink:q})=>{const[g,f]=Z.useState(null),[y,I]=Z.useState(null),[K,k]=Z.useState(null),[D,M]=Z.useState(!1),[C,U]=Z.useState("Loading..."),[ee,Q]=Z.useState("Loading..."),[Ae,ae]=Z.useState(!0),[te,ne]=Z.useState(window.innerWidth),[X,W]=Z.useState(!1);Z.useEffect(()=>{const h=()=>{ne(window.innerWidth)};return window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[]);const L=async()=>{M(!0);const h=await HA(e,i);return h!=null&&h.networks||(h.networks=FA),f(h),h},J=h=>{U(h)},p=h=>{Q(h)},x=async(h,z)=>{var Y,j;try{let P;if(r==="Playable"||r==="Ready"){const N=await VA(t,i);if(N){U(N.iosLink),Q(N.androidLink),M(!1);return}if(h&&(h.iosUrl||h.googleUrl)){U(h.iosUrl),Q(h.googleUrl),M(!1);return}if(z&&z.html){let E=await fetch(d+"/"+z.html).then(B=>B.text());const R=((Y=E.match(/var\s+iosLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:Y.at(1))||"";U(R);const V=((j=E.match(/var\s+androidLink\s*=\s*['|"](https?[\w\d;,/?:@&=+$\-_.!~*'()#]+)['|"]/))==null?void 0:j.at(1))||"";Q(V),M(!1)}else Q(""),U(""),M(!1)}else if(r==="Flex"){const N=await PA(t,i);if(N.googleUrl||N.iosUrl){Q(N.googleUrl),U(N.iosUrl),M(!1);return}h&&(h.iosUrl||h.googleUrl)?(U(h.iosUrl),Q(h.googleUrl),M(!1)):(Q(""),U(""),M(!1))}}catch(P){c(P.response.data.error.msg)}},G=async()=>{M(!0);let h;r==="Flex"?h=await XA({_id:t},i):r==="Ready"&&(h=await UA({_id:t},i)),h&&(["admin","pm","tester"].includes(a.role)?k({...h,networks:_A}):k(h)),M(!1)},v=async()=>await QA(n,i);return Z.useEffect(()=>{o||(f(null),I(null),k(null),m(null)),o&&(r==="Playable"||r==="Ready"?(L().then(h=>{x(null,h)}),ae(!1)):r==="Flex"?G().then(h=>{ae(!1),v().then(z=>{o&&(x(z,null),ae(!1),I(z))})}):r==="Import"&&BA(t,i).then(h=>{console.log(h),f(h),U(h.iosUrl||""),Q(h.googleUrl||""),M(!1),ae(!1)}))},[n,e,t,o]),u.jsxs("div",{style:{display:"flex",height:te>1440?"700px":"650px",width:te>1440?"675px":"680px",flexDirection:"column",borderRadius:"rounded",backgroundColor:"#F7F7F8",paddingTop:"0px"},children:[u.jsx(MA,{title:A,typeOfProduct:r,fileSize:s,urls:{iosUrl:C,googleUrl:ee},handleIosChange:J,handleGoogleChange:p,disabled:Ae,api:i,creditDownload:K,user:a,isTest:X,setIsTest:W}),D?u.jsx("div",{style:{height:"100%",width:"100%",display:"flex",justifyContent:"center"},children:u.jsx(Rn,{isNetworksLoading:!0})}):(g||K)&&(r==="Flex"?y:!0)&&!D&&C!=="Loading..."&&ee!=="Loading..."&&u.jsx(TA,{playable:g,creditDownload:K,visible:o,versionId:t,typeOfProduct:r,api:i,user:a,handleDownloadError:c,fetchFileUrl:d,urls:{iosUrl:C,googleUrl:ee},game:y,getDownloadCount:G,disabled:Ae,setSafariCopyLink:q,isTest:X})]})},zl="";var Tn={exports:{}},Ue={},Hn={exports:{}},Se={},Xn={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;/*!
|
|
51
51
|
* Adapted from jQuery UI core
|
|
52
52
|
*
|
|
53
53
|
* http://jqueryui.com
|