Your Name
2022-09-29 6f954f70f54e492157b97db314eaaaeb12192580
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-c040","chunk-1c22"],{LR4q:function(e,t,n){"use strict";var r=n("Mpsw");const i=r.default.prototype.$isServer,o=(i||Number(document.documentMode),function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")}),a=!i&&document.addEventListener?function(e,t,n){e&&t&&n&&e.addEventListener(t,n,!1)}:function(e,t,n){e&&t&&n&&e.attachEvent("on"+t,n)},s=!i&&document.removeEventListener?function(e,t,n){e&&t&&e.removeEventListener(t,n,!1)}:function(e,t,n){e&&t&&e.detachEvent("on"+t,n)};function l(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function c(e,t){if(e){for(var n=e.className,r=(t||"").split(" "),i=0,o=r.length;i<o;i++){var a=r[i];a&&(e.classList?e.classList.add(a):l(e,a)||(n+=" "+a))}e.classList||e.setAttribute("class",n)}}function u(e,t){if(e&&t){for(var n=t.split(" "),r=" "+e.className+" ",i=0,a=n.length;i<a;i++){var s=n[i];s&&(e.classList?e.classList.remove(s):l(e,s)&&(r=r.replace(" "+s+" "," ")))}e.classList||e.setAttribute("class",o(r))}}let d=e=>{return e&&"[object Function]"==={}.toString.call(e)};"function"==typeof/./||"object"==typeof Int8Array||!r.default.prototype.$isServer&&document.childNodes;Object.prototype.hasOwnProperty;function h(e){let t=!1;return function(...n){t||(t=!0,window.requestAnimationFrame(r=>{e.apply(this,n),t=!1}))}}n("dxbA");let f,p=!1,m=!1;const g=function(){if(r.default.prototype.$isServer)return;let e=y.modalDom;return e?p=!0:(p=!1,e=document.createElement("div"),y.modalDom=e,e.addEventListener("touchmove",function(e){e.preventDefault(),e.stopPropagation()}),e.addEventListener("click",function(){y.doOnModalClick&&y.doOnModalClick()})),e},v={},y={modalFade:!0,getInstance:function(e){return v[e]},register:function(e,t){e&&t&&(v[e]=t)},deregister:function(e){e&&(v[e]=null,delete v[e])},nextZIndex:function(){return y.zIndex++},modalStack:[],doOnModalClick:function(){const e=y.modalStack[y.modalStack.length-1];if(!e)return;const t=y.getInstance(e.id);t&&t.closeOnClickModal&&t.close()},openModal:function(e,t,n,i,o){if(r.default.prototype.$isServer)return;if(!e||void 0===t)return;this.modalFade=o;const a=this.modalStack;for(let r=0,l=a.length;r<l;r++){if(a[r].id===e)return}const s=g();if(c(s,"v-modal"),this.modalFade&&!p&&c(s,"v-modal-enter"),i){i.trim().split(/\s+/).forEach(e=>c(s,e))}setTimeout(()=>{u(s,"v-modal-enter")},200),n&&n.parentNode&&11!==n.parentNode.nodeType?n.parentNode.appendChild(s):document.body.appendChild(s),t&&(s.style.zIndex=t),s.tabIndex=0,s.style.display="",this.modalStack.push({id:e,zIndex:t,modalClass:i})},closeModal:function(e){const t=this.modalStack,n=g();if(t.length>0){const r=t[t.length-1];if(r.id===e){if(r.modalClass){r.modalClass.trim().split(/\s+/).forEach(e=>u(n,e))}t.pop(),t.length>0&&(n.style.zIndex=t[t.length-1].zIndex)}else for(let n=t.length-1;n>=0;n--)if(t[n].id===e){t.splice(n,1);break}}0===t.length&&(this.modalFade&&c(n,"v-modal-leave"),setTimeout(()=>{0===t.length&&(n.parentNode&&n.parentNode.removeChild(n),n.style.display="none",y.modalDom=void 0),u(n,"v-modal-leave")},200))}};Object.defineProperty(y,"zIndex",{configurable:!0,get:()=>(m||(f=f||(r.default.prototype.$ELEMENT||{}).zIndex||2e3,m=!0),f),set(e){f=e}});r.default.prototype.$isServer||window.addEventListener("keydown",function(e){if(27===e.keyCode){const e=function(){if(!r.default.prototype.$isServer&&y.modalStack.length>0){const e=y.modalStack[y.modalStack.length-1];if(!e)return;return y.getInstance(e.id)}}();e&&e.closeOnPressEscape&&(e.handleClose?e.handleClose():e.handleAction?e.handleAction("cancel"):e.close())}});var w=y;Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const _={CONTAIN:{name:"contain",icon:"el-icon-full-screen"},ORIGINAL:{name:"original",icon:"el-icon-c-scale-to-original"}},x=!r.default.prototype.$isServer&&window.navigator.userAgent.match(/firefox/i)?"DOMMouseScroll":"mousewheel";var b={name:"elImageViewer",props:{urlList:{type:Array,default:()=>[]},zIndex:{type:Number,default:2e3},onSwitch:{type:Function,default:()=>{}},onClose:{type:Function,default:()=>{}},initialIndex:{type:Number,default:0},appendToBody:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0}},data(){return{index:this.initialIndex,isShow:!1,infinite:!0,loading:!1,mode:_.CONTAIN,transform:{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}},computed:{isSingle(){return this.urlList.length<=1},isFirst(){return 0===this.index},isLast(){return this.index===this.urlList.length-1},currentImg(){return this.urlList[this.index]},imgStyle(){const{scale:e,deg:t,offsetX:n,offsetY:r,enableTransition:i}=this.transform,o={transform:`scale(${e}) rotate(${t}deg)`,transition:i?"transform .3s":"","margin-left":`${n}px`,"margin-top":`${r}px`};return this.mode===_.CONTAIN&&(o.maxWidth=o.maxHeight="100%"),o},viewerZIndex(){const e=w.nextZIndex();return this.zIndex>e?this.zIndex:e}},watch:{index:{handler:function(e){this.reset(),this.onSwitch(e)}},currentImg(e){this.$nextTick(e=>{this.$refs.img[0].complete||(this.loading=!0)})}},methods:{hide(){this.deviceSupportUninstall(),this.onClose()},deviceSupportInstall(){this._keyDownHandler=(e=>{switch(e.stopPropagation(),e.keyCode){case 27:this.hide();break;case 32:this.toggleMode();break;case 37:this.prev();break;case 38:this.handleActions("zoomIn");break;case 39:this.next();break;case 40:this.handleActions("zoomOut")}}),this._mouseWheelHandler=h(e=>{(e.wheelDelta?e.wheelDelta:-e.detail)>0?this.handleActions("zoomIn",{zoomRate:.015,enableTransition:!1}):this.handleActions("zoomOut",{zoomRate:.015,enableTransition:!1})}),a(document,"keydown",this._keyDownHandler),a(document,x,this._mouseWheelHandler)},deviceSupportUninstall(){s(document,"keydown",this._keyDownHandler),s(document,x,this._mouseWheelHandler),this._keyDownHandler=null,this._mouseWheelHandler=null},handleImgLoad(e){this.loading=!1},handleImgError(e){this.loading=!1,e.target.alt="加载失败"},handleMouseDown(e){if(this.loading||0!==e.button)return;const{offsetX:t,offsetY:n}=this.transform,r=e.pageX,i=e.pageY;this._dragHandler=h(e=>{this.transform.offsetX=t+e.pageX-r,this.transform.offsetY=n+e.pageY-i}),a(document,"mousemove",this._dragHandler),a(document,"mouseup",e=>{s(document,"mousemove",this._dragHandler)}),e.preventDefault()},handleMaskClick(){this.maskClosable&&this.hide()},reset(){this.transform={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},toggleMode(){if(this.loading)return;const e=Object.keys(_),t=(Object.values(_).indexOf(this.mode)+1)%e.length;this.mode=_[e[t]],this.reset()},prev(){if(this.isFirst&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index-1+e)%e},next(){if(this.isLast&&!this.infinite)return;const e=this.urlList.length;this.index=(this.index+1)%e},handleActions(e,t={}){if(this.loading)return;const{zoomRate:n,rotateDeg:r,enableTransition:i}={zoomRate:.2,rotateDeg:90,enableTransition:!0,...t},{transform:o}=this;switch(e){case"zoomOut":o.scale>.2&&(o.scale=parseFloat((o.scale-n).toFixed(3)));break;case"zoomIn":o.scale=parseFloat((o.scale+n).toFixed(3));break;case"clocelise":o.deg+=r;break;case"anticlocelise":o.deg-=r}o.enableTransition=i}},mounted(){this.deviceSupportInstall(),this.appendToBody&&document.body.appendChild(this.$el),this.$refs["el-image-viewer__wrapper"].focus()},destroyed(){this.appendToBody&&this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)}},k=n("ZrdR"),L=Object(k.a)(b,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:"viewer-fade"}},[n("div",{ref:"el-image-viewer__wrapper",staticClass:"el-image-viewer__wrapper",style:{"z-index":e.viewerZIndex},attrs:{tabindex:"-1"}},[n("div",{staticClass:"el-image-viewer__mask",on:{click:function(t){return t.target!==t.currentTarget?null:e.handleMaskClick(t)}}}),e._v(" "),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__close",on:{click:e.hide}},[n("i",{staticClass:"el-icon-close"})]),e._v(" "),e.isSingle?e._e():[n("span",{staticClass:"el-image-viewer__btn el-image-viewer__prev",class:{"is-disabled":!e.infinite&&e.isFirst},on:{click:e.prev}},[n("i",{staticClass:"el-icon-arrow-left"})]),e._v(" "),n("span",{staticClass:"el-image-viewer__btn el-image-viewer__next",class:{"is-disabled":!e.infinite&&e.isLast},on:{click:e.next}},[n("i",{staticClass:"el-icon-arrow-right"})])],e._v(" "),n("div",{staticClass:"el-image-viewer__btn el-image-viewer__actions"},[n("div",{staticClass:"el-image-viewer__actions__inner"},[n("i",{staticClass:"el-icon-zoom-out",on:{click:function(t){e.handleActions("zoomOut")}}}),e._v(" "),n("i",{staticClass:"el-icon-zoom-in",on:{click:function(t){e.handleActions("zoomIn")}}}),e._v(" "),n("i",{staticClass:"el-image-viewer__actions__divider"}),e._v(" "),n("i",{class:e.mode.icon,on:{click:e.toggleMode}}),e._v(" "),n("i",{staticClass:"el-image-viewer__actions__divider"}),e._v(" "),n("i",{staticClass:"el-icon-refresh-left",on:{click:function(t){e.handleActions("anticlocelise")}}}),e._v(" "),n("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){e.handleActions("clocelise")}}})])]),e._v(" "),n("div",{staticClass:"el-image-viewer__canvas"},e._l(e.urlList,function(t,r){return r===e.index?n("img",{key:t,ref:"img",refInFor:!0,staticClass:"el-image-viewer__img",style:e.imgStyle,attrs:{src:e.currentImg},on:{load:e.handleImgLoad,error:e.handleImgError,mousedown:e.handleMouseDown}}):e._e()}))],2)])},[],!1,null,null,null);L.options.__file="image-viewer.vue";t.a=L.exports},cLjf:function(e,t,n){e.exports=n("xOJF")},dxbA:function(e,t,n){"use strict";t.a=function(e){for(let t=1,n=arguments.length;t<n;t++){let n=arguments[t]||{};for(let t in n)if(n.hasOwnProperty(t)){let r=n[t];void 0!==r&&(e[t]=r)}}return e}},hDQ3:function(e,t,n){"use strict";t.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n("Asgo"));t.default=function(e){return function(){var t=e.apply(this,arguments);return new r.default(function(e,n){return function i(o,a){try{var s=t[o](a),l=s.value}catch(e){return void n(e)}if(!s.done)return r.default.resolve(l).then(function(e){i("next",e)},function(e){i("throw",e)});e(l)}("next")})}}},k4Ii:function(e,t){!function(t){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag",c="object"==typeof e,u=t.regeneratorRuntime;if(u)c&&(e.exports=u);else{(u=t.regeneratorRuntime=c?e.exports:{}).wrap=_;var d="suspendedStart",h="suspendedYield",f="executing",p="completed",m={},g={};g[a]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(F([])));y&&y!==r&&i.call(y,a)&&(g=y);var w=L.prototype=b.prototype=Object.create(g);k.prototype=w.constructor=L,L.constructor=k,L[l]=k.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,L):(e.__proto__=L,l in e||(e[l]="GeneratorFunction")),e.prototype=Object.create(w),e},u.awrap=function(e){return{__await:e}},I(E.prototype),E.prototype[s]=function(){return this},u.AsyncIterator=E,u.async=function(e,t,n,r){var i=new E(_(e,t,n,r));return u.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},I(w),w[l]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=F,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return s.type="throw",s.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:F(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),m}}}function _(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),a=new N(r||[]);return o._invoke=function(e,t,n){var r=d;return function(i,o){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=C(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var l=x(e,t,n);if("normal"===l.type){if(r=n.done?p:h,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function x(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function b(){}function k(){}function L(){}function I(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function E(e){var t;this._invoke=function(n,r){function o(){return new Promise(function(t,o){!function t(n,r,o,a){var s=x(e[n],e,r);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,o,a)},function(e){t("throw",e,o,a)}):Promise.resolve(c).then(function(e){l.value=e,o(l)},a)}a(s.arg)}(n,r,t,o)})}return t=t?t.then(o,o):o()}}function C(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,C(e,t),"throw"===t.method))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=x(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,m;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,m):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function F(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return o.next=o}}return{next:A}}function A(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},xOJF:function(e,t,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n("k4Ii"),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}}}]);