To update this file, please use a bundler to expose the worker object with window.Worker = worker().*/
(()=>{vare={748:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>Y,get_type_config:()=>B,override:()=>D,shared_worker:()=>J,websocket:()=>U,worker:()=>V});varo=r(488),i=r.n(o);consts=r.p+"97b00c61a5be7eb2e2c8.wasm";varn=Object.defineProperty,a={};((e,t)=>{for(varrint)n(e,r,{get:t[r],enumerable:!0})})(a,{COLUMN_SEPARATOR_STRING:()=>v,CONFIG_ALIASES:()=>_,CONFIG_VALID_KEYS:()=>h,DATA_TYPES:()=>l,FILTER_OPERATORS:()=>g,SORT_ORDERS:()=>u,SORT_ORDER_IDS:()=>c,TYPE_AGGREGATES:()=>m,TYPE_FILTERS:()=>k});varl={integer:"integer",float:"float",string:"string",boolean:"boolean",date:"date",datetime:"datetime",object:"object"},_={row_pivot:"group_by","row-pivot":"group_by","row-pivots":"group_by",col_pivot:"split_by",col_pivots:"split_by",column_pivot:"split_by","column-pivot":"split_by","column-pivots":"split_by",filters:"filter",sorts:"sort"},h=["version","viewport","group_by","split_by","aggregates","columns","filter","sort","computed_columns","expressions","group_by_depth","split_by_depth","filter_op"],d=["any","avg","abs sum","count","distinct count","dominant","first by index","last by index","last minus first","last","high","join","low","high minus low","max","mean","median","min","pct sum parent","pct sum grand total","stddev","sum","sum abs","sum not null","unique","var"],p=["any","count","distinct count","distinct leaf","dominant","first by index","join","last by index","last","unique"],u=["none","asc","desc","col asc","col desc","asc abs","desc abs","col asc abs","col desc abs"],c=[2,0,1,0,1,3,4,3,4],m={string:p,float:d,integer:d,boolean:["any","count","distinct count","distinct leaf","dominant","first by index","last by index","last","unique"],datetime:p,date:p},g={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"},f=[g.bitwiseAnd,g.bitwiseOr,g.equals,g.doesNotEqual,g.or,g.and,g.isNull,g.isNotNull],y=[g.lessThan,g.greaterThan,g.equals,g.lessThanOrEquals,g.greaterThanOrEquals,g.doesNotEqual,g.isNull,g.isNotNull],b=[g.equals,g.contains,g.doesNotEqual,g.isIn,g.isNotIn,g.beginsWith,g.endsWith,g.isNull,g.isNotNull],w=[g.lessThan,g.greaterThan,g.equals,g.lessThanOrEquals,g.greaterThanOrEquals,g.doesNotEqual,g.isNull,g.isNotNull],v="|",k={string:b,float:y,integer:y,boolean:f,datetime:w,date:w},E={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:{dateStyle:"short",timeStyle:"medium"},null_value:-1},date:{filter_operator:"==",aggregate:"count",format:{dateStyle:"short"},null_value:-1}}};functionO(e){returne&&"object"==typeofe&&!Array.isArray(e)}functionT(e,...t){if(!t.length)returne;letr=t.shift();if(O(e)&&O(r))for(lettinr)O(r[t])?(e[t]||Object.assign(e,{[t]:{}}),T(e[t],r[t])):Object.assign(e,{[t]:r[t]});returnT(e,...t)}functionN(){returnglobalThis.__PERSPECTIVE_CONFIG__||(globalThis.__PERSPECTIVE_CONFIG__=T(E,globalThis.__TEMPLATE_CONFIG__||{})),globalThis.__PERSPECTIVE_CONFIG__}varS=newWeakMap,P=0;functionA(e,t){returnfunction(){letr,o=Array.prototype.slice.call(arguments,0,arguments.length);for(lete=o.length-1;e>=0;e--)"function"==typeofo[e]&&(r=o.splice(e,1)[0]);leti=S.get(r);S.delete(r);lets={cmd:t||"view_method",name:this._name,method:e,args:o,subscribe:!0,callback_id:i};this._worker.post(s,r,(()=>{})),this._worker.unsubscribe(t,r)}}functionj(e,t){returnfunction(){letr,o=Array.prototype.slice.call(arguments,0,arguments.length);for(lete=o.length-1;e>=0;e--)"function"==typeofo[e]&&(r=o.splice(e,1)[0]);P++,S.set(r,P);leti={cmd:t||"view_method",name:this._name,method:e,args:o,subscribe:!0,callback_id:P};this._worker.post(i,r,(()=>{}),!0)}}functionx(e,t){returnfunction(){varr=Array.prototype.slice.call(arguments,0,arguments.length);returnnewPromise(function(o,i){vars={cmd:t||"view_method",name:this._name,method:e,args:r,subscribe:!1};this._worker.post(s,o,i)}.bind(this))}}functionI(e,t,r){returnnewPromise(((o,i)=>{this._worker=e,this._name=Math.random()+"",this._worker.post({cmd:"view",view_name:this._name,table_name:t,config:r},(()=>{o(this)}),i),!0===this._worker._initialized&&!this._worker._features?.wait_for_response&&o(this)}))}functionq(e){lett=e;do{for(letrofObject.getOwnPropertyNames(t)){lett=e[r];"constructor"!==r&&"function"==typeoft&&(e[r]=t.bind(e))}}while(t=t!==Object&&Object.getPrototypeOf(t))}functionR(e,t,r){returnnewPromise(((o,i)=>{this._worker=e,this._name=r.name||Math.random()+"",q(this),t.to_arrow?(this._worker.post({cmd:"table",name:this._name,args:[],options:r||{}}),t.to_arrow().then((e=>{this._worker.post({cmd:"table",name:this._name,args:[e],options:r||{}},(()=>{t.on_update((e=>{this.update(e.delta)}),{mode:"row"}),o(this)}),i)}))):this._worker.post({cmd:"table",name:this._name,args:[t],options:r||{}},(()=>{o(this)}),i),!0===this._worker._initialized&&!this._worker._features?.wait_for_response&&o(this)}))}functionC(e,t){this._worker=e,this._name=t}I.prototype,I.prototype.get_config=x("get_config"),I.prototype.get_min_max=x("get_min_max"),I.prototype.to_json=x("to_json"),I.prototype.to_arrow=x("to_arrow"),I.prototype.to_columns=x("to_columns"),I.prototype.to_columns_string=x("to_columns_string"),I.prototype.to_csv=x("to_csv"),I.prototype.schema=x("schema"),I.prototype.expression_schema=x("expression_schema"),I.prototype.column_paths=x("column_paths"),I.prototype.num_columns=x("num_columns"),I.prototype.num_rows=x("num_rows"),I.prototype.dimensions=x("dimensions"),I.prototype.set_depth=x("set_depth"),I.prototype.get_row_expanded=x("get_row_expanded"),I.prototype.expand=x("expand"),I.prototype.collapse=x("collapse"),I.prototype.delete=x("delete"),I.prototype.col_to_js_typed_array=x("col_to_js_typed_array"),I.prototype.on_update=j("on_update","view_method"),I.prototype.remove_update=A("remove_update","view_method"),I.prototype.on_delete=j("on_delete","view_method"),I.prototype.remove_delete=A("remove_delete","view_method"),String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeoft&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)thrownewTypeError('"this" is null or not defined');varr=Object(this),o=r.length>>>0;if(0===o)return!1;for(vari,s,n=0|t,a=Math.max(n>=0?n:o-Math.abs(n),0);a<o;){if((i=r[a])===(s=e)||"number"==typeofi&&"number"==typeofs&&isNaN(i)&&isNaN(s))return!0;a++}return!1}}),R.prototype.type="table",C.prototype=R.prototype,R.prototype.view=function(e){returnnewI(this._worker,this._name,e)},R.prototype.query_columns=x("query_columns","table_method"),R.prototype.get_index=x("get_index","table_method"),R.prototype.get_limit=x("get_limit","table_method"),R.prototype.get_num_views=x("get_num_views","table_method"),R.prototype.make_port=x("make_port","table_method"),R.prototype.remove_port=x("remove_port","table_method"),R.prototype.schema=x("schema","table_method"),R.prototype.validate_expressions=x("validate_expressions","table_method"),R.prototype.is_valid_filter=x("is_valid_filter","table_method"),R.prototype.size=x("size","table_method"),R.prototype.num_rows=x("num_rows","table_method"),R.prototype.num_columns=x("num_columns","table_method"),R.prototype.columns=x("columns","table_method"),R.prototype.clear=x("clear","table_method"),R.prototype.replace=x("replace","table_method"),R.prototype.delete=x("delete","table_method"),R.prototype.on_delete=j("on_delete","table_method"),R.prototype.remove=x("remove","table_method"),R.prototype.remove_delete=A("remove_delete","table_method"),R.prototype.update=function(e,t){returnnewPromise(((r,o)=>{this._worker.post({name:this._name,cmd:"table_method",method:"update",args:[e,t||{}]},r,o,!1)}))},R.prototype.execute=function(e){this._worker.post({cmd:"table_execute",name:this._name,f:e.toString()})};varz=class{constructor(){this._initialized=!1,this._worker={initialized:{value:!1},transferable:!1,msg_id:0,handlers:{},messages:[]},q(this)}unsubscribe(e,t){for(leteofObject.keys(this._worker.handlers))this._worker.handlers[e].resolve===t&&deletethis._worker.handlers[e]}post(e,t,r,o=!1){++this._worker.msg_id,(t||r)&&(this._worker.handlers[this._worker.msg_id]={resolve:t,reject:r,keep_alive:o}),e.id=this._worker.msg_id,this._worker.initialized.value?this.send(e):this._worker.messages.push((()=>{this.send(e),("table"===e.cmd||"view"===e.cmd)&&!this._features?.wait_for_response&&t&&t()}))}asyncmemory_usage(){returnawaitnewPromise(((e,t)=>{this.post({cmd:"memory_usage"},e,t)}))}asyncget_hosted_table_names(){returnawaitnewPromise(((e,t)=>{this.post({cmd:"get_hosted_table_names"},e,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(){thrownewError("send() not implemented")}asyncopen_table(e){returnnewC(this,e)}_handle(e){if(!this._worker.initialized.value){this._initialized||(this._initialized=!0);lett=this._worker.messages;if(this._worker.initialized.value=!0,this._worker.messages=[],e.data?.data){this._features={};for(lettofe.data.data)this._features[t]=!0}if(t)for(leteint)t.hasOwnProperty(e)&&t[e]()}if(e.data.id){lett=this._worker.handlers[e.data.id];t&&(e.data.error?t.reject(e.data.error):t.resolve(e.data.data),t.keep_alive||deletethis._worker.handlers[e.data.id])}}table(e,t){returnnewR(this,e,t||{})}terminate(){this._worker.terminate(),this._worker=void0}},L=classextendsz{_ping(){this._ping_loop&&this._ws.send("ping"),this._ping_loop=setTimeout(this._ping.bind(this),3e4)}_close(){clearTimeout(this._ping_loop),this._ping_loop=void0,this._on_close_callback?.()}_onmessage(e){if("pong"!==e.data)if(this._pending_binary){lett=e.data;if(this._full_binary.set(newUint8Array(t),this._total_chunk_length),this._total_chunk_length+=t.byteLength,this._total_chunk_length!==this._pending_binary_length)return;t=this._full_binary.buffer;letr={data:{id:this._pending_binary,data:t}};if(void0!==this._pending_port_id){lete={port_id:this._pending_port_id,delta:t};r.data.data=e}this._handle(r),deletethis._pending_binary,deletethis._pending_binary_length,deletethis._pending_port_id,this._total_chunk_length=0,this._full_binary=null}else(e=JSON.parse(e.data)).binary_length?(this._pending_binary=e.id,this._pending_binary_length=e.binary_length,e.data&&void0!==e.data.port_id&&(this._pending_port_id=e.data.port_id),this._full_binary=newUint8Array(this._pending_binary_length)):this._handle({data:e})}constructor(e){super(),this._ws=e,this._ws.binaryType="arraybuffer",this._full_binary,this._total_chunk_length=0,this._pending_binary_length=0,this._ws.onopen=()=>{this.send({id:-1,cmd:"init"})},this._ping(),this._ws.onclose=this._close.bind(this),this._ws.onmessage=this._onmessage.bind(this)}send(e){if(this._ws.readyState!==i().CLOSED){if(e.args&&e.args.length>0&&e.args[0]instanceofArrayBuffer&&void0!==e.args[0].byteLength){lett=e;returne.binary_length=e.args[0].byteLength,this._ws.send(JSON.stringify(t)),voidthis._ws.send(e.args[0])}this._ws.send(JSON.stringify(e))}elseconsole.warn("Websocket connection is already closed.")}terminate(){returnnewPromise((e=>{this._on_close_callback=e,this._ws.close()}))}},M=!1,F=function(){lete;returnfunction(){returne||(e=newclass{asyncworker(){returnawaitnewWorker(r.p+"perspective.worker.js")}asyncwasm(){lete=awaits;if(einstanceofArrayBuffer&&!e.buffer&&(e=newUint8Array(e)),e.buffer&&e.bufferinstanceofArrayBuffer)M=!0,length=e.byteLength,this._wasm=e;elseif(einstanceofArrayBuffer)length=e.byteLength,this._wasm=newUint8Array(e);else{lett=awaitfetch(e);this._wasm=awaitt.arrayBuffer()}returnthis._wasm}}),e}}(),G=classextendsz{constructor(e){vart;e&&(t=e,globalThis.__PERSPECTIVE_CONFIG__&&console.warn("Config already initialized!"),globalThis.__PERSPECTIVE_CONFIG__=T(E,t)),super(),this.register()}asyncregister(){lete,t={cmd:"init",config:N()};if(typeofWebAssembly>"u")thrownewError("WebAssembly not supported.");for(varrin[e,t.buffer]=awaitPromise.all([F().worker(),F().wasm()]),this._worker)e[r]=this._worker[r];this._worker=e,this._worker.addEventListener("message",this._handle.bind(this)),this._worker.postMessage(t),this._detect_transferable()}send(e){this._worker.transferable&&e.args&&e.args[0]instanceofArrayBuffer?this._worker.postMessage(e,[e.args[0]]):this._worker.postMessage(e)}terminate(){this._worker.terminate(),this._worker=void0}gettransferable(){returnthis._worker?.transferable||!1}getinline(){returnM}_detect_transferable(){vare=newArrayBuffer(1);this._worker.postMessage(e,[e]),this._worker.transferable=0===e.byteLength}},W=function(){lete,t;return{getInstance:function(r){void0===e&&(e=newG(r));leto=JSON.stringify(r);if(t&&o!==t)thrownewError("Configuration object for shared_worker() has changed - this is probably a bug in your application.");returnt=o,e}}}(),B=functione(t){letr={};if(N().types[t]&&Object.assign(r,N().types[t]),r.type){lett=e(r.type);returnObject.assign(t,r),t}returnr};functionD(e){returnF().set(e)}functionV(e){returnnewG(e)}functionU(e=window.location.origin.replace("http","ws")){returnnewL(newWebSocket(e))}functionJ(e){returnW.getInstance(e)}varY={override:D,worker:V,websocket:U,shared_worker:J,...Object.keys(a)}},488:e=>{"use strict";e.exports=function(){thrownewError("ws does not work in the browser. Browser clients must use the native WebSocket object")}}},t={};functionr(o){vari=t[o];if(void0!==i)returni.exports;vars=t[o]={exports:{}};returne[o](s,s.exports,r),s.exports}r.n=e=>{vart=e&&e.__esModule?()=>e.default:()=>e;returnr.d(t,{a:t}),t},r.d=(e,t)=>{for(varoint)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.g=function(){if("object"==typeofglobalThis)returnglobalThis;try{returnthis||newFunction("return this")()}catch(e){if("object"==typeofwindow)returnwindow}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{vare;r.g.importScripts&&(e=r.g.location+"");vart=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){varo=t.getElementsByTagName("script");if(o.length)for(vari=o.length-1;i>-1&&!e;)e=o[i--].src}if(!e)thrownewError("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{conste=r(748);window.Worker=e.worker()})()})();