teko-file-history
Version:
File history component for Teko system
1 lines • 154 kB
JavaScript
import{notification as e,Card as t,Steps as r,Modal as n,Row as o,Col as i,Tag as a,Table as l,Divider as u,Typography as s,Tooltip as c,Button as f,Upload as d,Spin as p}from"antd";import*as h from"react";import m,{createContext as y,useState as g,useEffect as v,useContext as b}from"react";import w from"dayjs";import E from"antd/es/typography/Paragraph";import S from"antd/es/typography/Text";var T=function(){return T=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},T.apply(this,arguments)};function O(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function k(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function l(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,l)}u((n=n.apply(e,t||[])).next())}))}function A(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(u){return function(l){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}function x(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var C,R={DEV:"https://files.dev.tekoapis.net",STAG:"https://files.stage.tekoapis.net",PROD:"https://files.tekoapis.com"},F={DEV:"https://fps-bff.dev.tekoapis.net",STAG:"https://fps-bff.stag.tekoapis.net",PROD:"https://fps-bff.tekoapis.com"},P={DEV:"https://loyalty.develop.tekoapis.net",STAG:"https://loyalty.stage.tekoapis.net",PROD:"https://loyalty.tekoapis.com"},j={extension:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},D={extension:".pdf",mimeType:"application/pdf"},I=[{extension:".png",mimeType:"image/png"},{extension:".jpg",mimeType:"image/jpg"},{extension:".jpeg",mimeType:"image/jpeg"}],N=[{extension:".xls",mimeType:"application/vnd.ms-excel"},j,{extension:".csv",mimeType:"text/csv"},D],U={page:1,pageSize:10},_="".concat("DD/MM/YYYY"," ").concat("HH:mm:ss"),B={INIT:{code:"INIT",name:"Pending",color:"#FF7E17",colorCode:"orange"},PROCESSING:{code:"PROCESSING",name:"Processing",color:"#1954ADFF",colorCode:"blue"},FINISHED:{code:"FINISHED",name:"Finished",color:"#259B24",colorCode:"green"},FAILED:{code:"FAILED",name:"Failed",color:"#C1051C",colorCode:"red"}},M=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,L={clientId:0,env:"",language:"vi",classNames:{displayFlex:"d-flex",flexColumn:"flex-column",gapBase:"gap-base",gapHalf:"gap-half",marginBottomZero:"mb-0",marginTopHalf:"mt-half",marginHorizontalBase:"mx-base",paddingHorizontalBase:"px-base",paddingVerticalHalf:"py-half",textErrorColor:"text-error",textPrimaryColor:"text-primary"},tableProps:{isShowDebug:!0,isShowReload:!0,isShowCreatedBy:!0},uploaderProps:{importFileTemplateUrl:"",isShowUploader:!0,uploaderPosition:"right",maxFileSize:5,inputFileTypes:["xlsx"]},shouldReload:!1,setShouldReload:function(){},translate:function(e){return e}},V=y(L),z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},H={exports:{}},q=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},Y=q,W=Object.prototype.toString,G=(C=Object.create(null),function(e){var t=W.call(e);return C[t]||(C[t]=t.slice(8,-1).toLowerCase())});function J(e){return e=e.toLowerCase(),function(t){return G(t)===e}}function $(e){return Array.isArray(e)}function K(e){return void 0===e}var Z=J("ArrayBuffer");function X(e){return null!==e&&"object"==typeof e}function Q(e){if("object"!==G(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var ee=J("Date"),te=J("File"),re=J("Blob"),ne=J("FileList");function oe(e){return"[object Function]"===W.call(e)}var ie=J("URLSearchParams");function ae(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),$(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var le,ue=(le="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return le&&e instanceof le}),se={isArray:$,isArrayBuffer:Z,isBuffer:function(e){return null!==e&&!K(e)&&null!==e.constructor&&!K(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||W.call(e)===t||oe(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Z(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:X,isPlainObject:Q,isUndefined:K,isDate:ee,isFile:te,isBlob:re,isFunction:oe,isStream:function(e){return X(e)&&oe(e.pipe)},isURLSearchParams:ie,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:ae,merge:function e(){var t={};function r(r,n){Q(t[n])&&Q(r)?t[n]=e(t[n],r):Q(r)?t[n]=e({},r):$(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)ae(arguments[n],r);return t},extend:function(e,t,r){return ae(t,(function(t,n){e[n]=r&&"function"==typeof t?Y(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r){var n,o,i,a={};t=t||{};do{for(o=(n=Object.getOwnPropertyNames(e)).length;o-- >0;)a[i=n[o]]||(t[i]=e[i],a[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:G,kindOfTest:J,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;var t=e.length;if(K(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:ue,isFileList:ne},ce=se;function fe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var de=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(ce.isURLSearchParams(t))n=t.toString();else{var o=[];ce.forEach(t,(function(e,t){null!=e&&(ce.isArray(e)?t+="[]":e=[e],ce.forEach(e,(function(e){ce.isDate(e)?e=e.toISOString():ce.isObject(e)&&(e=JSON.stringify(e)),o.push(fe(t)+"="+fe(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},pe=se;function he(){this.handlers=[]}he.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},he.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},he.prototype.forEach=function(e){pe.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var me=he,ye="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function ge(){throw new Error("setTimeout has not been defined")}function ve(){throw new Error("clearTimeout has not been defined")}var be=ge,we=ve;function Ee(e){if(be===setTimeout)return setTimeout(e,0);if((be===ge||!be)&&setTimeout)return be=setTimeout,setTimeout(e,0);try{return be(e,0)}catch(t){try{return be.call(null,e,0)}catch(t){return be.call(this,e,0)}}}"function"==typeof ye.setTimeout&&(be=setTimeout),"function"==typeof ye.clearTimeout&&(we=clearTimeout);var Se,Te=[],Oe=!1,ke=-1;function Ae(){Oe&&Se&&(Oe=!1,Se.length?Te=Se.concat(Te):ke=-1,Te.length&&xe())}function xe(){if(!Oe){var e=Ee(Ae);Oe=!0;for(var t=Te.length;t;){for(Se=Te,Te=[];++ke<t;)Se&&Se[ke].run();ke=-1,t=Te.length}Se=null,Oe=!1,function(e){if(we===clearTimeout)return clearTimeout(e);if((we===ve||!we)&&clearTimeout)return we=clearTimeout,clearTimeout(e);try{return we(e)}catch(t){try{return we.call(null,e)}catch(t){return we.call(this,e)}}}(e)}}function Ce(e,t){this.fun=e,this.array=t}Ce.prototype.run=function(){this.fun.apply(null,this.array)};function Re(){}var Fe=Re,Pe=Re,je=Re,De=Re,Ie=Re,Ne=Re,Ue=Re;var _e=ye.performance||{},Be=_e.now||_e.mozNow||_e.msNow||_e.oNow||_e.webkitNow||function(){return(new Date).getTime()};var Me=new Date;var Le={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Te.push(new Ce(e,t)),1!==Te.length||Oe||Ee(xe)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Fe,addListener:Pe,once:je,off:De,removeListener:Ie,removeAllListeners:Ne,emit:Ue,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*Be.call(_e),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Me)/1e3}},Ve=se,ze=se;function He(e,t,r,n,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}ze.inherits(He,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var qe=He.prototype,Ye={};["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"].forEach((function(e){Ye[e]={value:e}})),Object.defineProperties(He,Ye),Object.defineProperty(qe,"isAxiosError",{value:!0}),He.from=function(e,t,r,n,o,i){var a=Object.create(qe);return ze.toFlatObject(e,a,(function(e){return e!==Error.prototype})),He.call(a,e.message,t,r,n,o),a.name=e.name,i&&Object.assign(a,i),a};var We=He,Ge={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Je=[],$e=[],Ke="undefined"!=typeof Uint8Array?Uint8Array:Array,Ze=!1;function Xe(){Ze=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)Je[t]=e[t],$e[e.charCodeAt(t)]=t;$e["-".charCodeAt(0)]=62,$e["_".charCodeAt(0)]=63}function Qe(e,t,r){for(var n,o,i=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(Je[(o=n)>>18&63]+Je[o>>12&63]+Je[o>>6&63]+Je[63&o]);return i.join("")}function et(e){var t;Ze||Xe();for(var r=e.length,n=r%3,o="",i=[],a=16383,l=0,u=r-n;l<u;l+=a)i.push(Qe(e,l,l+a>u?u:l+a));return 1===n?(t=e[r-1],o+=Je[t>>2],o+=Je[t<<4&63],o+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],o+=Je[t>>10],o+=Je[t>>4&63],o+=Je[t<<2&63],o+="="),i.push(o),i.join("")}function tt(e,t,r,n,o){var i,a,l=8*o-n-1,u=(1<<l)-1,s=u>>1,c=-7,f=r?o-1:0,d=r?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-c)-1,p>>=-c,c+=l;c>0;i=256*i+e[t+f],f+=d,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=d,c-=8);if(0===i)i=1-s;else{if(i===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=s}return(p?-1:1)*a*Math.pow(2,i-n)}function rt(e,t,r,n,o,i){var a,l,u,s=8*i-o-1,c=(1<<s)-1,f=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,h=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?d/u:d*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(l=0,a=c):a+f>=1?(l=(t*u-1)*Math.pow(2,o),a+=f):(l=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+p]=255&l,p+=h,l/=256,o-=8);for(a=a<<o|l,s+=o;s>0;e[r+p]=255&a,p+=h,a/=256,s-=8);e[r+p-h]|=128*m}var nt={}.toString,ot=Array.isArray||function(e){return"[object Array]"==nt.call(e)};function it(){return lt.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function at(e,t){if(it()<t)throw new RangeError("Invalid typed array length");return lt.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=lt.prototype:(null===e&&(e=new lt(t)),e.length=t),e}function lt(e,t,r){if(!(lt.TYPED_ARRAY_SUPPORT||this instanceof lt))return new lt(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return ct(this,e)}return ut(this,e,t,r)}function ut(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);lt.TYPED_ARRAY_SUPPORT?(e=t).__proto__=lt.prototype:e=ft(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!lt.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|ht(t,r);e=at(e,n);var o=e.write(t,r);o!==n&&(e=e.slice(0,o));return e}(e,t,r):function(e,t){if(pt(t)){var r=0|dt(t.length);return 0===(e=at(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?at(e,0):ft(e,t);if("Buffer"===t.type&&ot(t.data))return ft(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function st(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function ct(e,t){if(st(t),e=at(e,t<0?0:0|dt(t)),!lt.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function ft(e,t){var r=t.length<0?0:0|dt(t.length);e=at(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function dt(e){if(e>=it())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+it().toString(16)+" bytes");return 0|e}function pt(e){return!(null==e||!e._isBuffer)}function ht(e,t){if(pt(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Vt(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return zt(e).length;default:if(n)return Vt(e).length;t=(""+t).toLowerCase(),n=!0}}function mt(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ft(this,t,r);case"utf8":case"utf-8":return At(this,t,r);case"ascii":return Ct(this,t,r);case"latin1":case"binary":return Rt(this,t,r);case"base64":return kt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function yt(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function gt(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=lt.from(t,n)),pt(t))return 0===t.length?-1:vt(e,t,r,n,o);if("number"==typeof t)return t&=255,lt.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):vt(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function vt(e,t,r,n,o){var i,a=1,l=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,l/=2,u/=2,r/=2}function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var c=-1;for(i=r;i<l;i++)if(s(e,i)===s(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===u)return c*a}else-1!==c&&(i-=i-c),c=-1}else for(r+u>l&&(r=l-u),i=r;i>=0;i--){for(var f=!0,d=0;d<u;d++)if(s(e,i+d)!==s(t,d)){f=!1;break}if(f)return i}return-1}function bt(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var l=parseInt(t.substr(2*a,2),16);if(isNaN(l))return a;e[r+a]=l}return a}function wt(e,t,r,n){return Ht(Vt(t,e.length-r),e,r,n)}function Et(e,t,r,n){return Ht(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function St(e,t,r,n){return Et(e,t,r,n)}function Tt(e,t,r,n){return Ht(zt(t),e,r,n)}function Ot(e,t,r,n){return Ht(function(e,t){for(var r,n,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function kt(e,t,r){return 0===t&&r===e.length?et(e):et(e.slice(t,r))}function At(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,a,l,u,s=e[o],c=null,f=s>239?4:s>223?3:s>191?2:1;if(o+f<=r)switch(f){case 1:s<128&&(c=s);break;case 2:128==(192&(i=e[o+1]))&&(u=(31&s)<<6|63&i)>127&&(c=u);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(u=(15&s)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:i=e[o+1],a=e[o+2],l=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&l)&&(u=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&l)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=f}return function(e){var t=e.length;if(t<=xt)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=xt));return r}(n)}lt.TYPED_ARRAY_SUPPORT=void 0===ye.TYPED_ARRAY_SUPPORT||ye.TYPED_ARRAY_SUPPORT,it(),lt.poolSize=8192,lt._augment=function(e){return e.__proto__=lt.prototype,e},lt.from=function(e,t,r){return ut(null,e,t,r)},lt.TYPED_ARRAY_SUPPORT&&(lt.prototype.__proto__=Uint8Array.prototype,lt.__proto__=Uint8Array),lt.alloc=function(e,t,r){return function(e,t,r,n){return st(t),t<=0?at(e,t):void 0!==r?"string"==typeof n?at(e,t).fill(r,n):at(e,t).fill(r):at(e,t)}(null,e,t,r)},lt.allocUnsafe=function(e){return ct(null,e)},lt.allocUnsafeSlow=function(e){return ct(null,e)},lt.isBuffer=function(e){return null!=e&&(!!e._isBuffer||qt(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&qt(e.slice(0,0))}(e))},lt.compare=function(e,t){if(!pt(e)||!pt(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},lt.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},lt.concat=function(e,t){if(!ot(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return lt.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=lt.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(!pt(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},lt.byteLength=ht,lt.prototype._isBuffer=!0,lt.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)yt(this,t,t+1);return this},lt.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)yt(this,t,t+3),yt(this,t+1,t+2);return this},lt.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)yt(this,t,t+7),yt(this,t+1,t+6),yt(this,t+2,t+5),yt(this,t+3,t+4);return this},lt.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?At(this,0,e):mt.apply(this,arguments)},lt.prototype.equals=function(e){if(!pt(e))throw new TypeError("Argument must be a Buffer");return this===e||0===lt.compare(this,e)},lt.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},lt.prototype.compare=function(e,t,r,n,o){if(!pt(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),l=Math.min(i,a),u=this.slice(n,o),s=e.slice(t,r),c=0;c<l;++c)if(u[c]!==s[c]){i=u[c],a=s[c];break}return i<a?-1:a<i?1:0},lt.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},lt.prototype.indexOf=function(e,t,r){return gt(this,e,t,r,!0)},lt.prototype.lastIndexOf=function(e,t,r){return gt(this,e,t,r,!1)},lt.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return bt(this,e,t,r);case"utf8":case"utf-8":return wt(this,e,t,r);case"ascii":return Et(this,e,t,r);case"latin1":case"binary":return St(this,e,t,r);case"base64":return Tt(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ot(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},lt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var xt=4096;function Ct(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function Rt(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function Ft(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=Lt(e[i]);return o}function Pt(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function jt(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function Dt(e,t,r,n,o,i){if(!pt(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function It(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-r,2);o<i;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function Nt(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-r,4);o<i;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function Ut(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function _t(e,t,r,n,o){return o||Ut(e,0,r,4),rt(e,t,r,n,23,4),r+4}function Bt(e,t,r,n,o){return o||Ut(e,0,r,8),rt(e,t,r,n,52,8),r+8}lt.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),lt.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=lt.prototype;else{var o=t-e;r=new lt(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+e]}return r},lt.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||jt(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},lt.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||jt(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},lt.prototype.readUInt8=function(e,t){return t||jt(e,1,this.length),this[e]},lt.prototype.readUInt16LE=function(e,t){return t||jt(e,2,this.length),this[e]|this[e+1]<<8},lt.prototype.readUInt16BE=function(e,t){return t||jt(e,2,this.length),this[e]<<8|this[e+1]},lt.prototype.readUInt32LE=function(e,t){return t||jt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},lt.prototype.readUInt32BE=function(e,t){return t||jt(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},lt.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||jt(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},lt.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||jt(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},lt.prototype.readInt8=function(e,t){return t||jt(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},lt.prototype.readInt16LE=function(e,t){t||jt(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},lt.prototype.readInt16BE=function(e,t){t||jt(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},lt.prototype.readInt32LE=function(e,t){return t||jt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},lt.prototype.readInt32BE=function(e,t){return t||jt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},lt.prototype.readFloatLE=function(e,t){return t||jt(e,4,this.length),tt(this,e,!0,23,4)},lt.prototype.readFloatBE=function(e,t){return t||jt(e,4,this.length),tt(this,e,!1,23,4)},lt.prototype.readDoubleLE=function(e,t){return t||jt(e,8,this.length),tt(this,e,!0,52,8)},lt.prototype.readDoubleBE=function(e,t){return t||jt(e,8,this.length),tt(this,e,!1,52,8)},lt.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||Dt(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},lt.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||Dt(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},lt.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,1,255,0),lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},lt.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,2,65535,0),lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):It(this,e,t,!0),t+2},lt.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,2,65535,0),lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):It(this,e,t,!1),t+2},lt.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,4,4294967295,0),lt.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Nt(this,e,t,!0),t+4},lt.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,4,4294967295,0),lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Nt(this,e,t,!1),t+4},lt.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);Dt(this,e,t,r,o-1,-o)}var i=0,a=1,l=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===l&&0!==this[t+i-1]&&(l=1),this[t+i]=(e/a|0)-l&255;return t+r},lt.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);Dt(this,e,t,r,o-1,-o)}var i=r-1,a=1,l=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===l&&0!==this[t+i+1]&&(l=1),this[t+i]=(e/a|0)-l&255;return t+r},lt.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,1,127,-128),lt.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},lt.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,2,32767,-32768),lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):It(this,e,t,!0),t+2},lt.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,2,32767,-32768),lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):It(this,e,t,!1),t+2},lt.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,4,2147483647,-2147483648),lt.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Nt(this,e,t,!0),t+4},lt.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Dt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),lt.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Nt(this,e,t,!1),t+4},lt.prototype.writeFloatLE=function(e,t,r){return _t(this,e,t,!0,r)},lt.prototype.writeFloatBE=function(e,t,r){return _t(this,e,t,!1,r)},lt.prototype.writeDoubleLE=function(e,t,r){return Bt(this,e,t,!0,r)},lt.prototype.writeDoubleBE=function(e,t,r){return Bt(this,e,t,!1,r)},lt.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,i=n-r;if(this===e&&r<t&&t<n)for(o=i-1;o>=0;--o)e[o+t]=this[o+r];else if(i<1e3||!lt.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},lt.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!lt.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var a=pt(e)?e:Vt(new lt(e,n).toString()),l=a.length;for(i=0;i<r-t;++i)this[i+t]=a[i%l]}return this};var Mt=/[^+\/0-9A-Za-z-_]/g;function Lt(e){return e<16?"0"+e.toString(16):e.toString(16)}function Vt(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function zt(e){return function(e){var t,r,n,o,i,a;Ze||Xe();var l=e.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[l-2]?2:"="===e[l-1]?1:0,a=new Ke(3*l/4-i),n=i>0?l-4:l;var u=0;for(t=0,r=0;t<n;t+=4,r+=3)o=$e[e.charCodeAt(t)]<<18|$e[e.charCodeAt(t+1)]<<12|$e[e.charCodeAt(t+2)]<<6|$e[e.charCodeAt(t+3)],a[u++]=o>>16&255,a[u++]=o>>8&255,a[u++]=255&o;return 2===i?(o=$e[e.charCodeAt(t)]<<2|$e[e.charCodeAt(t+1)]>>4,a[u++]=255&o):1===i&&(o=$e[e.charCodeAt(t)]<<10|$e[e.charCodeAt(t+1)]<<4|$e[e.charCodeAt(t+2)]>>2,a[u++]=o>>8&255,a[u++]=255&o),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Mt,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Ht(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function qt(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var Yt=se;var Wt=function(e,t){t=t||new FormData;var r=[];function n(e){return null===e?"":Yt.isDate(e)?e.toISOString():Yt.isArrayBuffer(e)||Yt.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):lt.from(e):e}return function e(o,i){if(Yt.isPlainObject(o)||Yt.isArray(o)){if(-1!==r.indexOf(o))throw Error("Circular reference detected in "+i);r.push(o),Yt.forEach(o,(function(r,o){if(!Yt.isUndefined(r)){var a,l=i?i+"."+o:o;if(r&&!i&&"object"==typeof r)if(Yt.endsWith(o,"{}"))r=JSON.stringify(r);else if(Yt.endsWith(o,"[]")&&(a=Yt.toArray(r)))return void a.forEach((function(e){!Yt.isUndefined(e)&&t.append(l,n(e))}));e(r,l)}})),r.pop()}else t.append(i,n(o))}(e),t},Gt=We,Jt=se,$t=Jt.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),Jt.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Jt.isString(n)&&a.push("path="+n),Jt.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},Kt=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},Zt=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},Xt=function(e,t){return e&&!Kt(t)?Zt(e,t):t},Qt=se,er=["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"],tr=se,rr=tr.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=tr.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},nr=We;function or(e){nr.call(this,null==e?"canceled":e,nr.ERR_CANCELED),this.name="CanceledError"}se.inherits(or,nr,{__CANCEL__:!0});var ir=or,ar=se,lr=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Gt("Request failed with status code "+r.status,[Gt.ERR_BAD_REQUEST,Gt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)},ur=$t,sr=de,cr=Xt,fr=function(e){var t,r,n,o={};return e?(Qt.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=Qt.trim(e.substr(0,n)).toLowerCase(),r=Qt.trim(e.substr(n+1)),t){if(o[t]&&er.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o},dr=rr,pr=Ge,hr=We,mr=ir,yr=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""},gr=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,a=e.responseType;function l(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}ar.isFormData(o)&&ar.isStandardBrowserEnv()&&delete i["Content-Type"];var u=new XMLHttpRequest;if(e.auth){var s=e.auth.username||"",c=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(s+":"+c)}var f=cr(e.baseURL,e.url);function d(){if(u){var n="getAllResponseHeaders"in u?fr(u.getAllResponseHeaders()):null,o={data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:e,request:u};lr((function(e){t(e),l()}),(function(e){r(e),l()}),o),u=null}}if(u.open(e.method.toUpperCase(),sr(f,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(r(new hr("Request aborted",hr.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new hr("Network Error",hr.ERR_NETWORK,e,u,u)),u=null},u.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||pr;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new hr(t,n.clarifyTimeoutError?hr.ETIMEDOUT:hr.ECONNABORTED,e,u)),u=null},ar.isStandardBrowserEnv()){var p=(e.withCredentials||dr(f))&&e.xsrfCookieName?ur.read(e.xsrfCookieName):void 0;p&&(i[e.xsrfHeaderName]=p)}"setRequestHeader"in u&&ar.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:u.setRequestHeader(t,e)})),ar.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&"json"!==a&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){u&&(r(!e||e&&e.type?new mr:e),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||(o=null);var h=yr(f);h&&-1===["http","https","file"].indexOf(h)?r(new hr("Unsupported protocol "+h+":",hr.ERR_BAD_REQUEST,e)):u.send(o)}))},vr=se,br=function(e,t){Ve.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},wr=We,Er=Wt,Sr={"Content-Type":"application/x-www-form-urlencoded"};function Tr(e,t){!vr.isUndefined(e)&&vr.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Or,kr={transitional:Ge,adapter:(("undefined"!=typeof XMLHttpRequest||"[object process]"===Object.prototype.toString.call(Le))&&(Or=gr),Or),transformRequest:[function(e,t){if(br(t,"Accept"),br(t,"Content-Type"),vr.isFormData(e)||vr.isArrayBuffer(e)||vr.isBuffer(e)||vr.isStream(e)||vr.isFile(e)||vr.isBlob(e))return e;if(vr.isArrayBufferView(e))return e.buffer;if(vr.isURLSearchParams(e))return Tr(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,n=vr.isObject(e),o=t&&t["Content-Type"];if((r=vr.isFileList(e))||n&&"multipart/form-data"===o){var i=this.env&&this.env.FormData;return Er(r?{"files[]":e}:e,i&&new i)}return n||"application/json"===o?(Tr(t,"application/json"),function(e,t,r){if(vr.isString(e))try{return(t||JSON.parse)(e),vr.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||kr.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&vr.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw wr.from(e,wr.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:null},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};vr.forEach(["delete","get","head"],(function(e){kr.headers[e]={}})),vr.forEach(["post","put","patch"],(function(e){kr.headers[e]=vr.merge(Sr)}));var Ar=kr,xr=se,Cr=Ar,Rr=function(e){return!(!e||!e.__CANCEL__)},Fr=se,Pr=function(e,t,r){var n=this||Cr;return xr.forEach(r,(function(r){e=r.call(n,e,t)})),e},jr=Rr,Dr=Ar,Ir=ir;function Nr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ir}var Ur=se,_r=function(e,t){t=t||{};var r={};function n(e,t){return Ur.isPlainObject(e)&&Ur.isPlainObject(t)?Ur.merge(e,t):Ur.isPlainObject(t)?Ur.merge({},t):Ur.isArray(t)?t.slice():t}function o(r){return Ur.isUndefined(t[r])?Ur.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function i(e){if(!Ur.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return Ur.isUndefined(t[r])?Ur.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function l(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var u={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:l};return Ur.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||o,n=t(e);Ur.isUndefined(n)&&t!==l||(r[e]=n)})),r},Br="0.27.2",Mr=Br,Lr=We,Vr={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Vr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var zr={};Vr.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Mr+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new Lr(n(o," has been removed"+(t?" in "+t:"")),Lr.ERR_DEPRECATED);return t&&!zr[o]&&(zr[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var Hr={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Lr("options must be an object",Lr.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var l=e[i],u=void 0===l||a(l,i,e);if(!0!==u)throw new Lr("option "+i+" must be "+u,Lr.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Lr("Unknown option "+i,Lr.ERR_BAD_OPTION)}},validators:Vr},qr=se,Yr=de,Wr=me,Gr=function(e){return Nr(e),e.headers=e.headers||{},e.data=Pr.call(e,e.data,e.headers,e.transformRequest),e.headers=Fr.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),Fr.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Dr.adapter)(e).then((function(t){return Nr(e),t.data=Pr.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return jr(t)||(Nr(e),t&&t.response&&(t.response.data=Pr.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Jr=_r,$r=Xt,Kr=Hr,Zr=Kr.validators;function Xr(e){this.defaults=e,this.interceptors={request:new Wr,response:new Wr}}Xr.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Jr(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Kr.assertOptions(r,{silentJSONParsing:Zr.transitional(Zr.boolean),forcedJSONParsing:Zr.transitional(Zr.boolean),clarifyTimeoutError:Zr.transitional(Zr.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var l=[Gr,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(a),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var u=t;n.length;){var s=n.shift(),c=n.shift();try{u=s(u)}catch(e){c(e);break}}try{i=Gr(u)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},Xr.prototype.getUri=function(e){e=Jr(this.defaults,e);var t=$r(e.baseURL,e.url);return Yr(t,e.params,e.paramsSerializer)},qr.forEach(["delete","get","head","options"],(function(e){Xr.prototype[e]=function(t,r){return this.request(Jr(r||{},{method:e,url:t,data:(r||{}).data}))}})),qr.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(Jr(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Xr.prototype[e]=t(),Xr.prototype[e+"Form"]=t(!0)}));var Qr=Xr,en=ir;function tn(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new en(e),t(r.reason))}))}tn.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},tn.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},tn.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},tn.source=function(){var e;return{token:new tn((function(t){e=t})),cancel:e}};var rn=tn,nn=se,on=se,an=q,ln=Qr,un=_r;var sn=function e(t){var r=new ln(t),n=an(ln.prototype.request,r);return on.extend(n,ln.prototype,r),on.extend(n,r),n.create=function(r){return e(un(t,r))},n}(Ar);sn.Axios=ln,sn.CanceledError=ir,sn.CancelToken=rn,sn.isCancel=Rr,sn.VERSION=Br,sn.toFormData=Wt,sn.AxiosError=We,sn.Cancel=sn.CanceledError,sn.all=function(e){return Promise.all(e)},sn.spread=function(e){return function(t){return e.apply(null,t)}},sn.isAxiosError=function(e){return nn.isObject(e)&&!0===e.isAxiosError},H.exports=sn,H.exports.default=sn;var cn=H.exports,fn=function(e,t){var r=13===e.toString().length?e/1e3:e;return w.unix(r).format(null!=t?t:_)},dn=function(e,t){var r=e.clientId,n=e.tableProps,o=void 0===n?{}:n,i=e.classNames,a=void 0===i?{}:i,l=e.uploaderProps,u=void 0===l?{}:l,s=e.isOverwriteDBConfig,c=void 0!==s&&s,f=O(e,["clientId","tableProps","classNames","uploaderProps","isOverwriteDBConfig"]),d=t.clientId,p=t.uiConfig,h=(void 0===p?{}:p).importHistoryTable,m=void 0===h?{}:h,y=O(t,["clientId","uiConfig"]),g=L.tableProps,v=L.uploaderProps,b=L.classNames,w=O(L,["tableProps","uploaderProps","classNames"]);return T(T(T({},w),{clientId:null!=d?d:r,classNames:T(T({},b),a),tableProps:T({},c?T(T(T({},g),m),o):T(T(T({},g),o),m)),uploaderProps:T({},c?T(T(T({},v),y),u):T(T(T({},v),u),y))}),f)},pn=function(t,r){var n,o,i,a,l;if(!cn.isCancel(t)){var u=t.response,s=null!==(l=null!==(o=null===(n=null==u?void 0:u.data)||void 0===n?void 0:n.message)&&void 0!==o?o:null===(a=null===(i=null==u?void 0:u.data)||void 0===i?void 0:i.error)||void 0===a?void 0:a.message)&&void 0!==l?l:r("SomethingWentWrongTryAgainLater");e.error({message:r("Error"),description:s})}},hn=function(t){"http"===(window.origin||window.location.origin||"").split(":")[0]&&e.error({message:"Error",description:t})},mn=function(e){switch(e){case"en":default:return"en-US";case"vi":return"vi";case"fr":return"fr";case"id":return"id";case"km":return"km";case"ms":return"ms";case"zh":return"zh-Hans"}},yn={exports:{}};yn.exports=function e(t,r,n){var o,i,a=window,l="application/octet-stream",u=n||l,s=t,c=!r&&!n&&s,f=document.createElement("a"),d=function(e){return String(e)},p=a.Blob||a.MozBlob||a.WebKitBlob||d,h=r||"download";if(p=p.call?p.bind(a):Blob,"true"===String(this)&&(u=(s=[s,u])[0],s=s[1]),c&&c.length<2048&&(h=c.split("/").pop().split("?")[0],f.href=c,-1!==f.href.indexOf(c))){var m=new XMLHttpRequest;return m.open("GET",c,!0),m.responseType="blob",m.onload=function(t){e(t.target.response,h,l)},setTimeout((function(){m.send()}),0),m}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(s)){if(!(s.length>2096103.424&&p!==d))return navigator.msSaveBlob?navigator.msSaveBlob(b(s),h):w(s);u=(s=b(s)).type||l}else if(/([\x80-\xff])/.test(s)){for(var y=0,g=new Uint8Array(s.length),v=g.length;y<v;++y)g[y]=s.charCodeAt(y);s=new p([g],{type:u})}function b(e){for(var t=e.split(/[:;,]/),r=t[1],n=("base64"==t[2]?atob:decodeURIComponent)(t.pop()),o=n.length,i=0,a=new Uint8Array(o);i<o;++i)a[i]=n.charCodeAt(i);return new p([a],{type:r})}function w(e,t){if("download"in f)return f.href=e,f.setAttribute("download",h),f.className="download-js-link",f.innerHTML="downloading...",f.style.display="none",document.body.appendChild(f),setTimeout((function(){f.click(),document.body.removeChild(f),!0===t&&setTimeout((function(){a.URL.revokeObjectURL(f.href)}),250)}),66),!0;if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent))return/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,l)),window.open(e)||confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")&&(location.href=e),!0;var r=document.createElement("iframe");document.body.appendChild(r),!t&&/^data:/.test(e)&&(e="data:"+e.replace(/^data:([\w\/\-\+]+)/,l)),r.src=e,setTimeout((function(){docu