123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- (function(){function _typeof2(e){return _typeof2="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},_typeof2(e)}function asyncGeneratorStep(e,t,r,o,n,i,a){try{var s=e[i](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(o,n)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(o,n){var i=e.apply(t,r);function a(e){asyncGeneratorStep(i,o,n,a,s,"next",e)}function s(e){asyncGeneratorStep(i,o,n,a,s,"throw",e)}a(void 0)}))}}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(c){s=!0,n=c}finally{try{a||null==r.return||r.return()}finally{if(s)throw n}}return i}}function _arrayWithHoles(e){if(Array.isArray(e))return e}var __vite_style__=document.createElement("style");__vite_style__.innerHTML=":root{--van-uploader-size: 2.13333rem;--van-uploader-icon-size: .64rem;--van-uploader-icon-color: var(--van-gray-4);--van-uploader-text-color: var(--van-text-color-2);--van-uploader-text-font-size: var(--van-font-size-sm);--van-uploader-upload-background-color: var(--van-gray-1);--van-uploader-upload-active-color: var(--van-active-color);--van-uploader-delete-color: var(--van-white);--van-uploader-delete-icon-size: .37333rem;--van-uploader-delete-background-color: rgba(0, 0, 0, .7);--van-uploader-file-background-color: var(--van-background-color);--van-uploader-file-icon-size: .53333rem;--van-uploader-file-icon-color: var(--van-gray-7);--van-uploader-file-name-padding: 0 var(--van-padding-base);--van-uploader-file-name-margin-top: var(--van-padding-xs);--van-uploader-file-name-font-size: var(--van-font-size-sm);--van-uploader-file-name-text-color: var(--van-gray-7);--van-uploader-mask-text-color: var(--van-white);--van-uploader-mask-background-color: rgba(50, 50, 51, .88);--van-uploader-mask-icon-size: .58667rem;--van-uploader-mask-message-font-size: var(--van-font-size-sm);--van-uploader-mask-message-line-height: var(--van-line-height-xs);--van-uploader-loading-icon-size: .58667rem;--van-uploader-loading-icon-color: var(--van-white);--van-uploader-disabled-opacity: var(--van-disabled-opacity)}.van-uploader{position:relative;display:inline-block}.van-uploader__wrapper{display:flex;flex-wrap:wrap}.van-uploader__wrapper--disabled{opacity:var(--van-uploader-disabled-opacity)}.van-uploader__input{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;cursor:pointer;opacity:0}.van-uploader__input-wrapper{position:relative}.van-uploader__input:disabled{cursor:not-allowed}.van-uploader__upload{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:var(--van-uploader-size);height:var(--van-uploader-size);margin:0 var(--van-padding-xs) var(--van-padding-xs) 0;background:var(--van-uploader-upload-background-color)}.van-uploader__upload:active{background-color:var(--van-uploader-upload-active-color)}.van-uploader__upload--readonly:active{background-color:var(--van-uploader-upload-background-color)}.van-uploader__upload-icon{color:var(--van-uploader-icon-color);font-size:var(--van-uploader-icon-size)}.van-uploader__upload-text{margin-top:var(--van-padding-xs);color:var(--van-uploader-text-color);font-size:var(--van-uploader-text-font-size)}.van-uploader__preview{position:relative;margin:0 var(--van-padding-xs) var(--van-padding-xs) 0;cursor:pointer}.van-uploader__preview-image{display:block;width:var(--van-uploader-size);height:var(--van-uploader-size);overflow:hidden}.van-uploader__preview-delete{position:absolute;top:0;right:0;width:var(--van-uploader-delete-icon-size);height:var(--van-uploader-delete-icon-size);background:var(--van-uploader-delete-background-color);border-radius:0 0 0 .32rem}.van-uploader__preview-delete-icon{position:absolute;top:0;right:0;color:var(--van-uploader-delete-color);font-size:var(--van-uploader-delete-icon-size);transform:scale(.7) translate(10%,-10%)}.van-uploader__preview-cover{position:absolute;top:0;right:0;bottom:0;left:0}.van-uploader__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-uploader-mask-text-color);background:var(--van-uploader-mask-background-color)}.van-uploader__mask-icon{font-size:var(--van-uploader-mask-icon-size)}.van-uploader__mask-message{margin-top:.16rem;padding:0 var(--van-padding-base);font-size:var(--van-uploader-mask-message-font-size);line-height:var(--van-uploader-mask-message-line-height)}.van-uploader__loading{width:var(--van-uploader-loading-icon-size);height:var(--van-uploader-loading-icon-size);color:var(--van-uploader-loading-icon-color)}.van-uploader__file{display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--van-uploader-size);height:var(--van-uploader-size);background:var(--van-uploader-file-background-color)}.van-uploader__file-icon{color:var(--van-uploader-file-icon-color);font-size:var(--van-uploader-file-icon-size)}.van-uploader__file-name{box-sizing:border-box;width:100%;margin-top:var(--van-uploader-file-name-margin-top);padding:var(--van-uploader-file-name-padding);color:var(--van-uploader-file-name-text-color);font-size:var(--van-uploader-file-name-font-size);text-align:center}._uploader-section_1lib0_1{margin:.26667rem 0;height:3.86667rem;border:.02667rem dashed #ccc;border-radius:.26667rem;box-sizing:border-box;position:relative}._uploader-section_1lib0_1 ._img-close_1lib0_9{position:absolute;top:.10667rem;right:.10667rem;z-index:99;font-size:.42667rem;color:#fff;width:.53333rem;height:.53333rem;display:flex;justify-content:center;align-items:center;border-radius:50%}._uploader-section_1lib0_1 ._col-uploader_1lib0_23,._uploader-section_1lib0_1 .van-uploader{width:100%;height:100%;align-items:center;display:flex;justify-content:center}._uploader-section_1lib0_1 .van-uploader__wrapper,._uploader-section_1lib0_1 .van-uploader__input-wrapper{display:flex;align-items:center;justify-content:center;width:inherit;height:inherit}._uploader-section_1lib0_1 ._uploader_1lib0_1{display:flex;align-items:center;justify-content:center;flex-direction:column}._uploader-section_1lib0_1 ._uploader_1lib0_1 ._uploaderText_1lib0_51{font-size:.37333rem;color:#999;margin-top:.21333rem}._uploader-section_1lib0_1 ._uploadImg_1lib0_56{width:100%;height:100%;overflow:hidden}.vue-cropper[data-v-69939069]{position:relative;width:100%;height:100%;box-sizing:border-box;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;direction:ltr;touch-action:none;text-align:left;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-box[data-v-69939069],.cropper-box-canvas[data-v-69939069],.cropper-drag-box[data-v-69939069],.cropper-crop-box[data-v-69939069],.cropper-face[data-v-69939069]{position:absolute;top:0;right:0;bottom:0;left:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cropper-box-canvas img[data-v-69939069]{position:relative;text-align:left;-webkit-user-select:none;-moz-user-select:none;user-select:none;transform:none;max-width:none;max-height:none}.cropper-box[data-v-69939069]{overflow:hidden}.cropper-move[data-v-69939069]{cursor:move}.cropper-crop[data-v-69939069]{cursor:crosshair}.cropper-modal[data-v-69939069]{background:rgba(0,0,0,.5)}.cropper-view-box[data-v-69939069]{display:block;overflow:hidden;width:100%;height:100%;outline:.02667rem solid #39f;outline-color:rgba(51,153,255,.75);-webkit-user-select:none;-moz-user-select:none;user-select:none}.cropper-view-box img[data-v-69939069]{-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:left;max-width:none;max-height:none}.cropper-face[data-v-69939069]{top:0;left:0;background-color:#fff;opacity:.1}.crop-info[data-v-69939069]{position:absolute;left:0;min-width:1.73333rem;text-align:center;color:#fff;line-height:.53333rem;background-color:rgba(0,0,0,.8);font-size:.32rem}.crop-line[data-v-69939069]{position:absolute;display:block;width:100%;height:100%;opacity:.1}.line-w[data-v-69939069]{top:-.08rem;left:0;height:.13333rem;cursor:n-resize}.line-a[data-v-69939069]{top:0;left:-.08rem;width:.13333rem;cursor:w-resize}.line-s[data-v-69939069]{bottom:-.08rem;left:0;height:.13333rem;cursor:s-resize}.line-d[data-v-69939069]{top:0;right:-.08rem;width:.13333rem;cursor:e-resize}.crop-point[data-v-69939069]{position:absolute;width:.21333rem;height:.21333rem;opacity:.75;background-color:#39f;border-radius:100%}.point1[data-v-69939069]{top:-.10667rem;left:-.10667rem;cursor:nw-resize}.point2[data-v-69939069]{top:-.13333rem;left:50%;margin-left:-.08rem;cursor:n-resize}.point3[data-v-69939069]{top:-.10667rem;right:-.10667rem;cursor:ne-resize}.point4[data-v-69939069]{top:50%;left:-.10667rem;margin-top:-.08rem;cursor:w-resize}.point5[data-v-69939069]{top:50%;right:-.10667rem;margin-top:-.08rem;cursor:e-resize}.point6[data-v-69939069]{bottom:-.13333rem;left:-.10667rem;cursor:sw-resize}.point7[data-v-69939069]{bottom:-.13333rem;left:50%;margin-left:-.08rem;cursor:s-resize}.point8[data-v-69939069]{bottom:-.13333rem;right:-.10667rem;cursor:se-resize}@media screen and (max-width: 500px){.crop-point[data-v-69939069]{position:absolute;width:.53333rem;height:.53333rem;opacity:.45;background-color:#39f;border-radius:100%}.point1[data-v-69939069]{top:-.26667rem;left:-.26667rem}.point2[data-v-69939069],.point4[data-v-69939069],.point5[data-v-69939069],.point7[data-v-69939069]{display:none}.point3[data-v-69939069]{top:-.26667rem;right:-.26667rem}.point4[data-v-69939069]{top:0;left:0}.point6[data-v-69939069]{bottom:-.26667rem;left:-.26667rem}.point8[data-v-69939069]{bottom:-.26667rem;right:-.26667rem}}._upbtn_m9882_1{width:100%;height:100%}._uploadWarper_m9882_5{position:absolute;left:0;right:0;top:0;bottom:0}._bg_m9882_12{position:fixed;top:0;height:100%;width:100%;background-color:#000;left:0;z-index:1000001}._btn_m9882_21{height:8vw;padding:0;line-height:8vw;font-size:4vw;padding:0 3.5vw;border-radius:1.333vw;text-align:center}._btn1_m9882_33{height:8vw;line-height:8vw;font-size:4vw;padding:0 4vw;border-radius:1.333vw;text-align:center;background-color:#5b6e96}._img_m9882_44{height:8vw;width:8vw;position:absolute;left:calc(50% - 4vw);background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAZrElEQVR4Xu1dCbBtRXVdC4SAoggOcR6CCkbjbOKAE2iBqAE0kRLFGUVxiCZGVAzOChogDpiIEAaljEMciBGHoFFU1ERRSo0WGnHAKaJoYrRiuVLr/75Vl/f/e+/0cPoMt3fVrff+f717WLvX7dN9du9NNGkINATWRYANm4ZAQ2B9BBpB2uxoCGyAQCNImx4NgUaQNgcaAmkItBUkDbemtSIINIKsiKHbMNMQaARJw61prQgCjSArYug2zDQEGkHScGtaK4JAI8iKGLoNMw2BRpA03JrWiiDQCFLR0JJ+B8A1wmf3pd8X/+eflivW+5D035pUQqARpDDQkvYEcEsAt1j6ufjdfyshlwJY+/n24v9I/qpEI60OoBEkYxZI2gnAvQAcAOA+gRClSJDRM3wBwPkAPgbgMyR/nFPZKus2gkRaX9KdAewLYD8ABwLYObKKIYp/CsAnTZZAmO8O0YkpttkIsonVJHmv8CAA+wdi3GqKhl7T53MBbPmQ/MEMxtPbEBpBtgOtpF0CKUwMf67bmwWGrfjnC6IEsvxy2O6Mr/VGkGATSTsAOGiJGDcen7l67ZEfuxarygd6bWlCla88QSTdBMATABweTp4mZL7euvpRAGf7Q/I3vbUygYpXliCSfPT6xECOa0/AVkN08cuBKGeR/P4QHRi6zZUjiKTbBFKYHFcf2gATaf9HSyvKFyfS5yLdXBmCSLpTIIYfp/xGu0kaAicBOJHkShwVz54gkrxKPC980qZE01qLgMlhkpgss5ZZE0TSYYEYt5+1FYcb3KcBnETyHcN1od+WZ0kQSfsEYjy6X/g6126/qW+Ej3//GYCfhp/Lv/v/fGq065qP38v4/64JwC8qFx/7fN20cy/6K2iCmCgmzKxkdgSR9OxAjiFOpn4I4CMAPrtEiEv6PCoNHsImzF0BPCC87b/RQLP0hSRfNlDbvTQ7G4JIuieAFweXkF7A2k6l9pq9IHzOI2lfp8FF0h0B3BfA3cOnJmH8ktFE+ffBgSjQgVkQRNLRAE4AcNUCmGxWhR+R/MbZL9M+RvLyzRSG/rukhcvMgwHU8BDwnRWT5HVDjz23/UkTRNIegRh+p9Gn2ODvW3LFmOR9i+BjZpIsCHOdPkED8A8AjiV5Sc/t9Fb9ZAki6X6BHHfpDZ2tK8UWYpD0/mI2Er5cDgXwKADGsi/5DoBjSJ7TVwN91jtJgoSNuB+pduwBHJ8qnQHgTJIX9VD/6KqU9MBAFPuj9SXPI/mqvirvq95JEUTS1QC8EcARPQDyLZPC5CDp31dOJN0hEMWryu/2AMAbST61h3p7q3IyBJF0MwBnhSuuJQHxKrEghlePlRdJNwTw9PApffDxfpLeB01CJkEQST7jfzsAk6SU/BeAV5P0o1qT7SAg6baBJE8qDNDFJG9XuM5eqhs9QST5EtN7AVylIAKne4NP8msF65xtVZIcmOJpAB5ecJBXkLRnwKhl1ASR9FgAf18QQQcuMDF8MtUkEgFJhwB4CYA/iFTdqPhuJP+nYH1FqxotQSQ9Jxzjlhiw71q/uD1O5UMp6VqBJCU329cb6zH6KAki6SkATsk355YaPg/gWSQ/Xqi+Vg0ASY8Irj12mCwhe5H8ZomKStYxOoJIcgA2BzwrIX45ZXL4RlyTwghIso+XH7keV6jq25G8uFBdRaoZFUGCk52/8UvIcSRtvCY9IyDJj1tvKNTMPcbkNj8agkjaC8BXCkQqvCysGj4WblIJAUn3BvAuACWuGexN8uuVur5hM6MgiCQ7zZ0HwPfGc8QXdo4i+aWcSppuGgIhcLdPCH31IFd2JPnb3Epy9QcnSLjw824A9gfKEX97PZnkT3Iqabr5CEg6DcDjM2v6F5L3z6wjW30MBLH7SK5vlf2nSm0Us0FtFWw55XoRgOMysRj8huKgBAleuX+dCeLrSD4js46m3gMChUjyWJL2lRtEBiNIuM/x4UyX9VeSfP4gyLVGOyFQiCT7k3S+k+oyCEHCZZ0PAci57PR6kvY4bTJyBAqQxCdaB5L8z9pDHYogp4a4uKnjdYCE3E19attNLwGBAiR5K0nfU6kq1QkSAiy8PmOUDpTQ5xXRjK411Y0QkJR7IHM0yVIuSJ2MVZUgITSPH61SL+FcSNKhbJpMFAFJfkeV6g3sCDL7kawWQLs2QRxUzanMUsSgPISkgwA0mSgCkvzl6Iy89gpOEQfQ+OMUxRSdagTJPNK1+8gD2xvyFBOPT0fSwQDek9GzagEgqhAkxMr9RIafzmEkm29Vxowam6ok31BMDSzn+MU++u39CkMtgvhFT2og6eaVO7bZXag/kl4D4M8Tq/sgSafh7lV6J0hIQfC2xFGcQ/KRibpNbeQISHKcAb8sdhzhFHkiSft99Sa9EiQkr/GjVUp+Dt8L8b6jXXbqzfzDVyzpjwJJUtLhOYei7484nXUv0jdBXpGY2cl3yE2O3p8xe0G1VRqFQOaFqxeRdFT/XqQ3goScgKkh8J/bAiz0Yu/RVprhIu/V4+4kfdmuuPRJEF/BTIl88UmS+xYfaatw1AiES3Pej6Q8jp9GspcI/70QJKRa9uqRkk324Ba3atRzubfOSfK9ILujpIidGT+YoriRTl8EOdH3whM6ezpJp2lusqIISHLKiZTYve8gWTLy4xYLFCeIpFuEWFSxpxKOlbtvCwe6oswIw5ZkVyS7JKXIbUrvRfogiHNAPDdhdG1jngDaHFUk/R2AlIDZxU+0ihJE0k0AeO8RG/rlIpJOPNmkIeD77LcG4Ag1u0fC8WWSjkhfTEoTxOfRf5XQO0c/PDlBr6nMFAFJDvjgwA+x8nCSztteRIoRRNIOAJxOwHuQGHE2pzuSbMlrYlCbeVlJzsbrp5HYRKNFN+slCeKTB59AxIqjrqd8U8S208pPDAFJqfvZYpv1kgRx7sCjIm3gVcOrR285ASWlOsJFDiWuOMmoAN1zGUcMSpIcOd4+ebvF6IVUF0W+dIsQJOTfduSJ2CT1J5NMeV/SGS9JH83wFu3cTmTB6Hv1cxlHJE7esHtv+sxIvWKHPqUI8jAA74wchIt79eg11fJcJtZcxhE7RyT5/rpXkdgUfAeQdPyDLClFEOf8iw39WeVu8Vwm1lzGkTJbJf2t4y5H6p5C8uhInW2KZxNEks+q/Xh13cjOHEnyzZE60cXnMrHmMo5oA27NZvUAALGrwfcA3JrkL1LaXOiUIMjhAN4a2YkrADgHxA8j9aKLz2VizWUc0QYMCpK+AOAOkfpHkHxLpM6VipcgiLPQOhttjJxNMvWOekw7/vZpm/QoxKIKRx82RNW+VFiSs4W9MFL/nST/NFKnOEGcePHmkZ0o+rZzo7YbQSItE1e8JkEcx/lzcd3D/wHYJyc5aNYKIukeAJx7PEYuDZ3+VYxSatlGkFTkOulVI4h7I8kR3mPDzj6O5BmdRrOdQrkEORbASyMbrxqVvREk0jpxxWsT5M8AnBTXRbyBpGNwJUkuQXxFMjZN1qEkc6LqRQ20ESQKrtjCtQliL9/Yu+efIXm32IEtyicTRNLOAP4bwE4Rjf8vgBvUdExsBImwTnzRqgQJj1mxp1mOwrgHSc/VaMkhiPNz/HNki1VeDi73qREk0kJxxYcgyN8AiE25l5yhKocgzi347Dg8Uf3eRwJB7EQYG2fJdxdinCKjJ9ZcxhE5X7YpLulPAMTe90gOdp1DkAsBOCpejPTue7W2MykTKzZBT2sjZgrklZV0PQDfj6zl3SQfGqmzpXgOQZyPfM+IRi8jecOI8kWKtsnbHcYaWHXvzfolE96qf4/kjVLaTiKIJBPDBImRs0g+JkahRNkaRm9tlLBU9zok+ajXR74xsntKDN9UgvjRyo9YMfJMkq+NUShRtk3e7ijWwKp7bzZcQR4PIDaqe9Itw1SCOCVBrBPYg0m+vwRAMXXUMHprI8Yi+WVDrssLImtKiryYSpCUiBN2Pf6PyEFlF2+TtzuENbDq3psNVxCHlfpxZF1JuURSCeLVIzaxzU4k/dKmqtQwemujqkm3NCZJka0mBQdJJUjsEe+lJG8WOaAixdvk7Q5jDay692bjkpL8NLJ3RH1JEeBTCRJ7xHs+ydT0zxEYbFu0htFbG1kmSlKW9F4AMemgk3IaRhNEklMaxLqqn0oyJdZqEnjLSm3ydoewBlbde7O1pCRfyHMgdKfi8+cHAHwT1Q6IfxlRX1JY0hSCONJdbN7AY0m+PGIwxYrWMHpro5i5tqkoxHv2HaJccSaqEwDYYdYff8kvf35N0vdNriQpBNkLwCWRvX0aSWecqi4pk3cuvlhjdJlJmQAZ6dm6Nvc+kgdvr3AKQe4UYqZ2bdzlHknynBiFUmUTCFKq6Y3qqeKsOCOC2EXpuz0Zxm7w+5Hc7nXeFILYa9WBEGLkQSRjXeNj6l+3bCNIdxgTsIomevfeXLmkpDcBODJVfwO9Y0gev97fUwjikwOfIMTIPUl+KkahVNkEo5dquq0gBZGUdH0AlxWs0lV9iOQBG9WZQpBHATg7sqO/T/KrkTpFijeCdIcxAatqK4hHISklQPp6APzWASBIfrw0QZzaOXbD7Wu2sT783S27QckEoxdpd5NKoidWwjhG2UYOuJIcvbNUsMFO6dpSVpBjALwycqC7kox9dxLZxPaLJ0ysIu02gvQDoyR/OftLOkfs6OjVY1PXp0aQHJjTdUf57Z7wZRI9jnTItmpKuhYAZ0TOkc6R31MI0h6xckyzVTd6YtWYvDXayIduC0l8r+jpiXWdQLJzFuYUgrRNeqJlltQaQTIwlLQHgMsTqnDOw/vGhABKIUg75k2wzBqVRpBMDBOv3R5CMuoVRQpB2ovCTOO2R6x8ACVdA4DTaHSVl5KMTlGeQpDmatLVJOuXaytIPobei3SNzeYA63602vTUam23UggyNWfFmIBuqWYbZeC4ufhirWcUSc5+2yWDVNJ9dLebQpBJubunzvgYvRqnP3NpIwbXLmUl2YX9ORuUfTXJmHsjV6oqhSCTujDVBeTcMnOZvDXGkYv1Wn1JuwL45Tr1OtD1fXLyFEYTxB2RNJkrt6UNsr36akysubTRhz0k2bPDHh5rJfrUKnsPEggymaANfRhkO99isXkQ2ya9oGFCKo5fr6mySKKm1BVkMmF/Ctph3arm8u1eYxx92UPSywC8INT/NQD3IhkbO2ub7qUS5EUAfHITI4MEjovpYGrZGhNrLm2kYryZnqSrAFuSdloeQfJtm+l0+XsqQSYTerQLCLll5jJ5a4wjF+uN9CU5r8uNSD6hVDupBJlM8OpSQG1imLYHqQH0Jm1I8nw2Qb5TqjupBJlM+oNSQDWCbBeB6MOGGvYo2UYSQdyBhKPeQRLolARrvbpqPJrMpY0a9ijZRg5BYo963e/qKdhKgtUIsg0CbQXZYFJ0dRRbrmKIJJ4r64s1xgB4Nb6wSraRs4K0NNDploj+5k14xErvXXfN6HF0r3ocJXMIsjMAR6XbKWIojonqCCc/i9DJKjqXiTWXcWQZcwDlZIKEjfqHAdw/st+HknxPpE5y8blMrLmMI9mQAynmEuRYAC+N7HsRH5mubc5lYs1lHF3tNpZyuQS5BwDf1ooRh7Lfp1acrLlMrLmMI2aijKFsFkHCY9Y3Adw8cjAPJ/mOSJ2k4nOZWHMZR5IRB1QqQRBnAHps5BjOJvnoSJ2k4nOZWHMZR5IRB1QqQZDDAbw1cgyORrE3yVJxVtdtfi4Tay7jiJwngxcvQZDdAXwdgAMLx8iRJN8co5BSdi4Tay7jSLHhkDrZBAn7kNMBPC5yIOeSjMlSGln91uJzmVhzGUeSEQdUKkWQhwF4Z8I4evfNmsvEmss4EubIoCqlCLJLeMy6ceRoTib5rEidqOJzmVhzGUeU8UZQuAhBwqNMSvYfu5x4FflWX1hIquGsGN19kh+LUZrLOGLGPIayJQnyYADnJgzqxSR9x71JQ2B0CJQkyA4AHE3iFpGj9OrhVaSaA2Nk/1rxFUagGEHCY5YvzUdH0AZQ/Z7ICtu8DT0CgdIEuQkAJym5dkQfXPQikneM1GnFGwK9I1CUIGEVeRWAzimulkb4XJIORNykITAaBPogiPcgnwdw9chROjHjviS9j2nSEBgFAsUJElaRE72vSBjh6SWDfiW031QGRkCSIyKeRtKX8QaXvghym7AXcaqEWDmY5PtilVr56SMg6TEAzggj8Xu1E0leMuTIeiFIWEVSE75/kuS+Q4LS2q6PgKSbAfjSmkfzHwB4DYDXklzE3a3auT4JkpLLcDH4tmGvOg2Gb0zSuwA8dJ2e+NbqSSRdpqr0RpCwirwCwPMSRuSMQQ8k+fEE3aYyMQQkPRWAnzg2k7MAOKbB5zYrWOrvfRPEJ1mfAHD7hA77JMwk+VGCblOZCAKS/P7LUTodRqqL/NyPXIEovV+465UgYRU5DEBqroZzSDrVQpOZIiDp/QAOShie9yvHkPxAgm5nld4JEkhyJoDUO+jHkXxJ5xG1gpNBQJIzQjkzVIq8juQzUhRjdGoRZJ/wqBXrgrIYy2Ek3x4zsFZ23AhIOhTAPyb28usk907UjVKrQpCwijwbgANep8hlYT/iZbXJxBGQ5Gic7wawW+JQDur70WrRr2oECST5CID9E0H5IoCHlMwelNiPppaBgCR/8zsj1/UTq6nyaDUUQe4J4EMArpoIzoUk756o29RGgIAkR8C5ZWJXvkDS79eqSdUVJKwiR/uILmOEsw+5n4HNqFUl+SpEzgSv9mg1yAqyaFTSqQCemGHN80g6P0mTiSAg6V8B3Duju8eTPCZDP0m1+goSVpE9wqPWXZJ6vVWpapT4jH6uvKqk0wA8PgOIC0jeK0M/WXUQggSS3A+AXZp3TO498EqSz8/Qb6o9IyAp1d1ouWf7kfTGvroMRpBAkpyj3wVYVU81qltowg1Ksu/UEZlDOILkWzLrSFYflCCBJCVAPINkbOjTZNCa4sYISPJTgZ8O/JSQI08m+aacCnJ1x0AQX6ryS6PcTbddoQ3oT3JBafrpCEj6PQDnZRzlLhofRaSbwQkSVpHrBFBzjgBd1acBHEWyvXFPn+PJmpK8Ytj5cNfkSrYqvoCk9y6DyygIEkiyF4CvRLg9rwee3VL87dN8typOL0lOouRkSrnSe7zmmA6OhiCBJL4b4HsgJaR5AZdAsUMdkhw69rgORTcr8h6SdmIcjYyKIIEk9wEQFdh5AzTPCatJu3TVw5STdLeQ5Tg2Ffj2ejPK4IGjI0ggyVMAnFLIpl6R/MjVru8WAjTY6C8A+J5O7n7D1f2MpF8ej05GSZBggOcAKBVp0XfcHUW+VH2jM2StDkm6bVg1DinU5i9IXqNQXcWrGS1BAklKbfwWwDk6xgkt7lbaPJJ0VFg1fOpYQr5G0pfpRiujJkggie8rvxfAVQqi6JyKJkoLc9oBVEk3D8R4VIfiXYucTzL1blDXNrLLjZ4ggSR3BeBjWwcXKyWOBfzq9ti1PpySfKnpyQCOBHCDUsADeAvJXBeUgt1Zv6pJECSQxOSwW0ppr86LADiohN1VWhKfrZmB+yKGTemVOyX6fxVCrG1kMgQJJLkaAMds7ePbx5muFkTpLWfiIFbu2GggxpMA+FNyxVj04JkkHdNqMjIpgixQlWQvYJ9I5bjKr2ckryIOoHwmSa8us5eeVwzjd3nwk0tJFT4o/pMkSFhN7PdjkuRcutoMfCcldaT5c0n2HsVvs86U/LskH3ocCOCAEBO3jxXDXfaXzNEkP1Wy/7XqmixBAkn8cskkybm+2wXrKxZECWT5VRelsZWR5GAZC1KYGDftuY/OE/MSksZvkjJpgiw9cjkQhImSGi0lxniXhnTXvuHmABJ+fBitSLpmWCUWxEgNtxMzRgeXNjH+KUZpjGVnQZCwmjikkLPs1jxb90pyAQC/gPwAyc8MbWRJTqR65xAw/HYhUMK1Kvbr+EAOey9MXmZDkKXVxBt4p1xIDXOaY1TvUxwc77MAvhE+l5D8TU6l6+lK8iOm3xH9YQinY0L42sAQ4j2GV40PDtF4X23OjiBhNbH7gkmSGjC7NN5+LFsQxr/7pOyn4efy7/6/HQD4G3+9j4nvvzlZamoAttLjcwBqk2OQLFClB7Nc3ywJsrSaOPWCiZKSn6RP3OdSt2NdmRjnz2VAa8cxa4KE1cRJfEySlExXc7V77rgcIfFNQwdUyB1EF/3ZE2RpNfF99yeET0r23S54zr3MyhBjYciVIcgSUZyi2kTxuxOvLk02R2DliLGyBFkiije5JonJMsSJ1+bTcvgSK0uMlSfIElH83sAkOTycDA0/LYfvwcoToxFkzSSU5ONVX856UPjcePh5WrUHXwXgdxiOnD+rdxk5KK7cHqQLWJJ2WSKKCXPdLnoTLOMAewtSzPaoNscujSCboCdp90AWu7DsC+BWOYCPQNePTwtSOId9kw0QaASJnB6S7OdkouwXPGN3jqyidvFLAHiluDg8Pl1YuwNTbq8RJMN6knYKV4DtOu6Ad3b92DOjylzVbwOwJ61jgZkQF5NcyduRuUC2TXopBLfd7JsgJsrCV8o/F7+XII/9tRYfxyH+t/D5Isnv9TSsla22rSAVTS/Jb/AdJM0f720Wvy//1BIBlsnwU5L+d5OKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCDSCVAS7NTU9BBpBpmez1uOKCPw/JjUpXx7VFvoAAAAASUVORK5CYII=);background-size:100% 100%}._btndiv_m9882_53{height:13.333vw;color:#fff;justify-content:space-between;display:flex;align-items:center;padding:0 4vw;line-height:13.333vw;font-size:4vw;position:relative}._wrapper_m9882_64{height:calc(100% - 21.333vw);padding:4vw}._wrapper_m9882_64 .crop-point{opacity:0;z-index:523}._wrapper_m9882_64 .cropper-view-box{outline:.02667rem solid #fff;border:.02667rem solid #fff}._wrapper_m9882_64 .vue-cropper{background-color:#000;background-image:none}\n",document.head.appendChild(__vite_style__),System.register(["./ResizeObserver.es-legacy.8d60aee1.js","./index-legacy.4a75d877.js","./index-legacy.7e047c4c.js","./index-legacy.a082ee96.js"],(function(exports){"use strict";var createNamespace,isFunction,defineComponent,numericProp,makeRequiredProp,createVNode,Icon,Loading,getSizeStyle,isDef,callInterceptor,extend,makeNumericProp,makeStringProp,truthProp,makeArrayProp,ref,onBeforeUnmount,useExpose,useCustomFieldValue,isPromise,pick,mergeProps,reactive,withInstall,openBlock,createElementBlock,withDirectives,vShow,createBaseVNode,normalizeStyle,createCommentVNode,normalizeClass,toDisplayString,commonjsGlobal,getDefaultExportFromCjs,request,state,postMessage,Toast,getOssUploadUrl,Image$1,ImagePreview;return{setters:[function(e){createNamespace=e.E,isFunction=e.aL,defineComponent=e.d,numericProp=e.G,makeRequiredProp=e.ax,createVNode=e.j,Icon=e.N,Loading=e.aT,getSizeStyle=e.bf,isDef=e.M,callInterceptor=e.aC,extend=e.J,makeNumericProp=e.ab,makeStringProp=e.a0,truthProp=e.H,makeArrayProp=e.aY,ref=e.U,onBeforeUnmount=e.a5,useExpose=e.ak,useCustomFieldValue=e.a$,isPromise=e.aK,pick=e.aB,mergeProps=e.a8,reactive=e.S,withInstall=e.O,openBlock=e.o,createElementBlock=e.bl,withDirectives=e.a6,vShow=e.aF,createBaseVNode=e.bm,normalizeStyle=e.bn,createCommentVNode=e.bo,normalizeClass=e.bp,toDisplayString=e.bq,commonjsGlobal=e.b6,getDefaultExportFromCjs=e.b7,request=e.y,state=e.g,postMessage=e.n,Toast=e.T,getOssUploadUrl=e.br},function(e){Image$1=e.I},function(){},function(e){ImagePreview=e.I}],execute:function execute(){var _createNamespace=createNamespace("uploader"),_createNamespace2=_slicedToArray(_createNamespace,3),name=_createNamespace2[0],bem=_createNamespace2[1],t=_createNamespace2[2],toArray=function(e){return Array.isArray(e)?e:[e]};function readFileContent(e,t){return new Promise((function(r){if("file"!==t){var o=new FileReader;o.onload=function(e){r(e.target.result)},"dataUrl"===t?o.readAsDataURL(e):"text"===t&&o.readAsText(e)}else r()}))}function isOversize(e,t){return toArray(e).some((function(e){return!!e.file&&(isFunction(t)?t(e.file):e.file.size>t)}))}function filterFiles(e,t){var r=[],o=[];return e.forEach((function(e){isOversize(e,t)?o.push(e):r.push(e)})),{valid:r,invalid:o}}var IMAGE_REGEXP=/\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i,isImageUrl=function(e){return IMAGE_REGEXP.test(e)};function isImageFile(e){return!!e.isImage||(e.file&&e.file.type?0===e.file.type.indexOf("image"):e.url?isImageUrl(e.url):"string"==typeof e.content&&0===e.content.indexOf("data:image"))}var stdin_default$1=defineComponent({props:{name:numericProp,item:makeRequiredProp(Object),index:Number,imageFit:String,lazyLoad:Boolean,deletable:Boolean,previewSize:numericProp,beforeDelete:Function},emits:["delete","preview"],setup:function(e,r){var o=r.emit,n=r.slots,i=function(){var t=e.item,r=t.status,o=t.message;if("uploading"===r||"failed"===r){var n="failed"===r?createVNode(Icon,{name:"close",class:bem("mask-icon")},null):createVNode(Loading,{class:bem("loading")},null),i=isDef(o)&&""!==o;return createVNode("div",{class:bem("mask")},[n,i&&createVNode("div",{class:bem("mask-message")},[o])])}},a=function(t){var r=e.name,n=e.item,i=e.index,a=e.beforeDelete;t.stopPropagation(),callInterceptor(a,{args:[n,{name:r,index:i}],done:function(){return o("delete")}})},s=function(){return o("preview")},c=function(){if(e.deletable&&"uploading"!==e.item.status)return createVNode("div",{role:"button",class:bem("preview-delete"),tabindex:0,"aria-label":t("delete"),onClick:a},[createVNode(Icon,{name:"cross",class:bem("preview-delete-icon")},null)])},l=function(){if(n["preview-cover"]){var t=e.index,r=e.item;return createVNode("div",{class:bem("preview-cover")},[n["preview-cover"](extend({index:t},r))])}};return function(){return createVNode("div",{class:bem("preview")},[(t=e.item,isImageFile(t)?createVNode(Image$1,{fit:e.imageFit,src:t.content||t.url,class:bem("preview-image"),width:e.previewSize,height:e.previewSize,lazyLoad:e.lazyLoad,onClick:s},{default:l}):createVNode("div",{class:bem("file"),style:getSizeStyle(e.previewSize)},[createVNode(Icon,{class:bem("file-icon"),name:"description"},null),createVNode("div",{class:[bem("file-name"),"van-ellipsis"]},[t.file?t.file.name:t.url]),l()])),i(),c()]);var t}}}),uploaderProps={name:makeNumericProp(""),accept:makeStringProp("image/*"),capture:String,multiple:Boolean,disabled:Boolean,readonly:Boolean,lazyLoad:Boolean,maxCount:makeNumericProp(1/0),imageFit:makeStringProp("cover"),resultType:makeStringProp("dataUrl"),uploadIcon:makeStringProp("photograph"),uploadText:String,deletable:truthProp,afterRead:Function,showUpload:truthProp,modelValue:makeArrayProp(),beforeRead:Function,beforeDelete:Function,previewSize:numericProp,previewImage:truthProp,previewOptions:Object,previewFullImage:truthProp,maxSize:{type:[Number,String,Function],default:1/0}},stdin_default=defineComponent({name:name,props:uploaderProps,emits:["delete","oversize","click-upload","close-preview","click-preview","update:modelValue"],setup:function(e,t){var r,o=t.emit,n=t.slots,i=ref(),a=[],s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.modelValue.length;return{name:e.name,index:t}},c=function(){i.value&&(i.value.value="")},l=function(t){if(c(),isOversize(t,e.maxSize)){if(!Array.isArray(t))return void o("oversize",t,s());var r=filterFiles(t,e.maxSize);if(t=r.valid,o("oversize",r.invalid,s()),!t.length)return}t=reactive(t),o("update:modelValue",[].concat(_toConsumableArray(e.modelValue),_toConsumableArray(toArray(t)))),e.afterRead&&e.afterRead(t,s())},u=function(t){var r=e.maxCount,o=e.modelValue,n=e.resultType;if(Array.isArray(t)){var i=+r-o.length;t.length>i&&(t=t.slice(0,i)),Promise.all(t.map((function(e){return readFileContent(e,n)}))).then((function(e){var r=t.map((function(t,r){var o={file:t,status:"",message:""};return e[r]&&(o.content=e[r]),o}));l(r)}))}else readFileContent(t,n).then((function(e){var r={file:t,status:"",message:""};e&&(r.content=e),l(r)}))},d=function(t){var r=t.target.files;if(!e.disabled&&r&&r.length){var o=1===r.length?r[0]:[].slice.call(r);if(e.beforeRead){var n=e.beforeRead(o,s());if(!n)return void c();if(isPromise(n))return void n.then((function(e){u(e||o)})).catch(c)}u(o)}},p=function(){return o("close-preview")},h=function(t,i){var c=["imageFit","deletable","previewSize","beforeDelete"],l=extend(pick(e,c),pick(t,c,!0));return createVNode(stdin_default$1,mergeProps({item:t,index:i,onClick:function(){return o("click-preview",t,s(i))},onDelete:function(){return function(t,r){var n=e.modelValue.slice(0);n.splice(r,1),o("update:modelValue",n),o("delete",t,s(r))}(t,i)},onPreview:function(){return function(t){if(e.previewFullImage){var o=e.modelValue.filter(isImageFile),n=o.map((function(e){return e.file&&!e.url&&(e.url=URL.createObjectURL(e.file),a.push(e.url)),e.url})).filter(Boolean);r=ImagePreview(extend({images:n,startPosition:o.indexOf(t),onClose:p},e.previewOptions))}}(t)}},pick(e,["name","lazyLoad"]),l),{"preview-cover":n["preview-cover"]})},f=function(){if(e.previewImage)return e.modelValue.map(h)},m=function(e){return o("click-upload",e)},g=function(){if(!(e.modelValue.length>=e.maxCount)&&e.showUpload){var t=e.readonly?null:createVNode("input",{ref:i,type:"file",class:bem("input"),accept:e.accept,capture:e.capture,multiple:e.multiple,disabled:e.disabled,onChange:d},null);return n.default?createVNode("div",{class:bem("input-wrapper"),onClick:m},[n.default(),t]):createVNode("div",{class:bem("upload",{readonly:e.readonly}),style:getSizeStyle(e.previewSize),onClick:m},[createVNode(Icon,{name:e.uploadIcon,class:bem("upload-icon")},null),e.uploadText&&createVNode("span",{class:bem("upload-text")},[e.uploadText]),t])}};return onBeforeUnmount((function(){a.forEach((function(e){return URL.revokeObjectURL(e)}))})),useExpose({chooseFile:function(){i.value&&!e.disabled&&i.value.click()},closeImagePreview:function(){r&&r.close()}}),useCustomFieldValue((function(){return e.modelValue})),function(){return createVNode("div",{class:bem()},[createVNode("div",{class:bem("wrapper",{disabled:e.disabled})},[f(),g()])])}}}),Uploader=exports("U",withInstall(stdin_default)),index$1="",uploader="_uploader_1lib0_1",uploaderText="_uploaderText_1lib0_51",uploadImg="_uploadImg_1lib0_56",styles$1={"uploader-section":"_uploader-section_1lib0_1","img-close":"_img-close_1lib0_9","col-uploader":"_col-uploader_1lib0_23",uploader:uploader,uploaderText:uploaderText,uploadImg:uploadImg},index="",Y={};function I(e){var t=null;return new Promise((function(r,o){if(e.src)if(/^data\:/i.test(e.src))t=L(e.src),r(t);else if(/^blob\:/i.test(e.src)){var n=new FileReader;n.onload=function(e){t=e.target.result,r(t)},E(e.src,(function(e){n.readAsArrayBuffer(e)}))}else{var i=new XMLHttpRequest;i.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";t=i.response,r(t),i=null},i.open("GET",e.src,!0),i.responseType="arraybuffer",i.send(null)}else o("img error")}))}function E(e,t){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="blob",r.onload=function(e){(200==this.status||0===this.status)&&t(this.response)},r.send()}function L(e,t){t=t||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var r=atob(e),o=r.length%2==0?r.length:r.length+1,n=new ArrayBuffer(o),i=new Uint16Array(n),a=0;a<o;a++)i[a]=r.charCodeAt(a);return n}function k(e,t,r){var o,n="";for(o=t,r+=t;o<r;o++)n+=String.fromCharCode(e.getUint8(o));return n}function T(e){var t,r,o,n,i,a,s,c,l,u=new DataView(e),d=u.byteLength;if(255===u.getUint8(0)&&216===u.getUint8(1))for(c=2;c<d;){if(255===u.getUint8(c)&&225===u.getUint8(c+1)){a=c;break}c++}if(a&&(r=a+10,"Exif"===k(u,a+4,4)&&(((n=18761===(i=u.getUint16(r)))||19789===i)&&42===u.getUint16(r+2,n)&&((o=u.getUint32(r+4,n))>=8&&(s=r+o)))),s)for(d=u.getUint16(s,n),l=0;l<d;l++)if(c=s+12*l+2,274===u.getUint16(c,n)){c+=8,t=u.getUint16(c,n);break}return t}Y.getData=function(e){return new Promise((function(t,r){var o={};I(e).then((function(e){o.arrayBuffer=e;try{o.orientation=T(e)}catch(r){o.orientation=-1}t(o)})).catch((function(e){r(e)}))}))};var N=function(e,t){var r,o=e.__vccOpts||e,n=_createForOfIteratorHelper(t);try{for(n.s();!(r=n.n()).done;){var i=_slicedToArray(r.value,2),a=i[0],s=i[1];o[a]=s}}catch(c){n.e(c)}finally{n.f()}return o},A=defineComponent({data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:function(){return[1,1]}},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:function(){return 10},validator:function(e){return Array.isArray(e)?Number(e[0])>=0&&Number(e[1])>=0:Number(e)>=0}},fillColor:{type:String,default:""}},computed:{cropInfo:function(){var e={};if(e.top=this.cropOffsertY>21?"-21px":"0px",e.width=this.cropW>0?this.cropW:0,e.height=this.cropH>0?this.cropH:0,this.infoTrue){var t=1;this.high&&!this.full&&(t=window.devicePixelRatio),1!==this.enlarge&!this.full&&(t=Math.abs(Number(this.enlarge))),e.width=e.width*t,e.height=e.height*t,this.full&&(e.width=e.width/this.scale,e.height=e.height/this.scale)}return e.width=e.width.toFixed(0),e.height=e.height.toFixed(0),e},isIE:function(){return!!window.ActiveXObject||"ActiveXObject"in window},passive:function(){return this.isIE?null:{passive:!1}}},watch:{img:function(){this.checkedImg()},imgs:function(e){""!==e&&this.reload()},cropW:function(){this.showPreview()},cropH:function(){this.showPreview()},cropOffsertX:function(){this.showPreview()},cropOffsertY:function(){this.showPreview()},scale:function(e,t){this.showPreview()},x:function(){this.showPreview()},y:function(){this.showPreview()},autoCrop:function(e){e&&this.goAutoCrop()},autoCropWidth:function(){this.autoCrop&&this.goAutoCrop()},autoCropHeight:function(){this.autoCrop&&this.goAutoCrop()},mode:function(){this.checkedImg()},rotate:function(){this.showPreview(),(this.autoCrop||this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion:function(e){for(var t=navigator.userAgent.split(" "),r="",o=new RegExp(e,"i"),n=0;n<t.length;n++)o.test(t[n])&&(r=t[n]);return r?r.split("/")[1].split("."):["0","0","0"]},checkOrientationImage:function(e,t,r,o){var n=this;if(this.getVersion("chrome")[0]>=81)t=-1;else if(this.getVersion("safari")[0]>=605){var i=this.getVersion("version");i[0]>13&&i[1]>1&&(t=-1)}else{var a=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(a){var s=a[1];((s=s.split("_"))[0]>13||s[0]>=13&&s[1]>=4)&&(t=-1)}}var c=document.createElement("canvas"),l=c.getContext("2d");switch(l.save(),t){case 2:c.width=r,c.height=o,l.translate(r,0),l.scale(-1,1);break;case 3:c.width=r,c.height=o,l.translate(r/2,o/2),l.rotate(180*Math.PI/180),l.translate(-r/2,-o/2);break;case 4:c.width=r,c.height=o,l.translate(0,o),l.scale(1,-1);break;case 5:c.height=r,c.width=o,l.rotate(.5*Math.PI),l.scale(1,-1);break;case 6:c.width=o,c.height=r,l.translate(o/2,r/2),l.rotate(90*Math.PI/180),l.translate(-r/2,-o/2);break;case 7:c.height=r,c.width=o,l.rotate(.5*Math.PI),l.translate(r,-o),l.scale(-1,1);break;case 8:c.height=r,c.width=o,l.translate(o/2,r/2),l.rotate(-90*Math.PI/180),l.translate(-r/2,-o/2);break;default:c.width=r,c.height=o}l.drawImage(e,0,0,r,o),l.restore(),c.toBlob((function(e){var t=URL.createObjectURL(e);URL.revokeObjectURL(n.imgs),n.imgs=t}),"image/"+this.outputType,1)},checkedImg:function(){var e=this;if(null===this.img||""===this.img)return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.clearCrop();var t=new Image;if(t.onload=function(){if(""===e.img)return e.$emit("img-load",new Error("图片不能为空")),!1;var r=t.width,o=t.height;Y.getData(t).then((function(n){e.orientation=n.orientation||1;var i=Number(e.maxImgSize);!e.orientation&&r<i&o<i?e.imgs=e.img:(r>i&&(o=o/r*i,r=i),o>i&&(r=r/o*i,o=i),e.checkOrientationImage(t,e.orientation,r,o))})).catch((function(t){e.$emit("img-load","error"),e.$emit("img-load-error",t)}))},t.onerror=function(t){e.$emit("img-load","error"),e.$emit("img-load-error",t)},"data"!==this.img.substr(0,4)&&(t.crossOrigin=""),this.isIE){var r=new XMLHttpRequest;r.onload=function(){var e=URL.createObjectURL(this.response);t.src=e},r.open("GET",this.img,!0),r.responseType="blob",r.send()}else t.src=this.img},startMove:function(e){if(e.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in e?e.clientX:e.touches[0].clientX)-this.x,this.moveY=("clientY"in e?e.clientY:e.touches[0].clientY)-this.y,e.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),2==e.touches.length&&(this.touches=e.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=e.offsetX?e.offsetX:e.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=e.offsetY?e.offsetY:e.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in e?e.clientX:e.touches[0].clientX,this.cropY="clientY"in e?e.clientY:e.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale:function(e){var t=this;e.preventDefault();var r=this.scale,o=this.touches[0].clientX,n=this.touches[0].clientY,i=e.touches[0].clientX,a=e.touches[0].clientY,s=this.touches[1].clientX,c=this.touches[1].clientY,l=e.touches[1].clientX,u=e.touches[1].clientY,d=Math.sqrt(Math.pow(o-s,2)+Math.pow(n-c,2)),p=Math.sqrt(Math.pow(i-l,2)+Math.pow(a-u,2))-d,h=1,f=(h=(h=h/this.trueWidth>h/this.trueHeight?h/this.trueHeight:h/this.trueWidth)>.1?.1:h)*p;if(!this.touchNow){if(this.touchNow=!0,p>0?r+=Math.abs(f):p<0&&r>Math.abs(f)&&(r-=Math.abs(f)),this.touches=e.touches,setTimeout((function(){t.touchNow=!1}),8),!this.checkoutImgAxis(this.x,this.y,r))return!1;this.scale=r}},cancelTouchScale:function(e){window.removeEventListener("touchmove",this.touchScale)},moveImg:function(e){var t=this;if(e.preventDefault(),e.touches&&2===e.touches.length)return this.touches=e.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;var r,o,n="clientX"in e?e.clientX:e.touches[0].clientX,i="clientY"in e?e.clientY:e.touches[0].clientY;r=n-this.moveX,o=i-this.moveY,this.$nextTick((function(){if(t.centerBox){var e,n,i,a,s=t.getImgAxis(r,o,t.scale),c=t.getCropAxis(),l=t.trueHeight*t.scale,u=t.trueWidth*t.scale;switch(t.rotate){case 1:case-1:case 3:case-3:e=t.cropOffsertX-t.trueWidth*(1-t.scale)/2+(l-u)/2,n=t.cropOffsertY-t.trueHeight*(1-t.scale)/2+(u-l)/2,i=e-l+t.cropW,a=n-u+t.cropH;break;default:e=t.cropOffsertX-t.trueWidth*(1-t.scale)/2,n=t.cropOffsertY-t.trueHeight*(1-t.scale)/2,i=e-u+t.cropW,a=n-l+t.cropH}s.x1>=c.x1&&(r=e),s.y1>=c.y1&&(o=n),s.x2<=c.x2&&(r=i),s.y2<=c.y2&&(o=a)}t.x=r,t.y=o,t.$emit("img-moving",{moving:!0,axis:t.getImgAxis()})}))},leaveImg:function(e){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg:function(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale:function(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize:function(e){var t=this;e.preventDefault();var r=this.scale,o=e.deltaY||e.wheelDelta;o=navigator.userAgent.indexOf("Firefox")>0?30*o:o,this.isIE&&(o=-o);var n=this.coe,i=(n=n/this.trueWidth>n/this.trueHeight?n/this.trueHeight:n/this.trueWidth)*o;i<0?r+=Math.abs(i):r>Math.abs(i)&&(r-=Math.abs(i));var a=i<0?"add":"reduce";if(a!==this.coeStatus&&(this.coeStatus=a,this.coe=.2),this.scaling||(this.scalingSet=setTimeout((function(){t.scaling=!1,t.coe=t.coe+=.01}),50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,r))return!1;this.scale=r},changeScale:function(e){var t=this.scale;e=e||1;var r=20;if((e*=r=r/this.trueWidth>r/this.trueHeight?r/this.trueHeight:r/this.trueWidth)>0?t+=Math.abs(e):t>Math.abs(e)&&(t-=Math.abs(e)),!this.checkoutImgAxis(this.x,this.y,t))return!1;this.scale=t},createCrop:function(e){var t=this;e.preventDefault();var r="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,o="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;this.$nextTick((function(){var e=r-t.cropX,n=o-t.cropY;if(e>0?(t.cropW=e+t.cropChangeX>t.w?t.w-t.cropChangeX:e,t.cropOffsertX=t.cropChangeX):(t.cropW=t.w-t.cropChangeX+Math.abs(e)>t.w?t.cropChangeX:Math.abs(e),t.cropOffsertX=t.cropChangeX+e>0?t.cropChangeX+e:0),t.fixed){var i=t.cropW/t.fixedNumber[0]*t.fixedNumber[1];i+t.cropOffsertY>t.h?(t.cropH=t.h-t.cropOffsertY,t.cropW=t.cropH/t.fixedNumber[1]*t.fixedNumber[0],t.cropOffsertX=e>0?t.cropChangeX:t.cropChangeX-t.cropW):t.cropH=i,t.cropOffsertY=t.cropOffsertY}else n>0?(t.cropH=n+t.cropChangeY>t.h?t.h-t.cropChangeY:n,t.cropOffsertY=t.cropChangeY):(t.cropH=t.h-t.cropChangeY+Math.abs(n)>t.h?t.cropChangeY:Math.abs(n),t.cropOffsertY=t.cropChangeY+n>0?t.cropChangeY+n:0)}))},changeCropSize:function(e,t,r,o,n){e.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=t,this.canChangeY=r,this.changeCropTypeX=o,this.changeCropTypeY=n,this.cropX="clientX"in e?e.clientX:e.touches[0].clientX,this.cropY="clientY"in e?e.clientY:e.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow:function(e){var t=this;e.preventDefault();var r="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,o="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0,n=this.w,i=this.h,a=0,s=0;if(this.centerBox){var c=this.getImgAxis(),l=c.x2,u=c.y2;a=c.x1>0?c.x1:0,s=c.y1>0?c.y1:0,n>l&&(n=l),i>u&&(i=u)}var d=_slicedToArray(this.checkCropLimitSize(),2),p=d[0],h=d[1];this.$nextTick((function(){var e=r-t.cropX,c=o-t.cropY;if(t.canChangeX&&(1===t.changeCropTypeX?t.cropOldW-e<p?(t.cropW=p,t.cropOffsertX=t.cropOldW+t.cropChangeX-a-p):t.cropOldW-e>0?(t.cropW=n-t.cropChangeX-e<=n-a?t.cropOldW-e:t.cropOldW+t.cropChangeX-a,t.cropOffsertX=n-t.cropChangeX-e<=n-a?t.cropChangeX+e:a):(t.cropW=Math.abs(e)+t.cropChangeX<=n?Math.abs(e)-t.cropOldW:n-t.cropOldW-t.cropChangeX,t.cropOffsertX=t.cropChangeX+t.cropOldW):2===t.changeCropTypeX&&(t.cropOldW+e<p?t.cropW=p:t.cropOldW+e>0?(t.cropW=t.cropOldW+e+t.cropOffsertX<=n?t.cropOldW+e:n-t.cropOffsertX,t.cropOffsertX=t.cropChangeX):(t.cropW=n-t.cropChangeX+Math.abs(e+t.cropOldW)<=n-a?Math.abs(e+t.cropOldW):t.cropChangeX-a,t.cropOffsertX=n-t.cropChangeX+Math.abs(e+t.cropOldW)<=n-a?t.cropChangeX-Math.abs(e+t.cropOldW):a))),t.canChangeY&&(1===t.changeCropTypeY?t.cropOldH-c<h?(t.cropH=h,t.cropOffsertY=t.cropOldH+t.cropChangeY-s-h):t.cropOldH-c>0?(t.cropH=i-t.cropChangeY-c<=i-s?t.cropOldH-c:t.cropOldH+t.cropChangeY-s,t.cropOffsertY=i-t.cropChangeY-c<=i-s?t.cropChangeY+c:s):(t.cropH=Math.abs(c)+t.cropChangeY<=i?Math.abs(c)-t.cropOldH:i-t.cropOldH-t.cropChangeY,t.cropOffsertY=t.cropChangeY+t.cropOldH):2===t.changeCropTypeY&&(t.cropOldH+c<h?t.cropH=h:t.cropOldH+c>0?(t.cropH=t.cropOldH+c+t.cropOffsertY<=i?t.cropOldH+c:i-t.cropOffsertY,t.cropOffsertY=t.cropChangeY):(t.cropH=i-t.cropChangeY+Math.abs(c+t.cropOldH)<=i-s?Math.abs(c+t.cropOldH):t.cropChangeY-s,t.cropOffsertY=i-t.cropChangeY+Math.abs(c+t.cropOldH)<=i-s?t.cropChangeY-Math.abs(c+t.cropOldH):s))),t.canChangeX&&t.fixed){var l=t.cropW/t.fixedNumber[0]*t.fixedNumber[1];l<h?(t.cropH=h,t.cropW=t.fixedNumber[0]*h/t.fixedNumber[1],1===t.changeCropTypeX&&(t.cropOffsertX=t.cropChangeX+(t.cropOldW-t.cropW))):l+t.cropOffsertY>i?(t.cropH=i-t.cropOffsertY,t.cropW=t.cropH/t.fixedNumber[1]*t.fixedNumber[0],1===t.changeCropTypeX&&(t.cropOffsertX=t.cropChangeX+(t.cropOldW-t.cropW))):t.cropH=l}if(t.canChangeY&&t.fixed){var u=t.cropH/t.fixedNumber[1]*t.fixedNumber[0];u<p?(t.cropW=p,t.cropH=t.fixedNumber[1]*p/t.fixedNumber[0],t.cropOffsertY=t.cropOldH+t.cropChangeY-t.cropH):u+t.cropOffsertX>n?(t.cropW=n-t.cropOffsertX,t.cropH=t.cropW/t.fixedNumber[0]*t.fixedNumber[1]):t.cropW=u}}))},checkCropLimitSize:function(){this.cropW,this.cropH;var e=this.limitMinSize,t=new Array;return t=Array.isArray(e)?e:[e,e],[parseFloat(t[0]),parseFloat(t[1])]},changeCropEnd:function(e){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize:function(e,t,r,o,n,i){var a=e/t,s=n,c=i;return s<r&&(s=r,c=Math.ceil(s/a)),c<o&&(c=o,(s=Math.ceil(c*a))<r&&(s=r,c=Math.ceil(s/a))),s<n&&(s=n,c=Math.ceil(s/a)),c<i&&(c=i,s=Math.ceil(c*a)),{width:s,height:c}},endCrop:function(){0===this.cropW&&0===this.cropH&&(this.cropping=!1);var e=_slicedToArray(this.checkCropLimitSize(),2),t=e[0],r=e[1],o=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],t,r,this.cropW,this.cropH):{width:t,height:r},n=o.width,i=o.height;n>this.cropW&&(this.cropW=n,this.cropOffsertX+n>this.w&&(this.cropOffsertX=this.w-n)),i>this.cropH&&(this.cropH=i,this.cropOffsertY+i>this.h&&(this.cropOffsertY=this.h-i)),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop:function(){this.crop=!0},stopCrop:function(){this.crop=!1},clearCrop:function(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove:function(e){if(e.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(e),!1;if(e.touches&&2===e.touches.length)return this.crop=!1,this.startMove(e),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);var t,r,o="clientX"in e?e.clientX:e.touches[0].clientX,n="clientY"in e?e.clientY:e.touches[0].clientY;t=o-this.cropOffsertX,r=n-this.cropOffsertY,this.cropX=t,this.cropY=r,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop:function(e,t){var r=this,o=0,n=0;e&&(e.preventDefault(),o="clientX"in e?e.clientX:e.touches[0].clientX,n="clientY"in e?e.clientY:e.touches[0].clientY),this.$nextTick((function(){var e,i,a=o-r.cropX,s=n-r.cropY;if(t&&(a=r.cropOffsertX,s=r.cropOffsertY),e=a<=0?0:a+r.cropW>r.w?r.w-r.cropW:a,i=s<=0?0:s+r.cropH>r.h?r.h-r.cropH:s,r.centerBox){var c=r.getImgAxis();e<=c.x1&&(e=c.x1),e+r.cropW>c.x2&&(e=c.x2-r.cropW),i<=c.y1&&(i=c.y1),i+r.cropH>c.y2&&(i=c.y2-r.cropH)}r.cropOffsertX=e,r.cropOffsertY=i,r.$emit("crop-moving",{moving:!0,axis:r.getCropAxis()})}))},getImgAxis:function(e,t,r){e=e||this.x,t=t||this.y,r=r||this.scale;var o={x1:0,x2:0,y1:0,y2:0},n=this.trueWidth*r,i=this.trueHeight*r;switch(this.rotate){case 0:o.x1=e+this.trueWidth*(1-r)/2,o.x2=o.x1+this.trueWidth*r,o.y1=t+this.trueHeight*(1-r)/2,o.y2=o.y1+this.trueHeight*r;break;case 1:case-1:case 3:case-3:o.x1=e+this.trueWidth*(1-r)/2+(n-i)/2,o.x2=o.x1+this.trueHeight*r,o.y1=t+this.trueHeight*(1-r)/2+(i-n)/2,o.y2=o.y1+this.trueWidth*r;break;default:o.x1=e+this.trueWidth*(1-r)/2,o.x2=o.x1+this.trueWidth*r,o.y1=t+this.trueHeight*(1-r)/2,o.y2=o.y1+this.trueHeight*r}return o},getCropAxis:function(){var e={x1:0,x2:0,y1:0,y2:0};return e.x1=this.cropOffsertX,e.x2=e.x1+this.cropW,e.y1=this.cropOffsertY,e.y2=e.y1+this.cropH,e},leaveCrop:function(e){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked:function(e){var t=this,r=document.createElement("canvas"),o=new Image,n=this.rotate,i=this.trueWidth,a=this.trueHeight,s=this.cropOffsertX,c=this.cropOffsertY;function l(e,t){r.width=Math.round(e),r.height=Math.round(t)}o.onload=function(){if(0!==t.cropW){var u=r.getContext("2d"),d=1;t.high&!t.full&&(d=window.devicePixelRatio),1!==t.enlarge&!t.full&&(d=Math.abs(Number(t.enlarge)));var p=t.cropW*d,h=t.cropH*d,f=i*t.scale*d,m=a*t.scale*d,g=(t.x-s+t.trueWidth*(1-t.scale)/2)*d,y=(t.y-c+t.trueHeight*(1-t.scale)/2)*d;switch(l(p,h),u.save(),t.fillColor&&(u.fillStyle=t.fillColor,u.fillRect(0,0,r.width,r.height)),n){case 0:t.full?(l(p/t.scale,h/t.scale),u.drawImage(o,g/t.scale,y/t.scale,f/t.scale,m/t.scale)):u.drawImage(o,g,y,f,m);break;case 1:case-3:t.full?(l(p/t.scale,h/t.scale),g=g/t.scale+(f/t.scale-m/t.scale)/2,y=y/t.scale+(m/t.scale-f/t.scale)/2,u.rotate(90*n*Math.PI/180),u.drawImage(o,y,-g-m/t.scale,f/t.scale,m/t.scale)):(g+=(f-m)/2,y+=(m-f)/2,u.rotate(90*n*Math.PI/180),u.drawImage(o,y,-g-m,f,m));break;case 2:case-2:t.full?(l(p/t.scale,h/t.scale),u.rotate(90*n*Math.PI/180),g/=t.scale,y/=t.scale,u.drawImage(o,-g-f/t.scale,-y-m/t.scale,f/t.scale,m/t.scale)):(u.rotate(90*n*Math.PI/180),u.drawImage(o,-g-f,-y-m,f,m));break;case 3:case-1:t.full?(l(p/t.scale,h/t.scale),g=g/t.scale+(f/t.scale-m/t.scale)/2,y=y/t.scale+(m/t.scale-f/t.scale)/2,u.rotate(90*n*Math.PI/180),u.drawImage(o,-y-f/t.scale,g,f/t.scale,m/t.scale)):(g+=(f-m)/2,y+=(m-f)/2,u.rotate(90*n*Math.PI/180),u.drawImage(o,-y-f,g,f,m));break;default:t.full?(l(p/t.scale,h/t.scale),u.drawImage(o,g/t.scale,y/t.scale,f/t.scale,m/t.scale)):u.drawImage(o,g,y,f,m)}u.restore()}else{var v=i*t.scale,b=a*t.scale,C=r.getContext("2d");switch(C.save(),t.fillColor&&(C.fillStyle=t.fillColor,C.fillRect(0,0,r.width,r.height)),n){case 0:l(v,b),C.drawImage(o,0,0,v,b);break;case 1:case-3:l(b,v),C.rotate(90*n*Math.PI/180),C.drawImage(o,0,-b,v,b);break;case 2:case-2:l(v,b),C.rotate(90*n*Math.PI/180),C.drawImage(o,-v,-b,v,b);break;case 3:case-1:l(b,v),C.rotate(90*n*Math.PI/180),C.drawImage(o,-v,0,v,b);break;default:l(v,b),C.drawImage(o,0,0,v,b)}C.restore()}e(r)},"data"!==this.img.substr(0,4)&&(o.crossOrigin="Anonymous"),o.src=this.imgs},getCropData:function(e){var t=this;this.getCropChecked((function(r){e(r.toDataURL("image/"+t.outputType,t.outputSize))}))},getCropBlob:function(e){var t=this;this.getCropChecked((function(r){r.toBlob((function(t){return e(t)}),"image/"+t.outputType,t.outputSize)}))},showPreview:function(){var e=this;if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout((function(){e.isCanShow=!0}),16);var t=this.cropW,r=this.cropH,o=this.scale,n={};n.div={width:"".concat(t,"px"),height:"".concat(r,"px")};var i=(this.x-this.cropOffsertX)/o,a=(this.y-this.cropOffsertY)/o;n.w=t,n.h=r,n.url=this.imgs,n.img={width:"".concat(this.trueWidth,"px"),height:"".concat(this.trueHeight,"px"),transform:"scale(".concat(o,")translate3d(").concat(i,"px, ").concat(a,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,"deg)")},n.html='\n <div class="show-preview" style="width: '.concat(n.w,"px; height: ").concat(n.h,'px,; overflow: hidden">\n <div style="width: ').concat(t,"px; height: ").concat(r,'px">\n <img src=').concat(n.url,' style="width: ').concat(this.trueWidth,"px; height: ").concat(this.trueHeight,"px; transform:\n scale(").concat(o,")translate3d(").concat(i,"px, ").concat(a,"px, ").concat(0,"px)rotateZ(").concat(90*this.rotate,'deg)">\n </div>\n </div>'),this.$emit("real-time",n)},reload:function(){var e=this,t=new Image;t.onload=function(){e.w=parseFloat(window.getComputedStyle(e.$refs.cropper).width),e.h=parseFloat(window.getComputedStyle(e.$refs.cropper).height),e.trueWidth=t.width,e.trueHeight=t.height,e.original?e.scale=1:e.scale=e.checkedMode(),e.$nextTick((function(){e.x=-(e.trueWidth-e.trueWidth*e.scale)/2+(e.w-e.trueWidth*e.scale)/2,e.y=-(e.trueHeight-e.trueHeight*e.scale)/2+(e.h-e.trueHeight*e.scale)/2,e.loading=!1,e.autoCrop&&e.goAutoCrop(),e.$emit("img-load","success"),setTimeout((function(){e.showPreview()}),20)}))},t.onerror=function(){e.$emit("img-load","error")},t.src=this.imgs},checkedMode:function(){var e=1,t=(this.trueWidth,this.trueHeight),r=this.mode.split(" ");switch(r[0]){case"contain":this.trueWidth>this.w&&(e=this.w/this.trueWidth),this.trueHeight*e>this.h&&(e=this.h/this.trueHeight);break;case"cover":(t*=e=this.w/this.trueWidth)<this.h&&(e=(t=this.h)/this.trueHeight);break;default:try{var o=r[0];if(-1!==o.search("px")){o=o.replace("px","");var n=parseFloat(o)/this.trueWidth,i=1,a=r[1];-1!==a.search("px")&&(a=a.replace("px",""),i=(t=parseFloat(a))/this.trueHeight),e=Math.min(n,i)}if(-1!==o.search("%")&&(o=o.replace("%",""),e=parseFloat(o)/100*this.w/this.trueWidth),2===r.length&&"auto"===o){var s=r[1];-1!==s.search("px")&&(s=s.replace("px",""),e=(t=parseFloat(s))/this.trueHeight),-1!==s.search("%")&&(s=s.replace("%",""),e=(t=parseFloat(s)/100*this.h)/this.trueHeight)}}catch(c){e=1}}return e},goAutoCrop:function(e,t){if(""!==this.imgs&&null!==this.imgs){this.clearCrop(),this.cropping=!0;var r=this.w,o=this.h;if(this.centerBox){var n=Math.abs(this.rotate)%2>0,i=(n?this.trueHeight:this.trueWidth)*this.scale,a=(n?this.trueWidth:this.trueHeight)*this.scale;r=i<r?i:r,o=a<o?a:o}var s=e||parseFloat(this.autoCropWidth),c=t||parseFloat(this.autoCropHeight);(0===s||0===c)&&(s=.8*r,c=.8*o),s=s>r?r:s,c=c>o?o:c,this.fixed&&(c=s/this.fixedNumber[0]*this.fixedNumber[1]),c>this.h&&(s=(c=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(s,c)}},changeCrop:function(e,t){var r=this;if(this.centerBox){var o=this.getImgAxis();e>o.x2-o.x1&&(t=(e=o.x2-o.x1)/this.fixedNumber[0]*this.fixedNumber[1]),t>o.y2-o.y1&&(e=(t=o.y2-o.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=e,this.cropH=t,this.checkCropLimitSize(),this.$nextTick((function(){r.cropOffsertX=(r.w-r.cropW)/2,r.cropOffsertY=(r.h-r.cropH)/2,r.centerBox&&r.moveCrop(null,!0)}))},refresh:function(){var e=this;this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.clearCrop(),this.$nextTick((function(){e.checkedImg()}))},rotateLeft:function(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight:function(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear:function(){this.rotate=0},checkoutImgAxis:function(e,t,r){e=e||this.x,t=t||this.y,r=r||this.scale;var o=!0;if(this.centerBox){var n=this.getImgAxis(e,t,r),i=this.getCropAxis();n.x1>=i.x1&&(o=!1),n.x2<=i.x2&&(o=!1),n.y1>=i.y1&&(o=!1),n.y2<=i.y2&&(o=!1)}return o}},mounted:function(){this.support="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";var e=this,t=navigator.userAgent;this.isIOS=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(t,r,o){for(var n=atob(this.toDataURL(r,o).split(",")[1]),i=n.length,a=new Uint8Array(i),s=0;s<i;s++)a[s]=n.charCodeAt(s);t(new Blob([a],{type:e.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},unmounted:function(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.cancelScale()}}),$={key:0,class:"cropper-box"},z=["src"],B={class:"cropper-view-box"},P=["src"],D={key:1};function U(e,t,r,o,n,i){return openBlock(),createElementBlock("div",{class:"vue-cropper",ref:"cropper",onMouseover:t[28]||(t[28]=function(){return e.scaleImg&&e.scaleImg.apply(e,arguments)}),onMouseout:t[29]||(t[29]=function(){return e.cancelScale&&e.cancelScale.apply(e,arguments)})},[e.imgs?(openBlock(),createElementBlock("div",$,[withDirectives(createBaseVNode("div",{class:"cropper-box-canvas",style:normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+e.x/e.scale+"px,"+e.y/e.scale+"px,0)rotateZ("+90*e.rotate+"deg)"})},[createBaseVNode("img",{src:e.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,z)],4),[[vShow,!e.loading]])])):createCommentVNode("",!0),createBaseVNode("div",{class:normalizeClass(["cropper-drag-box",{"cropper-move":e.move&&!e.crop,"cropper-crop":e.crop,"cropper-modal":e.cropping}]),onMousedown:t[0]||(t[0]=function(){return e.startMove&&e.startMove.apply(e,arguments)}),onTouchstart:t[1]||(t[1]=function(){return e.startMove&&e.startMove.apply(e,arguments)})},null,34),withDirectives(createBaseVNode("div",{class:"cropper-crop-box",style:normalizeStyle({width:e.cropW+"px",height:e.cropH+"px",transform:"translate3d("+e.cropOffsertX+"px,"+e.cropOffsertY+"px,0)"})},[createBaseVNode("span",B,[createBaseVNode("img",{style:normalizeStyle({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+(e.x-e.cropOffsertX)/e.scale+"px,"+(e.y-e.cropOffsertY)/e.scale+"px,0)rotateZ("+90*e.rotate+"deg)"}),src:e.imgs,alt:"cropper-img"},null,12,P)]),createBaseVNode("span",{class:"cropper-face cropper-move",onMousedown:t[2]||(t[2]=function(){return e.cropMove&&e.cropMove.apply(e,arguments)}),onTouchstart:t[3]||(t[3]=function(){return e.cropMove&&e.cropMove.apply(e,arguments)})},null,32),e.info?(openBlock(),createElementBlock("span",{key:0,class:"crop-info",style:normalizeStyle({top:e.cropInfo.top})},toDisplayString(e.cropInfo.width)+" × "+toDisplayString(e.cropInfo.height),5)):createCommentVNode("",!0),e.fixedBox?createCommentVNode("",!0):(openBlock(),createElementBlock("span",D,[createBaseVNode("span",{class:"crop-line line-w",onMousedown:t[4]||(t[4]=function(t){return e.changeCropSize(t,!1,!0,0,1)}),onTouchstart:t[5]||(t[5]=function(t){return e.changeCropSize(t,!1,!0,0,1)})},null,32),createBaseVNode("span",{class:"crop-line line-a",onMousedown:t[6]||(t[6]=function(t){return e.changeCropSize(t,!0,!1,1,0)}),onTouchstart:t[7]||(t[7]=function(t){return e.changeCropSize(t,!0,!1,1,0)})},null,32),createBaseVNode("span",{class:"crop-line line-s",onMousedown:t[8]||(t[8]=function(t){return e.changeCropSize(t,!1,!0,0,2)}),onTouchstart:t[9]||(t[9]=function(t){return e.changeCropSize(t,!1,!0,0,2)})},null,32),createBaseVNode("span",{class:"crop-line line-d",onMousedown:t[10]||(t[10]=function(t){return e.changeCropSize(t,!0,!1,2,0)}),onTouchstart:t[11]||(t[11]=function(t){return e.changeCropSize(t,!0,!1,2,0)})},null,32),createBaseVNode("span",{class:"crop-point point1",onMousedown:t[12]||(t[12]=function(t){return e.changeCropSize(t,!0,!0,1,1)}),onTouchstart:t[13]||(t[13]=function(t){return e.changeCropSize(t,!0,!0,1,1)})},null,32),createBaseVNode("span",{class:"crop-point point2",onMousedown:t[14]||(t[14]=function(t){return e.changeCropSize(t,!1,!0,0,1)}),onTouchstart:t[15]||(t[15]=function(t){return e.changeCropSize(t,!1,!0,0,1)})},null,32),createBaseVNode("span",{class:"crop-point point3",onMousedown:t[16]||(t[16]=function(t){return e.changeCropSize(t,!0,!0,2,1)}),onTouchstart:t[17]||(t[17]=function(t){return e.changeCropSize(t,!0,!0,2,1)})},null,32),createBaseVNode("span",{class:"crop-point point4",onMousedown:t[18]||(t[18]=function(t){return e.changeCropSize(t,!0,!1,1,0)}),onTouchstart:t[19]||(t[19]=function(t){return e.changeCropSize(t,!0,!1,1,0)})},null,32),createBaseVNode("span",{class:"crop-point point5",onMousedown:t[20]||(t[20]=function(t){return e.changeCropSize(t,!0,!1,2,0)}),onTouchstart:t[21]||(t[21]=function(t){return e.changeCropSize(t,!0,!1,2,0)})},null,32),createBaseVNode("span",{class:"crop-point point6",onMousedown:t[22]||(t[22]=function(t){return e.changeCropSize(t,!0,!0,1,2)}),onTouchstart:t[23]||(t[23]=function(t){return e.changeCropSize(t,!0,!0,1,2)})},null,32),createBaseVNode("span",{class:"crop-point point7",onMousedown:t[24]||(t[24]=function(t){return e.changeCropSize(t,!1,!0,0,2)}),onTouchstart:t[25]||(t[25]=function(t){return e.changeCropSize(t,!1,!0,0,2)})},null,32),createBaseVNode("span",{class:"crop-point point8",onMousedown:t[26]||(t[26]=function(t){return e.changeCropSize(t,!0,!0,2,2)}),onTouchstart:t[27]||(t[27]=function(t){return e.changeCropSize(t,!0,!0,2,2)})},null,32)]))],4),[[vShow,e.cropping]])],544)}var W=N(A,[["render",U],["__scopeId","data-v-69939069"]]),upbtn="_upbtn_m9882_1",uploadWarper="_uploadWarper_m9882_5",bg="_bg_m9882_12",btn="_btn_m9882_21",btn1="_btn1_m9882_33",img="_img_m9882_44",btndiv="_btndiv_m9882_53",wrapper="_wrapper_m9882_64",styles={upbtn:upbtn,uploadWarper:uploadWarper,bg:bg,btn:btn,btn1:btn1,img:img,btndiv:btndiv,wrapper:wrapper},ColCropper=defineComponent({name:"col-cropper",components:{VueCropper:W},props:{hideInput:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},option:{type:Object},onCancelTailor:{type:Function,default:function(){}},getBase64Data:{type:Function,default:function(){}},getBlob:{type:Function,default:function(){}},getFile:{type:Function,default:function(){}},imgOriginF:{type:Function,default:function(){}}},data:function(){return{img:"",config:{ceilbutton:!1,outputSize:1,outputType:"png",info:!1,canScale:!0,autoCrop:!1,autoCropWidth:0,autoCropHeight:0,fixed:!0,fixedNumber:[1,1],full:!1,fixedBox:!0,canMove:!0,canMoveBox:!1,original:!1,centerBox:!0,high:!0,infoTrue:!1,maxImgSize:2e3,enlarge:1,mode:"100%",cancelButtonText:"取消",confirmButtonText:"确定",cancelButtonBackgroundColor:"#606266",confirmButtonBackgroundColor:"#ed594c",cancelButtonTextColor:"#ffffff",confirmButtonTextColor:"#ffffff"}}},mounted:function(){this.config=Object.assign(this.config,this.option)},methods:{addSlide:function(){if(null==document.getElementById("vertical")){var e=document.getElementsByClassName("cropper-crop-box")[0],t=document.createElement("div");t.id="vertical",t.style.width="1px",t.style.height="100%",t.style.top="0px",t.style.left="33%",t.style.position="absolute",t.style.backgroundColor="#fff",t.style.zIndex="522",t.style.opacity="0.5";var r=document.createElement("div");r.style.width="1px",r.style.height="100%",r.style.top="0px",r.style.right="33%",r.style.position="absolute",r.style.backgroundColor="#fff",r.style.zIndex="522",r.style.opacity="0.5";var o=document.createElement("div");o.style.width="100%",o.style.height="1px",o.style.top="33%",o.style.left="0px",o.style.position="absolute",o.style.backgroundColor="#fff",o.style.zIndex="522",o.style.opacity="0.5";var n=document.createElement("div");n.style.width="100%",n.style.height="1px",n.style.bottom="33%",n.style.left="0px",n.style.position="absolute",n.style.backgroundColor="#fff",n.style.zIndex="522",n.style.opacity="0.5";var i=document.createElement("div");i.style.width="30px",i.style.height="4px",i.style.top="-4px",i.style.left="-4px",i.style.position="absolute",i.style.backgroundColor="#fff",i.style.zIndex="522",i.style.opacity="1";var a=document.createElement("div");a.style.width="4px",a.style.height="30px",a.style.top="-4px",a.style.left="-4px",a.style.position="absolute",a.style.backgroundColor="#fff",a.style.zIndex="522",a.style.opacity="1";var s=document.createElement("div");s.style.width="30px",s.style.height="4px",s.style.top="-4px",s.style.right="-4px",s.style.position="absolute",s.style.backgroundColor="#fff",s.style.zIndex="522",s.style.opacity="1";var c=document.createElement("div");c.style.width="4px",c.style.height="30px",c.style.top="-4px",c.style.right="-4px",c.style.position="absolute",c.style.backgroundColor="#fff",c.style.zIndex="522",c.style.opacity="1";var l=document.createElement("div");l.style.width="30px",l.style.height="4px",l.style.bottom="-4px",l.style.left="-4px",l.style.position="absolute",l.style.backgroundColor="#fff",l.style.zIndex="522",l.style.opacity="1";var u=document.createElement("div");u.style.width="4px",u.style.height="30px",u.style.bottom="-4px",u.style.left="-4px",u.style.position="absolute",u.style.backgroundColor="#fff",u.style.zIndex="522",u.style.opacity="1";var d=document.createElement("div");d.style.width="30px",d.style.height="4px",d.style.bottom="-4px",d.style.right="-4px",d.style.position="absolute",d.style.backgroundColor="#fff",d.style.zIndex="522",d.style.opacity="1";var p=document.createElement("div");p.style.width="4px",p.style.height="30px",p.style.bottom="-4px",p.style.right="-4px",p.style.position="absolute",p.style.backgroundColor="#fff",p.style.zIndex="522",p.style.opacity="1",e.appendChild(t),e.appendChild(r),e.appendChild(o),e.appendChild(n),e.appendChild(i),e.appendChild(a),e.appendChild(s),e.appendChild(c),e.appendChild(l),e.appendChild(u),e.appendChild(d),e.appendChild(p)}},onLoadImg:function(e){return new Promise((function(t,r){var o=new FileReader;o.readAsDataURL(e),o.onload=function(e){t(e.target.result)}}))},loadFile:function(e){var t=this;if(!(e instanceof File))throw new Error("Arguments file is not File");this.onLoadImg(e).then((function(e){t.img=e,setTimeout((function(){t.config.autoCrop=!0,t.addSlide()}),10)}))},loadBase64:function(e){var t=this;if("string"!=typeof e)throw new Error("Arguments base64 is not string");var r=e.split(",");if(!/^data:image\/(.*?);base64$/.test(r[0]))throw new Error("Arguments base64 MIME is not image/*");if(!/^[\/]?([\da-zA-Z]+[\/+]+)*[\da-zA-Z]+([+=]{1,2}|[\/])?$/.test(r[1]))throw new Error("Not standard base64");this.img=e,setTimeout((function(){t.config.autoCrop=!0,t.addSlide()}),10)},rotating:function(e){this.$refs.cropper.rotateRight()},canceltailor:function(){this.img="",this.onCancelTailor()},tailoring:function(){var e=this;this.$refs.cropper.getCropData((function(t){e.getBase64Data(t),e.getBlob(t),e.img="",e.config.autoCrop=!1})),this.$refs.cropper.getCropBlob((function(t){e.getBase64Data(t),e.getBlob(t);var r={jpeg:"jpg",png:"png",webp:"webp"}[e.config.outputType],o=(new Date).getTime(),n=new File([t],"".concat(o,".").concat(r),{type:"image/".concat(e.config.outputType)});e.getFile(n),e.img="",e.config.autoCrop=!1}))},upPhoto:function(e){var t=this;return _asyncToGenerator(regeneratorRuntime.mark((function r(){var o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(console.log(e,"upload"),o=e.target.files[0],t.$refs.headInput.value=null,null==o){r.next=10;break}return t.imgOriginF(o),r.next=7,t.onLoadImg(o);case 7:t.img=r.sent,t.config.autoCrop=!0,setTimeout((function(){t.addSlide()}),20);case 10:case"end":return r.stop()}}),r)})))()},onCropMoving:function(e){},onImgMoving:function(e){}},render:function(){return createVNode("div",{class:[styles.upbtn,styles.uploadWarper]},[this.hideInput?null:createVNode("input",{style:"opacity: 0;",class:styles.upbtn,disabled:this.disabled,type:"file",accept:"image/*",onChange:this.upPhoto,ref:"headInput"},null),""!=this.img?createVNode("div",{class:styles.bg},[this.config.ceilbutton?createVNode("div",{class:styles.btndiv},[createVNode("div",{class:styles.btn,onClick:this.canceltailor,style:{backgroundColor:this.config.cancelButtonBackgroundColor,color:this.config.cancelButtonTextColor}},[this.config.cancelButtonText]),createVNode("div",{class:styles.img,onClick:this.rotating},null),createVNode("div",{class:styles.btn,onClick:this.tailoring,style:{backgroundColor:this.config.confirmButtonBackgroundColor,color:this.config.confirmButtonTextColor}},[this.config.confirmButtonText])]):null,createVNode("div",{class:styles.wrapper},[createVNode(W,{ref:"cropper",img:this.img,outputSize:this.config.outputSize,outputType:this.config.outputType,info:this.config.info,canScale:this.config.canScale,autoCrop:this.config.autoCrop,autoCropWidth:this.config.autoCropWidth,autoCropHeight:this.config.autoCropHeight,fixedBox:this.config.fixedBox,fixed:this.config.fixed,fixedNumber:this.config.fixedNumber,full:this.config.full,canMove:this.config.canMove,canMoveBox:this.config.canMoveBox,original:this.config.original,centerBox:this.config.centerBox,high:this.config.high,infoTrue:this.config.infoTrue,maxImgSize:this.config.maxImgSize,enlarge:this.config.enlarge,mode:this.config.mode,onCropMoving:this.onCropMoving,onImgMoving:this.onImgMoving},null)]),this.config.ceilbutton?null:createVNode("div",{class:styles.btndiv},[createVNode("div",{class:styles.btn,onClick:this.canceltailor,style:{backgroundColor:this.config.cancelButtonBackgroundColor,color:this.config.cancelButtonTextColor}},[this.config.cancelButtonText]),createVNode("div",{class:styles.img,onClick:this.rotating},null),createVNode("div",{class:styles.btn,onClick:this.tailoring,style:{backgroundColor:this.config.confirmButtonBackgroundColor,color:this.config.confirmButtonTextColor}},[this.config.confirmButtonText])])]):null])}}),iconUploader="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA4CAMAAABpEU60AAAAkFBMVEUAAAA8PDwtyKotx6s+Pj49PT09PT09PT08PDw9PT08PDw9PT0+Pj49PT09PT09PT0+Pj48PDw9PT1AQEA7OzsqKiotx6osyKo6Ojo9PT08PDwtyKs9PT0tyKs7Ozs+Pj47OzsryKs9PT0tx6oux6wsxqg8PDwsyKo9PT0tx6otxqoryagsyLEsyLE9PT0tx6ptyL6dAAAALnRSTlMA+b9rawzU8irY5OK2mpSPb1FOHBoG9dws8723bWBKQjUjD6VTTcepiW8/LxcLZAuKNgAAAchJREFUSMfdl9tygjAQhknlpHIGQUVUPLbWwvu/XZM4utKQMWEv2ul/t/Dnm9lsdgnGv9GhyMvawOvSUhVfeNC+ZTriQW8cNHplc0PbaQQt3jVBs4A0/dpqgWZLWIkCBbAQlZrL8hrHFnqzQ8bZyd7W1Yir4KDzLTj0nKd5yMoVyzhV3vapqCX1kuV1BU5XpaRehkTHVqJcUi8Z6FMGKrr787peewnooFgv0Ef5xnXbrOIWnC9dkw31wjWtA/XCgXq3OTW9CSETz0x5uJ42zXStD8r8xyAgfkYfUA4laYOSzlRykqGgVfNDq2GpJXyxHbmW5UY2D5L7u5KDKiVQxvIi5j00Ccsuu58n3hi1EshnnA3EG0byn854XhkqoJStM5/fm4ycPvrueDVegGCZLRz9DloN5NEo6hoi+sjTBk1o5HYNLn00gXB7Om0VQETsPIttEoRjOiyQIPAjUwM/crPBjyw/+JEHEvzIFgE/smnBjxwj4B862AT/wFEr+gcOf9E/7HOEAoF+AbRQ/WTDLHAg1L1EgGJoRo1rqKjdmNpDiLUuWiArZhziyq7qmgrkPw9aWs40fmfkIgFwRM1De6FCcexwbvxxfQMaWrG3jYxQqwAAAABJRU5ErkJggg==",iconDelete="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAjVJREFUWEfNmL+LE1EQxz8bCVh4YHGCIFZec7YL6/mrsRPBQrhCUBEtsiHkrwkhm0YEBQu7A7Gz8e68C6TVRisRBK840OIgXCLfsE+WZXffRi8y02yx89583sy8mfdewOKyAlwEzgNngTNAM51mAvwCDoHvwFfg5yImgprK0rsEXE5Bag6bqwnsI/AFmPkG1gG6AFxPveGbr+q/vLYDfKtSqgI6BVwD1v+FomDsJ2AXOC6atwzoNHAbOHfCMG66H8Bb4Cg/fxGQYO6eQIh8a1EIt/JQeSCFSTDL8kweUp4S1J/w5YFuLiFnfJ5STr13Slkg7aY7vtFL+v/G7T4HpO/mf8ibsvUon16rTjmgNeBW1eqbzWbQ6/U2ZrPZtNPpjKbTaWWRazQaQb/fj4IgaHS73b3JZOIriu+Azw5IiaxWUCpJklxttVqPpTAej7ejKHpZBiWY0Wj0IAzDG9IfDofP4zj+4Am3KvqWgNSb7vtyYzAYXInj+InTK4PKw0g/SZJn7XZ732cDeCUg9af5SqqkyFAeqo6Ox8y2gJQ7yiGvVBnU4GyY6oS2wOA8h+4Bq16aVKEESk2TMAzVhOfiy7MSewcCegSoXdSWIqjs4L+E0RRHAnoKqGUsJCnUw6xXUs/sRFH0wlcWSowdmwQyFzJzSW1u25srjOZah3agqeYqIHPHD3MHNHnJ1BHWVXJTh3xBmbsGCcrURdGFztRV2kGZemzIHlfMPMdkoUw9WOUPd0t90vsNI5h3TDi/zEYAAAAASUVORK5CYII=",cosJsSdkV5={exports:{}};(function(module,exports){var factory;factory=function(){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===_typeof2(e)&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/",r(r.s="./index.js")}({"./index.js":
- /*!******************!*\
- !*** ./index.js ***!
- \******************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./src/cos */"./src/cos.js");e.exports=o},"./lib/base64.js":
- /*!***********************!*\
- !*** ./lib/base64.js ***!
- \***********************/
- /*! no static exports found */function(e,t){var r=function(e){var t=(e=e||{}).Base64,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=function(e){for(var t={},r=0,o=e.length;r<o;r++)t[e.charAt(r)]=r;return t}(r),n=String.fromCharCode,i=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?n(192|t>>>6)+n(128|63&t):n(224|t>>>12&15)+n(128|t>>>6&63)+n(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return n(240|t>>>18&7)+n(128|t>>>12&63)+n(128|t>>>6&63)+n(128|63&t)},a=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(e){return e.replace(a,i)},c=function(e){var t=[0,2,1][e.length%3],o=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[r.charAt(o>>>18),r.charAt(o>>>12&63),t>=2?"=":r.charAt(o>>>6&63),t>=1?"=":r.charAt(63&o)].join("")},l=e.btoa?function(t){return e.btoa(t)}:function(e){return e.replace(/[\s\S]{1,3}/g,c)},u=function(e){return l(s(e))},d=function(e,t){return t?u(String(e)).replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,""):u(String(e))},p=new RegExp(["[À-ß][-¿]","[à-ï][-¿]{2}","[ð-÷][-¿]{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))-65536;return n(55296+(t>>>10))+n(56320+(1023&t));case 3:return n((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return n((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},f=function(e){return e.replace(p,h)},m=function(e){var t=e.length,r=t%4,i=(t>0?o[e.charAt(0)]<<18:0)|(t>1?o[e.charAt(1)]<<12:0)|(t>2?o[e.charAt(2)]<<6:0)|(t>3?o[e.charAt(3)]:0),a=[n(i>>>16),n(i>>>8&255),n(255&i)];return a.length-=[0,0,2,1][r],a.join("")},g=e.atob?function(t){return e.atob(t)}:function(e){return e.replace(/[\s\S]{1,4}/g,m)},y=function(e){return function(e){return f(g(e))}(String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,""))};return{VERSION:"2.1.9",atob:g,btoa:l,fromBase64:y,toBase64:d,utob:s,encode:d,encodeURI:function(e){return d(e,!0)},btou:f,decode:y,noConflict:function(){var r=e.Base64;return e.Base64=t,r}}}();e.exports=r},"./lib/beacon.min.js":
- /*!***************************!*\
- !*** ./lib/beacon.min.js ***!
- \***************************/
- /*! no static exports found */function(e,t,r){var o,n,i,a=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js");i=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)},t=function(){return t=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},t.apply(this,arguments)};function r(e,t,r,o){return new(r||(r=Promise))((function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function o(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var n="__BEACON_",i="__BEACON_deviceId",a="last_report_time",s="sending_event_ids",c="beacon_config",l="beacon_config_request_time",u=function(){function e(){var e=this;this.emit=function(t,r){if(e){var o,n=e.__EventsList[t];if(null==n?void 0:n.length){n=n.slice();for(var i=0;i<n.length;i++){o=n[i];try{var a=o.callback.apply(e,[r]);if(1===o.type&&e.remove(t,o.callback),!1===a)break}catch(e){throw e}}}return e}},this.__EventsList={}}return e.prototype.indexOf=function(e,t){for(var r=0;r<e.length;r++)if(e[r].callback===t)return r;return-1},e.prototype.on=function(e,t,r){if(void 0===r&&(r=0),this){var o=this.__EventsList[e];if(o||(o=this.__EventsList[e]=[]),-1===this.indexOf(o,t)){var n={name:e,type:r||0,callback:t};return o.push(n),this}return this}},e.prototype.one=function(e,t){this.on(e,t,1)},e.prototype.remove=function(e,t){if(this){var r=this.__EventsList[e];if(!r)return null;if(!t){try{delete this.__EventsList[e]}catch(e){}return null}if(r.length){var o=this.indexOf(r,t);r.splice(o,1)}return this}},e}();function d(e,t){for(var r={},o=0,n=Object.keys(e);o<n.length;o++){var i=n[o],a=e[i];if("string"==typeof a)r[p(i)]=p(a);else{if(t)throw new Error("value mast be string !!!!");r[p(String(i))]=p(String(a))}}return r}function p(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(e){return""}}function h(e){return String(e.A99)+String(e.A100)}var f=function(){},m=function(){function e(e){var r=this;this.lifeCycle=new u,this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(e){if(!e||!e.reduce||!e.length)throw new TypeError("createPipeline 方法需要传入至少有一个 pipe 的数组");return 1===e.length?function(t,r){e[0](t,r||f)}:e.reduce((function(e,t){return function(r,o){return void 0===o&&(o=f),e(r,(function(e){return null==t?void 0:t(e,o)}))}}))}([function(e){r.send({url:r.strategy.getUploadUrl(),data:e,method:"post",contentType:"application/json;charset=UTF-8"},(function(){var t=r.config.onReportSuccess;"function"==typeof t&&t(JSON.stringify(e.events))}),(function(){var t=r.config.onReportFail;"function"==typeof t&&t(JSON.stringify(e.events))}))}]),function(e,t){if(!e)throw t instanceof Error?t:new Error(t)}(Boolean(e.appkey),"appkey must be initial"),this.config=t({},e)}return e.prototype.onUserAction=function(e,t){this.preReport(e,t,!1)},e.prototype.onDirectUserAction=function(e,t){this.preReport(e,t,!0)},e.prototype.preReport=function(e,t,r){e?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(e)||this.strategy.isSampleEvent(e)||this.onReport(e,t,r)):this.errorReport.reportError("602"," no eventCode")},e.prototype.addAdditionalParams=function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var o=r[t];this.additionalParams[o]=e[o]}},e.prototype.setChannelId=function(e){this.commonInfo.channelID=String(e)},e.prototype.setOpenId=function(e){this.commonInfo.openid=String(e)},e.prototype.setUnionid=function(e){this.commonInfo.unid=String(e)},e.prototype.getDeviceId=function(){return this.commonInfo.deviceId},e.prototype.getCommonInfo=function(){return this.commonInfo},e.prototype.removeSendingId=function(e){try{var t=JSON.parse(this.storage.getItem(s)),r=t.indexOf(e);-1!=r&&(t.splice(r,1),this.storage.setItem(s,JSON.stringify(t)))}catch(e){}},e}(),g=function(){function e(e,t,r,o){this.requestParams={},this.network=o,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=e.appkey,this.requestParams.platform=r,this.requestParams.uin=t.deviceId,this.requestParams.model="",this.requestParams.os=r,this.requestParams.app_version=e.appVersion,this.requestParams.sdk_version=t.sdkVersion,this.requestParams.error_stack="",this.uploadUrl=e.isOversea?"https://htrace.wetvinfo.com/kv":"https://h.trace.qq.com/kv"}return e.prototype.reportError=function(e,t){this.requestParams._dc=Math.random(),this.requestParams.error_msg=t,this.requestParams.error_code=e,this.network.get(this.uploadUrl,{params:this.requestParams}).catch((function(e){}))},e}(),y=function(){function e(e,t,r,o,n){this.strategy={isEventUpOnOff:!0,httpsUploadUrl:"https://otheve.beacon.qq.com/analytics/v2_upload",requestInterval:30,blacklist:[],samplelist:[]},this.realSample={},this.appkey="",this.needQueryConfig=!0,this.appkey=t.appkey,this.storage=o,this.needQueryConfig=e;try{var i=JSON.parse(this.storage.getItem(c));i&&this.processData(i)}catch(e){}t.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!t.isOversea&&this.needRequestConfig()&&this.requestConfig(t.appVersion,r,n)}return e.prototype.requestConfig=function(e,t,r){var o=this;this.storage.setItem(l,Date.now().toString()),r.post("https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:"undefined"==typeof wx?"3":"4",mainAppKey:this.appkey,appVersion:e,sdkVersion:t.sdkVersion,osVersion:t.userAgent,model:"",packageName:"",params:{A3:t.deviceId}}).then((function(e){if(0==e.data.ret)try{var t=JSON.parse(e.data.beaconConfig);t&&(o.processData(t),o.storage.setItem(c,e.data.beaconConfig))}catch(e){}else o.processData(null),o.storage.setItem(c,"")})).catch((function(e){}))},e.prototype.processData=function(e){var t,r,o,n,i;this.strategy.isEventUpOnOff=null!==(t=null==e?void 0:e.isEventUpOnOff)&&void 0!==t?t:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=null!==(r=null==e?void 0:e.httpsUploadUrl)&&void 0!==r?r:this.strategy.httpsUploadUrl,this.strategy.requestInterval=null!==(o=null==e?void 0:e.requestInterval)&&void 0!==o?o:this.strategy.requestInterval,this.strategy.blacklist=null!==(n=null==e?void 0:e.blacklist)&&void 0!==n?n:this.strategy.blacklist,this.strategy.samplelist=null!==(i=null==e?void 0:e.samplelist)&&void 0!==i?i:this.strategy.samplelist;for(var a=0,s=this.strategy.samplelist;a<s.length;a++){var c=s[a].split(",");2==c.length&&(this.realSample[c[0]]=c[1])}},e.prototype.needRequestConfig=function(){if(!this.needQueryConfig)return!1;var e=Number(this.storage.getItem(l));return Date.now()-e>60*this.strategy.requestInterval*1e3},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e)},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]<Math.floor(Math.random()*Math.floor(1e4))},e}(),v="session_storage_key",b=function(){function e(e,t,r){this.getSessionStackDepth=0,this.beacon=r,this.storage=e,this.duration=t,this.appkey=r.config.appkey}return e.prototype.getSession=function(){this.getSessionStackDepth+=1;var e=this.storage.getItem(v);if(!e)return this.createSession();var t="",r=0;try{var o=JSON.parse(e)||{sessionId:void 0,sessionStart:void 0};if(!o.sessionId||!o.sessionStart)return this.createSession();var n=Number(this.storage.getItem(a));if(Date.now()-n>this.duration)return this.createSession();t=o.sessionId,r=o.sessionStart,this.getSessionStackDepth=0}catch(e){}return{sessionId:t,sessionStart:r}},e.prototype.createSession=function(){var e=Date.now(),t={sessionId:this.appkey+"_"+e.toString(),sessionStart:e};this.storage.setItem(v,JSON.stringify(t)),this.storage.setItem(a,e.toString());var r="is_new_user",o=this.storage.getItem(r);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:o?"N":"Y"}),this.storage.setItem(r,JSON.stringify(!1)),t},e}();function C(){var e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,r=e.indexOf("Edge")>-1&&!t,o=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){new RegExp("MSIE (\\d+\\.\\d+);").test(e);var n=parseFloat(RegExp.$1);return 7==n?7:8==n?8:9==n?9:10==n?10:6}return r?-2:o?11:-1}var w,k=function(){return(k=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)},S=function(){function e(e,t){void 0===t&&(t={}),this.reportOptions={},this.config=e,this.reportOptions=t}return e.canUseDB=function(){return!!(null===window||void 0===window?void 0:window.indexedDB)},e.prototype.openDB=function(){var t=this;return new Promise((function(r,o){if(!e.canUseDB())return o({message:"当前不支持 indexeddb"});var n=t.config,i=n.name,a=n.version,s=n.stores,c=indexedDB.open(i,a);c.onsuccess=function(){t.db=c.result,r(),k({result:1,func:"open",params:JSON.stringify(t.config)},t.reportOptions)},c.onerror=function(e){var r,n;o(e),k({result:0,func:"open",params:JSON.stringify(t.config),error_msg:null===(n=null===(r=e.target)||void 0===r?void 0:r.error)||void 0===n?void 0:n.message},t.reportOptions)},c.onupgradeneeded=function(){t.db=c.result;try{null==s||s.forEach((function(e){t.createStore(e)}))}catch(e){k({result:0,func:"open",params:JSON.stringify(t.config),error_msg:e.message},t.reportOptions),o(e)}}}))},e.prototype.useStore=function(e){return this.storeName=e,this},e.prototype.deleteDB=function(){var e=this;return this.closeDB(),new Promise((function(t,r){var o=indexedDB.deleteDatabase(e.config.name);o.onsuccess=function(){return t()},o.onerror=r}))},e.prototype.closeDB=function(){var e;null===(e=this.db)||void 0===e||e.close(),this.db=null},e.prototype.getStoreCount=function(){var e=this;return new Promise((function(t,r){var o=e.getStore("readonly").count();o.onsuccess=function(){return t(o.result)},o.onerror=r}))},e.prototype.clearStore=function(){var e=this;return new Promise((function(t,r){var o=e.getStore("readwrite").clear();o.onsuccess=function(){return t()},o.onerror=r}))},e.prototype.add=function(e,t){var r=this;return new Promise((function(o,n){var i=r.getStore("readwrite").add(e,t);i.onsuccess=function(){o(i.result)},i.onerror=n}))},e.prototype.put=function(e,t){var r=this;return new Promise((function(o,n){var i=r.getStore("readwrite").put(e,t);i.onsuccess=function(){o(i.result)},i.onerror=n}))},e.prototype.getStoreAllData=function(){var e=this;return new Promise((function(t,r){var o=e.getStore("readonly").openCursor(),n=[];o.onsuccess=function(){var e;if(null===(e=o.result)||void 0===e?void 0:e.value){var r=o.result.value;n.push(r),o.result.continue()}else t(n)},o.onerror=r}))},e.prototype.getDataRangeByIndex=function(e,t,r,o,n){var i=this;return new Promise((function(a,s){var c=i.getStore().index(e),l=IDBKeyRange.bound(t,r,o,n),u=[],d=c.openCursor(l);d.onsuccess=function(){var e;(null===(e=null==d?void 0:d.result)||void 0===e?void 0:e.value)?(u.push(null==d?void 0:d.result.value),null==d||d.result.continue()):a(u)},d.onerror=s}))},e.prototype.removeDataByIndex=function(e,t,r,o,n){var i=this;return new Promise((function(a,s){var c=i.getStore("readwrite").index(e),l=IDBKeyRange.bound(t,r,o,n),u=c.openCursor(l),d=0;u.onsuccess=function(e){var t=e.target.result;t?(d+=1,t.delete(),t.continue()):a(d)},u.onerror=s}))},e.prototype.createStore=function(e){var t=e.name,r=e.indexes,o=void 0===r?[]:r,n=e.options;if(this.db){this.db.objectStoreNames.contains(t)&&this.db.deleteObjectStore(t);var i=this.db.createObjectStore(t,n);o.forEach((function(e){i.createIndex(e.indexName,e.keyPath,e.options)}))}},e.prototype.getStore=function(e){var t;return void 0===e&&(e="readonly"),null===(t=this.db)||void 0===t?void 0:t.transaction(this.storeName,e).objectStore(this.storeName)},e}(),x="event_table_v3",A="eventId",T=function(){function e(e){this.isReady=!1,this.taskQueue=Promise.resolve(),this.db=new S({name:"Beacon_"+e+"_V3",version:1,stores:[{name:x,options:{keyPath:A},indexes:[{indexName:A,keyPath:A,options:{unique:!0}}]}]}),this.open()}return e.prototype.getCount=function(){var e=this;return this.readyExec((function(){return e.db.getStoreCount()}))},e.prototype.setItem=function(e,t){var r=this;return this.readyExec((function(){return r.db.add({eventId:e,value:t})}))},e.prototype.getItem=function(e){return r(this,void 0,void 0,(function(){var t=this;return o(this,(function(r){return[2,this.readyExec((function(){return t.db.getDataRangeByIndex(A,e,e)}))]}))}))},e.prototype.removeItem=function(e){var t=this;return this.readyExec((function(){return t.db.removeDataByIndex(A,e,e)}))},e.prototype.updateItem=function(e,t){var r=this;return this.readyExec((function(){return r.db.put({eventId:e,value:t})}))},e.prototype.iterate=function(e){var t=this;return this.readyExec((function(){return t.db.getStoreAllData().then((function(t){t.forEach((function(t){e(t.value)}))}))}))},e.prototype.open=function(){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(t){switch(t.label){case 0:return this.taskQueue=this.taskQueue.then((function(){return e.db.openDB()})),[4,this.taskQueue];case 1:return t.sent(),this.isReady=!0,this.db.useStore(x),[2]}}))}))},e.prototype.readyExec=function(e){return this.isReady?e():(this.taskQueue=this.taskQueue.then((function(){return e()})),this.taskQueue)},e}(),E=function(){function e(e){this.keyObject={},this.storage=e}return e.prototype.getCount=function(){return this.storage.getStoreCount()},e.prototype.removeItem=function(e){this.storage.removeItem(e),delete this.keyObject[e]},e.prototype.setItem=function(e,t){var r=JSON.stringify(t);this.storage.setItem(e,r),this.keyObject[e]=t},e.prototype.iterate=function(e){for(var t=Object.keys(this.keyObject),r=0;r<t.length;r++){var o=this.storage.getItem(t[r]);e(JSON.parse(o))}},e}(),R=function(){function e(e,t){var r=this;this.dbEventCount=0,C()>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?(this.store=new E(t),this.dbEventCount=this.store.getCount()):(this.store=new T(e),this.getCount().then((function(e){r.dbEventCount=e})).catch((function(e){})))}return e.prototype.getCount=function(){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,e.sent()];case 2:return e.sent(),[2,Promise.reject()];case 3:return[2]}}))}))},e.prototype.insertEvent=function(e,t){return r(this,void 0,void 0,(function(){var r,n;return o(this,(function(o){switch(o.label){case 0:if(this.dbEventCount>=1e4)return[2,Promise.reject()];r=h(e.mapValue),o.label=1;case 1:return o.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(r,e)];case 2:return[2,o.sent()];case 3:return n=o.sent(),t&&t(n,e),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}}))}))},e.prototype.getEvents=function(){return r(this,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:e=[],t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.store.iterate((function(t){e.push(t)}))];case 2:case 3:return t.sent(),[2,Promise.all(e)];case 4:return[2]}}))}))},e.prototype.removeEvent=function(e){return r(this,void 0,void 0,(function(){var t;return o(this,(function(r){switch(r.label){case 0:t=h(e.mapValue),r.label=1;case 1:return r.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(t)];case 2:return[2,r.sent()];case 3:return r.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}}))}))},e}(),I=function(){return(I=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function B(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function O(e,t){var r=[null,void 0,"",NaN].includes(e);if(t.isSkipEmpty&&r)return null;var o=!t.isSkipEmpty&&r?"":e;try{return t.encode?encodeURIComponent(o):o}catch(e){return null}}function N(e,t){return new Promise((function(r,o){if(t&&document.querySelectorAll("script[data-tag="+t+"]").length)return r();var n=document.createElement("script"),i=I({type:"text/javascript",charset:"utf-8"},e);Object.keys(i).forEach((function(e){return function(e,t,r){if(e)return void 0===r?e.getAttribute(t):e.setAttribute(t,r)}(n,e,i[e])})),t&&(n.dataset.tag=t),n.onload=function(){return r()},n.onreadystatechange=function(){var e=n.readyState;["complete","loaded"].includes(e)&&(n.onreadystatechange=null,r())},n.onerror=o,document.body.appendChild(n)}))}!function(e){e[e.equal=0]="equal",e[e.low=-1]="low",e[e.high=1]="high"}(w||(w={}));var _=function(){return(_=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function D(e,t,r,o){return new(r||(r=Promise))((function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((o=o.apply(e,t||[])).next())}))}function P(e,t){var r,o,n,i,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,o&&(n=2&i[0]?o.return:i[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,i[1])).done)return n;switch(o=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((n=(n=a.trys).length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){a.label=i[1];break}if(6===i[0]&&a.label<n[1]){a.label=n[1],n=i;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(i);break}n[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var U=function(){function e(){this.interceptors=[]}return e.prototype.use=function(e,t){return this.interceptors.push({resolved:e,rejected:t}),this.interceptors.length-1},e.prototype.traverse=function(e,t){void 0===t&&(t=!1);var r=Promise.resolve(e);return(t?Array.prototype.reduceRight:Array.prototype.reduce).call(this.interceptors,(function(e,t){if(t){var o=t.resolved,n=t.rejected;r=r.then(o,n)}return e}),""),r},e.prototype.eject=function(e){this.interceptors[e]&&(this.interceptors[e]=null)},e}(),M={defaults:{timeout:0,method:"GET",mode:"cors",redirect:"follow",credentials:"same-origin"},headers:{common:{Accept:"application/json, text/plain, */*"},POST:{"Content-Type":"application/x-www-form-urlencoded"},PUT:{"Content-Type":"application/x-www-form-urlencoded"},PATCH:{"Content-Type":"application/x-www-form-urlencoded"}},baseURL:"",polyfillUrl:"https://vm.gtimg.cn/comps/script/fetch.min.js",interceptors:{request:new U,response:new U}},L=/^([a-z][a-z\d+\-.]*:)?\/\//i,j=Object.prototype.toString;function H(e){return D(this,void 0,void 0,(function(){var t;return P(this,(function(r){switch(r.label){case 0:if(window.fetch)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,N({src:e})];case 2:return r.sent(),[3,4];case 3:throw t=r.sent(),new Error("加载 polyfill "+e+" 失败: "+t.message);case 4:return[2]}}))}))}function q(e){return D(this,void 0,void 0,(function(){var t,r,o,n,i,a,s,c,l,u,d,p,h,f,m,g,y;return P(this,(function(v){switch(v.label){case 0:return t=M.baseURL,r=M.defaults,o=M.interceptors,[4,H(M.polyfillUrl)];case 1:return v.sent(),(n=_(_({},r),e)).headers||(n.headers=function(e){void 0===e&&(e="GET");var t=M.headers[e]||{};return _(_({},M.headers.common),t)}(n.method)),function(e){["Accept","Content-Type"].forEach((function(t){return r=t,void((o=e.headers)&&Object.keys(o).forEach((function(e){e!==r&&e.toUpperCase()===r.toUpperCase()&&(o[r]=o[e],delete o[e])})));var r,o})),function(e){if("[object Object]"!==j.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}(e.body)&&(e.body=JSON.stringify(e.body),e.headers&&(e.headers["Content-Type"]="application/json;charset=utf-8"))}(n),[4,o.request.traverse(n,!0)];case 2:if((i=v.sent())instanceof Error)throw i;return i.url=function(e,t){return!e||L.test(t)?t:e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,"")}(t,i.url),a=i.url,s=i.timeout,c=i.params,l=i.method,u=["GET","DELETE","OPTIONS","HEAD"].includes(void 0===l?"GET":l)&&!!c,d=u?function(e,t){void 0===t&&(t={encode:!0,isSkipEmpty:!1});var r=e.url,o=e.query,n=void 0===o?{}:o,i=e.hash,a=r.split("#"),s=a[0],c=a[1],l=void 0===c?"":c,u=s.split("?")[0],d=[],p=O(i||l,t),h=I(I({},function(e){var t=e.split("#"),r=t[0],o=t[1],n=void 0===o?"":o,i=r.split("?"),a=i[0],s=i[1],c=void 0===s?"":s,l=B(n),u=Object.create(null);return c.split("&").forEach((function(e){var t=e.split("="),r=t[0],o=t[1],n=void 0===o?"":o,i=B(r),a=B(n);null===i||null===a||""===i&&""===a||u[i]||(u[i]=a)})),{url:a,query:u,hash:l}}(r).query),n);return Object.keys(h).forEach((function(e){var r=O(e,t),o=O(h[e],t);null!==r&&null!==o&&d.push(r+"="+o)})),u+(d.length?"?"+d.join("&"):"")+(p?"#"+p:"")}({url:a,query:c}):a,p=[],s&&!i.signal&&(m=new Promise((function(e){h=setTimeout((function(){e(new Error("timeout"))}),s)})),p.push(m),f=new AbortController,i.signal=f.signal),p.push(fetch(d,i).catch((function(e){return e}))),[4,Promise.race(p)];case 3:return g=v.sent(),h&&clearTimeout(h),[4,o.response.traverse(g)];case 4:if((y=v.sent())instanceof Error)throw null==f||f.abort(),y;return[2,y]}}))}))}var z=function(){function e(e){M.interceptors.request.use((function(r){var o=r.url,n=r.method,i=r.body,a=i;if(e.onReportBeforeSend){var s=e.onReportBeforeSend({url:o,method:n,data:i?JSON.parse(i):null});a=(null==s?void 0:s.data)?JSON.stringify(s.data):null}return"GET"!=n&&a?t(t({},r),{body:a}):r}))}return e.prototype.get=function(e,n){return r(this,void 0,void 0,(function(){var r,i;return o(this,(function(o){switch(o.label){case 0:return[4,q(t({url:e},n))];case 1:return[4,(r=o.sent()).json()];case 2:return i=o.sent(),[2,Promise.resolve({data:i,status:r.status,statusText:r.statusText,headers:r.headers})]}}))}))},e.prototype.post=function(e,n,i){return r(this,void 0,void 0,(function(){var r,a;return o(this,(function(o){switch(o.label){case 0:return[4,q(t({url:e,body:n,method:"POST"},i))];case 1:return[4,(r=o.sent()).json()];case 2:return a=o.sent(),[2,Promise.resolve({data:a,status:r.status,statusText:r.statusText,headers:r.headers})]}}))}))},e}(),F=function(){function e(e){this.appkey=e}return e.prototype.getItem=function(e){try{return window.localStorage.getItem(this.getStoreKey(e))}catch(e){return""}},e.prototype.removeItem=function(e){try{window.localStorage.removeItem(this.getStoreKey(e))}catch(e){}},e.prototype.setItem=function(e,t){try{window.localStorage.setItem(this.getStoreKey(e),t)}catch(e){}},e.prototype.setSessionItem=function(e,t){try{window.sessionStorage.setItem(this.getStoreKey(e),t)}catch(e){}},e.prototype.getSessionItem=function(e){try{return window.sessionStorage.getItem(this.getStoreKey(e))}catch(e){return""}},e.prototype.getStoreKey=function(e){return n+this.appkey+"_"+e},e.prototype.createDeviceId=function(){try{var e=window.localStorage.getItem(i);return e||(e=function(e){for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",r="",o=0;o<32;o++)r+=t.charAt(Math.floor(Math.random()*t.length));return r}(),window.localStorage.setItem(i,e)),e}catch(e){return""}},e.prototype.clear=function(){try{for(var e=window.localStorage.length,t=0;t<e;t++){var r=window.localStorage.key(t);(null==r?void 0:r.substr(0,9))==n&&window.localStorage.removeItem(r)}}catch(e){}},e.prototype.getStoreCount=function(){var e=0;try{e=window.localStorage.length}catch(e){}return e},e}(),V="logid_start",K="4.5.14-web";return function(r){function o(e){var t=r.call(this,e)||this;t.qimei36="",t.uselessCycleTaskNum=0,t.underWeakNet=!1,t.pauseSearching=!1,t.send=function(e,r,o){t.storage.setItem(a,Date.now().toString()),t.network.post(t.uploadUrl||t.strategy.getUploadUrl(),e.data).then((function(o){var n;100==(null===(n=null==o?void 0:o.data)||void 0===n?void 0:n.result)?t.delayTime=1e3*o.data.delayTime:t.delayTime=0,r&&r(e.data),e.data.events.forEach((function(e){t.store.removeEvent(e).then((function(){t.removeSendingId(h(e.mapValue))}))})),t.doCustomCycleTask()})).catch((function(r){var n=e.data.events;t.errorReport.reportError(r.code?r.code.toString():"600",r.message),o&&o(e.data);var i=JSON.parse(t.storage.getItem(s));n.forEach((function(e){i&&-1!=i.indexOf(h(e))&&t.store.insertEvent(e,(function(e,r){e&&t.errorReport.reportError("604","insertEvent fail!")})),t.removeSendingId(h(e))})),t.monitorUploadFailed()}))};var o,n,i=C();return t.isUnderIE8=i>0&&i<8,t.isUnderIE8||(t.isUnderIE=i>0,e.needInitQimei&&function(e,t){var r;(void 0===r&&(r=Date.now()+"-"+Math.random()),new Promise((function(e,t){if(document.getElementById(r))e(void 0);else{var o=document.getElementsByTagName("head")[0],n=document.createElement("script");n.onload=function(){return function(){n.onload=null,e(void 0)}},n.onerror=function(e){n.onerror=null,o.removeChild(n),t(e)},n.src="https://tun-cos-1258344701.file.myqcloud.com/fp.js",n.id=r,o.appendChild(n)}}))).then((function(){(new Fingerprint).getQimei36(e,t)})).catch((function(e){}))}(e.appkey,(function(e){t.qimei36=e.q36})),t.network=new z(e),t.storage=new F(e.appkey),t.initCommonInfo(e),t.store=new R(e.appkey,t.storage),t.errorReport=new g(t.config,t.commonInfo,"web",t.network),t.strategy=new y(null==e.needQueryConfig||e.needQueryConfig,t.config,t.commonInfo,t.storage,t.network),t.logidStartTime=t.storage.getItem(V),t.logidStartTime||(t.logidStartTime=Date.now().toString(),t.storage.setItem(V,t.logidStartTime)),o=t.logidStartTime,n=Date.now()-Number.parseFloat(o),Math.floor(n/864e5)>=365&&t.storage.clear(),t.initSession(e),t.onDirectUserAction("rqd_js_init",{}),setTimeout((function(){return t.lifeCycle.emit("init")}),0),t.initDelayTime=e.delay?e.delay:1e3,t.cycleTask(t.initDelayTime)),t}return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}(o,r),o.prototype.initSession=function(e){var t=18e5;e.sessionDuration&&e.sessionDuration>3e4&&(t=e.sessionDuration),this.beaconSession=new b(this.storage,t,this)},o.prototype.initCommonInfo=function(e){var t=Number(this.storage.getItem(a));try{var r=JSON.parse(this.storage.getItem(s));(Date.now()-t>3e4||!r)&&this.storage.setItem(s,JSON.stringify([]))}catch(e){}e.uploadUrl&&(this.uploadUrl=e.uploadUrl+"?appkey="+e.appkey);var o=[window.screen.width,window.screen.height];window.devicePixelRatio&&o.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:o.join("*"),channelID:e.channelID?String(e.channelID):"",openid:e.openid?String(e.openid):"",unid:e.unionid?String(e.unionid):"",sdkVersion:K},this.config.appVersion=e.versionCode?String(e.versionCode):"",this.config.strictMode=e.strictMode},o.prototype.cycleTask=function(e){var t=this;this.intervalID=window.setInterval((function(){t.pauseSearching||t.store.getEvents().then((function(e){0==e.length&&(t.pauseSearching=!0);var r=[],o=JSON.parse(t.storage.getItem(s));o||(o=[]),e&&e.forEach((function(e){var t=h(e.mapValue);-1==o.indexOf(t)&&(r.push(e),o.push(t))})),0!=r.length&&(t.storage.setItem(s,JSON.stringify(o)),t._normalLogPipeline(t.assembleData(r)))})).catch((function(e){}))}),e)},o.prototype.onReport=function(e,t,r){var o=this;if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{this.pauseSearching=!1;var n=this.generateData(e,t,r);if(r&&0==this.delayTime&&!this.underWeakNet)this._normalLogPipeline(this.assembleData(n));else{var i=n.shift();i&&this.store.insertEvent(i,(function(e){e&&o.errorReport.reportError("604","insertEvent fail!")})).catch((function(e){o._normalLogPipeline(o.assembleData(n))}))}}},o.prototype.onSendBeacon=function(e,t){if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{this.pauseSearching=!1;var r=this.assembleData(this.generateData(e,t,!0));"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(r))}},o.prototype.generateData=function(e,r,o){var n=[],i="4.5.14-web_"+(o?"direct_log_id":"normal_log_id"),a=Number(this.storage.getItem(i));return a=a||1,r=t(t({},r),{A99:o?"Y":"N",A100:a.toString(),A72:K,A88:this.logidStartTime}),a++,this.storage.setItem(i,a.toString()),n.push({eventCode:e,eventTime:Date.now().toString(),mapValue:d(r,this.config.strictMode)}),n},o.prototype.assembleData=function(e){var r=this.beaconSession.getSession();return{appVersion:this.config.appVersion?p(this.config.appVersion):"",sdkId:"js",sdkVersion:K,mainAppKey:this.config.appkey,platformId:3,common:d(t(t({},this.additionalParams),{A2:this.commonInfo.deviceId,A8:this.commonInfo.openid,A12:this.commonInfo.language,A17:this.commonInfo.pixel,A23:this.commonInfo.channelID,A50:this.commonInfo.unid,A76:r.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:e}},o.prototype.monitorUploadFailed=function(){this.uselessCycleTaskNum++,this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.underWeakNet=!0)},o.prototype.doCustomCycleTask=function(){this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime)),this.uselessCycleTaskNum=0,this.underWeakNet=!1},o}(m)},"object"==a(t)&&void 0!==e?e.exports=i():void 0===(n="function"==typeof(o=i)?o.call(t,r,t,e):o)||(e.exports=n)},"./lib/crypto.js":
- /*!***********************!*\
- !*** ./lib/crypto.js ***!
- \***********************/
- /*! no static exports found */function(e,t,r){(function(e){var t,o,n,i,a,s,c,l=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),u=u||function(e,t){var r={},o=r.lib={},n=function(){},i=o.Base={extend:function(e){n.prototype=this;var t=new n;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)}},a=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,o=this.sigBytes;if(e=e.sigBytes,this.clamp(),o%4)for(var n=0;n<e;n++)t[o+n>>>2]|=(r[n>>>2]>>>24-n%4*8&255)<<24-(o+n)%4*8;else if(65535<r.length)for(n=0;n<e;n+=4)t[o+n>>>2]=r[n>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],o=0;o<t;o+=4)r.push(4294967296*e.random()|0);return new a.init(r,t)}}),s=r.enc={},c=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],o=0;o<e;o++){var n=t[o>>>2]>>>24-o%4*8&255;r.push((n>>>4).toString(16)),r.push((15&n).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o<t;o+=2)r[o>>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new a.init(r,t/2)}},l=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],o=0;o<e;o++)r.push(String.fromCharCode(t[o>>>2]>>>24-o%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o<t;o++)r[o>>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new a.init(r,t)}},u=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(t){throw Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,o=r.words,n=r.sigBytes,i=this.blockSize,s=n/(4*i);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,n=e.min(4*t,n),t){for(var c=0;c<t;c+=i)this._doProcessBlock(o,c);c=o.splice(0,t),r.sigBytes-=n}return new a.init(c,n)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=d.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.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,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=r.algo={};return r}(Math);o=(a=(t=u).lib).WordArray,n=a.Hasher,i=[],a=t.algo.SHA1=n.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,o=r[0],n=r[1],a=r[2],s=r[3],c=r[4],l=0;80>l;l++){if(16>l)i[l]=0|e[t+l];else{var u=i[l-3]^i[l-8]^i[l-14]^i[l-16];i[l]=u<<1|u>>>31}u=(o<<5|o>>>27)+c+i[l],u=20>l?u+(1518500249+(n&a|~n&s)):40>l?u+(1859775393+(n^a^s)):60>l?u+((n&a|n&s|a&s)-1894007588):u+((n^a^s)-899497514),c=s,s=a,a=n<<30|n>>>2,n=o,o=u}r[0]=r[0]+o|0,r[1]=r[1]+n|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,o=8*e.sigBytes;return t[o>>>5]|=128<<24-o%32,t[14+(o+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(o+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=n._createHelper(a),t.HmacSHA1=n._createHmacHelper(a),function(){var e=u,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,r){e=this._hasher=new e.init,"string"==typeof r&&(r=t.parse(r));var o=e.blockSize,n=4*o;r.sigBytes>n&&(r=e.finalize(r)),r.clamp();for(var i=this._oKey=r.clone(),a=this._iKey=r.clone(),s=i.words,c=a.words,l=0;l<o;l++)s[l]^=1549556828,c[l]^=909522486;i.sigBytes=a.sigBytes=n,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))}})}(),c=(s=u).lib.WordArray,s.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,o=this._map;e.clamp();for(var n=[],i=0;i<r;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<r;s++)n.push(o.charAt(a>>>6*(3-s)&63));var c=o.charAt(64);if(c)for(;n.length%4;)n.push(c);return n.join("")},parse:function(e){var t=e.length,r=this._map,o=r.charAt(64);if(o){var n=e.indexOf(o);-1!=n&&(t=n)}for(var i=[],a=0,s=0;s<t;s++)if(s%4){var l=r.indexOf(e.charAt(s-1))<<s%4*2,u=r.indexOf(e.charAt(s))>>>6-s%4*2;i[a>>>2]|=(l|u)<<24-a%4*8,a++}return c.create(i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},"object"===l(e)?e.exports=u:window.CryptoJS=u}).call(this,r(/*! ./../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./lib/json2xml.js":
- /*!*************************!*\
- !*** ./lib/json2xml.js ***!
- \*************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n="a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ--⁰-Ⰰ-、-豈-﷏ﷰ-�",i=new RegExp("^([^"+n+"])|^((x|X)(m|M)(l|L))|([^"+n+"-.0-9·̀-ͯ‿⁀])","g"),a=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,s=function(e){var t=[];if(e instanceof Object)for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t},c=function(e,t){var r=function(e,r,o,n,a){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(n).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(i,"_"));var l=[c,"<",e,o||""];return r&&r.length>0?(l.push(">"),l.push(r),a&&l.push(c),l.push("</"),l.push(e),l.push(">")):l.push("/>"),l.join("")};return function e(n,i,c){var l=o(n);switch((Array.isArray?Array.isArray(n):n instanceof Array)?l="array":n instanceof Date&&(l="date"),l){case"array":var u=[];return n.map((function(t){u.push(e(t,0,c+1))})),t.prettyPrint&&u.push("\n"),u.join("");case"date":return n.toJSON?n.toJSON():n+"";case"object":var d=[];for(var p in n)if(n.hasOwnProperty(p))if(n[p]instanceof Array)for(var h=0;h<n[p].length;h++)n[p].hasOwnProperty(h)&&d.push(r(p,e(n[p][h],0,c+1),null,c+1,s(n[p][h]).length));else d.push(r(p,e(n[p],0,c+1),null,c+1));return t.prettyPrint&&d.length>0&&d.push("\n"),d.join("");case"function":return n();default:return t.escape?(""+n).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(a,""):""+n}}(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("")};e.exports=function(e,t){if(t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),"string"==typeof e)try{e=JSON.parse(e.toString())}catch(i){return!1}var r="",n="";return t&&("object"==o(t)?(t.xmlHeader&&(r=l(!!t.xmlHeader.standalone)),void 0!==t.docType&&(n="<!DOCTYPE "+t.docType+">")):r=l()),[r,(t=t||{}).prettyPrint&&n?"\n":"",n,c(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},"./lib/md5.js":
- /*!********************!*\
- !*** ./lib/md5.js ***!
- \********************/
- /*! no static exports found */function libMd5Js(module,exports,__webpack_require__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js");(function(){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__(/*! !webpack amd options */"./node_modules/webpack/buildin/amd-options.js"),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"===_typeof(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t,r){return new Md5(!0).update(t,r)[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 r=OUTPUT_TYPES[t];e[r]=createOutputMethod(r)}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)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};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}Md5.prototype.update=function(e,t){if(!this.finalized){for(var r,o,n=0,i=e.length,a=this.blocks,s=this.buffer8;n<i;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),ARRAY_BUFFER)for(o=this.start;n<i&&o<64;++n)r=e.charCodeAt(n),t||r<128?s[o++]=r:r<2048?(s[o++]=192|r>>6,s[o++]=128|63&r):r<55296||r>=57344?(s[o++]=224|r>>12,s[o++]=128|r>>6&63,s[o++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++n)),s[o++]=240|r>>18,s[o++]=128|r>>12&63,s[o++]=128|r>>6&63,s[o++]=128|63&r);else for(o=this.start;n<i&&o<64;++n)r=e.charCodeAt(n),t||r<128?a[o>>2]|=r<<SHIFT[3&o++]:r<2048?(a[o>>2]|=(192|r>>6)<<SHIFT[3&o++],a[o>>2]|=(128|63&r)<<SHIFT[3&o++]):r<55296||r>=57344?(a[o>>2]|=(224|r>>12)<<SHIFT[3&o++],a[o>>2]|=(128|r>>6&63)<<SHIFT[3&o++],a[o>>2]|=(128|63&r)<<SHIFT[3&o++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++n)),a[o>>2]|=(240|r>>18)<<SHIFT[3&o++],a[o>>2]|=(128|r>>12&63)<<SHIFT[3&o++],a[o>>2]|=(128|r>>6&63)<<SHIFT[3&o++],a[o>>2]|=(128|63&r)<<SHIFT[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}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,r,o,n,i,a=this.blocks;this.first?t=((t=((e=((e=a[0]-680876937)<<7|e>>>25)-271733879<<0)^(r=((r=(-271733879^(o=((o=(-1732584194^2004318071&e)+a[1]-117830708)<<12|o>>>20)+e<<0)&(-271733879^e))+a[2]-1126478375)<<17|r>>>15)+o<<0)&(o^e))+a[3]-1316259209)<<22|t>>>10)+r<<0:(e=this.h0,t=this.h1,r=this.h2,t=((t+=((e=((e+=((o=this.h3)^t&(r^o))+a[0]-680876936)<<7|e>>>25)+t<<0)^(r=((r+=(t^(o=((o+=(r^e&(t^r))+a[1]-389564586)<<12|o>>>20)+e<<0)&(e^t))+a[2]+606105819)<<17|r>>>15)+o<<0)&(o^e))+a[3]-1044525330)<<22|t>>>10)+r<<0),t=((t+=((e=((e+=(o^t&(r^o))+a[4]-176418897)<<7|e>>>25)+t<<0)^(r=((r+=(t^(o=((o+=(r^e&(t^r))+a[5]+1200080426)<<12|o>>>20)+e<<0)&(e^t))+a[6]-1473231341)<<17|r>>>15)+o<<0)&(o^e))+a[7]-45705983)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(o^t&(r^o))+a[8]+1770035416)<<7|e>>>25)+t<<0)^(r=((r+=(t^(o=((o+=(r^e&(t^r))+a[9]-1958414417)<<12|o>>>20)+e<<0)&(e^t))+a[10]-42063)<<17|r>>>15)+o<<0)&(o^e))+a[11]-1990404162)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(o^t&(r^o))+a[12]+1804603682)<<7|e>>>25)+t<<0)^(r=((r+=(t^(o=((o+=(r^e&(t^r))+a[13]-40341101)<<12|o>>>20)+e<<0)&(e^t))+a[14]-1502002290)<<17|r>>>15)+o<<0)&(o^e))+a[15]+1236535329)<<22|t>>>10)+r<<0,t=((t+=((o=((o+=(t^r&((e=((e+=(r^o&(t^r))+a[1]-165796510)<<5|e>>>27)+t<<0)^t))+a[6]-1069501632)<<9|o>>>23)+e<<0)^e&((r=((r+=(e^t&(o^e))+a[11]+643717713)<<14|r>>>18)+o<<0)^o))+a[0]-373897302)<<20|t>>>12)+r<<0,t=((t+=((o=((o+=(t^r&((e=((e+=(r^o&(t^r))+a[5]-701558691)<<5|e>>>27)+t<<0)^t))+a[10]+38016083)<<9|o>>>23)+e<<0)^e&((r=((r+=(e^t&(o^e))+a[15]-660478335)<<14|r>>>18)+o<<0)^o))+a[4]-405537848)<<20|t>>>12)+r<<0,t=((t+=((o=((o+=(t^r&((e=((e+=(r^o&(t^r))+a[9]+568446438)<<5|e>>>27)+t<<0)^t))+a[14]-1019803690)<<9|o>>>23)+e<<0)^e&((r=((r+=(e^t&(o^e))+a[3]-187363961)<<14|r>>>18)+o<<0)^o))+a[8]+1163531501)<<20|t>>>12)+r<<0,t=((t+=((o=((o+=(t^r&((e=((e+=(r^o&(t^r))+a[13]-1444681467)<<5|e>>>27)+t<<0)^t))+a[2]-51403784)<<9|o>>>23)+e<<0)^e&((r=((r+=(e^t&(o^e))+a[7]+1735328473)<<14|r>>>18)+o<<0)^o))+a[12]-1926607734)<<20|t>>>12)+r<<0,t=((t+=((i=(o=((o+=((n=t^r)^(e=((e+=(n^o)+a[5]-378558)<<4|e>>>28)+t<<0))+a[8]-2022574463)<<11|o>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[11]+1839030562)<<16|r>>>16)+o<<0))+a[14]-35309556)<<23|t>>>9)+r<<0,t=((t+=((i=(o=((o+=((n=t^r)^(e=((e+=(n^o)+a[1]-1530992060)<<4|e>>>28)+t<<0))+a[4]+1272893353)<<11|o>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[7]-155497632)<<16|r>>>16)+o<<0))+a[10]-1094730640)<<23|t>>>9)+r<<0,t=((t+=((i=(o=((o+=((n=t^r)^(e=((e+=(n^o)+a[13]+681279174)<<4|e>>>28)+t<<0))+a[0]-358537222)<<11|o>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[3]-722521979)<<16|r>>>16)+o<<0))+a[6]+76029189)<<23|t>>>9)+r<<0,t=((t+=((i=(o=((o+=((n=t^r)^(e=((e+=(n^o)+a[9]-640364487)<<4|e>>>28)+t<<0))+a[12]-421815835)<<11|o>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[15]+530742520)<<16|r>>>16)+o<<0))+a[2]-995338651)<<23|t>>>9)+r<<0,t=((t+=((o=((o+=(t^((e=((e+=(r^(t|~o))+a[0]-198630844)<<6|e>>>26)+t<<0)|~r))+a[7]+1126891415)<<10|o>>>22)+e<<0)^((r=((r+=(e^(o|~t))+a[14]-1416354905)<<15|r>>>17)+o<<0)|~e))+a[5]-57434055)<<21|t>>>11)+r<<0,t=((t+=((o=((o+=(t^((e=((e+=(r^(t|~o))+a[12]+1700485571)<<6|e>>>26)+t<<0)|~r))+a[3]-1894986606)<<10|o>>>22)+e<<0)^((r=((r+=(e^(o|~t))+a[10]-1051523)<<15|r>>>17)+o<<0)|~e))+a[1]-2054922799)<<21|t>>>11)+r<<0,t=((t+=((o=((o+=(t^((e=((e+=(r^(t|~o))+a[8]+1873313359)<<6|e>>>26)+t<<0)|~r))+a[15]-30611744)<<10|o>>>22)+e<<0)^((r=((r+=(e^(o|~t))+a[6]-1560198380)<<15|r>>>17)+o<<0)|~e))+a[13]+1309151649)<<21|t>>>11)+r<<0,t=((t+=((o=((o+=(t^((e=((e+=(r^(t|~o))+a[4]-145523070)<<6|e>>>26)+t<<0)|~r))+a[11]-1120210379)<<10|o>>>22)+e<<0)^((r=((r+=(e^(o|~t))+a[2]+718787259)<<15|r>>>17)+o<<0)|~e))+a[9]-343485551)<<21|t>>>11)+r<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=r-1732584194<<0,this.h3=o+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+o<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,o=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[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(e){if("hex"===e)return this.hex();this.finalize();var t=this.h0,r=this.h1,o=this.h2,n=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255,255&o,o>>8&255,o>>16&255,o>>24&255,255&n,n>>8&255,n>>16&255,n>>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,r,o="",n=this.array(),i=0;i<15;)e=n[i++],t=n[i++],r=n[i++],o+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|r>>>6)]+BASE64_ENCODE_CHAR[63&r];return e=n[i],o+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))})()}).call(this,__webpack_require__(/*! ./../node_modules/process/browser.js */"./node_modules/process/browser.js"),__webpack_require__(/*! ./../node_modules/webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"),__webpack_require__(/*! ./../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(module))},"./lib/request.js":
- /*!************************!*\
- !*** ./lib/request.js ***!
- \************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n=function(e){switch(o(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},i=function(e,t,r){var o={};return t.getAllResponseHeaders().trim().split("\n").forEach((function(e){if(e){var t=e.indexOf(":"),r=e.substr(0,t).trim().toLowerCase(),n=e.substr(t+1).trim();o[r]=n}})),{error:e,statusCode:t.status,statusMessage:t.statusText,headers:o,body:r}},a=function(e,t){return t||"text"!==t?e.response:e.responseText};e.exports=function(e,t){var r=(e.method||"GET").toUpperCase(),s=e.url;if(e.qs){var c=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"===o(e)?Object.keys(e).map((function(o){var i=encodeURIComponent(n(o))+r;return Array.isArray(e[o])?e[o].map((function(e){return i+encodeURIComponent(n(e))})).join(t):i+encodeURIComponent(n(e[o]))})).filter(Boolean).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}(e.qs);c&&(s+=(-1===s.indexOf("?")?"?":"&")+c)}var l=new XMLHttpRequest;if(l.open(r,s,!0),l.responseType=e.dataType||"text",e.xhrFields)for(var u in e.xhrFields)l[u]=e.xhrFields[u];var d=e.headers;if(d)for(var p in d)d.hasOwnProperty(p)&&"content-length"!==p.toLowerCase()&&"user-agent"!==p.toLowerCase()&&"origin"!==p.toLowerCase()&&"host"!==p.toLowerCase()&&l.setRequestHeader(p,d[p]);return e.onProgress&&l.upload&&(l.upload.onprogress=e.onProgress),e.onDownloadProgress&&(l.onprogress=e.onDownloadProgress),e.timeout&&(l.timeout=e.timeout),l.ontimeout=function(e){var r=new Error("timeout");t(i(r,l))},l.onload=function(){t(i(null,l,a(l,e.dataType)))},l.onerror=function(r){var o=a(l,e.dataType);if(o)t(i(null,l,o));else{var n=l.statusText;n||0!==l.status||(n=new Error("CORS blocked or network error")),t(i(n,l,o))}},l.send(e.body||""),l}},"./lib/xml2json.js":
- /*!*************************!*\
- !*** ./lib/xml2json.js ***!
- \*************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! @xmldom/xmldom */"./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,n=function(){this.version="1.3.5";var e={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},t=new RegExp(/(?!xmlns)^.*:/);return this.grokType=function(e){return/^\s*$/.test(e)?null:/^(?:true|false)$/i.test(e)?"true"===e.toLowerCase():isFinite(e)?parseFloat(e):e},this.parseString=function(e,t){if(e){var r=this.stringToXML(e);return r.getElementsByTagName("parsererror").length?null:this.parseXML(r,t)}return null},this.parseXML=function(r,o){for(var i in o)e[i]=o[i];var a={},s=0,c="";if(r.childNodes.length)for(var l,u,d,p=0;p<r.childNodes.length;p++)4===(l=r.childNodes.item(p)).nodeType?e.mergeCDATA&&(c+=l.nodeValue):3===l.nodeType?c+=l.nodeValue:1===l.nodeType&&(0===s&&(a={}),u=e.stripElemPrefix?l.nodeName.replace(t,""):l.nodeName,d=n.parseXML(l),a.hasOwnProperty(u)?(a[u].constructor!==Array&&(a[u]=[a[u]]),a[u].push(d)):(a[u]=d,s++));return Object.keys(a).length||(a=c||""),a},this.xmlToString=function(e){try{return e.xml?e.xml:(new XMLSerializer).serializeToString(e)}catch(t){return null}},this.stringToXML=function(e){try{var t=null;return window.DOMParser?t=(new o).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t)}catch(r){return null}},this}.call({});e.exports=function(e){return n.parseString(e)}},"./node_modules/@babel/runtime/helpers/classCallCheck.js":
- /*!***************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
- \***************************************************************/
- /*! no static exports found */function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/createClass.js":
- /*!************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
- \************************************************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./toPropertyKey.js */"./node_modules/@babel/runtime/helpers/toPropertyKey.js");function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPrimitive.js":
- /*!************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
- \************************************************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./typeof.js */"./node_modules/@babel/runtime/helpers/typeof.js").default;e.exports=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":
- /*!**************************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
- \**************************************************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./typeof.js */"./node_modules/@babel/runtime/helpers/typeof.js").default,n=r(/*! ./toPrimitive.js */"./node_modules/@babel/runtime/helpers/toPrimitive.js");e.exports=function(e){var t=n(e,"string");return"symbol"===o(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/typeof.js":
- /*!*******************************************************!*\
- !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
- \*******************************************************/
- /*! no static exports found */function(e,t){function r(t){return e.exports=r="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},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@xmldom/xmldom/lib/conventions.js":
- /*!********************************************************!*\
- !*** ./node_modules/@xmldom/xmldom/lib/conventions.js ***!
- \********************************************************/
- /*! no static exports found */function(e,t,r){function o(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var n=o({HTML:"text/html",isHTML:function(e){return e===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=o({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===i.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=function(e,t){if(null===e||"object"!==_typeof2(e))throw new TypeError("target is not an object");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.find=function(e,t,r){if(void 0===r&&(r=Array.prototype),e&&"function"==typeof r.find)return r.find.call(e,t);for(var o=0;o<e.length;o++)if(Object.prototype.hasOwnProperty.call(e,o)){var n=e[o];if(t.call(void 0,n,o,e))return n}},t.freeze=o,t.MIME_TYPE=n,t.NAMESPACE=i},"./node_modules/@xmldom/xmldom/lib/dom-parser.js":
- /*!*******************************************************!*\
- !*** ./node_modules/@xmldom/xmldom/lib/dom-parser.js ***!
- \*******************************************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js"),n=r(/*! ./dom */"./node_modules/@xmldom/xmldom/lib/dom.js"),i=r(/*! ./entities */"./node_modules/@xmldom/xmldom/lib/entities.js"),a=r(/*! ./sax */"./node_modules/@xmldom/xmldom/lib/sax.js"),s=n.DOMImplementation,c=o.NAMESPACE,l=a.ParseError,u=a.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function p(e){this.options=e||{locator:{}}}function h(){this.cdata=!1}function f(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function y(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}p.prototype.parseFromString=function(e,t){var r=this.options,o=new u,n=r.domBuilder||new h,a=r.errorHandler,s=r.locator,l=r.xmlns||{},p=/\/x?html?$/.test(t),f=p?i.HTML_ENTITIES:i.XML_ENTITIES;s&&n.setDocumentLocator(s),o.errorHandler=function(e,t,r){if(!e){if(t instanceof h)return t;e=t}var o={},n=e instanceof Function;function i(t){var i=e[t];!i&&n&&(i=2==e.length?function(r){e(t,r)}:e),o[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+m(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),o}(a,n,s),o.domBuilder=r.domBuilder||n,p&&(l[""]=c.HTML),l.xml=l.xml||c.XML;var g=r.normalizeLineEndings||d;return e&&"string"==typeof e?o.parse(g(e),l,f):o.errorHandler.error("invalid doc source"),n.doc},h.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,o){var n=this.doc,i=n.createElementNS(e,r||t),a=o.length;y(this,i),this.currentElement=i,this.locator&&f(this.locator,i);for(var s=0;s<a;s++){e=o.getURI(s);var c=o.getValue(s),l=(r=o.getQName(s),n.createAttributeNS(e,r));this.locator&&f(o.getLocator(s),l),l.value=l.nodeValue=c,i.setAttributeNode(l)}},endElement:function(e,t,r){var o=this.currentElement;o.tagName,this.currentElement=o.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&f(this.locator,r),y(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=g.apply(this,arguments)){if(this.cdata)var o=this.doc.createCDATASection(e);else o=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(o):/^\s*$/.test(e)&&this.doc.appendChild(o),this.locator&&f(this.locator,o)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=g.apply(this,arguments);var o=this.doc.createComment(e);this.locator&&f(this.locator,o),y(this,o)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var o=this.doc.implementation;if(o&&o.createDocumentType){var n=o.createDocumentType(e,t,r);this.locator&&f(this.locator,n),y(this,n),this.doc.doctype=n}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new l(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){h.prototype[e]=function(){return null}})),t.__DOMHandler=h,t.normalizeLineEndings=d,t.DOMParser=p},"./node_modules/@xmldom/xmldom/lib/dom.js":
- /*!************************************************!*\
- !*** ./node_modules/@xmldom/xmldom/lib/dom.js ***!
- \************************************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js"),n=o.find,i=o.NAMESPACE;function a(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function c(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(s,{}))}function l(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function u(e,t){var r=e.prototype;if(!(r instanceof t)){function o(){}o.prototype=t.prototype,l(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),r.constructor=e)}var d={},p=d.ELEMENT_NODE=1,h=d.ATTRIBUTE_NODE=2,f=d.TEXT_NODE=3,m=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,y=d.ENTITY_NODE=6,v=d.PROCESSING_INSTRUCTION_NODE=7,b=d.COMMENT_NODE=8,C=d.DOCUMENT_NODE=9,w=d.DOCUMENT_TYPE_NODE=10,k=d.DOCUMENT_FRAGMENT_NODE=11,S=d.NOTATION_NODE=12,x={},A={};x.INDEX_SIZE_ERR=(A[1]="Index size error",1),x.DOMSTRING_SIZE_ERR=(A[2]="DOMString size error",2);var T=x.HIERARCHY_REQUEST_ERR=(A[3]="Hierarchy request error",3);x.WRONG_DOCUMENT_ERR=(A[4]="Wrong document",4),x.INVALID_CHARACTER_ERR=(A[5]="Invalid character",5),x.NO_DATA_ALLOWED_ERR=(A[6]="No data allowed",6),x.NO_MODIFICATION_ALLOWED_ERR=(A[7]="No modification allowed",7);var E=x.NOT_FOUND_ERR=(A[8]="Not found",8);x.NOT_SUPPORTED_ERR=(A[9]="Not supported",9);var R=x.INUSE_ATTRIBUTE_ERR=(A[10]="Attribute in use",10);function I(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,A[e]),this.message=A[e],Error.captureStackTrace&&Error.captureStackTrace(this,I);return r.code=e,t&&(this.message=this.message+": "+t),r}function B(){}function O(e,t){this._node=e,this._refresh=t,N(this)}function N(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var r=e._refresh(e._node);if(be(e,"length",r.length),!e.$$length||r.length<e.$$length)for(var o=r.length;o in e;o++)Object.prototype.hasOwnProperty.call(e,o)&&delete e[o];l(r,e),e._inc=t}}function _(){}function D(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function P(e,t,r,o){if(o?t[D(t,o)]=r:t[t.length++]=r,e){r.ownerElement=e;var n=e.ownerDocument;n&&(o&&z(n,e,o),function(e,t,r){e&&e._inc++,r.namespaceURI===i.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(n,e,r))}}function U(e,t,r){var o=D(t,r);if(!(o>=0))throw new I(E,new Error(e.tagName+"@"+r));for(var n=t.length-1;o<n;)t[o]=t[++o];if(t.length=n,e){var i=e.ownerDocument;i&&(z(i,e,r),r.ownerElement=null)}}function M(){}function L(){}function j(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function H(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(H(e,t))return!0}while(e=e.nextSibling)}function q(){this.ownerDocument=this}function z(e,t,r,o){e&&e._inc++,r.namespaceURI===i.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function F(e,t,r){if(e&&e._inc){e._inc++;var o=t.childNodes;if(r)o[o.length++]=r;else{for(var n=t.firstChild,i=0;n;)o[i++]=n,n=n.nextSibling;o.length=i,delete o[o.length]}}}function V(e,t){var r=t.previousSibling,o=t.nextSibling;return r?r.nextSibling=o:e.firstChild=o,o?o.previousSibling=r:e.lastChild=r,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,F(e.ownerDocument,e),t}function K(e){return e&&e.nodeType===L.DOCUMENT_TYPE_NODE}function X(e){return e&&e.nodeType===L.ELEMENT_NODE}function W(e){return e&&e.nodeType===L.TEXT_NODE}function G(e,t){var r=e.childNodes||[];if(n(r,X)||K(t))return!1;var o=n(r,K);return!(t&&o&&r.indexOf(o)>r.indexOf(t))}function Y(e,t){var r=e.childNodes||[];if(n(r,(function(e){return X(e)&&e!==t})))return!1;var o=n(r,K);return!(t&&o&&r.indexOf(o)>r.indexOf(t))}function J(e,t,r){if(!function(e){return e&&(e.nodeType===L.DOCUMENT_NODE||e.nodeType===L.DOCUMENT_FRAGMENT_NODE||e.nodeType===L.ELEMENT_NODE)}(e))throw new I(T,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new I(E,"child not in parent");if(!function(e){return e&&(X(e)||W(e)||K(e)||e.nodeType===L.DOCUMENT_FRAGMENT_NODE||e.nodeType===L.COMMENT_NODE||e.nodeType===L.PROCESSING_INSTRUCTION_NODE)}(t)||K(t)&&e.nodeType!==L.DOCUMENT_NODE)throw new I(T,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Q(e,t,r){var o=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===L.DOCUMENT_FRAGMENT_NODE){var a=i.filter(X);if(a.length>1||n(i,W))throw new I(T,"More than one element or text in fragment");if(1===a.length&&!G(e,r))throw new I(T,"Element in fragment can not be inserted before doctype")}if(X(t)&&!G(e,r))throw new I(T,"Only one element can be added and only after doctype");if(K(t)){if(n(o,K))throw new I(T,"Only one doctype is allowed");var s=n(o,X);if(r&&o.indexOf(s)<o.indexOf(r))throw new I(T,"Doctype can only be inserted before an element");if(!r&&s)throw new I(T,"Doctype can not be appended since element is present")}}function Z(e,t,r){var o=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===L.DOCUMENT_FRAGMENT_NODE){var a=i.filter(X);if(a.length>1||n(i,W))throw new I(T,"More than one element or text in fragment");if(1===a.length&&!Y(e,r))throw new I(T,"Element in fragment can not be inserted before doctype")}if(X(t)&&!Y(e,r))throw new I(T,"Only one element can be added and only after doctype");if(K(t)){function c(e){return K(e)&&e!==r}if(n(o,c))throw new I(T,"Only one doctype is allowed");var s=n(o,X);if(r&&o.indexOf(s)<o.indexOf(r))throw new I(T,"Doctype can only be inserted before an element")}}function $(e,t,r,o){J(e,t,r),e.nodeType===L.DOCUMENT_NODE&&(o||Q)(e,t,r);var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===k){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var s=r?r.previousSibling:e.lastChild;i.previousSibling=s,a.nextSibling=r,s?s.nextSibling=i:e.firstChild=i,null==r?e.lastChild=a:r.previousSibling=a;do{i.parentNode=e}while(i!==a&&(i=i.nextSibling));return F(e.ownerDocument||e,e),t.nodeType==k&&(t.firstChild=t.lastChild=null),t}function ee(){this._nsMap={}}function te(){}function re(){}function oe(){}function ne(){}function ie(){}function ae(){}function se(){}function ce(){}function le(){}function ue(){}function de(){}function pe(){}function he(e,t){var r=[],o=9==this.nodeType&&this.documentElement||this,n=o.prefix,i=o.namespaceURI;if(i&&null==n&&null==(n=o.lookupPrefix(i)))var a=[{namespace:i,prefix:null}];return ge(this,r,e,t,a),r.join("")}function fe(e,t,r){var o=e.prefix||"",n=e.namespaceURI;if(!n)return!1;if("xml"===o&&n===i.XML||n===i.XMLNS)return!1;for(var a=r.length;a--;){var s=r[a];if(s.prefix===o)return s.namespace!==n}return!0}function me(e,t,r){e.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,j),'"')}function ge(e,t,r,o,n){if(n||(n=[]),o){if(!(e=o(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var a=e.attributes,s=a.length,c=e.firstChild,l=e.tagName,u=l;if(!(r=i.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var d,y=0;y<a.length;y++)if("xmlns"===a.item(y).name){d=a.item(y).value;break}if(!d)for(var S=n.length-1;S>=0;S--)if(""===(x=n[S]).prefix&&x.namespace===e.namespaceURI){d=x.namespace;break}if(d!==e.namespaceURI)for(S=n.length-1;S>=0;S--){var x;if((x=n[S]).namespace===e.namespaceURI){x.prefix&&(u=x.prefix+":"+l);break}}}t.push("<",u);for(var A=0;A<s;A++)"xmlns"==(T=a.item(A)).prefix?n.push({prefix:T.localName,namespace:T.value}):"xmlns"==T.nodeName&&n.push({prefix:"",namespace:T.value});for(A=0;A<s;A++){var T,E,R;fe(T=a.item(A),0,n)&&(me(t,(E=T.prefix||"")?"xmlns:"+E:"xmlns",R=T.namespaceURI),n.push({prefix:E,namespace:R})),ge(T,t,r,o,n)}if(l===u&&fe(e,0,n)&&(me(t,(E=e.prefix||"")?"xmlns:"+E:"xmlns",R=e.namespaceURI),n.push({prefix:E,namespace:R})),c||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(l)){if(t.push(">"),r&&/^script$/i.test(l))for(;c;)c.data?t.push(c.data):ge(c,t,r,o,n.slice()),c=c.nextSibling;else for(;c;)ge(c,t,r,o,n.slice()),c=c.nextSibling;t.push("</",u,">")}else t.push("/>");return;case C:case k:for(c=e.firstChild;c;)ge(c,t,r,o,n.slice()),c=c.nextSibling;return;case h:return me(t,e.name,e.value);case f:return t.push(e.data.replace(/[<&>]/g,j));case m:return t.push("<![CDATA[",e.data,"]]>");case b:return t.push("\x3c!--",e.data,"--\x3e");case w:var I=e.publicId,B=e.systemId;if(t.push("<!DOCTYPE ",e.name),I)t.push(" PUBLIC ",I),B&&"."!=B&&t.push(" ",B),t.push(">");else if(B&&"."!=B)t.push(" SYSTEM ",B,">");else{var O=e.internalSubset;O&&t.push(" [",O,"]"),t.push(">")}return;case v:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ye(e,t,r){var o;switch(t.nodeType){case p:(o=t.cloneNode(!1)).ownerDocument=e;case k:break;case h:r=!0}if(o||(o=t.cloneNode(!1)),o.ownerDocument=e,o.parentNode=null,r)for(var n=t.firstChild;n;)o.appendChild(ye(e,n,r)),n=n.nextSibling;return o}function ve(e,t,r){var o=new t.constructor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=t[n];"object"!=_typeof2(i)&&i!=o[n]&&(o[n]=i)}switch(t.childNodes&&(o.childNodes=new B),o.ownerDocument=e,o.nodeType){case p:var a=t.attributes,s=o.attributes=new _,c=a.length;s._ownerElement=o;for(var l=0;l<c;l++)o.setAttributeNode(ve(e,a.item(l),!0));break;case h:r=!0}if(r)for(var u=t.firstChild;u;)o.appendChild(ve(e,u,r)),u=u.nextSibling;return o}function be(e,t,r){e[t]=r}x.INVALID_STATE_ERR=(A[11]="Invalid state",11),x.SYNTAX_ERR=(A[12]="Syntax error",12),x.INVALID_MODIFICATION_ERR=(A[13]="Invalid modification",13),x.NAMESPACE_ERR=(A[14]="Invalid namespace",14),x.INVALID_ACCESS_ERR=(A[15]="Invalid access",15),I.prototype=Error.prototype,l(x,I),B.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var r=[],o=0;o<this.length;o++)ge(this[o],r,e,t);return r.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},O.prototype.item=function(e){return N(this),this[e]||null},u(O,B),_.prototype={length:0,item:B.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new I(R);var r=this.getNamedItem(e.nodeName);return P(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new I(R);return t=this.getNamedItemNS(e.namespaceURI,e.localName),P(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return U(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return U(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var o=this[r];if(o.localName==t&&o.namespaceURI==e)return o}return null}},M.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var o=new q;if(o.implementation=this,o.childNodes=new B,o.doctype=r||null,r&&o.appendChild(r),t){var n=o.createElementNS(e,t);o.appendChild(n)}return o},createDocumentType:function(e,t,r){var o=new ae;return o.name=e,o.nodeName=e,o.publicId=t||"",o.systemId=r||"",o}},L.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 $(this,e,t)},replaceChild:function(e,t){$(this,e,t,Z),t&&this.removeChild(t)},removeChild:function(e){return V(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return ve(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==f&&e.nodeType==f?(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 r=t._nsMap;if(r)for(var o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&r[o]===e)return o;t=t.nodeType==h?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];t=t.nodeType==h?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},l(d,L),l(d,L.prototype),q.prototype={nodeName:"#document",nodeType:C,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==k){for(var r=e.firstChild;r;){var o=r.nextSibling;this.insertBefore(r,t),r=o}return e}return $(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===p&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),V(this,e)},replaceChild:function(e,t){$(this,e,t,Z),e.ownerDocument=this,t&&this.removeChild(t),X(e)&&(this.documentElement=e)},importNode:function(e,t){return ye(this,e,t)},getElementById:function(e){var t=null;return H(this.documentElement,(function(r){if(r.nodeType==p&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=c(e);return new O(this,(function(r){var o=[];return t.length>0&&H(r.documentElement,(function(n){if(n!==r&&n.nodeType===p){var i=n.getAttribute("class");if(i){var a=e===i;if(!a){var s=c(i);a=t.every((l=s,function(e){return l&&-1!==l.indexOf(e)}))}a&&o.push(n)}}var l})),o}))},createElement:function(e){var t=new ee;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new B,(t.attributes=new _)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new B,e},createTextNode:function(e){var t=new oe;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new ie;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new de;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new te;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new le;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new ee,o=t.split(":"),n=r.attributes=new _;return r.childNodes=new B,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==o.length?(r.prefix=o[0],r.localName=o[1]):r.localName=t,n._ownerElement=r,r},createAttributeNS:function(e,t){var r=new te,o=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==o.length?(r.prefix=o[0],r.localName=o[1]):r.localName=t,r}},u(q,L),ee.prototype={nodeType:p,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 r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===k?this.insertBefore(e,null):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,F(e.ownerDocument,e,t),t}(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 r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var o=this.ownerDocument.createAttributeNS(e,t);o.value=o.nodeValue=""+r,this.setAttributeNode(o)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new O(this,(function(t){var r=[];return H(t,(function(o){o===t||o.nodeType!=p||"*"!==e&&o.tagName!=e||r.push(o)})),r}))},getElementsByTagNameNS:function(e,t){return new O(this,(function(r){var o=[];return H(r,(function(n){n===r||n.nodeType!==p||"*"!==e&&n.namespaceURI!==e||"*"!==t&&n.localName!=t||o.push(n)})),o}))}},q.prototype.getElementsByTagName=ee.prototype.getElementsByTagName,q.prototype.getElementsByTagNameNS=ee.prototype.getElementsByTagNameNS,u(ee,L),te.prototype.nodeType=h,u(te,L),re.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(A[T])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},u(re,L),oe.prototype={nodeName:"#text",nodeType:f,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var o=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(o,this.nextSibling),o}},u(oe,re),ne.prototype={nodeName:"#comment",nodeType:b},u(ne,re),ie.prototype={nodeName:"#cdata-section",nodeType:m},u(ie,re),ae.prototype.nodeType=w,u(ae,L),se.prototype.nodeType=S,u(se,L),ce.prototype.nodeType=y,u(ce,L),le.prototype.nodeType=g,u(le,L),ue.prototype.nodeName="#document-fragment",ue.prototype.nodeType=k,u(ue,L),de.prototype.nodeType=v,u(de,L),pe.prototype.serializeToString=function(e,t,r){return he.call(e,t,r)},L.prototype.toString=he;try{if(Object.defineProperty){function we(e){switch(e.nodeType){case p:case k:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(we(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(O.prototype,"length",{get:function(){return N(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){return we(this)},set:function(e){switch(this.nodeType){case p:case k: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}}}),be=function(e,t,r){e["$$"+t]=r}}}catch(Ce){}t.DocumentType=ae,t.DOMException=I,t.DOMImplementation=M,t.Element=ee,t.Node=L,t.NodeList=B,t.XMLSerializer=pe},"./node_modules/@xmldom/xmldom/lib/entities.js":
- /*!*****************************************************!*\
- !*** ./node_modules/@xmldom/xmldom/lib/entities.js ***!
- \*****************************************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js").freeze;t.XML_ENTITIES=o({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=o({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"",zwnj:""}),t.entityMap=t.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":
- /*!**************************************************!*\
- !*** ./node_modules/@xmldom/xmldom/lib/index.js ***!
- \**************************************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./dom */"./node_modules/@xmldom/xmldom/lib/dom.js");t.DOMImplementation=o.DOMImplementation,t.XMLSerializer=o.XMLSerializer,t.DOMParser=r(/*! ./dom-parser */"./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":
- /*!************************************************!*\
- !*** ./node_modules/@xmldom/xmldom/lib/sax.js ***!
- \************************************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,n=/[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]/,i=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+n.source+i.source+"*(?::"+n.source+i.source+"*)?$");function s(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,s)}function c(){}function l(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function u(e,t,r,n,i,a){function s(e,t,o){r.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),r.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,i),o)}for(var c,l=++t,u=0;;){var d=e.charAt(l);switch(d){case"=":if(1===u)c=e.slice(t,l),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(a.warning('attribute value must after "="'),c=e.slice(t,l)),t=l+1,!((l=e.indexOf(d,t))>0))throw new Error("attribute value no end '"+d+"' match");s(c,p=e.slice(t,l),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(c,p=e.slice(t,l),t),a.warning('attribute "'+c+'" missed start quot('+d+")!!"),t=l+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,l));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:break;case 2:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,l)),l;case">":switch(u){case 0:r.setTagName(e.slice(t,l));case 5:case 6:case 7:break;case 4:case 1:"/"===(p=e.slice(t,l)).slice(-1)&&(r.closed=!0,p=p.slice(0,-1));case 2:2===u&&(p=c),4==u?(a.warning('attribute "'+p+'" missed quot(")!'),s(c,p,t)):(o.isHTML(n[""])&&p.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+p+'" missed value!! "'+p+'" instead!!'),s(p,p,t));break;case 3:throw new Error("attribute value missed!!")}return l;case"":d=" ";default:if(d<=" ")switch(u){case 0:r.setTagName(e.slice(t,l)),u=6;break;case 1:c=e.slice(t,l),u=2;break;case 4:var p=e.slice(t,l);a.warning('attribute "'+p+'" missed quot(")!!'),s(c,p,t);case 5:u=6}else switch(u){case 2:r.tagName,o.isHTML(n[""])&&c.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+c+'" missed value!! "'+c+'" instead2!!'),s(c,c,t),t=l,u=1;break;case 5:a.warning('attribute space is required"'+c+'"!!');case 6:u=1,t=l;break;case 3:u=4,t=l;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}l++}}function d(e,t,r){for(var n=e.tagName,i=null,a=e.length;a--;){var s=e[a],c=s.qName,l=s.value;if((h=c.indexOf(":"))>0)var u=s.prefix=c.slice(0,h),d=c.slice(h+1),p="xmlns"===u&&d;else d=c,u=null,p="xmlns"===c&&"";s.localName=d,!1!==p&&(null==i&&(i={},f(r,r={})),r[p]=i[p]=l,s.uri=o.XMLNS,t.startPrefixMapping(p,l))}for(a=e.length;a--;)(u=(s=e[a]).prefix)&&("xml"===u&&(s.uri=o.XML),"xmlns"!==u&&(s.uri=r[u||""]));var h;(h=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,h),d=e.localName=n.slice(h+1)):(u=null,d=e.localName=n);var m=e.uri=r[u||""];if(t.startElement(m,d,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=i,!0;if(t.endElement(m,d,n),i)for(u in i)Object.prototype.hasOwnProperty.call(i,u)&&t.endPrefixMapping(u)}function p(e,t,r,o,n){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),a=e.substring(t+1,i);if(/[&<]/.test(a))return/^script$/i.test(r)?(n.characters(a,0,a.length),i):(a=a.replace(/&#?\w+;/g,o),n.characters(a,0,a.length),i)}return t+1}function h(e,t,r,o){var n=o[r];return null==n&&((n=e.lastIndexOf("</"+r+">"))<t&&(n=e.lastIndexOf("</"+r)),o[r]=n),n<t}function f(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function m(e,t,r,o){if("-"===e.charAt(t+2))return"-"===e.charAt(t+3)?(n=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,n-t-4),n+3):(o.error("Unclosed comment"),-1):-1;if("CDATA["==e.substr(t+3,6)){var n=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,n-t-9),r.endCDATA(),n+3}var i=function(e,t){var r,o=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=t,n.exec(e);r=n.exec(e);)if(o.push(r),r[1])return o}(e,t),a=i.length;if(a>1&&/!doctype/i.test(i[0][0])){var s=i[1][0],c=!1,l=!1;a>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],l=a>4&&i[4][0]):/^system$/i.test(i[2][0])&&(l=i[3][0]));var u=i[a-1];return r.startDTD(s,c,l),r.endDTD(),u.index+u[0].length}return-1}function g(e,t,r){var o=e.indexOf("?>",t);if(o){var n=e.substring(t,o).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return n?(n[0].length,r.processingInstruction(n[1],n[2]),o+2):-1}return-1}function y(){this.attributeNames={}}s.prototype=new Error,s.prototype.name=s.name,c.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),f(t,t={}),function(e,t,r,n,i){function a(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function c(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(r,t)?r[t]:"#"===t.charAt(0)?a(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function f(t){if(t>A){var r=e.substring(A,t).replace(/&#?\w+;/g,c);k&&v(A),n.characters(r,0,t-A),A=t}}function v(t,r){for(;t>=C&&(r=w.exec(e));)b=r.index,C=b+r[0].length,k.lineNumber++;k.columnNumber=t-b+1}for(var b=0,C=0,w=/.*(?:\r\n?|\n)|.*$/g,k=n.locator,S=[{currentNSMap:t}],x={},A=0;;){try{var T=e.indexOf("<",A);if(T<0){if(!e.substr(A).match(/^\s*$/)){var E=n.doc,R=E.createTextNode(e.substr(A));E.appendChild(R),n.currentElement=R}return}switch(T>A&&f(T),e.charAt(T+1)){case"/":var I=e.indexOf(">",T+3),B=e.substring(T+2,I).replace(/[ \t\n\r]+$/g,""),O=S.pop();I<0?(B=e.substring(T+2).replace(/[\s<].*/,""),i.error("end tag name: "+B+" is not complete:"+O.tagName),I=T+1+B.length):B.match(/\s</)&&(B=B.replace(/[\s<].*/,""),i.error("end tag name: "+B+" maybe not complete"),I=T+1+B.length);var N=O.localNSMap,_=O.tagName==B;if(_||O.tagName&&O.tagName.toLowerCase()==B.toLowerCase()){if(n.endElement(O.uri,O.localName,B),N)for(var D in N)Object.prototype.hasOwnProperty.call(N,D)&&n.endPrefixMapping(D);_||i.fatalError("end tag name: "+B+" is not match the current start tagName:"+O.tagName)}else S.push(O);I++;break;case"?":k&&v(T),I=g(e,T,n);break;case"!":k&&v(T),I=m(e,T,n,i);break;default:k&&v(T);var P=new y,U=S[S.length-1].currentNSMap,M=(I=u(e,T,P,U,c,i),P.length);if(!P.closed&&h(e,I,P.tagName,x)&&(P.closed=!0,r.nbsp||i.warning("unclosed xml attribute")),k&&M){for(var L=l(k,{}),j=0;j<M;j++){var H=P[j];v(H.offset),H.locator=l(k,{})}n.locator=L,d(P,n,U)&&S.push(P),n.locator=k}else d(P,n,U)&&S.push(P);o.isHTML(P.uri)&&!P.closed?I=p(e,I,P.tagName,c,n):I++}}catch(q){if(q instanceof s)throw q;i.error("element parse error: "+q),I=-1}I>A?A=I:f(Math.max(T,A)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},y.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},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=c,t.ParseError=s},"./node_modules/process/browser.js":
- /*!*****************************************!*\
- !*** ./node_modules/process/browser.js ***!
- \*****************************************/
- /*! no static exports found */function(e,t){var r,o,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(e){o=a}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&h())}function h(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d<t;)c&&c[d].run();d=-1,t=l.length}c=null,u=!1,function(e){if(o===clearTimeout)return clearTimeout(e);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(e);try{o(e)}catch(t){try{return o.call(null,e)}catch(t){return o.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||u||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},"./node_modules/webpack/buildin/amd-options.js":
- /*!****************************************!*\
- !*** (webpack)/buildin/amd-options.js ***!
- \****************************************/
- /*! no static exports found */function(e,t){(function(t){e.exports=t}).call(this,{})},"./node_modules/webpack/buildin/global.js":
- /*!***********************************!*\
- !*** (webpack)/buildin/global.js ***!
- \***********************************/
- /*! no static exports found */function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(o){"object"===("undefined"==typeof window?"undefined":_typeof2(window))&&(r=window)}e.exports=r},"./node_modules/webpack/buildin/module.js":
- /*!***********************************!*\
- !*** (webpack)/buildin/module.js ***!
- \***********************************/
- /*! no static exports found */function(e,t){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}},"./package.json":
- /*!**********************!*\
- !*** ./package.json ***!
- \**********************/
- /*! exports provided: name, version, description, main, types, scripts, repository, keywords, author, license, bugs, homepage, dependencies, devDependencies, default */function(e){e.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.4.21","description":"JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)","main":"dist/cos-js-sdk-v5.js","types":"index.d.ts","scripts":{"prettier":"prettier --write src demo/demo.js test/test.js server/sts.js index.d.ts","server":"node server/sts.js","dev":"cross-env NODE_ENV=development webpack -w --mode=development","build":"cross-env NODE_ENV=production webpack --mode=production","cos-auth.min.js":"uglifyjs ./demo/common/cos-auth.js -o ./demo/common/cos-auth.min.js -c -m","test":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/tencentyun/cos-js-sdk-v5.git"},"keywords":[],"author":"carsonxu","license":"ISC","bugs":{"url":"https://github.com/tencentyun/cos-js-sdk-v5/issues"},"homepage":"https://github.com/tencentyun/cos-js-sdk-v5#readme","dependencies":{"@xmldom/xmldom":"^0.8.6"},"devDependencies":{"@babel/core":"7.17.9","@babel/plugin-transform-runtime":"7.18.10","@babel/preset-env":"7.16.11","babel-loader":"8.2.5","body-parser":"^1.18.3","cross-env":"^5.2.0","express":"^4.16.4","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","prettier":"^3.0.1","qcloud-cos-sts":"^3.0.2","request":"^2.87.0","terser-webpack-plugin":"4.2.3","uglifyjs":"^2.4.11","webpack":"4.46.0","webpack-cli":"4.10.0"}}')},"./src/advance.js":
- /*!************************!*\
- !*** ./src/advance.js ***!
- \************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n=r(/*! ./session */"./src/session.js"),i=r(/*! ./async */"./src/async.js"),a=r(/*! ./event */"./src/event.js").EventProxy,s=r(/*! ./util */"./src/util.js"),c=r(/*! ./tracker */"./src/tracker.js");function l(e,t){var r=e.TaskId,o=e.Bucket,c=e.Region,l=e.Key,p=e.StorageClass,h=this,f={},m=e.FileSize,g=e.SliceSize,y=Math.ceil(m/g),v=0,b=s.throttleOnProgress.call(h,m,e.onHashProgress),C=function(t,r){var o=t.length;return 0===o?r(null,!0):o>y||o>1&&Math.max(t[0].Size,t[1].Size)!==g?r(null,!1):void function n(i){if(i<o){var a=t[i];!function(t,r){var o=g*(t-1),n=Math.min(o+g,m),i=n-o;f[t]?r(null,{PartNumber:t,ETag:f[t],Size:i}):s.fileSlice(e.Body,o,n,!1,(function(e){s.getFileMd5(e,(function(e,o){if(e)return r(s.error(e));var n='"'+o+'"';f[t]=n,b({loaded:v+=i,total:m}),r(null,{PartNumber:t,ETag:n,Size:i})}))}))}(a.PartNumber,(function(e,t){t&&t.ETag===a.ETag&&t.Size===a.Size?n(i+1):r(null,!1)}))}else r(null,!0)}(0)},w=new a;w.on("error",(function(e){if(h._isRunningTask(r))return t(e)})),w.on("upload_id_available",(function(e){var r={},o=[];s.each(e.PartList,(function(e){r[e.PartNumber]=e}));for(var n=1;n<=y;n++){var i=r[n];i?(i.PartNumber=n,i.Uploaded=!0):i={PartNumber:n,ETag:null,Uploaded:!1},o.push(i)}e.PartList=o,t(null,e)})),w.on("no_available_upload_id",(function(){if(h._isRunningTask(r)){var n=s.extend({Bucket:o,Region:c,Key:l,Query:s.clone(e.Query),StorageClass:p,Body:e.Body,calledBySdk:"sliceUploadFile",tracker:e.tracker},e),i=s.clone(e.Headers);delete i["x-cos-mime-limit"],n.Headers=i,h.multipartInit(n,(function(e,o){if(h._isRunningTask(r)){if(e)return w.emit("error",e);var n=o.UploadId;if(!n)return t(s.error(new Error("no such upload id")));w.emit("upload_id_available",{UploadId:n,PartList:[]})}}))}})),w.on("has_and_check_upload_id",(function(t){t=t.reverse(),i.eachLimit(t,1,(function(t,i){h._isRunningTask(r)&&(n.using[t]?i():d.call(h,{Bucket:o,Region:c,Key:l,UploadId:t,tracker:e.tracker},(function(e,o){if(h._isRunningTask(r)){if(e)return n.removeUsing(t),w.emit("error",e);var a=o.PartList;a.forEach((function(e){e.PartNumber*=1,e.Size*=1,e.ETag=e.ETag||""})),C(a,(function(e,o){if(h._isRunningTask(r))return e?w.emit("error",e):void(o?i({UploadId:t,PartList:a}):i())}))}})))}),(function(e){h._isRunningTask(r)&&(b(null,!0),e&&e.UploadId?w.emit("upload_id_available",e):w.emit("no_available_upload_id"))}))})),w.on("seek_local_avail_upload_id",(function(t){var i=n.getFileId(e.Body,e.ChunkSize,o,l),a=n.getUploadIdList.call(h,i);i&&a?function i(u){if(u>=a.length)w.emit("has_and_check_upload_id",t);else{var p=a[u];if(!s.isInArray(t,p))return n.removeUploadId.call(h,p),void i(u+1);n.using[p]?i(u+1):d.call(h,{Bucket:o,Region:c,Key:l,UploadId:p,tracker:e.tracker},(function(e,t){h._isRunningTask(r)&&(e?(n.removeUploadId.call(h,p),i(u+1)):w.emit("upload_id_available",{UploadId:p,PartList:t.PartList}))}))}}(0):w.emit("has_and_check_upload_id",t)})),w.on("get_remote_upload_id_list",(function(){u.call(h,{Bucket:o,Region:c,Key:l,tracker:e.tracker},(function(t,i){if(h._isRunningTask(r)){if(t)return w.emit("error",t);var a=s.filter(i.UploadList,(function(e){return e.Key===l&&(!p||e.StorageClass.toUpperCase()===p.toUpperCase())})).reverse().map((function(e){return e.UploadId||e.UploadID}));if(a.length)w.emit("seek_local_avail_upload_id",a);else{var c,u=n.getFileId(e.Body,e.ChunkSize,o,l);u&&(c=n.getUploadIdList.call(h,u))&&s.each(c,(function(e){n.removeUploadId.call(h,e)})),w.emit("no_available_upload_id")}}}))})),w.emit("get_remote_upload_id_list")}function u(e,t){var r=this,o=[],n={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartList(n,(function(r,i){if(r)return t(r);o.push.apply(o,i.Upload||[]),"true"===i.IsTruncated?(n.KeyMarker=i.NextKeyMarker,n.UploadIdMarker=i.NextUploadIdMarker,e()):t(null,{UploadList:o})}))}()}function d(e,t){var r=this,o=[],n={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartListPart(n,(function(r,i){if(r)return t(r);o.push.apply(o,i.Part||[]),"true"===i.IsTruncated?(n.PartNumberMarker=i.NextPartNumberMarker,e()):t(null,{PartList:o})}))}()}function p(e,t){var r=this,o=e.TaskId,n=e.Bucket,a=e.Region,c=e.Key,l=e.UploadData,u=e.FileSize,d=e.SliceSize,p=Math.min(e.AsyncLimit||r.options.ChunkParallelLimit||1,256),f=e.Body,m=Math.ceil(u/d),g=0,y=e.ServerSideEncryption,v=e.Headers,b=s.filter(l.PartList,(function(e){return e.Uploaded&&(g+=e.PartNumber>=m&&u%d||d),!e.Uploaded})),C=e.onProgress;i.eachLimit(b,p,(function(t,i){if(r._isRunningTask(o)){var s=t.PartNumber,p=Math.min(u,t.PartNumber*d)-(t.PartNumber-1)*d,m=0;h.call(r,{TaskId:o,Bucket:n,Region:a,Key:c,SliceSize:d,FileSize:u,PartNumber:s,ServerSideEncryption:y,Body:f,UploadData:l,Headers:v,onProgress:function(e){g+=e.loaded-m,m=e.loaded,C({loaded:g,total:u})},tracker:e.tracker},(function(e,n){r._isRunningTask(o)&&(e||n.ETag||(e='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),e?g-=m:(g+=p-m,t.ETag=n.ETag),C({loaded:g,total:u}),i(e||null,n))}))}}),(function(e){if(r._isRunningTask(o))return e?t(e):void t(null,{UploadId:l.UploadId,SliceList:l.PartList})}))}function h(e,t){var r=this,o=e.TaskId,n=e.Bucket,a=e.Region,c=e.Key,l=e.FileSize,u=e.Body,d=1*e.PartNumber,p=e.SliceSize,h=e.ServerSideEncryption,f=e.UploadData,m=e.Headers||{},g=r.options.ChunkRetryTimes+1,y=p*(d-1),v=p,b=y+p;b>l&&(v=(b=l)-y);var C=["x-cos-traffic-limit","x-cos-mime-limit"],w={};s.each(m,(function(e,t){C.indexOf(t)>-1&&(w[t]=e)}));var k=f.PartList[d-1];i.retry(g,(function(t){r._isRunningTask(o)&&s.fileSlice(u,y,b,!0,(function(i){r.multipartUpload({TaskId:o,Bucket:n,Region:a,Key:c,ContentLength:v,PartNumber:d,UploadId:f.UploadId,ServerSideEncryption:h,Body:i,Headers:w,onProgress:e.onProgress,calledBySdk:"sliceUploadFile",tracker:e.tracker},(function(e,n){if(r._isRunningTask(o))return e?t(e):(k.Uploaded=!0,t(null,n))}))}))}),(function(e,n){if(r._isRunningTask(o))return t(e,n)}))}function f(e,t){var r=e.Bucket,o=e.Region,n=e.Key,a=e.UploadId,s=e.SliceList,c=this,l=this.options.ChunkRetryTimes+1,u=e.Headers,d=s.map((function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));i.retry(l,(function(t){c.multipartComplete({Bucket:r,Region:o,Key:n,UploadId:a,Parts:d,Headers:u,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)}),(function(e,r){t(e,r)}))}function m(e,t){var r=e.Bucket,o=e.Region,n=e.Key,a=e.AbortArray,s=e.AsyncLimit||1,c=this,l=0,u=new Array(a.length);i.eachLimit(a,s,(function(t,i){var a=l;if(n&&n!==t.Key)return u[a]={error:{KeyNotMatch:!0}},void i(null);var s=t.UploadId||t.UploadID;c.multipartAbort({Bucket:r,Region:o,Key:t.Key,Headers:e.Headers,UploadId:s},(function(e){var n={Bucket:r,Region:o,Key:t.Key,UploadId:s};u[a]={error:e,task:n},i(null)})),l++}),(function(e){if(e)return t(e);for(var r=[],o=[],n=0,i=u.length;n<i;n++){var a=u[n];a.task&&(a.error?o.push(a.task):r.push(a.task))}return t(null,{successList:r,errorList:o})}))}function g(e,t){var r=e.TaskId,o=e.Bucket,n=e.Region,a=e.Key,s=e.CopySource,c=e.UploadId,l=1*e.PartNumber,u=e.CopySourceRange,d=this.options.ChunkRetryTimes+1,p=this;i.retry(d,(function(e){p.uploadPartCopy({TaskId:r,Bucket:o,Region:n,Key:a,CopySource:s,UploadId:c,PartNumber:l,CopySourceRange:u},(function(t,r){e(t||null,r)}))}),(function(e,r){return t(e,r)}))}var y={sliceUploadFile:function(e,t){var r,o,i=this,c=new a,u=e.TaskId,d=e.Bucket,h=e.Region,m=e.Key,g=e.Body,y=e.ChunkSize||e.SliceSize||i.options.ChunkSize,v=e.AsyncLimit,b=e.StorageClass,C=e.ServerSideEncryption,w=e.onHashProgress,k=e.tracker;k&&k.setParams({chunkSize:y}),c.on("error",(function(r){if(i._isRunningTask(u))return r.UploadId=e.UploadData.UploadId||"",t(r)})),c.on("upload_complete",(function(r){var o=s.extend({UploadId:e.UploadData.UploadId||""},r);t(null,o)})),c.on("upload_slice_complete",(function(t){var a={};s.each(e.Headers,(function(e,t){var r=t.toLowerCase();0!==r.indexOf("x-cos-meta-")&&"pic-operations"!==r||(a[t]=e)})),f.call(i,{Bucket:d,Region:h,Key:m,UploadId:t.UploadId,SliceList:t.SliceList,Headers:a,tracker:k},(function(e,a){if(i._isRunningTask(u)){if(n.removeUsing(t.UploadId),e)return o(null,!0),c.emit("error",e);n.removeUploadId.call(i,t.UploadId),o({loaded:r,total:r},!0),c.emit("upload_complete",a)}}))})),c.on("get_upload_data_finish",(function(t){var a=n.getFileId(g,e.ChunkSize,d,m);a&&n.saveUploadId.call(i,a,t.UploadId,i.options.UploadIdCacheLimit),n.setUsing(t.UploadId),o(null,!0),p.call(i,{TaskId:u,Bucket:d,Region:h,Key:m,Body:g,FileSize:r,SliceSize:y,AsyncLimit:v,ServerSideEncryption:C,UploadData:t,Headers:e.Headers,onProgress:o,tracker:k},(function(e,t){if(i._isRunningTask(u))return e?(o(null,!0),c.emit("error",e)):void c.emit("upload_slice_complete",t)}))})),c.on("get_file_size_finish",(function(){if(o=s.throttleOnProgress.call(i,r,e.onProgress),e.UploadData.UploadId)c.emit("get_upload_data_finish",e.UploadData);else{var t=s.extend({TaskId:u,Bucket:d,Region:h,Key:m,Headers:e.Headers,StorageClass:b,Body:g,FileSize:r,SliceSize:y,onHashProgress:w,tracker:k},e);l.call(i,t,(function(t,r){if(i._isRunningTask(u)){if(t)return c.emit("error",t);e.UploadData.UploadId=r.UploadId,e.UploadData.PartList=r.PartList,c.emit("get_upload_data_finish",e.UploadData)}}))}})),r=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),s.each(e.Headers,(function(t,r){"content-length"===r.toLowerCase()&&delete e.Headers[r]})),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],o=1048576,n=0;n<t.length&&!(r/(o=1024*t[n]*1024)<=i.options.MaxPartNumber);n++);e.ChunkSize=e.SliceSize=y=Math.max(y,o)}(),0===r?(e.Body="",e.ContentLength=0,e.SkipTask=!0,i.putObject(e,t)):c.emit("get_file_size_finish")},abortUploadTask:function(e,t){var r=e.Bucket,o=e.Region,n=e.Key,i=e.UploadId,c=e.Level||"task",l=e.AsyncLimit,d=this,p=new a;if(p.on("error",(function(e){return t(e)})),p.on("get_abort_array",(function(i){m.call(d,{Bucket:r,Region:o,Key:n,Headers:e.Headers,AsyncLimit:l,AbortArray:i},t)})),"bucket"===c)u.call(d,{Bucket:r,Region:o,calledBySdk:"abortUploadTask"},(function(e,r){if(e)return t(e);p.emit("get_abort_array",r.UploadList||[])}));else if("file"===c){if(!n)return t(s.error(new Error("abort_upload_task_no_key")));u.call(d,{Bucket:r,Region:o,Key:n,calledBySdk:"abortUploadTask"},(function(e,r){if(e)return t(e);p.emit("get_abort_array",r.UploadList||[])}))}else{if("task"!==c)return t(s.error(new Error("abort_unknown_level")));if(!i)return t(s.error(new Error("abort_upload_task_no_id")));if(!n)return t(s.error(new Error("abort_upload_task_no_key")));p.emit("get_abort_array",[{Key:n,UploadId:i}])}},uploadFile:function(e,t){var r=this,n=void 0===e.SliceSize?r.options.SliceSize:e.SliceSize,i=[],a=e.Body,l=a.size||a.length||0,u={TaskId:""};if(r.options.EnableTracker){var d=r.options.UseAccelerate||"string"==typeof r.options.Domain&&r.options.Domain.includes("accelerate.");e.tracker=new c({bucket:e.Bucket,region:e.Region,apiName:"uploadFile",fileKey:e.Key,fileSize:l,accelerate:d,deepTracker:r.options.DeepTracker,customId:r.options.CustomId,delay:r.options.TrackerDelay})}s.each(e,(function(e,t){"object"!==o(e)&&"function"!=typeof e&&(u[t]=e)}));var p=e.onTaskReady;e.onTaskReady=function(e){u.TaskId=e,p&&p(e)};var h=l>n?"sliceUploadFile":"putObject",f=e.onFileFinish;i.push({api:h,params:e,callback:function(r,o){e.tracker&&e.tracker.formatResult(r,o),f&&f(r,o,u),t&&t(r,o)}}),r._addTasks(i)},uploadFiles:function(e,t){var r=this,n=void 0===e.SliceSize?r.options.SliceSize:e.SliceSize,i=0,a=0,l=s.throttleOnProgress.call(r,a,e.onProgress),u=e.files.length,d=e.onFileFinish,p=Array(u),h=function(e,r,o){l(null,!0),d&&d(e,r,o),p[o.Index]={options:o,error:e,data:r},--u<=0&&t&&t(null,{files:p})},f=[];s.each(e.files,(function(e,t){!function(){var u=e.Body,d=u.size||u.length||0,p={Index:t,TaskId:""};if(!r.options.UseRawKey&&e.Key&&"/"===e.Key.substr(0,1)&&(e.Key=e.Key.substr(1)),i+=d,r.options.EnableTracker){var m=r.options.UseAccelerate||"string"==typeof r.options.Domain&&r.options.Domain.includes("accelerate.");e.tracker=new c({bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:d,accelerate:m,deepTracker:r.options.DeepTracker,customId:r.options.CustomId,delay:r.options.TrackerDelay})}s.each(e,(function(e,t){"object"!==o(e)&&"function"!=typeof e&&(p[t]=e)}));var g=e.onTaskReady;e.onTaskReady=function(e){p.TaskId=e,g&&g(e)};var y=0,v=e.onProgress;e.onProgress=function(e){a=a-y+e.loaded,y=e.loaded,v&&v(e),l({loaded:a,total:i})};var b=d>n?"sliceUploadFile":"putObject",C=e.onFileFinish;f.push({api:b,params:e,callback:function(t,r){e.tracker&&e.tracker.formatResult(t,r),C&&C(t,r),h&&h(t,r,p)}})}()})),r._addTasks(f)},sliceCopyFile:function(e,t){var r=new a,o=this,c=e.Bucket,l=e.Region,u=e.Key,p=e.CopySource,h=s.getSourceParams.call(this,p);if(h){var f=h.Bucket,m=h.Region,y=decodeURIComponent(h.Key),v=void 0===e.CopySliceSize?o.options.CopySliceSize:e.CopySliceSize;v=Math.max(0,v);var b,C,w=e.CopyChunkSize||this.options.CopyChunkSize,k=this.options.CopyChunkParallelLimit,S=this.options.ChunkRetryTimes+1,x=0,A=0,T={},E={},R={};r.on("copy_slice_complete",(function(r){s.each(e.Headers,(function(e,t){t.toLowerCase().indexOf("x-cos-meta-")}));var a=s.map(r.PartList,(function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}}));i.retry(S,(function(e){o.multipartComplete({Bucket:c,Region:l,Key:u,UploadId:r.UploadId,Parts:a,calledBySdk:"sliceCopyFile"},e)}),(function(e,o){if(n.removeUsing(r.UploadId),e)return C(null,!0),t(e);n.removeUploadId(r.UploadId),C({loaded:b,total:b},!0),t(null,o)}))})),r.on("get_copy_data_finish",(function(e){var a=n.getCopyFileId(p,T,w,c,u);a&&n.saveUploadId(a,e.UploadId,o.options.UploadIdCacheLimit),n.setUsing(e.UploadId);var d=s.filter(e.PartList,(function(e){return e.Uploaded&&(A+=e.PartNumber>=x&&b%w||w),!e.Uploaded}));i.eachLimit(d,k,(function(t,r){var n=t.PartNumber,a=t.CopySourceRange,s=t.end-t.start;i.retry(S,(function(t){g.call(o,{Bucket:c,Region:l,Key:u,CopySource:p,UploadId:e.UploadId,PartNumber:n,CopySourceRange:a},t)}),(function(e,o){if(e)return r(e);C({loaded:A+=s,total:b}),t.ETag=o.ETag,r(e||null,o)}))}),(function(o){if(o)return n.removeUsing(e.UploadId),C(null,!0),t(o);r.emit("copy_slice_complete",e)}))})),r.on("get_chunk_size_finish",(function(){var i=function(){o.multipartInit({Bucket:c,Region:l,Key:u,Headers:R},(function(o,n){if(o)return t(o);e.UploadId=n.UploadId,r.emit("get_copy_data_finish",{UploadId:e.UploadId,PartList:e.PartList})}))},a=n.getCopyFileId(p,T,w,c,u),h=n.getUploadIdList(a);if(!a||!h)return i();!function t(a){if(a>=h.length)return i();var p=h[a];if(n.using[p])return t(a+1);d.call(o,{Bucket:c,Region:l,Key:u,UploadId:p},(function(o,i){if(o)n.removeUploadId(p),t(a+1);else{if(n.using[p])return t(a+1);var c={},l=0;s.each(i.PartList,(function(e){var t=parseInt(e.Size),r=l+t-1;c[e.PartNumber+"|"+l+"|"+r]=e.ETag,l+=t})),s.each(e.PartList,(function(e){var t=c[e.PartNumber+"|"+e.start+"|"+e.end];t&&(e.ETag=t,e.Uploaded=!0)})),r.emit("get_copy_data_finish",{UploadId:p,PartList:e.PartList})}}))}(0)})),r.on("get_file_size_finish",(function(){if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],r=1048576,n=0;n<t.length&&!(b/(r=1024*t[n]*1024)<=o.options.MaxPartNumber);n++);e.ChunkSize=w=Math.max(w,r),x=Math.ceil(b/w);for(var i=[],a=1;a<=x;a++){var s=(a-1)*w,c=a*w<b?a*w-1:b-1,l={PartNumber:a,start:s,end:c,CopySourceRange:"bytes="+s+"-"+c};i.push(l)}e.PartList=i}(),(R="Replaced"===e.Headers["x-cos-metadata-directive"]?e.Headers:E)["x-cos-storage-class"]=e.Headers["x-cos-storage-class"]||E["x-cos-storage-class"],R=s.clearKey(R),"ARCHIVE"===E["x-cos-storage-class"]||"DEEP_ARCHIVE"===E["x-cos-storage-class"]){var n=E["x-cos-restore"];if(!n||'ongoing-request="true"'===n)return void t(s.error(new Error("Unrestored archive object is not allowed to be copied")))}delete R["x-cos-copy-source"],delete R["x-cos-metadata-directive"],delete R["x-cos-copy-source-If-Modified-Since"],delete R["x-cos-copy-source-If-Unmodified-Since"],delete R["x-cos-copy-source-If-Match"],delete R["x-cos-copy-source-If-None-Match"],r.emit("get_chunk_size_finish")})),o.headObject({Bucket:f,Region:m,Key:y},(function(n,i){if(n)n.statusCode&&404===n.statusCode?t(s.error(n,{ErrorStatus:y+" Not Exist"})):t(n);else if(void 0!==(b=e.FileSize=i.headers["content-length"])&&b)if(C=s.throttleOnProgress.call(o,b,e.onProgress),b<=v)e.Headers["x-cos-metadata-directive"]||(e.Headers["x-cos-metadata-directive"]="Copy"),o.putObjectCopy(e,(function(e,r){if(e)return C(null,!0),t(e);C({loaded:b,total:b},!0),t(e,r)}));else{var a=i.headers;T=a,E={"Cache-Control":a["cache-control"],"Content-Disposition":a["content-disposition"],"Content-Encoding":a["content-encoding"],"Content-Type":a["content-type"],Expires:a.expires,"x-cos-storage-class":a["x-cos-storage-class"]},s.each(a,(function(e,t){var r="x-cos-meta-";0===t.indexOf(r)&&t.length>r.length&&(E[t]=e)})),r.emit("get_file_size_finish")}else t(s.error(new Error('get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.( 获取Content-Length失败,请在CORS ExposeHeader设置中添加Content-Length,请参考文档:https://cloud.tencent.com/document/product/436/13318 )')))}))}else t(s.error(new Error("CopySource format error")))}};e.exports.init=function(e,t){t.transferToTaskMethod(y,"sliceUploadFile"),s.each(y,(function(t,r){e.prototype[r]=s.apiWrapper(r,t)}))}},"./src/async.js":
- /*!**********************!*\
- !*** ./src/async.js ***!
- \**********************/
- /*! no static exports found */function(e,t){var r={eachLimit:function(e,t,r,o){if(o=o||function(){},!e.length||t<=0)return o();var n=0,i=0,a=0;!function s(){if(n>=e.length)return o();for(;a<t&&i<e.length;)a+=1,r(e[(i+=1)-1],(function(t){t?(o(t),o=function(){}):(a-=1,(n+=1)>=e.length?o():s())}))}()},retry:function(e,t,r){e<1?r():function o(n){t((function(t,i){t&&n<e?o(n+1):r(t,i)}))}(1)}};e.exports=r},"./src/base.js":
- /*!*********************!*\
- !*** ./src/base.js ***!
- \*********************/
- /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n=r(/*! ../lib/request */"./lib/request.js"),i=r(/*! ./util */"./src/util.js");function a(e,t,r){var o=i.clone(t.InventoryConfiguration);if(o.OptionalFields){var n=o.OptionalFields||[];o.OptionalFields={Field:n}}if(o.Destination&&o.Destination.COSBucketDestination&&o.Destination.COSBucketDestination.Encryption){var a=o.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSECOS")>-1&&(a["SSE-COS"]=a.SSECOS,delete a.SSECOS)}var s=i.json2xml({InventoryConfiguration:o}),c=t.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=i.b64(i.md5(s));var l="PUT"===e?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";h.call(this,{Action:l,method:e,Bucket:t.Bucket,Region:t.Region,body:s,action:"inventory",qs:{id:t.Id},headers:c},(function(e,t){return e&&204===e.statusCode?r(null,{statusCode:e.statusCode}):e?r(e):void r(null,{statusCode:t.statusCode,headers:t.headers})}))}function s(e){var t={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},r={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},o=(e&&e.AccessControlList||{}).Grant;o&&(o=i.isArray(o)?o:[o]);var n={READ:0,WRITE:0,FULL_CONTROL:0};return o&&o.length&&i.each(o,(function(o){"qcs::cam::anyone:anyone"===o.Grantee.ID||"http://cam.qcloud.com/groups/global/AllUsers"===o.Grantee.URI?n[o.Permission]=1:o.Grantee.ID!==e.Owner.ID&&t[r[o.Permission]].push('id="'+o.Grantee.ID+'"')})),n.FULL_CONTROL||n.WRITE&&n.READ?t.ACL="public-read-write":n.READ?t.ACL="public-read":t.ACL="private",i.each(r,(function(e){t[e]=c(t[e].join(","))})),t}function c(e){var t,r,o=e.split(","),n={};for(t=0;t<o.length;)n[r=o[t].trim()]?o.splice(t,1):(n[r]=!0,o[t]=r,t++);return o.join(",")}function l(e){var t=e.region||"",r=e.bucket||"",n=r.substr(0,r.lastIndexOf("-")),a=r.substr(r.lastIndexOf("-")+1),s=e.domain,c=e.object;"function"==typeof s&&(s=s({Bucket:r,Region:t})),["http","https"].includes(e.protocol)&&(e.protocol=e.protocol+":");var l=e.protocol||(i.isBrowser&&"object"===("undefined"==typeof location?"undefined":o(location))&&"http:"===location.protocol?"http:":"https:");s||(s=["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(t)>-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(s="{Bucket}."+s)),s=(s=s.replace(/\{\{AppId\}\}/gi,a).replace(/\{\{Bucket\}\}/gi,n).replace(/\{\{Region\}\}/gi,t).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,a).replace(/\{BucketName\}/gi,n).replace(/\{Bucket\}/gi,r).replace(/\{Region\}/gi,t).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(s)||(s=l+"//"+s),"/"===s.slice(-1)&&(s=s.slice(0,-1));var u=s;return e.ForcePathStyle&&(u+="/"+r),u+="/",c&&(u+=i.camSafeUrlEncode(c).replace(/%2F/g,"/")),e.isLocation&&(u=u.replace(/^https?:\/\//,"")),u}var u=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate,r=(e.Url||l({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region})).replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$").test(r)?r:""};function d(e,t){var r=i.clone(e.Headers),o="";i.each(r,(function(e,t){(""===e||["content-type","cache-control","expires"].indexOf(t.toLowerCase())>-1)&&delete r[t],"host"===t.toLowerCase()&&(o=e)}));var n=!1!==e.ForceSignHost;!o&&e.SignHost&&n&&(r.Host=e.SignHost);var a=!1,s=function(e,r){a||(a=!0,r&&r.XCosSecurityToken&&!r.SecurityToken&&((r=i.clone(r)).SecurityToken=r.XCosSecurityToken,delete r.XCosSecurityToken),t&&t(e,r))},c=this,l=e.Bucket||"",u=e.Region||"",d=e.Key||"";c.options.ForcePathStyle&&l&&(d=l+"/"+d);var p="/"+d,h={},f=e.Scope;if(!f){var m=e.Action||"",g=e.ResourceKey||e.Key||"";f=e.Scope||[{action:m,bucket:l,region:u,prefix:g}]}var y=i.md5(JSON.stringify(f));c._StsCache=c._StsCache||[],function(){var e,t;for(e=c._StsCache.length-1;e>=0;e--){t=c._StsCache[e];var r=Math.round(i.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&r<t.StartTime||r>=t.ExpiredTime)c._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===y){h=t;break}}}();var v,b=function(){var t="";h.StartTime&&e.Expires?t=h.StartTime+";"+(h.StartTime+1*e.Expires):h.StartTime&&h.ExpiredTime&&(t=h.StartTime+";"+h.ExpiredTime);var o={Authorization:i.getAuth({SecretId:h.TmpSecretId,SecretKey:h.TmpSecretKey,Method:e.Method,Pathname:p,Query:e.Query,Headers:r,Expires:e.Expires,UseRawKey:c.options.UseRawKey,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:n}),SecurityToken:h.SecurityToken||h.XCosSecurityToken||"",Token:h.Token||"",ClientIP:h.ClientIP||"",ClientUA:h.ClientUA||""};s(null,o)},C=function(e){if(e.Authorization){var t=!1,r=e.Authorization;if(r)if(r.indexOf(" ")>-1)t=!1;else if(r.indexOf("q-sign-algorithm=")>-1&&r.indexOf("q-ak=")>-1&&r.indexOf("q-sign-time=")>-1&&r.indexOf("q-key-time=")>-1&&r.indexOf("q-url-param-list=")>-1)t=!0;else try{(r=atob(r)).indexOf("a=")>-1&&r.indexOf("k=")>-1&&r.indexOf("t=")>-1&&r.indexOf("r=")>-1&&r.indexOf("b=")>-1&&(t=!0)}catch(o){}if(!t)return i.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return i.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return i.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return i.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return i.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return i.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return i.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(h.ExpiredTime&&h.ExpiredTime-i.getSkewTime(c.options.SystemClockOffset)/1e3>60)b();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:l,Region:u,Method:e.Method,Key:d,Pathname:p,Query:e.Query,Headers:r,Scope:f,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:n},(function(e){"string"==typeof e&&(e={Authorization:e});var t=C(e);if(t)return s(t);e.Authorization?s(null,e):((h=e||{}).Scope=f,h.ScopeKey=y,c._StsCache.push(h),b())}));else{if(!c.options.getSTS)return v={Authorization:i.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:p,Query:e.Query,Headers:r,Expires:e.Expires,UseRawKey:c.options.UseRawKey,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:n}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken},s(null,v),v;c.options.getSTS.call(c,{Bucket:l,Region:u},(function(e){(h=e||{}).Scope=f,h.ScopeKey=y,h.TmpSecretId||(h.TmpSecretId=h.SecretId),h.TmpSecretKey||(h.TmpSecretKey=h.SecretKey);var t=C(h);if(t)return s(t);c._StsCache.push(h),b()}))}return""}function p(e){var t=!1,r=!1,o=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var n=e.error.Code,a=e.error.Message;("RequestTimeTooSkewed"===n||"AccessDenied"===n&&"Request has expired"===a)&&(r=!0)}catch(c){}if(e)if(r&&o){var s=Date.parse(o);this.options.CorrectClockSkew&&Math.abs(i.getSkewTime(this.options.SystemClockOffset)-s)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=s-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);return t}function h(e,t){var r=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=i.clearKey(e.qs),e.headers&&(e.headers=i.clearKey(e.headers)),e.qs&&(e.qs=i.clearKey(e.qs));var o=i.clone(e.qs);e.action&&(o[e.action]="");var n=e.url||e.Url,a=e.SignHost||u.call(this,{Bucket:e.Bucket,Region:e.Region,Url:n}),s=e.tracker;!function n(i){var c=r.options.SystemClockOffset;s&&s.setParams({signStartTime:(new Date).getTime(),retryTimes:i-1}),d.call(r,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:o,Headers:e.headers,SignHost:a,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:r.options.ForceSignHost},(function(o,a){o?t(o):(s&&s.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=a,f.call(r,e,(function(o,a){s&&s.setParams({httpEndTime:(new Date).getTime()}),o&&i<2&&(c!==r.options.SystemClockOffset||p.call(r,o))?(e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]),n(i+1)):t(o,a)})))}))}(1)}function f(e,t){var r=this,o=e.TaskId;if(!o||r._isRunningTask(o)){var a=e.Bucket,s=e.Region,c=e.Key,u=e.method||"GET",d=e.Url||e.url,p=e.body,h=e.rawBody;r.options.UseAccelerate&&(s="accelerate"),d=d||l({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:a,region:s,object:c}),e.action&&(d=d+"?"+(i.isIOS_QQ?"".concat(e.action,"="):e.action)),e.qsStr&&(d=d.indexOf("?")>-1?d+"&"+e.qsStr:d+"?"+e.qsStr);var f={method:u,url:d,headers:e.headers,qs:e.qs,body:p},m="x-cos-security-token";if(i.isCIHost(d)&&(m="x-ci-security-token"),f.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(f.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(f.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(f.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(f.headers[m]=e.AuthData.SecurityToken),f.headers&&(f.headers=i.clearKey(f.headers)),f=i.clearKey(f),e.onProgress&&"function"==typeof e.onProgress){var g=p&&(p.size||p.length)||0;f.onProgress=function(t){if(!o||r._isRunningTask(o)){var n=t?t.loaded:0;e.onProgress({loaded:n,total:g})}}}e.onDownloadProgress&&(f.onDownloadProgress=e.onDownloadProgress),e.DataType&&(f.dataType=e.DataType),this.options.Timeout&&(f.timeout=this.options.Timeout),r.options.ForcePathStyle&&(f.pathStyle=r.options.ForcePathStyle),r.emit("before-send",f);var y=f.url.includes("accelerate."),v=f.qs?Object.keys(f.qs).map((function(e){return"".concat(e,"=").concat(f.qs[e])})).join("&"):"",b=v?f.url+"?"+v:f.url;e.tracker&&e.tracker.setParams({reqUrl:b,accelerate:y?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:b,accelerate:y?"Y":"N"});var C=(r.options.Request||n)(f,(function(e){if(!e||"abort"!==e.error){var n={options:f,error:e&&e.error,statusCode:e&&e.statusCode||0,statusMessage:e&&e.statusMessage||"",headers:e&&e.headers||{},body:e&&e.body};r.emit("after-receive",n);var a,s=n.error,c=n.body,l={statusCode:n.statusCode,statusMessage:n.statusMessage,headers:n.headers},u=function(e,n){if(o&&r.off("inner-kill-task",w),!a){a=!0;var s={};l&&l.statusCode&&(s.statusCode=l.statusCode),l&&l.headers&&(s.headers=l.headers),e?(e=i.extend(e||{},s),t(e,null)):(n=i.extend(n||{},s),t(null,n)),C=null}};if(s)return u(i.error(s));var d,p=l.statusCode,m=2===Math.floor(p/100);if(h&&m)return u(null,{body:c});try{d=c&&c.indexOf("<")>-1&&c.indexOf(">")>-1&&i.xml2json(c)||{}}catch(y){d={}}var g=d&&d.Error;m?u(null,d):g?u(i.error(new Error(g.Message),{code:g.Code,error:g})):p?u(i.error(new Error(l.statusMessage),{code:""+p})):p&&u(i.error(new Error("statusCode error")))}})),w=function e(t){t.TaskId===o&&(C&&C.abort&&C.abort(),r.off("inner-kill-task",e))};o&&r.on("inner-kill-task",w)}}var m={getService:function(e,t){"function"==typeof e&&(t=e,e={});var r=this.options.Protocol||(i.isBrowser&&"object"===("undefined"==typeof location?"undefined":o(location))&&"http:"===location.protocol?"http:":"https:"),n=this.options.ServiceDomain,a=e.AppId||this.options.appId,s=e.Region;n?(n=n.replace(/\{\{AppId\}\}/gi,a||"").replace(/\{\{Region\}\}/gi,s||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(n)||(n=r+"//"+n),"/"===n.slice(-1)&&(n=n.slice(0,-1))):n=s?r+"//cos."+s+".myqcloud.com":r+"//service.cos.myqcloud.com";var c="",l=s?"cos."+s+".myqcloud.com":"service.cos.myqcloud.com";l===n.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1")&&(c=l),h.call(this,{Action:"name/cos:GetService",url:n,method:"GET",headers:e.Headers,SignHost:c},(function(e,r){if(e)return t(e);var o=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Buckets&&r.ListAllMyBucketsResult.Buckets.Bucket||[];o=i.isArray(o)?o:[o];var n=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:o,Owner:n,statusCode:r.statusCode,headers:r.headers})}))},putBucket:function(e,t){var r=this,o="";if(e.BucketAZConfig){var n={BucketAZConfig:e.BucketAZConfig};o=i.json2xml({CreateBucketConfiguration:n})}h.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:o},(function(o,n){if(o)return t(o);var i=l({protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:i,statusCode:n.statusCode,headers:n.headers})}))},headBucket:function(e,t){h.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD"},t)},getBucket:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r.marker=e.Marker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,h.call(this,{Action:"name/cos:GetBucket",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r},(function(e,r){if(e)return t(e);var o=r.ListBucketResult||{},n=o.Contents||[],a=o.CommonPrefixes||[];n=i.isArray(n)?n:[n],a=i.isArray(a)?a:[a];var s=i.clone(o);i.extend(s,{Contents:n,CommonPrefixes:a,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},deleteBucket:function(e,t){h.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketAcl:function(e,t){var r=e.Headers,o="";if(e.AccessControlPolicy){var n=i.clone(e.AccessControlPolicy||{}),a=n.Grants||n.Grant;a=i.isArray(a)?a:[a],delete n.Grant,delete n.Grants,n.AccessControlList={Grant:a},o=i.json2xml({AccessControlPolicy:n}),r["Content-Type"]="application/xml",r["Content-MD5"]=i.b64(i.md5(o))}i.each(r,(function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=c(r[t]))})),h.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:r,action:"acl",body:o},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketAcl:function(e,t){h.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl"},(function(e,r){if(e)return t(e);var o=r.AccessControlPolicy||{},n=o.Owner||{},a=o.AccessControlList.Grant||[];a=i.isArray(a)?a:[a];var c=s(o);r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=i.extend(c,{Owner:n,Grants:a,statusCode:r.statusCode,headers:r.headers}),t(null,c)}))},putBucketCors:function(e,t){var r=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];r=i.clone(i.isArray(r)?r:[r]),i.each(r,(function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var r=t+"s",o=e[r]||e[t]||[];delete e[r],e[t]=i.isArray(o)?o:[o]}))}));var o={CORSRule:r};e.ResponseVary&&(o.ResponseVary=e.ResponseVary);var n=i.json2xml({CORSConfiguration:o}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),h.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"cors",headers:a},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketCors:function(e,t){h.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var o={CORSRules:[],statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=r.CORSConfiguration||{},a=n.CORSRules||n.CORSRule||[];a=i.clone(i.isArray(a)?a:[a]);var s=n.ResponseVary;i.each(a,(function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],(function(t){var r=t+"s",o=e[r]||e[t]||[];delete e[t],e[r]=i.isArray(o)?o:[o]}))})),t(null,{CORSRules:a,ResponseVary:s,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketCors:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})}))},getBucketLocation:function(e,t){h.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location"},t)},getBucketPolicy:function(e,t){h.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0},(function(e,r){if(e)return e.statusCode&&403===e.statusCode?t(i.error(e,{ErrorStatus:"Access Denied"})):e.statusCode&&405===e.statusCode?t(i.error(e,{ErrorStatus:"Method Not Allowed"})):e.statusCode&&404===e.statusCode?t(i.error(e,{ErrorStatus:"Policy Not Found"})):t(e);var o={};try{o=JSON.parse(r.body)}catch(n){}t(null,{Policy:o,statusCode:r.statusCode,headers:r.headers})}))},putBucketPolicy:function(e,t){var r=e.Policy;try{"string"==typeof r&&(r=JSON.parse(r))}catch(a){}if(!r||"string"==typeof r)return t(i.error(new Error("Policy format error")));var o=JSON.stringify(r);r.version||(r.version="2.0");var n=e.Headers;n["Content-Type"]="application/json",n["Content-MD5"]=i.b64(i.md5(o)),h.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:o,headers:n},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},deleteBucketPolicy:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})}))},putBucketTagging:function(e,t){var r=e.Tagging||{},o=r.TagSet||r.Tags||e.Tags||[];o=i.clone(i.isArray(o)?o:[o]);var n=i.json2xml({Tagging:{TagSet:{Tag:o}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),h.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"tagging",headers:a},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketTagging:function(e,t){h.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var o={Tags:[],statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else{var n=[];try{n=r.Tagging.TagSet.Tag||[]}catch(a){}n=i.clone(i.isArray(n)?n:[n]),t(null,{Tags:n,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketTagging:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketLifecycle:function(e,t){var r=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];r=i.clone(r);var o=i.json2xml({LifecycleConfiguration:{Rule:r}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),h.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"lifecycle",headers:n},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketLifecycle:function(e,t){h.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var o={Rules:[],statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=[];try{n=r.LifecycleConfiguration.Rule||[]}catch(a){}n=i.clone(i.isArray(n)?n:[n]),t(null,{Rules:n,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketLifecycle:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var r=e.VersioningConfiguration||{},o=i.json2xml({VersioningConfiguration:r}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),h.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"versioning",headers:n},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t(i.error(new Error("missing param VersioningConfiguration")))},getBucketVersioning:function(e,t){h.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning"},(function(e,r){e||!r.VersioningConfiguration&&(r.VersioningConfiguration={}),t(e,r)}))},putBucketReplication:function(e,t){var r=i.clone(e.ReplicationConfiguration),o=i.json2xml({ReplicationConfiguration:r});o=(o=o.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),h.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"replication",headers:n},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketReplication:function(e,t){h.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var o={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else!r.ReplicationConfiguration&&(r.ReplicationConfiguration={}),r.ReplicationConfiguration.Rule&&(r.ReplicationConfiguration.Rules=i.makeArray(r.ReplicationConfiguration.Rule),delete r.ReplicationConfiguration.Rule),t(e,r)}))},deleteBucketReplication:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var r=i.clone(e.WebsiteConfiguration||{}),o=r.RoutingRules||r.RoutingRule||[];o=i.isArray(o)?o:[o],delete r.RoutingRule,delete r.RoutingRules,o.length&&(r.RoutingRules={RoutingRule:o});var n=i.json2xml({WebsiteConfiguration:r}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),h.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"website",headers:a},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t(i.error(new Error("missing param WebsiteConfiguration")))},getBucketWebsite:function(e,t){h.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},(function(e,r){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var o={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=r.WebsiteConfiguration||{};if(n.RoutingRules){var a=i.clone(n.RoutingRules.RoutingRule||[]);a=i.makeArray(a),n.RoutingRules=a}t(null,{WebsiteConfiguration:n,statusCode:r.statusCode,headers:r.headers})}}))},deleteBucketWebsite:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketReferer:function(e,t){if(e.RefererConfiguration){var r=i.clone(e.RefererConfiguration||{}),o=r.DomainList||{},n=o.Domains||o.Domain||[];(n=i.isArray(n)?n:[n]).length&&(r.DomainList={Domain:n});var a=i.json2xml({RefererConfiguration:r}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.b64(i.md5(a)),h.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"referer",headers:s},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t(i.error(new Error("missing param RefererConfiguration")))},getBucketReferer:function(e,t){h.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},(function(e,r){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var o={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=r.RefererConfiguration||{};if(n.DomainList){var a=i.makeArray(n.DomainList.Domain||[]);n.DomainList={Domains:a}}t(null,{RefererConfiguration:n,statusCode:r.statusCode,headers:r.headers})}}))},putBucketDomain:function(e,t){var r=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];r=i.clone(r);var o=i.json2xml({DomainConfiguration:{DomainRule:r}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),h.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"domain",headers:n},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketDomain:function(e,t){h.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,r){if(e)return t(e);var o=[];try{o=r.DomainConfiguration.DomainRule||[]}catch(n){}o=i.clone(i.isArray(o)?o:[o]),t(null,{DomainRule:o,statusCode:r.statusCode,headers:r.headers})}))},deleteBucketDomain:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketOrigin:function(e,t){var r=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];r=i.clone(r);var o=i.json2xml({OriginConfiguration:{OriginRule:r}}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),h.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"origin",headers:n},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketOrigin:function(e,t){h.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,r){if(e)return t(e);var o=[];try{o=r.OriginConfiguration.OriginRule||[]}catch(n){}o=i.clone(i.isArray(o)?o:[o]),t(null,{OriginRule:o,statusCode:r.statusCode,headers:r.headers})}))},deleteBucketOrigin:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketLogging:function(e,t){var r=i.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.b64(i.md5(r)),h.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"logging",headers:o},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketLogging:function(e,t){h.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},(function(e,r){if(e)return t(e);t(null,{BucketLoggingStatus:r.BucketLoggingStatus,statusCode:r.statusCode,headers:r.headers})}))},putBucketInventory:function(e,t){return a.call(this,"PUT",e,t)},postBucketInventory:function(e,t){return a.call(this,"POST",e,t)},getBucketInventory:function(e,t){h.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,r){if(e)return t(e);var o=r.InventoryConfiguration;if(o&&o.OptionalFields&&o.OptionalFields.Field){var n=o.OptionalFields.Field;i.isArray(n)||(n=[n]),o.OptionalFields=n}if(o.Destination&&o.Destination.COSBucketDestination&&o.Destination.COSBucketDestination.Encryption){var a=o.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSE-COS")>-1&&(a.SSECOS=a["SSE-COS"],delete a["SSE-COS"])}t(null,{InventoryConfiguration:o,statusCode:r.statusCode,headers:r.headers})}))},listBucketInventory:function(e,t){h.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,r){if(e)return t(e);var o=r.ListInventoryConfigurationResult,n=o.InventoryConfiguration||[];n=i.isArray(n)?n:[n],delete o.InventoryConfiguration,i.each(n,(function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;i.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var r=e.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}})),o.InventoryConfigurations=n,i.extend(o,{statusCode:r.statusCode,headers:r.headers}),t(null,o)}))},deleteBucketInventory:function(e,t){h.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,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var r={AccelerateConfiguration:e.AccelerateConfiguration||{}},o=i.json2xml(r),n={"Content-Type":"application/xml"};n["Content-MD5"]=i.b64(i.md5(o)),h.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"accelerate",headers:n},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))}else t(i.error(new Error("missing param AccelerateConfiguration")))},getBucketAccelerate:function(e,t){h.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},(function(e,r){e||!r.AccelerateConfiguration&&(r.AccelerateConfiguration={}),t(e,r)}))},putBucketEncryption:function(e,t){var r=e.ServerSideEncryptionConfiguration||{},o=r.Rule||r.Rules||[],n=i.json2xml({ServerSideEncryptionConfiguration:{Rule:o}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),h.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"encryption",headers:a},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getBucketEncryption:function(e,t){h.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},(function(e,r){if(e)if(404===e.statusCode&&"NoSuchEncryptionConfiguration"===e.code){var o={EncryptionConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else t(e);else{var n=i.makeArray(r.EncryptionConfiguration&&r.EncryptionConfiguration.Rule||[]);r.EncryptionConfiguration={Rules:n},t(e,r)}}))},deleteBucketEncryption:function(e,t){h.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObject:function(e,t){var r=e.Query||{},o=e.QueryString||"",n=i.throttleOnProgress.call(this,0,e.onProgress),a=e.tracker;a&&a.setParams({signStartTime:(new Date).getTime()}),r["response-content-type"]=e.ResponseContentType,r["response-content-language"]=e.ResponseContentLanguage,r["response-expires"]=e.ResponseExpires,r["response-cache-control"]=e.ResponseCacheControl,r["response-content-disposition"]=e.ResponseContentDisposition,r["response-content-encoding"]=e.ResponseContentEncoding,h.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,DataType:e.DataType,headers:e.Headers,qs:r,qsStr:o,rawBody:!0,onDownloadProgress:n,tracker:a},(function(r,o){if(n(null,!0),r){var a=r.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(r)}t(null,{Body:o.body,ETag:i.attr(o.headers,"etag",""),statusCode:o.statusCode,headers:o.headers})}))},headObject:function(e,t){h.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},(function(r,o){if(r){var n=r.statusCode;return e.Headers["If-Modified-Since"]&&n&&304===n?t(null,{NotModified:!0,statusCode:n}):t(r)}o.ETag=i.attr(o.headers,"etag",""),t(null,o)}))},listObjectVersions:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r["key-marker"]=e.KeyMarker,r["version-id-marker"]=e.VersionIdMarker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,h.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,action:"versions"},(function(e,r){if(e)return t(e);var o=r.ListVersionsResult||{},n=o.DeleteMarker||[];n=i.isArray(n)?n:[n];var a=o.Version||[];a=i.isArray(a)?a:[a];var s=i.clone(o);delete s.DeleteMarker,delete s.Version,i.extend(s,{DeleteMarkers:n,Versions:a,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},putObject:function(e,t){var r=this,o=e.ContentLength,n=i.throttleOnProgress.call(r,o,e.onProgress),a=e.Headers;a["Cache-Control"]||a["cache-control"]||(a["Cache-Control"]=""),a["Content-Type"]||a["content-type"]||(a["Content-Type"]=e.Body&&e.Body.type||"");var s=e.UploadAddMetaMd5||r.options.UploadAddMetaMd5||r.options.UploadCheckContentMd5,c=e.tracker;s&&c&&c.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(s,e.Body,(function(s){s&&(c&&c.setParams({md5EndTime:(new Date).getTime()}),r.options.UploadCheckContentMd5&&(a["Content-MD5"]=i.b64(s)),(e.UploadAddMetaMd5||r.options.UploadAddMetaMd5)&&(a["x-cos-meta-md5"]=s)),void 0!==e.ContentLength&&(a["Content-Length"]=e.ContentLength),n(null,!0),h.call(r,{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:n,tracker:c},(function(a,s){if(a)return n(null,!0),t(a);n({loaded:o,total:o},!0);var c=l({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:r.options.UseAccelerate?"accelerate":e.Region,object:e.Key});c=c.substr(c.indexOf("://")+3),s.Location=c,s.ETag=i.attr(s.headers,"etag",""),t(null,s)}))}),e.onHashProgress)},deleteObject:function(e,t){h.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId,action:e.Recursive?"recursive":""},(function(e,r){if(e){var o=e.statusCode;return o&&404===o?t(null,{BucketNotFound:!0,statusCode:o}):t(e)}t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObjectAcl:function(e,t){var r={};e.VersionId&&(r.versionId=e.VersionId),h.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r,action:"acl"},(function(e,r){if(e)return t(e);var o=r.AccessControlPolicy||{},n=o.Owner||{},a=o.AccessControlList&&o.AccessControlList.Grant||[];a=i.isArray(a)?a:[a];var c=s(o);delete c.GrantWrite,r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=i.extend(c,{Owner:n,Grants:a,statusCode:r.statusCode,headers:r.headers}),t(null,c)}))},putObjectAcl:function(e,t){var r=e.Headers,o="";if(e.AccessControlPolicy){var n=i.clone(e.AccessControlPolicy||{}),a=n.Grants||n.Grant;a=i.isArray(a)?a:[a],delete n.Grant,delete n.Grants,n.AccessControlList={Grant:a},o=i.json2xml({AccessControlPolicy:n}),r["Content-Type"]="application/xml",r["Content-MD5"]=i.b64(i.md5(o))}i.each(r,(function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=c(r[t]))})),h.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:r,body:o},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},optionsObject:function(e,t){var r=e.Headers;r.Origin=e.Origin,r["Access-Control-Request-Method"]=e.AccessControlRequestMethod,r["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,h.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:r},(function(e,r){if(e)return e.statusCode&&403===e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var o=r.headers||{};t(null,{AccessControlAllowOrigin:o["access-control-allow-origin"],AccessControlAllowMethods:o["access-control-allow-methods"],AccessControlAllowHeaders:o["access-control-allow-headers"],AccessControlExposeHeaders:o["access-control-expose-headers"],AccessControlMaxAge:o["access-control-max-age"],statusCode:r.statusCode,headers:r.headers})}))},putObjectCopy:function(e,t){var r=this,o=e.Headers;o["Cache-Control"]||o["cache-control"]||(o["Cache-Control"]="");var n=e.CopySource||"",a=i.getSourceParams.call(this,n);if(a){var s=a.Bucket,c=a.Region,u=decodeURIComponent(a.Key);h.call(this,{Scope:[{action:"name/cos:GetObject",bucket:s,region:c,prefix:u},{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(o,n){if(o)return t(o);var a=i.clone(n.CopyObjectResult||{}),s=l({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0});i.extend(a,{Location:s,statusCode:n.statusCode,headers:n.headers}),t(null,a)}))}else t(i.error(new Error("CopySource format error")))},deleteMultipleObject:function(e,t){var r=e.Objects||[],o=e.Quiet;r=i.isArray(r)?r:[r];var n=i.json2xml({Delete:{Object:r,Quiet:o||!1}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n));var s=i.map(r,(function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}}));h.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:n,action:"delete",headers:a},(function(e,r){if(e)return t(e);var o=r.DeleteResult||{},n=o.Deleted||[],a=o.Error||[];n=i.isArray(n)?n:[n],a=i.isArray(a)?a:[a];var s=i.clone(o);i.extend(s,{Error:a,Deleted:n,statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},restoreObject:function(e,t){var r=e.Headers;if(e.RestoreRequest){var o=e.RestoreRequest||{},n=i.json2xml({RestoreRequest:o});r["Content-Type"]="application/xml",r["Content-MD5"]=i.b64(i.md5(n)),h.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:n,action:"restore",headers:r},t)}else t(i.error(new Error("missing param RestoreRequest")))},putObjectTagging:function(e,t){var r=e.Tagging||{},o=r.TagSet||r.Tags||e.Tags||[];o=i.clone(i.isArray(o)?o:[o]);var n=i.json2xml({Tagging:{TagSet:{Tag:o}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(n)),h.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:n,action:"tagging",headers:a,VersionId:e.VersionId},(function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},getObjectTagging:function(e,t){h.call(this,{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,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var o={Tags:[],statusCode:e.statusCode};e.headers&&(o.headers=e.headers),t(null,o)}else{var n=[];try{n=r.Tagging.TagSet.Tag||[]}catch(a){}n=i.clone(i.isArray(n)?n:[n]),t(null,{Tags:n,statusCode:r.statusCode,headers:r.headers})}}))},deleteObjectTagging:function(e,t){h.call(this,{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,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})}))},selectObjectContent:function(e,t){if(!e.SelectType)return t(i.error(new Error("missing param SelectType")));var r=e.SelectRequest||{},o=i.json2xml({SelectRequest:r}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(o)),h.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"select",qs:{"select-type":e.SelectType},VersionId:e.VersionId,body:o,DataType:"arraybuffer",rawBody:!0},(function(e,r){if(e&&204===e.statusCode)return t(null,{statusCode:e.statusCode});if(e)return t(e);var o=i.parseSelectPayload(r.body);t(null,{statusCode:r.statusCode,headers:r.headers,Body:o.body,Payload:o.payload})}))},appendObject:function(e,t){var r=e.Headers;r["Cache-Control"]||r["cache-control"]||(r["Cache-Control"]=""),r["Content-Type"]||r["content-type"]||(r["Content-Type"]=e.Body&&e.Body.type||""),h.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,r){if(e)return t(e);t(null,r)}))},uploadPartCopy:function(e,t){var r=e.CopySource||"",o=i.getSourceParams.call(this,r);if(o){var n=o.Bucket,a=o.Region,s=decodeURIComponent(o.Key);h.call(this,{Scope:[{action:"name/cos:GetObject",bucket:n,region:a,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,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},(function(e,r){if(e)return t(e);var o=i.clone(r.CopyPartResult||{});i.extend(o,{statusCode:r.statusCode,headers:r.headers}),t(null,o)}))}else t(i.error(new Error("CopySource format error")))},multipartInit:function(e,t){var r=this,o=e.Headers,n=e.tracker;o["Cache-Control"]||o["cache-control"]||(o["Cache-Control"]=""),o["Content-Type"]||o["content-type"]||(o["Content-Type"]=e.Body&&e.Body.type||"");var a=e.Body&&(e.UploadAddMetaMd5||r.options.UploadAddMetaMd5);a&&n&&n.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(a,e.Body,(function(o){o&&(e.Headers["x-cos-meta-md5"]=o),a&&n&&n.setParams({md5EndTime:(new Date).getTime()}),h.call(r,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:n},(function(e,r){return e?(n&&n.parent&&n.parent.setParams({errorNode:"multipartInit"}),t(e)):(r=i.clone(r||{}))&&r.InitiateMultipartUploadResult?t(null,i.extend(r.InitiateMultipartUploadResult,{statusCode:r.statusCode,headers:r.headers})):void t(null,r)}))}),e.onHashProgress)},multipartUpload:function(e,t){var r=this;i.getFileSize("multipartUpload",e,(function(){var o=e.tracker,n=r.options.UploadCheckContentMd5;n&&o&&o.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(n,e.Body,(function(a){a&&(e.Headers["Content-MD5"]=i.b64(a)),n&&o&&o.setParams({md5EndTime:(new Date).getTime()}),o&&o.setParams({partNumber:e.PartNumber}),h.call(r,{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,tracker:o},(function(e,r){if(e)return o&&o.parent&&o.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:i.attr(r.headers,"etag",""),statusCode:r.statusCode,headers:r.headers})}))}))}))},multipartComplete:function(e,t){for(var r=this,o=e.UploadId,n=e.Parts,a=e.tracker,s=0,c=n.length;s<c;s++)n[s].ETag&&0===n[s].ETag.indexOf('"')||(n[s].ETag='"'+n[s].ETag+'"');var u=i.json2xml({CompleteMultipartUpload:{Part:n}});u=u.replace(/\n\s*/g,"");var d=e.Headers;d["Content-Type"]="application/xml",d["Content-MD5"]=i.b64(i.md5(u)),h.call(this,{Action:"name/cos:CompleteMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{uploadId:o},body:u,headers:d,tracker:a},(function(o,n){if(o)return a&&a.parent&&a.parent.setParams({errorNode:"multipartComplete"}),t(o);var s=l({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0}),c=n.CompleteMultipartUploadResult||{};c.ProcessResults&&c&&c.ProcessResults&&(c.UploadResult={OriginalInfo:{Key:c.Key,Location:s,ETag:c.ETag,ImageInfo:c.ImageInfo},ProcessResults:c.ProcessResults},delete c.ImageInfo,delete c.ProcessResults);var u=i.extend(c,{Location:s,statusCode:n.statusCode,headers:n.headers});t(null,u)}))},multipartList:function(e,t){var r={};r.delimiter=e.Delimiter,r["encoding-type"]=e.EncodingType,r.prefix=e.Prefix||"",r["max-uploads"]=e.MaxUploads,r["key-marker"]=e.KeyMarker,r["upload-id-marker"]=e.UploadIdMarker,r=i.clearKey(r);var o=e.tracker;o&&o.setParams({signStartTime:(new Date).getTime()}),h.call(this,{Action:"name/cos:ListMultipartUploads",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,action:"uploads",tracker:o},(function(e,r){if(e)return o&&o.parent&&o.parent.setParams({errorNode:"multipartList"}),t(e);if(r&&r.ListMultipartUploadsResult){var n=r.ListMultipartUploadsResult.Upload||[];n=i.isArray(n)?n:[n],r.ListMultipartUploadsResult.Upload=n}var a=i.clone(r.ListMultipartUploadsResult||{});i.extend(a,{statusCode:r.statusCode,headers:r.headers}),t(null,a)}))},multipartListPart:function(e,t){var r={},o=e.tracker;r.uploadId=e.UploadId,r["encoding-type"]=e.EncodingType,r["max-parts"]=e.MaxParts,r["part-number-marker"]=e.PartNumberMarker,h.call(this,{Action:"name/cos:ListParts",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r},(function(e,r){if(e)return o&&o.parent&&o.parent.setParams({errorNode:"multipartListPart"}),t(e);var n=r.ListPartsResult||{},a=n.Part||[];a=i.isArray(a)?a:[a],n.Part=a;var s=i.clone(n);i.extend(s,{statusCode:r.statusCode,headers:r.headers}),t(null,s)}))},multipartAbort:function(e,t){var r={};r.uploadId=e.UploadId,h.call(this,{Action:"name/cos:AbortMultipartUpload",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r},(function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})}))},request:function(e,t){h.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,DataType:e.DataType},(function(e,r){if(e)return t(e);r&&r.body&&(r.Body=r.body,delete r.body),t(e,r)}))},getObjectUrl:function(e,t){var r=this,o=void 0===e.UseAccelerate?r.options.UseAccelerate:e.UseAccelerate,n=l({ForcePathStyle:r.options.ForcePathStyle,protocol:e.Protocol||r.options.Protocol,domain:e.Domain||r.options.Domain,bucket:e.Bucket,region:o?"accelerate":e.Region,object:e.Key}),a="";e.Query&&(a+=i.obj2str(e.Query)),e.QueryString&&(a+=(a?"&":"")+e.QueryString);var s=n;if(void 0!==e.Sign&&!e.Sign)return a&&(s+="?"+a),t(null,{Url:s}),s;var c=u.call(this,{Bucket:e.Bucket,Region:e.Region,UseAccelerate:e.UseAccelerate,Url:n}),p=d.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:c,ForceSignHost:!1!==e.ForceSignHost&&r.options.ForceSignHost},(function(e,r){if(t)if(e)t(e);else{var o=n;o+="?"+(r.Authorization.indexOf("q-signature")>-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],r="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),o=new RegExp(t,"g");return e.replace(o,r)}(r.Authorization):"sign="+encodeURIComponent(r.Authorization)),r.SecurityToken&&(o+="&x-cos-security-token="+r.SecurityToken),r.ClientIP&&(o+="&clientIP="+r.ClientIP),r.ClientUA&&(o+="&clientUA="+r.ClientUA),r.Token&&(o+="&token="+r.Token),a&&(o+="&"+a),setTimeout((function(){t(null,{Url:o})}))}}));return p?(s+="?"+p.Authorization+(p.SecurityToken?"&x-cos-security-token="+p.SecurityToken:""),a&&(s+="&"+a)):a&&(s+="?"+a),s},getAuth:function(e){return i.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,UseRawKey:this.options.UseRawKey,SystemClockOffset:this.options.SystemClockOffset})}};e.exports.init=function(e,t){t.transferToTaskMethod(m,"putObject"),i.each(m,(function(t,r){e.prototype[r]=i.apiWrapper(r,t),function(e,t,r){i.each(["Cors","Acl"],(function(o){if(e.slice(-o.length)===o){var n=e.slice(0,-o.length)+o.toUpperCase(),a=i.apiWrapper(e,t),s=!1;r[n]=function(){!s&&console.warn("warning: cos."+n+" has been deprecated. Please Use cos."+e+" instead."),s=!0,a.apply(this,arguments)}}}))}(r,t,e.prototype)}))}},"./src/cos.js":
- /*!********************!*\
- !*** ./src/cos.js ***!
- \********************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./util */"./src/util.js"),n=r(/*! ./event */"./src/event.js"),i=r(/*! ./task */"./src/task.js"),a=r(/*! ./base */"./src/base.js"),s=r(/*! ./advance */"./src/advance.js"),c=r(/*! ../package.json */"./package.json"),l={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,UseRawKey:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadQueueSize:1e4,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:""},u=function(e){this.options=o.extend(o.clone(l),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格式错误,请检查"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey格式错误,请检查"),console.error("error: SecretKey format is incorrect. Please check")),o.isNode()&&(console.warn("warning: cos-js-sdk-v5 不支持 nodejs 环境使用,请改用 cos-nodejs-sdk-v5,参考文档: https://cloud.tencent.com/document/product/436/8629"),console.warn("warning: cos-js-sdk-v5 does not support nodejs environment. Please use cos-nodejs-sdk-v5 instead. See: https://cloud.tencent.com/document/product/436/8629")),n.init(this),i.init(this)};a.init(u,i),s.init(u,i),u.util={md5:o.md5,xml2json:o.xml2json,json2xml:o.json2xml,encodeBase64:o.encodeBase64},u.getAuthorization=o.getAuth,u.version=c.version,e.exports=u},"./src/event.js":
- /*!**********************!*\
- !*** ./src/event.js ***!
- \**********************/
- /*! no static exports found */function(e,t){var r=function(e){var t={},r=function(e){return!t[e]&&(t[e]=[]),t[e]};e.on=function(e,t){"task-list-update"===e&&console.warn('warning: Event "'+e+'" has been deprecated. Please use "list-update" instead.'),r(e).push(t)},e.off=function(e,t){for(var o=r(e),n=o.length-1;n>=0;n--)t===o[n]&&o.splice(n,1)},e.emit=function(e,t){for(var o=r(e).map((function(e){return e})),n=0;n<o.length;n++)o[n](t)}};e.exports.init=r,e.exports.EventProxy=function(){r(this)}},"./src/session.js":
- /*!************************!*\
- !*** ./src/session.js ***!
- \************************/
- /*! no static exports found */function(e,t,r){var o,n,i=r(/*! ./util */"./src/util.js"),a="cos_sdk_upload_cache",s=function(){try{var e=JSON.parse(localStorage.getItem(a))}catch(t){}e||(e=[]),o=e},c=function(){try{o.length?localStorage.setItem(a,JSON.stringify(o)):localStorage.removeItem(a)}catch(e){}},l=function(){if(!o){s.call(this);for(var e=!1,t=Math.round(Date.now()/1e3),r=o.length-1;r>=0;r--){var n=o[r][2];(!n||n+2592e3<t)&&(o.splice(r,1),e=!0)}e&&c()}},u=function(){n||(n=setTimeout((function(){c(),n=null}),400))},d={using:{},setUsing:function(e){d.using[e]=!0},removeUsing:function(e){delete d.using[e]},getFileId:function(e,t,r,o){return e.name&&e.size&&e.lastModifiedDate&&t?i.md5([e.name,e.size,e.lastModifiedDate,t,r,o].join("::")):null},getCopyFileId:function(e,t,r,o,n){var a=t["content-length"],s=t.etag||"",c=t["last-modified"];return e&&r?i.md5([e,a,s,c,r,o,n].join("::")):null},getUploadIdList:function(e){if(!e)return null;l.call(this);for(var t=[],r=0;r<o.length;r++)o[r][0]===e&&t.push(o[r][1]);return t.length?t:null},saveUploadId:function(e,t,r){if(l.call(this),e){for(var n=o.length-1;n>=0;n--){var i=o[n];i[0]===e&&i[1]===t&&o.splice(n,1)}o.unshift([e,t,Math.round(Date.now()/1e3)]),o.length>r&&o.splice(r),u()}},removeUploadId:function(e){l.call(this),delete d.using[e];for(var t=o.length-1;t>=0;t--)o[t][1]===e&&o.splice(t,1);u()}};e.exports=d},"./src/task.js":
- /*!*********************!*\
- !*** ./src/task.js ***!
- \*********************/
- /*! no static exports found */function(e,t,r){var o=r(/*! ./session */"./src/session.js"),n=r(/*! ./util */"./src/util.js"),i={};e.exports.transferToTaskMethod=function(e,t){i[t]=e[t],e[t]=function(e,r){e.SkipTask?i[t].call(this,e,r):this._addTask(t,e,r)}},e.exports.init=function(e){var t,r,a=[],s={},c=0,l=0,u=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),e._custom&&(t._custom=e._custom),t},d=(r=function(){t=0,e.emit("task-list-update",{list:n.map(a,u)}),e.emit("list-update",{list:n.map(a,u)})},function(){t||(t=setTimeout(r))}),p=function(){if(!(a.length<=e.options.UploadQueueSize)){for(var t=0;t<l&&t<a.length&&a.length>e.options.UploadQueueSize;){var r="waiting"===a[t].state||"checking"===a[t].state||"uploading"===a[t].state;a[t]&&r?t++:(s[a[t].id]&&delete s[a[t].id],a.splice(t,1),l--)}d()}},h=function t(){if(!(c>=e.options.FileParallelLimit)){for(;a[l]&&"waiting"!==a[l].state;)l++;if(!(l>=a.length)){var r=a[l];l++,c++,r.state="checking",r.params.onTaskStart&&r.params.onTaskStart(u(r)),!r.params.UploadData&&(r.params.UploadData={});var o=n.formatParams(r.api,r.params);i[r.api].call(e,o,(function(o,n){e._isRunningTask(r.id)&&("checking"!==r.state&&"uploading"!==r.state||(r.state=o?"error":"success",o&&(r.error=o),c--,d(),t(),r.callback&&r.callback(o,n),"success"===r.state&&(r.params&&(delete r.params.UploadData,delete r.params.Body,delete r.params),delete r.callback)),p())})),d(),setTimeout(t)}}},f=function(t,r){var n=s[t];if(n){var i=n&&"waiting"===n.state,a=n&&("checking"===n.state||"uploading"===n.state);if("canceled"===r&&"canceled"!==n.state||"paused"===r&&i||"paused"===r&&a){if("paused"===r&&n.params.Body&&"function"==typeof n.params.Body.pipe)return void console.error("stream not support pause");n.state=r,e.emit("inner-kill-task",{TaskId:t,toState:r});try{var l=n&&n.params&&n.params.UploadData.UploadId}catch(u){}"canceled"===r&&l&&o.removeUsing(l),d(),a&&(c--,h()),"canceled"===r&&(n.params&&(delete n.params.UploadData,delete n.params.Body,delete n.params),delete n.callback)}p()}};e._addTasks=function(t){n.each(t,(function(t){e._addTask(t.api,t.params,t.callback,!0)})),d()};var m=!0;e._addTask=function(t,r,o,i){r=n.formatParams(t,r);var c=n.uuid();r.TaskId=c,r.onTaskReady&&r.onTaskReady(c),r.TaskReady&&(r.TaskReady(c),m&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),m=!1);var l={params:r,callback:o,api:t,index:a.length,id:c,Bucket:r.Bucket,Region:r.Region,Key:r.Key,FilePath:r.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:r._custom},u=r.onHashProgress;r.onHashProgress=function(t){e._isRunningTask(l.id)&&(l.hashPercent=t.percent,u&&u(t),d())};var f=r.onProgress;return r.onProgress=function(t){e._isRunningTask(l.id)&&("checking"===l.state&&(l.state="uploading"),l.loaded=t.loaded,l.speed=t.speed,l.percent=t.percent,f&&f(t),d())},n.getFileSize(t,r,(function(e,t){if(e)return o(n.error(e));s[c]=l,a.push(l),l.size=t,!i&&d(),h(),p()})),c},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return n.map(a,u)},e.cancelTask=function(e){f(e,"canceled")},e.pauseTask=function(e){f(e,"paused")},e.restartTask=function(e){var t=s[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",d(),l=Math.min(l,t.index),h())},e.isUploadRunning=function(){return c||l<a.length}}},"./src/tracker.js":
- /*!************************!*\
- !*** ./src/tracker.js ***!
- \************************/
- /*! no static exports found */function(e,t,r){var o=r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js"),n=r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js"),i=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),a=r(/*! ../package.json */"./package.json"),s=null,c=function(e){if(!s){var t=r(/*! ../lib/beacon.min */"./lib/beacon.min.js");s=new t({appkey:"0AND0VEVB24UBGDU",versionCode:a.version,channelID:"js_sdk",openid:"openid",unionid:"unid",strictMode:!1,delay:e,sessionDuration:6e4})}return s},l=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},u=function(){if("object"===("undefined"==typeof navigator?"undefined":i(navigator))){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(null==e?void 0:e.type)||(null==e?void 0:e.effectiveType)||"unknown"}return"unknown"},d=function(){if("object"!==("undefined"==typeof navigator?"undefined":i(navigator)))return"unknown os";var e=navigator.userAgent.toLowerCase(),t=/macintosh|mac os x/i.test(navigator.userAgent);return e.indexOf("win32")>=0||e.indexOf("wow32")>=0?"win32":e.indexOf("win64")>=0||e.indexOf("wow64")>=0?"win64":t?"mac":"unknown os"},p=function(){return!("object"!==("undefined"==typeof navigator?"undefined":i(navigator))||!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))},h=function(){return!("object"!==("undefined"==typeof navigator?"undefined":i(navigator))||!navigator.userAgent.match(/(Android|Adr|Linux)/i))},f=function(){return!("object"!==("undefined"==typeof navigator?"undefined":i(navigator))||!navigator.userAgent.match(/(iPhone|iPod|iPad|iOS)/i))},m=function(){if("object"!==("undefined"==typeof navigator?"undefined":i(navigator)))return"unknown device";var e=navigator.userAgent.toLowerCase();if(e.includes("app/tencent_wemeet"))return"tencent_wemeet";if(e.indexOf("maxthon")>=0){var t=e.match(/maxthon\/([\d.]+)/),r=t&&t[1]||"";return"傲游浏览器 ".concat(r).trim()}if(e.indexOf("qqbrowser")>=0){var o=e.match(/qqbrowser\/([\d.]+)/),n=o&&o[1]||"";return"QQ浏览器 ".concat(n).trim()}if(e.indexOf("se 2.x")>=0)return"搜狗浏览器";if(e.indexOf("wxwork")>=0)return"微信内置浏览器";if(e.indexOf("msie")>=0){var a=e.match(/msie ([\d.]+)/),s=a&&a[1]||"";return"IE ".concat(s).trim()}if(e.indexOf("firefox")>=0){var c=e.match(/firefox\/([\d.]+)/),l=c&&c[1]||"";return"Firefox ".concat(l).trim()}if(e.indexOf("chrome")>=0){var u=e.match(/chrome\/([\d.]+)/),d=u&&u[1]||"";return"Chrome ".concat(d).trim()}if(e.indexOf("opera")>=0){var p=e.match(/opera.([\d.]+)/),h=p&&p[1]||"";return"Opera ".concat(h).trim()}if(e.indexOf("safari")>=0){var f=e.match(/version\/([\d.]+)/),m=f&&f[1]||"";return"Safari ".concat(m).trim()}if(e.indexOf("edge")>=0){var g=e.match(/edge\/([\d.]+)/),y=g&&g[1]||"";return"edge ".concat(y).trim()}return e.substr(0,200)},g={isMobile:p(),isBrowser:!p(),mobileOsType:h()?"android":f?"ios":"other_mobile",pcOsType:d()},y={deviceType:g.isMobile?"mobile":g.isBrowser?"browser":"unknown",devicePlatform:g.isMobile?g.mobileOsType:g.pcOsType,deviceName:m()},v=["multipartInit","multipartUpload","multipartComplete","multipartList","multipartListPart","multipartAbort"],b=["putObject","postObject","appendObject","sliceUploadFile","uploadFile","uploadFiles"].concat(v),C=["getObject"];function w(e){return e.replace(/([A-Z])/g,"_$1").toLowerCase()}var k=function(){function e(t){o(this,e);var r=t.parent,n=t.traceId,i=t.bucket,s=t.region,u=t.apiName,d=t.fileKey,p=t.fileSize,h=t.accelerate,f=t.customId,m=t.delay,g=t.deepTracker,v=i&&i.substr(i.lastIndexOf("-")+1)||"";this.parent=r,this.deepTracker=g,this.delay=m,this.params={cossdkVersion:a.version,region:s,networkType:"",host:"",accelerate:h?"Y":"N",requestPath:d||"",size:p||-1,httpMd5:0,httpSign:0,httpFull:0,name:u||"",result:"",tookTime:0,errorNode:"",errorCode:"",errorMessage:"",errorRequestId:"",errorStatusCode:0,errorServiceName:"",tracePlatform:"cos-js-sdk-v5",traceId:n||l(),bucket:i,appid:v,partNumber:0,retryTimes:0,reqUrl:"",customId:f||"",deviceType:y.deviceType,devicePlatform:y.devicePlatform,deviceName:y.deviceName,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:(new Date).getTime(),endTime:0},this.beacon=c(m)}return n(e,[{key:"formatResult",value:function(e,t){var r,o,n,i,a,s,c=(new Date).getTime()-this.params.startTime,l=u(),d=e?(null==e?void 0:e.code)||(null==e||null===(r=e.error)||void 0===r?void 0:r.code)||(null==e||null===(o=e.error)||void 0===o?void 0:o.Code):"",p=e?(null==e?void 0:e.message)||(null==e||null===(n=e.error)||void 0===n?void 0:n.message)||(null==e||null===(i=e.error)||void 0===i?void 0:i.Message):"",h=e?(null==e?void 0:e.resource)||(null==e||null===(a=e.error)||void 0===a?void 0:a.resource)||(null==e||null===(s=e.error)||void 0===s?void 0:s.Resource):"",f=e?null==e?void 0:e.statusCode:t.statusCode,m=e?(null==e?void 0:e.headers)&&(null==e?void 0:e.headers["x-cos-request-id"]):(null==t?void 0:t.headers)&&(null==t?void 0:t.headers["x-cos-request-id"]),g=e?m?"Server":"Client":"";if(Object.assign(this.params,{tookTime:c,networkType:l,httpMd5:this.params.md5EndTime-this.params.md5StartTime,httpSign:this.params.signEndTime-this.params.signStartTime,httpFull:this.params.httpEndTime-this.params.httpStartTime,result:e?"Fail":"Success",errorType:g,errorCode:d,errorStatusCode:f,errorMessage:p,errorServiceName:h,errorRequestId:m}),!e||d&&p||(this.params.fullError=e?JSON.stringify(e):""),"getObject"===this.params.name&&(this.params.size=t?t.headers&&t.headers["content-length"]:-1),this.params.reqUrl)try{var y=/^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl);this.params.host=y[2]}catch(v){this.params.host=this.params.reqUrl}this.sendEvents()}},{key:"setParams",value:function(e){Object.assign(this.params,e)}},{key:"sendEvents",value:function(){if(!v.includes(this.params.name)||this.deepTracker){var e,t=(e=this.params.name,b.includes(e)?"cos_upload":C.includes(e)?"cos_download":"base_service"),r=function(e){var t={},r="Success"===e.result?["tracePlatform","cossdkVersion","region","bucket","appid","networkType","host","accelerate","requestPath","partNumber","size","name","result","tookTime","errorRequestId","retryTimes","reqUrl","customId","deviceType","devicePlatform","deviceName"]:["tracePlatform","cossdkVersion","region","networkType","host","accelerate","requestPath","size","httpMd5","httpSign","httpFull","name","result","tookTime","errorNode","errorCode","errorMessage","errorRequestId","errorStatusCode","errorServiceName","errorType","traceId","bucket","appid","partNumber","retryTimes","reqUrl","customId","fullError","deviceType","devicePlatform","deviceName"];for(var o in e)r.includes(o)&&(t[w(o)]=e[o]);return t}(this.params);this.beacon||(this.beacon=c(this.delay||5e3)),0===this.delay?this.beacon&&this.beacon.onDirectUserAction(t,r):this.beacon&&this.beacon.onUserAction(t,r)}}},{key:"generateSubTracker",value:function(t){return Object.assign(t,{parent:this,deepTracker:this.deepTracker,traceId:this.params.traceId,bucket:this.params.bucket,region:this.params.region,fileKey:this.params.requestPath,customId:this.params.customId,delay:this.delay}),new e(t)}}]),e}();e.exports=k},"./src/util.js":
- /*!*********************!*\
- !*** ./src/util.js ***!
- \*********************/
- /*! no static exports found */function(e,t,r){(function(t){var o=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),n=r(/*! ../lib/md5 */"./lib/md5.js"),i=r(/*! ../lib/crypto */"./lib/crypto.js"),a=r(/*! ../lib/xml2json */"./lib/xml2json.js"),s=r(/*! ../lib/json2xml */"./lib/json2xml.js"),c=r(/*! ../lib/base64 */"./lib/base64.js"),l=r(/*! ./tracker */"./src/tracker.js");function u(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function d(e,t){var r=[];for(var o in e)e.hasOwnProperty(o)&&r.push(t?u(o).toLowerCase():o);return r.sort((function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1}))}var p,h=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding"],f=function(e,t,r){var o=t/8,n=e.slice(r,r+o);return new Uint8Array(n).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[t](n)[0]},m=function(e,t,r,o){var n=e.slice(t,r),i="";return new Uint8Array(n).forEach((function(e){i+=String.fromCharCode(e)})),o&&(i=decodeURIComponent(escape(i))),i},g=function(){},y=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&null!==e[r]&&(t[r]=e[r]);return t},v=(p=function(e,t){e=e.split("."),t=t.split(".");for(var r=0;r<t.length;r++)if(e[r]!==t[r])return parseInt(e[r])>parseInt(t[r])?1:-1;return 0},function(e){if(!e)return!1;var t=(e.match(/Chrome\/([.\d]+)/)||[])[1],r=(e.match(/QBCore\/([.\d]+)/)||[])[1],o=(e.match(/QQBrowser\/([.\d]+)/)||[])[1];return t&&p(t,"53.0.2785.116")<0&&r&&p(r,"3.53.991.400")<0&&o&&p(o,"9.0.2524.400")<=0||!1}("undefined"!=typeof navigator&&navigator.userAgent)),b=1048576;function C(e){return x(e,(function(e){return"object"===o(e)&&null!==e?C(e):e}))}function w(e,t){return S(t,(function(r,o){e[o]=t[o]})),e}function k(e){return e instanceof Array}function S(e,t){for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)}function x(e,t){var r=k(e)?[]:{};for(var o in e)e.hasOwnProperty(o)&&(r[o]=t(e[o],o));return r}var A=function(e,t){var r=t.Bucket,o=t.Region,n=t.Key,i=this.options.Domain,a=!i||"string"==typeof i&&i.indexOf("{Bucket}")>-1,s=!i||"string"==typeof i&&i.indexOf("{Region}")>-1;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(a&&!r)return"Bucket";if(s&&!o)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e){if(a&&!r)return"Bucket";if(s&&!o)return"Region";if(!n)return"Key"}return!1},T=function(e,t){if(t=w({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var r=t.Headers||{};t&&"object"===o(t)&&(!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(r[e]=t[e])}(),B.each({"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-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","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","Pic-Operations":"PicOperations"},(function(e,o){void 0!==t[e]&&(r[o]=t[e])})),t.Headers=y(r))}return t},E=function(e){return Date.now()+(e||0)},R="object"===("undefined"==typeof navigator?"undefined":o(navigator))&&!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),I="object"===("undefined"==typeof navigator?"undefined":o(navigator))&&/\sQQ/i.test(navigator.userAgent),B={noop:g,formatParams:T,apiWrapper:function(e,t){return function(r,o){var n,i=this;if("function"==typeof r&&(o=r,r={}),r=T(e,r),i.options.EnableTracker)if("sliceUploadFile"===r.calledBySdk)n=r.tracker&&r.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))n=null;else{var a=-1;r.Body&&(a="string"==typeof r.Body?r.Body.length:r.Body.size||r.Body.byteLength||-1),n=new l({bucket:r.Bucket,region:r.Region,apiName:e,fileKey:r.Key,fileSize:a,deepTracker:i.options.DeepTracker,customId:i.options.CustomId,delay:i.options.TrackerDelay})}r.tracker=n;var s=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},c=function(e,t){n&&n.formatResult(e,t),o&&o(s(e),s(t))},u=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=A.call(i,e,r);if(t)return"missing param "+t;if(r.Region){if(i.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(r.Region))return"Region format error."}else{if(r.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(r.Region))return"Region format error."}i.options.CompatibilityMode||-1!==r.Region.indexOf("-")||"yfb"===r.Region||"default"===r.Region||"accelerate"===r.Region||console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(r.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(r.Bucket))if(r.AppId)r.Bucket=r.Bucket+"-"+r.AppId;else{if(!i.options.AppId)return'Bucket should format as "test-1250000000".';r.Bucket=r.Bucket+"-"+i.options.AppId}r.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete r.AppId)}!i.options.UseRawKey&&r.Key&&"/"===r.Key.substr(0,1)&&(r.Key=r.Key.substr(1))}}(),d=["getAuth","getObjectUrl"].includes(e);if("function"==typeof Promise&&!d&&!o)return new Promise((function(e,n){if(o=function(t,r){t?n(t):e(r)},u)return c(B.error(new Error(u)));t.call(i,r,c)}));if(u)return c(B.error(new Error(u)));var p=t.call(i,r,c);return d?p:void 0}},xml2json:a,json2xml:s,md5:n,clearKey:y,fileSlice:function(e,t,r,o,n){var i;if(e.slice?i=e.slice(t,r):e.mozSlice?i=e.mozSlice(t,r):e.webkitSlice&&(i=e.webkitSlice(t,r)),o&&v){var a=new FileReader;a.onload=function(e){i=null,n(new Blob([a.result]))},a.readAsArrayBuffer(i)}else n(i)},getBodyMd5:function(e,t,r,o){r=r||g,e?"string"==typeof t?r(B.md5(t,!0)):Blob&&t instanceof Blob?B.getFileMd5(t,(function(e,t){r(t)}),o):r():r()},getFileMd5:function(e,t,r){var o=e.size,i=0,a=n.getCtx();!function n(s){if(s>=o){var c=a.digest("hex");t(null,c)}else{var l=Math.min(o,s+b);B.fileSlice(e,s,l,!1,(function(e){!function(e,t){var r,o=new FileReader;FileReader.prototype.readAsBinaryString?(r=FileReader.prototype.readAsBinaryString,o.onload=function(){t(this.result)}):FileReader.prototype.readAsArrayBuffer?r=function(e){var r="",o=new FileReader;o.onload=function(e){for(var n=new Uint8Array(o.result),i=n.byteLength,a=0;a<i;a++)r+=String.fromCharCode(n[a]);t(r)},o.readAsArrayBuffer(e)}:console.error("FileReader not support readAsBinaryString"),r.call(o,e)}(e,(function(t){e=null,a=a.update(t,!0),i+=t.length,t=null,r&&r({loaded:i,total:o,percent:Math.round(i/o*1e4)/1e4}),n(s+b)}))}))}}(0)},b64:function(e){var t,r,o,n="";for(t=0,r=e.length/2;t<r;t++)o=parseInt(e[2*t]+e[2*t+1],16),n+=String.fromCharCode(o);return btoa(n)},extend:w,isArray:k,isInArray:function(e,t){for(var r=!1,o=0;o<e.length;o++)if(t===e[o]){r=!0;break}return r},makeArray:function(e){return k(e)?e:[e]},each:S,map:x,filter:function(e,t){var r=k(e),o=r?[]:{};for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)&&(r?o.push(e[n]):o[n]=e[n]);return o},clone:C,attr:function(e,t,r){return e&&t in e?e[t]:r},uuid:function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},camSafeUrlEncode:u,throttleOnProgress:function(e,t){var r,o,n=this,i=0,a=0,s=Date.now();function c(){if(o=0,t&&"function"==typeof t){r=Date.now();var n,c=Math.max(0,Math.round((a-i)/((r-s)/1e3)*100)/100)||0;n=0===a&&0===e?1:Math.floor(a/e*100)/100||0,s=r,i=a;try{t({loaded:a,total:e,speed:c,percent:n})}catch(l){}}}return function(t,r){if(t&&(a=t.loaded,e=t.total),r)clearTimeout(o),c();else{if(o)return;o=setTimeout(c,n.options.ProgressInterval)}}},getFileSize:function(e,t,r){var o;"string"==typeof t.Body?t.Body=new Blob([t.Body],{type:"text/plain"}):t.Body instanceof ArrayBuffer&&(t.Body=new Blob([t.Body])),t.Body&&(t.Body instanceof Blob||"[object File]"===t.Body.toString()||"[object Blob]"===t.Body.toString())?(o=t.Body.size,t.ContentLength=o,r(null,o)):r(B.error(new Error("params body format error, Only allow File|Blob|String.")))},getSkewTime:E,error:function(e,t){var r=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===o(t)&&null!==t&&(w(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=C(r)),e},obj2str:function(e,t){var r,o,n,i=[],a=d(e);for(r=0;r<a.length;r++)n=void 0===e[o=a[r]]||null===e[o]?"":""+e[o],o=t?u(o).toLowerCase():u(o),n=u(n)||"",i.push(o+"="+n);return i.join("&")},getAuth:function(e){var t,r=(e=e||{}).SecretId,o=e.SecretKey,n=e.KeyTime,a=(e.method||e.Method||"get").toLowerCase(),s=C(e.Query||e.params||{}),c=function(e){var t={};for(var r in e){var o=r.toLowerCase();(o.indexOf("x-cos-")>-1||h.indexOf(o)>-1)&&(t[r]=e[r])}return t}(C(e.Headers||e.headers||{})),l=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+l:0!==(t=e.Pathname||e.pathname||l).indexOf("/")&&(t="/"+t);var u=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&u&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),!r)throw new Error("missing param SecretId");if(!o)throw new Error("missing param SecretKey");var p=Math.round(E(e.SystemClockOffset)/1e3)-1,f=p,m=e.Expires||e.expires;f+=void 0===m?900:1*m||0;var g=r,y=n||p+";"+f,v=n||p+";"+f,b=d(c,!0).join(";").toLowerCase(),w=d(s,!0).join(";").toLowerCase(),k=i.HmacSHA1(v,o).toString(),S=[a,t,B.obj2str(s,!0),B.obj2str(c,!0),""].join("\n"),x=["sha1",y,i.SHA1(S).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+g,"q-sign-time="+y,"q-key-time="+v,"q-header-list="+b,"q-url-param-list="+w,"q-signature="+i.HmacSHA1(x,k).toString()].join("&")},parseSelectPayload:function(e){for(var t={},r=m(e),o={records:[]};e.byteLength;){var n,i=f(e,32,0),a=f(e,32,4),s=i-a-16,c=0;for(e=e.slice(12);c<a;){var l=f(e,8,c),u=m(e,c+1,c+1+l),d=f(e,16,c+l+2),p=m(e,c+l+4,c+l+4+d);t[u]=p,c+=l+4+d}if("Records"===t[":event-type"])n=m(e,c,c+s,!0),o.records.push(n);else if("Stats"===t[":event-type"])n=m(e,c,c+s,!0),o.stats=B.xml2json(n).Stats;else if("error"===t[":event-type"]){var h=t[":error-code"],g=t[":error-message"],y=new Error(g);y.message=g,y.name=y.code=h,o.error=y}e=e.slice(c+s+4)}return{payload:o.records.join(""),body:r}},getSourceParams:function(e){var t=this.options.CopySourceParser;if(t)return t(e);var r=e.match(/^([^.]+-\d+)\.cos(v6|-cdc|-cdz|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return r?{Bucket:r[1],Region:r[3],Key:r[7]}:null},isBrowser:!0,isNode:function(){return"object"!==("undefined"==typeof window?"undefined":o(window))&&"object"===(void 0===t?"undefined":o(t))&&!("object"===("undefined"==typeof globalThis?"undefined":o(globalThis))&&("DedicatedWorkerGlobalScope"===globalThis.constructor.name||globalThis.FileReaderSync))},isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},isIOS_QQ:R&&I,encodeBase64:function(e,t){var r=c.encode(e);return t&&(r=r.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),r}};e.exports=B}).call(this,r(/*! ./../node_modules/process/browser.js */"./node_modules/process/browser.js"))}})},module.exports=factory()})(cosJsSdkV5);var COS=getDefaultExportFromCjs(cosJsSdkV5.exports),ossSwitch="tencent",tencentBucket="daya-online-1303457149",getUploadSign=exports("g",function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(t){var r,o,n,i,a,s,c,l,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>1&&void 0!==u[1]&&u[1],o=t.bucketName,n=t.filename,i=t.postData,a=ossSwitch,s=o,c=n,l={},s=tencentBucket,c="klx/"+n,l={key:"klx/"+i.key},e.abrupt("return",request.post(state.platformApi+"/open/getUploadSign",{hideLoading:r,data:{postData:l,pluginName:a,bucketName:s,filename:c},params:{pluginName:a}}));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),onOnlyFileUpload=exports("o",function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var o,n,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="",n=null,i=new COS({Domain:"https://oss.dayaedu.com",getAuthorization:function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(t,o){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o({Authorization:r.signature});case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()}),e.next=5,i.uploadFile({Bucket:tencentBucket,Region:"ap-nanjing",Key:"klx/".concat(r.name),Body:r.file,SliceSize:524288e3}).then((function(e){var t;o=(null===(t=e.Location)||void 0===t?void 0:t.indexOf("http"))>=0?e.Location:"https://"+e.Location})).catch((function(e){n=e}));case 5:if(!o){e.next=9;break}return e.abrupt("return",o);case 9:throw new Error(n);case 10:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),ColUpload=exports("C",defineComponent({name:"col-upload",props:{modelValue:String,tips:{type:String,default:"点击上传"},deletable:{type:Boolean,default:!0},native:{type:Boolean,default:!1},cropper:{type:Boolean,default:!1},options:{type:Object,default:{}},uploadSize:{type:Number,default:5},onUploadChange:{type:Function,default:function(e){}},bucket:{type:String,default:"daya"},disabled:{type:Boolean,default:!1},hasDeviceAuth:{type:Boolean,default:!0}},methods:{nativeUpload:function(){var e=this;this.disabled||postMessage({api:"chooseFile",content:{type:"img",max:1,bucket:this.bucket}},(function(t){console.log(t,"fileUrl"),e.$emit("update:modelValue",t.fileUrl)}))},beforeRead:function(e){return console.log(e,"beforeRead"),!!(e.size/1024/1024<this.uploadSize)||(Toast("上传文件大小不能超过 ".concat(this.uploadSize,"MB")),!1)},beforeDelete:function(e,t){return!0},afterRead:function(e,t){var r=this;return _asyncToGenerator(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.status="uploading",e.message="上传中...",t.next=5,r.uploadFile(e.file);case 5:t.next=11;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0,"2323"),Toast.clear();case 11:case"end":return t.stop()}}),t,null,[[0,7]])})))()},onClose:function(e){this.$emit("update:modelValue",null),this.onUploadChange(),e.stopPropagation()},getFile:function(e){var t=this;return _asyncToGenerator(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t.uploadFile(e);case 3:r.next=7;break;case 5:r.prev=5,r.t0=r.catch(0);case 7:case"end":return r.stop()}}),r,null,[[0,5]])})))()},uploadFile:function(e){var t=this;return _asyncToGenerator(regeneratorRuntime.mark((function r(){var o,n,i,a,s,c,l;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.name||"",n=o&&o.replace(/ /gi,"_"),i=(new Date).getTime()+n,console.log(e),r.next=7,getUploadSign({filename:i,bucketName:t.bucket,postData:{filename:i,acl:"public-read",key:i}});case 7:return a=r.sent,s=a.data,Toast.loading({message:"加载中...",forbidClick:!0,loadingType:"spinner",duration:0}),c={policy:s.policy,signature:s.signature,key:i,KSSAccessKeyId:s.kssAccessKeyId,acl:"public-read",name:i,file:e},r.next=13,onOnlyFileUpload(getOssUploadUrl(t.bucket),c);case 13:l=r.sent,Toast.clear(),t.$emit("update:modelValue",l),t.onUploadChange(l),r.next=22;break;case 19:r.prev=19,r.t0=r.catch(0),console.log(r.t0,"uploadFile");case 22:case"end":return r.stop()}}),r,null,[[0,19]])})))()}},render:function(){var e=this;return useCustomFieldValue((function(){return e.modelValue})),createVNode("div",{class:styles$1["uploader-section"]},[this.modelValue&&!this.disabled&&this.deletable?createVNode(Icon,{name:iconDelete,onClick:this.onClose,class:styles$1["img-close"]},null):null,this.cropper&&!this.native?createVNode("div",{class:styles$1["col-uploader"]},[this.modelValue?createVNode(Image$1,{fit:"cover",position:"center",class:styles$1.uploadImg,src:this.modelValue},null):createVNode("div",{class:styles$1.uploader},[createVNode(Icon,{name:iconUploader,size:"32"},null),this.tips&&createVNode("p",{class:styles$1.uploaderText},[this.tips])]),this.hasDeviceAuth&&createVNode(ColCropper,{disabled:this.disabled,option:this.options,getFile:this.getFile},null)]):this.native?createVNode("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},onClick:this.nativeUpload},[this.modelValue?createVNode(Image$1,{fit:"cover",position:"center",class:styles$1.uploadImg,src:this.modelValue},null):createVNode("div",{class:styles$1.uploader},[createVNode(Icon,{name:iconUploader,size:"32"},null),this.tips&&createVNode("p",{class:styles$1.uploaderText},[this.tips])])]):createVNode(Uploader,{afterRead:this.afterRead,beforeRead:this.beforeRead,beforeDelete:this.beforeDelete,disabled:this.disabled},{default:function(){return e.modelValue?createVNode(Image$1,{fit:"cover",position:"center",class:styles$1.uploadImg,src:e.modelValue},null):createVNode("div",{class:styles$1.uploader},[createVNode(Icon,{name:iconUploader,size:"32"},null),e.tips&&createVNode("p",{class:styles$1.uploaderText},[e.tips])])}})])}}))}}}))})();
|