/*! For license information please see LICENSES */ (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1459:function(t,e,r){"use strict";r.r(e),r.d(e,"Lazy",(function(){return F})),r.d(e,"LazyComponent",(function(){return G})),r.d(e,"LazyContainer",(function(){return J})),r.d(e,"LazyImage",(function(){return Y}));var n=function(t){return null==t||"function"!=typeof t&&"object"!=typeof t},o=Object.freeze({__proto__:null,default:n,__moduleExports:n}),d=function(t,e){if(null==t)throw new TypeError("expected first argument to be an object.");if(void 0===e||"undefined"==typeof Symbol)return t;if("function"!=typeof Object.getOwnPropertySymbols)return t;for(var r=Object.prototype.propertyIsEnumerable,n=Object(t),o=arguments.length,i=0;++i0}}),!0;return!1}();const T="event",O="observer",$=function(){if(j)return"function"==typeof window.CustomEvent?window.CustomEvent:(t.prototype=window.Event.prototype,t);function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),r}}();function I(t,e){if(!t.length)return;const r=t.indexOf(e);return r>-1?t.splice(r,1):void 0}function C(t,e){if("IMG"!==t.tagName||!t.getAttribute("data-srcset"))return;let r=t.getAttribute("data-srcset");const n=[],o=t.parentNode.offsetWidth*e;let d,l,h;r=r.trim().split(","),r.map((t=>{t=t.trim(),d=t.lastIndexOf(" "),-1===d?(l=t,h=999998):(l=t.substr(0,d),h=parseInt(t.substr(d+1,t.length-d-2),10)),n.push([h,l])})),n.sort((function(a,b){if(a[0]b[0])return-1;if(a[0]===b[0]){if(-1!==b[1].indexOf(".webp",b[1].length-5))return 1;if(-1!==a[1].indexOf(".webp",a[1].length-5))return-1}return 0}));let c,f="";for(let i=0;ij&&window.devicePixelRatio||t;function k(){if(!j)return!1;let t=!0;try{const e=document.createElement("canvas");e.getContext&&e.getContext("2d")&&(t=0===e.toDataURL("image/webp").indexOf("data:image/webp"))}catch(e){t=!1}return t}const Q=function(){if(!j)return;let t=!1;try{let e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),R={on(t,e,r,n=!1){Q?t.addEventListener(e,r,{capture:n,passive:!0}):t.addEventListener(e,r,n)},off(t,e,r,n=!1){t.removeEventListener(e,r,n)}},W=(t,e,r)=>{let image=new Image;if(!t||!t.src){const t=new Error("image src is required");return r(t)}image.src=t.src,t.cors&&(image.crossOrigin=t.cors),image.onload=function(){e({naturalHeight:image.naturalHeight,naturalWidth:image.naturalWidth,src:image.src})},image.onerror=function(t){r(t)}},style=(t,e)=>"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e],B=t=>style(t,"overflow")+style(t,"overflow-y")+style(t,"overflow-x");function D(){}class V{constructor({max:t}){this.options={max:t||100},this._caches=[]}has(t){return this._caches.indexOf(t)>-1}add(t){this.has(t)||(this._caches.push(t),this._caches.length>this.options.max&&this.free())}free(){this._caches.shift()}}class M{constructor({el:t,src:e,error:r,loading:n,bindType:o,$parent:d,options:l,cors:h,elRenderer:c,imageCache:f}){this.el=t,this.src=e,this.error=r,this.loading=n,this.bindType=o,this.attempt=0,this.cors=h,this.naturalHeight=0,this.naturalWidth=0,this.options=l,this.rect=null,this.$parent=d,this.elRenderer=c,this._imageCache=f,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}initState(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}record(t){this.performanceData[t]=Date.now()}update({src:t,loading:e,error:r}){const n=this.src;this.src=t,this.loading=e,this.error=r,this.filter(),n!==this.src&&(this.attempt=0,this.initState())}getRect(){this.rect=this.el.getBoundingClientRect()}checkInView(){return this.getRect(),this.rect.topthis.options.preLoadTop&&this.rect.left0}filter(){(function(t){if(!(t instanceof Object))return[];if(Object.keys)return Object.keys(t);{let e=[];for(let r in t)t.hasOwnProperty(r)&&e.push(r);return e}})(this.options.filter).map((t=>{this.options.filter[t](this,this.options)}))}renderLoading(t){this.state.loading=!0,W({src:this.loading,cors:this.cors},(data=>{this.render("loading",!1),this.state.loading=!1,t()}),(()=>{t(),this.state.loading=!1,this.options.silent||console.warn(`VueLazyload log: load failed with loading image(${this.loading})`)}))}load(t=D){return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log(`VueLazyload log: ${this.src} tried too more than ${this.options.attempt} times`),void t()):this.state.rendered&&this.state.loaded?void 0:this._imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,t()):void this.renderLoading((()=>{this.attempt++,this.options.adapter.beforeLoad&&this.options.adapter.beforeLoad(this,this.options),this.record("loadStart"),W({src:this.src,cors:this.cors},(data=>{this.naturalHeight=data.naturalHeight,this.naturalWidth=data.naturalWidth,this.state.loaded=!0,this.state.error=!1,this.record("loadEnd"),this.render("loaded",!1),this.state.rendered=!0,this._imageCache.add(this.src),t()}),(t=>{!this.options.silent&&console.error(t),this.state.error=!0,this.state.loaded=!1,this.render("error",!1)}))}))}render(t,e){this.elRenderer(this,t,e)}performance(){let t="loading",time=0;return this.state.loaded&&(t="loaded",time=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(t="error"),{src:this.src,state:t,time:time}}$destroy(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}const N="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",P=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],U={rootMargin:"0px",threshold:0};function F(t){return class{constructor({preLoad:t,error:e,throttleWait:r,preLoadTop:n,dispatchEvent:o,loading:d,attempt:l,silent:h=!0,scale:c,listenEvents:f,hasbind:m,filter:filter,adapter:v,observer:y,observerOptions:w}){this.version='"1.3.4"',this.mode=T,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:h,dispatchEvent:!!o,throttleWait:r||200,preLoad:t||1.3,preLoadTop:n||0,error:e||N,loading:d||N,attempt:l||3,scale:c||S(c),ListenEvents:f||P,hasbind:!1,supportWebp:k(),filter:filter||{},adapter:v||{},observer:!!y,observerOptions:w||U},this._initEvent(),this._imageCache=new V({max:200}),this.lazyLoadHandler=function(t,e){let r=null,n=null,o=0,d=!1;return function(){if(d=!0,r)return;let l=Date.now()-o,h=this,c=arguments,f=function(){o=Date.now(),r=!1,t.apply(h,c)};l>=e?f():r=setTimeout(f,e),d&&(clearTimeout(n),n=setTimeout(f,2*e))}}(this._lazyLoadHandler.bind(this),this.options.throttleWait),this.setMode(this.options.observer?O:T)}config(t={}){A(this.options,t)}performance(){let t=[];return this.ListenerQueue.map((e=>{t.push(e.performance())})),t}addLazyBox(t){this.ListenerQueue.push(t),j&&(this._addListenerTarget(window),this._observer&&this._observer.observe(t.el),t.$el&&t.$el.parentNode&&this._addListenerTarget(t.$el.parentNode))}add(e,r,n){if(function(t,e){let r=!1;for(let i=0,n=t.length;it.el===e)))return this.update(e,r),t.nextTick(this.lazyLoadHandler);let{src:o,loading:d,error:l,cors:h}=this._valueFormatter(r.value);t.nextTick((()=>{o=C(e,this.options.scale)||o,this._observer&&this._observer.observe(e);const c=Object.keys(r.modifiers)[0];let f;c&&(f=n.context.$refs[c],f=f?f.$el||f:document.getElementById(c)),f||(f=(t=>{if(!j)return;if(!(t instanceof HTMLElement))return window;let e=t;for(;e&&e!==document.body&&e!==document.documentElement&&e.parentNode;){if(/(scroll|auto)/.test(B(e)))return e;e=e.parentNode}return window})(e));const m=new M({bindType:r.arg,$parent:f,el:e,loading:d,error:l,src:o,cors:h,elRenderer:this._elRenderer.bind(this),options:this.options,imageCache:this._imageCache});this.ListenerQueue.push(m),j&&(this._addListenerTarget(window),this._addListenerTarget(f)),this.lazyLoadHandler(),t.nextTick((()=>this.lazyLoadHandler()))}))}update(e,r,n){let{src:o,loading:d,error:l}=this._valueFormatter(r.value);o=C(e,this.options.scale)||o;const h=H(this.ListenerQueue,(t=>t.el===e));h?h.update({src:o,loading:d,error:l}):this.add(e,r,n),this._observer&&(this._observer.unobserve(e),this._observer.observe(e)),this.lazyLoadHandler(),t.nextTick((()=>this.lazyLoadHandler()))}remove(t){if(!t)return;this._observer&&this._observer.unobserve(t);const e=H(this.ListenerQueue,(e=>e.el===t));e&&(this._removeListenerTarget(e.$parent),this._removeListenerTarget(window),I(this.ListenerQueue,e),e.$destroy())}removeComponent(t){t&&(I(this.ListenerQueue,t),this._observer&&this._observer.unobserve(t.el),t.$parent&&t.$el.parentNode&&this._removeListenerTarget(t.$el.parentNode),this._removeListenerTarget(window))}setMode(t){x||t!==O||(t=T),this.mode=t,t===T?(this._observer&&(this.ListenerQueue.forEach((t=>{this._observer.unobserve(t.el)})),this._observer=null),this.TargetQueue.forEach((t=>{this._initListen(t.el,!0)}))):(this.TargetQueue.forEach((t=>{this._initListen(t.el,!1)})),this._initIntersectionObserver())}_addListenerTarget(t){if(!t)return;let e=H(this.TargetQueue,(e=>e.el===t));return e?e.childrenCount++:(e={el:t,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===T&&this._initListen(e.el,!0),this.TargetQueue.push(e)),this.TargetIndex}_removeListenerTarget(t){this.TargetQueue.forEach(((e,r)=>{e.el===t&&(e.childrenCount--,e.childrenCount||(this._initListen(e.el,!1),this.TargetQueue.splice(r,1),e=null))}))}_initListen(t,e){this.options.ListenEvents.forEach((r=>R[e?"on":"off"](t,r,this.lazyLoadHandler)))}_initEvent(){this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=(t,e)=>{this.Event.listeners[t]||(this.Event.listeners[t]=[]),this.Event.listeners[t].push(e)},this.$once=(t,e)=>{const r=this;this.$on(t,(function n(){r.$off(t,n),e.apply(r,arguments)}))},this.$off=(t,e)=>{if(e)I(this.Event.listeners[t],e);else{if(!this.Event.listeners[t])return;this.Event.listeners[t].length=0}},this.$emit=(t,e,r)=>{this.Event.listeners[t]&&this.Event.listeners[t].forEach((t=>t(e,r)))}}_lazyLoadHandler(){const t=[];this.ListenerQueue.forEach(((e,r)=>{e.el&&e.el.parentNode||t.push(e);e.checkInView()&&e.load()})),t.forEach((t=>{I(this.ListenerQueue,t),t.$destroy()}))}_initIntersectionObserver(){x&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach((t=>{this._observer.observe(t.el)})))}_observerHandler(t,e){t.forEach((t=>{t.isIntersecting&&this.ListenerQueue.forEach((e=>{if(e.el===t.target){if(e.state.loaded)return this._observer.unobserve(e.el);e.load()}}))}))}_elRenderer(t,e,r){if(!t.el)return;const{el:n,bindType:o}=t;let d;switch(e){case"loading":d=t.loading;break;case"error":d=t.error;break;default:d=t.src}if(o?n.style[o]='url("'+d+'")':n.getAttribute("src")!==d&&n.setAttribute("src",d),n.setAttribute("lazy",e),this.$emit(e,t,r),this.options.adapter[e]&&this.options.adapter[e](t,this.options),this.options.dispatchEvent){const r=new $(e,{detail:t});n.dispatchEvent(r)}}_valueFormatter(t){let e=t,r=this.options.loading,n=this.options.error;var o;return null!==(o=t)&&"object"==typeof o&&(t.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+t),e=t.src,r=t.loading||this.options.loading,n=t.error||this.options.error),{src:e,loading:r,error:n}}}}F.install=(t,e={})=>{const r=new(F(t))(e);"2"===t.version.split(".")[0]?t.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}):t.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update(t,e){A(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind(){r.remove(this.el)}})};const G=t=>({props:{tag:{type:String,default:"div"}},render(t){return t(this.tag,null,this.show?this.$slots.default:null)},data:()=>({el:null,state:{loaded:!1},rect:{},show:!1}),mounted(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy(){t.removeComponent(this)},methods:{getRect(){this.rect=this.$el.getBoundingClientRect()},checkInView(){return this.getRect(),j&&this.rect.top0&&this.rect.left0},load(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy(){return this.$destroy}}});G.install=function(t,e={}){const r=new(F(t))(e);t.component("lazy-component",G(r))};class J{constructor({lazy:t}){this.lazy=t,t.lazyContainerMananger=this,this._queue=[]}bind(t,e,r){const n=new X({el:t,binding:e,vnode:r,lazy:this.lazy});this._queue.push(n)}update(t,e,r){const n=H(this._queue,(e=>e.el===t));n&&n.update({el:t,binding:e,vnode:r})}unbind(t,e,r){const n=H(this._queue,(e=>e.el===t));n&&(n.clear(),I(this._queue,n))}}const K={selector:"img"};class X{constructor({el:t,binding:e,vnode:r,lazy:n}){this.el=null,this.vnode=r,this.binding=e,this.options={},this.lazy=n,this._queue=[],this.update({el:t,binding:e})}update({el:t,binding:e}){this.el=t,this.options=A({},K,e.value);this.getImgs().forEach((t=>{this.lazy.add(t,A({},this.binding,{value:{src:"dataset"in t?t.dataset.src:t.getAttribute("data-src"),error:("dataset"in t?t.dataset.error:t.getAttribute("data-error"))||this.options.error,loading:("dataset"in t?t.dataset.loading:t.getAttribute("data-loading"))||this.options.loading}}),this.vnode)}))}getImgs(){return function(t){let e=t.length;const r=[];for(let i=0;ithis.lazy.remove(t))),this.vnode=null,this.binding=null,this.lazy=null}}X.install=(t,e={})=>{const r=new(F(t))(e),n=new X({lazy:r});"2"===t.version.split(".")[0]?t.directive("lazy-container",{bind:n.bind.bind(n),componentUpdated:n.update.bind(n),unbind:n.unbind.bind(n)}):t.directive("lazy-container",{update(t,e){n.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind(){n.unbind(this.el)}})};const Y=t=>({props:{src:[String,Object],tag:{type:String,default:"img"}},render(t){return t(this.tag,{attrs:{src:this.renderSrc}},this.$slots.default)},data:()=>({el:null,options:{src:"",error:"",loading:"",attempt:t.options.attempt},state:{loaded:!1,error:!1,attempt:0},rect:{},renderSrc:""}),watch:{src(){this.init(),t.addLazyBox(this),t.lazyLoadHandler()}},created(){this.init(),this.renderSrc=this.options.loading},mounted(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy(){t.removeComponent(this)},methods:{init(){const{src:e,loading:r,error:n}=t._valueFormatter(this.src);this.state.loaded=!1,this.options.src=e,this.options.error=n,this.options.loading=r,this.renderSrc=this.options.loading},getRect(){this.rect=this.$el.getBoundingClientRect()},checkInView(){return this.getRect(),j&&this.rect.top0&&this.rect.left0},load(e=D){if(this.state.attempt>this.options.attempt-1&&this.state.error)return t.options.silent||console.log(`VueLazyload log: ${this.options.src} tried too more than ${this.options.attempt} times`),void e();const r=this.options.src;W({src:r},(({src:t})=>{this.renderSrc=t,this.state.loaded=!0}),(t=>{this.state.attempt++,this.renderSrc=this.options.error,this.state.error=!0}))}}});Y.install=(t,e={})=>{const r=new(F(t))(e);t.component("lazy-image",Y(r))};var Z={install(t,e={}){const r=new(F(t))(e),n=new J({lazy:r}),o="2"===t.version.split(".")[0];t.prototype.$Lazyload=r,e.lazyComponent&&t.component("lazy-component",G(r)),e.lazyImage&&t.component("lazy-image",Y(r)),o?(t.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}),t.directive("lazy-container",{bind:n.bind.bind(n),componentUpdated:n.update.bind(n),unbind:n.unbind.bind(n)})):(t.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update(t,e){A(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind(){r.remove(this.el)}}),t.directive("lazy-container",{update(t,e){n.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind(){n.unbind(this.el)}}))}};e.default=Z},1460:function(t,e,r){var n=r(112),o=r(1482),d=r(373),l=Math.max,h=Math.min;t.exports=function(t,e,r){var c,f,m,v,y,w,_=0,L=!1,E=!1,z=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function A(time){var e=c,r=f;return c=f=void 0,_=time,v=t.apply(r,e)}function j(time){return _=time,y=setTimeout(T,e),L?A(time):v}function x(time){var t=time-w;return void 0===w||t>=e||t<0||E&&time-_>=m}function T(){var time=o();if(x(time))return O(time);y=setTimeout(T,function(time){var t=e-(time-w);return E?h(t,m-(time-_)):t}(time))}function O(time){return y=void 0,z&&c?A(time):(c=f=void 0,v)}function $(){var time=o(),t=x(time);if(c=arguments,f=this,w=time,t){if(void 0===y)return j(w);if(E)return clearTimeout(y),y=setTimeout(T,e),A(w)}return void 0===y&&(y=setTimeout(T,e)),v}return e=d(e)||0,n(r)&&(L=!!r.leading,m=(E="maxWait"in r)?l(d(r.maxWait)||0,e):m,z="trailing"in r?!!r.trailing:z),$.cancel=function(){void 0!==y&&clearTimeout(y),_=0,c=w=f=y=void 0},$.flush=function(){return void 0===y?v:O(o())},$}},1482:function(t,e,r){var n=r(105);t.exports=function(){return n.Date.now()}}}]); //# sourceMappingURL=a15e824.modern.js.map