gc.spread.views.searchbox.10.0.0.min.js 76 KB

123456789101112131415
  1. /*!
  2. *
  3. * SpreadJS Library 10.0.0
  4. *
  5. * Copyright(c) GrapeCity, Inc. All rights reserved.
  6. *
  7. * Licensed under the SpreadJS Commercial License.
  8. * spread.sales@grapecity.com
  9. * http://spread.grapecity.com/Pages/Spread-JS-License/
  10. *
  11. *
  12. */
  13. !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SearchBox=t():(e.GC=e.GC||{},e.GC.Spread=e.GC.Spread||{},e.GC.Spread.Views=e.GC.Spread.Views||{},e.GC.Spread.Views.Plugins=e.GC.Spread.Views.Plugins||{},e.GC.Spread.Views.Plugins.SearchBox=t())}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/assets/",t(0)}([function(e,t,n){"use strict";!function(){n(2);var t=n(7),r=n(9),i=n(10),o="click",a={};a.app={},a.ui={},a.model={},a.utils={},a.utils=function(){var e={escapeRegExp:function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},getCursorPosition:function(e){if(e){var t=0;document.selection;if(document.selection){e.focus();var n=document.selection.createRange(),r=n.text.length;n.moveStart("character",-e.value.length),t=n.text.length-r}else!e||i.isNull(e.offsetParent)||i.isUndefined(e.selectionStart)||(t=e.selectionStart);return t}},setCursorPosition:function(e,t){e&&this.selectRange(e,t,t)},selectRange:function(e,t,n){if(e&&!i.isNull(e.offsetParent))if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,n);else if(e.createTextRange){var r=e.createTextRange();r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),n-t>=0&&r.select()}},getSelection:function(e){var t,n;if(!i.isUndefined(e.selectionStart))return t=e.selectionStart,n=e.selectionEnd,{start:t,end:n,length:n-t,text:e.value.substr(t,n-t)};if(document.selection){var r=document.selection.createRange();if(r){var o=e.createTextRange(),a=o.duplicate();return o.moveToBookmark(r.getBookmark()),a.setEndPoint("EndToStart",o),t=a.text.length,n=t+r.text.length,{start:t,end:n,length:n-t,text:r.text}}}return{start:0,end:0,length:0}},isVisible:function(e){return e&&!i.isNull(e.offsetParent)},KEYS:{16:"shift",17:"command",91:"command",93:"command",224:"command",27:"esc",13:"enter",37:"left",38:"up",39:"right",40:"down",46:"delete",8:"backspace",35:"end",36:"home",9:"tab",32:"space",186:"semicolon",188:"comma",107:"numpad_Add",110:"numpad_decimal",111:"numpad_divide",108:"numpad_enter",106:"numpad_multiply",109:"numpad_subtract"},key:function(e){return this.KEYS[e.which]},getDataType:function(e,t){var n=this.findCol(e.grid.columns,t,!0);return n.dataType},setCursorAtEnd:function(e,t){-1===t?a.utils.setCursorPosition(e,e.value.length):a.utils.setCursorPosition(e,0)},resetInputWidth:function(e){if(e&&""!==e.value){var t=e.value,n=r.createElement('<div class="input-width-tester"></div>');t=t.replace(/&/g,"&amp;").replace(/\s/g,"&nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),n.innerHTML=t,document.body.appendChild(n);var i=r.gCSV(e),o=i.paddingLeft,a=i.paddingRight,u=10,c=300;e.style.minWidth=u+"px",e.style.width=Math.min(Math.max(n.clientWidth+3+o+a,u),c)+"px",document.body.removeChild(n)}},isTouchMode:function(){return window.PointerEvent||window.MSPointerEvent||"ontouchstart"in document.documentElement},getSiblingInput:function(e,t){if(t){for(var n=e.previousSibling;n&&"INPUT"!==n.tagName;)n=n.previousSibling;return n||null}for(var r=e.nextSibling;r&&"INPUT"!==r.tagName;)r=r.nextSibling;return r||null},findCol:function(e,n,r){var o=t.find(e,i.mP("id",n,r));if(o)return o;var a=t.find(e,i.mP("caption",n,r));if(a)return a;var u=t.find(e,i.mP("dataField",n,r));return u?u:void 0}};return e}();var u=function(){function e(e){var n=this;n.cid=t.uniqueId("c"),n.attributes={},n.set(e||{})}return e.prototype={set:function(e){t.assign(this.attributes,e)},get:function(e){return this.attributes[e]},has:function(e){return!i.isNil(this.get(e))}},e}(),c=function(){function e(){var e=this;e.length=0,e.models=[],e._byId={}}var n=function(){var t=this;e.call(t)};return n.prototype={reset:function(t){var n=this;e.call(n),n.add(t)},add:function(e,n){var r,o,a,u=n&&n.at,c=i.isArray(e)?t.clone(e):e?[e]:[],s=this,l=s._byId;if(s.length+=c.length,i.isUndefined(u))for(r=0,o=c.length;o>r;r++)a=c[r],s.models.push(a),l[a.cid]=a;else for(r=c.length-1;r>=0;r--)a=c[r],s.models.splice(u,0,a),l[a.cid]=a},remove:function(e){var n,r,o,a=this,u=i.isArray(e)?t.clone(e):[e],c=a.models;for(n=0,r=u.length;r>n;n++)o=a.get(u[n]),o&&(delete a._byId[o.cid],c.splice(c.indexOf(o),1))},get:function(e){var t=this._byId;return t[e.cid]||t[e]},getAllCategories:function(){var e=this;return t.map(e.models,function(e){return e.get("category")})||[]}},n}(),s=function(){function e(e,t,n){if(e){n=n||"mode";var r=new RegExp("\\w+_"+n+"(\\s|$)","g"),i=null===t?"":t+"_"+n;return e.className=(e.className.replace(r,"")+" "+i).replace(/\s\s/g," "),i}}var n=function(e){var n=this;e=e||{},t.extend(n,t.pick(e,["model","collection","element"])),n.initialize.apply(n,arguments)};return n.prototype={setMode:function(t,n){var r=this;r.modes=r.modes||{},r.modes[n]!==t&&(e(r.element,t,n),r.modes[n]=t)}},n}();a.VisualSearch=function(){function e(e){var n=this;n.updateData(e),n.callbacks={search:function(e,r){var o,a,u,c=r.models,s=t.map(c,function(e){return o=e.get("category"),a=e.get("operator")||"=",u=e.get("value"),i.isArray(u)&&("∉"===a||"∈"===a?u="["+u.join(",")+"]":"="===a&&(a="∈")),{field:o,operator:a,value:u}});setTimeout(function(){n.grid.options.filtering=s},50)},facetMatches:function(e,n){var r=e.keys,i=e.searchQuery,o=i.getAllCategories();n(t.difference(r,o))},valueMatches:function(e,t,n,r){var i=e.items;return r(i[t])}}}var n=function(n,r){var i=this;if(r.container&&(i.container=document.querySelector(r.container)),i.container){var o={container:"",query:""};i.options=t.extend({},o,r),i.grid=n,i.operators=["=","≠","<",">","<=",">=","∈","∉"],e.call(i,r.facets),i.searchQuery=new a.model.SearchQuery,i.searchBox=new a.ui.SearchBox({app:i}),i.container.appendChild(i.searchBox.element),i.options.query?(i.searchBox.value(i.options.query),i.searchBox.searchEvent()):i.searchBox.value(""),i.searchBox.refresh()}};return n.prototype={updateData:function(e){var n=this,r=n.grid,i=r.columns,o=t.filter(i,function(e){return e.dataField&&1===e.dataField.split(",").length}),u=n.keys=[],c=n.items={};if(e)t.forEach(e,function(e,t){var n=a.utils.findCol(o,t,!0);n&&(c[n.caption]=e,u.push(n.caption))});else{t.each(o,function(e){u.push(e.caption)});var s,l=r.data.sourceCollection;t.forEach(u,function(e){var n=t.uniq(t.map(l,function(t){return s=a.utils.findCol(i,e,!0),t[s.dataField]}));c[e]=n})}},destroy:function(){var e=this;e.searchBox.destroy(),e.container.innerHTML=""}},n}(),a.ui.SearchBox=function(e){function n(){return'<div class="gc-search-box" spellcheck="false"><div class="gc-icon-search searchbox-icon gc-icon"></div><div class="gc-search-box-inner"></div><div class="gc-icon gc-icon-cancel all-search-facets-remove searchbox-icon"></div><input class="hidden-focus" style="width:0px;height:0px;margin:0;padding:0;" data-facet=-1 /></div>'}function u(){var e=this;if(e.element){e.mouseDownHandler_=s.bind(e),e.element.addEventListener("mousedown",e.mouseDownHandler_);var t=e.element.querySelector(".all-search-facets-remove");e.cancelSearchClickHandler_=f.bind(e),e.handleCancelSearchMouseDown_=d.bind(e),t.addEventListener(o,e.cancelSearchClickHandler_),t.addEventListener("mousedown",e.handleCancelSearchMouseDown_),e.handleHiddenFocus_=h.bind(e),e.handleHiddenBlur_=p.bind(e),e.hiddenFocusElement_.addEventListener("focus",e.handleHiddenFocus_),e.hiddenFocusElement_.addEventListener("blur",e.handleHiddenBlur_)}}function c(){var e=this;if(e.element){e.element.removeEventListener("mousedown",e.mouseDownHandler_);var t=e.element.querySelector(".all-search-facets-remove");t.removeEventListener(o,e.cancelSearchClickHandler_),t.removeEventListener("mousedown",e.handleCancelSearchMouseDown_)}}function s(e){var t=this;e.preventDefault(),l.call(t)}function l(){var e=this,t=e.inputViews[e.inputViews.length-1];t.box.focus()}function f(e){var t=this;e.preventDefault(),t.deselectAllFacets(),t.value(""),t.searchEvent(),t.refresh()}function d(e){e.stopPropagation()}function h(){var e=this;e.handleHiddenKeydown_=v.bind(e),e.hiddenFocusElement_.addEventListener("keydown",e.handleHiddenKeydown_)}function p(){var e=this;e.hiddenFocusElement_.removeEventListener("keydown",e.handleHiddenKeydown_),e.handleHiddenKeydown_=null}function v(e){var t=this;e.stopPropagation(),e.preventDefault();var n=a.utils.key(e),r=~~t.hiddenFocusElement_.getAttribute("data-facet");"enter"===n?(t.facetViews[r].deselectFacet(),t.inputViews[r+1].box.focus()):"left"===n?t.inputViews[r].box.focus():"right"===n?t.facetViews[r].boxes[0].focus():"backspace"===n&&(t.facetViews[r].remove(),t.inputViews[r].box.focus())}function g(){var e=this,t=new a.ui.SearchInput({position:e.inputViews.length,app:e.app});e.innerElement.appendChild(t.element),e.inputViews.push(t)}function m(e,n){var r=this,i=new a.ui.SearchFacet({app:r.app,model:e,order:n});g.call(r),r.facetViews.push(i);var o=r.innerElement.children[2*n];if(o){var u=i.element,c=o.parentNode;c.replaceChild(u,o),c.insertBefore(o,u)}i.operatorAutoComplete&&(a.utils.resetInputWidth(i.operatorAutoComplete.element),t.each(i.boxes,function(e){a.utils.resetInputWidth(e)})),i.autoComplete&&a.utils.resetInputWidth(i.autoComplete.element)}function y(){var e=this;e.facetViews=[],e.inputViews=[],e.innerElement.innerHTML="",t.each(e.app.searchQuery.models,function(t,n){m.call(e,t,n)}),g.call(e)}function b(e){var n=this,r=e.get("category"),o=e.get("operator"),u=e.get("value"),c=a.utils.getDataType(n.app,r);return"number"===c||"date"===c?(u=i.isArray(u)?u:[u],r&&o&&!t.some(u,function(e){return""===e})):r&&u}var w=function(t){e.call(this,t)};i.extends_(w,e);var _={initialize:function(e){var i=this;t.extend(i.options,e),i.app=e.app,i.facetViews=[],i.inputViews=[],i.element=r.createElement(n.call(i)),i.innerElement=i.element.querySelector(".gc-search-box-inner"),i.hiddenFocusElement_=i.element.querySelector(".hidden-focus"),u.call(i)},value:function(e){var t=this;return i.isUndefined(e)?t.serialize():void t.setQuery(e)},serialize:function(){var e=this,n=[];return t.each(e.app.searchQuery.models,function(e){n.push(e.serialize())}),t.compact(n).join(" ")},setQuery:function(e){var t,n,r,o,u=[];if(i.isArray(e))for(var c=0,s=e.length;s>c;c++)t=e[c].column,r=e[c].value,t&&!i.isUndefined(r)&&(o=a.utils.getDataType(this.app,t),n="date"!==o&&"number"!==o?null:e[c].operator||"=",u.push(new a.model.SearchFacet({category:t,operator:n,value:r,app:this.app})));this.app.searchQuery.reset(u)},searchEvent:function(){var e=this,n=e.serialize(),r=e.app.searchQuery.models,i=t.every(r,function(t){return b.call(e,t)});i&&e.app.callbacks.search(n,e.app.searchQuery)},addFacet:function(e,t){var n=this;if(e=e.trim()){var r=a.utils.getDataType(n.app,e),i=new a.model.SearchFacet({category:e,value:"",operator:"date"===r||"number"===r?"":null,app:n.app});n.app.searchQuery.add(i,{at:t})}},deselectAllFacets:function(e){t.each(this.facetViews,function(t){!t||t===e||"is"!==t.modes.editing&&"is"!==t.modes.selected||t.deselectFacet()})},focusNextFacet:function(e,n,r){r=r||{};var i,o=this,u=e instanceof a.ui.SearchFacet,c=o.facetViews.length,s=[];for(i=0;c>i;i++)s.push(o.inputViews[i]),s.push(o.facetViews[i]);s.push(o.inputViews[c]);var l=t.indexOf(s,e);if(!(0>l)){var f;f=0===l&&0>n||l===2*c&&n>0?s[l]:r.skipToFacet?s[l+n*(u?2:1)]:s[l+n],f instanceof a.ui.SearchFacet?r.selectFacet?f.selectFacet():(f.boxes[0].focus(),a.utils.setCursorAtEnd(f.boxes[0],n||r.startAtEnd)):f instanceof a.ui.SearchInput&&f.box.focus()}},destroy:function(){var e=this;t.forEach(e.facetViews,function(e){e.destroy()}),t.forEach(e.inputViews,function(e){e.destroy()}),c.call(e)},refresh:function(){self.inputViews=[],self.facetViews=[],y.call(this)}};return w.prototype=t.assign(w.prototype,_),w}(s),a.ui.SearchFacet=function(e){function n(){var e=this,t=e.model,n="",r=t.get("category"),i=a.utils.getDataType(e.app,r),o="date"===i,u="number"===i;n+='<div class="searchbox-icon gc-icon gc-icon-cancel search-facet-remove"></div>',r&&(n+='<div class="search-category">'+r+"</div>"),n+='<div class="search-operator-container">'+(o||u?'<input type="text" class="search-facet-operator" />':":")+"</div>";var c,s="text-overflow:ellipsis;",l=t.get("operator");if("∈"===l||"∉"===l){var f,d;o?(f=d=' placeholder="mm/dd/yyyy"',s+="min-width:75px;"):(f=' placeholder="min"',d=' placeholder="max"',s+="min-width:25px;"),c='[<input style="'+s+'" class="value1 search-facet-input" '+f+' /><span> , </span><input style="'+s+'" class="value2 search-facet-input" '+d+" />]"}else{var h="";o?(s+="min-width:75px;",h+=' placeholder="mm/dd/yyyy"',c=l?'<input style="'+s+'" class="search-facet-input" '+h+" />":""):c='<input style="'+s+'" class="search-facet-input" '+h+" />"}return n+='<div class="search-facet-input-container">'+c+"</div>"}function u(){var e=this,n=e.element;i.regist(n,"mousedown",g),e.handleFacetInputFocus_=h.bind(e),e.handleFacetInputBlur_=p.bind(e),e.handleFacetInputKeyDown_=y.bind(e),e.handleInput_=s.bind(e),t.each(e.boxes,function(t){i.regist(t,"focus",e.handleFacetInputFocus_),i.regist(t,"blur",e.handleFacetInputBlur_),i.regist(t,"keydown",e.handleFacetInputKeyDown_),i.regist(t,"input",e.handleInput_)});var r=n.querySelector(".search-category");e.handleCategoryClick_=v.bind(e),i.regist(r,o,e.handleCategoryClick_);var a=n.querySelector(".search-facet-remove");e.handleFacetRemoveClick_=m.bind(e),i.regist(a,o,e.handleFacetRemoveClick_),e.handleOperatorInputFocus_=f.bind(e),e.handleOperatorInputBlur_=d.bind(e),e.handleOperatorInputKeyDown_=b.bind(e);var u=n.querySelector(".search-operator-container input");u&&(i.regist(u,"focus",e.handleOperatorInputFocus_),i.regist(u,"blur",e.handleOperatorInputBlur_),i.regist(u,"keydown",e.handleOperatorInputKeyDown_),i.regist(u,"input",e.handleInput_))}function c(){var e=this,n=e.element;i.unRegist(n,"mousedown",g),t.each(e.boxes,function(t){i.unRegist(t,"focus",e.handleFacetInputFocus_),i.unRegist(t,"blur",e.handleFacetInputBlur_),i.unRegist(t,"keydown",e.handleFacetInputKeyDown_),i.unRegist(t,"input",e.handleInput_)});var r=n.querySelector(".search-category");i.unRegist(r,o,e.handleCategoryClick_);var a=n.querySelector(".search-facet-remove");i.unRegist(a,o,e.handleFacetRemoveClick_);var u=n.querySelector(".search-operator-container input");u&&(i.unRegist(u,"focus",e.handleOperatorInputFocus_),i.unRegist(u,"blur",e.handleOperatorInputBlur_),i.unRegist(u,"keydown",e.handleOperatorInputKeyDown_),i.unRegist(u,"input",e.handleInput_))}function s(e){var n=this,i=e.target;if(r.hasClass(i,"search-facet-input")){var o=document.activeElement;a.utils.resetInputWidth(o),"is"!==n.modes.selected&&n.model.set({value:t.map(n.boxes,function(e){return e.value})}),n.autoComplete&&n.autoComplete.search(!0)}else if(r.hasClass(i,"search-facet-operator")){var u=n.operatorElement;a.utils.resetInputWidth(u),"is"!==n.modes.selected&&n.model.set({operator:u.value}),n.operatorAutoComplete&&n.operatorAutoComplete.search(!0)}}function f(){w.call(this)}function d(e){var t=this;e.preventDefault(),C.call(t),t.app.searchBox.searchEvent()}function h(){w.call(this)}function p(e){var t=this;e.preventDefault();for(var n,r=[],i=t.autoComplete,o=i&&i.menu,a=o&&o.element.querySelectorAll("li")||[],u=0,c=a.length;c>u;u++)n=a[u],n.querySelector('input[checked="checked"]')&&r.push(n.getAttribute("data-menu"));C.call(t);var s=t.model,l=t.app.searchBox;s.get("value").toString()!==r.toString()&&(r.length&&(s.set({value:r}),l.refresh()),l.searchEvent())}function v(e){var t=this;e.stopPropagation(),"is"!==t.modes.selected?t.selectFacet(e):t.deselectFacet(e)}function g(e){e.stopPropagation()}function m(){this.remove()}function y(e){var n=this;e.stopPropagation();var i=a.utils.key(e),o=document.activeElement,u=n.boxes.length;if("enter"===i||"numpad_enter"===i){n.autoComplete&&n.autoComplete.handleMenuSelect({event:e});var c=n.app.searchBox,s=t.indexOf(c.facetViews,n);c.searchEvent(),c.focusNextFacet(c.facetViews[s],1)}else if("left"===i){if("is"===n.modes.selected)n.deselectFacet(),n.app.searchBox.focusNextFacet(n,-1,{startAtEnd:-1});else if(0===a.utils.getCursorPosition(o))if(1===u||r.hasClass(o,"value1"))n.operatorElement?(n.operatorElement.focus(),a.utils.setCursorAtEnd(n.operatorElement,-1)):n.selectFacet();else{var l=a.utils.getSiblingInput(o,!0);l&&(l.focus(),a.utils.setCursorAtEnd(l,-1))}}else if("right"===i){if("is"===n.modes.selected)e.preventDefault(),n.deselectFacet(),a.utils.setCursorAtEnd(n.boxes[0],0),n.boxes[0].focus();else if(a.utils.getCursorPosition(o)===o.value.length)if(e.preventDefault(),1===u||r.hasClass(o,"value"+u))n.app.searchBox.focusNextFacet(n,1);else{var f=a.utils.getSiblingInput(o);f&&(f.focus(),a.utils.setCursorPosition(f,0))}}else"up"===i?n.autoComplete&&n.autoComplete.handleMenuMove("previous"):"down"===i?n.autoComplete&&n.autoComplete.handleMenuMove("next"):"tab"===i?(e.preventDefault(),n.app.searchBox.focusNextFacet(n,1,{skipToFacet:!0})):"backspace"===i?"is"===n.modes.selected&&(e.preventDefault(),n.remove()):"esc"===i?n.autoComplete.close():"space"===i&&(e.preventDefault(),n.autoComplete&&n.autoComplete.handleMultiSelection())}function b(e){var t=this;e.stopPropagation();var n=a.utils.key(e),r=t.app.searchBox,i=t.operatorElement;if("enter"===n||"numpad_enter"===n){t.operatorAutoComplete&&t.operatorAutoComplete.handleMenuSelect({event:e}),r.searchEvent(),r.refresh();var o=r.facetViews[t.options.order];o&&!a.utils.isVisible(o.boxes[0])&&(o.boxes[0].style.display="block"),o.boxes[0].focus()}else"left"===n?"is"===t.modes.selected?(t.deselectFacet(),t.app.searchBox.focusNextFacet(t,-1,{startAtEnd:-1})):0!==a.utils.getCursorPosition(i)||a.utils.getSelection(i).length||t.selectFacet():"right"===n?"is"===t.modes.selected?(e.preventDefault(),t.deselectFacet(),a.utils.setCursorAtEnd(i,0),i.focus()):a.utils.getCursorPosition(i)===i.value.length&&(e.preventDefault(),t.boxes[0].focus()):"up"===n?t.operatorAutoComplete&&t.operatorAutoComplete.handleMenuMove("previous"):"down"===n?t.operatorAutoComplete&&t.operatorAutoComplete.handleMenuMove("next"):"tab"===n?(e.preventDefault(),t.boxes[0].focus()):"backspace"===n?("is"===t.modes.selected?(e.preventDefault(),t.remove()):0!==a.utils.getCursorPosition(i)||a.utils.getSelection(i).length||(e.preventDefault(),t.selectFacet()),e.stopPropagation()):"esc"===n&&t.operatorAutoComplete.close()}function w(){var e=this;"is"!==e.modes.editing&&e.setMode("is","editing"),e.app.searchBox.deselectAllFacets(e),_.call(e)}function _(){var e=this,t=document.activeElement;e.autoComplete&&r.hasClass(t,"search-facet-input")?e.autoComplete.search():e.operatorAutoComplete&&r.hasClass(t,"search-facet-operator")&&e.operatorAutoComplete.search()}function x(){var e=this;if(e.operatorElement){var n=e.app.operators;e.operatorAutoComplete=new l(e.operatorElement,{source:function(e,t){t(n)},select:t.bind(function(e){e.event.preventDefault();var t=this,n=e.ui.getAttribute("data-menu");t.model.set({operator:n}),t.operatorElement.setAttribute("value",n),a.utils.resetInputWidth(t.operatorElement),C.call(t),t.app.searchBox.refresh();var r=t.app.searchBox.facetViews[t.options.order];r&&!a.utils.isVisible(r.boxes[0])&&(r.boxes[0].style.display="block"),r.boxes[0].focus()},this)})}else e.autoComplete=new l(e.boxes[0],{source:t.bind(S,this),select:t.bind(function(e){e.event.preventDefault();var n,r=this,o=e.ui;n=i.isArray(o)?t.map(o,function(e){return e.getAttribute("data-menu")}):[o.getAttribute("data-menu")],r.model.set({value:n}),r.search(),r.app.searchBox.refresh(),r.app.searchBox.inputViews[r.options.order+1].box.focus()},e)})}function S(e,n){var r=this.model.get("category"),i=e.term,o=e.onlyMatch;this.app.callbacks.valueMatches(this.app,r,i,function(e){if(e=e||[],o&&i){var r=a.utils.escapeRegExp(i||""),u=new RegExp("\\b"+r,"i"),c=[];t.each(e,function(e){(u.test(e)||u.test(e.value)||u.test(e.label))&&c.push(e)}),e=c}n(e,i,!0)})}function C(){var e=this.autoComplete,t=this.operatorAutoComplete;e&&e.close(),t&&t.close()}var E=function(t){e.call(this,t)};i.extends_(E,e);var A={initialize:function(e){var o=this;o.options=t.extend({},o.options,e),o.app=o.options.app;var a=n.call(o);if(a){o.element=r.createElement('<div class="gc-search-facet"></div>'),o.element.innerHTML=a,o.boxes=o.element.querySelectorAll(".search-facet-input-container input"),o.operatorElement=o.element.querySelector(".search-operator-container input"),u.call(o),o.setMode("not","editing"),o.setMode("not","selected");var c=o.model.get("value"),s=o.model.get("operator");if(i.isArray(c))if(c.length===o.boxes.length)for(var l=0,f=o.boxes.length;f>l;l++)o.boxes[l].setAttribute("value",c[l]),o.boxes[l].setAttribute("title",c[l]);else o.boxes[0].setAttribute("value",c.join(","));i.isNil(s)||o.operatorElement.setAttribute("value",s),x.call(o)}},search:function(e){var t=this;e||(e=1),C.call(t);var n=t.app.searchBox;n.searchEvent(),n.focusNextFacet(n.facetViews[t.options.order],e)},selectFacet:function(e){e&&e.preventDefault();var t=this;if("is"!==t.modes.selected){var n=t.app.searchBox;n.deselectAllFacets(),t.setMode("is","selected"),t.setMode("not","editing"),n.hiddenFocusElement_.setAttribute("data-facet",t.options.order),n.hiddenFocusElement_.focus()}},deselectFacet:function(e){var t=this;return e&&e.preventDefault(),"is"===t.modes.selected&&t.setMode("not","selected"),!1},remove:function(){var e=this,t=e.app,n=t.searchBox;e.deselectFacet(),t.searchQuery.remove(this.model),C.call(e),n.searchEvent(),n.refresh()},destroy:function(){c.call(this)}};return E.prototype=t.assign(E.prototype,A),E}(s),a.ui.SearchInput=function(e){function n(){var e=this,t=e.box;e.handleSearchInputFocus_=c.bind(e),e.handleSearchInputBlur_=s.bind(e),e.handleSearchInputMouseDown_=f.bind(e),e.handleSearchInputKeydown_=d.bind(e),e.handleSearchInput_=u.bind(e),i.regist(t,"focus",e.handleSearchInputFocus_),i.regist(t,"blur",e.handleSearchInputBlur_),i.regist(t,"mousedown",e.handleSearchInputMouseDown_),i.regist(t,"keydown",e.handleSearchInputKeydown_),i.regist(t,"input",e.handleSearchInput_)}function o(){var e=this,t=e.box;i.unRegist(t,"focus",e.handleSearchInputFocus_),i.unRegist(t,"blur",e.handleSearchInputBlur_),i.unRegist(t,"mousedown",e.handleSearchInputMouseDown_),i.unRegist(t,"keydown",e.handleSearchInputKeydown_),i.unRegist(t,"input",e.handleSearchInput_)}function u(){var e=this.box,t=this.autoComplete;a.utils.resetInputWidth(e),t&&t.search()}function c(){var e=this;e.app.searchBox.deselectAllFacets(e),e.setMode("is","editing");var t=e.autoComplete;t&&t.search()}function s(){var e=this;e.setMode("not","editing"),e.autoComplete.close()}function f(e){e.stopPropagation()}function d(e){var t=this;e.stopPropagation();var n,r=t.box,i=t.app,o=i.searchBox,u=t.autoComplete,c=a.utils,s=c.key(e),l=c.getCursorPosition,f=o.inputViews,d=function(n,r){e.preventDefault(),o.focusNextFacet(t,n,r)};if("enter"===s||"numpad_enter"===s)u&&u.handleMenuSelect({event:e});else if("left"===s)0===l(r)&&d(-1,{startAtEnd:-1});else if("right"===s)l(r)===r.value.length&&d(1,{selectFacet:!0});else if("up"===s)u&&u.handleMenuMove("previous");else if("down"===s)u&&u.handleMenuMove("next");else if("tab"===s){var h=t.box.value;h.length?(e.preventDefault(),o.addFacet(h,t.options.position)):o.focusNextFacet(t,1,{skipToFacet:!0})}else if("backspace"===s){if(0===l(r)&&!c.getSelection(r).length)return d(t,-1),!1}else"end"===s?(n=f[f.length-1],c.setCursorAtEnd(n,-1)):"home"===s?(n=f[0],c.setCursorAtEnd(n,-1)):"esc"===s&&u&&u.close()}function h(){var e=this;e.autoComplete=new l(e.box,{source:t.bind(p,e),select:t.bind(function(e){e.event.preventDefault();var t=this.options.position,n=this.app.searchBox;n.addFacet(e.ui.getAttribute("data-menu"),t),n.refresh();var r=n.facetViews[t];r.operatorElement?r.operatorElement.focus():r.boxes[0].focus()},e)})}function p(e,n){var r=e.term,i=r.match(/\w+\*?$/),o=a.utils.escapeRegExp(i&&i[0]||"");this.app.callbacks.facetMatches(this.app,function(e){e=e||[];var r=new RegExp("^"+o,"i"),i=t.filter(e,function(e){return e&&r.test(e.label||e)});n(t.sortBy(i,function(e){return e.label?e.category+"-"+e.label:e}))})}var v=function(n){var r=this;e.call(r,n),r.options=t.extend({},r.options,n)};i.extends_(v,e);var g={initialize:function(e){var i=this;i.options=t.extend({},i.options,e),i.app=i.options.app;var o=r.createElement('<div class="search-input-container"><input type="text" class="search-input" /></div>');i.element=o,i.box=o.querySelector("input"),n.call(i),i.setMode("not","editing"),h.call(i)},destroy:function(){o.call(this)}};return v.prototype=t.assign(v.prototype,g),v}(s),a.model.SearchQuery=function(e){function n(){e.call(this)}i.extends_(n,e);var r={serialize:function(){return t.map(this.models,function(e){return e.serialize()}).join(" ")}};return n.prototype=t.assign(n.prototype,r),n}(c),a.model.SearchFacet=function(e){function n(t){e.call(this,t)}i.extends_(n,e);var r={serialize:function(){var e=this,n=e.get("category").trim(),r=e.get("operator");r=r?r.trim():":";var o=e.get("value");return o=i.isArray(o)?t.map(o,function(e){return i.isString(e)?e.trim():e}).join(","):o.trim(),"{"+n+r+o+"}"}};return n.prototype=t.assign(n.prototype,r),n}(u);var l=function(){function e(){var e=this,t=function(t,r,i){n.call(e,t,r,i)};return t.bind(e)}function n(e,t,n){var i=this,a=i.menu.element;if(a){a.innerHTML="",o.call(i,a,e,n,t);var u=r.gCoR(i.element),c=r.getBodyStyle(),s=r.getStyle(i.element),l=parseFloat(s.getPropertyValue("padding-left")),f=parseFloat(s.getPropertyValue("padding-bottom"));a.style.left=u.left-l-c.left+"px",a.style.top=u.top+u.height+f-c.top+"px";var d=document.querySelector("ul.gc-search-menu");d&&d.parentNode.removeChild(d),document.body.appendChild(a),i.menu.focusElement()}}function o(e,n,o,u){var c,s;u&&(s=u.split(","));var l=i.isArray(n)?n:[n];t.each(l,function(t){c=r.createElement('<li class="gc-search-menu-item" data-menu=\''+t+"'><div class=\""+(a.utils.isTouchMode()?"touch-mode ":"")+'gc-search-menu-label">'+(o?'<input class="gc-search-multi-check" type="checkbox" '+(s&&-1!==s.indexOf(t)?'checked="checked"':"")+' /><div class="gc-search-check-mark"><span></span></div><span class="gc-search-check-text">'+t+"</span>":t)+"</div></li>"),e.appendChild(c)})}var u=function(e,n){var i=this,o={source:null,select:null};i.options=t.extend(o,n),i.element=e,i.source=i.options.source;var a=r.createElement("<ul></ul>");i.menu=new f(a,{select:i.handleMenuSelect.bind(i)})};return u.prototype={search:function(t){var n=this;n.source({term:n.element.value,onlyMatch:t},e.call(n))},close:function(){var e=this,t=e.menu;a.utils.isVisible(t.element)&&t.close()},destroy:function(){var e=this;e.menu.destroy(),e.element=null},handleMenuMove:function(e){var t=this;return a.utils.isVisible(this.menu.element)?void t.menu[e]():void t.search()},handleMenuSelect:function(e){var t=this;if(t.options.select){for(var n=t.menu.element.querySelectorAll("li"),r=[],i=0,o=n.length;o>i;i++)n[i].querySelector('input[checked="checked"]')&&r.push(n[i]);var a=r.length?r:t.menu.active;t.options.select({event:e.event,ui:a})}e.close&&t.close()},handleMultiSelection:function(){this.menu.toggleMultiSelection()}},u}(),f=function(){function e(e){var n,r=this;if(r.active){var i=r.element,o=i.children,a=t.indexOf(o,r.active);switch(e){case"prev":a=a>0?a-1:0===a?o.length-1:0;break;case"next":a=a<o.length-1&&a>=0?a+1:0}n=o[a]}n&&r.active||(n=r.element.children[0]),r.focusElement(n)}function n(){var e=this;e.handleMouseClick_=c.bind(e),e.handleMouseMove_=l.bind(e),e.handleMouseDown_=s.bind(e),e.handleMouseWheel_=f.bind(e);var t=e.element;i.regist(t,o,e.handleMouseClick_),i.regist(t,"mousemove",e.handleMouseMove_),i.regist(t,"mousedown",e.handleMouseDown_),i.regist(t,"mousewheel",e.handleMouseWheel_)}function u(){var e=this,t=e.element;i.unRegist(t,o,e.handleMouseClick_),i.unRegist(t,"mousemove",e.handleMouseMove_),i.unRegist(t,"mousedown",e.handleMouseDown_)}function c(e){var t=this;e.stopPropagation(),e.preventDefault();var n=t.active&&t.active.querySelector("input.gc-search-multi-check");n?t.toggleMultiSelection(n):this.select(e)}function s(e){e.preventDefault()}function l(e){e.preventDefault();for(var t=this,n=e.target,i=n.tagName;"LI"!==i&&"BODY"!==i;)n=n.parentNode,i=n.tagName;"LI"===i&&r.hasClass(n,"gc-search-menu-item")&&t.focusElement(n)}function f(e){e.stopPropagation()}var d=function(e,i){var o=this,u={select:null};o.options=t.extend(u,i),o.element=e;var c="gc-search-menu "+(a.utils.isTouchMode()?"touch-mode":"");r.addClass(o.element,c),n.call(o)};return d.prototype={select:function(e){var t=this;t.options.select&&t.options.select({event:e})},close:function(){this.element.parentNode.removeChild(this.element)},next:function(){e.call(this,"next")},previous:function(){e.call(this,"prev")},destroy:function(){var e=this;u.call(e),e.element=null},focusElement:function(e){var t=this,n=t.element.querySelector(".gc-search-focus");if(n&&r.removeClass(n,"gc-search-focus"),e)r.addClass(e.children[0],"gc-search-focus"),t.active=e;else{var i=t.element.querySelectorAll("li");i.length&&(r.addClass(i[0].children[0],"gc-search-focus"),t.active=i[0])}},toggleMultiSelection:function(e){var t=this,n=e?e:t.active&&t.active.querySelector("input.gc-search-multi-check");if(n){var r=n.getAttribute("checked");r?n.removeAttribute("checked"):n.setAttribute("checked","checked")}}},d}();e.exports=a.VisualSearch}()},,function(e,t){},,,,,function(e,t,n){(function(e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};(function(){function i(e,t){return e.set(t[0],t[1]),e}function o(e,t){return e.add(t),e}function a(e,t,n){var r=n.length;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function u(e,t){for(var n=-1,r=e?e.length:0;++n<r&&t(e[n],n,e)!==!1;);return e}function c(e,t){for(var n=e?e.length:0;n--&&t(e[n],n,e)!==!1;);return e}function s(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(!t(e[n],n,e))return!1;return!0}function l(e,t){for(var n=-1,r=e?e.length:0,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function f(e,t){var n=e?e.length:0;return!!n&&y(e,t,0)>-1}function d(e,t,n){for(var r=-1,i=e?e.length:0;++r<i;)if(n(t,e[r]))return!0;return!1}function h(e,t){for(var n=-1,r=e?e.length:0,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function p(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function v(e,t,n,r){var i=-1,o=e?e.length:0;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function g(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function m(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function y(e,t,n){if(t!==t)return k(e,n);for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function b(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function w(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function _(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function x(e){return function(t){return e(t)}}function S(e,t){return h(t,function(t){return e[t]})}function C(e,t){return e.has(t)}function E(e,t){for(var n=-1,r=e.length;++n<r&&y(t,e[n],0)>-1;);return n}function A(e,t){for(var n=e.length;n--&&y(t,e[n],0)>-1;);return n}function F(e){return e&&e.Object===Object?e:null}function O(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&r++;return r}function M(e,t){return null==e?Wr:e[t]}function k(e,t,n){for(var r=e.length,i=t+(n?1:-1);n?i--:++i<r;){var o=e[i];if(o!==o)return i}return-1}function j(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}function I(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function T(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function R(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==$r||(e[n]=$r,o[i++]=n)}return o}function L(e){var t=-1,n=Array(e.size);
  14. return e.forEach(function(e){n[++t]=e}),n}function D(e){return e.match(mo)}function B(){}function N(){}function P(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=fi,this.__views__=[]}function V(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function W(){this.__data__=ia?ia(null):{}}function q(e){return this.has(e)&&delete this.__data__[e]}function H(e){var t=this.__data__;if(ia){var n=t[e];return n===Ur?Wr:n}return To.call(t,e)?t[e]:Wr}function z(e){var t=this.__data__;return ia?t[e]!==Wr:To.call(t,e)}function U(e,t){var n=this.__data__;return n[e]=ia&&t===Wr?Ur:t,this}function $(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(){this.__data__=[]}function G(e){var t=this.__data__,n=ge(t,e);if(0>n)return!1;var r=t.length-1;return n==r?t.pop():$o.call(t,n,1),!0}function Q(e){var t=this.__data__,n=ge(t,e);return 0>n?Wr:t[n][1]}function Y(e){return ge(this.__data__,e)>-1}function X(e,t){var n=this.__data__,r=ge(n,e);return 0>r?n.push([e,t]):n[r][1]=t,this}function Z(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function J(){this.__data__={hash:new V,map:new(ea||$),string:new V}}function ee(e){return Ut(this,e)["delete"](e)}function te(e){return Ut(this,e).get(e)}function ne(e){return Ut(this,e).has(e)}function re(e,t){return Ut(this,e).set(e,t),this}function ie(e){var t=-1,n=e?e.length:0;for(this.__data__=new Z;++t<n;)this.add(e[t])}function oe(e){return this.__data__.set(e,Ur),this}function ae(e){return this.__data__.has(e)}function ue(e){this.__data__=new $(e)}function ce(){this.__data__=new $}function se(e){return this.__data__["delete"](e)}function le(e){return this.__data__.get(e)}function fe(e){return this.__data__.has(e)}function de(e,t){var n=this.__data__;return n instanceof $&&n.__data__.length==Hr&&(n=this.__data__=new Z(n.__data__)),n.set(e,t),this}function he(e,t,n,r){return e===Wr||Gn(e,Mo[n])&&!To.call(r,n)?t:e}function pe(e,t,n){(n===Wr||Gn(e[t],n))&&("number"!=typeof t||n!==Wr||t in e)||(e[t]=n)}function ve(e,t,n){var r=e[t];To.call(e,t)&&Gn(r,n)&&(n!==Wr||t in e)||(e[t]=n)}function ge(e,t){for(var n=e.length;n--;)if(Gn(e[n][0],t))return n;return-1}function me(e,t){return e&&Ct(t,Cr(t),e)}function ye(e,t){for(var n=-1,r=null==e,i=t.length,o=Array(i);++n<i;)o[n]=r?Wr:xr(e,t[n]);return o}function be(e,t,n){return e===e&&(n!==Wr&&(e=n>=e?e:n),t!==Wr&&(e=e>=t?e:t)),e}function we(e,t,n,r,i,o,a){var c;if(r&&(c=o?r(e,i,o,a):r(e)),c!==Wr)return c;if(!or(e))return e;var s=Ba(e);if(s){if(c=Zt(e),!t)return St(e,c)}else{var l=Yt(e),f=l==bi||l==wi;if(Na(e))return ft(e,t);if(l==Si||l==pi||f&&!o){if(j(e))return o?e:{};if(c=Jt(f?{}:e),!t)return Et(e,me(c,e))}else{if(!bo[l])return o?e:{};c=en(e,l,we,t)}}a||(a=new ue);var d=a.get(e);if(d)return d;if(a.set(e,c),!s)var h=n?Wt(e):Cr(e);return u(h||e,function(i,o){h&&(o=i,i=e[o]),ve(c,o,we(i,t,n,r,o,e,a))}),c}function _e(e){return or(e)?zo(e):{}}function xe(e,t,n,r){var i=-1,o=f,a=!0,u=e.length,c=[],s=t.length;if(!u)return c;n&&(t=h(t,x(n))),r?(o=d,a=!1):t.length>=Hr&&(o=C,a=!1,t=new ie(t));e:for(;++i<u;){var l=e[i],p=n?n(l):l;if(l=r||0!==l?l:0,a&&p===p){for(var v=s;v--;)if(t[v]===p)continue e;c.push(l)}else o(t,p,r)||c.push(l)}return c}function Se(e,t){var n=!0;return ga(e,function(e,r,i){return n=!!t(e,r,i)}),n}function Ce(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],a=t(o);if(null!=a&&(u===Wr?a===a&&!hr(a):n(a,u)))var u=a,c=o}return c}function Ee(e,t,n,r){var i=e.length;for(n=mr(n),0>n&&(n=-n>i?0:i+n),r=r===Wr||r>i?i:mr(r),0>r&&(r+=i),r=n>r?0:yr(r);r>n;)e[n++]=t;return e}function Ae(e,t){var n=[];return ga(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function Fe(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=nn),i||(i=[]);++o<a;){var u=e[o];t>0&&n(u)?t>1?Fe(u,t-1,n,r,i):p(i,u):r||(i[i.length]=u)}return i}function Oe(e,t){return e&&ya(e,t,Cr)}function Me(e,t){return e&&ba(e,t,Cr)}function ke(e,t){t=un(t,e)?[t]:st(t);for(var n=0,r=t.length;null!=e&&r>n;)e=e[yn(t[n++])];return n&&n==r?e:Wr}function je(e,t,n){var r=t(e);return Ba(e)?r:p(r,n(e))}function Ie(e,t){return e>t}function Te(e,t){return null!=e&&(To.call(e,t)||"object"==("undefined"==typeof e?"undefined":r(e))&&t in e&&null===Gt(e))}function Re(e,t){return null!=e&&t in Object(e)}function Le(e,t,n){for(var r=n?d:f,i=e[0].length,o=e.length,a=o,u=Array(o),c=1/0,s=[];a--;){var l=e[a];a&&t&&(l=h(l,x(t))),c=Zo(l.length,c),u[a]=!n&&(t||i>=120&&l.length>=120)?new ie(a&&l):Wr}l=e[0];var p=-1,v=u[0];e:for(;++p<i&&s.length<c;){var g=l[p],m=t?t(g):g;if(g=n||0!==g?g:0,!(v?C(v,m):r(s,m,n))){for(a=o;--a;){var y=u[a];if(!(y?C(y,m):r(e[a],m,n)))continue e}v&&v.push(m),s.push(g)}}return s}function De(e,t,n,r,i){return e===t?!0:null==e||null==t||!or(e)&&!ar(t)?e!==e&&t!==t:Be(e,t,De,n,r,i)}function Be(e,t,n,r,i,o){var a=Ba(e),u=Ba(t),c=vi,s=vi;a||(c=Yt(e),c=c==pi?Si:c),u||(s=Yt(t),s=s==pi?Si:s);var l=c==Si&&!j(e),f=s==Si&&!j(t),d=c==s;if(d&&!l)return o||(o=new ue),a||pr(e)?Nt(e,t,n,r,i,o):Pt(e,t,c,n,r,i,o);if(!(i&ii)){var h=l&&To.call(e,"__wrapped__"),p=f&&To.call(t,"__wrapped__");if(h||p){var v=h?e.value():e,g=p?t.value():t;return o||(o=new ue),n(v,g,r,i,o)}}return d?(o||(o=new ue),Vt(e,t,n,r,i,o)):!1}function Ne(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=Object(e);i--;){var u=n[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<o;){u=n[i];var c=u[0],s=e[c],l=u[1];if(a&&u[2]){if(s===Wr&&!(c in e))return!1}else{var f=new ue;if(r)var d=r(s,l,c,e,t,f);if(!(d===Wr?De(l,s,r,ri|ii,f):d))return!1}}return!0}function Pe(e){if(!or(e)||ln(e))return!1;var t=rr(e)||j(e)?Bo:Yi;return t.test(bn(e))}function Ve(e){return"function"==typeof e?e:null==e?jr:"object"==("undefined"==typeof e?"undefined":r(e))?Ba(e)?$e(e[0],e[1]):Ue(e):Lr(e)}function We(e){return Yo(Object(e))}function qe(e){e=null==e?e:Object(e);var t=[];for(var n in e)t.push(n);return t}function He(e,t){return t>e}function ze(e,t){var n=-1,r=Yn(e)?Array(e.length):[];return ga(e,function(e,i,o){r[++n]=t(e,i,o)}),r}function Ue(e){var t=$t(e);return 1==t.length&&t[0][2]?hn(t[0][0],t[0][1]):function(n){return n===e||Ne(n,e,t)}}function $e(e,t){return un(e)&&dn(t)?hn(yn(e),t):function(n){var r=xr(n,e);return r===Wr&&r===t?Sr(n,e):De(t,r,Wr,ri|ii)}}function Ke(e,t,n,r,i){if(e!==t){if(!Ba(t)&&!pr(t))var o=Er(t);u(o||t,function(a,u){if(o&&(u=a,a=t[u]),or(a))i||(i=new ue),Ge(e,t,u,n,Ke,r,i);else{var c=r?r(e[u],a,u+"",e,t,i):Wr;c===Wr&&(c=a),pe(e,u,c)}})}}function Ge(e,t,n,r,i,o,a){var u=e[n],c=t[n],s=a.get(c);if(s)return void pe(e,n,s);var l=o?o(u,c,n+"",e,t,a):Wr,f=l===Wr;f&&(l=c,Ba(c)||pr(c)?Ba(u)?l=u:Xn(u)?l=St(u):(f=!1,l=we(c,!0)):fr(c)||Qn(c)?Qn(u)?l=wr(u):!or(u)||r&&rr(u)?(f=!1,l=we(c,!0)):l=u:f=!1),a.set(c,l),f&&i(l,c,r,o,a),a["delete"](c),pe(e,n,l)}function Qe(e,t,n){var r=-1;t=h(t.length?t:[jr],x(zt()));var i=ze(e,function(e,n,i){var o=h(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return w(i,function(e,t){return wt(e,t,n)})}function Ye(e,t){return e=Object(e),v(t,function(t,n){return n in e&&(t[n]=e[n]),t},{})}function Xe(e){return function(t){return null==t?Wr:t[e]}}function Ze(e){return function(t){return ke(t,e)}}function Je(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;if(on(i))$o.call(e,i,1);else if(un(i,e))delete e[yn(i)];else{var a=st(i),u=gn(e,a);null!=u&&delete u[yn(Cn(a))]}}}return e}function et(e,t,n,r){t=un(t,e)?[t]:st(t);for(var i=-1,o=t.length,a=o-1,u=e;null!=u&&++i<o;){var c=yn(t[i]);if(or(u)){var s=n;if(i!=a){var l=u[c];s=r?r(l,c,u):Wr,s===Wr&&(s=null==l?on(t[i+1])?[]:{}:l)}ve(u,c,s)}u=u[c]}return e}function tt(e,t,n){var r=-1,i=e.length;0>t&&(t=-t>i?0:i+t),n=n>i?i:n,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function nt(e,t){var n;return ga(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function rt(e,t,n){var r=0,i=e?e.length:r;if("number"==typeof t&&t===t&&hi>=i){for(;i>r;){var o=r+i>>>1,a=e[o];null!==a&&!hr(a)&&(n?t>=a:t>a)?r=o+1:i=o}return i}return it(e,t,jr,n)}function it(e,t,n,r){t=n(t);for(var i=0,o=e?e.length:0,a=t!==t,u=null===t,c=hr(t),s=t===Wr;o>i;){var l=Ko((i+o)/2),f=n(e[l]),d=f!==Wr,h=null===f,p=f===f,v=hr(f);if(a)var g=r||p;else g=s?p&&(r||d):u?p&&d&&(r||!h):c?p&&d&&!h&&(r||!v):h||v?!1:r?t>=f:t>f;g?i=l+1:o=l}return Zo(o,di)}function ot(e){if("string"==typeof e)return e;if(hr(e))return va?va.call(e):"";var t=e+"";return"0"==t&&1/e==-ui?"-0":t}function at(e,t,n){var r=-1,i=f,o=e.length,a=!0,u=[],c=u;if(n)a=!1,i=d;else if(o>=Hr){var s=t?null:_a(e);if(s)return L(s);a=!1,i=C,c=new ie}else c=t?[]:u;e:for(;++r<o;){var l=e[r],h=t?t(l):l;if(l=n||0!==l?l:0,a&&h===h){for(var p=c.length;p--;)if(c[p]===h)continue e;t&&c.push(h),u.push(l)}else i(c,h,n)||(c!==u&&c.push(h),u.push(l))}return u}function ut(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var u=o>r?t[r]:Wr;n(a,e[r],u)}return a}function ct(e){return Xn(e)?e:[]}function st(e){return Ba(e)?e:Ea(e)}function lt(e,t,n){var r=e.length;return n=n===Wr?r:n,!t&&n>=r?e:tt(e,t,n)}function ft(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function dt(e){var t=new e.constructor(e.byteLength);return new Wo(t).set(new Wo(e)),t}function ht(e,t){var n=t?dt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function pt(e,t,n){var r=t?n(T(e),!0):T(e);return v(r,i,new e.constructor)}function vt(e){var t=new e.constructor(e.source,Ki.exec(e));return t.lastIndex=e.lastIndex,t}function gt(e,t,n){var r=t?n(L(e),!0):L(e);return v(r,o,new e.constructor)}function mt(e){return pa?Object(pa.call(e)):{}}function yt(e,t){var n=t?dt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function bt(e,t){if(e!==t){var n=e!==Wr,r=null===e,i=e===e,o=hr(e),a=t!==Wr,u=null===t,c=t===t,s=hr(t);if(!u&&!s&&!o&&e>t||o&&a&&c&&!u&&!s||r&&a&&c||!n&&c||!i)return 1;if(!r&&!o&&!s&&t>e||s&&n&&i&&!r&&!o||u&&n&&i||!a&&i||!c)return-1}return 0}function wt(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,u=n.length;++r<a;){var c=bt(i[r],o[r]);if(c){if(r>=u)return c;var s=n[r];return c*("desc"==s?-1:1)}}return e.index-t.index}function _t(e,t,n,r){for(var i=-1,o=e.length,a=n.length,u=-1,c=t.length,s=Xo(o-a,0),l=Array(c+s),f=!r;++u<c;)l[u]=t[u];for(;++i<a;)(f||o>i)&&(l[n[i]]=e[i]);for(;s--;)l[u++]=e[i++];return l}function xt(e,t,n,r){for(var i=-1,o=e.length,a=-1,u=n.length,c=-1,s=t.length,l=Xo(o-u,0),f=Array(l+s),d=!r;++i<l;)f[i]=e[i];for(var h=i;++c<s;)f[h+c]=t[c];for(;++a<u;)(d||o>i)&&(f[h+n[a]]=e[i++]);return f}function St(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function Ct(e,t,n,r){n||(n={});for(var i=-1,o=t.length;++i<o;){var a=t[i],u=r?r(n[a],e[a],a,n,e):e[a];ve(n,a,u)}return n}function Et(e,t){return Ct(e,Qt(e),t)}function At(e){return zn(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:Wr,a=i>2?n[2]:Wr;for(o=e.length>3&&"function"==typeof o?(i--,o):Wr,a&&an(n[0],n[1],a)&&(o=3>i?Wr:o,i=1),t=Object(t);++r<i;){var u=n[r];u&&e(t,u,r,o)}return t})}function Ft(e,t){return function(n,r){if(null==n)return n;if(!Yn(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}function Ot(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),u=a.length;u--;){var c=a[e?u:++i];if(n(o[c],c,o)===!1)break}return t}}function Mt(e,t,n){function r(){var t=this&&this!==Fo&&this instanceof r?o:e;return t.apply(i?n:this,arguments)}var i=t&Kr,o=kt(e);return r}function kt(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=_e(e.prototype),r=e.apply(n,t);return or(r)?r:n}}function jt(e,t,n){function r(){for(var o=arguments.length,u=Array(o),c=o,s=Ht(r);c--;)u[c]=arguments[c];var l=3>o&&u[0]!==s&&u[o-1]!==s?[]:R(u,s);if(o-=l.length,n>o)return Dt(e,t,Tt,r.placeholder,Wr,u,l,Wr,Wr,n-o);var f=this&&this!==Fo&&this instanceof r?i:e;return a(f,this,u)}var i=kt(e);return r}function It(e){return function(t,n,r){var i=Object(t);if(n=zt(n,3),!Yn(t))var o=Cr(t);var a=e(o||t,function(e,t){return o&&(t=e,e=i[t]),n(e,t,i)},r);return a>-1?t[o?o[a]:a]:Wr}}function Tt(e,t,n,r,i,o,a,u,c,s){function l(){for(var m=arguments.length,y=Array(m),b=m;b--;)y[b]=arguments[b];if(p)var w=Ht(l),_=O(y,w);if(r&&(y=_t(y,r,i,p)),o&&(y=xt(y,o,a,p)),m-=_,p&&s>m){var x=R(y,w);return Dt(e,t,Tt,l.placeholder,n,y,x,u,c,s-m)}var S=d?n:this,C=h?S[e]:e;return m=y.length,u?y=mn(y,u):v&&m>1&&y.reverse(),f&&m>c&&(y.length=c),this&&this!==Fo&&this instanceof l&&(C=g||kt(C)),C.apply(S,y)}var f=t&ei,d=t&Kr,h=t&Gr,p=t&(Yr|Xr),v=t&ni,g=h?Wr:kt(e);return l}function Rt(e,t,n,r){function i(){for(var t=-1,c=arguments.length,s=-1,l=r.length,f=Array(l+c),d=this&&this!==Fo&&this instanceof i?u:e;++s<l;)f[s]=r[s];for(;c--;)f[s++]=arguments[++t];return a(d,o?n:this,f)}var o=t&Kr,u=kt(e);return i}function Lt(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=br(t),n=br(n)),e(t,n)}}function Dt(e,t,n,r,i,o,a,u,c,s){var l=t&Yr,f=l?a:Wr,d=l?Wr:a,h=l?o:Wr,p=l?Wr:o;t|=l?Zr:Jr,t&=~(l?Jr:Zr),t&Qr||(t&=~(Kr|Gr));var v=[e,t,i,h,f,p,d,u,c,s],g=n.apply(Wr,v);return sn(e)&&Ca(g,v),g.placeholder=r,g}function Bt(e,t,n,r,i,o,a,u){var c=t&Gr;if(!c&&"function"!=typeof e)throw new TypeError(zr);var s=r?r.length:0;if(s||(t&=~(Zr|Jr),r=i=Wr),a=a===Wr?a:Xo(mr(a),0),u=u===Wr?u:mr(u),s-=i?i.length:0,t&Jr){var l=r,f=i;r=i=Wr}var d=c?Wr:xa(e),h=[e,t,n,r,i,l,f,o,a,u];if(d&&pn(h,d),e=h[0],t=h[1],n=h[2],r=h[3],i=h[4],u=h[9]=null==h[9]?c?0:e.length:Xo(h[9]-s,0),!u&&t&(Yr|Xr)&&(t&=~(Yr|Xr)),t&&t!=Kr)p=t==Yr||t==Xr?jt(e,t,u):t!=Zr&&t!=(Kr|Zr)||i.length?Tt.apply(Wr,h):Rt(e,t,n,r);else var p=Mt(e,t,n);var v=d?wa:Ca;return v(p,h)}function Nt(e,t,n,r,i,o){var a=i&ii,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=o.get(e);if(s)return s==t;var l=-1,f=!0,d=i&ri?new ie:Wr;for(o.set(e,t);++l<u;){var h=e[l],p=t[l];if(r)var v=a?r(p,h,l,t,e,o):r(h,p,l,e,t,o);if(v!==Wr){if(v)continue;f=!1;break}if(d){if(!g(t,function(e,t){return d.has(t)||h!==e&&!n(h,e,r,i,o)?void 0:d.add(t)})){f=!1;break}}else if(h!==p&&!n(h,p,r,i,o)){f=!1;break}}return o["delete"](e),f}function Pt(e,t,n,r,i,o,a){switch(n){case ji:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ki:return!(e.byteLength!=t.byteLength||!r(new Wo(e),new Wo(t)));case gi:case mi:return+e==+t;case yi:return e.name==t.name&&e.message==t.message;case xi:return e!=+e?t!=+t:e==+t;case Ei:case Fi:return e==t+"";case _i:var u=T;case Ai:var c=o&ii;if(u||(u=L),e.size!=t.size&&!c)return!1;var s=a.get(e);return s?s==t:(o|=ri,a.set(e,t),Nt(u(e),u(t),r,i,o,a));case Oi:if(pa)return pa.call(e)==pa.call(t)}return!1}function Vt(e,t,n,r,i,o){var a=i&ii,u=Cr(e),c=u.length,s=Cr(t),l=s.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var d=u[f];if(!(a?d in t:Te(t,d)))return!1}var h=o.get(e);if(h)return h==t;var p=!0;o.set(e,t);for(var v=a;++f<c;){d=u[f];var g=e[d],m=t[d];if(r)var y=a?r(m,g,d,t,e,o):r(g,m,d,e,t,o);if(!(y===Wr?g===m||n(g,m,r,i,o):y)){p=!1;break}v||(v="constructor"==d)}if(p&&!v){var b=e.constructor,w=t.constructor;b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(p=!1)}return o["delete"](e),p}function Wt(e){return je(e,Cr,Qt)}function qt(e){for(var t=e.name+"",n=ua[t],r=To.call(ua,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Ht(e){var t=To.call(B,"placeholder")?B:e;return t.placeholder}function zt(){var e=B.iteratee||Ir;return e=e===Ir?Ve:e,arguments.length?e(arguments[0],arguments[1]):e}function Ut(e,t){var n=e.__data__;return cn(t)?n["string"==typeof t?"string":"hash"]:n.map}function $t(e){for(var t=Cr(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,dn(i)]}return t}function Kt(e,t){var n=M(e,t);return Pe(n)?n:Wr}function Gt(e){return Go(Object(e))}function Qt(e){return Ho(Object(e))}function Yt(e){return Do.call(e)}function Xt(e,t,n){t=un(t,e)?[t]:st(t);for(var r,i=-1,o=t.length;++i<o;){var a=yn(t[i]);if(!(r=null!=e&&n(e,a)))break;e=e[a]}if(r)return r;var o=e?e.length:0;return!!o&&ir(o)&&on(a,o)&&(Ba(e)||dr(e)||Qn(e))}function Zt(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&To.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Jt(e){return"function"!=typeof e.constructor||fn(e)?{}:_e(Gt(e))}function en(e,t,n,r){var i=e.constructor;switch(t){case ki:return dt(e);case gi:case mi:return new i(+e);case ji:return ht(e,r);case Ii:case Ti:case Ri:case Li:case Di:case Bi:case Ni:case Pi:case Vi:return yt(e,r);case _i:return pt(e,r,n);case xi:case Fi:return new i(e);case Ei:return vt(e);case Ai:return gt(e,r,n);case Oi:return mt(e)}}function tn(e){var t=e?e.length:Wr;return ir(t)&&(Ba(e)||dr(e)||Qn(e))?_(t,String):null}function nn(e){return Ba(e)||Qn(e)}function rn(e){return Ba(e)&&!(2==e.length&&!rr(e[0]))}function on(e,t){return t=null==t?ci:t,!!t&&("number"==typeof e||Zi.test(e))&&e>-1&&e%1==0&&t>e}function an(e,t,n){if(!or(n))return!1;var i="undefined"==typeof t?"undefined":r(t);return("number"==i?Yn(n)&&on(t,n.length):"string"==i&&t in n)?Gn(n[t],e):!1}function un(e,t){if(Ba(e))return!1;var n="undefined"==typeof e?"undefined":r(e);return"number"==n||"symbol"==n||"boolean"==n||null==e||hr(e)?!0:qi.test(e)||!Wi.test(e)||null!=t&&e in Object(t)}function cn(e){var t="undefined"==typeof e?"undefined":r(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function sn(e){var t=qt(e),n=B[t];if("function"!=typeof n||!(t in P.prototype))return!1;if(e===n)return!0;var r=xa(n);return!!r&&e===r[0]}function ln(e){return!!jo&&jo in e}function fn(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||Mo;return e===n}function dn(e){return e===e&&!or(e)}function hn(e,t){return function(n){return null==n?!1:n[e]===t&&(t!==Wr||e in Object(n))}}function pn(e,t){var n=e[1],r=t[1],i=n|r,o=(Kr|Gr|ei)>i,a=r==ei&&n==Yr||r==ei&&n==ti&&e[7].length<=t[8]||r==(ei|ti)&&t[7].length<=t[8]&&n==Yr;if(!o&&!a)return e;r&Kr&&(e[2]=t[2],i|=n&Kr?0:Qr);var u=t[3];if(u){var c=e[3];e[3]=c?_t(c,u,t[4]):u,e[4]=c?R(e[3],$r):t[4]}return u=t[5],u&&(c=e[5],e[5]=c?xt(c,u,t[6]):u,e[6]=c?R(e[5],$r):t[6]),u=t[7],u&&(e[7]=u),r&ei&&(e[8]=null==e[8]?t[8]:Zo(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}function vn(e,t,n,r,i,o){return or(e)&&or(t)&&Ke(e,t,Wr,vn,o.set(t,e)),e}function gn(e,t){return 1==t.length?e:ke(e,tt(t,0,-1))}function mn(e,t){for(var n=e.length,r=Zo(t.length,n),i=St(e);r--;){var o=t[r];e[r]=on(o,n)?i[o]:Wr}return e}function yn(e){if("string"==typeof e||hr(e))return e;var t=e+"";return"0"==t&&1/e==-ui?"-0":t}function bn(e){if(null!=e){try{return Io.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function wn(e){for(var t=-1,n=e?e.length:0,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i}function _n(e,t,n,r){var i=e?e.length:0;return i?(n&&"number"!=typeof n&&an(e,t,n)&&(n=0,r=i),Ee(e,t,n,r)):[]}function xn(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=null==n?0:mr(n);return 0>i&&(i=Xo(r+i,0)),m(e,zt(t,3),i)}function Sn(e,t,n){var r=e?e.length:0;if(!r)return-1;var i=null==n?0:mr(n);return 0>i&&(i=Xo(r+i,0)),y(e,t,i)}function Cn(e){var t=e?e.length:0;return t?e[t-1]:Wr}function En(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=zt(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Je(e,i),n}function An(e,t){return rt(e,t)}function Fn(e,t,n){return it(e,t,zt(n))}function On(e,t,n){return e&&e.length?(t=n||t===Wr?1:mr(t),tt(e,0,0>t?0:t)):[]}function Mn(e){return e&&e.length?at(e):[]}function kn(e,t){return ut(e||[],t||[],ve)}function jn(e,t,n){var r=Ba(e)?s:Se;return n&&an(e,t,n)&&(t=Wr),r(e,zt(t,3))}function In(e,t){var n=Ba(e)?l:Ae;return n(e,zt(t,3))}function Tn(e,t){var n=Ba(e)?u:ga;return n(e,zt(t,3))}function Rn(e,t){var n=Ba(e)?c:ma;return n(e,zt(t,3))}function Ln(e,t,n,r){e=Yn(e)?e:Or(e),n=n&&!r?mr(n):0;var i=e.length;return 0>n&&(n=Xo(i+n,0)),dr(e)?i>=n&&e.indexOf(t,n)>-1:!!i&&y(e,t,n)>-1}function Dn(e,t){var n=Ba(e)?h:ze;return n(e,zt(t,3))}function Bn(e,t,n){var r=Ba(e)?v:b,i=arguments.length<3;return r(e,zt(t,4),n,i,ga)}function Nn(e,t,n){var r=Ba(e)?g:nt;return n&&an(e,t,n)&&(t=Wr),r(e,zt(t,3))}function Pn(){return Date.now()}function Vn(e,t,n){t=n?Wr:t;var r=Bt(e,Yr,Wr,Wr,Wr,Wr,Wr,t);return r.placeholder=Vn.placeholder,r}function Wn(e,t,n){t=n?Wr:t;var r=Bt(e,Xr,Wr,Wr,Wr,Wr,Wr,t);return r.placeholder=Wn.placeholder,r}function qn(e,t,n){function r(t){var n=d,r=h;return d=h=Wr,y=t,v=e.apply(r,n)}function i(e){return y=e,g=setTimeout(u,t),b?r(e):v}function o(e){var n=e-m,r=e-y,i=t-n;return w?Zo(i,p-r):i}function a(e){var n=e-m,r=e-y;return m===Wr||n>=t||0>n||w&&r>=p}function u(){var e=Pn();return a(e)?c(e):void(g=setTimeout(u,o(e)))}function c(e){return g=Wr,_&&d?r(e):(d=h=Wr,v)}function s(){y=0,d=m=h=g=Wr}function l(){return g===Wr?v:c(Pn())}function f(){var e=Pn(),n=a(e);if(d=arguments,h=this,m=e,n){if(g===Wr)return i(m);if(w)return g=setTimeout(u,t),r(m)}return g===Wr&&(g=setTimeout(u,t)),v}var d,h,p,v,g,m,y=0,b=!1,w=!1,_=!0;if("function"!=typeof e)throw new TypeError(zr);return t=br(t)||0,or(n)&&(b=!!n.leading,w="maxWait"in n,p=w?Xo(br(n.maxWait)||0,t):p,_="trailing"in n?!!n.trailing:_),f.cancel=s,f.flush=l,f}function Hn(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(zr);var n=function r(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a),a};return n.cache=new(Hn.Cache||Z),n}function zn(e,t){if("function"!=typeof e)throw new TypeError(zr);return t=Xo(t===Wr?e.length-1:mr(t),0),function(){for(var n=arguments,r=-1,i=Xo(n.length-t,0),o=Array(i);++r<i;)o[r]=n[t+r];switch(t){case 0:return e.call(this,o);case 1:return e.call(this,n[0],o);case 2:return e.call(this,n[0],n[1],o)}var u=Array(t+1);for(r=-1;++r<t;)u[r]=n[r];return u[t]=o,a(e,this,u)}}function Un(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError(zr);return or(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),qn(e,t,{leading:r,maxWait:t,trailing:i})}function $n(e){return we(e,!1,!0)}function Kn(e){return we(e,!0,!0)}function Gn(e,t){return e===t||e!==e&&t!==t}function Qn(e){return Xn(e)&&To.call(e,"callee")&&(!Uo.call(e,"callee")||Do.call(e)==pi)}function Yn(e){return null!=e&&ir(Sa(e))&&!rr(e)}function Xn(e){return ar(e)&&Yn(e)}function Zn(e){return e===!0||e===!1||ar(e)&&Do.call(e)==gi}function Jn(e){return ar(e)&&Do.call(e)==mi}function er(e){if(Yn(e)&&(Ba(e)||dr(e)||rr(e.splice)||Qn(e)||Na(e)))return!e.length;if(ar(e)){var t=Yt(e);if(t==_i||t==Ai)return!e.size}for(var n in e)if(To.call(e,n))return!1;return!(aa&&Cr(e).length)}function tr(e,t){return De(e,t)}function nr(e){return"number"==typeof e&&Qo(e)}function rr(e){var t=or(e)?Do.call(e):"";return t==bi||t==wi}function ir(e){return"number"==typeof e&&e>-1&&e%1==0&&ci>=e}function or(e){var t="undefined"==typeof e?"undefined":r(e);return!!e&&("object"==t||"function"==t)}function ar(e){return!!e&&"object"==("undefined"==typeof e?"undefined":r(e))}function ur(e){return lr(e)&&e!=+e}function cr(e){return null===e}function sr(e){return null==e}function lr(e){return"number"==typeof e||ar(e)&&Do.call(e)==xi}function fr(e){if(!ar(e)||Do.call(e)!=Si||j(e))return!1;var t=Gt(e);if(null===t)return!0;var n=To.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Io.call(n)==Lo}function dr(e){return"string"==typeof e||!Ba(e)&&ar(e)&&Do.call(e)==Fi}function hr(e){return"symbol"==("undefined"==typeof e?"undefined":r(e))||ar(e)&&Do.call(e)==Oi}function pr(e){return ar(e)&&ir(e.length)&&!!yo[Do.call(e)]}function vr(e){return e===Wr}function gr(e){if(!e)return 0===e?e:0;if(e=br(e),e===ui||e===-ui){var t=0>e?-1:1;return t*si}return e===e?e:0}function mr(e){var t=gr(e),n=t%1;return t===t?n?t-n:t:0}function yr(e){return e?be(mr(e),0,fi):0}function br(e){if("number"==typeof e)return e;if(hr(e))return li;if(or(e)){var t=rr(e.valueOf)?e.valueOf():e;e=or(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ui,"");var n=Qi.test(e);return n||Xi.test(e)?wo(e.slice(2),n?2:8):Gi.test(e)?li:+e}function wr(e){return Ct(e,Er(e))}function _r(e){return null==e?"":ot(e)}function xr(e,t,n){var r=null==e?Wr:ke(e,t);return r===Wr?n:r}function Sr(e,t){return null!=e&&Xt(e,t,Re)}function Cr(e){var t=fn(e);if(!t&&!Yn(e))return We(e);var n=tn(e),r=!!n,i=n||[],o=i.length;for(var a in e)!Te(e,a)||r&&("length"==a||on(a,o))||t&&"constructor"==a||i.push(a);return i}function Er(e){for(var t=-1,n=fn(e),r=qe(e),i=r.length,o=tn(e),a=!!o,u=o||[],c=u.length;++t<i;){var s=r[t];a&&("length"==s||on(s,c))||"constructor"==s&&(n||!To.call(e,s))||u.push(s)}return u}function Ar(e,t){var n={};return t=zt(t,3),Oe(e,function(e,r,i){n[r]=t(e,r,i)}),n}function Fr(e,t,n){return null==e?e:et(e,t,n)}function Or(e){return e?S(e,Cr(e)):[]}function Mr(e,t,n){return e=_r(e),n=be(mr(n),0,e.length),e.lastIndexOf(ot(t),n)==n}function kr(e,t,n){if(e=_r(e),e&&(n||t===Wr))return e.replace(Ui,"");if(!e||!(t=ot(t)))return e;var r=D(e),i=D(t),o=E(r,i),a=A(r,i)+1;return lt(r,o,a).join("")}function jr(e){return e}function Ir(e){return Ve("function"==typeof e?e:we(e,!0))}function Tr(e,t){return $e(e,we(t,!0))}function Rr(){}function Lr(e){return un(e)?Xe(yn(e)):Ze(e)}function Dr(){return[]}function Br(){return!1}function Nr(e){var t=++Ro;return _r(e)+t}function Pr(e){return e&&e.length?Ce(e,jr,Ie):Wr}function Vr(e){return e&&e.length?Ce(e,jr,He):Wr}var Wr,qr="4.13.1",Hr=200,zr="Expected a function",Ur="__lodash_hash_undefined__",$r="__lodash_placeholder__",Kr=1,Gr=2,Qr=4,Yr=8,Xr=16,Zr=32,Jr=64,ei=128,ti=256,ni=512,ri=1,ii=2,oi=150,ai=16,ui=1/0,ci=9007199254740991,si=1.7976931348623157e308,li=NaN,fi=4294967295,di=fi-1,hi=fi>>>1,pi="[object Arguments]",vi="[object Array]",gi="[object Boolean]",mi="[object Date]",yi="[object Error]",bi="[object Function]",wi="[object GeneratorFunction]",_i="[object Map]",xi="[object Number]",Si="[object Object]",Ci="[object Promise]",Ei="[object RegExp]",Ai="[object Set]",Fi="[object String]",Oi="[object Symbol]",Mi="[object WeakMap]",ki="[object ArrayBuffer]",ji="[object DataView]",Ii="[object Float32Array]",Ti="[object Float64Array]",Ri="[object Int8Array]",Li="[object Int16Array]",Di="[object Int32Array]",Bi="[object Uint8Array]",Ni="[object Uint8ClampedArray]",Pi="[object Uint16Array]",Vi="[object Uint32Array]",Wi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qi=/^\w*$/,Hi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,zi=/[\\^$.*+?()[\]{}|]/g,Ui=/^\s+|\s+$/g,$i=/\\(\\)?/g,Ki=/\w*$/,Gi=/^[-+]0x[0-9a-f]+$/i,Qi=/^0b[01]+$/i,Yi=/^\[object .+?Constructor\]$/,Xi=/^0o[0-7]+$/i,Zi=/^(?:0|[1-9]\d*)$/,Ji="\\ud800-\\udfff",eo="\\u0300-\\u036f\\ufe20-\\ufe23",to="\\u20d0-\\u20f0",no="\\ufe0e\\ufe0f",ro="["+Ji+"]",io="["+eo+to+"]",oo="\\ud83c[\\udffb-\\udfff]",ao="(?:"+io+"|"+oo+")",uo="[^"+Ji+"]",co="(?:\\ud83c[\\udde6-\\uddff]){2}",so="[\\ud800-\\udbff][\\udc00-\\udfff]",lo="\\u200d",fo=ao+"?",ho="["+no+"]?",po="(?:"+lo+"(?:"+[uo,co,so].join("|")+")"+ho+fo+")*",vo=ho+fo+po,go="(?:"+[uo+io+"?",io,co,so,ro].join("|")+")",mo=RegExp(oo+"(?="+oo+")|"+go+vo,"g"),yo={};yo[Ii]=yo[Ti]=yo[Ri]=yo[Li]=yo[Di]=yo[Bi]=yo[Ni]=yo[Pi]=yo[Vi]=!0,yo[pi]=yo[vi]=yo[ki]=yo[gi]=yo[ji]=yo[mi]=yo[yi]=yo[bi]=yo[_i]=yo[xi]=yo[Si]=yo[Ei]=yo[Ai]=yo[Fi]=yo[Mi]=!1;var bo={};bo[pi]=bo[vi]=bo[ki]=bo[ji]=bo[gi]=bo[mi]=bo[Ii]=bo[Ti]=bo[Ri]=bo[Li]=bo[Di]=bo[_i]=bo[xi]=bo[Si]=bo[Ei]=bo[Ai]=bo[Fi]=bo[Oi]=bo[Bi]=bo[Ni]=bo[Pi]=bo[Vi]=!0,bo[yi]=bo[bi]=bo[Mi]=!1;var wo=parseInt,_o="object"==r(t)&&t,xo=_o&&"object"==r(e)&&e,So=xo&&xo.exports===_o,Co=F("object"==("undefined"==typeof n?"undefined":r(n))&&n),Eo=F("object"==("undefined"==typeof self?"undefined":r(self))&&self),Ao=F("object"==r(this)&&this),Fo=Co||Eo||Ao||Function("return this")(),Oo=Array.prototype,Mo=Object.prototype,ko=Fo["__core-js_shared__"],jo=function(){var e=/[^.]+$/.exec(ko&&ko.keys&&ko.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Io=Function.prototype.toString,To=Mo.hasOwnProperty,Ro=0,Lo=Io.call(Object),Do=Mo.toString,Bo=RegExp("^"+Io.call(To).replace(zi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),No=So?Fo.Buffer:Wr,Po=Fo.Reflect,Vo=Fo.Symbol,Wo=Fo.Uint8Array,qo=Po?Po.enumerate:Wr,Ho=Object.getOwnPropertySymbols,zo=Object.create,Uo=Mo.propertyIsEnumerable,$o=Oo.splice,Ko=Math.floor,Go=Object.getPrototypeOf,Qo=Fo.isFinite,Yo=Object.keys,Xo=Math.max,Zo=Math.min,Jo=Kt(Fo,"DataView"),ea=Kt(Fo,"Map"),ta=Kt(Fo,"Promise"),na=Kt(Fo,"Set"),ra=Kt(Fo,"WeakMap"),ia=Kt(Object,"create"),oa=ra&&new ra,aa=!Uo.call({valueOf:1},"valueOf"),ua={},ca=bn(Jo),sa=bn(ea),la=bn(ta),fa=bn(na),da=bn(ra),ha=Vo?Vo.prototype:Wr,pa=ha?ha.valueOf:Wr,va=ha?ha.toString:Wr;P.prototype=_e(N.prototype),P.prototype.constructor=P,V.prototype.clear=W,V.prototype["delete"]=q,V.prototype.get=H,V.prototype.has=z,V.prototype.set=U,$.prototype.clear=K,$.prototype["delete"]=G,$.prototype.get=Q,$.prototype.has=Y,$.prototype.set=X,Z.prototype.clear=J,Z.prototype["delete"]=ee,Z.prototype.get=te,Z.prototype.has=ne,Z.prototype.set=re,ie.prototype.add=ie.prototype.push=oe,ie.prototype.has=ae,ue.prototype.clear=ce,ue.prototype["delete"]=se,ue.prototype.get=le,ue.prototype.has=fe,ue.prototype.set=de;var ga=Ft(Oe),ma=Ft(Me,!0),ya=Ot(),ba=Ot(!0);qo&&!Uo.call({valueOf:1},"valueOf")&&(qe=function(e){return I(qo(e))});var wa=oa?function(e,t){return oa.set(e,t),e}:jr,_a=na&&1/L(new na([,-0]))[1]==ui?function(e){return new na(e)}:Rr,xa=oa?function(e){return oa.get(e)}:Rr,Sa=Xe("length");Ho||(Qt=Dr),(Jo&&Yt(new Jo(new ArrayBuffer(1)))!=ji||ea&&Yt(new ea)!=_i||ta&&Yt(ta.resolve())!=Ci||na&&Yt(new na)!=Ai||ra&&Yt(new ra)!=Mi)&&(Yt=function(e){var t=Do.call(e),n=t==Si?e.constructor:Wr,r=n?bn(n):Wr;if(r)switch(r){case ca:return ji;case sa:return _i;case la:return Ci;case fa:return Ai;case da:return Mi}return t});var Ca=function(){var e=0,t=0;return function(n,r){var i=Pn(),o=ai-(i-t);if(t=i,o>0){if(++e>=oi)return n}else e=0;return wa(n,r)}}(),Ea=Hn(function(e){var t=[];return _r(e).replace(Hi,function(e,n,r,i){t.push(r?i.replace($i,"$1"):n||e)}),t}),Aa=zn(function(e,t){return Xn(e)?xe(e,Fe(t,1,Xn,!0)):[]}),Fa=zn(function(e){var t=h(e,ct);return t.length&&t[0]===e[0]?Le(t):[]}),Oa=zn(function(e,t){t=Fe(t,1);var n=e?e.length:0,r=ye(e,t);return Je(e,h(t,function(e){return on(e,n)?+e:e}).sort(bt)),r}),Ma=zn(function(e){return at(Fe(e,1,Xn,!0))}),ka=It(xn),ja=zn(function(e,t){if(null==e)return[];var n=t.length;return n>1&&an(e,t[0],t[1])?t=[]:n>2&&an(t[0],t[1],t[2])&&(t=[t[0]]),t=1==t.length&&Ba(t[0])?t[0]:Fe(t,1,rn),Qe(e,t,[])}),Ia=zn(function(e,t,n){var r=Kr;if(n.length){var i=R(n,Ht(Ia));r|=Zr}return Bt(e,r,t,n,i)}),Ta=zn(function(e,t,n){var r=Kr|Gr;if(n.length){var i=R(n,Ht(Ta));r|=Zr}return Bt(t,r,e,n,i)});Hn.Cache=Z;var Ra=zn(function(e,t){var n=R(t,Ht(Ra));return Bt(e,Zr,Wr,t,n)}),La=zn(function(e,t){var n=R(t,Ht(La));return Bt(e,Jr,Wr,t,n)}),Da=Lt(Ie),Ba=Array.isArray,Na=No?function(e){return e instanceof No}:Br,Pa=Lt(He),Va=At(function(e,t){if(aa||fn(t)||Yn(t))return void Ct(t,Cr(t),e);for(var n in t)To.call(t,n)&&ve(e,n,t[n])}),Wa=At(function(e,t){if(aa||fn(t)||Yn(t))return void Ct(t,Er(t),e);for(var n in t)ve(e,n,t[n])}),qa=At(function(e,t,n,r){Ct(t,Er(t),e,r)}),Ha=zn(function(e){return e.push(Wr,he),a(qa,Wr,e)}),za=zn(function(e){return e.push(Wr,vn),a($a,Wr,e)}),Ua=At(function(e,t,n){Ke(e,t,n)}),$a=At(function(e,t,n,r){Ke(e,t,n,r)}),Ka=zn(function(e,t){return null==e?{}:Ye(e,h(Fe(t,1),yn))});B.assign=Va,B.assignIn=Wa,B.assignInWith=qa,B.bind=Ia,B.bindKey=Ta,B.compact=wn,B.curry=Vn,B.curryRight=Wn,B.debounce=qn,B.defaults=Ha,B.defaultsDeep=za,B.difference=Aa,B.fill=_n,B.filter=In,B.intersection=Fa,B.iteratee=Ir,B.keys=Cr,B.keysIn=Er,B.map=Dn,B.mapValues=Ar,B.mP=Tr,B.memoize=Hn,B.merge=Ua,
  15. B.mergeWith=$a,B.partial=Ra,B.partialRight=La,B.pick=Ka,B.property=Lr,B.pullAt=Oa,B.remove=En,B.rest=zn,B.set=Fr,B.sortBy=ja,B.take=On,B.throttle=Un,B.toPlainObject=wr,B.union=Ma,B.uniq=Mn,B.values=Or,B.zipObject=kn,B.extend=Wa,B.extendWith=qa,B.clone=$n,B.cloneDeep=Kn,B.eq=Gn,B.every=jn,B.find=ka,B.findIndex=xn,B.forEach=Tn,B.forEachRight=Rn,B.get=xr,B.gt=Da,B.hasIn=Sr,B.identity=jr,B.includes=Ln,B.indexOf=Sn,B.isArguments=Qn,B.isArray=Ba,B.isArrayLike=Yn,B.isArrayLikeObject=Xn,B.isBoolean=Zn,B.isBuffer=Na,B.isDate=Jn,B.isEmpty=er,B.isEqual=tr,B.isFinite=nr,B.isFunction=rr,B.isLength=ir,B.isNaN=ur,B.isNil=sr,B.isNull=cr,B.isNumber=lr,B.isObject=or,B.isObjectLike=ar,B.isPlainObject=fr,B.isString=dr,B.isSymbol=hr,B.isTypedArray=pr,B.isUndefined=vr,B.last=Cn,B.lt=Pa,B.max=Pr,B.min=Vr,B.stubArray=Dr,B.stubFalse=Br,B.noop=Rr,B.now=Pn,B.reduce=Bn,B.some=Nn,B.sortedIndex=An,B.sortedIndexBy=Fn,B.startsWith=Mr,B.toFinite=gr,B.toInteger=mr,B.toLength=yr,B.toNumber=br,B.toString=_r,B.trim=kr,B.uniqueId=Nr,B.each=Tn,B.eachRight=Rn,B.VERSION=qr,u(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){B[e].placeholder=B}),e.exports=B}).call(void 0)}).call(t,n(8)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}!function(){function t(e){if(e&&e.childNodes)for(var n=0;n<e.childNodes.length;n++){var r=e.childNodes[n];8===r.nodeType||3===r.nodeType&&!/\S/.test(r.nodeValue)?(e.removeChild(r),n--):1===r.nodeType&&t(r)}}function i(e,t,n){t=t||f.getStyle(e);var r;return c.isString(n)?r=o(t[n]):(n=n||h,r={},n.forEach(function(e){r[e]=o(t[e])})),r}function o(e){var t=parseFloat(e);return isNaN(t)?0:t}function a(){var e=document.body,t=e.style;if(t&&t.position&&"static"!==t.position){var n=f.gCSV(e,null,h);return{left:n.paddingLeft+n.marginLeft+n.borderLeftWidth,top:n.paddingTop+n.marginTop+n.borderTopWidth,right:n.paddingRight+n.marginRight+n.borderRightWidth}}return{left:0,top:0,right:0}}var u=n(7),c=n(10),s="left",l="right",f={},d={left:0,top:0,width:0,height:0};f.isDomElement=function(e){return e instanceof HTMLElement},f.isVisible=function(e){return f.isDomElement(e)&&null!==e.offsetParent},f.createElement=function(e){var t=document.createElement("div");t.innerHTML=e;var n=t.children[0];return t=null,n},f.createTemplateElement=function(e){var n=document.createElement("div");return n.innerHTML=e,t(n),n},f.getElementInnerText=function(e){return e.innerHTML.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},f.getElementOuterText=function(e){return e.outerHTML.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">")},f.hasClass=function(e,t){if(e&&e.getAttribute){var n=e.getAttribute("class");if(n)return n=n.replace(/[\t\r\n\f]/g," ").split(" "),n.indexOf(t)>=0}return!1},f.removeClass=function(e,t){if(e&&e.setAttribute&&f.hasClass(e,t)){var n=e.getAttribute("class").split(" "),r=[];u.each(n,function(e){e.toLowerCase()!==t.toLowerCase()&&r.push(e)}),e.setAttribute("class",r.join(" "))}},f.addClass=function(e,t){if(e&&e.setAttribute&&!f.hasClass(e,t)){var n=e.getAttribute("class");e.setAttribute("class",n?n+" "+t:t)}},f.toggleClass=function(e,t,n){n===!0?f.addClass(e,t):f.removeClass(e,t)},f.getElement=function(e){return e instanceof HTMLElement?e:c.isString(e)?document.querySelector(e):null},f.contains=function(e,t){for(var n=t;n;n=n.parentElement)if(n===e)return!0;return!1},f.offset=function(e){var t=e?e.getBoundingClientRect():d;return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},f.gER=function(e){var t=e?e.getBoundingClientRect():d;return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,width:t.width,height:t.height}},f.gCoR=function(e){var t=e?e.getBoundingClientRect():d,n=i(e),r=n.paddingLeft+n.paddingRight,o=n.paddingTop+n.paddingBottom,a=n.borderLeftWidth+n.borderRightWidth,u=n.borderTopWidth+n.borderBottomWidth;return{left:t.left+window.pageXOffset+n.borderLeftWidth+n.paddingLeft,top:t.top+window.pageYOffset+n.borderTopWidth+n.paddingTop,width:Math.max(0,Math.floor(t.width-r-a)),height:Math.max(0,Math.floor(t.height-o-u))}},f.gCoRFn=function(e){var t=i(e),n=t.paddingLeft+t.paddingRight,r=t.paddingTop+t.paddingBottom,o=t.borderLeftWidth+t.borderRightWidth,a=t.borderTopWidth+t.borderBottomWidth;return function(){var i=e.getBoundingClientRect();return{left:i.left+window.pageXOffset+t.borderLeftWidth+t.paddingLeft,top:i.top+window.pageYOffset+t.borderTopWidth+t.paddingTop,width:Math.max(0,Math.floor(i.width-n-o)),height:Math.max(0,Math.floor(i.height-r-a))}}},f.getStyle=function(e){var t=getComputedStyle||window.getComputedStyle;return e&&t?t(e,null):null};var h=["paddingLeft","paddingRight","paddingTop","paddingBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","marginLeft","marginRight","marginTop","marginBottom"];f.gCSV=i,f.getBodyStyle=a,f.setCss=function(e,t){var n=e.style;for(var r in t){var i=t[r];c.isNumber(i)&&r.match(/width|height|left|top|right|bottom|size|padding|margin'/i)&&(i+="px"),n[r]=i.toString()}},f.gSS=function(e){if(e.scS_)return e.scS_;var t=f.createElement('<div style="position:absolute; top:-10000px; left:-10000px; width:100px; height:100px; overflow:scroll;"></div>');return document.body.appendChild(t),e.scS_={width:t.offsetWidth-t.clientWidth,height:t.offsetHeight-t.clientHeight},t.parentNode.removeChild(t),e.scS_},f.gSCH=function(){if(f.mSCH)return f.mSCH;var e,t=1e6,n=6e9,r=f.createElement('<div style="display:none"/>');for(document.body.appendChild(r);;){if(e=t+5e5,r.style.height=e+"px",e>n||r.offsetHeight!==e)break;t=e}return r.parentNode.removeChild(r),f.mSCH=t,f.mSCH},f.closest=function(e,t){for(;e;){if(e.matches?e.matches(t):e.msMatchesSelector(t))return e;if(e.parentNode===document)return null;e=e.parentNode}return null};var p=void 0;f.detectRTLMode=function(){if(p)return p;var e=f.createElement('<div class="gc-test-container" style="overflow:auto;height:500px;width:500px;direction:rtl"><div class="gc-test-content" style="height:400px;width:1000px;"></div></div>');document.body.appendChild(e);var t="normal";return 0===e.scrollLeft&&(e.scrollLeft=1e4,t=e.scrollLeft>0?"reverse":"negative"),document.body.removeChild(e),e=null,p=t,t},f.getRTLScrollLeft=function(e){var t=arguments.length<=1||void 0===arguments[1]?"normal":arguments[1];return f.isDomElement(e)?f.tRTLSL(e.scrollLeft,e.scrollWidth-e.clientWidth,f.detectRTLMode(),t):void 0},f.setRTLScrollLeft=function(e,t){var n=arguments.length<=2||void 0===arguments[2]?"normal":arguments[2];if(f.isDomElement(e)){var r=f.detectRTLMode();e.scrollLeft=n===r?t:f.tRTLSL(t,e.scrollWidth-e.clientWidth,n,r)}};var v={normal:0,reverse:1,negative:2};f.tRTLSL=function(e,t,n,i){if(n===i)return e;if(n=v[n],i=v[i],0>=t)return 0;var o=[[[1],[-1,t],[1,-t]],[[-1,t],[1],[-1]],[[1,t],[-1],[1]]];return function(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2];return(t>0?e:-e)+n}.apply(void 0,[e].concat(r(o[n][i])))},f.inverseToRTL=function(e){if(!f.isDomElement(e))return e;var t,n="[style]";t="TEMPLATE"===e.tagName?e.content.querySelectorAll(n):e.querySelectorAll(n);var r=function(e,t,n){var r=e.style[t];c.isNilOrWhiteSpace(r)||(e.style[t]="",e.style[n]=r)};return u.forEach(t,function(e){c.isNilOrWhiteSpace(e.style.right)?c.isNilOrWhiteSpace(e.style.left)||r(e,s,l):r(e,l,s),e.style["float"]===l?e.style["float"]=s:e.style["float"]===s&&(e.style["float"]=l)}),e},f.detectBrowserType=function(){if(f.duckTypingBrowserType)return f.duckTypingBrowserType;var e=navigator&&navigator.userAgent,t=!!window.opr&&!!window.opr.addons||!!window.opera||e.indexOf(" OPR/")>=0,n="undefined"!=typeof InstallTrigger,r=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,i=!!document.documentMode,o=!i&&!!window.StyleMedia,a=!!window.chrome&&!!window.chrome.webstore,u=(a||t)&&!!window.CSS,c=!!e.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile|WPDesktop/i);return f.duckTypingBrowserType={isOpera:t,isFirefox:n,isSafari:r,isIE:i,isEdge:o,isChrome:a,isBlink:u,isMobileDevice:c}},e.exports=f}()},function(e,t,n){"use strict";!function(){function t(e){return M.isNil(e)?!0:M.isString(e)?e.replace(/\s/g,"").length<1:!1}function r(e,t,n){e&&e.removeEventListener(t,n)}function i(e,t,n){e&&e.addEventListener(t,n)}function o(e){}function a(e){return O.isNumber(e)?"number":O.isBoolean(e)?"boolean":O.isDate(e)?"date":O.isString(e)?"string":O.isArray(e)?"array":O.isObject(e)?"object":""}function u(e,t){var n=M.isNil(t)||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||T.hasOwnProperty(e)&&T[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}function c(e){var t={};return function(n){return t.hasOwnProperty(n)?t[n]:(t[n]=e.call(this,n),t[n])}}function s(e){return e.replace(R,"-$1").toLowerCase()}function l(e){return s(e).replace(L,"-ms-")}function f(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];M.isNil(r)||(t+=D(n)+":",t+=u(n,r)+";")}return t||null}function d(e,t){var n=function(e){return"[object Object]"===Object.prototype.toString.call(e)};if(!n(e)||!n(t))return e;for(var r,i=[{level:-1,value:e,key:null}],o=[],a={};i.length>0;)if(r=i.pop(),O.isNil(r.key)||(o=M.take(o,r.level),o.push(r.key)),O.isObject(r.value)&&!O.isFunction(r.value))for(var u in r.value)i.push({level:r.level+1,value:r.value[u],key:u});else{var c=o.join("."),s=M.get(e,c);s!==M.get(t,c)&&M.set(a,c,s)}return M.isEmpty(a)?null:a}function h(e){var t=M.cloneDeep(e),n=[];t&&n.push(t);for(var r;n.length>0;)if(r=n.pop(),O.isObject(r))for(var i in r)n.push(r[i]),O.isFunction(r[i])&&(r[i]=v(r[i]));return t}function p(e){var t=M.clone(e),n=[];t&&n.push(t);for(var r,i;n.length>0;)if(r=n.pop(),O.isObject(r))for(var o in r)n.push(r[o]),O.isString(r[o])&&(i=g(r[o]),i&&(r[o]=i));return t}function v(e){return e.toString()}function g(e){if(O.isString(e)&&"function"===e.substr(0,8)&&(/\s/.test(e[8])||"("===e[8])){var t=e.indexOf("(")+1,n=e.indexOf(")"),r=e.substr(t,n-t).split(",").map(function(e){return e.replace(/\s+/,"")}),i=e.indexOf("{")+1,o=e.lastIndexOf("}");return new Function(r,e.substr(i,o-i))}return null}function m(e){var t;try{t=GC.Spread.Views.Plugins[e]}catch(n){}return t}function y(e){var t={},n=GC&&GC.Spread&&GC.Spread.Views&&GC.Spread.Views.LocaleResource&&GC.Spread.Views.LocaleResource.content;for(var r in e)t[r]=n&&n[r];return t}function b(e){var t=O.toDate(e);if(isNaN(t.getTime()))return e;var n=t.getFullYear().toString(),r=(t.getMonth()+1).toString(),i=t.getDate().toString();return w(n,4)+"-"+w(r,2)+"-"+w(i,2)}function w(e,t){var n=t-e.length+1;return n>=0?new Array(n).join("0")+e:e}function _(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n}function x(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}function S(e,t,n){var r=function(e){return M.isUndefined(e)?e:n?(e+"").trim().toLowerCase():(e+"").trim().toString()},i=r(t);return function(t){if(null==t)return!1;var r=C(t,e);return r=M.isUndefined(r)?r:n?(r+"").toLowerCase():(r+"").toString(),r===i?void 0!==i||e in t:M.isEqual(r,i)}}function C(){var e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1];if(!M.isNil(e)&&!M.isNil(t)){t=M.isArray(t)?t:M.isString(t)?t.split("."):[t];for(var n=0,r=t.length,i=arguments.length>2;e&&r>n;){if(i&&n===r-1)return void(e[t[n]]=arguments.length<=2?void 0:arguments[2]);e=e[t[n++]]}return e}}function E(e,t,n,r){M.isArray(e)||(e=[e]),M.isArray(t)||(t=[t]);var i=r?[]:{};M.forEach(e,function(e){i[e]||(i[e]=1)});var o=[],a=[],u=[],c=0,s=0,l=0;return M.forEach(t,function(e){i[e]?(i[e]=2,n&&(a[l++]=e)):(i[e]=3,n&&(o[c++]=e))}),n&&M.forEach(i,function(e,t){1===e&&(u[s++]=+t)}),n?{add:o,remove:u,keep:a}:{map:i}}function A(e){return O.isNumber(e)?F(e):new Date(e)}function F(e){var t=new Date(1899,11,30),n=864e5,r=e-Math.floor(e);return 0>e&&r&&(e=Math.floor(e)-r),new Date(e*n+ +t)}var O={},M=n(7);O.isString=M.isString,O.regist=i,O.unRegist=r,O.isNilOrWhiteSpace=t,O.isNumber=M.isNumber,O.isInt=M.isInteger,O.isBoolean=M.isBoolean,O.isFunction=M.isFunction,O.isUndefined=M.isUndefined,O.isDate=M.isDate,O.isArray=M.isArray,O.isObject=M.isObject,O.debugLog=o,O.getType=a,O.isNull=M.isNull,O.isNil=M.isNil;var k={Back:8,Tab:9,Enter:13,Escape:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40,Delete:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123};O.Key=k;var j=function(e){var t=e.keyCode,n=t>47&&58>t||t>64&&91>t||t>95&&112>t||t>185&&193>t||t>218&&223>t;return n};O.isPrintableKey=j;var I={Text:"text",CheckBox:"checkbox",Date:"date",Color:"color",Number:"number"};O.EditorType=I;var T={columnCount:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeOpacity:!0},R=/([A-Z])/g,L=/^-ms-/,D=c(function(e){return l(e)});O.cMFS=f,O.extractObject=d,O.serializeObject=h,O.deserializeObject=p,O.serializeFunction=v,O.deserializeFunction=g,O.findPlugin=m,O.getResource=y,O.normalizeDate=b,O.extends_=_,O.caC=x,O.mP=S,O.sOP=function(e,t){return C(e,t)},O.gOP=function(e,t,n){return C(e,t,n)},O.compareArray=E,O.toDate=A,e.exports=O}()}])});