@egjs/grid
Advanced tools
Comparing version 1.16.0-beta.10 to 1.16.0-beta.11
@@ -12,2 +12,3 @@ /** | ||
* @property - The item key. <ko>아이템 키.</ko> | ||
* @property - The item index. <ko>아이템 index.</ko> | ||
* @property - The element for the item. <ko>아이템에 있는 엘리먼트.</ko> | ||
@@ -27,2 +28,3 @@ * @property - State of whether the element has been added to the container. <ko>element가 container에 추가되었는지 상태.</ko> | ||
key?: string | number; | ||
index?: number; | ||
element?: HTMLElement | null; | ||
@@ -29,0 +31,0 @@ mountState?: MOUNT_STATE; |
@@ -7,5 +7,5 @@ /* | ||
repository: https://github.com/naver/egjs-grid | ||
version: 1.16.0-beta.10 | ||
version: 1.16.0-beta.11 | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Grid=t()}(this,function(){"use strict";var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var p=function(){return(p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function o(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(o<3?r(s):3<o?r(t,n,s):r(t,n))||s);return 3<o&&s&&Object.defineProperty(t,n,s),s}function m(e,t){for(var n=0,i=t.length,r=e.length;n<i;n++,r++)e[r]=t[n];return e}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(i=o.next()).done;)s.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[t]));return e}function l(e){return void 0===e}var a,g,R,u=function(){function e(e,t){var n,i;if(this.eventType=e,this._canceled=!1,t)try{for(var r=h(Object.keys(t)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=t[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}}var t=e.prototype;return t.stop=function(){this._canceled=!0},t.isCanceled=function(){return this._canceled},e}(),n=function(){function e(){this._eventHandler={}}var t=e.prototype;return t.trigger=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var i=t instanceof u?t.eventType:t,i=s(this._eventHandler[i]||[]);return i.length<=0||(t instanceof u?(t.currentTarget=this,i.forEach(function(e){e(t)})):i.forEach(function(e){e.apply(void 0,s(n))})),this},t.once=function(n,i){var r,o=this;if("object"==typeof n&&l(i)){var e,t=n;for(e in t)this.once(e,t[e]);return this}return"string"==typeof n&&"function"==typeof i&&this.on(n,r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.apply(void 0,s(e)),o.off(n,r)}),this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&l(t)){var n,i=e;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof e&&"function"==typeof t&&(r=this._eventHandler[e],l(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)),this},t.off=function(e,t){var n,i;if(l(e))return this._eventHandler={},this;if(l(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r,o=e;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[e];if(s){var a=0;try{for(var u=h(s),c=u.next();!c.done;c=u.next()){if(c.value===t){s.splice(a,1),s.length<=0&&delete this._eventHandler[e];break}a++}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},e.VERSION="3.0.1",e}(),c=u,f={horizontal:!1,useTransform:!1,percentage:!1,isEqualSize:!1,isConstantSize:!1,gap:0,attributePrefix:"data-grid-",resizeDebounce:100,maxResizeDebounce:0,autoResize:!0,preserveUIOnDestroy:!1,defaultDirection:"end",externalContainerManager:null,externalItemRenderer:null,renderOnPropertyChange:!0,useFit:!0,outlineLength:0,outlineSize:0,useRoundedSize:!0,useResizeObserver:!1,observeChildren:!1};(q=a=a||{})[q.PROPERTY=1]="PROPERTY",q[q.RENDER_PROPERTY=2]="RENDER_PROPERTY",(B=g=g||{})[B.UNCHECKED=1]="UNCHECKED",B[B.UNMOUNTED=2]="UNMOUNTED",B[B.MOUNTED=3]="MOUNTED",(ce=R=R||{})[ce.NEED_UPDATE=1]="NEED_UPDATE",ce[ce.WAIT_LOADING=2]="WAIT_LOADING",ce[ce.UPDATED=3]="UPDATED";var z={gap:a.RENDER_PROPERTY,defaultDirection:a.PROPERTY,renderOnPropertyChange:a.PROPERTY,preserveUIOnDestroy:a.PROPERTY,useFit:a.PROPERTY,outlineSize:a.RENDER_PROPERTY,outlineLength:a.RENDER_PROPERTY},e=["syncElements","updateItems","getItems","setItems","renderItems","getContainerInlineSize","getContainerElement"],d={horizontal:{inlinePos:"top",contentPos:"left",inlineSize:"height",contentSize:"width"},vertical:{inlinePos:"left",contentPos:"top",inlineSize:"width",contentSize:"height"}},v=function(){function e(){this.keys=[],this.values=[]}var t=e.prototype;return t.get=function(e){return this.values[this.keys.indexOf(e)]},t.set=function(e,t){var n=this.keys,i=this.values,r=n.indexOf(e),r=-1===r?n.length:r;n[r]=e,i[r]=t},e}(),S=function(){function e(){this.object={}}var t=e.prototype;return t.get=function(e){return this.object[e]},t.set=function(e,t){this.object[e]=t},e}(),y="function"==typeof Map,E=function(){function e(){}var t=e.prototype;return t.connect=function(e,t){this.prev=e,this.next=t,e&&(e.next=this),t&&(t.prev=this)},t.disconnect=function(){var e=this.prev,t=this.next;e&&(e.next=t),t&&(t.prev=e)},t.getIndex=function(){for(var e=this,t=-1;e;)e=e.prev,++t;return t},e}();var _=function(){function e(e,t,n,i,r,o,s,a){this.prevList=e,this.list=t,this.added=n,this.removed=i,this.changed=r,this.maintained=o,this.changedBeforeAdded=s,this.fixed=a}var t=e.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){var e,n,r,o,e=(e=this.changedBeforeAdded,n=this.fixed,r=[],o=[],e.forEach(function(e){var t=e[0],n=e[1],e=new E;r[t]=e,o[n]=e}),r.forEach(function(e,t){e.connect(r[t-1])}),e.filter(function(e,t){return!n[t]}).map(function(e,t){var n=e[0],i=e[1];if(n===i)return[0,0];e=r[n],n=o[i-1],i=e.getIndex();return e.disconnect(),n?e.connect(n,n.next):e.connect(void 0,r[0]),[i,e.getIndex()]})),s=this.changed,a=[];this.cacheOrdered=e.filter(function(e,t){var n=e[0],i=e[1],e=s[t],t=e[0],e=e[1];if(n!==i)return a.push([t,e]),!0}),this.cachePureChanged=a},e}();var t,P="function"==typeof Map?void 0:(t=0,function(e){return e.__DIFF_KEY__||(e.__DIFF_KEY__=++t)});function b(e,t){return n=e,i=t,r=P,e=y?Map:r?S:v,t=r||function(e){return e},o=[],s=[],a=[],r=n.map(t),t=i.map(t),u=new e,c=new e,h=[],l=[],f={},d=[],g=p=0,r.forEach(function(e,t){u.set(e,t)}),t.forEach(function(e,t){c.set(e,t)}),r.forEach(function(e,t){e=c.get(e);void 0===e?(++g,s.push(t)):f[e]=g}),t.forEach(function(e,t){e=u.get(e);void 0===e?(o.push(t),++p):(a.push([e,t]),g=f[t]||0,h.push([e-g,t-p]),l.push(t===e),e!==t&&d.push([e,t]))}),s.reverse(),new _(n,i,o,s,d,a,h,l);var n,i,r,o,s,a,u,c,h,l,f,d,p,g}function C(n,i){var e=O(n);return b(i.map(function(e){return e.target}),e.map(function(e){return e.element})).maintained.filter(function(e){var t=e[0],e=e[1],t=i[t].size,e=n[e];return!e.inlineSize||!e.contentSize||t.inlineSize!==e.computedInlineSize||t.blockSize!==e.computedContentSize}).map(function(e){e=e[1];return n[e]})}function O(e){return e.filter(function(e){return e.element})}function x(e){return O(e).map(function(e){return e.element})}function I(e){return"string"==typeof e}function T(e){return"object"==typeof e}function w(e){return"number"==typeof e}function D(e){return e.reduce(function(e,t){return e+t},0)}function M(e){var t,r=e.prototype,o=e.propertyTypes;for(t in o)!function(n){var i=o[n]===a.RENDER_PROPERTY,e=Object.getOwnPropertyDescriptor(r,n)||{};Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:e.get||function(){return this.options[n]},set:e.set||function(e){var t=this.options;t[n]!==e&&(t[n]=e,i&&t.renderOnPropertyChange&&this.scheduleRender())}})}(t)}function N(t){return function(e,r){t.forEach(function(i){i in e||(e[i]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(n=this[r])[i].apply(n,e);return n===this[r]?this:n})})}}function k(e){for(var t=[],n=0;n<e;++n)t.push(n);return t}function A(e,t){return Math.max(e-t[1],t[0]-e,0)+1}function L(e,t,n){return Math.min(n,Math.max(e,t))}function U(e,t){if(!t)return e;var n=1/t;return Math.round(e/t)/n}var j=N(e),F=function(){function e(e,t){var u=this;void 0===t&&(t={}),this._resizeTimer=0,this._maxResizeDebounceTimer=0,this.rect={width:0,height:0},this._updatedEntries=[],this._onWindowResize=function(){u._scheduleResize([{target:u.container}])},this._onObserve=function(e){var t=u._options,i=u.container,r=t.rectBox,o=t.childrenRectBox;u._scheduleResize(e.map(function(e){var t,n="border-box"===(e.target===i?r:o)?e.borderBoxSize:e.contentBoxSize;return{size:(n=!n?[{inlineSize:(t=e.contentRect).width,blockSize:t.height}]:n)[0]||n,target:e.target}}))},this._scheduleResize=function(e){var t=u._options,n=t.resizeDebounce,t=t.maxResizeDebounce,i=u._updatedEntries;i.push.apply(i,e),u._updatedEntries=i.filter(function(e,t){return i.lastIndexOf(e)===t}),!u._maxResizeDebounceTimer&&n<=t&&(u._maxResizeDebounceTimer=window.setTimeout(u._onResize,t)),u._resizeTimer&&(clearTimeout(u._resizeTimer),u._resizeTimer=0),u._resizeTimer=window.setTimeout(u._onResize,n)},this._onResize=function(){clearTimeout(u._resizeTimer),clearTimeout(u._maxResizeDebounceTimer),u._maxResizeDebounceTimer=0,u._resizeTimer=0;var t,e,n,i=u._updatedEntries,r=u.container,o=i.filter(function(e){return e.target!==r||(t=e,!1)}),s=0<o.length,a=!!t;a&&(e=u._options.watchDirection,n=u.rect,(i=t.size)?u.setRect({width:i.inlineSize,height:i.blockSize}):u.resize(),i=u.rect,a=!e||("box"===e||"width"===e)&&n.width!==i.width||("box"===e||"height"===e)&&n.height!==i.height),u._updatedEntries=[],(a||s)&&u._emitter.trigger("resize",{isResizeContainer:a,childEntries:o})},this._options=p({resizeDebounce:100,maxResizeDebounce:0,useResizeObserver:!1,useWindowResize:!0,watchDirection:!1,rectBox:"content-box",childrenRectBox:"border-box"},t),this.container=I(e)?document.querySelector(e):e,this._init()}var t=e.prototype;return t.getRect=function(){return this.rect},t.setRect=function(e){this.rect=p({},e)},t.isObserverEnabled=function(){return!!this._observer},t.resize=function(){var e=this.container;this.setRect("border-box"===this._options.rectBox?{width:e.offsetWidth,height:e.offsetHeight}:{width:e.clientWidth,height:e.clientHeight})},t.observeChildren=function(e){var t,n=this._observer;n&&(t=this._options.childrenRectBox,e.forEach(function(e){e&&n.observe(e,{box:t})}))},t.unobserveChildren=function(e){var t=this._observer;t&&e.forEach(function(e){e&&t.unobserve(e)})},t.listen=function(e){return this._emitter.on("resize",e),this},t.destroy=function(){var e;null!==(e=this._observer)&&void 0!==e&&e.disconnect(),this._options.useWindowResize&&window.removeEventListener("resize",this._onWindowResize)},t._init=function(){var e=this.container,t=this._options;this._emitter=new n,t.useResizeObserver&&window.ResizeObserver&&(this._observer=new window.ResizeObserver(this._onObserve),this._observer.observe(e,{box:t.rectBox})),t.useWindowResize&&window.addEventListener("resize",this._onWindowResize),this.resize()},e}(),Y=function(i){function e(e,t){var n=i.call(this)||this;return n.container=e,n._onResize=function(e){n.trigger("resize",e)},n.options=p({horizontal:f.horizontal,autoResize:f.autoResize,resizeDebounce:f.resizeDebounce,maxResizeDebounce:f.maxResizeDebounce,useResizeObserver:f.useResizeObserver},t),n._init(),n}r(e,i);var t=e.prototype;return t.resize=function(){var e=this.container;this.setRect({width:e.clientWidth,height:e.clientHeight})},t.isObserverEnabled=function(){return this._watcher.isObserverEnabled()},t.getRect=function(){return this._watcher.getRect()},t.observeChildren=function(e){this._watcher.observeChildren(e)},t.unobserveChildren=function(e){this._watcher.unobserveChildren(e)},t.setRect=function(e){this._watcher.setRect(e)},t.getInlineSize=function(){return this.getRect()[this._names.inlineSize]},t.getContentSize=function(){return this.getRect()[this._names.contentSize]},t.getStatus=function(){return{rect:this._watcher.getRect()}},t.setStatus=function(e){this.setRect(e.rect),this.setContentSize(this.getContentSize())},t.setContentSize=function(e){var t,n=this.options.horizontal?"width":"height";this.setRect(p(p({},this.getRect()),((t={})[n]=e,t))),this.container.style[n]=e+"px"},t.destroy=function(e){void 0===e&&(e={}),this._watcher.destroy(),e.preserveUI||(this.container.style.cssText=this.orgCSSText)},t._init=function(){var e=this.container,t=window.getComputedStyle(e);this.orgCSSText=e.style.cssText,"static"===t.position&&(e.style.position="relative");t=this.options;this._watcher=new F(e,{useWindowResize:t.autoResize,useResizeObserver:t.useResizeObserver,resizeDebounce:t.resizeDebounce,maxResizeDebounce:t.maxResizeDebounce,watchDirection:!!t.useResizeObserver&&this._names.inlineSize}).listen(this._onResize)},Object.defineProperty(t,"_names",{get:function(){return d[this.options.horizontal?"horizontal":"vertical"]},enumerable:!1,configurable:!0}),e}(n),W=function(e,t){return(W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function G(e,t){function n(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var H=function(){return(H=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};var q="undefined"!=typeof window,B=q?window.navigator.userAgent:"",V=q&&!!("getComputedStyle"in window),K=/MSIE|Trident|Windows Phone|Edge/.test(B),X=q&&!!("addEventListener"in document),J="width",$="height";function Q(e,t){return e.getAttribute(t)||""}function Z(e){return[].slice.call(e)}function ee(e,t){return void 0===t&&(t="data-"),"loading"in e&&"lazy"===e.getAttribute("loading")||!!e.getAttribute(t+"lazy")}function te(e,t,n){X?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function ne(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function ie(e,t){var n=e["client"+t]||e["offset"+t];return parseFloat(n||(e=e,((V?window.getComputedStyle(e):e.currentStyle)||{})[t.toLowerCase()]))||0}function re(e,t,n){var i=Z(e.querySelectorAll(function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),r=0,t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i}(["["+n+"skip] ["+n+"width]"],t.map(function(e){return["["+n+"skip] "+e,e+"["+n+"skip]","["+n+"width] "+e].join(", ")})).join(", ")));return Z(e.querySelectorAll("["+n+"width], "+t.join(", "))).filter(function(e){return-1===i.indexOf(e)})}var oe=[];function se(e,t){oe.length||te(window,"resize",ue),e.__PREFIX__=t,oe.push(e),ae(e)}function ae(e,t){void 0===t&&(t="data-");var n,i=e.__PREFIX__||t,r=parseInt(Q(e,""+i+J),10)||0,t=parseInt(Q(e,""+i+$),10)||0;Q(e,i+"fixed")===$?(n=ie(e,"Height")||t,e.style[J]=r/t*n+"px"):(n=ie(e,"Width")||r,e.style[$]=t/r*n+"px")}function ue(){oe.forEach(function(e){ae(e)})}var ce=function(r){function e(e,t){void 0===t&&(t={});var n=r.call(this)||this;n.isReady=!1,n.isPreReady=!1,n.hasDataSize=!1,n.hasLoading=!1,n.isSkip=!1,n.onCheck=function(e){n.clear(),e&&"error"===e.type&&n.onError(n.element),n.hasLoading&&n.checkElement()||(e=!n.hasDataSize&&!n.hasLoading,n.onReady(e))},n.options=H({prefix:"data-"},t),n.element=e;var i=n.options.prefix;return n.hasDataSize=(t=i,!!e.getAttribute((t=void 0===t?"data-":t)+"width")),n.isSkip=(t=i,!!e.getAttribute((t=void 0===t?"data-":t)+"skip")),n.hasLoading=ee(e,i),n}G(e,r);var t=e.prototype;return t.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(!0),!1):(this.hasDataSize&&se(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},t.addEvents=function(){var t=this,n=this.element;this.constructor.EVENTS.forEach(function(e){te(n,e,t.onCheck)})},t.clear=function(){var t=this,n=this.element;this.constructor.EVENTS.forEach(function(e){ne(n,e,t.onCheck)}),this.removeAutoSizer()},t.destroy=function(){this.clear(),this.off()},t.removeAutoSizer=function(){var e,t,n;this.hasDataSize&&(n=this.options.prefix,e=this.element,t=n,(n=oe.indexOf(e))<0||(t=Q(e,t+"fixed"),delete e.__PREFIX__,e.style[t===$?J:$]="",oe.splice(n,1),oe.length||ne(window,"resize",ue)))},t.onError=function(e){this.trigger("error",{element:this.element,target:e})},t.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onReady=function(e){this.isReady||((e=!this.isPreReady&&e)&&(this.isPreReady=!0),this.removeAutoSizer(),this.isReady=!0,this.trigger("ready",{element:this.element,withPreReady:e,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onAlreadyError=function(e){var t=this;setTimeout(function(){t.onError(e)})},t.onAlreadyPreReady=function(){var e=this;setTimeout(function(){e.onPreReady()})},t.onAlreadyReady=function(e){var t=this;setTimeout(function(){t.onReady(e)})},e.EVENTS=[],e}(n),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}G(t,e);var n=t.prototype;return n.setHasLoading=function(e){this.hasLoading=e},n.check=function(){return this.isSkip?(this.onAlreadyReady(!0),!1):(this.hasDataSize?(se(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},n.checkElement=function(){return!0},n.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},n.onAlreadyPreReady=function(){e.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},t.EVENTS=[],t}(ce),B=function(n){function e(e){void 0===e&&(e={});var t=n.call(this)||this;return t.readyCount=0,t.preReadyCount=0,t.totalCount=0,t.totalErrorCount=0,t.isPreReadyOver=!0,t.elementInfos=[],t.options=H({loaders:{},prefix:"data-"},e),t}G(e,n);var t=e.prototype;return t.check=function(e){var o=this,n=this.options.prefix;this.clear(),this.elementInfos=Z(e).map(function(e,r){var t=o.getLoader(e,{prefix:n});return t.check(),t.on("error",function(e){o.onError(r,e.target)}).on("preReady",function(e){var t=o.elementInfos[r];t.hasLoading=e.hasLoading,t.isSkip=e.isSkip;e=o.checkPreReady(r);o.onPreReadyElement(r),e&&o.onPreReady()}).on("ready",function(e){var t=e.withPreReady,n=e.hasLoading,i=e.isSkip,e=o.elementInfos[r];e.hasLoading=n,e.isSkip=i;e=t&&o.checkPreReady(r),i=o.checkReady(r);t&&o.onPreReadyElement(r),o.onReadyElement(r),e&&o.onPreReady(),i&&o.onReady()}),{loader:t,element:e,hasLoading:!1,hasError:!1,isPreReady:!1,isReady:!1,isSkip:!1}});e=this.elementInfos.length;return(this.totalCount=e)||setTimeout(function(){o.onPreReady(),o.onReady()}),this},t.getTotalCount=function(){return this.totalCount},t.isPreReady=function(){return this.elementInfos.every(function(e){return e.isPreReady})},t.isReady=function(){return this.elementInfos.every(function(e){return e.isReady})},t.hasError=function(){return 0<this.totalErrorCount},t.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach(function(e){!e.isReady&&e.loader&&e.loader.destroy()}),this.elementInfos=[]},t.destroy=function(){this.clear(),this.off()},t.getLoader=function(t,e){var n=this,i=t.tagName.toLowerCase(),r=this.options.loaders,o=e.prefix,s=Object.keys(r);if(r[i])return new r[i](t,e);var a=new he(t,e),u=Z(t.querySelectorAll(s.join(", ")));a.setHasLoading(u.some(function(e){return ee(e,o)}));var c=!1,h=this.clone().on("error",function(e){a.onError(e.target)}).on("ready",function(){a.onReady(c)});return a.on("requestChildren",function(){var e=re(t,s,n.options.prefix);h.check(e).on("preReady",function(e){(c=e.isReady)||a.onPreReady()})}).on("reqeustReadyChildren",function(){h.check(u)}).on("requestDestroy",function(){h.destroy()}),a},t.clone=function(){return new e(H({},this.options))},t.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},t.checkReady=function(e){return this.elementInfos[e].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},t.onError=function(e,t){var n=this.elementInfos[e];n.hasError=!0,this.trigger(new c("error",{element:n.element,index:e,target:t,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount}))},t.onPreReadyElement=function(e){var t=this.elementInfos[e];this.trigger(new c("preReadyElement",{element:t.element,index:e,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isSkip:t.isSkip}))},t.onPreReady=function(){this.isPreReadyOver=!0,this.trigger(new c("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()}))},t.onReadyElement=function(e){var t=this.elementInfos[e];this.trigger(new c("readyElement",{index:e,element:t.element,hasError:t.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:t.isSkip}))},t.onReady=function(){this.trigger(new c("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount}))},t.getErrorCount=function(){return this.elementInfos.filter(function(e){return e.hasError}).length},t.hasLoading=function(){return this.elementInfos.some(function(e){return e.hasLoading})},e}(n),le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.checkElement=function(){var e=this.element,t=e.getAttribute("src");if(e.complete){if(t)return e.naturalWidth||this.onAlreadyError(e),!1;this.onAlreadyPreReady()}return this.addEvents(),K&&e.setAttribute("src",t),!0},t.EVENTS=["load","error"],t}(ce),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.checkElement=function(){var e=this.element;return!(1<=e.readyState)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},t.EVENTS=["loadedmetadata","error"],t}(ce),de=function(t){function e(e){return t.call(this,H({loaders:{img:le,video:fe}},e=void 0===e?{}:e))||this}return G(e,t),e}(B),pe=function(){function e(e){this.initialRects={},this.sizePercetage=!1,this.posPercetage=!1,this.options=p({attributePrefix:f.attributePrefix,useTransform:f.useTransform,horizontal:f.horizontal,percentage:f.percentage,isEqualSize:f.isEqualSize,isConstantSize:f.isConstantSize,useRoundedSize:f.useRoundedSize},e),this._init()}var t=e.prototype;return t.resize=function(){this.initialRects={}},t.renderItems=function(e){var t=this;e.forEach(function(e){t._renderItem(e)})},t.getInlineSize=function(){return this.containerRect[this.options.horizontal?"height":"width"]},t.setContainerRect=function(e){this.containerRect=e},t.updateEqualSizeItems=function(t,e){var n=this;this.updateItems(t);var i=t.some(function(e){return e.attributes.sizeGroup});(this.options.isEqualSize||i)&&t.some(function(e){return e.updateState===R.UPDATED})&&e.forEach(function(e){-1===t.indexOf(e)&&n.updateItem(e,!0)})},t.updateItems=function(e){var t=this;e.forEach(function(e){t.updateItem(e)})},t.getStatus=function(){return{initialRects:this.initialRects}},t.setStatus=function(e){this.initialRects=e.initialRects},t._init=function(){var e=this.options.percentage,t=!1,n=!1;!0===e?n=t=!0:e&&(-1<e.indexOf("position")&&(n=!0),-1<e.indexOf("size")&&(t=!0)),this.posPercetage=n,this.sizePercetage=t},t.updateItem=function(e,t){var n=this.options,i=n.isEqualSize,r=n.isConstantSize,o=n.useRoundedSize,s=this.initialRects,a=e.orgRect,u=e.element,c=e.updateState===R.WAIT_LOADING,h=a&&a.width&&a.height,l=u?function(e,t){for(var n={},i=e.attributes,r=i.length,o=0;o<r;++o){var s=i[o],a=s.name,s=s.value;-1!==a.indexOf(t)&&(n[a.replace(t,"").replace(/[\s-_]([a-z])/g,function(e,t){return t.toUpperCase()})]=s)}return n}(u,this.options.attributePrefix):e.attributes,n=null!==(f=l.sizeGroup)&&void 0!==f?f:"",f=l.notEqualSize;if(""!==n&&s[n])d=s[n];else if(i&&!f&&!n&&s[""])d=s[""];else if(r&&h&&!c)d=a;else{if(t||!u)return;var d={left:u.offsetLeft,top:u.offsetTop,width:0,height:0};o?(d.width=u.offsetWidth,d.height=u.offsetHeight):(u=u.getBoundingClientRect(),d.width=u.width,d.height=u.height)}return e.attributes=l,e.shouldReupdate=!1,e.isFirstUpdate&&h||(e.orgRect=p({},d)),e.rect=p({},d),t||(e.element&&(e.mountState=g.MOUNTED),e.updateState===R.NEED_UPDATE&&(e.updateState=R.UPDATED,e.isFirstUpdate=!0),c||f||s[n]||(s[n]=p({},d))),d},t._renderItem=function(e){var n,i,t,r,o,s,a,u=e.element,c=e.cssRect;u&&c&&(a=(t=this.options).horizontal,e=t.useTransform,n=this.posPercetage,i=this.sizePercetage,t=["position: absolute;"],r=(a=d[a?"horizontal":"vertical"]).inlineSize,o=a.inlinePos,s=this.getInlineSize(),a=c,a=Object.keys(a),e&&(a=a.filter(function(e){return"top"!==e&&"left"!==e}),t.push("transform: translate("+(c.left||0)+"px, "+(c.top||0)+"px);")),t.push.apply(t,a.map(function(e){var t=c[e];return e===r&&i||e===o&&n?e+": "+t/s*100+"%;":e+": "+t+"px;"})),u.style.cssText+=t.join(""))},e}(),ge=function(){function e(e,t){void 0===t&&(t={}),this.horizontal=e,this.isUpdating=!1,this.shouldReupdate=!1,this.hasTransition=!1,this.transitionDuration="",this.isRestoreOrgCSSText=!0;var n,e=t.element,i=p({key:"",orgRect:{left:0,top:0,width:0,height:0},rect:{left:0,top:0,width:0,height:0},cssRect:{},attributes:{},data:{},isFirstUpdate:!1,mountState:g.UNCHECKED,updateState:R.NEED_UPDATE,element:e||null,orgCSSText:null!==(e=null==e?void 0:e.style.cssText)&&void 0!==e?e:"",gridData:{}},t);for(n in i)this[n]=i[n]}var t=e.prototype;return Object.defineProperty(t,"orgInlineSize",{get:function(){var e=this._names.inlineSize;return this.orgRect[e]||this.rect[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"orgContentSize",{get:function(){var e=this._names.contentSize;return this.orgRect[e]||this.rect[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"inlineSize",{get:function(){return this.rect[this._names.inlineSize]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"contentSize",{get:function(){return this.rect[this._names.contentSize]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssInlineSize",{get:function(){return this.cssRect[this._names.inlineSize]},set:function(e){this.cssRect[this._names.inlineSize]=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssContentSize",{get:function(){return this.cssRect[this._names.contentSize]},set:function(e){this.cssRect[this._names.contentSize]=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssInlinePos",{get:function(){return this.cssRect[this._names.inlinePos]},set:function(e){this.cssRect[this._names.inlinePos]=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssContentPos",{get:function(){return this.cssRect[this._names.contentPos]},set:function(e){this.cssRect[this._names.contentPos]=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"computedInlineSize",{get:function(){var e=this._names.inlineSize;return this.cssRect[e]||this.rect[e]||this.orgRect[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"computedContentSize",{get:function(){var e=this._names.contentSize;return this.cssRect[e]||this.rect[e]||this.orgRect[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"computedInlinePos",{get:function(){var e,t=this._names.inlinePos;return null!==(e=this.cssRect[t])&&void 0!==e?e:this.rect[t]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"computedContentPos",{get:function(){var e,t=this._names.contentPos;return null!==(e=this.cssRect[t])&&void 0!==e?e:this.rect[t]},enumerable:!1,configurable:!0}),t.setCSSGridRect=function(e){var t,n=d[this.horizontal?"horizontal":"vertical"],i={};for(t in e)i[n[t]]=e[t];this.cssRect=i},t.getStatus=function(){return{mountState:this.mountState,updateState:this.updateState,attributes:this.attributes,orgCSSText:this.orgCSSText,isFirstUpdate:this.isFirstUpdate,element:null,key:this.key,orgRect:this.orgRect,rect:this.rect,cssRect:this.cssRect,gridData:this.gridData,data:this.data}},t.getMinimizedStatus=function(){var e={orgRect:this.orgRect,rect:this.rect,cssRect:this.cssRect,attributes:this.attributes,gridData:this.gridData},t=this,n=t.key,i=t.mountState,r=t.updateState,o=t.isFirstUpdate,t=t.orgCSSText;return void 0!==n&&(e.key=n),i!==g.UNCHECKED&&(e.mountState=i),r!==R.NEED_UPDATE&&(e.updateState=r),o&&(e.isFirstUpdate=!0),t&&(e.orgCSSText=t),e},Object.defineProperty(t,"_names",{get:function(){return this.horizontal?d.horizontal:d.vertical},enumerable:!1,configurable:!0}),e}(),me=function(d){function e(e,t){void 0===t&&(t={});var n=d.call(this)||this;n.items=[],n.outlines={start:[],end:[]},n._renderTimer=0,n._onResize=function(e){e.isResizeContainer?n._renderItems({useResize:!0},!0):0<(e=C(n.items,e.childEntries)).length&&n.updateItems(e)},n.options=p(p({},n.constructor.defaultOptions),t),n.containerElement=I(e)?document.querySelector(e):e;var i=n.options,r=i.isEqualSize,o=i.isConstantSize,s=i.useTransform,a=i.horizontal,u=i.percentage,c=i.externalContainerManager,h=i.externalItemRenderer,l=i.resizeDebounce,f=i.maxResizeDebounce,t=i.autoResize,e=i.useRoundedSize,i=i.useResizeObserver;return n.containerManager=c||new Y(n.containerElement,{horizontal:a,resizeDebounce:l,maxResizeDebounce:f,autoResize:t,useResizeObserver:i}).on("resize",n._onResize),n.itemRenderer=h||new pe({useTransform:s,isEqualSize:r,isConstantSize:o,percentage:u,useRoundedSize:e}),n._init(),n}r(e,d);var t=e.prototype;return t.getContainerElement=function(){return this.containerElement},t.getItems=function(){return this.items},t.getChildren=function(){return[].slice.call(this.containerElement.children)},t.setItems=function(e){var t=this.options;return t.useResizeObserver&&t.observeChildren&&((t=this.containerManager).unobserveChildren(x(this.items)),t.observeChildren(x(e))),this.items=e,this},t.getContainerInlineSize=function(){return this.containerManager.getInlineSize()},t.getOutlines=function(){return this.outlines},t.setOutlines=function(e){return this.outlines=e,this},t.syncElements=function(e){void 0===e&&(e={});var n=this.items,t=this.options.horizontal,i=this.getChildren(),r=b(this.items.map(function(e){return e.element}),i),o=r.added,s=r.maintained,a=r.changed,r=r.removed,u=[];return s.forEach(function(e){var t=e[0],e=e[1];u[e]=n[t]}),o.forEach(function(e){u[e]=new ge(t,{element:i[e]})}),this.setItems(u),(o.length||r.length||a.length)&&this.renderItems(e),this},t.updateItems=function(e,t){void 0===e&&(e=this.items);var n=(t=void 0===t?{}:t).useOrgResize;return e.forEach(function(e){var t;n&&((t=e.orgRect).width=0,t.height=0),e.updateState=R.NEED_UPDATE}),this.checkReady(t),this},t.renderItems=function(e){return this._renderItems(e=void 0===e?{}:e),this},t.getStatus=function(t){return{outlines:this.outlines,items:this.items.map(function(e){return t?e.getMinimizedStatus():e.getStatus()}),containerManager:this.containerManager.getStatus(),itemRenderer:this.itemRenderer.getStatus()}},t.setStatus=function(e){var t=this,n=this.options.horizontal,i=this.containerManager,r=i.getInlineSize(),o=this.getChildren();return this.itemRenderer.setStatus(e.itemRenderer),i.setStatus(e.containerManager),this.outlines=e.outlines,this.items=e.items.map(function(e,t){return new ge(n,p(p({},e),{element:o[t]}))}),this.itemRenderer.renderItems(this.items),r!==i.getInlineSize()?this.renderItems({useResize:!0}):window.setTimeout(function(){t._renderComplete({direction:t.defaultDirection,mounted:t.items,updated:[],isResize:!1})}),this},t.getComputedOutlineSize=function(e){return void 0===e&&(e=this.items),this.options.outlineSize||this.getContainerInlineSize()},t.getComputedOutlineLength=function(e){return void 0===e&&(e=this.items),this.options.outlineLength||1},t.destroy=function(e){var e=(e=void 0===e?{}:e).preserveUI,e=void 0===e?this.options.preserveUIOnDestroy:e;this.containerManager.destroy({preserveUI:e}),e||this.items.forEach(function(e){var t=e.element,e=e.orgCSSText;t&&(t.style.cssText=e)}),null!==(e=this._im)&&void 0!==e&&e.destroy()},t.checkReady=function(n){var i=this;void 0===n&&(n={});var e=this.items,r=e.filter(function(e){var t;return(null===(t=e.element)||void 0===t?void 0:t.parentNode)&&e.updateState!==R.UPDATED}),t=e.filter(function(e){var t;return(null===(t=e.element)||void 0===t?void 0:t.parentNode)&&e.mountState!==g.MOUNTED}),o=[];t.filter(function(e){if(e.hasTransition)return!0;var t=e.element;return 0<parseFloat(getComputedStyle(t).transitionDuration)&&(e.hasTransition=!0,e.transitionDuration=t.style.transitionDuration,!0)}).forEach(function(e){e.element.style.transitionDuration="0s"}),null!==(e=this._im)&&void 0!==e&&e.destroy(),this._im=new de({prefix:this.options.attributePrefix}).on("preReadyElement",function(e){r[e.index].updateState=R.WAIT_LOADING}).on("preReady",function(){r.forEach(function(e){var t=e.orgRect.width&&e.orgRect.height,n=e.cssRect.width||e.cssRect.height;!t&&n&&(e.element.style.cssText=e.orgCSSText)}),i._updateItems(r),i.readyItems(t,r,n)}).on("readyElement",function(e){var t=r[e.index];t.updateState=R.NEED_UPDATE,e.isPreReadyOver&&(t.isRestoreOrgCSSText&&(t.element.style.cssText=t.orgCSSText),i._updateItems([t]),i.readyItems([],[t],n))}).on("error",function(e){var t=r[e.index];i.trigger("contentError",{element:e.element,target:e.target,item:t,update:function(){o.push(t)}})}).on("ready",function(){o.length&&i.updateItems(o)}).check(r.map(function(e){return e.element}))},t.scheduleRender=function(){var e=this;this._clearRenderTimer(),this._renderTimer=window.setTimeout(function(){e.renderItems()})},t.fitOutlines=function(e){void 0===e&&(e=this.useFit);var t=this.outlines,n=t.start,i=t.end,r=n.length?Math.min.apply(Math,n):0;!e&&0<r||(t.start=n.map(function(e){return e-r}),t.end=i.map(function(e){return e-r}),this.items.forEach(function(e){var t=e.cssContentPos;w(t)&&(e.cssContentPos=t-r)}))},t.readyItems=function(e,t,n){var i=this.outlines,r=n.direction||this.options.defaultDirection,o=n.outline||i["end"===r?"start":"end"],s=this.items,i={start:m([],o),end:m([],o)};e.forEach(function(e){e.mountState=g.MOUNTED}),t.forEach(function(e){e.isUpdating=!0}),s.length&&(i=this.applyGrid(this.items,r,o)),t.forEach(function(e){e.isUpdating=!1}),this.setOutlines(i),this.fitOutlines(),this.itemRenderer.renderItems(this.items),this._refreshContainerContentSize();i=e.filter(function(e){return e.hasTransition});i.length&&(this.containerManager.resize(),i.forEach(function(e){e.element.style.transitionDuration=e.transitionDuration})),this._renderComplete({direction:r,mounted:e,updated:t,isResize:!!n.useResize});t=t.filter(function(e){return e.shouldReupdate});t.length&&this.updateItems(t)},t._isObserverEnabled=function(){return this.containerManager.isObserverEnabled()},t._updateItems=function(e){this.itemRenderer.updateEqualSizeItems(e,this.getItems())},t._renderComplete=function(e){this.trigger("renderComplete",e)},t._clearRenderTimer=function(){clearTimeout(this._renderTimer),this._renderTimer=0},t._refreshContainerContentSize=function(){var e=this.outlines,t=e.start,n=e.end,e=this.options.gap,n=n.length?Math.max.apply(Math,n):0,t=t.length?Math.max.apply(Math,t):0,e=Math.max(t,n-e);this.containerManager.setContentSize(e)},t._resizeContainer=function(){this.containerManager.resize(),this.itemRenderer.setContainerRect(this.containerManager.getRect())},t._init=function(){this._resizeContainer()},t._renderItems=function(e,t){void 0===e&&(e={}),this._clearRenderTimer();var n=e.useResize||e.useOrgResize;n&&!t&&(this._resizeContainer(),this.itemRenderer.resize()),!this.getItems().length&&this.getChildren().length?this.syncElements(e):n?this.updateItems(this.items,e):this.checkReady(e)},e.defaultOptions=f,e.propertyTypes=z,o([M],e)}(n);function Re(e,t,n,i){return Math[i].apply(Math,e.slice(t,t+n))}q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.applyGrid=function(z,e,t){z.forEach(function(e){e.isRestoreOrgCSSText=!1});var n,v=this.getComputedOutlineSize(z),S=this.getComputedOutlineLength(z),i=this.options,y=i.gap,r=i.align,E=i.observeChildren,_=i.columnSizeRatio,o=i.contentAlign,i=t.length,P=z.length,b=this._getAlignPoses(S,v),C="end"===e,O=C?"min":"max",x=C?"max":"min",e=[0],I=(e=i===S?t.slice():(n=i?Math[x].apply(Math,t):0,k(S).map(function(){return n}))).slice(),T=1<S?b[1]-b[0]:0,w="stretch"===r,D=C&&"start"===o,M=C?-1/0:1/0;D&&(M=Math.min.apply(Math,I));for(var s=function(e){var t,n,i,r,o,s=z[C?e:P-1-e],a=parseInt(s.attributes.column||"1",10),u=parseInt(s.attributes.maxColumn||"1",10),c=s.contentSize,h=Math.min(S,a||Math.max(1,Math.ceil((s.inlineSize+y)/T))),l=Math.min(S,Math.max(h,u)),f=(n=h,i=O,r=M,e=(t=I).length-n+1,o="max"===i?"min":"max",u="max"===i?"lastIndexOf":"indexOf",(e=k(e).map(function(e){e=Re(t,e,n,o);return Math[o](r,e)}))[u](Math[i].apply(Math,e))),d=Re(I,f,h,x);for(D&&M!==d&&(M=Math.max.apply(Math,I),I=I.map(function(){return M}),d=M,f=0);h<l;){var p=f+h,g=f-1;if(C&&(S<=p||I[p]>d))break;if(!C&&(g<0||I[g]<d))break;C||--f,++h}f=Math.max(0,f),h=Math.min(S-f,h),(0<a&&1<h||w)&&(m=(h-1)*T+v,N._isObserverEnabled()&&E||s.cssInlineSize===m||(s.shouldReupdate=!0),s.cssInlineSize=m),0<_&&(c=s.computedInlineSize/_,s.cssContentSize=c);var m=b[f],d=C?d:d-y-c;s.cssInlinePos=m,s.cssContentPos=d;var R=C?d+c+y:d;k(h).forEach(function(e){I[f+e]=R})},N=this,a=0;a<P;++a)s(a);return D&&M!==Math.min.apply(Math,I)&&(M=Math.max.apply(Math,I),I=I.map(function(){return M})),{start:C?e:I,end:C?I:e}},n.getComputedOutlineSize=function(e){void 0===e&&(e=this.items);var t=this.options,n=t.gap,i=t.align,r=this.getContainerInlineSize(),o=this.columnSize||this.outlineSize,s=this.column||this.outlineLength,a=s||1,t=0;if("stretch"===i)s||(s=this.maxStretchColumnSize||1/0,a=Math.max(1,Math.ceil((r+n)/(s+n)))),t=(r+n)/(a||1)-n;else if(o)t=o;else if(e.length){for(var u=e[0],c=0,h=e;c<h.length;c++){var l=h[c],f=l.attributes,d=parseInt(f.column||"1",10),f=parseInt(f.maxColumn||"1",10);if(l.updateState===R.UPDATED&&l.inlineSize&&1===d&&1===f){u=l;break}}t=u.inlineSize||0}else t=r;return t||0},n.getComputedOutlineLength=function(e){void 0===e&&(e=this.items);var t=this.gap,n=this.column||this.outlineLength,i=this.columnCalculationThreshold;return n||(n=this.getComputedOutlineSize(e),Math.min(e.length,Math.max(1,Math.floor((this.getContainerInlineSize()+t)/(n-i+t)))))},n._getAlignPoses=function(e,t){var n=this.options,i=n.align,r=n.gap,o=this.getContainerInlineSize(),s=k(e),a=0,u=0;return"justify"===i||"stretch"===i?(u=(n=e-1)?Math.max((o-t)/n,t+r):0,a=Math.min(0,o/2-(n*u+t)/2)):(t=(e-1)*(u=t+r)+t,"center"===i?a=(o-t)/2:"end"===i&&(a=o-t)),s.map(function(e){return a+e*u})},t.propertyTypes=p(p({},me.propertyTypes),{column:a.RENDER_PROPERTY,columnSize:a.RENDER_PROPERTY,columnSizeRatio:a.RENDER_PROPERTY,align:a.RENDER_PROPERTY,columnCalculationThreshold:a.RENDER_PROPERTY,maxStretchColumnSize:a.RENDER_PROPERTY,contentAlign:a.RENDER_PROPERTY}),t.defaultOptions=p(p({},me.defaultOptions),{align:"justify",column:0,columnSize:0,columnSizeRatio:0,columnCalculationThreshold:.5,maxStretchColumnSize:1/0,contentAlign:"masonry"}),o([M],t)}(me);function ze(e,t,n){return function(e,t){for(var n=[],i=t;i;)n.push(i),i=e[i];return n.reverse(),n}(function(e,t,n){var i={},r={};r[t]=0;var o,s,a,u,c,h,l=new ve(function(e){return e.cost});for(l.push({value:t,cost:0});l.size();)for(var f in s=(o=l.pop()).value,a=o.cost,u=e(s)||{})c=a+u[f],h=r[f],(void 0===r[f]||c<h)&&(r[f]=c,l.push({value:f,cost:c}),i[f]=s);if(void 0!==r[n])return i;throw n=["Could not find a path from ",t," to ",n,"."].join(""),new Error(n)}(e,t,n),n)}var ve=function(){function e(e){this.content=[],this.scoreFunction=e}var t=e.prototype;return t.push=function(e){this.content.push(e),this.bubbleUp(this.content.length-1)},t.pop=function(){var e=this.content[0],t=this.content.pop();return 0<this.content.length&&(this.content[0]=t,this.sinkDown(0)),e},t.size=function(){return this.content.length},t.bubbleUp=function(e){for(var t=e,n=this.content[t];0<t;){var i=Math.floor((t+1)/2)-1,r=this.content[i];if(!(this.scoreFunction(n)<this.scoreFunction(r)))break;this.content[i]=n,this.content[t]=r,t=i}},t.sinkDown=function(e){for(var t=this.content.length,n=this.content[e],i=this.scoreFunction(n);;){var r,o=2*(e+1),s=o-1,a=null;if(s<t&&(r=this.content[s],(r=this.scoreFunction(r))<i&&(a=s)),o<t&&(s=this.content[o],this.scoreFunction(s)<(null==a?i:r)&&(a=o)),null===a)break;this.content[e]=this.content[a],this.content[a]=n,e=a}},e}();function Se(e,t){if(w(t))return t;var n=t.charAt(0),i="+"===n?1:"-"===n?-1:0,n=parseFloat(t);return t.match(/%$/g)&&(n*=e/100),i?e+n:n}function ye(e,t){var n=e.orgInlineSize,i=e.orgContentSize,r=e.gridData.inlineOffset||0,o=e.gridData.contentOffset||0,e=e.gridData.contentMargin||0;return n&&i?(i<=o?1:(n-r)/(i-o))*(t-e-o)+r:t-e}ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.applyGrid=function(e,t,n){var a=this,i=this.options,u=i.attributePrefix,c=i.horizontal;e.forEach(function(e){var t,n,i,r,o,s;e.isUpdating&&(t=e.element,o=e.attributes,n=e.gridData,i=parseFloat(o.inlineOffset),s=parseFloat(o.contentOffset),r=parseFloat(o.contentMargin),isNaN(i)&&(i=a.inlineOffset||n.inlineOffset||0),isNaN(s)&&(s=a.contentOffset||0|n.contentOffset),isNaN(r)&&(r=a.contentMargin||0|n.contentMargin),!t||"inlineOffset"in o||"contentOffset"in o||e.mountState!==g.MOUNTED||(o=t.querySelector("["+u+"maintained-target]"))&&(e=t.offsetWidth-t.clientWidth+t.scrollWidth-o.clientWidth,o=t.offsetHeight-t.clientHeight+t.scrollHeight-o.clientHeight,s=c?(i=o,e):(i=e,o)),n.inlineOffset=i,n.contentOffset=s,n.contentMargin=r)});var r=this.options.rowRange,o=[],i="end"===t;return e.length&&(o=r?this._getRowPath(e,i):this._getPath(e,i)),this._setStyle(e,o,n,"end"===t)},n._getRowPath=function(e,t){var n=this._getColumnRange(),i=this._getRowRange(),t=this._getRowLink(e,{path:[0],cost:0,length:0,currentNode:0},n,i,t);return null!==(t=null==t?void 0:t.path.map(function(e){return""+e}))&&void 0!==t?t:[]},n._getRowLink=function(e,t,n,i,r){var o=n[0],s=i[0],a=i[1],u=e.length,c=t.path,h=t.length,l=t.cost,f=t.currentNode;if(f<u&&(a<=h||u<f+o)){o=A(u-f,n)*Math.abs(this._getCost(e,f,u,r));return p(p({},t),{length:h+1,path:m(m([],c),[u]),currentNode:u,cost:l+o,isOver:!0})}return u<=f?p(p({},t),{currentNode:u,isOver:h<s||a<h}):this._searchRowLink(e,t,u,n,i,r)},n._searchRowLink=function(e,t,n,i,r,o){for(var s,a=i[0],u=i[1],c=t.currentNode,h=t.path,l=t.length,f=t.cost,d=Math.min(n,c+u),p=[],g=c+a;g<=d;++g)g!==c&&(s=Math.abs(this._getCost(e,c,g,o)),(s=this._getRowLink(e,{path:m(m([],h),[g]),length:l+1,cost:f+s,currentNode:g},i,r,o))&&p.push(s));return p.sort(function(e,t){var n=e.isOver;return n!==t.isOver?n?1:-1:A(e.length,r)-A(t.length,r)||e.cost-t.cost}),p[0]},n._getExpectedRowSize=function(i,e){var t=this.options.gap,n=this.getContainerInlineSize()-t*(i.length-1),o=n,s=0,a=0;if(i.forEach(function(e){var t,n,i=e.orgInlineSize,r=e.orgContentSize;i&&r?(t=e.gridData.inlineOffset||0,n=e.gridData.contentOffset||0,e=e.gridData.contentMargin||0,s+=r=r<=n?1:(i-t)/(r-n),a+=(n+e)*r,o-=t):s+=1}),s){var r=(o+a)/s;if(this.stretch){var t=this._getSizeRange(),u=L(r,t[0],t[1]);if(e)return u;var c=this.stretchRange,t=i.map(function(e){return ye(e,u)}),e=t.reduce(function(e,t,n){return e+Se(t,i[n].attributes.minStretch||c[0])},0),t=t.reduce(function(e,t,n){return e+Se(t,i[n].attributes.maxStretch||c[1])},0);if(e<=n&&n<=t)return u}return r}return 0},n._getExpectedInlineSizes=function(e,o){var t=this.options,s=t.stretch,a=t.stretchRange;return e.map(function(e){var t=s?Se(e.orgInlineSize,e.attributes.minStretch||a[0]):-1/0,n=s?Se(e.orgInlineSize,e.attributes.maxStretch||a[1]):1/0,i=ye(e,o),r=!1,e=!1;return n<=i?r=!0:i<=t&&(e=!0),{minSize:t,maxSize:n,size:L(i,t,n),originalSize:i,isMax:r,isMin:e}})},n._getStretchItemInfos=function(e,t){var n=this.options.gap,i=e.length,r=this.getContainerInlineSize()-n*(Math.max(1,i)-1),e=this._getExpectedInlineSizes(e,t),t=D(e.map(function(e){return e.size})),t=r-t,o=r/D(e.map(function(e){return e.originalSize})),s=e.map(function(e){return p(p({},e),{passed:!1,size:e.originalSize*o})});if(0==t)return{infos:s,cost:0};for(var a=0<t,u=s.length,c=0;c<u;++c)if("break"===function(){var e=D(s.map(function(e){return e.passed?e.size:0})),t=D(s.map(function(e){return e.passed?0:e.originalSize})),n=(r-e)/t;if(s.forEach(function(e){e.passed||(a?e.size>e.maxSize&&(n=Math.min(n,e.maxSize/e.originalSize)):e.size<e.minSize&&(n=Math.max(n,e.minSize/e.originalSize)))}),s.forEach(function(e){e.passed||(e.size=L(e.originalSize*n,e.minSize,e.maxSize),(a&&!U(e.size-e.maxSize,.001)||!a&&!U(e.size-e.minSize,.001))&&(e.passed=!0))}),s.every(function(e){return e.passed}))return"break"}())break;var h=r/D(s.map(function(e){return e.size}));return U(h-1,.001)&&s.forEach(function(e){e.size*=h}),{infos:s,cost:D(s.map(function(e){var t=1;(e.size>e.maxSize||e.size<e.minSize)&&(t=2);var n=e.originalSize,n=a?Math.max(n,e.minSize):Math.min(n,e.maxSize);return Math.abs(e.size-n)*t}))}},n._getExpectedInlineSize=function(e,t){var n=this.options.gap,t=this._getExpectedInlineSizes(e,t);return t.length?D(t.map(function(e){return e.size}))+n*(e.length-1):0},n._getCost=function(e,t,n,i){var r=e.slice(t,n),o=this.getContainerInlineSize(),s=this._getExpectedRowSize(r),a=this._getSizeRange(),u=a[0],c=a[1];if(this.isCroppedSize){if(u<=s&&s<=c)return 0;var h=this._getExpectedInlineSize(r,s<u?u:c);return Math.pow(h-o,2)}a=0;if(this.stretch){s<u?s=u:c<s&&(s=c);h=this._getExpectedInlineSize(r,s);return a=!this.passUnstretchRow||(i?n!==e.length:0!==t)||o<=h?this._getStretchItemInfos(r,s).cost:a}if(isFinite(c)){if(s<u)return Math.pow(s-u,2)+Math.pow(c,2)+a;if(c<s)return Math.pow(s-c,2)+Math.pow(c,2)+a}else if(s<u)return Math.max(Math.pow(u,2),Math.pow(s,2))+Math.pow(c,2)+a;return s-u+a},n._getPath=function(o,s){var a=this,u=o.length,e=this.options.columnRange,e=T(e)?e:[e,e],c=e[0],h=e[1];return ze(function(e){for(var t={},n=parseInt(e,10),i=Math.min(n+c,u);i<=u&&!(h<i-n);++i){var r=a._getCost(o,n,i,s);r<0&&i===u&&(r=0),t[""+i]=Math.pow(r,2)}return t},"0",""+u)},n._setStyle=function(e,t,n,l){var f=this;void 0===n&&(n=[]);var d,p,i=this.options,g=i.gap,m=i.isCroppedSize,R=i.displayedRow,z=i.stretch,v=i.passUnstretchRow,S=e.length,y=this._getSizeRange(),n=n[0]||0,E=this.getContainerInlineSize(),t=function(e,t){for(var n=t.length,i=[],r=0;r<n-1;++r){var o=parseInt(t[r],10),s=parseInt(t[r+1],10);i.push(e.slice(o,s))}return i}(e,t),_=t.length,P=n,b=0;if(t.forEach(function(o,e){var n=o.length,s=f._getExpectedRowSize(o,!0);m&&(s=Math.max(y[0],Math.min(s,y[1])));var i,r,t=g*(n-1),a=o.map(function(e,t){var n=ye(e,s);return{index:t,item:e,inlineSize:n,orgInlineSize:n,maxInlineSize:n,minInlineSize:n}}),u=f._getExpectedInlineSize(o,s),c=(E-t)/(u-t),h=u-t,t=E-t;z&&u&&t!=h&&(v&&h<t&&(l?e===_-1:0===e)?(p=[P],d=o.map(function(e,t){return S-n+t}),i=f._getExpectedInlineSizes(o,s),a.forEach(function(e,t){e.minInlineSize=i[t].minSize,e.maxInlineSize=i[t].maxSize,e.inlineSize=L(e.inlineSize,e.minInlineSize,e.maxInlineSize)})):(r=f._getStretchItemInfos(o,s).infos,a.forEach(function(e,t){e.inlineSize=r[t].size,e.minInlineSize=r[t].minSize,e.maxInlineSize=r[t].maxSize}))),a.forEach(function(e,t){var n=e.item,i=e.inlineSize,r=o[t-1],t=r?r.cssInlinePos+r.cssInlineSize+g:0;m&&(i*=c);r=n.gridData;r.orgInlineSize=e.orgInlineSize,r.orgContentSize=s,r.minInlineSize=e.minInlineSize,r.maxInlineSize=e.maxInlineSize,n.setCSSGridRect({inlinePos:t,contentPos:P,inlineSize:i,contentSize:s})}),P+=g+s,(R<0||e<R)&&(b=P)}),l)return{start:[n],end:[b],passedItems:d,passed:p};var r=P-n;return e.forEach(function(e){e.cssContentPos-=r}),{passedItems:d,passed:p?[p[0]-r]:null,start:[n-r],end:[n]}},n.getComputedOutlineLength=function(){return 1},n.getComputedOutlineSize=function(){return this.getContainerInlineSize()},n._getRowRange=function(){var e=this.rowRange;return T(e)?e:[e,e]},n._getColumnRange=function(){var e=this.columnRange;return T(e)?e:[e,e]},n._getSizeRange=function(){var e=this.sizeRange;return T(e)?e:[e,e]},t.propertyTypes=p(p({},me.propertyTypes),{columnRange:a.RENDER_PROPERTY,rowRange:a.RENDER_PROPERTY,sizeRange:a.RENDER_PROPERTY,isCroppedSize:a.RENDER_PROPERTY,displayedRow:a.RENDER_PROPERTY,stretch:a.RENDER_PROPERTY,stretchRange:a.RENDER_PROPERTY,passUnstretchRow:a.RENDER_PROPERTY,inlineMargin:a.RENDER_PROPERTY,contentMargin:a.RENDER_PROPERTY,inlineOffset:a.RENDER_PROPERTY,contentOffset:a.RENDER_PROPERTY}),t.defaultOptions=p(p({},me.defaultOptions),{columnRange:[1,8],rowRange:0,sizeRange:[0,1/0],displayedRow:-1,isCroppedSize:!1,stretch:!1,passUnstretchRow:!1,stretchRange:["-20%","+20%"],contentMargin:0,inlineOffset:0,contentOffset:0}),o([M],t)}(me);function Ee(e){var t=-1/0;return e.forEach(function(e){isFinite(e)&&(t=Math.max(t,e))}),isFinite(t)?t:0}function _e(e,t,n){return Ee(e)+function(e,t,n){var i=e.length;if(!i)return 0;var r=function(e){var t=1/0;return e.forEach(function(e){isFinite(e)&&(t=Math.min(t,e))}),isFinite(t)?t:0}(t),o=Ee(e),s=0;if(!n)return 0;for(var a=0;a<i;++a){var u=e[a],c=t[a];isFinite(u)&&isFinite(c)&&(u=u-o,c=c-r,s=a?Math.max(s,s+u-c):u-c)}return s}(e,t,n)}function Pe(e,t,n){for(var i=n.inlinePos,r=n.inlineSize,o=n.contentPos,s=n.contentSize,a=i;a<i+r;++a)e[a]=Math.min(e[a],o),t[a]=Math.max(t[a],o+s)}var B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.applyGrid=function(e,t,n){var i=this._getFrame(),r=i.inlineSize,o=i.contentSize,s=i.rects,a=this.options,u=a.gap,c=a.useFrameFill,a=this.getRectSize(r),h=a.inlineSize,l=a.contentSize,f=e.length;if(!f||!r||!o)return{start:n,end:n};for(var d=s.length,p=k(r).map(function(){return 1/0}),g=k(r).map(function(){return-1/0}),m=i.outline.map(function(e){return e*(l+u)}),R=0;R<f;R+=d)for(var z=_e(g,m,c),v=0;v<d&&R+v<f;++v){var S=e[R+v],y=s[v],E=y.contentPos,_=y.inlinePos,P=y.contentSize,b=y.inlineSize,C=z+E*(l+u),y=_*(h+u),E=P*(l+u)-u,P=b*(h+u)-u;Pe(p,g,{inlinePos:_,inlineSize:b,contentPos:C,contentSize:E+u}),S.setCSSGridRect({inlinePos:y,contentPos:C,inlineSize:P,contentSize:E})}var O,t="end"===t,n=n.length?n:[0];n.length!==r&&(O=(t?Math.max:Math.min).apply(Math,n),n=k(r).map(function(){return O}));var p=p.map(function(e){return isFinite(e)?e:0}),g=g.map(function(e){return isFinite(e)?e:0}),x=t?_e(n,p,c):_e(g,n,c);return e.forEach(function(e){e.cssContentPos+=x}),{start:p.map(function(e){return e+x}),end:g.map(function(e){return e+x})}},n.getComputedOutlineLength=function(){var e=this.options.frame;return e.length?e[0].length:0},n.getComputedOutlineSize=function(){var e=this.options,t=e.gap,e=e.rectSize;return"object"==typeof e?e.inlineSize:e||(this.getContainerInlineSize()+t)/this.getComputedOutlineLength()-t},n.getRectSize=function(e){var t=this.options,n=t.gap,t=t.rectSize;if("object"==typeof t)return t;n=t||(this.getContainerInlineSize()+n)/e-n;return{inlineSize:n,contentSize:n}},n._getFrame=function(){for(var e=this.options.frame,t=e.length,n=t?e[0].length:0,i=[],r={},o=k(n).map(function(){return 1/0}),s=k(n).map(function(){return-1/0}),a=0;a<t;++a)for(var u=0;u<n;++u){var c=e[a][u];c&&(r[a+","+u]||(Pe(o,s,c=this._findRect(r,c,a,u,n,t)),i.push(c)))}return i.sort(function(e,t){return e.type<t.type?-1:1}),{rects:i,inlineSize:n,contentSize:t,outline:o}},n._findRect=function(e,t,n,i,r,o){for(var s=this.options.frame,a=1,u=1,c=i;c<r&&s[n][c]===t;++c)u=c-i+1;for(var h=n;h<o&&s[h][i]===t;++h)a=h-n+1;for(var l=n;l<n+a;++l)for(var f=i;f<i+u;++f)e[l+","+f]=!0;return{type:t,inlinePos:i,contentPos:n,inlineSize:u,contentSize:a}},t.propertyTypes=p(p({},me.propertyTypes),{frame:a.RENDER_PROPERTY,useFrameFill:a.RENDER_PROPERTY,rectSize:a.RENDER_PROPERTY}),t.defaultOptions=p(p({},me.defaultOptions),{frame:[],rectSize:0,useFrameFill:!0}),o([M],t)}(me),be=function(){function e(e){var t,n=p({orgInlineSize:0,orgContentSize:0,inlineSize:0,contentSize:0,inlinePos:0,contentPos:0,items:[]},e);for(t in n)this[t]=n[t]}var t=e.prototype;return t.scaleTo=function(e,t){var n=this.inlineSize?e/this.inlineSize:0,i=this.contentSize?t/this.contentSize:0;this.items.forEach(function(e){0!=n&&(e.inlinePos*=n,e.inlineSize*=n),0!=i&&(e.contentPos*=i,e.contentSize*=i)}),this.inlineSize=e,this.contentSize=t},t.push=function(e){this.items.push(e)},t.getOrgSizeWeight=function(){return this.orgInlineSize*this.orgContentSize},t.getSize=function(){return this.inlineSize*this.contentSize},t.getOrgRatio=function(){return 0===this.orgContentSize?0:this.orgInlineSize/this.orgContentSize},t.getRatio=function(){return 0===this.contentSize?0:this.inlineSize/this.contentSize},e}();function Ce(e,t){t=e/t;return(t=t<1?1/t:t)-1}var Oe,xe={__proto__:null,default:me,GetterSetter:M,withGridMethods:j,withMethods:N,getMountedElements:x,getUpdatedItems:C,MasonryGrid:q,JustifiedGrid:ce,FrameGrid:B,PackingGrid:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.applyGrid=function(e,t,n){var i=this,r=this.options,o=r.aspectRatio,s=r.gap,a=this.getContainerInlineSize(),u=a/o,n=n.length?n:[0],c="end"===t?Math.max.apply(Math,n):Math.min.apply(Math,n)-u-s,n=c+u+s,h=new be({});return e.forEach(function(e){e=new be({inlineSize:e.orgInlineSize,contentSize:e.orgContentSize,orgInlineSize:e.orgInlineSize,orgContentSize:e.orgContentSize});i._findBestFitArea(h,e),h.push(e),h.scaleTo(a+s,u+s)}),e.forEach(function(e,t){var n=h.items[t],i=n.inlineSize-s,r=n.contentSize-s,t=c+n.contentPos,n=n.inlinePos;e.setCSSGridRect({inlinePos:n,contentPos:t,inlineSize:i,contentSize:r})}),{start:[c],end:[n]}},n._findBestFitArea=function(e,p){if(0===e.getRatio())return e.orgInlineSize=p.inlineSize,e.orgContentSize=p.contentSize,e.inlineSize=p.inlineSize,void(e.contentSize=p.contentSize);var g,t,n,i,r,m=1/0,R=!1,z={inlineSize:0,contentSize:0},v={inlineSize:0,contentSize:0},S=this._getWeight("size"),y=this._getWeight("ratio");e.items.forEach(function(e){for(var t=Ce(e.getOrgSizeWeight(),e.getSize())*S,n=Ce(e.getOrgRatio(),e.getRatio())*y,i=e.inlineSize,r=e.contentSize,o=0;o<2;++o){var s=void 0,a=void 0,u=void 0,c=void 0;0===o?(u=s=i,c=r-(a=r*(p.contentSize/(e.orgContentSize+p.contentSize)))):(c=a=r,u=i-(s=i*(p.inlineSize/(e.orgInlineSize+p.inlineSize))));var h=s*a,l=s/a,f=u*c,d=c/c,h=Ce(p.getSize(),h)*S;h+=Ce(p.getRatio(),l)*y,h+=Ce(e.getOrgSizeWeight(),f)*S-t,(h+=Ce(e.getOrgRatio(),d)*y-n)===Math.min(h,m)&&(m=h,g=e,R=0===o,z.inlineSize=s,z.contentSize=a,v.inlineSize=u,v.contentSize=c)}}),t=g,n=z,i=v,r=R,(e=p).contentSize=n.contentSize,e.inlineSize=n.inlineSize,t.contentSize=i.contentSize,t.inlineSize=i.inlineSize,r?(e.contentPos=t.contentPos+t.contentSize,e.inlinePos=t.inlinePos):(e.inlinePos=t.inlinePos+t.inlineSize,e.contentPos=t.contentPos)},n.getComputedOutlineLength=function(){return 1},n.getComputedOutlineSize=function(){return this.getContainerInlineSize()},n._getWeight=function(e){var t=this.options,n=t.weightPriority;return n===e?100:"custom"===n?t[e+"Weight"]:1},t.propertyTypes=p(p({},me.propertyTypes),{aspectRatio:a.RENDER_PROPERTY,sizeWeight:a.RENDER_PROPERTY,ratioWeight:a.RENDER_PROPERTY,weightPriority:a.RENDER_PROPERTY}),t.defaultOptions=p(p({},me.defaultOptions),{aspectRatio:1,sizeWeight:1,ratioWeight:1,weightPriority:"custom"}),o([M],t)}(me),ItemRenderer:pe,GridItem:ge,ContainerManager:Y,ResizeWatcher:F,DEFAULT_GRID_OPTIONS:f,get PROPERTY_TYPE(){return a},get MOUNT_STATE(){return g},get UPDATE_STATE(){return R},GRID_PROPERTY_TYPES:z,GRID_METHODS:e,GRID_EVENTS:["renderComplete","contentError"],RECT_NAMES:d};for(Oe in xe)me[Oe]=xe[Oe];return me}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Grid=t()}(this,function(){"use strict";var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var p=function(){return(p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function o(e,t,n,i){var r,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;0<=a;a--)(r=e[a])&&(s=(o<3?r(s):3<o?r(t,n,s):r(t,n))||s);return 3<o&&s&&Object.defineProperty(t,n,s),s}function m(e,t){for(var n=0,i=t.length,r=e.length;n<i;n++,r++)e[r]=t[n];return e}function h(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(i=o.next()).done;)s.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}(arguments[t]));return e}function l(e){return void 0===e}var a,g,R,u=function(){function e(e,t){var n,i;if(this.eventType=e,this._canceled=!1,t)try{for(var r=h(Object.keys(t)),o=r.next();!o.done;o=r.next()){var s=o.value;this[s]=t[s]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}}var t=e.prototype;return t.stop=function(){this._canceled=!0},t.isCanceled=function(){return this._canceled},e}(),n=function(){function e(){this._eventHandler={}}var t=e.prototype;return t.trigger=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var i=t instanceof u?t.eventType:t,i=s(this._eventHandler[i]||[]);return i.length<=0||(t instanceof u?(t.currentTarget=this,i.forEach(function(e){e(t)})):i.forEach(function(e){e.apply(void 0,s(n))})),this},t.once=function(n,i){var r,o=this;if("object"==typeof n&&l(i)){var e,t=n;for(e in t)this.once(e,t[e]);return this}return"string"==typeof n&&"function"==typeof i&&this.on(n,r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.apply(void 0,s(e)),o.off(n,r)}),this},t.hasOn=function(e){return!!this._eventHandler[e]},t.on=function(e,t){if("object"==typeof e&&l(t)){var n,i=e;for(n in i)this.on(n,i[n]);return this}var r;return"string"==typeof e&&"function"==typeof t&&(r=this._eventHandler[e],l(r)&&(this._eventHandler[e]=[],r=this._eventHandler[e]),r.push(t)),this},t.off=function(e,t){var n,i;if(l(e))return this._eventHandler={},this;if(l(t)){if("string"==typeof e)return delete this._eventHandler[e],this;var r,o=e;for(r in o)this.off(r,o[r]);return this}var s=this._eventHandler[e];if(s){var a=0;try{for(var u=h(s),c=u.next();!c.done;c=u.next()){if(c.value===t){s.splice(a,1),s.length<=0&&delete this._eventHandler[e];break}a++}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}return this},e.VERSION="3.0.1",e}(),c=u,f={horizontal:!1,useTransform:!1,percentage:!1,isEqualSize:!1,isConstantSize:!1,gap:0,attributePrefix:"data-grid-",resizeDebounce:100,maxResizeDebounce:0,autoResize:!0,preserveUIOnDestroy:!1,defaultDirection:"end",externalContainerManager:null,externalItemRenderer:null,renderOnPropertyChange:!0,useFit:!0,outlineLength:0,outlineSize:0,useRoundedSize:!0,useResizeObserver:!1,observeChildren:!1};(q=a=a||{})[q.PROPERTY=1]="PROPERTY",q[q.RENDER_PROPERTY=2]="RENDER_PROPERTY",(B=g=g||{})[B.UNCHECKED=1]="UNCHECKED",B[B.UNMOUNTED=2]="UNMOUNTED",B[B.MOUNTED=3]="MOUNTED",(ce=R=R||{})[ce.NEED_UPDATE=1]="NEED_UPDATE",ce[ce.WAIT_LOADING=2]="WAIT_LOADING",ce[ce.UPDATED=3]="UPDATED";var z={gap:a.RENDER_PROPERTY,defaultDirection:a.PROPERTY,renderOnPropertyChange:a.PROPERTY,preserveUIOnDestroy:a.PROPERTY,useFit:a.PROPERTY,outlineSize:a.RENDER_PROPERTY,outlineLength:a.RENDER_PROPERTY},e=["syncElements","updateItems","getItems","setItems","renderItems","getContainerInlineSize","getContainerElement"],d={horizontal:{inlinePos:"top",contentPos:"left",inlineSize:"height",contentSize:"width"},vertical:{inlinePos:"left",contentPos:"top",inlineSize:"width",contentSize:"height"}},v=function(){function e(){this.keys=[],this.values=[]}var t=e.prototype;return t.get=function(e){return this.values[this.keys.indexOf(e)]},t.set=function(e,t){var n=this.keys,i=this.values,r=n.indexOf(e),r=-1===r?n.length:r;n[r]=e,i[r]=t},e}(),S=function(){function e(){this.object={}}var t=e.prototype;return t.get=function(e){return this.object[e]},t.set=function(e,t){this.object[e]=t},e}(),y="function"==typeof Map,E=function(){function e(){}var t=e.prototype;return t.connect=function(e,t){this.prev=e,this.next=t,e&&(e.next=this),t&&(t.prev=this)},t.disconnect=function(){var e=this.prev,t=this.next;e&&(e.next=t),t&&(t.prev=e)},t.getIndex=function(){for(var e=this,t=-1;e;)e=e.prev,++t;return t},e}();var _=function(){function e(e,t,n,i,r,o,s,a){this.prevList=e,this.list=t,this.added=n,this.removed=i,this.changed=r,this.maintained=o,this.changedBeforeAdded=s,this.fixed=a}var t=e.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){var e,n,r,o,e=(e=this.changedBeforeAdded,n=this.fixed,r=[],o=[],e.forEach(function(e){var t=e[0],n=e[1],e=new E;r[t]=e,o[n]=e}),r.forEach(function(e,t){e.connect(r[t-1])}),e.filter(function(e,t){return!n[t]}).map(function(e,t){var n=e[0],i=e[1];if(n===i)return[0,0];e=r[n],n=o[i-1],i=e.getIndex();return e.disconnect(),n?e.connect(n,n.next):e.connect(void 0,r[0]),[i,e.getIndex()]})),s=this.changed,a=[];this.cacheOrdered=e.filter(function(e,t){var n=e[0],i=e[1],e=s[t],t=e[0],e=e[1];if(n!==i)return a.push([t,e]),!0}),this.cachePureChanged=a},e}();var t,P="function"==typeof Map?void 0:(t=0,function(e){return e.__DIFF_KEY__||(e.__DIFF_KEY__=++t)});function b(e,t){return n=e,i=t,r=P,e=y?Map:r?S:v,t=r||function(e){return e},o=[],s=[],a=[],r=n.map(t),t=i.map(t),u=new e,c=new e,h=[],l=[],f={},d=[],g=p=0,r.forEach(function(e,t){u.set(e,t)}),t.forEach(function(e,t){c.set(e,t)}),r.forEach(function(e,t){e=c.get(e);void 0===e?(++g,s.push(t)):f[e]=g}),t.forEach(function(e,t){e=u.get(e);void 0===e?(o.push(t),++p):(a.push([e,t]),g=f[t]||0,h.push([e-g,t-p]),l.push(t===e),e!==t&&d.push([e,t]))}),s.reverse(),new _(n,i,o,s,d,a,h,l);var n,i,r,o,s,a,u,c,h,l,f,d,p,g}function C(n,i){var e=O(n);return b(i.map(function(e){return e.target}),e.map(function(e){return e.element})).maintained.filter(function(e){var t=e[0],e=e[1],t=i[t].size,e=n[e];return!e.inlineSize||!e.contentSize||t.inlineSize!==e.computedInlineSize||t.blockSize!==e.computedContentSize}).map(function(e){e=e[1];return n[e]})}function O(e){return e.filter(function(e){return e.element})}function x(e){return O(e).map(function(e){return e.element})}function I(e){return"string"==typeof e}function T(e){return"object"==typeof e}function w(e){return"number"==typeof e}function D(e){return e.reduce(function(e,t){return e+t},0)}function M(e){var t,r=e.prototype,o=e.propertyTypes;for(t in o)!function(n){var i=o[n]===a.RENDER_PROPERTY,e=Object.getOwnPropertyDescriptor(r,n)||{};Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:e.get||function(){return this.options[n]},set:e.set||function(e){var t=this.options;t[n]!==e&&(t[n]=e,i&&t.renderOnPropertyChange&&this.scheduleRender())}})}(t)}function N(t){return function(e,r){t.forEach(function(i){i in e||(e[i]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(n=this[r])[i].apply(n,e);return n===this[r]?this:n})})}}function k(e){for(var t=[],n=0;n<e;++n)t.push(n);return t}function A(e,t){return Math.max(e-t[1],t[0]-e,0)+1}function L(e,t,n){return Math.min(n,Math.max(e,t))}function U(e,t){if(!t)return e;var n=1/t;return Math.round(e/t)/n}var j=N(e),F=function(){function e(e,t){var u=this;void 0===t&&(t={}),this._resizeTimer=0,this._maxResizeDebounceTimer=0,this.rect={width:0,height:0},this._updatedEntries=[],this._onWindowResize=function(){u._scheduleResize([{target:u.container}])},this._onObserve=function(e){var t=u._options,i=u.container,r=t.rectBox,o=t.childrenRectBox;u._scheduleResize(e.map(function(e){var t,n="border-box"===(e.target===i?r:o)?e.borderBoxSize:e.contentBoxSize;return{size:(n=!n?[{inlineSize:(t=e.contentRect).width,blockSize:t.height}]:n)[0]||n,target:e.target}}))},this._scheduleResize=function(e){var t=u._options,n=t.resizeDebounce,t=t.maxResizeDebounce,i=u._updatedEntries;i.push.apply(i,e),u._updatedEntries=i.filter(function(e,t){return i.lastIndexOf(e)===t}),!u._maxResizeDebounceTimer&&n<=t&&(u._maxResizeDebounceTimer=window.setTimeout(u._onResize,t)),u._resizeTimer&&(clearTimeout(u._resizeTimer),u._resizeTimer=0),u._resizeTimer=window.setTimeout(u._onResize,n)},this._onResize=function(){clearTimeout(u._resizeTimer),clearTimeout(u._maxResizeDebounceTimer),u._maxResizeDebounceTimer=0,u._resizeTimer=0;var t,e,n,i=u._updatedEntries,r=u.container,o=i.filter(function(e){return e.target!==r||(t=e,!1)}),s=0<o.length,a=!!t;a&&(e=u._options.watchDirection,n=u.rect,(i=t.size)?u.setRect({width:i.inlineSize,height:i.blockSize}):u.resize(),i=u.rect,a=!e||("box"===e||"width"===e)&&n.width!==i.width||("box"===e||"height"===e)&&n.height!==i.height),u._updatedEntries=[],(a||s)&&u._emitter.trigger("resize",{isResizeContainer:a,childEntries:o})},this._options=p({resizeDebounce:100,maxResizeDebounce:0,useResizeObserver:!1,useWindowResize:!0,watchDirection:!1,rectBox:"content-box",childrenRectBox:"border-box"},t),this.container=I(e)?document.querySelector(e):e,this._init()}var t=e.prototype;return t.getRect=function(){return this.rect},t.setRect=function(e){this.rect=p({},e)},t.isObserverEnabled=function(){return!!this._observer},t.resize=function(){var e=this.container;this.setRect("border-box"===this._options.rectBox?{width:e.offsetWidth,height:e.offsetHeight}:{width:e.clientWidth,height:e.clientHeight})},t.observeChildren=function(e){var t,n=this._observer;n&&(t=this._options.childrenRectBox,e.forEach(function(e){e&&n.observe(e,{box:t})}))},t.unobserveChildren=function(e){var t=this._observer;t&&e.forEach(function(e){e&&t.unobserve(e)})},t.listen=function(e){return this._emitter.on("resize",e),this},t.destroy=function(){var e;null!==(e=this._observer)&&void 0!==e&&e.disconnect(),this._options.useWindowResize&&window.removeEventListener("resize",this._onWindowResize)},t._init=function(){var e=this.container,t=this._options;this._emitter=new n,t.useResizeObserver&&window.ResizeObserver&&(this._observer=new window.ResizeObserver(this._onObserve),this._observer.observe(e,{box:t.rectBox})),t.useWindowResize&&window.addEventListener("resize",this._onWindowResize),this.resize()},e}(),Y=function(i){function e(e,t){var n=i.call(this)||this;return n.container=e,n._onResize=function(e){n.trigger("resize",e)},n.options=p({horizontal:f.horizontal,autoResize:f.autoResize,resizeDebounce:f.resizeDebounce,maxResizeDebounce:f.maxResizeDebounce,useResizeObserver:f.useResizeObserver},t),n._init(),n}r(e,i);var t=e.prototype;return t.resize=function(){var e=this.container;this.setRect({width:e.clientWidth,height:e.clientHeight})},t.isObserverEnabled=function(){return this._watcher.isObserverEnabled()},t.getRect=function(){return this._watcher.getRect()},t.observeChildren=function(e){this._watcher.observeChildren(e)},t.unobserveChildren=function(e){this._watcher.unobserveChildren(e)},t.setRect=function(e){this._watcher.setRect(e)},t.getInlineSize=function(){return this.getRect()[this._names.inlineSize]},t.getContentSize=function(){return this.getRect()[this._names.contentSize]},t.getStatus=function(){return{rect:this._watcher.getRect()}},t.setStatus=function(e){this.setRect(e.rect),this.setContentSize(this.getContentSize())},t.setContentSize=function(e){var t,n=this.options.horizontal?"width":"height";this.setRect(p(p({},this.getRect()),((t={})[n]=e,t))),this.container.style[n]=e+"px"},t.destroy=function(e){void 0===e&&(e={}),this._watcher.destroy(),e.preserveUI||(this.container.style.cssText=this.orgCSSText)},t._init=function(){var e=this.container,t=window.getComputedStyle(e);this.orgCSSText=e.style.cssText,"static"===t.position&&(e.style.position="relative");t=this.options;this._watcher=new F(e,{useWindowResize:t.autoResize,useResizeObserver:t.useResizeObserver,resizeDebounce:t.resizeDebounce,maxResizeDebounce:t.maxResizeDebounce,watchDirection:!!t.useResizeObserver&&this._names.inlineSize}).listen(this._onResize)},Object.defineProperty(t,"_names",{get:function(){return d[this.options.horizontal?"horizontal":"vertical"]},enumerable:!1,configurable:!0}),e}(n),W=function(e,t){return(W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function G(e,t){function n(){this.constructor=e}W(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var H=function(){return(H=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};var q="undefined"!=typeof window,B=q?window.navigator.userAgent:"",V=q&&!!("getComputedStyle"in window),K=/MSIE|Trident|Windows Phone|Edge/.test(B),X=q&&!!("addEventListener"in document),J="width",$="height";function Q(e,t){return e.getAttribute(t)||""}function Z(e){return[].slice.call(e)}function ee(e,t){return void 0===t&&(t="data-"),"loading"in e&&"lazy"===e.getAttribute("loading")||!!e.getAttribute(t+"lazy")}function te(e,t,n){X?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function ne(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function ie(e,t){var n=e["client"+t]||e["offset"+t];return parseFloat(n||(e=e,((V?window.getComputedStyle(e):e.currentStyle)||{})[t.toLowerCase()]))||0}function re(e,t,n){var i=Z(e.querySelectorAll(function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var i=Array(e),r=0,t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,r++)i[r]=o[s];return i}(["["+n+"skip] ["+n+"width]"],t.map(function(e){return["["+n+"skip] "+e,e+"["+n+"skip]","["+n+"width] "+e].join(", ")})).join(", ")));return Z(e.querySelectorAll("["+n+"width], "+t.join(", "))).filter(function(e){return-1===i.indexOf(e)})}var oe=[];function se(e,t){oe.length||te(window,"resize",ue),e.__PREFIX__=t,oe.push(e),ae(e)}function ae(e,t){void 0===t&&(t="data-");var n,i=e.__PREFIX__||t,r=parseInt(Q(e,""+i+J),10)||0,t=parseInt(Q(e,""+i+$),10)||0;Q(e,i+"fixed")===$?(n=ie(e,"Height")||t,e.style[J]=r/t*n+"px"):(n=ie(e,"Width")||r,e.style[$]=t/r*n+"px")}function ue(){oe.forEach(function(e){ae(e)})}var ce=function(r){function e(e,t){void 0===t&&(t={});var n=r.call(this)||this;n.isReady=!1,n.isPreReady=!1,n.hasDataSize=!1,n.hasLoading=!1,n.isSkip=!1,n.onCheck=function(e){n.clear(),e&&"error"===e.type&&n.onError(n.element),n.hasLoading&&n.checkElement()||(e=!n.hasDataSize&&!n.hasLoading,n.onReady(e))},n.options=H({prefix:"data-"},t),n.element=e;var i=n.options.prefix;return n.hasDataSize=(t=i,!!e.getAttribute((t=void 0===t?"data-":t)+"width")),n.isSkip=(t=i,!!e.getAttribute((t=void 0===t?"data-":t)+"skip")),n.hasLoading=ee(e,i),n}G(e,r);var t=e.prototype;return t.check=function(){return this.isSkip||!this.checkElement()?(this.onAlreadyReady(!0),!1):(this.hasDataSize&&se(this.element,this.options.prefix),(this.hasDataSize||this.hasLoading)&&this.onAlreadyPreReady(),!0)},t.addEvents=function(){var t=this,n=this.element;this.constructor.EVENTS.forEach(function(e){te(n,e,t.onCheck)})},t.clear=function(){var t=this,n=this.element;this.constructor.EVENTS.forEach(function(e){ne(n,e,t.onCheck)}),this.removeAutoSizer()},t.destroy=function(){this.clear(),this.off()},t.removeAutoSizer=function(){var e,t,n;this.hasDataSize&&(n=this.options.prefix,e=this.element,t=n,(n=oe.indexOf(e))<0||(t=Q(e,t+"fixed"),delete e.__PREFIX__,e.style[t===$?J:$]="",oe.splice(n,1),oe.length||ne(window,"resize",ue)))},t.onError=function(e){this.trigger("error",{element:this.element,target:e})},t.onPreReady=function(){this.isPreReady||(this.isPreReady=!0,this.trigger("preReady",{element:this.element,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onReady=function(e){this.isReady||((e=!this.isPreReady&&e)&&(this.isPreReady=!0),this.removeAutoSizer(),this.isReady=!0,this.trigger("ready",{element:this.element,withPreReady:e,hasLoading:this.hasLoading,isSkip:this.isSkip}))},t.onAlreadyError=function(e){var t=this;setTimeout(function(){t.onError(e)})},t.onAlreadyPreReady=function(){var e=this;setTimeout(function(){e.onPreReady()})},t.onAlreadyReady=function(e){var t=this;setTimeout(function(){t.onReady(e)})},e.EVENTS=[],e}(n),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}G(t,e);var n=t.prototype;return n.setHasLoading=function(e){this.hasLoading=e},n.check=function(){return this.isSkip?(this.onAlreadyReady(!0),!1):(this.hasDataSize?(se(this.element,this.options.prefix),this.onAlreadyPreReady()):this.trigger("requestChildren"),!0)},n.checkElement=function(){return!0},n.destroy=function(){this.clear(),this.trigger("requestDestroy"),this.off()},n.onAlreadyPreReady=function(){e.prototype.onAlreadyPreReady.call(this),this.trigger("reqeustReadyChildren")},t.EVENTS=[],t}(ce),B=function(n){function e(e){void 0===e&&(e={});var t=n.call(this)||this;return t.readyCount=0,t.preReadyCount=0,t.totalCount=0,t.totalErrorCount=0,t.isPreReadyOver=!0,t.elementInfos=[],t.options=H({loaders:{},prefix:"data-"},e),t}G(e,n);var t=e.prototype;return t.check=function(e){var o=this,n=this.options.prefix;this.clear(),this.elementInfos=Z(e).map(function(e,r){var t=o.getLoader(e,{prefix:n});return t.check(),t.on("error",function(e){o.onError(r,e.target)}).on("preReady",function(e){var t=o.elementInfos[r];t.hasLoading=e.hasLoading,t.isSkip=e.isSkip;e=o.checkPreReady(r);o.onPreReadyElement(r),e&&o.onPreReady()}).on("ready",function(e){var t=e.withPreReady,n=e.hasLoading,i=e.isSkip,e=o.elementInfos[r];e.hasLoading=n,e.isSkip=i;e=t&&o.checkPreReady(r),i=o.checkReady(r);t&&o.onPreReadyElement(r),o.onReadyElement(r),e&&o.onPreReady(),i&&o.onReady()}),{loader:t,element:e,hasLoading:!1,hasError:!1,isPreReady:!1,isReady:!1,isSkip:!1}});e=this.elementInfos.length;return(this.totalCount=e)||setTimeout(function(){o.onPreReady(),o.onReady()}),this},t.getTotalCount=function(){return this.totalCount},t.isPreReady=function(){return this.elementInfos.every(function(e){return e.isPreReady})},t.isReady=function(){return this.elementInfos.every(function(e){return e.isReady})},t.hasError=function(){return 0<this.totalErrorCount},t.clear=function(){this.isPreReadyOver=!1,this.totalCount=0,this.preReadyCount=0,this.readyCount=0,this.totalErrorCount=0,this.elementInfos.forEach(function(e){!e.isReady&&e.loader&&e.loader.destroy()}),this.elementInfos=[]},t.destroy=function(){this.clear(),this.off()},t.getLoader=function(t,e){var n=this,i=t.tagName.toLowerCase(),r=this.options.loaders,o=e.prefix,s=Object.keys(r);if(r[i])return new r[i](t,e);var a=new he(t,e),u=Z(t.querySelectorAll(s.join(", ")));a.setHasLoading(u.some(function(e){return ee(e,o)}));var c=!1,h=this.clone().on("error",function(e){a.onError(e.target)}).on("ready",function(){a.onReady(c)});return a.on("requestChildren",function(){var e=re(t,s,n.options.prefix);h.check(e).on("preReady",function(e){(c=e.isReady)||a.onPreReady()})}).on("reqeustReadyChildren",function(){h.check(u)}).on("requestDestroy",function(){h.destroy()}),a},t.clone=function(){return new e(H({},this.options))},t.checkPreReady=function(e){return this.elementInfos[e].isPreReady=!0,++this.preReadyCount,!(this.preReadyCount<this.totalCount)},t.checkReady=function(e){return this.elementInfos[e].isReady=!0,++this.readyCount,!(this.readyCount<this.totalCount)},t.onError=function(e,t){var n=this.elementInfos[e];n.hasError=!0,this.trigger(new c("error",{element:n.element,index:e,target:t,errorCount:this.getErrorCount(),totalErrorCount:++this.totalErrorCount}))},t.onPreReadyElement=function(e){var t=this.elementInfos[e];this.trigger(new c("preReadyElement",{element:t.element,index:e,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isSkip:t.isSkip}))},t.onPreReady=function(){this.isPreReadyOver=!0,this.trigger(new c("preReady",{readyCount:this.readyCount,totalCount:this.totalCount,isReady:this.isReady(),hasLoading:this.hasLoading()}))},t.onReadyElement=function(e){var t=this.elementInfos[e];this.trigger(new c("readyElement",{index:e,element:t.element,hasError:t.hasError,errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,preReadyCount:this.preReadyCount,readyCount:this.readyCount,totalCount:this.totalCount,isPreReady:this.isPreReady(),isReady:this.isReady(),hasLoading:t.hasLoading,isPreReadyOver:this.isPreReadyOver,isSkip:t.isSkip}))},t.onReady=function(){this.trigger(new c("ready",{errorCount:this.getErrorCount(),totalErrorCount:this.totalErrorCount,totalCount:this.totalCount}))},t.getErrorCount=function(){return this.elementInfos.filter(function(e){return e.hasError}).length},t.hasLoading=function(){return this.elementInfos.some(function(e){return e.hasLoading})},e}(n),le=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.checkElement=function(){var e=this.element,t=e.getAttribute("src");if(e.complete){if(t)return e.naturalWidth||this.onAlreadyError(e),!1;this.onAlreadyPreReady()}return this.addEvents(),K&&e.setAttribute("src",t),!0},t.EVENTS=["load","error"],t}(ce),fe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return G(t,e),t.prototype.checkElement=function(){var e=this.element;return!(1<=e.readyState)&&(e.error?(this.onAlreadyError(e),!1):(this.addEvents(),!0))},t.EVENTS=["loadedmetadata","error"],t}(ce),de=function(t){function e(e){return t.call(this,H({loaders:{img:le,video:fe}},e=void 0===e?{}:e))||this}return G(e,t),e}(B),pe=function(){function e(e){this.initialRects={},this.sizePercetage=!1,this.posPercetage=!1,this.options=p({attributePrefix:f.attributePrefix,useTransform:f.useTransform,horizontal:f.horizontal,percentage:f.percentage,isEqualSize:f.isEqualSize,isConstantSize:f.isConstantSize,useRoundedSize:f.useRoundedSize},e),this._init()}var t=e.prototype;return t.resize=function(){this.initialRects={}},t.renderItems=function(e){var t=this;e.forEach(function(e){t._renderItem(e)})},t.getInlineSize=function(){return this.containerRect[this.options.horizontal?"height":"width"]},t.setContainerRect=function(e){this.containerRect=e},t.updateEqualSizeItems=function(t,e){var n=this;this.updateItems(t);var i=t.some(function(e){return e.attributes.sizeGroup});(this.options.isEqualSize||i)&&t.some(function(e){return e.updateState===R.UPDATED})&&e.forEach(function(e){-1===t.indexOf(e)&&n.updateItem(e,!0)})},t.updateItems=function(e){var t=this;e.forEach(function(e){t.updateItem(e)})},t.getStatus=function(){return{initialRects:this.initialRects}},t.setStatus=function(e){this.initialRects=e.initialRects},t._init=function(){var e=this.options.percentage,t=!1,n=!1;!0===e?n=t=!0:e&&(-1<e.indexOf("position")&&(n=!0),-1<e.indexOf("size")&&(t=!0)),this.posPercetage=n,this.sizePercetage=t},t.updateItem=function(e,t){var n=this.options,i=n.isEqualSize,r=n.isConstantSize,o=n.useRoundedSize,s=this.initialRects,a=e.orgRect,u=e.element,c=e.updateState===R.WAIT_LOADING,h=a&&a.width&&a.height,l=u?function(e,t){for(var n={},i=e.attributes,r=i.length,o=0;o<r;++o){var s=i[o],a=s.name,s=s.value;-1!==a.indexOf(t)&&(n[a.replace(t,"").replace(/[\s-_]([a-z])/g,function(e,t){return t.toUpperCase()})]=s)}return n}(u,this.options.attributePrefix):e.attributes,n=null!==(f=l.sizeGroup)&&void 0!==f?f:"",f=l.notEqualSize;if(""!==n&&s[n])d=s[n];else if(i&&!f&&!n&&s[""])d=s[""];else if(r&&h&&!c)d=a;else{if(t||!u)return;var d={left:u.offsetLeft,top:u.offsetTop,width:0,height:0};o?(d.width=u.offsetWidth,d.height=u.offsetHeight):(u=u.getBoundingClientRect(),d.width=u.width,d.height=u.height)}return e.attributes=l,e.shouldReupdate=!1,e.isFirstUpdate&&h||(e.orgRect=p({},d)),e.rect=p({},d),t||(e.element&&(e.mountState=g.MOUNTED),e.updateState===R.NEED_UPDATE&&(e.updateState=R.UPDATED,e.isFirstUpdate=!0),c||f||s[n]||(s[n]=p({},d))),d},t._renderItem=function(e){var n,i,t,r,o,s,a,u=e.element,c=e.cssRect;u&&c&&(a=(t=this.options).horizontal,e=t.useTransform,n=this.posPercetage,i=this.sizePercetage,t=["position: absolute;"],r=(a=d[a?"horizontal":"vertical"]).inlineSize,o=a.inlinePos,s=this.getInlineSize(),a=c,a=Object.keys(a),e&&(a=a.filter(function(e){return"top"!==e&&"left"!==e}),t.push("transform: translate("+(c.left||0)+"px, "+(c.top||0)+"px);")),t.push.apply(t,a.map(function(e){var t=c[e];return e===r&&i||e===o&&n?e+": "+t/s*100+"%;":e+": "+t+"px;"})),u.style.cssText+=t.join(""))},e}(),ge=function(){function e(e,t){void 0===t&&(t={}),this.horizontal=e,this.isUpdating=!1,this.shouldReupdate=!1,this.hasTransition=!1,this.transitionDuration="",this.isRestoreOrgCSSText=!0;var n,e=t.element,i=p({key:"",index:0,orgRect:{left:0,top:0,width:0,height:0},rect:{left:0,top:0,width:0,height:0},cssRect:{},attributes:{},data:{},isFirstUpdate:!1,mountState:g.UNCHECKED,updateState:R.NEED_UPDATE,element:e||null,orgCSSText:null!==(e=null==e?void 0:e.style.cssText)&&void 0!==e?e:"",gridData:{}},t);for(n in i)this[n]=i[n]}var t=e.prototype;return Object.defineProperty(t,"orgInlineSize",{get:function(){var e=this._names.inlineSize;return this.orgRect[e]||this.rect[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"orgContentSize",{get:function(){var e=this._names.contentSize;return this.orgRect[e]||this.rect[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"inlineSize",{get:function(){return this.rect[this._names.inlineSize]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"contentSize",{get:function(){return this.rect[this._names.contentSize]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssInlineSize",{get:function(){return this.cssRect[this._names.inlineSize]},set:function(e){this.cssRect[this._names.inlineSize]=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssContentSize",{get:function(){return this.cssRect[this._names.contentSize]},set:function(e){this.cssRect[this._names.contentSize]=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssInlinePos",{get:function(){return this.cssRect[this._names.inlinePos]},set:function(e){this.cssRect[this._names.inlinePos]=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssContentPos",{get:function(){return this.cssRect[this._names.contentPos]},set:function(e){this.cssRect[this._names.contentPos]=e},enumerable:!1,configurable:!0}),Object.defineProperty(t,"computedInlineSize",{get:function(){var e=this._names.inlineSize;return this.cssRect[e]||this.rect[e]||this.orgRect[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"computedContentSize",{get:function(){var e=this._names.contentSize;return this.cssRect[e]||this.rect[e]||this.orgRect[e]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"computedInlinePos",{get:function(){var e,t=this._names.inlinePos;return null!==(e=this.cssRect[t])&&void 0!==e?e:this.rect[t]},enumerable:!1,configurable:!0}),Object.defineProperty(t,"computedContentPos",{get:function(){var e,t=this._names.contentPos;return null!==(e=this.cssRect[t])&&void 0!==e?e:this.rect[t]},enumerable:!1,configurable:!0}),t.setCSSGridRect=function(e){var t,n=d[this.horizontal?"horizontal":"vertical"],i={};for(t in e)i[n[t]]=e[t];this.cssRect=i},t.getStatus=function(){return{index:this.index,mountState:this.mountState,updateState:this.updateState,attributes:this.attributes,orgCSSText:this.orgCSSText,isFirstUpdate:this.isFirstUpdate,element:null,key:this.key,orgRect:this.orgRect,rect:this.rect,cssRect:this.cssRect,gridData:this.gridData,data:this.data}},t.getMinimizedStatus=function(){var e={orgRect:this.orgRect,rect:this.rect,cssRect:this.cssRect,attributes:this.attributes,gridData:this.gridData},t=this,n=t.key,i=t.mountState,r=t.updateState,o=t.isFirstUpdate,t=t.orgCSSText;return void 0!==n&&(e.key=n),i!==g.UNCHECKED&&(e.mountState=i),r!==R.NEED_UPDATE&&(e.updateState=r),o&&(e.isFirstUpdate=!0),t&&(e.orgCSSText=t),e},Object.defineProperty(t,"_names",{get:function(){return this.horizontal?d.horizontal:d.vertical},enumerable:!1,configurable:!0}),e}(),me=function(d){function e(e,t){void 0===t&&(t={});var n=d.call(this)||this;n.items=[],n.outlines={start:[],end:[]},n._renderTimer=0,n._onResize=function(e){e.isResizeContainer?n._renderItems({useResize:!0},!0):0<(e=C(n.items,e.childEntries)).length&&n.updateItems(e)},n.options=p(p({},n.constructor.defaultOptions),t),n.containerElement=I(e)?document.querySelector(e):e;var i=n.options,r=i.isEqualSize,o=i.isConstantSize,s=i.useTransform,a=i.horizontal,u=i.percentage,c=i.externalContainerManager,h=i.externalItemRenderer,l=i.resizeDebounce,f=i.maxResizeDebounce,t=i.autoResize,e=i.useRoundedSize,i=i.useResizeObserver;return n.containerManager=c||new Y(n.containerElement,{horizontal:a,resizeDebounce:l,maxResizeDebounce:f,autoResize:t,useResizeObserver:i}).on("resize",n._onResize),n.itemRenderer=h||new pe({useTransform:s,isEqualSize:r,isConstantSize:o,percentage:u,useRoundedSize:e}),n._init(),n}r(e,d);var t=e.prototype;return t.getContainerElement=function(){return this.containerElement},t.getItems=function(){return this.items},t.getChildren=function(){return[].slice.call(this.containerElement.children)},t.setItems=function(e){e.forEach(function(e,t){e.index=t});var t=this.options;return t.useResizeObserver&&t.observeChildren&&((t=this.containerManager).unobserveChildren(x(this.items)),t.observeChildren(x(e))),this.items=e,this},t.getContainerInlineSize=function(){return this.containerManager.getInlineSize()},t.getOutlines=function(){return this.outlines},t.setOutlines=function(e){return this.outlines=e,this},t.syncElements=function(e){void 0===e&&(e={});var n=this.items,t=this.options.horizontal,i=this.getChildren(),r=b(this.items.map(function(e){return e.element}),i),o=r.added,s=r.maintained,a=r.changed,r=r.removed,u=[];return s.forEach(function(e){var t=e[0],e=e[1];u[e]=n[t]}),o.forEach(function(e){u[e]=new ge(t,{element:i[e]})}),this.setItems(u),(o.length||r.length||a.length)&&this.renderItems(e),this},t.updateItems=function(e,t){void 0===e&&(e=this.items);var n=(t=void 0===t?{}:t).useOrgResize;return e.forEach(function(e){var t;n&&((t=e.orgRect).width=0,t.height=0),e.updateState=R.NEED_UPDATE}),this.checkReady(t),this},t.renderItems=function(e){return this._renderItems(e=void 0===e?{}:e),this},t.getStatus=function(t){return{outlines:this.outlines,items:this.items.map(function(e){return t?e.getMinimizedStatus():e.getStatus()}),containerManager:this.containerManager.getStatus(),itemRenderer:this.itemRenderer.getStatus()}},t.setStatus=function(e){var t=this,n=this.options.horizontal,i=this.containerManager,r=i.getInlineSize(),o=this.getChildren();return this.itemRenderer.setStatus(e.itemRenderer),i.setStatus(e.containerManager),this.outlines=e.outlines,this.items=e.items.map(function(e,t){return new ge(n,p(p({},e),{element:o[t]}))}),this.itemRenderer.renderItems(this.items),r!==i.getInlineSize()?this.renderItems({useResize:!0}):window.setTimeout(function(){t._renderComplete({direction:t.defaultDirection,mounted:t.items,updated:[],isResize:!1})}),this},t.getComputedOutlineSize=function(e){return void 0===e&&(e=this.items),this.options.outlineSize||this.getContainerInlineSize()},t.getComputedOutlineLength=function(e){return void 0===e&&(e=this.items),this.options.outlineLength||1},t.destroy=function(e){var e=(e=void 0===e?{}:e).preserveUI,e=void 0===e?this.options.preserveUIOnDestroy:e;this.containerManager.destroy({preserveUI:e}),e||this.items.forEach(function(e){var t=e.element,e=e.orgCSSText;t&&(t.style.cssText=e)}),null!==(e=this._im)&&void 0!==e&&e.destroy()},t.checkReady=function(n){var i=this;void 0===n&&(n={});var e=this.items,r=e.filter(function(e){var t;return(null===(t=e.element)||void 0===t?void 0:t.parentNode)&&e.updateState!==R.UPDATED}),t=e.filter(function(e){var t;return(null===(t=e.element)||void 0===t?void 0:t.parentNode)&&e.mountState!==g.MOUNTED}),o=[];t.filter(function(e){if(e.hasTransition)return!0;var t=e.element;return 0<parseFloat(getComputedStyle(t).transitionDuration)&&(e.hasTransition=!0,e.transitionDuration=t.style.transitionDuration,!0)}).forEach(function(e){e.element.style.transitionDuration="0s"}),null!==(e=this._im)&&void 0!==e&&e.destroy(),this._im=new de({prefix:this.options.attributePrefix}).on("preReadyElement",function(e){r[e.index].updateState=R.WAIT_LOADING}).on("preReady",function(){r.forEach(function(e){var t=e.orgRect.width&&e.orgRect.height,n=e.cssRect.width||e.cssRect.height;!t&&n&&(e.element.style.cssText=e.orgCSSText)}),i._updateItems(r),i.readyItems(t,r,n)}).on("readyElement",function(e){var t=r[e.index];t.updateState=R.NEED_UPDATE,e.isPreReadyOver&&(t.isRestoreOrgCSSText&&(t.element.style.cssText=t.orgCSSText),i._updateItems([t]),i.readyItems([],[t],n))}).on("error",function(e){var t=r[e.index];i.trigger("contentError",{element:e.element,target:e.target,item:t,update:function(){o.push(t)}})}).on("ready",function(){o.length&&i.updateItems(o)}).check(r.map(function(e){return e.element}))},t.scheduleRender=function(){var e=this;this._clearRenderTimer(),this._renderTimer=window.setTimeout(function(){e.renderItems()})},t.fitOutlines=function(e){void 0===e&&(e=this.useFit);var t=this.outlines,n=t.start,i=t.end,r=n.length?Math.min.apply(Math,n):0;!e&&0<r||(t.start=n.map(function(e){return e-r}),t.end=i.map(function(e){return e-r}),this.items.forEach(function(e){var t=e.cssContentPos;w(t)&&(e.cssContentPos=t-r)}))},t.readyItems=function(e,t,n){var i=this.outlines,r=n.direction||this.options.defaultDirection,o=n.outline||i["end"===r?"start":"end"],s=this.items,i={start:m([],o),end:m([],o)};e.forEach(function(e){e.mountState=g.MOUNTED}),t.forEach(function(e){e.isUpdating=!0}),s.length&&(i=this.applyGrid(this.items,r,o)),t.forEach(function(e){e.isUpdating=!1}),this.setOutlines(i),this.fitOutlines(),this.itemRenderer.renderItems(this.items),this._refreshContainerContentSize();i=e.filter(function(e){return e.hasTransition});i.length&&(this.containerManager.resize(),i.forEach(function(e){e.element.style.transitionDuration=e.transitionDuration})),this._renderComplete({direction:r,mounted:e,updated:t,isResize:!!n.useResize});t=t.filter(function(e){return e.shouldReupdate});t.length&&this.updateItems(t)},t._isObserverEnabled=function(){return this.containerManager.isObserverEnabled()},t._updateItems=function(e){this.itemRenderer.updateEqualSizeItems(e,this.getItems())},t._renderComplete=function(e){this.trigger("renderComplete",e)},t._clearRenderTimer=function(){clearTimeout(this._renderTimer),this._renderTimer=0},t._refreshContainerContentSize=function(){var e=this.outlines,t=e.start,n=e.end,e=this.options.gap,n=n.length?Math.max.apply(Math,n):0,t=t.length?Math.max.apply(Math,t):0,e=Math.max(t,n-e);this.containerManager.setContentSize(e)},t._resizeContainer=function(){this.containerManager.resize(),this.itemRenderer.setContainerRect(this.containerManager.getRect())},t._init=function(){this._resizeContainer()},t._renderItems=function(e,t){void 0===e&&(e={}),this._clearRenderTimer();var n=e.useResize||e.useOrgResize;n&&!t&&(this._resizeContainer(),this.itemRenderer.resize()),!this.getItems().length&&this.getChildren().length?this.syncElements(e):n?this.updateItems(this.items,e):this.checkReady(e)},e.defaultOptions=f,e.propertyTypes=z,o([M],e)}(n);function Re(e,t,n,i){return Math[i].apply(Math,e.slice(t,t+n))}q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.applyGrid=function(z,e,t){z.forEach(function(e){e.isRestoreOrgCSSText=!1});var n,v=this.getComputedOutlineSize(z),S=this.getComputedOutlineLength(z),i=this.options,y=i.gap,r=i.align,E=i.observeChildren,_=i.columnSizeRatio,o=i.contentAlign,i=t.length,P=z.length,b=this._getAlignPoses(S,v),C="end"===e,O=C?"min":"max",x=C?"max":"min",e=[0],I=(e=i===S?t.slice():(n=i?Math[x].apply(Math,t):0,k(S).map(function(){return n}))).slice(),T=1<S?b[1]-b[0]:0,w="stretch"===r,D=C&&"start"===o,M=C?-1/0:1/0;D&&(M=Math.min.apply(Math,I));for(var s=function(e){var t,n,i,r,o,s=z[C?e:P-1-e],a=parseInt(s.attributes.column||"1",10),u=parseInt(s.attributes.maxColumn||"1",10),c=s.contentSize,h=Math.min(S,a||Math.max(1,Math.ceil((s.inlineSize+y)/T))),l=Math.min(S,Math.max(h,u)),f=(n=h,i=O,r=M,e=(t=I).length-n+1,o="max"===i?"min":"max",u="max"===i?"lastIndexOf":"indexOf",(e=k(e).map(function(e){e=Re(t,e,n,o);return Math[o](r,e)}))[u](Math[i].apply(Math,e))),d=Re(I,f,h,x);for(D&&M!==d&&(M=Math.max.apply(Math,I),I=I.map(function(){return M}),d=M,f=0);h<l;){var p=f+h,g=f-1;if(C&&(S<=p||I[p]>d))break;if(!C&&(g<0||I[g]<d))break;C||--f,++h}f=Math.max(0,f),h=Math.min(S-f,h),(0<a&&1<h||w)&&(m=(h-1)*T+v,N._isObserverEnabled()&&E||s.cssInlineSize===m||(s.shouldReupdate=!0),s.cssInlineSize=m),0<_&&(c=s.computedInlineSize/_,s.cssContentSize=c);var m=b[f],d=C?d:d-y-c;s.cssInlinePos=m,s.cssContentPos=d;var R=C?d+c+y:d;k(h).forEach(function(e){I[f+e]=R})},N=this,a=0;a<P;++a)s(a);return D&&M!==Math.min.apply(Math,I)&&(M=Math.max.apply(Math,I),I=I.map(function(){return M})),{start:C?e:I,end:C?I:e}},n.getComputedOutlineSize=function(e){void 0===e&&(e=this.items);var t=this.options,n=t.gap,i=t.align,r=this.getContainerInlineSize(),o=this.columnSize||this.outlineSize,s=this.column||this.outlineLength,a=s||1,t=0;if("stretch"===i)s||(s=this.maxStretchColumnSize||1/0,a=Math.max(1,Math.ceil((r+n)/(s+n)))),t=(r+n)/(a||1)-n;else if(o)t=o;else if(e.length){for(var u=e[0],c=0,h=e;c<h.length;c++){var l=h[c],f=l.attributes,d=parseInt(f.column||"1",10),f=parseInt(f.maxColumn||"1",10);if(l.updateState===R.UPDATED&&l.inlineSize&&1===d&&1===f){u=l;break}}t=u.inlineSize||0}else t=r;return t||0},n.getComputedOutlineLength=function(e){void 0===e&&(e=this.items);var t=this.gap,n=this.column||this.outlineLength,i=this.columnCalculationThreshold;return n||(n=this.getComputedOutlineSize(e),Math.min(e.length,Math.max(1,Math.floor((this.getContainerInlineSize()+t)/(n-i+t)))))},n._getAlignPoses=function(e,t){var n=this.options,i=n.align,r=n.gap,o=this.getContainerInlineSize(),s=k(e),a=0,u=0;return"justify"===i||"stretch"===i?(u=(n=e-1)?Math.max((o-t)/n,t+r):0,a=Math.min(0,o/2-(n*u+t)/2)):(t=(e-1)*(u=t+r)+t,"center"===i?a=(o-t)/2:"end"===i&&(a=o-t)),s.map(function(e){return a+e*u})},t.propertyTypes=p(p({},me.propertyTypes),{column:a.RENDER_PROPERTY,columnSize:a.RENDER_PROPERTY,columnSizeRatio:a.RENDER_PROPERTY,align:a.RENDER_PROPERTY,columnCalculationThreshold:a.RENDER_PROPERTY,maxStretchColumnSize:a.RENDER_PROPERTY,contentAlign:a.RENDER_PROPERTY}),t.defaultOptions=p(p({},me.defaultOptions),{align:"justify",column:0,columnSize:0,columnSizeRatio:0,columnCalculationThreshold:.5,maxStretchColumnSize:1/0,contentAlign:"masonry"}),o([M],t)}(me);function ze(e,t,n){return function(e,t){for(var n=[],i=t;i;)n.push(i),i=e[i];return n.reverse(),n}(function(e,t,n){var i={},r={};r[t]=0;var o,s,a,u,c,h,l=new ve(function(e){return e.cost});for(l.push({value:t,cost:0});l.size();)for(var f in s=(o=l.pop()).value,a=o.cost,u=e(s)||{})c=a+u[f],h=r[f],(void 0===r[f]||c<h)&&(r[f]=c,l.push({value:f,cost:c}),i[f]=s);if(void 0!==r[n])return i;throw n=["Could not find a path from ",t," to ",n,"."].join(""),new Error(n)}(e,t,n),n)}var ve=function(){function e(e){this.content=[],this.scoreFunction=e}var t=e.prototype;return t.push=function(e){this.content.push(e),this.bubbleUp(this.content.length-1)},t.pop=function(){var e=this.content[0],t=this.content.pop();return 0<this.content.length&&(this.content[0]=t,this.sinkDown(0)),e},t.size=function(){return this.content.length},t.bubbleUp=function(e){for(var t=e,n=this.content[t];0<t;){var i=Math.floor((t+1)/2)-1,r=this.content[i];if(!(this.scoreFunction(n)<this.scoreFunction(r)))break;this.content[i]=n,this.content[t]=r,t=i}},t.sinkDown=function(e){for(var t=this.content.length,n=this.content[e],i=this.scoreFunction(n);;){var r,o=2*(e+1),s=o-1,a=null;if(s<t&&(r=this.content[s],(r=this.scoreFunction(r))<i&&(a=s)),o<t&&(s=this.content[o],this.scoreFunction(s)<(null==a?i:r)&&(a=o)),null===a)break;this.content[e]=this.content[a],this.content[a]=n,e=a}},e}();function Se(e,t){if(w(t))return t;var n=t.charAt(0),i="+"===n?1:"-"===n?-1:0,n=parseFloat(t);return t.match(/%$/g)&&(n*=e/100),i?e+n:n}function ye(e,t){var n=e.orgInlineSize,i=e.orgContentSize,r=e.gridData.inlineOffset||0,o=e.gridData.contentOffset||0,e=e.gridData.contentMargin||0;return n&&i?(i<=o?1:(n-r)/(i-o))*(t-e-o)+r:t-e}ce=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.applyGrid=function(e,t,n){var a=this,i=this.options,u=i.attributePrefix,c=i.horizontal;e.forEach(function(e){var t,n,i,r,o,s;e.isUpdating&&(t=e.element,o=e.attributes,n=e.gridData,i=parseFloat(o.inlineOffset),s=parseFloat(o.contentOffset),r=parseFloat(o.contentMargin),isNaN(i)&&(i=a.inlineOffset||n.inlineOffset||0),isNaN(s)&&(s=a.contentOffset||0|n.contentOffset),isNaN(r)&&(r=a.contentMargin||0|n.contentMargin),!t||"inlineOffset"in o||"contentOffset"in o||e.mountState!==g.MOUNTED||(o=t.querySelector("["+u+"maintained-target]"))&&(e=t.offsetWidth-t.clientWidth+t.scrollWidth-o.clientWidth,o=t.offsetHeight-t.clientHeight+t.scrollHeight-o.clientHeight,s=c?(i=o,e):(i=e,o)),n.inlineOffset=i,n.contentOffset=s,n.contentMargin=r)});var r=this.options.rowRange,o=[],i="end"===t;return e.length&&(o=r?this._getRowPath(e,i):this._getPath(e,i)),this._setStyle(e,o,n,"end"===t)},n._getRowPath=function(e,t){var n=this._getColumnRange(),i=this._getRowRange(),t=this._getRowLink(e,{path:[0],cost:0,length:0,currentNode:0},n,i,t);return null!==(t=null==t?void 0:t.path.map(function(e){return""+e}))&&void 0!==t?t:[]},n._getRowLink=function(e,t,n,i,r){var o=n[0],s=i[0],a=i[1],u=e.length,c=t.path,h=t.length,l=t.cost,f=t.currentNode;if(f<u&&(a<=h||u<f+o)){o=A(u-f,n)*Math.abs(this._getCost(e,f,u,r));return p(p({},t),{length:h+1,path:m(m([],c),[u]),currentNode:u,cost:l+o,isOver:!0})}return u<=f?p(p({},t),{currentNode:u,isOver:h<s||a<h}):this._searchRowLink(e,t,u,n,i,r)},n._searchRowLink=function(e,t,n,i,r,o){for(var s,a=i[0],u=i[1],c=t.currentNode,h=t.path,l=t.length,f=t.cost,d=Math.min(n,c+u),p=[],g=c+a;g<=d;++g)g!==c&&(s=Math.abs(this._getCost(e,c,g,o)),(s=this._getRowLink(e,{path:m(m([],h),[g]),length:l+1,cost:f+s,currentNode:g},i,r,o))&&p.push(s));return p.sort(function(e,t){var n=e.isOver;return n!==t.isOver?n?1:-1:A(e.length,r)-A(t.length,r)||e.cost-t.cost}),p[0]},n._getExpectedRowSize=function(i,e){var t=this.options.gap,n=this.getContainerInlineSize()-t*(i.length-1),o=n,s=0,a=0;if(i.forEach(function(e){var t,n,i=e.orgInlineSize,r=e.orgContentSize;i&&r?(t=e.gridData.inlineOffset||0,n=e.gridData.contentOffset||0,e=e.gridData.contentMargin||0,s+=r=r<=n?1:(i-t)/(r-n),a+=(n+e)*r,o-=t):s+=1}),s){var r=(o+a)/s;if(this.stretch){var t=this._getSizeRange(),u=L(r,t[0],t[1]);if(e)return u;var c=this.stretchRange,t=i.map(function(e){return ye(e,u)}),e=t.reduce(function(e,t,n){return e+Se(t,i[n].attributes.minStretch||c[0])},0),t=t.reduce(function(e,t,n){return e+Se(t,i[n].attributes.maxStretch||c[1])},0);if(e<=n&&n<=t)return u}return r}return 0},n._getExpectedInlineSizes=function(e,o){var t=this.options,s=t.stretch,a=t.stretchRange;return e.map(function(e){var t=s?Se(e.orgInlineSize,e.attributes.minStretch||a[0]):-1/0,n=s?Se(e.orgInlineSize,e.attributes.maxStretch||a[1]):1/0,i=ye(e,o),r=!1,e=!1;return n<=i?r=!0:i<=t&&(e=!0),{minSize:t,maxSize:n,size:L(i,t,n),originalSize:i,isMax:r,isMin:e}})},n._getStretchItemInfos=function(e,t){var n=this.options.gap,i=e.length,r=this.getContainerInlineSize()-n*(Math.max(1,i)-1),e=this._getExpectedInlineSizes(e,t),t=D(e.map(function(e){return e.size})),t=r-t,o=r/D(e.map(function(e){return e.originalSize})),s=e.map(function(e){return p(p({},e),{passed:!1,size:e.originalSize*o})});if(0==t)return{infos:s,cost:0};for(var a=0<t,u=s.length,c=0;c<u;++c)if("break"===function(){var e=D(s.map(function(e){return e.passed?e.size:0})),t=D(s.map(function(e){return e.passed?0:e.originalSize})),n=(r-e)/t;if(s.forEach(function(e){e.passed||(a?e.size>e.maxSize&&(n=Math.min(n,e.maxSize/e.originalSize)):e.size<e.minSize&&(n=Math.max(n,e.minSize/e.originalSize)))}),s.forEach(function(e){e.passed||(e.size=L(e.originalSize*n,e.minSize,e.maxSize),(a&&!U(e.size-e.maxSize,.001)||!a&&!U(e.size-e.minSize,.001))&&(e.passed=!0))}),s.every(function(e){return e.passed}))return"break"}())break;var h=r/D(s.map(function(e){return e.size}));return U(h-1,.001)&&s.forEach(function(e){e.size*=h}),{infos:s,cost:D(s.map(function(e){var t=1;(e.size>e.maxSize||e.size<e.minSize)&&(t=2);var n=e.originalSize,n=a?Math.max(n,e.minSize):Math.min(n,e.maxSize);return Math.abs(e.size-n)*t}))}},n._getExpectedInlineSize=function(e,t){var n=this.options.gap,t=this._getExpectedInlineSizes(e,t);return t.length?D(t.map(function(e){return e.size}))+n*(e.length-1):0},n._getCost=function(e,t,n,i){var r=e.slice(t,n),o=this.getContainerInlineSize(),s=this._getExpectedRowSize(r),a=this._getSizeRange(),u=a[0],c=a[1];if(this.isCroppedSize){if(u<=s&&s<=c)return 0;var h=this._getExpectedInlineSize(r,s<u?u:c);return Math.pow(h-o,2)}a=0;if(this.stretch){s<u?s=u:c<s&&(s=c);h=this._getExpectedInlineSize(r,s);return a=!this.passUnstretchRow||(i?n!==e.length:0!==t)||o<=h?this._getStretchItemInfos(r,s).cost:a}if(isFinite(c)){if(s<u)return Math.pow(s-u,2)+Math.pow(c,2)+a;if(c<s)return Math.pow(s-c,2)+Math.pow(c,2)+a}else if(s<u)return Math.max(Math.pow(u,2),Math.pow(s,2))+Math.pow(c,2)+a;return s-u+a},n._getPath=function(o,s){var a=this,u=o.length,e=this.options.columnRange,e=T(e)?e:[e,e],c=e[0],h=e[1];return ze(function(e){for(var t={},n=parseInt(e,10),i=Math.min(n+c,u);i<=u&&!(h<i-n);++i){var r=a._getCost(o,n,i,s);r<0&&i===u&&(r=0),t[""+i]=Math.pow(r,2)}return t},"0",""+u)},n._setStyle=function(e,t,n,l){var f=this;void 0===n&&(n=[]);var d,p,i=this.options,g=i.gap,m=i.isCroppedSize,R=i.displayedRow,z=i.stretch,v=i.passUnstretchRow,S=e.length,y=this._getSizeRange(),n=n[0]||0,E=this.getContainerInlineSize(),t=function(e,t){for(var n=t.length,i=[],r=0;r<n-1;++r){var o=parseInt(t[r],10),s=parseInt(t[r+1],10);i.push(e.slice(o,s))}return i}(e,t),_=t.length,P=n,b=0;if(t.forEach(function(o,e){var n=o.length,s=f._getExpectedRowSize(o,!0);m&&(s=Math.max(y[0],Math.min(s,y[1])));var i,r,t=g*(n-1),a=o.map(function(e,t){var n=ye(e,s);return{index:t,item:e,inlineSize:n,orgInlineSize:n,maxInlineSize:n,minInlineSize:n}}),u=f._getExpectedInlineSize(o,s),c=(E-t)/(u-t),h=u-t,t=E-t;z&&u&&t!=h&&(v&&h<t&&(l?e===_-1:0===e)?(p=[P],d=o.map(function(e,t){return S-n+t}),i=f._getExpectedInlineSizes(o,s),a.forEach(function(e,t){e.minInlineSize=i[t].minSize,e.maxInlineSize=i[t].maxSize,e.inlineSize=L(e.inlineSize,e.minInlineSize,e.maxInlineSize)})):(r=f._getStretchItemInfos(o,s).infos,a.forEach(function(e,t){e.inlineSize=r[t].size,e.minInlineSize=r[t].minSize,e.maxInlineSize=r[t].maxSize}))),a.forEach(function(e,t){var n=e.item,i=e.inlineSize,r=o[t-1],t=r?r.cssInlinePos+r.cssInlineSize+g:0;m&&(i*=c);r=n.gridData;r.orgInlineSize=e.orgInlineSize,r.orgContentSize=s,r.minInlineSize=e.minInlineSize,r.maxInlineSize=e.maxInlineSize,n.setCSSGridRect({inlinePos:t,contentPos:P,inlineSize:i,contentSize:s})}),P+=g+s,(R<0||e<R)&&(b=P)}),l)return{start:[n],end:[b],passedItems:d,passed:p};var r=P-n;return e.forEach(function(e){e.cssContentPos-=r}),{passedItems:d,passed:p?[p[0]-r]:null,start:[n-r],end:[n]}},n.getComputedOutlineLength=function(){return 1},n.getComputedOutlineSize=function(){return this.getContainerInlineSize()},n._getRowRange=function(){var e=this.rowRange;return T(e)?e:[e,e]},n._getColumnRange=function(){var e=this.columnRange;return T(e)?e:[e,e]},n._getSizeRange=function(){var e=this.sizeRange;return T(e)?e:[e,e]},t.propertyTypes=p(p({},me.propertyTypes),{columnRange:a.RENDER_PROPERTY,rowRange:a.RENDER_PROPERTY,sizeRange:a.RENDER_PROPERTY,isCroppedSize:a.RENDER_PROPERTY,displayedRow:a.RENDER_PROPERTY,stretch:a.RENDER_PROPERTY,stretchRange:a.RENDER_PROPERTY,passUnstretchRow:a.RENDER_PROPERTY,inlineMargin:a.RENDER_PROPERTY,contentMargin:a.RENDER_PROPERTY,inlineOffset:a.RENDER_PROPERTY,contentOffset:a.RENDER_PROPERTY}),t.defaultOptions=p(p({},me.defaultOptions),{columnRange:[1,8],rowRange:0,sizeRange:[0,1/0],displayedRow:-1,isCroppedSize:!1,stretch:!1,passUnstretchRow:!1,stretchRange:["-20%","+20%"],contentMargin:0,inlineOffset:0,contentOffset:0}),o([M],t)}(me);function Ee(e){var t=-1/0;return e.forEach(function(e){isFinite(e)&&(t=Math.max(t,e))}),isFinite(t)?t:0}function _e(e,t,n){return Ee(e)+function(e,t,n){var i=e.length;if(!i)return 0;var r=function(e){var t=1/0;return e.forEach(function(e){isFinite(e)&&(t=Math.min(t,e))}),isFinite(t)?t:0}(t),o=Ee(e),s=0;if(!n)return 0;for(var a=0;a<i;++a){var u=e[a],c=t[a];isFinite(u)&&isFinite(c)&&(u=u-o,c=c-r,s=a?Math.max(s,s+u-c):u-c)}return s}(e,t,n)}function Pe(e,t,n){for(var i=n.inlinePos,r=n.inlineSize,o=n.contentPos,s=n.contentSize,a=i;a<i+r;++a)e[a]=Math.min(e[a],o),t[a]=Math.max(t[a],o+s)}var B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.applyGrid=function(e,t,n){var i=this._getFrame(),r=i.inlineSize,o=i.contentSize,s=i.rects,a=this.options,u=a.gap,c=a.useFrameFill,a=this.getRectSize(r),h=a.inlineSize,l=a.contentSize,f=e.length;if(!f||!r||!o)return{start:n,end:n};for(var d=s.length,p=k(r).map(function(){return 1/0}),g=k(r).map(function(){return-1/0}),m=i.outline.map(function(e){return e*(l+u)}),R=0;R<f;R+=d)for(var z=_e(g,m,c),v=0;v<d&&R+v<f;++v){var S=e[R+v],y=s[v],E=y.contentPos,_=y.inlinePos,P=y.contentSize,b=y.inlineSize,C=z+E*(l+u),y=_*(h+u),E=P*(l+u)-u,P=b*(h+u)-u;Pe(p,g,{inlinePos:_,inlineSize:b,contentPos:C,contentSize:E+u}),S.setCSSGridRect({inlinePos:y,contentPos:C,inlineSize:P,contentSize:E})}var O,t="end"===t,n=n.length?n:[0];n.length!==r&&(O=(t?Math.max:Math.min).apply(Math,n),n=k(r).map(function(){return O}));var p=p.map(function(e){return isFinite(e)?e:0}),g=g.map(function(e){return isFinite(e)?e:0}),x=t?_e(n,p,c):_e(g,n,c);return e.forEach(function(e){e.cssContentPos+=x}),{start:p.map(function(e){return e+x}),end:g.map(function(e){return e+x})}},n.getComputedOutlineLength=function(){var e=this.options.frame;return e.length?e[0].length:0},n.getComputedOutlineSize=function(){var e=this.options,t=e.gap,e=e.rectSize;return"object"==typeof e?e.inlineSize:e||(this.getContainerInlineSize()+t)/this.getComputedOutlineLength()-t},n.getRectSize=function(e){var t=this.options,n=t.gap,t=t.rectSize;if("object"==typeof t)return t;n=t||(this.getContainerInlineSize()+n)/e-n;return{inlineSize:n,contentSize:n}},n._getFrame=function(){for(var e=this.options.frame,t=e.length,n=t?e[0].length:0,i=[],r={},o=k(n).map(function(){return 1/0}),s=k(n).map(function(){return-1/0}),a=0;a<t;++a)for(var u=0;u<n;++u){var c=e[a][u];c&&(r[a+","+u]||(Pe(o,s,c=this._findRect(r,c,a,u,n,t)),i.push(c)))}return i.sort(function(e,t){return e.type<t.type?-1:1}),{rects:i,inlineSize:n,contentSize:t,outline:o}},n._findRect=function(e,t,n,i,r,o){for(var s=this.options.frame,a=1,u=1,c=i;c<r&&s[n][c]===t;++c)u=c-i+1;for(var h=n;h<o&&s[h][i]===t;++h)a=h-n+1;for(var l=n;l<n+a;++l)for(var f=i;f<i+u;++f)e[l+","+f]=!0;return{type:t,inlinePos:i,contentPos:n,inlineSize:u,contentSize:a}},t.propertyTypes=p(p({},me.propertyTypes),{frame:a.RENDER_PROPERTY,useFrameFill:a.RENDER_PROPERTY,rectSize:a.RENDER_PROPERTY}),t.defaultOptions=p(p({},me.defaultOptions),{frame:[],rectSize:0,useFrameFill:!0}),o([M],t)}(me),be=function(){function e(e){var t,n=p({orgInlineSize:0,orgContentSize:0,inlineSize:0,contentSize:0,inlinePos:0,contentPos:0,items:[]},e);for(t in n)this[t]=n[t]}var t=e.prototype;return t.scaleTo=function(e,t){var n=this.inlineSize?e/this.inlineSize:0,i=this.contentSize?t/this.contentSize:0;this.items.forEach(function(e){0!=n&&(e.inlinePos*=n,e.inlineSize*=n),0!=i&&(e.contentPos*=i,e.contentSize*=i)}),this.inlineSize=e,this.contentSize=t},t.push=function(e){this.items.push(e)},t.getOrgSizeWeight=function(){return this.orgInlineSize*this.orgContentSize},t.getSize=function(){return this.inlineSize*this.contentSize},t.getOrgRatio=function(){return 0===this.orgContentSize?0:this.orgInlineSize/this.orgContentSize},t.getRatio=function(){return 0===this.contentSize?0:this.inlineSize/this.contentSize},e}();function Ce(e,t){t=e/t;return(t=t<1?1/t:t)-1}var Oe,xe={__proto__:null,default:me,GetterSetter:M,withGridMethods:j,withMethods:N,getMountedElements:x,getUpdatedItems:C,MasonryGrid:q,JustifiedGrid:ce,FrameGrid:B,PackingGrid:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}r(t,e);var n=t.prototype;return n.applyGrid=function(e,t,n){var i=this,r=this.options,o=r.aspectRatio,s=r.gap,a=this.getContainerInlineSize(),u=a/o,n=n.length?n:[0],c="end"===t?Math.max.apply(Math,n):Math.min.apply(Math,n)-u-s,n=c+u+s,h=new be({});return e.forEach(function(e){e=new be({inlineSize:e.orgInlineSize,contentSize:e.orgContentSize,orgInlineSize:e.orgInlineSize,orgContentSize:e.orgContentSize});i._findBestFitArea(h,e),h.push(e),h.scaleTo(a+s,u+s)}),e.forEach(function(e,t){var n=h.items[t],i=n.inlineSize-s,r=n.contentSize-s,t=c+n.contentPos,n=n.inlinePos;e.setCSSGridRect({inlinePos:n,contentPos:t,inlineSize:i,contentSize:r})}),{start:[c],end:[n]}},n._findBestFitArea=function(e,p){if(0===e.getRatio())return e.orgInlineSize=p.inlineSize,e.orgContentSize=p.contentSize,e.inlineSize=p.inlineSize,void(e.contentSize=p.contentSize);var g,t,n,i,r,m=1/0,R=!1,z={inlineSize:0,contentSize:0},v={inlineSize:0,contentSize:0},S=this._getWeight("size"),y=this._getWeight("ratio");e.items.forEach(function(e){for(var t=Ce(e.getOrgSizeWeight(),e.getSize())*S,n=Ce(e.getOrgRatio(),e.getRatio())*y,i=e.inlineSize,r=e.contentSize,o=0;o<2;++o){var s=void 0,a=void 0,u=void 0,c=void 0;0===o?(u=s=i,c=r-(a=r*(p.contentSize/(e.orgContentSize+p.contentSize)))):(c=a=r,u=i-(s=i*(p.inlineSize/(e.orgInlineSize+p.inlineSize))));var h=s*a,l=s/a,f=u*c,d=c/c,h=Ce(p.getSize(),h)*S;h+=Ce(p.getRatio(),l)*y,h+=Ce(e.getOrgSizeWeight(),f)*S-t,(h+=Ce(e.getOrgRatio(),d)*y-n)===Math.min(h,m)&&(m=h,g=e,R=0===o,z.inlineSize=s,z.contentSize=a,v.inlineSize=u,v.contentSize=c)}}),t=g,n=z,i=v,r=R,(e=p).contentSize=n.contentSize,e.inlineSize=n.inlineSize,t.contentSize=i.contentSize,t.inlineSize=i.inlineSize,r?(e.contentPos=t.contentPos+t.contentSize,e.inlinePos=t.inlinePos):(e.inlinePos=t.inlinePos+t.inlineSize,e.contentPos=t.contentPos)},n.getComputedOutlineLength=function(){return 1},n.getComputedOutlineSize=function(){return this.getContainerInlineSize()},n._getWeight=function(e){var t=this.options,n=t.weightPriority;return n===e?100:"custom"===n?t[e+"Weight"]:1},t.propertyTypes=p(p({},me.propertyTypes),{aspectRatio:a.RENDER_PROPERTY,sizeWeight:a.RENDER_PROPERTY,ratioWeight:a.RENDER_PROPERTY,weightPriority:a.RENDER_PROPERTY}),t.defaultOptions=p(p({},me.defaultOptions),{aspectRatio:1,sizeWeight:1,ratioWeight:1,weightPriority:"custom"}),o([M],t)}(me),ItemRenderer:pe,GridItem:ge,ContainerManager:Y,ResizeWatcher:F,DEFAULT_GRID_OPTIONS:f,get PROPERTY_TYPE(){return a},get MOUNT_STATE(){return g},get UPDATE_STATE(){return R},GRID_PROPERTY_TYPES:z,GRID_METHODS:e,GRID_EVENTS:["renderComplete","contentError"],RECT_NAMES:d};for(Oe in xe)me[Oe]=xe[Oe];return me}); | ||
//# sourceMappingURL=grid.min.js.map |
{ | ||
"name": "@egjs/grid", | ||
"version": "1.16.0-beta.10", | ||
"version": "1.16.0-beta.11", | ||
"description": "A component that can arrange items according to the type of grids", | ||
@@ -5,0 +5,0 @@ "main": "dist/grid.cjs.js", |
@@ -129,2 +129,5 @@ /** | ||
public setItems(items: GridItem[]): this { | ||
items.forEach((item, i) => { | ||
item.index = i; | ||
}); | ||
const options = this.options; | ||
@@ -131,0 +134,0 @@ |
@@ -13,2 +13,3 @@ /** | ||
* @property - The item key. <ko>아이템 키.</ko> | ||
* @property - The item index. <ko>아이템 index.</ko> | ||
* @property - The element for the item. <ko>아이템에 있는 엘리먼트.</ko> | ||
@@ -28,2 +29,3 @@ * @property - State of whether the element has been added to the container. <ko>element가 container에 추가되었는지 상태.</ko> | ||
key?: string | number; | ||
index?: number; | ||
element?: HTMLElement | null; | ||
@@ -73,2 +75,3 @@ mountState?: MOUNT_STATE; | ||
key: "", | ||
index: 0, | ||
orgRect: { left: 0, top: 0, width: 0, height: 0 }, | ||
@@ -233,2 +236,3 @@ rect: { left: 0, top: 0, width: 0, height: 0 }, | ||
return { | ||
index: this.index, | ||
mountState: this.mountState, | ||
@@ -235,0 +239,0 @@ updateState: this.updateState, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1667703
18312