@pennsieve-viz/tsviewer 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BFLibraryButton-zWDUe3E8.cjs → BFLibraryButton-ClRfrYOf.cjs} +1 -1
- package/dist/{BFLibraryButton-DEY9t1Is.js → BFLibraryButton-DzzWe3Ya.js} +1 -1
- package/dist/{IconSelection-IJR6hdts.js → IconSelection-Bnm4c-Az.js} +1 -1
- package/dist/{IconSelection-DsOecTVD.cjs → IconSelection-CYX2jlGW.cjs} +1 -1
- package/dist/TSAnnotationCanvas-BCu7PmSh.cjs +1 -0
- package/dist/TSAnnotationCanvas-Cua-lW6X.js +704 -0
- package/dist/{TSAnnotationModal-DpLHrHfV.js → TSAnnotationModal-7GxnJomu.js} +3 -3
- package/dist/{TSAnnotationModal-DkLaOB7u.cjs → TSAnnotationModal-BVDkiUQ1.cjs} +1 -1
- package/dist/{TSFilterModal-C1-o1zyF.js → TSFilterModal-1E2UWL8T.js} +3 -3
- package/dist/{TSFilterModal-DsVcUoIk.cjs → TSFilterModal-BVfwi0tb.cjs} +1 -1
- package/dist/TSScrubber-CBKcwuMb.js +374 -0
- package/dist/TSScrubber-DBWjIhSE.cjs +1 -0
- package/dist/{TSViewerCanvas-A6HgBZ4E.js → TSViewerCanvas-D_RaJ4Mj.js} +1865 -1931
- package/dist/TSViewerCanvas-gjfcQXDY.cjs +11 -0
- package/dist/{TSViewerLayerWindow-Dnij6c3F.js → TSViewerLayerWindow-COWXfHNB.js} +2 -2
- package/dist/{TSViewerLayerWindow-Cu8yQKRU.cjs → TSViewerLayerWindow-D5j3_B1E.cjs} +1 -1
- package/dist/{TSViewerToolbar-CO68rvXF.js → TSViewerToolbar-Cb2W7W6J.js} +1 -1
- package/dist/{TSViewerToolbar-_NqUlS08.cjs → TSViewerToolbar-ep_lZr6h.cjs} +1 -1
- package/dist/{TsAnnotationDeleteDialog-D9eQGzqE.js → TsAnnotationDeleteDialog-B9pQMYZo.js} +3 -3
- package/dist/{TsAnnotationDeleteDialog-fM5Y7SRB.cjs → TsAnnotationDeleteDialog-BRIgCXxU.cjs} +1 -1
- package/dist/index-BU6e_1Ww.js +1414 -0
- package/dist/index-C-i9Taq7.cjs +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{pathOr-DKv8SMY9.cjs → pathOr-BQgOyNsu.cjs} +1 -1
- package/dist/{pathOr-kR7j_Y-C.js → pathOr-Dr8GvKXg.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/TSAnnotationCanvas-B0b_EheO.js +0 -730
- package/dist/TSAnnotationCanvas-Bfxc75PD.cjs +0 -1
- package/dist/TSScrubber-9ABMW6b2.js +0 -377
- package/dist/TSScrubber-BlHHGh3F.cjs +0 -1
- package/dist/TSViewerCanvas-DBpG0Erk.cjs +0 -11
- package/dist/index-CMJlEiLT.cjs +0 -1
- package/dist/index-CgKUmS0K.js +0 -1459
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";const vue=require("vue"),pinia=require("pinia"),index=require("./index-C-i9Taq7.cjs"),_commonjsHelpers=require("./_commonjsHelpers-DKOUU3wS.cjs");var head=index.nth(0),XFind=(function(){function f(c,v){this.xf=v,this.f=c,this.found=!1}return f.prototype["@@transducer/init"]=index._xfBase.init,f.prototype["@@transducer/result"]=function(c){return this.found||(c=this.xf["@@transducer/step"](c,void 0)),this.xf["@@transducer/result"](c)},f.prototype["@@transducer/step"]=function(c,v){return this.f(v)&&(this.found=!0,c=index._reduced(this.xf["@@transducer/step"](c,v))),c},f})(),_xfind=index._curry2(function(c,v){return new XFind(c,v)}),find=index._curry2(index._dispatchable(["find"],_xfind,function(c,v){for(var l=0,a=v.length;l<a;){if(c(v[l]))return v[l];l+=1}})),src={exports:{}},indexLight={exports:{}},indexMinimal={},minimal={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=f;function f(c,v){for(var l=new Array(arguments.length-1),a=0,i=2,e=!0;i<arguments.length;)l[a++]=arguments[i++];return new Promise(function(t,n){l[a]=function(s){if(e)if(e=!1,s)n(s);else{for(var u=new Array(arguments.length-1),o=0;o<u.length;)u[o++]=arguments[o];t.apply(null,u)}};try{c.apply(v||null,l)}catch(d){e&&(e=!1,n(d))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,(function(f){var c=f;c.length=function(r){var t=r.length;if(!t)return 0;for(var n=0;--t%4>1&&r.charAt(t)==="=";)++n;return Math.ceil(r.length*3)/4-n};for(var v=new Array(64),l=new Array(123),a=0;a<64;)l[v[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;c.encode=function(r,t,n){for(var d=null,s=[],u=0,o=0,h;t<n;){var m=r[t++];switch(o){case 0:s[u++]=v[m>>2],h=(m&3)<<4,o=1;break;case 1:s[u++]=v[h|m>>4],h=(m&15)<<2,o=2;break;case 2:s[u++]=v[h|m>>6],s[u++]=v[m&63],o=0;break}u>8191&&((d||(d=[])).push(String.fromCharCode.apply(String,s)),u=0)}return o&&(s[u++]=v[h],s[u++]=61,o===1&&(s[u++]=61)),d?(u&&d.push(String.fromCharCode.apply(String,s.slice(0,u))),d.join("")):String.fromCharCode.apply(String,s.slice(0,u))};var i="invalid encoding";c.decode=function(r,t,n){for(var d=n,s=0,u,o=0;o<r.length;){var h=r.charCodeAt(o++);if(h===61&&s>1)break;if((h=l[h])===void 0)throw Error(i);switch(s){case 0:u=h,s=1;break;case 1:t[n++]=u<<2|(h&48)>>4,u=h,s=2;break;case 2:t[n++]=(u&15)<<4|(h&60)>>2,u=h,s=3;break;case 3:t[n++]=(u&3)<<6|h,s=0;break}}if(s===1)throw Error(i);return n-d},c.test=function(r){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)}})(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=f;function f(){this._listeners={}}return f.prototype.on=function(v,l,a){return(this._listeners[v]||(this._listeners[v]=[])).push({fn:l,ctx:a||this}),this},f.prototype.off=function(v,l){if(v===void 0)this._listeners={};else if(l===void 0)this._listeners[v]=[];else for(var a=this._listeners[v],i=0;i<a.length;)a[i].fn===l?a.splice(i,1):++i;return this},f.prototype.emit=function(v){var l=this._listeners[v];if(l){for(var a=[],i=1;i<arguments.length;)a.push(arguments[i++]);for(i=0;i<l.length;)l[i].fn.apply(l[i++].ctx,a)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=f(f);function f(i){return typeof Float32Array<"u"?(function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),t=r[3]===128;function n(o,h,m){e[0]=o,h[m]=r[0],h[m+1]=r[1],h[m+2]=r[2],h[m+3]=r[3]}function d(o,h,m){e[0]=o,h[m]=r[3],h[m+1]=r[2],h[m+2]=r[1],h[m+3]=r[0]}i.writeFloatLE=t?n:d,i.writeFloatBE=t?d:n;function s(o,h){return r[0]=o[h],r[1]=o[h+1],r[2]=o[h+2],r[3]=o[h+3],e[0]}function u(o,h){return r[3]=o[h],r[2]=o[h+1],r[1]=o[h+2],r[0]=o[h+3],e[0]}i.readFloatLE=t?s:u,i.readFloatBE=t?u:s})():(function(){function e(t,n,d,s){var u=n<0?1:0;if(u&&(n=-n),n===0)t(1/n>0?0:2147483648,d,s);else if(isNaN(n))t(2143289344,d,s);else if(n>34028234663852886e22)t((u<<31|2139095040)>>>0,d,s);else if(n<11754943508222875e-54)t((u<<31|Math.round(n/1401298464324817e-60))>>>0,d,s);else{var o=Math.floor(Math.log(n)/Math.LN2),h=Math.round(n*Math.pow(2,-o)*8388608)&8388607;t((u<<31|o+127<<23|h)>>>0,d,s)}}i.writeFloatLE=e.bind(null,c),i.writeFloatBE=e.bind(null,v);function r(t,n,d){var s=t(n,d),u=(s>>31)*2+1,o=s>>>23&255,h=s&8388607;return o===255?h?NaN:u*(1/0):o===0?u*1401298464324817e-60*h:u*Math.pow(2,o-150)*(h+8388608)}i.readFloatLE=r.bind(null,l),i.readFloatBE=r.bind(null,a)})(),typeof Float64Array<"u"?(function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),t=r[7]===128;function n(o,h,m){e[0]=o,h[m]=r[0],h[m+1]=r[1],h[m+2]=r[2],h[m+3]=r[3],h[m+4]=r[4],h[m+5]=r[5],h[m+6]=r[6],h[m+7]=r[7]}function d(o,h,m){e[0]=o,h[m]=r[7],h[m+1]=r[6],h[m+2]=r[5],h[m+3]=r[4],h[m+4]=r[3],h[m+5]=r[2],h[m+6]=r[1],h[m+7]=r[0]}i.writeDoubleLE=t?n:d,i.writeDoubleBE=t?d:n;function s(o,h){return r[0]=o[h],r[1]=o[h+1],r[2]=o[h+2],r[3]=o[h+3],r[4]=o[h+4],r[5]=o[h+5],r[6]=o[h+6],r[7]=o[h+7],e[0]}function u(o,h){return r[7]=o[h],r[6]=o[h+1],r[5]=o[h+2],r[4]=o[h+3],r[3]=o[h+4],r[2]=o[h+5],r[1]=o[h+6],r[0]=o[h+7],e[0]}i.readDoubleLE=t?s:u,i.readDoubleBE=t?u:s})():(function(){function e(t,n,d,s,u,o){var h=s<0?1:0;if(h&&(s=-s),s===0)t(0,u,o+n),t(1/s>0?0:2147483648,u,o+d);else if(isNaN(s))t(0,u,o+n),t(2146959360,u,o+d);else if(s>17976931348623157e292)t(0,u,o+n),t((h<<31|2146435072)>>>0,u,o+d);else{var m;if(s<22250738585072014e-324)m=s/5e-324,t(m>>>0,u,o+n),t((h<<31|m/4294967296)>>>0,u,o+d);else{var S=Math.floor(Math.log(s)/Math.LN2);S===1024&&(S=1023),m=s*Math.pow(2,-S),t(m*4503599627370496>>>0,u,o+n),t((h<<31|S+1023<<20|m*1048576&1048575)>>>0,u,o+d)}}}i.writeDoubleLE=e.bind(null,c,0,4),i.writeDoubleBE=e.bind(null,v,4,0);function r(t,n,d,s,u){var o=t(s,u+n),h=t(s,u+d),m=(h>>31)*2+1,S=h>>>20&2047,y=4294967296*(h&1048575)+o;return S===2047?y?NaN:m*(1/0):S===0?m*5e-324*y:m*Math.pow(2,S-1075)*(y+4503599627370496)}i.readDoubleLE=r.bind(null,l,0,4),i.readDoubleBE=r.bind(null,a,4,0)})(),i}function c(i,e,r){e[r]=i&255,e[r+1]=i>>>8&255,e[r+2]=i>>>16&255,e[r+3]=i>>>24}function v(i,e,r){e[r]=i>>>24,e[r+1]=i>>>16&255,e[r+2]=i>>>8&255,e[r+3]=i&255}function l(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24)>>>0}function a(i,e){return(i[e]<<24|i[e+1]<<16|i[e+2]<<8|i[e+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(f){}return null}return inquire_1}var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,(function(f){var c=f;c.length=function(l){for(var a=0,i=0,e=0;e<l.length;++e)i=l.charCodeAt(e),i<128?a+=1:i<2048?a+=2:(i&64512)===55296&&(l.charCodeAt(e+1)&64512)===56320?(++e,a+=4):a+=3;return a},c.read=function(l,a,i){var e=i-a;if(e<1)return"";for(var r=null,t=[],n=0,d;a<i;)d=l[a++],d<128?t[n++]=d:d>191&&d<224?t[n++]=(d&31)<<6|l[a++]&63:d>239&&d<365?(d=((d&7)<<18|(l[a++]&63)<<12|(l[a++]&63)<<6|l[a++]&63)-65536,t[n++]=55296+(d>>10),t[n++]=56320+(d&1023)):t[n++]=(d&15)<<12|(l[a++]&63)<<6|l[a++]&63,n>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,t)),n=0);return r?(n&&r.push(String.fromCharCode.apply(String,t.slice(0,n))),r.join("")):String.fromCharCode.apply(String,t.slice(0,n))},c.write=function(l,a,i){for(var e=i,r,t,n=0;n<l.length;++n)r=l.charCodeAt(n),r<128?a[i++]=r:r<2048?(a[i++]=r>>6|192,a[i++]=r&63|128):(r&64512)===55296&&((t=l.charCodeAt(n+1))&64512)===56320?(r=65536+((r&1023)<<10)+(t&1023),++n,a[i++]=r>>18|240,a[i++]=r>>12&63|128,a[i++]=r>>6&63|128,a[i++]=r&63|128):(a[i++]=r>>12|224,a[i++]=r>>6&63|128,a[i++]=r&63|128);return i-e}})(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=f;function f(c,v,l){var a=l||8192,i=a>>>1,e=null,r=a;return function(n){if(n<1||n>i)return c(n);r+n>a&&(e=c(a),r=0);var d=v.call(e,r,r+=n);return r&7&&(r=(r|7)+1),d}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=c;var f=requireMinimal();function c(i,e){this.lo=i>>>0,this.hi=e>>>0}var v=c.zero=new c(0,0);v.toNumber=function(){return 0},v.zzEncode=v.zzDecode=function(){return this},v.length=function(){return 1};var l=c.zeroHash="\0\0\0\0\0\0\0\0";c.fromNumber=function(e){if(e===0)return v;var r=e<0;r&&(e=-e);var t=e>>>0,n=(e-t)/4294967296>>>0;return r&&(n=~n>>>0,t=~t>>>0,++t>4294967295&&(t=0,++n>4294967295&&(n=0))),new c(t,n)},c.from=function(e){if(typeof e=="number")return c.fromNumber(e);if(f.isString(e))if(f.Long)e=f.Long.fromString(e);else return c.fromNumber(parseInt(e,10));return e.low||e.high?new c(e.low>>>0,e.high>>>0):v},c.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var r=~this.lo+1>>>0,t=~this.hi>>>0;return r||(t=t+1>>>0),-(r+t*4294967296)}return this.lo+this.hi*4294967296},c.prototype.toLong=function(e){return f.Long?new f.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var a=String.prototype.charCodeAt;return c.fromHash=function(e){return e===l?v:new c((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},c.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},c.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},c.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},c.prototype.length=function(){var e=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,t=this.hi>>>24;return t===0?r===0?e<16384?e<128?1:2:e<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:t<128?9:10},longbits}var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,(function(f){var c=f;c.asPromise=requireAspromise(),c.base64=requireBase64(),c.EventEmitter=requireEventemitter(),c.float=requireFloat(),c.inquire=requireInquire(),c.utf8=requireUtf8(),c.pool=requirePool(),c.LongBits=requireLongbits(),c.isNode=!!(typeof _commonjsHelpers.commonjsGlobal<"u"&&_commonjsHelpers.commonjsGlobal&&_commonjsHelpers.commonjsGlobal.process&&_commonjsHelpers.commonjsGlobal.process.versions&&_commonjsHelpers.commonjsGlobal.process.versions.node),c.global=c.isNode&&_commonjsHelpers.commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal,c.emptyArray=Object.freeze?Object.freeze([]):[],c.emptyObject=Object.freeze?Object.freeze({}):{},c.isInteger=Number.isInteger||function(i){return typeof i=="number"&&isFinite(i)&&Math.floor(i)===i},c.isString=function(i){return typeof i=="string"||i instanceof String},c.isObject=function(i){return i&&typeof i=="object"},c.isset=c.isSet=function(i,e){var r=i[e];return r!=null&&i.hasOwnProperty(e)?typeof r!="object"||(Array.isArray(r)?r.length:Object.keys(r).length)>0:!1},c.Buffer=(function(){try{var a=c.inquire("buffer").Buffer;return a.prototype.utf8Write?a:null}catch{return null}})(),c._Buffer_from=null,c._Buffer_allocUnsafe=null,c.newBuffer=function(i){return typeof i=="number"?c.Buffer?c._Buffer_allocUnsafe(i):new c.Array(i):c.Buffer?c._Buffer_from(i):typeof Uint8Array>"u"?i:new Uint8Array(i)},c.Array=typeof Uint8Array<"u"?Uint8Array:Array,c.Long=c.global.dcodeIO&&c.global.dcodeIO.Long||c.global.Long||c.inquire("long"),c.key2Re=/^true|false|0|1$/,c.key32Re=/^-?(?:0|[1-9][0-9]*)$/,c.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,c.longToHash=function(i){return i?c.LongBits.from(i).toHash():c.LongBits.zeroHash},c.longFromHash=function(i,e){var r=c.LongBits.fromHash(i);return c.Long?c.Long.fromBits(r.lo,r.hi,e):r.toNumber(!!e)};function v(a,i,e){for(var r=Object.keys(i),t=0;t<r.length;++t)(a[r[t]]===void 0||!e)&&(a[r[t]]=i[r[t]]);return a}c.merge=v,c.lcFirst=function(i){return i.charAt(0).toLowerCase()+i.substring(1)};function l(a){function i(e,r){if(!(this instanceof i))return new i(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:new Error().stack||""}),r&&v(this,r)}return i.prototype=Object.create(Error.prototype,{constructor:{value:i,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return a},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),i}c.newError=l,c.ProtocolError=l("ProtocolError"),c.oneOfGetter=function(i){for(var e={},r=0;r<i.length;++r)e[i[r]]=1;return function(){for(var t=Object.keys(this),n=t.length-1;n>-1;--n)if(e[t[n]]===1&&this[t[n]]!==void 0&&this[t[n]]!==null)return t[n]}},c.oneOfSetter=function(i){return function(e){for(var r=0;r<i.length;++r)i[r]!==e&&delete this[i[r]]}},c.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},c._configure=function(){var a=c.Buffer;if(!a){c._Buffer_from=c._Buffer_allocUnsafe=null;return}c._Buffer_from=a.from!==Uint8Array.from&&a.from||function(e,r){return new a(e,r)},c._Buffer_allocUnsafe=a.allocUnsafe||function(e){return new a(e)}}})(minimal)),minimal}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=t;var f=requireMinimal(),c,v=f.LongBits,l=f.base64,a=f.utf8;function i(S,y,g){this.fn=S,this.len=y,this.next=void 0,this.val=g}function e(){}function r(S){this.head=S.head,this.tail=S.tail,this.len=S.len,this.next=S.states}function t(){this.len=0,this.head=new i(e,0,0),this.tail=this.head,this.states=null}var n=function(){return f.Buffer?function(){return(t.create=function(){return new c})()}:function(){return new t}};t.create=n(),t.alloc=function(y){return new f.Array(y)},f.Array!==Array&&(t.alloc=f.pool(t.alloc,f.Array.prototype.subarray)),t.prototype._push=function(y,g,O){return this.tail=this.tail.next=new i(y,g,O),this.len+=g,this};function d(S,y,g){y[g]=S&255}function s(S,y,g){for(;S>127;)y[g++]=S&127|128,S>>>=7;y[g]=S}function u(S,y){this.len=S,this.next=void 0,this.val=y}u.prototype=Object.create(i.prototype),u.prototype.fn=s,t.prototype.uint32=function(y){return this.len+=(this.tail=this.tail.next=new u((y=y>>>0)<128?1:y<16384?2:y<2097152?3:y<268435456?4:5,y)).len,this},t.prototype.int32=function(y){return y<0?this._push(o,10,v.fromNumber(y)):this.uint32(y)},t.prototype.sint32=function(y){return this.uint32((y<<1^y>>31)>>>0)};function o(S,y,g){for(;S.hi;)y[g++]=S.lo&127|128,S.lo=(S.lo>>>7|S.hi<<25)>>>0,S.hi>>>=7;for(;S.lo>127;)y[g++]=S.lo&127|128,S.lo=S.lo>>>7;y[g++]=S.lo}t.prototype.uint64=function(y){var g=v.from(y);return this._push(o,g.length(),g)},t.prototype.int64=t.prototype.uint64,t.prototype.sint64=function(y){var g=v.from(y).zzEncode();return this._push(o,g.length(),g)},t.prototype.bool=function(y){return this._push(d,1,y?1:0)};function h(S,y,g){y[g]=S&255,y[g+1]=S>>>8&255,y[g+2]=S>>>16&255,y[g+3]=S>>>24}t.prototype.fixed32=function(y){return this._push(h,4,y>>>0)},t.prototype.sfixed32=t.prototype.fixed32,t.prototype.fixed64=function(y){var g=v.from(y);return this._push(h,4,g.lo)._push(h,4,g.hi)},t.prototype.sfixed64=t.prototype.fixed64,t.prototype.float=function(y){return this._push(f.float.writeFloatLE,4,y)},t.prototype.double=function(y){return this._push(f.float.writeDoubleLE,8,y)};var m=f.Array.prototype.set?function(y,g,O){g.set(y,O)}:function(y,g,O){for(var b=0;b<y.length;++b)g[O+b]=y[b]};return t.prototype.bytes=function(y){var g=y.length>>>0;if(!g)return this._push(d,1,0);if(f.isString(y)){var O=t.alloc(g=l.length(y));l.decode(y,O,0),y=O}return this.uint32(g)._push(m,g,y)},t.prototype.string=function(y){var g=a.length(y);return g?this.uint32(g)._push(a.write,g,y):this._push(d,1,0)},t.prototype.fork=function(){return this.states=new r(this),this.head=this.tail=new i(e,0,0),this.len=0,this},t.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new i(e,0,0),this.len=0),this},t.prototype.ldelim=function(){var y=this.head,g=this.tail,O=this.len;return this.reset().uint32(O),O&&(this.tail.next=y.next,this.tail=g,this.len+=O),this},t.prototype.finish=function(){for(var y=this.head.next,g=this.constructor.alloc(this.len),O=0;y;)y.fn(y.val,g,O),O+=y.len,y=y.next;return g},t._configure=function(S){c=S,t.create=n(),c._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=v;var f=requireWriter();(v.prototype=Object.create(f.prototype)).constructor=v;var c=requireMinimal();function v(){f.call(this)}v._configure=function(){v.alloc=c._Buffer_allocUnsafe,v.writeBytesBuffer=c.Buffer&&c.Buffer.prototype instanceof Uint8Array&&c.Buffer.prototype.set.name==="set"?function(i,e,r){e.set(i,r)}:function(i,e,r){if(i.copy)i.copy(e,r,0,i.length);else for(var t=0;t<i.length;)e[r++]=i[t++]}},v.prototype.bytes=function(i){c.isString(i)&&(i=c._Buffer_from(i,"base64"));var e=i.length>>>0;return this.uint32(e),e&&this._push(v.writeBytesBuffer,e,i),this};function l(a,i,e){a.length<40?c.utf8.write(a,i,e):i.utf8Write?i.utf8Write(a,e):i.write(a,e)}return v.prototype.string=function(i){var e=c.Buffer.byteLength(i);return this.uint32(e),e&&this._push(l,e,i),this},v._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=i;var f=requireMinimal(),c,v=f.LongBits,l=f.utf8;function a(s,u){return RangeError("index out of range: "+s.pos+" + "+(u||1)+" > "+s.len)}function i(s){this.buf=s,this.pos=0,this.len=s.length}var e=typeof Uint8Array<"u"?function(u){if(u instanceof Uint8Array||Array.isArray(u))return new i(u);throw Error("illegal buffer")}:function(u){if(Array.isArray(u))return new i(u);throw Error("illegal buffer")},r=function(){return f.Buffer?function(o){return(i.create=function(m){return f.Buffer.isBuffer(m)?new c(m):e(m)})(o)}:e};i.create=r(),i.prototype._slice=f.Array.prototype.subarray||f.Array.prototype.slice,i.prototype.uint32=(function(){var u=4294967295;return function(){if(u=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(u=(u|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(u=(u|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(u=(u|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(u=(u|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return u;if((this.pos+=5)>this.len)throw this.pos=this.len,a(this,10);return u}})(),i.prototype.int32=function(){return this.uint32()|0},i.prototype.sint32=function(){var u=this.uint32();return u>>>1^-(u&1)|0};function t(){var s=new v(0,0),u=0;if(this.len-this.pos>4){for(;u<4;++u)if(s.lo=(s.lo|(this.buf[this.pos]&127)<<u*7)>>>0,this.buf[this.pos++]<128)return s;if(s.lo=(s.lo|(this.buf[this.pos]&127)<<28)>>>0,s.hi=(s.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return s;u=0}else{for(;u<3;++u){if(this.pos>=this.len)throw a(this);if(s.lo=(s.lo|(this.buf[this.pos]&127)<<u*7)>>>0,this.buf[this.pos++]<128)return s}return s.lo=(s.lo|(this.buf[this.pos++]&127)<<u*7)>>>0,s}if(this.len-this.pos>4){for(;u<5;++u)if(s.hi=(s.hi|(this.buf[this.pos]&127)<<u*7+3)>>>0,this.buf[this.pos++]<128)return s}else for(;u<5;++u){if(this.pos>=this.len)throw a(this);if(s.hi=(s.hi|(this.buf[this.pos]&127)<<u*7+3)>>>0,this.buf[this.pos++]<128)return s}throw Error("invalid varint encoding")}i.prototype.bool=function(){return this.uint32()!==0};function n(s,u){return(s[u-4]|s[u-3]<<8|s[u-2]<<16|s[u-1]<<24)>>>0}i.prototype.fixed32=function(){if(this.pos+4>this.len)throw a(this,4);return n(this.buf,this.pos+=4)},i.prototype.sfixed32=function(){if(this.pos+4>this.len)throw a(this,4);return n(this.buf,this.pos+=4)|0};function d(){if(this.pos+8>this.len)throw a(this,8);return new v(n(this.buf,this.pos+=4),n(this.buf,this.pos+=4))}return i.prototype.float=function(){if(this.pos+4>this.len)throw a(this,4);var u=f.float.readFloatLE(this.buf,this.pos);return this.pos+=4,u},i.prototype.double=function(){if(this.pos+8>this.len)throw a(this,4);var u=f.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,u},i.prototype.bytes=function(){var u=this.uint32(),o=this.pos,h=this.pos+u;if(h>this.len)throw a(this,u);if(this.pos+=u,Array.isArray(this.buf))return this.buf.slice(o,h);if(o===h){var m=f.Buffer;return m?m.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,o,h)},i.prototype.string=function(){var u=this.bytes();return l.read(u,0,u.length)},i.prototype.skip=function(u){if(typeof u=="number"){if(this.pos+u>this.len)throw a(this,u);this.pos+=u}else do if(this.pos>=this.len)throw a(this);while(this.buf[this.pos++]&128);return this},i.prototype.skipType=function(s){switch(s){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(s=this.uint32()&7)!==4;)this.skipType(s);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+s+" at offset "+this.pos)}return this},i._configure=function(s){c=s,i.create=r(),c._configure();var u=f.Long?"toLong":"toNumber";f.merge(i.prototype,{int64:function(){return t.call(this)[u](!1)},uint64:function(){return t.call(this)[u](!0)},sint64:function(){return t.call(this).zzDecode()[u](!1)},fixed64:function(){return d.call(this)[u](!0)},sfixed64:function(){return d.call(this)[u](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=v;var f=requireReader();(v.prototype=Object.create(f.prototype)).constructor=v;var c=requireMinimal();function v(l){f.call(this,l)}return v._configure=function(){c.Buffer&&(v.prototype._slice=c.Buffer.prototype.slice)},v.prototype.string=function(){var a=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+a,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+a,this.len))},v._configure(),reader_buffer}var rpc={},service$1,hasRequiredService$1;function requireService$1(){if(hasRequiredService$1)return service$1;hasRequiredService$1=1,service$1=c;var f=requireMinimal();(c.prototype=Object.create(f.EventEmitter.prototype)).constructor=c;function c(v,l,a){if(typeof v!="function")throw TypeError("rpcImpl must be a function");f.EventEmitter.call(this),this.rpcImpl=v,this.requestDelimited=!!l,this.responseDelimited=!!a}return c.prototype.rpcCall=function v(l,a,i,e,r){if(!e)throw TypeError("request must be specified");var t=this;if(!r)return f.asPromise(v,t,l,a,i,e);if(!t.rpcImpl){setTimeout(function(){r(Error("already ended"))},0);return}try{return t.rpcImpl(l,a[t.requestDelimited?"encodeDelimited":"encode"](e).finish(),function(d,s){if(d)return t.emit("error",d,l),r(d);if(s===null){t.end(!0);return}if(!(s instanceof i))try{s=i[t.responseDelimited?"decodeDelimited":"decode"](s)}catch(u){return t.emit("error",u,l),r(u)}return t.emit("data",s,l),r(null,s)})}catch(n){t.emit("error",n,l),setTimeout(function(){r(n)},0);return}},c.prototype.end=function(l){return this.rpcImpl&&(l||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service$1}var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,(function(f){var c=f;c.Service=requireService$1()})(rpc)),rpc}var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,(function(f){var c=f;c.build="minimal",c.Writer=requireWriter(),c.BufferWriter=requireWriter_buffer(),c.Reader=requireReader(),c.BufferReader=requireReader_buffer(),c.util=requireMinimal(),c.rpc=requireRpc(),c.roots=requireRoots(),c.configure=v;function v(){c.util._configure(),c.Writer._configure(c.BufferWriter),c.Reader._configure(c.BufferReader)}v()})(indexMinimal)),indexMinimal}var types={},util={exports:{}},codegen_1,hasRequiredCodegen;function requireCodegen(){if(hasRequiredCodegen)return codegen_1;hasRequiredCodegen=1,codegen_1=f;function f(c,v){typeof c=="string"&&(v=c,c=void 0);var l=[];function a(e){if(typeof e!="string"){var r=i();if(f.verbose&&console.log("codegen: "+r),r="return "+r,e){for(var t=Object.keys(e),n=new Array(t.length+1),d=new Array(t.length),s=0;s<t.length;)n[s]=t[s],d[s]=e[t[s++]];return n[s]=r,Function.apply(null,n).apply(null,d)}return Function(r)()}for(var u=new Array(arguments.length-1),o=0;o<u.length;)u[o]=arguments[++o];if(o=0,e=e.replace(/%([%dfijs])/g,function(m,S){var y=u[o++];switch(S){case"d":case"f":return String(Number(y));case"i":return String(Math.floor(y));case"j":return JSON.stringify(y);case"s":return String(y)}return"%"}),o!==u.length)throw Error("parameter count mismatch");return l.push(e),a}function i(e){return"function "+(e||v||"")+"("+(c&&c.join(",")||"")+`){
|
|
2
|
+
`+l.join(`
|
|
3
|
+
`)+`
|
|
4
|
+
}`}return a.toString=i,a}return f.verbose=!1,codegen_1}var fetch_1,hasRequiredFetch;function requireFetch(){if(hasRequiredFetch)return fetch_1;hasRequiredFetch=1,fetch_1=l;var f=requireAspromise(),c=requireInquire(),v=c("fs");function l(a,i,e){return typeof i=="function"?(e=i,i={}):i||(i={}),e?!i.xhr&&v&&v.readFile?v.readFile(a,function(t,n){return t&&typeof XMLHttpRequest<"u"?l.xhr(a,i,e):t?e(t):e(null,i.binary?n:n.toString("utf8"))}):l.xhr(a,i,e):f(l,this,a,i)}return l.xhr=function(i,e,r){var t=new XMLHttpRequest;t.onreadystatechange=function(){if(t.readyState===4){if(t.status!==0&&t.status!==200)return r(Error("status "+t.status));if(e.binary){var d=t.response;if(!d){d=[];for(var s=0;s<t.responseText.length;++s)d.push(t.responseText.charCodeAt(s)&255)}return r(null,typeof Uint8Array<"u"?new Uint8Array(d):d)}return r(null,t.responseText)}},e.binary&&("overrideMimeType"in t&&t.overrideMimeType("text/plain; charset=x-user-defined"),t.responseType="arraybuffer"),t.open("GET",i),t.send()},fetch_1}var path={},hasRequiredPath;function requirePath(){return hasRequiredPath||(hasRequiredPath=1,(function(f){var c=f,v=c.isAbsolute=function(i){return/^(?:\/|\w+:)/.test(i)},l=c.normalize=function(i){i=i.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var e=i.split("/"),r=v(i),t="";r&&(t=e.shift()+"/");for(var n=0;n<e.length;)e[n]===".."?n>0&&e[n-1]!==".."?e.splice(--n,2):r?e.splice(n,1):++n:e[n]==="."?e.splice(n,1):++n;return t+e.join("/")};c.resolve=function(i,e,r){return r||(e=l(e)),v(e)?e:(r||(i=l(i)),(i=i.replace(/(?:\/|^)[^/]+$/,"")).length?l(i+"/"+e):e)}})(path)),path}var namespace,hasRequiredNamespace;function requireNamespace(){if(hasRequiredNamespace)return namespace;hasRequiredNamespace=1,namespace=t;var f=requireObject();((t.prototype=Object.create(f.prototype)).constructor=t).className="Namespace";var c=requireField(),v=requireUtil(),l=requireOneof(),a,i,e;t.fromJSON=function(s,u){return new t(s,u.options).addJSON(u.nested)};function r(d,s){if(d&&d.length){for(var u={},o=0;o<d.length;++o)u[d[o].name]=d[o].toJSON(s);return u}}t.arrayToJSON=r,t.isReservedId=function(s,u){if(s){for(var o=0;o<s.length;++o)if(typeof s[o]!="string"&&s[o][0]<=u&&s[o][1]>u)return!0}return!1},t.isReservedName=function(s,u){if(s){for(var o=0;o<s.length;++o)if(s[o]===u)return!0}return!1};function t(d,s){f.call(this,d,s),this.nested=void 0,this._nestedArray=null,this._lookupCache={},this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function n(d){d._nestedArray=null,d._lookupCache={};for(var s=d;s=s.parent;)s._lookupCache={};return d}return Object.defineProperty(t.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=v.toArray(this.nested))}}),t.prototype.toJSON=function(s){return v.toObject(["options",this.options,"nested",r(this.nestedArray,s)])},t.prototype.addJSON=function(s){var u=this;if(s)for(var o=Object.keys(s),h=0,m;h<o.length;++h)m=s[o[h]],u.add((m.fields!==void 0?a.fromJSON:m.values!==void 0?e.fromJSON:m.methods!==void 0?i.fromJSON:m.id!==void 0?c.fromJSON:t.fromJSON)(o[h],m));return this},t.prototype.get=function(s){return this.nested&&this.nested[s]||null},t.prototype.getEnum=function(s){if(this.nested&&this.nested[s]instanceof e)return this.nested[s].values;throw Error("no such enum: "+s)},t.prototype.add=function(s){if(!(s instanceof c&&s.extend!==void 0||s instanceof a||s instanceof l||s instanceof e||s instanceof i||s instanceof t))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var u=this.get(s.name);if(u)if(u instanceof t&&s instanceof t&&!(u instanceof a||u instanceof i)){for(var o=u.nestedArray,h=0;h<o.length;++h)s.add(o[h]);this.remove(u),this.nested||(this.nested={}),s.setOptions(u.options,!0)}else throw Error("duplicate name '"+s.name+"' in "+this)}this.nested[s.name]=s,this instanceof a||this instanceof i||this instanceof e||this instanceof c||s._edition||(s._edition=s._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var m=this;m=m.parent;)m._needsRecursiveFeatureResolution=!0,m._needsRecursiveResolve=!0;return s.onAdd(this),n(this)},t.prototype.remove=function(s){if(!(s instanceof f))throw TypeError("object must be a ReflectionObject");if(s.parent!==this)throw Error(s+" is not a member of "+this);return delete this.nested[s.name],Object.keys(this.nested).length||(this.nested=void 0),s.onRemove(this),n(this)},t.prototype.define=function(s,u){if(v.isString(s))s=s.split(".");else if(!Array.isArray(s))throw TypeError("illegal path");if(s&&s.length&&s[0]==="")throw Error("path must be relative");for(var o=this;s.length>0;){var h=s.shift();if(o.nested&&o.nested[h]){if(o=o.nested[h],!(o instanceof t))throw Error("path conflicts with non-namespace objects")}else o.add(o=new t(h))}return u&&o.addJSON(u),o},t.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var s=this.nestedArray,u=0;for(this.resolve();u<s.length;)s[u]instanceof t?s[u++].resolveAll():s[u++].resolve();return this._needsRecursiveResolve=!1,this},t.prototype._resolveFeaturesRecursive=function(s){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,s=this._edition||s,f.prototype._resolveFeaturesRecursive.call(this,s),this.nestedArray.forEach(u=>{u._resolveFeaturesRecursive(s)}),this):this},t.prototype.lookup=function(s,u,o){if(typeof u=="boolean"?(o=u,u=void 0):u&&!Array.isArray(u)&&(u=[u]),v.isString(s)&&s.length){if(s===".")return this.root;s=s.split(".")}else if(!s.length)return this;var h=s.join(".");if(s[0]==="")return this.root.lookup(s.slice(1),u);var m=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+h];if(m&&(!u||u.indexOf(m.constructor)>-1)||(m=this._lookupImpl(s,h),m&&(!u||u.indexOf(m.constructor)>-1)))return m;if(o)return null;for(var S=this;S.parent;){if(m=S.parent._lookupImpl(s,h),m&&(!u||u.indexOf(m.constructor)>-1))return m;S=S.parent}return null},t.prototype._lookupImpl=function(s,u){if(Object.prototype.hasOwnProperty.call(this._lookupCache,u))return this._lookupCache[u];var o=this.get(s[0]),h=null;if(o)s.length===1?h=o:o instanceof t&&(s=s.slice(1),h=o._lookupImpl(s,s.join(".")));else for(var m=0;m<this.nestedArray.length;++m)this._nestedArray[m]instanceof t&&(o=this._nestedArray[m]._lookupImpl(s,u))&&(h=o);return this._lookupCache[u]=h,h},t.prototype.lookupType=function(s){var u=this.lookup(s,[a]);if(!u)throw Error("no such type: "+s);return u},t.prototype.lookupEnum=function(s){var u=this.lookup(s,[e]);if(!u)throw Error("no such Enum '"+s+"' in "+this);return u},t.prototype.lookupTypeOrEnum=function(s){var u=this.lookup(s,[a,e]);if(!u)throw Error("no such Type or Enum '"+s+"' in "+this);return u},t.prototype.lookupService=function(s){var u=this.lookup(s,[i]);if(!u)throw Error("no such Service '"+s+"' in "+this);return u},t._configure=function(d,s,u){a=d,i=s,e=u},namespace}var mapfield,hasRequiredMapfield;function requireMapfield(){if(hasRequiredMapfield)return mapfield;hasRequiredMapfield=1,mapfield=l;var f=requireField();((l.prototype=Object.create(f.prototype)).constructor=l).className="MapField";var c=requireTypes(),v=requireUtil();function l(a,i,e,r,t,n){if(f.call(this,a,i,r,void 0,void 0,t,n),!v.isString(e))throw TypeError("keyType must be a string");this.keyType=e,this.resolvedKeyType=null,this.map=!0}return l.fromJSON=function(i,e){return new l(i,e.id,e.keyType,e.type,e.options,e.comment)},l.prototype.toJSON=function(i){var e=i?!!i.keepComments:!1;return v.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",e?this.comment:void 0])},l.prototype.resolve=function(){if(this.resolved)return this;if(c.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return f.prototype.resolve.call(this)},l.d=function(i,e,r){return typeof r=="function"?r=v.decorateType(r).name:r&&typeof r=="object"&&(r=v.decorateEnum(r).name),function(n,d){v.decorateType(n.constructor).add(new l(d,i,e,r))}},mapfield}var method,hasRequiredMethod;function requireMethod(){if(hasRequiredMethod)return method;hasRequiredMethod=1,method=v;var f=requireObject();((v.prototype=Object.create(f.prototype)).constructor=v).className="Method";var c=requireUtil();function v(l,a,i,e,r,t,n,d,s){if(c.isObject(r)?(n=r,r=t=void 0):c.isObject(t)&&(n=t,t=void 0),!(a===void 0||c.isString(a)))throw TypeError("type must be a string");if(!c.isString(i))throw TypeError("requestType must be a string");if(!c.isString(e))throw TypeError("responseType must be a string");f.call(this,l,n),this.type=a||"rpc",this.requestType=i,this.requestStream=r?!0:void 0,this.responseType=e,this.responseStream=t?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=d,this.parsedOptions=s}return v.fromJSON=function(a,i){return new v(a,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment,i.parsedOptions)},v.prototype.toJSON=function(a){var i=a?!!a.keepComments:!1;return c.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",i?this.comment:void 0,"parsedOptions",this.parsedOptions])},v.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),f.prototype.resolve.call(this))},method}var service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=a;var f=requireNamespace();((a.prototype=Object.create(f.prototype)).constructor=a).className="Service";var c=requireMethod(),v=requireUtil(),l=requireRpc();function a(e,r){f.call(this,e,r),this.methods={},this._methodsArray=null}a.fromJSON=function(r,t){var n=new a(r,t.options);if(t.methods)for(var d=Object.keys(t.methods),s=0;s<d.length;++s)n.add(c.fromJSON(d[s],t.methods[d[s]]));return t.nested&&n.addJSON(t.nested),t.edition&&(n._edition=t.edition),n.comment=t.comment,n._defaultEdition="proto3",n},a.prototype.toJSON=function(r){var t=f.prototype.toJSON.call(this,r),n=r?!!r.keepComments:!1;return v.toObject(["edition",this._editionToJSON(),"options",t&&t.options||void 0,"methods",f.arrayToJSON(this.methodsArray,r)||{},"nested",t&&t.nested||void 0,"comment",n?this.comment:void 0])},Object.defineProperty(a.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=v.toArray(this.methods))}});function i(e){return e._methodsArray=null,e}return a.prototype.get=function(r){return this.methods[r]||f.prototype.get.call(this,r)},a.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;f.prototype.resolve.call(this);for(var r=this.methodsArray,t=0;t<r.length;++t)r[t].resolve();return this},a.prototype._resolveFeaturesRecursive=function(r){return this._needsRecursiveFeatureResolution?(r=this._edition||r,f.prototype._resolveFeaturesRecursive.call(this,r),this.methodsArray.forEach(t=>{t._resolveFeaturesRecursive(r)}),this):this},a.prototype.add=function(r){if(this.get(r.name))throw Error("duplicate name '"+r.name+"' in "+this);return r instanceof c?(this.methods[r.name]=r,r.parent=this,i(this)):f.prototype.add.call(this,r)},a.prototype.remove=function(r){if(r instanceof c){if(this.methods[r.name]!==r)throw Error(r+" is not a member of "+this);return delete this.methods[r.name],r.parent=null,i(this)}return f.prototype.remove.call(this,r)},a.prototype.create=function(r,t,n){for(var d=new l.Service(r,t,n),s=0,u;s<this.methodsArray.length;++s){var o=v.lcFirst((u=this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g,"");d[o]=v.codegen(["r","c"],v.isReserved(o)?o+"_":o)("return this.rpcCall(m,q,s,r,c)")({m:u,q:u.resolvedRequestType.ctor,s:u.resolvedResponseType.ctor})}return d},service}var message,hasRequiredMessage;function requireMessage(){if(hasRequiredMessage)return message;hasRequiredMessage=1,message=c;var f=requireMinimal();function c(v){if(v)for(var l=Object.keys(v),a=0;a<l.length;++a)this[l[a]]=v[l[a]]}return c.create=function(l){return this.$type.create(l)},c.encode=function(l,a){return this.$type.encode(l,a)},c.encodeDelimited=function(l,a){return this.$type.encodeDelimited(l,a)},c.decode=function(l){return this.$type.decode(l)},c.decodeDelimited=function(l){return this.$type.decodeDelimited(l)},c.verify=function(l){return this.$type.verify(l)},c.fromObject=function(l){return this.$type.fromObject(l)},c.toObject=function(l,a){return this.$type.toObject(l,a)},c.prototype.toJSON=function(){return this.$type.toObject(this,f.toJSONOptions)},message}var decoder_1,hasRequiredDecoder;function requireDecoder(){if(hasRequiredDecoder)return decoder_1;hasRequiredDecoder=1,decoder_1=a;var f=require_enum(),c=requireTypes(),v=requireUtil();function l(i){return"missing required '"+i.name+"'"}function a(i){for(var e=v.codegen(["r","l","e"],i.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(i.fieldsArray.filter(function(u){return u.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),r=0;r<i.fieldsArray.length;++r){var t=i._fieldsArray[r].resolve(),n=t.resolvedType instanceof f?"int32":t.type,d="m"+v.safeProp(t.name);e("case %i: {",t.id),t.map?(e("if(%s===util.emptyObject)",d)("%s={}",d)("var c2 = r.uint32()+r.pos"),c.defaults[t.keyType]!==void 0?e("k=%j",c.defaults[t.keyType]):e("k=null"),c.defaults[n]!==void 0?e("value=%j",c.defaults[n]):e("value=null"),e("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",t.keyType)("case 2:"),c.basic[n]===void 0?e("value=types[%i].decode(r,r.uint32())",r):e("value=r.%s()",n),e("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),c.long[t.keyType]!==void 0?e('%s[typeof k==="object"?util.longToHash(k):k]=value',d):e("%s[k]=value",d)):t.repeated?(e("if(!(%s&&%s.length))",d,d)("%s=[]",d),c.packed[n]!==void 0&&e("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",d,n)("}else"),c.basic[n]===void 0?e(t.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4)))":"%s.push(types[%i].decode(r,r.uint32()))",d,r):e("%s.push(r.%s())",d,n)):c.basic[n]===void 0?e(t.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",d,r):e("%s=r.%s()",d,n),e("break")("}")}for(e("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<i._fieldsArray.length;++r){var s=i._fieldsArray[r];s.required&&e("if(!m.hasOwnProperty(%j))",s.name)("throw util.ProtocolError(%j,{instance:m})",l(s))}return e("return m")}return decoder_1}var verifier_1,hasRequiredVerifier;function requireVerifier(){if(hasRequiredVerifier)return verifier_1;hasRequiredVerifier=1,verifier_1=i;var f=require_enum(),c=requireUtil();function v(e,r){return e.name+": "+r+(e.repeated&&r!=="array"?"[]":e.map&&r!=="object"?"{k:"+e.keyType+"}":"")+" expected"}function l(e,r,t,n){if(r.resolvedType)if(r.resolvedType instanceof f){e("switch(%s){",n)("default:")("return%j",v(r,"enum value"));for(var d=Object.keys(r.resolvedType.values),s=0;s<d.length;++s)e("case %i:",r.resolvedType.values[d[s]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",t,n)("if(e)")("return%j+e",r.name+".")("}");else switch(r.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",n)("return%j",v(r,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",v(r,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',n)("return%j",v(r,"number"));break;case"bool":e('if(typeof %s!=="boolean")',n)("return%j",v(r,"boolean"));break;case"string":e("if(!util.isString(%s))",n)("return%j",v(r,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",v(r,"buffer"));break}return e}function a(e,r,t){switch(r.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",t)("return%j",v(r,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",t)("return%j",v(r,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",t)("return%j",v(r,"boolean key"));break}return e}function i(e){var r=c.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),t=e.oneofsArray,n={};t.length&&r("var p={}");for(var d=0;d<e.fieldsArray.length;++d){var s=e._fieldsArray[d].resolve(),u="m"+c.safeProp(s.name);if(s.optional&&r("if(%s!=null&&m.hasOwnProperty(%j)){",u,s.name),s.map)r("if(!util.isObject(%s))",u)("return%j",v(s,"object"))("var k=Object.keys(%s)",u)("for(var i=0;i<k.length;++i){"),a(r,s,"k[i]"),l(r,s,d,u+"[k[i]]")("}");else if(s.repeated)r("if(!Array.isArray(%s))",u)("return%j",v(s,"array"))("for(var i=0;i<%s.length;++i){",u),l(r,s,d,u+"[i]")("}");else{if(s.partOf){var o=c.safeProp(s.partOf.name);n[s.partOf.name]===1&&r("if(p%s===1)",o)("return%j",s.partOf.name+": multiple values"),n[s.partOf.name]=1,r("p%s=1",o)}l(r,s,d,u)}s.optional&&r("}")}return r("return null")}return verifier_1}var converter={},hasRequiredConverter;function requireConverter(){return hasRequiredConverter||(hasRequiredConverter=1,(function(f){var c=f,v=require_enum(),l=requireUtil();function a(e,r,t,n){var d=!1;if(r.resolvedType)if(r.resolvedType instanceof v){e("switch(d%s){",n);for(var s=r.resolvedType.values,u=Object.keys(s),o=0;o<u.length;++o)s[u[o]]===r.typeDefault&&!d&&(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',n,n,n),r.repeated||e("break"),d=!0),e("case%j:",u[o])("case %i:",s[u[o]])("m%s=%j",n,s[u[o]])("break");e("}")}else e('if(typeof d%s!=="object")',n)("throw TypeError(%j)",r.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",n,t,n);else{var h=!1;switch(r.type){case"double":case"float":e("m%s=Number(d%s)",n,n);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",n,n);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",n,n);break;case"uint64":h=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",n,n,h)('else if(typeof d%s==="string")',n)("m%s=parseInt(d%s,10)",n,n)('else if(typeof d%s==="number")',n)("m%s=d%s",n,n)('else if(typeof d%s==="object")',n)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",n,n,n,h?"true":"");break;case"bytes":e('if(typeof d%s==="string")',n)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",n,n,n)("else if(d%s.length >= 0)",n)("m%s=d%s",n,n);break;case"string":e("m%s=String(d%s)",n,n);break;case"bool":e("m%s=Boolean(d%s)",n,n);break}}return e}c.fromObject=function(r){var t=r.fieldsArray,n=l.codegen(["d"],r.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return n("return new this.ctor");n("var m=new this.ctor");for(var d=0;d<t.length;++d){var s=t[d].resolve(),u=l.safeProp(s.name);s.map?(n("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",s.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),a(n,s,d,u+"[ks[i]]")("}")("}")):s.repeated?(n("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",s.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),a(n,s,d,u+"[i]")("}")("}")):(s.resolvedType instanceof v||n("if(d%s!=null){",u),a(n,s,d,u),s.resolvedType instanceof v||n("}"))}return n("return m")};function i(e,r,t,n){if(r.resolvedType)r.resolvedType instanceof v?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",n,t,n,n,t,n,n):e("d%s=types[%i].toObject(m%s,o)",n,t,n);else{var d=!1;switch(r.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",n,n,n,n);break;case"uint64":d=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',n)("d%s=o.longs===String?String(m%s):m%s",n,n,n)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",n,n,n,n,d?"true":"",n);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",n,n,n,n,n);break;default:e("d%s=m%s",n,n);break}}return e}c.toObject=function(r){var t=r.fieldsArray.slice().sort(l.compareFieldsById);if(!t.length)return l.codegen()("return {}");for(var n=l.codegen(["m","o"],r.name+"$toObject")("if(!o)")("o={}")("var d={}"),d=[],s=[],u=[],o=0;o<t.length;++o)t[o].partOf||(t[o].resolve().repeated?d:t[o].map?s:u).push(t[o]);if(d.length){for(n("if(o.arrays||o.defaults){"),o=0;o<d.length;++o)n("d%s=[]",l.safeProp(d[o].name));n("}")}if(s.length){for(n("if(o.objects||o.defaults){"),o=0;o<s.length;++o)n("d%s={}",l.safeProp(s[o].name));n("}")}if(u.length){for(n("if(o.defaults){"),o=0;o<u.length;++o){var h=u[o],m=l.safeProp(h.name);if(h.resolvedType instanceof v)n("d%s=o.enums===String?%j:%j",m,h.resolvedType.valuesById[h.typeDefault],h.typeDefault);else if(h.long)n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",h.typeDefault.low,h.typeDefault.high,h.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",m)("}else")("d%s=o.longs===String?%j:%i",m,h.typeDefault.toString(),h.typeDefault.toNumber());else if(h.bytes){var S="["+Array.prototype.slice.call(h.typeDefault).join(",")+"]";n("if(o.bytes===String)d%s=%j",m,String.fromCharCode.apply(String,h.typeDefault))("else{")("d%s=%s",m,S)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",m,m)("}")}else n("d%s=%j",m,h.typeDefault)}n("}")}var y=!1;for(o=0;o<t.length;++o){var h=t[o],g=r._fieldsArray.indexOf(h),m=l.safeProp(h.name);h.map?(y||(y=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",m,m)("d%s={}",m)("for(var j=0;j<ks2.length;++j){"),i(n,h,g,m+"[ks2[j]]")("}")):h.repeated?(n("if(m%s&&m%s.length){",m,m)("d%s=[]",m)("for(var j=0;j<m%s.length;++j){",m),i(n,h,g,m+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",m,h.name),i(n,h,g,m),h.partOf&&n("if(o.oneofs)")("d%s=%j",l.safeProp(h.partOf.name),h.name)),n("}")}return n("return d")}})(converter)),converter}var wrappers={},hasRequiredWrappers;function requireWrappers(){return hasRequiredWrappers||(hasRequiredWrappers=1,(function(f){var c=f,v=requireMessage();c[".google.protobuf.Any"]={fromObject:function(l){if(l&&l["@type"]){var a=l["@type"].substring(l["@type"].lastIndexOf("/")+1),i=this.lookup(a);if(i){var e=l["@type"].charAt(0)==="."?l["@type"].slice(1):l["@type"];return e.indexOf("/")===-1&&(e="/"+e),this.create({type_url:e,value:i.encode(i.fromObject(l)).finish()})}}return this.fromObject(l)},toObject:function(l,a){var i="type.googleapis.com/",e="",r="";if(a&&a.json&&l.type_url&&l.value){r=l.type_url.substring(l.type_url.lastIndexOf("/")+1),e=l.type_url.substring(0,l.type_url.lastIndexOf("/")+1);var t=this.lookup(r);t&&(l=t.decode(l.value))}if(!(l instanceof this.ctor)&&l instanceof v){var n=l.$type.toObject(l,a),d=l.$type.fullName[0]==="."?l.$type.fullName.slice(1):l.$type.fullName;return e===""&&(e=i),r=e+d,n["@type"]=r,n}return this.toObject(l,a)}}})(wrappers)),wrappers}var type,hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1,type=m;var f=requireNamespace();((m.prototype=Object.create(f.prototype)).constructor=m).className="Type";var c=require_enum(),v=requireOneof(),l=requireField(),a=requireMapfield(),i=requireService(),e=requireMessage(),r=requireReader(),t=requireWriter(),n=requireUtil(),d=requireEncoder(),s=requireDecoder(),u=requireVerifier(),o=requireConverter(),h=requireWrappers();function m(y,g){f.call(this,y,g),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(m.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var y=Object.keys(this.fields),g=0;g<y.length;++g){var O=this.fields[y[g]],b=O.id;if(this._fieldsById[b])throw Error("duplicate id "+b+" in "+this);this._fieldsById[b]=O}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=n.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=n.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=m.generateConstructor(this)())},set:function(y){var g=y.prototype;g instanceof e||((y.prototype=new e).constructor=y,n.merge(y.prototype,g)),y.$type=y.prototype.$type=this,n.merge(y,e,!0),this._ctor=y;for(var O=0;O<this.fieldsArray.length;++O)this._fieldsArray[O].resolve();var b={};for(O=0;O<this.oneofsArray.length;++O)b[this._oneofsArray[O].resolve().name]={get:n.oneOfGetter(this._oneofsArray[O].oneof),set:n.oneOfSetter(this._oneofsArray[O].oneof)};O&&Object.defineProperties(y.prototype,b)}}}),m.generateConstructor=function(g){for(var O=n.codegen(["p"],g.name),b=0,k;b<g.fieldsArray.length;++b)(k=g._fieldsArray[b]).map?O("this%s={}",n.safeProp(k.name)):k.repeated&&O("this%s=[]",n.safeProp(k.name));return O("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function S(y){return y._fieldsById=y._fieldsArray=y._oneofsArray=null,delete y.encode,delete y.decode,delete y.verify,y}return m.fromJSON=function(g,O){var b=new m(g,O.options);b.extensions=O.extensions,b.reserved=O.reserved;for(var k=Object.keys(O.fields),I=0;I<k.length;++I)b.add((typeof O.fields[k[I]].keyType<"u"?a.fromJSON:l.fromJSON)(k[I],O.fields[k[I]]));if(O.oneofs)for(k=Object.keys(O.oneofs),I=0;I<k.length;++I)b.add(v.fromJSON(k[I],O.oneofs[k[I]]));if(O.nested)for(k=Object.keys(O.nested),I=0;I<k.length;++I){var L=O.nested[k[I]];b.add((L.id!==void 0?l.fromJSON:L.fields!==void 0?m.fromJSON:L.values!==void 0?c.fromJSON:L.methods!==void 0?i.fromJSON:f.fromJSON)(k[I],L))}return O.extensions&&O.extensions.length&&(b.extensions=O.extensions),O.reserved&&O.reserved.length&&(b.reserved=O.reserved),O.group&&(b.group=!0),O.comment&&(b.comment=O.comment),O.edition&&(b._edition=O.edition),b._defaultEdition="proto3",b},m.prototype.toJSON=function(g){var O=f.prototype.toJSON.call(this,g),b=g?!!g.keepComments:!1;return n.toObject(["edition",this._editionToJSON(),"options",O&&O.options||void 0,"oneofs",f.arrayToJSON(this.oneofsArray,g),"fields",f.arrayToJSON(this.fieldsArray.filter(function(k){return!k.declaringField}),g)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",O&&O.nested||void 0,"comment",b?this.comment:void 0])},m.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;f.prototype.resolveAll.call(this);var g=this.oneofsArray;for(b=0;b<g.length;)g[b++].resolve();for(var O=this.fieldsArray,b=0;b<O.length;)O[b++].resolve();return this},m.prototype._resolveFeaturesRecursive=function(g){return this._needsRecursiveFeatureResolution?(g=this._edition||g,f.prototype._resolveFeaturesRecursive.call(this,g),this.oneofsArray.forEach(O=>{O._resolveFeatures(g)}),this.fieldsArray.forEach(O=>{O._resolveFeatures(g)}),this):this},m.prototype.get=function(g){return this.fields[g]||this.oneofs&&this.oneofs[g]||this.nested&&this.nested[g]||null},m.prototype.add=function(g){if(this.get(g.name))throw Error("duplicate name '"+g.name+"' in "+this);if(g instanceof l&&g.extend===void 0){if(this._fieldsById?this._fieldsById[g.id]:this.fieldsById[g.id])throw Error("duplicate id "+g.id+" in "+this);if(this.isReservedId(g.id))throw Error("id "+g.id+" is reserved in "+this);if(this.isReservedName(g.name))throw Error("name '"+g.name+"' is reserved in "+this);return g.parent&&g.parent.remove(g),this.fields[g.name]=g,g.message=this,g.onAdd(this),S(this)}return g instanceof v?(this.oneofs||(this.oneofs={}),this.oneofs[g.name]=g,g.onAdd(this),S(this)):f.prototype.add.call(this,g)},m.prototype.remove=function(g){if(g instanceof l&&g.extend===void 0){if(!this.fields||this.fields[g.name]!==g)throw Error(g+" is not a member of "+this);return delete this.fields[g.name],g.parent=null,g.onRemove(this),S(this)}if(g instanceof v){if(!this.oneofs||this.oneofs[g.name]!==g)throw Error(g+" is not a member of "+this);return delete this.oneofs[g.name],g.parent=null,g.onRemove(this),S(this)}return f.prototype.remove.call(this,g)},m.prototype.isReservedId=function(g){return f.isReservedId(this.reserved,g)},m.prototype.isReservedName=function(g){return f.isReservedName(this.reserved,g)},m.prototype.create=function(g){return new this.ctor(g)},m.prototype.setup=function(){for(var g=this.fullName,O=[],b=0;b<this.fieldsArray.length;++b)O.push(this._fieldsArray[b].resolve().resolvedType);this.encode=d(this)({Writer:t,types:O,util:n}),this.decode=s(this)({Reader:r,types:O,util:n}),this.verify=u(this)({types:O,util:n}),this.fromObject=o.fromObject(this)({types:O,util:n}),this.toObject=o.toObject(this)({types:O,util:n});var k=h[g];if(k){var I=Object.create(this);I.fromObject=this.fromObject,this.fromObject=k.fromObject.bind(I),I.toObject=this.toObject,this.toObject=k.toObject.bind(I)}return this},m.prototype.encode=function(g,O){return this.setup().encode(g,O)},m.prototype.encodeDelimited=function(g,O){return this.encode(g,O&&O.len?O.fork():O).ldelim()},m.prototype.decode=function(g,O){return this.setup().decode(g,O)},m.prototype.decodeDelimited=function(g){return g instanceof r||(g=r.create(g)),this.decode(g,g.uint32())},m.prototype.verify=function(g){return this.setup().verify(g)},m.prototype.fromObject=function(g){return this.setup().fromObject(g)},m.prototype.toObject=function(g,O){return this.setup().toObject(g,O)},m.d=function(g){return function(b){n.decorateType(b,g)}},type}var root,hasRequiredRoot;function requireRoot(){if(hasRequiredRoot)return root;hasRequiredRoot=1,root=t;var f=requireNamespace();((t.prototype=Object.create(f.prototype)).constructor=t).className="Root";var c=requireField(),v=require_enum(),l=requireOneof(),a=requireUtil(),i,e,r;function t(u){f.call(this,"",u),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}t.fromJSON=function(o,h){return h||(h=new t),o.options&&h.setOptions(o.options),h.addJSON(o.nested).resolveAll()},t.prototype.resolvePath=a.path.resolve,t.prototype.fetch=a.fetch;function n(){}t.prototype.load=function u(o,h,m){typeof h=="function"&&(m=h,h=void 0);var S=this;if(!m)return a.asPromise(u,S,o,h);var y=m===n;function g(W,N){if(m){if(y)throw W;N&&N.resolveAll();var w=m;m=null,w(W,N)}}function O(W){var N=W.lastIndexOf("google/protobuf/");if(N>-1){var w=W.substring(N);if(w in r)return w}return null}function b(W,N){try{if(a.isString(N)&&N.charAt(0)==="{"&&(N=JSON.parse(N)),!a.isString(N))S.setOptions(N.options).addJSON(N.nested);else{e.filename=W;var w=e(N,S,h),T,x=0;if(w.imports)for(;x<w.imports.length;++x)(T=O(w.imports[x])||S.resolvePath(W,w.imports[x]))&&k(T);if(w.weakImports)for(x=0;x<w.weakImports.length;++x)(T=O(w.weakImports[x])||S.resolvePath(W,w.weakImports[x]))&&k(T,!0)}}catch(E){g(E)}!y&&!I&&g(null,S)}function k(W,N){if(W=O(W)||W,!(S.files.indexOf(W)>-1)){if(S.files.push(W),W in r){y?b(W,r[W]):(++I,setTimeout(function(){--I,b(W,r[W])}));return}if(y){var w;try{w=a.fs.readFileSync(W).toString("utf8")}catch(T){N||g(T);return}b(W,w)}else++I,S.fetch(W,function(T,x){if(--I,!!m){if(T){N?I||g(null,S):g(T);return}b(W,x)}})}}var I=0;a.isString(o)&&(o=[o]);for(var L=0,j;L<o.length;++L)(j=S.resolvePath("",o[L]))&&k(j);return y?(S.resolveAll(),S):(I||g(null,S),S)},t.prototype.loadSync=function(o,h){if(!a.isNode)throw Error("not supported");return this.load(o,h,n)},t.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(o){return"'extend "+o.extend+"' in "+o.parent.fullName}).join(", "));return f.prototype.resolveAll.call(this)};var d=/^[A-Z]/;function s(u,o){var h=o.parent.lookup(o.extend);if(h){var m=new c(o.fullName,o.id,o.type,o.rule,void 0,o.options);return h.get(m.name)||(m.declaringField=o,o.extensionField=m,h.add(m)),!0}return!1}return t.prototype._handleAdd=function(o){if(o instanceof c)o.extend!==void 0&&!o.extensionField&&(s(this,o)||this.deferred.push(o));else if(o instanceof v)d.test(o.name)&&(o.parent[o.name]=o.values);else if(!(o instanceof l)){if(o instanceof i)for(var h=0;h<this.deferred.length;)s(this,this.deferred[h])?this.deferred.splice(h,1):++h;for(var m=0;m<o.nestedArray.length;++m)this._handleAdd(o._nestedArray[m]);d.test(o.name)&&(o.parent[o.name]=o)}(o instanceof i||o instanceof v||o instanceof c)&&(this._fullyQualifiedObjects[o.fullName]=o)},t.prototype._handleRemove=function(o){if(o instanceof c){if(o.extend!==void 0)if(o.extensionField)o.extensionField.parent.remove(o.extensionField),o.extensionField=null;else{var h=this.deferred.indexOf(o);h>-1&&this.deferred.splice(h,1)}}else if(o instanceof v)d.test(o.name)&&delete o.parent[o.name];else if(o instanceof f){for(var m=0;m<o.nestedArray.length;++m)this._handleRemove(o._nestedArray[m]);d.test(o.name)&&delete o.parent[o.name]}delete this._fullyQualifiedObjects[o.fullName]},t._configure=function(u,o,h){i=u,e=o,r=h},root}var hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util.exports;hasRequiredUtil=1;var f=util.exports=requireMinimal(),c=requireRoots(),v,l;f.codegen=requireCodegen(),f.fetch=requireFetch(),f.path=requirePath(),f.fs=f.inquire("fs"),f.toArray=function(n){if(n){for(var d=Object.keys(n),s=new Array(d.length),u=0;u<d.length;)s[u]=n[d[u++]];return s}return[]},f.toObject=function(n){for(var d={},s=0;s<n.length;){var u=n[s++],o=n[s++];o!==void 0&&(d[u]=o)}return d};var a=/\\/g,i=/"/g;f.isReserved=function(n){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(n)},f.safeProp=function(n){return!/^[$\w_]+$/.test(n)||f.isReserved(n)?'["'+n.replace(a,"\\\\").replace(i,'\\"')+'"]':"."+n},f.ucFirst=function(n){return n.charAt(0).toUpperCase()+n.substring(1)};var e=/_([a-z])/g;f.camelCase=function(n){return n.substring(0,1)+n.substring(1).replace(e,function(d,s){return s.toUpperCase()})},f.compareFieldsById=function(n,d){return n.id-d.id},f.decorateType=function(n,d){if(n.$type)return d&&n.$type.name!==d&&(f.decorateRoot.remove(n.$type),n.$type.name=d,f.decorateRoot.add(n.$type)),n.$type;v||(v=requireType());var s=new v(d||n.name);return f.decorateRoot.add(s),s.ctor=n,Object.defineProperty(n,"$type",{value:s,enumerable:!1}),Object.defineProperty(n.prototype,"$type",{value:s,enumerable:!1}),s};var r=0;return f.decorateEnum=function(n){if(n.$type)return n.$type;l||(l=require_enum());var d=new l("Enum"+r++,n);return f.decorateRoot.add(d),Object.defineProperty(n,"$type",{value:d,enumerable:!1}),d},f.setProperty=function(n,d,s,u){function o(h,m,S){var y=m.shift();if(y==="__proto__"||y==="prototype")return h;if(m.length>0)h[y]=o(h[y]||{},m,S);else{var g=h[y];if(g&&u)return h;g&&(S=[].concat(g).concat(S)),h[y]=S}return h}if(typeof n!="object")throw TypeError("dst must be an object");if(!d)throw TypeError("path must be specified");return d=d.split("."),o(n,d,s)},Object.defineProperty(f,"decorateRoot",{get:function(){return c.decorated||(c.decorated=new(requireRoot()))}}),util.exports}var hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,(function(f){var c=f,v=requireUtil(),l=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function a(i,e){var r=0,t={};for(e|=0;r<i.length;)t[l[r+e]]=i[r++];return t}c.basic=a([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),c.defaults=a([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",v.emptyArray,null]),c.long=a([0,0,0,1,1],7),c.mapKey=a([0,0,0,5,5,0,0,0,1,1,0,2],2),c.packed=a([1,5,0,0,0,5,5,0,0,0,1,1,0])})(types)),types}var field,hasRequiredField;function requireField(){if(hasRequiredField)return field;hasRequiredField=1,field=e;var f=requireObject();((e.prototype=Object.create(f.prototype)).constructor=e).className="Field";var c=require_enum(),v=requireTypes(),l=requireUtil(),a,i=/^required|optional|repeated$/;e.fromJSON=function(t,n){var d=new e(t,n.id,n.type,n.rule,n.extend,n.options,n.comment);return n.edition&&(d._edition=n.edition),d._defaultEdition="proto3",d};function e(r,t,n,d,s,u,o){if(l.isObject(d)?(o=s,u=d,d=s=void 0):l.isObject(s)&&(o=u,u=s,s=void 0),f.call(this,r,u),!l.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!l.isString(n))throw TypeError("type must be a string");if(d!==void 0&&!i.test(d=d.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(s!==void 0&&!l.isString(s))throw TypeError("extend must be a string");d==="proto3_optional"&&(d="optional"),this.rule=d&&d!=="optional"?d:void 0,this.type=n,this.id=t,this.extend=s||void 0,this.repeated=d==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=l.Long?v.long[n]!==void 0:!1,this.bytes=n==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=o}return Object.defineProperty(e.prototype,"required",{get:function(){return this._features.field_presence==="LEGACY_REQUIRED"}}),Object.defineProperty(e.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(e.prototype,"delimited",{get:function(){return this.resolvedType instanceof a&&this._features.message_encoding==="DELIMITED"}}),Object.defineProperty(e.prototype,"packed",{get:function(){return this._features.repeated_field_encoding==="PACKED"}}),Object.defineProperty(e.prototype,"hasPresence",{get:function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"}}),e.prototype.setOption=function(t,n,d){return f.prototype.setOption.call(this,t,n,d)},e.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return l.toObject(["edition",this._editionToJSON(),"rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",n?this.comment:void 0])},e.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=v.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof a?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof c&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof c)&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=l.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var t;l.base64.test(this.typeDefault)?l.base64.decode(this.typeDefault,t=l.newBuffer(l.base64.length(this.typeDefault)),0):l.utf8.write(this.typeDefault,t=l.newBuffer(l.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=l.emptyObject:this.repeated?this.defaultValue=l.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof a&&(this.parent.ctor.prototype[this.name]=this.defaultValue),f.prototype.resolve.call(this)},e.prototype._inferLegacyProtoFeatures=function(t){if(t!=="proto2"&&t!=="proto3")return{};var n={};if(this.rule==="required"&&(n.field_presence="LEGACY_REQUIRED"),this.parent&&v.defaults[this.type]===void 0){var d=this.parent.get(this.type.split(".").pop());d&&d instanceof a&&d.group&&(n.message_encoding="DELIMITED")}return this.getOption("packed")===!0?n.repeated_field_encoding="PACKED":this.getOption("packed")===!1&&(n.repeated_field_encoding="EXPANDED"),n},e.prototype._resolveFeatures=function(t){return f.prototype._resolveFeatures.call(this,this._edition||t)},e.d=function(t,n,d,s){return typeof n=="function"?n=l.decorateType(n).name:n&&typeof n=="object"&&(n=l.decorateEnum(n).name),function(o,h){l.decorateType(o.constructor).add(new e(h,t,n,d,{default:s}))}},e._configure=function(t){a=t},field}var oneof,hasRequiredOneof;function requireOneof(){if(hasRequiredOneof)return oneof;hasRequiredOneof=1,oneof=l;var f=requireObject();((l.prototype=Object.create(f.prototype)).constructor=l).className="OneOf";var c=requireField(),v=requireUtil();function l(i,e,r,t){if(Array.isArray(e)||(r=e,e=void 0),f.call(this,i,r),!(e===void 0||Array.isArray(e)))throw TypeError("fieldNames must be an Array");this.oneof=e||[],this.fieldsArray=[],this.comment=t}l.fromJSON=function(e,r){return new l(e,r.oneof,r.options,r.comment)},l.prototype.toJSON=function(e){var r=e?!!e.keepComments:!1;return v.toObject(["options",this.options,"oneof",this.oneof,"comment",r?this.comment:void 0])};function a(i){if(i.parent)for(var e=0;e<i.fieldsArray.length;++e)i.fieldsArray[e].parent||i.parent.add(i.fieldsArray[e])}return l.prototype.add=function(e){if(!(e instanceof c))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,a(this),this},l.prototype.remove=function(e){if(!(e instanceof c))throw TypeError("field must be a Field");var r=this.fieldsArray.indexOf(e);if(r<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(r,1),r=this.oneof.indexOf(e.name),r>-1&&this.oneof.splice(r,1),e.partOf=null,this},l.prototype.onAdd=function(e){f.prototype.onAdd.call(this,e);for(var r=this,t=0;t<this.oneof.length;++t){var n=e.get(this.oneof[t]);n&&!n.partOf&&(n.partOf=r,r.fieldsArray.push(n))}a(this)},l.prototype.onRemove=function(e){for(var r=0,t;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);f.prototype.onRemove.call(this,e)},Object.defineProperty(l.prototype,"isProto3Optional",{get:function(){if(this.fieldsArray==null||this.fieldsArray.length!==1)return!1;var i=this.fieldsArray[0];return i.options!=null&&i.options.proto3_optional===!0}}),l.d=function(){for(var e=new Array(arguments.length),r=0;r<arguments.length;)e[r]=arguments[r++];return function(n,d){v.decorateType(n.constructor).add(new l(d,e)),Object.defineProperty(n,d,{get:v.oneOfGetter(e),set:v.oneOfSetter(e)})}},oneof}var object,hasRequiredObject;function requireObject(){if(hasRequiredObject)return object;hasRequiredObject=1,object=e,e.className="ReflectionObject";const f=requireOneof();var c=requireUtil(),v,l={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},a={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},i={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function e(r,t){if(!c.isString(r))throw TypeError("name must be a string");if(t&&!c.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=r,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(e.prototype,{root:{get:function(){for(var r=this;r.parent!==null;)r=r.parent;return r}},fullName:{get:function(){for(var r=[this.name],t=this.parent;t;)r.unshift(t.name),t=t.parent;return r.join(".")}}}),e.prototype.toJSON=function(){throw Error()},e.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var n=t.root;n instanceof v&&n._handleAdd(this)},e.prototype.onRemove=function(t){var n=t.root;n instanceof v&&n._handleRemove(this),this.parent=null,this.resolved=!1},e.prototype.resolve=function(){return this.resolved?this:(this.root instanceof v&&(this.resolved=!0),this)},e.prototype._resolveFeaturesRecursive=function(t){return this._resolveFeatures(this._edition||t)},e.prototype._resolveFeatures=function(t){if(!this._featuresResolved){var n={};if(!t)throw new Error("Unknown edition for "+this.fullName);var d=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(t));if(this._edition){if(t==="proto2")n=Object.assign({},a);else if(t==="proto3")n=Object.assign({},i);else if(t==="2023")n=Object.assign({},l);else throw new Error("Unknown edition: "+t);this._features=Object.assign(n,d||{}),this._featuresResolved=!0;return}if(this.partOf instanceof f){var s=Object.assign({},this.partOf._features);this._features=Object.assign(s,d||{})}else if(!this.declaringField)if(this.parent){var u=Object.assign({},this.parent._features);this._features=Object.assign(u,d||{})}else throw new Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},e.prototype._inferLegacyProtoFeatures=function(){return{}},e.prototype.getOption=function(t){if(this.options)return this.options[t]},e.prototype.setOption=function(t,n,d){return this.options||(this.options={}),/^features\./.test(t)?c.setProperty(this.options,t,n,d):(!d||this.options[t]===void 0)&&(this.getOption(t)!==n&&(this.resolved=!1),this.options[t]=n),this},e.prototype.setParsedOption=function(t,n,d){this.parsedOptions||(this.parsedOptions=[]);var s=this.parsedOptions;if(d){var u=s.find(function(m){return Object.prototype.hasOwnProperty.call(m,t)});if(u){var o=u[t];c.setProperty(o,d,n)}else u={},u[t]=c.setProperty({},d,n),s.push(u)}else{var h={};h[t]=n,s.push(h)}return this},e.prototype.setOptions=function(t,n){if(t)for(var d=Object.keys(t),s=0;s<d.length;++s)this.setOption(d[s],t[d[s]],n);return this},e.prototype.toString=function(){var t=this.constructor.className,n=this.fullName;return n.length?t+" "+n:t},e.prototype._editionToJSON=function(){if(!(!this._edition||this._edition==="proto3"))return this._edition},e._configure=function(r){v=r},object}var _enum,hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;hasRequired_enum=1,_enum=l;var f=requireObject();((l.prototype=Object.create(f.prototype)).constructor=l).className="Enum";var c=requireNamespace(),v=requireUtil();function l(a,i,e,r,t,n){if(f.call(this,a,e),i&&typeof i!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=t||{},this.valuesOptions=n,this._valuesFeatures={},this.reserved=void 0,i)for(var d=Object.keys(i),s=0;s<d.length;++s)typeof i[d[s]]=="number"&&(this.valuesById[this.values[d[s]]=i[d[s]]]=d[s])}return l.prototype._resolveFeatures=function(i){return i=this._edition||i,f.prototype._resolveFeatures.call(this,i),Object.keys(this.values).forEach(e=>{var r=Object.assign({},this._features);this._valuesFeatures[e]=Object.assign(r,this.valuesOptions&&this.valuesOptions[e]&&this.valuesOptions[e].features)}),this},l.fromJSON=function(i,e){var r=new l(i,e.values,e.options,e.comment,e.comments);return r.reserved=e.reserved,e.edition&&(r._edition=e.edition),r._defaultEdition="proto3",r},l.prototype.toJSON=function(i){var e=i?!!i.keepComments:!1;return v.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",e?this.comment:void 0,"comments",e?this.comments:void 0])},l.prototype.add=function(i,e,r,t){if(!v.isString(i))throw TypeError("name must be a string");if(!v.isInteger(e))throw TypeError("id must be an integer");if(this.values[i]!==void 0)throw Error("duplicate name '"+i+"' in "+this);if(this.isReservedId(e))throw Error("id "+e+" is reserved in "+this);if(this.isReservedName(i))throw Error("name '"+i+"' is reserved in "+this);if(this.valuesById[e]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+e+" in "+this);this.values[i]=e}else this.valuesById[this.values[i]=e]=i;return t&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[i]=t||null),this.comments[i]=r||null,this},l.prototype.remove=function(i){if(!v.isString(i))throw TypeError("name must be a string");var e=this.values[i];if(e==null)throw Error("name '"+i+"' does not exist in "+this);return delete this.valuesById[e],delete this.values[i],delete this.comments[i],this.valuesOptions&&delete this.valuesOptions[i],this},l.prototype.isReservedId=function(i){return c.isReservedId(this.reserved,i)},l.prototype.isReservedName=function(i){return c.isReservedName(this.reserved,i)},_enum}var encoder_1,hasRequiredEncoder;function requireEncoder(){if(hasRequiredEncoder)return encoder_1;hasRequiredEncoder=1,encoder_1=a;var f=require_enum(),c=requireTypes(),v=requireUtil();function l(i,e,r,t){return e.delimited?i("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,t,(e.id<<3|3)>>>0,(e.id<<3|4)>>>0):i("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,t,(e.id<<3|2)>>>0)}function a(i){for(var e=v.codegen(["m","w"],i.name+"$encode")("if(!w)")("w=Writer.create()"),r,t,n=i.fieldsArray.slice().sort(v.compareFieldsById),r=0;r<n.length;++r){var d=n[r].resolve(),s=i._fieldsArray.indexOf(d),u=d.resolvedType instanceof f?"int32":d.type,o=c.basic[u];t="m"+v.safeProp(d.name),d.map?(e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,d.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(d.id<<3|2)>>>0,8|c.mapKey[d.keyType],d.keyType),o===void 0?e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",s,t):e(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|o,u,t),e("}")("}")):d.repeated?(e("if(%s!=null&&%s.length){",t,t),d.packed&&c.packed[u]!==void 0?e("w.uint32(%i).fork()",(d.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",u,t)("w.ldelim()"):(e("for(var i=0;i<%s.length;++i)",t),o===void 0?l(e,d,s,t+"[i]"):e("w.uint32(%i).%s(%s[i])",(d.id<<3|o)>>>0,u,t)),e("}")):(d.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,d.name),o===void 0?l(e,d,s,t):e("w.uint32(%i).%s(%s)",(d.id<<3|o)>>>0,u,t))}return e("return w")}return encoder_1}var hasRequiredIndexLight;function requireIndexLight(){if(hasRequiredIndexLight)return indexLight.exports;hasRequiredIndexLight=1;var f=indexLight.exports=requireIndexMinimal();f.build="light";function c(l,a,i){return typeof a=="function"?(i=a,a=new f.Root):a||(a=new f.Root),a.load(l,i)}f.load=c;function v(l,a){return a||(a=new f.Root),a.loadSync(l)}return f.loadSync=v,f.encoder=requireEncoder(),f.decoder=requireDecoder(),f.verifier=requireVerifier(),f.converter=requireConverter(),f.ReflectionObject=requireObject(),f.Namespace=requireNamespace(),f.Root=requireRoot(),f.Enum=require_enum(),f.Type=requireType(),f.Field=requireField(),f.OneOf=requireOneof(),f.MapField=requireMapfield(),f.Service=requireService(),f.Method=requireMethod(),f.Message=requireMessage(),f.wrappers=requireWrappers(),f.types=requireTypes(),f.util=requireUtil(),f.ReflectionObject._configure(f.Root),f.Namespace._configure(f.Type,f.Service,f.Enum),f.Root._configure(f.Type),f.Field._configure(f.Type),indexLight.exports}var tokenize_1,hasRequiredTokenize;function requireTokenize(){if(hasRequiredTokenize)return tokenize_1;hasRequiredTokenize=1,tokenize_1=d;var f=/[\s{}=;:[\],'"()<>]/g,c=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,v=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,l=/^ *[*/]+ */,a=/^\s*\*?\/*/,i=/\n/g,e=/\s/,r=/\\(.?)/g,t={0:"\0",r:"\r",n:`
|
|
5
|
+
`,t:" "};function n(s){return s.replace(r,function(u,o){switch(o){case"\\":case"":return o;default:return t[o]||""}})}d.unescape=n;function d(s,u){s=s.toString();var o=0,h=s.length,m=1,S=0,y={},g=[],O=null;function b(_){return Error("illegal "+_+" (line "+m+")")}function k(){var _=O==="'"?v:c;_.lastIndex=o-1;var M=_.exec(s);if(!M)throw b("string");return o=_.lastIndex,w(O),O=null,n(M[1])}function I(_){return s.charAt(_)}function L(_,M,F){var V={type:s.charAt(_++),lineEmpty:!1,leading:F},B;u?B=2:B=3;var $=_-B,z;do if(--$<0||(z=s.charAt($))===`
|
|
6
|
+
`){V.lineEmpty=!0;break}while(z===" "||z===" ");for(var D=s.substring(_,M).split(i),K=0;K<D.length;++K)D[K]=D[K].replace(u?a:l,"").trim();V.text=D.join(`
|
|
7
|
+
`).trim(),y[m]=V,S=m}function j(_){var M=W(_),F=s.substring(_,M),V=/^\s*\/\//.test(F);return V}function W(_){for(var M=_;M<h&&I(M)!==`
|
|
8
|
+
`;)M++;return M}function N(){if(g.length>0)return g.shift();if(O)return k();var _,M,F,V,B,$=o===0;do{if(o===h)return null;for(_=!1;e.test(F=I(o));)if(F===`
|
|
9
|
+
`&&($=!0,++m),++o===h)return null;if(I(o)==="/"){if(++o===h)throw b("comment");if(I(o)==="/")if(u){if(V=o,B=!1,j(o-1)){B=!0;do if(o=W(o),o===h||(o++,!$))break;while(j(o))}else o=Math.min(h,W(o)+1);B&&(L(V,o,$),$=!0),m++,_=!0}else{for(B=I(V=o+1)==="/";I(++o)!==`
|
|
10
|
+
`;)if(o===h)return null;++o,B&&(L(V,o-1,$),$=!0),++m,_=!0}else if((F=I(o))==="*"){V=o+1,B=u||I(V)==="*";do{if(F===`
|
|
11
|
+
`&&++m,++o===h)throw b("comment");M=F,F=I(o)}while(M!=="*"||F!=="/");++o,B&&(L(V,o-2,$),$=!0),_=!0}else return"/"}}while(_);var z=o;f.lastIndex=0;var D=f.test(I(z++));if(!D)for(;z<h&&!f.test(I(z));)++z;var K=s.substring(o,o=z);return(K==='"'||K==="'")&&(O=K),K}function w(_){g.push(_)}function T(){if(!g.length){var _=N();if(_===null)return null;w(_)}return g[0]}function x(_,M){var F=T(),V=F===_;if(V)return N(),!0;if(!M)throw b("token '"+F+"', '"+_+"' expected");return!1}function E(_){var M=null,F;return _===void 0?(F=y[m-1],delete y[m-1],F&&(u||F.type==="*"||F.lineEmpty)&&(M=F.leading?F.text:null)):(S<_&&T(),F=y[_],delete y[_],F&&!F.lineEmpty&&(u||F.type==="/")&&(M=F.leading?null:F.text)),M}return Object.defineProperty({next:N,peek:T,push:w,skip:x,cmnt:E},"line",{get:function(){return m}})}return tokenize_1}var parse_1,hasRequiredParse;function requireParse(){if(hasRequiredParse)return parse_1;hasRequiredParse=1,parse_1=k,k.filename=null,k.defaults={keepCase:!1};var f=requireTokenize(),c=requireRoot(),v=requireType(),l=requireField(),a=requireMapfield(),i=requireOneof(),e=require_enum(),r=requireService(),t=requireMethod(),n=requireObject(),d=requireTypes(),s=requireUtil(),u=/^[1-9][0-9]*$/,o=/^-?[1-9][0-9]*$/,h=/^0[x][0-9a-fA-F]+$/,m=/^-?0[x][0-9a-fA-F]+$/,S=/^0[0-7]+$/,y=/^-?0[0-7]+$/,g=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,O=/^[a-zA-Z_][a-zA-Z_0-9]*$/,b=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;function k(I,L,j){L instanceof c||(j=L,L=new c),j||(j=k.defaults);var W=j.preferTrailingComment||!1,N=f(I,j.alternateCommentMode||!1),w=N.next,T=N.push,x=N.peek,E=N.skip,_=N.cmnt,M=!0,F,V,B,$="proto2",z=L,D=[],K={},X=j.keepCase?function(P){return P}:s.camelCase;function fe(){D.forEach(P=>{P._edition=$,Object.keys(K).forEach(C=>{P.getOption(C)===void 0&&P.setOption(C,K[C],!0)})})}function U(P,C,p){var R=k.filename;return p||(k.filename=null),Error("illegal "+(C||"token")+" '"+P+"' ("+(R?R+", ":"")+"line "+N.line+")")}function re(){var P=[],C;do{if((C=w())!=='"'&&C!=="'")throw U(C);P.push(w()),E(C),C=x()}while(C==='"'||C==="'");return P.join("")}function ue(P){var C=w();switch(C){case"'":case'"':return T(C),re();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return le(C,!0)}catch{if(b.test(C))return C;throw U(C,"value")}}function se(P,C){var p,R;do if(C&&((p=x())==='"'||p==="'")){var q=re();if(P.push(q),$>=2023)throw U(q,"id")}else try{P.push([R=ve(w()),E("to",!0)?ve(w()):R])}catch(J){if(C&&b.test(p)&&$>=2023)P.push(p);else throw J}while(E(",",!0));var A={options:void 0};A.setOption=function(J,Y){this.options===void 0&&(this.options={}),this.options[J]=Y},pe(A,function(Y){if(Y==="option")de(A,Y),E(";");else throw U(Y)},function(){we(A)})}function le(P,C){var p=1;switch(P.charAt(0)==="-"&&(p=-1,P=P.substring(1)),P){case"inf":case"INF":case"Inf":return p*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(u.test(P))return p*parseInt(P,10);if(h.test(P))return p*parseInt(P,16);if(S.test(P))return p*parseInt(P,8);if(g.test(P))return p*parseFloat(P);throw U(P,"number",C)}function ve(P,C){switch(P){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!C&&P.charAt(0)==="-")throw U(P,"id");if(o.test(P))return parseInt(P,10);if(m.test(P))return parseInt(P,16);if(y.test(P))return parseInt(P,8);throw U(P,"id")}function ae(){if(F!==void 0)throw U("package");if(F=w(),!b.test(F))throw U(F,"name");z=z.define(F),E(";")}function he(){var P=x(),C;switch(P){case"weak":C=B||(B=[]),w();break;case"public":w();default:C=V||(V=[]);break}P=re(),E(";"),C.push(P)}function be(){if(E("="),$=re(),$<2023)throw U($,"syntax");E(";")}function _e(){if(E("="),$=re(),!["2023"].includes($))throw U($,"edition");E(";")}function Re(P,C){switch(C){case"option":return de(P,C),E(";"),!0;case"message":return Oe(P,C),!0;case"enum":return ye(P,C),!0;case"service":return ke(P,C),!0;case"extend":return xe(P,C),!0}return!1}function pe(P,C,p){var R=N.line;if(P&&(typeof P.comment!="string"&&(P.comment=_()),P.filename=k.filename),E("{",!0)){for(var q;(q=w())!=="}";)C(q);E(";",!0)}else p&&p(),E(";"),P&&(typeof P.comment!="string"||W)&&(P.comment=_(R)||P.comment)}function Oe(P,C){if(!O.test(C=w()))throw U(C,"type name");var p=new v(C);pe(p,function(q){if(!Re(p,q))switch(q){case"map":Te(p);break;case"required":if($!=="proto2")throw U(q);case"repeated":oe(p,q);break;case"optional":if($==="proto3")oe(p,"proto3_optional");else{if($!=="proto2")throw U(q);oe(p,"optional")}break;case"oneof":me(p,q);break;case"extensions":se(p.extensions||(p.extensions=[]));break;case"reserved":se(p.reserved||(p.reserved=[]),!0);break;default:if($==="proto2"||!b.test(q))throw U(q);T(q),oe(p,"optional");break}}),P.add(p),P===z&&D.push(p)}function oe(P,C,p){var R=w();if(R==="group"){qe(P,C);return}for(;R.endsWith(".")||x().startsWith(".");)R+=w();if(!b.test(R))throw U(R,"type");var q=w();if(!O.test(q))throw U(q,"name");q=X(q),E("=");var A=new l(q,ve(w()),R,C,p);if(pe(A,function(Z){if(Z==="option")de(A,Z),E(";");else throw U(Z)},function(){we(A)}),C==="proto3_optional"){var J=new i("_"+q);A.setOption("proto3_optional",!0),J.add(A),P.add(J)}else P.add(A);P===z&&D.push(A)}function qe(P,C){if($>=2023)throw U("group");var p=w();if(!O.test(p))throw U(p,"name");var R=s.lcFirst(p);p===R&&(p=s.ucFirst(p)),E("=");var q=ve(w()),A=new v(p);A.group=!0;var J=new l(R,q,p,C);J.filename=k.filename,pe(A,function(Z){switch(Z){case"option":de(A,Z),E(";");break;case"required":case"repeated":oe(A,Z);break;case"optional":$==="proto3"?oe(A,"proto3_optional"):oe(A,"optional");break;case"message":Oe(A,Z);break;case"enum":ye(A,Z);break;case"reserved":se(A.reserved||(A.reserved=[]),!0);break;default:throw U(Z)}}),P.add(A).add(J)}function Te(P){E("<");var C=w();if(d.mapKey[C]===void 0)throw U(C,"type");E(",");var p=w();if(!b.test(p))throw U(p,"type");E(">");var R=w();if(!O.test(R))throw U(R,"name");E("=");var q=new a(X(R),ve(w()),C,p);pe(q,function(J){if(J==="option")de(q,J),E(";");else throw U(J)},function(){we(q)}),P.add(q)}function me(P,C){if(!O.test(C=w()))throw U(C,"name");var p=new i(X(C));pe(p,function(q){q==="option"?(de(p,q),E(";")):(T(q),oe(p,"optional"))}),P.add(p)}function ye(P,C){if(!O.test(C=w()))throw U(C,"name");var p=new e(C);pe(p,function(q){switch(q){case"option":de(p,q),E(";");break;case"reserved":se(p.reserved||(p.reserved=[]),!0),p.reserved===void 0&&(p.reserved=[]);break;default:ge(p,q)}}),P.add(p),P===z&&D.push(p)}function ge(P,C){if(!O.test(C))throw U(C,"name");E("=");var p=ve(w(),!0),R={options:void 0};R.getOption=function(q){return this.options[q]},R.setOption=function(q,A){n.prototype.setOption.call(R,q,A)},R.setParsedOption=function(){},pe(R,function(A){if(A==="option")de(R,A),E(";");else throw U(A)},function(){we(R)}),P.add(C,p,R.comment,R.parsedOptions||R.options)}function de(P,C){var p,R,q=!0;for(C==="option"&&(C=w());C!=="=";){if(C==="("){var A=w();E(")"),C="("+A+")"}if(q){if(q=!1,C.includes(".")&&!C.includes("(")){var J=C.split(".");p=J[0]+".",C=J[1];continue}p=C}else R=R?R+=C:C;C=w()}var Y=R?p.concat(R):p,Z=Ae(P,Y);R=R&&R[0]==="."?R.slice(1):R,p=p&&p[p.length-1]==="."?p.slice(0,-1):p,Ee(P,p,Z,R)}function Ae(P,C){if(E("{",!0)){for(var p={};!E("}",!0);){if(!O.test(ne=w()))throw U(ne,"name");if(ne===null)throw U(ne,"end of input");var R,q=ne;if(E(":",!0),x()==="{")R=Ae(P,C+"."+ne);else if(x()==="["){R=[];var A;if(E("[",!0)){do A=ue(),R.push(A);while(E(",",!0));E("]"),typeof A<"u"&&ce(P,C+"."+ne,A)}}else R=ue(),ce(P,C+"."+ne,R);var J=p[q];J&&(R=[].concat(J).concat(R)),p[q]=R,E(",",!0),E(";",!0)}return p}var Y=ue();return ce(P,C,Y),Y}function ce(P,C,p){if(z===P&&/^features\./.test(C)){K[C]=p;return}P.setOption&&P.setOption(C,p)}function Ee(P,C,p,R){P.setParsedOption&&P.setParsedOption(C,p,R)}function we(P){if(E("[",!0)){do de(P,"option");while(E(",",!0));E("]")}return P}function ke(P,C){if(!O.test(C=w()))throw U(C,"service name");var p=new r(C);pe(p,function(q){if(!Re(p,q))if(q==="rpc")Ce(p,q);else throw U(q)}),P.add(p),P===z&&D.push(p)}function Ce(P,C){var p=_(),R=C;if(!O.test(C=w()))throw U(C,"name");var q=C,A,J,Y,Z;if(E("("),E("stream",!0)&&(J=!0),!b.test(C=w())||(A=C,E(")"),E("returns"),E("("),E("stream",!0)&&(Z=!0),!b.test(C=w())))throw U(C);Y=C,E(")");var G=new t(q,R,A,Y,J,Z);G.comment=p,pe(G,function(Q){if(Q==="option")de(G,Q),E(";");else throw U(Q)}),P.add(G)}function xe(P,C){if(!b.test(C=w()))throw U(C,"reference");var p=C;pe(null,function(q){switch(q){case"required":case"repeated":oe(P,q,p);break;case"optional":$==="proto3"?oe(P,"proto3_optional",p):oe(P,"optional",p);break;default:if($==="proto2"||!b.test(q))throw U(q);T(q),oe(P,"optional",p);break}})}for(var ne;(ne=w())!==null;)switch(ne){case"package":if(!M)throw U(ne);ae();break;case"import":if(!M)throw U(ne);he();break;case"syntax":if(!M)throw U(ne);be();break;case"edition":if(!M)throw U(ne);_e();break;case"option":de(z,ne),E(";",!0);break;default:if(Re(z,ne)){M=!1;continue}throw U(ne)}return fe(),k.filename=null,{package:F,imports:V,weakImports:B,root:L}}return parse_1}var common_1,hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common_1;hasRequiredCommon=1,common_1=c;var f=/\/|\./;function c(l,a){f.test(l)||(l="google/protobuf/"+l+".proto",a={nested:{google:{nested:{protobuf:{nested:a}}}}}),c[l]=a}c("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var v;return c("duration",{Duration:v={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}}),c("timestamp",{Timestamp:v}),c("empty",{Empty:{fields:{}}}),c("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}}),c("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}}),c("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}}),c.get=function(a){return c[a]||null},common_1}var hasRequiredSrc;function requireSrc(){if(hasRequiredSrc)return src.exports;hasRequiredSrc=1;var f=src.exports=requireIndexLight();return f.build="full",f.tokenize=requireTokenize(),f.parse=requireParse(),f.common=requireCommon(),f.Root._configure(f.Type,f.parse,f.common),src.exports}var protobufjs,hasRequiredProtobufjs;function requireProtobufjs(){return hasRequiredProtobufjs||(hasRequiredProtobufjs=1,protobufjs=requireSrc()),protobufjs}var protobufjsExports=requireProtobufjs();const protobuf=_commonjsHelpers.getDefaultExportFromCjs(protobufjsExports),useWebSocket=()=>{const f=vue.ref(null),c=vue.ref("disconnected"),v=vue.ref(!0),l={nested:{Event:{fields:{source:{type:"string",id:1},pageStart:{type:"uint64",id:2},pageEnd:{type:"uint64",id:3},samplePeriod:{type:"double",id:4},pointsPerEvent:{type:"uint64",id:5},isResampled:{type:"bool",id:6},data:{rule:"repeated",type:"double",id:7},times:{rule:"repeated",type:"uint64",id:8},spikeGroup:{rule:"repeated",type:"uint32",id:9}}},Instruction:{fields:{command:{type:"string",id:1},argument:{type:"string",id:2}}},Segment:{fields:{startTs:{type:"uint64",id:1},source:{type:"string",id:2},lastUsed:{type:"uint64",id:3},unit:{type:"string",id:4},samplePeriod:{type:"double",id:5},requestedSamplePeriod:{type:"double",id:6},pageStart:{type:"uint64",id:7},isMinMax:{type:"bool",id:8},unitM:{type:"uint64",id:9},segmentType:{type:"string",id:10},nrPoints:{type:"uint64",id:11},data:{rule:"repeated",type:"double",id:12},pageEnd:{type:"uint64",id:13},channelName:{type:"string",id:14}}},IngestSegment:{fields:{channelId:{type:"string",id:1},startTime:{type:"uint64",id:2},samplePeriod:{type:"double",id:3},data:{rule:"repeated",type:"double",id:4}}},TimeSeriesMessage:{fields:{segment:{type:"Segment",id:3},event:{rule:"repeated",type:"Event",id:4},instruction:{type:"Instruction",id:5},ingestSegment:{type:"IngestSegment",id:6},totalResponses:{type:"uint64",id:7},responseSequenceId:{type:"uint64",id:8}}}}},i=protobuf.Root.fromJSON(l).TimeSeriesMessage;let e=null,r=null,t=null,n=null,d=null,s=null,u=!1,o=null;const h=(_,M=2e3)=>new Promise(F=>{if(!_||_.readyState===WebSocket.CLOSED){F();return}const V=Date.now(),B=()=>{_.readyState===WebSocket.CLOSED||Date.now()-V>M?F():setTimeout(B,50)};B()}),m=async()=>{if(f.value){const _=f.value;f.value=null,c.value="disconnected",(_.readyState===WebSocket.OPEN||_.readyState===WebSocket.CONNECTING)&&(_.close(),await h(_))}o=null},S=async(_,M,F)=>{if(o&&await o,f.value){const V=f.value.readyState;(V===WebSocket.CONNECTING||V===WebSocket.OPEN||V===WebSocket.CLOSING)&&(await m(),await new Promise(B=>setTimeout(B,100)))}s=M,v.value=!0,o=new Promise(async(V,B)=>{try{const $=F||await index.useToken(),z=_+"?session="+$+"&package="+s,D=new WebSocket(z);f.value=D,D.onopen=()=>{y(),V(D)},D.onclose=()=>{g(),V(null)},D.onmessage=O,D.onerror=K=>{console.error("WebSocket error:",K),c.value="disconnected",B(K)},setTimeout(()=>{D.readyState===WebSocket.CONNECTING&&(D.close(),B(new Error("WebSocket connection timeout")))},1e4)}catch($){console.error("Failed to create WebSocket:",$),B($)}});try{await o}catch(V){console.error("WebSocket connection failed:",V),o=null}},y=()=>{if(c.value="connected",v.value){if(d&&d(),s){const _={montage:"NOT_MONTAGED",packageId:s};f.value.send(JSON.stringify(_))}v.value=!1}},g=()=>{c.value="disconnected"},O=_=>{if(typeof _.data=="string"){let F={};try{F=JSON.parse(_.data)}catch{n==null||n({error:"JSON Parse Error"});return}F.channelDetails?t==null||t(F.channelDetails):F.error&&(n==null||n(F));return}const M=new FileReader;M.addEventListener("loadend",function(F){const V=F.target.result,B=new Uint8Array(V),$=i.decode(B),z=$.segment;if($.event&&$.event.length>0&&$.event[0].pageStart){const D=$.event[0],K=[[],[]],X=D.times.length/2;let fe=0;for(let se=0;se<X;se++)K[0].push(D.times[fe]),K[1].push(D.times[fe+1]),fe+=2;let U=new Array(3),re=0;for(;re<3;)U[re]=new Float32Array(K[0].length),re++;const ue={chId:D.source,lastUsed:0,unit:"uV",samplePeriod:D.samplePeriod,pageStart:D.pageStart,pageEnd:D.pageEnd,startTs:D.pageStart,isMinMax:D.isResampled,unitM:1,type:"Neural",nrPoints:X,parsedData:K,cData:U};r==null||r({pageStart:D.pageStart,data:ue,type:"Neural",nrResponses:$.totalResponses})}if(z!==null){let D=null;z.isMinMax?D=z.data.length/2:D=z.data.length;const K=new Array(3),X=z.startTs;let fe=0,U=0,re=0;for(;re<3;)K[re]=new Float64Array(D),re++;if(z.isMinMax){let ae=0;for(let he=0;he<D;he++){let be=-z.data[ae],_e=-z.data[ae+1];K[0][he]=X+he*z.samplePeriod,K[1][he]=be,K[2][he]=_e,isNaN(be)||(U++,fe+=be+(_e-be)/2),ae+=2}}else for(let ae=0;ae<D;ae++){let he=-z.data[ae];K[0][ae]=X+ae*z.samplePeriod,K[1][ae]=he,isNaN(he)||(U++,fe+=he)}let ue=0;if(u){const ae=Array.prototype.slice.call(K[1]).sort();ue=ae[Math.round(ae.length/2)]}let se=new Array(3),le=0;for(;le<3;)se[le]=new Float32Array(K[0].length),le++;const ve={chId:z.source,lastUsed:z.lastUsed,unit:z.unit,samplePeriod:z.samplePeriod,pageStart:z.pageStart,pageEnd:z.pageEnd,startTs:X,isMinMax:z.isMinMax,unitM:z.unitM,type:z.segmentType,nrPoints:D,cData:se,parsedData:K,median:ue,sumElem:fe,nrValidPoints:U,name:z.channelName,label:z.channelName};ve.nrPoints>0?e==null||e({pageStart:z.pageStart,data:ve,type:z.segmentType,nrResponses:$.totalResponses}):e==null||e({pageStart:z.pageStart,data:ve,nrResponses:$.totalResponses,type:"gap"})}}),M.readAsArrayBuffer(_.data)},b=_=>f.value&&f.value.readyState===1?(f.value.send(JSON.stringify(_)),!0):!1,k=_=>{let M;switch(_){case"NOT_MONTAGED":M={montage:"NOT_MONTAGED",packageId:s};break;default:M={montage:"CUSTOM_MONTAGE",packageId:s,montageMap:_}}b(M)},I=_=>{f.value&&f.value.readyState===1?f.value.send(JSON.stringify(_)):setTimeout(()=>I(_),200)},L=()=>{if(f.value&&f.value.readyState===1){const _={requestType:"DumpBufferRequest"};return f.value.send(JSON.stringify(_)),!0}return console.warn("⚠️ Cannot send dump buffer request - WebSocket not connected"),!1},j=_=>{e=_},W=_=>{r=_},N=_=>{t=_},w=_=>{n=_};vue.onUnmounted(async()=>{await m()});const T=_=>{d=_},x=_=>{s=_},E=_=>{u=_};return{websocket:vue.readonly(f),connectionStatus:vue.readonly(c),openWebsocket:S,send:b,sendMontageMessage:k,sendFilterMessage:I,sendDumpBufferRequest:L,disconnect:m,setClearChannelsCallback:T,setPackageId:x,setUseMedian:E,onSegment:j,onEvent:W,onChannelDetails:N,onError:w}},useCanvasRenderer=()=>{const f=vue.ref(null),c=vue.ref(null),v=(r,t,n)=>t*(r+n),l=(r=1)=>r,a=(r,t,n,d,s,u,o=!1)=>{const h=c.value;if(!h){console.warn("blurArea ref is missing, skipping renderData");return}const m=h.getContext("2d");if(!m){console.warn("Unable to get 2D context for blurArea, skipping renderData");return}m.setTransform(u,0,0,u,0,0),m.fillStyle="rgb(220,220,220)";const S=f.value;if(!S){console.warn("plotArea ref is missing, skipping drawing.");return}const y=S.getContext("2d");if(!y){console.warn("Unable to get 2D context for plotArea, skipping drawing.");return}y.setTransform(u,0,0,u,0,0),y.clearRect(0,0,d.cWidth,d.cHeight),m.clearRect(0,0,d.cWidth,d.cHeight);const g=t.reduce((O,b)=>b.visible?O+1:O,0);i(t,d.pHeight,g),y.save();for(let O in r.channels)if(r.channels.hasOwnProperty(O)){const b=r.channels[O];let k=null;if(k=t.find(_=>_.id===b.id),!k||!k.visible)continue;const I=d.start,L=d.rsPeriod,j=n.XOFFSET,W=Math.min(Math.round(d.cHeight/r.channels.length-2),10);for(let _=0;_<k.dataSegments.length;_+=2){if(k.dataSegments[_+1]<I)continue;if(k.dataSegments[_]>I+d.duration)break;let M=Math.floor(j+(k.dataSegments[_]-I)/L),F=Math.floor(j+(k.dataSegments[_+1]-I)/L),V=Math.floor(k.rowBaseline-W/2);m.fillRect(M,V,F-M,W)}e(k,b,d,n,s,o);const N=b.blocks.length;let w="Continuous";N&&(w=b.blocks[0].type),k.hover?k.selected?(y.strokeStyle="rgba(39,96,255,0.70)",y.fillStyle="rgba(39,96,255,0.70)"):(y.strokeStyle="rgba(39,96,255,0.60)",y.fillStyle="rgba(39,96,255,0.60)"):k.selected?(y.strokeStyle="rgb(249,162,58)",y.fillStyle="rgb(3249,162,58)"):w==="Neural"?y.strokeStyle="rgb(249,162,58)":(y.strokeStyle="black",y.fillStyle="black");let T=null,x=!0,E=1e6*(1/k.sf);for(let _=0;_<N;_++){const M=b.blocks[_];if(M.nrPoints===0)continue;const F=M.cData,V=M.nrPoints,B=F[0],$=F[1],z=F[2];let D=M.renderStartIndex,K=M.renderEndIndex;switch(m.clearRect(Math.floor(B[D]),Math.floor(k.rowBaseline-W/2),Math.ceil(B[K]-B[D]+2),W+1),M.type){case"Continuous":case"realtime":if(M.isMinMax){if(M.samplePeriod/E<3&&(x=!1),x){y.beginPath(),_>0&&B[D]<T.x+3?y.moveTo(T.x,T.y):y.moveTo(B[D],$[D]);for(let X=D;X<K+1;X++)y.lineTo(B[X],$[X]);for(let X=K-1;X>=D;X--)y.lineTo(B[X],z[X]);_>0&&B[D]<T.x+3&&y.lineTo(T.x,T.y2),y.closePath(),y.fill()}else{y.beginPath();for(let X=D;X<K+1;X++)y.lineTo(B[X],$[X]),y.lineTo(B[X],z[X]),y.moveTo(B[X],$[X]);y.stroke()}y.beginPath(),y.moveTo(B[D],$[D]);for(let X=D;X<K+1;X++)y.lineTo(B[X],$[X]);y.stroke()}else{_===0?(y.beginPath(),y.moveTo(B[D],$[D])):B[D]>T.x+2&&y.moveTo(B[D],$[D]);for(let X=D;X<K+1;X++)y.lineTo(B[X],$[X]);_===N-1&&y.stroke()}break;case"Neural":y.beginPath();for(let X=0;X<V;X++)y.moveTo(B[X],$[X]),y.lineTo(B[X],z[X]);y.stroke();break}T={x:B[V-1],y:$[V-1],y2:z[V-1]}}}y.restore()},i=(r,t,n)=>{const d=r.map(function(h,m){return{index:m,value:h.rank}});d.sort(function(h,m){return+(h.value>m.value)||+(h.value===m.value)-1});const s=d.map(function(h){return h.index}),u=(t+20)/n;let o=0;for(let h=0;h<s.length;h++){const m=r[s[h]];m.visible?(m.rowBaseline=.5*u+o*u,o++):m.rowBaseline=null}},e=(r,t,n,d,s,u)=>{let o=t.blocks.length;switch(r.type){case"UNIT":if(!u)for(let m=0;m<o;m++){const S=t.blocks[m],y=S.cData,g=S.parsedData,O=d.XOFFSET,b=S.parsedData[0].length,k=y[0],I=y[1],L=y[2],j=g[0],W=r.rowBaseline|0,N=n.start,w=n.rsPeriod,T=n.cHeight/(2*(n.nrVisibleChannels+1))|0;for(let x=0;x<b;x++)k[x]=O+(j[x]-N)/w,I[x]=W-T,L[x]=W+T}break;case"CONTINUOUS":let h=0;if(!u){t.mean=0,t.median=0;for(let m=0;m<o;m++){const S=t.blocks[m];S.nrValidPoints>0&&(t.mean=(S.sumElem+h*t.mean)/(h+S.nrValidPoints),t.median=(S.median+h*t.median)/(h+S.nrValidPoints),h+=S.nrValidPoints)}}for(let m=0;m<o;m++){const S=t.blocks[m];let y=Math.floor((n.start-S.startTs)/S.samplePeriod);S.renderStartIndex=y>0?y:0;let g=Math.floor((n.start+n.duration-(S.startTs+S.nrPoints*S.samplePeriod))/S.samplePeriod);S.renderEndIndex=g>=0?S.nrPoints-1:S.nrPoints+g;const O=S.cData,b=S.parsedData,k=s*r.rowScale,I=d.XOFFSET,L=S.parsedData[0].length,j=O[0],W=O[1],N=O[2],w=b[0],T=b[1],x=b[2],E=r.rowBaseline;let _=0;d.USEMEDIAN?_=t.median:_=t.mean;const M=n.rsPeriod,F=n.start;for(let V=0;V<L;V++)j[V]=I+(w[V]-F)/M,W[V]=E-(T[V]-_)*k,S.isMinMax&&(T[V]===x[V]?N[V]=W[V]+1:N[V]=E-(x[V]-_)*k)}break}};return{plotCanvasRef:f,blurCanvasRef:c,initializeCanvases:l,renderData:a,computeChannelViews:i,getPointCoords:e,cpCanvasScaler:v}},useTimeSeriesData=()=>{const f=vue.ref([]),c=vue.ref(new Map),v=vue.reactive({start:0,duration:0,channels:[]}),l=vue.ref(!1),a=vue.ref(0),i=vue.ref(null),e=vue.ref(1),r=15e6,t=3,n=(b,k,I,L)=>{L||(L=0);let j=d(b,k,L,b.length-1,I);return j===-1?j=0:j<0&&(j=-j-2),j},d=(b,k,I,L,j)=>{if(L<I){let N;if(L>=0?N=L:N=-L-2,N===-1)return N;const w=b[N].pageStart;for(;N>=0&&b[N].pageStart===w;)N--;return N++,-N-2}const W=parseInt((I+L)/2);if(b[W].pageStart>k)return d(b,k,I,W-1,j);if(b[W].pageStart<k)return d(b,k,W+1,L,j);{let N=W;if(j){for(;N>=0&&b[N].pageStart===k;)N--;N++}else{for(;N<b.length&&b[N].pageStart===k;)N++;N--}return N}},s=(b,k,I)=>{if(!b)return Promise.resolve();const L=[];if(b.length>0){const j=[];for(let W=0;W<b.length;W++){const N=b[W].content,T={id:I?I(N):N.id,serverId:N.serverId,label:N.name,displayName:N.displayName,type:N.channelType,segments:[],start:N.start,end:N.end,sampleFreq:N.rate,unit:N.unit,gaps:[],dataSegments:[]},x=T.label.split("<->",3),E=x[0];let _=x.length>1?parseFloat(x[1]):0;_=isNaN(_)?x[1]:_,j.push({id:T.id,serverId:T.serverId,type:T.type,label:T.label,displayName:T.displayName,label_split:x,label_prefix:E,label_value:_,dataSegments:[],rank:W,visible:!0,plotAgainst:null,rowBaseline:null,rowScale:1,rowAdjust:0,selected:!1,hover:!1,unit:N.unit,sf:N.rate,filter:{},hideFilter:!0,isEditing:!1}),L.push(T)}k&&k.setChannels(j)}return u(L),f.value=L,a.value=b.length,l.value=!0,Promise.resolve()},u=b=>{var k,I;if(b.length===0){i.value=null;return}i.value=((I=(k=b[0])==null?void 0:k.gaps)==null?void 0:I[0])||null},o=b=>{let k=null;const I=b.data.chId||b.data.source,L=b.data.label||b.data.name;if(k=f.value.find(j=>j.serverId===I&&j.label===L),!k){console.error("❌ NO EXACT MATCH - rejecting to prevent data corruption:",{serverResponseId:I,serverResponseName:L,availableChannels:f.value.map(j=>({id:j.id,serverId:j.serverId,label:j.label,matches:{serverId:j.serverId===I,label:j.label===L}}))});return}switch(b.type){case"gap":case"Neural":case"Continuous":let j=!1,W=k&&k.segments;if(W&&b.type!=="gap"&&(j=!0,W.length>0)){let w=n(W,b.data.startTs,!0,0);for(;W[w]&&W[w].pageStart===b.data.pageStart;){if(W[w].startTs===b.data.startTs){j=!1;break}w++}}let N=c.value.get(b.data.pageStart);if(N){let w=N.counter.get(k.id);if(isNaN(w)&&(w=b.nrResponses!==void 0?b.nrResponses:1,N.counter.set(k.id,w)),w>0&&(w=w-1,N.counter.set(k.id,w)),w===0){let T=!0;for(let[x,E]of N.counter.entries())if(E>0||isNaN(E)){T=!1;break}T&&c.value.delete(b.data.pageStart)}}j&&(W.push(b.data),W.sort((w,T)=>w.startTs<T.startTs?-1:w.startTs>T.startTs?1:0));break}},h=()=>{i.value=[],c.value.clear();for(let b=0;b<f.value.length;b++)f.value[b].segments=[];for(let b=0;b<v.channels.length;b++)v.channels[b].blocks=[]},m=b=>{let k=0,I=0,L=v.channels;for(let W=0;W<L.length;W++){let N=L[W].blocks;for(let w=0;w<N.length;w++)N[w].type==="Continuous"&&(k+=S(N[w].parsedData[1]),I++)}const j=k/I;return!isNaN(j)&&b?b/L.length/(2*j):1},S=b=>{const k=y(b),I=b.map(function(W){const N=W-k;return N*N}),L=y(I);return Math.sqrt(L)},y=b=>b.reduce(function(L,j){return L+j},0)/b.length;return{chData:f,requestedPages:c,viewData:v,channelsReady:l,autoScale:a,globalGaps:i,pageSize:r,prefetchPages:t,currentRequestedSamplePeriod:e,initChannels:s,computeSummary:u,dataCallback:o,invalidate:h,autoScaleViewData:m,segmIndexOf:n,updateCurrentRequestedSamplePeriod:b=>{e.value=Math.ceil(b)},isDataCurrentForViewport:b=>b&&b.startTs&&b.startTs>0,standardDeviation:S,average:y}},useDataRequests=()=>{const f=vue.ref([]),c=vue.ref([]),v=vue.ref(null),l=vue.ref(!1),a=vue.ref(null),i=vue.ref(0),e=vue.ref(0);let r=null;const t=(g,O)=>{r=function(){var k;c.value.length>0?(((k=O.value)==null?void 0:k.size)||0)<5&&(g([c.value[0]])?c.value.splice(0,1):(console.warn("❌ Prefetch request failed"),clearInterval(v.value),l.value=!1)):(clearInterval(v.value),l.value=!1)}},n=(g,O,b,k,I,L,j,W,N,w)=>{k.start=O,k.duration=b;const T=[];for(let x=0;x<k.channels.length;x++){const E=w?w(k.channels[x]):k.channels[x].id;T.push(E)}for(let x=0;x<g.length;x++){const E=g[x],_=w?w(E):E.id;T.indexOf(_)<0&&k.channels.push({id:_,mean:null,firstRenderedIndex:0,lastRenderedIndex:0,blocks:[]})}return d(g,O,b,k,I,L,j,W,N,w)},d=(g,O,b,k,I,L,j,W,N,w)=>{f.value=[];let x=!1;(i.value!==O||e.value!==b)&&(c.value=[],x=!0),i.value=O,e.value=b;const E=[];for(let _=0;_<k.channels.length;_++)E.push(k.channels[_]);for(let _=0;_<g.length;_++){let M=!1;const F=g[_],V=F.segments,B=w?w(F):F.id,$=E.findIndex(re=>(w?w(re):re.id)===B);if($===-1)continue;const z=k.channels[$];if(!z)continue;z.blocks=[];let D=Math.floor(O/15e6)*15e6;D<0&&(D=0);let K=0,X=0;V.length>0&&(K=N(V,D,!0,0));let fe=O+b+L.PREFETCHPAGES*15e6;fe>W&&(fe=W);let U;for(V.length>0&&(U=V[K]);D<fe||M;){M=!1;let re=!1;if(U&&(re=D>=U.pageStart&&D<=U.pageEnd),re){const ue=U.pageStart;for(;U&&U.pageStart===ue;)U.startTs<O+b&&z.blocks.push(U),X+=1,U=V[K+X];D+=15e6,U&&U.pageStart===ue&&(M=!0)}else{if(I.get(D)){if(D+=15e6,U&&D>=U.pageEnd)for(;U&&U.pageEnd<D&&(X+=1,U=V[K+X],!!U););continue}if(D>=W){D+=15e6;continue}let ue=D<O+b,se=!1;if(ue){for(let le in c.value)if(c.value[le].start===D){c.value.splice(le,1);break}for(let le in f.value)f.value[le].start===D&&(f.value[le].channels.push(F),se=!0);se||f.value.push({channels:[F],start:D,duration:15e6,isInViewport:!0,pixelWidth:Math.ceil(j)})}else if(x){for(let le in c.value)c.value[le].start===D&&(c.value[le].channels.push(F),se=!0);se||c.value.push({channels:[F],start:D,duration:15e6,isInViewport:!1,pixelWidth:Math.ceil(j)})}if(D+=15e6,U&&D>=U.pageEnd)for(;U&&U.pageEnd<D&&(X+=1,U=V[K+X],!!U););}}z.blocks.sort(s)}return{asyncRequests:f.value,asyncPreRequests:c.value}},s=(g,O)=>g.startTs<O.startTs?-1:g.startTs>O.startTs?1:0,u=(g,O=0,b,k,I,L,j,W)=>{if(g.length===0)return!1;const N=W;for(let w=0;w<g.length;w++){let T;w===0?T=g[O]:w===O?T=g[0]:T=g[w];let x=T.start+T.duration;if(T.start>=N&&console.error("❌ Request start time is beyond dataset end!",{requestStart:T.start,requestDuration:T.duration,calculatedEndTime:x,datasetEndTime:N,isStartAfterEnd:T.start>=N}),x>N&&(console.warn("📊 Clamping request end time to dataset boundary:",{original:x,clamped:N,requestStart:T.start,duration:T.duration}),x=N),x<=T.start){console.error("🚨 CRITICAL: Invalid request detected - endTime <= startTime! Skipping request.",{startTime:T.start,endTime:x,duration:T.duration,datasetEndTime:N,originalEndTime:T.start+T.duration});continue}const E=b;if(E&&E.readyState===1){const _=T.channels.map(z=>{const D=z.serverId||z.id,K=z.label||z.name;return{id:D,name:K}}),M={session:k,minMax:!0,startTime:T.start,endTime:x,packageId:I.content.id,pixelWidth:T.pixelWidth,virtualChannels:_},F=JSON.stringify(M);E.send(F);const V=T.channels.length,B=new Map;for(let z=0;z<V;z++){const D=T.channels[z].id;B.set(D,NaN)}const $={count:V,counter:B,subPageCount:NaN,ts:Date.now(),inViewport:T.isInViewport,channels:T.channels.map(z=>({id:z.id,serverId:z.serverId,label:z.label}))};j.set(T.start,$)}else return console.error("❌ WebSocket not ready for sending requests:",{readyState:E==null?void 0:E.readyState,wsExists:!!E}),!1}return f.value=[],!0},o=()=>{c.value.length>0&&(l.value||(v.value=setInterval(r,150),l.value=!0))},h=()=>{v.value&&(clearInterval(v.value),v.value=null),l.value=!1},m=()=>{f.value=[],c.value=[],i.value=0,e.value=0,h()},S=()=>{const g=f.value.slice();return f.value=[],g},y=(g,O,b)=>{const k=[];return g.forEach(function(I,L){if(!isNaN(I.subPageCount)){const j=[];I.counter.forEach(function(W,N){!isNaN(W)&&W>0&&j.push(N)}),j.length>0&&k.push({channels:j,start:L,duration:O,isInViewport:!0,pixelWidth:Math.ceil(b)})}}),g.clear(),k};return vue.onUnmounted(()=>{h()}),{aSyncRequests:vue.readonly(f),aSyncPreRequests:vue.readonly(c),isPrefetching:vue.readonly(l),lastViewPageRequest:vue.readonly(a),initializePrefetch:t,generatePoints:n,requestData:d,requestDataFromServer:u,startPrefetching:o,stopPrefetching:h,clearRequests:m,getViewportRequests:S,reRequestPages:y}},useChannelProcessing=(f,c,v,l)=>{const a=vue.reactive({totalChannels:0,processedChannels:0,montageChannels:0,errors:0,lastProcessingTime:0}),i=vue.ref(new Map),e=vue.ref(new Map),r=vue.computed(()=>c.value!=="NOT_MONTAGED"),t=vue.computed(()=>!r.value||!v.value?null:v.value.find(w=>w.name===c.value)),n=vue.computed(()=>{var w;return((w=t.value)==null?void 0:w.channelPairs)||{}});vue.watch(c,()=>{i.value.clear(),e.value.clear()});const d=w=>w?index.propOr("","id",w):"",s=w=>w?index.propOr("","serverId",w)||index.propOr("","id",w):"",u=w=>index.propOr("","id",w),o=w=>{if(!w)return"";let T=index.propOr("","id",w);if(r.value&&typeof T=="string"){const x=T.split("_");T=x.length>1?head(x):T}return T},h=(w,T,x=null)=>{var F,V;const E=x||c.value,_=`${w}_${T}_${E}`;if(e.value.has(_))return e.value.get(_);let M=`${w}-${T}`;if(E!=="NOT_MONTAGED"){const B=(F=v.value)==null?void 0:F.find($=>$.name===E);if(B!=null&&B.channelPairs)for(const $ of Object.keys(B.channelPairs)){const z=B.channelPairs[$];if(((V=z.channels)==null?void 0:V.length)===2&&z.channels[0]===w&&z.channels[1]===T){M=z.name||M;break}}}return e.value.set(_,M),M},m=w=>{if(!Array.isArray(w))return console.warn("Invalid channel details provided:",w),[];const T=performance.now();a.totalChannels=w.length,a.processedChannels=0,a.errors=0;const x=w.map(({id:E,name:_})=>{var M;try{const F=S(E);if(!F)return console.warn(`❌ Base channel not found for ID: ${E}, available base channels:`,((M=f.value)==null?void 0:M.map(B=>({id:B==null?void 0:B.id,name:B==null?void 0:B.name})))||[]),a.errors++,null;const V=y(E,_,F);return a.processedChannels++,r.value&&a.montageChannels++,V}catch(F){return console.error(`❌ Error processing channel ${E}:`,F),a.errors++,null}}).filter(Boolean);return a.lastProcessingTime=performance.now()-T,x},S=w=>{var x;if(i.value.has(w))return i.value.get(w);const T=(x=f.value)==null?void 0:x.find(E=>(E==null?void 0:E.id)===w);return T&&i.value.set(w,T),T},y=(w,T,x)=>{let E=T;const _=w;let M=w;if(r.value){M=`${w}_${T}`;const V=T.split("<->",2);V.length===2&&(E=h(V[0],V[1]))}return{content:{id:M,serverId:_,name:T,channelType:x.channelType,label:T,displayName:E,unit:x.unit,rate:x.rate,start:x.start,end:x.end,montageScheme:r.value?c.value:"NOT_MONTAGED",isMontaged:r.value,baseChannelId:w},properties:x.properties||[]}},g=w=>{var E,_,M;if(w==="NOT_MONTAGED")return{montage:"NOT_MONTAGED",packageId:(_=(E=l.value)==null?void 0:E.content)==null?void 0:_.id,montageMap:[]};const T=v.value.find(F=>F.name===w);if(!T)return console.warn("Montage not found:",w),null;const x=T.channelPairs.map(F=>F.channels);return{montage:"CUSTOM_MONTAGE",packageId:(M=l.value)==null?void 0:M.content.id,montageMap:x}},O=w=>{const T=[];if(!w)return T.push("Channel configuration is null or undefined"),{isValid:!1,errors:T};const x=["id","label","type","unit","rate"];for(const _ of x)w[_]||T.push(`Missing required field: ${_}`);w.rate&&(typeof w.rate!="number"||w.rate<=0)&&T.push("Sample rate must be a positive number"),w.start&&w.end&&w.start>=w.end&&T.push("Channel start time must be less than end time");const E=["CONTINUOUS","UNIT","Neural"];return w.type&&!E.includes(w.type)&&T.push(`Invalid channel type: ${w.type}. Must be one of: ${E.join(", ")}`),{isValid:T.length===0,errors:T}},b=w=>w.sort((T,x)=>{const E=T.label||"",_=x.label||"",M=E.split("<->",3),F=_.split("<->",3);if(M.length>2||F.length>2)return E.localeCompare(_);const V=M[0]||"",B=F[0]||"";if(V===B&&M.length>1&&F.length>1){const $=parseFloat(M[1]),z=parseFloat(F[1]);return!isNaN($)&&!isNaN(z)?$-z:M[1].localeCompare(F[1])}return V.localeCompare(B)}),k=(w,T=0)=>{const x=w.content,E=x.label.split("<->",3),_=E[0]||"",M=E.length>1?isNaN(parseFloat(E[1]))?E[1]:parseFloat(E[1]):0;return{id:x.id,serverId:x.serverId,type:x.channelType,label:x.label,displayName:x.displayName,labelParts:E,labelPrefix:_,labelValue:M,dataSegments:[],rank:T,visible:!0,plotAgainst:null,rowBaseline:null,rowScale:1,rowAdjust:0,selected:!1,hover:!1,unit:x.unit,sf:x.rate,filter:{},hideFilter:!0,isEditing:!1,montageScheme:x.montageScheme||"NOT_MONTAGED",isMontaged:x.isMontaged||!1,baseChannelId:x.baseChannelId}},I=(w,T={})=>{const{channelType:x=null,visible:E=null,montageScheme:_=null,labelPattern:M=null,sampleRate:F=null}=T;return w.filter(V=>!(x&&V.type!==x||E!==null&&V.visible!==E||_&&V.montageScheme!==_||M&&!new RegExp(M,"i").test(V.label)||F&&V.sf!==F))},L=(w,T="type")=>{const x={};return w.forEach(E=>{let _;switch(T){case"type":_=E.type;break;case"montage":_=E.montageScheme||"NOT_MONTAGED";break;case"prefix":_=E.labelPrefix;break;case"sampleRate":_=E.sf;break;case"unit":_=E.unit;break;default:_="all"}x[_]||(x[_]=[]),x[_].push(E)}),x},j=()=>{var w;return{...a,cacheSize:i.value.size,montageCacheSize:e.value.size,isViewingMontage:r.value,currentMontageScheme:c.value,availableMontages:((w=v.value)==null?void 0:w.map(T=>T.name))||[]}},W=()=>{i.value.clear(),e.value.clear(),Object.assign(a,{totalChannels:0,processedChannels:0,montageChannels:0,errors:0,lastProcessingTime:0})},N=async w=>{const T=[];for(const x of w)try{const E=await x();T.push({success:!0,result:E})}catch(E){T.push({success:!1,error:E.message}),a.errors++}return T};return{processingStats:vue.readonly(a),isViewingMontage:r,currentMontage:t,montageChannelPairs:n,getChannelId:d,getBaseChannelId:o,getServerChannelId:s,getRawChannelId:u,getDisplayName:h,processChannelData:m,createMontagePayload:g,createChannelConfig:k,validateChannelConfig:O,sortChannelConfigurations:b,filterChannels:I,groupChannels:L,findBaseChannel:S,createVirtualChannel:y,getProcessingStats:j,clearCaches:W,batchProcessChannels:N}};function createThrottle(f,c,v={}){let l,a,i,e=null,r=0;const{leading:t=!0,trailing:n=!0}=v,d=function(){r=t===!1?0:Date.now(),e=null,i=f.apply(l,a),e||(l=a=null)},s=function(){const u=Date.now();!r&&t===!1&&(r=u);const o=c-(u-r);return l=this,a=arguments,o<=0||o>c?(e&&(clearTimeout(e),e=null),r=u,i=f.apply(l,a),e||(l=a=null)):!e&&n!==!1&&(e=setTimeout(d,o)),i};return s.cancel=function(){clearTimeout(e),r=0,e=l=a=null},s}const _hoisted_1$1={class:"timeseries-plot-canvas"},_hoisted_2$1=["width","height"],_hoisted_3$1=["width","height"],_sfc_main$1={__name:"TSPlotCanvas",props:{cHeight:{type:Number,required:!0},cWidth:{type:Number,required:!0},start:{type:Number,required:!0},duration:{type:Number,required:!0},constants:{type:Object,required:!0},rsPeriod:{type:Number,required:!0},ts_start:{type:Number,required:!0},ts_end:{type:Number,required:!0},globalZoomMult:{type:Number,required:!0},activeViewer:{type:Object,required:!0}},emits:["channelsInitialized","setGlobalZoom"],setup(f,{expose:c,emit:v}){const l=f,a=v,i=vue.computed(()=>l.activeViewer||{}),e=vue.computed(()=>{var A;return((A=i.value)==null?void 0:A.channels)||[]}),r=vue.inject("viewerStore",()=>index.createViewerStore("default"),!0),{viewerChannels:t,viewerMontageScheme:n,workspaceMontages:d}=pinia.storeToRefs(r),{websocket:s,connectionStatus:u,openWebsocket:o,send:h,sendFilterMessage:m,sendDumpBufferRequest:S,disconnect:y,setClearChannelsCallback:g,onSegment:O,onEvent:b,onChannelDetails:k,onError:I}=useWebSocket(),{plotCanvasRef:L,blurCanvasRef:j,initializeCanvases:W,renderData:N,cpCanvasScaler:w}=useCanvasRenderer(),T=vue.ref(1),x=vue.ref(!1),{chData:E,requestedPages:_,viewData:M,channelsReady:F,autoScale:V,initChannels:B,dataCallback:$,invalidate:z,autoScaleViewData:D,segmIndexOf:K,updateCurrentRequestedSamplePeriod:X,currentRequestedSamplePeriod:fe,isDataCurrentForViewport:U}=useTimeSeriesData(),{aSyncRequests:re,aSyncPreRequests:ue,isPrefetching:se,initializePrefetch:le,generatePoints:ve,requestDataFromServer:ae,startPrefetching:he,clearRequests:be}=useDataRequests(),{getChannelId:_e,processChannelData:Re,createMontagePayload:pe}=useChannelProcessing(e,n,d,i),Oe=vue.ref({totalRequests:0,successfulRequests:0,failedRequests:0,montageRequests:0,singleChannelRequests:0,lastPrefetchTime:null,averageResponseTime:0}),oe=vue.ref(null),qe=vue.ref(null),Te=vue.ref(null),me=vue.ref(0),ye=vue.computed(()=>T.value*l.cWidth),ge=vue.computed(()=>w(l.cHeight,T.value,0)),de=vue.computed(()=>l.cHeight-20),Ae=vue.computed(()=>({width:l.cWidth+"px",height:de.value+"px"})),ce=vue.reactive({start:l.start,duration:l.duration,cWidth:l.cWidth,cHeight:l.cHeight,pHeight:de.value,rsPeriod:l.rsPeriod,nrVisibleChannels:0}),Ee=vue.computed(()=>l.rsPeriod>0?l.rsPeriod:ce.duration>0&&ce.cWidth>0?ce.duration/ce.cWidth:(console.warn("⚠️ Using fallback rsPeriod = 1"),1));vue.watch(Ee,A=>{A>0&&X(A)},{immediate:!0});const we=()=>{var A;try{if(!F.value)return;ce.nrVisibleChannels=((A=t.value)==null?void 0:A.reduce((Z,G)=>G.visible?Z+1:Z,0))||0;let J=0,Y=0;if(M.channels.forEach((Z,G)=>{const H=Z.blocks||[],Q=H.reduce((ee,te)=>ee+(te.nrPoints||0),0);H.length>0&&(Y++,J+=H.length)}),Y===0)return;N(M,t.value||[],l.constants,ce,l.globalZoomMult,T.value)}catch(J){console.error("💥 ERROR in renderDataInternal:",J),console.error("💥 Stack trace:",J.stack)}},ke=vue.ref(),Ce=()=>{ke.value=setInterval(()=>{var Z,G;if(!F.value)return;const A={timestamp:new Date().toISOString(),requestedPagesSize:_.value.size,isPrefetching:se.value,pendingAsyncRequests:re.value.length,pendingPreRequests:ue.value.length,currentMontage:n.value,channelCount:((Z=t.value)==null?void 0:Z.length)||0,visibleChannelCount:((G=t.value)==null?void 0:G.filter(H=>H.visible).length)||0,connectionStatus:u.value,requestedPages:Array.from(_.value.entries()).map(([H,Q])=>{var ee;return{pageStart:H,channelCount:Q.count,inViewport:Q.inViewport,age:Date.now()-Q.ts,channels:((ee=Q.channels)==null?void 0:ee.map(te=>te.id))||Array.from(Q.counter.keys())}})},J=1e4,Y=A.requestedPages.filter(H=>H.age>J);Y.length>0&&(console.warn("⚠️ Detected stuck requests, cleaning up:",Y.map(H=>({pageStart:H.pageStart,age:Math.round(H.age/1e3)+"s",channels:H.channels}))),Y.forEach(H=>{_.value.delete(H.pageStart)}),me.value>0&&(me.value=Math.max(0,me.value-1))),A.pendingPreRequests>0&&!A.isPrefetching&&console.warn("⚠️ Prefetch is blocked with pending requests:",{pendingPreRequests:A.pendingPreRequests,requestedPagesSize:A.requestedPagesSize})},5e3)},xe=async()=>{if(!t.value)return;const A=E.value.filter(ee=>{const te=t.value.find(Se=>Se.id===ee.id);return te&&te.visible}),J=Ee.value,Y=ve(A,l.start,l.duration,M,_.value,l.constants,J,l.ts_end,K,_e),Z=Math.ceil(J);let G=!1;if(oe.value!==null&&Z!==oe.value&&(G=!0,`${oe.value}${Z}`),qe.value!==null){const ee=Math.abs(l.start-qe.value),te=Math.max(l.duration,Te.value||l.duration);ee>te*2&&(G=!0,`${ee}`,te*2,`${(ee/te).toFixed(1)}`)}const H=15;if(_.value.size>H&&(G=!0,`${_.value.size}${H}`),me.value>=5&&(G=!0,`${me.value}`),G&&!x.value){x.value=!0;try{S()&&(_.value.clear(),be(),me.value=0,await new Promise(ee=>setTimeout(ee,50)))}finally{x.value=!1}}else if(G&&x.value)return;oe.value=Z,qe.value=l.start,Te.value=l.duration;const Q=await index.useToken();Y.asyncRequests.length>0&&ae(Y.asyncRequests,0,s.value,Q,i.value,J,_.value,l.ts_end),Y.asyncPreRequests.length>0&&he()},ne=()=>{xe(),we()},P=()=>{xe(),V.value===0?(V.value--,C()):we()},C=()=>{const A=D(l.cHeight);A&&!isNaN(A)&&a("setGlobalZoom",A),we()},p=createThrottle(P,250,{leading:!1}),R=createThrottle(()=>ne(),50);vue.watch(()=>l.rsPeriod,(A,J)=>{A>0&&X(A),z(),_.value.clear()}),vue.watch(()=>l.duration,(A,J)=>{z()}),vue.watch(()=>n.value,A=>{if(s.value&&s.value.readyState===1){_.value.clear(),be(),z(),me.value=0,oe.value=null,qe.value=null,Te.value=null,F.value=!1;const J=pe(A);J&&h(J)}}),vue.watch(()=>[l.start,l.duration,l.cWidth,l.cHeight,l.rsPeriod],()=>{ce.start=l.start,ce.duration=l.duration,ce.cWidth=l.cWidth,ce.cHeight=l.cHeight,ce.pHeight=de.value,ce.rsPeriod=l.rsPeriod}),O(A=>{A.pageStart>=l.start+l.duration&&(Oe.value.totalRequests++,n.value!=="NOT_MONTAGED"?Oe.value.montageRequests++:Oe.value.singleChannelRequests++),$(A),A.pageStart<l.start+l.duration&&p()}),b(A=>{if(!U(A.data)){me.value++;return}me.value=0,$(A),A.pageStart<l.start+l.duration&&p()}),k(A=>{const J=Re(A);B(J,r,_e).then(()=>{z(),ne(),a("channelsInitialized")})}),I(A=>{r.setViewerErrors(A)});const q=async()=>{var Y,Z;const A=Ee.value;X(A),g(()=>{var G;if((G=t.value)!=null&&G.length){const Q={channelFiltersToClear:t.value.map(ee=>ee.id)};m(Q)}});const J=await index.useToken();if(le(G=>{const H=Ee.value;return ae(G,0,s.value,J,i.value,H,_.value,l.ts_end)},_),(Z=(Y=i.value)==null?void 0:Y.content)!=null&&Z.id)try{await o(r.config.timeseriesDiscoverApi,i.value.content.id,J),Ce()}catch(G){console.error("Failed to establish WebSocket connection:",G);return}};return vue.onMounted(async()=>{T.value=1,W(T.value),q()}),vue.onUnmounted(()=>{clearInterval(ke.value),_.value.size>0&&S(),r.resetViewer(),be(),y(),p.cancel&&p.cancel(),R.cancel&&R.cancel()}),c({renderAll:ne,invalidate:z,throttledDataRender:R,sendFilterMessage:m,viewData:M,requestedPages:_,chData:E,viewerChannels:t,currentRequestedSamplePeriod:fe,initPlotCanvas:q}),(A,J)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[vue.createElementVNode("canvas",{ref_key:"blurCanvasRef",ref:j,class:"canvas",width:ye.value,height:ge.value,style:vue.normalizeStyle(Ae.value)},null,12,_hoisted_2$1),vue.renderSlot(A.$slots,"axisCanvas",{},void 0,!0),vue.renderSlot(A.$slots,"annCanvas",{},void 0,!0),vue.createElementVNode("canvas",{ref_key:"plotCanvasRef",ref:L,class:"canvas",width:ye.value,height:ge.value,style:vue.normalizeStyle(Ae.value)},null,12,_hoisted_3$1)]))}},TSPlotCanvas=index._export_sfc(_sfc_main$1,[["__scopeId","data-v-c85e639d"]]),_hoisted_1={class:"timeseries-viewer-canvas"},_hoisted_2={id:"canvasWrapper"},_hoisted_3=["width","height"],_hoisted_4=["width","height"],_hoisted_5=["width","height"],_hoisted_6=["width","height"],_sfc_main={__name:"TSViewerCanvas",props:{windowHeight:Number,windowWidth:Number,duration:Number,start:Number,cHeight:Number,cWidth:Number,globalZoomMult:Number,constants:Object,tsStart:Number,tsEnd:Number,cursorLoc:Number,activeViewer:{type:Object,required:!0}},emits:["setDuration","setGlobalZoom","setStart","addAnnotation","updateAnnotation","closeAnnotationLayerWindow","channelsInitialized","annLayersInitialized"],setup(f,{expose:c,emit:v}){const l=vue.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./TSAnnotationCanvas-BCu7PmSh.cjs"))),a=f,i=v,e=vue.inject("viewerStore",()=>index.createViewerStore("default"),!0),{viewerChannels:r,viewerAnnotations:t,viewerActiveTool:n,viewerSelectedChannels:d}=pinia.storeToRefs(e),s=vue.ref(null),u=vue.ref(null),o=vue.ref(null),h=vue.ref(null),m=vue.ref(null),S=vue.ref(null);vue.reactive({});const y=vue.ref(0),g=vue.ref(0),O=vue.ref(0),b=vue.ref(1),k=vue.ref(!1),I=vue.ref(!1),L=vue.ref("pointer");vue.ref(!1);const j=vue.reactive({x:0,y:0}),W=vue.ref(0),N=vue.ref(["Event","Artifact","Seizure","Mark","Stim On","Stim Off","Start","Stop"]),w=vue.ref(0),T=vue.ref(null),x=vue.ref(0),E=vue.ref(!0),_=()=>{if(t.value.length>0){if(!t.value.some(R=>R.selected)){const R=t.value[0];R&&R.id&&e.setActiveAnnotationLayer(R.id)}}else setTimeout(()=>{t.value.length>0&&_()},500)},M=p=>{if(p){const R="set"+p.charAt(0).toUpperCase()+p.slice(1),q=F[R];typeof q=="function"&&q()}},F={setPan:()=>{},setPointer:()=>{},setAnnotate:()=>{_()}},V=vue.computed(()=>r.value.filter(p=>p.visible).length),B=vue.computed(()=>a.cHeight-20),$=vue.computed(()=>a.cWidth+a.constants.CURSOROFFSET);vue.computed(()=>u.value);const z=vue.computed(()=>({width:a.cWidth+"px",height:a.cHeight+"px"})),D=vue.computed(()=>({width:a.cWidth+"px",height:B.value+"px"})),K=vue.computed(()=>({width:$.value+"px",height:a.cHeight+"px"}));vue.watch(()=>a.cHeight,()=>{Te()}),vue.watch(()=>a.cWidth,()=>{Te()}),vue.watch(()=>a.start,()=>{ge()}),vue.watch(()=>a.duration,()=>{var p;(p=s.value)==null||p.invalidate(),me(a.cWidth,a.duration),ge()}),vue.watch(()=>a.globalZoomMult,()=>{vue.nextTick(()=>{var p;(p=s.value)==null||p.throttledDataRender()})}),vue.watch(n,p=>{p&&(M(p),!k.value&&!["annResize-left","annResize-right","annSelect"].includes(L.value)&&(L.value=p))},{immediate:!0}),vue.watch(t,p=>{p.length>0&&n.value==="annotate"&&_()},{immediate:!0}),vue.watch(L,()=>{const p=S.value;if(p){switch(p.removeAttribute("col_resize"),p.removeAttribute("active"),p.removeAttribute("point"),L.value){case"cursor_hover":p.removeAttribute("point"),p.setAttribute("cursor_hover",!0);break;case"annResize-left":case"annResize-right":p.setAttribute("col_resize",!0);break;case"annSelect":p.setAttribute("active",!0);break;case"pan":case"pan":break;case"pointer":case"annotate":p.setAttribute("point",!0);break;default:p.removeAttribute("point"),p.removeAttribute("cursor_hover");break}vue.nextTick(()=>{Ae()})}});const X=()=>{var p;(p=m.value)==null||p.resetFocusedAnnotation()},fe=p=>{var R;(R=m.value)==null||R.createAnnotationLayer(p)},U=()=>{var q;let p=(a.cursorLoc*a.cWidth-a.constants.CURSOROFFSET)*y.value;return((q=m.value)==null?void 0:q.findNextAnnotation(a.start+p)).start-p},re=()=>{var q;let p=(a.cursorLoc*a.cWidth-a.constants.CURSOROFFSET)*y.value;return((q=m.value)==null?void 0:q.findPreviousAnnotation(a.start+p)).start-p},ue=p=>{i("updateAnnotation",p)},se=()=>{i("closeAnnotationLayerWindow")},le=()=>{ge(100)},ve=()=>{n.value==="annotate"&&_(),i("annLayersInitialized")},ae=p=>{i("setGlobalZoom",p)},he=()=>{i("channelsInitialized")},be=p=>{p.stopPropagation(),p.preventDefault(),p.shiftKey?Math.abs(p.deltaY)>Math.abs(p.deltaX)&&(p.deltaY>0?i("setDuration",a.duration*1.1):i("setDuration",a.duration/1.1)):Math.abs(p.deltaY)>Math.abs(p.deltaX)&&(p.deltaY>0?i("setGlobalZoom",a.globalZoomMult*1.2):i("setGlobalZoom",a.globalZoomMult/1.2))},_e=p=>{var R,q;switch(I.value=!1,k.value=!1,L.value){case"pointer":Re();const A=p.metaKey,J=p.clientY-S.value.getBoundingClientRect().top,Y=j.y-S.value.getBoundingClientRect().top,Z=r.value.map(ie=>(A===!1&&(ie.selected=!1),(ie.rowBaseline>Y&&ie.rowBaseline<J||ie.rowBaseline<Y&&ie.rowBaseline>J)&&(ie.selected=!0),ie));e.setChannels(Z),ge();break;case"annSelect":Re(),(R=m.value)==null||R.selectFocusedAnn();break;case"annotate":_();let G=null,H=null;for(let ie=0;ie<t.value.length;ie++)if(t.value[ie].selected){G=ie,H=t.value[ie];break}if(G===null||!H||!H.id)if(t.value.length>0&&t.value[0].id)e.setActiveAnnotationLayer(t.value[0].id),H=t.value[0],G=0;else return;const Q=d,ee=Q.length===r.value.length||Q.length===0,te=(p.clientX-j.x)*y.value,Se=W.value+(j.x-S.value.getBoundingClientRect().left)*y.value;if(Math.abs(te)>1e3){const ie={name:"",id:null,label:N.value[w.value],description:"",start:Se,duration:te,end:Se+te,cStart:null,cEnd:null,selected:!0,channelIds:Q,allChannels:ee,layer_id:H.id,userId:null};e.setActiveAnnotation(ie),i("addAnnotation",Se,te,ee,ie.label,ie.description,H);break}break;case"annResize-left":case"annResize-right":(q=m.value)==null||q.onMouseUp();break}},Re=()=>{S.value.getContext("2d").clearRect(0,0,a.cWidth,a.cHeight)},pe=p=>{var q;k.value=!0,W.value=a.start;const R=S.value.getBoundingClientRect();switch(j.x=p.clientX,j.y=p.clientY,n.value==="annotate"&&!["annResize-left","annResize-right","annSelect"].includes(L.value)&&(L.value="annotate"),L.value){case"annResize-left":case"annResize-right":I.value=!0,(q=m.value)==null||q.onMouseDown(p.clientX-R.left,p.clientY-R.top);break}},Oe=()=>{k.value=!1},oe=p=>{p.buttons===1?k.value=!0:k.value=!1},qe=p=>{var J,Y,Z,G;p.preventDefault(),p.stopPropagation();const R=S.value.getBoundingClientRect(),q=p.clientY-R.top,A=p.clientX-R.left;switch(n.value){case"pan":if(k.value){const H=W.value-(p.clientX-j.x)*y.value;i("setStart",H)}else{const H=(J=m.value)==null?void 0:J.onMouseMove(A,q,L.value,k.value);L.value=H||"pan"}break;case"pointer":if(k.value)we(p.clientX,p.clientY);else{const H=(Y=m.value)==null?void 0:Y.onMouseMove(A,q,L.value,k.value);L.value=H||"pointer"}break;case"annotate":if(k.value&&L.value==="annotate")Ce(p.clientX);else if(k.value&&["annResize-left","annResize-right"].includes(L.value)){const H=(Z=m.value)==null?void 0:Z.onMouseMove(A,q,L.value,k.value);L.value=H||L.value,ge()}else{const H=(G=m.value)==null?void 0:G.onMouseMove(A,q,L.value,k.value);H?L.value=H:L.value="annotate"}break}},Te=()=>{me(a.cWidth,a.duration),ge(25)},me=(p,R)=>{const q=y.value,A=R/p;A!==q&&(O.value=Date.now(),y.value=A,g.value=Math.floor(R/a.constants.PAGESIZEDIVIDER))},ye=(p,R,q)=>R*(p+q),ge=(p=0,R=!0)=>{(!T.value||p!==x.value||E.value!==R)&&(T.value=de(ce,p,{leading:R}),x.value=p,E.value=R),T.value()},de=(p,R,q={})=>{let A,J,Y,Z=null,G=0;const H=function(){G=q.leading===!1?0:Date.now(),Z=null,Y=p.apply(A,J),Z||(A=J=null)};return function(){const Q=Date.now();!G&&q.leading===!1&&(G=Q);const ee=R-(Q-G);return A=this,J=arguments,ee<=0||ee>R?(Z&&(clearTimeout(Z),Z=null),G=Q,Y=p.apply(A,J),Z||(A=J=null)):!Z&&q.trailing!==!1&&(Z=setTimeout(H,ee)),Y}},Ae=()=>{var p;Re(),(p=m.value)==null||p.render()},ce=()=>{vue.nextTick(()=>{var p,R;Ee(),ke(),(p=s.value)==null||p.renderAll(),(R=m.value)==null||R.render()})},Ee=()=>{const R=u.value.getContext("2d");R.setTransform(b.value,0,0,b.value,0,0),R.clearRect(0,0,a.cWidth,a.cHeight),R.stroke(),R.beginPath(),R.lineWidth=1,R.moveTo(a.constants.XOFFSET+.5,.5),R.lineTo(a.constants.XOFFSET+.5,B.value+.5),R.lineTo(a.cWidth+.5,B.value+.5),R.stroke();let q=B.value/(2*V.value)+.5<<1>>1;R.lineWidth=.5;for(let G=0;G<V.value;G++)R.beginPath(),R.moveTo(a.constants.XOFFSET-2,q),R.lineTo(a.constants.XOFFSET+2,q),R.stroke(),q+=B.value/V.value;const A=a.constants.XGRIDSPACING*Math.ceil(a.duration/1e8),J=Math.ceil(a.duration/A)+1,Y=Math.ceil(a.constants.NRPXPERLABEL/(A/y.value)),Z=(A-a.start%A)%A;for(let G=0;G<J;G++){let H=a.start+Z+G*A;if(H>a.tsEnd)break;const Q=H-a.start,ee=a.constants.XOFFSET+Q/y.value,te=Math.round(ee);if(te>1&&(R.save(),R.beginPath(),R.lineWidth=.5,R.strokeStyle="rgb(235,235,235)",R.moveTo(te+.5,.5),R.lineTo(te+.5,B.value-.5),R.stroke(),R.restore(),((H/A+A/10)%Y|0)===1||Y===1)){R.beginPath(),R.lineWidth=1,R.moveTo(te+.5,B.value-3),R.lineTo(te+.5,B.value+3),R.stroke();const ie=new Date(H/1e3);R.font="12px sans-serif",R.fillStyle="rgb(150,150,150)",R.fillText(P(ie),te-20.5,a.cHeight-.2)}}},we=(p,R)=>{const q=S.value,A=q.getContext("2d");A.setTransform(b.value,0,0,b.value,0,0),A.clearRect(0,0,a.cWidth,a.cHeight),A.beginPath(),A.lineWidth=2,A.strokeStyle="#295eff",A.setLineDash([5,5,15,5]);const J=p-q.getBoundingClientRect().left,Y=R-q.getBoundingClientRect().top;A.rect(J,Y,-p+j.x,-R+j.y),A.stroke()},ke=()=>{const R=h.value.getContext("2d");R.setTransform(b.value,0,0,b.value,0,0),R.clearRect(0,0,a.cWidth+a.constants.CURSOROFFSET,a.cHeight),R.save(),R.beginPath(),R.fillStyle="red";const q=a.cursorLoc*a.cWidth;q>a.constants.CURSOROFFSET?(R.strokeStyle="red",R.moveTo(q,0),R.lineTo(q,B.value),R.stroke()):R.moveTo(q,B.value),R.beginPath(),R.lineTo(q-5,B.value+8),R.lineTo(q+5,B.value+8),R.lineTo(q,B.value),R.fill(),R.restore()},Ce=p=>{const R=S.value,q=R.getContext("2d");q.setTransform(b.value,0,0,b.value,0,0);const A=a.constants.ANNOTATIONLABELHEIGHT,J=A/2|0;let Y=null;for(let Q=0;Q<t.value.length;Q++)if(t.value[Q].selected){Y=Q;break}if(Y===null)return;q.save(),q.clearRect(0,0,a.cWidth,a.cHeight),q.lineWidth=1;const Z=selectedChannels.length===r.value.length||selectedChannels.length===0,G=p-R.getBoundingClientRect().left,H=-p+j.x;if(Z){q.fillStyle="rgba(0,0,0,0.1)",q.fillRect(G,0,H,B.value),q.fillStyle=t.value[Y].color,q.strokeStyle=q.fillStyle;let Q=G-1,ee=H+2;H<0&&(Q=G+1,ee=H-2),q.fillRect(Q,0,ee,A),q.setLineDash([5,5,5,5]),q.beginPath(),q.moveTo(G,A),q.lineTo(G,B.value),q.stroke(),q.beginPath(),q.moveTo(G+H,A),q.lineTo(G+H,B.value),q.stroke()}else{let Q=a.cHeight|0,ee=0;const te=r.value;q.fillStyle=t.value[Y].color,q.strokeStyle=q.fillStyle;let Se=G-1,ie=H+2;H<0&&(Se=G+1,ie=H-2);for(let Ne=0;Ne<te.length;Ne++){const Ie=te[Ne];if(Ie.selected&&Ie.visible){const Pe=Ie.rowBaseline|0;Pe<Q&&(Q=Pe),Pe>ee&&(ee=Pe),q.fillRect(Se,Pe-J,ie,A)}}q.fillStyle="rgba(0,0,0,0.1)",q.setLineDash([5,5,5,5]),q.fillRect(G-1,Q+J,H+2,ee-Q-A),q.beginPath(),q.moveTo(G,Q+J),q.lineTo(G,ee-J),q.moveTo(G+H,Q+J),q.lineTo(G+H,ee-J),q.stroke()}q.restore()},xe=()=>{var p;(p=s.value)==null||p.initPlotCanvas()},ne=()=>{let p=S.value.getContext("2d"),R=window.devicePixelRatio||1,q=p.webkitBackingStorePixelRatio||p.mozBackingStorePixelRatio||p.msBackingStorePixelRatio||p.oBackingStorePixelRatio||p.backingStorePixelRatio||1;return R/q},P=p=>("0"+p.getUTCHours()).slice(-2)+":"+("0"+p.getUTCMinutes()).slice(-2)+":"+("0"+p.getUTCSeconds()).slice(-2),C=p=>{var J,Y;let R=parseFloat(p.input0),q=parseFloat(p.input1),A={};switch(p.filterType){case"clear":A={channelFiltersToClear:p.selChannels};break;case"bandpass":let Z=(R+q)/2,G=Math.abs((q-R)/2);A={filter:p.filterType,filterParameters:[4,Z,G],channels:p.selChannels};break;case"highpass":A={filter:p.filterType,filterParameters:[4,R],channels:p.selChannels};break;case"lowpass":A={filter:p.filterType,filterParameters:[4,R],channels:p.selChannels};break;case"bandstop":let H=10;const Q=p.notchFreq;A={filter:p.filterType,filterParameters:[4,Q,H],channels:p.selChannels};break;default:return}(J=s.value)==null||J.sendFilterMessage(A);for(let Z=0;Z<p.selChannels.length;Z++){let G=p.selChannels[Z],H=find(index.propEq("id",G),r.value);p.filterType==="clear"?H.filter={}:H.filter={type:p.filterType,input0:R,input1:q,notchFreq:p.notchFreq}}(Y=s.value)==null||Y.invalidate(),ge()};return vue.onMounted(()=>{b.value=ne()}),c({rsPeriod:y,resetFocusedAnnotation:X,createAnnotationLayer:fe,getNextAnnotation:U,getPreviousAnnotation:re,setFilters:C,setActiveTool:M,renderAll:ge,renderAnnotationCanvas:Ae,initViewerCanvas:xe}),(p,R)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1,[vue.createElementVNode("div",_hoisted_2,[vue.createVNode(TSPlotCanvas,{ref_key:"plotCanvas",ref:s,"c-width":f.cWidth,"c-height":f.cHeight,start:f.start,ts_start:f.tsStart,ts_end:f.tsEnd,duration:f.duration,constants:f.constants,"rs-period":y.value,"global-zoom-mult":f.globalZoomMult,"active-viewer":f.activeViewer,onChannelsInitialized:he,onSetGlobalZoom:ae},{axisCanvas:vue.withCtx(()=>[vue.createElementVNode("canvas",{id:"axisArea",ref_key:"axisArea",ref:u,class:"canvas",width:ye(f.cWidth,b.value,0),height:ye(f.cHeight,b.value,0),style:vue.normalizeStyle(z.value)},null,12,_hoisted_3)]),annCanvas:vue.withCtx(()=>[vue.createElementVNode("canvas",{id:"annArea",ref_key:"annArea",ref:o,class:"canvas",width:ye(f.cWidth,b.value,0),height:ye(B.value,b.value,0),style:vue.normalizeStyle(D.value)},null,12,_hoisted_4)]),_:1},8,["c-width","c-height","start","ts_start","ts_end","duration","constants","rs-period","global-zoom-mult","active-viewer"]),vue.createElementVNode("canvas",{id:"cursorArea",ref_key:"cursorArea",ref:h,class:"canvas",width:ye(f.cWidth+5,b.value,0),height:ye(f.cHeight,b.value,0),style:vue.normalizeStyle(K.value)},null,12,_hoisted_5),vue.createVNode(vue.unref(l),{ref_key:"annCanvas",ref:m,"c-width":f.cWidth,"c-height":f.cHeight,constants:f.constants,"annotations-canvas":o.value,"pixel-ratio":b.value,"rs-period":y.value,start:f.start,duration:f.duration,"ts-end":f.tsEnd,"pointer-mode":L.value,"viewer-active-tool":vue.unref(n),"active-viewer":f.activeViewer,onAnnLayersInitialized:ve,onAnnotationsReceived:le,onCloseAnnotationLayerWindow:se,onUpdateAnnotation:ue},null,8,["c-width","c-height","constants","annotations-canvas","pixel-ratio","rs-period","start","duration","ts-end","pointer-mode","viewer-active-tool","active-viewer"]),vue.createElementVNode("canvas",{id:"iArea",ref_key:"iArea",ref:S,class:"canvas",width:ye(f.cWidth,b.value,0),height:ye(f.cHeight,b.value,0),style:vue.normalizeStyle(z.value),tabindex:"-1",onWheel:be,onMousemove:qe,onMousedown:pe,onMouseup:_e,onMouseout:Oe,onMouseenter:oe},null,44,_hoisted_6)])]))}},TSViewerCanvas=index._export_sfc(_sfc_main,[["__scopeId","data-v-1c2fb1f5"]]),TSViewerCanvas$1=Object.freeze(Object.defineProperty({__proto__:null,default:TSViewerCanvas},Symbol.toStringTag,{value:"Module"}));exports.TSViewerCanvas=TSViewerCanvas$1;exports.find=find;exports.head=head;
|
|
@@ -2,8 +2,8 @@ import "./base-VCnLhxie.js";
|
|
|
2
2
|
import { E as f } from "./el-overlay-BMUWCEw_.js";
|
|
3
3
|
import { g as _, a as y, b as h } from "./el-input-DQtvBLS6.js";
|
|
4
4
|
import { createElementBlock as F, openBlock as s, renderSlot as S, resolveComponent as A, createBlock as u, withCtx as a, createElementVNode as l, createVNode as r, createTextVNode as i, Fragment as E, renderList as k, normalizeStyle as D, toDisplayString as L } from "vue";
|
|
5
|
-
import { g as C } from "./index-
|
|
6
|
-
import V from "./BFLibraryButton-
|
|
5
|
+
import { g as C } from "./index-BU6e_1Ww.js";
|
|
6
|
+
import V from "./BFLibraryButton-DzzWe3Ya.js";
|
|
7
7
|
const w = {
|
|
8
8
|
name: "CircleIcon",
|
|
9
9
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const m=require("./el-overlay-D192MFpl.cjs"),r=require("./el-input-CwVmeiqs.cjs"),e=require("vue"),c=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const m=require("./el-overlay-D192MFpl.cjs"),r=require("./el-input-CwVmeiqs.cjs"),e=require("vue"),c=require("./index-C-i9Taq7.cjs"),v=require("./BFLibraryButton-ClRfrYOf.cjs"),p={name:"CircleIcon",props:{icon:{type:String},height:{type:String,default:"16"},width:{type:String,default:"16"},currentColor:{type:String,default:"#71747C"}}},b={class:"circle-icon"};function g(t,o,a,d,s,n){return e.openBlock(),e.createElementBlock("div",b,[e.renderSlot(t.$slots,"icon",{},void 0,!0)])}const _=c._export_sfc(p,[["render",g],["__scopeId","data-v-46dcef49"]]),f={name:"AnnotationLayerWindow",components:{CircleIcon:_,BfLibraryButton:v.default},props:{visible:{type:Boolean,default:!1}},data:function(){return{name:"",selectedColor:"",colorOptions:[{label:"Green",value:"#18BA62",iconBgColor:"#18BA62"},{label:"Gold",value:"#FFBC27",iconBgColor:"#FFBC27"},{label:"Red",value:"#E94B4B",iconBgColor:"#E94B4B"},{label:"Light Blue",value:"#2760FF",iconBgColor:"#2760FF"},{label:"Magenta",value:"#FF4FFF",iconBgColor:"#FF4FFF"},{label:"Cyan",value:"#50FFFF",iconBgColor:"#50FFFF"},{label:"Yellow",value:"#FFFF4E",iconBgColor:"#FFFF4E"},{label:"Purple",value:"#512BAF",iconBgColor:"#512BAF"},{label:"Lavendar",value:"#8A6ECF",iconBgColor:"#8A6ECF"},{label:"Teal",value:"#389BAD",iconBgColor:"#389BAD"},{label:"Dark Green",value:"#187D46",iconBgColor:"#187D46"},{label:"Brick Red",value:"#B12800",iconBgColor:"#B12800"},{label:"Dark Blue",value:"#0C2475",iconBgColor:"#0C2475"},{label:"Bright Orange",value:"#FF5321",iconBgColor:"#FF5321"},{label:"Pink",value:"#FF99CC",iconBgColor:"#FF99CC"},{label:"Tan",value:"#DCC180",iconBgColor:"#DCC180"},{label:"Medium Blue",value:"#0D4EFF",iconBgColor:"#0D4EFF"},{label:"Orange",value:"#FF6C21",iconBgColor:"#FF6C21"},{label:"Black",value:"#000000",iconBgColor:"#000000"},{label:"Gray",value:"#9B9B9B",iconBgColor:"#9B9B9B"},{label:"Lime",value:"#00FF00",iconBgColor:"#00FF00"},{label:"Salmon",value:"#FA8072",iconBgColor:"#FA8072"},{label:"Olive",value:"#808000",iconBgColor:"#808000"},{label:"Sienna",value:"#A0522D",iconBgColor:"#A0522D"}]}},methods:{close:function(){this.$emit("close-window")},handleFormSubmit:function(){this.$emit("createLayer",{name:this.name,color:this.selectedColor})},handleFormCancel:function(){this.close()}}},y={slot:"body"},V={class:"input-section"},h={class:"input-section"},E={class:"color-option"},k={style:{float:"right",color:"#8492a6","font-size":"13px"}},N={slot:"footer"},S={class:"button-wrapper"},w={class:"buttons"};function A(t,o,a,d,s,n){const u=r.ElInput,C=r.ElOption,F=r.ElSelect,i=e.resolveComponent("bf-library-button"),B=m.ElDialog;return e.openBlock(),e.createBlock(B,{"onUpdate:modelValue":o[2]||(o[2]=l=>a.visible=l),"model-value":a.visible,onClose:n.close,class:"timeseries-annotation-layer-modal",ref:"timeseries-filter-modal",title:"Annotation Layers"},{default:e.withCtx(()=>[e.createElementVNode("div",y,[e.createElementVNode("div",V,[o[3]||(o[3]=e.createTextVNode(" Layer Name: ",-1)),e.createVNode(u,{placeholder:"Add a Layer Name",modelValue:t.name,"onUpdate:modelValue":o[0]||(o[0]=l=>t.name=l),ref:"input"},null,8,["modelValue"])]),e.createElementVNode("div",h,[o[4]||(o[4]=e.createTextVNode(" Select Color: ",-1)),e.createVNode(F,{modelValue:t.selectedColor,"onUpdate:modelValue":o[1]||(o[1]=l=>t.selectedColor=l),placeholder:"Select"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.colorOptions,l=>(e.openBlock(),e.createBlock(C,{key:l.value,label:l.label,value:l.value},{default:e.withCtx(()=>[e.createElementVNode("div",E,[e.createElementVNode("div",{style:e.normalizeStyle({backgroundColor:l.value,height:"30px",width:"30px",borderRadius:"50%"})},null,4),e.createElementVNode("div",k,e.toDisplayString(l.label),1)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",N,[e.createElementVNode("div",S,[e.createElementVNode("div",w,[e.createVNode(i,{onClick:n.handleFormCancel},{default:e.withCtx(()=>[...o[5]||(o[5]=[e.createTextVNode("Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(i,{onClick:n.handleFormSubmit},{default:e.withCtx(()=>[...o[6]||(o[6]=[e.createTextVNode("Save ",-1)])]),_:1},8,["onClick"])])])])]),_:1},8,["model-value","onClose"])}const D=c._export_sfc(f,[["render",A],["__scopeId","data-v-117509d0"]]);exports.default=D;
|
|
@@ -2,7 +2,7 @@ import "./base-VCnLhxie.js";
|
|
|
2
2
|
import { E as O, a as U, b as j } from "./el-input-DQtvBLS6.js";
|
|
3
3
|
import { E as X } from "./el-input-number-DXCID3jJ.js";
|
|
4
4
|
import { createElementBlock as p, openBlock as u, createElementVNode as t, computed as C, ref as c, onMounted as G, createBlock as $, createCommentVNode as z, createVNode as s, withCtx as g, createTextVNode as N, resolveDynamicComponent as J, Fragment as K, renderList as Q } from "vue";
|
|
5
|
-
import { g as m } from "./index-
|
|
5
|
+
import { g as m } from "./index-BU6e_1Ww.js";
|
|
6
6
|
const W = {
|
|
7
7
|
name: "IconPreviousPage",
|
|
8
8
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const x=require("./el-input-CwVmeiqs.cjs"),I=require("./el-input-number-Cxwc3-EL.cjs"),e=require("vue"),h=require("./index-CMJlEiLT.cjs"),Z={name:"IconPreviousPage",props:{width:{type:Number,default:12},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},A=["width","height","fill"];function T(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 12 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M10.959,0.571 L3.756,5.52 C3.756,5.52 3.477,5.721 3.477,6.001 C3.477,6.281 3.756,6.48 3.756,6.48 L10.959,11.431 C11.531,11.811 12,11.53 12,10.805 L12,1.196 C12,0.469 11.531,0.188 10.959,0.571 Z M2,0 L1,0 C0.447,0 0,0.048 0,0.6 L0,11.4 C0,11.952 0.447,12 1,12 L2,12 C2.553,12 3,11.952 3,11.4 L3,0.6 C3,0.048 2.553,0 2,0 Z"},null,-1)])],8,A)}const F=h._export_sfc(Z,[["render",T]]),q={name:"IconNextAnnotationLeftFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},D=["width","height","fill"];function O(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 24 14"},[...l[0]||(l[0]=[e.createElementVNode("defs",null,[e.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-left-facing-a"})],-1),e.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"matrix(-1 0 0 1 6 0)"},[e.createElementVNode("mask",{id:"svgicon-next-annotation-left-facing-b",_fill:"#fff"},[e.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-left-facing-a"})]),e.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-left-facing-a"}),e.createElementVNode("g",{mask:"url(#svgicon-next-annotation-left-facing-b)",_fill:"#000"},[e.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),e.createElementVNode("g",{_fill:"#000"},[e.createElementVNode("path",{pid:"2",d:"M23.986 10.906l-5.6-2.506 2.303 5.6.63-2.611zM10 8.4h1.4v1.4H10zM12.8 8.4h1.4v1.4h-1.4zM15.6 8.4H17v1.4h-1.4zM10 5.6h1.4V7H10zM10 2.8h1.4v1.4H10zM18.4 5.6h1.4V7h-1.4zM18.4 2.8h1.4v1.4h-1.4zM10 0h1.4v1.4H10zM12.8 0h1.4v1.4h-1.4zM15.6 0H17v1.4h-1.4zM18.4 0h1.4v1.4h-1.4z"})])],-1)])],8,D)}const R=h._export_sfc(q,[["render",O]]),U={name:"IconNextAnnotationRightFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},j=["width","height","fill"];function X(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 24 14"},[...l[0]||(l[0]=[e.createElementVNode("defs",null,[e.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-right-facing-a"})],-1),e.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"translate(18)"},[e.createElementVNode("mask",{id:"svgicon-next-annotation-right-facing-b",_fill:"#fff"},[e.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-right-facing-a"})]),e.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-right-facing-a"}),e.createElementVNode("g",{mask:"url(#svgicon-next-annotation-right-facing-b)",_fill:"#000"},[e.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),e.createElementVNode("g",{_fill:"#000"},[e.createElementVNode("path",{pid:"2",d:"M13.986 10.906L8.386 8.4l2.303 5.6.63-2.611zM0 8.4h1.4v1.4H0zM2.8 8.4h1.4v1.4H2.8zM5.6 8.4H7v1.4H5.6zM0 5.6h1.4V7H0zM0 2.8h1.4v1.4H0zM8.4 5.6h1.4V7H8.4zM8.4 2.8h1.4v1.4H8.4zM0 0h1.4v1.4H0zM2.8 0h1.4v1.4H2.8zM5.6 0H7v1.4H5.6zM8.4 0h1.4v1.4H8.4z"})])],-1)])],8,j)}const G=h._export_sfc(U,[["render",X]]),J={name:"IconNextPage",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},K=["width","height","fill"];function Q(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 12 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M8.244,5.52 L1.041,0.571 C0.469,0.188 0,0.469 0,1.196 L0,10.805 C0,11.53 0.469,11.811 1.041,11.43 L8.244,6.479 C8.244,6.479 8.523,6.28 8.523,6.001 C8.523,5.721 8.244,5.52 8.244,5.52 Z M10,0 L11,0 C11.553,0 12,0.048 12,0.6 L12,11.4 C12,11.952 11.553,12 11,12 L10,12 C9.447,12 9,11.952 9,11.4 L9,0.6 C9,0.048 9.447,0 10,0 Z"},null,-1)])],8,K)}const W=h._export_sfc(J,[["render",Q]]),Y={name:"IconStopwatch",props:{width:{type:Number,default:15},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},ee=["width","height","fill"];function te(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 15 16"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M5.1008,5.396 C4.7432,5.616 6.0584,8.7896 6.3792,9.3064 C6.6592,9.7616 7.2536,9.9 7.7056,9.6216 C8.16,9.34 8.3016,8.7464 8.0216,8.2936 C7.704,7.7752 5.4576,5.1752 5.1008,5.396 Z M4.8328,1.9216 C5.5752,1.6632 6.3704,1.52 7.2,1.52 C8.0296,1.52 8.8248,1.6632 9.5672,1.9216 C9.8304,2.0128 10.1792,1.8296 10.0248,1.4328 C9.912,1.1448 9.8032,0.8632 9.7592,0.7488 C9.6544,0.4776 9.2792,0.2536 9.116,0.2168 C8.4984,0.0776 7.8584,0 7.2,0 C6.5416,0 5.9016,0.0776 5.2832,0.2168 C5.12,0.2536 4.7456,0.4776 4.6408,0.7488 C4.5968,0.8632 4.4872,1.1448 4.3752,1.4328 C4.2208,1.8296 4.5696,2.0136 4.8328,1.9216 Z M14.4784,2.5488 C14.3248,2.3648 14.1616,2.1848 13.988,2.0112 C13.8152,1.8376 13.6352,1.6752 13.452,1.5208 C13.3296,1.4176 12.9696,1.3336 12.7416,1.5616 C12.5144,1.7896 11.4232,2.8792 11.4232,2.8792 C11.7448,3.1096 12.0576,3.3632 12.3472,3.652 C12.6368,3.9408 12.8888,4.2536 13.12,4.576 C13.12,4.576 14.2104,3.4864 14.4376,3.2584 C14.6664,3.0296 14.5824,2.6704 14.4784,2.5488 Z M7.2,2.32 C3.62,2.32 0.7192,5.2208 0.7192,8.8 C0.7192,12.38 3.62,15.2808 7.2,15.2808 C10.7784,15.2808 13.68,12.38 13.68,8.8 C13.68,5.2216 10.7784,2.32 7.2,2.32 Z M7.2,13.6808 C4.5056,13.6808 2.32,11.496 2.32,8.8008 C2.32,6.1056 4.5048,3.9208 7.2,3.9208 C9.8952,3.9208 12.0808,6.1056 12.0808,8.8008 C12.0808,11.4952 9.8952,13.6808 7.2,13.6808 Z"},null,-1)])],8,ee)}const ne=h._export_sfc(Y,[["render",te]]),oe={name:"IconControllerPlay",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},le=["width","height","fill"];function re(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 20 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M10,6.001 C10,6.3 9.695,6.515 9.695,6.515 L1.134,11.818 C0.51,12.227 0,11.924 0,11.149 L0,0.852 C0,0.075 0.51,-0.226 1.135,0.182 L9.696,5.487 C9.695,5.487 10,5.702 10,6.001 Z"},null,-1)])],8,le)}const ae=h._export_sfc(oe,[["render",re]]),ie={name:"IconControllerPause",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},ce=["width","height","fill"];function de(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 20 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M2,0 C2.553,0 3,0.048 3,0.6 L3,11.4 C3,11.952 2.553,12 2,12 L1,12 C0.447,12 0,11.952 0,11.4 L0,0.6 C0,0.048 0.447,0 1,0 L2,0 Z M9,0 C9.553,0 10,0.048 10,0.6 L10,11.4 C10,11.952 9.553,12 9,12 L8,12 C7.447,12 7,11.952 7,11.4 L7,0.6 C7,0.048 7.447,0 8,0 L9,0 Z"},null,-1)])],8,ce)}const se=h._export_sfc(ie,[["render",de]]),ue={class:"timeseries-viewer-toolbar"},he={id:"left-controls"},fe={id:"center-controls"},me={id:"right-controls"},pe={__name:"TSViewerToolbar",props:{constants:{type:Object,required:!0},duration:{type:Number,required:!0},start:{type:Number,required:!0},globalZoomMult:{type:Number,required:!0}},emits:["pageBack","pageForward","incrementZoom","decrementZoom","updateDuration","nextAnnotation","previousAnnotation","setStart","update:globalZoomMult"],setup(d,{emit:l}){const t=d,s=e.computed({get(){return 96*window.devicePixelRatio/(t.globalZoomMult*1)/25.4},set(r){i("update:globalZoomMult",96*window.devicePixelRatio/(r*1)/25.4)}}),i=l;e.ref(!0);const u=e.ref(!0),v=e.ref(!0);e.ref(0);const m=e.ref(!1),p=e.ref(null),w=e.ref(null),C=e.ref(150),N=e.ref(1e6),_=[{value:.5,label:"0.5x"},{value:1,label:"1x"},{value:2,label:"2x"},{value:5,label:"5x"},{value:10,label:"10x"}],V=e.computed(()=>m.value===!0?se:ae);let b=e.ref(t.duration/1e6);const g=e.computed({get(){return t.duration/1e6},set(r){const n=t.duration/1e6,f=r>n,c=r<n;let o=Math.max(.01,r);n===.1&&f?o=.2:n===.1&&c?o=.09:n===1&&f?o=2:n===1&&c?o=.9:n===10&&f?o=20:n===10&&c?o=9:o<.095?o=Math.round(o*100)/100:o<.95?o=Math.round(o*10)/10:o<9.5?o=Math.round(o):o<95?o=Math.round(o/10)*10:o=Math.round(o/100)*100,b.value=o,i("updateDuration",o)}}),M=e.computed(()=>{const r=g.value;return r<.1?.01:r<1?.1:r<10?1:r<100?10:100}),E=e.computed(()=>{const r=g.value;return r<1?2:r<10?1:0}),k=()=>{v.value=!v.value},y=()=>{m.value===!1?P():S()},B=()=>{i("pageBack")},L=()=>{i("pageForward")},$=()=>{i("nextAnnotation")},z=()=>{i("previousAnnotation")},P=()=>{m.value=!0;const r=()=>{i("setStart",t.start+N.value*p.value),w.value=setTimeout(r,C.value)};w.value=setTimeout(r,C.value)},S=()=>{m.value=!1,C.value=150,clearInterval(w.value)};return e.onMounted(()=>{p.value=1}),(r,n)=>{const f=I.ElInputNumber,c=x.ElTooltip,o=x.ElOption,H=x.ElSelect;return e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",he,[u.value?(e.openBlock(),e.createBlock(f,{key:0,modelValue:g.value,"onUpdate:modelValue":n[0]||(n[0]=a=>g.value=a),precision:E.value,step:M.value,min:.01,max:d.constants.MAXDURATION,"controls-position":"right"},{suffix:e.withCtx(()=>[...n[9]||(n[9]=[e.createTextVNode(" seconds ",-1)])]),_:1},8,["modelValue","precision","step","max"])):e.createCommentVNode("",!0),e.createVNode(f,{modelValue:s.value,"onUpdate:modelValue":n[1]||(n[1]=a=>s.value=a),precision:2,step:5,"controls-position":"right"},{suffix:e.withCtx(()=>[...n[10]||(n[10]=[e.createTextVNode(" uV/mm ",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",fe,[e.createVNode(c,{placement:"top-end",content:"Page Back"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[2]||(n[2]=a=>B())},[e.createVNode(F,{height:12,width:12})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Previous Annotation"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[3]||(n[3]=a=>z())},[e.createVNode(R,{height:12,width:18})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Automatic Forward"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[4]||(n[4]=a=>y())},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.value),{height:12,width:18}))])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Next Annotation"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[5]||(n[5]=a=>$())},[e.createVNode(G,{name:"next-annotation-right-facing",height:12,width:18})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Next Page"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[6]||(n[6]=a=>L())},[e.createVNode(W,{name:"icon-next-page",height:12,width:18})])]),_:1})]),e.createElementVNode("div",me,[e.createVNode(c,{placement:"top-end",content:"Toggle Play Back Speed Controls"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[7]||(n[7]=a=>k())},[e.createVNode(ne,{height:20,width:22})])]),_:1}),v.value?(e.openBlock(),e.createBlock(H,{key:0,modelValue:p.value,"onUpdate:modelValue":n[8]||(n[8]=a=>p.value=a),placeholder:"Select",size:"small",class:"playSelect"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,a=>e.createVNode(o,{key:a.value,label:a.label,value:a.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),n[11]||(n[11]=e.createElementVNode("div",null,null,-1))])}}},ge=h._export_sfc(pe,[["__scopeId","data-v-1f059068"]]);exports.default=ge;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const x=require("./el-input-CwVmeiqs.cjs"),I=require("./el-input-number-Cxwc3-EL.cjs"),e=require("vue"),h=require("./index-C-i9Taq7.cjs"),Z={name:"IconPreviousPage",props:{width:{type:Number,default:12},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},A=["width","height","fill"];function T(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 12 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M10.959,0.571 L3.756,5.52 C3.756,5.52 3.477,5.721 3.477,6.001 C3.477,6.281 3.756,6.48 3.756,6.48 L10.959,11.431 C11.531,11.811 12,11.53 12,10.805 L12,1.196 C12,0.469 11.531,0.188 10.959,0.571 Z M2,0 L1,0 C0.447,0 0,0.048 0,0.6 L0,11.4 C0,11.952 0.447,12 1,12 L2,12 C2.553,12 3,11.952 3,11.4 L3,0.6 C3,0.048 2.553,0 2,0 Z"},null,-1)])],8,A)}const F=h._export_sfc(Z,[["render",T]]),q={name:"IconNextAnnotationLeftFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},D=["width","height","fill"];function O(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 24 14"},[...l[0]||(l[0]=[e.createElementVNode("defs",null,[e.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-left-facing-a"})],-1),e.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"matrix(-1 0 0 1 6 0)"},[e.createElementVNode("mask",{id:"svgicon-next-annotation-left-facing-b",_fill:"#fff"},[e.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-left-facing-a"})]),e.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-left-facing-a"}),e.createElementVNode("g",{mask:"url(#svgicon-next-annotation-left-facing-b)",_fill:"#000"},[e.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),e.createElementVNode("g",{_fill:"#000"},[e.createElementVNode("path",{pid:"2",d:"M23.986 10.906l-5.6-2.506 2.303 5.6.63-2.611zM10 8.4h1.4v1.4H10zM12.8 8.4h1.4v1.4h-1.4zM15.6 8.4H17v1.4h-1.4zM10 5.6h1.4V7H10zM10 2.8h1.4v1.4H10zM18.4 5.6h1.4V7h-1.4zM18.4 2.8h1.4v1.4h-1.4zM10 0h1.4v1.4H10zM12.8 0h1.4v1.4h-1.4zM15.6 0H17v1.4h-1.4zM18.4 0h1.4v1.4h-1.4z"})])],-1)])],8,D)}const R=h._export_sfc(q,[["render",O]]),U={name:"IconNextAnnotationRightFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},j=["width","height","fill"];function X(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 24 14"},[...l[0]||(l[0]=[e.createElementVNode("defs",null,[e.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-right-facing-a"})],-1),e.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"translate(18)"},[e.createElementVNode("mask",{id:"svgicon-next-annotation-right-facing-b",_fill:"#fff"},[e.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-right-facing-a"})]),e.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-right-facing-a"}),e.createElementVNode("g",{mask:"url(#svgicon-next-annotation-right-facing-b)",_fill:"#000"},[e.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),e.createElementVNode("g",{_fill:"#000"},[e.createElementVNode("path",{pid:"2",d:"M13.986 10.906L8.386 8.4l2.303 5.6.63-2.611zM0 8.4h1.4v1.4H0zM2.8 8.4h1.4v1.4H2.8zM5.6 8.4H7v1.4H5.6zM0 5.6h1.4V7H0zM0 2.8h1.4v1.4H0zM8.4 5.6h1.4V7H8.4zM8.4 2.8h1.4v1.4H8.4zM0 0h1.4v1.4H0zM2.8 0h1.4v1.4H2.8zM5.6 0H7v1.4H5.6zM8.4 0h1.4v1.4H8.4z"})])],-1)])],8,j)}const G=h._export_sfc(U,[["render",X]]),J={name:"IconNextPage",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},K=["width","height","fill"];function Q(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 12 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M8.244,5.52 L1.041,0.571 C0.469,0.188 0,0.469 0,1.196 L0,10.805 C0,11.53 0.469,11.811 1.041,11.43 L8.244,6.479 C8.244,6.479 8.523,6.28 8.523,6.001 C8.523,5.721 8.244,5.52 8.244,5.52 Z M10,0 L11,0 C11.553,0 12,0.048 12,0.6 L12,11.4 C12,11.952 11.553,12 11,12 L10,12 C9.447,12 9,11.952 9,11.4 L9,0.6 C9,0.048 9.447,0 10,0 Z"},null,-1)])],8,K)}const W=h._export_sfc(J,[["render",Q]]),Y={name:"IconStopwatch",props:{width:{type:Number,default:15},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},ee=["width","height","fill"];function te(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 15 16"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M5.1008,5.396 C4.7432,5.616 6.0584,8.7896 6.3792,9.3064 C6.6592,9.7616 7.2536,9.9 7.7056,9.6216 C8.16,9.34 8.3016,8.7464 8.0216,8.2936 C7.704,7.7752 5.4576,5.1752 5.1008,5.396 Z M4.8328,1.9216 C5.5752,1.6632 6.3704,1.52 7.2,1.52 C8.0296,1.52 8.8248,1.6632 9.5672,1.9216 C9.8304,2.0128 10.1792,1.8296 10.0248,1.4328 C9.912,1.1448 9.8032,0.8632 9.7592,0.7488 C9.6544,0.4776 9.2792,0.2536 9.116,0.2168 C8.4984,0.0776 7.8584,0 7.2,0 C6.5416,0 5.9016,0.0776 5.2832,0.2168 C5.12,0.2536 4.7456,0.4776 4.6408,0.7488 C4.5968,0.8632 4.4872,1.1448 4.3752,1.4328 C4.2208,1.8296 4.5696,2.0136 4.8328,1.9216 Z M14.4784,2.5488 C14.3248,2.3648 14.1616,2.1848 13.988,2.0112 C13.8152,1.8376 13.6352,1.6752 13.452,1.5208 C13.3296,1.4176 12.9696,1.3336 12.7416,1.5616 C12.5144,1.7896 11.4232,2.8792 11.4232,2.8792 C11.7448,3.1096 12.0576,3.3632 12.3472,3.652 C12.6368,3.9408 12.8888,4.2536 13.12,4.576 C13.12,4.576 14.2104,3.4864 14.4376,3.2584 C14.6664,3.0296 14.5824,2.6704 14.4784,2.5488 Z M7.2,2.32 C3.62,2.32 0.7192,5.2208 0.7192,8.8 C0.7192,12.38 3.62,15.2808 7.2,15.2808 C10.7784,15.2808 13.68,12.38 13.68,8.8 C13.68,5.2216 10.7784,2.32 7.2,2.32 Z M7.2,13.6808 C4.5056,13.6808 2.32,11.496 2.32,8.8008 C2.32,6.1056 4.5048,3.9208 7.2,3.9208 C9.8952,3.9208 12.0808,6.1056 12.0808,8.8008 C12.0808,11.4952 9.8952,13.6808 7.2,13.6808 Z"},null,-1)])],8,ee)}const ne=h._export_sfc(Y,[["render",te]]),oe={name:"IconControllerPlay",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},le=["width","height","fill"];function re(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 20 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M10,6.001 C10,6.3 9.695,6.515 9.695,6.515 L1.134,11.818 C0.51,12.227 0,11.924 0,11.149 L0,0.852 C0,0.075 0.51,-0.226 1.135,0.182 L9.696,5.487 C9.695,5.487 10,5.702 10,6.001 Z"},null,-1)])],8,le)}const ae=h._export_sfc(oe,[["render",re]]),ie={name:"IconControllerPause",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},ce=["width","height","fill"];function de(d,l,t,s,i,u){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:t.width,height:t.height,fill:t.color,viewBox:"0 0 20 12"},[...l[0]||(l[0]=[e.createElementVNode("path",{d:"M2,0 C2.553,0 3,0.048 3,0.6 L3,11.4 C3,11.952 2.553,12 2,12 L1,12 C0.447,12 0,11.952 0,11.4 L0,0.6 C0,0.048 0.447,0 1,0 L2,0 Z M9,0 C9.553,0 10,0.048 10,0.6 L10,11.4 C10,11.952 9.553,12 9,12 L8,12 C7.447,12 7,11.952 7,11.4 L7,0.6 C7,0.048 7.447,0 8,0 L9,0 Z"},null,-1)])],8,ce)}const se=h._export_sfc(ie,[["render",de]]),ue={class:"timeseries-viewer-toolbar"},he={id:"left-controls"},fe={id:"center-controls"},me={id:"right-controls"},pe={__name:"TSViewerToolbar",props:{constants:{type:Object,required:!0},duration:{type:Number,required:!0},start:{type:Number,required:!0},globalZoomMult:{type:Number,required:!0}},emits:["pageBack","pageForward","incrementZoom","decrementZoom","updateDuration","nextAnnotation","previousAnnotation","setStart","update:globalZoomMult"],setup(d,{emit:l}){const t=d,s=e.computed({get(){return 96*window.devicePixelRatio/(t.globalZoomMult*1)/25.4},set(r){i("update:globalZoomMult",96*window.devicePixelRatio/(r*1)/25.4)}}),i=l;e.ref(!0);const u=e.ref(!0),v=e.ref(!0);e.ref(0);const m=e.ref(!1),p=e.ref(null),w=e.ref(null),C=e.ref(150),N=e.ref(1e6),_=[{value:.5,label:"0.5x"},{value:1,label:"1x"},{value:2,label:"2x"},{value:5,label:"5x"},{value:10,label:"10x"}],V=e.computed(()=>m.value===!0?se:ae);let b=e.ref(t.duration/1e6);const g=e.computed({get(){return t.duration/1e6},set(r){const n=t.duration/1e6,f=r>n,c=r<n;let o=Math.max(.01,r);n===.1&&f?o=.2:n===.1&&c?o=.09:n===1&&f?o=2:n===1&&c?o=.9:n===10&&f?o=20:n===10&&c?o=9:o<.095?o=Math.round(o*100)/100:o<.95?o=Math.round(o*10)/10:o<9.5?o=Math.round(o):o<95?o=Math.round(o/10)*10:o=Math.round(o/100)*100,b.value=o,i("updateDuration",o)}}),M=e.computed(()=>{const r=g.value;return r<.1?.01:r<1?.1:r<10?1:r<100?10:100}),E=e.computed(()=>{const r=g.value;return r<1?2:r<10?1:0}),k=()=>{v.value=!v.value},y=()=>{m.value===!1?P():S()},B=()=>{i("pageBack")},L=()=>{i("pageForward")},$=()=>{i("nextAnnotation")},z=()=>{i("previousAnnotation")},P=()=>{m.value=!0;const r=()=>{i("setStart",t.start+N.value*p.value),w.value=setTimeout(r,C.value)};w.value=setTimeout(r,C.value)},S=()=>{m.value=!1,C.value=150,clearInterval(w.value)};return e.onMounted(()=>{p.value=1}),(r,n)=>{const f=I.ElInputNumber,c=x.ElTooltip,o=x.ElOption,H=x.ElSelect;return e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",he,[u.value?(e.openBlock(),e.createBlock(f,{key:0,modelValue:g.value,"onUpdate:modelValue":n[0]||(n[0]=a=>g.value=a),precision:E.value,step:M.value,min:.01,max:d.constants.MAXDURATION,"controls-position":"right"},{suffix:e.withCtx(()=>[...n[9]||(n[9]=[e.createTextVNode(" seconds ",-1)])]),_:1},8,["modelValue","precision","step","max"])):e.createCommentVNode("",!0),e.createVNode(f,{modelValue:s.value,"onUpdate:modelValue":n[1]||(n[1]=a=>s.value=a),precision:2,step:5,"controls-position":"right"},{suffix:e.withCtx(()=>[...n[10]||(n[10]=[e.createTextVNode(" uV/mm ",-1)])]),_:1},8,["modelValue"])]),e.createElementVNode("div",fe,[e.createVNode(c,{placement:"top-end",content:"Page Back"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[2]||(n[2]=a=>B())},[e.createVNode(F,{height:12,width:12})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Previous Annotation"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[3]||(n[3]=a=>z())},[e.createVNode(R,{height:12,width:18})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Automatic Forward"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[4]||(n[4]=a=>y())},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.value),{height:12,width:18}))])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Next Annotation"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[5]||(n[5]=a=>$())},[e.createVNode(G,{name:"next-annotation-right-facing",height:12,width:18})])]),_:1}),e.createVNode(c,{placement:"top-end",content:"Next Page"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[6]||(n[6]=a=>L())},[e.createVNode(W,{name:"icon-next-page",height:12,width:18})])]),_:1})]),e.createElementVNode("div",me,[e.createVNode(c,{placement:"top-end",content:"Toggle Play Back Speed Controls"},{default:e.withCtx(()=>[e.createElementVNode("button",{class:"btn-icon",onClick:n[7]||(n[7]=a=>k())},[e.createVNode(ne,{height:20,width:22})])]),_:1}),v.value?(e.openBlock(),e.createBlock(H,{key:0,modelValue:p.value,"onUpdate:modelValue":n[8]||(n[8]=a=>p.value=a),placeholder:"Select",size:"small",class:"playSelect"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,a=>e.createVNode(o,{key:a.value,label:a.label,value:a.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0)]),n[11]||(n[11]=e.createElementVNode("div",null,null,-1))])}}},ge=h._export_sfc(pe,[["__scopeId","data-v-1f059068"]]);exports.default=ge;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./base-VCnLhxie.js";
|
|
2
2
|
import { E as k } from "./el-overlay-BMUWCEw_.js";
|
|
3
3
|
import { createElementBlock as a, openBlock as i, normalizeClass as T, createCommentVNode as f, createElementVNode as s, renderSlot as d, toDisplayString as u, resolveComponent as B, createBlock as A, withCtx as c, createVNode as r, Fragment as x, createTextVNode as h } from "vue";
|
|
4
|
-
import { g as m, p as V } from "./index-
|
|
5
|
-
import N from "./BFLibraryButton-
|
|
6
|
-
import { p as C } from "./pathOr-
|
|
4
|
+
import { g as m, p as V } from "./index-BU6e_1Ww.js";
|
|
5
|
+
import N from "./BFLibraryButton-DzzWe3Ya.js";
|
|
6
|
+
import { p as C } from "./pathOr-Dr8GvKXg.js";
|
|
7
7
|
const U = {
|
|
8
8
|
name: "DialogBody",
|
|
9
9
|
setup(e, { slots: t }) {
|
package/dist/{TsAnnotationDeleteDialog-fM5Y7SRB.cjs → TsAnnotationDeleteDialog-BRIgCXxU.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const C=require("./el-overlay-D192MFpl.cjs"),e=require("vue"),l=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./base-BQSnEcNP.cjs");const C=require("./el-overlay-D192MFpl.cjs"),e=require("vue"),l=require("./index-C-i9Taq7.cjs"),y=require("./BFLibraryButton-ClRfrYOf.cjs"),d=require("./pathOr-BQgOyNsu.cjs"),b={name:"DialogBody",setup(t,{slots:n}){return{hasSlot:i=>!!n[i]}},props:{fixedHeight:{type:Boolean,default:!1}},computed:{classNames:function(){const t=this.$slots.icon?"icon":"",n=this.fixedHeight?"fixed-height":"";return`dialog-body ${t} ${n}`}}},D={key:0,class:"dialog-body-icon"},k={key:1,class:"dialog-body-heading"},B={class:"dialog-body-content"};function V(t,n,s,i,a,o){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.classNames)},[i.hasSlot("icon")?(e.openBlock(),e.createElementBlock("div",D,[e.renderSlot(t.$slots,"icon",{},void 0,!0)])):e.createCommentVNode("",!0),i.hasSlot("heading")?(e.openBlock(),e.createElementBlock("div",k,[e.renderSlot(t.$slots,"heading",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",B,[e.renderSlot(t.$slots,"default",{},void 0,!0)])],2)}const u=l._export_sfc(b,[["render",V],["__scopeId","data-v-690e953f"]]),N={name:"IconWarningCircle",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},v=["width","height","fill"];function w(t,n,s,i,a,o){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:s.width,height:s.height,fill:s.color,viewBox:"0 0 24 24"},[...n[0]||(n[0]=[e.createElementVNode("path",{pid:"0",d:"M22 11.4c-.1-2.7-1.3-5.1-3.3-6.9-.4-.4-1-.3-1.4.1-.4.4-.3 1 .1 1.4 1.6 1.4 2.5 3.4 2.7 5.5.1 2.1-.6 4.2-2 5.8s-3.4 2.5-5.5 2.7c-2.1.1-4.2-.6-5.8-2-1.6-1.4-2.5-3.4-2.7-5.5-.1-2.1.6-4.2 2-5.8 1.3-1.4 3.1-2.4 5-2.6V11c0 .6.4 1 1 1s1-.4 1-1V2h-1C9.2 2 6.4 3.2 4.5 5.3c-1.8 2-2.7 4.6-2.5 7.2.1 2.7 1.3 5.1 3.3 6.9C7.2 21.2 9.6 22 12 22c2.7 0 5.5-1.1 7.5-3.3 1.7-2 2.6-4.6 2.5-7.3z"},null,-1),e.createElementVNode("circle",{pid:"1",cx:"12",cy:"15.5",r:"1.5"},null,-1)])],8,v)}const f=l._export_sfc(N,[["render",w]]),S={name:"BfDialogHeader",props:{title:{type:String,default:""}},methods:{onClose:function(){this.$parent.handleClose()}}},$={class:"bf-dialog-header"},E={class:"bf-dialog-header-title"};function x(t,n,s,i,a,o){return e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("span",E,e.toDisplayString(s.title),1),this.$slots.tabs?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"icon-close",onClick:n[0]||(n[0]=(...r)=>o.onClose&&o.onClose(...r))})),e.renderSlot(t.$slots,"tabs",{},void 0,!0)])}const m=l._export_sfc(S,[["render",x],["__scopeId","data-v-1491a20c"]]),T={name:"TsAnnotationDeleteDialog",components:{BfDialogHeader:m,DialogBody:u,BfLibraryButton:y.default,IconWarningCircle:f},props:{visible:{type:Boolean,default:!1},deleteAnnotation:{type:Object,default:()=>({annotation:{},withDiscussions:!1})}},data:function(){return{isProcessing:!1}},computed:{annotationDescription:function(){return d.pathOr("",["annotation","label"],this.deleteAnnotation)},annotationDateTime:function(){const t=d.pathOr("",["annotation","start"],this.deleteAnnotation);return this.getUTCDateString(t)+" "+this.getUTCTimeString(t)},deleteDiscussions:function(){return l.propOr(!1,"withDiscussions",this.deleteAnnotation)},btnDeleteCopy:function(){return this.deleteDiscussions?"Yes, I'm sure":"Delete"}},methods:{removeAnnotation:function(){this.$emit("delete",this.deleteAnnotation.annotation)},close:function(){this.$emit("update:visible",!1)},onClosed:function(){this.isProcessing=!1,this.$emit("update:delete-annotation",{annotation:{},withDiscussions:!1})},getUTCDateString:function(t){return t>0?(t=new Date(t/1e3),t.toDateString()):"unknown"},getUTCTimeString:function(t){if(t>0)return t=t/1e3,t=new Date(t),("0"+t.getUTCHours()).slice(-2)+":"+("0"+t.getUTCMinutes()).slice(-2)+":"+("0"+t.getUTCSeconds()).slice(-2)}}},A={class:"dialog-simple-buttons"};function U(t,n,s,i,a,o){const r=m,p=f,c=e.resolveComponent("bf-library-button"),g=u,_=C.ElDialog;return e.openBlock(),e.createBlock(_,{class:"simple",modelValue:s.visible,"onUpdate:modelValue":n[0]||(n[0]=h=>s.visible=h),"show-close":!1,onClose:o.close,onClosed:o.onClosed},{default:e.withCtx(()=>[e.createVNode(r,{slot:"title"}),e.createVNode(g,null,{default:e.withCtx(()=>[e.createVNode(p,{class:"mb-16",height:32,width:32,color:"#C14D49"}),n[5]||(n[5]=e.createElementVNode("h2",null,"Delete annotation?",-1)),o.deleteDiscussions?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("p",null,e.toDisplayString(o.annotationDescription)+" - "+e.toDisplayString(o.annotationDateTime),1),n[1]||(n[1]=e.createElementVNode("hr",null,null,-1)),n[2]||(n[2]=e.createElementVNode("p",null," Deleting this annotation will also remove any associated discussions and cannot be undone. ",-1)),n[3]||(n[3]=e.createElementVNode("p",null," Are you sure you would like to remove this annotation? ",-1))],64)):e.createCommentVNode("",!0),e.createElementVNode("div",A,[e.createVNode(c,{class:"secondary",onClick:o.close},{default:e.withCtx(()=>[...n[4]||(n[4]=[e.createTextVNode(" Cancel ",-1)])]),_:1},8,["onClick"]),e.createVNode(c,{class:"red",processing:t.isProcessing,onClick:o.removeAnnotation},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.btnDeleteCopy),1)]),_:1},8,["processing","onClick"])])]),_:1})]),_:1},8,["modelValue","onClose","onClosed"])}const I=l._export_sfc(T,[["render",U],["__scopeId","data-v-3cc4b959"]]);exports.default=I;
|