dreamworks/dist/js/731.67cb7b01.js
2023-09-05 10:31:00 +08:00

2 lines
25 KiB
JavaScript

(self["webpackChunkvue_dreamfactory"]=self["webpackChunkvue_dreamfactory"]||[]).push([[731],{6265:function(e,t,n){e.exports=n(9435)},4951:function(e,t,n){"use strict";n(2801);var r=n(6642),o=n(6806),i=n(3833),s=n(2285),a=n(5047),u=n(5976),c=n(9896),f=n(8507),l=n(3303),d=n(6090),p=n(1874);e.exports=function(e){return new Promise((function(t,n){var h,m=e.data,v=e.headers,g=e.responseType;function w(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete v["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";v.Authorization="Basic "+btoa(E+":"+b)}var x=a(e.baseURL,e.url);function _(){if(y){var r="getAllResponseHeaders"in y?u(y.getAllResponseHeaders()):null,i=g&&"text"!==g&&"json"!==g?y.response:y.responseText,s={data:i,status:y.status,statusText:y.statusText,headers:r,config:e,request:y};o((function(e){t(e),w()}),(function(e){n(e),w()}),s),y=null}}if(y.open(e.method.toUpperCase(),s(x,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=_:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(_)},y.onabort=function(){y&&(n(new l("Request aborted",l.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new l("Network Error",l.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||f;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new l(t,r.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,e,y)),y=null},r.isStandardBrowserEnv()){var O=(e.withCredentials||c(x))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;O&&(v[e.xsrfHeaderName]=O)}"setRequestHeader"in y&&r.forEach(v,(function(e,t){"undefined"===typeof m&&"content-type"===t.toLowerCase()?delete v[t]:y.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),g&&"json"!==g&&(y.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){y&&(n(!e||e&&e.type?new d:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),m||(m=null);var R=p(x);R&&-1===["http","https","file"].indexOf(R)?n(new l("Unsupported protocol "+R+":",l.ERR_BAD_REQUEST,e)):y.send(m)}))}},9435:function(e,t,n){"use strict";var r=n(6642),o=n(5955),i=n(7104),s=n(8186),a=n(7);function u(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n.create=function(t){return u(s(e,t))},n}var c=u(a);c.Axios=i,c.CanceledError=n(6090),c.CancelToken=n(6016),c.isCancel=n(5936),c.VERSION=n(4679).version,c.toFormData=n(8994),c.AxiosError=n(3303),c.Cancel=c.CanceledError,c.all=function(e){return Promise.all(e)},c.spread=n(5431),c.isAxiosError=n(786),e.exports=c,e.exports["default"]=c},6016:function(e,t,n){"use strict";n(1703);var r=n(6090);function o(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e,t=new o((function(t){e=t}));return{token:t,cancel:e}},e.exports=o},6090:function(e,t,n){"use strict";var r=n(3303),o=n(6642);function i(e){r.call(this,null==e?"canceled":e,r.ERR_CANCELED),this.name="CanceledError"}o.inherits(i,r,{__CANCEL__:!0}),e.exports=i},5936:function(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},7104:function(e,t,n){"use strict";var r=n(6642),o=n(2285),i=n(999),s=n(6559),a=n(8186),u=n(5047),c=n(6298),f=c.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=a(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:f.transitional(f.boolean),forcedJSONParsing:f.transitional(f.boolean),clarifyTimeoutError:f.transitional(f.boolean)},!1);var r=[],o=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var i,u=[];if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!o){var l=[s,void 0];Array.prototype.unshift.apply(l,r),l=l.concat(u),i=Promise.resolve(t);while(l.length)i=i.then(l.shift(),l.shift());return i}var d=t;while(r.length){var p=r.shift(),h=r.shift();try{d=p(d)}catch(m){h(m);break}}try{i=s(d)}catch(m){return Promise.reject(m)}while(u.length)i=i.then(u.shift(),u.shift());return i},l.prototype.getUri=function(e){e=a(this.defaults,e);var t=u(e.baseURL,e.url);return o(t,e.params,e.paramsSerializer)},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(a(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}l.prototype[e]=t(),l.prototype[e+"Form"]=t(!0)})),e.exports=l},3303:function(e,t,n){"use strict";n(1703);var r=n(6642);function o(e,t,n,r,o){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}r.inherits(o,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 i=o.prototype,s={};["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){s[e]={value:e}})),Object.defineProperties(o,s),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(e,t,n,s,a,u){var c=Object.create(i);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),o.call(c,e.message,t,n,s,a),c.name=e.name,u&&Object.assign(c,u),c},e.exports=o},999:function(e,t,n){"use strict";var r=n(6642);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},5047:function(e,t,n){"use strict";var r=n(4777),o=n(2381);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},6559:function(e,t,n){"use strict";var r=n(6642),o=n(3756),i=n(5936),s=n(7),a=n(6090);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){u(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||s.adapter;return t(e).then((function(t){return u(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(u(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},8186:function(e,t,n){"use strict";var r=n(6642);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function s(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function u(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var c={url:s,method:s,data:s,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:u};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,o=t(e);r.isUndefined(o)&&t!==u||(n[e]=o)})),n}},6806:function(e,t,n){"use strict";var r=n(3303);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new r("Request failed with status code "+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},3756:function(e,t,n){"use strict";var r=n(6642),o=n(7);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},7:function(e,t,n){"use strict";var r=n(6642),o=n(1446),i=n(3303),s=n(8507),a=n(8994),u={"Content-Type":"application/x-www-form-urlencoded"};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function f(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(4951)),e}function l(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(o){if("SyntaxError"!==o.name)throw o}return(n||JSON.stringify)(e)}var d={transitional:s,adapter:f(),transformRequest:[function(e,t){if(o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var n,i=r.isObject(e),s=t&&t["Content-Type"];if((n=r.isFileList(e))||i&&"multipart/form-data"===s){var u=this.env&&this.env.FormData;return a(n?{"files[]":e}:e,u&&new u)}return i||"application/json"===s?(c(t,"application/json"),l(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(s){if("SyntaxError"===a.name)throw i.from(a,i.ERR_BAD_RESPONSE,this,null,this.response);throw a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(1051)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){d.headers[e]=r.merge(u)})),e.exports=d},8507:function(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},4679:function(e){e.exports={version:"0.27.2"}},5955:function(e){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},2285:function(e,t,n){"use strict";var r=n(6642);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))})))})),i=s.join("&")}if(i){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},2381:function(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},3833:function(e,t,n){"use strict";var r=n(6642);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,s){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(i)&&a.push("domain="+i),!0===s&&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)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},4777:function(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},786:function(e,t,n){"use strict";var r=n(6642);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},9896:function(e,t,n){"use strict";var r=n(6642);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{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 e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return function(){return!0}}()},1446:function(e,t,n){"use strict";var r=n(6642);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},1051:function(e){e.exports=null},5976:function(e,t,n){"use strict";var r=n(6642),o=["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"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}})),s):s}},1874:function(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}},5431:function(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},8994:function(e,t,n){"use strict";n(1703);var r=n(6642);function o(e,t){t=t||new FormData;var n=[];function o(e){return null===e?"":r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function i(e,s){if(r.isPlainObject(e)||r.isArray(e)){if(-1!==n.indexOf(e))throw Error("Circular reference detected in "+s);n.push(e),r.forEach(e,(function(e,n){if(!r.isUndefined(e)){var a,u=s?s+"."+n:n;if(e&&!s&&"object"===typeof e)if(r.endsWith(n,"{}"))e=JSON.stringify(e);else if(r.endsWith(n,"[]")&&(a=r.toArray(e)))return void a.forEach((function(e){!r.isUndefined(e)&&t.append(u,o(e))}));i(e,u)}})),n.pop()}else t.append(s,o(e))}return i(e),t}e.exports=o},6298:function(e,t,n){"use strict";var r=n(4679).version,o=n(3303),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};function a(e,t,n){if("object"!==typeof e)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);var r=Object.keys(e),i=r.length;while(i-- >0){var s=r[i],a=t[s];if(a){var u=e[s],c=void 0===u||a(u,s,e);if(!0!==c)throw new o("option "+s+" must be "+c,o.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new o("Unknown option "+s,o.ERR_BAD_OPTION)}}i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new o(i(r," has been removed"+(t?" in "+t:"")),o.ERR_DEPRECATED);return t&&!s[r]&&(s[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:a,validators:i}},6642:function(e,t,n){"use strict";n(8675),n(7380),n(1118);var r=n(5955),o=Object.prototype.toString,i=function(e){return function(t){var n=o.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())}}(Object.create(null));function s(e){return e=e.toLowerCase(),function(t){return i(t)===e}}function a(e){return Array.isArray(e)}function u(e){return"undefined"===typeof e}function c(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var f=s("ArrayBuffer");function l(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t}function d(e){return"string"===typeof e}function p(e){return"number"===typeof e}function h(e){return null!==e&&"object"===typeof e}function m(e){if("object"!==i(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var v=s("Date"),g=s("File"),w=s("Blob"),y=s("FileList");function E(e){return"[object Function]"===o.call(e)}function b(e){return h(e)&&E(e.pipe)}function x(e){var t="[object FormData]";return e&&("function"===typeof FormData&&e instanceof FormData||o.call(e)===t||E(e.toString)&&e.toString()===t)}var _=s("URLSearchParams");function O(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function R(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function A(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}function C(){var e={};function t(t,n){m(e[n])&&m(t)?e[n]=C(e[n],t):m(t)?e[n]=C({},t):a(t)?e[n]=t.slice():e[n]=t}for(var n=0,r=arguments.length;n<r;n++)A(arguments[n],t);return e}function S(e,t,n){return A(t,(function(t,o){e[o]=n&&"function"===typeof t?r(t,n):t})),e}function j(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}function k(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)}function T(e,t,n){var r,o,i,s={};t=t||{};do{r=Object.getOwnPropertyNames(e),o=r.length;while(o-- >0)i=r[o],s[i]||(t[i]=e[i],s[i]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t}function U(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n}function N(e){if(!e)return null;var t=e.length;if(u(t))return null;var n=new Array(t);while(t-- >0)n[t]=e[t];return n}var D=function(e){return function(t){return e&&t instanceof e}}("undefined"!==typeof Uint8Array&&Object.getPrototypeOf(Uint8Array));e.exports={isArray:a,isArrayBuffer:f,isBuffer:c,isFormData:x,isArrayBufferView:l,isString:d,isNumber:p,isObject:h,isPlainObject:m,isUndefined:u,isDate:v,isFile:g,isBlob:w,isFunction:E,isStream:b,isURLSearchParams:_,isStandardBrowserEnv:R,forEach:A,merge:C,extend:S,trim:O,stripBOM:j,inherits:k,toFlatObject:T,kindOf:i,kindOfTest:s,endsWith:U,toArray:N,isTypedArray:D,isFileList:y}},2508:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return q}});var r=n(3396),o=n(9242),i=n(7139),s=n(870),a=n(11),u=n(6572),c=n(1888),f=n(1334),l=n(4075),d=n(3369),p=n(6824),h=n(8521),m=n(3289),v=n(9815),g=n(7325),w=n(9671);const y=(0,r.Uk)(" 上传游戏配置文件 "),E=(0,r.Uk)("mdi-cloud-upload"),b=(0,r.Uk)("将文件拖到此处,或"),x=(0,r._)("strong",{class:"blue--text text--lighten-1"},"点击上传",-1),_=(0,r.Uk)("只能上传 .json 格式的文件"),O=(0,r.Uk)("文件列表"),R=(0,r.Uk)(" mdi-close-circle "),A=(0,r.Uk)("提交"),C=(0,r.Uk)(" Close "),S=(0,r._)("p",{class:"text-center text-h6"},"文件上传",-1),j=(0,r._)("p",{class:"mt-2 text-center text-subtitle-2"},"资源上传中,请勿操作",-1),k=(0,r.Uk)("确定");function T(e,t,n,T,U,N){return(0,r.wg)(),(0,r.j4)(d.K,null,{default:(0,r.w5)((()=>[(0,r.Wm)(a._,{id:"drop-area",flat:""},{default:(0,r.w5)((()=>[(0,r.Wm)(u.E,{class:"text-center"},{default:(0,r.w5)((()=>[y])),_:1}),(0,r.Wm)(l.J),(0,r.Wm)(c.Z,null,{default:(0,r.w5)((()=>[(0,r.wy)((0,r._)("input",{ref:"fileinput",onChange:t[0]||(t[0]=(...e)=>N.changeFile&&N.changeFile(...e)),type:"file",multiple:"multiple"},null,544),[[o.F8,!1]]),(0,r.Wm)(a._,{id:"drop-area",onClick:N.selectFile,variant:"outlined",height:"220"},{default:(0,r.w5)((()=>[(0,r.Wm)(c.Z,null,{default:(0,r.w5)((()=>[(0,r.Wm)(p.o,{justify:"center",dense:""},{default:(0,r.w5)((()=>[(0,r.Wm)(h.D,{cols:"12",class:"text-center"},{default:(0,r.w5)((()=>[(0,r.Wm)(m.t,{size:"120"},{default:(0,r.w5)((()=>[E])),_:1})])),_:1}),(0,r.Wm)(h.D,{cols:"12",class:"text-center"},{default:(0,r.w5)((()=>[b,x])),_:1}),(0,r.Wm)(h.D,{cols:"12",class:"text-center"},{default:(0,r.w5)((()=>[_])),_:1})])),_:1})])),_:1})])),_:1},8,["onClick"]),(0,r.Wm)(a._,{variant:"outlined",class:"mt-5"},{default:(0,r.w5)((()=>[(0,r.Wm)(u.E,null,{default:(0,r.w5)((()=>[O])),_:1}),(0,r.Wm)(c.Z,null,{default:(0,r.w5)((()=>[(0,r.Wm)(p.o,null,{default:(0,r.w5)((()=>[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(U.files,((e,t)=>((0,r.wg)(),(0,r.j4)(h.D,{cols:"12",key:t},{default:(0,r.w5)((()=>[(0,r.Wm)(a._,null,{default:(0,r.w5)((()=>[(0,r.Wm)(c.Z,{class:"pa-0"},{default:(0,r.w5)((()=>[(0,r.Wm)(p.o,null,{default:(0,r.w5)((()=>[(0,r.Wm)(h.D,{cols:"10"},{default:(0,r.w5)((()=>[(0,r.Uk)((0,i.zw)(e.title),1)])),_:2},1024),(0,r.Wm)(h.D,{cols:"2",class:"d-flex justify-end"},{default:(0,r.w5)((()=>[(0,r.Wm)(s.T,{variant:"outlined",size:"x-small",icon:"",onClick:e=>N.removefile(t)},{default:(0,r.w5)((()=>[(0,r.Wm)(m.t,null,{default:(0,r.w5)((()=>[R])),_:1})])),_:2},1032,["onClick"])])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1}),(0,r.Wm)(f.h,null,{default:(0,r.w5)((()=>[(0,r.Wm)(p.o,{justify:"center"},{default:(0,r.w5)((()=>[(0,r.Wm)(h.D,{cols:"5"},{default:(0,r.w5)((()=>[(0,r.Wm)(s.T,{variant:"flat",color:"secondary",disabled:0==U.files.length,onClick:N.uploadres,block:""},{default:(0,r.w5)((()=>[A])),_:1},8,["disabled","onClick"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),(0,r.Wm)(w.v,{modelValue:U.snackbar,"onUpdate:modelValue":t[2]||(t[2]=e=>U.snackbar=e),timeout:2e3},{action:(0,r.w5)((({attrs:e})=>[(0,r.Wm)(s.T,(0,r.dG)({color:"blue",text:""},e,{onClick:t[1]||(t[1]=e=>U.snackbar=!1)}),{default:(0,r.w5)((()=>[C])),_:2},1040)])),default:(0,r.w5)((()=>[(0,r.Uk)((0,i.zw)(e.text)+" ",1)])),_:1},8,["modelValue"]),(0,r.Wm)(v.y,{"z-index":"1000",value:U.uploading},{default:(0,r.w5)((()=>[(0,r.Wm)(a._,{width:"750",height:"300",light:""},{default:(0,r.w5)((()=>[(0,r.Wm)(c.Z,null,{default:(0,r.w5)((()=>[(0,r.Wm)(a._,{height:"60",flat:""}),S,(0,r.Wm)(g.K,{color:"light-blue",height:"20",value:U.uploadprogress,striped:""},null,8,["value"]),j])),_:1}),(0,r.Wm)(f.h,{class:"d-flex justify-center"},{default:(0,r.w5)((()=>[(0,r.Wm)(s.T,{outlined:"",disabled:!U.uploading},{default:(0,r.w5)((()=>[k])),_:1},8,["disabled"])])),_:1})])),_:1})])),_:1},8,["value"])])),_:1})}n(1703);var U=n(6265),N=n.n(U),D=n(3688),P=n(5842);function W(e,t,n){return new Promise(((r,o)=>{N()({method:"post",url:e,headers:{"X-Token":P.Z.getters.token},data:t,onUploadProgress:e=>{if(e.lengthComputable){var t=Math.round(100*e.loaded/e.total);n(t)}else n(100)}}).then((e=>{const t=e.status,n=e.data;return console.log("response:%o",e),200===t?0!=n.code?101===n.code?void D.Z.replace("/login"):o(new Error("exception code:"+n.code)):r(n):o(new Error("exception status:"+t))})).catch((e=>{o(e)}))}))}var B={name:"upload",data(){return{errstr:"",snackbar:!1,files:[],uploading:!1,uploadprogress:0}},methods:{changeFile(e){let t=["json"];console.log("suffixs:%o",t);for(let i of e.target.files){let e=i.name,s=!1;var n=e.lastIndexOf(".");if(-1==n)return this.$refs.fileinput.value=null,this.errstr="目标文件格式不符合规范!",void(this.snackbar=!0);for(var r=e.substring(n+1),o=0;o<t.length;o++)if(r==t[o]){s=!0;break}if(!s)return this.$refs.fileinput.value=null,this.errstr="目标文件格式不符合规范!",void(this.snackbar=!0);this.files.push({file:i,title:i.name})}this.$refs.fileinput.value=null},selectFile(){this.$refs.fileinput.dispatchEvent(new MouseEvent("click"))},removefile(e){this.files.forEach((function(t,n,r){n==e&&r.splice(n,1)}))},uploadres(){this.uploading=!0;var e=new FormData;for(let t=0;t<this.files.length;++t)e.append("file_"+t,this.files[t].file);e.append("filenum",this.files.length),W("/upload",e,(e=>{this.uploadprogress=e,this.$forceUpdate()}))}}},L=n(89);const F=(0,L.Z)(B,[["render",T]]);var q=F}}]);
//# sourceMappingURL=731.67cb7b01.js.map