import{R as G,ao as ge,ap as ye,aq as Ce,ar as we,as as ke,at as ve,au as be,I as W,J as _e,k as A,Z as yt,Q as he,l as Ct,o as C,c as S,w as d,a as u,K as qe,v as Ge,M as We,V as Y,f as j,b as p,t as P,N as w,ai as Zt,s as T,af as $,ae as H,G as wt,av as Yt,X as Ke,A as N,ak as Qt,aw as Ee,e as k,ax as ee,U,al as kt,y as vt,d as M,ay as Ae,F as X,az as bt,aA as me,aB as se,$ as re,aC as Be,aD as _t,ag as Et,ah as At,aE as en,aF as tn}from"./index-CW_ph8U7.js";import{u as nn}from"./customizer-C1yqUEzG.js";import{m as Z}from"./marketingApi-7xjWXtex.js";/* empty css */import{_ as on}from"./TitleBreadcrumb.vue_vue_type_style_index_0_lang-BxraGGjs.js";import{_ as xe}from"./close-ju3PyIXP.js";import{u as xt}from"./index-Cc-bQ2fR.js";import{_ as St}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ot="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%20clip-path='url(%23clip0_417_24547)'%3e%3cpath%20id='Vector'%20d='M9%2011L12%2014L20%206'%20stroke='%23CFCFCF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M20%2012V18C20%2018.5304%2019.7893%2019.0391%2019.4142%2019.4142C19.0391%2019.7893%2018.5304%2020%2018%2020H6C5.46957%2020%204.96086%2019.7893%204.58579%2019.4142C4.21071%2019.0391%204%2018.5304%204%2018V6C4%205.46957%204.21071%204.96086%204.58579%204.58579C4.96086%204.21071%205.46957%204%206%204H15'%20stroke='%23CFCFCF'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_417_24547'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",st="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%20clip-path='url(%23clip0_2004_25311)'%3e%3cpath%20id='Vector'%20d='M9%2011L12%2014L20%206'%20stroke='%2300C853'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M20%2012V18C20%2018.5304%2019.7893%2019.0391%2019.4142%2019.4142C19.0391%2019.7893%2018.5304%2020%2018%2020H6C5.46957%2020%204.96086%2019.7893%204.58579%2019.4142C4.21071%2019.0391%204%2018.5304%204%2018V6C4%205.46957%204.21071%204.96086%204.58579%204.58579C4.96086%204.21071%205.46957%204%206%204H15'%20stroke='%2300C853'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2004_25311'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",sn="/assets/icon1-DV_YQtgY.svg",O=nn(),rn=G(()=>O.actTheme==="GreenTheme"?ge.colors.primary:O.actTheme==="PinkTheme"?ye.colors.primary:O.actTheme==="YellowTheme"?Ce.colors.primary:O.actTheme==="SeaGreenTheme"?we.colors.primary:O.actTheme==="OliveGreenTheme"?ke.colors.primary:O.actTheme==="SpeechBlueTheme"?ve.colors.primary:be.colors.primary);G(()=>O.actTheme==="GreenTheme"?ge.colors.primary200:O.actTheme==="PinkTheme"?ye.colors.primary200:O.actTheme==="YellowTheme"?Ce.colors.primary200:O.actTheme==="SeaGreenTheme"?we.colors.primary200:O.actTheme==="OliveGreenTheme"?ke.colors.primary200:O.actTheme==="SpeechBlueTheme"?ve.colors.primary200:be.colors.primary200);const an=G(()=>O.actTheme==="GreenTheme"?ge.colors.secondary:O.actTheme==="PinkTheme"?ye.colors.secondary:O.actTheme==="YellowTheme"?Ce.colors.secondary:O.actTheme==="SeaGreenTheme"?we.colors.secondary:O.actTheme==="OliveGreenTheme"?ke.colors.secondary:O.actTheme==="SpeechBlueTheme"?ve.colors.secondary:be.colors.secondary);G(()=>O.actTheme==="GreenTheme"?ge.colors.secondary200:O.actTheme==="PinkTheme"?ye.colors.secondary200:O.actTheme==="YellowTheme"?Ce.colors.secondary200:O.actTheme==="SeaGreenTheme"?we.colors.secondary200:O.actTheme==="OliveGreenTheme"?ke.colors.secondary200:O.actTheme==="SpeechBlueTheme"?ve.colors.secondary200:be.colors.secondary200);const ln=p("h4",{class:"mt-1 font-weight-medium"},"Data Analysis",-1),cn={class:"mt-5"},un=W({__name:"Statistics",setup(e){_e([0,1,2,3,4]);let t=A(0),n=A(0);const o=A({state:"Last 7 Days",abbr:7});yt(o,b=>{console.log("watch....",b.abbr),a.value=!1,F(b.abbr)});const s=[{state:"Last 7 Days",abbr:7},{state:"Last 14 Days",abbr:14},{state:"Last Month",abbr:365}],r=G(()=>({chart:{type:"area",height:480,fontFamily:"inherit",foreColor:"#a1aab2",toolbar:{show:!1}},colors:[rn.value,an.value],xaxis:{categories:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.5,opacityTo:0,stops:[0,80,100]}},dataLabels:{enabled:!1},grid:{show:!0}}));let i={series:[{name:"",data:[]},{name:"",data:[]}]};const l=he();let f=A("");A(""),A("");let a=A(!1);Ct(()=>{F(7)});const h=G(()=>(console.log("computed...",l.merchantInfoMutations),l.merchantInfoMutations.login));function m(){var b=new Date().getTimezoneOffset()/60;return b=-b,b}function v(b){const E=new Date,x=E.getTime();return E.setDate(E.getDate()-(b-1)),{start:E.getTime(),end:x}}function F(b){if(h.value){const E=v(b),x=m();Z().marketingFlowStatistics(f.value,E.start,E.end,x).then(I=>{console.log("getMarketingFlowStatistics...",I),I.data.series2.forEach(Pe=>{}),console.log("data.series11111...",I.data.series2),t.value=g(I.data.series),n.value=g(I.data.series2),console.log("totalOrders.value....",t.value),y(b,I.data)})}}function g(b){let E=0;return b.forEach(x=>{console.log("it...",x),E=E+x}),E}function y(b,E){if(i.series[0].data=[],i.series[1].data=[],b==7||b==14){console.log("data.series2...",E.series2),console.log("data.series2222...",E.series2),i.series[0].name="Affiliate Orders",i.series[0].data.push(...E.series),i.series[1].name="Commisions($)",i.series[1].data.push(...E.series2);let x=[];E.xaxis.forEach(L=>{let I=new Date(L),Pe=I.getMonth()+1,Xt=I.getDate();L=Pe+"."+Xt,x.push(L),console.log("item...",L)}),r.value.xaxis.categories=[...x]}b==365&&([1,2,3,4,5,6,7,8,9,10,11,12].forEach(L=>{let I=R(E.statistics,L);i.series[0].name="Affiliate Orders",i.series[1].data.push(I.value2),i.series[1].name="Commisions",i.series[0].data.push(I.value)}),r.value.xaxis.categories=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],console.log("lineChart1....",i)),a.value=!0}function R(b,E){let x={date:"",value:0,value2:0,value3:0};return b.forEach(L=>{new Date(L.label).getMonth()+1==E&&(x.date=L.label,x.value=x.value+L.value,x.value2=x.value2+L.value2,x.value3=x.value3+L.value3)}),console.log("param....",x),x}return(b,E)=>{const x=wt("apexchart");return C(),S(H,{variant:"outlined",class:"overflow-hidden"},{default:d(()=>[u($,null,{default:d(()=>[u(qe,null,{default:d(()=>[u(Ge,{style:{padding:"0"}},{title:d(()=>[ln]),_:1})]),_:1}),u(We),u(Y,{class:"d-flex justify-space-between mt-4"},{default:d(()=>[u(j,{cols:"18",md:"8"},{default:d(()=>[p("p",null,"Total affiliate orders:"+P(w(t)),1),p("p",null,"Commisions:$"+P(w(n)),1)]),_:1}),u(Zt,{color:"primary",variant:"outlined","hide-details":"",modelValue:o.value,"onUpdate:modelValue":E[0]||(E[0]=L=>o.value=L),items:s,"item-title":"state","item-value":"abbr",label:"Select","persistent-hint":"","return-object":"","single-line":"","update:menu":"changeSlect"},null,8,["modelValue"])]),_:1}),p("div",cn,[w(a)?(C(),S(x,{key:0,type:"area",height:"291",options:r.value,series:w(i).series},null,8,["options","series"])):T("",!0)])]),_:1})]),_:1})}}});function Tt(e,t){return function(){return e.apply(t,arguments)}}const{toString:dn}=Object.prototype,{getPrototypeOf:Xe}=Object,Se=(e=>t=>{const n=dn.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),J=e=>(e=e.toLowerCase(),t=>Se(t)===e),Te=e=>t=>typeof t===e,{isArray:te}=Array,ae=Te("undefined");function fn(e){return e!==null&&!ae(e)&&e.constructor!==null&&!ae(e.constructor)&&B(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ot=J("ArrayBuffer");function hn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ot(e.buffer),t}const mn=Te("string"),B=Te("function"),Vt=Te("number"),Oe=e=>e!==null&&typeof e=="object",pn=e=>e===!0||e===!1,ue=e=>{if(Se(e)!=="object")return!1;const t=Xe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},gn=J("Date"),yn=J("File"),Cn=J("Blob"),wn=J("FileList"),kn=e=>Oe(e)&&B(e.pipe),vn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||B(e.append)&&((t=Se(e))==="formdata"||t==="object"&&B(e.toString)&&e.toString()==="[object FormData]"))},bn=J("URLSearchParams"),_n=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function le(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),te(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{const r=n?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let l;for(o=0;o<i;o++)l=r[o],t.call(null,e[l],l,e)}}function Rt(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length,s;for(;o-- >0;)if(s=n[o],t===s.toLowerCase())return s;return null}const Pt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Lt=e=>!ae(e)&&e!==Pt;function je(){const{caseless:e}=Lt(this)&&this||{},t={},n=(o,s)=>{const r=e&&Rt(t,s)||s;ue(t[r])&&ue(o)?t[r]=je(t[r],o):ue(o)?t[r]=je({},o):te(o)?t[r]=o.slice():t[r]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&le(arguments[o],n);return t}const En=(e,t,n,{allOwnKeys:o}={})=>(le(t,(s,r)=>{n&&B(s)?e[r]=Tt(s,n):e[r]=s},{allOwnKeys:o}),e),An=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xn=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Sn=(e,t,n,o)=>{let s,r,i;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),r=s.length;r-- >0;)i=s[r],(!o||o(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&Xe(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Tn=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},On=e=>{if(!e)return null;if(te(e))return e;let t=e.length;if(!Vt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Vn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Xe(Uint8Array)),Rn=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=o.next())&&!s.done;){const r=s.value;t.call(e,r[0],r[1])}},Pn=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},Ln=J("HTMLFormElement"),Nn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,s){return o.toUpperCase()+s}),rt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Mn=J("RegExp"),Nt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};le(n,(s,r)=>{let i;(i=t(s,r,e))!==!1&&(o[r]=i||s)}),Object.defineProperties(e,o)},Fn=e=>{Nt(e,(t,n)=>{if(B(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(B(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Dn=(e,t)=>{const n={},o=s=>{s.forEach(r=>{n[r]=!0})};return te(e)?o(e):o(String(e).split(t)),n},In=()=>{},Un=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Le="abcdefghijklmnopqrstuvwxyz",it="0123456789",Mt={DIGIT:it,ALPHA:Le,ALPHA_DIGIT:Le+Le.toUpperCase()+it},Bn=(e=16,t=Mt.ALPHA_DIGIT)=>{let n="";const{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n};function jn(e){return!!(e&&B(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const $n=e=>{const t=new Array(10),n=(o,s)=>{if(Oe(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const r=te(o)?[]:{};return le(o,(i,l)=>{const f=n(i,s+1);!ae(f)&&(r[l]=f)}),t[s]=void 0,r}}return o};return n(e,0)},Hn=J("AsyncFunction"),zn=e=>e&&(Oe(e)||B(e))&&B(e.then)&&B(e.catch),c={isArray:te,isArrayBuffer:Ot,isBuffer:fn,isFormData:vn,isArrayBufferView:hn,isString:mn,isNumber:Vt,isBoolean:pn,isObject:Oe,isPlainObject:ue,isUndefined:ae,isDate:gn,isFile:yn,isBlob:Cn,isRegExp:Mn,isFunction:B,isStream:kn,isURLSearchParams:bn,isTypedArray:Vn,isFileList:wn,forEach:le,merge:je,extend:En,trim:_n,stripBOM:An,inherits:xn,toFlatObject:Sn,kindOf:Se,kindOfTest:J,endsWith:Tn,toArray:On,forEachEntry:Rn,matchAll:Pn,isHTMLForm:Ln,hasOwnProperty:rt,hasOwnProp:rt,reduceDescriptors:Nt,freezeMethods:Fn,toObjectSet:Dn,toCamelCase:Nn,noop:In,toFiniteNumber:Un,findKey:Rt,global:Pt,isContextDefined:Lt,ALPHABET:Mt,generateString:Bn,isSpecCompliantForm:jn,toJSONObject:$n,isAsyncFn:Hn,isThenable:zn};function _(e,t,n,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),s&&(this.response=s)}c.inherits(_,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ft=_.prototype,Dt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Dt[e]={value:e}});Object.defineProperties(_,Dt);Object.defineProperty(Ft,"isAxiosError",{value:!0});_.from=(e,t,n,o,s,r)=>{const i=Object.create(Ft);return c.toFlatObject(e,i,function(f){return f!==Error.prototype},l=>l!=="isAxiosError"),_.call(i,e.message,t,n,o,s),i.cause=e,i.name=e.name,r&&Object.assign(i,r),i};const Jn=null;function $e(e){return c.isPlainObject(e)||c.isArray(e)}function It(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function at(e,t,n){return e?e.concat(t).map(function(s,r){return s=It(s),!n&&r?"["+s+"]":s}).join(n?".":""):t}function qn(e){return c.isArray(e)&&!e.some($e)}const Gn=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function Ve(e,t,n){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=c.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,R){return!c.isUndefined(R[y])});const o=n.metaTokens,s=n.visitor||h,r=n.dots,i=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function a(g){if(g===null)return"";if(c.isDate(g))return g.toISOString();if(!f&&c.isBlob(g))throw new _("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(g)||c.isTypedArray(g)?f&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function h(g,y,R){let b=g;if(g&&!R&&typeof g=="object"){if(c.endsWith(y,"{}"))y=o?y:y.slice(0,-2),g=JSON.stringify(g);else if(c.isArray(g)&&qn(g)||(c.isFileList(g)||c.endsWith(y,"[]"))&&(b=c.toArray(g)))return y=It(y),b.forEach(function(x,L){!(c.isUndefined(x)||x===null)&&t.append(i===!0?at([y],L,r):i===null?y:y+"[]",a(x))}),!1}return $e(g)?!0:(t.append(at(R,y,r),a(g)),!1)}const m=[],v=Object.assign(Gn,{defaultVisitor:h,convertValue:a,isVisitable:$e});function F(g,y){if(!c.isUndefined(g)){if(m.indexOf(g)!==-1)throw Error("Circular reference detected in "+y.join("."));m.push(g),c.forEach(g,function(b,E){(!(c.isUndefined(b)||b===null)&&s.call(t,b,c.isString(E)?E.trim():E,y,v))===!0&&F(b,y?y.concat(E):[E])}),m.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return F(e),t}function lt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function Ze(e,t){this._pairs=[],e&&Ve(e,this,t)}const Ut=Ze.prototype;Ut.append=function(t,n){this._pairs.push([t,n])};Ut.toString=function(t){const n=t?function(o){return t.call(this,o,lt)}:lt;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Wn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Bt(e,t,n){if(!t)return e;const o=n&&n.encode||Wn,s=n&&n.serialize;let r;if(s?r=s(t,n):r=c.isURLSearchParams(t)?t.toString():new Ze(t,n).toString(o),r){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+r}return e}class ct{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(o){o!==null&&t(o)})}}const jt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Kn=typeof URLSearchParams<"u"?URLSearchParams:Ze,Xn=typeof FormData<"u"?FormData:null,Zn=typeof Blob<"u"?Blob:null,Yn={isBrowser:!0,classes:{URLSearchParams:Kn,FormData:Xn,Blob:Zn},protocols:["http","https","file","blob","url","data"]},$t=typeof window<"u"&&typeof document<"u",Qn=(e=>$t&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),eo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",to=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$t,hasStandardBrowserEnv:Qn,hasStandardBrowserWebWorkerEnv:eo},Symbol.toStringTag,{value:"Module"})),z={...to,...Yn};function no(e,t){return Ve(e,new z.classes.URLSearchParams,Object.assign({visitor:function(n,o,s,r){return z.isNode&&c.isBuffer(n)?(this.append(o,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function oo(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function so(e){const t={},n=Object.keys(e);let o;const s=n.length;let r;for(o=0;o<s;o++)r=n[o],t[r]=e[r];return t}function Ht(e){function t(n,o,s,r){let i=n[r++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),f=r>=n.length;return i=!i&&c.isArray(s)?s.length:i,f?(c.hasOwnProp(s,i)?s[i]=[s[i],o]:s[i]=o,!l):((!s[i]||!c.isObject(s[i]))&&(s[i]=[]),t(n,o,s[i],r)&&c.isArray(s[i])&&(s[i]=so(s[i])),!l)}if(c.isFormData(e)&&c.isFunction(e.entries)){const n={};return c.forEachEntry(e,(o,s)=>{t(oo(o),s,n,0)}),n}return null}function ro(e,t,n){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const Ye={transitional:jt,adapter:["xhr","http"],transformRequest:[function(t,n){const o=n.getContentType()||"",s=o.indexOf("application/json")>-1,r=c.isObject(t);if(r&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(Ht(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(r){if(o.indexOf("application/x-www-form-urlencoded")>-1)return no(t,this.formSerializer).toString();if((l=c.isFileList(t))||o.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Ve(l?{"files[]":t}:t,f&&new f,this.formSerializer)}}return r||s?(n.setContentType("application/json",!1),ro(t)):t}],transformResponse:[function(t){const n=this.transitional||Ye.transitional,o=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&c.isString(t)&&(o&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?_.from(l,_.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:z.classes.FormData,Blob:z.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{Ye.headers[e]={}});const Qe=Ye,io=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ao=e=>{const t={};let n,o,s;return e&&e.split(` `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),o=i.substring(s+1).trim(),!(!n||t[n]&&io[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},ut=Symbol("internals");function ne(e){return e&&String(e).trim().toLowerCase()}function de(e){return e===!1||e==null?e:c.isArray(e)?e.map(de):String(e)}function lo(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const co=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ne(e,t,n,o,s){if(c.isFunction(o))return o.call(this,t,n);if(s&&(t=n),!!c.isString(t)){if(c.isString(o))return t.indexOf(o)!==-1;if(c.isRegExp(o))return o.test(t)}}function uo(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function fo(e,t){const n=c.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(s,r,i){return this[o].call(this,t,s,r,i)},configurable:!0})})}class Re{constructor(t){t&&this.set(t)}set(t,n,o){const s=this;function r(l,f,a){const h=ne(f);if(!h)throw new Error("header name must be a non-empty string");const m=c.findKey(s,h);(!m||s[m]===void 0||a===!0||a===void 0&&s[m]!==!1)&&(s[m||f]=de(l))}const i=(l,f)=>c.forEach(l,(a,h)=>r(a,h,f));return c.isPlainObject(t)||t instanceof this.constructor?i(t,n):c.isString(t)&&(t=t.trim())&&!co(t)?i(ao(t),n):t!=null&&r(n,t,o),this}get(t,n){if(t=ne(t),t){const o=c.findKey(this,t);if(o){const s=this[o];if(!n)return s;if(n===!0)return lo(s);if(c.isFunction(n))return n.call(this,s,o);if(c.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ne(t),t){const o=c.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||Ne(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let s=!1;function r(i){if(i=ne(i),i){const l=c.findKey(o,i);l&&(!n||Ne(o,o[l],l,n))&&(delete o[l],s=!0)}}return c.isArray(t)?t.forEach(r):r(t),s}clear(t){const n=Object.keys(this);let o=n.length,s=!1;for(;o--;){const r=n[o];(!t||Ne(this,this[r],r,t,!0))&&(delete this[r],s=!0)}return s}normalize(t){const n=this,o={};return c.forEach(this,(s,r)=>{const i=c.findKey(o,r);if(i){n[i]=de(s),delete n[r];return}const l=t?uo(r):String(r).trim();l!==r&&delete n[r],n[l]=de(s),o[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return c.forEach(this,(o,s)=>{o!=null&&o!==!1&&(n[s]=t&&c.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[ut]=this[ut]={accessors:{}}).accessors,s=this.prototype;function r(i){const l=ne(i);o[l]||(fo(s,i),o[l]=!0)}return c.isArray(t)?t.forEach(r):r(t),this}}Re.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(Re.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});c.freezeMethods(Re);const q=Re;function Me(e,t){const n=this||Qe,o=t||n,s=q.from(o.headers);let r=o.data;return c.forEach(e,function(l){r=l.call(n,r,s.normalize(),t?t.status:void 0)}),s.normalize(),r}function zt(e){return!!(e&&e.__CANCEL__)}function ce(e,t,n){_.call(this,e??"canceled",_.ERR_CANCELED,t,n),this.name="CanceledError"}c.inherits(ce,_,{__CANCEL__:!0});function ho(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(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 mo=z.hasStandardBrowserEnv?{write(e,t,n,o,s,r){const i=[e+"="+encodeURIComponent(t)];c.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),c.isString(o)&&i.push("path="+o),c.isString(s)&&i.push("domain="+s),r===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function po(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function go(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Jt(e,t){return e&&!po(t)?go(e,t):t}const yo=z.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let o;function s(r){let i=r;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{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 o=s(window.location.href),function(i){const l=c.isString(i)?s(i):i;return l.protocol===o.protocol&&l.host===o.host}}():function(){return function(){return!0}}();function Co(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function wo(e,t){e=e||10;const n=new Array(e),o=new Array(e);let s=0,r=0,i;return t=t!==void 0?t:1e3,function(f){const a=Date.now(),h=o[r];i||(i=a),n[s]=f,o[s]=a;let m=r,v=0;for(;m!==s;)v+=n[m++],m=m%e;if(s=(s+1)%e,s===r&&(r=(r+1)%e),a-i<t)return;const F=h&&a-h;return F?Math.round(v*1e3/F):void 0}}function dt(e,t){let n=0;const o=wo(50,250);return s=>{const r=s.loaded,i=s.lengthComputable?s.total:void 0,l=r-n,f=o(l),a=r<=i;n=r;const h={loaded:r,total:i,progress:i?r/i:void 0,bytes:l,rate:f||void 0,estimated:f&&i&&a?(i-r)/f:void 0,event:s};h[t?"download":"upload"]=!0,e(h)}}const ko=typeof XMLHttpRequest<"u",vo=ko&&function(e){return new Promise(function(n,o){let s=e.data;const r=q.from(e.headers).normalize();let{responseType:i,withXSRFToken:l}=e,f;function a(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}let h;if(c.isFormData(s)){if(z.hasStandardBrowserEnv||z.hasStandardBrowserWebWorkerEnv)r.setContentType(!1);else if((h=r.getContentType())!==!1){const[y,...R]=h?h.split(";").map(b=>b.trim()).filter(Boolean):[];r.setContentType([y||"multipart/form-data",...R].join("; "))}}let m=new XMLHttpRequest;if(e.auth){const y=e.auth.username||"",R=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";r.set("Authorization","Basic "+btoa(y+":"+R))}const v=Jt(e.baseURL,e.url);m.open(e.method.toUpperCase(),Bt(v,e.params,e.paramsSerializer),!0),m.timeout=e.timeout;function F(){if(!m)return;const y=q.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),b={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:y,config:e,request:m};ho(function(x){n(x),a()},function(x){o(x),a()},b),m=null}if("onloadend"in m?m.onloadend=F:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(F)},m.onabort=function(){m&&(o(new _("Request aborted",_.ECONNABORTED,e,m)),m=null)},m.onerror=function(){o(new _("Network Error",_.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let R=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||jt;e.timeoutErrorMessage&&(R=e.timeoutErrorMessage),o(new _(R,b.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,e,m)),m=null},z.hasStandardBrowserEnv&&(l&&c.isFunction(l)&&(l=l(e)),l||l!==!1&&yo(v))){const y=e.xsrfHeaderName&&e.xsrfCookieName&&mo.read(e.xsrfCookieName);y&&r.set(e.xsrfHeaderName,y)}s===void 0&&r.setContentType(null),"setRequestHeader"in m&&c.forEach(r.toJSON(),function(R,b){m.setRequestHeader(b,R)}),c.isUndefined(e.withCredentials)||(m.withCredentials=!!e.withCredentials),i&&i!=="json"&&(m.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&m.addEventListener("progress",dt(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&m.upload&&m.upload.addEventListener("progress",dt(e.onUploadProgress)),(e.cancelToken||e.signal)&&(f=y=>{m&&(o(!y||y.type?new ce(null,e,m):y),m.abort(),m=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f)));const g=Co(v);if(g&&z.protocols.indexOf(g)===-1){o(new _("Unsupported protocol "+g+":",_.ERR_BAD_REQUEST,e));return}m.send(s||null)})},He={http:Jn,xhr:vo};c.forEach(He,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ft=e=>`- ${e}`,bo=e=>c.isFunction(e)||e===null||e===!1,qt={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let n,o;const s={};for(let r=0;r<t;r++){n=e[r];let i;if(o=n,!bo(n)&&(o=He[(i=String(n)).toLowerCase()],o===void 0))throw new _(`Unknown adapter '${i}'`);if(o)break;s[i||"#"+r]=o}if(!o){const r=Object.entries(s).map(([l,f])=>`adapter ${l} `+(f===!1?"is not supported by the environment":"is not available in the build"));let i=t?r.length>1?`since : `+r.map(ft).join(` `):" "+ft(r[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:He};function Fe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ce(null,e)}function ht(e){return Fe(e),e.headers=q.from(e.headers),e.data=Me.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qt.getAdapter(e.adapter||Qe.adapter)(e).then(function(o){return Fe(e),o.data=Me.call(e,e.transformResponse,o),o.headers=q.from(o.headers),o},function(o){return zt(o)||(Fe(e),o&&o.response&&(o.response.data=Me.call(e,e.transformResponse,o.response),o.response.headers=q.from(o.response.headers))),Promise.reject(o)})}const mt=e=>e instanceof q?e.toJSON():e;function Q(e,t){t=t||{};const n={};function o(a,h,m){return c.isPlainObject(a)&&c.isPlainObject(h)?c.merge.call({caseless:m},a,h):c.isPlainObject(h)?c.merge({},h):c.isArray(h)?h.slice():h}function s(a,h,m){if(c.isUndefined(h)){if(!c.isUndefined(a))return o(void 0,a,m)}else return o(a,h,m)}function r(a,h){if(!c.isUndefined(h))return o(void 0,h)}function i(a,h){if(c.isUndefined(h)){if(!c.isUndefined(a))return o(void 0,a)}else return o(void 0,h)}function l(a,h,m){if(m in t)return o(a,h);if(m in e)return o(void 0,a)}const f={url:r,method:r,data:r,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(a,h)=>s(mt(a),mt(h),!0)};return c.forEach(Object.keys(Object.assign({},e,t)),function(h){const m=f[h]||s,v=m(e[h],t[h],h);c.isUndefined(v)&&m!==l||(n[h]=v)}),n}const Gt="1.6.7",et={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{et[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const pt={};et.transitional=function(t,n,o){function s(r,i){return"[Axios v"+Gt+"] Transitional option '"+r+"'"+i+(o?". "+o:"")}return(r,i,l)=>{if(t===!1)throw new _(s(i," has been removed"+(n?" in "+n:"")),_.ERR_DEPRECATED);return n&&!pt[i]&&(pt[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(r,i,l):!0}};function _o(e,t,n){if(typeof e!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let s=o.length;for(;s-- >0;){const r=o[s],i=t[r];if(i){const l=e[r],f=l===void 0||i(l,r,e);if(f!==!0)throw new _("option "+r+" must be "+f,_.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new _("Unknown option "+r,_.ERR_BAD_OPTION)}}const ze={assertOptions:_o,validators:et},K=ze.validators;class pe{constructor(t){this.defaults=t,this.interceptors={request:new ct,response:new ct}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const r=s.stack?s.stack.replace(/^.+\n/,""):"";o.stack?r&&!String(o.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(o.stack+=` `+r):o.stack=r}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Q(this.defaults,n);const{transitional:o,paramsSerializer:s,headers:r}=n;o!==void 0&&ze.assertOptions(o,{silentJSONParsing:K.transitional(K.boolean),forcedJSONParsing:K.transitional(K.boolean),clarifyTimeoutError:K.transitional(K.boolean)},!1),s!=null&&(c.isFunction(s)?n.paramsSerializer={serialize:s}:ze.assertOptions(s,{encode:K.function,serialize:K.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=r&&c.merge(r.common,r[n.method]);r&&c.forEach(["delete","get","head","post","put","patch","common"],g=>{delete r[g]}),n.headers=q.concat(i,r);const l=[];let f=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(f=f&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const a=[];this.interceptors.response.forEach(function(y){a.push(y.fulfilled,y.rejected)});let h,m=0,v;if(!f){const g=[ht.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,a),v=g.length,h=Promise.resolve(n);m<v;)h=h.then(g[m++],g[m++]);return h}v=l.length;let F=n;for(m=0;m<v;){const g=l[m++],y=l[m++];try{F=g(F)}catch(R){y.call(this,R);break}}try{h=ht.call(this,F)}catch(g){return Promise.reject(g)}for(m=0,v=a.length;m<v;)h=h.then(a[m++],a[m++]);return h}getUri(t){t=Q(this.defaults,t);const n=Jt(t.baseURL,t.url);return Bt(n,t.params,t.paramsSerializer)}}c.forEach(["delete","get","head","options"],function(t){pe.prototype[t]=function(n,o){return this.request(Q(o||{},{method:t,url:n,data:(o||{}).data}))}});c.forEach(["post","put","patch"],function(t){function n(o){return function(r,i,l){return this.request(Q(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}pe.prototype[t]=n(),pe.prototype[t+"Form"]=n(!0)});const fe=pe;class tt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(r){n=r});const o=this;this.promise.then(s=>{if(!o._listeners)return;let r=o._listeners.length;for(;r-- >0;)o._listeners[r](s);o._listeners=null}),this.promise.then=s=>{let r;const i=new Promise(l=>{o.subscribe(l),r=l}).then(s);return i.cancel=function(){o.unsubscribe(r)},i},t(function(r,i,l){o.reason||(o.reason=new ce(r,i,l),n(o.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 tt(function(s){t=s}),cancel:t}}}const Eo=tt;function Ao(e){return function(n){return e.apply(null,n)}}function xo(e){return c.isObject(e)&&e.isAxiosError===!0}const Je={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(Je).forEach(([e,t])=>{Je[t]=e});const So=Je;function Wt(e){const t=new fe(e),n=Tt(fe.prototype.request,t);return c.extend(n,fe.prototype,t,{allOwnKeys:!0}),c.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Wt(Q(e,s))},n}const V=Wt(Qe);V.Axios=fe;V.CanceledError=ce;V.CancelToken=Eo;V.isCancel=zt;V.VERSION=Gt;V.toFormData=Ve;V.AxiosError=_;V.Cancel=V.CanceledError;V.all=function(t){return Promise.all(t)};V.spread=Ao;V.isAxiosError=xo;V.mergeConfig=Q;V.AxiosHeaders=q;V.formToJSON=e=>Ht(c.isHTMLForm(e)?new FormData(e):e);V.getAdapter=qt.getAdapter;V.HttpStatusCode=So;V.default=V;const oe=V.create();oe.interceptors.response.use(e=>e,e=>Promise.reject(e.response&&e.response.data||"Wrong Services"));Yt({id:"userCard",state:()=>({cards:[],list:[],list2:[]}),getters:{},actions:{async fetchCards(){try{const e=await oe.get("/api/details-card/list");this.cards=e.data}catch(e){alert(e)}},async filterCards(e){try{const t=await oe.post("/api/details-card/filter",{filter:e});this.cards=t.data.results}catch(t){alert(t)}},async fetchlistCards(){try{const e=await oe.get("/api/avatar-list/s1/list");this.list=e.data}catch(e){alert(e)}},async fetchlist2Cards(){try{const e=await oe.get("/api/avatar-list/s2/list");this.list2=e.data}catch(e){alert(e)}}}});const To=p("h4",{class:"mt-1 font-weight-medium"},"Commission List",-1),Oo={class:"customize-header font-weight-medium"},Vo={class:"customize-header font-weight-medium"},Ro={class:"customize-header font-weight-medium"},Po={class:"customize-header font-weight-medium"},Lo={key:0,class:"text-secondary"},No={key:1,class:"text-success"},Mo=W({__name:"CommissionList",setup(e){let t=A(0),n=A({page:1,rowsPerPage:7}),o=Ke([]),s=A(!1);const r=he();Ct(()=>{l()});const i=G(()=>(console.log("computed...",r.merchantInfoMutations),r.merchantInfoMutations.login));function l(){if(i.value){s.value=!0;const a=Z();return console.log(""),a.marketingFlowList(n.value.page,n.value.rowsPerPage).then(h=>{o=h.data.records,t.value=h.data.total,s.value=!1,console.log("marketingFlowList...",o)})}}yt(n,a=>{console.log("value....",a),l()},{deep:!0});const f=[{text:"Coupon Code/Link",value:"code",width:150},{text:"Email",value:"email"},{text:"Date",value:"date"},{text:"Commission",value:"commission"}];return(a,h)=>{const m=wt("EasyDataTable");return C(),S(H,{variant:"outlined",class:"overflow-hidden card-radius"},{default:d(()=>[u($,null,{default:d(()=>[u(qe,null,{default:d(()=>[u(Ge,{style:{padding:"0"}},{title:d(()=>[To]),_:1})]),_:1})]),_:1}),u(We),u(m,{headers:f,items:w(o),loading:w(s),"table-height":344,"rows-per-page-message":"Rows per page","server-options":w(n),"onUpdate:serverOptions":h[0]||(h[0]=v=>Qt(n)?n.value=v:n=v),"table-class-name":"customize-table action-position","theme-color":"rgb(var(--v-theme-secondary))","server-items-length":w(t),border:!1},{"header-code":d(v=>[p("div",Oo,P(v.text),1)]),"header-email":d(v=>[p("div",Vo,P(v.text),1)]),"header-date":d(v=>[p("div",Ro,P(v.text),1)]),"header-commission":d(v=>[p("div",Po,P(v.text),1)]),"item-email":d(({email:v})=>[p("span",null,P(a.$filters.hideEmailMiddle(v)),1)]),"item-commission":d(({commission:v})=>[v>0?(C(),N("span",Lo,"+"+P(v),1)):T("",!0),v<0?(C(),N("span",No,"-"+P(v),1)):T("",!0)]),_:1},8,["items","loading","server-options","server-items-length"])]),_:1})}}}),ie="data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Frame'%20clip-path='url(%23clip0_2004_24567)'%3e%3cpath%20id='Vector'%20d='M2.25%209C2.25%209.88642%202.42459%2010.7642%202.76381%2011.5831C3.10303%2012.4021%203.60023%2013.1462%204.22703%2013.773C4.85382%2014.3998%205.59794%2014.897%206.41689%2015.2362C7.23583%2015.5754%208.11358%2015.75%209%2015.75C9.88642%2015.75%2010.7642%2015.5754%2011.5831%2015.2362C12.4021%2014.897%2013.1462%2014.3998%2013.773%2013.773C14.3998%2013.1462%2014.897%2012.4021%2015.2362%2011.5831C15.5754%2010.7642%2015.75%209.88642%2015.75%209C15.75%207.20979%2015.0388%205.4929%2013.773%204.22703C12.5071%202.96116%2010.7902%202.25%209%202.25C7.20979%202.25%205.4929%202.96116%204.22703%204.22703C2.96116%205.4929%202.25%207.20979%202.25%209Z'%20stroke='%232C3E50'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M9%206V9'%20stroke='%232C3E50'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_3'%20d='M9%2012H9.00615'%20stroke='%232C3E50'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2004_24567'%3e%3crect%20width='18'%20height='18'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",gt="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='&%23232;&%23191;&%23158;&%23230;&%23142;&%23165;&%23229;&%23155;&%23190;&%23230;&%23160;&%23135;'%20clip-path='url(%23clip0_2004_24580)'%3e%3cpath%20id='Vector'%20d='M6%2010L10%206'%20stroke='%232C3E50'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M7.33203%203.9976L7.6407%203.64027C8.2659%203.01515%209.11382%202.664%209.99793%202.66406C10.882%202.66413%2011.7299%203.0154%2012.355%203.6406C12.9801%204.2658%2013.3313%205.11373%2013.3312%205.99784C13.3312%206.88194%2012.9799%207.72982%2012.3547%208.35493L11.9987%208.66427'%20stroke='%232C3E50'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_3'%20d='M8.66806%2012.0026L8.4034%2012.3586C7.7709%2012.9841%206.91726%2013.3349%206.02773%2013.3349C5.1382%2013.3349%204.28456%2012.9841%203.65206%2012.3586C3.3403%2012.0503%203.09279%2011.6833%202.92387%2011.2787C2.75495%2010.8741%202.66797%2010.44%202.66797%2010.0016C2.66797%209.56317%202.75495%209.12909%202.92387%208.72451C3.09279%208.31992%203.3403%207.95287%203.65206%207.6446L4.0014%207.33594'%20stroke='%232C3E50'%20stroke-width='1.2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2004_24580'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Kt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='&%23233;&%23148;&%23129;'%20clip-path='url(%23clip0_2025_26175)'%3e%3cpath%20id='Vector'%20d='M5%2013C5%2012.4696%205.21071%2011.9609%205.58579%2011.5858C5.96086%2011.2107%206.46957%2011%207%2011H17C17.5304%2011%2018.0391%2011.2107%2018.4142%2011.5858C18.7893%2011.9609%2019%2012.4696%2019%2013V19C19%2019.5304%2018.7893%2020.0391%2018.4142%2020.4142C18.0391%2020.7893%2017.5304%2021%2017%2021H7C6.46957%2021%205.96086%2020.7893%205.58579%2020.4142C5.21071%2020.0391%205%2019.5304%205%2019V13Z'%20stroke='%232C3E50'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M11%2016C11%2016.2652%2011.1054%2016.5196%2011.2929%2016.7071C11.4804%2016.8946%2011.7348%2017%2012%2017C12.2652%2017%2012.5196%2016.8946%2012.7071%2016.7071C12.8946%2016.5196%2013%2016.2652%2013%2016C13%2015.7348%2012.8946%2015.4804%2012.7071%2015.2929C12.5196%2015.1054%2012.2652%2015%2012%2015C11.7348%2015%2011.4804%2015.1054%2011.2929%2015.2929C11.1054%2015.4804%2011%2015.7348%2011%2016Z'%20stroke='%232C3E50'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_3'%20d='M8%2011V7C8%205.93913%208.42143%204.92172%209.17157%204.17157C9.92172%203.42143%2010.9391%203%2012%203C13.0609%203%2014.0783%203.42143%2014.8284%204.17157C15.5786%204.92172%2016%205.93913%2016%207V11'%20stroke='%232C3E50'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2025_26175'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Fo={class:"d-flex align-center"},Do=p("p",{class:"mt-4",style:{"font-size":"14px"}},"Welcome to join in JetPrint Affiliate and apply the link, after your audiences register accounts through this link, you'll earn 5% of the cost of products paid at JetPrint by the audiences within 3 years as commission.",-1),Io={class:"d-flex align-center"},Uo={style:{color:"#252525 !important"}},Bo={class:"btns"},jo=W({__name:"ApplyAffiliateLinkDialog",setup(e){const t=A(!1),n=A(!1),o=A(!1),s=Ee("getMarketingUserInfo"),r=()=>{s&&s()};function i(){if(!n.value){o.value=!0;return}const l=Z();return console.log("marketing...",l),l.marketingAffiliateLinkApply().then(f=>{console.log("res...",f),t.value=!1,r()})}return(l,f)=>(C(),N(X,null,[u(ee,{color:"error",variant:"flat",rounded:"md",location:"top",modelValue:o.value,"onUpdate:modelValue":f[0]||(f[0]=a=>o.value=a)},{default:d(()=>[k(" I'm Top Center Message ")]),_:1},8,["modelValue"]),u(Ae,{modelValue:t.value,"onUpdate:modelValue":f[4]||(f[4]=a=>t.value=a),"max-width":575,activator:"parent"},{default:d(()=>[u(H,null,{default:d(()=>[u($,null,{default:d(()=>[p("h3",Fo,[k("Apply Affiliate Link "),u(U,{src:w(xe),width:32,height:32,class:"close",onClick:f[1]||(f[1]=a=>t.value=!1)},null,8,["src"])]),Do,p("div",Io,[u(kt,{color:"secondary","hide-details":"",modelValue:n.value,"onUpdate:modelValue":f[3]||(f[3]=a=>n.value=a)},{label:d(()=>[p("div",Uo,[k("l agree to JetPrint's "),p("a",{class:"text-decoration-underline",onClick:f[2]||(f[2]=vt(()=>{},["stop"])),target:"_blank",href:"https://jetprintapp.com/affiliate-terms-of-service/"}," Affliate Program Terms of Service")])]),_:1},8,["modelValue"])]),p("div",Bo,[u(M,{class:"mt-4",color:"lightprimary"},{default:d(()=>[k("Cancel")]),_:1}),u(M,{class:"mt-4 ml-4",color:"btnBlue",onClick:i},{default:d(()=>[k("Apply")]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),$o={class:"d-flex align-center"},Ho=p("p",{class:"mt-4",style:{"font-size":"14px"}},"Since you've applied your coupon code, if you want to apply the affiliate link, the initial code will be invalid, are you sure to continue apply the affiliate link?",-1),zo={class:"btns"},Jo=W({__name:"UnApplyAffiliateLinkDialog",setup(e){const t=A(!1);A(!1);const n=A(!1),o=A(!1),s=Ee("getMarketingUserInfo"),r=()=>{s&&s()};function i(){o.value=!0;const l=Z();return console.log("marketing...",l),l.marketingAffiliateLinkApply().then(f=>{o.value=!1,console.log("res...",f),t.value=!1,r()}).catch(function(f){o.value=!1})}return(l,f)=>(C(),N(X,null,[u(ee,{color:"error",variant:"flat",rounded:"md",location:"top",modelValue:n.value,"onUpdate:modelValue":f[0]||(f[0]=a=>n.value=a)},{default:d(()=>[k(" I'm Top Center Message ")]),_:1},8,["modelValue"]),u(Ae,{modelValue:t.value,"onUpdate:modelValue":f[3]||(f[3]=a=>t.value=a),"max-width":575,activator:"parent"},{default:d(()=>[u(H,null,{default:d(()=>[u($,null,{default:d(()=>[p("h3",$o,[k("Switch Affiliate Method "),u(U,{src:w(xe),width:32,height:32,class:"close",onClick:f[1]||(f[1]=a=>t.value=!1)},null,8,["src"])]),Ho,p("div",zo,[u(M,{class:"mt-4",color:"lightprimary",onClick:f[2]||(f[2]=a=>t.value=!1)},{default:d(()=>[k("Cancel")]),_:1}),u(M,{class:"mt-4 ml-4",color:"btnBlue",loading:o.value,disable:o.value,onClick:i},{default:d(()=>[k("Apply")]),_:1},8,["loading","disable"])])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),qo={UNDER_REVIEW:{text:"审核中",value:1},APPROVED:{text:"审核通过",value:2},REVIEW_REJECTION:{text:"审核驳回",value:3},AFFILIATE_LINK:{text:"链接",value:2},DISCOUNT_CODE:{text:"折扣码",value:1}},D=qo,nt=e=>(Et("data-v-2b9f1e72"),e=e(),At(),e),Go={class:"toolbox"},Wo=nt(()=>p("div",{class:"tool"},"Only one affiliate method is allowed to remain.",-1)),Ko=["src"],Xo={class:"d-flex align-center ga-2"},Zo=nt(()=>p("span",null,"Affiliate Link",-1)),Yo={class:"d-flex align-center ga-2"},Qo=nt(()=>p("span",null,"Affiliate Link",-1)),es=["src"],ts={class:"d-flex align-center"},ns={key:0,class:"fontsize12 mt-1"},os={class:"fontsize12 desc mb-2"},ss=W({__name:"ApplyAffiliateLink",props:{affiliateLink:Object,marketingMethod:Number,customProductNumValid:Boolean,orderAmountValid:Boolean,affiliateLinkValid:Boolean},setup(e){const t=_e([0,1,2,3,4]);A(""),Ke({}),A(!1);const n=A("https://c.jetprintapp.com"),o=e;let s=A("");s.value=n.value+"/register?ref="+o.affiliateLink.url,o.marketingMethod==D.DISCOUNT_CODE.value&&(console.log("props.marketingMethod...",o.marketingMethod),console.log("marketingEnum.AFFILIATE_LINK.value...",D.AFFILIATE_LINK.value),t.value=!1);const r=A(!1),{toClipboard:i}=xt(),l=async()=>{try{await i("https://c.jetprintapp.com/register?ref="+o.affiliateLink.url),r.value=!0}catch(f){console.error(f)}};return(f,a)=>(C(),N(X,null,[u(ee,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=h=>r.value=h),color:"success",timeout:3e3,variant:"flat",rounded:"md",location:"top"},{default:d(()=>[k("Link copied")]),_:1},8,["modelValue"]),u(_t,{modelValue:t.value,"onUpdate:modelValue":a[1]||(a[1]=h=>t.value=h),multiple:""},{default:d(()=>[u(bt,{elevation:"0"},{default:d(()=>[e.marketingMethod?(C(),S(me,{key:1,class:"font-weight-medium custom-accordion"},{default:d(()=>[k(" Switch Affiliate Link "),p("div",Go,[Wo,e.marketingMethod==w(D).DISCOUNT_CODE.value?(C(),N("img",{key:0,src:w(Kt),width:24,height:24},null,8,Ko)):T("",!0)])]),_:1})):(C(),S(me,{key:0,class:"font-weight-medium custom-accordion"},{default:d(()=>[k(" Method 1:Apply Affiliate Link ")]),_:1})),e.affiliateLink.status!=2?(C(),S(Be,{key:2},{default:d(()=>[p("div",Xo,[Zo,p("i",null,[u(se,{"max-width":"334px",activator:"parent",location:"top"},{default:d(()=>[k("When your audiences sign up through this link and place an order, you will earn a 5% commission of the product cost (this link is limited to three years)")]),_:1}),u(U,{src:w(ie),width:18,height:18},null,8,["src"])])]),u(re,{class:"mt-2",variant:"outlined",modelValue:e.affiliateLink.url,"persistent-placeholder":"",placeholder:"Apply Link","hide-details":"",density:"compact",color:"primary",disabled:""},{"prepend-inner":d(()=>[u(U,{src:w(gt),width:16,heigth:16},null,8,["src"])]),_:1},8,["modelValue"]),u(M,{color:"secondary",class:"mt-2",disabled:!e.affiliateLinkValid},{default:d(()=>[k(" Apply Now "),!e.marketingMethod||e.marketingMethod==null?(C(),S(jo,{key:0})):(C(),S(Jo,{key:1}))]),_:1},8,["disabled"])]),_:1})):T("",!0),e.affiliateLink.status==2?(C(),S(Be,{key:3},{default:d(()=>[p("div",Yo,[Qo,p("i",null,[u(se,{"max-width":"334px",activator:"parent",location:"top"},{default:d(()=>[k("When your audiences sign up through this link and place an order, you will earn a 5% commission of the product cost (this link is limited to three years)")]),_:1}),p("img",{src:w(ie),width:18,height:18},null,8,es)])]),p("div",ts,[u(re,{class:"mt-2",variant:"outlined",modelValue:w(s),"persistent-placeholder":"",placeholder:"Apply Link","hide-details":"",density:"compact",color:"primary",disabled:""},{"prepend-inner":d(()=>[u(U,{src:w(gt),width:16,heigth:16},null,8,["src"])]),_:1},8,["modelValue"]),u(M,{color:"primary",class:"ml-2",onClick:l},{default:d(()=>[k("Copy")]),_:1})]),e.affiliateLink.limitedPeriod?(C(),N("p",ns,"Limited period: "+P(e.affiliateLink.limitedPeriod),1)):T("",!0),p("p",os,[k("Number of registrations: "),p("span",null,P(e.affiliateLink.inviteNum),1)])]),_:1})):T("",!0)]),_:1})]),_:1},8,["modelValue"])],64))}}),rs=St(ss,[["__scopeId","data-v-2b9f1e72"]]),De="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='&%23230;&%23138;&%23152;&%23230;&%23137;&%23163;&%23229;&%23155;&%23190;&%23230;&%23160;&%23135;'%20clip-path='url(%23clip0_2004_24609)'%3e%3cpath%20id='Vector'%20d='M6%2010L10%206'%20stroke='%232C3E50'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M6.33333%206.66667C6.51743%206.66667%206.66667%206.51743%206.66667%206.33333C6.66667%206.14924%206.51743%206%206.33333%206C6.14924%206%206%206.14924%206%206.33333C6%206.51743%206.14924%206.66667%206.33333%206.66667Z'%20fill='black'%20stroke='%232C3E50'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_3'%20d='M9.66536%2010.0026C9.84946%2010.0026%209.9987%209.85337%209.9987%209.66927C9.9987%209.48518%209.84946%209.33594%209.66536%209.33594C9.48127%209.33594%209.33203%209.48518%209.33203%209.66927C9.33203%209.85337%209.48127%2010.0026%209.66536%2010.0026Z'%20fill='black'%20stroke='%232C3E50'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_4'%20d='M3.33364%204.80031C3.33364%204.41132%203.48816%204.03827%203.76322%203.76322C4.03827%203.48816%204.41132%203.33364%204.80031%203.33364H5.46697C5.85424%203.33342%206.2257%203.18004%206.50031%202.90697L6.96697%202.44031C7.10327%202.30324%207.26532%202.19447%207.4438%202.12025C7.62228%202.04602%207.81368%202.00781%208.00697%202.00781C8.20027%202.00781%208.39167%202.04602%208.57015%202.12025C8.74863%202.19447%208.91068%202.30324%209.04697%202.44031L9.51364%202.90697C9.78825%203.18004%2010.1597%203.33342%2010.547%203.33364H11.2136C11.6026%203.33364%2011.9757%203.48816%2012.2507%203.76322C12.5258%204.03827%2012.6803%204.41132%2012.6803%204.80031V5.46697C12.6805%205.85424%2012.8339%206.2257%2013.107%206.50031L13.5736%206.96697C13.7107%207.10327%2013.8195%207.26532%2013.8937%207.4438C13.9679%207.62228%2014.0061%207.81368%2014.0061%208.00697C14.0061%208.20027%2013.9679%208.39167%2013.8937%208.57015C13.8195%208.74863%2013.7107%208.91068%2013.5736%209.04697L13.107%209.51364C12.8339%209.78825%2012.6805%2010.1597%2012.6803%2010.547V11.2136C12.6803%2011.6026%2012.5258%2011.9757%2012.2507%2012.2507C11.9757%2012.5258%2011.6026%2012.6803%2011.2136%2012.6803H10.547C10.1597%2012.6805%209.78825%2012.8339%209.51364%2013.107L9.04697%2013.5736C8.91068%2013.7107%208.74863%2013.8195%208.57015%2013.8937C8.39167%2013.9679%208.20027%2014.0061%208.00697%2014.0061C7.81368%2014.0061%207.62228%2013.9679%207.4438%2013.8937C7.26532%2013.8195%207.10327%2013.7107%206.96697%2013.5736L6.50031%2013.107C6.2257%2012.8339%205.85424%2012.6805%205.46697%2012.6803H4.80031C4.41132%2012.6803%204.03827%2012.5258%203.76322%2012.2507C3.48816%2011.9757%203.33364%2011.6026%203.33364%2011.2136V10.547C3.33342%2010.1597%203.18004%209.78825%202.90697%209.51364L2.44031%209.04697C2.30324%208.91068%202.19447%208.74863%202.12025%208.57015C2.04602%208.39167%202.00781%208.20027%202.00781%208.00697C2.00781%207.81368%202.04602%207.62228%202.12025%207.4438C2.19447%207.26532%202.30324%207.10327%202.44031%206.96697L2.90697%206.50031C3.18004%206.2257%203.33342%205.85424%203.33364%205.46697V4.80031Z'%20stroke='%232C3E50'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2004_24609'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",is={class:"d-flex align-center"},as=p("p",{class:"mt-4",style:{"font-size":"14px"}},"When you apply your coupon code, after your audiences placeorders at JetPrint through this link, you'll earn 1% of the cost ofordered products as commission.",-1),ls={class:"d-flex align-center"},cs={style:{color:"#252525 !important"}},us={class:"btns"},Ie=W({__name:"ApplyCouponCodeDialog",props:{type:Object},setup(e){const t=A(!1),n=A(!1),o=A(!1),s=e,r=Ee("getMarketingUserInfo"),i=()=>{r&&r()};function l(){if(!n.value){o.value=!0;return}return Z().marketingCouponCodeApply(s.type).then(a=>{console.log("res...",a),t.value=!1,i()})}return(f,a)=>(C(),N(X,null,[u(ee,{color:"error",variant:"flat",rounded:"md",location:"top",modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=h=>o.value=h)},{default:d(()=>[k(" Please check the agreement before applying ")]),_:1},8,["modelValue"]),u(Ae,{modelValue:t.value,"onUpdate:modelValue":a[5]||(a[5]=h=>t.value=h),"max-width":575,activator:"parent"},{default:d(()=>[u(H,null,{default:d(()=>[u($,null,{default:d(()=>[p("h3",is,[k("Apply The Coupon Code "),u(U,{src:w(xe),width:32,height:32,class:"close",onClick:a[1]||(a[1]=h=>t.value=!1)},null,8,["src"])]),as,p("div",ls,[u(kt,{color:"secondary","hide-details":"",modelValue:n.value,"onUpdate:modelValue":a[3]||(a[3]=h=>n.value=h)},{label:d(()=>[p("div",cs,[k("l agree to JetPrint's "),p("a",{class:"text-decoration-underline",onClick:a[2]||(a[2]=vt(()=>{},["stop"])),target:"_blank",href:"https://jetprintapp.com/affiliate-terms-of-service/"}," Affliate Program Terms of Service")])]),_:1},8,["modelValue"])]),p("div",us,[u(M,{class:"mt-4",color:"lightprimary",onClick:a[4]||(a[4]=h=>t.value=!1)},{default:d(()=>[k("Cancel")]),_:1}),u(M,{class:"mt-4 ml-4",color:"btnBlue",onClick:l},{default:d(()=>[k("Apply")]),_:1})])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),ds={class:"d-flex align-center"},fs=p("p",{class:"mt-4",style:{"font-size":"14px"}},"Since you've applied your affiliate link, if you want to apply the coupon code, the initial link will be invalid, are you sure to continue apply the coupon code?",-1),hs={class:"btns"},Ue=W({__name:"UnApplyCouponCodeDialog",props:{type:Object},setup(e){const t=A(!1);A(!1);const n=A(!1),o=e,s=A(!1),r=Ee("getMarketingUserInfo"),i=()=>{r&&r()};function l(){return s.value=!0,Z().marketingCouponCodeApply(o.type).then(a=>{s.value=!1,console.log("res...",a),t.value=!1,i()}).catch(function(a){s.value=!1})}return(f,a)=>(C(),N(X,null,[u(ee,{color:"error",variant:"flat",rounded:"md",location:"top",modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=h=>n.value=h)},{default:d(()=>[k(" Please check the agreement before applying ")]),_:1},8,["modelValue"]),u(Ae,{modelValue:t.value,"onUpdate:modelValue":a[3]||(a[3]=h=>t.value=h),"max-width":575,activator:"parent"},{default:d(()=>[u(H,null,{default:d(()=>[u($,null,{default:d(()=>[p("h3",ds,[k("Switch Coupon Method "),u(U,{src:w(xe),width:32,height:32,class:"close",onClick:a[1]||(a[1]=h=>t.value=!1)},null,8,["src"])]),fs,p("div",hs,[u(M,{class:"mt-4",color:"lightprimary",onClick:a[2]||(a[2]=h=>t.value=!1)},{default:d(()=>[k("Cancel")]),_:1}),u(M,{class:"mt-4 ml-4",color:"btnBlue",loading:s.value,disable:s.value,onClick:l},{default:d(()=>[k("Apply")]),_:1},8,["loading","disable"])])]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),ms=e=>(Et("data-v-63ab8ca8"),e=e(),At(),e),ps={class:"toolbox"},gs=ms(()=>p("div",{class:"tool"},"Only one affiliate method is allowed to remain.",-1)),ys=["src"],Cs={class:"d-flex align-center ga-2"},ws={key:0},ks=["src"],vs={class:"d-flex justify-space-between mt-2"},bs={key:2,class:"text-subtitle-2"},_s={class:"text-secondary"},Es={class:"d-flex align-center ga-2"},As={key:0},xs=["src"],Ss={class:"d-flex justify-space-between mt-2"},Ts={key:2,class:"text-subtitle-2"},Os={class:"text-secondary"},Vs={class:"d-flex align-center ga-2"},Rs={key:0},Ps={class:"d-flex justify-space-between mt-2"},Ls={key:2,class:"text-subtitle-2"},Ns={class:"text-secondary"},Ms=W({__name:"ApplyCouponCode",props:{discountCode1:Object,discountCode2:Object,discountCode3:Object,discountCode1Valid:Boolean,discountCode2Valid:Boolean,discountCode3Valid:Boolean,marketingMethod:Number,customProductNumValid:Boolean,orderAmountValid:Boolean,configInfo:Object},setup(e){const t=_e([0,1,2,3,4]);A("");const n=A(!1),o=e;o.marketingMethod==D.AFFILIATE_LINK.value&&(console.log("props.marketingMethod...",o.marketingMethod),console.log("marketingEnum.AFFILIATE_LINK.value...",D.AFFILIATE_LINK.value),t.value=!1);const{toClipboard:s}=xt(),r=async i=>{try{await s(i),n.value=!0}catch(l){console.error(l)}};return(i,l)=>(C(),N(X,null,[u(ee,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=f=>n.value=f),color:"success",timeout:3e3,variant:"flat",rounded:"md",location:"top"},{default:d(()=>[k("Coupon code copied")]),_:1},8,["modelValue"]),u(_t,{modelValue:t.value,"onUpdate:modelValue":l[6]||(l[6]=f=>t.value=f),multiple:""},{default:d(()=>[u(bt,{elevation:"0"},{default:d(()=>[e.marketingMethod?(C(),S(me,{key:1,class:"font-weight-medium custom-accordion"},{default:d(()=>[k("Switch Coupon Code "),p("div",ps,[gs,e.marketingMethod==w(D).AFFILIATE_LINK.value?(C(),N("img",{key:0,src:w(Kt),width:24,height:24},null,8,ys)):T("",!0)])]),_:1})):(C(),S(me,{key:0,class:"font-weight-medium custom-accordion"},{default:d(()=>[k(" Method 2:Apply Coupon Code ")]),_:1})),u(Be,null,{default:d(()=>[u(Y,null,{default:d(()=>[u(j,{sm:"12",xs:"12",cols:"12",md:"4"},{default:d(()=>[p("div",Cs,[e.configInfo?(C(),N("span",ws,"Coupon Code:"+P(e.configInfo.discountCode1.discount*100)+"%",1)):T("",!0),p("i",null,[u(se,{"max-width":"334px",activator:"parent",location:"top"},{default:d(()=>[k("When you meet all the conditions for our affiliate program. you can apply for a coupon code. This coupon code is permanently valid. For any order placed through this coupon code, you will receive 1% of the product cost of the order.")]),_:1}),p("img",{src:w(ie),width:18,height:18},null,8,ks)])]),u(re,{class:"mt-2",variant:"outlined",modelValue:e.discountCode1.code,"persistent-placeholder":"",placeholder:"Apply The Coupon Code","hide-details":"",density:"compact",color:"primary",disabled:""},{"prepend-inner":d(()=>[u(U,{src:w(De),width:16,heigth:16},null,8,["src"])]),_:1},8,["modelValue"]),p("div",vs,[e.discountCode1.status==w(D).APPROVED.value?(C(),S(M,{key:0,color:"primary",onClick:l[1]||(l[1]=f=>r(e.discountCode1.code))},{default:d(()=>[k("Copy")]),_:1})):T("",!0),e.discountCode1.status==w(D).UNDER_REVIEW.value||e.discountCode1.status==null?(C(),S(M,{key:1,color:"secondary",disabled:!e.discountCode1Valid},{default:d(()=>[k(" Apply Now "),!e.marketingMethod||e.marketingMethod==null?(C(),S(Ie,{key:0,type:1})):(C(),S(Ue,{key:1,type:1}))]),_:1},8,["disabled"])):T("",!0),e.discountCode1.status==w(D).APPROVED.value?(C(),N("span",bs,[k("Number of times used: "),p("a",_s,P(e.discountCode1.inviteNum),1)])):T("",!0)])]),_:1}),u(j,{cols:"12",md:"4"},{default:d(()=>[p("div",Es,[e.configInfo?(C(),N("span",As,"Coupon Code:"+P(e.configInfo.discountCode2.discount*100)+"%",1)):T("",!0),p("i",null,[u(se,{"max-width":"334px",activator:"parent",location:"top"},{default:d(()=>[k("When the number of people using your discount reaches 11 (note: the number of people is counted according to unique email addresses), you can apply for a coupon code again, and you can get 3% of the order product cost with this coupon code.")]),_:1}),p("img",{src:w(ie),width:18,height:18},null,8,xs)])]),u(re,{class:"mt-2",variant:"outlined",modelValue:e.discountCode2.code,"onUpdate:modelValue":l[2]||(l[2]=f=>e.discountCode2.code=f),"persistent-placeholder":"",placeholder:"Apply The Coupon Code","hide-details":"",density:"compact",color:"primary",disabled:""},{"prepend-inner":d(()=>[u(U,{src:w(De),width:16,heigth:16},null,8,["src"])]),_:1},8,["modelValue"]),p("div",Ss,[e.discountCode2.status==w(D).APPROVED.value?(C(),S(M,{key:0,color:"primary",onClick:l[3]||(l[3]=f=>r(e.discountCode2.code))},{default:d(()=>[k("Copy")]),_:1})):T("",!0),e.discountCode2.status!=w(D).APPROVED.value?(C(),S(M,{key:1,color:"secondary",disabled:!e.discountCode2Valid},{default:d(()=>[k(" Apply Now "),!e.marketingMethod||e.marketingMethod==null?(C(),S(Ie,{key:0,type:2})):(C(),S(Ue,{key:1,type:2}))]),_:1},8,["disabled"])):T("",!0),e.discountCode2.status==w(D).APPROVED.value?(C(),N("span",Ts,[k("Number of times used: "),p("a",Os,P(e.discountCode2.inviteNum),1)])):T("",!0)])]),_:1}),u(j,{cols:"12",md:"4"},{default:d(()=>[p("div",Vs,[e.configInfo?(C(),N("span",Rs,"Coupon Code:"+P(e.configInfo.discountCode3.discount*100)+"%",1)):T("",!0),u(se,{"max-width":"334px",activator:"parent",location:"top"},{default:d(()=>[k("When the number of people using your discount reaches 51 (note: the number of people is counted according to unique email addresses), you can apply for a coupon code again, and you can get 5% of the order product cost with this coupon code.")]),_:1}),u(U,{src:w(ie),width:18,height:18,inline:""},null,8,["src"])]),u(re,{class:"mt-2",variant:"outlined",modelValue:e.discountCode3.code,"onUpdate:modelValue":l[4]||(l[4]=f=>e.discountCode3.code=f),"persistent-placeholder":"",placeholder:"Apply The Coupon Code","hide-details":"",density:"compact",color:"primary",disabled:""},{"prepend-inner":d(()=>[u(U,{src:w(De),width:16,heigth:16},null,8,["src"])]),_:1},8,["modelValue"]),p("div",Ps,[e.discountCode3.status==w(D).APPROVED.value?(C(),S(M,{key:0,color:"primary",onClick:l[5]||(l[5]=f=>r(e.discountCode3.code))},{default:d(()=>[k("Copy")]),_:1})):T("",!0),e.discountCode3.status==null||e.discountCode3.status!=w(D).APPROVED.value?(C(),S(M,{key:1,color:"secondary",disabled:!e.discountCode3Valid},{default:d(()=>[k(" Apply Now "),!e.marketingMethod||e.marketingMethod==null?(C(),S(Ie,{key:0,type:3})):(C(),S(Ue,{key:1,type:3}))]),_:1},8,["disabled"])):T("",!0),e.discountCode3.status==w(D).APPROVED.value?(C(),N("span",Ls,[k("Number of times used: "),p("a",Ns,P(e.discountCode3.inviteNum),1)])):T("",!0)])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])],64))}}),Fs=St(Ms,[["__scopeId","data-v-63ab8ca8"]]),Ds=p("h1",{class:"mt-2 font-weight-medium",style:{"line-height":"1.2"}},"Become a JetPrint Affiliate",-1),Is=p("p",{class:"text-h5 mt-5"},"To become a JetPrint Affiliate, you need to meet the following conditions:",-1),Us={class:"d-flex ga-2 align-center mt-3"},Bs={class:"d-flex ga-2 align-center mt-3"},js=p("h4",{class:"mt-1 font-weight-medium"},"Affiliate Program Options",-1),Xs=W({__name:"Eligible",setup(e){_e([0,1,2,3,4]);const t=A(""),n=en(),o=he(),s=G(()=>(console.log("computed...",o.marketingUserInfo),o.marketingUserInfo)),r=G(()=>(console.log("computed...",o.merchantInfoMutations),o.merchantInfoMutations.login));r.value&&(i(),l());function i(){return Z().marketingConfigGet().then(h=>{t.value=h.data,console.log("marketingApi...",h)})}function l(){return n.marketingCurrentInfo().then(a=>{a.data.marketingMethod==2?(a.data.affiliateLink=a.data.affiliateLink||{},a.data.discountCode1={},a.data.discountCode2={},a.data.discountCode3={}):a.data.marketingMethod==1?(a.data.affiliateLink={},a.data.discountCode1=a.data.discountCode1||{},a.data.discountCode2=a.data.discountCode2||{},a.data.discountCode3=a.data.discountCode3||{}):(!a.data.marketingMethod||a.data.marketingMethod==undifined)&&(a.data.marketingMethod=null,a.data.affiliateLink={},a.data.discountCode1=a.data.discountCode1||{},a.data.discountCode2=a.data.discountCode2||{},a.data.discountCode3=a.data.discountCode3||{}),he().SET_MARKETING_USER_INFO(a.data),console.log("res...",a)})}tn("getMarketingUserInfo",l);const f=Ke([{title:"Affiliate",disabled:!0,to:"/affiliate"}]);return(a,h)=>(C(),N(X,null,[u(on,{title:"Affiliate",breadcrumbs:f},null,8,["breadcrumbs"]),s.value.marketingMethod||s.value.marketingMethod==null?(C(),S(Y,{key:0},{default:d(()=>[u(j,{cols:"24",md:"12"},{default:d(()=>[u(H,{variant:"flat",class:"p-l-20"},{default:d(()=>[u($,{class:"pb-5"},{default:d(()=>[u(Y,{class:"pb-4"},{default:d(()=>[u(j,{cols:"19",md:"9"},{default:d(()=>[Ds,Is,p("div",Us,[u(U,{src:s.value&&s.value.customProductNumValid&&r.value?w(st):w(ot),width:24,height:24,inline:""},null,8,["src"]),p("span",null,"Already designed more than "+P(t.value?t.value.productNumThreshold:5)+" products.",1)]),p("div",Bs,[u(U,{src:s.value&&s.value.orderAmountValid&&r.value?w(st):w(ot),width:24,height:24,inline:""},null,8,["src"]),p("span",null,"The paid order amount exceeds $"+P(t.value?t.value.orderAmountThreshold:50)+" (refunded products are not included)",1)])]),_:1}),u(j,{cols:"5",md:"2"},{default:d(()=>[u(U,{src:w(sn),style:{"margin-top":"-12px"}},null,8,["src"])]),_:1})]),_:1}),u(H,{variant:"flat"},{default:d(()=>[u(H,{variant:"outlined",class:"overflow-hidden"},{default:d(()=>[u(qe,null,{default:d(()=>[u(Ge,null,{title:d(()=>[js]),_:1})]),_:1}),u(We),u($,null,{default:d(()=>[s.value&&JSON.stringify(s.value)!="{}"?(C(),S(rs,{key:0,customProductNumValid:s.value.customProductNumValid,orderAmountValid:s.value.orderAmountValid,affiliateLink:s.value.affiliateLink,marketingMethod:s.value.marketingMethod,affiliateLinkValid:s.value.affiliateLinkValid},null,8,["customProductNumValid","orderAmountValid","affiliateLink","marketingMethod","affiliateLinkValid"])):T("",!0)]),_:1}),u($,{class:"pb-5"},{default:d(()=>[s.value&&JSON.stringify(s.value)!="{}"?(C(),S(Fs,{key:0,configInfo:t.value,customProductNumValid:s.value.customProductNumValid,orderAmountValid:s.value.orderAmountValid,marketingMethod:s.value.marketingMethod,discountCode1:s.value.discountCode1,discountCode2:s.value.discountCode2,discountCode3:s.value.discountCode3,discountCode1Valid:s.value.discountCode1Valid,discountCode2Valid:s.value.discountCode2Valid,discountCode3Valid:s.value.discountCode3Valid},null,8,["configInfo","customProductNumValid","orderAmountValid","marketingMethod","discountCode1","discountCode2","discountCode3","discountCode1Valid","discountCode2Valid","discountCode3Valid"])):T("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):T("",!0),r.value?(C(),S(Y,{key:1,class:"mt-3"},{default:d(()=>[u(j,{cols:"24",md:"12"},{default:d(()=>[u(H,{variant:"flat",class:"p-l-20 mt-4"},{default:d(()=>[u($,null,{default:d(()=>[u(Y,null,{default:d(()=>[u(j,{cols:"12",md:"6"},{default:d(()=>[u(un)]),_:1}),u(j,{cols:"12",md:"6"},{default:d(()=>[u(Mo)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):T("",!0)],64))}});export{Xs as default};