cos-wx-sdk-v5.min.js 177 KB

1
  1. !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.COS=t():e.COS=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var a=n[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/Users/tianfeng/Documents/\u9879\u76ee/sdk/cos-wx-sdk-v5/demo/lib",t(t.s=7)}([function(e,t,n){"use strict";(function(t){function i(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function a(e,t){var n=[];for(var a in e)e.hasOwnProperty(a)&&n.push(t?i(a).toLowerCase():a);return n.sort(function(e,t){return e=e.toLowerCase(),t=t.toLowerCase(),e===t?0:e>t?1:-1})}function o(e){return d(e,function(e){return"object"===(void 0===e?"undefined":f(e))&&null!==e?o(e):e})}function r(e,t,n){return e&&t in e?e[t]:n}function s(e,t){return u(t,function(n,i){e[i]=t[i]}),e}function c(e){return e instanceof Array}function l(e,t){for(var n=!1,i=0;i<e.length;i++)if(t===e[i]){n=!0;break}return n}function p(e){return c(e)?e:[e]}function u(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)}function d(e,t){var n=c(e)?[]:{};for(var i in e)e.hasOwnProperty(i)&&(n[i]=t(e[i],i));return n}function m(e,t){var n=c(e),i=n?[]:{};for(var a in e)e.hasOwnProperty(a)&&t(e[a],a)&&(n?i.push(e[a]):i[a]=e[a]);return i}var f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h=n(9),g=n(13),v=n(14),x=n(19),y=n(4),b=y.btoa,k=wx.getFileSystemManager(),C=function(e,t){var n,o,r,s=[],c=a(e);for(n=0;n<c.length;n++)o=c[n],r=void 0===e[o]||null===e[o]?"":""+e[o],o=t?i(o).toLowerCase():i(o),r=i(r)||"",s.push(o+"="+r);return s.join("&")},S=["content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","response-cache-control","response-content-disposition","response-content-encoding","response-content-language","response-content-type","response-expires","transfer-encoding","versionid"],R=function(e){var t={};for(var n in e){var i=n.toLowerCase();(i.indexOf("x-cos-")>-1||S.indexOf(i)>-1)&&(t[n]=e[n])}return t},A=function(e){e=e||{};var t,n=e.SecretId,i=e.SecretKey,r=e.KeyTime,s=(e.method||e.Method||"get").toLowerCase(),c=o(e.Query||e.params||{}),l=R(o(e.Headers||e.headers||{})),p=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+p:(t=e.Pathname||e.pathname||p,0!==t.indexOf("/")&&(t="/"+t));var u=!1!==e.ForceSignHost;if(!l.Host&&!l.host&&e.Bucket&&e.Region&&u&&(l.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),!n)return console.error("missing param SecretId");if(!i)return console.error("missing param SecretKey");var d=Math.round(U(e.SystemClockOffset)/1e3)-1,m=d,f=e.Expires||e.expires;m+=void 0===f?900:1*f||0;var h=n,v=r||d+";"+m,x=r||d+";"+m,y=a(l,!0).join(";").toLowerCase(),b=a(c,!0).join(";").toLowerCase(),k=g.HmacSHA1(x,i).toString(),C=[s,t,K.obj2str(c,!0),K.obj2str(l,!0),""].join("\n"),S=["sha1",v,g.SHA1(C).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+h,"q-sign-time="+v,"q-key-time="+x,"q-header-list="+y,"q-url-param-list="+b,"q-signature="+g.HmacSHA1(S,k).toString()].join("&")},w=function(){},T=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&null!==e[n]&&(t[n]=e[n]);return t},_=function(e,t,n,i){e?k.readFile({filePath:e,position:t,length:n-t,success:function(e){i(e.data)},fail:function(){i(null)}}):i(null)},E=function(e,t,n){n=n||w,e&&t&&t instanceof ArrayBuffer?K.getFileMd5(t,function(e,t){n(t)}):n()},B=function(e,t){var n=h(e);return t&&t(n),n},O=function(e){var t,n,i,a="";for(t=0,n=e.length/2;t<n;t++)i=parseInt(e[2*t]+e[2*t+1],16),a+=String.fromCharCode(i);return b(a)},I=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},N=function(e,t){var n=t.Bucket,i=t.Region,a=t.Key;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(!n)return"Bucket";if(!i)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e){if(!n)return"Bucket";if(!i)return"Region";if(!a)return"Key"}return!1},D=function(e,t){if(t=s({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var n=t.Headers||{};if(t&&"object"===(void 0===t?"undefined":f(t))){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(n[e]=t[e])}();var i={"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext"};K.each(i,function(e,i){void 0!==t[e]&&(n[i]=t[e])}),t.Headers=T(n)}}return t},P=function(e,n){return function(i,a){var o=this;"function"==typeof i&&(a=i,i={}),i=D(e,i);var r=function(e){return e&&e.headers&&(e.headers["x-cos-request-id"]&&(e.RequestId=e.headers["x-cos-request-id"]),e.headers["x-ci-request-id"]&&(e.RequestId=e.headers["x-ci-request-id"]),e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},s=function(e,t){a&&a(r(e),r(t))},c=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=N(e,i);if(t)return"missing param "+t;if(i.Region){if(i.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(i.Region))return"Region format error.";o.options.CompatibilityMode||-1!==i.Region.indexOf("-")||"yfb"===i.Region||"default"===i.Region||"accelerate"===i.Region||console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(i.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(i.Bucket))if(i.AppId)i.Bucket=i.Bucket+"-"+i.AppId;else{if(!o.options.AppId)return'Bucket should format as "test-1250000000".';i.Bucket=i.Bucket+"-"+o.options.AppId}i.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete i.AppId)}i.Key&&"/"===i.Key.substr(0,1)&&(i.Key=i.Key.substr(1))}}(),l="getAuth"===e||"getObjectUrl"===e,p=t.Promise;if(!l&&p&&!a)return new p(function(e,t){if(a=function(n,i){n?t(n):e(i)},c)return s({error:c});n.call(o,i,s)});if(c)return s({error:c});var u=n.call(o,i,s);return l?u:void 0}},M=function(e,t){function n(){if(a=0,t&&"function"==typeof t){i=Date.now();var n,o=Math.max(0,Math.round((s-r)/((i-c)/1e3)*100)/100)||0;n=0===s&&0===e?1:Math.floor(s/e*100)/100||0,c=i,r=s;try{t({loaded:s,total:e,speed:o,percent:n})}catch(e){}}}var i,a,o=this,r=0,s=0,c=Date.now();return function(t,i){if(t&&(s=t.loaded,e=t.total),i)clearTimeout(a),n();else{if(a)return;a=setTimeout(n,o.options.ProgressInterval)}}},j=function(e,t,n){"postObject"===e?n():"putObject"===e?void 0!==t.Body?(t.ContentLength=t.Body.byteLength,n(null,t.ContentLength)):n({error:"missing param Body"}):t.FilePath?k.stat({path:t.FilePath,success:function(e){var i=e.stats;t.FileStat=i,t.FileStat.FilePath=t.FilePath;var a=i.isDirectory()?0:i.size;t.ContentLength=a=a||0,n(null,a)},fail:function(e){n(e)}}):n({error:"missing param FilePath"})},U=function(e){return Date.now()+(e||0)},H=function(e,t){e=e.split("."),t=t.split(".");for(var n=Math.max(e.length,t.length);e.length<n;)e.push("0");for(;t.length<n;)t.push("0");for(var i=0;i<n;i++){var a=parseInt(e[i]),o=parseInt(t[i]);if(a>o)return 1;if(a<o)return-1}return 0},L=function(){var e=wx.getSystemInfoSync(),t=H(e.SDKVersion,"2.10.0")>=0,n=!t&&"devtools"===e.platform;return function(){return n&&console.warn("\u5f53\u524d\u5c0f\u7a0b\u5e8f\u7248\u672c\u5c0f\u4e8e 2.10.0\uff0c\u4e0d\u652f\u6301\u5206\u7247\u4e0a\u4f20\uff0c\u8bf7\u66f4\u65b0\u8f6f\u4ef6\u3002"),n=!1,t}}(),F=function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},z=function(e,t){var n=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===(void 0===t?"undefined":f(t))&&null!==t&&(s(e,t),(t.code||t.name)&&(e.code=t.code||t.name),t.message&&(e.message=t.message),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.code||(e.code=e.name),e.error||(e.error=o(n)),e},K={noop:w,formatParams:D,apiWrapper:P,xml2json:v,json2xml:x,md5:h,clearKey:T,fileSlice:_,getBodyMd5:E,getFileMd5:B,binaryBase64:O,extend:s,isArray:c,isInArray:l,makeArray:p,each:u,map:d,filter:m,clone:o,attr:r,uuid:I,camSafeUrlEncode:i,throttleOnProgress:M,getFileSize:j,getSkewTime:U,obj2str:C,getAuth:A,compareVersion:H,canFileSlice:L,isCIHost:F,error:z};e.exports=K}).call(t,n(2))},function(e,t,n){"use strict";function i(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}function a(e,t){if(null===e||"object"!==(void 0===e?"undefined":o(e)))throw new TypeError("target is not an object");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=i({HTML:"text/html",isHTML:function(e){return e===r.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=i({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=a,t.freeze=i,t.MIME_TYPE=r,t.NAMESPACE=s},function(e,t,n){"use strict";var i,a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"==typeof window?"undefined":a(window))&&(i=window)}e.exports=i},function(e,t,n){"use strict";function i(e){return""!==e}function a(e){return e?e.split(/[\t\n\f\r ]+/).filter(i):[]}function o(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function r(e){if(!e)return[];var t=a(e);return Object.keys(t.reduce(o,{}))}function s(e){return function(t){return e&&-1!==e.indexOf(t)}}function c(e,t){for(var n in e)t[n]=e[n]}function l(e,t){var n=e.prototype;if(!(n instanceof t)){var i=function(){};i.prototype=t.prototype,i=new i,c(n,i),e.prototype=n=i}n.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),n.constructor=e)}function p(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,de[e]),this.message=de[e],Error.captureStackTrace&&Error.captureStackTrace(this,p);return n.code=e,t&&(this.message=this.message+": "+t),n}function u(){}function d(e,t){this._node=e,this._refresh=t,m(this)}function m(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var n=e._refresh(e._node);W(e,"length",n.length),c(n,e),e._inc=t}}function f(){}function h(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function g(e,t,n,i){if(i?t[h(t,i)]=n:t[t.length++]=n,e){n.ownerElement=e;var a=e.ownerDocument;a&&(i&&R(a,e,i),S(a,e,n))}}function v(e,t,n){var i=h(t,n);if(!(i>=0))throw p(fe,new Error(e.tagName+"@"+n));for(var a=t.length-1;i<a;)t[i]=t[++i];if(t.length=a,e){var o=e.ownerDocument;o&&(R(o,e,n),n.ownerElement=null)}}function x(){}function y(){}function b(e){return"<"==e&&"&lt;"||">"==e&&"&gt;"||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function k(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(k(e,t))return!0}while(e=e.nextSibling)}function C(){}function S(e,t,n){e&&e._inc++,n.namespaceURI===Y.XMLNS&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function R(e,t,n,i){e&&e._inc++,n.namespaceURI===Y.XMLNS&&delete t._nsMap[n.prefix?n.localName:""]}function A(e,t,n){if(e&&e._inc){e._inc++;var i=t.childNodes;if(n)i[i.length++]=n;else{for(var a=t.firstChild,o=0;a;)i[o++]=a,a=a.nextSibling;i.length=o,delete i[i.length]}}}function w(e,t){var n=t.previousSibling,i=t.nextSibling;return n?n.nextSibling=i:e.firstChild=i,i?i.previousSibling=n:e.lastChild=n,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,A(e.ownerDocument,e),t}function T(e,t,n){var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===le){var a=t.firstChild;if(null==a)return t;var o=t.lastChild}else a=o=t;var r=n?n.previousSibling:e.lastChild;a.previousSibling=r,o.nextSibling=n,r?r.nextSibling=a:e.firstChild=a,null==n?e.lastChild=o:n.previousSibling=o;do{a.parentNode=e}while(a!==o&&(a=a.nextSibling));return A(e.ownerDocument||e,e),t.nodeType==le&&(t.firstChild=t.lastChild=null),t}function _(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,A(e.ownerDocument,e,t),t}function E(){this._nsMap={}}function B(){}function O(){}function I(){}function N(){}function D(){}function P(){}function M(){}function j(){}function U(){}function H(){}function L(){}function F(){}function z(e,t){var n=[],i=9==this.nodeType&&this.documentElement||this,a=i.prefix,o=i.namespaceURI;if(o&&null==a){var a=i.lookupPrefix(o);if(null==a)var r=[{namespace:o,prefix:null}]}return G(this,n,e,t,r),n.join("")}function K(e,t,n){var i=e.prefix||"",a=e.namespaceURI;if(!a)return!1;if("xml"===i&&a===Y.XML||a===Y.XMLNS)return!1;for(var o=n.length;o--;){var r=n[o];if(r.prefix===i)return r.namespace!==a}return!0}function q(e,t,n){e.push(" ",t,'="',n.replace(/[<>&"\t\n\r]/g,b),'"')}function G(e,t,n,i,a){if(a||(a=[]),i){if(!(e=i(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Z:var o=e.attributes,r=o.length,s=e.firstChild,c=e.tagName;n=Y.isHTML(e.namespaceURI)||n;var l=c;if(!n&&!e.prefix&&e.namespaceURI){for(var p,u=0;u<o.length;u++)if("xmlns"===o.item(u).name){p=o.item(u).value;break}if(!p)for(var d=a.length-1;d>=0;d--){var m=a[d];if(""===m.prefix&&m.namespace===e.namespaceURI){p=m.namespace;break}}if(p!==e.namespaceURI)for(var d=a.length-1;d>=0;d--){var m=a[d];if(m.namespace===e.namespaceURI){m.prefix&&(l=m.prefix+":"+c);break}}}t.push("<",l);for(var f=0;f<r;f++){var h=o.item(f);"xmlns"==h.prefix?a.push({prefix:h.localName,namespace:h.value}):"xmlns"==h.nodeName&&a.push({prefix:"",namespace:h.value})}for(var f=0;f<r;f++){var h=o.item(f);if(K(h,n,a)){var g=h.prefix||"",v=h.namespaceURI;q(t,g?"xmlns:"+g:"xmlns",v),a.push({prefix:g,namespace:v})}G(h,t,n,i,a)}if(c===l&&K(e,n,a)){var g=e.prefix||"",v=e.namespaceURI;q(t,g?"xmlns:"+g:"xmlns",v),a.push({prefix:g,namespace:v})}if(s||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),n&&/^script$/i.test(c))for(;s;)s.data?t.push(s.data):G(s,t,n,i,a.slice()),s=s.nextSibling;else for(;s;)G(s,t,n,i,a.slice()),s=s.nextSibling;t.push("</",l,">")}else t.push("/>");return;case se:case le:for(var s=e.firstChild;s;)G(s,t,n,i,a.slice()),s=s.nextSibling;return;case ee:return q(t,e.name,e.value);case te:return t.push(e.data.replace(/[<&>]/g,b));case ne:return t.push("<![CDATA[",e.data,"]]>");case re:return t.push("\x3c!--",e.data,"--\x3e");case ce:var x=e.publicId,y=e.systemId;if(t.push("<!DOCTYPE ",e.name),x)t.push(" PUBLIC ",x),y&&"."!=y&&t.push(" ",y),t.push(">");else if(y&&"."!=y)t.push(" SYSTEM ",y,">");else{var k=e.internalSubset;k&&t.push(" [",k,"]"),t.push(">")}return;case oe:return t.push("<?",e.target," ",e.data,"?>");case ie:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function V(e,t,n){var i;switch(t.nodeType){case Z:i=t.cloneNode(!1),i.ownerDocument=e;case le:break;case ee:n=!0}if(i||(i=t.cloneNode(!1)),i.ownerDocument=e,i.parentNode=null,n)for(var a=t.firstChild;a;)i.appendChild(V(e,a,n)),a=a.nextSibling;return i}function X(e,t,n){var i=new t.constructor;for(var a in t){var o=t[a];"object"!=(void 0===o?"undefined":Q(o))&&o!=i[a]&&(i[a]=o)}switch(t.childNodes&&(i.childNodes=new u),i.ownerDocument=e,i.nodeType){case Z:var r=t.attributes,s=i.attributes=new f,c=r.length;s._ownerElement=i;for(var l=0;l<c;l++)i.setAttributeNode(X(e,r.item(l),!0));break;case ee:n=!0}if(n)for(var p=t.firstChild;p;)i.appendChild(X(e,p,n)),p=p.nextSibling;return i}function W(e,t,n){e[t]=n}var Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$=n(1),Y=$.NAMESPACE,J={},Z=J.ELEMENT_NODE=1,ee=J.ATTRIBUTE_NODE=2,te=J.TEXT_NODE=3,ne=J.CDATA_SECTION_NODE=4,ie=J.ENTITY_REFERENCE_NODE=5,ae=J.ENTITY_NODE=6,oe=J.PROCESSING_INSTRUCTION_NODE=7,re=J.COMMENT_NODE=8,se=J.DOCUMENT_NODE=9,ce=J.DOCUMENT_TYPE_NODE=10,le=J.DOCUMENT_FRAGMENT_NODE=11,pe=J.NOTATION_NODE=12,ue={},de={},me=(ue.INDEX_SIZE_ERR=(de[1]="Index size error",1),ue.DOMSTRING_SIZE_ERR=(de[2]="DOMString size error",2),ue.HIERARCHY_REQUEST_ERR=(de[3]="Hierarchy request error",3)),fe=(ue.WRONG_DOCUMENT_ERR=(de[4]="Wrong document",4),ue.INVALID_CHARACTER_ERR=(de[5]="Invalid character",5),ue.NO_DATA_ALLOWED_ERR=(de[6]="No data allowed",6),ue.NO_MODIFICATION_ALLOWED_ERR=(de[7]="No modification allowed",7),ue.NOT_FOUND_ERR=(de[8]="Not found",8)),he=(ue.NOT_SUPPORTED_ERR=(de[9]="Not supported",9),ue.INUSE_ATTRIBUTE_ERR=(de[10]="Attribute in use",10));ue.INVALID_STATE_ERR=(de[11]="Invalid state",11),ue.SYNTAX_ERR=(de[12]="Syntax error",12),ue.INVALID_MODIFICATION_ERR=(de[13]="Invalid modification",13),ue.NAMESPACE_ERR=(de[14]="Invalid namespace",14),ue.INVALID_ACCESS_ERR=(de[15]="Invalid access",15);p.prototype=Error.prototype,c(ue,p),u.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],i=0;i<this.length;i++)G(this[i],n,e,t);return n.join("")}},d.prototype.item=function(e){return m(this),this[e]},l(d,u),f.prototype={length:0,item:u.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new p(he);var n=this.getNamedItem(e.nodeName);return g(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new p(he);return t=this.getNamedItemNS(e.namespaceURI,e.localName),g(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return v(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return v(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var i=this[n];if(i.localName==t&&i.namespaceURI==e)return i}return null}},x.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,n){var i=new C;if(i.implementation=this,i.childNodes=new u,i.doctype=n||null,n&&i.appendChild(n),t){var a=i.createElementNS(e,t);i.appendChild(a)}return i},createDocumentType:function(e,t,n){var i=new P;return i.name=e,i.nodeName=e,i.publicId=t||"",i.systemId=n||"",i}},y.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return T(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return w(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return X(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==te&&e.nodeType==te?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var i in n)if(n[i]==e)return i;t=t.nodeType==ee?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==ee?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},c(J,y),c(J,y.prototype),C.prototype={nodeName:"#document",nodeType:se,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==le){for(var n=e.firstChild;n;){var i=n.nextSibling;this.insertBefore(n,t),n=i}return e}return null==this.documentElement&&e.nodeType==Z&&(this.documentElement=e),T(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),w(this,e)},importNode:function(e,t){return V(this,e,t)},getElementById:function(e){var t=null;return k(this.documentElement,function(n){if(n.nodeType==Z&&n.getAttribute("id")==e)return t=n,!0}),t},getElementsByClassName:function(e){var t=r(e);return new d(this,function(n){var i=[];return t.length>0&&k(n.documentElement,function(a){if(a!==n&&a.nodeType===Z){var o=a.getAttribute("class");if(o){var c=e===o;if(!c){var l=r(o);c=t.every(s(l))}c&&i.push(a)}}}),i})},createElement:function(e){var t=new E;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new u,(t.attributes=new f)._ownerElement=t,t},createDocumentFragment:function(){var e=new H;return e.ownerDocument=this,e.childNodes=new u,e},createTextNode:function(e){var t=new I;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new N;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new D;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new L;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new B;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new U;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new E,i=t.split(":"),a=n.attributes=new f;return n.childNodes=new u,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,a._ownerElement=n,n},createAttributeNS:function(e,t){var n=new B,i=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==i.length?(n.prefix=i[0],n.localName=i[1]):n.localName=t,n}},l(C,y),E.prototype={nodeType:Z,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===le?this.insertBefore(e,null):_(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var i=this.ownerDocument.createAttributeNS(e,t);i.value=i.nodeValue=""+n,this.setAttributeNode(i)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new d(this,function(t){var n=[];return k(t,function(i){i===t||i.nodeType!=Z||"*"!==e&&i.tagName!=e||n.push(i)}),n})},getElementsByTagNameNS:function(e,t){return new d(this,function(n){var i=[];return k(n,function(a){a===n||a.nodeType!==Z||"*"!==e&&a.namespaceURI!==e||"*"!==t&&a.localName!=t||i.push(a)}),i})}},C.prototype.getElementsByTagName=E.prototype.getElementsByTagName,C.prototype.getElementsByTagNameNS=E.prototype.getElementsByTagNameNS,l(E,y),B.prototype.nodeType=ee,l(B,y),O.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(de[me])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},l(O,y),I.prototype={nodeName:"#text",nodeType:te,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var i=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}},l(I,O),N.prototype={nodeName:"#comment",nodeType:re},l(N,O),D.prototype={nodeName:"#cdata-section",nodeType:ne},l(D,O),P.prototype.nodeType=ce,l(P,y),M.prototype.nodeType=pe,l(M,y),j.prototype.nodeType=ae,l(j,y),U.prototype.nodeType=ie,l(U,y),H.prototype.nodeName="#document-fragment",H.prototype.nodeType=le,l(H,y),L.prototype.nodeType=oe,l(L,y),F.prototype.serializeToString=function(e,t,n){return z.call(e,t,n)},y.prototype.toString=z;try{if(Object.defineProperty){var ge=function e(t){switch(t.nodeType){case Z:case le:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}};Object.defineProperty(d.prototype,"length",{get:function(){return m(this),this.$$length}}),Object.defineProperty(y.prototype,"textContent",{get:function(){return ge(this)},set:function(e){switch(this.nodeType){case Z:case le:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),W=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DocumentType=P,t.DOMException=p,t.DOMImplementation=x,t.Element=E,t.Node=y,t.NodeList=u,t.XMLSerializer=F},function(e,t,n){"use strict";var i=function(e){e=e||{};var t,n=e.Base64,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(e){for(var t={},n=0,i=e.length;n<i;n++)t[e.charAt(n)]=n;return t}(i),o=String.fromCharCode,r=function(e){if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?o(192|t>>>6)+o(128|63&t):o(224|t>>>12&15)+o(128|t>>>6&63)+o(128|63&t)}var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return o(240|t>>>18&7)+o(128|t>>>12&63)+o(128|t>>>6&63)+o(128|63&t)},s=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,c=function(e){return e.replace(s,r)},l=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[i.charAt(n>>>18),i.charAt(n>>>12&63),t>=2?"=":i.charAt(n>>>6&63),t>=1?"=":i.charAt(63&n)].join("")},p=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,l)},u=t?function(e){return(e.constructor===t.constructor?e:new t(e)).toString("base64")}:function(e){return p(c(e))},d=function(e,t){return t?u(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):u(String(e))},m=function(e){return d(e,!0)},f=new RegExp(["[\xc0-\xdf][\x80-\xbf]","[\xe0-\xef][\x80-\xbf]{2}","[\xf0-\xf7][\x80-\xbf]{3}"].join("|"),"g"),h=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return o(55296+(n>>>10))+o(56320+(1023&n));case 3:return o((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return o((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},g=function(e){return e.replace(f,h)},v=function(e){var t=e.length,n=t%4,i=(t>0?a[e.charAt(0)]<<18:0)|(t>1?a[e.charAt(1)]<<12:0)|(t>2?a[e.charAt(2)]<<6:0)|(t>3?a[e.charAt(3)]:0),r=[o(i>>>16),o(i>>>8&255),o(255&i)];return r.length-=[0,0,2,1][n],r.join("")},x=e.atob?function(t){return e.atob(t)}:function(e){return e.replace(/[\s\S]{1,4}/g,v)},y=t?function(e){return(e.constructor===t.constructor?e:new t(e,"base64")).toString()}:function(e){return g(x(e))},b=function(e){return y(String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))};return{VERSION:"2.1.9",atob:x,btoa:p,fromBase64:b,toBase64:d,utob:c,encode:d,encodeURI:m,btou:g,decode:b,noConflict:function(){var t=e.Base64;return e.Base64=n,t}}}();e.exports=i},function(e,t,n){"use strict";var i=function(e){var t={},n=function(e){return!t[e]&&(t[e]=[]),t[e]};e.on=function(e,t){n(e).push(t)},e.off=function(e,t){for(var i=n(e),a=i.length-1;a>=0;a--)t===i[a]&&i.splice(a,1)},e.emit=function(e,t){for(var i=n(e).map(function(e){return e}),a=0;a<i.length;a++)i[a](t)}},a=function(){i(this)};e.exports.init=i,e.exports.EventProxy=a},function(e,t,n){"use strict";var i,a,o=n(0),r=function(){try{var e=JSON.parse(wx.getStorageSync("cos_sdk_upload_cache"))}catch(e){}return e||(e=[]),e},s=function(){try{wx.setStorageSync("cos_sdk_upload_cache",JSON.stringify(i))}catch(e){}},c=function(){if(!i){i=r();for(var e=!1,t=Math.round(Date.now()/1e3),n=i.length-1;n>=0;n--){var a=i[n][2];(!a||a+2592e3<t)&&(i.splice(n,1),e=!0)}e&&s()}},l=function(){a||(a=setTimeout(function(){s(),a=null},400))},p={using:{},setUsing:function(e){p.using[e]=!0},removeUsing:function(e){delete p.using[e]},getFileId:function(e,t,n,i){return e.FilePath&&e.size&&e.lastModifiedTime&&t?o.md5([e.FilePath].join("::"))+"-"+o.md5([e.size,e.mode,e.lastAccessedTime,e.lastModifiedTime,t,n,i].join("::")):null},getUploadIdList:function(e){if(!e)return null;c();for(var t=[],n=0;n<i.length;n++)i[n][0]===e&&t.push(i[n][1]);return t.length?t:null},saveUploadId:function(e,t,n){if(c(),e){for(var a=e.substr(0,e.indexOf("-")+1),o=i.length-1;o>=0;o--){var r=i[o];r[0]===e&&r[1]===t?i.splice(o,1):e!==r[0]&&0===r[0].indexOf(a)&&i.splice(o,1)}i.unshift([e,t,Math.round(Date.now()/1e3)]),i.length>n&&i.splice(n),l()}},removeUploadId:function(e){c(),delete p.using[e];for(var t=i.length-1;t>=0;t--)i[t][1]===e&&i.splice(t,1);l()}};e.exports=p},function(e,t,n){"use strict";var i=n(8);e.exports=i},function(e,t,n){"use strict";var i=n(0),a=n(5),o=n(20),r=n(21),s=n(27),c={SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,UploadQueueSize:1e4,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,HttpDNSServiceId:""},l=function(e){this.options=i.extend(i.clone(c),e||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1048576,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1048576,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.AppId&&console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'),this.options.SecretId&&this.options.SecretId.indexOf(" ")>-1&&(console.error("error: SecretId\u683c\u5f0f\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey\u683c\u5f0f\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5"),console.error("error: SecretKey format is incorrect. Please check")),a.init(this),o.init(this)};r.init(l,o),s.init(l,o),l.util={md5:i.md5,xml2json:i.xml2json,json2xml:i.json2xml},l.getAuthorization=i.getAuth,l.version="1.2.1",e.exports=l},function(module,exports,__webpack_require__){"use strict";(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__,_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(){function Md5(e){if(e)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}var ERROR="input is invalid type",WINDOW="object"===("undefined"==typeof window?"undefined":_typeof(window)),root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===("undefined"==typeof self?"undefined":_typeof(self)),NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"===(void 0===process?"undefined":_typeof(process))&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"===_typeof(module)&&module.exports,AMD=__webpack_require__(12),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===(void 0===e?"undefined":_typeof(e))&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t){return new Md5(!0).update(t)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.getCtx=e.create=function(){return new Md5},e.update=function(t){return e.create().update(t)};for(var t=0;t<OUTPUT_TYPES.length;++t){var n=OUTPUT_TYPES[t];e[n]=createOutputMethod(n)}return e},nodeWrap=function nodeWrap(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(e){if("string"==typeof e)return crypto.createHash("md5").update(e,"utf8").digest("hex");if(null===e||void 0===e)throw ERROR;return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash("md5").update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod};Md5.prototype.update=function(e){if(!this.finalized){var t,n=void 0===e?"undefined":_typeof(e);if("string"!==n){if("object"!==n)throw ERROR;if(null===e)throw ERROR;if(!ARRAY_BUFFER||e.constructor!==ArrayBuffer&&"ArrayBuffer"!==e.constructor.name){if(!(Array.isArray(e)||ARRAY_BUFFER&&ArrayBuffer.isView(e)))throw ERROR}else e=new Uint8Array(e);t=!0}for(var i,a,o=0,r=e.length,s=this.blocks,c=this.buffer8;o<r;){if(this.hashed&&(this.hashed=!1,s[0]=s[16],s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),t)if(ARRAY_BUFFER)for(a=this.start;o<r&&a<64;++o)c[a++]=e[o];else for(a=this.start;o<r&&a<64;++o)s[a>>2]|=e[o]<<SHIFT[3&a++];else if(ARRAY_BUFFER)for(a=this.start;o<r&&a<64;++o)i=e.charCodeAt(o),i<128?c[a++]=i:i<2048?(c[a++]=192|i>>6,c[a++]=128|63&i):i<55296||i>=57344?(c[a++]=224|i>>12,c[a++]=128|i>>6&63,c[a++]=128|63&i):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++o)),c[a++]=240|i>>18,c[a++]=128|i>>12&63,c[a++]=128|i>>6&63,c[a++]=128|63&i);else for(a=this.start;o<r&&a<64;++o)i=e.charCodeAt(o),i<128?s[a>>2]|=i<<SHIFT[3&a++]:i<2048?(s[a>>2]|=(192|i>>6)<<SHIFT[3&a++],s[a>>2]|=(128|63&i)<<SHIFT[3&a++]):i<55296||i>=57344?(s[a>>2]|=(224|i>>12)<<SHIFT[3&a++],s[a>>2]|=(128|i>>6&63)<<SHIFT[3&a++],s[a>>2]|=(128|63&i)<<SHIFT[3&a++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++o)),s[a>>2]|=(240|i>>18)<<SHIFT[3&a++],s[a>>2]|=(128|i>>12&63)<<SHIFT[3&a++],s[a>>2]|=(128|i>>6&63)<<SHIFT[3&a++],s[a>>2]|=(128|63&i)<<SHIFT[3&a++]);this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=EXTRA[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,t,n,i,a,o,r=this.blocks;this.first?(e=r[0]-680876937,e=(e<<7|e>>>25)-271733879<<0,i=(-1732584194^2004318071&e)+r[1]-117830708,i=(i<<12|i>>>20)+e<<0,n=(-271733879^i&(-271733879^e))+r[2]-1126478375,n=(n<<17|n>>>15)+i<<0,t=(e^n&(i^e))+r[3]-1316259209,t=(t<<22|t>>>10)+n<<0):(e=this.h0,t=this.h1,n=this.h2,i=this.h3,e+=(i^t&(n^i))+r[0]-680876936,e=(e<<7|e>>>25)+t<<0,i+=(n^e&(t^n))+r[1]-389564586,i=(i<<12|i>>>20)+e<<0,n+=(t^i&(e^t))+r[2]+606105819,n=(n<<17|n>>>15)+i<<0,t+=(e^n&(i^e))+r[3]-1044525330,t=(t<<22|t>>>10)+n<<0),e+=(i^t&(n^i))+r[4]-176418897,e=(e<<7|e>>>25)+t<<0,i+=(n^e&(t^n))+r[5]+1200080426,i=(i<<12|i>>>20)+e<<0,n+=(t^i&(e^t))+r[6]-1473231341,n=(n<<17|n>>>15)+i<<0,t+=(e^n&(i^e))+r[7]-45705983,t=(t<<22|t>>>10)+n<<0,e+=(i^t&(n^i))+r[8]+1770035416,e=(e<<7|e>>>25)+t<<0,i+=(n^e&(t^n))+r[9]-1958414417,i=(i<<12|i>>>20)+e<<0,n+=(t^i&(e^t))+r[10]-42063,n=(n<<17|n>>>15)+i<<0,t+=(e^n&(i^e))+r[11]-1990404162,t=(t<<22|t>>>10)+n<<0,e+=(i^t&(n^i))+r[12]+1804603682,e=(e<<7|e>>>25)+t<<0,i+=(n^e&(t^n))+r[13]-40341101,i=(i<<12|i>>>20)+e<<0,n+=(t^i&(e^t))+r[14]-1502002290,n=(n<<17|n>>>15)+i<<0,t+=(e^n&(i^e))+r[15]+1236535329,t=(t<<22|t>>>10)+n<<0,e+=(n^i&(t^n))+r[1]-165796510,e=(e<<5|e>>>27)+t<<0,i+=(t^n&(e^t))+r[6]-1069501632,i=(i<<9|i>>>23)+e<<0,n+=(e^t&(i^e))+r[11]+643717713,n=(n<<14|n>>>18)+i<<0,t+=(i^e&(n^i))+r[0]-373897302,t=(t<<20|t>>>12)+n<<0,e+=(n^i&(t^n))+r[5]-701558691,e=(e<<5|e>>>27)+t<<0,i+=(t^n&(e^t))+r[10]+38016083,i=(i<<9|i>>>23)+e<<0,n+=(e^t&(i^e))+r[15]-660478335,n=(n<<14|n>>>18)+i<<0,t+=(i^e&(n^i))+r[4]-405537848,t=(t<<20|t>>>12)+n<<0,e+=(n^i&(t^n))+r[9]+568446438,e=(e<<5|e>>>27)+t<<0,i+=(t^n&(e^t))+r[14]-1019803690,i=(i<<9|i>>>23)+e<<0,n+=(e^t&(i^e))+r[3]-187363961,n=(n<<14|n>>>18)+i<<0,t+=(i^e&(n^i))+r[8]+1163531501,t=(t<<20|t>>>12)+n<<0,e+=(n^i&(t^n))+r[13]-1444681467,e=(e<<5|e>>>27)+t<<0,i+=(t^n&(e^t))+r[2]-51403784,i=(i<<9|i>>>23)+e<<0,n+=(e^t&(i^e))+r[7]+1735328473,n=(n<<14|n>>>18)+i<<0,t+=(i^e&(n^i))+r[12]-1926607734,t=(t<<20|t>>>12)+n<<0,a=t^n,e+=(a^i)+r[5]-378558,e=(e<<4|e>>>28)+t<<0,i+=(a^e)+r[8]-2022574463,i=(i<<11|i>>>21)+e<<0,o=i^e,n+=(o^t)+r[11]+1839030562,n=(n<<16|n>>>16)+i<<0,t+=(o^n)+r[14]-35309556,t=(t<<23|t>>>9)+n<<0,a=t^n,e+=(a^i)+r[1]-1530992060,e=(e<<4|e>>>28)+t<<0,i+=(a^e)+r[4]+1272893353,i=(i<<11|i>>>21)+e<<0,o=i^e,n+=(o^t)+r[7]-155497632,n=(n<<16|n>>>16)+i<<0,t+=(o^n)+r[10]-1094730640,t=(t<<23|t>>>9)+n<<0,a=t^n,e+=(a^i)+r[13]+681279174,e=(e<<4|e>>>28)+t<<0,i+=(a^e)+r[0]-358537222,i=(i<<11|i>>>21)+e<<0,o=i^e,n+=(o^t)+r[3]-722521979,n=(n<<16|n>>>16)+i<<0,t+=(o^n)+r[6]+76029189,t=(t<<23|t>>>9)+n<<0,a=t^n,e+=(a^i)+r[9]-640364487,e=(e<<4|e>>>28)+t<<0,i+=(a^e)+r[12]-421815835,i=(i<<11|i>>>21)+e<<0,o=i^e,n+=(o^t)+r[15]+530742520,n=(n<<16|n>>>16)+i<<0,t+=(o^n)+r[2]-995338651,t=(t<<23|t>>>9)+n<<0,e+=(n^(t|~i))+r[0]-198630844,e=(e<<6|e>>>26)+t<<0,i+=(t^(e|~n))+r[7]+1126891415,i=(i<<10|i>>>22)+e<<0,n+=(e^(i|~t))+r[14]-1416354905,n=(n<<15|n>>>17)+i<<0,t+=(i^(n|~e))+r[5]-57434055,t=(t<<21|t>>>11)+n<<0,e+=(n^(t|~i))+r[12]+1700485571,e=(e<<6|e>>>26)+t<<0,i+=(t^(e|~n))+r[3]-1894986606,i=(i<<10|i>>>22)+e<<0,n+=(e^(i|~t))+r[10]-1051523,n=(n<<15|n>>>17)+i<<0,t+=(i^(n|~e))+r[1]-2054922799,t=(t<<21|t>>>11)+n<<0,e+=(n^(t|~i))+r[8]+1873313359,e=(e<<6|e>>>26)+t<<0,i+=(t^(e|~n))+r[15]-30611744,i=(i<<10|i>>>22)+e<<0,n+=(e^(i|~t))+r[6]-1560198380,n=(n<<15|n>>>17)+i<<0,t+=(i^(n|~e))+r[13]+1309151649,t=(t<<21|t>>>11)+n<<0,e+=(n^(t|~i))+r[4]-145523070,e=(e<<6|e>>>26)+t<<0,i+=(t^(e|~n))+r[11]-1120210379,i=(i<<10|i>>>22)+e<<0,n+=(e^(i|~t))+r[2]+718787259,n=(n<<15|n>>>17)+i<<0,t+=(i^(n|~e))+r[9]-343485551,t=(t<<21|t>>>11)+n<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=n-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,i=this.h3;return[255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,t,n,i="",a=this.array(),o=0;o<15;)e=a[o++],t=a[o++],n=a[o++],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|n>>>6)]+BASE64_ENCODE_CHAR[63&n];return e=a[o],i+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&void 0!==(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module))&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}()}).call(exports,__webpack_require__(10),__webpack_require__(2),__webpack_require__(11)(module))},function(e,t,n){"use strict";function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(u===setTimeout)return setTimeout(e,0);if((u===i||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function r(e){if(d===clearTimeout)return clearTimeout(e);if((d===a||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function s(){g&&f&&(g=!1,f.length?h=f.concat(h):v=-1,h.length&&c())}function c(){if(!g){var e=o(s);g=!0;for(var t=h.length;t;){for(f=h,h=[];++v<t;)f&&f[v].run();v=-1,t=h.length}f=null,g=!1,r(e)}}function l(e,t){this.fun=e,this.array=t}function p(){}var u,d,m=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:i}catch(e){u=i}try{d="function"==typeof clearTimeout?clearTimeout:a}catch(e){d=a}}();var f,h=[],g=!1,v=-1;m.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new l(e,t)),1!==h.length||g||o(c)},l.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=p,m.addListener=p,m.once=p,m.off=p,m.removeListener=p,m.removeAllListeners=p,m.emit=p,m.prependListener=p,m.prependOnceListener=p,m.listeners=function(e){return[]},m.binding=function(e){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(e){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){"use strict";var i=i||function(e,t){var n={},i=n.lib={},a=function(){},o=i.Base={extend:function(e){a.prototype=this;var t=new a;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},r=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,n=e.words,i=this.sigBytes;if(e=e.sigBytes,this.clamp(),i%4)for(var a=0;a<e;a++)t[i+a>>>2]|=(n[a>>>2]>>>24-a%4*8&255)<<24-(i+a)%4*8;else if(65535<n.length)for(a=0;a<e;a+=4)t[i+a>>>2]=n[a>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i<t;i+=4)n.push(4294967296*e.random()|0);return new r.init(n,t)}}),s=n.enc={},c=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++){var a=t[i>>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i+=2)n[i>>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new r.init(n,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i<e;i++)n.push(String.fromCharCode(t[i>>>2]>>>24-i%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i<t;i++)n[i>>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new r.init(n,t)}},p=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},u=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new r.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,a=n.sigBytes,o=this.blockSize,s=a/(4*o),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*o,a=e.min(4*t,a),t){for(var c=0;c<t;c+=o)this._doProcessBlock(i,c);c=i.splice(0,t),n.sigBytes-=a}return new r.init(c,a)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=u.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new d.HMAC.init(e,n).finalize(t)}}});var d=n.algo={};return n}(Math);!function(){var e=i,t=e.lib,n=t.WordArray,a=t.Hasher,o=[],t=e.algo.SHA1=a.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],a=n[1],r=n[2],s=n[3],c=n[4],l=0;80>l;l++){if(16>l)o[l]=0|e[t+l];else{var p=o[l-3]^o[l-8]^o[l-14]^o[l-16];o[l]=p<<1|p>>>31}p=(i<<5|i>>>27)+c+o[l],p=20>l?p+(1518500249+(a&r|~a&s)):40>l?p+(1859775393+(a^r^s)):60>l?p+((a&r|a&s|r&s)-1894007588):p+((a^r^s)-899497514),c=s,s=r,r=a<<30|a>>>2,a=i,i=p}n[0]=n[0]+i|0,n[1]=n[1]+a|0,n[2]=n[2]+r|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(i+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(i+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=a._createHelper(t),e.HmacSHA1=a._createHmacHelper(t)}(),function(){var e=i,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var i=e.blockSize,a=4*i;n.sigBytes>a&&(n=e.finalize(n)),n.clamp();for(var o=this._oKey=n.clone(),r=this._iKey=n.clone(),s=o.words,c=r.words,l=0;l<i;l++)s[l]^=1549556828,c[l]^=909522486;o.sigBytes=r.sigBytes=a,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}})}(),function(){var e=i,t=e.lib,n=t.WordArray,a=e.enc;a.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,i=this._map;e.clamp();for(var a=[],o=0;o<n;o+=3)for(var r=t[o>>>2]>>>24-o%4*8&255,s=t[o+1>>>2]>>>24-(o+1)%4*8&255,c=t[o+2>>>2]>>>24-(o+2)%4*8&255,l=r<<16|s<<8|c,p=0;p<4&&o+.75*p<n;p++)a.push(i.charAt(l>>>6*(3-p)&63));var u=i.charAt(64);if(u)for(;a.length%4;)a.push(u);return a.join("")},parse:function(e){var t=e.length,i=this._map,a=i.charAt(64);if(a){var o=e.indexOf(a);-1!=o&&(t=o)}for(var r=[],s=0,c=0;c<t;c++)if(c%4){var l=i.indexOf(e.charAt(c-1))<<c%4*2,p=i.indexOf(e.charAt(c))>>>6-c%4*2;r[s>>>2]|=(l|p)<<24-s%4*8,s++}return n.create(r,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.exports=i},function(e,t,n){"use strict";var i=n(15).DOMParser,a=function(e){function t(e){var t=e.localName;return null==t&&(t=e.baseName),null!=t&&""!=t||(t=e.nodeName),t}function n(e){return e.prefix}function a(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):e}function o(e,t,n,i){for(var a=0;a<e.length;a++){var o=e[a];if("string"==typeof o){if(o==i)break}else if(o instanceof RegExp){if(o.test(i))break}else if("function"==typeof o&&o(t,n,i))break}return a!=e.length}function r(t,n,i){switch(e.arrayAccessForm){case"property":t[n]instanceof Array?t[n+"_asArray"]=t[n]:t[n+"_asArray"]=[t[n]]}!(t[n]instanceof Array)&&e.arrayAccessFormPaths.length>0&&o(e.arrayAccessFormPaths,t,n,i)&&(t[n]=[t[n]])}function s(e){var t=e.split(/[-T:+Z]/g),n=new Date(t[0],t[1]-1,t[2]),i=t[5].split(".");if(n.setHours(t[3],t[4],i[0]),i.length>1&&n.setMilliseconds(i[1]),t[6]&&t[7]){var a=60*t[6]+Number(t[7]);a=0+("-"==(/\d\d-\d\d:\d\d$/.test(e)?"-":"+")?-1*a:a),n.setMinutes(n.getMinutes()-a-n.getTimezoneOffset())}else-1!==e.indexOf("Z",e.length-1)&&(n=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())));return n}function c(t,n,i){if(e.datetimeAccessFormPaths.length>0){var a=i.split(".#")[0];return o(e.datetimeAccessFormPaths,t,n,a)?s(t):t}return t}function l(t,n,i,a){return!(n==S.ELEMENT_NODE&&e.xmlElementsFilter.length>0)||o(e.xmlElementsFilter,t,i,a)}function p(i,a){if(i.nodeType==S.DOCUMENT_NODE){for(var o=new Object,s=i.childNodes,u=0;u<s.length;u++){var d=s.item(u);if(d.nodeType==S.ELEMENT_NODE){var m=t(d);o[m]=p(d,m)}}return o}if(i.nodeType==S.ELEMENT_NODE){var o=new Object;o.__cnt=0;for(var s=i.childNodes,u=0;u<s.length;u++){var d=s.item(u),m=t(d);if(d.nodeType!=S.COMMENT_NODE){var f=a+"."+m;l(o,d.nodeType,m,f)&&(o.__cnt++,null==o[m]?(o[m]=p(d,f),r(o,m,f)):(null!=o[m]&&(o[m]instanceof Array||(o[m]=[o[m]],r(o,m,f))),o[m][o[m].length]=p(d,f)))}}for(var h=0;h<i.attributes.length;h++){var g=i.attributes.item(h);o.__cnt++,o[e.attributePrefix+g.name]=g.value}var v=n(i);return null!=v&&""!=v&&(o.__cnt++,o.__prefix=v),null!=o["#text"]&&(o.__text=o["#text"],o.__text instanceof Array&&(o.__text=o.__text.join("\n")),e.stripWhitespaces&&(o.__text=o.__text.trim()),delete o["#text"],"property"==e.arrayAccessForm&&delete o["#text_asArray"],o.__text=c(o.__text,m,a+"."+m)),null!=o["#cdata-section"]&&(o.__cdata=o["#cdata-section"],delete o["#cdata-section"],"property"==e.arrayAccessForm&&delete o["#cdata-section_asArray"]),0==o.__cnt&&"text"==e.emptyNodeForm?o="":1==o.__cnt&&null!=o.__text?o=o.__text:1!=o.__cnt||null==o.__cdata||e.keepCData?o.__cnt>1&&null!=o.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""==o.__text||""==o.__text.trim())&&delete o.__text:o=o.__cdata,delete o.__cnt,!e.enableToStringFunc||null==o.__text&&null==o.__cdata||(o.toString=function(){return(null!=this.__text?this.__text:"")+(null!=this.__cdata?this.__cdata:"")}),o}if(i.nodeType==S.TEXT_NODE||i.nodeType==S.CDATA_SECTION_NODE)return i.nodeValue}function u(t,n,i,o){var r="<"+(null!=t&&null!=t.__prefix?t.__prefix+":":"")+n;if(null!=i)for(var s=0;s<i.length;s++){var c=i[s],l=t[c];e.escapeMode&&(l=a(l)),r+=" "+c.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?r+='"'+l+'"':r+="'"+l+"'"}return r+=o?"/>":">"}function d(e,t){return"</"+(null!=e.__prefix?e.__prefix+":":"")+t+">"}function m(e,t){return-1!==e.indexOf(t,e.length-t.length)}function f(t,n){return!!("property"==e.arrayAccessForm&&m(n.toString(),"_asArray")||0==n.toString().indexOf(e.attributePrefix)||0==n.toString().indexOf("__")||t[n]instanceof Function)}function h(e){var t=0;if(e instanceof Object)for(var n in e)f(e,n)||t++;return t}function g(t,n,i){return 0==e.jsonPropertiesFilter.length||""==i||o(e.jsonPropertiesFilter,t,n,i)}function v(t){var n=[];if(t instanceof Object)for(var i in t)-1==i.toString().indexOf("__")&&0==i.toString().indexOf(e.attributePrefix)&&n.push(i);return n}function x(t){var n="";return null!=t.__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),null!=t.__text&&(e.escapeMode?n+=a(t.__text):n+=t.__text),n}function y(t){var n="";return t instanceof Object?n+=x(t):null!=t&&(e.escapeMode?n+=a(t):n+=t),n}function b(e,t){return""===e?t:e+"."+t}function k(e,t,n,i){var a="";if(0==e.length)a+=u(e,t,n,!0);else for(var o=0;o<e.length;o++)a+=u(e[o],t,v(e[o]),!1),a+=C(e[o],b(i,t)),a+=d(e[o],t);return a}function C(e,t){var n="";if(h(e)>0)for(var i in e)if(!f(e,i)&&(""==t||g(e,i,b(t,i)))){var a=e[i],o=v(a);if(null==a||void 0==a)n+=u(a,i,o,!0);else if(a instanceof Object)if(a instanceof Array)n+=k(a,i,o,t);else if(a instanceof Date)n+=u(a,i,o,!1),n+=a.toISOString(),n+=d(a,i);else{var r=h(a);r>0||null!=a.__text||null!=a.__cdata?(n+=u(a,i,o,!1),n+=C(a,b(t,i)),n+=d(a,i)):n+=u(a,i,o,!0)}else n+=u(a,i,o,!1),n+=y(a),n+=d(a,i)}return n+=y(e)}e=e||{},function(){void 0===e.escapeMode&&(e.escapeMode=!0),e.attributePrefix=e.attributePrefix||"_",e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!1),e.xmlElementsFilter=e.xmlElementsFilter||[],e.jsonPropertiesFilter=e.jsonPropertiesFilter||[],void 0===e.keepCData&&(e.keepCData=!1)}();var S={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};this.parseXmlString=function(e){if(void 0===e)return null;var t;if(i){var n=new i,a=null;try{a=n.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(e){a=null}try{t=n.parseFromString(e,"text/xml"),null!=a&&t.getElementsByTagNameNS(a,"parsererror").length>0&&(t=null)}catch(e){t=null}}else 0==e.indexOf("<?")&&(e=e.substr(e.indexOf("?>")+2)),t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},this.asArray=function(e){return void 0===e||null==e?[]:e instanceof Array?e:[e]},this.toXmlDateTime=function(e){return e instanceof Date?e.toISOString():"number"==typeof e?new Date(e).toISOString():null},this.asDateTime=function(e){return"string"==typeof e?s(e):e},this.xml2json=function(e){return p(e)},this.xml_str2json=function(e){var t=this.parseXmlString(e);return null!=t?this.xml2json(t):null},this.json2xml_str=function(e){return C(e,"")},this.json2xml=function(e){var t=this.json2xml_str(e);return this.parseXmlString(t)},this.getVersion=function(){return"1.2.0"}},o=function(e){if(!e)return null;var t=new i,n=t.parseFromString(e,"text/xml"),o=new a,r=o.xml2json(n);return r.html&&r.getElementsByTagName("parsererror").length?null:r};e.exports=o},function(e,t,n){"use strict";var i=n(3);t.DOMImplementation=i.DOMImplementation,t.XMLSerializer=i.XMLSerializer,t.DOMParser=n(16).DOMParser},function(e,t,n){"use strict";function i(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function a(e){this.options=e||{locator:{}}}function o(e,t,n){function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),a[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+c(n))}||function(){}}if(!e){if(t instanceof r)return t;e=t}var a={},o=e instanceof Function;return n=n||{},i("warning"),i("error"),i("fatalError"),a}function r(){this.cdata=!1}function s(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function c(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function l(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function p(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}var u=n(1),d=n(3),m=n(17),f=n(18),h=d.DOMImplementation,g=u.NAMESPACE,v=f.ParseError,x=f.XMLReader;a.prototype.parseFromString=function(e,t){var n=this.options,a=new x,s=n.domBuilder||new r,c=n.errorHandler,l=n.locator,p=n.xmlns||{},u=/\/x?html?$/.test(t),d=u?m.HTML_ENTITIES:m.XML_ENTITIES;l&&s.setDocumentLocator(l),a.errorHandler=o(c,s,l),a.domBuilder=n.domBuilder||s,u&&(p[""]=g.HTML),p.xml=p.xml||g.XML;var f=n.normalizeLineEndings||i;return e&&"string"==typeof e?a.parse(f(e),p,d):a.errorHandler.error("invalid doc source"),s.doc},r.prototype={startDocument:function(){this.doc=(new h).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,i){var a=this.doc,o=a.createElementNS(e,n||t),r=i.length;p(this,o),this.currentElement=o,this.locator&&s(this.locator,o);for(var c=0;c<r;c++){var e=i.getURI(c),l=i.getValue(c),n=i.getQName(c),u=a.createAttributeNS(e,n);this.locator&&s(i.getLocator(c),u),u.value=u.nodeValue=l,o.setAttributeNode(u)}},endElement:function(e,t,n){var i=this.currentElement;i.tagName;this.currentElement=i.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&s(this.locator,n),p(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=l.apply(this,arguments)){if(this.cdata)var i=this.doc.createCDATASection(e);else var i=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(e)&&this.doc.appendChild(i),this.locator&&s(this.locator,i)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=l.apply(this,arguments);var i=this.doc.createComment(e);this.locator&&s(this.locator,i),p(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var a=i.createDocumentType(e,t,n);this.locator&&s(this.locator,a),p(this,a),this.doc.doctype=a}},warning:function(e){console.warn("[xmldom warning]\t"+e,c(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,c(this.locator))},fatalError:function(e){throw new v(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){r.prototype[e]=function(){return null}}),t.__DOMHandler=r,t.normalizeLineEndings=i,t.DOMParser=a},function(e,t,n){"use strict";var i=n(1).freeze;t.XML_ENTITIES=i({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=i({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",times:"\xd7",divide:"\xf7",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",euro:"\u20ac",trade:"\u2122",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"}),t.entityMap=t.HTML_ENTITIES},function(e,t,n){"use strict";function i(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,i)}function a(){}function o(e,t,n,a,o){function u(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function h(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(n,t)?n[t]:"#"===t.charAt(0)?u(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function v(t){if(t>A){var n=e.substring(A,t).replace(/&#?\w+;/g,h);C&&x(A),a.characters(n,0,t-A),A=t}}function x(t,n){for(;t>=b&&(n=k.exec(e));)y=n.index,b=y+n[0].length,C.lineNumber++;C.columnNumber=t-y+1}for(var y=0,b=0,k=/.*(?:\r\n?|\n)|.*$/g,C=a.locator,S=[{currentNSMap:t}],R={},A=0;;){try{var w=e.indexOf("<",A);if(w<0){if(!e.substr(A).match(/^\s*$/)){var T=a.doc,_=T.createTextNode(e.substr(A));T.appendChild(_),a.currentElement=_}return}switch(w>A&&v(w),e.charAt(w+1)){case"/":var E=e.indexOf(">",w+3),B=e.substring(w+2,E).replace(/[ \t\n\r]+$/g,""),O=S.pop();E<0?(B=e.substring(w+2).replace(/[\s<].*/,""),o.error("end tag name: "+B+" is not complete:"+O.tagName),E=w+1+B.length):B.match(/\s</)&&(B=B.replace(/[\s<].*/,""),o.error("end tag name: "+B+" maybe not complete"),E=w+1+B.length);var I=O.localNSMap,N=O.tagName==B;if(N||O.tagName&&O.tagName.toLowerCase()==B.toLowerCase()){if(a.endElement(O.uri,O.localName,B),I)for(var D in I)a.endPrefixMapping(D);N||o.fatalError("end tag name: "+B+" is not match the current start tagName:"+O.tagName)}else S.push(O);E++;break;case"?":C&&x(w),E=m(e,w,a);break;case"!":C&&x(w),E=d(e,w,a,o);break;default:C&&x(w);var P=new f,M=S[S.length-1].currentNSMap,E=s(e,w,P,M,h,o),j=P.length;if(!P.closed&&p(e,E,P.tagName,R)&&(P.closed=!0,n.nbsp||o.warning("unclosed xml attribute")),C&&j){for(var U=r(C,{}),H=0;H<j;H++){var L=P[H];x(L.offset),L.locator=r(C,{})}a.locator=U,c(P,a,M)&&S.push(P),a.locator=C}else c(P,a,M)&&S.push(P);g.isHTML(P.uri)&&!P.closed?E=l(e,E,P.tagName,h,a):E++}}catch(e){if(e instanceof i)throw e;o.error("element parse error: "+e),E=-1}E>A?A=E:v(Math.max(w,A)+1)}}function r(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function s(e,t,n,i,a,o){function r(e,t,i){n.attributeNames.hasOwnProperty(e)&&o.fatalError("Attribute "+e+" redefined"),n.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,a),i)}for(var s,c,l=++t,p=b;;){var u=e.charAt(l);switch(u){case"=":if(p===k)s=e.slice(t,l),p=S;else{if(p!==C)throw new Error("attribute equal must after attrName");p=S}break;case"'":case'"':if(p===S||p===k){if(p===k&&(o.warning('attribute value must after "="'),s=e.slice(t,l)),t=l+1,!((l=e.indexOf(u,t))>0))throw new Error("attribute value no end '"+u+"' match");c=e.slice(t,l),r(s,c,t-1),p=A}else{if(p!=R)throw new Error('attribute value must after "="');c=e.slice(t,l),r(s,c,t),o.warning('attribute "'+s+'" missed start quot('+u+")!!"),t=l+1,p=A}break;case"/":switch(p){case b:n.setTagName(e.slice(t,l));case A:case w:case T:p=T,n.closed=!0;case R:case k:case C:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),p==b&&n.setTagName(e.slice(t,l)),l;case">":switch(p){case b:n.setTagName(e.slice(t,l));case A:case w:case T:break;case R:case k:c=e.slice(t,l),"/"===c.slice(-1)&&(n.closed=!0,c=c.slice(0,-1));case C:p===C&&(c=s),p==R?(o.warning('attribute "'+c+'" missed quot(")!'),r(s,c,t)):(g.isHTML(i[""])&&c.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),r(c,c,t));break;case S:throw new Error("attribute value missed!!")}return l;case"\x80":u=" ";default:if(u<=" ")switch(p){case b:n.setTagName(e.slice(t,l)),p=w;break;case k:s=e.slice(t,l),p=C;break;case R:var c=e.slice(t,l);o.warning('attribute "'+c+'" missed quot(")!!'),r(s,c,t);case A:p=w}else switch(p){case C:n.tagName;g.isHTML(i[""])&&s.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),r(s,s,t),t=l,p=k;break;case A:o.warning('attribute space is required"'+s+'"!!');case w:p=k,t=l;break;case S:p=R,t=l;break;case T:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function c(e,t,n){for(var i=e.tagName,a=null,o=e.length;o--;){var r=e[o],s=r.qName,c=r.value,l=s.indexOf(":");if(l>0)var p=r.prefix=s.slice(0,l),d=s.slice(l+1),m="xmlns"===p&&d;else d=s,p=null,m="xmlns"===s&&"";r.localName=d,!1!==m&&(null==a&&(a={},u(n,n={})),n[m]=a[m]=c,r.uri=g.XMLNS,t.startPrefixMapping(m,c))}for(var o=e.length;o--;){r=e[o];var p=r.prefix;p&&("xml"===p&&(r.uri=g.XML),"xmlns"!==p&&(r.uri=n[p||""]))}var l=i.indexOf(":");l>0?(p=e.prefix=i.slice(0,l),d=e.localName=i.slice(l+1)):(p=null,d=e.localName=i);var f=e.uri=n[p||""];if(t.startElement(f,d,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(f,d,i),a)for(p in a)t.endPrefixMapping(p)}function l(e,t,n,i,a){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),r=e.substring(t+1,o);if(/[&<]/.test(r))return/^script$/i.test(n)?(a.characters(r,0,r.length),o):(r=r.replace(/&#?\w+;/g,i),a.characters(r,0,r.length),o)}return t+1}function p(e,t,n,i){var a=i[n];return null==a&&(a=e.lastIndexOf("</"+n+">"),a<t&&(a=e.lastIndexOf("</"+n)),i[n]=a),a<t}function u(e,t){for(var n in e)t[n]=e[n]}function d(e,t,n,i){switch(e.charAt(t+2)){case"-":if("-"===e.charAt(t+3)){var a=e.indexOf("--\x3e",t+4);return a>t?(n.comment(e,t+4,a-t-4),a+3):(i.error("Unclosed comment"),-1)}return-1;default:if("CDATA["==e.substr(t+3,6)){var a=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,a-t-9),n.endCDATA(),a+3}var o=h(e,t),r=o.length;if(r>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],c=!1,l=!1;r>3&&(/^public$/i.test(o[2][0])?(c=o[3][0],l=r>4&&o[4][0]):/^system$/i.test(o[2][0])&&(l=o[3][0]));var p=o[r-1];return n.startDTD(s,c,l),n.endDTD(),p.index+p[0].length}}return-1}function m(e,t,n){var i=e.indexOf("?>",t);if(i){var a=e.substring(t,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(a){a[0].length;return n.processingInstruction(a[1],a[2]),i+2}return-1}return-1}function f(){this.attributeNames={}}function h(e,t){var n,i=[],a=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(a.lastIndex=t,a.exec(e);n=a.exec(e);)if(i.push(n),n[1])return i}var g=n(1).NAMESPACE,v=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,x=new RegExp("[\\-\\.0-9"+v.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),y=new RegExp("^"+v.source+x.source+"*(?::"+v.source+x.source+"*)?$"),b=0,k=1,C=2,S=3,R=4,A=5,w=6,T=7;i.prototype=new Error,i.prototype.name=i.name,a.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),u(t,t={}),o(e,t,n,i,this.errorHandler),i.endDocument()}},f.prototype={setTagName:function(e){if(!y.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,n){if(!y.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=a,t.ParseError=i},function(e,t,n){"use strict";function i(e){return(""+e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(r,"")}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=new RegExp("^([^a-zA-Z_\xc0-\xd6\xd8-\xf6\xf8-\xff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fff\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd])|^((x|X)(m|M)(l|L))|([^a-zA-Z_\xc0-\xd6\xd8-\xf6\xf8-\xff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fff\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd-.0-9\xb7\u0300-\u036f\u203f\u2040])","g"),r=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,s=function(e){var t=[];if(e instanceof Object)for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t},c=function(e,t){var n=function(e,n,i,a,r){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(a).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(o,"_"));var l=[c,"<",e,i||""];return n&&n.length>0?(l.push(">"),l.push(n),r&&l.push(c),l.push("</"),l.push(e),l.push(">")):l.push("/>"),l.join("")};return function e(o,r,c){var l=void 0===o?"undefined":a(o);switch((Array.isArray?Array.isArray(o):o instanceof Array)?l="array":o instanceof Date&&(l="date"),l){case"array":var p=[];return o.map(function(t){p.push(e(t,1,c+1))}),t.prettyPrint&&p.push("\n"),p.join("");case"date":return o.toJSON?o.toJSON():o+"";case"object":var u=[];for(var d in o)if(o.hasOwnProperty(d))if(o[d]instanceof Array)for(var m in o[d])o[d].hasOwnProperty(m)&&u.push(n(d,e(o[d][m],0,c+1),null,c+1,s(o[d][m]).length));else u.push(n(d,e(o[d],0,c+1),null,c+1));return t.prettyPrint&&u.length>0&&u.push("\n"),u.join("");case"function":return o();default:return t.escape?i(o):""+o}}(e,0,0)},l=function(e){var t=['<?xml version="1.0" encoding="UTF-8"'];return e&&t.push(' standalone="yes"'),t.push("?>"),t.join("")},p=function(e,t){if(t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" "}),"string"==typeof e)try{e=JSON.parse(e.toString())}catch(e){return!1}var n="",i="";return t&&("object"==(void 0===t?"undefined":a(t))?(t.xmlHeader&&(n=l(!!t.xmlHeader.standalone)),void 0!==t.docType&&(i="<!DOCTYPE "+t.docType+">")):n=l()),t=t||{},[n,t.prettyPrint&&i?"\n":"",i,c(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")};e.exports=p},function(e,t,n){"use strict";var i=n(6),a=n(0),o={},r=function(e,t){o[t]=e[t],e[t]=function(e,n){e.SkipTask?o[t].call(this,e,n):this._addTask(t,e,n)}},s=function(e){var t=[],n={},r=0,s=0,c=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),t},l=function(){var n,i=function(){n=0,e.emit("task-list-update",{list:a.map(t,c)}),e.emit("list-update",{list:a.map(t,c)})};return function(){n||(n=setTimeout(i))}}(),p=function(){if(!(t.length<=e.options.UploadQueueSize)){for(var i=0;i<s&&i<t.length&&t.length>e.options.UploadQueueSize;){var a="waiting"===t[i].state||"checking"===t[i].state||"uploading"===t[i].state;t[i]&&a?i++:(n[t[i].id]&&delete n[t[i].id],t.splice(i,1),s--)}l()}},u=function n(){if(!(r>=e.options.FileParallelLimit)){for(;t[s]&&"waiting"!==t[s].state;)s++;if(!(s>=t.length)){var i=t[s];s++,r++,i.state="checking",i.params.onTaskStart&&i.params.onTaskStart(c(i)),!i.params.UploadData&&(i.params.UploadData={});var u=a.formatParams(i.api,i.params);o[i.api].call(e,u,function(t,a){e._isRunningTask(i.id)&&("checking"!==i.state&&"uploading"!==i.state||(i.state=t?"error":"success",t&&(i.error=t),r--,l(),n(),i.callback&&i.callback(t,a),"success"===i.state&&(i.params&&(delete i.params.UploadData,delete i.params.Body,delete i.params),delete i.callback)),p())}),l(),setTimeout(n)}}},d=function(t,a){var o=n[t];if(o){var s=o&&"waiting"===o.state,c=o&&("checking"===o.state||"uploading"===o.state);if("canceled"===a&&"canceled"!==o.state||"paused"===a&&s||"paused"===a&&c){if("paused"===a&&o.params.Body&&"function"==typeof o.params.Body.pipe)return void console.error("stream not support pause");o.state=a,e.emit("inner-kill-task",{TaskId:t,toState:a});try{var d=o&&o.params&&o.params.UploadData.UploadId}catch(e){}"canceled"===a&&d&&i.removeUsing(d),l(),c&&(r--,u()),"canceled"===a&&(o.params&&(delete o.params.UploadData,delete o.params.Body,delete o.params),delete o.callback)}p()}};e._addTasks=function(t){a.each(t,function(t){e._addTask(t.api,t.params,t.callback,!0)}),l()},e._addTask=function(i,o,r,s){"sliceUploadFile"!==i||a.canFileSlice()||(i="postObject"),o=a.formatParams(i,o);var c=a.uuid();o.TaskId=c,o.onTaskReady&&o.onTaskReady(c);var d={params:o,callback:r,api:i,index:t.length,id:c,Bucket:o.Bucket,Region:o.Region,Key:o.Key,FilePath:o.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null},m=o.onHashProgress;o.onHashProgress=function(t){e._isRunningTask(d.id)&&(d.hashPercent=t.percent,m&&m(t),l())};var f=o.onProgress;return o.onProgress=function(t){e._isRunningTask(d.id)&&("checking"===d.state&&(d.state="uploading"),d.loaded=t.loaded,d.size=t.total,d.speed=t.speed,d.percent=t.percent,f&&f(t),l())},a.getFileSize(i,o,function(e,i){if(e)return void r(e);n[c]=d,t.push(d),d.size=i,!s&&l(),u(),p()}),c},e._isRunningTask=function(e){var t=n[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return a.map(t,c)},e.cancelTask=function(e){d(e,"canceled")},e.pauseTask=function(e){d(e,"paused")},e.restartTask=function(e){var t=n[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",l(),s=Math.min(s,t.index),u())},e.isUploadRunning=function(){return r||s<t.length}};e.exports.transferToTaskMethod=r,e.exports.init=s},function(e,t,n){"use strict";function i(e,t){"function"==typeof e&&(t=e,e={});var n=this.options.ServiceDomain,i=e.Region;n?(n=n.replace(/\{\{Region\}\}/gi,i||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(n)||(n="https://"+n),"/"===n.slice(-1)&&(n=n.slice(0,-1))):n=i?"https://cos."+i+".myqcloud.com":"https://service.cos.myqcloud.com";var a=i?"cos."+i+".myqcloud.com":"service.cos.myqcloud.com";n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1"),Re.call(this,{Action:"name/cos:GetService",url:n,method:"GET",headers:e.Headers},function(e,n){if(e)return t(e);var i=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Buckets&&n.ListAllMyBucketsResult.Buckets.Bucket||[];i=Te.isArray(i)?i:[i];var a=n&&n.ListAllMyBucketsResult&&n.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:i,Owner:a,statusCode:n.statusCode,headers:n.headers})})}function a(e,t){var n=this,i="";if(e.BucketAZConfig){var a={BucketAZConfig:e.BucketAZConfig};i=Te.json2xml({CreateBucketConfiguration:a})}Re.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:i},function(i,a){if(i)return t(i);var o=ke({protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:o,statusCode:a.statusCode,headers:a.headers})})}function o(e,t){Re.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD"},function(e,n){t(e,n)})}function r(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n.marker=e.Marker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,Re.call(this,{Action:"name/cos:GetBucket",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n},function(e,n){if(e)return t(e);var i=n.ListBucketResult||{},a=i.Contents||[],o=i.CommonPrefixes||[];a=Te.isArray(a)?a:[a],o=Te.isArray(o)?o:[o];var r=Te.clone(i);Te.extend(r,{Contents:a,CommonPrefixes:o,statusCode:n.statusCode,headers:n.headers}),t(null,r)})}function s(e,t){Re.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE"},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function c(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=Te.clone(e.AccessControlPolicy||{}),o=a.Grants||a.Grant;o=Te.isArray(o)?o:[o],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:o},i=Te.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=Te.binaryBase64(Te.md5(i))}Te.each(n,function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=be(n[t]))}),Re.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:n,action:"acl",body:i},function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})})}function l(e,t){Re.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl"},function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},o=i.AccessControlList.Grant||[];o=Te.isArray(o)?o:[o];var r=ye(i);n.headers&&n.headers["x-cos-acl"]&&(r.ACL=n.headers["x-cos-acl"]),r=Te.extend(r,{Owner:a,Grants:o,statusCode:n.statusCode,headers:n.headers}),t(null,r)})}function p(e,t){var n=e.CORSConfiguration||{},i=n.CORSRules||e.CORSRules||[];i=Te.clone(Te.isArray(i)?i:[i]),Te.each(i,function(e){Te.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[n],e[t]=Te.isArray(i)?i:[i]})});var a={CORSRule:i};e.ResponseVary&&(a.ResponseVary=e.ResponseVary);var o=Te.json2xml({CORSConfiguration:a}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=Te.binaryBase64(Te.md5(o)),Re.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"cors",headers:r},function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})})}function u(e,t){Re.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var i={CORSRules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.CORSConfiguration||{},o=a.CORSRules||a.CORSRule||[];o=Te.clone(Te.isArray(o)?o:[o]);var r=a.ResponseVary;Te.each(o,function(e){Te.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(t){var n=t+"s",i=e[n]||e[t]||[];delete e[t],e[n]=Te.isArray(i)?i:[i]})}),t(null,{CORSRules:o,ResponseVary:r,statusCode:n.statusCode,headers:n.headers})}})}function d(e,t){Re.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})})}function m(e,t){Re.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location"},function(e,n){if(e)return t(e);t(null,n)})}function f(e,t){var n=e.Policy,i=n;try{"string"==typeof n?n=JSON.parse(i):i=JSON.stringify(n)}catch(e){t({error:"Policy format error"})}var a=e.Headers;a["Content-Type"]="application/json",a["Content-MD5"]=Te.binaryBase64(Te.md5(i)),Re.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:i,headers:a,json:!0},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function h(e,t){Re.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0},function(e,n){if(e)return t(e.statusCode&&403===e.statusCode?{ErrorStatus:"Access Denied"}:e.statusCode&&405===e.statusCode?{ErrorStatus:"Method Not Allowed"}:e.statusCode&&404===e.statusCode?{ErrorStatus:"Policy Not Found"}:e);var i={};try{i=JSON.parse(n.body)}catch(e){}t(null,{Policy:i,statusCode:n.statusCode,headers:n.headers})})}function g(e,t){Re.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy"},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode||e.statusCode,headers:n.headers})})}function v(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=Te.clone(Te.isArray(i)?i:[i]);var a=Te.json2xml({Tagging:{TagSet:{Tag:i}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=Te.binaryBase64(Te.md5(a)),Re.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"tagging",headers:o},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function x(e,t){Re.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=Te.clone(Te.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}})}function y(e,t){Re.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function b(e,t){var n=e.LifecycleConfiguration||{},i=n.Rules||e.Rules||[];i=Te.clone(i);var a=Te.json2xml({LifecycleConfiguration:{Rule:i}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=Te.binaryBase64(Te.md5(a)),Re.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"lifecycle",headers:o},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function k(e,t){Re.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},function(e,n){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var i={Rules:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=[];try{a=n.LifecycleConfiguration.Rule||[]}catch(e){}a=Te.clone(Te.isArray(a)?a:[a]),t(null,{Rules:a,statusCode:n.statusCode,headers:n.headers})}})}function C(e,t){Re.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function S(e,t){if(!e.VersioningConfiguration)return void t({error:"missing param VersioningConfiguration"});var n=e.VersioningConfiguration||{},i=Te.json2xml({VersioningConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=Te.binaryBase64(Te.md5(i)),Re.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"versioning",headers:a},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function R(e,t){Re.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning"},function(e,n){e||!n.VersioningConfiguration&&(n.VersioningConfiguration={}),t(e,n)})}function A(e,t){var n=Te.clone(e.ReplicationConfiguration),i=Te.json2xml({ReplicationConfiguration:n});i=i.replace(/<(\/?)Rules>/gi,"<$1Rule>"),i=i.replace(/<(\/?)Tags>/gi,"<$1Tag>");var a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=Te.binaryBase64(Te.md5(i)),Re.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"replication",headers:a},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function w(e,t){Re.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var i={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else e||!n.ReplicationConfiguration&&(n.ReplicationConfiguration={}),n.ReplicationConfiguration.Rule&&(n.ReplicationConfiguration.Rules=n.ReplicationConfiguration.Rule,delete n.ReplicationConfiguration.Rule),t(e,n)})}function T(e,t){Re.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function _(e,t){if(!e.WebsiteConfiguration)return void t({error:"missing param WebsiteConfiguration"});var n=Te.clone(e.WebsiteConfiguration||{}),i=n.RoutingRules||n.RoutingRule||[];i=Te.isArray(i)?i:[i],delete n.RoutingRule,delete n.RoutingRules,i.length&&(n.RoutingRules={RoutingRule:i});var a=Te.json2xml({WebsiteConfiguration:n}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=Te.binaryBase64(Te.md5(a)),Re.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"website",headers:o},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function E(e,t){Re.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},function(e,n){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.WebsiteConfiguration||{};if(a.RoutingRules){var o=Te.clone(a.RoutingRules.RoutingRule||[]);o=Te.makeArray(o),a.RoutingRules=o}t(null,{WebsiteConfiguration:a,statusCode:n.statusCode,headers:n.headers})}})}function B(e,t){Re.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function O(e,t){if(!e.RefererConfiguration)return void t({error:"missing param RefererConfiguration"});var n=Te.clone(e.RefererConfiguration||{}),i=n.DomainList||{},a=i.Domains||i.Domain||[];a=Te.isArray(a)?a:[a],a.length&&(n.DomainList={Domain:a});var o=Te.json2xml({RefererConfiguration:n}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=Te.binaryBase64(Te.md5(o)),Re.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"referer",headers:r},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function I(e,t){Re.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},function(e,n){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var i={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else t(e);else{var a=n.RefererConfiguration||{};if(a.DomainList){var o=Te.makeArray(a.DomainList.Domain||[]);a.DomainList={Domains:o}}t(null,{RefererConfiguration:a,statusCode:n.statusCode,headers:n.headers})}})}function N(e,t){var n=e.DomainConfiguration||{},i=n.DomainRule||e.DomainRule||[];i=Te.clone(i);var a=Te.json2xml({DomainConfiguration:{DomainRule:i}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=Te.binaryBase64(Te.md5(a)),Re.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"domain",headers:o},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function D(e,t){Re.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(e,n){if(e)return t(e);var i=[];try{i=n.DomainConfiguration.DomainRule||[]}catch(e){}i=Te.clone(Te.isArray(i)?i:[i]),t(null,{DomainRule:i,statusCode:n.statusCode,headers:n.headers})})}function P(e,t){Re.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function M(e,t){var n=e.OriginConfiguration||{},i=n.OriginRule||e.OriginRule||[];i=Te.clone(i);var a=Te.json2xml({OriginConfiguration:{OriginRule:i}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=Te.binaryBase64(Te.md5(a)),Re.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"origin",headers:o},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function j(e,t){Re.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(e,n){if(e)return t(e);var i=[];try{i=n.OriginConfiguration.OriginRule||[]}catch(e){}i=Te.clone(Te.isArray(i)?i:[i]),t(null,{OriginRule:i,statusCode:n.statusCode,headers:n.headers})})}function U(e,t){Re.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function H(e,t){var n=Te.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),i=e.Headers;i["Content-Type"]="application/xml",i["Content-MD5"]=Te.binaryBase64(Te.md5(n)),Re.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"logging",headers:i},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function L(e,t){Re.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},function(e,n){if(e)return t(e);delete n.BucketLoggingStatus._xmlns,t(null,{BucketLoggingStatus:n.BucketLoggingStatus,statusCode:n.statusCode,headers:n.headers})})}function F(e,t){var n=Te.clone(e.InventoryConfiguration);if(n.OptionalFields){var i=n.OptionalFields||[];n.OptionalFields={Field:i}}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var a=n.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSECOS")>-1&&(a["SSE-COS"]=a.SSECOS,delete a.SSECOS)}var o=Te.json2xml({InventoryConfiguration:n}),r=e.Headers;r["Content-Type"]="application/xml",r["Content-MD5"]=Te.binaryBase64(Te.md5(o)),Re.call(this,{Action:"name/cos:PutBucketInventory",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"inventory",qs:{id:e.Id},headers:r},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function z(e,t){Re.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(e,n){if(e)return t(e);var i=n.InventoryConfiguration;if(i&&i.OptionalFields&&i.OptionalFields.Field){var a=i.OptionalFields.Field;Te.isArray(a)||(a=[a]),i.OptionalFields=a}if(i.Destination&&i.Destination.COSBucketDestination&&i.Destination.COSBucketDestination.Encryption){var o=i.Destination.COSBucketDestination.Encryption;Object.keys(o).indexOf("SSE-COS")>-1&&(o.SSECOS=o["SSE-COS"],delete o["SSE-COS"])}t(null,{InventoryConfiguration:i,statusCode:n.statusCode,headers:n.headers})})}function K(e,t){Re.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken}},function(e,n){if(e)return t(e);var i=n.ListInventoryConfigurationResult,a=i.InventoryConfiguration||[];a=Te.isArray(a)?a:[a],delete i.InventoryConfiguration,Te.each(a,function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;Te.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var n=e.Destination.COSBucketDestination.Encryption;Object.keys(n).indexOf("SSE-COS")>-1&&(n.SSECOS=n["SSE-COS"],delete n["SSE-COS"])}}),i.InventoryConfigurations=a,Te.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)})}function q(e,t){Re.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function G(e,t){if(!e.AccelerateConfiguration)return void t({error:"missing param AccelerateConfiguration"});var n={AccelerateConfiguration:e.AccelerateConfiguration||{}},i=Te.json2xml(n),a={};a["Content-Type"]="application/xml",a["Content-MD5"]=Te.binaryBase64(Te.md5(i)),Re.call(this,{Interface:"putBucketAccelerate",Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:i,action:"accelerate",headers:a},function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})})}function V(e,t){Re.call(this,{Interface:"getBucketAccelerate",Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},function(e,n){e||!n.AccelerateConfiguration&&(n.AccelerateConfiguration={}),t(e,n)})}function X(e,t){Re.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0,statusCode:a}):t(n)}i.ETag=Te.attr(i.headers,"etag",""),t(null,i)})}function W(e,t){var n={};n.prefix=e.Prefix||"",n.delimiter=e.Delimiter,n["key-marker"]=e.KeyMarker,n["version-id-marker"]=e.VersionIdMarker,n["max-keys"]=e.MaxKeys,n["encoding-type"]=e.EncodingType,Re.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,action:"versions"},function(e,n){if(e)return t(e);var i=n.ListVersionsResult||{},a=i.DeleteMarker||[];a=Te.isArray(a)?a:[a];var o=i.Version||[];o=Te.isArray(o)?o:[o];var r=Te.clone(i);delete r.DeleteMarker,delete r.Version,Te.extend(r,{DeleteMarkers:a,Versions:o,statusCode:n.statusCode,headers:n.headers}),t(null,r)})}function Q(e,t){var n=e.Query||{},i=e.QueryString||"";n["response-content-type"]=e.ResponseContentType,n["response-content-language"]=e.ResponseContentLanguage,n["response-expires"]=e.ResponseExpires,n["response-cache-control"]=e.ResponseCacheControl,n["response-content-disposition"]=e.ResponseContentDisposition,n["response-content-encoding"]=e.ResponseContentEncoding,Re.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers,qs:n,qsStr:i,rawBody:!0},function(n,i){if(n){var a=n.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(n)}t(null,{Body:i.body,ETag:Te.attr(i.headers,"etag",""),statusCode:i.statusCode,headers:i.headers})})}function $(e,t){var n=this,i=e.ContentLength,a=Te.throttleOnProgress.call(n,i,e.onProgress),o=e.Headers;o["Cache-Control"]||o["cache-control"]||(o["Cache-Control"]=""),o["Content-Type"]||o["content-type"]||(o["Content-Type"]=_e.getType(e.Key)||"application/octet-stream"),Te.getBodyMd5(n.options.UploadCheckContentMd5,e.Body,function(r){r&&(o["Content-MD5"]=Te.binaryBase64(r)),void 0!==e.ContentLength&&(o["Content-Length"]=e.ContentLength),a(null,!0),Re.call(n,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:a},function(o,r){if(o)return a(null,!0),t(o);a({loaded:i,total:i},!0);var s=ke({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:n.options.UseAccelerate?"accelerate":e.Region,object:e.Key});s=s.substr(s.indexOf("://")+3),r.Location=s,r.ETag=Te.attr(r.headers,"etag",""),t(null,r)})})}function Y(e,t){var n=this,i={},a=e.FilePath;if(!a)return void t({error:"missing param FilePath"});i["Cache-Control"]=e.CacheControl,i["Content-Disposition"]=e.ContentDisposition,i["Content-Encoding"]=e.ContentEncoding,i["Content-MD5"]=e.ContentMD5,i["Content-Length"]=e.ContentLength,i["Content-Type"]=e.ContentType,i.Expect=e.Expect,i.Expires=e.Expires,i["x-cos-acl"]=e.ACL,i["x-cos-grant-read"]=e.GrantRead,i["x-cos-grant-write"]=e.GrantWrite,i["x-cos-grant-full-control"]=e.GrantFullControl,i["x-cos-storage-class"]=e.StorageClass,i["x-cos-mime-limit"]=e.MimeLimit,i["x-cos-traffic-limit"]=e.TrafficLimit,i["x-cos-server-side-encryption-customer-algorithm"]=e.SSECustomerAlgorithm,i["x-cos-server-side-encryption-customer-key"]=e.SSECustomerKey,i["x-cos-server-side-encryption-customer-key-MD5"]=e.SSECustomerKeyMD5,i["x-cos-server-side-encryption"]=e.ServerSideEncryption,i["x-cos-server-side-encryption-cos-kms-key-id"]=e.SSEKMSKeyId,i["x-cos-server-side-encryption-context"]=e.SSEContext,delete i["Content-Length"],delete i["content-length"];for(var o in e)o.indexOf("x-cos-meta-")>-1&&(i[o]=e[o]);var r=Te.throttleOnProgress.call(n,i["Content-Length"],e.onProgress);Re.call(this,{Action:"name/cos:PostObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:i,qs:e.Query,filePath:a,TaskId:e.TaskId,onProgress:r},function(i,o){if(r(null,!0),i)return t(i);if(o&&o.headers){var s=o.headers,c=s.etag||s.Etag||s.ETag||"",l=a.substr(a.lastIndexOf("/")+1),p=ke({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key.replace(/\$\{filename\}/g,l),isLocation:!0});return t(null,{Location:p,statusCode:o.statusCode,headers:s,ETag:c})}t(null,o)})}function J(e,t){Re.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId},function(e,n){if(e){var i=e.statusCode;return i&&204===i?t(null,{statusCode:i}):i&&404===i?t(null,{BucketNotFound:!0,statusCode:i}):t(e)}t(null,{statusCode:n.statusCode,headers:n.headers})})}function Z(e,t){Re.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"acl"},function(e,n){if(e)return t(e);var i=n.AccessControlPolicy||{},a=i.Owner||{},o=i.AccessControlList&&i.AccessControlList.Grant||[];o=Te.isArray(o)?o:[o];var r=ye(i);n.headers&&n.headers["x-cos-acl"]&&(r.ACL=n.headers["x-cos-acl"]),r=Te.extend(r,{Owner:a,Grants:o,statusCode:n.statusCode,headers:n.headers}),t(null,r)})}function ee(e,t){var n=e.Headers,i="";if(e.AccessControlPolicy){var a=Te.clone(e.AccessControlPolicy||{}),o=a.Grants||a.Grant;o=Te.isArray(o)?o:[o],delete a.Grant,delete a.Grants,a.AccessControlList={Grant:o},i=Te.json2xml({AccessControlPolicy:a}),n["Content-Type"]="application/xml",n["Content-MD5"]=Te.binaryBase64(Te.md5(i))}Te.each(n,function(e,t){0===t.indexOf("x-cos-grant-")&&(n[t]=be(n[t]))}),Re.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:n,body:i},function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})})}function te(e,t){var n=e.Headers;n.Origin=e.Origin,n["Access-Control-Request-Method"]=e.AccessControlRequestMethod,n["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,Re.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:n},function(e,n){if(e)return e.statusCode&&403===e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var i=n.headers||{};t(null,{AccessControlAllowOrigin:i["access-control-allow-origin"],AccessControlAllowMethods:i["access-control-allow-methods"],AccessControlAllowHeaders:i["access-control-allow-headers"],AccessControlExposeHeaders:i["access-control-expose-headers"],AccessControlMaxAge:i["access-control-max-age"],statusCode:n.statusCode,headers:n.headers})})}function ne(e,t){var n=e.Headers;!n["Cache-Control"]&&n["cache-control"]&&(n["Cache-Control"]="");var i=e.CopySource||"",a=i.match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(!a)return void t({error:"CopySource format error"});var o=a[1],r=a[3],s=decodeURIComponent(a[4]);Re.call(this,{Scope:[{action:"name/cos:GetObject",bucket:o,region:r,prefix:s},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},function(e,n){if(e)return t(e);var i=Te.clone(n.CopyObjectResult||{});Te.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)})}function ie(e,t){var n=e.CopySource||"",i=n.match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(!i)return void t({error:"CopySource format error"});var a=i[1],o=i[3],r=decodeURIComponent(i[4]);Re.call(this,{Scope:[{action:"name/cos:GetObject",bucket:a,region:o,prefix:r},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},function(e,n){if(e)return t(e);var i=Te.clone(n.CopyPartResult||{});Te.extend(i,{statusCode:n.statusCode,headers:n.headers}),t(null,i)})}function ae(e,t){var n=e.Objects||[],i=e.Quiet;n=Te.isArray(n)?n:[n];var a=Te.json2xml({Delete:{Object:n,Quiet:i||!1}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=Te.binaryBase64(Te.md5(a));var r=Te.map(n,function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}});Re.call(this,{Scope:r,method:"POST",Bucket:e.Bucket,Region:e.Region,body:a,action:"delete",headers:o},function(e,n){if(e)return t(e);var i=n.DeleteResult||{},a=i.Deleted||[],o=i.Error||[];a=Te.isArray(a)?a:[a],o=Te.isArray(o)?o:[o];var r=Te.clone(i);Te.extend(r,{Error:o,Deleted:a,statusCode:n.statusCode,headers:n.headers}),t(null,r)})}function oe(e,t){var n=e.Headers;if(!e.RestoreRequest)return void t({error:"missing param RestoreRequest"});var i=e.RestoreRequest||{},a=Te.json2xml({RestoreRequest:i});n["Content-Type"]="application/xml",n["Content-MD5"]=Te.binaryBase64(Te.md5(a)),Re.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:a,action:"restore",headers:n},function(e,n){t(e,n)})}function re(e,t){var n=e.Tagging||{},i=n.TagSet||n.Tags||e.Tags||[];i=Te.clone(Te.isArray(i)?i:[i]);var a=Te.json2xml({Tagging:{TagSet:{Tag:i}}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=Te.binaryBase64(Te.md5(a)),Re.call(this,{Interface:"putObjectTagging",Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:a,action:"tagging",headers:o,VersionId:e.VersionId},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function se(e,t){Re.call(this,{Interface:"getObjectTagging",Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId},function(e,n){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var i={Tags:[],statusCode:e.statusCode};e.headers&&(i.headers=e.headers),t(null,i)}else{var a=[];try{a=n.Tagging.TagSet.Tag||[]}catch(e){}a=Te.clone(Te.isArray(a)?a:[a]),t(null,{Tags:a,statusCode:n.statusCode,headers:n.headers})}})}function ce(e,t){Re.call(this,{Interface:"deleteObjectTagging",Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId},function(e,n){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:n.statusCode,headers:n.headers})})}function le(e,t){var n=this,i=e.Headers;i["Cache-Control"]||i["cache-control"]||(i["Cache-Control"]=""),i["Content-Type"]||i["content-type"]||(i["Content-Type"]=_e.getType(e.Key)||"application/octet-stream"),Re.call(n,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query},function(e,n){return e?t(e):(n=Te.clone(n||{}))&&n.InitiateMultipartUploadResult?t(null,Te.extend(n.InitiateMultipartUploadResult,{statusCode:n.statusCode,headers:n.headers})):void t(null,n)})}function pe(e,t){var n=this;Te.getFileSize("multipartUpload",e,function(){Te.getBodyMd5(n.options.UploadCheckContentMd5,e.Body,function(i){i&&(e.Headers["Content-MD5"]=Te.binaryBase64(i)),Re.call(n,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null},function(e,n){if(e)return t(e);t(null,{ETag:Te.attr(n.headers,"etag",{}),statusCode:n.statusCode,headers:n.headers})})})})}function ue(e,t){for(var n=this,i=e.UploadId,a=e.Parts,o=0,r=a.length;o<r;o++)0!==a[o].ETag.indexOf('"')&&(a[o].ETag='"'+a[o].ETag+'"');var s=Te.json2xml({CompleteMultipartUpload:{Part:a}}),c=e.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=Te.binaryBase64(Te.md5(s)),Re.call(this,{Action:"name/cos:CompleteMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{uploadId:i},body:s,headers:c},function(i,a){if(i)return t(i);var o=ke({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0}),r=a.CompleteMultipartUploadResult||{},s=Te.extend(r,{Location:o,statusCode:a.statusCode,headers:a.headers});t(null,s)})}function de(e,t){var n={};n.delimiter=e.Delimiter,n["encoding-type"]=e.EncodingType,n.prefix=e.Prefix||"",n["max-uploads"]=e.MaxUploads,n["key-marker"]=e.KeyMarker,n["upload-id-marker"]=e.UploadIdMarker,n=Te.clearKey(n),Re.call(this,{Action:"name/cos:ListMultipartUploads",ResourceKey:n.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:n,action:"uploads"},function(e,n){if(e)return t(e);if(n&&n.ListMultipartUploadsResult){var i=n.ListMultipartUploadsResult.Upload||[],a=n.ListMultipartUploadsResult.CommonPrefixes||[];a=Te.isArray(a)?a:[a],i=Te.isArray(i)?i:[i],n.ListMultipartUploadsResult.Upload=i,n.ListMultipartUploadsResult.CommonPrefixes=a}var o=Te.clone(n.ListMultipartUploadsResult||{});Te.extend(o,{statusCode:n.statusCode,headers:n.headers}),t(null,o)})}function me(e,t){var n={};n.uploadId=e.UploadId,n["encoding-type"]=e.EncodingType,n["max-parts"]=e.MaxParts,n["part-number-marker"]=e.PartNumberMarker,Re.call(this,{Action:"name/cos:ListParts",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:n},function(e,n){if(e)return t(e);var i=n.ListPartsResult||{},a=i.Part||[];a=Te.isArray(a)?a:[a],i.Part=a;var o=Te.clone(i);Te.extend(o,{statusCode:n.statusCode,headers:n.headers}),t(null,o)})}function fe(e,t){var n={};n.uploadId=e.UploadId,Re.call(this,{Action:"name/cos:AbortMultipartUpload",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:n},function(e,n){if(e)return t(e);t(null,{statusCode:n.statusCode,headers:n.headers})})}function he(e,t){Re.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers},function(e,n){if(e)return t(e);t(null,n)})}function ge(e,t){Re.call(this,{method:e.Method,Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:e.Action,headers:e.Headers,qs:e.Query,body:e.Body,Url:e.Url,rawBody:e.RawBody},function(e,n){if(e)return t(e);n&&n.body&&(n.Body=n.body,delete n.body),t(e,n)})}function ve(e){var t=this;return Te.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,SystemClockOffset:t.options.SystemClockOffset})}function xe(e,t){var n=this,i=void 0===e.UseAccelerate?n.options.UseAccelerate:e.UseAccelerate,a=ke({ForcePathStyle:n.options.ForcePathStyle,protocol:e.Protocol||n.options.Protocol,domain:e.Domain||n.options.Domain,bucket:e.Bucket,region:i?"accelerate":e.Region,object:e.Key}),o="";e.Query&&(o+=Te.obj2str(e.Query)),e.QueryString&&(o+=(o?"&":"")+e.QueryString);var r=a;if(void 0!==e.Sign&&!e.Sign)return o&&(r+="?"+o),t(null,{Url:r}),r;var s=Ee.call(this,{Bucket:e.Bucket,Region:e.Region,UseAccelerate:e.UseAccelerate,Url:a}),c=Ce.call(this,{Action:"PUT"===(e.Method||"").toUpperCase()?"name/cos:PutObject":"name/cos:GetObject",Bucket:e.Bucket||"",Region:e.Region||"",Method:e.Method||"get",Key:e.Key,Expires:e.Expires,Headers:e.Headers,Query:e.Query,SignHost:s,ForceSignHost:!1!==e.ForceSignHost&&n.options.ForceSignHost},function(e,n){if(t){if(e)return void t(e);var i=a;i+="?"+(n.Authorization.indexOf("q-signature")>-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],n="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),i=new RegExp(t,"g");return e.replace(i,n)}(n.Authorization):"sign="+encodeURIComponent(n.Authorization)),n.SecurityToken&&(i+="&x-cos-security-token="+n.SecurityToken),n.ClientIP&&(i+="&clientIP="+n.ClientIP),n.ClientUA&&(i+="&clientUA="+n.ClientUA),n.Token&&(i+="&token="+n.Token),o&&(i+="&"+o),setTimeout(function(){t(null,{Url:i})})}});return c?(r+="?"+c.Authorization+(c.SecurityToken?"&x-cos-security-token="+c.SecurityToken:""),o&&(r+="&"+o)):o&&(r+="?"+o),r}function ye(e){var t={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},n={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},i=e&&e.AccessControlList||{},a=i.Grant;a&&(a=Te.isArray(a)?a:[a]);var o={READ:0,WRITE:0,FULL_CONTROL:0};return a&&a.length&&Te.each(a,function(i){"qcs::cam::anyone:anyone"===i.Grantee.ID||"http://cam.qcloud.com/groups/global/AllUsers"===i.Grantee.URI?o[i.Permission]=1:i.Grantee.ID!==e.Owner.ID&&t[n[i.Permission]].push('id="'+i.Grantee.ID+'"')}),o.FULL_CONTROL||o.WRITE&&o.READ?t.ACL="public-read-write":o.READ?t.ACL="public-read":t.ACL="private",Te.each(n,function(e){t[e]=be(t[e].join(","))}),t}function be(e){var t,n,i=e.split(","),a={};for(t=0;t<i.length;)n=i[t].trim(),a[n]?i.splice(t,1):(a[n]=!0,i[t]=n,t++);return i.join(",")}function ke(e){var t=e.bucket,n=t.substr(0,t.lastIndexOf("-")),i=t.substr(t.lastIndexOf("-")+1),a=e.domain,o=e.region,r=e.object;a||(a=["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(o)>-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(a="{Bucket}."+a)),a=a.replace(/\{\{AppId\}\}/gi,i).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,o).replace(/\{\{.*?\}\}/gi,""),a=a.replace(/\{AppId\}/gi,i).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,t).replace(/\{Region\}/gi,o).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(a)||(a="https://"+a),"/"===a.slice(-1)&&(a=a.slice(0,-1));var s=a;return e.ForcePathStyle&&(s+="/"+t),s+="/",r&&(s+=Te.camSafeUrlEncode(r).replace(/%2F/g,"/")),e.isLocation&&(s=s.replace(/^https?:\/\//,"")),s}function Ce(e,t){var n=Te.clone(e.Headers),i="";Te.each(n,function(e,t){(""===e||["content-type","cache-control"].indexOf(t.toLowerCase())>-1)&&delete n[t],"host"===t.toLowerCase()&&(i=e)});var a=!1!==e.ForceSignHost;!i&&e.SignHost&&a&&(n.Host=e.SignHost);var o=!1,r=function(e,n){o||(o=!0,n&&n.XCosSecurityToken&&!n.SecurityToken&&(n=Te.clone(n),n.SecurityToken=n.XCosSecurityToken,delete n.XCosSecurityToken),t&&t(e,n))},s=this,c=e.Bucket||"",l=e.Region||"",p="name/cos:PostObject"!==e.Action&&e.Key?e.Key:"";s.options.ForcePathStyle&&c&&(p=c+"/"+p);var u="/"+p,d={},m=e.Scope;if(!m){var f=e.Action||"",h=e.ResourceKey||e.Key||"";m=e.Scope||[{action:f,bucket:c,region:l,prefix:h}]}var g=Te.md5(JSON.stringify(m));s._StsCache=s._StsCache||[],function(){var e,t;for(e=s._StsCache.length-1;e>=0;e--){t=s._StsCache[e];var n=Math.round(Te.getSkewTime(s.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&n<t.StartTime||n>=t.ExpiredTime)s._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===g){d=t;break}}}();var v=function(){var t="";d.StartTime&&e.Expires?t=d.StartTime+";"+(d.StartTime+1*e.Expires):d.StartTime&&d.ExpiredTime&&(t=d.StartTime+";"+d.ExpiredTime);var i=Te.getAuth({SecretId:d.TmpSecretId,SecretKey:d.TmpSecretKey,Method:e.Method,Pathname:u,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:s.options.SystemClockOffset,KeyTime:t,ForceSignHost:a}),o={Authorization:i,SecurityToken:d.SecurityToken||d.XCosSecurityToken||"",Token:d.Token||"",ClientIP:d.ClientIP||"",ClientUA:d.ClientUA||""};r(null,o)},x=function(e){if(e.Authorization){var t=!1,n=e.Authorization;if(n)if(n.indexOf(" ")>-1)t=!1;else if(n.indexOf("q-sign-algorithm=")>-1&&n.indexOf("q-ak=")>-1&&n.indexOf("q-sign-time=")>-1&&n.indexOf("q-key-time=")>-1&&n.indexOf("q-url-param-list=")>-1)t=!0;else try{n=atob(n),n.indexOf("a=")>-1&&n.indexOf("k=")>-1&&n.indexOf("t=")>-1&&n.indexOf("r=")>-1&&n.indexOf("b=")>-1&&(t=!0)}catch(e){}if(!t)return Te.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return Te.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return Te.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return Te.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return Te.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return Te.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return Te.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(d.ExpiredTime&&d.ExpiredTime-Te.getSkewTime(s.options.SystemClockOffset)/1e3>60)v();else if(s.options.getAuthorization)s.options.getAuthorization.call(s,{Bucket:c,Region:l,Method:e.Method,Key:p,Pathname:u,Query:e.Query,Headers:n,Scope:m,SystemClockOffset:s.options.SystemClockOffset,ForceSignHost:a},function(e){"string"==typeof e&&(e={Authorization:e});var t=x(e);if(t)return r(t);e.Authorization?r(null,e):(d=e||{},d.Scope=m,d.ScopeKey=g,s._StsCache.push(d),v())});else{if(!s.options.getSTS)return function(){var t=Te.getAuth({SecretId:e.SecretId||s.options.SecretId,SecretKey:e.SecretKey||s.options.SecretKey,Method:e.Method,Pathname:u,Query:e.Query,Headers:n,Expires:e.Expires,SystemClockOffset:s.options.SystemClockOffset,ForceSignHost:a}),i={Authorization:t,SecurityToken:s.options.SecurityToken||s.options.XCosSecurityToken};return r(null,i),i}();s.options.getSTS.call(s,{Bucket:c,Region:l},function(e){d=e||{},d.Scope=m,d.ScopeKey=g,d.TmpSecretId||(d.TmpSecretId=d.SecretId),d.TmpSecretKey||(d.TmpSecretKey=d.SecretKey);var t=x(d);if(t)return r(t);s._StsCache.push(d),v()})}return""}function Se(e){var t=!1,n=!1,i=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var a=e.error.Code,o=e.error.Message;("RequestTimeTooSkewed"===a||"AccessDenied"===a&&"Request has expired"===o)&&(n=!0)}catch(e){}if(e)if(n&&i){var r=Date.parse(i);this.options.CorrectClockSkew&&Math.abs(Te.getSkewTime(this.options.SystemClockOffset)-r)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=r-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);return t}function Re(e,t){var n=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=Te.clearKey(e.qs),e.headers&&(e.headers=Te.clearKey(e.headers)),e.qs&&(e.qs=Te.clearKey(e.qs));var i=Te.clone(e.qs);e.action&&(i[e.action]="");var a=e.url||e.Url,o=e.SignHost||Ee.call(this,{Bucket:e.Bucket,Region:e.Region,Url:a});!function a(r){var s=n.options.SystemClockOffset;Ce.call(n,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:i,Headers:e.headers,SignHost:o,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:n.options.ForceSignHost},function(i,o){if(i)return void t(i);e.AuthData=o,Ae.call(n,e,function(i,o){i&&r<2&&(s!==n.options.SystemClockOffset||Se.call(n,i))?(e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,delete e.headers["x-cos-security-token"]),a(r+1)):t(i,o)})})}(1)}function Ae(e,t){var n=this,i=e.TaskId;if(!i||n._isRunningTask(i)){var a=e.Bucket,o=e.Region,r=e.Key,s=e.method||"GET",c=e.url||e.Url,l=e.body,p=e.json,u=e.rawBody,d=n.options.HttpDNSServiceId;n.options.UseAccelerate&&(o="accelerate"),c=c||ke({ForcePathStyle:n.options.ForcePathStyle,protocol:n.options.Protocol,domain:n.options.Domain,bucket:a,region:o,object:r}),e.action&&(c=c+"?"+e.action),e.qsStr&&(c=c.indexOf("?")>-1?c+"&"+e.qsStr:c+"?"+e.qsStr);var m={method:s,url:c,headers:e.headers,qs:e.qs,filePath:e.filePath,body:l,json:p,httpDNSServiceId:d},f="x-cos-security-token";Te.isCIHost(c)&&(f="x-ci-security-token"),m.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(m.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(m.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(m.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(m.headers[f]=e.AuthData.SecurityToken),m.headers&&(m.headers=Te.clearKey(m.headers)),m=Te.clearKey(m),e.onProgress&&"function"==typeof e.onProgress&&(m.onProgress=function(t){if(!i||n._isRunningTask(i)){var a=t?t.loaded:0;e.onProgress({loaded:a,total:t.total})}}),this.options.Timeout&&(m.timeout=this.options.Timeout),n.options.ForcePathStyle&&(m.pathStyle=n.options.ForcePathStyle),n.emit("before-send",m);var h=we(m,function(e,a,o){if("abort"!==e){var r,s=function(e,o){if(i&&n.off("inner-kill-task",g),!r){r=!0;var s={};a&&a.statusCode&&(s.statusCode=a.statusCode),a&&a.headers&&(s.headers=a.headers),e?(e=Te.extend(e||{},s),t(e,null)):(o=Te.extend(o||{},s),t(null,o)),h=null}};if(e)return void s({error:e});var c;if(u)c={},c.body=o;else try{c=o&&o.indexOf("<")>-1&&o.indexOf(">")>-1&&Te.xml2json(o)||{}}catch(e){c=o||{}}var l=a.statusCode;return 2===Math.floor(l/100)?c.Error?void s({error:c.Error}):void s(null,c):void s({error:c.Error||c})}}),g=function e(t){t.TaskId===i&&(h&&h.abort&&h.abort(),n.off("inner-kill-task",e))};i&&n.on("inner-kill-task",g)}}var we=n(22),Te=(n(4),n(0)),_e=n(23),Ee=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate,n=e.Url||ke({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region}),i=n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$").test(i)?i:""},Be={getService:i,putBucket:a,headBucket:o,getBucket:r,deleteBucket:s,putBucketAcl:c,getBucketAcl:l,putBucketCors:p,getBucketCors:u,deleteBucketCors:d,getBucketLocation:m,getBucketPolicy:h,putBucketPolicy:f,deleteBucketPolicy:g,putBucketTagging:v,getBucketTagging:x,deleteBucketTagging:y,putBucketLifecycle:b,getBucketLifecycle:k,deleteBucketLifecycle:C,putBucketVersioning:S,getBucketVersioning:R,putBucketReplication:A,getBucketReplication:w,deleteBucketReplication:T,putBucketWebsite:_,getBucketWebsite:E,deleteBucketWebsite:B,putBucketReferer:O,getBucketReferer:I,putBucketDomain:N,getBucketDomain:D,deleteBucketDomain:P,putBucketOrigin:M,getBucketOrigin:j,deleteBucketOrigin:U,putBucketLogging:H,getBucketLogging:L,putBucketInventory:F,getBucketInventory:z,listBucketInventory:K,deleteBucketInventory:q,putBucketAccelerate:G,getBucketAccelerate:V,getObject:Q,headObject:X,listObjectVersions:W,putObject:$,postObject:Y,deleteObject:J,getObjectAcl:Z,putObjectAcl:ee,optionsObject:te,putObjectCopy:ne,deleteMultipleObject:ae,restoreObject:oe,putObjectTagging:re,getObjectTagging:se,deleteObjectTagging:ce,appendObject:he,uploadPartCopy:ie,multipartInit:le,multipartUpload:pe,multipartComplete:ue,multipartList:de,multipartListPart:me,multipartAbort:fe,request:ge,getObjectUrl:xe,getAuth:ve};e.exports.init=function(e,t){t.transferToTaskMethod(Be,"postObject"),t.transferToTaskMethod(Be,"putObject"),Te.each(Be,function(t,n){e.prototype[n]=Te.apiWrapper(n,t)})}},function(e,t,n){"use strict";function i(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function a(e,t){var n=[];for(var a in e)e.hasOwnProperty(a)&&n.push(t?i(a).toLowerCase():a);return n.sort(function(e,t){return e=e.toLowerCase(),t=t.toLowerCase(),e===t?0:e>t?1:-1})}var o=function(e,t){var n,o,r,s=[],c=a(e);for(n=0;n<c.length;n++)o=c[n],r=void 0===e[o]||null===e[o]?"":""+e[o],o=t?i(o).toLowerCase():i(o),r=i(r)||"",s.push(o+"="+r);return s.join("&")},r=function(e,t){var n,i=e.filePath,a=e.headers||{},r=e.url||e.Url,s=e.method,c=e.onProgress,l=e.httpDNSServiceId,p=function(e,n){var i=n.header,a={};if(i)for(var o in i)i.hasOwnProperty(o)&&(a[o.toLowerCase()]=i[o]);t(e,{statusCode:n.statusCode,headers:a},n.data)};if(i){var u,d=r.match(/^(https?:\/\/[^/]+\/)([^/]*\/?)(.*)$/);e.pathStyle?(u=decodeURIComponent(d[3]||""),r=d[1]+d[2]):(u=decodeURIComponent(d[2]+d[3]||""),r=d[1]);var m={key:u,success_action_status:200,Signature:a.Authorization},f=["Cache-Control","Content-Type","Content-Disposition","Content-Encoding","Expires","x-cos-storage-class","x-cos-security-token","x-ci-security-token"];for(var h in e.headers)e.headers.hasOwnProperty(h)&&(h.indexOf("x-cos-meta-")>-1||f.indexOf(h)>-1)&&(m[h]=e.headers[h]);a["x-cos-acl"]&&(m.acl=a["x-cos-acl"]),!m["Content-Type"]&&(m["Content-Type"]=""),n=wx.uploadFile({url:r,method:s,name:"file",header:a,filePath:i,formData:m,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}}),n.onProgressUpdate(function(e){c&&c({loaded:e.totalBytesSent,total:e.totalBytesExpectedToSend,progress:e.progress/100})})}else{var g=e.qs&&o(e.qs)||"";g&&(r+=(r.indexOf("?")>-1?"&":"?")+g),a["Content-Length"]&&delete a["Content-Length"];var v={url:r,method:s,header:a,dataType:"text",data:e.body,timeout:e.timeout,success:function(e){p(null,e)},fail:function(e){p(e.errMsg,e)}};l&&Object.assign(v,{enableHttpDNS:!0,httpDNSServiceId:l}),n=wx.request(v)}return n};e.exports=r},function(e,t,n){"use strict";var i=n(24);e.exports=new i(n(25),n(26))},function(e,t,n){"use strict";function i(){this._types=Object.create(null),this._extensions=Object.create(null);for(var e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}i.prototype.define=function(e,t){for(var n in e){var i=e[n].map(function(e){return e.toLowerCase()});n=n.toLowerCase();for(var a=0;a<i.length;a++){var o=i[a];if("*"!==o[0]){if(!t&&o in this._types)throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+n+'".');this._types[o]=n}}if(t||!this._extensions[n]){var r=i[0];this._extensions[n]="*"!==r[0]?r:r.substr(1)}}},i.prototype.getType=function(e){e=String(e);var t=e.replace(/^.*[/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),i=t.length<e.length;return(n.length<t.length-1||!i)&&this._types[n]||null},i.prototype.getExtension=function(e){return(e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1)&&this._extensions[e.toLowerCase()]||null},e.exports=i},function(e,t,n){"use strict";e.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},function(e,t,n){"use strict";e.exports={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},function(e,t,n){"use strict";function i(e,t){var n=this;if(!b.canFileSlice())return e.SkipTask=!0,void n.postObject(e,t);var i,o,r=new y,c=e.TaskId,p=e.Bucket,u=e.Region,d=e.Key,m=e.FilePath,f=e.ChunkSize||e.SliceSize||n.options.ChunkSize,h=e.AsyncLimit,g=e.StorageClass,x=e.ServerSideEncryption,k=e.onHashProgress;r.on("error",function(i){if(n._isRunningTask(c)){var a={UploadId:e.UploadData.UploadId||"",err:i};return t(a)}}),r.on("upload_complete",function(n){var i=b.extend({UploadId:e.UploadData.UploadId||""},n);t(null,i)}),r.on("upload_slice_complete",function(e){l.call(n,{Bucket:p,Region:u,Key:d,UploadId:e.UploadId,SliceList:e.SliceList},function(t,a){if(n._isRunningTask(c)){if(v.removeUsing(e.UploadId),t)return o(null,!0),r.emit("error",t);v.removeUploadId(e.UploadId),o({loaded:i,total:i},!0),r.emit("upload_complete",a)}})}),r.on("get_upload_data_finish",function(t){var a=v.getFileId(e.FileStat,e.ChunkSize,p,d);a&&v.saveUploadId(a,t.UploadId,n.options.UploadIdCacheLimit),v.setUsing(t.UploadId),o(null,!0),s.call(n,{TaskId:c,Bucket:p,Region:u,Key:d,FilePath:m,FileSize:i,SliceSize:f,AsyncLimit:h,ServerSideEncryption:x,UploadData:t,onProgress:o},function(e,t){if(n._isRunningTask(c))return e?(o(null,!0),r.emit("error",e)):void r.emit("upload_slice_complete",t)})}),r.on("get_file_size_finish",function(){if(o=b.throttleOnProgress.call(n,i,e.onProgress),e.UploadData.UploadId)r.emit("get_upload_data_finish",e.UploadData);else{var t=b.extend({TaskId:c,Bucket:p,Region:u,Key:d,Headers:e.Headers,StorageClass:g,FilePath:m,FileSize:i,SliceSize:f,onHashProgress:k},e);a.call(n,t,function(t,i){if(n._isRunningTask(c)){if(t)return r.emit("error",t);e.UploadData.UploadId=i.UploadId,e.UploadData.PartList=i.PartList,r.emit("get_upload_data_finish",e.UploadData)}})}}),i=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),b.each(e.Headers,function(t,n){"content-length"===n.toLowerCase()&&delete e.Headers[n]}),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],a=1048576,o=0;o<t.length&&(a=1024*t[o]*1024,!(i/a<=n.options.MaxPartNumber));o++);e.ChunkSize=e.SliceSize=f=Math.max(f,a)}(),0===i?(e.Body="",e.ContentLength=0,e.SkipTask=!0,n.putObject(e,function(e,n){if(e)return t(e);t(null,n)})):r.emit("get_file_size_finish")}function a(e,t){var n=e.TaskId,i=e.Bucket,a=e.Region,s=e.Key,c=e.StorageClass,l=this,p={},u=e.FileSize,d=e.SliceSize,m=Math.ceil(u/d),f=0,h=0,g=b.throttleOnProgress.call(l,u,e.onHashProgress),k=function(t,n){var i=d*(t-1),a=Math.min(i+d,u),o=a-i;p[t]?n(null,{PartNumber:t,ETag:p[t],Size:o}):b.fileSlice(e.FilePath,i,a,function(e){try{var i=b.getFileMd5(e)}catch(e){return n(e)}var a='"'+i+'"';p[t]=a,f+=1,h+=o,n(null,{PartNumber:t,ETag:a,Size:o}),g({loaded:h,total:u})})},C=function(e,t){var n=e.length;if(0===n)return t(null,!0);if(n>m)return t(null,!1);if(n>1){if(Math.max(e[0].Size,e[1].Size)!==d)return t(null,!1)}!function i(a){if(a<n){var o=e[a];k(o.PartNumber,function(e,n){n&&n.ETag===o.ETag&&n.Size===o.Size?i(a+1):t(null,!1)})}else t(null,!0)}(0)},S=new y;S.on("error",function(e){if(l._isRunningTask(n))return t(e)}),S.on("upload_id_available",function(e){var n={},i=[];b.each(e.PartList,function(e){n[e.PartNumber]=e});for(var a=1;a<=m;a++){var o=n[a];o?(o.PartNumber=a,o.Uploaded=!0):o={PartNumber:a,ETag:null,Uploaded:!1},i.push(o)}e.PartList=i,t(null,e)}),S.on("no_available_upload_id",function(){if(l._isRunningTask(n)){var o=b.extend({Bucket:i,Region:a,Key:s,Headers:b.clone(e.Headers),Query:b.clone(e.Query),StorageClass:c},e);l.multipartInit(o,function(e,i){if(l._isRunningTask(n)){if(e)return S.emit("error",e);var a=i.UploadId;if(!a)return t({Message:"no upload id"});S.emit("upload_id_available",{UploadId:a,PartList:[]})}})}}),S.on("has_and_check_upload_id",function(e){e=e.reverse(),x.eachLimit(e,1,function(e,t){if(l._isRunningTask(n))return v.using[e]?void t():void r.call(l,{Bucket:i,Region:a,Key:s,UploadId:e},function(i,a){if(l._isRunningTask(n)){if(i)return v.removeUsing(e),S.emit("error",i);var o=a.PartList;o.forEach(function(e){e.PartNumber*=1,e.Size*=1,e.ETag=e.ETag||""}),C(o,function(i,a){if(l._isRunningTask(n))return i?S.emit("error",i):void(a?t({UploadId:e,PartList:o}):t())})}})},function(e){l._isRunningTask(n)&&(g(null,!0),e&&e.UploadId?S.emit("upload_id_available",e):S.emit("no_available_upload_id"))})}),S.on("seek_local_avail_upload_id",function(t){var o=v.getFileId(e.FileStat,e.ChunkSize,i,s),c=v.getUploadIdList(o);if(!o||!c)return void S.emit("has_and_check_upload_id",t);!function e(o){if(o>=c.length)return void S.emit("has_and_check_upload_id",t);var p=c[o];return b.isInArray(t,p)?v.using[p]?void e(o+1):void r.call(l,{Bucket:i,Region:a,Key:s,UploadId:p},function(t,i){l._isRunningTask(n)&&(t?(v.removeUploadId(p),e(o+1)):S.emit("upload_id_available",{UploadId:p,PartList:i.PartList}))}):(v.removeUploadId(p),void e(o+1))}(0)}),S.on("get_remote_upload_id_list",function(){o.call(l,{Bucket:i,Region:a,Key:s},function(t,a){if(l._isRunningTask(n)){if(t)return S.emit("error",t);var o=b.filter(a.UploadList,function(e){return e.Key===s&&(!c||e.StorageClass.toUpperCase()===c.toUpperCase())}).reverse().map(function(e){return e.UploadId||e.UploadID});if(o.length)S.emit("seek_local_avail_upload_id",o);else{var r,p=v.getFileId(e.FileStat,e.ChunkSize,i,s);p&&(r=v.getUploadIdList(p))&&b.each(r,function(e){v.removeUploadId(e)}),S.emit("no_available_upload_id")}}})}),S.emit("get_remote_upload_id_list")}function o(e,t){var n=this,i=[],a={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key};!function e(){n.multipartList(a,function(n,o){if(n)return t(n);i.push.apply(i,o.Upload||[]),"true"===o.IsTruncated?(a.KeyMarker=o.NextKeyMarker,a.UploadIdMarker=o.NextUploadIdMarker,e()):t(null,{UploadList:i})})}()}function r(e,t){var n=this,i=[],a={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId};!function e(){n.multipartListPart(a,function(n,o){if(n)return t(n);i.push.apply(i,o.Part||[]),"true"===o.IsTruncated?(a.PartNumberMarker=o.NextPartNumberMarker,e()):t(null,{PartList:i})})}()}function s(e,t){var n=this,i=e.TaskId,a=e.Bucket,o=e.Region,r=e.Key,s=e.UploadData,l=e.FileSize,p=e.SliceSize,u=Math.min(e.AsyncLimit||n.options.ChunkParallelLimit||1,256),d=e.FilePath,m=Math.ceil(l/p),f=0,h=e.ServerSideEncryption,g=b.filter(s.PartList,function(e){return e.Uploaded&&(f+=e.PartNumber>=m?l%p||p:p),!e.Uploaded}),v=e.onProgress;x.eachLimit(g,u,function(e,t){if(n._isRunningTask(i)){var u=e.PartNumber,m=Math.min(l,e.PartNumber*p)-(e.PartNumber-1)*p,g=0;c.call(n,{TaskId:i,Bucket:a,Region:o,Key:r,SliceSize:p,FileSize:l,PartNumber:u,ServerSideEncryption:h,FilePath:d,UploadData:s,onProgress:function(e){f+=e.loaded-g,g=e.loaded,v({loaded:f,total:l})}},function(a,o){n._isRunningTask(i)&&(a?f-=g:(f+=m-g,e.ETag=o.ETag),v({loaded:f,total:l}),t(a||null,o))})}},function(e){if(n._isRunningTask(i))return e?t(e):void t(null,{UploadId:s.UploadId,SliceList:s.PartList})})}function c(e,t){var n=this,i=e.TaskId,a=e.Bucket,o=e.Region,r=e.Key,s=e.FileSize,c=e.FilePath,l=1*e.PartNumber,p=e.SliceSize,u=e.ServerSideEncryption,d=e.UploadData,m=n.options.ChunkRetryTimes+1,f=e.Headers||{},h=p*(l-1),g=p,v=h+p;v>s&&(v=s,g=v-h);var y=["x-cos-traffic-limit","x-cos-mime-limit"],k={};b.each(f,function(e,t){y.indexOf(t)>-1&&(k[t]=e)}),b.fileSlice(c,h,v,function(s){var c=b.getFileMd5(s),p=c?b.binaryBase64(c):null,f=d.PartList[l-1];x.retry(m,function(t){n._isRunningTask(i)&&n.multipartUpload({TaskId:i,Bucket:a,Region:o,Key:r,ContentLength:g,PartNumber:l,UploadId:d.UploadId,ServerSideEncryption:u,Body:s,Headers:k,onProgress:e.onProgress,ContentMD5:p},function(e,a){if(n._isRunningTask(i))return e?t(e):(f.Uploaded=!0,t(null,a))})},function(e,a){if(n._isRunningTask(i))return t(e,a)})})}function l(e,t){var n=e.Bucket,i=e.Region,a=e.Key,o=e.UploadId,r=e.SliceList,s=this,c=this.options.ChunkRetryTimes+1,l=r.map(function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}});x.retry(c,function(e){s.multipartComplete({Bucket:n,Region:i,Key:a,UploadId:o,Parts:l},e)},function(e,n){t(e,n)})}function p(e,t){var n=e.Bucket,i=e.Region,a=e.Key,r=e.UploadId,s=e.Level||"task",c=e.AsyncLimit,l=this,p=new y;if(p.on("error",function(e){return t(e)}),p.on("get_abort_array",function(o){u.call(l,{Bucket:n,Region:i,Key:a,Headers:e.Headers,AsyncLimit:c,AbortArray:o},function(e,n){if(e)return t(e);t(null,n)})}),"bucket"===s)o.call(l,{Bucket:n,Region:i},function(e,n){if(e)return t(e);p.emit("get_abort_array",n.UploadList||[])});else if("file"===s){if(!a)return t({error:"abort_upload_task_no_key"});o.call(l,{Bucket:n,Region:i,Key:a},function(e,n){if(e)return t(e);p.emit("get_abort_array",n.UploadList||[])})}else{if("task"!==s)return t({error:"abort_unknown_level"});if(!r)return t({error:"abort_upload_task_no_id"});if(!a)return t({error:"abort_upload_task_no_key"});p.emit("get_abort_array",[{Key:a,UploadId:r}])}}function u(e,t){var n=e.Bucket,i=e.Region,a=e.Key,o=e.AbortArray,r=e.AsyncLimit||1,s=this,c=0,l=new Array(o.length);x.eachLimit(o,r,function(t,o){var r=c;if(a&&a!==t.Key)return l[r]={error:{KeyNotMatch:!0}},void o(null);var p=t.UploadId||t.UploadID;s.multipartAbort({Bucket:n,Region:i,Key:t.Key,Headers:e.Headers,UploadId:p},function(e){var a={Bucket:n,Region:i,Key:t.Key,UploadId:p};l[r]={error:e,task:a},o(null)}),c++},function(e){if(e)return t(e);for(var n=[],i=[],a=0,o=l.length;a<o;a++){var r=l[a];r.task&&(r.error?i.push(r.task):n.push(r.task))}return t(null,{successList:n,errorList:i})})}function d(e,t){var n=this,i=void 0===e.SliceSize?n.options.SliceSize:e.SliceSize,a=[],o=e.FileSize,r={TaskId:""};b.each(e,function(e,t){"object"!==(void 0===e?"undefined":g(e))&&"function"!=typeof e&&(r[t]=e)});var s=e.onTaskReady;e.onTaskReady=function(e){r.TaskId=e,s&&s(e)};var c=e.onFileFinish,l=function(e,n){c&&c(e,n,r),t&&t(e,n)},p=o>i?"sliceUploadFile":"postObject";a.push({api:p,params:e,callback:l}),n._addTasks(a)}function m(e,t){var n=this,i=void 0===e.SliceSize?n.options.SliceSize:e.SliceSize,a=0,o=0,r=b.throttleOnProgress.call(n,o,e.onProgress),s=e.files.length,c=e.onFileFinish,l=Array(s),p=function(e,n,i){r(null,!0),c&&c(e,n,i),l[i.Index]={options:i,error:e,data:n},--s<=0&&t&&t(null,{files:l})},u=[];b.each(e.files,function(e,t){var n=e.FileSize,s={Index:t,TaskId:""};a+=n,b.each(e,function(e,t){"object"!==(void 0===e?"undefined":g(e))&&"function"!=typeof e&&(s[t]=e)});var c=e.onTaskReady;e.onTaskReady=function(e){s.TaskId=e,c&&c(e)};var l=0,d=e.onProgress;e.onProgress=function(e){o=o-l+e.loaded,l=e.loaded,d&&d(e),r({loaded:o,total:a})};var m=e.onFileFinish,f=function(e,t){m&&m(e,t),p&&p(e,t,s)},h=n>i?"sliceUploadFile":"postObject";u.push({api:h,params:e,callback:f})}),n._addTasks(u)}function f(e,t){var n=new y,i=this,a=e.Bucket,o=e.Region,r=e.Key,s=e.CopySource,c=s.match(/^([^.]+-\d+)\.cos(v6)?\.([^.]+)\.[^/]+\/(.+)$/);if(!c)return void t({error:"CopySource format error"});var l=c[1],p=c[3],u=decodeURIComponent(c[4]),d=void 0===e.CopySliceSize?i.options.CopySliceSize:e.CopySliceSize;d=Math.max(0,d);var m,f,g=e.CopyChunkSize||this.options.CopyChunkSize,v=this.options.CopyChunkParallelLimit,k=0;n.on("copy_slice_complete",function(e){i.multipartComplete({Bucket:a,Region:o,Key:r,UploadId:e.UploadId,Parts:e.PartList},function(e,n){if(e)return f(null,!0),t(e);f({loaded:m,total:m},!0),t(null,n)})}),n.on("get_copy_data_finish",function(e){x.eachLimit(e.PartList,v,function(t,n){var c=t.PartNumber,l=t.CopySourceRange,p=t.end-t.start,u=0;h.call(i,{Bucket:a,Region:o,Key:r,CopySource:s,UploadId:e.UploadId,PartNumber:c,CopySourceRange:l,onProgress:function(e){k+=e.loaded-u,u=e.loaded,f({loaded:k,total:m})}},function(e,i){if(e)return n(e);f({loaded:k,total:m}),k+=p-u,t.ETag=i.ETag,n(e||null,i)})},function(i){if(i)return f(null,!0),t(i);n.emit("copy_slice_complete",e)})}),n.on("get_file_size_finish",function(s){!function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,a=0;a<t.length&&(n=1024*t[a]*1024,!(m/n<=i.options.MaxPartNumber));a++);e.ChunkSize=g=Math.max(g,n);for(var o=Math.ceil(m/g),r=[],s=1;s<=o;s++){var c=(s-1)*g,l=s*g<m?s*g-1:m-1,p={PartNumber:s,start:c,end:l,CopySourceRange:"bytes="+c+"-"+l};r.push(p)}e.PartList=r}();var c;if(c="Replaced"===e.Headers["x-cos-metadata-directive"]?e.Headers:s,c["x-cos-storage-class"]=e.Headers["x-cos-storage-class"]||s["x-cos-storage-class"],c=b.clearKey(c),"ARCHIVE"===s["x-cos-storage-class"]||"DEEP_ARCHIVE"===s["x-cos-storage-class"]){var l=s["x-cos-restore"];if(!l||'ongoing-request="true"'===l)return void t({error:"Unrestored archive object is not allowed to be copied"})}delete c["x-cos-copy-source"],delete c["x-cos-metadata-directive"],delete c["x-cos-copy-source-If-Modified-Since"],delete c["x-cos-copy-source-If-Unmodified-Since"],delete c["x-cos-copy-source-If-Match"],delete c["x-cos-copy-source-If-None-Match"],i.multipartInit({Bucket:a,Region:o,Key:r,Headers:c},function(i,a){if(i)return t(i);e.UploadId=a.UploadId,n.emit("get_copy_data_finish",e)})}),i.headObject({Bucket:l,Region:p,Key:u},function(a,o){if(a)return void t(a.statusCode&&404===a.statusCode?{ErrorStatus:u+" Not Exist"}:a);if(void 0===(m=e.FileSize=o.headers["content-length"])||!m)return void t({error:'get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.'});if(f=b.throttleOnProgress.call(i,m,e.onProgress),m<=d)e.Headers["x-cos-metadata-directive"]||(e.Headers["x-cos-metadata-directive"]="Copy"),i.putObjectCopy(e,function(e,n){if(e)return f(null,!0),t(e);f({loaded:m,total:m},!0),t(e,n)});else{var r=o.headers,s={"Cache-Control":r["cache-control"],"Content-Disposition":r["content-disposition"],"Content-Encoding":r["content-encoding"],"Content-Type":r["content-type"],Expires:r.expires,"x-cos-storage-class":r["x-cos-storage-class"]};b.each(r,function(e,t){0===t.indexOf("x-cos-meta-")&&t.length>"x-cos-meta-".length&&(s[t]=e)}),n.emit("get_file_size_finish",s)}})}function h(e,t){var n=e.TaskId,i=e.Bucket,a=e.Region,o=e.Key,r=e.CopySource,s=e.UploadId,c=1*e.PartNumber,l=e.CopySourceRange,p=this.options.ChunkRetryTimes+1,u=this;x.retry(p,function(t){u.uploadPartCopy({TaskId:n,Bucket:i,Region:a,Key:o,CopySource:r,UploadId:s,PartNumber:c,CopySourceRange:l,onProgress:e.onProgress},function(e,n){t(e||null,n)})},function(e,n){return t(e,n)})}var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v=n(6),x=n(28),y=n(5).EventProxy,b=n(0),k={sliceUploadFile:i,abortUploadTask:p,uploadFile:d,uploadFiles:m,sliceCopyFile:f};e.exports.init=function(e,t){t.transferToTaskMethod(k,"sliceUploadFile"),b.each(k,function(t,n){e.prototype[n]=b.apiWrapper(n,t)})}},function(e,t,n){"use strict";var i=function(e,t,n,i){if(i=i||function(){},!e.length||t<=0)return i();var a=0,o=0,r=0;!function s(){if(a>=e.length)return i();for(;r<t&&o<e.length;)o+=1,r+=1,n(e[o-1],function(t){t?(i(t),i=function(){}):(a+=1,r-=1,a>=e.length?i():s())})}()},a=function(e,t,n){e<1?n():function i(a){t(function(t,o){t&&a<e?i(a+1):n(t,o)})}(1)},o={eachLimit:i,retry:a};e.exports=o}])});