From b10456d7eb8caf6013682523c551ed3d201f3b77 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sat, 19 Dec 2020 15:29:23 +0100 Subject: [PATCH] Update --- .../plugins/filterizr/jquery.filterizr.min.js | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/themes/educenter-hugo/static/plugins/filterizr/jquery.filterizr.min.js b/themes/educenter-hugo/static/plugins/filterizr/jquery.filterizr.min.js index 18a80fad..f21dd50f 100755 --- a/themes/educenter-hugo/static/plugins/filterizr/jquery.filterizr.min.js +++ b/themes/educenter-hugo/static/plugins/filterizr/jquery.filterizr.min.js @@ -1 +1,29 @@ -!function(t){function e(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var r={};e.m=t,e.c=r,e.d=function(t,r,i){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,r){"use strict";r.d(e,"b",function(){return n}),r.d(e,"h",function(){return o}),r.d(e,"i",function(){return s}),r.d(e,"g",function(){return a}),r.d(e,"e",function(){return l}),r.d(e,"j",function(){return u}),r.d(e,"f",function(){return c}),r.d(e,"k",function(){return f}),r.d(e,"c",function(){return p}),r.d(e,"d",function(){return h}),r.d(e,"l",function(){return d}),r.d(e,"a",function(){return v});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=function(t,e){for(var r=0;rn?1:0}}(e))},p=function(t,e,r,n,o){if(void 0!==e){var s=new Error('Filterizr: expected type of option "'+t+'" to be "'+r+'", but its type is: "'+(void 0===e?"undefined":i(e))+'"'),a=!1,l=!1,u=r.includes("array");if((void 0===e?"undefined":i(e)).match(r)?a=!0:!a&&u&&(l=Array.isArray(e)),!a&&!u)throw s;if(!a&&u&&!l)throw s;var c=function(t){return t?" For further help read here: "+t:""};if(Array.isArray(n)){var f=!1;if(n.forEach(function(t){t===e&&(f=!0)}),!f)throw new Error('Filterizr: allowed values for option "'+t+'" are: '+n.map(function(t){return'"'+t+'"'}).join(", ")+'. Value received: "'+e+'".'+c(o))}else if(n instanceof RegExp){var p=e.match(n);if(!p)throw new Error('Filterizr: invalid value "'+e+'" for option "'+t+'" received.'+c(o))}}},h=/(^linear$)|(^ease-in-out$)|(^ease-in$)|(^ease-out$)|(^ease$)|(^step-start$)|(^step-end$)|(^steps\(\d\s*,\s*(end|start)\))$|(^cubic-bezier\((\d*\.*\d+)\s*,\s*(\d*\.*\d+)\s*,\s*(\d*\.*\d+)\s*,\s*(\d*\.*\d+)\))$/,d="\n webkitTransitionEnd.Filterizr \n otransitionend.Filterizr \n oTransitionEnd.Filterizr \n msTransitionEnd.Filterizr \n transitionend.Filterizr\n",v={IDLE:"IDLE",FILTERING:"FILTERING",SORTING:"SORTING",SHUFFLING:"SHUFFLING"}},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(2),o=r(0),s=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:".filtr-container",r=arguments[1];i(this,t),this.$node=a(e),this.$node.css({padding:0,position:"relative",width:"100%",display:"flex","flex-wrap":"wrap"}),this.props={FilterItems:this.getFilterItems(r),w:this.getWidth(),h:0},this.updateFilterItemsDimensions()}return s(t,[{key:"destroy",value:function(){this.$node.attr("style","").find(".filtr-item").attr("style",""),this.unbindEvents()}},{key:"getFilterItems",value:function(t){return a.map(this.$node.find(".filtr-item"),function(e,r){return new n.a(a(e),r,t)})}},{key:"push",value:function(t,e){var r=this.props.FilterItems;this.$node.append(t);var i=r.length,o=new n.a(t,i,e);this.props.FilterItems.push(o)}},{key:"calcColumns",value:function(){return Math.round(this.props.w/this.props.FilterItems[0].props.w)}},{key:"updateFilterItemsTransitionStyle",value:function(t,e,r,i){this.props.FilterItems.forEach(function(n){return n.$node.css({transition:"all "+t+"s "+e+" "+n.calcDelay(r,i)+"ms"})})}},{key:"updateHeight",value:function(t){this.props.h=t,this.$node.css("height",t)}},{key:"updateWidth",value:function(){this.props.w=this.getWidth()}},{key:"updateFilterItemsDimensions",value:function(){this.props.FilterItems.forEach(function(t){return t.updateDimensions()})}},{key:"getWidth",value:function(){return this.$node.innerWidth()}},{key:"bindTransitionEnd",value:function(t,e){this.$node.on(o.l,Object(o.e)(function(){t()},e))}},{key:"bindEvents",value:function(t){this.$node.on("filteringStart.Filterizr",t.onFilteringStart),this.$node.on("filteringEnd.Filterizr",t.onFilteringEnd),this.$node.on("shufflingStart.Filterizr",t.onShufflingStart),this.$node.on("shufflingEnd.Filterizr",t.onShufflingEnd),this.$node.on("sortingStart.Filterizr",t.onSortingStart),this.$node.on("sortingEnd.Filterizr",t.onSortingEnd)}},{key:"unbindEvents",value:function(){this.$node.off(o.l+"\n filteringStart.Filterizr \n filteringEnd.Filterizr \n shufflingStart.Filterizr \n shufflingEnd.Filterizr \n sortingStart.Filterizr \n sortingEnd.Filterizr")}},{key:"trigger",value:function(t){this.$node.trigger(t)}}]),t}();e.a=l},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(0),o=function(){function t(t,e){for(var r=0;r0?r[0]:a.a;this._fltr=new n.a(e,o)}else if(r.length>=1&&"string"==typeof r[0]){var s=r[0],l=Array.prototype.slice.call(r,1),c=this._fltr;switch(s){case"filter":return c.filter.apply(c,i(l)),this;case"insertItem":return c.insertItem.apply(c,i(l)),this;case"toggleFilter":return c.toggleFilter.apply(c,i(l)),this;case"sort":return c.sort.apply(c,i(l)),this;case"shuffle":return c.shuffle.apply(c,i(l)),this;case"search":return c.search.apply(c,i(l)),this;case"setOptions":return c.setOptions.apply(c,i(l)),this;case"destroy":return c.destroy.apply(c,i(l)),delete this._fltr,this;default:throw new Error("Filterizr: "+s+" is not part of the Filterizr API. Please refer to the docs for more information.")}}return this}}(f),e.default=c,r(16)},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(7),o=r(1),s=r(8),a=r(3),l=r(0),u=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:".filtr-container",r=arguments[1];i(this,t),this.options=Object(l.i)(a.a,r);var s=new o.a(e,this.options);if(!s.$node.length)throw new Error("Filterizr: could not find a container with the selector "+e+", to initialize Filterizr.");new n.a(this,this.options.controlsSelector),this.props={filterizrState:l.a.IDLE,searchTerm:"",sort:"index",sortOrder:"asc",FilterContainer:s,FilterItems:s.props.FilterItems,FilteredItems:[]},this.bindEvents(),this.filter(this.options.filter)}return u(t,[{key:"filter",value:function(t){var e=this.props,r=e.searchTerm,i=e.FilterContainer,n=e.FilterItems;i.trigger("filteringStart"),this.props.filterizrState=l.a.FILTERING,t=Array.isArray(t)?t.map(function(t){return t.toString()}):t.toString();var o=this.searchFilterItems(this.filterFilterItems(n,t),r);this.props.FilteredItems=o,this.render(o)}},{key:"destroy",value:function(){var t=this.props.FilterContainer,e=this.options.controlsSelector;t.destroy(),c(window).off("resize.Filterizr"),c(e+"[data-filter]").off("click.Filterizr"),c(e+"[data-multifilter]").off("click.Filterizr"),c(e+"[data-shuffle]").off("click.Filterizr"),c(e+"[data-search]").off("keyup.Filterizr"),c(e+"[data-sortAsc]").off("click.Filterizr"),c(e+"[data-sortDesc]").off("click.Filterizr")}},{key:"insertItem",value:function(t){var e=this.props.FilterContainer,r=t.clone().attr("style","");e.push(r,this.options);var i=this.filterFilterItems(this.props.FilterItems,this.options.filter);this.render(i)}},{key:"sort",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"index",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"asc",r=this.props,i=r.FilterContainer,n=r.FilterItems;i.trigger("sortingStart"),this.props.filterizrState=l.a.SORTING,this.props.FilterItems=this.sortFilterItems(n,t,e);var o=this.filterFilterItems(this.props.FilterItems,this.options.filter);this.props.FilteredItems=o,this.render(o)}},{key:"search",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.searchTerm,e=this.props.FilterItems,r=this.searchFilterItems(this.filterFilterItems(e,this.options.filter),t);this.props.FilteredItems=r,this.render(r)}},{key:"shuffle",value:function(){var t=this.props,e=t.FilterContainer,r=t.FilteredItems;e.trigger("shufflingStart"),this.props.filterizrState=l.a.SHUFFLING;var i=this.shuffleFilterItems(r);this.props.FilteredItems=i,this.render(i)}},{key:"setOptions",value:function(t){Object(l.c)("animationDuration",t.animationDuration,"number"),Object(l.c)("callbacks",t.callbacks,"object"),Object(l.c)("controlsSelector",t.controlsSelector,"string"),Object(l.c)("delay",t.delay,"number"),Object(l.c)("easing",t.easing,"string",l.d,"https://www.w3schools.com/cssref/css3_pr_transition-timing-function.asp"),Object(l.c)("delayMode",t.delayMode,"string",["progressive","alternate"]),Object(l.c)("filter",t.filter,"string|number|array"),Object(l.c)("filterOutCss",t.filterOutCss,"object"),Object(l.c)("filterInCss",t.filterOutCss,"object"),Object(l.c)("layout",t.layout,"string",["sameSize","vertical","horizontal","sameHeight","sameWidth","packed"]),Object(l.c)("multifilterLogicalOperator",t.multifilterLogicalOperator,"string",["and","or"]),Object(l.c)("setupControls",t.setupControls,"boolean"),this.options=Object(l.i)(this.options,t),(t.animationDuration||t.delay||t.delayMode||t.easing)&&this.props.FilterContainer.updateFilterItemsTransitionStyle(t.animationDuration,t.easing,t.delay,t.delayMode),(t.callbacks||t.animationDuration)&&this.rebindFilterContainerEvents(),t.filter&&this.filter(t.filter),t.multifilterLogicalOperator&&this.filter(this.options.filter)}},{key:"toggleFilter",value:function(t){var e=this.options.filter;"all"===e?e=t:Array.isArray(e)?e.includes(t)?(e=e.filter(function(e){return e!==t}),1===e.length&&(e=e[0])):e.push(t):e=e===t?"all":[e,t],this.options.filter=e,this.filter(this.options.filter)}},{key:"filterFilterItems",value:function(t,e){var r=this.options.multifilterLogicalOperator;return"all"===e?t:t.filter(function(t){var i=t.getCategories();return Array.isArray(e)?"or"===r?Object(l.g)(i,e).length:Object(l.b)(e,i):i.includes(e)})}},{key:"sortFilterItems",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"index",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"asc",i=Object(l.k)(t,function(t){return"index"!==e&&"sortData"!==e?t.props.data[e]:t.props[e]});return"asc"===r?i:i.reverse()}},{key:"searchFilterItems",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props.searchTerm;return e?t.filter(function(t){return t.contentsMatchSearch(e)}):t}},{key:"shuffleFilterItems",value:function(t){for(var e=Object(l.j)(t);t.length>1&&Object(l.f)(t,e);)e=Object(l.j)(t);return e}},{key:"render",value:function(t){var e=this,r=this.options,i=r.filter,n=r.filterInCss,o=r.filterOutCss,a=r.layout,u=r.multifilterLogicalOperator;this.props.FilterItems.filter(function(t){var r=t.getCategories(),n=Array.isArray(i),o=t.contentsMatchSearch(e.props.searchTerm);return!(n?"or"===u?Object(l.g)(r,i).length:Object(l.b)(i,r):r.includes(i))||!o}).forEach(function(t){t.filterOut(o)});var c=Object(s.a)(a,this);t.forEach(function(t,e){t.filterIn(c[e],n)})}},{key:"onTransitionEndCallback",value:function(){var t=this.props,e=t.filterizrState,r=t.FilterContainer;switch(e){case l.a.FILTERING:r.trigger("filteringEnd");break;case l.a.SORTING:r.trigger("sortingEnd");break;case l.a.SHUFFLING:r.trigger("shufflingEnd")}this.props.filterizrState=l.a.IDLE}},{key:"rebindFilterContainerEvents",value:function(){var t=this,e=this.props.FilterContainer,r=this.options,i=r.animationDuration,n=r.callbacks;e.unbindEvents(),e.bindEvents(n),e.bindTransitionEnd(function(){t.onTransitionEndCallback()},i)}},{key:"bindEvents",value:function(){var t=this,e=this.props.FilterContainer;this.rebindFilterContainerEvents(),c(window).on("resize.Filterizr",Object(l.e)(function(){e.updateWidth(),e.updateFilterItemsDimensions(),t.filter(t.options.filter)},250))}}]),t}();e.a=f},function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=r(0),o=function(){function t(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"";i(this,t),this.props={Filterizr:e,selector:r},this.setupFilterControls(),this.setupShuffleControls(),this.setupSearchControls(),this.setupSortControls()}return o(t,[{key:"setupFilterControls",value:function(){var t=this.props,e=t.Filterizr,r=t.selector;s(r+"[data-filter]").on("click.Filterizr",function(t){var r=s(t.currentTarget),i=r.attr("data-filter");e.options.filter=i,e.filter(e.options.filter)}),s(r+"[data-multifilter]").on("click.Filterizr",function(t){var r=s(t.target),i=r.attr("data-multifilter");e.toggleFilter(i)})}},{key:"setupShuffleControls",value:function(){var t=this.props,e=t.Filterizr,r=t.selector;s(r+"[data-shuffle]").on("click.Filterizr",function(){e.shuffle()})}},{key:"setupSearchControls",value:function(){var t=this.props,e=t.Filterizr,r=t.selector;s(r+"[data-search]").on("keyup.Filterizr",Object(n.e)(function(t){var r=s(t.target),i=r.val();e.props.searchTerm=i.toLowerCase(),e.search(e.props.searchTerm)},250))}},{key:"setupSortControls",value:function(){var t=this.props,e=t.Filterizr,r=t.selector;s(r+"[data-sortAsc]").on("click.Filterizr",function(){var t=s(r+"[data-sortOrder]").val();e.props.sortOrder="asc",e.sort(t,"asc")}),s(r+"[data-sortDesc]").on("click.Filterizr",function(){var t=s(r+"[data-sortOrder]").val();e.props.sortOrder="desc",e.sort(t,"desc")})}}]),t}();e.a=a},function(t,e,r){"use strict";var i=r(9),n=r(10),o=r(11),s=r(12),a=r(13),l=r(14),u=function(t,e){switch(t){case"horizontal":return Object(i.a)(e);case"vertical":return Object(n.a)(e);case"sameHeight":return Object(o.a)(e);case"sameWidth":return Object(s.a)(e);case"sameSize":return Object(a.a)(e);case"packed":return Object(l.a)(e);default:return Object(a.a)(e)}};e.a=u},function(t,e,r){"use strict";var i=function(t){var e=t.props,r=e.FilterContainer,i=e.FilteredItems,n=0,o=0,s=i.map(function(t){var e=t.props,r=e.w,i=e.h,s={left:n,top:0};return n+=r,i>o&&(o=i),s});return r.updateHeight(o),s};e.a=i},function(t,e,r){"use strict";var i=function(t){var e=t.props,r=e.FilterContainer,i=e.FilteredItems,n=0,o=i.map(function(t){var e=t.props.h,r={left:0,top:n};return n+=e,r});return r.updateHeight(n),o};e.a=i},function(t,e,r){"use strict";var i=function(t){var e=t.props,r=e.FilterContainer,i=e.FilteredItems,n=r.props.w,o=i[0].props.h,s=0,a=0,l=i.map(function(t){var e=t.props.w;a+e>n&&(s++,a=0);var r={left:a,top:o*s};return a+=e,r});return r.updateHeight((s+1)*i[0].props.h),l};e.a=i},function(t,e,r){"use strict";function i(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e=s&&a++;var c=e-s*a;return l[c]+=u,{left:c*i,top:o(n,s,e)}});return r.updateHeight(Math.max.apply(Math,i(l))),u},o=function(t,e,r){if(e<=0)return 0;var i=0;if(r=0;)i+=t[r].props.h,r-=e;return i};e.a=n},function(t,e,r){"use strict";var i=function(t){var e=t.props,r=e.FilterContainer,i=e.FilteredItems,n=r.calcColumns(),o=0,s=i.map(function(t,e){return e%n==0&&e>=n&&o++,{left:(e-n*o)*t.props.w,top:o*t.props.h}}),a=i[0]&&i[0].props.h||0;return r.updateHeight((o+1)*a),s};e.a=i},function(t,e,r){"use strict";var i=function(t){var e=t.props,r=e.FilterContainer,i=e.FilteredItems,o=new n(r.props.w),s=i.map(function(t){var e=t.props;return{w:e.w,h:e.h}});o.fit(s);var a=s.map(function(t){var e=t.fit;return{left:e.x,top:e.y}});return r.updateHeight(o.root.h),a},n=function(t){this.init(t)};n.prototype={init:function(t){this.root={x:0,y:0,w:t}},fit:function(t){var e,r,i,n=t.length,o=n>0?t[0].h:0;for(this.root.h=o,e=0;ethis.length)&&-1!==this.indexOf(t,e)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var r=Object(this),i=r.length>>>0;if(0===i)return!1;for(var n=0|e,o=Math.max(n>=0?n:i-Math.abs(n),0);o0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]i?1:0}}(r))),o="asc"===e?i:i.reverse();this.filterItems=o},t.prototype.shuffle=function(){var t=this,e=this.getFiltered(this.options.filter);if(e.length>1){var n=this.getFiltered(this.options.filter).map(function(e){return t.filterItems.indexOf(e)}).slice(),r=void 0;do{r=d(e)}while(u(e,r));(r=d(e)).forEach(function(e,r){var i,o=n[r];t.filterItems=Object.assign([],t.filterItems,((i={})[o]=e,i))})}},t.prototype.search=function(t,e){return e?t.filter(function(t){return t.contentsMatchSearch(e)}):t},t.prototype.shouldBeFiltered=function(t,e){var n,r,i=this.options.getRaw().multifilterLogicalOperator;return Array.isArray(e)?"or"===i?!!(n=t,r=e,Array.prototype.filter.call(n,function(t){return r.includes(t)})).length:function(t,e){return t.reduce(function(t,n){return t&&e.includes(n)},!0)}(e,t):t.includes(e)},t}(),B=function(){return(B=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]',(i=document.createElement("img")).classList.add("Filterizr__spinner"),i.src="data:image/svg+xml;base64,"+window.btoa(r),i.alt="Spinner",i),this.styledNode=new tt(this.node,e),this.initialize()}return Object.defineProperty(t.prototype,"styles",{get:function(){return this.styledNode},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){return et(this,void 0,void 0,function(){return nt(this,function(t){switch(t.label){case 0:return[4,this.styles.fadeOut()];case 1:return t.sent(),this.filterContainer.node.removeChild(this.node),[2]}})})},t.prototype.initialize=function(){this.styles.initialize(),this.filterContainer.node.appendChild(this.node)},t}(),it=n(2),ot=n.n(it);function st(t,e){return t.reduce(function(t,n){return t+n.width+e},0)}function at(t,e){return t.length?t.reduce(function(t,n){return t+n.height+e},0):0}var ut=function(){return(ut=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?t[0].h:0;for(this.root.h=o,e=0;et*o&&((i={})[o]=r,i))},{0:0}),o=e.map(function(o,s){var a=o.height,u=Math.floor(r[s]/t);return{left:e.slice(i[u],s).reduce(function(t,e){return t+e.width+n},0),top:(a+n)*u}});return{containerHeight:Object.keys(i).length*(e[0].height+n)+n,itemsPositions:o}}(t,e,r);case i.SAME_WIDTH:return function(t,e,n){var r=Math.floor(t/(e[0].width+n)),i=e.map(function(t,i){var o=t.width,s=Math.floor(i/r);return{left:(i-r*s)*(o+n),top:e.slice(0,i).filter(function(t,e){return(i-e)%r==0}).reduce(function(t,e){return t+e.height+n},0)}}),o=e.reduce(function(t,e,i){var o=e.height,s=Math.floor(i/r);return t[i-r*s]+=o+n,t},Array.apply(null,Array(r)).map(Number.prototype.valueOf,0));return{containerHeight:Math.max.apply(Math,o)+n,itemsPositions:i}}(t,e,r);case i.PACKED:return function(t,e,n){var r=new ct(t),i=e.map(function(t){var e=t.width,r=t.height;return{w:e+n,h:r+n}});r.fit(i);var o=i.map(function(t){var e=t.fit;return{left:e.x,top:e.y}});return{containerHeight:r.root.h+n,itemsPositions:o}}(t,e,r);case i.SAME_SIZE:default:return function(t,e,n){var r=Math.floor(t/(e[0].width+n)),i=e.map(function(t,e){var i=t.width,o=t.height,s=Math.floor(e/r);return{left:(e-r*s)*(i+n),top:s*(o+n)}});return{containerHeight:Math.ceil(e.length/r)*(e[0].height+n)+n,itemsPositions:i}}(t,e,r)}});function ft(t){if(!t)throw new Error("Filterizr as a jQuery plugin, requires jQuery to work. If you would prefer to use the vanilla JS version, please use the correct bundle file.");t.fn.filterizr=function(){var e="."+t.trim(this.get(0).className).replace(/\s+/g,"."),n=arguments;if(!this._fltr&&0===n.length||1===n.length&&"object"==typeof n[0]){var r=n.length>0?n[0]:v;this._fltr=new yt(e,r)}else if(n.length>=1&&"string"==typeof n[0]){var i=n[0],o=Array.prototype.slice.call(n,1),s=this._fltr;switch(i){case"filter":return s.filter.apply(s,o),this;case"insertItem":return s.insertItem.apply(s,o),this;case"removeItem":return s.removeItem.apply(s,o),this;case"toggleFilter":return s.toggleFilter.apply(s,o),this;case"sort":return s.sort.apply(s,o),this;case"shuffle":return s.shuffle.apply(s,o),this;case"search":return s.search.apply(s,o),this;case"setOptions":return s.setOptions.apply(s,o),this;case"destroy":return s.destroy.apply(s,o),delete this._fltr,this;default:throw new Error("Filterizr: "+i+" is not part of the Filterizr API. Please refer to the docs for more information.")}}return this}}var ht=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},pt=function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]