!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=81)}([function(t,e,n){var o=n(24)("wks"),r=n(16),i=n(4).Symbol,s="function"==typeof i;(t.exports=function(t){return o[t]||(o[t]=s&&i[t]||(s?i:r)("Symbol."+t))}).store=o},,function(t,e,n){var o=n(6);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var o=n(65),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();t.exports=i},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var o=n(9),r=n(30);t.exports=n(8)?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(5)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var o=n(2),r=n(56),i=n(43),s=Object.defineProperty;e.f=n(8)?Object.defineProperty:function(t,e,n){if(o(t),e=i(e,!0),o(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var o=n(28),r=Math.min;t.exports=function(t){return t>0?r(o(t),9007199254740991):0}},function(t,e,n){var o=n(4),r=n(7),i=n(10),s=n(16)("src"),a=n(87),c=(""+a).split("toString");n(25).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var l="function"==typeof n;l&&(i(n,"name")||r(n,"name",e)),t[e]!==n&&(l&&(i(n,s)||r(n,s,t[e]?""+t[e]:c.join(String(e)))),t===o?t[e]=n:a?t[e]?t[e]=n:r(t,e,n):(delete t[e],r(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[s]||a.call(this)}))},function(t,e,n){var o=n(90),r=n(29);t.exports=function(t){return o(r(t))}},function(t,e,n){var o=n(145),r=n(148);t.exports=function(t,e){var n=r(t,e);return o(n)?n:void 0}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){var n=0,o=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+o).toString(36))}},function(t,e,n){var o=n(4),r=n(25),i=n(7),s=n(12),a=n(58),c=function(t,e,n){var l,u,d,p,h=t&c.F,f=t&c.G,_=t&c.S,m=t&c.P,g=t&c.B,v=f?o:_?o[e]||(o[e]={}):(o[e]||{}).prototype,b=f?r:r[e]||(r[e]={}),y=b.prototype||(b.prototype={});for(l in f&&(n=e),n)d=((u=!h&&v&&void 0!==v[l])?v:n)[l],p=g&&u?a(d,o):m&&"function"==typeof d?a(Function.call,d):d,v&&s(v,l,d,t&c.U),b[l]!=d&&i(b,l,p),m&&y[l]!=d&&(y[l]=d)};o.core=r,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e,n){for(var o=n(88),r=n(31),i=n(12),s=n(4),a=n(7),c=n(44),l=n(0),u=l("iterator"),d=l("toStringTag"),p=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},f=r(h),_=0;_0;){for(const t of i){const e="".concat(s).concat(o.sep).concat(o.join(...a,t));if(r.existsSync(e)){if(!t.endsWith("json")){const t=n(e);return t.default||t}{const n=JSON.parse(r.readFileSync(e));if("package.json"!==t)return n;if(n.perspective)return n.perspective}}}a.pop()}}():{types:{float:{filter_operator:"==",aggregate:"sum",format:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}},string:{filter_operator:"==",aggregate:"count"},integer:{filter_operator:"==",aggregate:"sum",format:{}},boolean:{filter_operator:"==",aggregate:"count"},datetime:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},null_value:-1},date:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric"},null_value:-1}}}||{})),o.__PERSPECTIVE_CONFIG__}}).call(this,n(37)(t),n(54),n(15))},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var o=n(25),r=n(4),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:n(26)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=!1},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var o=n(61),r=n(46);t.exports=Object.keys||function(t){return o(t,r)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var o=n(135),r=n(136),i=n(137),s=n(138),a=n(139);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e1&&a.call(o[0],n,(function(){for(r=1;r")})),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=a(t),h=!i((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),f=h?!i((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[l]=function(){return n}),n[p](""),!e})):void 0;if(!h||!f||"replace"===t&&!u||"split"===t&&!d){var _=/./[p],m=n(s,p,""[t],(function(t,e,n,o,r){return e.exec===c?h&&!r?{done:!0,value:_.call(e,n,o)}:{done:!0,value:t.call(n,e,o)}:{done:!1}})),g=m[0],v=m[1];o(String.prototype,t,g),r(RegExp.prototype,p,2==e?function(t,e){return v.call(t,this,e)}:function(t){return v.call(t,this)})}}},function(t,e,n){var o=n(6);t.exports=function(t,e){if(!o(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!o(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports={}},function(t,e,n){var o=n(24)("keys"),r=n(16);t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var o=n(9).f,r=n(10),i=n(0)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&o(t,i,{configurable:!0,value:e})}},function(t,e,n){"use strict";var o=n(2),r=n(19),i=n(11),s=n(28),a=n(38),c=n(39),l=Math.max,u=Math.min,d=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n(42)("replace",2,(function(t,e,n,f){return[function(o,r){var i=t(this),s=null==o?void 0:o[e];return void 0!==s?s.call(o,i,r):n.call(String(i),o,r)},function(t,e){var r=f(n,t,this,e);if(r.done)return r.value;var d=o(t),p=String(this),h="function"==typeof e;h||(e=String(e));var m=d.global;if(m){var g=d.unicode;d.lastIndex=0}for(var v=[];;){var b=c(d,p);if(null===b)break;if(v.push(b),!m)break;""===String(b[0])&&(d.lastIndex=a(p,i(d.lastIndex),g))}for(var y,w="",x=0,E=0;E=x&&(w+=p.slice(x,N)+k,x=N+S.length)}return w+p.slice(x)}];function _(t,e,o,i,s,a){var c=o+t.length,l=i.length,u=h;return void 0!==s&&(s=r(s),u=p),n.call(a,u,(function(n,r){var a;switch(r.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,o);case"'":return e.slice(c);case"<":a=s[r.slice(1,-1)];break;default:var u=+r;if(0===u)return n;if(u>l){var p=d(u/10);return 0===p?n:p<=l?void 0===i[p-1]?r.charAt(1):i[p-1]+r.charAt(1):n}a=i[u-1]}return void 0===a?"":a}))}}))},function(t,e,n){var o=n(3).Symbol;t.exports=o},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var o=n(23);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var o=n(14)(n(3),"Map");t.exports=o},function(t,e){var n,o,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(t){o=s}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&h())}function h(){if(!u){var t=a(p);u=!0;for(var e=l.length;e;){for(c=l,l=[];++d1)for(var n=1;n1||"".split(/.?/).length?function(t,e){var r=String(this);if(void 0===t&&0===e)return[];if(!o(t))return n.call(r,t,e);for(var i,s,a,c=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,h=void 0===e?4294967295:e>>>0,f=new RegExp(t.source,u+"g");(i=l.call(f,r))&&!((s=f.lastIndex)>d&&(c.push(r.slice(d,i.index)),i.length>1&&i.index=h));)f.lastIndex===i.index&&f.lastIndex++;return d===r.length?!a&&f.test("")||c.push(""):c.push(r.slice(d)),c.length>h?c.slice(0,h):c}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,o){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r,o):f.call(String(r),n,o)},function(t,e){var o=u(f,t,this,e,f!==n);if(o.done)return o.value;var l=r(t),p=String(this),_=i(l,RegExp),m=l.unicode,g=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(h?"y":"g"),v=new _(h?l:"^(?:"+l.source+")",g),b=void 0===e?4294967295:e>>>0;if(0===b)return[];if(0===p.length)return null===c(v,p)?[p]:[];for(var y=0,w=0,x=[];wdocument.F=Object<\/script>"),t.close(),c=t.F;o--;)delete c.prototype[i[o]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=o(t),n=new a,a.prototype=null,n[s]=t):n=c(),void 0===e?n:r(n,e)}},function(t,e,n){var o=n(10),r=n(13),i=n(94)(!1),s=n(45)("IE_PROTO");t.exports=function(t,e){var n,a=r(t),c=0,l=[];for(n in a)n!=s&&o(a,n)&&l.push(n);for(;e.length>c;)o(a,n=e[c++])&&(~i(l,n)||l.push(n));return l}},function(t,e,n){"use strict";n(99);var o=n(2),r=n(41),i=n(8),s=/./.toString,a=function(t){n(12)(RegExp.prototype,"toString",t,!0)};n(5)((function(){return"/a/b"!=s.call({source:"a",flags:"b"})}))?a((function(){var t=o(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?r.call(t):void 0)})):"toString"!=s.name&&a((function(){return s.call(this)}))},function(t,e,n){"use strict";var o=n(2),r=n(11),i=n(38),s=n(39);n(42)("match",1,(function(t,e,n,a){return[function(n){var o=t(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,o):new RegExp(n)[e](String(o))},function(t){var e=a(n,t,this);if(e.done)return e.value;var c=o(t),l=String(this);if(!c.global)return s(c,l);var u=c.unicode;c.lastIndex=0;for(var d,p=[],h=0;null!==(d=s(c,l));){var f=String(d[0]);p[h]=f,""===f&&(c.lastIndex=i(l,r(c.lastIndex),u)),h++}return 0===h?null:p}]}))},function(t,e){var n=new function(){var t;try{throw new Error}catch(r){var e=r.stack.split("\n"),n=0;for(var o in e)if(e[o].match(/http[s]?:\/\//)){n=Number(o);break}t=e[n].match(/((http[s]?:\/\/.+\/)([^\/]+\.(js|html))).*?:/)}this.fullPath=function(){return t?t[1]:"undefined"!=typeof window?window.location.origin+window.location.pathname:""},this.path=function(){return t?t[2]:"undefined"!=typeof window?window.location.pathname:""},this.host=function(){var t=this.path().match(/.+?\/\/.+?\//);return t?t[0]:"undefined"!=typeof window?window.location.hostname:""},this.file=function(){return t?t[3]:""}};t.exports.host=n.host(),t.exports.path=n.path(),t.exports.isCrossOrigin=function(e){if(!(!e||!e.length)){var n=document.createElement("a");return n.href=e,!n.href.startsWith(window.location.origin)}return window.location.origin!==t.exports.host.slice(0,window.location.origin.length)},t.exports.publicPath=function(e){return!(!e||!e.length)?e:t.exports.path},t.exports.BlobWorker=function(t,e){var n=new Blob([t]),o=window.URL.createObjectURL(n),r=new Worker(o);e&&e(r)},t.exports.XHRWorker=function(e,n){var o=new XMLHttpRequest;o.addEventListener("load",(function(){t.exports.BlobWorker(o.responseText,n)}),o),o.open("get",e,!0),o.send()}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(15))},function(t,e,n){var o=n(4),r=n(25),i=n(26),s=n(67),a=n(9).f;t.exports=function(t){var e=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){e.f=n(0)},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var o=n(61),r=n(46).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return o(t,r)}},function(t,e,n){var o=n(117),r=n(126),i=n(130);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){(function(t){var o=n(3),r=n(121),i=e&&!e.nodeType&&e,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i?o.Buffer:void 0,c=(a?a.isBuffer:void 0)||r;t.exports=c}).call(this,n(37)(t))},function(t,e,n){var o=n(123),r=n(124),i=n(125),s=i&&i.isTypedArray,a=s?r(s):o;t.exports=a},function(t,e){var n=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}},function(t,e,n){var o=n(20),r=n(32),i="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",c="[object Proxy]";t.exports=function(t){if(!r(t))return!1;var e=o(t);return e==s||e==a||e==i||e==c}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var o=n(149),r=n(156),i=n(158),s=n(159),a=n(160);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++ep))return!1;var f=u.get(t);if(f&&u.get(e))return f==e;var _=-1,m=!0,g=n&a?new o:void 0;for(u.set(t,e),u.set(e,t);++_',"\n "]);return r=function(){return t},t}const i={},s=new class{registerPlugin(t,e){if(i[t])throw new Error('A perspective-viewer plugin "'.concat(t,'" has already been registered'));for(const n in i){const o=i[n];o&&o.name===e.name&&(console.warn('Conflicting plugin name "'.concat(e.name,'", qualifying with id')),o.name="".concat(o.name," [").concat(n,"]"),e.name="".concat(e.name," [").concat(t,"]"))}i[t]=e}getPlugin(t){return i[t]}getInstance(){return i}};t.registerPlugin=s.registerPlugin,t.getPlugin=s.getPlugin;const a=t=>Object(o.html)(r(),t);function c(){t.registerPlugin("debug",{name:"Debug",create:async function(t){const e=await this._view.to_csv({config:{delimiter:"|"}}),n=this._render_time();Object(o.render)(a(e),t),n()},selectMode:"toggle",resize:function(){},delete:function(){}})}}).call(this,n(24))},function(t,e){t.exports=i},function(t,e){t.exports=s},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,o=t[1]||"",r=t[3];if(!r)return o;if(e&&"function"==typeof btoa){var i=(n=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),s=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[o].concat(s).concat([i]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},r=0;r\n
\n ×\n \n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n
\n
\n \x3c!--
--\x3e\n
\n
\n
\n
\n \n \n
\n'},function(t,e,n){(t.exports=n(5)(!1)).push([t.i,':host{display:none;flex-direction:column;max-height:35%;margin-top:34px;margin-bottom:24px;flex:0 0 auto!important}:host *{box-sizing:border-box}:host select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIwLjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0LjkgMTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQuOSAxMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM0NDQ0NDQ7fQo8L3N0eWxlPgo8dGl0bGU+YXJyb3dzPC90aXRsZT4KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxLjQsNC43IDIuNSwzLjIgMy41LDQuNyAiLz4KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIzLjUsNS4zIDIuNSw2LjggMS40LDUuMyAiLz4KPC9zdmc+Cg==) 95% 50% no-repeat #fff;outline:0;border:none;height:24px;padding:0 0 0 6px;font-size:12px}:host.edit #psp-cc-button-delete{display:block!important}:host .psp-cc__label{color:#666;font-size:10px;margin-left:8px}:host .psp-cc__label.psp-cc__error{color:#cb4549!important;display:none}:host #psp-cc__actions{display:flex;justify-content:flex-start;margin-right:5px;margin-left:20px;margin-top:12px}:host #psp-cc__body,:host .psp-cc__container{display:flex;flex-direction:column}:host #psp-cc__body.row,:host .psp-cc__container.row{align-items:center;flex-direction:row}:host span#psp-cc__close{color:#666;position:absolute}:host span#psp-cc__close:hover{cursor:pointer}:host .psp-cc__container{margin:2px 0 10px 26px}:host .psp-cc__container:first-of-type{margin-bottom:0}:host .psp-cc__container span#psp-cc__mode{color:#000;font-size:12px}:host .psp-cc__container input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border-bottom:1px solid #ccc;font-size:12px;padding:3px 4px;flex-basis:500px}:host #psp-cc-name{background-color:#eee;border-bottom:1px solid #ccc;color:#333;cursor:default!important;font-size:12px;padding-left:2px;width:100%}:host #psp-cc-name:empty:before{content:"New Column";color:#ccc}:host #psp-cc-name *{display:inline}:host #psp-cc-name br{display:none}:host .psp-label__placeholder{color:#ccc;display:inline-block;font-size:12px;margin-left:4px}:host .psp-label__requiredType{margin-left:5px;margin-top:-1px;display:inline-block}:host .psp-label__requiredType.float::before,:host .psp-label__requiredType.integer::before{font-family:monospace;display:flex;content:"123";color:#016bc6}:host .psp-label__requiredType.string::before{font-family:monospace;display:flex;content:"abc";color:#fe9292}:host .psp-label__requiredType.boolean::before{font-family:monospace;display:flex;content:"t/f";color:#999}:host .psp-label__requiredType.datetime::before{font-family:monospace;display:flex;content:"mdy";color:#999}:host .psp-label__requiredType.date::before{font-family:monospace;display:flex;content:"mdy";color:#999}:host .psp-cc-computation__input-column{box-sizing:border-box;display:flex;align-items:center;border-bottom:1px solid #ccc;margin-top:5px;height:23px;width:100%}:host .psp-cc-computation__input-column perspective-row{margin-left:-26px;margin-right:-5px;width:calc(100% + 26px)}:host .psp-cc-computation__input-column.dropping{background-color:#f0f0ff!important;border:1px solid #1078d1!important;cursor:copy!important}:host .psp-cc-computation__input-column.dropping perspective-row{display:none!important;pointer-events:none}:host .psp-cc-computation__input-column.dropped{border:0;background:0 0}:host perspective-row{margin-bottom:2px;--row_draggable-overflow:hidden;--name-before-display:inline-block;--is_visible-display:inline-block;--row_draggable-padding:2px 10px 2px 2px;--row_close-display:none;--psp_row-margin:0 5px 0 0;--column_name-max-width:180px}:host perspective-row[drop-target]{--row_draggable_children-opacity:0}:host .psp-cc__content{align-items:center;display:flex;margin-top:5px}:host .psp-cc__content.psp-cc__content--nomargin{margin-top:0}:host #psp-cc-computation__type{box-sizing:border-box;display:flex;font-family:monospace;flex-direction:column;font-size:12px;padding-right:3px;padding-left:6px;background:eee;height:24px;text-align:center;padding-top:4px}:host #psp-cc-computation__type .boolean,:host #psp-cc-computation__type .date,:host #psp-cc-computation__type .datetime{color:#999}:host #psp-cc-computation__type .float,:host #psp-cc-computation__type .integer{color:#016bc6}:host #psp-cc-computation__type .string{color:#fe9292}:host #psp-cc-computation__select{margin-left:auto;width:100%;background-color:#eee;font-size:10px;border-bottom:none;color:#666}:host #psp-cc-computation__drop-target-hover{display:none}:host .psp-cc__button{border-radius:0;border-bottom:1px solid #ccc;border-left:0;border-right:0;border-top:0;font-size:12px;margin-left:6px;padding:2px 5px;width:45px}:host .psp-cc__button:hover{cursor:pointer}:host .psp-cc__button[disabled]{background:#666!important;color:#a0a0a0!important;cursor:not-allowed;border-bottom-color:#000!important;opacity:.5}:host .psp-cc__button#psp-cc-button-delete{background:#e76056;border-bottom-color:#bf4d45;color:#fff;display:none}:host .psp-cc__button#psp-cc-button-delete:active{background:#bf4d45;border-bottom-color:#9d3f39}:host .psp-cc__button#psp-cc-button-save{background:#0171d2;border-bottom-color:#0160b1;color:#fff;height:22px}:host .psp-cc__button#psp-cc-button-save:active{background:#0160b1;border-bottom-color:#014986}',""])},function(t,e,n){(t.exports=n(5)(!1)).push([t.i,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""])},function(t,e){t.exports='\x3c!--\r\n \r\n Copyright (c) 2017, the Perspective Authors.\r\n \r\n This file is part of the Perspective library, distributed under the terms of\r\n the Apache License 2.0. The full license can be found in the LICENSE file.\r\n\r\n--\x3e\r\n\r\n'},function(t,e,n){(t.exports=n(5)(!1)).push([t.i,':host{display:block;border:0 solid transparent}:host .row_computed{display:none;flex-direction:row}.dropping *{pointer-events:none}:host #psp_row{display:var(--psp_row-display,flex);margin:var(--psp_row-margin,0);overflow:visible;align-items:var(--column_selector--align-items,center);width:auto!important;height:auto!important;float:none!important}:host .is_visible{width:var(--column_selector--width,20px);min-width:var(--column_selector--width,20px);height:var(--is_visible--height,auto);cursor:pointer;font-size:var(--column_selector--font-size,14px);margin-top:-2px;display:var(--is_visible-display,none);color:var(--column-selector--color,#999);font-family:var(--column-selector--font-family,Arial)!important}:host #sort_order{display:none;font-family:var(--button--font-family,inherit);margin-right:4px;cursor:pointer;width:10px;display:var(--sort_order-display,none);padding:var(--sort_order-padding,0)}:host #sort_order:before{content:var(--row-sort-order--before, "-")}:host #sort_order:hover{color:var(--active--color,inherit)}:host #filter_operand{display:var(--filter_operand-display,none);margin:0;padding:0;height:19px;color:inherit;outline:0;border-color:var(--inactive--color,#ccc)}:host #filter_operator{margin:0 0 0 15px;display:var(--filter_operator-display,none);height:17px}:host #filter_operator:hover{color:var(--active--color,inherit)}@keyframes expand2{from{transform:translateX(10px)}}@keyframes expand3{from{transform:scale(.9)}}:host(:hover) .is_visible{color:var(--active--color,--column-selector--color)}:host #row_close{display:var(--row_close-display,inline);cursor:pointer;min-width:5px;max-width:5px;margin-right:3px;flex-grow:0;margin-left:3px;color:#999;font-family:Arial;font-size:10px}:host .is_visible:before{content:var(--is_visible--before,none)}:host #row_exclamation{color:red}:host #row_close:hover{color:var(--active--color,inherit)}:host .row_draggable select{border:none}:host .row_draggable select:focus{outline:0}:host select::-ms-expand{display:none}:host select{margin-left:15px;padding-right:15px;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIwLjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0LjkgMTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQuOSAxMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM0NDQ0NDQ7fQo8L3N0eWxlPgo8dGl0bGU+YXJyb3dzPC90aXRsZT4KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxLjQsNC43IDIuNSwzLjIgMy41LDQuNyAiLz4KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIzLjUsNS4zIDIuNSw2LjggMS40LDUuMyAiLz4KPC9zdmc+Cg==) 95% 50% no-repeat;background-color:var(--select--background-color,#fff);color:inherit;border-radius:5px;height:24px;padding:var(--column_type--padding,0 0 0 5px);font-size:12px}:host .awesomplete>ul{border-radius:0;margin:0;border:none;transition:none!important;background:var(--plugin--background,#fff)!important}:host .awesomplete>ul:before{content:none}:host .awesomplete>input,:host input{border-color:#ccc;border-width:0 0 1px;box-sizing:border-box;background-color:transparent}:host .row_draggable{animation:var(--row_draggable--animation,expand2 .5s ease-out);cursor:move;border-style:solid;background-color:var(--row_draggable-background-color,none);overflow:var(--row_draggable-overflow,visible);border-color:var(--row_draggable-border-color,none);border-width:var(--row_draggable-border-width,0);padding:var(--row_draggable-padding,0);font-size:12px;flex-grow:1;color:inherit;transition:height .2s;box-sizing:border-box;height:var(--row_draggable-height,21px);min-height:var(--row_draggable-height,21px);display:var(--row_draggable-display,flex);flex-direction:column;justify-content:var(--row_draggable--justify-content,center);margin:var(--row_draggable--margin,0);transition:var(--row_draggable--transition,none)}:host .row_draggable *{opacity:var(--row_draggable_children-opacity,1)}:host .row_draggable select{margin:0 0 0 27px}:host ul{transition:background-color .2s,border-color .2s}:host([drop-target]) .row_draggable{background-color:var(--active--background,#f0f0ff)!important;animation:var(--drop-target--animation,var(--row_draggable--animation,expand3 .5s ease-out));border:none!important}:host .float:before,:host .integer:before{content:var(--float--column-type--content, var(--column-type--content, "123"));color:var(--float--column-type--color,var(--column-type--color,#016bc6))}:host .string:before{content:var(--string--column-type--content, var(--column-type--content, "abc"));color:var(--string--column-type--color,var(--column-type--color,#fe9292))}:host .boolean:before{content:var(--boolean--column-type--content, var(--column-type--content, "t/f"));color:var(--boolean--column-type--color,var(--column-type--color,#999))}:host .date:before{content:var(--date--column-type--content, var(--column-type--content, "mdy"));color:var(--date--column-type--color,var(--column-type--color,#999))}:host .datetime:before{content:var(--datetime--column-type--content, var(--column-type--content, "mdy"));color:var(--datetime--column-type--color,var(--column-type--color,#999))}:host .column_name{overflow:hidden;max-width:var(--column_name-max-width,none);white-space:nowrap;text-overflow:ellipsis}:host span#name:before{font-family:var(--interface-monospace--font-family,monospace);position:relative;display:inline-block;padding:var(--column_type--padding,0 5px);min-width:18px;display:var(--name-before-display,none);width:var(--column_type--width,auto)}:host #column_aggregate{display:var(--column_aggregate-display,none);font-size:10px;font-family:Arial,sans-serif;width:88%;height:20px}:host span#name{width:100%;white-space:nowrap;margin:var(--column_name-margin,0)}',""])},function(t,e){t.exports='\x3c!--\r\n \r\n Copyright (c) 2017, the Perspective Authors.\r\n \r\n This file is part of the Perspective library, distributed under the terms of\r\n the Apache License 2.0. The full license can be found in the LICENSE file.\r\n\r\n--\x3e\r\n\r\n'},function(t,e,n){(t.exports=n(5)(!1)).push([t.i,':host #app #top_panel #row_pivots label:before{content:var(--row_pivots--before, "Row Pivots")}:host #app #top_panel #column_pivots label:before{content:var(--column_pivots--before, "Column Pivots")}:host #app #top_panel #sort label:before{content:"Sort"}:host #app #top_panel #filters label:before{content:"Filter"}:host #app #side_panel #active_columns perspective-row:before{font-size:10px;margin-left:var(--column_selector--width,20px);left:1px;padding:var(--column_type--padding,0 0 0 5px);color:var(--inactive--color,#666);position:absolute;margin-top:-15px}:host:hover #config_button{opacity:1}#config_button{background:0 0;opacity:1!important}.button{padding:var(--button--padding,12px 14px 24px 8px)}[settings=true] #config_button{opacity:1!important}@keyframes expand{from{opacity:0}}:host{position:relative;display:inline-block;overflow:hidden;word-wrap:normal;--highcharts-full--gradient:linear-gradient(#4d342f 0%, #e4521b 22.5%, #feeb65 42.5%, #f0f0f0 50%, #dcedc8 57.5%, #42b3d5 67.5%, #1a237e 100%);--highcharts-positive--gradient:linear-gradient(#dcedc8 0%, #42b3d5 35%, #1a237e 100%);--highcharts-negative--gradient:linear-gradient(#feeb65 100%, #e4521b 70%, #4d342f 0%);--hypergrid-tree-header--background:#fff;--hypergrid-tree-header--color:#666;--hypergrid-header--background:#fff;--hypergrid-separator--color:#666;--hypergrid-header--color:#666;--hypergrid-positive--color:#1078d1;--hypergrid-negative--color:#ff8888;--hypergrid--font-size:12px;--hypergrid-header--font-size:12px;--hypergrid--font-family:Helvetica,Arial,sans-serif;--hypergrid-header--font-family:Helvetica,Arial,sans-serif;--hypergrid-row-hover--background:#f6f6f6;--hypergrid-row-hover--color:#666;--hypergrid-cell-hover--background:#eeeeee;--hypergrid-cell-hover--color:#666;--integer--hypergrid--text-align:right;--float--hypergrid--text-align:right;--d3fc-series:rgba(31, 119, 180, 0.5);--d3fc-series-1:#0366d6;--d3fc-series-2:#ff7f0e;--d3fc-series-3:#2ca02c;--d3fc-series-4:#d62728;--d3fc-series-5:#9467bd;--d3fc-series-6:#8c564b;--d3fc-series-7:#e377c2;--d3fc-series-8:#7f7f7f;--d3fc-series-9:#bcbd22;--d3fc-series-10:#17becf;--d3fc-full--gradient:linear-gradient(#4d342f 0%, #e4521b 22.5%, #feeb65 42.5%, #f0f0f0 50%, #dcedc8 57.5%, #42b3d5 67.5%, #1a237e 100%);--d3fc-positive--gradient:linear-gradient(#dcedc8 0%, #42b3d5 35%, #1a237e 100%);--d3fc-negative--gradient:linear-gradient(#feeb65 100%, #e4521b 70%, #4d342f 0%)}:host #pivot_chart{position:absolute;width:100%;height:100%;display:grid;justify-content:stretch}:host .hidden{display:none}:host .psp-icon{color:#999}:host .psp-icon:hover{cursor:pointer}:host .psp-icon__add{display:flex;width:20px;min-width:20px;margin-top:-2px;height:0;font-family:var(--column-add--font-family,inherit)}:host .psp-icon__add:before{font-feature-settings:"liga";content:var(--column-add--before, "+")}:host .psp-title__columnName{display:flex;margin-left:34px;margin-top:3px;font-size:12px;color:#666}:host .side_panel-action:hover{cursor:pointer}:host *{box-sizing:border-box;line-height:1.42857143}:host #app{display:flex;position:relative;width:100%;height:100%}:host #app.hide_message #drop_target{display:none}:host .chart{padding:15px}:host #pivot_chart_container{flex-grow:1;position:relative;border:var(--plugin--border,none);overflow:hidden}:host .config{display:flex}:host #column_pivots #psp_row,:host #filters #psp_row,:host #row_pivots #psp_row,:host #sort #psp_row{display:inline}:host ul{min-height:20px;padding:0;margin:0;font-size:12px}:host #active_columns perspective-row{animation:.3s ease-out expand;--column-selector--color:var(--active--color, #999);--is_visible--before:var(--active-column-selector--content, "\\25CF")}:host #inactive_columns perspective-row{animation:.3s ease-out expand;--column-selector--color:var(--inactive-column-selector--color, #999);--is_visible--before:var(--inactive-column-selector--content, "\\25CB");--row_draggable--animation:none;opacity:var(--inactive-column--opacity,1);transition:opacity .3s}:host #inactive_columns perspective-row:hover{transition:none;opacity:1}:host #top_panel perspective-row{animation:.3s ease-out expand;margin-bottom:-1px;display:inline-block;--psp_row-display:inline-block}:host #active_columns,:host #inactive_columns{list-style:none;padding:0;width:100%;margin:var(--column-container--margin,8px 0 0 0);overflow-y:auto;overflow-x:hidden;position:relative}:host #inactive_columns perspective-row.active{--row_draggable--margin:0px 0px 0px 10px;opacity:0;height:0!important;overflow:hidden}:host .columns_horizontal #sub_columns.collapse #side_panel__actions{margin-top:0}:host #sub_columns{min-height:33.3%;flex-shrink:100000;display:flex;flex-direction:column;overflow-x:hidden;width:100%}:host #sub_columns.collapse{flex-shrink:0;min-height:64px}:host #sub_columns.collapse #inactive_columns{display:none}:host .column{display:flex;list-style:none;flex-direction:column;flex:1}:host .rrow{display:flex;flex-grow:1;min-height:24px;align-items:center;max-width:400px;list-style:none;min-width:140px;margin:var(--column-drop-container--margin,5px 10px 0 0)}:host .rrow>div{display:flex;min-height:24px;flex-direction:column;justify-content:flex-end}:host #top_panel>.rrow>*{width:100%;padding:12px 0;margin:-12px 0}:host .rrow #psp_row{white-space:nowrap}:host #sort perspective-row{--sort_order-display:inline;--sort_order-padding:0 0 0 10px}:host #sort perspective-row[sort-order=asc]{--row-sort-order--before:var(--sort-order-asc--before, "\\2191")}:host #sort perspective-row[sort-order=desc]{--row-sort-order--before:var(--sort-order-desc--before, "\\2193")}:host #sort perspective-row[sort-order=none]{--row-sort-order--before:var(--sort-order-none--before, "-")}:host #sort perspective-row[sort-order="asc abs"]{--row-sort-order--before:var(--sort-order-asc-abs--before, "\\21E7")}:host #sort perspective-row[sort-order="desc abs"]{--row-sort-order--before:var(--sort-order-desc-abs--before, "\\21E9")}:host #sort perspective-row[sort-order="col asc"]{--row-sort-order--before:var(--sort-order-col-asc--before, "\\2192")}:host #sort perspective-row[sort-order="col desc"]{--row-sort-order--before:var(--sort-order-col-desc--before, "\\2190")}:host #sort perspective-row[sort-order="col asc abs"]{--row-sort-order--before:var(--sort-order-col-asc-abs--before, "\\21E8")}:host #sort perspective-row[sort-order="col desc abs"]{--row-sort-order--before:var(--sort-order-col-desc-abs--before, "\\21E6")}:host #top_panel perspective-row+perspective-row:before{content:",";padding:0 10px 0 0}:host label{white-space:nowrap;display:inline-block;vertical-align:middle;margin-bottom:0}:host #drop_target{position:absolute;left:0;top:0;right:0;bottom:0;padding:30px}:host #drop_target_inner{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host #drop_target_inner h3{font-weight:300}:host #config_button{position:absolute;top:0;left:0;opacity:0;display:flex;align-items:center;justify-content:center;transition:opacity .2s ease-out}:host #config_button:hover{color:var(--active--color,inherit)}:host .button{cursor:pointer;font-size:16px;font-weight:400}:host select::-ms-expand{display:none}:host select{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIwLjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0LjkgMTAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQuOSAxMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM0NDQ0NDQ7fQo8L3N0eWxlPgo8dGl0bGU+YXJyb3dzPC90aXRsZT4KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIxLjQsNC43IDIuNSwzLjIgMy41LDQuNyAiLz4KPHBvbHlnb24gY2xhc3M9InN0MCIgcG9pbnRzPSIzLjUsNS4zIDIuNSw2LjggMS40LDUuMyAiLz4KPC9zdmc+Cg==) 95% 50% no-repeat #fff;color:inherit;border-radius:5px;height:24px;padding:var(--select--padding,0 0 0 6px);font-size:12px;font-family:inherit}:host input{padding:0 10px}:host .centered{display:flex;align-items:center;justify-content:center}:host #top_panel{display:flex;flex-wrap:wrap;justify-content:flex-start;padding:var(--top_panel--padding,5px 0 10px 0);max-width:1000px;z-index:1}:host #side_panel{position:relative;flex:0 0 auto;padding:var(--side_panel--padding,10px 10px 0 11px)}:host #side_panel>div{display:flex}:host #vis_selector_container{min-height:29px;margin-left:var(--column_selector--width,20px);overflow:hidden}:host #vis_selector{flex-grow:1}:host #transpose_button{cursor:pointer;min-width:5px;max-width:5px;flex-grow:0;color:#999;font-family:Arial;font-size:12px}:host #transpose_button:hover{color:var(--active--color,inherit)}:host #resize_bar{position:absolute;top:0;right:0;bottom:0;width:8px;cursor:col-resize}',""])},function(t,e,n){(t.exports=n(5)(!1)).push([t.i,'.psp-text-field{position:relative;background-color:var(--column-drop-container--background,#fff);border-width:0 0 1px;border-style:solid;border-color:var(--inactive--color,#ccc);display:flex;flex-direction:column;justify-content:flex-end;min-height:24px;transition:border-color .3s ease-out}:host(.dragging) .psp-text-field.dropping{border-bottom-width:2px;border-style:solid;border-color:var(--active--color,#1a7da1)}:host(.dragging) .psp-text-field{border-bottom-width:1px;border-style:solid;border-color:var(--active--color,#1a7da1)}.psp-text-field>.psp-text-field__input{border:0;line-height:20px;vertical-align:bottom;padding-bottom:0;display:none}.psp-text-field__input+label{height:var(--column--height,auto);line-height:17px;box-sizing:border-box;color:var(--inactive--color,#ccc);font-weight:400;white-space:nowrap;padding:var(--column-drop-container--padding,0 0 2px 10px);font-size:12px;display:inline-block;transition:font-size .3s,margin .3s}.dropping .psp-text-field__input,.psp-text-field__input:not(:empty){display:block!important}.dropping .psp-text-field__input::after{content:"|";width:0;overflow:visible;margin-top:-1px;position:absolute}.dropping *{pointer-events:none}.dropping .psp-text-field label,.psp-text-field__input:not(:empty)+label{position:absolute;top:0;margin:var(--column-drop-label--margin,0);font-size:var(--column-drop-label--font-size,12px);display:var(--column-drop-label--display,none)}.dropping perspective-row.inserting{border-top:25px solid transparent}.dropping perspective-row.postserting{border-bottom:25px solid transparent}:host perspective-row{height:var(--column--height,21px);--row_draggable-height:var(--column--height, 21px)}:host([row-pivots]) #active_columns perspective-row{height:var(--active-column--height,41px);min-height:var(--active-column--height,41px);--row_draggable-height:var(--active-column--height, 41px);--column_aggregate-display:inline-block;--is_visible--height:var(--active-column-selector--height, auto)}:host{font-family:Arial,sans-serif;background-color:#eee;color:#333}:host #app.columns_horizontal #columns_container{flex-direction:row-reverse}:host #app.columns_horizontal #active_columns,:host #app.columns_horizontal #inactive_columns{display:flex;flex-direction:column;flex:0 1 auto;width:100%}:host #app.columns_horizontal #inactive_columns{flex:1 1 auto}:host #app.columns_horizontal #sub_columns{flex-shrink:1}:host #app.columns_horizontal #sub_columns perspective-row{--column_name-margin:0 25px 0 0}:host #app.columns_horizontal #side_panel #divider{display:none}:host #app.columns_horizontal perspective-computed-column{max-height:none;margin-right:24px}:host perspective-computed-column{--is_visible--before:var(--active-column-selector--content, "\\25CF");--row_draggable-background-color:var(--column--background, white);--row_draggable-border-color:var(--inactive--color, #ccc);--row_draggable-border-width:0 0 1px 0;--row_draggable-overflow:hidden;--column-selector--color:var(--active--color, #999)}:host #side_panel perspective-row{--name-before-display:inline-block;--is_visible-display:inline-block;--row_draggable-padding:0px 10px 0px 0px;--row_close-display:none;--column_name-max-width:180px}:host #top_panel perspective-row{--row_draggable-display:inline-block}:host #columns_container{flex-direction:column;height:calc(100% - 29px)}:host #columns_container #active_columns{flex:0 1 auto}:host #columns_container #active_columns perspective-row{margin-bottom:2px;--row_draggable-background-color:var(--column--background, white);--row_draggable-border-color:var(--inactive--color, #ccc);--row_draggable-border-width:0 0 1px 0;--row_draggable-overflow:hidden;--row_draggable--justify-content:space-evenly}:host #columns_container #active_columns perspective-row:last-child{--row_draggable-border-width:var(--row_draggable-border-last-child-width, 0 0 1px 0)}:host #columns_container #active_columns perspective-row[drop-target]{--row_draggable_children-opacity:0}:host #columns_container #active_columns,:host #columns_container #inactive_columns{border:none!important}:host ul{transition:background-color .2s,border-color .2s;outline:0;border-style:solid;border-color:var(--inactive--color,#ccc);font-size:12px;padding:var(--column-drop-container--padding,0 10px 0 10px);border-width:0 0 1px}:host #side_panel #side_panel__actions{display:flex;flex-direction:column;flex-shrink:1000;justify-content:flex-start;position:relative;overflow-y:hidden;width:100%;padding-top:20px;margin:var(--column-container--margin,8px);min-height:36px}:host #side_panel #side_panel__actions button.side_panel-action{align-items:center;align-content:center;background:0 0;border:none;display:flex;flex-direction:row;font-size:12px;padding-right:10px;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host #side_panel #side_panel__actions button.side_panel-action span{margin-left:5px;font-size:15px}:host #side_panel #side_panel__actions button.side_panel-action:hover{cursor:pointer}:host .noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host svg .highcharts-legend-box{fill:none}:host #pivot_chart{background-color:var(--plugin--background,#fff)}:host #drop_target{border:var(--plugin--border,none);background:var(--plugin--background,#fff)}:host #pivot_chart_container{box-shadow:var(--plugin--box-shadow,none)}:host #filters perspective-row{margin:0 24px 0 0;--filter_operator-display:inline-block;--filter_operand-display:inline-block}:host .plugin_information{color:var(--warning--color,inherit);display:flex;position:absolute;flex-direction:row;justify-content:flex-start;padding:.5rem;width:100%;z-index:10000;transition:opacity .3s ease-out;opacity:1}:host .plugin_information.hidden{display:none;opacity:0}:host .plugin_information.plugin_information--warning{background:#ffca28}:host .plugin_information .plugin_information__text{font-size:12px;margin-right:.25rem;display:flex;flex-wrap:wrap;align-items:center}:host .plugin_information .plugin_information__text:before{content:var(--overflow_hint--before);font-family:var(--overflow_hint--font-family);color:var(--overflow_hint--color);padding:var(--overflow_hint--padding);font-size:16px}:host .plugin_information .plugin_information__action{font-size:12px;text-decoration:underline;cursor:pointer;margin-right:.25rem}:host .plugin_information .plugin_information__action--close{margin-left:12px;display:inline-flex;font-size:12px;cursor:pointer}:host .plugin_information .plugin_information__actions{margin-left:auto;display:flex;align-items:center;flex-direction:row;justify-content:flex-start}:host .plugin_information .plugin_information--overflow-hint-percent{font-weight:700}:host .plugin_information .plugin_information--overflow-hint{white-space:nowrap}:host #drop_target_inner h3{color:#aaa;font-weight:300}:host #config_button,:host #copy_button,:host #download_button,:host #reset_button{font-weight:400;font-family:var(--button--font-family,Arial);color:var(--inactive--color,#999);font-size:var(--button--font-size,16px);transition:opacity .3s;overflow:hidden}:host #config_button:hover,:host #copy_button:hover,:host #download_button:hover,:host #reset_button:hover{color:var(--active--color,inherit)}:host #config_button:before{font-feature-settings:"liga";content:var(--settings-button--content, "\\1F527")}:host #reset_button:before{font-feature-settings:"liga";content:var(--reset_button--before, "Reset")}:host #close_button:before{font-family:var(--button--font-family,Arial);font-feature-settings:"liga";content:var(--close_button--before, "Close")}:host #download_button:before{font-feature-settings:"liga";content:var(--download_button--before, "Save")}:host #copy_button:before{font-feature-settings:"liga";content:var(--copy_button--before, "Copy")}:host #menubar{display:none;flex-direction:column;padding-top:55px}:host #app.show_menu #menubar{display:flex}:host select{border-radius:0;background-color:var(--select--background-color,#fff);border-style:solid;border-color:var(--inactive--color,#ccc);border-width:0 0 1px}:host select:focus{outline:0}:host input{border-style:solid;border-color:var(--inactive--color,#ccc);border-width:0 0 1px}:host input::placeholder{color:var(--inactive--color,#ccc)}:host option[value=""]{color:#fff!important}:host #app{background-color:inherit}:host ::-webkit-scrollbar,:host ::shadow ::-webkit-scrollbar{width:12px}:host ::-webkit-scrollbar-thumb,:host ::shadow ::-webkit-scrollbar-thumb{background:#ccc}:host ::-webkit-scrollbar-track,:host ::shadow ::-webkit-scrollbar-track{background:0 0}',""])},function(t,e){t.exports=f},function(t,e){t.exports=_},function(t,e,n){n(4),n(6);const o="dnd-poly-dragstart-pending",r="dnd-poly-dragstart-cancel",i=["none","copy","copyLink","copyMove","link","linkMove","move","all"],s=["none","copy","move","link"],a=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}();function c(t){return t&&t.tagName}function l(t,e,n){void 0===n&&(n=!0),document.addEventListener(t,e,!!a&&{passive:n})}function u(t,e){document.removeEventListener(t,e)}function d(t,e,n,o){void 0===o&&(o=!1);const r=a?{passive:!0,capture:o}:o;return t.addEventListener(e,n,r),{off:function(){t.removeEventListener(e,n,r)}}}function p(t){return 0===t.length?0:t.reduce((function(t,e){return e+t}),0)/t.length}function h(t,e){for(let n=0;n-1&&(this._dropEffect=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"types",{get:function(){if(0!==this._dataStore.mode)return Object.freeze(this._dataStore.types)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"effectAllowed",{get:function(){return this._dataStore.effectAllowed},set:function(t){2===this._dataStore.mode&&i.indexOf(t)>-1&&(this._dataStore.effectAllowed=t)},enumerable:!0,configurable:!0}),t.prototype.setData=function(t,e){if(2===this._dataStore.mode){if(t.indexOf(" ")>-1)throw new Error("illegal arg: type contains space");this._dataStore.data[t]=e,-1===this._dataStore.types.indexOf(t)&&this._dataStore.types.push(t)}},t.prototype.getData=function(t){if(1===this._dataStore.mode||2===this._dataStore.mode)return this._dataStore.data[t]||""},t.prototype.clearData=function(t){if(2===this._dataStore.mode){if(t&&this._dataStore.data[t]){delete this._dataStore.data[t];const e=this._dataStore.types.indexOf(t);return void(e>-1&&this._dataStore.types.splice(e,1))}this._dataStore.data={},this._dataStore.types=[]}},t.prototype.setDragImage=function(t,e,n){2===this._dataStore.mode&&this._setDragImageHandler(t,e,n)},t}();function v(t,e){return t?t===i[0]?s[0]:0===t.indexOf(i[1])||t===i[7]?s[1]:0===t.indexOf(i[4])?s[3]:t===i[6]?s[2]:s[1]:3===e.nodeType&&"A"===e.tagName?s[3]:s[1]}function b(t,e,n,o,r,i,s){void 0===i&&(i=!0),void 0===s&&(s=null),console.log("dnd-poly: dispatching "+t);const a=function(t,e,n,o,r,i,s){void 0===s&&(s=null);const a=e.changedTouches[0],c=new Event(n,{bubbles:!0,cancelable:o});c.dataTransfer=i,c.relatedTarget=s,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.pageX=a.pageX,c.pageY=a.pageY;const l=t.getBoundingClientRect();return c.offsetX=c.clientX-l.left,c.offsetY=c.clientY-l.top,c}(e,n,t,i,document.defaultView,r,s),c=!e.dispatchEvent(a);return o.mode=0,c}function y(t,e){if(!t||t===i[7])return e;if(e===s[1]){if(0===t.indexOf(s[1]))return s[1]}else if(e===s[3]){if(0===t.indexOf(s[3])||t.indexOf("Link")>-1)return s[3]}else if(e===s[2]&&(0===t.indexOf(s[2])||t.indexOf("Move")>-1))return s[2];return s[0]}const w=function(){function t(t,e,n,o){this._initialEvent=t,this._config=e,this._sourceNode=n,this._dragOperationEndedCb=o,this._dragOperationState=0,this._immediateUserSelection=null,this._currentDropTarget=null,console.log("dnd-poly: setting up potential drag operation.."),this._lastTouchEvent=t,this._initialTouch=t.changedTouches[0],this._touchMoveHandler=this._onTouchMove.bind(this),this._touchEndOrCancelHandler=this._onTouchEndOrCancel.bind(this),l("touchmove",this._touchMoveHandler,!1),l("touchend",this._touchEndOrCancelHandler,!1),l("touchcancel",this._touchEndOrCancelHandler,!1)}return t.prototype._setup=function(){const t=this;console.log("dnd-poly: starting drag and drop operation"),this._dragOperationState=1,this._currentDragOperation=s[0],this._dragDataStore={data:{},effectAllowed:void 0,mode:3,types:[]},this._currentHotspotCoordinates={x:null,y:null},this._dragImagePageCoordinates={x:null,y:null};let e=this._sourceNode;if(this._dataTransfer=new g(this._dragDataStore,(function(n,o,r){e=n,"number"!=typeof o&&"number"!=typeof r||(t._dragImageOffset={x:o||0,y:r||0})})),this._dragDataStore.mode=2,this._dataTransfer.dropEffect=s[0],b("dragstart",this._sourceNode,this._lastTouchEvent,this._dragDataStore,this._dataTransfer))return console.log("dnd-poly: dragstart cancelled"),this._dragOperationState=3,this._cleanup(),!1;f("page",this._lastTouchEvent,this._dragImagePageCoordinates);const n=this._config.dragImageSetup(e);var o;if(this._dragImageTransforms=(o=n,_.map((function(t){const e=o.style[t+"transform"];return e&&"none"!==e?e.replace(/translate\(\D*\d+[^,]*,\D*\d+[^,]*\)\s*/g,""):""}))),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.zIndex="999999",n.classList.add("dnd-poly-drag-image"),n.classList.add("dnd-poly-icon"),this._dragImage=n,!this._dragImageOffset)if(this._config.dragImageOffset)this._dragImageOffset={x:this._config.dragImageOffset.x,y:this._config.dragImageOffset.y};else if(this._config.dragImageCenterOnTouch){const t=getComputedStyle(e);this._dragImageOffset={x:0-parseInt(t.marginLeft,10),y:0-parseInt(t.marginTop,10)}}else{const t=e.getBoundingClientRect(),n=getComputedStyle(e);this._dragImageOffset={x:t.left-this._initialTouch.clientX-parseInt(n.marginLeft,10)+t.width/2,y:t.top-this._initialTouch.clientY-parseInt(n.marginTop,10)+t.height/2}}return m(this._dragImage,this._dragImagePageCoordinates,this._dragImageTransforms,this._dragImageOffset,this._config.dragImageCenterOnTouch),document.body.appendChild(this._dragImage),this._iterationIntervalId=window.setInterval((function(){t._iterationLock?console.log("dnd-poly: iteration skipped because previous iteration hast not yet finished."):(t._iterationLock=!0,t._dragAndDropProcessModelIteration(),t._iterationLock=!1)}),this._config.iterationInterval),!0},t.prototype._cleanup=function(){console.log("dnd-poly: cleanup"),this._iterationIntervalId&&(clearInterval(this._iterationIntervalId),this._iterationIntervalId=null),u("touchmove",this._touchMoveHandler),u("touchend",this._touchEndOrCancelHandler),u("touchcancel",this._touchEndOrCancelHandler),this._dragImage&&(this._dragImage.parentNode.removeChild(this._dragImage),this._dragImage=null),this._dragOperationEndedCb(this._config,this._lastTouchEvent,this._dragOperationState)},t.prototype._onTouchMove=function(t){const e=this;if(!1!==h(t,this._initialTouch.identifier)){if(this._lastTouchEvent=t,0===this._dragOperationState){let e=void 0;if(this._config.dragStartConditionOverride)try{e=this._config.dragStartConditionOverride(t)}catch(t){console.error("dnd-poly: error in dragStartConditionOverride hook: "+t),e=!1}else e=1===t.touches.length;return e?void(!0===this._setup()&&(this._initialEvent.preventDefault(),t.preventDefault())):void this._cleanup()}if(console.log("dnd-poly: moving draggable.."),t.preventDefault(),f("client",t,this._currentHotspotCoordinates),f("page",t,this._dragImagePageCoordinates),this._config.dragImageTranslateOverride)try{let n=!1;if(this._config.dragImageTranslateOverride(t,{x:this._currentHotspotCoordinates.x,y:this._currentHotspotCoordinates.y},this._immediateUserSelection,(function(t,o){e._dragImage&&(n=!0,e._currentHotspotCoordinates.x+=t,e._currentHotspotCoordinates.y+=o,e._dragImagePageCoordinates.x+=t,e._dragImagePageCoordinates.y+=o,m(e._dragImage,e._dragImagePageCoordinates,e._dragImageTransforms,e._dragImageOffset,e._config.dragImageCenterOnTouch))})),n)return}catch(t){console.log("dnd-poly: error in dragImageTranslateOverride hook: "+t)}m(this._dragImage,this._dragImagePageCoordinates,this._dragImageTransforms,this._dragImageOffset,this._config.dragImageCenterOnTouch)}},t.prototype._onTouchEndOrCancel=function(t){if(!1!==h(t,this._initialTouch.identifier)){if(this._config.dragImageTranslateOverride)try{this._config.dragImageTranslateOverride(void 0,void 0,void 0,(function(){}))}catch(t){console.log("dnd-poly: error in dragImageTranslateOverride hook: "+t)}0!==this._dragOperationState?(t.preventDefault(),this._dragOperationState="touchcancel"===t.type?3:2):this._cleanup()}},t.prototype._dragAndDropProcessModelIteration=function(){const t=this,e=this._currentDragOperation;this._dragDataStore.mode=3,this._dataTransfer.dropEffect=s[0];const n=b("drag",this._sourceNode,this._lastTouchEvent,this._dragDataStore,this._dataTransfer);if(n&&(console.log("dnd-poly: drag event cancelled."),this._currentDragOperation=s[0]),n||2===this._dragOperationState||3===this._dragOperationState)return this._dragOperationEnded(this._dragOperationState)?void function(t,e,n,o){const r=getComputedStyle(t);if("hidden"===r.visibility||"none"===r.display)return console.log("dnd-poly: source node is not visible. skipping snapback transition."),void o();e.classList.add("dnd-poly-snapback");const i=getComputedStyle(e),s=parseFloat(i.transitionDuration);if(isNaN(s)||0===s)return console.log("dnd-poly: no transition used - skipping snapback"),void o();console.log("dnd-poly: starting dragimage snap back");const a=t.getBoundingClientRect(),c={x:a.left,y:a.top};c.x+=document.body.scrollLeft||document.documentElement.scrollLeft,c.y+=document.body.scrollTop||document.documentElement.scrollTop,c.x-=parseInt(r.marginLeft,10),c.y-=parseInt(r.marginTop,10);const l=parseFloat(i.transitionDelay),u=Math.round(1e3*(s+l));m(e,c,n,void 0,!1),setTimeout(o,u)}(this._sourceNode,this._dragImage,this._dragImageTransforms,(function(){t._finishDragOperation()})):void this._finishDragOperation();const o=this._config.elementFromPoint(this._currentHotspotCoordinates.x,this._currentHotspotCoordinates.y);console.log("dnd-poly: new immediate user selection is: "+o);const r=this._currentDropTarget;o!==this._immediateUserSelection&&o!==this._currentDropTarget&&(this._immediateUserSelection=o,null!==this._currentDropTarget&&(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=s[0],b("dragexit",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1)),null===this._immediateUserSelection?(this._currentDropTarget=this._immediateUserSelection,console.log("dnd-poly: current drop target changed to null")):(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=v(this._dragDataStore.effectAllowed,this._sourceNode),b("dragenter",this._immediateUserSelection,this._lastTouchEvent,this._dragDataStore,this._dataTransfer)?(console.log("dnd-poly: dragenter default prevented"),this._currentDropTarget=this._immediateUserSelection,this._currentDragOperation=y(this._dataTransfer.effectAllowed,this._dataTransfer.dropEffect)):this._immediateUserSelection!==document.body&&(this._currentDropTarget=document.body))),r!==this._currentDropTarget&&c(r)&&(console.log("dnd-poly: current drop target changed."),this._dragDataStore.mode=3,this._dataTransfer.dropEffect=s[0],b("dragleave",r,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1,this._currentDropTarget)),c(this._currentDropTarget)&&(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=v(this._dragDataStore.effectAllowed,this._sourceNode),!1===b("dragover",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer)?(console.log("dnd-poly: dragover not prevented on possible drop-target."),this._currentDragOperation=s[0]):(console.log("dnd-poly: dragover prevented."),this._currentDragOperation=y(this._dataTransfer.effectAllowed,this._dataTransfer.dropEffect))),console.log("dnd-poly: d'n'd iteration ended. current drag operation: "+this._currentDragOperation),e!==this._currentDragOperation&&this._dragImage.classList.remove("dnd-poly-"+e);const i="dnd-poly-"+this._currentDragOperation;this._dragImage.classList.add(i)},t.prototype._dragOperationEnded=function(t){console.log("dnd-poly: drag operation end detected with "+this._currentDragOperation);const e=this._currentDragOperation===s[0]||null===this._currentDropTarget||3===t;return e?c(this._currentDropTarget)&&(this._dragDataStore.mode=3,this._dataTransfer.dropEffect=s[0],b("dragleave",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1)):c(this._currentDropTarget)&&(this._dragDataStore.mode=1,this._dataTransfer.dropEffect=this._currentDragOperation,!0===b("drop",this._currentDropTarget,this._lastTouchEvent,this._dragDataStore,this._dataTransfer)?this._currentDragOperation=this._dataTransfer.dropEffect:this._currentDragOperation=s[0]),e},t.prototype._finishDragOperation=function(){console.log("dnd-poly: dragimage snap back transition ended"),this._dragDataStore.mode=3,this._dataTransfer.dropEffect=this._currentDragOperation,b("dragend",this._sourceNode,this._lastTouchEvent,this._dragDataStore,this._dataTransfer,!1),this._dragOperationState=2,this._cleanup()},t}(),x={iterationInterval:150,tryFindDraggableTarget:function(t){let e=t.target;do{if(!1!==e.draggable){if(!0===e.draggable)return e;if(e.getAttribute&&"true"===e.getAttribute("draggable"))return e}}while((e=e.parentNode)&&e!==document.body)},dragImageSetup:function(t){const e=t.cloneNode(!0);return function t(e,n){if(1===e.nodeType){const t=getComputedStyle(e);for(let e=0;et.toString()).join("\n");return function(e){return function(t,e,n){const o=function(t){const e=document.createElement("div");return e.innerHTML=t,Array.prototype.slice.call(e.children)[0]}(t);!function(t){if(t.content)return;let e;for(t.content=document.createDocumentFragment();e=t.firstChild;)Node.prototype.appendChild.call(t.content,e)}(o),e&&(o.innerHTML="")+o.innerHTML),o.innerHTML='')+o.innerHTML;for(let t of Object.getOwnPropertyNames(n.prototype)){let e=Object.getOwnPropertyDescriptor(n.prototype,t);if(e&&e.set){let o=e.set;e.set=function(e){this.hasAttribute(t)&&this.getAttribute(t)===e?(this._initializing||this._initialized)&&o.call(this,e):this.setAttribute(t,e)},Object.defineProperty(n.prototype,t,e)}}let r=o.getAttribute("id");console.log("Registered ".concat(r)),window.customElements.define(r,class extends n{attributeChangedCallback(t,e,n){null===n&&(n="null"),"_"!==t[0]&&e!=n&&(this[t]=n)}connectedCallback(){if(!this._initialized){for(this._initializing=!0,this._old_children=[];this.hasChildNodes();)1===this.lastChild.nodeType&&this._old_children.push(this.lastChild),this.removeChild(this.lastChild);this._old_children=this._old_children.reverse();var t=document.importNode(o.content,!0);this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(t),super.connectedCallback&&super.connectedCallback();for(let t of Object.getOwnPropertyNames(n.prototype))"connectedCallback"!==t&&this.hasAttribute(t)&&"_"!==t[0]&&(this[t]=this.getAttribute(t));this._initializing=!1,this._initialized=!0}}static get observedAttributes(){return Object.getOwnPropertyNames(n.prototype)}})}(t,{toString:()=>n},e)}}function r(t){return function(e,n,o){const r=o.value;return o.set=function(e){let o=this.getAttribute(n);try{null!=e&&""!==e||(e=t()),"string"!=typeof e&&(e=JSON.stringify(e)),e!==o&&(o=e),o=JSON.parse(o)}catch(r){console.warn('Invalid value for attribute "'.concat(n,'": ').concat(e)),o=t()}r.call(this,o)},o.get=function(){return this.hasAttribute(n)?JSON.parse(this.getAttribute(n)):t()},delete o.value,delete o.writable,o}}n.r(e),n(6),n(4),n(22),n(23),n(10),n(11),n(7);const i=r(()=>({})),s=r(()=>[]);var a=n(2),c=n(12),l=n.n(c);class u{constructor(){this.edit=!1,this.column_name=void 0,this.computation=void 0,this.input_columns=[],this.swap_target=!1,this.name_edited=!1,this.func_name=""}is_valid(){const t=l()(this);return!t.includes(null)&&!t.includes(void 0)&&!t.includes("")&&this.input_columns.length===this.computation.num_params}}const d=Symbol("formatter");class p{constructor(t,e,n,o,r,i,s=1){this.category=i,this.name=t,this[d]=e,this.input_type=n,this.return_type=o,this.func=r.toString(),this.num_params=s}}var h=n(13),f=n.n(h),_=n(14),m=n.n(_);function g(t){if(0==this._active_columns.children.length)return 0;for(let e in this._active_columns.children){let n=this._active_columns.children[e];if(n.offsetTop+n.offsetHeight>t.offsetY+this._active_columns.scrollTop)return parseInt(e)}return this._active_columns.children.length}function v(){for(const t of this._active_columns.children)t.className=""}function b(t){let e=t.target.getRootNode().host,n=e;n="PERSPECTIVE-VIEWER"===n.tagName?t.target.parentElement:e.parentElement;let o=Array.prototype.slice.call(n.children).indexOf("PERSPECTIVE-ROW"===e.tagName?e:t.target),r=n.getAttribute("for");if(this.hasAttribute(r)){let t=JSON.parse(this.getAttribute(r));t.splice(o,1),0===t.length?this.removeAttribute(r):this.setAttribute(r,JSON.stringify(t))}}function y(t){t.preventDefault(),t.currentTarget.classList.remove("dropping"),this._drop_target_hover&&this._drop_target_hover.removeAttribute("drop-target");let e=t.dataTransfer.getData("text");if(!e)return;e=JSON.parse(e);let n=t.currentTarget.querySelector("ul").getAttribute("for")||t.currentTarget.getAttribute("id").replace("_","-"),o=JSON.parse(this.getAttribute(n)||"[]"),r=o.indexOf(e[0]);-1!==r&&o.splice(r,1);const i=n.indexOf("filter")>-1;if(i?this.setAttribute(n,JSON.stringify(o.concat([e]))):n.indexOf("sort")>-1?this.setAttribute(n,JSON.stringify(o.concat([[e[0]]]))):this.setAttribute(n,JSON.stringify(o.concat([e[0]]))),"pivots"===this._plugin.deselectMode&&this._get_visible_column_count()>1&&"sort"!==n&&!i){for(let t of this.shadowRoot.querySelectorAll("#active_columns perspective-row"))if(t.getAttribute("name")===e[0]){this._active_columns.removeChild(t);break}this._update_column_view()}this._debounce_update()}function w(t){let e=t.target.parentElement.parentElement;v.bind(this)(),this._get_visible_column_count()>1&&"move"!==t.dataTransfer.dropEffect&&(this._active_columns.removeChild(e),this._update_column_view()),this._active_columns.classList.remove("dropping")}function x(t){let e=t.relatedTarget;for(;e&&e!==this._active_columns;)e=e.parentElement;null===e&&(this._active_columns.classList.remove("dropping"),this._drop_target_hover.parentElement===this._active_columns&&this._active_columns.removeChild(this._drop_target_hover),-1!==this._original_index&&this._active_columns.insertBefore(this._drop_target_hover,this._active_columns.children[this._original_index]),this._drop_target_hover.removeAttribute("drop-target"))}function E(t){t.preventDefault(),t.dataTransfer.dropEffect="move","dropping"!==t.currentTarget.className&&t.currentTarget.classList.add("dropping"),this._drop_target_hover.hasAttribute("drop-target")||this._drop_target_hover.toggleAttribute("drop-target",!0);let e=g.call(this,t);Array.prototype.slice.call(this._active_columns.children).indexOf(this._drop_target_hover)","\n "]);return A=function(){return t},t}function k(){const t=j(["\n \n "]);return k=function(){return t},t}function j(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function L(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Object.setPrototypeOf(L.prototype,HTMLElement.prototype),Object.setPrototypeOf(L,HTMLElement);const D={hour_of_day:new p("Hour of Day",t=>"hour_of_day(".concat(t,")"),"datetime","integer",(function(t){return new Date(t).getHours()}),["Time"]),day_of_week:new p("Day of Week",t=>"day_of_week(".concat(t,")"),"datetime","string",(function(t){return["1 Sunday","2 Monday","3 Tuesday","4 Wednesday","5 Thursday","6 Friday","7 Saturday"][new Date(t).getDay()]}),["Time"]),month_of_year:new p("Month of Year",t=>"month_of_year(".concat(t,")"),"datetime","string",(function(t){return["01 January","02 February","03 March","04 April","05 May","06 June","07 July","08 August","09 September","10 October","11 November","12 December"][new Date(t).getMonth()]}),["Time"]),second_bucket:new p("Bucket (s)",t=>"second_bucket(".concat(t,")"),"datetime","datetime",(function(t){return new Date(1e3*Math.floor(new Date(t).getTime()/1e3))}),["Time"]),minute_bucket:new p("Bucket (m)",t=>"minute_bucket(".concat(t,")"),"datetime","datetime",(function(t){let e=new Date(t);return e.setSeconds(0),e.setMilliseconds(0),e}),["Time"]),hour_bucket:new p("Bueckt (h)",t=>"hour_bucket(".concat(t,")"),"datetime","datetime",(function(t){let e=new Date(t);return e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}),["Time"]),day_bucket:new p("Bucket (D)",t=>"day_bucket(".concat(t,")"),"datetime","date",(function(t){let e=new Date(t);return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e}),["Time"]),week_bucket:new p("Bucket (W)",t=>"week_bucket(".concat(t,")"),"datetime","date",(function(t){let e=new Date(t),n=e.getDay(),o=e.getDate()-n+(0==n?-6:1);return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setDate(o),e}),["Time"]),month_bucket:new p("Bucket (M)",t=>"month_bucket(".concat(t,")"),"datetime","date",(function(t){let e=new Date(t);return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setDate(1),e}),["Time"]),year_bucket:new p("Bucket (Y)",t=>"year_bucket(".concat(t,")"),"datetime","date",(function(t){let e=new Date(t);return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setDate(1),e.setMonth(1),e}),["Time"]),"10_bucket":new p("Bucket (10)",t=>"bin10(".concat(t,")"),"float","float",t=>10*Math.floor(t/10),["Math"]),"100_bucket":new p("Bucket (100)",t=>"bin100(".concat(t,")"),"float","float",t=>100*Math.floor(t/100),["Math"]),"1000_bucket":new p("Bucket (1000)",t=>"bin1000(".concat(t,")"),"float","float",t=>1e3*Math.floor(t/1e3),["Math"]),"0.1_bucket":new p("Bucket (1/10)",t=>"bin10th(".concat(t,")"),"float","float",t=>.1*Math.floor(t/.1),["Math"]),"0.01_bucket":new p("Bucket (1/100)",t=>"bin100th(".concat(t,")"),"float","float",t=>.01*Math.floor(t/.01),["Math"]),"0.001_bucket":new p("Bucket (1/1000)",t=>"bin1000th(".concat(t,")"),"float","float",t=>.001*Math.floor(t/.001),["Math"]),add:new p("+",(t,e)=>"".concat(t," + ").concat(e),"float","float",(t,e)=>t+e,["Math"],2),subtract:new p("-",(t,e)=>"".concat(t," - ").concat(e),"float","float",(t,e)=>t-e,["Math"],2),multiply:new p("*",(t,e)=>"".concat(t," * ").concat(e),"float","float",(t,e)=>t*e,["Math"],2),divide:new p("/",(t,e)=>"".concat(t," / ").concat(e),"float","float",(t,e)=>t/e,["Math"],2),percent_a_of_b:new p("%",(t,e)=>"".concat(t," %% ").concat(e),"float","float",(t,e)=>t/e*100,["Math"],2),uppercase:new p("Uppercase",t=>"uppercase(".concat(t,")"),"string","string",t=>t.toUpperCase(),["Text"]),lowercase:new p("Lowercase",t=>"lowercase(".concat(t,")"),"string","string",t=>t.toLowerCase(),["Text"]),length:new p("length",t=>"length(".concat(t,")"),"string","integer",t=>t.length,["Text"]),concat_space:new p("concat_space",t=>"concat_space(".concat(t,")"),"string","string",(t,e)=>t+" "+e,["Text"],2),concat_comma:new p("concat_comma",t=>"concat_comma(".concat(t,")"),"string","string",(t,e)=>t+", "+e,["Text"],2)};function M(t,e,n){let o=n;const r=e.category;for(const t of r)o=o[t]=o[t]||{};o[t]=e}function I(){const t={};for(const e in D)M(e,D[e],t);return t}let P=I();o(f.a,m.a)(class extends L{constructor(){super(),this.state=new u,this.column_names=[],this.type_markers={float:"123",integer:"123",string:"abc",boolean:"t/f",datetime:"mdy",date:"mdy"}}get computations(){return D}connectedCallback(){this._register_ids(),Object(C.render)(Array.from(this._selector_template()),this._computation_selector),this._register_callbacks(),this._update_computation(null),this._register_inputs()}_register_computations(){P=I(),Object(C.render)(Array.from(this._selector_template()),this._computation_selector)}*_selector_template(t=P){for(const[e,n]of Object.entries(t))n.name?yield Object(C.html)(k(),e,n.name):yield Object(C.html)(A(),e,Array.from(this._selector_template(n)))}_register_inputs(){this._clear_error_messages(),this._disable_save_button(),this._input_columns.innerHTML="";const t=this.state.computation,e=t.input_type;this.state.input_columns=[],this.state.swap_target=!1;for(let n=0;n\n \n Param ').concat(n+1,'\n
\n ');for(let t of this._input_columns.children)t.addEventListener("drop",this._drop_column.bind(this)),t.addEventListener("dragstart",this._drag_column.bind(this)),t.addEventListener("dragend",this._remove_column.bind(this)),t.addEventListener("dragover",this._hover_column.bind(this)),t.addEventListener("dragleave",this._pass_column.bind(this));this._clear_column_name()}_parse_data_transfer(t){const e=JSON.parse(t);if(e)return{column_name:e[0],column_type:e[3]}}_drag_column(t){this.state.computation.num_params>1&&(this.state.swap_target=t.currentTarget)}_hover_column(t){t.preventDefault(),t.dataTransfer.dropEffect="move";const e=t.currentTarget,n=e.querySelector(".psp-cc-computation__drop-target-hover");"dropping"!==e.className&&e.classList.add("dropping"),n&&!n.hasAttribute("drop-target")&&n.toggleAttribute("drop-target","true"),2===e.children.length&&e.parentNode.insertBefore(n,e.nextSibling)}_drop_column(t){const e=t.currentTarget;t.preventDefault(),e.classList.remove("dropping");const n=void 0!==this.state.swap_target&&e.innerHTML.indexOf("perspective-row")>-1,o=this._parse_data_transfer(t.dataTransfer.getData("text"));if(o){if(n){const n=e.children[0],o=n.getAttribute("name"),r=n.getAttribute("type");t.swapTarget=this.state.swap_target,this._set_input_column(t,o,r),this.state.swap_target=!1,delete t.swapTarget}this._set_input_column(t,o.column_name,o.column_type)}}deselect_column(t){this.state.input_columns=this.state.input_columns.map(e=>e&&e.name===t?void 0:e),this._apply_state(this.state.input_columns,this.state.computation)}_remove_column(t){t.currentTarget.classList.remove("dropping")}_pass_column(t){const e=t.currentTarget,n=e.getBoundingClientRect(),o=t.pageX>=n.left&&t.pageX<=n.right-2,r=t.pageY>=n.top&&t.pageY<=n.bottom-2;if(!(o&&r||null===e||"SPAN"===e.nodeName)){e.classList.remove("dropping");const t=e.querySelector(".psp-cc-computation__drop-target-hover");t&&t.removeAttribute("drop-target")}}_apply_state(t,e,n){this._update_computation(null,this.state.func_name),this.state.input_columns=t;const o=this._input_columns.children;for(let t=0;t0){let t=[];for(let e of this.state.input_columns)t.push(e.name);this.state.computation[d]?this._column_name_input.innerText=this.state.computation[d].apply(void 0,t):this._column_name_input.innerText="".concat(this.state.computation.name,"(").concat(t.join(", "),")")}else this._column_name_input.innerText="";this._set_column_name()}}_clear_column_name(){this._column_name_input.innerText="",this.state.name_edited=!1,this._set_column_name()}_set_input_column(t,e,n){const o=this.state.computation,r=o.input_type,i=this.state.input_columns;let s;s=t.swapTarget?t.swapTarget:t.currentTarget;const a=Number.parseInt(s.getAttribute("data-index"));if("float"!==r&&"datetime"!==r&&n!==r||"float"===r&&"float"!==n&&"integer"!==n||"datetime"===r&&"datetime"!==n&&"date"!==n)return this._register_inputs(),void s.classList.remove("dropped");s.classList.add("dropped");const c=s.querySelector(".psp-cc-computation__drop-target-hover");c&&c.removeAttribute("drop-target"),s.innerHTML="";const l={name:e,type:n};i[a]=l,this.state.input_columns=i,i.filter(t=>t).length===o.num_params&&this._auto_column_name(),this.dispatchEvent(new CustomEvent("perspective-computed-column-update",{detail:{target:s,column:l}})),this.state.is_valid()&&this._enable_save_button()}_update_computation(t,e){const n=this._computation_selector;e?null==t&&(n.value=e):e=n[n.selectedIndex].value;const o=Object.assign({},D[e]);if(void 0===o)throw"Undefined computation could not be set.";const r=o.num_params,i=o.input_type,s=o.return_type;let a=!0;this.state.computation&&(a=i!==this.state.computation.input_type||r!==this.state.computation.num_params),this._computation_type.innerHTML='').concat(this.type_markers[s],""),this.state.computation=o,this.state.func_name=e,a||null===t?(this._register_inputs(),this._clear_column_name()):this._auto_column_name()}_set_error_message(t,e){e&&(e.innerText=t,e.style.display="block")}_clear_error_messages(){this._column_name_error.innerText="",this._column_name_error.style.display="none"}_disable_save_button(){this._save_button.toggleAttribute("disabled",!0)}_enable_save_button(){this._save_button.removeAttribute("disabled")}_save_computed_column(){if(this.state.is_valid()){const t=this.state;if(this.column_names.includes(this.state.column_name))return void this._set_error_message("Column names must be unique.",this._column_name_error);this._clear_error_messages();const e=new CustomEvent("perspective-computed-column-save",{detail:{name:t.column_name,inputs:t.input_columns.map(t=>t.name),func:t.func_name}});this.dispatchEvent(e),this.column_names.push(t.column_name)}}_close_computed_column(){this.style.display="none",this._side_panel_actions.style.display="flex",this.classList.remove("edit"),this._column_name_input.innerText="",this._input_columns.innerHTML="";for(let t of this._input_columns.children)t.classList.remove("dropped");this.state=new u,this._update_computation()}_register_ids(){this._side_panel_actions=this.parentElement.querySelector("#side_panel__actions"),this._close_button=this.shadowRoot.querySelector("#psp-cc__close"),this._column_name_input=this.shadowRoot.querySelector("#psp-cc-name"),this._column_name_error=this.shadowRoot.querySelector("#psp-cc__error--name"),this._computation_selector=this.shadowRoot.querySelector("#psp-cc-computation__select"),this._computation_type=this.shadowRoot.querySelector("#psp-cc-computation__type"),this._input_columns=this.shadowRoot.querySelector("#psp-cc-computation-inputs"),this._save_button=this.shadowRoot.querySelector("#psp-cc-button-save")}_register_callbacks(){this._close_button.addEventListener("click",this._close_computed_column.bind(this)),this._computation_selector.addEventListener("change",this._update_computation.bind(this)),this._column_name_input.addEventListener("dragover",T.bind(this)),this._column_name_input.addEventListener("keyup",t=>{this.state.name_edited=this._column_name_input.innerText&&this._column_name_input.innerText.length>0,this._set_column_name(t)}),this._save_button.addEventListener("click",this._save_computed_column.bind(this))}}),n(25),n(26);var R=n(8),z=n.n(R),H=n(9),F=n.n(H),q=n(15),V=n.n(q),B=n(3),U=n.n(B),G=n(1),W=n(16),J=n.n(W),Z=n(17),$=n.n(Z);function X(){const t=Q(["\n "," ","\n "]);return X=function(){return t},t}function Y(){const t=Q(['\n \n ',"\n \n "]);return Y=function(){return t},t}function K(){const t=Q(['\n \n "]);return K=function(){return t},t}function Q(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function tt(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Object.setPrototypeOf(tt.prototype,HTMLElement.prototype),Object.setPrototypeOf(tt,HTMLElement);const et=document.createElement("span");function nt(t,e=0){et.innerHTML=t,document.body.appendChild(et);const n="".concat(Math.max(e,et.offsetWidth)+20,"px");return document.body.removeChild(et),n}et.style.visibility="hidden",et.style.fontFamily="monospace",et.style.fontSize="12px",et.style.position="absolute",o(J.a,{toString:()=>$.a+"\n"+V.a})(class extends tt{set name(t){this.shadowRoot.querySelector("#name").innerHTML=this.getAttribute("name")}_option_template(t,e){return Object(C.html)(K(),t,e,e||t)}_select_template(t,e){const n=U.a[t][e]||[],o=Object(C.html)(Y(),this._weights.map(t=>this._option_template(JSON.stringify(["weighted mean",t]),t)));return Object(C.html)(X(),n.map(t=>this._option_template(t)),"integer"===e||"float"===e?o:C.nothing)}set_weights(t){this._weights=t}set type(t){const e=this.shadowRoot.querySelector("#name"),n=this.getAttribute("type");if(!n)return;const o=Object(G.get_type_config)(n);o.type&&e.classList.add(o.type),e.classList.add(n);const r=this.shadowRoot.querySelector("#column_aggregate"),i=this.shadowRoot.querySelector("#filter_operator");Object(C.render)(this._select_template("TYPE_AGGREGATES",o.type||n),r),Object(C.render)(this._select_template("TYPE_FILTERS",o.type||n),i),this.hasAttribute("aggregate")?this.aggregate=this.getAttribute("aggregate"):this.aggregate=o.aggregate,this.hasAttribute("filter")&&(this.filter=this.getAttribute("filter"));const s=this.shadowRoot.querySelector("#filter_operand");this._callback=t=>this._update_filter(t),s.addEventListener("keyup",this._callback.bind(this))}choices(t){const e=this.shadowRoot.querySelector("#filter_operand"),n=this.shadowRoot.querySelector("#filter_operator"),o=new F.a(e,{label:this.getAttribute("name"),list:t,minChars:0,autoFirst:!0,filter:function(t,e){return F.a.FILTER_CONTAINS(t,e.match(/[^,]*$/)[0])},item:function(t,e){return F.a.ITEM(t,e.match(/[^,]*$/)[0])},replace:function(t){const e=this.input.value.match(/^.+,\s*|/)[0];"in"===n.value||"not in"===n.value?this.input.value=e+t+", ":this.input.value=e+t}});""===e.value&&o.evaluate(),e.focus(),this._filter_operand.addEventListener("focus",()=>{0===e.value.trim().length&&o.evaluate()}),e.addEventListener("awesomplete-selectcomplete",this._callback)}set filter(t){const e=this.shadowRoot.querySelector("#filter_operator"),n=JSON.parse(this.getAttribute("filter"));e.value!==n.operator&&(e.value=n.operator||Object(G.get_type_config)(this.getAttribute("type")).filter_operator),e.style.width=nt(e.value);const o=this.shadowRoot.querySelector("#filter_operand"),r=n.operand?n.operand.toString():"";this._initialized||(o.value=r),e.value===U.a.FILTER_OPERATORS.isNull||e.value===U.a.FILTER_OPERATORS.isNotNull?o.style.display="none":(o.style.display="inline-block",o.style.width=nt(r,30))}set aggregate(t){const e=this.shadowRoot.querySelector("#column_aggregate"),n=this.getAttribute("aggregate");if(e.value!==n&&this.hasAttribute("type")){const t=this.getAttribute("type");e.value=n||Object(G.get_type_config)(t).aggregate}this._blur_agg_dropdown()}set computed_column(t){}_get_computed_data(){const t=JSON.parse(this.getAttribute("computed_column"));return{column_name:t.column_name,input_columns:t.input_columns,input_type:t.input_type,computation:t.computation,type:t.type}}_update_filter(t){const e=this.shadowRoot.querySelector("#filter_operand"),n=this.shadowRoot.querySelector("#filter_operator");let o=e.value;switch(this.getAttribute("type")){case"float":o=parseFloat(o);break;case"integer":o=parseInt(o);break;case"boolean":o=o.toLowerCase().indexOf("true")>-1}n.value!==U.a.FILTER_OPERATORS.isIn&&n.value!==U.a.FILTER_OPERATORS.isNotIn||(o=o.split(",").map(t=>t.trim())),this.setAttribute("filter",JSON.stringify({operator:n.value,operand:o})),this.dispatchEvent(new CustomEvent("filter-selected",{detail:t}))}_set_data_transfer(t){if(this.hasAttribute("filter")){const{operator:e,operand:n}=JSON.parse(this.getAttribute("filter"));t.dataTransfer.setData("text",JSON.stringify([this.getAttribute("name"),e,n,this.getAttribute("type"),this.getAttribute("aggregate")]))}else t.dataTransfer.setData("text",JSON.stringify([this.getAttribute("name"),Object(G.get_type_config)(this.getAttribute("type")).filter_operator,void 0,this.getAttribute("type"),this.getAttribute("aggregate")]));this.dispatchEvent(new CustomEvent("row-drag"))}_register_ids(){this._li=this.shadowRoot.querySelector(".row_draggable"),this._visible=this.shadowRoot.querySelector(".is_visible"),this._row_close=this.shadowRoot.querySelector("#row_close"),this._agg_dropdown=this.shadowRoot.querySelector("#column_aggregate"),this._sort_order=this.shadowRoot.querySelector("#sort_order"),this._filter_operand=this.shadowRoot.querySelector("#filter_operand"),this._filter_operator=this.shadowRoot.querySelector("#filter_operator"),this._edit_computed_column_button=this.shadowRoot.querySelector("#row_edit"),this._column_aggregate_category=this.shadowRoot.querySelector("#column_aggregate_category")}_blur_agg_dropdown(){if(this._agg_dropdown.blur(),"["===this._agg_dropdown.value[0])for(const t of this._agg_dropdown.querySelectorAll("optgroup option")){const e=t.getAttribute("data-desc");t.innerHTML="mean by ".concat(e)}}_focus_agg_dropdown(){for(const t of this._agg_dropdown.querySelectorAll("optgroup option")){const e=t.getAttribute("data-desc");t.innerHTML="by ".concat(e)}}_register_callbacks(){this._li.addEventListener("dragstart",this._set_data_transfer.bind(this)),this._li.addEventListener("dragend",()=>{this.dispatchEvent(new CustomEvent("row-dragend"))}),this._visible.addEventListener("mousedown",t=>this.dispatchEvent(new CustomEvent("visibility-clicked",{detail:t}))),this._row_close.addEventListener("mousedown",t=>this.dispatchEvent(new CustomEvent("close-clicked",{detail:t}))),this._agg_dropdown.addEventListener("focus",this._focus_agg_dropdown.bind(this)),this._agg_dropdown.addEventListener("change",t=>{this._blur_agg_dropdown();const e=this._agg_dropdown.value;this.setAttribute("aggregate",e),this.dispatchEvent(new CustomEvent("aggregate-selected",{detail:t}))}),this._sort_order.addEventListener("click",t=>{this.dispatchEvent(new CustomEvent("sort-order",{detail:t}))});const t=z()(t=>this._update_filter(t),50);this._filter_operator.addEventListener("change",()=>{this._filter_operand.focus(),this._filter_operator.style.width=nt(this._filter_operator.value),this.shadowRoot.querySelector("#filter_operand").style.width=nt(""+this._filter_operand.value,30),t()}),this._edit_computed_column_button.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("perspective-computed-column-edit",{bubbles:!0,detail:this._get_computed_data()}))})}connectedCallback(){this._register_ids(),this._register_callbacks()}});var ot=n(18),rt=n.n(ot),it=n(19),st=n.n(it),at=n(20),ct=n.n(at),lt=(n(27),n(28),n(21)),ut=n.n(lt);class dt{constructor(t,e=!1){this._on_cancel=t,this._cancelled=!1,this.initial=e}cancel(){!this._cancelled&&this._on_cancel&&(this._on_cancel(),this._on_cancel=void 0),this._cancelled=!0}get cancelled(){return this._cancelled}}function pt(){return Reflect.construct(HTMLElement,[],this.__proto__.constructor)}Object.setPrototypeOf(pt.prototype,HTMLElement.prototype),Object.setPrototypeOf(pt,HTMLElement);class ht extends pt{get _plugin(){let t=a.b.getInstance(),e=this.getAttribute("plugin");return e||(e=Object.keys(t)[0]),this.setAttribute("plugin",e),t[e]||t[Object.keys(t)[0]]}_get_view_dom_columns(t,e){t=t||"#active_columns perspective-row";let n=Array.prototype.slice.call(this.shadowRoot.querySelectorAll(t));return e?n.map(e):n}_get_view_columns({active:t=!0}={}){let e;return e=t?"#active_columns perspective-row":"#inactive_columns perspective-row",this._get_view_dom_columns(e,t=>t.getAttribute("name"))}_get_view_aggregates(t){return t=t||"#active_columns perspective-row",this._get_view_dom_columns(t,t=>{let e=t.getAttribute("aggregate");if("["===e[0])try{e=JSON.parse(e)}catch(t){console.error(t)}return{op:e,column:t.getAttribute("name")}})}_get_view_row_pivots(){return this._get_view_dom_columns("#row_pivots perspective-row",t=>t.getAttribute("name"))}_get_view_column_pivots(){return this._get_view_dom_columns("#column_pivots perspective-row",t=>t.getAttribute("name"))}_get_view_filter_nodes(){return this._get_view_dom_columns("#filters perspective-row")}_get_view_filters(){return this._get_view_dom_columns("#filters perspective-row",t=>{let{operator:e,operand:n}=JSON.parse(t.getAttribute("filter"));return[t.getAttribute("name"),e,n]})}_get_view_sorts(){return this._get_view_dom_columns("#sort perspective-row",t=>{let e=t.getAttribute("sort-order")||"asc";return[t.getAttribute("name"),e]})}_get_visible_column_count(){return this._get_view_dom_columns().length}get_aggregate_attribute(){const t=JSON.parse(this.getAttribute("aggregates"))||{},e=new Set,n=Object.keys(t).map(n=>(e.add(n),{column:n,op:t[n]}));if(this._aggregate_defaults)for(const t of Object.keys(this._aggregate_defaults))e.has(t)||n.push({column:t,op:this._aggregate_defaults[t]});return n}}function ft(){const t=bt(["Rendering "," of points."]);return ft=function(){return t},t}function _t(){const t=bt(["Rendering "," of columns."]);return _t=function(){return t},t}function mt(){const t=bt(["Rendering "," of columns and "," of points."]);return mt=function(){return t},t}function gt(){const t=bt(['\n ',"\n "]);return gt=function(){return t},t}function vt(){const t=bt(['\n  ',"% \n "]);return vt=function(){return t},t}function bt(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function yt(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}let wt={integer:2,string:0,float:3,boolean:4,datetime:1,date:1};const xt=t=>(e,n)=>{const o=wt[t[e]],r=wt[t[n]];let i=0;return i=o==r?e.toLowerCase(){if(t){const e=yt(t[0]),n=yt(t[1]),o=Math.floor(t[0]/t[1]*100);return Object(C.html)(vt(),e,n,o)}},St=t=>{if(""!==t)return Object(C.html)(gt(),t)},Nt=(t,...e)=>t.flatMap((t,n)=>[St(t),Et(e[n])]).filter(t=>t);class Ot extends ht{async _check_recreate_computed_columns(){const t=JSON.parse(this.getAttribute("computed-columns"));if(t.length>0){for(const e of t)await this._create_computed_column({detail:{column_name:e.name,input_columns:e.inputs.map(t=>({name:t})),computation:D[e.func]}});return this._debounce_update({ignore_size_check:!1}),!0}return!1}async _load_table(t,e=!1){this.shadowRoot.querySelector("#app").classList.add("hide_message");const n=this._set_updating();if(this._table&&!e&&this.removeAttribute("computed-columns"),this._clear_state(),this._table=t,this.hasAttribute("computed-columns")&&!e&&await this._check_recreate_computed_columns())return;const[o,r,i]=await Promise.all([t.columns(),t.schema(!0),t.computed_schema()]);this._clear_columns(),this._initial_col_order=o.slice(),this.hasAttribute("columns")||this.setAttribute("columns",JSON.stringify(this._initial_col_order)),o.sort(xt(r));const s=this.get_aggregate_attribute();Object.entries(i).forEach(([t,e])=>{s.find(e=>e.column===t)||s.push({column:t,op:e})});const a=o.concat(Object.keys(i)),c=function(t,e,n){const o=new Set,r=[];for(const n of t){const t=e[n.column],i=Object(G.get_type_config)(t);o.add(n.column),i.type||t?(""!==n.op&&-1!==U.a.TYPE_AGGREGATES[i.type||t].indexOf(n.op)||(n.op=i.aggregate),r.push(n)):console.warn('No column "'.concat(n.column,'" found (specified in aggregates attribute).'))}for(const t of n)o.has(t)||r.push({column:t,op:Object(G.get_type_config)(e[t]).aggregate});return r}(s,r,a);let l=JSON.parse(this.getAttribute("columns")).filter(t=>a.indexOf(t)>-1);0===l.length&&(l=this._initial_col_order),this._aggregate_defaults=function(t,e){const n={};for(const o of e)n[o]=Object(G.get_type_config)(t[o]).aggregate;return n}(r,a);for(const t of a){const e=c.find(e=>e.column===t).op,n=this._new_row(t,r[t],e,null,null,i[t]);this._inactive_columns.appendChild(n),l.includes(t)&&n.classList.add("active")}for(const t of l){const e=this._new_row(t,r[t]);this._active_columns.appendChild(e)}a.length===l.length?this._inactive_columns.parentElement.classList.add("collapse"):this._inactive_columns.parentElement.classList.remove("collapse"),this._show_column_container(),!0===await this._table.compute()&&this._show_side_panel_actions(),this.hasAttribute("filters")&&(this.filters=this.getAttribute("filters")),await this._debounce_update({force_update:!0}),n()}async get_maxes(){let t,e;const[n,o]=await Promise.all([this._view.schema(),this._view.num_columns()]),r=Object.keys(n||{}).length||1;if(void 0!==this._plugin.max_columns){const e=this._plugin.max_columns%r,n=this._plugin.max_columns+e;t=nt+e,0)/this.__render_times.length,t=Math.min(5e3,t)}return Math.max(0,t)}_view_on_update(t){this._debounced||(this._debounced=setTimeout(async()=>{this._debounced=void 0;const e=this._render_time();this._task&&!this._task.initial&&this._task.cancel();const n=this._task=new dt,o=this._plugin.update||this._plugin.create;try{if(t){const{max_cols:t,max_rows:e}=await this.get_maxes();n.cancelled||(await this._warn_render_size_exceeded(t,e),await o.call(this,this._datavis,this._view,n,t,e))}else await o.call(this,this._datavis,this._view,n);e(),n.cancel()}catch(t){console.error("Error rendering plugin.",t)}finally{this.dispatchEvent(new Event("perspective-view-update"))}},this._calculate_throttle_timeout()))}async _validate_filters(){const t=[];for(const e of this._get_view_filter_nodes()){const n=e.shadowRoot.getElementById("filter_operand"),o=e.shadowRoot.getElementById("row_exclamation"),{operator:r,operand:i}=JSON.parse(e.getAttribute("filter")),s=[e.getAttribute("name"),r,i];await this._table.is_valid_filter(s)?(t.push(s),e.title="",n.style.borderColor="",o.hidden=!0):(e.title="Invalid Filter",n.style.borderColor="red",o.hidden=!1)}return t}_is_config_changed(t){const e=this.getAttribute("plugin");return!(ut()(t,this._previous_config)&&e===this._previous_plugin_name||(this._previous_config=t,this._previous_plugin_name=e,0))}async _new_view({force_update:t=!1,ignore_size_check:e=!1,limit_points:n=!0}={}){if(!this._table)return;this._check_responsive_layout();const o=this._get_view_row_pivots(),r=this._get_view_column_pivots(),i=await this._validate_filters(),s=this._get_view_aggregates();if(0===s.length)return;const a=this._get_view_sorts();let c=s.map(t=>t.column),l={};for(const t of s)l[t.column]=t.op;for(const t of a){const e=t[0];if(-1===c.indexOf(e)&&!(r.indexOf(t)>-1||o.indexOf(t)>-1)){const t=this.get_aggregate_attribute(),{column:n,op:o}=t.reduce((t,n)=>n.column===e?n:t);l[n]=o}}const u={filter:i,row_pivots:o,column_pivots:r,aggregates:l,columns:c,sort:a};if(!this._is_config_changed(u)&&!e&&!t)return void(0===this._render_count&&this.removeAttribute("updating"));this._view&&(this._view.remove_update(this._view_updater),this._view.delete(),this._view=void 0);try{this._view=this._table.view(u),this._view_updater=()=>this._view_on_update(n),this._view.on_update(this._view_updater)}catch(t){throw this._view.delete(),t}const d=this._render_time();this._render_count=(this._render_count||0)+1,this._task&&this._task.cancel();const p=this._task=new dt(()=>this._render_count--,!0);try{const{max_cols:o,max_rows:r}=await this.get_maxes();e||await this._warn_render_size_exceeded(o,r),n?await this._plugin.create.call(this,this._datavis,this._view,p,o,r,t):await this._plugin.create.call(this,this._datavis,this._view,p,void 0,void 0,t)}catch(t){console.warn(t)}finally{this.__render_times||(this.__render_times=[],this.dispatchEvent(new Event("perspective-view-update"))),d(),p.cancel(),0===this._render_count&&(this.removeAttribute("updating"),this.dispatchEvent(new Event("perspective-update-complete")))}}_check_loaded_table(){if(this._table){const t=this._table;delete this._table,this._load_table(t)}}_render_time(){const t=performance.now();return()=>{this.__render_times.unshift(performance.now()-t),this.__render_times=this.__render_times.slice(0,5)}}_restyle_plugin(){if(this._plugin.styleElement){const t=this._task=new dt;this._plugin.styleElement.call(this,this._datavis,this._view,t)}}_clear_state(t=!0){this._task&&this._task.cancel();const e=[];if(this._view){const t=this._view;this._view=void 0,e.push(t.delete()),t.remove_update(this._view_updater),t.remove_delete()}if(this._table&&t){const t=this._table;this._table=void 0,t._owner_viewer&&t._owner_viewer===this&&e.push(t.delete())}return Promise.all(e)}_set_updating(){let t;return this.toggleAttribute("updating",!0),this._updating_promise=new Promise(e=>{t=e}),t}_register_debounce_instance(){const t=z()((t,e,n,o)=>{this._new_view({ignore_size_check:e,force_update:n,limit_points:o}).then(t)},0);this._debounce_update=async({force_update:e=!1,ignore_size_check:n=!1,limit_points:o=!0}={})=>{if(this._table){let r=this._set_updating();await new Promise(r=>t(r,n,e,o)),r()}}}_get_worker(){return this._table?this._table._worker:U.a.shared_worker()}}function Tt(){const t=function(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n \n "]);return Tt=function(){return t},t}const Ct=t=>{const e=[];for(name in t)e.push(Object(C.html)(Tt(),name,t[name].name||name));return e};class At extends Ot{_clear_columns(){this._inactive_columns.innerHTML="",this._active_columns.innerHTML=""}set_aggregate_attribute(t){let e=!1,n=t.reduce((t,n)=>(this._aggregate_defaults[n.column]!==n.op&&(t[n.column]=n.op,e=!0),t),{});e?this.setAttribute("aggregates",JSON.stringify(n)):this.removeAttribute("aggregates")}_get_type(t){let e=this._get_view_dom_columns("#inactive_columns perspective-row");if(e.length>0){const n=e.find(e=>e.getAttribute("name")===t);return n?n.getAttribute("type"):"integer"}return""}_set_row_type(t){const e=this._get_view_dom_columns("#inactive_columns perspective-row").filter(t=>"integer"===t.getAttribute("type")||"float"===t.getAttribute("type")).map(t=>t.getAttribute("name"));t.set_weights(e),t.setAttribute("type",this._get_type(t.getAttribute("name")))}_new_row(t,e,n,o,r,i){let s=document.createElement("perspective-row");if(e=e||this._get_type(t),!n){let o=this.get_aggregate_attribute();n=o&&(n=o.find(e=>e.column===t))?n.op:Object(G.get_type_config)(e).aggregate}if(o&&(s.setAttribute("filter",o),"string"===e)){const e=this._table.view({row_pivots:[t],aggregates:{}});e.to_json().then(t=>{s.choices(this._autocomplete_choices(t))}),e.delete()}r?s.setAttribute("sort-order",r):this._get_view_column_pivots().indexOf(t)>-1?s.setAttribute("sort-order","col asc"):s.setAttribute("sort-order","asc");const a=this._get_view_dom_columns("#inactive_columns perspective-row").filter(t=>"integer"===t.getAttribute("type")||"float"===t.getAttribute("type")).map(t=>t.getAttribute("name"));return s.set_weights(a),s.setAttribute("type",e),s.setAttribute("name",t),s.setAttribute("aggregate",Array.isArray(n)?JSON.stringify(n):n),s.addEventListener("visibility-clicked",this._column_visibility_clicked.bind(this)),s.addEventListener("aggregate-selected",this._column_aggregate_clicked.bind(this)),s.addEventListener("filter-selected",this._column_filter_clicked.bind(this)),s.addEventListener("close-clicked",t=>b.call(this,t.detail)),s.addEventListener("sort-order",this._sort_order_clicked.bind(this)),s.addEventListener("row-drag",()=>{this.classList.add("dragging"),this._active_columns.style.overflow="hidden",this._original_index=Array.prototype.slice.call(this._active_columns.children).findIndex(e=>e.getAttribute("name")===t),-1!==this._original_index?(this._drop_target_hover=this._active_columns.children[this._original_index],setTimeout(()=>s.setAttribute("drop-target",!0))):this._drop_target_hover=this._new_row(t,e,n)}),s.addEventListener("row-dragend",()=>{this._active_columns.style.overflow="auto",this.classList.remove("dragging")}),i&&(s.setAttribute("computed_column",JSON.stringify(i)),s.classList.add("computed")),s}_update_column_view(t,e=!1){t||(t=this._get_view_columns()),this.setAttribute("columns",JSON.stringify(t));const n=this._get_view_dom_columns("#inactive_columns perspective-row");t.length===n.length?this._inactive_columns.parentElement.classList.add("collapse"):this._inactive_columns.parentElement.classList.remove("collapse"),n.forEach(e=>{-1===t.indexOf(e.getAttribute("name"))?e.classList.remove("active"):e.classList.add("active")}),e&&this._update_column_list(t,this._active_columns,t=>{const e=n.find(e=>e.getAttribute("name")===t);if(e)return this._new_row(e.getAttribute("name"),e.getAttribute("type"))})}_update_column_list(t,e,n,o){o=o||((t,e)=>e.getAttribute("name")===t);const r=Array.prototype.slice.call(e.children);for(let i=0,s=0;i0)if(this._plugin.initial){let n=[],o=this._plugin.initial.count||2;e.length===o?n=e.map(t=>t.getAttribute("name")):e.lengtht.getAttribute("name")),this._fill_numeric(t,n),n.length-1&&-1===e.indexOf(r))&&e.push(r)}}_check_responsive_layout(){this.shadowRoot&&(this.clientHeight<500&&this.clientWidth>600&&this._get_view_columns({active:!1}).length>this._get_view_columns().length?this.shadowRoot.querySelector("#app").classList.add("columns_horizontal"):this.shadowRoot.querySelector("#app").classList.remove("columns_horizontal"))}_register_ids(){this._aggregate_selector=this.shadowRoot.querySelector("#aggregate_selector"),this._vis_selector=this.shadowRoot.querySelector("#vis_selector"),this._filters=this.shadowRoot.querySelector("#filters"),this._row_pivots=this.shadowRoot.querySelector("#row_pivots"),this._column_pivots=this.shadowRoot.querySelector("#column_pivots"),this._datavis=this.shadowRoot.querySelector("#pivot_chart"),this._active_columns=this.shadowRoot.querySelector("#active_columns"),this._inactive_columns=this.shadowRoot.querySelector("#inactive_columns"),this._side_panel_actions=this.shadowRoot.querySelector("#side_panel__actions"),this._add_computed_column=this.shadowRoot.querySelector("#add-computed-column"),this._computed_column=this.shadowRoot.querySelector("perspective-computed-column"),this._computed_column_inputs=this._computed_column.querySelector("#psp-cc-computation-inputs"),this._inner_drop_target=this.shadowRoot.querySelector("#drop_target_inner"),this._drop_target=this.shadowRoot.querySelector("#drop_target"),this._config_button=this.shadowRoot.querySelector("#config_button"),this._reset_button=this.shadowRoot.querySelector("#reset_button"),this._download_button=this.shadowRoot.querySelector("#download_button"),this._copy_button=this.shadowRoot.querySelector("#copy_button"),this._side_panel=this.shadowRoot.querySelector("#side_panel"),this._top_panel=this.shadowRoot.querySelector("#top_panel"),this._sort=this.shadowRoot.querySelector("#sort"),this._transpose_button=this.shadowRoot.querySelector("#transpose_button"),this._plugin_information=this.shadowRoot.querySelector(".plugin_information"),this._plugin_information_action=this.shadowRoot.querySelector(".plugin_information__action"),this._plugin_information_action_close=this.shadowRoot.querySelector(".plugin_information__action--close"),this._plugin_information_message=this.shadowRoot.querySelector("#plugin_information_count"),this._resize_bar=this.shadowRoot.querySelector("#resize_bar")}_register_view_options(){let t=a.b.getInstance();Object(C.render)(Ct(t),this._vis_selector)}_register_data_attribute(){if(this.getAttribute("data")){let t=this.getAttribute("data");try{t=JSON.parse(t)}catch(t){}this.load(t)}}_autocomplete_choices(t){return t.slice(1,t.length).map(t=>t.__ROW_PATH__).filter(t=>Array.isArray(t)?t.filter(t=>!!t).length>0:!!t)}}class kt extends At{_show_context_menu(t){return this.shadowRoot.querySelector("#app").classList.toggle("show_menu"),t.stopPropagation(),t.preventDefault(),!1}_hide_context_menu(){this.shadowRoot.querySelector("#app").classList.remove("show_menu")}async _toggle_config(t){if(!t||2!==t.button)if(this._show_config=!this._show_config,this._hide_context_menu(),this._show_config){this._side_panel.style.display="flex",this._top_panel.style.display="flex",this.dispatchEvent(new CustomEvent("perspective-toggle-settings",{detail:this._show_config}));try{await this._plugin.resize.call(this)}finally{this.toggleAttribute("settings",!0)}}else{const t=this.shadowRoot.querySelector("#pivot_chart_container");this._datavis.style.width="".concat(t.clientWidth+this._side_panel.clientWidth,"px"),this._datavis.style.height="".concat(t.clientHeight+this._top_panel.clientHeight,"px");try{await this._plugin.resize.call(this)}finally{this._side_panel.style.display="none",this._top_panel.style.display="none",this._datavis.style.width="100%",this._datavis.style.height="100%",this.removeAttribute("settings"),this.dispatchEvent(new CustomEvent("perspective-toggle-settings",{detail:this._show_config}))}}}_open_computed_column(t){t.stopImmediatePropagation(),this._computed_column.style.display="flex",this._side_panel_actions.style.display="none"}_set_computed_column_input(t){t.detail.target.appendChild(this._new_row(t.detail.column.name,t.detail.column.type)),this._update_column_view()}_validate_computed_column(t){const e=t.detail;let n=JSON.parse(this.getAttribute("computed-columns"));null===n&&(n=[]);for(let t of n)if(e.name===t.name)return;n.push(e),this.setAttribute("computed-columns",JSON.stringify(n))}async _create_computed_column(t){const e=t.detail;let n=e.column_name;(await this._table.columns()).includes(n)&&(console.log(n),n+=" ".concat(Math.round(100*Math.random())));const o=[{computation:e.computation,column:n,func:e.computation.func,inputs:e.input_columns.map(t=>t.name),input_type:e.computation.input_type,type:e.computation.return_type}],r=this._table.add_computed(o);await this._load_table(r,!0),this._update_column_view()}_column_visibility_clicked(t){let e=t.currentTarget;if("active_columns"===e.parentElement.getAttribute("id")){if(1===this._get_visible_column_count())return;if(t.detail.shiftKey)for(let t of Array.prototype.slice.call(this._active_columns.children))t!==e&&this._active_columns.removeChild(t);else this._active_columns.removeChild(e)}else{if(t.path&&t.path[1].classList.contains("psp-cc-computation__input-column"))return this._computed_column.deselect_column(t.currentTarget.getAttribute("name")),void this._update_column_view();if(t.detail.shiftKey&&"toggle"===this._plugin.selectMode||!t.detail.shiftKey&&"select"===this._plugin.selectMode)for(let t of Array.prototype.slice.call(this._active_columns.children))this._active_columns.removeChild(t);let n=this._new_row(e.getAttribute("name"),e.getAttribute("type"));this._active_columns.appendChild(n)}this._check_responsive_layout();let n=this._get_view_columns();this._update_column_view(n)}_column_aggregate_clicked(){let t=this.get_aggregate_attribute(),e=this._get_view_aggregates();for(let n of t){let t=e.find(t=>t.column===n.column);t&&(n.op=t.op)}this.set_aggregate_attribute(t),this._update_column_view(),this._debounce_update()}_column_filter_clicked(){let t=this._get_view_filters();this._updating_filter=!0,this.setAttribute("filters",JSON.stringify(t)),this._updating_filter=!1,this._debounce_update()}_increment_sort(t,e,n){let o=["asc","desc"];return e&&o.push("col asc","col desc"),n&&(o=o.map(t=>"".concat(t," abs"))),o.push("none"),o[(o.indexOf(t)+1)%o.length]}_sort_order_clicked(t){const e=t.target,n=t.detail.shiftKey&&"string"!==e.getAttribute("type"),o=this._increment_sort(e.getAttribute("sort-order"),this._get_view_column_pivots().length>0,n);e.setAttribute("sort-order",o);const r=this._get_view_sorts();this.setAttribute("sort",JSON.stringify(r))}_transpose(){const t=this.hasAttribute("row-pivots"),e=this.hasAttribute("column-pivots");if(t&&e){let t=this.getAttribute("row-pivots");this.setAttribute("row-pivots",this.getAttribute("column-pivots")),this.setAttribute("column-pivots",t)}else if(t){let t=this.getAttribute("row-pivots");this.removeAttribute("row-pivots"),this.setAttribute("column-pivots",t)}else if(e){let t=this.getAttribute("column-pivots");this.removeAttribute("column-pivots"),this.setAttribute("row-pivots",t)}else this.removeAttribute("column-pivots"),this.removeAttribute("row-pivots")}_reset_sidepanel(){this._side_panel.style.width=""}_resize_sidepanel(t){const e=document.body.style.cursor;document.body.style.cursor="col-resize";const n=t.clientX,o=this._side_panel.offsetWidth,r=t=>{const e=Math.max(0,Math.min(o+(t.clientX-n),this.offsetWidth-10));this._side_panel.style.width="".concat(e,"px"),this._plugin&&this.notifyResize()},i=()=>{document.body.style.cursor=e,document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",i)}_vis_selector_changed(){this._plugin_information.classList.add("hidden"),this.setAttribute("plugin",this._vis_selector.value),this._debounce_update()}_register_callbacks(){this._sort.addEventListener("drop",y.bind(this)),this._sort.addEventListener("dragend",b.bind(this)),this._sort.addEventListener("dragenter",N.bind(this)),this._sort.addEventListener("dragover",O.bind(this)),this._sort.addEventListener("dragleave",T.bind(this)),this._row_pivots.addEventListener("drop",y.bind(this)),this._row_pivots.addEventListener("dragend",b.bind(this)),this._row_pivots.addEventListener("dragenter",N.bind(this)),this._row_pivots.addEventListener("dragover",O.bind(this)),this._row_pivots.addEventListener("dragleave",T.bind(this)),this._column_pivots.addEventListener("drop",y.bind(this)),this._column_pivots.addEventListener("dragend",b.bind(this)),this._column_pivots.addEventListener("dragenter",N.bind(this)),this._column_pivots.addEventListener("dragover",O.bind(this)),this._column_pivots.addEventListener("dragleave",T.bind(this)),this._filters.addEventListener("drop",y.bind(this)),this._filters.addEventListener("dragend",b.bind(this)),this._filters.addEventListener("dragenter",N.bind(this)),this._filters.addEventListener("dragover",O.bind(this)),this._filters.addEventListener("dragleave",T.bind(this)),this._active_columns.addEventListener("drop",S.bind(this)),this._active_columns.addEventListener("dragenter",N.bind(this)),this._active_columns.addEventListener("dragend",w.bind(this)),this._active_columns.addEventListener("dragover",E.bind(this)),this._active_columns.addEventListener("dragleave",x.bind(this)),this._add_computed_column.addEventListener("click",this._open_computed_column.bind(this)),this._computed_column.addEventListener("perspective-computed-column-save",this._validate_computed_column.bind(this)),this._computed_column.addEventListener("perspective-computed-column-update",this._set_computed_column_input.bind(this)),this._config_button.addEventListener("mousedown",this._toggle_config.bind(this)),this._config_button.addEventListener("contextmenu",this._show_context_menu.bind(this)),this._reset_button.addEventListener("click",this.reset.bind(this)),this._copy_button.addEventListener("click",t=>this.copy(t.shiftKey)),this._download_button.addEventListener("click",t=>this.download(t.shiftKey)),this._transpose_button.addEventListener("click",this._transpose.bind(this)),this._drop_target.addEventListener("dragover",O.bind(this)),this._resize_bar.addEventListener("mousedown",this._resize_sidepanel.bind(this)),this._resize_bar.addEventListener("dblclick",this._reset_sidepanel.bind(this)),this._vis_selector.addEventListener("change",this._vis_selector_changed.bind(this)),this._plugin_information_action.addEventListener("click",()=>{this._debounce_update({ignore_size_check:!0,limit_points:!1}),this._plugin_information.classList.add("hidden")}),this._plugin_information_action_close.addEventListener("click",()=>{this._plugin_information.classList.add("hidden")})}}var jt;function Lt(t,e,n,o,r){var i={};return Object.keys(o).forEach((function(t){i[t]=o[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce((function(n,o){return o(t,e,n)||n}),i),r&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(r):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}const Dt=["selectable","editable","plugin","row-pivots","column-pivots","aggregates","filters","sort","computed-columns","columns"];o(rt.a,st.a,ct.a)((Lt((jt=class extends kt{constructor(){super(),this._register_debounce_instance(),this._show_config=!0,this._show_warnings=!0,this.__render_times=[],this._resize_handler=this.notifyResize.bind(this),window.addEventListener("resize",this._resize_handler)}connectedCallback(){0===Object.keys(a.b.getInstance()).length&&Object(a.a)(),this.toggleAttribute("settings",!0),this._register_ids(),this._register_callbacks(),this._register_view_options(),this._register_data_attribute(),this.toggleConfig(),this._check_loaded_table()}sort(t){null!=t&&0!==t.length||(this.hasAttribute("sort")&&this.removeAttribute("sort"),t=[]);var e=this._sort.querySelector("ul");this._update_column_list(t,e,t=>{let e="asc";return Array.isArray(t)&&(e=t[1],t=t[0]),this._new_row(t,!1,!1,!1,e)},(t,e)=>Array.isArray(t)?e.getAttribute("name")===t[0]&&e.getAttribute("sort-order")===t[1]:e.getAttribute("name")===t),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}columns(t){null!=t&&0!==t.length||(this.hasAttribute("columns")&&(this._initial_col_order?this.setAttribute("columns",JSON.stringify(this._initial_col_order)):this.removeAttribute("columns")),t=(this._initial_col_order||[]).slice()),this._update_column_view(t,!0),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}"computed-columns"(t){null!=t&&0!==t.length||(this.hasAttribute("computed-columns")&&this.removeAttribute("computed-columns"),t=[]);const e=this._set_updating();this._computed_column._close_computed_column(),(async()=>{if(this._table){for(let e of t)await this._create_computed_column({detail:{column_name:e.name,input_columns:e.inputs.map(t=>({name:t})),computation:D[e.func]}});await this._debounce_update(),e()}this.dispatchEvent(new Event("perspective-config-update")),this.dispatchEvent(new Event("perspective-computed-column-update"))})()}aggregates(t){null!=t&&0!==Object.keys(t).length||(this.hasAttribute("aggregates")&&this.removeAttribute("aggregates"),t={}),this._get_view_dom_columns().map(e=>{let n=t[e.getAttribute("name")];n&&e.setAttribute("aggregate",Array.isArray(n)?JSON.stringify(n):n)}),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}filters(t){if(null!=t&&0!==t.length||(this.hasAttribute("filters")&&this.removeAttribute("filters"),t=[]),!this._updating_filter){var e=this._filters.querySelector("ul");this._update_column_list(t,e,t=>{const e=JSON.stringify({operator:t[1],operand:t[2]});return this._new_row(t[0],void 0,void 0,e)},(t,e)=>e.getAttribute("name")===t[0]&&e.getAttribute("filter")===JSON.stringify({operator:t[1],operand:t[2]}))}this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}set plugin(t){if("null"===t||null==t)return void this.setAttribute("plugin",this._vis_selector.options[0].value);const e=Object.keys(a.b.getInstance());if(this.hasAttribute("plugin")){let t=this.getAttribute("plugin");if(-1===e.indexOf(t)){const n=e.find(e=>e.indexOf(t)>-1);n?(console.warn('Unknown plugin "'.concat(t,'", using "').concat(n,'"')),this.setAttribute("plugin",n)):(console.error('Unknown plugin "'.concat(t,'"')),this.setAttribute("plugin",this._vis_selector.options[0].value))}else this._vis_selector.value!==t&&(this._vis_selector.value=t,this._vis_selector_changed()),this._set_row_styles(),this._set_column_defaults(),this.dispatchEvent(new Event("perspective-config-update"))}else this.setAttribute("plugin",this._vis_selector.options[0].value)}"column-pivots"(t){null!=t&&0!==t.length||(this.hasAttribute("column-pivots")&&this.removeAttribute("column-pivots"),t=[]);var e=this._column_pivots.querySelector("ul");this._update_column_list(t,e,t=>this._new_row(t)),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}"row-pivots"(t){null!=t&&0!==t.length||(this.hasAttribute("row-pivots")&&this.removeAttribute("row-pivots"),t=[]);var e=this._row_pivots.querySelector("ul");this._update_column_list(t,e,t=>this._new_row(t)),this.dispatchEvent(new Event("perspective-config-update")),this._debounce_update()}set editable(t){"null"===t?this.hasAttribute("editable")&&this.removeAttribute("editable"):this.toggleAttribute("editable",!0),this._debounce_update({force_update:!0}),this.dispatchEvent(new Event("perspective-config-update"))}set throttle(t){"null"===t&&this.hasAttribute("throttle")&&this.removeAttribute("throttle"),this._calculate_throttle_timeout()}set selectable(t){"null"===t?this.hasAttribute("selectable")&&this.removeAttribute("selectable"):this.toggleAttribute("selectable",!0),this._debounce_update({force_update:!0}),this.dispatchEvent(new Event("perspective-config-update"))}get worker(){return this._get_worker()}get table(){return this._table}get view(){return this._view}load(t,e){try{t=t.trim()}catch(t){}let n;if(t.hasOwnProperty("_name")&&"table"===t.type?n=t:(n=this.worker.table(t,e),n._owner_viewer=this),this.isConnected)return this._load_table(n);this._table=n}update(t){void 0===this._table?this.load(t):this._table.update(t)}async notifyResize(t){this._check_responsive_layout(),!document.hidden&&this.offsetParent&&await this._plugin.resize.call(this,t)}clone(t){this._inner_drop_target&&(this._inner_drop_target.innerHTML=t._inner_drop_target.innerHTML),this._load_table(t.table),this.restore(t.save())}delete(t=!0){let e=this._clear_state(t);return this._plugin.delete&&this._plugin.delete.call(this),window.removeEventListener("load",this._resize_handler),window.removeEventListener("resize",this._resize_handler),e}restyleElement(){this._restyle_plugin()}save(){let t={};const e=new Set(Dt);for(let n=0;n{e=t}).catch(t=>{console.error(t),e=""});let n=0,o=()=>{void 0!==e?function(t){let e=document.createElement("textarea");document.body.appendChild(e),e.value=t,e.select(),document.execCommand("copy"),document.body.removeChild(e)}(e):n<200?(n++,setTimeout(o,50)):console.warn("Timeout expired - copy to clipboard cancelled.")};o(),this._hide_context_menu()}async toggleConfig(){await this._toggle_config()}}).prototype,"sort",[s],Object.getOwnPropertyDescriptor(jt.prototype,"sort"),jt.prototype),Lt(jt.prototype,"columns",[s],Object.getOwnPropertyDescriptor(jt.prototype,"columns"),jt.prototype),Lt(jt.prototype,"computed-columns",[s],Object.getOwnPropertyDescriptor(jt.prototype,"computed-columns"),jt.prototype),Lt(jt.prototype,"aggregates",[i],Object.getOwnPropertyDescriptor(jt.prototype,"aggregates"),jt.prototype),Lt(jt.prototype,"filters",[s],Object.getOwnPropertyDescriptor(jt.prototype,"filters"),jt.prototype),Lt(jt.prototype,"column-pivots",[s],Object.getOwnPropertyDescriptor(jt.prototype,"column-pivots"),jt.prototype),Lt(jt.prototype,"row-pivots",[s],Object.getOwnPropertyDescriptor(jt.prototype,"row-pivots"),jt.prototype),Lt(jt.prototype,"notifyResize",[function(t,e,n){const o=Symbol("private lock"),r=n.value;return n.value=async function(...t){if(this[o]&&(await this[o],this[o]))return void await this[o];let e;this[o]=(()=>{let t,e=new Promise(e=>{t=e});return e.resolve=t,e})();try{e=await r.call(this,...t)}catch(t){console.error(t)}finally{const t=this[o];return this[o]=void 0,t.resolve(),e}},n}],Object.getOwnPropertyDescriptor(jt.prototype,"notifyResize"),jt.prototype),jt))}]))},function(t,e,n){var o=n(6),r=n(23),i=n(0)("match");t.exports=function(t){var e;return o(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==r(t))}},function(t,e,n){var o=n(2),r=n(27),i=n(0)("species");t.exports=function(t,e){var n,s=o(t).constructor;return void 0===s||null==(n=o(s)[i])?e:r(n)}},function(t,e,n){var o=n(28),r=n(29);t.exports=function(t){return function(e,n){var i,s,a=String(r(e)),c=o(n),l=a.length;return c<0||c>=l?t?"":void 0:(i=a.charCodeAt(c))<55296||i>56319||c+1===l||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):i:t?a.slice(c,c+2):s-56320+(i-55296<<10)+65536}}},function(t,e,n){var o=n(23),r=n(0)("toStringTag"),i="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),r))?n:i?o(e):"Object"==(s=o(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){"use strict";var o=n(40);n(17)({target:"RegExp",proto:!0,forced:o!==/./.exec},{exec:o})},function(t,e,n){t.exports=n(24)("native-function-to-string",Function.toString)},function(t,e,n){"use strict";var o=n(59),r=n(89),i=n(44),s=n(13);t.exports=n(91)(Array,"Array",(function(t,e){this._t=s(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,r(1)):r(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var o=n(23);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e,n){"use strict";var o=n(26),r=n(17),i=n(12),s=n(7),a=n(44),c=n(92),l=n(47),u=n(97),d=n(0)("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,f,_,m,g){c(n,e,f);var v,b,y,w=function(t){if(!p&&t in N)return N[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},x=e+" Iterator",E="values"==_,S=!1,N=t.prototype,O=N[d]||N["@@iterator"]||_&&N[_],T=O||w(_),C=_?E?w("entries"):T:void 0,A="Array"==e&&N.entries||O;if(A&&(y=u(A.call(new t)))!==Object.prototype&&y.next&&(l(y,x,!0),o||"function"==typeof y[d]||s(y,d,h)),E&&O&&"values"!==O.name&&(S=!0,T=function(){return O.call(this)}),o&&!g||!p&&!S&&N[d]||s(N,d,T),a[e]=T,a[x]=h,_)if(v={values:E?T:w("values"),keys:m?T:w("keys"),entries:C},g)for(b in v)b in N||i(N,b,v[b]);else r(r.P+r.F*(p||S),e,v);return v}},function(t,e,n){"use strict";var o=n(60),r=n(30),i=n(47),s={};n(7)(s,n(0)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=o(s,{next:r(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var o=n(9),r=n(2),i=n(31);t.exports=n(8)?Object.defineProperties:function(t,e){r(t);for(var n,s=i(e),a=s.length,c=0;a>c;)o.f(t,n=s[c++],e[n]);return t}},function(t,e,n){var o=n(13),r=n(11),i=n(95);t.exports=function(t){return function(e,n,s){var a,c=o(e),l=r(c.length),u=i(s,l);if(t&&n!=n){for(;l>u;)if((a=c[u++])!=a)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}}},function(t,e,n){var o=n(28),r=Math.max,i=Math.min;t.exports=function(t,e){return(t=o(t))<0?r(t+e,0):i(t,e)}},function(t,e,n){var o=n(4).document;t.exports=o&&o.documentElement},function(t,e,n){var o=n(10),r=n(19),i=n(45)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=r(t),o(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e){t.exports.default={types:{float:{filter_operator:"==",aggregate:"sum",format:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}},string:{filter_operator:"==",aggregate:"count"},integer:{filter_operator:"==",aggregate:"sum",format:{}},boolean:{filter_operator:"==",aggregate:"count"},datetime:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},null_value:-1},date:{filter_operator:"==",aggregate:"count",format:{week:"numeric",year:"numeric",month:"numeric",day:"numeric"},null_value:-1}}}},function(t,e,n){n(8)&&"g"!=/./g.flags&&n(9).f(RegExp.prototype,"flags",{configurable:!0,get:n(41)})},function(t,e){t.exports=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var o=t.indexOf("Edge/");return o>0&&parseInt(t.substring(o+5,t.indexOf(".",o)),10)}},function(t,e,n){var o=n(32),r=n(102),i=n(103),s="Expected a function",a=Math.max,c=Math.min;t.exports=function(t,e,n){var l,u,d,p,h,f,_=0,m=!1,g=!1,v=!0;if("function"!=typeof t)throw new TypeError(s);function b(e){var n=l,o=u;return l=u=void 0,_=e,p=t.apply(o,n)}function y(t){var n=t-f;return void 0===f||n>=e||n<0||g&&t-_>=d}function w(){var t=r();if(y(t))return x(t);h=setTimeout(w,function(t){var n=e-(t-f);return g?c(n,d-(t-_)):n}(t))}function x(t){return h=void 0,v&&l?b(t):(l=u=void 0,p)}function E(){var t=r(),n=y(t);if(l=arguments,u=this,f=t,n){if(void 0===h)return function(t){return _=t,h=setTimeout(w,e),m?b(t):p}(f);if(g)return clearTimeout(h),h=setTimeout(w,e),b(f)}return void 0===h&&(h=setTimeout(w,e)),p}return e=i(e)||0,o(n)&&(m=!!n.leading,d=(g="maxWait"in n)?a(i(n.maxWait)||0,e):d,v="trailing"in n?!!n.trailing:v),E.cancel=function(){void 0!==h&&clearTimeout(h),_=0,l=f=u=h=void 0},E.flush=function(){return void 0===h?p:x(r())},E}},function(t,e,n){var o=n(3);t.exports=function(){return o.Date.now()}},function(t,e,n){var o=n(32),r=n(104),i=NaN,s=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return i;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(s,"");var n=c.test(t);return n||l.test(t)?u(t.slice(2),n?2:8):a.test(t)?i:+t}},function(t,e,n){var o=n(20),r=n(21),i="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||r(t)&&o(t)==i}},function(t,e,n){var o=n(49),r=Object.prototype,i=r.hasOwnProperty,s=r.toString,a=o?o.toStringTag:void 0;t.exports=function(t){var e=i.call(t,a),n=t[a];try{t[a]=void 0;var o=!0}catch(t){}var r=s.call(t);return o&&(e?t[a]=n:delete t[a]),r}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){!function(){var e=function(t,n){var o=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=r(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var o in e){var r=e[o],i=t.input.getAttribute("data-"+o.toLowerCase());t[o]="number"==typeof r?parseInt(i):!1===r?null!==i:r instanceof Function?null:i,t[o]||0===t[o]||(t[o]=o in n?n[o]:r)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1},n),this.index=-1,this.container=this.container(t),this.ul=r.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container}),this.status=r.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:0!=this.minChars?"Type "+this.minChars+" or more characters for results.":"Begin typing for results."}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;o.opened&&(13===e&&o.selected?(t.preventDefault(),o.select(void 0,void 0,t)):9===e&&o.selected&&o.tabSelect?o.select(void 0,void 0,t):27===e?o.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),o[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),o.select(e,t.target,t))}}}},r.bind(this.input,this._events.input),r.bind(this.input.form,this._events.form),r.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=r(t))&&t.children){var e=[];o.apply(t.children).forEach((function(t){if(!t.disabled){var n=t.textContent.trim(),o=t.value||n,r=t.label||n;""!==o&&e.push({label:r,value:o})}})),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),r.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),r.fire(this.input,"awesomplete-open")},destroy:function(){if(r.unbind(this.input,this._events.input),r.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent+", list item "+(t+1)+" of "+e.length,this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,r.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=r.siblingIndex(t):t=this.ul.children[this.index],t){var o=this.suggestions[this.index];r.fire(this.input,"awesomplete-select",{text:o,origin:e||t,originalEvent:n})&&(this.replace(o),this.close({reason:"select"}),r.fire(this.input,"awesomplete-selectcomplete",{text:o,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map((function(o){return new n(t.data(o,e))})).filter((function(n){return t.filter(n,e)})),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach((function(n,o){t.ul.appendChild(t.item(n,e,o))})),0===this.ul.children.length?(this.status.textContent="No results found",this.close({reason:"nomatches"})):(this.open(),this.status.textContent=this.ul.children.length+" results found")):(this.close({reason:"nomatches"}),this.status.textContent="No results found")}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(r.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+r.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t$&");return r.create("li",{innerHTML:o,role:"option","aria-selected":"false",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var o=Array.prototype.slice;function r(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function i(t,e){return o.call((e||document).querySelectorAll(t))}function s(){i("input.awesomplete").forEach((function(t){new e(t)}))}r.create=function(t,e){var n=document.createElement(t);for(var o in e){var i=e[o];if("inside"===o)r(i).appendChild(n);else if("around"===o){var s=r(i);s.parentNode.insertBefore(n,s),n.appendChild(s),null!=s.getAttribute("autofocus")&&s.focus()}else o in n?n[o]=i:n.setAttribute(o,i)}return n},r.bind=function(t,e){if(t)for(var n in e){var o=e[n];n.split(/\s+/).forEach((function(e){t.addEventListener(e,o)}))}},r.unbind=function(t,e){if(t)for(var n in e){var o=e[n];n.split(/\s+/).forEach((function(e){t.removeEventListener(e,o)}))}},r.fire=function(t,e,n){var o=document.createEvent("HTMLEvents");for(var r in o.initEvent(e,!0,!0),n)o[r]=n[r];return t.dispatchEvent(o)},r.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},r.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?s():document.addEventListener("DOMContentLoaded",s)),e.$=r,e.$$=i,t.exports&&(t.exports=e)}()},function(t,e,n){n(66)("asyncIterator")},function(t,e,n){"use strict";var o=n(4),r=n(10),i=n(8),s=n(17),a=n(12),c=n(110).KEY,l=n(5),u=n(24),d=n(47),p=n(16),h=n(0),f=n(67),_=n(66),m=n(111),g=n(51),v=n(2),b=n(6),y=n(19),w=n(13),x=n(43),E=n(30),S=n(60),N=n(112),O=n(113),T=n(68),C=n(9),A=n(31),k=O.f,j=C.f,L=N.f,D=o.Symbol,M=o.JSON,I=M&&M.stringify,P=h("_hidden"),R=h("toPrimitive"),z={}.propertyIsEnumerable,H=u("symbol-registry"),F=u("symbols"),q=u("op-symbols"),V=Object.prototype,B="function"==typeof D&&!!T.f,U=o.QObject,G=!U||!U.prototype||!U.prototype.findChild,W=i&&l((function(){return 7!=S(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a}))?function(t,e,n){var o=k(V,e);o&&delete V[e],j(t,e,n),o&&t!==V&&j(V,e,o)}:j,J=function(t){var e=F[t]=S(D.prototype);return e._k=t,e},Z=B&&"symbol"==typeof D.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof D},$=function(t,e,n){return t===V&&$(q,e,n),v(t),e=x(e,!0),v(n),r(F,e)?(n.enumerable?(r(t,P)&&t[P][e]&&(t[P][e]=!1),n=S(n,{enumerable:E(0,!1)})):(r(t,P)||j(t,P,E(1,{})),t[P][e]=!0),W(t,e,n)):j(t,e,n)},X=function(t,e){v(t);for(var n,o=m(e=w(e)),r=0,i=o.length;i>r;)$(t,n=o[r++],e[n]);return t},Y=function(t){var e=z.call(this,t=x(t,!0));return!(this===V&&r(F,t)&&!r(q,t))&&(!(e||!r(this,t)||!r(F,t)||r(this,P)&&this[P][t])||e)},K=function(t,e){if(t=w(t),e=x(e,!0),t!==V||!r(F,e)||r(q,e)){var n=k(t,e);return!n||!r(F,e)||r(t,P)&&t[P][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=L(w(t)),o=[],i=0;n.length>i;)r(F,e=n[i++])||e==P||e==c||o.push(e);return o},tt=function(t){for(var e,n=t===V,o=L(n?q:w(t)),i=[],s=0;o.length>s;)!r(F,e=o[s++])||n&&!r(V,e)||i.push(F[e]);return i};B||(a((D=function(){if(this instanceof D)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===V&&e.call(q,n),r(this,P)&&r(this[P],t)&&(this[P][t]=!1),W(this,t,E(1,n))};return i&&G&&W(V,t,{configurable:!0,set:e}),J(t)}).prototype,"toString",(function(){return this._k})),O.f=K,C.f=$,n(69).f=N.f=Q,n(50).f=Y,T.f=tt,i&&!n(26)&&a(V,"propertyIsEnumerable",Y,!0),f.f=function(t){return J(h(t))}),s(s.G+s.W+s.F*!B,{Symbol:D});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var ot=A(h.store),rt=0;ot.length>rt;)_(ot[rt++]);s(s.S+s.F*!B,"Symbol",{for:function(t){return r(H,t+="")?H[t]:H[t]=D(t)},keyFor:function(t){if(!Z(t))throw TypeError(t+" is not a symbol!");for(var e in H)if(H[e]===t)return e},useSetter:function(){G=!0},useSimple:function(){G=!1}}),s(s.S+s.F*!B,"Object",{create:function(t,e){return void 0===e?S(t):X(S(t),e)},defineProperty:$,defineProperties:X,getOwnPropertyDescriptor:K,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var it=l((function(){T.f(1)}));s(s.S+s.F*it,"Object",{getOwnPropertySymbols:function(t){return T.f(y(t))}}),M&&s(s.S+s.F*(!B||l((function(){var t=D();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,o=[t],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=e=o[1],(b(e)||void 0!==t)&&!Z(t))return g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Z(e))return e}),o[1]=e,I.apply(M,o)}}),D.prototype[R]||n(7)(D.prototype,R,D.prototype.valueOf),d(D,"Symbol"),d(Math,"Math",!0),d(o.JSON,"JSON",!0)},function(t,e,n){var o=n(16)("meta"),r=n(6),i=n(10),s=n(9).f,a=0,c=Object.isExtensible||function(){return!0},l=!n(5)((function(){return c(Object.preventExtensions({}))})),u=function(t){s(t,o,{value:{i:"O"+ ++a,w:{}}})},d=t.exports={KEY:o,NEED:!1,fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,o)){if(!c(t))return"F";if(!e)return"E";u(t)}return t[o].i},getWeak:function(t,e){if(!i(t,o)){if(!c(t))return!0;if(!e)return!1;u(t)}return t[o].w},onFreeze:function(t){return l&&d.NEED&&c(t)&&!i(t,o)&&u(t),t}}},function(t,e,n){var o=n(31),r=n(68),i=n(50);t.exports=function(t){var e=o(t),n=r.f;if(n)for(var s,a=n(t),c=i.f,l=0;a.length>l;)c.call(t,s=a[l++])&&e.push(s);return e}},function(t,e,n){var o=n(13),r=n(69).f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==i.call(t)?function(t){try{return r(t)}catch(t){return s.slice()}}(t):r(o(t))}},function(t,e,n){var o=n(50),r=n(30),i=n(13),s=n(43),a=n(10),c=n(56),l=Object.getOwnPropertyDescriptor;e.f=n(8)?l:function(t,e){if(t=i(t),e=s(e,!0),c)try{return l(t,e)}catch(t){}if(a(t,e))return r(!o.f.call(t,e),t[e])}},function(t,e,n){var o=n(115),r=n(70);t.exports=function(t){return null==t?[]:o(t,r(t))}},function(t,e,n){var o=n(116);t.exports=function(t,e){return o(e,(function(e){return t[e]}))}},function(t,e){t.exports=function(t,e){for(var n=-1,o=null==t?0:t.length,r=Array(o);++n-1&&t%1==0&&t-1}},function(t,e,n){var o=n(34);t.exports=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},function(t,e,n){var o=n(33);t.exports=function(){this.__data__=new o,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var o=n(33),r=n(53),i=n(77),s=200;t.exports=function(t,e){var n=this.__data__;if(n instanceof o){var a=n.__data__;if(!r||a.length\x20\t\r\n\f]+)/i.exec(e)||["",""])[1].toLowerCase()];if(n)for(var o=0;o"+e+"";for(v.body.innerHTML=e,t.a(v);this.content.firstChild;)c.call(this.content,this.content.firstChild);if(e=v.body,n)for(o=0;o"+this.innerHTML+""},set:function(t){if(!this.parentNode)throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");for(v.body.innerHTML=t,t=this.ownerDocument.createDocumentFragment();v.body.firstChild;)l.call(t,v.body.firstChild);u.call(this.parentNode,t,this)},configurable:!0})};S(t.prototype),N(t.prototype),t.a=function(n){for(var o,r=0,i=(n=e(n,"template")).length;r]/g,C=function(t){switch(t){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"\xa0":return" "}},A=(y=function(t){for(var e={},n=0;n";break t;case Node.TEXT_NODE:a=a.data,a=c&&k[c.localName]?a:a.replace(T,C);break t;case Node.COMMENT_NODE:a="\x3c!--"+a.data+"--\x3e";break t;default:throw window.console.error(a),Error("not implemented")}}o+=a}return o}}if(n||g){t.b=function(t,e){var n=i.call(t,!1);return this.R&&this.R(n),e&&(l.call(n.content,i.call(t.content,!0)),L(n.content,t.content)),n};var L=function(n,o){if(o.querySelectorAll&&0!==(o=e(o,"template")).length)for(var r,i,s=0,a=(n=e(n,"template")).length;s]/g;function $t(t){switch(t){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case"\xa0":return" "}}function Xt(t){for(var e={},n=0;n";break t;case Node.TEXT_NODE:a=a.data,a=c&&Kt[c.localName]?a:a.replace(Zt,$t);break t;case Node.COMMENT_NODE:a="\x3c!--"+a.data+"--\x3e";break t;default:throw window.console.error(a),Error("not implemented")}}o+=a}return o}var te=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),ee=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);function ne(t){var e=[];for(te.currentNode=t,t=te.firstChild();t;)e.push(t),t=te.nextSibling();return e}var oe={parentNode:function(t){return te.currentNode=t,te.parentNode()},firstChild:function(t){return te.currentNode=t,te.firstChild()},lastChild:function(t){return te.currentNode=t,te.lastChild()},previousSibling:function(t){return te.currentNode=t,te.previousSibling()},nextSibling:function(t){return te.currentNode=t,te.nextSibling()}};oe.childNodes=ne,oe.parentElement=function(t){return ee.currentNode=t,ee.parentNode()},oe.firstElementChild=function(t){return ee.currentNode=t,ee.firstChild()},oe.lastElementChild=function(t){return ee.currentNode=t,ee.lastChild()},oe.previousElementSibling=function(t){return ee.currentNode=t,ee.previousSibling()},oe.nextElementSibling=function(t){return ee.currentNode=t,ee.nextSibling()},oe.children=function(t){var e=[];for(ee.currentNode=t,t=ee.firstChild();t;)e.push(t),t=ee.nextSibling();return yt(e)},oe.innerHTML=function(t){return Qt(t,(function(t){return ne(t)}))},oe.textContent=function(t){switch(t.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:t=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1);for(var e,n="";e=t.nextNode();)n+=e.nodeValue;return n;default:return t.nodeValue}};var re=ot.K,ie=[Node.prototype,Element.prototype,HTMLElement.prototype];function se(t){var e;t:{for(e=0;er.assignedNodes.length&&(r.da=!0)}r.da&&(r.da=!1,bn(this,e))}for(n=this.o,e=[],r=0;re.indexOf(o))||e.push(o);for(n=0;n "+e})))}return{value:t=t.replace(Yr,(function(t,e,n){return'[dir="'+n+'"] '+e+", "+e+'[dir="'+n+'"]'})),Qa:e,stop:i}}(i,r,e,n),o=o||t.stop,r=t.Qa,i=t.value),r+i})),i&&(t=function(t,e){var n=t.split("\ue000");return e.reduce((function(t,e,o){return t+e+n[o+1]}),n[0])}(t,s)),r&&(t=Rr(t)),t},Ar.prototype.c=function(t){return t.match(Gr)?"":t.match(Jr)?this.b(t,qr):zr(t.trim(),qr)},r.Object.defineProperties(Ar.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var Fr=/:(nth[-\w]+)\(([^)]+)\)/,qr=":not(.style-scope)",Vr=",",Br=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Ur=/[[.:#*]/,Gr=":host",Wr=":root",Jr="::slotted",Zr=new RegExp("^("+Jr+")"),$r=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Xr=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Yr=/(.*):dir\((?:(ltr|rtl))\)/,Kr=".",Qr=":",ti="class",ei="should_not_match",ni=/:(?:matches|any|-(?:webkit|moz)-any)/,oi=new Ar;function ri(t,e,n,o){this.M=t||null,this.b=e||null,this.pa=n||[],this.T=null,this.X=o||"",this.a=this.I=this.O=null}function ii(t){return t?t.__styleInfo:null}function si(t,e){return t.__styleInfo=e}function ai(t){var e=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return e&&e.call(this,t)}ri.prototype.c=function(){return this.M},ri.prototype._getStyleRules=ri.prototype.c;var ci=navigator.userAgent.match("Trident");function li(){}function ui(t){if(!t.B){var e={},n={};di(t,n)&&(e.L=n,t.rules=null),e.cssText=t.parsedCssText.replace(_r,"").replace(ur,""),t.B=e}}function di(t,e){var n=t.B;if(!n){n=t.parsedCssText;for(var o;t=ur.exec(n);)"inherit"===(o=(t[2]||t[3]).trim())&&"unset"===o||(e[t[1].trim()]=o),o=!0;return o}if(n.L)return Object.assign(e,n.L),!0}function pi(t,e,n){return e&&(e=0<=e.indexOf(";")?hi(t,e,n):function t(e,n){var o=e.indexOf("var(");if(-1===o)return n(e,"","","");var r=Nr(e,o+3),i=e.substring(o+4,r);return o=e.substring(0,o),e=t(e.substring(r+1),n),-1===(r=i.indexOf(","))?n(o,i.trim(),"",e):n(o,i.substring(0,r).trim(),i.substring(r+1).trim(),e)}(e,(function(e,o,r,i){return o?((o=pi(t,n[o],n))&&"initial"!==o?"apply-shim-inherit"===o&&(o="inherit"):o=pi(t,n[r]||r,n)||r,e+(o||"")+i):e+i}))),e&&e.trim()||""}function hi(t,e,n){e=e.split(";");for(var o,r,i=0;i *"===i||"html"===i,a=0===i.indexOf(":host")&&!s;"shady"===n&&(a=!(s=i===r+" > *."+r||-1!==i.indexOf("html"))&&0===i.indexOf(r)),"shadow"===n&&(s=":host > *"===i||"html"===i,a=a&&!s),(s||a)&&(n=r,a&&(e.F||(e.F=Pr(oi,e,oi.b,t?Kr+t:"",r)),n=e.F||r),o({ra:n,Wa:a,xb:s}))}}(t,e,r,(function(r){ai.call(t.lb||t,r.ra)&&(r.Wa?di(e,n):di(e,o))}))}),null,!0),{$a:o,Ua:n}}function _i(t,e,n,o){var r=Tr(e),i=Ir(r.is,r.X),s=new RegExp("(?:^|[^.#[:])"+(e.extends?"\\"+i.slice(0,-1)+"\\]":i)+"($|[.:[\\s>+~])"),a=function(t,e){t=t.b;var n={};if(!ar&&t)for(var o=0,r=t[o];o=l._useCount&&l.parentNode&&l.parentNode.removeChild(l)),ar?i.a?(i.a.textContent=r,o=i.a):r&&(o=wr(r,a,t.shadowRoot,i.b)):o?o.parentNode||(ci&&-1e&&-1==[34,35,60,62,63,96].indexOf(e)?t:encodeURIComponent(t)}function o(t){var e=t.charCodeAt(0);return 32e&&-1==[34,35,60,62,96].indexOf(e)?t:encodeURIComponent(t)}function r(t,r,s){function a(t){g.push(t)}var c=r||"scheme start",h=0,f="",_=!1,m=!1,g=[];t:for(;(null!=t[h-1]||0==h)&&!this.i;){var v=t[h];switch(c){case"scheme start":if(!v||!d.test(v)){if(r){a("Invalid scheme.");break t}f="",c="no scheme";continue}f+=v.toLowerCase(),c="scheme";break;case"scheme":if(v&&p.test(v))f+=v.toLowerCase();else{if(":"!=v){if(r){null!=v&&a("Code point not allowed in scheme: "+v);break t}f="",h=0,c="no scheme";continue}if(this.h=f,f="",r)break t;void 0!==l[this.h]&&(this.D=!0),c="file"==this.h?"relative":this.D&&s&&s.h==this.h?"relative or authority":this.D?"authority first slash":"scheme data"}break;case"scheme data":"?"==v?(this.u="?",c="query"):"#"==v?(this.C="#",c="fragment"):null!=v&&"\t"!=v&&"\n"!=v&&"\r"!=v&&(this.na+=n(v));break;case"no scheme":if(s&&void 0!==l[s.h]){c="relative";continue}a("Missing scheme."),i.call(this),this.i=!0;break;case"relative or authority":if("/"!=v||"/"!=t[h+1]){a("Expected /, got: "+v),c="relative";continue}c="authority ignore slashes";break;case"relative":if(this.D=!0,"file"!=this.h&&(this.h=s.h),null==v){this.j=s.j,this.s=s.s,this.l=s.l.slice(),this.u=s.u,this.v=s.v,this.g=s.g;break t}if("/"==v||"\\"==v)"\\"==v&&a("\\ is an invalid code point."),c="relative slash";else if("?"==v)this.j=s.j,this.s=s.s,this.l=s.l.slice(),this.u="?",this.v=s.v,this.g=s.g,c="query";else{if("#"!=v){c=t[h+1];var b=t[h+2];("file"!=this.h||!d.test(v)||":"!=c&&"|"!=c||null!=b&&"/"!=b&&"\\"!=b&&"?"!=b&&"#"!=b)&&(this.j=s.j,this.s=s.s,this.v=s.v,this.g=s.g,this.l=s.l.slice(),this.l.pop()),c="relative path";continue}this.j=s.j,this.s=s.s,this.l=s.l.slice(),this.u=s.u,this.C="#",this.v=s.v,this.g=s.g,c="fragment"}break;case"relative slash":if("/"!=v&&"\\"!=v){"file"!=this.h&&(this.j=s.j,this.s=s.s,this.v=s.v,this.g=s.g),c="relative path";continue}"\\"==v&&a("\\ is an invalid code point."),c="file"==this.h?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=v){a("Expected '/', got: "+v),c="authority ignore slashes";continue}c="authority second slash";break;case"authority second slash":if(c="authority ignore slashes","/"!=v){a("Expected '/', got: "+v);continue}break;case"authority ignore slashes":if("/"!=v&&"\\"!=v){c="authority";continue}a("Expected authority, got: "+v);break;case"authority":if("@"==v){for(_&&(a("@ already seen."),f+="%40"),_=!0,v=0;v=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(184),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(15))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var o,r,i,s,a,c=1,l={},u=!1,d=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?o=function(t){e.nextTick((function(){f(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((i=new MessageChannel).port1.onmessage=function(t){f(t.data)},o=function(t){i.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(r=d.documentElement,o=function(t){var e=d.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,r.removeChild(e),e=null},r.appendChild(e)}):o=function(t){setTimeout(f,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&f(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),o=function(e){t.postMessage(s+e,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n0)m=t(e,n,f,i(f.length),m,d-1)-1;else{if(m>=9007199254740991)throw TypeError();e[m]=f}m++}g++}return m}},function(t,e,n){var o=n(190);t.exports=function(t,e){return new(o(t))(e)}},function(t,e,n){var o=n(6),r=n(51),i=n(0)("species");t.exports=function(t){var e;return r(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!r(e.prototype)||(e=void 0),o(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},,,,,,,function(t,e,n){"use strict";n.r(e);const o=new WeakMap,r=t=>(...e)=>{const n=t(...e);return o.set(n,!0),n},i=t=>"function"==typeof t&&o.has(t),s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,a=(t,e,n=null,o=null)=>{for(;e!==n;){const n=e.nextSibling;t.insertBefore(e,o),e=n}},c=(t,e,n=null)=>{for(;e!==n;){const n=e.nextSibling;t.removeChild(e),e=n}},l={},u={},d=`{{lit-${String(Math.random()).slice(2)}}}`,p=`\x3c!--${d}--\x3e`,h=new RegExp(`${d}|${p}`),f="$lit$";class _{constructor(t,e){this.parts=[],this.element=e;const n=[],o=[],r=document.createTreeWalker(e.content,133,null,!1);let i=0,s=-1,a=0;const{strings:c,values:{length:l}}=t;for(;a0;){const e=c[a],n=b.exec(e)[2],o=n.toLowerCase()+f,r=t.getAttribute(o);t.removeAttribute(o);const i=r.split(h);this.parts.push({type:"attribute",index:s,name:n,strings:i}),a+=i.length-1}}"TEMPLATE"===t.tagName&&(o.push(t),r.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(d)>=0){const o=t.parentNode,r=e.split(h),i=r.length-1;for(let e=0;e{const n=t.length-e.length;return n>=0&&t.slice(n)===e},g=t=>-1!==t.index,v=()=>document.createComment(""),b=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;class y{constructor(t,e,n){this.__parts=[],this.template=t,this.processor=e,this.options=n}update(t){let e=0;for(const n of this.__parts)void 0!==n&&n.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const t=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=[],n=this.template.parts,o=document.createTreeWalker(t,133,null,!1);let r,i=0,a=0,c=o.nextNode();for(;i-1||n)&&-1===t.indexOf("--\x3e",r+1);const i=b.exec(t);e+=null===i?t+(n?w:p):t.substr(0,i.index)+i[1]+i[2]+f+i[3]+d}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");return t.innerHTML=this.getHTML(),t}}class E extends x{getHTML(){return`${super.getHTML()}`}getTemplateElement(){const t=super.getTemplateElement(),e=t.content,n=e.firstChild;return e.removeChild(n),a(e,n.firstChild),t}}const S=t=>null===t||!("object"==typeof t||"function"==typeof t),N=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class O{constructor(t,e,n){this.dirty=!0,this.element=t,this.name=e,this.strings=n,this.parts=[];for(let t=0;tthis.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;i(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=l,t(this)}if(this.__pendingValue===l)return;const t=this.__pendingValue,e=this.value,n=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),o=null!=t&&(null==e||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),o&&(this.__options=M(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=l}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const M=t=>t&&(L?{capture:t.capture,passive:t.passive,once:t.once}:t.capture);class I{handleAttributeExpressions(t,e,n,o){const r=e[0];if("."===r){return new k(t,e.slice(1),n).parts}return"@"===r?[new D(t,e.slice(1),o.eventContext)]:"?"===r?[new A(t,e.slice(1),n)]:new O(t,e,n).parts}handleTextExpression(t){return new C(t)}}const P=new I;function R(t){let e=z.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},z.set(t.type,e));let n=e.stringsArray.get(t.strings);if(void 0!==n)return n;const o=t.strings.join(d);return n=e.keyString.get(o),void 0===n&&(n=new _(t,t.getTemplateElement()),e.keyString.set(o,n)),e.stringsArray.set(t.strings,n),n}const z=new Map,H=new WeakMap,F=(t,e,n)=>{let o=H.get(e);void 0===o&&(c(e,e.firstChild),H.set(e,o=new C(Object.assign({templateFactory:R},n))),o.appendInto(e)),o.setValue(t),o.commit()};n.d(e,"html",(function(){return q})),n.d(e,"svg",(function(){return V})),n.d(e,"DefaultTemplateProcessor",(function(){return I})),n.d(e,"defaultTemplateProcessor",(function(){return P})),n.d(e,"directive",(function(){return r})),n.d(e,"isDirective",(function(){return i})),n.d(e,"removeNodes",(function(){return c})),n.d(e,"reparentNodes",(function(){return a})),n.d(e,"noChange",(function(){return l})),n.d(e,"nothing",(function(){return u})),n.d(e,"AttributeCommitter",(function(){return O})),n.d(e,"AttributePart",(function(){return T})),n.d(e,"BooleanAttributePart",(function(){return A})),n.d(e,"EventPart",(function(){return D})),n.d(e,"isIterable",(function(){return N})),n.d(e,"isPrimitive",(function(){return S})),n.d(e,"NodePart",(function(){return C})),n.d(e,"PropertyCommitter",(function(){return k})),n.d(e,"PropertyPart",(function(){return j})),n.d(e,"parts",(function(){return H})),n.d(e,"render",(function(){return F})),n.d(e,"templateCaches",(function(){return z})),n.d(e,"templateFactory",(function(){return R})),n.d(e,"TemplateInstance",(function(){return y})),n.d(e,"SVGTemplateResult",(function(){return E})),n.d(e,"TemplateResult",(function(){return x})),n.d(e,"createMarker",(function(){return v})),n.d(e,"isTemplatePartActive",(function(){return g})),n.d(e,"Template",(function(){return _})),(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const q=(t,...e)=>new x(t,e,"html",P),V=(t,...e)=>new E(t,e,"svg",P)},function(t,e,n){"use strict";n.r(e);var o={};n.r(o),n.d(o,"CONFIG_ALIASES",(function(){return r})),n.d(o,"CONFIG_VALID_KEYS",(function(){return i})),n.d(o,"SORT_ORDERS",(function(){return c})),n.d(o,"SORT_ORDER_IDS",(function(){return l})),n.d(o,"TYPE_AGGREGATES",(function(){return u})),n.d(o,"FILTER_OPERATORS",(function(){return d})),n.d(o,"COLUMN_SEPARATOR_STRING",(function(){return m})),n.d(o,"TYPE_FILTERS",(function(){return g}));n(48),n(18);const r={row_pivot:"row_pivots","row-pivot":"row_pivots","row-pivots":"row_pivots",col_pivot:"column_pivots",col_pivots:"column_pivots",column_pivot:"column_pivots","column-pivot":"column_pivots","column-pivots":"column_pivots",filters:"filter",sorts:"sort"},i=["viewport","row_pivots","column_pivots","aggregates","columns","filter","sort","row_pivot_depth","filter_op"],s=["any","avg","count","distinct count","dominant","first by index","last by index","last","high","low","mean","mean by count","median","pct sum parent","pct sum grand total","sum","sum abs","sum not null","unique"],a=["any","count","distinct count","distinct leaf","dominant","first by index","last by index","last","mean by count","unique"],c=["none","asc","desc","col asc","col desc","asc abs","desc abs","col asc abs","col desc abs"],l=[2,0,1,0,1,3,4,3,4],u={string:a,float:s,integer:s,boolean:["any","count","distinct count","distinct leaf","dominant","first by index","last by index","last","mean by count","unique","and","or"],datetime:a,date:a},d={lessThan:"<",greaterThan:">",equals:"==",lessThanOrEquals:"<=",greaterThanOrEquals:">=",doesNotEqual:"!=",isNull:"is null",isNotNull:"is not null",isIn:"in",isNotIn:"not in",contains:"contains",bitwiseAnd:"&",bitwiseOr:"|",and:"and",or:"or",beginsWith:"begins with",endsWith:"ends with"},p=[d.bitwiseAnd,d.bitwiseOr,d.equals,d.doesNotEqual,d.or,d.and,d.isNull,d.isNotNull],h=[d.lessThan,d.greaterThan,d.equals,d.lessThanOrEquals,d.greaterThanOrEquals,d.doesNotEqual,d.isNull,d.isNotNull],f=[d.equals,d.contains,d.doesNotEqual,d.isIn,d.isNotIn,d.beginsWith,d.endsWith,d.isNull,d.isNotNull],_=[d.lessThan,d.greaterThan,d.equals,d.lessThanOrEquals,d.greaterThanOrEquals,d.doesNotEqual,d.isNull,d.isNotNull],m="|",g={string:f,float:h,integer:h,boolean:p,datetime:_,date:_};var v=n(22);n(62);const b=new WeakMap;let y=0;function w(t,e){return function(){let n,o=()=>{},r=Array.prototype.slice.call(arguments,0,arguments.length);for(let t=r.length-1;t>=0;t--)"function"==typeof r[t]&&(n=r.splice(t,1)[0]);const i=b.get(n);b.delete(n);let s={cmd:e||"view_method",name:this._name,method:t,args:r,subscribe:!0,callback_id:i};this._worker.post(s,n,o),this._worker.unsubscribe(e,n)}}function x(t,e){return function(){let n,o=()=>{},r=Array.prototype.slice.call(arguments,0,arguments.length);for(let t=r.length-1;t>=0;t--)"function"==typeof r[t]&&(n=r.splice(t,1)[0]);y++,b.set(n,y);let i={cmd:e||"view_method",name:this._name,method:t,args:r,subscribe:!0,callback_id:y};this._worker.post(i,n,o,!0)}}function E(t,e){return function(){var n=Array.prototype.slice.call(arguments,0,arguments.length);return new Promise(function(o,r){var i={cmd:e||"view_method",name:this._name,method:t,args:n,subscribe:!1};this._worker.post(i,o,r)}.bind(this))}}n(63);function S(t){let e=t;do{for(const n of Object.getOwnPropertyNames(e)){const e=t[n];"constructor"!==n&&"function"==typeof e&&(t[n]=e.bind(t))}}while(e=e!==Object&&Object.getPrototypeOf(e))}n(100);function N(t,e,n){this._worker=t,this._name=Math.random()+"";var o={cmd:"view",view_name:this._name,table_name:e,config:n};this._worker.post(o),S(this)}function O(t,e){this._worker=t,this._name=e}function T(t,e,n){this._worker=t;let o=n.name||Math.random()+"";if(this._name=o,S(this),e.to_arrow){var r={cmd:"table",name:o,args:[],options:n||{}};this._worker.post(r),e.to_arrow().then(t=>{var r={cmd:"table",name:o,args:[t],options:n||{}};this._worker.post(r),e.on_update(this.update,{mode:"row"})})}else{r={cmd:"table",name:o,args:[e],options:n||{}};this._worker.post(r)}}function C(t,e,n){this._worker=t,this._name=Math.random()+"";let o=n;for(let t=0;tthis.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 n=Object(this),o=n.length>>>0;if(0===o)return!1;var r,i,s=0|e,a=Math.max(s>=0?s:o-Math.abs(s),0);for(;a{var o={name:this._name,cmd:"table_method",method:"update",args:[t]};this._worker.post(o,e,n,!1)})},T.prototype.execute=function(t){var e={cmd:"table_execute",name:this._name,f:t.toString()};this._worker.post(e)};class k{constructor(){this._initialized=!1,this._worker={initialized:{value:!1},transferable:!1,msg_id:0,handlers:{},messages:[]},S(this)}unsubscribe(t,e){for(let t of Object.keys(this._worker.handlers))this._worker.handlers[t].resolve===e&&delete this._worker.handlers[t]}post(t,e,n,o=!1){(e||n)&&(this._worker.handlers[++this._worker.msg_id]={resolve:e,reject:n,keep_alive:o}),t.id=this._worker.msg_id,this._worker.initialized.value?this.send(t):this._worker.messages.push(()=>this.send(t))}initialize_profile_thread(){this._worker.initialized.value?this.send({id:-1,cmd:"init_profile_thread"}):this._worker.messages.push(()=>this.send({id:-1,cmd:"init_profile_thread"}))}send(){throw new Error("send() not implemented")}open_table(t){return new A(this,t)}open_view(t){return new O(this,t)}_handle(t){if(!this._worker.initialized.value){if(!this._initialized&&"undefined"!=typeof document&&document&&void 0!==typeof window&&window){try{const t=document.createEvent("Event");t.initEvent("perspective-ready",!1,!0),window.dispatchEvent(t)}catch(t){}this._initialized=!0}const e=this._worker.messages;if(this._worker.initialized.value=!0,this._worker.messages=[],e)for(const t in e)e.hasOwnProperty(t)&&e[t]()}if(t.data.id){var e=this._worker.handlers[t.data.id];e&&(t.data.error?e.reject(t.data.error):e.resolve(t.data.data),e.keep_alive||delete this._worker.handlers[t.data.id])}}table(t,e){return new T(this,t,e||{})}terminate(){this._worker.terminate(),this._worker=void 0}}var j=n(79),L=n.n(j),D=n(80),M=n.n(D);const I=15e3,P=new class{_fetch(t){return new Promise(e=>{let n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=()=>{e(n.response)},n.send(null)})}set({wasm:t,worker:e}){this._wasm=t||this._wasm,this._worker=e||this._worker}worker(){return(this._worker||L.a)()}async wasm(){return this._wasm||(this._wasm=await this._fetch(M.a)),this._wasm}};class R extends k{constructor(t){t&&Object(v.override_config)(t),super(),this.register()}async register(){let t;const e={cmd:"init",config:Object(v.get_config)()};if("undefined"==typeof WebAssembly)throw new Error("WebAssembly not supported. Support for ASM.JS has been removed as of 0.3.1.");for(var n in[t,e.buffer]=await Promise.all([P.worker(),P.wasm()]),this._worker)t[n]=this._worker[n];this._worker=t,this._worker.addEventListener("message",this._handle.bind(this)),this._worker.postMessage(e),this._detect_transferable()}send(t){this._worker.transferable&&t.args&&t.args[0]instanceof ArrayBuffer?this._worker.postMessage(t,t.args):this._worker.postMessage(t)}terminate(){this._worker.terminate(),this._worker=void 0}_detect_transferable(){var t=new ArrayBuffer(1);this._worker.postMessage(t,[t]),this._worker.transferable=0===t.byteLength,this._worker.transferable?console.log("Transferable support detected"):console.warn("Transferable support not detected")}}class z extends k{constructor(t){super(),this._ws=new WebSocket(t),this._ws.binaryType="arraybuffer",this._ws.onopen=()=>{this.send({id:-1,cmd:"init"})};const e=()=>{this._ws.send("heartbeat"),setTimeout(e,I)};setTimeout(e,15e3),this._ws.onmessage=t=>{"heartbeat"!==t.data&&(this._pending_arrow?(this._handle({data:{id:this._pending_arrow,data:t.data}}),delete this._pending_arrow):(t=JSON.parse(t.data)).is_transferable?this._pending_arrow=t.id:this._handle({data:t}))}}send(t){this._ws.send(JSON.stringify(t))}terminate(){this._ws.close()}}const H=function(){let t,e;return{getInstance:function(n){void 0===t&&(t=new R(n));const o=JSON.stringify(n);if(e&&o!==e)throw new Error("Confiuration object for shared_worker() has changed - this is probably a bug in your application.");return e=o,t}}}();document.currentScript&&document.currentScript.hasAttribute("preload")&&H.getInstance();const F={override:t=>P.set(t),worker:t=>new R(t),websocket:(t=window.location.origin.replace("http","ws"))=>new z(t),shared_worker:t=>H.getInstance(t)};for(let t of Object.keys(o))F[t]=o[t];e.default=F}])})); //# sourceMappingURL=perspective-viewer.js.map