@ni/spright-components 2.0.7 → 2.0.8
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.
|
@@ -5756,7 +5756,7 @@ if(i.isAtom){if(!o&&Ow.isSelectable(i))return Ow.create(t,n-(s<0?i.nodeSize:0))}
|
|
|
5756
5756
|
if(e)return e}n+=i.nodeSize*s}return null}function Bw(t,e,n){let i=t.steps.length-1
|
|
5757
5757
|
if(i<e)return
|
|
5758
5758
|
let s,o=t.steps[i];(o instanceof tw||o instanceof ew)&&(t.mapping.maps[i].forEach(((t,e,n,i)=>{null==s&&(s=i)})),t.setSelection(Mw.near(t.doc.resolve(s),n)))}class Pw extends _w{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document")
|
|
5759
|
-
return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&
|
|
5759
|
+
return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return Bb.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection
|
|
5760
5760
|
return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Bb.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let i=this.doc.type.schema
|
|
5761
5761
|
if(null==e)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection()
|
|
5762
5762
|
{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n)
|
|
@@ -6777,7 +6777,7 @@ return{...i,...s}}}}function WS(t){return Object.fromEntries(Object.entries(t).f
|
|
|
6777
6777
|
const i=t.parentOffset
|
|
6778
6778
|
return t.parent.nodesBetween(Math.max(0,i-e),i,((t,e,s,o)=>{var r,a
|
|
6779
6779
|
const l=(null===(a=(r=t.type.spec).toText)||void 0===a?void 0:a.call(r,{node:t,pos:e,parent:s,index:o}))||t.textContent||"%leaf%"
|
|
6780
|
-
n+=l.slice(0,Math.max(0,i-e))})),n}
|
|
6780
|
+
n+=t.isAtom?l:l.slice(0,Math.max(0,i-e))})),n}
|
|
6781
6781
|
function YS(t){return"[object RegExp]"===Object.prototype.toString.call(t)}class XS{constructor(t){this.find=t.find,this.handler=t.handler}}const JS=(t,e)=>{if(YS(e))return e.exec(t)
|
|
6782
6782
|
const n=e(t)
|
|
6783
6783
|
if(!n)return null
|
|
@@ -7198,7 +7198,7 @@ return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDes
|
|
|
7198
7198
|
if(this.isCapturingTransaction)return this.capturedTransaction?void t.steps.forEach((t=>{var e
|
|
7199
7199
|
return null===(e=this.capturedTransaction)||void 0===e?void 0:e.step(t)})):void(this.capturedTransaction=t)
|
|
7200
7200
|
const e=this.state.apply(t),n=!this.state.selection.eq(e.selection)
|
|
7201
|
-
this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t})
|
|
7201
|
+
this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),n&&this.emit("selectionUpdate",{editor:this,transaction:t})
|
|
7202
7202
|
const i=t.getMeta("focus"),s=t.getMeta("blur")
|
|
7203
7203
|
i&&this.emit("focus",{editor:this,event:i.event,transaction:t}),s&&this.emit("blur",{editor:this,event:s.event,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return D_(this.state,t)}isActive(t,e){const n="string"==typeof t?t:null,i="string"==typeof t?e:t
|
|
7204
7204
|
return function(t,e,n={}){if(!e)return S_(t,null,n)||R_(t,null,n)
|
|
@@ -7801,7 +7801,7 @@ a=e-1}}return-1}const lM=rM(ZI)
|
|
|
7801
7801
|
function cM(t,e=eM.Legacy){return lM(t,e)}function dM(t){return"[object String]"===function(t){return Object.prototype.toString.call(t)}(t)}rM(KI)
|
|
7802
7802
|
const hM=Object.prototype.hasOwnProperty
|
|
7803
7803
|
function uM(t){return Array.prototype.slice.call(arguments,1).forEach((function(e){if(e){if("object"!=typeof e)throw new TypeError(e+"must be object")
|
|
7804
|
-
Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t}function pM(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function fM(t){return!(t>=55296&&t<=57343)&&(!(t>=64976&&t<=65007)&&(
|
|
7804
|
+
Object.keys(e).forEach((function(n){t[n]=e[n]}))}})),t}function pM(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function fM(t){return!(t>=55296&&t<=57343)&&(!(t>=64976&&t<=65007)&&(!!(65535&~t&&65534!=(65535&t))&&(!(t>=0&&t<=8)&&(11!==t&&(!(t>=14&&t<=31)&&(!(t>=127&&t<=159)&&!(t>1114111)))))))}function mM(t){if(t>65535){const e=55296+((t-=65536)>>10),n=56320+(1023&t)
|
|
7805
7805
|
return String.fromCharCode(e,n)}return String.fromCharCode(t)}const gM=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,vM=new RegExp(gM.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),bM=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i
|
|
7806
7806
|
function yM(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(vM,(function(t,e,n){return e||function(t,e){if(35===e.charCodeAt(0)&&bM.test(e)){const n="x"===e[1].toLowerCase()?parseInt(e.slice(2),16):parseInt(e.slice(1),10)
|
|
7807
7807
|
return fM(n)?mM(n):t}const n=cM(t)
|
|
@@ -8599,11 +8599,11 @@ return e[0]+t+e[1]}repeat(t,e){let n=""
|
|
|
8599
8599
|
for(let i=0;i<e;i++)n+=t
|
|
8600
8600
|
return n}markString(t,e,n,i){let s=this.getMark(t.type.name),o=e?s.open:s.close
|
|
8601
8601
|
return"string"==typeof o?o:o(this,t,n,i)}getEnclosingWhitespace(t){return{leading:(t.match(/^(\s+)/)||[void 0])[0],trailing:(t.match(/(\s+)$/)||[void 0])[0]}}}var IE
|
|
8602
|
-
class ME{static parseMarkdownToDOM(t,e){try{
|
|
8602
|
+
class ME{static parseMarkdownToDOM(t,e){try{IE.setup(e)
|
|
8603
8603
|
const n=this.markdownParser.parse(t)
|
|
8604
|
-
return null===n?{fragment:document.createDocumentFragment(),mentionedHrefs:Array.from(
|
|
8605
|
-
return t.normalizeLinkText=t=>t,new bE(this.updatedSchema,t,wE.tokens)}static getCustomSchemaConfiguration(){return new ky({nodes:uE.spec.nodes,marks:{link:{attrs:{href:{},rel:{default:"noopener noreferrer"},class:{default:""}},inclusive:!1,excludes:"_",toDOM(t){const e=t.attrs.href,n=
|
|
8606
|
-
return n&&i?(
|
|
8604
|
+
return null===n?{fragment:document.createDocumentFragment(),mentionedHrefs:Array.from(IE.mentionedHrefs)}:{fragment:this.domSerializer.serializeFragment(n.content),mentionedHrefs:Array.from(IE.mentionedHrefs)}}finally{IE.cleanup()}}static initializeMarkdownParser(){const t=wE.tokenizer.configure("zero").enable(["emphasis","list","escape","autolink","newline"])
|
|
8605
|
+
return t.normalizeLinkText=t=>t,new bE(this.updatedSchema,t,wE.tokens)}static getCustomSchemaConfiguration(){return new ky({nodes:uE.spec.nodes,marks:{link:{attrs:{href:{},rel:{default:"noopener noreferrer"},class:{default:""}},inclusive:!1,excludes:"_",toDOM(t){const e=t.attrs.href,n=IE.mentionConfigs?.find((t=>t.isValidMentionHref(e))),i=n?.getDisplayName(e)
|
|
8606
|
+
return n&&i?(IE.mentionedHrefs.add(e),[n.viewElement,{"mention-href":e,"mention-label":i}]):[ih,{href:IE.startsWithHttpOrHttps(e)?e:null,rel:t.attrs.rel,class:e,"underline-hidden":!IE.startsWithHttpOrHttps(e)||null}]}},em:uE.spec.marks.get("em"),strong:uE.spec.marks.get("strong")}})}static setup(t){IE.mentionConfigs=t,IE.mentionedHrefs.clear()}static cleanup(){IE.mentionConfigs=void 0,IE.mentionedHrefs.clear()}static startsWithHttpOrHttps(t){return/^https?:\/\//i.test(t)}}IE=ME,ME.mentionedHrefs=new Set,ME.updatedSchema=IE.getCustomSchemaConfiguration(),ME.markdownParser=IE.initializeMarkdownParser(),ME.domSerializer=Fy.fromSchema(IE.updatedSchema)
|
|
8607
8607
|
class $E{constructor(t){this.markdownSerializer=this.initializeMarkdownSerializerForTipTap(t)}serializeDOMToMarkdown(t){return this.markdownSerializer.serialize(t)}initializeMarkdownSerializerForTipTap(t){const e=function(t,e){const n=e.attrs.href
|
|
8608
8608
|
t.write(`<${n}>`)},n={bulletList:kE.nodes.bullet_list,listItem:kE.nodes.list_item,orderedList:function(t,e){const n=e.attrs.start||1,i=String(n+e.childCount-1).length,s=t.repeat(" ",i+2)
|
|
8609
8609
|
t.renderList(e,s,(e=>{const s=String(n+e)
|
|
@@ -11281,17 +11281,7 @@ return l(),n.addEventListener("scroll",a,yF),n.addEventListener("scrollend",l,yF
|
|
|
11281
11281
|
if(t){return Math.round(t[n.options.horizontal?"inlineSize":"blockSize"])}}return Math.round(t.getBoundingClientRect()[n.options.horizontal?"width":"height"])},kF=(t,{adjustments:e=0,behavior:n},i)=>{var s,o
|
|
11282
11282
|
const r=t+e
|
|
11283
11283
|
null==(o=null==(s=i.scrollElement)?void 0:s.scrollTo)||o.call(s,{[i.options.horizontal?"left":"top"]:r,behavior:n})}
|
|
11284
|
-
|
|
11285
|
-
if(o<i)t=s+1
|
|
11286
|
-
else{if(!(o>i))return s
|
|
11287
|
-
e=s-1}}return t>0?t-1:0}
|
|
11288
|
-
class _F{get pageSize(){return this._pageSize}get rowHeight(){return parseFloat(Cl.getValueFor(this.table))+2*parseFloat($l.getValueFor(this.table))}constructor(t,e){this.visibleItems=[],this.scrollHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this._pageSize=0,this.table=t,this.tanStackTable=e,this.viewportResizeObserver=new ResizeObserver((t=>{const e=t[0]?.borderBoxSize[0]
|
|
11289
|
-
if(e){this.updatePageSize()
|
|
11290
|
-
const t=e.inlineSize
|
|
11291
|
-
this.headerContainerMarginRight=t-this.table.viewport.clientWidth}}))}connect(){this.viewportResizeObserver.observe(this.table.viewport),this.updateVirtualizer()
|
|
11292
|
-
const t=this.virtualizer.scrollOffset
|
|
11293
|
-
null!==t&&this.table.viewport.scrollTo({top:t})}disconnect(){this.viewportResizeObserver.disconnect()}dataChanged(){this.table.$fastController.isConnected&&this.updateVirtualizer()}scrollToIndex(t,e){this.virtualizer?.scrollToIndex(t,e)}updateVirtualizer(){const t=this.createVirtualizerOptions()
|
|
11294
|
-
this.virtualizer?this.virtualizer.setOptions(t):this.virtualizer=new class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null
|
|
11284
|
+
let SF=class{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let t=null
|
|
11295
11285
|
const e=()=>t||(this.targetWindow&&this.targetWindow.ResizeObserver?t=new this.targetWindow.ResizeObserver((t=>{t.forEach((t=>{this._measureElement(t.target,t)}))})):null)
|
|
11296
11286
|
return{disconnect:()=>{var t
|
|
11297
11287
|
return null==(t=e())?void 0:t.disconnect()},observe:t=>{var n
|
|
@@ -11316,10 +11306,10 @@ for(let s=a;s<t;s++){let t=null==(r=this.measurementsCache[s])?void 0:r.measureE
|
|
|
11316
11306
|
t||(t=t=>{const e=i(s),n=this.elementsCache.get(e)
|
|
11317
11307
|
t?(n!==t&&(n&&this.observer.unobserve(n),this.observer.observe(t),this.elementsCache.set(e,t)),t.isConnected&&this.resizeItem(s,this.options.measureElement(t,void 0,this))):n&&(this.observer.unobserve(n),this.elementsCache.delete(e))})
|
|
11318
11308
|
const a=i(s),c=1===this.options.lanes?l[s-1]:this.getFurthestMeasurement(l,s),d=c?c.end+this.options.gap:e+n,h=o.get(a),u="number"==typeof h?h:this.options.estimateSize(s),p=d+u,f=c?c.lane:s%this.options.lanes
|
|
11319
|
-
l[s]={index:s,start:d,size:u,end:p,key:a,lane:f,measureElement:t}}return this.measurementsCache=l,l}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=pF((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((t,e,n)=>this.range=t.length>0&&e>0?function({measurements:t,outerSize:e,scrollOffset:n}){const i=t.length-1,s=
|
|
11320
|
-
let o
|
|
11321
|
-
for(;
|
|
11322
|
-
return{startIndex:
|
|
11309
|
+
l[s]={index:s,start:d,size:u,end:p,key:a,lane:f,measureElement:t}}return this.measurementsCache=l,l}),{key:!1,debug:()=>this.options.debug}),this.calculateRange=pF((()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()]),((t,e,n)=>this.range=t.length>0&&e>0?function({measurements:t,outerSize:e,scrollOffset:n}){const i=t.length-1,s=e=>t[e].start,o=_F(0,i,s,n)
|
|
11310
|
+
let r=o
|
|
11311
|
+
for(;r<i&&t[r].end<n+e;)r++
|
|
11312
|
+
return{startIndex:o,endIndex:r}}({measurements:t,outerSize:e,scrollOffset:n}):null),{key:!1,debug:()=>this.options.debug}),this.getIndexes=pF((()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count]),((t,e,n,i)=>null===e?[]:t({startIndex:e.startIndex,endIndex:e.endIndex,overscan:n,count:i})),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,n=t.getAttribute(e)
|
|
11323
11313
|
return n?parseInt(n,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this._measureElement=(t,e)=>{const n=this.indexFromElement(t),i=this.getMeasurements()[n]
|
|
11324
11314
|
if(!i||!t.isConnected)return void this.elementsCache.forEach(((e,n)=>{e===t&&(this.observer.unobserve(t),this.elementsCache.delete(n))}))
|
|
11325
11315
|
const s=this.elementsCache.get(i.key)
|
|
@@ -11329,7 +11319,7 @@ const i=e-(this.itemSizeCache.get(n.key)??n.size)
|
|
|
11329
11319
|
0!==i&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,i,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,e)),this.notify(!0,!1))},this.measureElement=t=>{t&&this._measureElement(t,void 0)},this.getVirtualItems=pF((()=>[this.getIndexes(),this.getMeasurements()]),((t,e)=>{const n=[]
|
|
11330
11320
|
for(let i=0,s=t.length;i<s;i++){const s=e[t[i]]
|
|
11331
11321
|
n.push(s)}return n}),{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements()
|
|
11332
|
-
if(0!==e.length)return fF(e[
|
|
11322
|
+
if(0!==e.length)return fF(e[_F(0,e.length-1,(t=>fF(e[t]).start),t)])},this.getOffsetForAlignment=(t,e)=>{const n=this.getSize(),i=this.getScrollOffset()
|
|
11333
11323
|
"auto"===e&&(e=t<=i?"start":t>=i+n?"end":"start"),"start"===e||("end"===e?t-=n:"center"===e&&(t-=n/2))
|
|
11334
11324
|
const s=this.options.horizontal?"scrollWidth":"scrollHeight",o=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[s]:this.scrollElement[s]:0)-n
|
|
11335
11325
|
return Math.max(Math.min(o,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1))
|
|
@@ -11343,22 +11333,34 @@ return[this.getOffsetForAlignment(o,e),e]},this.isDynamicMode=()=>this.elementsC
|
|
|
11343
11333
|
const i=this.getOffsetForIndex(t,e)
|
|
11344
11334
|
if(!i)return
|
|
11345
11335
|
const[s,o]=i
|
|
11346
|
-
this._scrollToOffset(s,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{
|
|
11336
|
+
this._scrollToOffset(s,{adjustments:void 0,behavior:n}),"smooth"!==n&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout((()=>{this.scrollToIndexTimeoutId=null
|
|
11337
|
+
if(this.elementsCache.has(this.options.getItemKey(t))){const[s]=fF(this.getOffsetForIndex(t,o))
|
|
11347
11338
|
e=s,i=this.getScrollOffset(),Math.abs(e-i)<1||this.scrollToIndex(t,{align:o,behavior:n})}else this.scrollToIndex(t,{align:o,behavior:n})
|
|
11348
11339
|
var e,i})))},this.scrollBy=(t,{behavior:e}={})=>{this.cancelScrollToIndex(),"smooth"===e&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+t,{adjustments:void 0,behavior:e})},this.getTotalSize=()=>{var t
|
|
11349
11340
|
const e=this.getMeasurements()
|
|
11350
11341
|
let n
|
|
11351
11342
|
return n=0===e.length?this.options.paddingStart:1===this.options.lanes?(null==(t=e[e.length-1])?void 0:t.end)??0:Math.max(...e.slice(-this.options.lanes).map((t=>t.end))),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:e,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:e},this)},this.measure=()=>{var t,e
|
|
11352
|
-
this.itemSizeCache=new Map,null==(e=(t=this.options).onChange)||e.call(t,this,!1)},this.setOptions(t)}}
|
|
11343
|
+
this.itemSizeCache=new Map,null==(e=(t=this.options).onChange)||e.call(t,this,!1)},this.setOptions(t)}}
|
|
11344
|
+
const _F=(t,e,n,i)=>{for(;t<=e;){const s=(t+e)/2|0,o=n(s)
|
|
11345
|
+
if(o<i)t=s+1
|
|
11346
|
+
else{if(!(o>i))return s
|
|
11347
|
+
e=s-1}}return t>0?t-1:0}
|
|
11348
|
+
class IF{get pageSize(){return this._pageSize}get rowHeight(){return parseFloat(Cl.getValueFor(this.table))+2*parseFloat($l.getValueFor(this.table))}constructor(t,e){this.visibleItems=[],this.scrollHeight=0,this.headerContainerMarginRight=0,this.rowContainerYOffset=0,this._pageSize=0,this.table=t,this.tanStackTable=e,this.viewportResizeObserver=new ResizeObserver((t=>{const e=t[0]?.borderBoxSize[0]
|
|
11349
|
+
if(e){this.updatePageSize()
|
|
11350
|
+
const t=e.inlineSize
|
|
11351
|
+
this.headerContainerMarginRight=t-this.table.viewport.clientWidth}}))}connect(){this.viewportResizeObserver.observe(this.table.viewport),this.updateVirtualizer()
|
|
11352
|
+
const t=this.virtualizer.scrollOffset
|
|
11353
|
+
null!==t&&this.table.viewport.scrollTo({top:t})}disconnect(){this.viewportResizeObserver.disconnect()}dataChanged(){this.table.$fastController.isConnected&&this.updateVirtualizer()}scrollToIndex(t,e){this.virtualizer?.scrollToIndex(t,e)}updateVirtualizer(){const t=this.createVirtualizerOptions()
|
|
11354
|
+
this.virtualizer?this.virtualizer.setOptions(t):this.virtualizer=new SF(t),this.virtualizer._willUpdate(),this.handleVirtualizerChange()}createVirtualizerOptions(){const t=this.rowHeight
|
|
11353
11355
|
return{count:this.tanStackTable.getRowModel().rows.length,getScrollElement:()=>this.table.viewport,estimateSize:e=>t,enableSmoothScroll:!0,overscan:3,scrollingDelay:5,scrollToFn:kF,observeElementOffset:xF,observeElementRect:bF,onChange:()=>this.handleVirtualizerChange()}}handleVirtualizerChange(){const t=this.virtualizer
|
|
11354
11356
|
this.visibleItems=t.getVirtualItems(),this.scrollHeight=t.getTotalSize()
|
|
11355
11357
|
let e=0
|
|
11356
|
-
if(this.visibleItems.length>0){e=this.visibleItems[0].start}this.rowContainerYOffset=e}updatePageSize(){this._pageSize=Math.round(this.table.viewport.clientHeight/this.rowHeight)}}function
|
|
11357
|
-
case AR:return
|
|
11358
|
-
default:return
|
|
11359
|
-
return"string"==typeof i&&"string"==typeof s?i.localeCompare(s):i===s?0:void 0===i||null===i&&void 0!==s?-1:1}function
|
|
11360
|
-
return Object.is(i,s)?0:void 0===i?-1:void 0===s?1:null===i?-1:null===s?1:Number.isNaN(i)?-1:Number.isNaN(s)?1:0===i&&0===s?Object.is(i,-0)?-1:1:i>s?1:-1}t([C],
|
|
11361
|
-
class
|
|
11358
|
+
if(this.visibleItems.length>0){e=this.visibleItems[0].start}this.rowContainerYOffset=e}updatePageSize(){this._pageSize=Math.round(this.table.viewport.clientHeight/this.rowHeight)}}function MF(t){switch(t){case DR:return EF
|
|
11359
|
+
case AR:return $F
|
|
11360
|
+
default:return EF}}function $F(t,e,n){const i=t.getValue(n),s=e.getValue(n)
|
|
11361
|
+
return"string"==typeof i&&"string"==typeof s?i.localeCompare(s):i===s?0:void 0===i||null===i&&void 0!==s?-1:1}function EF(t,e,n){const i=t.getValue(n),s=e.getValue(n)
|
|
11362
|
+
return Object.is(i,s)?0:void 0===i?-1:void 0===s?1:null===i?-1:null===s?1:Number.isNaN(i)?-1:Number.isNaN(s)?1:0===i&&0===s?Object.is(i,-0)?-1:1:i>s?1:-1}t([C],IF.prototype,"visibleItems",void 0),t([C],IF.prototype,"scrollHeight",void 0),t([C],IF.prototype,"headerContainerMarginRight",void 0),t([C],IF.prototype,"rowContainerYOffset",void 0)
|
|
11363
|
+
class DF{constructor(t){this.table=t,this.isColumnBeingSized=!1,this.visibleColumns=[],this.currentTotalDelta=0,this.dragStart=0,this.initialColumnWidths=[],this.onDividerMouseMove=t=>{const e=t
|
|
11362
11364
|
for(let t=0;t<this.visibleColumns.length;t++)this.visibleColumns[t].columnInternals.currentPixelWidth=this.initialColumnWidths[t]?.initialPixelWidth
|
|
11363
11365
|
this.currentTotalDelta=this.getAllowedSizeDelta(e.clientX-this.dragStart),this.performCascadeSizeLeft(this.leftColumnIndex,this.currentTotalDelta),this.performCascadeSizeRight(this.rightColumnIndex,this.currentTotalDelta)
|
|
11364
11366
|
const n=this.getTotalColumnFixedWidth()-this.initialColumnTotalWidth
|
|
@@ -11395,10 +11397,10 @@ for(const t of this.visibleColumns)this.initialColumnWidths.push({initalColumnFr
|
|
|
11395
11397
|
const t=this.gridSizedColumns.reduce(((t,e)=>t+e.columnInternals.currentPixelWidth),0),e=t/this.gridSizedColumns.length
|
|
11396
11398
|
let n=0
|
|
11397
11399
|
for(let t=0;t<this.visibleColumns.length&&n<this.gridSizedColumns.length;t++){const i=this.visibleColumns[t]
|
|
11398
|
-
i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/e,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((t=>!t.columnHidden))}getLeftColumnIndexFromDivider(t){return Math.floor(t/2)}}t([C],
|
|
11399
|
-
const
|
|
11400
|
-
return!1},
|
|
11401
|
-
class
|
|
11400
|
+
i===this.gridSizedColumns[n]&&(n+=1,i.columnInternals.currentFractionalWidth=i.columnInternals.currentPixelWidth/e,i.columnInternals.currentPixelWidth=void 0)}}getVisibleColumns(){return this.table.columns.filter((t=>!t.columnHidden))}getLeftColumnIndexFromDivider(t){return Math.floor(t/2)}}t([C],DF.prototype,"isColumnBeingSized",void 0),t([C],DF.prototype,"activeColumnIndex",void 0),t([C],DF.prototype,"activeColumnDivider",void 0)
|
|
11401
|
+
const AF=(t,...e)=>{for(const n of e)if(t===n)return!0
|
|
11402
|
+
return!1},TF=["rowIds","rowParentIds","groupRows","columnIds","columnHidden","columnSort","columnSortDisabled","columnWidths","columnDefinition","actionMenuSlots","selectionMode"]
|
|
11403
|
+
class OF extends RE{constructor(t){super(TF),this.table=t,this.updateQueued=!1}get updateRowIds(){return this.isTracked("rowIds")}get updateRowParentIds(){return this.isTracked("rowParentIds")}get updateGroupRows(){return this.isTracked("groupRows")}get updateColumnIds(){return this.isTracked("columnIds")}get updateColumnSort(){return this.isTracked("columnSort")}get updateColumnWidths(){return this.isTracked("columnWidths")}get updateColumnDefinition(){return this.isTracked("columnDefinition")}get updateActionMenuSlots(){return this.isTracked("actionMenuSlots")}get updateSelectionMode(){return this.isTracked("selectionMode")}get requiresTanStackUpdate(){return this.isTracked("rowIds")||this.isTracked("rowParentIds")||this.isTracked("columnSort")||this.isTracked("columnDefinition")||this.isTracked("groupRows")||this.isTracked("selectionMode")}get requiresTanStackDataReset(){return this.isTracked("rowIds")||this.isTracked("columnDefinition")||this.isTracked("rowParentIds")}get requiresKeyboardFocusReset(){return this.isTracked("columnSortDisabled")||this.isTracked("columnDefinition")||this.isTracked("columnHidden")||this.isTracked("selectionMode")||this.isTracked("actionMenuSlots")}trackAllStateChanged(){this.trackAll(),this.queueUpdate()}get hasPendingUpdates(){return this.updateQueued}trackColumnPropertyChanged(t){AF(t,"columnId")?this.track("columnIds"):VR(t,"operandDataRecordFieldName","sortOperation")?this.track("columnDefinition"):VR(t,"sortingDisabled")?(this.track("columnSort"),this.track("columnSortDisabled")):VR(t,"currentSortDirection","currentSortIndex")?this.track("columnSort"):VR(t,"currentFractionalWidth","currentPixelWidth","minPixelWidth","resizingDisabled")?this.track("columnWidths"):AF(t,"columnHidden")?(this.track("columnWidths"),this.track("columnHidden")):AF(t,"actionMenuSlot")?this.track("actionMenuSlots"):VR(t,"groupIndex","groupingDisabled")&&this.track("groupRows"),this.queueUpdate()}trackColumnInstancesChanged(){this.track("columnIds"),this.track("columnDefinition"),this.track("columnSort"),this.track("columnSortDisabled"),this.track("columnWidths"),this.track("actionMenuSlots"),this.track("groupRows"),this.queueUpdate()}trackIdFieldNameChanged(){this.track("rowIds"),this.queueUpdate()}trackParentIdFieldNameChanged(){this.track("rowParentIds"),this.queueUpdate()}trackSelectionModeChanged(){this.track("selectionMode"),this.queueUpdate()}queueUpdate(){this.table.$fastController.isConnected&&(this.updateQueued||(this.updateQueued=!0,b.queueUpdate((()=>{this.table.update(),this.untrackAll(),this.updateQueued=!1}))))}}class RF{constructor(t){this.tanStackTable=t}reset(){}toggleIsRowSelected(t,e){t.isGroupRow&&t.selectionState===bR?this.deselectAllLeafRows(t.id):this.tanStackTable.getRow(t.id).toggleSelected(e,{selectChildren:t.isGroupRow})}selectSingleRow(t){if(t.isGroupRow)throw new Error("function not intended to select grouped rows")
|
|
11402
11404
|
const e=this.tanStackTable.getState().rowSelection,n=[]
|
|
11403
11405
|
if(Object.entries(e).forEach((([t,e])=>{e&&n.push(t)})),1===n.length&&n[0]===t.id)return!1
|
|
11404
11406
|
const i={}
|
|
@@ -11408,7 +11410,7 @@ this.tanStackTable.setRowSelection(i)}getAllLeafRowIds(t){const e=this.tanStackT
|
|
|
11408
11410
|
return e?.getIsGrouped()?e.getLeafRows().filter((t=>!t.getIsGrouped())).map((t=>t.id)):[]}getAllOrderedRows(){const t=this.tanStackTable.getPreExpandedRowModel().rows
|
|
11409
11411
|
return this.getOrderedRows(t)}getOrderedRows(t){const e=[]
|
|
11410
11412
|
for(const n of t)e.push(n),n.subRows?.length&&e.push(...this.getOrderedRows(n.subRows))
|
|
11411
|
-
return e}}class
|
|
11413
|
+
return e}}class FF extends RF{handleRowSelectionToggle(t,e,n){return!1}handleRowClick(t,e,n){return!1}handleActionMenuOpening(t){return!1}}class NF extends RF{handleRowSelectionToggle(t,e,n){return n&&this.tryUpdateRangeSelection(t.id,!0)||(this.shiftSelectStartRowId=e?t.id:void 0,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t,e)),!0}handleRowClick(t,e,n){if(e){const e=n
|
|
11412
11414
|
if(this.tryUpdateRangeSelection(t.id,e))return!0}if(n){const e=t.selectionState!==bR
|
|
11413
11415
|
return this.shiftSelectStartRowId=e?t.id:void 0,this.previousShiftSelectRowEndId=void 0,this.toggleIsRowSelected(t),!0}return this.shiftSelectStartRowId=t.id,this.previousShiftSelectRowEndId=void 0,this.selectSingleRow(t)}handleActionMenuOpening(t){return t.selectionState!==bR&&this.selectSingleRow(t)}reset(){this.shiftSelectStartRowId=void 0,this.previousShiftSelectRowEndId=void 0}tryUpdateRangeSelection(t,e){if(void 0===this.shiftSelectStartRowId)return!1
|
|
11414
11416
|
const n=this.getAllOrderedRows(),i=this.getRowIndexForId(this.shiftSelectStartRowId,n)
|
|
@@ -11420,20 +11422,20 @@ this.updateSelectionStateForRange(t,n,s,i,!0)}updateSelectionStateForRange(t,e,n
|
|
|
11420
11422
|
const o=Math.min(e,n),r=Math.max(e,n)
|
|
11421
11423
|
for(let e=o;e<=r;e++){const n=i[e]
|
|
11422
11424
|
n.getIsGrouped()||this.updateSelectionStateForRow(t,n.id,s)}const a=i[n]
|
|
11423
|
-
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((e=>this.updateSelectionStateForRow(t,e,s)))}updateSelectionStateForRow(t,e,n){n?t[e]=!0:delete t[e]}getRowIndexForId(t,e){return t?e.findIndex((e=>e.id===t)):-1}}class
|
|
11425
|
+
a.getIsGrouped()&&this.getAllLeafRowIds(a.id).forEach((e=>this.updateSelectionStateForRow(t,e,s)))}updateSelectionStateForRow(t,e,n){n?t[e]=!0:delete t[e]}getRowIndexForId(t,e){return t?e.findIndex((e=>e.id===t)):-1}}class LF extends RF{handleRowSelectionToggle(t,e,n){return this.toggleIsRowSelected(t,e),!0}handleRowClick(t,e,n){return this.selectSingleRow(t)}handleActionMenuOpening(t){return this.handleRowClick(t,!1,!1)}}class BF{constructor(t,e){this.tanStackTable=t,this.selectionManager=this.createSelectionManager(e)}handleRowSelectionToggle(t,e,n){return!!t&&this.selectionManager.handleRowSelectionToggle(t,e,n)}handleRowClick(t,e,n){return!!t&&this.selectionManager.handleRowClick(t,e,n)}handleActionMenuOpening(t){return!!t&&this.selectionManager.handleActionMenuOpening(t)}handleSelectionModeChanged(t){this.selectionManager=this.createSelectionManager(t)}handleSelectionReset(){this.selectionManager.reset()}getCurrentSelectedRecordIds(){const t=this.tanStackTable.options.state.rowSelection
|
|
11424
11426
|
if(!t)return[]
|
|
11425
11427
|
const e=[]
|
|
11426
|
-
return Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e}createSelectionManager(t){switch(t){case gR.multiple:return new
|
|
11427
|
-
case gR.single:return new
|
|
11428
|
-
case gR.none:return new
|
|
11429
|
-
default:throw new Error("unknown selection mode found")}}}function
|
|
11428
|
+
return Object.entries(t).forEach((([t,n])=>{n&&e.push(t)})),e}createSelectionManager(t){switch(t){case gR.multiple:return new NF(this.tanStackTable)
|
|
11429
|
+
case gR.single:return new LF(this.tanStackTable)
|
|
11430
|
+
case gR.none:return new FF(this.tanStackTable)
|
|
11431
|
+
default:throw new Error("unknown selection mode found")}}}function PF(t,e){const n=e,i=[],s={},o=new Set
|
|
11430
11432
|
for(let e=0;e<t.length;e++){const r=t[e],a=r[n.id],l=r[n.parentId]
|
|
11431
11433
|
Object.prototype.hasOwnProperty.call(s,a)||(s[a]={subRows:[],clientRecord:void 0,originalIndex:void 0}),o&&o.delete(a),s[a].clientRecord=r
|
|
11432
11434
|
const c=s[a]
|
|
11433
11435
|
c.originalIndex=e,null==l?i.push(c):(Object.prototype.hasOwnProperty.call(s,l)||(s[l]={subRows:[],clientRecord:void 0,originalIndex:void 0},o&&o.add(l)),s[l].subRows.push(c))}if(o?.size){const t=Array.from(o.values()).join(",")
|
|
11434
|
-
throw new Error(`The items array contains orphans that point to the following parentIds: [${t}]. These parentIds do not exist in the items array.`)}if(
|
|
11435
|
-
return i}function
|
|
11436
|
-
return this.getAllNodes(this._hierarchicalData,e),this.isDataFlat||!t?e.map((t=>t.clientRecord)):e.sort(((t,e)=>t.originalIndex-e.originalIndex)).map((t=>t.clientRecord))}getAllNodes(t,e){for(const n of t)e.push(n),n.subRows&&this.getAllNodes(n.subRows,e)}}class
|
|
11436
|
+
throw new Error(`The items array contains orphans that point to the following parentIds: [${t}]. These parentIds do not exist in the items array.`)}if(zF(i)<Object.keys(s).length)throw new Error("The items array contains nodes with a circular parent/child relationship.")
|
|
11437
|
+
return i}function zF(t){return t.reduce(((t,e)=>t+1+(e.subRows&&zF(e.subRows))),0)}class VF{constructor(t,e,n){if(this.isDataFlat=!1,"string"==typeof e&&"string"==typeof n)try{this._hierarchicalData=PF(t,{id:e,parentId:n}),this.isDataFlat=!1,this._parentIdConfigurationValid=!0}catch{this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!1}else this.isDataFlat=!0,this._hierarchicalData=t.map(((t,e)=>({clientRecord:{...t},originalIndex:e}))),this._parentIdConfigurationValid=!0}get hierarchicalData(){return this._hierarchicalData}get parentIdConfigurationValid(){return this._parentIdConfigurationValid}getAllRecords(t=!1){const e=[]
|
|
11438
|
+
return this.getAllNodes(this._hierarchicalData,e),this.isDataFlat||!t?e.map((t=>t.clientRecord)):e.sort(((t,e)=>t.originalIndex-e.originalIndex)).map((t=>t.clientRecord))}getAllNodes(t,e){for(const n of t)e.push(n),n.subRows&&this.getAllNodes(n.subRows,e)}}class HF{constructor(t){this.tanStackTable=t,this.explicitExpansionStates=new Map,this.hierarchyOptions=new Map,this.isHierarchyEnabled=!1,this.parentRowsWithChildren=new Set}isRowExpanded(t){if(!this.isRowExpandable(t))return!1
|
|
11437
11439
|
return this.explicitExpansionStates.get(t.id)??this.getDefaultExpansionState(t)}toggleRowExpansion(t){if(!this.isRowExpandable(t))return
|
|
11438
11440
|
const e=this.isRowExpanded(t)
|
|
11439
11441
|
this.explicitExpansionStates.set(t.id,!e),t.toggleExpanded()}collapseAll(){this.resetExpansionState()
|
|
@@ -11448,8 +11450,8 @@ for(const{recordId:n,options:i}of t){e.set(n,i)
|
|
|
11448
11450
|
const t=this.hierarchyOptions.get(n)?.delayedHierarchyState,s=i.delayedHierarchyState
|
|
11449
11451
|
t!==fR||s!==pR||this.parentRowsWithChildren.has(n)||this.explicitExpansionStates.delete(n)}this.hierarchyOptions=e}isRowExpandable(t){return t.subRows.length>0||this.canLoadDelayedChildren(t.id)}setHierarchyEnabled(t){this.isHierarchyEnabled=t}isLoadingChildren(t){return!!this.isHierarchyEnabled&&(this.hierarchyOptions.get(t)?.delayedHierarchyState===fR??!1)}canLoadDelayedChildren(t){if(!this.isHierarchyEnabled)return!1
|
|
11450
11452
|
const e=this.hierarchyOptions.get(t)?.delayedHierarchyState
|
|
11451
|
-
return e!==uR}getDefaultExpansionState(t){return 0!==t.subRows.length}}class
|
|
11452
|
-
class
|
|
11453
|
+
return e!==uR}getDefaultExpansionState(t){return 0!==t.subRows.length}}class UF extends OE{isValid(){return this.noneTracked()}getValidationFlags(){return this.getTrackedItems()}}class qF extends UF{constructor(t){super(t),this.isColumnValid=!0}getValidity(){return this.getValidationFlags()}onTrackingChange(){super.onTrackingChange(),this.isColumnValid=this.isValid()}setConditionValue(t,e){e?this.track(t):this.untrack(t)}}t([C],qF.prototype,"isColumnValid",void 0)
|
|
11454
|
+
class jF{get inNavigationMode(){return this.focusType!==$R&&this.focusType!==ER}constructor(t,e){this.table=t,this.virtualizer=e,this.focusType=CR,this.headerActionIndex=-1,this.rowIndex=-1,this.cellContentIndex=-1,this.columnIndex=-1,this.focusWithinTable=!1,this.isCurrentlyFocusingElement=!1,this.visibleRowNotifiers=[],this.onTableFocusIn=t=>{this.focusWithinTable=!0,this.updateFocusStateFromActiveElement(!1)
|
|
11453
11455
|
const e=void 0!==this.table.openActionMenuRecordId
|
|
11454
11456
|
if((t.target===this.table||this.focusType===CR)&&!e){let t=!0
|
|
11455
11457
|
this.hasRowOrCellFocusType()&&this.scrollToAndFocusRow(this.rowIndex)&&(t=!1),t&&!this.setFocusOnHeader()&&this.table.blur()}},this.onTableFocusOut=()=>{this.focusWithinTable=!1},this.onCellActionMenuBlur=t=>{t.stopPropagation()
|
|
@@ -11581,7 +11583,7 @@ const i=e??this.columnIndex,s=n??this.rowIndex
|
|
|
11581
11583
|
return i>=0&&i<t.cells.length&&(this.focusType=MR,this.setRowCellFocusState(i,s,!0),!0)}trySetCellContentFocus(t,e,n,i){if(!t)return!1
|
|
11582
11584
|
const s=n??this.columnIndex,o=i??this.rowIndex
|
|
11583
11585
|
return s>=0&&s<t.cells.length&&e>=0&&e<t.cells[s].cell.cellView.tabbableChildren.length&&(this.setCellContentFocusState(e,o,s,!0),!0)}trySetCellActionMenuFocus(t,e,n){const i=e??this.columnIndex,s=n??this.rowIndex
|
|
11584
|
-
return!!(i>=0&&i<t.cells.length&&t.cells[i].actionMenuButton)&&(this.setCellActionMenuFocusState(s,i,!0),!0)}setCellActionMenuFocusState(t,e,n){this.focusType=$R,this.setRowCellFocusState(e,t,n)}setCellContentFocusState(t,e,n,i){this.focusType=ER,this.cellContentIndex=t,this.setRowCellFocusState(n,e,i)}setRowFocusState(t){this.focusType=_R,void 0!==t&&(this.rowIndex=t)}setCellFocusState(t,e,n){this.focusType=MR,this.setRowCellFocusState(t,e,n)}setRowCellFocusState(t,e,n){this.rowIndex=e,this.columnIndex=t,n&&this.focusCurrentRow(!0)}isResolvedRowType(t){return t instanceof sF||t instanceof cF}}let
|
|
11586
|
+
return!!(i>=0&&i<t.cells.length&&t.cells[i].actionMenuButton)&&(this.setCellActionMenuFocusState(s,i,!0),!0)}setCellActionMenuFocusState(t,e,n){this.focusType=$R,this.setRowCellFocusState(e,t,n)}setCellContentFocusState(t,e,n,i){this.focusType=ER,this.cellContentIndex=t,this.setRowCellFocusState(n,e,i)}setRowFocusState(t){this.focusType=_R,void 0!==t&&(this.rowIndex=t)}setCellFocusState(t,e,n){this.focusType=MR,this.setRowCellFocusState(t,e,n)}setRowCellFocusState(t,e,n){this.rowIndex=e,this.columnIndex=t,n&&this.focusCurrentRow(!0)}isResolvedRowType(t){return t instanceof sF||t instanceof cF}}let WF=class extends We{get validity(){return this.tableValidator.getValidity()}get showRowOperationColumn(){return this.selectionMode===gR.multiple||this.showCollapseAll}get collapseButtonVisibility(){return this.canHaveCollapsibleRows?this.showCollapseAll?"visible":"":"hidden-size-reduced"}constructor(){super(),this.selectionMode=gR.none,this.tableData=[],this.columns=[],this.childItems=[],this.rowElements=[],this.canRenderRows=!0,this.scrollX=0,this.selectionState=vR,this.showCollapseAll=!1,this.canHaveCollapsibleRows=!1,this.visibleColumns=[],this.tableScrollableMinWidth=0,this.windowShiftKeyDown=!1,this.tableValidator=new UR,this.tableUpdateTracker=new OF(this),this.columnNotifiers=[],this.isInitialized=!1,this.ignoreSelectionChangeEvents=!1,this.requestedSlots=new Map,this.actionMenuSlots=[],this.onViewPortScroll=t=>{this.scrollX=t.target.scrollLeft},this.onKeyDown=t=>{this.windowShiftKeyDown=t.shiftKey},this.onKeyUp=t=>{this.windowShiftKeyDown=t.shiftKey},this.onBlur=()=>{this.windowShiftKeyDown=!1},this.getRowCanExpand=t=>this.expansionManager.isRowExpandable(t),this.getIsRowExpanded=t=>this.expansionManager.isRowExpanded(t),this.handleRowSelectionChange=t=>{const e=t instanceof Function?t(this.table.getState().rowSelection):t
|
|
11585
11587
|
this.updateTableOptions({state:{rowSelection:e}})},this.handleExpandedChange=t=>{const e=t instanceof Function?t(this.table.getState().expanded):t
|
|
11586
11588
|
this.updateTableOptions({state:{expanded:e}})},this.options={data:[],onStateChange:t=>{},onRowSelectionChange:this.handleRowSelectionChange,onExpandedChange:this.handleExpandedChange,getCoreRowModel:t=>gO((()=>[t.options.data]),(e=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(e,s,o){void 0===s&&(s=0)
|
|
11587
11589
|
const r=[]
|
|
@@ -11604,11 +11606,11 @@ d=n&&i?0:n?l:-l}}if(0===d&&(d=a.sortingFn(t,e,s.id)),0!==d)return c&&(d*=-1),a.i
|
|
|
11604
11606
|
s.push(t),null!=(e=t.subRows)&&e.length&&(t.subRows=a(t.subRows))})),e}
|
|
11605
11607
|
return{rows:a(n.rows),flatRows:s,rowsById:n.rowsById}}),vO(t.options,"debugTable",0,(()=>t._autoResetPageIndex()))),getGroupedRowModel:hR(),getExpandedRowModel:t=>gO((()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows]),((t,e,n)=>!e.rows.length||!0!==t&&!Object.keys(null!=t?t:{}).length?e:n?function(t){const e=[],n=t=>{var i
|
|
11606
11608
|
e.push(t),null!=(i=t.subRows)&&i.length&&t.getIsExpanded()&&t.subRows.forEach(n)}
|
|
11607
|
-
return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}(e):e),vO(t.options,"debugTable")),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:t=>t.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:t=>!t.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=dR(this.options),this.virtualizer=new
|
|
11609
|
+
return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}(e):e),vO(t.options,"debugTable")),getRowCanExpand:this.getRowCanExpand,getIsRowExpanded:this.getIsRowExpanded,getSubRows:t=>t.subRows,columns:[],state:{rowSelection:{},grouping:[],expanded:!0},enableRowSelection:t=>!t.getIsGrouped(),enableMultiRowSelection:!1,enableSubRowSelection:!1,enableSorting:!0,enableGrouping:!0,renderFallbackValue:null,autoResetAll:!1},this.table=dR(this.options),this.virtualizer=new IF(this,this.table),this.keyboardNavigationManager=new jF(this,this.virtualizer),this.layoutManager=new DF(this),this.layoutManagerNotifier=x.getNotifier(this.layoutManager),this.layoutManagerNotifier.subscribe(this,"isColumnBeingSized"),this.selectionManager=new BF(this.table,this.selectionMode),this.expansionManager=new HF(this.table)}async setData(t){await this.processPendingUpdates()
|
|
11608
11610
|
const e=this.calculateTanStackData(t)
|
|
11609
11611
|
this.updateTableOptions(e)}async getSelectedRecordIds(){return await this.processPendingUpdates(),this.selectionManager.getCurrentSelectedRecordIds()}async setSelectedRecordIds(t){await this.processPendingUpdates(),this.selectionMode!==gR.none&&this.updateTableOptions({state:{rowSelection:this.calculateTanStackSelectionState(t)}})}async setRecordHierarchyOptions(t){await this.processPendingUpdates()
|
|
11610
11612
|
const e=structuredClone(t),n=this.tableValidator.getOptionsWithPresentIds(e)
|
|
11611
|
-
this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),this.keyboardNavigationManager.connect(),window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),window.addEventListener("blur",this.onBlur)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.keyboardNavigationManager.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),window.removeEventListener("blur",this.onBlur)}checkValidity(){return this.tableValidator.isValid()}handleChange(t,e){(t instanceof HR||t instanceof zR)&&"string"==typeof e?this.tableUpdateTracker.trackColumnPropertyChanged(e):t instanceof
|
|
11613
|
+
this.expansionManager.setHierarchyOptions(n),this.refreshRows()}connectedCallback(){super.connectedCallback(),this.initialize(),this.virtualizer.connect(),this.viewport.addEventListener("scroll",this.onViewPortScroll,{passive:!0}),this.keyboardNavigationManager.connect(),window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),window.addEventListener("blur",this.onBlur)}disconnectedCallback(){super.disconnectedCallback(),this.virtualizer.disconnect(),this.keyboardNavigationManager.disconnect(),this.viewport.removeEventListener("scroll",this.onViewPortScroll),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),window.removeEventListener("blur",this.onBlur)}checkValidity(){return this.tableValidator.isValid()}handleChange(t,e){(t instanceof HR||t instanceof zR)&&"string"==typeof e?this.tableUpdateTracker.trackColumnPropertyChanged(e):t instanceof qF&&"isColumnValid"===e?this.tableValidator.validateColumnConfigurations(this.columns):t instanceof DF&&"isColumnBeingSized"===e&&!this.layoutManager.isColumnBeingSized&&this.emitColumnConfigurationChangeEvent()}onRowSelectionToggle(t,e){e.stopImmediatePropagation()
|
|
11612
11614
|
this.selectionManager.handleRowSelectionToggle(this.tableData[t],e.detail.newState,this.windowShiftKeyDown)&&this.emitSelectionChangeEvent()}onRowClick(t,e){return this.selectionManager.handleRowClick(this.tableData[t],e.shiftKey,e.ctrlKey||e.metaKey)&&this.emitSelectionChangeEvent(),!0}onRowFocusIn(t){this.keyboardNavigationManager.onRowFocusIn(t)}onRowBlur(t){this.keyboardNavigationManager.onRowBlur(t)}onAllRowsSelectionChange(t){t.stopPropagation(),this.ignoreSelectionChangeEvents||(this.table.toggleAllRowsSelected(this.selectionCheckbox.checked),this.emitSelectionChangeEvent())}onRowActionMenuBeforeToggle(t,e){e.stopImmediatePropagation(),this.handleActionMenuBeforeToggleEvent(t,e)}onRowActionMenuToggle(t){t.stopImmediatePropagation(),this.handleRowActionMenuToggleEvent(t)}onRowSlotsRequest(t){t.stopImmediatePropagation()
|
|
11613
11615
|
for(const e of t.detail.slots){const n=LR(t.detail.columnInternalId,e.slot)
|
|
11614
11616
|
this.requestedSlots.set(e.name,{recordId:t.detail.recordId,uniqueSlot:n})}this.refreshRows()}handleCollapseAllRows(){this.expansionManager.collapseAll()}onRightDividerMouseDown(t,e){0===t.button&&this.layoutManager.beginColumnInteractiveSize(t.clientX,this.getRightDividerIndex(e))}onLeftDividerMouseDown(t,e){0===t.button&&this.layoutManager.beginColumnInteractiveSize(t.clientX,this.getLeftDividerIndex(e))}getLeftDividerIndex(t){return 2*t-1}getRightDividerIndex(t){return 2*t}handleGroupRowExpanded(t,e){this.toggleRowExpanded(t),e.stopPropagation()}handleRowExpanded(t){this.toggleRowExpanded(t)}toggleColumnSort(t,e){if(t.columnInternals.sortingDisabled)return
|
|
@@ -11620,7 +11622,7 @@ e?n[i].columnInternals.currentSortIndex=i:s===t?s.columnInternals.currentSortInd
|
|
|
11620
11622
|
return e.key===Ta&&this.toggleColumnSort(t,n),!0}update(){if(this.validate(),this.tableUpdateTracker.requiresTanStackUpdate&&this.updateTanStack(),this.tableUpdateTracker.updateRowParentIds||this.tableUpdateTracker.updateGroupRows){const t=this.isHierarchyEnabled(),e=this.columns.some((t=>!t.columnInternals.groupingDisabled))
|
|
11621
11623
|
this.canHaveCollapsibleRows=t||e}this.tableUpdateTracker.updateActionMenuSlots&&this.updateActionMenuSlots(),this.tableUpdateTracker.updateColumnWidths&&(this.rowGridColumns=this.layoutManager.getGridTemplateColumns(),this.visibleColumns=this.columns.filter((t=>!t.columnHidden))),this.tableUpdateTracker.requiresKeyboardFocusReset&&this.keyboardNavigationManager.resetFocusState()}get ariaMultiSelectable(){switch(this.selectionMode){case gR.multiple:return"true"
|
|
11622
11624
|
case gR.single:return"false"
|
|
11623
|
-
default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(t){this.dataHierarchyManager=new
|
|
11625
|
+
default:return null}}getHeaderContainerElements(){return this.columnHeadersContainer.querySelectorAll(".header-container")}calculateTanStackData(t){this.dataHierarchyManager=new VF(t,this.idFieldName,this.parentIdFieldName)
|
|
11624
11626
|
const e=this.dataHierarchyManager.hierarchicalData
|
|
11625
11627
|
this.tableValidator.setParentIdConfigurationValidity(this.dataHierarchyManager.parentIdConfigurationValid)
|
|
11626
11628
|
const n={data:e}
|
|
@@ -11659,14 +11661,14 @@ if(void 0!==e)return this.columns.find((t=>t.columnInternals.uniqueId===e))}upda
|
|
|
11659
11661
|
this.expansionManager.processDataUpdate(t)}this.refreshRows()}toggleRowExpanded(t){const e=this.table.getRowModel().rows[t]
|
|
11660
11662
|
this.expansionManager.toggleRowExpansion(e)}calculateTanStackSortState(){const t=this.getColumnsParticipatingInSorting().sort(((t,e)=>t.columnInternals.currentSortIndex-e.columnInternals.currentSortIndex))
|
|
11661
11663
|
return this.firstSortedColumn=t.length?t[0]:void 0,t.map((t=>({id:t.columnInternals.uniqueId,desc:t.columnInternals.currentSortDirection===mR.descending})))}calculateTanStackGroupingState(){return this.getColumnsParticipatingInGrouping().sort(((t,e)=>t.columnInternals.groupIndex-e.columnInternals.groupIndex)).map((t=>t.columnInternals.uniqueId))}calculateTanStackRowIdFunction(){return null===this.idFieldName||void 0===this.idFieldName?void 0:t=>t.clientRecord[this.idFieldName]}calculateTanStackColumns(){return this.columns.map((t=>({id:t.columnInternals.uniqueId,accessorFn:e=>{const n=t.columnInternals.operandDataRecordFieldName
|
|
11662
|
-
if("string"==typeof n)return e.clientRecord[n]},sortingFn:
|
|
11664
|
+
if("string"==typeof n)return e.clientRecord[n]},sortingFn:MF(t.columnInternals.sortOperation),sortUndefined:!1})))}calculateTanStackSelectionState(t){if(this.selectionMode===gR.none)return{}
|
|
11663
11665
|
const e={},n=this.tableValidator.getPresentRecordIds(t)
|
|
11664
11666
|
for(const t of n)if(e[t]=!0,this.selectionMode===gR.single)break
|
|
11665
11667
|
return e}}
|
|
11666
|
-
t([ft({attribute:"id-field-name"})],
|
|
11667
|
-
const WF
|
|
11668
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11669
|
-
const
|
|
11668
|
+
t([ft({attribute:"id-field-name"})],WF.prototype,"idFieldName",void 0),t([ft({attribute:"parent-id-field-name"})],WF.prototype,"parentIdFieldName",void 0),t([ft({attribute:"selection-mode"})],WF.prototype,"selectionMode",void 0),t([C],WF.prototype,"tableData",void 0),t([C],WF.prototype,"columns",void 0),t([C],WF.prototype,"childItems",void 0),t([C],WF.prototype,"rowElements",void 0),t([C],WF.prototype,"openActionMenuRecordId",void 0),t([C],WF.prototype,"canRenderRows",void 0),t([C],WF.prototype,"scrollX",void 0),t([C],WF.prototype,"rowGridColumns",void 0),t([C],WF.prototype,"selectionState",void 0),t([C],WF.prototype,"selectionCheckbox",void 0),t([C],WF.prototype,"collapseAllButton",void 0),t([C],WF.prototype,"showCollapseAll",void 0),t([C],WF.prototype,"canHaveCollapsibleRows",void 0),t([k],WF.prototype,"collapseButtonVisibility",null),t([C],WF.prototype,"firstSortedColumn",void 0),t([C],WF.prototype,"visibleColumns",void 0),t([C],WF.prototype,"tableScrollableMinWidth",void 0),t([C],WF.prototype,"windowShiftKeyDown",void 0)
|
|
11669
|
+
const GF=WF.compose({baseName:"table",template:uF,styles:qR})
|
|
11670
|
+
_i.getOrCreate().withPrefix("nimble").register(GF())
|
|
11671
|
+
const ZF=Mt`
|
|
11670
11672
|
${Vs("contents")}
|
|
11671
11673
|
|
|
11672
11674
|
.header-content {
|
|
@@ -11674,14 +11676,14 @@ const GF=Mt`
|
|
|
11674
11676
|
overflow: hidden;
|
|
11675
11677
|
text-overflow: ellipsis;
|
|
11676
11678
|
}
|
|
11677
|
-
`,
|
|
11679
|
+
`,KF=Q`<span
|
|
11678
11680
|
${Ag("hasOverflow")}
|
|
11679
11681
|
class="header-content"
|
|
11680
11682
|
title=${t=>t.hasOverflow&&t.headerTextContent?t.headerTextContent:null}
|
|
11681
11683
|
>
|
|
11682
11684
|
<slot ${Ut("contentSlot")}></slot>
|
|
11683
11685
|
</span>`
|
|
11684
|
-
function
|
|
11686
|
+
function YF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.fractionalWidth=this.fractionalWidth??OR}minPixelWidthChanged(){this.columnInternals.minPixelWidth=this.minPixelWidth??TR}}return ft({attribute:"fractional-width",converter:ut})(e.prototype,"fractionalWidth"),ft({attribute:"min-pixel-width",converter:ut})(e.prototype,"minPixelWidth"),e}function XF(t){class e extends t{constructor(){super(...arguments),this.groupingDisabled=!1}groupingDisabledChanged(){this.columnInternals.groupingDisabled=this.groupingDisabled}groupIndexChanged(){this.columnInternals.groupIndex=this.groupIndex??void 0}}return ft({attribute:"grouping-disabled",mode:"boolean"})(e.prototype,"groupingDisabled"),ft({attribute:"group-index",converter:ut})(e.prototype,"groupIndex"),e}function JF(t){class e extends t{}return ft({attribute:"placeholder"})(e.prototype,"placeholder"),e}const QF=Mt`
|
|
11685
11687
|
${Vs("flex")}
|
|
11686
11688
|
|
|
11687
11689
|
:host {
|
|
@@ -11710,7 +11712,7 @@ function KF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.f
|
|
|
11710
11712
|
font: ${Oc};
|
|
11711
11713
|
color: ${Rc};
|
|
11712
11714
|
}
|
|
11713
|
-
`,
|
|
11715
|
+
`,tN=Q`
|
|
11714
11716
|
<template
|
|
11715
11717
|
@click="${(t,e)=>("string"==typeof t.cellRecord?.href&&e.event.stopPropagation(),!0)}"
|
|
11716
11718
|
class="${t=>t.isPlaceholder?"placeholder":""}"
|
|
@@ -11744,19 +11746,19 @@ function KF(t){class e extends t{fractionalWidthChanged(){this.columnInternals.f
|
|
|
11744
11746
|
</span>`)}
|
|
11745
11747
|
</template>
|
|
11746
11748
|
`
|
|
11747
|
-
class
|
|
11748
|
-
return null==t&&this.columnConfig?.placeholder?(this.isPlaceholder=!0,this.columnConfig.placeholder):(this.isPlaceholder=!1,"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:"")}get showAnchor(){return"string"==typeof this.cellRecord?.href}get tabbableChildren(){return this.showAnchor?[this.anchor]:[]}}t([C],
|
|
11749
|
-
const eN
|
|
11750
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11751
|
-
class
|
|
11752
|
-
const
|
|
11749
|
+
class eN extends NR{constructor(){super(...arguments),this.hasOverflow=!1,this.isPlaceholder=!1}get text(){const t=this.cellRecord?.label??this.cellRecord?.href
|
|
11750
|
+
return null==t&&this.columnConfig?.placeholder?(this.isPlaceholder=!0,this.columnConfig.placeholder):(this.isPlaceholder=!1,"string"==typeof this.cellRecord?.label?this.cellRecord.label:"string"==typeof this.cellRecord?.href?this.cellRecord.href:"")}get showAnchor(){return"string"==typeof this.cellRecord?.href}get tabbableChildren(){return this.showAnchor?[this.anchor]:[]}}t([C],eN.prototype,"hasOverflow",void 0),t([C],eN.prototype,"isPlaceholder",void 0),t([k],eN.prototype,"text",null),t([k],eN.prototype,"showAnchor",null)
|
|
11751
|
+
const nN=eN.compose({baseName:"table-column-anchor-cell-view",template:tN,styles:QF})
|
|
11752
|
+
_i.getOrCreate().withPrefix("nimble").register(nN())
|
|
11753
|
+
class iN extends RR{constructor(){super(...arguments),this.hasOverflow=!1,this.text=zv.getValueFor(this),this.noValuePlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}},this.emptyPlaceholderLabelSubscriber={handleChange:()=>{this.applyPlaceholderTextIfNeeded()}}}connectedCallback(){super.connectedCallback(),zv.subscribe(this.noValuePlaceholderLabelSubscriber,this),Vv.subscribe(this.emptyPlaceholderLabelSubscriber,this),this.applyPlaceholderTextIfNeeded()}disconnectedCallback(){super.disconnectedCallback(),zv.unsubscribe(this.noValuePlaceholderLabelSubscriber),Vv.unsubscribe(this.emptyPlaceholderLabelSubscriber)}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}groupHeaderValueChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){return null===this.groupHeaderValue||void 0===this.groupHeaderValue?(this.text=zv.getValueFor(this),!0):""===this.groupHeaderValue&&(this.text=Vv.getValueFor(this),!0)}}t([C],iN.prototype,"hasOverflow",void 0),t([C],iN.prototype,"text",void 0)
|
|
11754
|
+
const sN=Q`
|
|
11753
11755
|
<span
|
|
11754
11756
|
${Ag("hasOverflow")}
|
|
11755
11757
|
title="${t=>t.hasOverflow&&t.text?t.text:null}"
|
|
11756
11758
|
>
|
|
11757
11759
|
${t=>t.text}
|
|
11758
11760
|
</span>
|
|
11759
|
-
`,
|
|
11761
|
+
`,oN=Mt`
|
|
11760
11762
|
${Vs("flex")}
|
|
11761
11763
|
|
|
11762
11764
|
span {
|
|
@@ -11767,19 +11769,19 @@ const iN=Q`
|
|
|
11767
11769
|
text-overflow: ellipsis;
|
|
11768
11770
|
}
|
|
11769
11771
|
`
|
|
11770
|
-
const
|
|
11771
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11772
|
-
const
|
|
11773
|
-
function
|
|
11774
|
-
!!this.columnInternals.groupingDisabled||!t?this.columnInternals.validator.untrack("invalidCustomSortWithGrouping"):this.columnInternals.validator.track("invalidCustomSortWithGrouping")}}return ft({attribute:"sort-by-field-name"})(e.prototype,"sortByFieldName"),e}const
|
|
11775
|
-
class
|
|
11776
|
-
const uN
|
|
11777
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11778
|
-
class
|
|
11779
|
-
try{return t.format(e)}catch(t){return""}}t([ft({attribute:"field-name"})],
|
|
11780
|
-
const
|
|
11781
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11782
|
-
const
|
|
11772
|
+
const rN=class extends iN{updateText(){this.text="string"==typeof this.groupHeaderValue?this.groupHeaderValue:""}}.compose({baseName:"table-column-text-group-header-view",template:sN,styles:oN})
|
|
11773
|
+
_i.getOrCreate().withPrefix("nimble").register(rN())
|
|
11774
|
+
const aN="nimble-table-column-text-group-header-view"
|
|
11775
|
+
function lN(t){class e extends t{constructor(){super(...arguments),this.sortingDisabled=!1,this.sortDirection=mR.none}sortingDisabledChanged(){this.columnInternals.sortingDisabled=this.sortingDisabled,this.sortingDisabled?(this.columnInternals.currentSortDirection=mR.none,this.columnInternals.currentSortIndex=void 0):(this.columnInternals.currentSortDirection=this.sortDirection,this.columnInternals.currentSortIndex=this.sortIndex??void 0)}sortDirectionChanged(){this.sortingDisabled||(this.columnInternals.currentSortDirection=this.sortDirection)}sortIndexChanged(){this.sortingDisabled||(this.columnInternals.currentSortIndex=this.sortIndex??void 0)}}return ft({attribute:"sorting-disabled",mode:"boolean"})(e.prototype,"sortingDisabled"),ft({attribute:"sort-index",converter:ut})(e.prototype,"sortIndex"),ft({attribute:"sort-direction"})(e.prototype,"sortDirection"),e}function cN(t){class e extends t{constructor(){super(...arguments),this.customSortOrderColumnChangeHandler={handleChange:this.handleCustomSortOrderColumnChange.bind(this)}}getResolvedOperandDataRecordFieldName(t){return"string"==typeof this.sortByFieldName?this.sortByFieldName:t}getResolvedSortOperation(t){return"string"==typeof this.sortByFieldName?DR:t}sortByFieldNameChanged(){this.handleSortConfigurationChange(),this.updateCustomColumnSortingValidity(),"string"!=typeof this.sortByFieldName||this.customSortOrderColumnNotifier?(this.customSortOrderColumnNotifier?.unsubscribe(this.customSortOrderColumnChangeHandler),this.customSortOrderColumnNotifier=void 0):(this.customSortOrderColumnNotifier=x.getNotifier(this.columnInternals),this.customSortOrderColumnNotifier.subscribe(this.customSortOrderColumnChangeHandler))}handleCustomSortOrderColumnChange(t,e){"groupingDisabled"===e&&this.updateCustomColumnSortingValidity()}updateCustomColumnSortingValidity(){const t="string"==typeof this.sortByFieldName
|
|
11776
|
+
!!this.columnInternals.groupingDisabled||!t?this.columnInternals.validator.untrack("invalidCustomSortWithGrouping"):this.columnInternals.validator.track("invalidCustomSortWithGrouping")}}return ft({attribute:"sort-by-field-name"})(e.prototype,"sortByFieldName"),e}const dN=["invalidCustomSortWithGrouping"]
|
|
11777
|
+
class hN extends qF{constructor(){super(dN)}}class uN extends(XF(YF(JF(lN(cN(HR)))))){constructor(){super(...arguments),this.underlineHidden=!1,this.defaultSortOperation=AR}placeholderChanged(){this.updateColumnConfig()}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["label","href"],cellViewTag:"nimble-table-column-anchor-cell-view",groupHeaderViewTag:aN,delegatedEvents:["click"],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new hN}}labelFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName],this.updateColumnInternalsSortConfiguration()}hrefFieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.labelFieldName,this.hrefFieldName]}appearanceChanged(){this.updateColumnConfig()}underlineHiddenChanged(){this.updateColumnConfig()}hreflangChanged(){this.updateColumnConfig()}pingChanged(){this.updateColumnConfig()}referrerpolicyChanged(){this.updateColumnConfig()}relChanged(){this.updateColumnConfig()}targetChanged(){this.updateColumnConfig()}typeChanged(){this.updateColumnConfig()}downloadChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={appearance:this.appearance,underlineHidden:this.underlineHidden,hreflang:this.hreflang,ping:this.ping,referrerpolicy:this.referrerpolicy,rel:this.rel,target:this.target,type:this.type,download:this.download,placeholder:this.placeholder}}updateColumnInternalsSortConfiguration(){this.columnInternals.operandDataRecordFieldName=this.getResolvedOperandDataRecordFieldName(this.labelFieldName),this.columnInternals.sortOperation=this.getResolvedSortOperation(this.defaultSortOperation)}}t([ft({attribute:"label-field-name"})],uN.prototype,"labelFieldName",void 0),t([ft({attribute:"href-field-name"})],uN.prototype,"hrefFieldName",void 0),t([ft],uN.prototype,"appearance",void 0),t([ft({attribute:"underline-hidden",mode:"boolean"})],uN.prototype,"underlineHidden",void 0),t([ft],uN.prototype,"hreflang",void 0),t([ft],uN.prototype,"ping",void 0),t([ft],uN.prototype,"referrerpolicy",void 0),t([ft],uN.prototype,"rel",void 0),t([ft],uN.prototype,"target",void 0),t([ft],uN.prototype,"type",void 0),t([ft],uN.prototype,"download",void 0)
|
|
11778
|
+
const pN=uN.compose({baseName:"table-column-anchor",template:KF,styles:ZF})
|
|
11779
|
+
_i.getOrCreate().withPrefix("nimble").register(pN())
|
|
11780
|
+
class fN extends HR{fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}}function mN(t){return XF(YF(JF(lN(t))))}function gN(t,e){if("number"!=typeof e)return""
|
|
11781
|
+
try{return t.format(e)}catch(t){return""}}t([ft({attribute:"field-name"})],fN.prototype,"fieldName",void 0)
|
|
11782
|
+
const vN=class extends iN{updateText(){this.columnConfig?this.text=gN(this.columnConfig.formatter,this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-date-text-group-header-view",template:sN,styles:oN})
|
|
11783
|
+
_i.getOrCreate().withPrefix("nimble").register(vN())
|
|
11784
|
+
const bN=Q`
|
|
11783
11785
|
<template
|
|
11784
11786
|
class="
|
|
11785
11787
|
${t=>t.alignment===xR?"right-align":""}
|
|
@@ -11793,7 +11795,7 @@ const vN=Q`
|
|
|
11793
11795
|
${t=>t.text}
|
|
11794
11796
|
</span>
|
|
11795
11797
|
</template>
|
|
11796
|
-
`,
|
|
11798
|
+
`,yN=Mt`
|
|
11797
11799
|
${Vs("flex")}
|
|
11798
11800
|
|
|
11799
11801
|
:host {
|
|
@@ -11817,22 +11819,22 @@ const vN=Q`
|
|
|
11817
11819
|
color: ${Rc};
|
|
11818
11820
|
}
|
|
11819
11821
|
`
|
|
11820
|
-
class
|
|
11821
|
-
return"string"==typeof e&&null==t?(this.text=e,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}t([C],
|
|
11822
|
-
const
|
|
11823
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11824
|
-
const
|
|
11825
|
-
class
|
|
11826
|
-
class
|
|
11822
|
+
class wN extends NR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.alignment=wR,this.isPlaceholder=!1}columnConfigChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}cellRecordChanged(){this.applyPlaceholderTextIfNeeded()||this.updateText()}applyPlaceholderTextIfNeeded(){const t=this.cellRecord?.value,e=this.columnConfig?.placeholder
|
|
11823
|
+
return"string"==typeof e&&null==t?(this.text=e,this.isPlaceholder=!0):this.isPlaceholder=!1,this.isPlaceholder}}t([C],wN.prototype,"hasOverflow",void 0),t([C],wN.prototype,"text",void 0),t([C],wN.prototype,"alignment",void 0),t([C],wN.prototype,"isPlaceholder",void 0)
|
|
11824
|
+
const xN=class extends wN{updateText(){this.columnConfig?this.text=gN(this.columnConfig.formatter,this.cellRecord?.value):this.text=""}}.compose({baseName:"table-column-date-text-cell-view",template:bN,styles:yN})
|
|
11825
|
+
_i.getOrCreate().withPrefix("nimble").register(xN())
|
|
11826
|
+
const CN=void 0,kN=["invalidCustomOptionsCombination"]
|
|
11827
|
+
class SN extends qF{constructor(){super(kN)}setCustomOptionsValidity(t){this.setConditionValue("invalidCustomOptionsCombination",!t)}}const _N={toView:t=>"boolean"==typeof t?t.toString():null,fromView:t=>"true"===t||!0===t||"false"!==t&&!1!==t&&void 0}
|
|
11828
|
+
class IN extends(mN(fN)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-date-text-cell-view",groupHeaderViewTag:"nimble-table-column-date-text-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new SN}}formatChanged(){this.updateColumnConfig()}customLocaleMatcherChanged(){this.updateColumnConfig()}customWeekdayChanged(){this.updateColumnConfig()}customEraChanged(){this.updateColumnConfig()}customYearChanged(){this.updateColumnConfig()}customMonthChanged(){this.updateColumnConfig()}customDayChanged(){this.updateColumnConfig()}customHourChanged(){this.updateColumnConfig()}customMinuteChanged(){this.updateColumnConfig()}customSecondChanged(){this.updateColumnConfig()}customTimeZoneNameChanged(){this.updateColumnConfig()}customFormatMatcherChanged(){this.updateColumnConfig()}customHour12Changed(){this.updateColumnConfig()}customTimeZoneChanged(){this.updateColumnConfig()}customCalendarChanged(){this.updateColumnConfig()}customDayPeriodChanged(){this.updateColumnConfig()}customNumberingSystemChanged(){this.updateColumnConfig()}customDateStyleChanged(){this.updateColumnConfig()}customTimeStyleChanged(){this.updateColumnConfig()}customHourCycleChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.createFormatter()
|
|
11827
11829
|
if(t){const e={formatter:t,placeholder:this.placeholder}
|
|
11828
11830
|
this.columnInternals.columnConfig=e,this.columnInternals.validator.setCustomOptionsValidity(!0)}else this.columnInternals.columnConfig=void 0,this.columnInternals.validator.setCustomOptionsValidity(!1)}createFormatter(){let t
|
|
11829
|
-
t=this.format===
|
|
11830
|
-
try{return new Intl.DateTimeFormat(Ga.getValueFor(this),t)}catch(t){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}t([ft],
|
|
11831
|
-
const IN
|
|
11832
|
-
_i.getOrCreate().withPrefix("nimble").register(IN())
|
|
11833
|
-
const MN=class extends yN{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:vN,styles:bN})
|
|
11831
|
+
t=this.format===CN?{dateStyle:"medium",timeStyle:"medium"}:this.getCustomFormattingOptions()
|
|
11832
|
+
try{return new Intl.DateTimeFormat(Ga.getValueFor(this),t)}catch(t){return}}getCustomFormattingOptions(){return{localeMatcher:this.customLocaleMatcher??void 0,weekday:this.customWeekday??void 0,era:this.customEra??void 0,year:this.customYear??void 0,month:this.customMonth??void 0,day:this.customDay??void 0,hour:this.customHour??void 0,minute:this.customMinute??void 0,second:this.customSecond??void 0,timeZoneName:this.customTimeZoneName??void 0,formatMatcher:this.customFormatMatcher??void 0,hour12:this.customHour12??void 0,timeZone:this.customTimeZone??void 0,calendar:this.customCalendar??void 0,dayPeriod:this.customDayPeriod??void 0,numberingSystem:this.customNumberingSystem??void 0,dateStyle:this.customDateStyle??void 0,timeStyle:this.customTimeStyle??void 0,hourCycle:this.customHourCycle??void 0}}}t([ft],IN.prototype,"format",void 0),t([ft({attribute:"custom-locale-matcher"})],IN.prototype,"customLocaleMatcher",void 0),t([ft({attribute:"custom-weekday"})],IN.prototype,"customWeekday",void 0),t([ft({attribute:"custom-era"})],IN.prototype,"customEra",void 0),t([ft({attribute:"custom-year"})],IN.prototype,"customYear",void 0),t([ft({attribute:"custom-month"})],IN.prototype,"customMonth",void 0),t([ft({attribute:"custom-day"})],IN.prototype,"customDay",void 0),t([ft({attribute:"custom-hour"})],IN.prototype,"customHour",void 0),t([ft({attribute:"custom-minute"})],IN.prototype,"customMinute",void 0),t([ft({attribute:"custom-second"})],IN.prototype,"customSecond",void 0),t([ft({attribute:"custom-time-zone-name"})],IN.prototype,"customTimeZoneName",void 0),t([ft({attribute:"custom-format-matcher"})],IN.prototype,"customFormatMatcher",void 0),t([ft({attribute:"custom-hour12",converter:_N})],IN.prototype,"customHour12",void 0),t([ft({attribute:"custom-time-zone"})],IN.prototype,"customTimeZone",void 0),t([ft({attribute:"custom-calendar"})],IN.prototype,"customCalendar",void 0),t([ft({attribute:"custom-day-period"})],IN.prototype,"customDayPeriod",void 0),t([ft({attribute:"custom-numbering-system"})],IN.prototype,"customNumberingSystem",void 0),t([ft({attribute:"custom-date-style"})],IN.prototype,"customDateStyle",void 0),t([ft({attribute:"custom-time-style"})],IN.prototype,"customTimeStyle",void 0),t([ft({attribute:"custom-hour-cycle"})],IN.prototype,"customHourCycle",void 0)
|
|
11833
|
+
const MN=IN.compose({baseName:"table-column-date-text",template:KF,styles:ZF})
|
|
11834
11834
|
_i.getOrCreate().withPrefix("nimble").register(MN())
|
|
11835
|
-
|
|
11835
|
+
const $N=class extends wN{updateText(){this.text=this.columnConfig?.formatter.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-duration-text-cell-view",template:bN,styles:yN})
|
|
11836
|
+
_i.getOrCreate().withPrefix("nimble").register($N())
|
|
11837
|
+
class EN{constructor(t){this.lang=t,this.daysFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"day"}),this.hoursFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"hour"}),this.minutesFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"minute"}),this.secondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second"}),this.scientificSecondsFormatter=new Intl.NumberFormat(this.lang,{style:"unit",unit:"second",notation:"scientific",maximumFractionDigits:3})}format(t){if("number"!=typeof t||t<0||!Number.isFinite(t))return""
|
|
11836
11838
|
const e=[],n=1e3,i=6e4,s=36e5,o=864e5,r=t/o
|
|
11837
11839
|
let a=t
|
|
11838
11840
|
const l=Math.floor(r)
|
|
@@ -11845,37 +11847,37 @@ if(a-=d*i,d){const t=this.minutesFormatter.format(d)
|
|
|
11845
11847
|
e.push(t)}const h=a/n,u=0===h?0:h%60
|
|
11846
11848
|
if(t<1&&0!==h)return this.scientificSecondsFormatter.format(h)
|
|
11847
11849
|
if(u>=5e-4||0===u&&0===e.length){const t=this.secondsFormatter.format(u)
|
|
11848
|
-
e.push(t)}return e.join(", ")}}const
|
|
11849
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11850
|
-
class
|
|
11851
|
-
this.columnInternals.columnConfig=t}}const AN
|
|
11852
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11853
|
-
const
|
|
11850
|
+
e.push(t)}return e.join(", ")}}const DN=class extends iN{updateText(){this.columnConfig?this.text=this.columnConfig.formatter.format(this.groupHeaderValue):this.text=""}}.compose({baseName:"table-column-duration-text-group-header-view",template:sN,styles:oN})
|
|
11851
|
+
_i.getOrCreate().withPrefix("nimble").register(DN())
|
|
11852
|
+
class AN extends(mN(fN)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-duration-text-cell-view",groupHeaderViewTag:"nimble-table-column-duration-text-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new qF([])}}updateColumnConfig(){const t={formatter:new EN(Ga.getValueFor(this)),placeholder:this.placeholder}
|
|
11853
|
+
this.columnInternals.columnConfig=t}}const TN=AN.compose({baseName:"table-column-duration-text",template:KF,styles:ZF})
|
|
11854
|
+
_i.getOrCreate().withPrefix("nimble").register(TN())
|
|
11855
|
+
const ON=(t,e)=>{if("number"===e){const e=ut.fromView(t)
|
|
11854
11856
|
return null===e?void 0:e}return"boolean"===e?!1!==t&&"false"!==t&&(!0===t||"true"===t||void 0):t?.toString()??void 0}
|
|
11855
|
-
class
|
|
11856
|
-
return this.mappings.forEach((e=>{const n=
|
|
11857
|
+
class RN extends HR{constructor(){super(...arguments),this.mappingNotifiers=[],this.mappings=[],this.keyType="string"}handleChange(t,e){t instanceof Qv&&"string"==typeof e&&this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.validator.validate(this.mappings,this.keyType),this.columnInternals.columnConfig=this.checkValidity()?this.createColumnConfig(this.getMappingConfigs()):void 0}getMappingConfigs(){const t=new Map
|
|
11858
|
+
return this.mappings.forEach((e=>{const n=ON(e.key,this.keyType)
|
|
11857
11859
|
if(void 0===n)throw Error("Key was invalid for type. Validation should have prevented this.")
|
|
11858
11860
|
const i=this.createMappingConfig(e)
|
|
11859
11861
|
t.set(n,i)})),t}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}mappingsChanged(){this.updateColumnConfig(),this.observeMappings()}keyTypeChanged(){this.updateColumnConfig()}removeMappingObservers(){this.mappingNotifiers.forEach((t=>{t.unsubscribe(this)})),this.mappingNotifiers=[]}observeMappings(){this.removeMappingObservers()
|
|
11860
11862
|
for(const t of this.mappings){const e=x.getNotifier(t)
|
|
11861
|
-
e.subscribe(this),this.mappingNotifiers.push(e)}}}t([C],
|
|
11862
|
-
const
|
|
11863
|
-
${
|
|
11863
|
+
e.subscribe(this),this.mappingNotifiers.push(e)}}}t([C],RN.prototype,"mappings",void 0),t([ft({attribute:"field-name"})],RN.prototype,"fieldName",void 0),t([ft({attribute:"key-type"})],RN.prototype,"keyType",void 0)
|
|
11864
|
+
const FN=Mt`
|
|
11865
|
+
${ZF}
|
|
11864
11866
|
|
|
11865
11867
|
slot[name='mapping'] {
|
|
11866
11868
|
display: none;
|
|
11867
11869
|
}
|
|
11868
|
-
`,
|
|
11869
|
-
class
|
|
11870
|
+
`,NN=Q`${KF}<slot ${ie("mappings")} name="mapping"></slot>`
|
|
11871
|
+
class LN extends qF{constructor(t){super(t)}validate(t,e){this.untrackAll()
|
|
11870
11872
|
const n=t.map((t=>t.key))
|
|
11871
|
-
this.validateKeyValuesForType(n,e),this.validateUniqueKeys(n,e),this.validateNoMissingKeys(t)}validateKeyValuesForType(t,e){const n=t.some((t=>void 0!==t&&void 0===
|
|
11872
|
-
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>
|
|
11873
|
+
this.validateKeyValuesForType(n,e),this.validateUniqueKeys(n,e),this.validateNoMissingKeys(t)}validateKeyValuesForType(t,e){const n=t.some((t=>void 0!==t&&void 0===ON(t,e)))
|
|
11874
|
+
this.setConditionValue("invalidMappingKeyValueForType",n)}validateUniqueKeys(t,e){const n=t.map((t=>ON(t,e))),i=new Set(n).size!==n.length
|
|
11873
11875
|
this.setConditionValue("duplicateMappingKey",i)}validateNoMissingKeys(t){const e=t.some((t=>void 0===t.key))
|
|
11874
|
-
this.setConditionValue("missingKeyValue",e)}}const
|
|
11875
|
-
class
|
|
11876
|
-
this.setConditionValue("invalidIconName",e)}validateNoMissingText(t){const e=t.filter(
|
|
11877
|
-
this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(
|
|
11878
|
-
this.setConditionValue("unsupportedMappingType",!e)}}const
|
|
11876
|
+
this.setConditionValue("missingKeyValue",e)}}const BN=["invalidMappingKeyValueForType","duplicateMappingKey","missingKeyValue","unsupportedMappingType","invalidIconName","missingTextValue"]
|
|
11877
|
+
class PN extends LN{constructor(){super(BN)}static isIconMappingElement(t){return t instanceof ob}static isSupportedMappingElement(t){return t instanceof ob||t instanceof ab||t instanceof cb||t instanceof nb}validate(t,e){super.validate(t,e),this.validateMappingTypes(t),this.validateIconNames(t),this.validateNoMissingText(t)}validateIconNames(t){const e=t.filter(PN.isIconMappingElement).some((t=>void 0===t.resolvedIcon))
|
|
11878
|
+
this.setConditionValue("invalidIconName",e)}validateNoMissingText(t){const e=t.filter(PN.isSupportedMappingElement).some((t=>void 0===t.text))
|
|
11879
|
+
this.setConditionValue("missingTextValue",e)}validateMappingTypes(t){const e=t.every(PN.isSupportedMappingElement)
|
|
11880
|
+
this.setConditionValue("unsupportedMappingType",!e)}}const zN=Mt`
|
|
11879
11881
|
${Vs("inline-flex")}
|
|
11880
11882
|
|
|
11881
11883
|
:host {
|
|
@@ -11897,7 +11899,7 @@ this.setConditionValue("unsupportedMappingType",!e)}}const PN=Mt`
|
|
|
11897
11899
|
overflow: hidden;
|
|
11898
11900
|
text-overflow: ellipsis;
|
|
11899
11901
|
}
|
|
11900
|
-
`,
|
|
11902
|
+
`,VN=Q`
|
|
11901
11903
|
${Gt((t=>t.visualizationTemplate),Q`
|
|
11902
11904
|
<span class="reserve-icon-size">
|
|
11903
11905
|
${t=>t.visualizationTemplate}
|
|
@@ -11908,8 +11910,8 @@ this.setConditionValue("unsupportedMappingType",!e)}}const PN=Mt`
|
|
|
11908
11910
|
title="${t=>t.hasOverflow&&t.text?t.text:null}"
|
|
11909
11911
|
class="text"
|
|
11910
11912
|
>${t=>t.text}</span>
|
|
11911
|
-
`,
|
|
11912
|
-
class
|
|
11913
|
+
`,HN={default:void 0,error:"error",warning:"warning",success:"success",information:"information"}
|
|
11914
|
+
class UN{constructor(t){this.text=t}}class qN extends UN{constructor(t,e,n,i){var s
|
|
11913
11915
|
super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
|
|
11914
11916
|
<${s=t}
|
|
11915
11917
|
title="${t=>t.textHidden?t.text:""}"
|
|
@@ -11919,7 +11921,7 @@ super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
|
|
|
11919
11921
|
severity="${t=>t.severity}"
|
|
11920
11922
|
>
|
|
11921
11923
|
</${s}>
|
|
11922
|
-
`}}const
|
|
11924
|
+
`}}const jN=Q`
|
|
11923
11925
|
<${YT}
|
|
11924
11926
|
title="${t=>t.textHidden?t.text:""}"
|
|
11925
11927
|
aria-label="${t=>t.text}"
|
|
@@ -11927,12 +11929,12 @@ super(n),this.severity=e,this.textHidden=i,this.iconTemplate=Q`
|
|
|
11927
11929
|
>
|
|
11928
11930
|
</${YT}>
|
|
11929
11931
|
`
|
|
11930
|
-
class
|
|
11932
|
+
class WN extends UN{constructor(t,e){super(t),this.textHidden=e,this.spinnerTemplate=jN}}class GN extends UN{}class ZN extends UN{}class KN extends RR{constructor(){super(...arguments),this.hasOverflow=!1,this.text="",this.textHidden=!1}columnConfigChanged(){this.updateState()}groupHeaderValueChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig)return
|
|
11931
11933
|
const t=this.groupHeaderValue,e=this.columnConfig.mappingConfigs.get(t)
|
|
11932
|
-
e instanceof
|
|
11933
|
-
const KN
|
|
11934
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11935
|
-
const
|
|
11934
|
+
e instanceof qN?(this.severity=e.severity,this.text=e.text??"",this.visualizationTemplate=e.iconTemplate):e instanceof WN?(this.text=e.text??"",this.visualizationTemplate=e.spinnerTemplate):(e instanceof GN||e instanceof ZN)&&(this.text=e.text??"")}resetState(){this.text="",this.visualizationTemplate=void 0,this.severity=HN.default}}t([C],KN.prototype,"hasOverflow",void 0),t([C],KN.prototype,"text",void 0),t([C],KN.prototype,"severity",void 0),t([C],KN.prototype,"visualizationTemplate",void 0)
|
|
11935
|
+
const YN=KN.compose({baseName:"table-column-mapping-group-header-view",template:VN,styles:zN})
|
|
11936
|
+
_i.getOrCreate().withPrefix("nimble").register(YN())
|
|
11937
|
+
const XN=Mt`
|
|
11936
11938
|
${Vs("inline-flex")}
|
|
11937
11939
|
|
|
11938
11940
|
:host {
|
|
@@ -11954,7 +11956,7 @@ const YN=Mt`
|
|
|
11954
11956
|
overflow: hidden;
|
|
11955
11957
|
text-overflow: ellipsis;
|
|
11956
11958
|
}
|
|
11957
|
-
`,
|
|
11959
|
+
`,JN=Q`
|
|
11958
11960
|
${Gt((t=>t.visualizationTemplate),Q`
|
|
11959
11961
|
<span class="reserve-icon-size">
|
|
11960
11962
|
${t=>t.visualizationTemplate}
|
|
@@ -11970,26 +11972,26 @@ const YN=Mt`
|
|
|
11970
11972
|
</span>
|
|
11971
11973
|
`)}
|
|
11972
11974
|
`
|
|
11973
|
-
class
|
|
11975
|
+
class QN extends NR{constructor(){super(...arguments),this.textHidden=!1,this.hasOverflow=!1}columnConfigChanged(){this.updateState()}cellRecordChanged(){this.updateState()}updateState(){if(this.resetState(),!this.columnConfig||!this.cellRecord)return
|
|
11974
11976
|
const t=this.cellRecord.value
|
|
11975
11977
|
if(null==t)return
|
|
11976
11978
|
const e=this.columnConfig.mappingConfigs.get(t)
|
|
11977
|
-
e instanceof
|
|
11978
|
-
const QN
|
|
11979
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11980
|
-
const
|
|
11981
|
-
class
|
|
11982
|
-
return new
|
|
11983
|
-
if(t instanceof cb)return new
|
|
11984
|
-
if(t instanceof nb)return new
|
|
11985
|
-
throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===
|
|
11986
|
-
const nL
|
|
11987
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
11988
|
-
const
|
|
11979
|
+
e instanceof qN?(this.severity=e.severity,this.text=e.text,this.visualizationTemplate=e.iconTemplate,this.textHidden=e.textHidden):e instanceof WN?(this.text=e.text,this.visualizationTemplate=e.spinnerTemplate,this.textHidden=e.textHidden):e instanceof GN?(this.text=e.text,this.textHidden=!1):e instanceof ZN&&(this.text=e.text,this.textHidden=!0)}resetState(){this.text=void 0,this.textHidden=!1,this.visualizationTemplate=void 0,this.severity=HN.default}}t([C],QN.prototype,"severity",void 0),t([C],QN.prototype,"text",void 0),t([C],QN.prototype,"visualizationTemplate",void 0),t([C],QN.prototype,"textHidden",void 0),t([C],QN.prototype,"hasOverflow",void 0)
|
|
11980
|
+
const tL=QN.compose({baseName:"table-column-mapping-cell-view",template:JN,styles:XN})
|
|
11981
|
+
_i.getOrCreate().withPrefix("nimble").register(tL())
|
|
11982
|
+
const eL="icon-size"
|
|
11983
|
+
class nL extends(XF(YF(lN(RN)))){minPixelWidthChanged(){this.widthMode!==eL&&(this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-mapping-cell-view",groupHeaderViewTag:"nimble-table-column-mapping-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new PN}}createColumnConfig(t){return{mappingConfigs:t}}createMappingConfig(t){if(t instanceof ob){if(!t.resolvedIcon)throw Error("Unresolved icon")
|
|
11984
|
+
return new qN(t.resolvedIcon,t.severity,t.text,t.textHidden)}if(t instanceof ab)return new WN(t.text,t.textHidden)
|
|
11985
|
+
if(t instanceof cb)return new GN(t.text)
|
|
11986
|
+
if(t instanceof nb)return new ZN(t.text)
|
|
11987
|
+
throw new Error("Unsupported mapping")}widthModeChanged(){this.widthMode===eL?(this.columnInternals.resizingDisabled=!0,this.columnInternals.hideHeaderIndicators=!0,this.columnInternals.pixelWidth=32,this.columnInternals.minPixelWidth=32):(this.columnInternals.resizingDisabled=!1,this.columnInternals.hideHeaderIndicators=!1,this.columnInternals.pixelWidth=void 0,this.columnInternals.minPixelWidth=this.getConfiguredMinPixelWidth())}getConfiguredMinPixelWidth(){return"number"==typeof this.minPixelWidth?this.minPixelWidth:TR}}t([ft({attribute:"width-mode"})],nL.prototype,"widthMode",void 0)
|
|
11988
|
+
const iL=nL.compose({baseName:"table-column-mapping",template:NN,styles:FN})
|
|
11989
|
+
_i.getOrCreate().withPrefix("nimble").register(iL())
|
|
11990
|
+
const sL=Q`
|
|
11989
11991
|
<template @delegated-event="${(t,e)=>t.onDelegatedEvent(e.event)}"
|
|
11990
|
-
>${
|
|
11992
|
+
>${KF}</template
|
|
11991
11993
|
>
|
|
11992
|
-
`,
|
|
11994
|
+
`,oL="menu-button-menu",rL=Q`
|
|
11993
11995
|
${Gt((t=>t.showMenuButton),Q`
|
|
11994
11996
|
<${bb}
|
|
11995
11997
|
${Ut("menuButton")}
|
|
@@ -12003,10 +12005,10 @@ const iL=Q`
|
|
|
12003
12005
|
<span ${Ut("valueSpan")} class="value-label">${t=>t.cellRecord.value}</span>
|
|
12004
12006
|
<${xg} slot="end"></${xg}>
|
|
12005
12007
|
|
|
12006
|
-
<slot name="${
|
|
12008
|
+
<slot name="${oL}" slot="menu"></slot>
|
|
12007
12009
|
</${bb}>
|
|
12008
12010
|
`)}
|
|
12009
|
-
`,
|
|
12011
|
+
`,aL=Mt`
|
|
12010
12012
|
:host {
|
|
12011
12013
|
align-self: center;
|
|
12012
12014
|
width: 100%;
|
|
@@ -12024,18 +12026,18 @@ const iL=Q`
|
|
|
12024
12026
|
white-space: nowrap;
|
|
12025
12027
|
}
|
|
12026
12028
|
`
|
|
12027
|
-
class
|
|
12028
|
-
if(e&&t.detail.newState){const t={slots:[{name:e,slot:
|
|
12029
|
-
this.$emit("cell-view-slots-request",t)}return!0}onMenuButtonMouseOver(){this.valueSpan&&(this.hasOverflow=this.valueSpan.offsetWidth<this.valueSpan.scrollWidth)}onMenuButtonMouseOut(){this.hasOverflow=!1}onMenuButtonClick(t){t.stopPropagation()}}t([C],
|
|
12030
|
-
const lL
|
|
12031
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12032
|
-
class
|
|
12029
|
+
class lL extends NR{constructor(){super(...arguments),this.hasOverflow=!1}get showMenuButton(){return!!this.cellRecord?.value}get tabbableChildren(){return this.showMenuButton?[this.menuButton]:[]}onMenuButtonBeforeToggle(t){const e=this.columnConfig?.menuSlot
|
|
12030
|
+
if(e&&t.detail.newState){const t={slots:[{name:e,slot:oL}]}
|
|
12031
|
+
this.$emit("cell-view-slots-request",t)}return!0}onMenuButtonMouseOver(){this.valueSpan&&(this.hasOverflow=this.valueSpan.offsetWidth<this.valueSpan.scrollWidth)}onMenuButtonMouseOut(){this.hasOverflow=!1}onMenuButtonClick(t){t.stopPropagation()}}t([C],lL.prototype,"hasOverflow",void 0),t([k],lL.prototype,"showMenuButton",null)
|
|
12032
|
+
const cL=lL.compose({baseName:"table-column-menu-button-cell-view",template:rL,styles:aL})
|
|
12033
|
+
_i.getOrCreate().withPrefix("nimble").register(cL())
|
|
12034
|
+
class dL extends(YF(HR)){onDelegatedEvent(t){t.stopImmediatePropagation()
|
|
12033
12035
|
const e=t,n=e.detail.originalEvent
|
|
12034
12036
|
if("beforetoggle"===n.type||"toggle"===n.type){const t=`menu-button-column-${n.type}`,i={...n.detail,recordId:e.detail.recordId}
|
|
12035
|
-
this.$emit(t,i)}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-menu-button-cell-view",delegatedEvents:["beforetoggle","toggle"],slotNames:[
|
|
12036
|
-
const dL
|
|
12037
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12038
|
-
const
|
|
12037
|
+
this.$emit(t,i)}}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-menu-button-cell-view",delegatedEvents:["beforetoggle","toggle"],slotNames:[oL],validator:new qF([])}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.columnInternals.operandDataRecordFieldName=this.fieldName}menuSlotChanged(){this.updateColumnConfig()}updateColumnConfig(){this.columnInternals.columnConfig={menuSlot:this.menuSlot}}}t([ft({attribute:"field-name"})],dL.prototype,"fieldName",void 0),t([ft({attribute:"menu-slot"})],dL.prototype,"menuSlot",void 0)
|
|
12038
|
+
const hL=dL.compose({baseName:"table-column-menu-button",template:sL,styles:ZF})
|
|
12039
|
+
_i.getOrCreate().withPrefix("nimble").register(hL())
|
|
12040
|
+
const uL=Q`<span
|
|
12039
12041
|
${Ag("hasOverflow")}
|
|
12040
12042
|
class="header-content"
|
|
12041
12043
|
title=${t=>t.hasOverflow&&t.headerTextContent?t.headerTextContent:null}
|
|
@@ -12043,13 +12045,13 @@ const hL=Q`<span
|
|
|
12043
12045
|
<slot ${Ut("contentSlot")}></slot>
|
|
12044
12046
|
<slot ${ie({property:"unitElements",filter:te()})} name="unit"></slot>
|
|
12045
12047
|
</span>`
|
|
12046
|
-
const
|
|
12047
|
-
_i.getOrCreate().withPrefix("nimble").register(uL())
|
|
12048
|
-
const pL=class extends yN{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??wR}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:vN,styles:bN})
|
|
12048
|
+
const pL=class extends iN{updateText(){this.text=this.columnConfig?.formatter?.format(this.groupHeaderValue)??""}}.compose({baseName:"table-column-number-text-group-header-view",template:sN,styles:oN})
|
|
12049
12049
|
_i.getOrCreate().withPrefix("nimble").register(pL())
|
|
12050
|
-
const fL={
|
|
12051
|
-
|
|
12052
|
-
|
|
12050
|
+
const fL=class extends wN{columnConfigChanged(){super.columnConfigChanged(),this.alignment=this.columnConfig?.alignment??wR}updateText(){this.text=this.columnConfig?.formatter?.format(this.cellRecord?.value)??""}}.compose({baseName:"table-column-number-text-cell-view",template:bN,styles:yN})
|
|
12051
|
+
_i.getOrCreate().withPrefix("nimble").register(fL())
|
|
12052
|
+
const mL={default:void 0,decimal:"decimal"},gL="left",vL="right"
|
|
12053
|
+
class bL{format(t){if("number"!=typeof t)return""
|
|
12054
|
+
try{return this.tryFormat(t)}catch{return""}}}class yL{constructor(t){this.locale=t.locale,this.intlNumberFormatOptions=t.intlNumberFormatOptions}}class wL extends yL{constructor(t,e){super(t),this.formatter=new Intl.NumberFormat(this.locale,{...e,...this.intlNumberFormatOptions})}static createFactory(t){return e=>new wL(e,t)}format(t){return this.formatter.format(t)}}class xL{constructor(t,e){this.scaleFactor=t,this.scaledUnitFormatFactory=e}isBase(){return 1===this.scaleFactor}}class CL{constructor(t){this.supportedScaledUnits=t
|
|
12053
12055
|
const e=t.every(((t,e,n)=>0===e||n[e-1].scaleFactor<t.scaleFactor))
|
|
12054
12056
|
if(!e)throw new Error("Supported scaled units must have unique and ordered scale factors")
|
|
12055
12057
|
const n=t.find((t=>t.isBase()))
|
|
@@ -12058,40 +12060,40 @@ this.supportedScaledUnits=t,this.baseScaledUnit=n}scaleNumber(t){const e=Math.ab
|
|
|
12058
12060
|
if(1===this.supportedScaledUnits.length||0===e||e===1/0||Number.isNaN(e))return{scaledValue:t,scaledUnit:this.baseScaledUnit}
|
|
12059
12061
|
for(let n=this.supportedScaledUnits.length-1;n>=0;n-=1){const i=this.supportedScaledUnits[n]
|
|
12060
12062
|
if(e/i.scaleFactor>=1)return{scaledValue:t/i.scaleFactor,scaledUnit:i}}const n=this.supportedScaledUnits[0]
|
|
12061
|
-
return{scaledValue:t/n.scaleFactor,scaledUnit:n}}}const
|
|
12062
|
-
class
|
|
12063
|
+
return{scaledValue:t/n.scaleFactor,scaledUnit:n}}}const kL=new class extends CL{constructor(){super([new xL(1,wL.createFactory({}))])}},SL="negative"
|
|
12064
|
+
class _L extends bL{constructor(t,{unitScale:e=kL}={unitScale:kL}){super(),this.defaultIntlNumberFormatOptions={maximumSignificantDigits:_L.maximumDigits,maximumFractionDigits:_L.maximumDigits-1,roundingPriority:"lessPrecision",signDisplay:SL},this.defaultScaledUnitFormatters=new Map,this.exponentialIntlNumberFormatOptions={maximumSignificantDigits:_L.maximumDigits,notation:"scientific",signDisplay:SL}
|
|
12063
12065
|
for(const n of e.supportedScaledUnits)this.defaultScaledUnitFormatters.set(n.scaleFactor,n.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:this.defaultIntlNumberFormatOptions}))
|
|
12064
12066
|
this.exponentialScaledUnitFormatter=e.baseScaledUnit.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:this.exponentialIntlNumberFormatOptions}),this.unitScale=e}resolvedOptions(){return{unitScale:this.unitScale}}tryFormat(t){const{scaledValue:e,scaledUnit:n}=this.unitScale.scaleNumber(t),i=Math.abs(e)
|
|
12065
|
-
return 0!==i&&(i>=
|
|
12066
|
-
class
|
|
12067
|
+
return 0!==i&&(i>=_L.exponentialUpperBound||i<_L.exponentialLowerBound)?this.exponentialScaledUnitFormatter.format(t):this.defaultScaledUnitFormatters.get(n.scaleFactor).format(e)}}_L.maximumDigits=6,_L.exponentialLowerBound=995e-6,_L.exponentialUpperBound=999999.5
|
|
12068
|
+
class IL extends bL{constructor(t,{minimumFractionDigits:e=0,maximumFractionDigits:n=Math.max(3,e),unitScale:i=kL}={minimumFractionDigits:0,maximumFractionDigits:3,unitScale:kL}){super(),this.scaledUnitFormatters=new Map
|
|
12067
12069
|
const s={maximumFractionDigits:n,minimumFractionDigits:e,signDisplay:"negative"}
|
|
12068
12070
|
for(const e of i.supportedScaledUnits)this.scaledUnitFormatters.set(e.scaleFactor,e.scaledUnitFormatFactory({locale:t,intlNumberFormatOptions:s}))
|
|
12069
12071
|
this.unitScale=i,this.minimumFractionDigits=e,this.maximumFractionDigits=n}resolvedOptions(){return{unitScale:this.unitScale,maximumFractionDigits:this.maximumFractionDigits,minimumFractionDigits:this.minimumFractionDigits}}tryFormat(t){const{scaledValue:e,scaledUnit:n}=this.unitScale.scaleNumber(t)
|
|
12070
|
-
return this.scaledUnitFormatters.get(n.scaleFactor).format(e)}}class
|
|
12072
|
+
return this.scaledUnitFormatters.get(n.scaleFactor).format(e)}}class ML extends bL{constructor(t,e){super(),this._resolvedOptions=this.resolveOptions(e),this.resolvedUnitFormat=this.resolveUnitFormat(t,this._resolvedOptions)}resolvedOptions(){return{...this._resolvedOptions}}optionsMatch(t){const e=this.resolveOptions(t)
|
|
12071
12073
|
return this._resolvedOptions.decimalDigits===e.decimalDigits&&this._resolvedOptions.decimalMaximumDigits===e.decimalMaximumDigits&&this._resolvedOptions.numberTextFormat===e.numberTextFormat&&this._resolvedOptions.unitScale===e.unitScale}tryFormat(t){return this.resolvedUnitFormat.format(t)}resolveUnitFormat(t,e){const{numberTextFormat:n,decimalMaximumDigits:i,decimalDigits:s,unitScale:o}=e
|
|
12072
|
-
return n===
|
|
12074
|
+
return n===mL.default?new _L(t,{unitScale:o}):new IL(t,"number"==typeof s?{minimumFractionDigits:s,maximumFractionDigits:s,unitScale:o}:{minimumFractionDigits:0,maximumFractionDigits:i,unitScale:o})}resolveOptions(t){if(!t||t.numberTextFormat===mL.default)return{numberTextFormat:mL.default,decimalDigits:void 0,decimalMaximumDigits:void 0,unitScale:t?.unitScale??kL}
|
|
12073
12075
|
const e="number"==typeof t.decimalDigits,n="number"==typeof t.decimalMaximumDigits
|
|
12074
12076
|
if(e&&n)throw new Error("decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.")
|
|
12075
|
-
return e||n?{numberTextFormat:
|
|
12076
|
-
const
|
|
12077
|
-
class
|
|
12078
|
-
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===
|
|
12079
|
-
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===
|
|
12077
|
+
return e||n?{numberTextFormat:mL.decimal,decimalDigits:t.decimalDigits,decimalMaximumDigits:t.decimalMaximumDigits,unitScale:t.unitScale??kL}:{numberTextFormat:mL.decimal,decimalDigits:ML.defaultDecimalDigits,decimalMaximumDigits:void 0,unitScale:t.unitScale??kL}}}ML.defaultDecimalDigits=2
|
|
12078
|
+
const $L=["invalidDecimalDigits","invalidDecimalMaximumDigits","decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits","moreThanOneUnitSpecified"]
|
|
12079
|
+
class EL extends qF{constructor(){super($L)}validateDecimalDigits(t,e){const n=!!(t===mL.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
|
|
12080
|
+
this.setConditionValue("invalidDecimalDigits",n)}validateDecimalMaximumDigits(t,e){const n=!!(t===mL.decimal&&"number"==typeof e)&&this.isInvalidDecimalDigitsValue(e)
|
|
12081
|
+
this.setConditionValue("invalidDecimalMaximumDigits",n)}validateNoMutuallyExclusiveProperties(t,e,n){const i=!!(t===mL.decimal)&&("number"==typeof e&&"number"==typeof n)
|
|
12080
12082
|
this.setConditionValue("decimalDigitsMutuallyExclusiveWithDecimalMaximumDigits",i)}validateAtMostOneUnit(t){const e=t.length>1
|
|
12081
|
-
this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class
|
|
12082
|
-
class
|
|
12083
|
-
t.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=t}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await BE(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof
|
|
12083
|
+
this.setConditionValue("moreThanOneUnitSpecified",e)}isInvalidDecimalDigitsValue(t){return t<0||t>20}}class DL extends We{}t([C],DL.prototype,"resolvedUnitScale",void 0)
|
|
12084
|
+
class AL extends(mN(fN)){constructor(){super(...arguments),this.langSubscriber={handleChange:()=>{this.updateColumnConfig()}},this.unitSubscriber={handleChange:()=>{this.updateColumnConfig()}}}connectedCallback(){super.connectedCallback(),Ga.subscribe(this.langSubscriber,this),this.updateColumnConfig()}disconnectedCallback(){super.disconnectedCallback(),Ga.unsubscribe(this.langSubscriber,this)}placeholderChanged(){this.updateColumnConfig()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-number-text-cell-view",groupHeaderViewTag:"nimble-table-column-number-text-group-header-view",delegatedEvents:[],sortOperation:DR,validator:new EL}}updateUnitNotifier(){if(this.unitNotifier&&(this.unitNotifier.unsubscribe(this.unitSubscriber),this.unitNotifier=void 0),this.unit){const t=x.getNotifier(this.unit)
|
|
12085
|
+
t.subscribe(this.unitSubscriber,"resolvedUnitScale"),this.unitNotifier=t}}formatChanged(){this.updateColumnConfig()}alignmentChanged(){this.updateColumnConfig()}decimalDigitsChanged(){this.updateColumnConfig()}decimalMaximumDigitsChanged(){this.updateColumnConfig()}unitElementsChanged(){this.updateUnit()}async updateUnit(){this.unit=void 0,this.unitElements&&(await BE(this.unitElements),this.unit=this.unitElements.find((t=>t instanceof DL))),this.updateUnitNotifier()}unitChanged(){this.updateColumnConfig()}updateColumnConfig(){const t=this.columnInternals.validator
|
|
12084
12086
|
if(t.validateDecimalDigits(this.format,this.decimalDigits),t.validateDecimalMaximumDigits(this.format,this.decimalMaximumDigits),t.validateNoMutuallyExclusiveProperties(this.format,this.decimalDigits,this.decimalMaximumDigits),t.validateAtMostOneUnit(this.unitElements??[]),t.isValid()){const t={formatter:this.createFormatter(),alignment:this.determineCellContentAlignment(),placeholder:this.placeholder}
|
|
12085
12087
|
this.columnInternals.headerAlignment=t.alignment,this.columnInternals.columnConfig=t}else this.columnInternals.columnConfig=void 0}createFormatter(){const t=this.unit?.resolvedUnitScale
|
|
12086
|
-
return new
|
|
12087
|
-
const AL
|
|
12088
|
-
_i.getOrCreate().withPrefix("nimble").register(AL())
|
|
12089
|
-
const TL=class extends yN{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:vN,styles:bN})
|
|
12088
|
+
return new ML(Ga.getValueFor(this),{numberTextFormat:this.format??void 0,decimalDigits:this.decimalDigits??void 0,decimalMaximumDigits:this.decimalMaximumDigits??void 0,unitScale:t})}determineCellContentAlignment(){return this.alignment===gL?wR:this.alignment===vL?xR:this.format!==mL.decimal||"number"==typeof this.decimalMaximumDigits||this.unit?wR:xR}}t([ft],AL.prototype,"format",void 0),t([ft],AL.prototype,"alignment",void 0),t([ft({attribute:"decimal-digits",converter:ut})],AL.prototype,"decimalDigits",void 0),t([ft({attribute:"decimal-maximum-digits",converter:ut})],AL.prototype,"decimalMaximumDigits",void 0),t([C],AL.prototype,"unitElements",void 0),t([C],AL.prototype,"unit",void 0)
|
|
12089
|
+
const TL=AL.compose({baseName:"table-column-number-text",template:uL,styles:ZF})
|
|
12090
12090
|
_i.getOrCreate().withPrefix("nimble").register(TL())
|
|
12091
|
-
const OL=
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
const LL=
|
|
12091
|
+
const OL=class extends wN{updateText(){this.text="string"==typeof this.cellRecord?.value?this.cellRecord.value:""}}.compose({baseName:"table-column-text-cell-view",template:bN,styles:yN})
|
|
12092
|
+
_i.getOrCreate().withPrefix("nimble").register(OL())
|
|
12093
|
+
const RL=["invalidCustomSortWithGrouping"]
|
|
12094
|
+
class FL extends qF{constructor(){super(RL)}}class NL extends(cN(mN(fN))){constructor(){super(...arguments),this.defaultSortOperation=AR}placeholderChanged(){this.columnInternals.columnConfig={placeholder:this.placeholder}}handleSortConfigurationChange(){this.updateColumnInternalsSortConfiguration()}getColumnInternalsOptions(){return{cellRecordFieldNames:["value"],cellViewTag:"nimble-table-column-text-cell-view",groupHeaderViewTag:aN,delegatedEvents:[],sortOperation:this.getResolvedSortOperation(this.defaultSortOperation),validator:new FL}}fieldNameChanged(){this.columnInternals.dataRecordFieldNames=[this.fieldName],this.updateColumnInternalsSortConfiguration()}updateColumnInternalsSortConfiguration(){this.columnInternals.operandDataRecordFieldName=this.getResolvedOperandDataRecordFieldName(this.fieldName),this.columnInternals.sortOperation=this.getResolvedSortOperation(this.defaultSortOperation)}}const LL=NL.compose({baseName:"table-column-text",template:KF,styles:ZF})
|
|
12095
|
+
_i.getOrCreate().withPrefix("nimble").register(LL())
|
|
12096
|
+
const BL=Mt`
|
|
12095
12097
|
${Vs("grid")}
|
|
12096
12098
|
|
|
12097
12099
|
:host {
|
|
@@ -12118,7 +12120,7 @@ const LL=Mt`
|
|
|
12118
12120
|
overflow: auto;
|
|
12119
12121
|
}
|
|
12120
12122
|
`
|
|
12121
|
-
const
|
|
12123
|
+
const PL=class extends us{constructor(){super(),this.activeindicator=!1}}.compose({baseName:"tabs",baseClass:us,template:(t,e)=>Q`
|
|
12122
12124
|
<template class="${t=>t.orientation}">
|
|
12123
12125
|
${le(0,e)}
|
|
12124
12126
|
<div class="tablist" part="tablist" role="tablist">
|
|
@@ -12137,9 +12139,9 @@ const BL=class extends us{constructor(){super(),this.activeindicator=!1}}.compos
|
|
|
12137
12139
|
<slot name="tabpanel" ${ie("tabpanels")}></slot>
|
|
12138
12140
|
</div>
|
|
12139
12141
|
</template>
|
|
12140
|
-
`,styles:
|
|
12141
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12142
|
-
const
|
|
12142
|
+
`,styles:BL})
|
|
12143
|
+
_i.getOrCreate().withPrefix("nimble").register(PL())
|
|
12144
|
+
const zL=Mt`
|
|
12143
12145
|
${Vs("flex")}
|
|
12144
12146
|
|
|
12145
12147
|
:host {
|
|
@@ -12156,15 +12158,15 @@ const PL=Mt`
|
|
|
12156
12158
|
rgba(${rl}, 0.3);
|
|
12157
12159
|
margin: ${Sl} ${_l};
|
|
12158
12160
|
}
|
|
12159
|
-
`,
|
|
12161
|
+
`,VL=Q`
|
|
12160
12162
|
<template slot="end">
|
|
12161
12163
|
<div class="separator"></div>
|
|
12162
12164
|
<slot></slot>
|
|
12163
12165
|
</template>
|
|
12164
12166
|
`
|
|
12165
|
-
const
|
|
12166
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12167
|
-
const
|
|
12167
|
+
const HL=class extends We{}.compose({baseName:"tabs-toolbar",template:VL,styles:zL})
|
|
12168
|
+
_i.getOrCreate().withPrefix("nimble").register(HL())
|
|
12169
|
+
const UL="outline",qL="block",jL=Mt`
|
|
12168
12170
|
${Vs("inline-flex")}
|
|
12169
12171
|
${Mg}
|
|
12170
12172
|
|
|
@@ -12303,12 +12305,12 @@ const HL="outline",UL="block",qL=Mt`
|
|
|
12303
12305
|
top: ${_l};
|
|
12304
12306
|
right: var(--ni-private-scrollbar-width);
|
|
12305
12307
|
}
|
|
12306
|
-
`.withBehaviors(ch(
|
|
12308
|
+
`.withBehaviors(ch(UL,Mt`
|
|
12307
12309
|
.control {
|
|
12308
12310
|
border-color: rgba(${rl}, 0.3);
|
|
12309
12311
|
background-color: transparent;
|
|
12310
12312
|
}
|
|
12311
|
-
`),ch(
|
|
12313
|
+
`),ch(qL,Mt`
|
|
12312
12314
|
.control {
|
|
12313
12315
|
background-color: rgba(${rl}, 0.1);
|
|
12314
12316
|
}
|
|
@@ -12326,8 +12328,8 @@ const HL="outline",UL="block",qL=Mt`
|
|
|
12326
12328
|
border-bottom-color: ${al};
|
|
12327
12329
|
}
|
|
12328
12330
|
`))
|
|
12329
|
-
class
|
|
12330
|
-
const WL
|
|
12331
|
+
class WL extends gs{constructor(){super(...arguments),this.appearance=UL,this.errorVisible=!1,this.scrollbarWidth=-1,this.updateScrollbarWidthQueued=!1}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.onResize())),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}onTextAreaInput(){this.handleTextInput(),this.queueUpdateScrollbarWidth()}placeholderChanged(){this.queueUpdateScrollbarWidth()}valueChanged(t,e){super.valueChanged(t,e),this.queueUpdateScrollbarWidth()}onResize(){this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}queueUpdateScrollbarWidth(){this.$fastController.isConnected&&(this.updateScrollbarWidthQueued||(this.updateScrollbarWidthQueued=!0,b.queueUpdate((()=>this.updateScrollbarWidth()))))}updateScrollbarWidth(){this.updateScrollbarWidthQueued=!1,this.scrollbarWidth=this.control.offsetWidth-this.control.clientWidth}}t([ft],WL.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],WL.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],WL.prototype,"errorVisible",void 0),t([C],WL.prototype,"scrollbarWidth",void 0)
|
|
12332
|
+
const GL=WL.compose({baseName:"text-area",baseClass:gs,template:()=>Q`
|
|
12331
12333
|
<label
|
|
12332
12334
|
part="label"
|
|
12333
12335
|
for="control"
|
|
@@ -12384,9 +12386,9 @@ const WL=jL.compose({baseName:"text-area",baseClass:gs,template:()=>Q`
|
|
|
12384
12386
|
></${Em}>
|
|
12385
12387
|
${wg}
|
|
12386
12388
|
</div>
|
|
12387
|
-
`,styles:
|
|
12388
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12389
|
-
const
|
|
12389
|
+
`,styles:jL,shadowOptions:{delegatesFocus:!0}})
|
|
12390
|
+
_i.getOrCreate().withPrefix("nimble").register(GL())
|
|
12391
|
+
const ZL="underline",KL="outline",YL="block",XL="frameless",JL=Mt`
|
|
12390
12392
|
${Vs("inline-block")}
|
|
12391
12393
|
${Mg}
|
|
12392
12394
|
|
|
@@ -12561,12 +12563,12 @@ const GL="underline",ZL="outline",KL="block",YL="frameless",XL=Mt`
|
|
|
12561
12563
|
slot[name='actions']::slotted(*) {
|
|
12562
12564
|
${Cl.cssCustomProperty}: 24px;
|
|
12563
12565
|
}
|
|
12564
|
-
`.withBehaviors(ch(
|
|
12566
|
+
`.withBehaviors(ch(ZL,Mt`
|
|
12565
12567
|
.root {
|
|
12566
12568
|
border-bottom-width: ${$l};
|
|
12567
12569
|
padding-bottom: 0;
|
|
12568
12570
|
}
|
|
12569
|
-
`),ch(
|
|
12571
|
+
`),ch(YL,Mt`
|
|
12570
12572
|
.root {
|
|
12571
12573
|
background-color: rgba(${rl}, 0.1);
|
|
12572
12574
|
}
|
|
@@ -12594,12 +12596,12 @@ const GL="underline",ZL="outline",KL="block",YL="frameless",XL=Mt`
|
|
|
12594
12596
|
:host([disabled]) .root {
|
|
12595
12597
|
background-color: rgba(${rl}, 0.07);
|
|
12596
12598
|
}
|
|
12597
|
-
`),ch(
|
|
12599
|
+
`),ch(KL,Mt`
|
|
12598
12600
|
.root {
|
|
12599
12601
|
border-width: ${$l};
|
|
12600
12602
|
padding: 0;
|
|
12601
12603
|
}
|
|
12602
|
-
`),ch(
|
|
12604
|
+
`),ch(XL,Mt`
|
|
12603
12605
|
.control {
|
|
12604
12606
|
padding-left: ${$l};
|
|
12605
12607
|
padding-right: ${$l};
|
|
@@ -12617,8 +12619,8 @@ const GL="underline",ZL="outline",KL="block",YL="frameless",XL=Mt`
|
|
|
12617
12619
|
filter: invert(100%);
|
|
12618
12620
|
}
|
|
12619
12621
|
`))
|
|
12620
|
-
class
|
|
12621
|
-
const QL
|
|
12622
|
+
class QL extends ji{constructor(){super(...arguments),this.appearance=ZL,this.errorVisible=!1,this.fullBleed=!1}}t([ft],QL.prototype,"appearance",void 0),t([ft({attribute:"error-text"})],QL.prototype,"errorText",void 0),t([ft({attribute:"error-visible",mode:"boolean"})],QL.prototype,"errorVisible",void 0),t([ft({attribute:"full-bleed",mode:"boolean"})],QL.prototype,"fullBleed",void 0)
|
|
12623
|
+
const tB=QL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
|
|
12622
12624
|
<template
|
|
12623
12625
|
class="
|
|
12624
12626
|
${t=>t.readOnly?"readonly":""}
|
|
@@ -12678,7 +12680,7 @@ const QL=JL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
|
|
|
12678
12680
|
${ae(0,e)}
|
|
12679
12681
|
</div>
|
|
12680
12682
|
</template>
|
|
12681
|
-
`,styles:
|
|
12683
|
+
`,styles:JL,shadowOptions:{delegatesFocus:!0},end:Q`
|
|
12682
12684
|
<${Em}
|
|
12683
12685
|
severity="error"
|
|
12684
12686
|
class="error-icon"
|
|
@@ -12688,8 +12690,8 @@ const QL=JL.compose({baseName:"text-field",baseClass:ji,template:(t,e)=>Q`
|
|
|
12688
12690
|
</span>
|
|
12689
12691
|
${wg}
|
|
12690
12692
|
`})
|
|
12691
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12692
|
-
const
|
|
12693
|
+
_i.getOrCreate().withPrefix("nimble").register(tB())
|
|
12694
|
+
const eB=Mt`
|
|
12693
12695
|
${Vs("inline-flex")}
|
|
12694
12696
|
|
|
12695
12697
|
:host {
|
|
@@ -12773,7 +12775,7 @@ const tB=Mt`
|
|
|
12773
12775
|
.status-icon {
|
|
12774
12776
|
opacity: 0.6;
|
|
12775
12777
|
}
|
|
12776
|
-
`)),
|
|
12778
|
+
`)),nB=Q`
|
|
12777
12779
|
${Gt((t=>t.tooltipVisible),Q`
|
|
12778
12780
|
<${Oh}
|
|
12779
12781
|
class="anchored-region"
|
|
@@ -12806,11 +12808,11 @@ const tB=Mt`
|
|
|
12806
12808
|
</${Oh}>
|
|
12807
12809
|
`)}
|
|
12808
12810
|
`
|
|
12809
|
-
class
|
|
12810
|
-
const iB
|
|
12811
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
12812
|
-
const
|
|
12813
|
-
class
|
|
12811
|
+
class iB extends Rs{constructor(){super(...arguments),this.iconVisible=!1}}t([ft],iB.prototype,"severity",void 0),t([ft({attribute:"icon-visible",mode:"boolean"})],iB.prototype,"iconVisible",void 0)
|
|
12812
|
+
const sB=iB.compose({baseName:"tooltip",baseClass:Rs,template:nB,styles:eB})
|
|
12813
|
+
_i.getOrCreate().withPrefix("nimble").register(sB())
|
|
12814
|
+
const oB="group-selected",rB="all",aB="leaves-only",lB="none"
|
|
12815
|
+
class cB{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=null}handleChange({target:t,token:e}){this.attach(e.getValueFor(t))}attach(t){this.attached!==this[t]&&(null!==this.attached&&this.source.$fastController.removeStyles(this.attached),this.attached=this[t],null!==this.attached&&this.source.$fastController.addStyles(this.attached))}}const dB=Mt`
|
|
12814
12816
|
${Vs("block")}
|
|
12815
12817
|
|
|
12816
12818
|
:host {
|
|
@@ -12831,7 +12833,7 @@ class lB{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12831
12833
|
}
|
|
12832
12834
|
|
|
12833
12835
|
${""}
|
|
12834
|
-
:host([${
|
|
12836
|
+
:host([${oB}])::after {
|
|
12835
12837
|
background: ${hl};
|
|
12836
12838
|
border-radius: 0px;
|
|
12837
12839
|
content: '';
|
|
@@ -12852,7 +12854,7 @@ class lB{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12852
12854
|
background: ${sl};
|
|
12853
12855
|
}
|
|
12854
12856
|
|
|
12855
|
-
:host([${
|
|
12857
|
+
:host([${oB}]) .positioning-region:hover {
|
|
12856
12858
|
background: ${il};
|
|
12857
12859
|
}
|
|
12858
12860
|
|
|
@@ -12958,7 +12960,7 @@ class lB{constructor(t,e,n){this.ltr=t,this.rtl=e,this.source=n,this.attached=nu
|
|
|
12958
12960
|
display: block;
|
|
12959
12961
|
}
|
|
12960
12962
|
`.withBehaviors(new class{constructor(t,e){this.cache=new WeakMap,this.ltr=t,this.rtl=e}bind(t){this.attach(t)}unbind(t){const e=this.cache.get(t)
|
|
12961
|
-
e&&Za.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new
|
|
12963
|
+
e&&Za.unsubscribe(e)}attach(t){const e=this.cache.get(t)||new cB(this.ltr,this.rtl,t),n=Za.getValueFor(t)
|
|
12962
12964
|
Za.subscribe(e),e.attach(n),this.cache.set(t,e)}}(Mt`
|
|
12963
12965
|
.expand-collapse-button {
|
|
12964
12966
|
left: var(
|
|
@@ -12990,8 +12992,8 @@ Za.subscribe(e),e.attach(n),this.cache.set(t,e)}}(Mt`
|
|
|
12990
12992
|
transform: rotate(135deg);
|
|
12991
12993
|
}
|
|
12992
12994
|
`))
|
|
12993
|
-
class
|
|
12994
|
-
const hB
|
|
12995
|
+
class hB extends Ns{constructor(){super(...arguments),this.groupSelected=!1}}t([ft({attribute:"group-selected",mode:"boolean"})],hB.prototype,"groupSelected",void 0)
|
|
12996
|
+
const uB=hB.compose({baseName:"tree-item",baseClass:Ns,template:(t,e)=>Q`
|
|
12995
12997
|
<template
|
|
12996
12998
|
role="treeitem"
|
|
12997
12999
|
slot="${t=>t.isNestedItem()?"item":void 0}"
|
|
@@ -13031,9 +13033,9 @@ const hB=dB.compose({baseName:"tree-item",baseClass:Ns,template:(t,e)=>Q`
|
|
|
13031
13033
|
</div>
|
|
13032
13034
|
`)}
|
|
13033
13035
|
</template>
|
|
13034
|
-
`,styles:
|
|
13035
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
13036
|
-
const
|
|
13036
|
+
`,styles:dB,expandCollapseGlyph:Kh.data})
|
|
13037
|
+
_i.getOrCreate().withPrefix("nimble").register(uB())
|
|
13038
|
+
const pB=Mt`
|
|
13037
13039
|
${Vs("flex")}
|
|
13038
13040
|
|
|
13039
13041
|
:host {
|
|
@@ -13045,7 +13047,7 @@ const uB=Mt`
|
|
|
13045
13047
|
:host(${Hs}) {
|
|
13046
13048
|
outline: none;
|
|
13047
13049
|
}
|
|
13048
|
-
`,
|
|
13050
|
+
`,fB=Q`
|
|
13049
13051
|
<template
|
|
13050
13052
|
role="tree"
|
|
13051
13053
|
${Ut("treeView")}
|
|
@@ -13059,248 +13061,248 @@ const uB=Mt`
|
|
|
13059
13061
|
<slot ${ie("slottedTreeItems")}></slot>
|
|
13060
13062
|
</template>
|
|
13061
13063
|
`
|
|
13062
|
-
class
|
|
13064
|
+
class mB extends Ls{constructor(){super(...arguments),this.selectionMode=rB,this.selectedItems=[]}handleClick(t){if(t.defaultPrevented)return!1
|
|
13063
13065
|
if(!(t.target instanceof Element&&Fs(t.target)))return!0
|
|
13064
13066
|
const e=t.target
|
|
13065
|
-
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case
|
|
13066
|
-
case
|
|
13067
|
-
case
|
|
13068
|
-
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const t of Array.from(this.children))t instanceof
|
|
13067
|
+
return!e.disabled&&(this.canSelect(e)?e.selected=!0:this.itemHasChildren(e)&&(e.expanded=!e.expanded),!0)}canSelect(t){switch(this.selectionMode){case rB:return!0
|
|
13068
|
+
case lB:return!1
|
|
13069
|
+
case aB:return!this.itemHasChildren(t)
|
|
13070
|
+
default:return!0}}itemHasChildren(t){return null!==t.querySelector('[role="treeitem"]')}selectedItemsChanged(){for(const t of Array.from(this.children))t instanceof hB&&(t.groupSelected=!1)
|
|
13069
13071
|
for(let t of this.selectedItems){for(;null!==t.parentElement&&t.parentElement!==this;)t=t.parentElement
|
|
13070
|
-
t instanceof
|
|
13071
|
-
const mB
|
|
13072
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
13073
|
-
const
|
|
13074
|
-
class
|
|
13075
|
-
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new
|
|
13072
|
+
t instanceof hB&&(t.groupSelected=!0)}}}t([ft({attribute:"selection-mode"})],mB.prototype,"selectionMode",void 0),t([C],mB.prototype,"selectedItems",void 0)
|
|
13073
|
+
const gB=mB.compose({baseName:"tree-view",baseClass:Ls,template:fB,styles:pB})
|
|
13074
|
+
_i.getOrCreate().withPrefix("nimble").register(gB())
|
|
13075
|
+
const vB=Q`<template slot="unit"></template>`
|
|
13076
|
+
class bB{constructor(t,e,n){this.singular=t,this.plural=e,this.symbol=n}}class yB extends yL{constructor(t,{unitTranslations:e,scaledPrefixText:n}){if(super(t),!e.get("en"))throw new Error('English translations must exist with locale string "en"')
|
|
13077
|
+
this.pluralRules=new Intl.PluralRules(this.locale),this.formatter=new Intl.NumberFormat(this.locale,this.intlNumberFormatOptions),this.unitTranslation=this.getTranslationToUse(e,this.locale),this.scaledPrefixText=n}static createFactory(t){return e=>new yB(e,t)}format(t){const e=this.formatter.format(t)
|
|
13076
13078
|
if(""!==this.scaledPrefixText)return`${e} ${this.scaledPrefixText}${this.unitTranslation.symbol}`
|
|
13077
13079
|
return`${e} ${"one"===this.pluralRules.select(t)?this.unitTranslation.singular:this.unitTranslation.plural}`}getTranslationToUse(t,e){const n=new Intl.Locale(e??"en"),i=n.language,s=n.region
|
|
13078
|
-
return(s?t.get(`${i}-${s}`):void 0)??t.get(i)??t.get("en")}}const
|
|
13079
|
-
const
|
|
13080
|
-
const
|
|
13080
|
+
return(s?t.get(`${i}-${s}`):void 0)??t.get(i)??t.get("en")}}const wB=new Map([["en",new bB("byte","bytes","B")],["fr",new bB("octet","octets","o")],["de",new bB("Byte","Byte","B")],["ja",new bB("バイト","バイト","B")],["zh",new bB("字节","字节","B")]]),xB=[[1,""],[1024,"Ki"],[1048576,"Mi"],[1024**3,"Gi"],[1024**4,"Ti"],[1024**5,"Pi"]]
|
|
13081
|
+
const CB=new class extends CL{constructor(){super(xB.map((([t,e])=>new xL(t,yB.createFactory({unitTranslations:wB,scaledPrefixText:e})))))}},kB=[[1,"byte","long"],[1e3,"kilobyte","short"],[1e6,"megabyte","short"],[1e3**3,"gigabyte","short"],[1e3**4,"terabyte","short"],[1e3**5,"petabyte","short"]]
|
|
13082
|
+
const SB=new class extends CL{constructor(){super(kB.map((([t,e,n])=>new xL(t,wL.createFactory({style:"unit",unit:e,unitDisplay:n})))))}},_B=Mt`
|
|
13081
13083
|
${Vs("none")}
|
|
13082
13084
|
`
|
|
13083
|
-
class
|
|
13084
|
-
const IB
|
|
13085
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
13086
|
-
const
|
|
13087
|
-
const
|
|
13088
|
-
const
|
|
13089
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
13090
|
-
var
|
|
13091
|
-
function
|
|
13092
|
-
i[t]=[]}return new
|
|
13093
|
-
break}return null!=n&&t.push({name:e,value:n}),t}
|
|
13085
|
+
class IB extends DL{constructor(){super(),this.binary=!1,this.resolvedUnitScale=SB}binaryChanged(){this.resolvedUnitScale=this.binary?CB:SB}}t([ft({mode:"boolean"})],IB.prototype,"binary",void 0)
|
|
13086
|
+
const MB=IB.compose({baseName:"unit-byte",template:vB,styles:_B})
|
|
13087
|
+
_i.getOrCreate().withPrefix("nimble").register(MB())
|
|
13088
|
+
const $B=[[1e-15,"f"],[1e-12,"p"],[1e-9,"n"],[10**-6,"μ"],[.001,"m"],[.01,"c"],[.1,"d"],[1,""],[1e3,"k"],[10**6,"M"],[10**9,"G"],[10**12,"T"],[10**15,"P"],[10**18,"E"]],EB=new Map([["en",new bB("volt","volts","V")],["fr",new bB("volt","volts","V")],["de",new bB("Volt","Volt","V")],["ja",new bB("ボルト","ボルト","V")],["zh",new bB("伏特","伏特","V")]])
|
|
13089
|
+
const DB=new class extends CL{constructor(){super($B.map((([t,e])=>new xL(t,yB.createFactory({unitTranslations:EB,scaledPrefixText:e})))))}}
|
|
13090
|
+
const AB=class extends DL{constructor(){super(),this.resolvedUnitScale=DB}}.compose({baseName:"unit-volt",template:vB,styles:_B})
|
|
13091
|
+
_i.getOrCreate().withPrefix("nimble").register(AB())
|
|
13092
|
+
var TB={value:()=>{}}
|
|
13093
|
+
function OB(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t)
|
|
13094
|
+
i[t]=[]}return new RB(i)}function RB(t){this._=t}function FB(t,e){for(var n,i=0,s=t.length;i<s;++i)if((n=t[i]).name===e)return n.value}function NB(t,e,n){for(var i=0,s=t.length;i<s;++i)if(t[i].name===e){t[i]=TB,t=t.slice(0,i).concat(t.slice(i+1))
|
|
13095
|
+
break}return null!=n&&t.push({name:e,value:n}),t}RB.prototype=OB.prototype={constructor:RB,on:function(t,e){var n,i,s=this._,o=(i=s,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
|
|
13094
13096
|
if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t)
|
|
13095
13097
|
return{type:t,name:e}}))),r=-1,a=o.length
|
|
13096
13098
|
if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e)
|
|
13097
|
-
for(;++r<a;)if(n=(t=o[r]).type)s[n]=
|
|
13098
|
-
else if(null==e)for(n in s)s[n]=
|
|
13099
|
-
return this}for(;++r<a;)if((n=(t=o[r]).type)&&(n=
|
|
13099
|
+
for(;++r<a;)if(n=(t=o[r]).type)s[n]=NB(s[n],t.name,e)
|
|
13100
|
+
else if(null==e)for(n in s)s[n]=NB(s[n],t.name,null)
|
|
13101
|
+
return this}for(;++r<a;)if((n=(t=o[r]).type)&&(n=FB(s[n],t.name)))return n},copy:function(){var t={},e=this._
|
|
13100
13102
|
for(var n in e)t[n]=e[n].slice()
|
|
13101
|
-
return new
|
|
13103
|
+
return new RB(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,s=new Array(n),o=0;o<n;++o)s[o]=arguments[o+2]
|
|
13102
13104
|
if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t)
|
|
13103
13105
|
for(o=0,n=(i=this._[t]).length;o<n;++o)i[o].value.apply(e,s)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t)
|
|
13104
13106
|
for(var i=this._[t],s=0,o=i.length;s<o;++s)i[s].value.apply(e,n)}}
|
|
13105
|
-
var
|
|
13106
|
-
function
|
|
13107
|
-
return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),
|
|
13108
|
-
return n===
|
|
13109
|
-
return(e.local?zB
|
|
13110
|
-
var e}}function
|
|
13111
|
-
function
|
|
13112
|
-
function
|
|
13113
|
-
for(;a<l;++a)(r=e[a])&&(s[a]=r)}function
|
|
13107
|
+
var LB="http://www.w3.org/1999/xhtml",BB={svg:"http://www.w3.org/2000/svg",xhtml:LB,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}
|
|
13108
|
+
function PB(t){var e=t+="",n=e.indexOf(":")
|
|
13109
|
+
return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),BB.hasOwnProperty(e)?{space:BB[e],local:t}:t}function zB(t){return function(){var e=this.ownerDocument,n=this.namespaceURI
|
|
13110
|
+
return n===LB&&e.documentElement.namespaceURI===LB?e.createElement(t):e.createElementNS(n,t)}}function VB(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function HB(t){var e=PB(t)
|
|
13111
|
+
return(e.local?VB:zB)(e)}function UB(){}function qB(t){return null==t?UB:function(){return this.querySelector(t)}}function jB(){return[]}function WB(t){return null==t?jB:function(){return this.querySelectorAll(t)}}function GB(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e)
|
|
13112
|
+
var e}}function ZB(t){return function(){return this.matches(t)}}function KB(t){return function(e){return e.matches(t)}}var YB=Array.prototype.find
|
|
13113
|
+
function XB(){return this.firstElementChild}var JB=Array.prototype.filter
|
|
13114
|
+
function QB(){return Array.from(this.children)}function tP(t){return new Array(t.length)}function eP(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function nP(t,e,n,i,s,o){for(var r,a=0,l=e.length,c=o.length;a<c;++a)(r=e[a])?(r.__data__=o[a],i[a]=r):n[a]=new eP(t,o[a])
|
|
13115
|
+
for(;a<l;++a)(r=e[a])&&(s[a]=r)}function iP(t,e,n,i,s,o,r){var a,l,c,d=new Map,h=e.length,u=o.length,p=new Array(h)
|
|
13114
13116
|
for(a=0;a<h;++a)(l=e[a])&&(p[a]=c=r.call(l,l.__data__,a,e)+"",d.has(c)?s[a]=l:d.set(c,l))
|
|
13115
|
-
for(a=0;a<u;++a)c=r.call(t,o[a],a,o)+"",(l=d.get(c))?(i[a]=l,l.__data__=o[a],d.delete(c)):n[a]=new
|
|
13116
|
-
for(a=0;a<h;++a)(l=e[a])&&d.get(p[a])===l&&(s[a]=l)}function
|
|
13117
|
-
null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function
|
|
13118
|
-
null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function
|
|
13119
|
-
null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function
|
|
13120
|
-
null==n?delete this[t]:this[t]=n}}function
|
|
13121
|
-
this.textContent=null==e?"":e}}function
|
|
13122
|
-
this.innerHTML=null==e?"":e}}function
|
|
13123
|
-
t&&t.removeChild(this)}function
|
|
13124
|
-
return e?e.insertBefore(t,this.nextSibling):t}function
|
|
13125
|
-
return e?e.insertBefore(t,this.nextSibling):t}function
|
|
13126
|
-
if(e){for(var n,i=0,s=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++s]=n:this.removeEventListener(n.type,n.listener,n.options);++s?e.length=s:delete this.__on}}}function
|
|
13117
|
+
for(a=0;a<u;++a)c=r.call(t,o[a],a,o)+"",(l=d.get(c))?(i[a]=l,l.__data__=o[a],d.delete(c)):n[a]=new eP(t,o[a])
|
|
13118
|
+
for(a=0;a<h;++a)(l=e[a])&&d.get(p[a])===l&&(s[a]=l)}function sP(t){return t.__data__}function oP(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function rP(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function aP(t){return function(){this.removeAttribute(t)}}function lP(t){return function(){this.removeAttributeNS(t.space,t.local)}}function cP(t,e){return function(){this.setAttribute(t,e)}}function dP(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function hP(t,e){return function(){var n=e.apply(this,arguments)
|
|
13119
|
+
null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function uP(t,e){return function(){var n=e.apply(this,arguments)
|
|
13120
|
+
null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function pP(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function fP(t){return function(){this.style.removeProperty(t)}}function mP(t,e,n){return function(){this.style.setProperty(t,e,n)}}function gP(t,e,n){return function(){var i=e.apply(this,arguments)
|
|
13121
|
+
null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function vP(t,e){return t.style.getPropertyValue(e)||pP(t).getComputedStyle(t,null).getPropertyValue(e)}function bP(t){return function(){delete this[t]}}function yP(t,e){return function(){this[t]=e}}function wP(t,e){return function(){var n=e.apply(this,arguments)
|
|
13122
|
+
null==n?delete this[t]:this[t]=n}}function xP(t){return t.trim().split(/^|\s+/)}function CP(t){return t.classList||new kP(t)}function kP(t){this._node=t,this._names=xP(t.getAttribute("class")||"")}function SP(t,e){for(var n=CP(t),i=-1,s=e.length;++i<s;)n.add(e[i])}function _P(t,e){for(var n=CP(t),i=-1,s=e.length;++i<s;)n.remove(e[i])}function IP(t){return function(){SP(this,t)}}function MP(t){return function(){_P(this,t)}}function $P(t,e){return function(){(e.apply(this,arguments)?SP:_P)(this,t)}}function EP(){this.textContent=""}function DP(t){return function(){this.textContent=t}}function AP(t){return function(){var e=t.apply(this,arguments)
|
|
13123
|
+
this.textContent=null==e?"":e}}function TP(){this.innerHTML=""}function OP(t){return function(){this.innerHTML=t}}function RP(t){return function(){var e=t.apply(this,arguments)
|
|
13124
|
+
this.innerHTML=null==e?"":e}}function FP(){this.nextSibling&&this.parentNode.appendChild(this)}function NP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function LP(){return null}function BP(){var t=this.parentNode
|
|
13125
|
+
t&&t.removeChild(this)}function PP(){var t=this.cloneNode(!1),e=this.parentNode
|
|
13126
|
+
return e?e.insertBefore(t,this.nextSibling):t}function zP(){var t=this.cloneNode(!0),e=this.parentNode
|
|
13127
|
+
return e?e.insertBefore(t,this.nextSibling):t}function VP(t){return function(){var e=this.__on
|
|
13128
|
+
if(e){for(var n,i=0,s=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++s]=n:this.removeEventListener(n.type,n.listener,n.options);++s?e.length=s:delete this.__on}}}function HP(t,e,n){return function(){var i,s=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e)
|
|
13127
13129
|
if(s)for(var r=0,a=s.length;r<a;++r)if((i=s[r]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),void(i.value=e)
|
|
13128
|
-
this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},s?s.push(i):this.__on=[i]}}function
|
|
13129
|
-
"function"==typeof s?s=new s(e,n):(s=i.document.createEvent("Event"),n?(s.initEvent(e,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(e,!1,!1)),t.dispatchEvent(s)}function
|
|
13130
|
+
this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},s?s.push(i):this.__on=[i]}}function UP(t,e,n){var i=pP(t),s=i.CustomEvent
|
|
13131
|
+
"function"==typeof s?s=new s(e,n):(s=i.document.createEvent("Event"),n?(s.initEvent(e,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(e,!1,!1)),t.dispatchEvent(s)}function qP(t,e){return function(){return UP(this,t,e)}}function jP(t,e){return function(){return UP(this,t,e.apply(this,arguments))}}eP.prototype={constructor:eP,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},kP.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t)
|
|
13130
13132
|
e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}}
|
|
13131
|
-
var
|
|
13132
|
-
function
|
|
13133
|
+
var WP=[null]
|
|
13134
|
+
function GP(t,e){this._groups=t,this._parents=e}function ZP(){return new GP([[document.documentElement]],WP)}function KP(t){return"string"==typeof t?new GP([[document.querySelector(t)]],[document.documentElement]):new GP([[t]],WP)}function YP(t,e){if(t=function(t){let e
|
|
13133
13135
|
for(;e=t.sourceEvent;)t=e
|
|
13134
13136
|
return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e
|
|
13135
13137
|
if(n.createSVGPoint){var i=n.createSVGPoint()
|
|
13136
13138
|
return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var s=e.getBoundingClientRect()
|
|
13137
|
-
return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}}return[t.pageX,t.pageY]}
|
|
13139
|
+
return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}}return[t.pageX,t.pageY]}GP.prototype=ZP.prototype={constructor:GP,select:function(t){"function"!=typeof t&&(t=qB(t))
|
|
13138
13140
|
for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s)for(var o,r,a=e[s],l=a.length,c=i[s]=new Array(l),d=0;d<l;++d)(o=a[d])&&(r=t.call(o,o.__data__,d,a))&&("__data__"in o&&(r.__data__=o.__data__),c[d]=r)
|
|
13139
|
-
return new
|
|
13141
|
+
return new GP(i,this._parents)},selectAll:function(t){t="function"==typeof t?GB(t):WB(t)
|
|
13140
13142
|
for(var e=this._groups,n=e.length,i=[],s=[],o=0;o<n;++o)for(var r,a=e[o],l=a.length,c=0;c<l;++c)(r=a[c])&&(i.push(t.call(r,r.__data__,c,a)),s.push(r))
|
|
13141
|
-
return new
|
|
13143
|
+
return new GP(i,s)},selectChild:function(t){return this.select(null==t?XB:function(t){return function(){return YB.call(this.children,t)}}("function"==typeof t?t:KB(t)))},selectChildren:function(t){return this.selectAll(null==t?QB:function(t){return function(){return JB.call(this.children,t)}}("function"==typeof t?t:KB(t)))},filter:function(t){"function"!=typeof t&&(t=ZB(t))
|
|
13142
13144
|
for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s)for(var o,r=e[s],a=r.length,l=i[s]=[],c=0;c<a;++c)(o=r[c])&&t.call(o,o.__data__,c,r)&&l.push(o)
|
|
13143
|
-
return new
|
|
13144
|
-
var n,i=e?nP
|
|
13145
|
+
return new GP(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,sP)
|
|
13146
|
+
var n,i=e?iP:nP,s=this._parents,o=this._groups
|
|
13145
13147
|
"function"!=typeof t&&(n=t,t=function(){return n})
|
|
13146
|
-
for(var r=o.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=s[d],u=o[d],p=u.length,f=
|
|
13148
|
+
for(var r=o.length,a=new Array(r),l=new Array(r),c=new Array(r),d=0;d<r;++d){var h=s[d],u=o[d],p=u.length,f=oP(t.call(h,h&&h.__data__,d,s)),m=f.length,g=l[d]=new Array(m),v=a[d]=new Array(m)
|
|
13147
13149
|
i(h,u,g,v,c[d]=new Array(p),f,e)
|
|
13148
|
-
for(var b,y,w=0,x=0;w<m;++w)if(b=g[w]){for(w>=x&&(x=w+1);!(y=v[x])&&++x<m;);b._next=y||null}}return(a=new
|
|
13150
|
+
for(var b,y,w=0,x=0;w<m;++w)if(b=g[w]){for(w>=x&&(x=w+1);!(y=v[x])&&++x<m;);b._next=y||null}}return(a=new GP(a,s))._enter=l,a._exit=c,a},enter:function(){return new GP(this._enter||this._groups.map(tP),this._parents)},exit:function(){return new GP(this._exit||this._groups.map(tP),this._parents)},join:function(t,e,n){var i=this.enter(),s=this,o=this.exit()
|
|
13149
13151
|
return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(s=e(s))&&(s=s.selection()),null==n?o.remove():n(o),i&&s?i.merge(s).order():s},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,s=n.length,o=i.length,r=Math.min(s,o),a=new Array(s),l=0;l<r;++l)for(var c,d=n[l],h=i[l],u=d.length,p=a[l]=new Array(u),f=0;f<u;++f)(c=d[f]||h[f])&&(p[f]=c)
|
|
13150
13152
|
for(;l<s;++l)a[l]=n[l]
|
|
13151
|
-
return new
|
|
13152
|
-
return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=
|
|
13153
|
+
return new GP(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,s=t[e],o=s.length-1,r=s[o];--o>=0;)(i=s[o])&&(r&&4^i.compareDocumentPosition(r)&&r.parentNode.insertBefore(i,r),r=i)
|
|
13154
|
+
return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=rP)
|
|
13153
13155
|
for(var n=this._groups,i=n.length,s=new Array(i),o=0;o<i;++o){for(var r,a=n[o],l=a.length,c=s[o]=new Array(l),d=0;d<l;++d)(r=a[d])&&(c[d]=r)
|
|
13154
|
-
c.sort(e)}return new
|
|
13156
|
+
c.sort(e)}return new GP(s,this._parents).order()},call:function(){var t=arguments[0]
|
|
13155
13157
|
return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],s=0,o=i.length;s<o;++s){var r=i[s]
|
|
13156
13158
|
if(r)return r}return null},size:function(){let t=0
|
|
13157
13159
|
for(const e of this)++t
|
|
13158
13160
|
return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var s,o=e[n],r=0,a=o.length;r<a;++r)(s=o[r])&&t.call(s,s.__data__,r,o)
|
|
13159
|
-
return this},attr:function(t,e){var n=
|
|
13161
|
+
return this},attr:function(t,e){var n=PB(t)
|
|
13160
13162
|
if(arguments.length<2){var i=this.node()
|
|
13161
|
-
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?aP:
|
|
13162
|
-
if(arguments.length<2){for(var i=
|
|
13163
|
-
return!0}return this.each(("function"==typeof e
|
|
13164
|
-
return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:
|
|
13165
|
-
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(
|
|
13163
|
+
return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?lP:aP:"function"==typeof e?n.local?uP:hP:n.local?dP:cP)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?fP:"function"==typeof e?gP:mP)(t,e,null==n?"":n)):vP(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?bP:"function"==typeof e?wP:yP)(t,e)):this.node()[t]},classed:function(t,e){var n=xP(t+"")
|
|
13164
|
+
if(arguments.length<2){for(var i=CP(this.node()),s=-1,o=n.length;++s<o;)if(!i.contains(n[s]))return!1
|
|
13165
|
+
return!0}return this.each(("function"==typeof e?$P:e?IP:MP)(n,e))},text:function(t){return arguments.length?this.each(null==t?EP:("function"==typeof t?AP:DP)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?TP:("function"==typeof t?RP:OP)(t)):this.node().innerHTML},raise:function(){return this.each(FP)},lower:function(){return this.each(NP)},append:function(t){var e="function"==typeof t?t:HB(t)
|
|
13166
|
+
return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:HB(t),i=null==e?LP:"function"==typeof e?e:qB(e)
|
|
13167
|
+
return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(BP)},clone:function(t){return this.select(t?zP:PP)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,s,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".")
|
|
13166
13168
|
return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),r=o.length
|
|
13167
|
-
if(!(arguments.length<2)){for(a=e?VP
|
|
13169
|
+
if(!(arguments.length<2)){for(a=e?HP:VP,i=0;i<r;++i)this.each(a(o[i],e,n))
|
|
13168
13170
|
return this}var a=this.node().__on
|
|
13169
|
-
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((s=o[i]).type===l.type&&s.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?qP
|
|
13170
|
-
const
|
|
13171
|
-
function
|
|
13171
|
+
if(a)for(var l,c=0,d=a.length;c<d;++c)for(i=0,l=a[c];i<r;++i)if((s=o[i]).type===l.type&&s.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?jP:qP)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,s=t[e],o=0,r=s.length;o<r;++o)(i=s[o])&&(yield i)}}
|
|
13172
|
+
const XP={capture:!0,passive:!1}
|
|
13173
|
+
function JP(t){t.preventDefault(),t.stopImmediatePropagation()}function QP(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function tz(t,e){var n=Object.create(t.prototype)
|
|
13172
13174
|
for(var i in e)n[i]=e[i]
|
|
13173
|
-
return n}function
|
|
13174
|
-
function
|
|
13175
|
-
return t=(t+"").trim().toLowerCase(),(e=
|
|
13176
|
-
var s}function
|
|
13177
|
-
return`${1===t?"rgb(":"rgba("}${
|
|
13178
|
-
if(t instanceof
|
|
13179
|
-
if(t instanceof
|
|
13175
|
+
return n}function ez(){}var nz=.7,iz=1/nz,sz="\\s*([+-]?\\d+)\\s*",oz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",rz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",az=/^#([0-9a-f]{3,8})$/,lz=new RegExp(`^rgb\\(${sz},${sz},${sz}\\)$`),cz=new RegExp(`^rgb\\(${rz},${rz},${rz}\\)$`),dz=new RegExp(`^rgba\\(${sz},${sz},${sz},${oz}\\)$`),hz=new RegExp(`^rgba\\(${rz},${rz},${rz},${oz}\\)$`),uz=new RegExp(`^hsl\\(${oz},${rz},${rz}\\)$`),pz=new RegExp(`^hsla\\(${oz},${rz},${rz},${oz}\\)$`),fz={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074}
|
|
13176
|
+
function mz(){return this.rgb().formatHex()}function gz(){return this.rgb().formatRgb()}function vz(t){var e,n
|
|
13177
|
+
return t=(t+"").trim().toLowerCase(),(e=az.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?bz(e):3===n?new xz(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?yz(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?yz(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=lz.exec(t))?new xz(e[1],e[2],e[3],1):(e=cz.exec(t))?new xz(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=dz.exec(t))?yz(e[1],e[2],e[3],e[4]):(e=hz.exec(t))?yz(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=uz.exec(t))?Mz(e[1],e[2]/100,e[3]/100,1):(e=pz.exec(t))?Mz(e[1],e[2]/100,e[3]/100,e[4]):fz.hasOwnProperty(t)?bz(fz[t]):"transparent"===t?new xz(NaN,NaN,NaN,0):null}function bz(t){return new xz(t>>16&255,t>>8&255,255&t,1)}function yz(t,e,n,i){return i<=0&&(t=e=n=NaN),new xz(t,e,n,i)}function wz(t,e,n,i){return 1===arguments.length?((s=t)instanceof ez||(s=vz(s)),s?new xz((s=s.rgb()).r,s.g,s.b,s.opacity):new xz):new xz(t,e,n,null==i?1:i)
|
|
13178
|
+
var s}function xz(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function Cz(){return`#${Iz(this.r)}${Iz(this.g)}${Iz(this.b)}`}function kz(){const t=Sz(this.opacity)
|
|
13179
|
+
return`${1===t?"rgb(":"rgba("}${_z(this.r)}, ${_z(this.g)}, ${_z(this.b)}${1===t?")":`, ${t})`}`}function Sz(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function _z(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Iz(t){return((t=_z(t))<16?"0":"")+t.toString(16)}function Mz(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ez(t,e,n,i)}function $z(t){if(t instanceof Ez)return new Ez(t.h,t.s,t.l,t.opacity)
|
|
13180
|
+
if(t instanceof ez||(t=vz(t)),!t)return new Ez
|
|
13181
|
+
if(t instanceof Ez)return t
|
|
13180
13182
|
var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,s=Math.min(e,n,i),o=Math.max(e,n,i),r=NaN,a=o-s,l=(o+s)/2
|
|
13181
|
-
return a?(r=e===o?(n-i)/a+6*(n<i):n===o?(i-e)/a+2:(e-n)/a+4,a/=l<.5?o+s:2-o-s,r*=60):a=l>0&&l<1?0:r,new
|
|
13182
|
-
return new
|
|
13183
|
-
return`${1===t?"hsl(":"hsla("}${
|
|
13184
|
-
var
|
|
13185
|
-
function
|
|
13186
|
-
return n?function(t,e){return function(n){return t+n*e}}(t,n):
|
|
13187
|
-
function i(t,e){var i=n((t=
|
|
13183
|
+
return a?(r=e===o?(n-i)/a+6*(n<i):n===o?(i-e)/a+2:(e-n)/a+4,a/=l<.5?o+s:2-o-s,r*=60):a=l>0&&l<1?0:r,new Ez(r,a,l,t.opacity)}function Ez(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function Dz(t){return(t=(t||0)%360)<0?t+360:t}function Az(t){return Math.max(0,Math.min(1,t||0))}function Tz(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}QP(ez,vz,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:mz,formatHex:mz,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $z(this).formatHsl()},formatRgb:gz,toString:gz}),QP(xz,wz,tz(ez,{brighter(t){return t=null==t?iz:Math.pow(iz,t),new xz(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?nz:Math.pow(nz,t),new xz(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new xz(_z(this.r),_z(this.g),_z(this.b),Sz(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Cz,formatHex:Cz,formatHex8:function(){return`#${Iz(this.r)}${Iz(this.g)}${Iz(this.b)}${Iz(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:kz,toString:kz})),QP(Ez,(function(t,e,n,i){return 1===arguments.length?$z(t):new Ez(t,e,n,null==i?1:i)}),tz(ez,{brighter(t){return t=null==t?iz:Math.pow(iz,t),new Ez(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?nz:Math.pow(nz,t),new Ez(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,s=2*n-i
|
|
13184
|
+
return new xz(Tz(t>=240?t-240:t+120,s,i),Tz(t,s,i),Tz(t<120?t+240:t-120,s,i),this.opacity)},clamp(){return new Ez(Dz(this.h),Az(this.s),Az(this.l),Sz(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Sz(this.opacity)
|
|
13185
|
+
return`${1===t?"hsl(":"hsla("}${Dz(this.h)}, ${100*Az(this.s)}%, ${100*Az(this.l)}%${1===t?")":`, ${t})`}`}}))
|
|
13186
|
+
var Oz=t=>()=>t
|
|
13187
|
+
function Rz(t){return 1==(t=+t)?Fz:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):Oz(isNaN(e)?n:e)}}function Fz(t,e){var n=e-t
|
|
13188
|
+
return n?function(t,e){return function(n){return t+n*e}}(t,n):Oz(isNaN(t)?e:t)}var Nz=function t(e){var n=Rz(e)
|
|
13189
|
+
function i(t,e){var i=n((t=wz(t)).r,(e=wz(e)).r),s=n(t.g,e.g),o=n(t.b,e.b),r=Fz(t.opacity,e.opacity)
|
|
13188
13190
|
return function(e){return t.r=i(e),t.g=s(e),t.b=o(e),t.opacity=r(e),t+""}}return i.gamma=t,i}(1)
|
|
13189
|
-
function
|
|
13191
|
+
function Lz(t,e){e||(e=[])
|
|
13190
13192
|
var n,i=t?Math.min(e.length,t.length):0,s=e.slice()
|
|
13191
13193
|
return function(o){for(n=0;n<i;++n)s[n]=t[n]*(1-o)+e[n]*o
|
|
13192
|
-
return s}}function
|
|
13193
|
-
for(n=0;n<s;++n)o[n]=
|
|
13194
|
+
return s}}function Bz(t,e){var n,i=e?e.length:0,s=t?Math.min(i,t.length):0,o=new Array(s),r=new Array(i)
|
|
13195
|
+
for(n=0;n<s;++n)o[n]=jz(t[n],e[n])
|
|
13194
13196
|
for(;n<i;++n)r[n]=e[n]
|
|
13195
13197
|
return function(t){for(n=0;n<s;++n)r[n]=o[n](t)
|
|
13196
|
-
return r}}function
|
|
13197
|
-
return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function
|
|
13198
|
-
for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=
|
|
13198
|
+
return r}}function Pz(t,e){var n=new Date
|
|
13199
|
+
return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function zz(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Vz(t,e){var n,i={},s={}
|
|
13200
|
+
for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=jz(t[n],e[n]):s[n]=e[n]
|
|
13199
13201
|
return function(t){for(n in i)s[n]=i[n](t)
|
|
13200
|
-
return s}}var
|
|
13201
|
-
function
|
|
13202
|
-
for(t+="",e+="";(n=
|
|
13202
|
+
return s}}var Hz=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Uz=new RegExp(Hz.source,"g")
|
|
13203
|
+
function qz(t,e){var n,i,s,o=Hz.lastIndex=Uz.lastIndex=0,r=-1,a=[],l=[]
|
|
13204
|
+
for(t+="",e+="";(n=Hz.exec(t))&&(i=Uz.exec(e));)(s=i.index)>o&&(s=e.slice(o,s),a[r]?a[r]+=s:a[++r]=s),(n=n[0])===(i=i[0])?a[r]?a[r]+=i:a[++r]=i:(a[++r]=null,l.push({i:r,x:zz(n,i)})),o=Uz.lastIndex
|
|
13203
13205
|
return o<e.length&&(s=e.slice(o),a[r]?a[r]+=s:a[++r]=s),a.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var n,i=0;i<e;++i)a[(n=l[i]).i]=n.x(t)
|
|
13204
|
-
return a.join("")})}function
|
|
13205
|
-
return null==e||"boolean"===s?
|
|
13206
|
-
function
|
|
13207
|
-
return(r=Math.sqrt(t*t+e*e))&&(t/=r,e/=r),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,r=-r),{translateX:s,translateY:o,rotate:Math.atan2(e,t)*
|
|
13206
|
+
return a.join("")})}function jz(t,e){var n,i,s=typeof e
|
|
13207
|
+
return null==e||"boolean"===s?Oz(e):("number"===s?zz:"string"===s?(n=vz(e))?(e=n,Nz):qz:e instanceof vz?Nz:e instanceof Date?Pz:(i=e,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(e)?Bz:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Vz:zz:Lz))(t,e)}function Wz(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Gz,Zz=180/Math.PI,Kz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}
|
|
13208
|
+
function Yz(t,e,n,i,s,o){var r,a,l
|
|
13209
|
+
return(r=Math.sqrt(t*t+e*e))&&(t/=r,e/=r),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,r=-r),{translateX:s,translateY:o,rotate:Math.atan2(e,t)*Zz,skewX:Math.atan(l)*Zz,scaleX:r,scaleY:a}}function Xz(t,e,n,i){function s(t){return t.length?t.pop()+" ":""}return function(o,r){var a=[],l=[]
|
|
13208
13210
|
return o=t(o),r=t(r),function(t,i,s,o,r,a){if(t!==s||i!==o){var l=r.push("translate(",null,e,null,n)
|
|
13209
|
-
a.push({i:l-4,x:
|
|
13210
|
-
r.push({i:a-4,x:
|
|
13211
|
-
return a.join("")}}}var Xz
|
|
13212
|
-
return e.isIdentity?
|
|
13213
|
-
function
|
|
13211
|
+
a.push({i:l-4,x:zz(t,s)},{i:l-2,x:zz(i,o)})}else(s||o)&&r.push("translate("+s+e+o+n)}(o.translateX,o.translateY,r.translateX,r.translateY,a,l),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(s(n)+"rotate(",null,i)-2,x:zz(t,e)})):e&&n.push(s(n)+"rotate("+e+i)}(o.rotate,r.rotate,a,l),function(t,e,n,o){t!==e?o.push({i:n.push(s(n)+"skewX(",null,i)-2,x:zz(t,e)}):e&&n.push(s(n)+"skewX("+e+i)}(o.skewX,r.skewX,a,l),function(t,e,n,i,o,r){if(t!==n||e!==i){var a=o.push(s(o)+"scale(",null,",",null,")")
|
|
13212
|
+
r.push({i:a-4,x:zz(t,n)},{i:a-2,x:zz(e,i)})}else 1===n&&1===i||o.push(s(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,r.scaleX,r.scaleY,a,l),o=r=null,function(t){for(var e,n=-1,i=l.length;++n<i;)a[(e=l[n]).i]=e.x(t)
|
|
13213
|
+
return a.join("")}}}var Jz=Xz((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")
|
|
13214
|
+
return e.isIdentity?Kz:Yz(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Qz=Xz((function(t){return null==t?Kz:(Gz||(Gz=document.createElementNS("http://www.w3.org/2000/svg","g")),Gz.setAttribute("transform",t),(t=Gz.transform.baseVal.consolidate())?Yz((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Kz)}),", ",")",")")
|
|
13215
|
+
function tV(t){return((t=Math.exp(t))+1/t)/2}var eV,nV,iV=function t(e,n,i){function s(t,s){var o,r,a=t[0],l=t[1],c=t[2],d=s[0],h=s[1],u=s[2],p=d-a,f=h-l,m=p*p+f*f
|
|
13214
13216
|
if(m<1e-12)r=Math.log(u/c)/e,o=function(t){return[a+t*p,l+t*f,c*Math.exp(e*t*r)]}
|
|
13215
13217
|
else{var g=Math.sqrt(m),v=(u*u-c*c+i*m)/(2*c*n*g),b=(u*u-c*c-i*m)/(2*u*n*g),y=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(b*b+1)-b)
|
|
13216
|
-
r=(w-y)/e,o=function(t){var i,s=t*r,o=
|
|
13217
|
-
return[a+d*p,l+d*f,c*o/
|
|
13218
|
-
return t(n,i,i*i)},s}(Math.SQRT2,2,4),
|
|
13219
|
-
function
|
|
13220
|
-
return i.restart(t,e,n),i}function
|
|
13221
|
-
try{!function(){
|
|
13222
|
-
for(var t,e=
|
|
13223
|
-
for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:
|
|
13224
|
-
|
|
13225
|
-
e>
|
|
13226
|
-
return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}
|
|
13227
|
-
n=(null==n?
|
|
13228
|
-
var
|
|
13229
|
-
function
|
|
13218
|
+
r=(w-y)/e,o=function(t){var i,s=t*r,o=tV(y),d=c/(n*g)*(o*(i=e*s+y,((i=Math.exp(2*i))-1)/(i+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y))
|
|
13219
|
+
return[a+d*p,l+d*f,c*o/tV(e*s+y)]}}return o.duration=1e3*r*e/Math.SQRT2,o}return s.rho=function(e){var n=Math.max(.001,+e),i=n*n
|
|
13220
|
+
return t(n,i,i*i)},s}(Math.SQRT2,2,4),sV=0,oV=0,rV=0,aV=1e3,lV=0,cV=0,dV=0,hV="object"==typeof performance&&performance.now?performance:Date,uV="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)}
|
|
13221
|
+
function pV(){return cV||(uV(fV),cV=hV.now()+dV)}function fV(){cV=0}function mV(){this._call=this._time=this._next=null}function gV(t,e,n){var i=new mV
|
|
13222
|
+
return i.restart(t,e,n),i}function vV(){cV=(lV=hV.now())+dV,sV=oV=0
|
|
13223
|
+
try{!function(){pV(),++sV
|
|
13224
|
+
for(var t,e=eV;e;)(t=cV-e._time)>=0&&e._call.call(void 0,t),e=e._next;--sV}()}finally{sV=0,function(){var t,e,n=eV,i=1/0
|
|
13225
|
+
for(;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:eV=e)
|
|
13226
|
+
nV=t,yV(i)}(),cV=0}}function bV(){var t=hV.now(),e=t-lV
|
|
13227
|
+
e>aV&&(dV-=e,lV=t)}function yV(t){sV||(oV&&(oV=clearTimeout(oV)),t-cV>24?(t<1/0&&(oV=setTimeout(vV,t-hV.now()-dV)),rV&&(rV=clearInterval(rV))):(rV||(lV=hV.now(),rV=setInterval(bV,aV)),sV=1,uV(vV)))}function wV(t,e,n){var i=new mV
|
|
13228
|
+
return e=null==e?0:+e,i.restart((n=>{i.stop(),t(n+e)}),e,n),i}mV.prototype=gV.prototype={constructor:mV,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function")
|
|
13229
|
+
n=(null==n?pV():+n)+(null==e?0:+e),this._next||nV===this||(nV?nV._next=this:eV=this,nV=this),this._call=t,this._time=n,yV()},stop:function(){this._call&&(this._call=null,this._time=1/0,yV())}}
|
|
13230
|
+
var xV=OB("start","end","cancel","interrupt"),CV=[],kV=0,SV=1,_V=2,IV=3,MV=4,$V=5,EV=6
|
|
13231
|
+
function DV(t,e,n,i,s,o){var r=t.__transition
|
|
13230
13232
|
if(r){if(n in r)return}else t.__transition={}
|
|
13231
13233
|
!function(t,e,n){var i,s=t.__transition
|
|
13232
|
-
function o(t){n.state=
|
|
13233
|
-
if(n.state!==
|
|
13234
|
-
for(c in s)if((u=s[c]).name===n.name){if(u.state===
|
|
13235
|
-
u.state===
|
|
13236
|
-
i.length=d+1}}function a(e){for(var s=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state
|
|
13237
|
-
n.state
|
|
13238
|
-
delete t.__transition}s[e]=n,n.timer=
|
|
13239
|
-
if(n.state>
|
|
13240
|
-
return n}function
|
|
13241
|
-
if(n.state>
|
|
13242
|
-
return n}function
|
|
13234
|
+
function o(t){n.state=SV,n.timer.restart(r,n.delay,n.time),n.delay<=t&&r(t-n.delay)}function r(o){var c,d,h,u
|
|
13235
|
+
if(n.state!==SV)return l()
|
|
13236
|
+
for(c in s)if((u=s[c]).name===n.name){if(u.state===IV)return wV(r)
|
|
13237
|
+
u.state===MV?(u.state=EV,u.timer.stop(),u.on.call("interrupt",t,t.__data__,u.index,u.group),delete s[c]):+c<e&&(u.state=EV,u.timer.stop(),u.on.call("cancel",t,t.__data__,u.index,u.group),delete s[c])}if(wV((function(){n.state===IV&&(n.state=MV,n.timer.restart(a,n.delay,n.time),a(o))})),n.state=_V,n.on.call("start",t,t.__data__,n.index,n.group),n.state===_V){for(n.state=IV,i=new Array(h=n.tween.length),c=0,d=-1;c<h;++c)(u=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=u)
|
|
13238
|
+
i.length=d+1}}function a(e){for(var s=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=$V,1),o=-1,r=i.length;++o<r;)i[o].call(t,s)
|
|
13239
|
+
n.state===$V&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var i in n.state=EV,n.timer.stop(),delete s[e],s)return
|
|
13240
|
+
delete t.__transition}s[e]=n,n.timer=gV(o,0,n.time)}(t,n,{name:e,index:i,group:s,on:xV,tween:CV,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:kV})}function AV(t,e){var n=OV(t,e)
|
|
13241
|
+
if(n.state>kV)throw new Error("too late; already scheduled")
|
|
13242
|
+
return n}function TV(t,e){var n=OV(t,e)
|
|
13243
|
+
if(n.state>IV)throw new Error("too late; already running")
|
|
13244
|
+
return n}function OV(t,e){var n=t.__transition
|
|
13243
13245
|
if(!n||!(n=n[e]))throw new Error("transition not found")
|
|
13244
|
-
return n}function
|
|
13245
|
-
if(o){for(s in e=null==e?null:e+"",o)(n=o[s]).name===e?(i=n.state>
|
|
13246
|
-
r&&delete t.__transition}}function
|
|
13247
|
-
return function(){var s=
|
|
13246
|
+
return n}function RV(t,e){var n,i,s,o=t.__transition,r=!0
|
|
13247
|
+
if(o){for(s in e=null==e?null:e+"",o)(n=o[s]).name===e?(i=n.state>_V&&n.state<$V,n.state=EV,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[s]):r=!1
|
|
13248
|
+
r&&delete t.__transition}}function FV(t,e){var n,i
|
|
13249
|
+
return function(){var s=TV(this,t),o=s.tween
|
|
13248
13250
|
if(o!==n)for(var r=0,a=(i=n=o).length;r<a;++r)if(i[r].name===e){(i=i.slice()).splice(r,1)
|
|
13249
|
-
break}s.tween=i}}function
|
|
13251
|
+
break}s.tween=i}}function NV(t,e,n){var i,s
|
|
13250
13252
|
if("function"!=typeof n)throw new Error
|
|
13251
|
-
return function(){var o=
|
|
13253
|
+
return function(){var o=TV(this,t),r=o.tween
|
|
13252
13254
|
if(r!==i){s=(i=r).slice()
|
|
13253
13255
|
for(var a={name:e,value:n},l=0,c=s.length;l<c;++l)if(s[l].name===e){s[l]=a
|
|
13254
|
-
break}l===c&&s.push(a)}o.tween=s}}function
|
|
13255
|
-
return t.each((function(){var t=
|
|
13256
|
-
return("number"==typeof e?
|
|
13256
|
+
break}l===c&&s.push(a)}o.tween=s}}function LV(t,e,n){var i=t._id
|
|
13257
|
+
return t.each((function(){var t=TV(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return OV(t,i).value[e]}}function BV(t,e){var n
|
|
13258
|
+
return("number"==typeof e?zz:e instanceof vz?Nz:(n=vz(e))?(e=n,Nz):qz)(t,e)}function PV(t){return function(){this.removeAttribute(t)}}function zV(t){return function(){this.removeAttributeNS(t.space,t.local)}}function VV(t,e,n){var i,s,o=n+""
|
|
13257
13259
|
return function(){var r=this.getAttribute(t)
|
|
13258
|
-
return r===o?null:r===i?s:s=e(i=r,n)}}function
|
|
13260
|
+
return r===o?null:r===i?s:s=e(i=r,n)}}function HV(t,e,n){var i,s,o=n+""
|
|
13259
13261
|
return function(){var r=this.getAttributeNS(t.space,t.local)
|
|
13260
|
-
return r===o?null:r===i?s:s=e(i=r,n)}}function
|
|
13262
|
+
return r===o?null:r===i?s:s=e(i=r,n)}}function UV(t,e,n){var i,s,o
|
|
13261
13263
|
return function(){var r,a,l=n(this)
|
|
13262
13264
|
if(null!=l)return(r=this.getAttribute(t))===(a=l+"")?null:r===i&&a===s?o:(s=a,o=e(i=r,l))
|
|
13263
|
-
this.removeAttribute(t)}}function
|
|
13265
|
+
this.removeAttribute(t)}}function qV(t,e,n){var i,s,o
|
|
13264
13266
|
return function(){var r,a,l=n(this)
|
|
13265
13267
|
if(null!=l)return(r=this.getAttributeNS(t.space,t.local))===(a=l+"")?null:r===i&&a===s?o:(s=a,o=e(i=r,l))
|
|
13266
|
-
this.removeAttributeNS(t.space,t.local)}}function
|
|
13268
|
+
this.removeAttributeNS(t.space,t.local)}}function jV(t,e){var n,i
|
|
13267
13269
|
function s(){var s=e.apply(this,arguments)
|
|
13268
|
-
return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,s)),n}return s._value=e,s}function
|
|
13270
|
+
return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,s)),n}return s._value=e,s}function WV(t,e){var n,i
|
|
13269
13271
|
function s(){var s=e.apply(this,arguments)
|
|
13270
|
-
return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,s)),n}return s._value=e,s}function
|
|
13271
|
-
function
|
|
13272
|
-
function
|
|
13273
|
-
|
|
13274
|
-
"function"!=typeof t&&(t=
|
|
13275
|
-
for(var i=this._groups,s=i.length,o=new Array(s),r=0;r<s;++r)for(var a,l,c=i[r],d=c.length,h=o[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=t.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,
|
|
13276
|
-
return new
|
|
13277
|
-
"function"!=typeof t&&(t=
|
|
13278
|
-
for(var i=this._groups,s=i.length,o=[],r=[],a=0;a<s;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=t.call(l,l.__data__,h,c),f=
|
|
13279
|
-
o.push(p),r.push(l)}return new
|
|
13272
|
+
return s!==i&&(n=(i=s)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,s)),n}return s._value=e,s}function GV(t,e){return function(){AV(this,t).delay=+e.apply(this,arguments)}}function ZV(t,e){return e=+e,function(){AV(this,t).delay=e}}function KV(t,e){return function(){TV(this,t).duration=+e.apply(this,arguments)}}function YV(t,e){return e=+e,function(){TV(this,t).duration=e}}var XV=ZP.prototype.constructor
|
|
13273
|
+
function JV(t){return function(){this.style.removeProperty(t)}}var QV=0
|
|
13274
|
+
function tH(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function eH(){return++QV}var nH=ZP.prototype
|
|
13275
|
+
tH.prototype={constructor:tH,select:function(t){var e=this._name,n=this._id
|
|
13276
|
+
"function"!=typeof t&&(t=qB(t))
|
|
13277
|
+
for(var i=this._groups,s=i.length,o=new Array(s),r=0;r<s;++r)for(var a,l,c=i[r],d=c.length,h=o[r]=new Array(d),u=0;u<d;++u)(a=c[u])&&(l=t.call(a,a.__data__,u,c))&&("__data__"in a&&(l.__data__=a.__data__),h[u]=l,DV(h[u],e,n,u,h,OV(a,n)))
|
|
13278
|
+
return new tH(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id
|
|
13279
|
+
"function"!=typeof t&&(t=WB(t))
|
|
13280
|
+
for(var i=this._groups,s=i.length,o=[],r=[],a=0;a<s;++a)for(var l,c=i[a],d=c.length,h=0;h<d;++h)if(l=c[h]){for(var u,p=t.call(l,l.__data__,h,c),f=OV(l,n),m=0,g=p.length;m<g;++m)(u=p[m])&&DV(u,e,n,m,p,f)
|
|
13281
|
+
o.push(p),r.push(l)}return new tH(o,r,e,n)},selectChild:nH.selectChild,selectChildren:nH.selectChildren,filter:function(t){"function"!=typeof t&&(t=ZB(t))
|
|
13280
13282
|
for(var e=this._groups,n=e.length,i=new Array(n),s=0;s<n;++s)for(var o,r=e[s],a=r.length,l=i[s]=[],c=0;c<a;++c)(o=r[c])&&t.call(o,o.__data__,c,r)&&l.push(o)
|
|
13281
|
-
return new
|
|
13283
|
+
return new tH(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error
|
|
13282
13284
|
for(var e=this._groups,n=t._groups,i=e.length,s=n.length,o=Math.min(i,s),r=new Array(i),a=0;a<o;++a)for(var l,c=e[a],d=n[a],h=c.length,u=r[a]=new Array(h),p=0;p<h;++p)(l=c[p]||d[p])&&(u[p]=l)
|
|
13283
13285
|
for(;a<i;++a)r[a]=e[a]
|
|
13284
|
-
return new
|
|
13285
|
-
|
|
13286
|
-
return arguments.length<2?
|
|
13287
|
-
return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?
|
|
13286
|
+
return new tH(r,this._parents,this._name,this._id)},selection:function(){return new XV(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=eH(),i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)if(r=a[c]){var d=OV(r,e)
|
|
13287
|
+
DV(r,t,n,c,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new tH(i,this._parents,t,n)},call:nH.call,nodes:nH.nodes,node:nH.node,size:nH.size,empty:nH.empty,each:nH.each,on:function(t,e){var n=this._id
|
|
13288
|
+
return arguments.length<2?OV(this.node(),n).on.on(t):this.each(function(t,e,n){var i,s,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".")
|
|
13289
|
+
return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?AV:TV
|
|
13288
13290
|
return function(){var r=o(this,t),a=r.on
|
|
13289
|
-
a!==i&&(s=(i=a).copy()).on(e,n),r.on=s}}(n,t,e))},attr:function(t,e){var n=
|
|
13290
|
-
return this.attrTween(t,"function"==typeof e?(n.local?UV
|
|
13291
|
+
a!==i&&(s=(i=a).copy()).on(e,n),r.on=s}}(n,t,e))},attr:function(t,e){var n=PB(t),i="transform"===n?Qz:BV
|
|
13292
|
+
return this.attrTween(t,"function"==typeof e?(n.local?qV:UV)(n,i,LV(this,"attr."+t,e)):null==e?(n.local?zV:PV)(n):(n.local?HV:VV)(n,i,e))},attrTween:function(t,e){var n="attr."+t
|
|
13291
13293
|
if(arguments.length<2)return(n=this.tween(n))&&n._value
|
|
13292
13294
|
if(null==e)return this.tween(n,null)
|
|
13293
13295
|
if("function"!=typeof e)throw new Error
|
|
13294
|
-
var i=
|
|
13295
|
-
return this.tween(n,(i.local?
|
|
13296
|
+
var i=PB(t)
|
|
13297
|
+
return this.tween(n,(i.local?jV:WV)(i,e))},style:function(t,e,n){var i="transform"==(t+="")?Jz:BV
|
|
13296
13298
|
return null==e?this.styleTween(t,function(t,e){var n,i,s
|
|
13297
|
-
return function(){var o=
|
|
13298
|
-
return o===r?null:o===n&&r===i?s:s=e(n=o,i=r)}}(t,i)).on("end.style."+t,
|
|
13299
|
-
return function(){var r=
|
|
13300
|
-
return null==a&&(this.style.removeProperty(t),l=a=
|
|
13301
|
-
return function(){var l=
|
|
13299
|
+
return function(){var o=vP(this,t),r=(this.style.removeProperty(t),vP(this,t))
|
|
13300
|
+
return o===r?null:o===n&&r===i?s:s=e(n=o,i=r)}}(t,i)).on("end.style."+t,JV(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var i,s,o
|
|
13301
|
+
return function(){var r=vP(this,t),a=n(this),l=a+""
|
|
13302
|
+
return null==a&&(this.style.removeProperty(t),l=a=vP(this,t)),r===l?null:r===i&&l===s?o:(s=l,o=e(i=r,a))}}(t,i,LV(this,"style."+t,e))).each(function(t,e){var n,i,s,o,r="style."+e,a="end."+r
|
|
13303
|
+
return function(){var l=TV(this,t),c=l.on,d=null==l.value[r]?o||(o=JV(e)):void 0
|
|
13302
13304
|
c===n&&s===d||(i=(n=c).copy()).on(a,s=d),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,n){var i,s,o=n+""
|
|
13303
|
-
return function(){var r=
|
|
13305
|
+
return function(){var r=vP(this,t)
|
|
13304
13306
|
return r===o?null:r===i?s:s=e(i=r,n)}}(t,i,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="")
|
|
13305
13307
|
if(arguments.length<2)return(i=this.tween(i))&&i._value
|
|
13306
13308
|
if(null==e)return this.tween(i,null)
|
|
@@ -13308,7 +13310,7 @@ if("function"!=typeof e)throw new Error
|
|
|
13308
13310
|
return this.tween(i,function(t,e,n){var i,s
|
|
13309
13311
|
function o(){var o=e.apply(this,arguments)
|
|
13310
13312
|
return o!==s&&(i=(s=o)&&function(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}(t,o,n)),i}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this)
|
|
13311
|
-
this.textContent=null==e?"":e}}(
|
|
13313
|
+
this.textContent=null==e?"":e}}(LV(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text"
|
|
13312
13314
|
if(arguments.length<1)return(e=this.tween(e))&&e._value
|
|
13313
13315
|
if(null==t)return this.tween(e,null)
|
|
13314
13316
|
if("function"!=typeof t)throw new Error
|
|
@@ -13317,108 +13319,108 @@ function i(){var i=t.apply(this,arguments)
|
|
|
13317
13319
|
return i!==n&&(e=(n=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode
|
|
13318
13320
|
for(var n in this.__transition)if(+n!==t)return
|
|
13319
13321
|
e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id
|
|
13320
|
-
if(t+="",arguments.length<2){for(var i,s=
|
|
13321
|
-
return null}return this.each((null==e?
|
|
13322
|
-
return arguments.length?this.each(("function"==typeof t?
|
|
13323
|
-
return arguments.length?this.each(("function"==typeof t?
|
|
13322
|
+
if(t+="",arguments.length<2){for(var i,s=OV(this.node(),n).tween,o=0,r=s.length;o<r;++o)if((i=s[o]).name===t)return i.value
|
|
13323
|
+
return null}return this.each((null==e?FV:NV)(n,t,e))},delay:function(t){var e=this._id
|
|
13324
|
+
return arguments.length?this.each(("function"==typeof t?GV:ZV)(e,t)):OV(this.node(),e).delay},duration:function(t){var e=this._id
|
|
13325
|
+
return arguments.length?this.each(("function"==typeof t?KV:YV)(e,t)):OV(this.node(),e).duration},ease:function(t){var e=this._id
|
|
13324
13326
|
return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error
|
|
13325
|
-
return function(){
|
|
13327
|
+
return function(){TV(this,t).ease=e}}(e,t)):OV(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error
|
|
13326
13328
|
return this.each(function(t,e){return function(){var n=e.apply(this,arguments)
|
|
13327
13329
|
if("function"!=typeof n)throw new Error
|
|
13328
|
-
|
|
13330
|
+
TV(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,i=n._id,s=n.size()
|
|
13329
13331
|
return new Promise((function(o,r){var a={value:r},l={value:function(){0==--s&&o()}}
|
|
13330
|
-
n.each((function(){var n=
|
|
13331
|
-
s!==t&&((e=(t=s).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===s&&o()}))},[Symbol.iterator]:
|
|
13332
|
-
var
|
|
13333
|
-
function
|
|
13334
|
-
return n}
|
|
13335
|
-
t instanceof
|
|
13336
|
-
for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)(r=a[c])&&
|
|
13337
|
-
return new
|
|
13338
|
-
var
|
|
13339
|
-
function
|
|
13340
|
-
var
|
|
13341
|
-
function
|
|
13342
|
-
return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function
|
|
13343
|
-
return t.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r))}function
|
|
13344
|
-
function v(t){t.property("__zoom",
|
|
13345
|
-
return i===t.x&&s===t.y?t:new
|
|
13332
|
+
n.each((function(){var n=TV(this,i),s=n.on
|
|
13333
|
+
s!==t&&((e=(t=s).copy())._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),n.on=e})),0===s&&o()}))},[Symbol.iterator]:nH[Symbol.iterator]}
|
|
13334
|
+
var iH={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}}
|
|
13335
|
+
function sH(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`)
|
|
13336
|
+
return n}ZP.prototype.interrupt=function(t){return this.each((function(){RV(this,t)}))},ZP.prototype.transition=function(t){var e,n
|
|
13337
|
+
t instanceof tH?(e=t._id,t=t._name):(e=eH(),(n=iH).time=pV(),t=null==t?null:t+"")
|
|
13338
|
+
for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var r,a=i[o],l=a.length,c=0;c<l;++c)(r=a[c])&&DV(r,t,e,c,a,n||sH(r,e))
|
|
13339
|
+
return new tH(i,this._parents,t,e)}
|
|
13340
|
+
var oH=t=>()=>t
|
|
13341
|
+
function rH(t,{sourceEvent:e,target:n,transform:i,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function aH(t,e,n){this.k=t,this.x=e,this.y=n}aH.prototype={constructor:aH,scale:function(t){return 1===t?this:new aH(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new aH(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}}
|
|
13342
|
+
var lH=new aH(1,0,0)
|
|
13343
|
+
function cH(t){t.stopImmediatePropagation()}function dH(t){t.preventDefault(),t.stopImmediatePropagation()}function hH(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function uH(){var t=this
|
|
13344
|
+
return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function pH(){return this.__zoom||lH}function fH(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function mH(){return navigator.maxTouchPoints||"ontouchstart"in this}function gH(t,e,n){var i=t.invertX(e[0][0])-n[0][0],s=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],r=t.invertY(e[1][1])-n[1][1]
|
|
13345
|
+
return t.translate(s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s),r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r))}function vH(){var t,e,n,i=hH,s=uH,o=gH,r=fH,a=mH,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,h=iV,u=OB("start","zoom","end"),p=500,f=150,m=0,g=10
|
|
13346
|
+
function v(t){t.property("__zoom",pH).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",I).filter(a).on("touchstart.zoom",M).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",E).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new aH(e,t.x,t.y)}function y(t,e,n){var i=e[0]-n[0]*t.k,s=e[1]-n[1]*t.k
|
|
13347
|
+
return i===t.x&&s===t.y?t:new aH(t.k,i,s)}function w(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,n,i){t.on("start.zoom",(function(){C(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){C(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,o=arguments,r=C(t,o).event(i),a=s.apply(t,o),l=null==n?w(a):"function"==typeof n?n.apply(t,o):n,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),d=t.__zoom,u="function"==typeof e?e.apply(t,o):e,p=h(d.invert(l).concat(c/d.k),u.invert(l).concat(c/u.k))
|
|
13346
13348
|
return function(t){if(1===t)t=u
|
|
13347
13349
|
else{var e=p(t),n=c/e[2]
|
|
13348
|
-
t=new
|
|
13350
|
+
t=new aH(n,l[0]-e[0]*n,l[1]-e[1]*n)}r.zoom(null,t)}}))}function C(t,e,n){return!n&&t.__zooming||new k(t,e)}function k(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=s.apply(t,e),this.taps=0}function S(t,...e){if(i.apply(this,arguments)){var n=C(this,e).event(t),s=this.__zoom,a=Math.max(l[0],Math.min(l[1],s.k*Math.pow(2,r.apply(this,arguments)))),d=YP(t)
|
|
13349
13351
|
if(n.wheel)n.mouse[0][0]===d[0]&&n.mouse[0][1]===d[1]||(n.mouse[1]=s.invert(n.mouse[0]=d)),clearTimeout(n.wheel)
|
|
13350
13352
|
else{if(s.k===a)return
|
|
13351
|
-
n.mouse=[d,s.invert(d)],
|
|
13352
|
-
r.moved=e*e+n*n>m}r.event(t).zoom("mouse",o(y(r.that.__zoom,r.mouse[0]=
|
|
13353
|
-
e&&(i.on("click.drag",XP
|
|
13354
|
-
!function(t){var e=t.document.documentElement,n=
|
|
13355
|
-
"onselectstart"in e?n.on("selectstart.drag",XP
|
|
13356
|
-
|
|
13357
|
-
for(
|
|
13358
|
-
t&&(t=clearTimeout(t)),o&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),p)),
|
|
13359
|
-
for(
|
|
13353
|
+
n.mouse=[d,s.invert(d)],RV(this),n.start()}dH(t),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",o(y(b(s,a),n.mouse[0],n.mouse[1]),n.extent,c))}}function _(t,...e){if(!n&&i.apply(this,arguments)){var s=t.currentTarget,r=C(this,e,!0).event(t),a=KP(t.view).on("mousemove.zoom",(function(t){if(dH(t),!r.moved){var e=t.clientX-d,n=t.clientY-h
|
|
13354
|
+
r.moved=e*e+n*n>m}r.event(t).zoom("mouse",o(y(r.that.__zoom,r.mouse[0]=YP(t,s),r.mouse[1]),r.extent,c))}),!0).on("mouseup.zoom",(function(t){a.on("mousemove.zoom mouseup.zoom",null),function(t,e){var n=t.document.documentElement,i=KP(t).on("dragstart.drag",null)
|
|
13355
|
+
e&&(i.on("click.drag",JP,XP),setTimeout((function(){i.on("click.drag",null)}),0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,r.moved),dH(t),r.event(t).end()}),!0),l=YP(t,s),d=t.clientX,h=t.clientY
|
|
13356
|
+
!function(t){var e=t.document.documentElement,n=KP(t).on("dragstart.drag",JP,XP)
|
|
13357
|
+
"onselectstart"in e?n.on("selectstart.drag",JP,XP):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(t.view),cH(t),r.mouse=[l,this.__zoom.invert(l)],RV(this),r.start()}}function I(t,...e){if(i.apply(this,arguments)){var n=this.__zoom,r=YP(t.changedTouches?t.changedTouches[0]:t,this),a=n.invert(r),l=n.k*(t.shiftKey?.5:2),h=o(y(b(n,l),r,a),s.apply(this,e),c)
|
|
13358
|
+
dH(t),d>0?KP(this).transition().duration(d).call(x,h,r,t):KP(this).call(v.transform,h,r,t)}}function M(n,...s){if(i.apply(this,arguments)){var o,r,a,l,c=n.touches,d=c.length,h=C(this,s,n.changedTouches.length===d).event(n)
|
|
13359
|
+
for(cH(n),r=0;r<d;++r)l=[l=YP(a=c[r],this),this.__zoom.invert(l),a.identifier],h.touch0?h.touch1||h.touch0[2]===l[2]||(h.touch1=l,h.taps=0):(h.touch0=l,o=!0,h.taps=1+!!t)
|
|
13360
|
+
t&&(t=clearTimeout(t)),o&&(h.taps<2&&(e=l[0],t=setTimeout((function(){t=null}),p)),RV(this),h.start())}}function $(t,...e){if(this.__zooming){var n,i,s,r,a=C(this,e).event(t),l=t.changedTouches,d=l.length
|
|
13361
|
+
for(dH(t),n=0;n<d;++n)s=YP(i=l[n],this),a.touch0&&a.touch0[2]===i.identifier?a.touch0[0]=s:a.touch1&&a.touch1[2]===i.identifier&&(a.touch1[0]=s)
|
|
13360
13362
|
if(i=a.that.__zoom,a.touch1){var h=a.touch0[0],u=a.touch0[1],p=a.touch1[0],f=a.touch1[1],m=(m=p[0]-h[0])*m+(m=p[1]-h[1])*m,g=(g=f[0]-u[0])*g+(g=f[1]-u[1])*g
|
|
13361
13363
|
i=b(i,Math.sqrt(m/g)),s=[(h[0]+p[0])/2,(h[1]+p[1])/2],r=[(u[0]+f[0])/2,(u[1]+f[1])/2]}else{if(!a.touch0)return
|
|
13362
13364
|
s=a.touch0[0],r=a.touch0[1]}a.zoom("touch",o(y(i,s,r),a.extent,c))}}function E(t,...i){if(this.__zooming){var s,o,r=C(this,i).event(t),a=t.changedTouches,l=a.length
|
|
13363
|
-
for(
|
|
13365
|
+
for(cH(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),s=0;s<l;++s)o=a[s],r.touch0&&r.touch0[2]===o.identifier?delete r.touch0:r.touch1&&r.touch1[2]===o.identifier&&delete r.touch1
|
|
13364
13366
|
if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0])
|
|
13365
|
-
else if(r.end(),2===r.taps&&(o=
|
|
13367
|
+
else if(r.end(),2===r.taps&&(o=YP(o,this),Math.hypot(e[0]-o[0],e[1]-o[1])<g)){var c=KP(this).on("dblclick.zoom")
|
|
13366
13368
|
c&&c.apply(this,arguments)}}}return v.transform=function(t,e,n,i){var s=t.selection?t.selection():t
|
|
13367
|
-
s.property("__zoom",
|
|
13369
|
+
s.property("__zoom",pH),t!==s?x(t,e,n,i):s.interrupt().each((function(){C(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},v.scaleBy=function(t,e,n,i){v.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n,i)},v.scaleTo=function(t,e,n,i){v.transform(t,(function(){var t=s.apply(this,arguments),i=this.__zoom,r=null==n?w(t):"function"==typeof n?n.apply(this,arguments):n,a=i.invert(r),l="function"==typeof e?e.apply(this,arguments):e
|
|
13368
13370
|
return o(y(b(i,l),r,a),t,c)}),n,i)},v.translateBy=function(t,e,n,i){v.transform(t,(function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),s.apply(this,arguments),c)}),null,i)},v.translateTo=function(t,e,n,i,r){v.transform(t,(function(){var t=s.apply(this,arguments),r=this.__zoom,a=null==i?w(t):"function"==typeof i?i.apply(this,arguments):i
|
|
13369
|
-
return o(
|
|
13370
|
-
u.call(t,this.that,new
|
|
13371
|
-
return t===u?v:t},v.clickDistance=function(t){return arguments.length?(m=(t=+t)*t,v):Math.sqrt(m)},v.tapDistance=function(t){return arguments.length?(g=+t,v):g},v}
|
|
13372
|
-
const
|
|
13373
|
-
function
|
|
13374
|
-
return o.set(r,n),t}function
|
|
13371
|
+
return o(lH.translate(a[0],a[1]).scale(r.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),i,r)},k.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=KP(this.that).datum()
|
|
13372
|
+
u.call(t,this.that,new rH(t,{sourceEvent:this.sourceEvent,target:v,type:t,transform:this.that.__zoom,dispatch:u}),e)}},v.wheelDelta=function(t){return arguments.length?(r="function"==typeof t?t:oH(+t),v):r},v.filter=function(t){return arguments.length?(i="function"==typeof t?t:oH(!!t),v):i},v.touchable=function(t){return arguments.length?(a="function"==typeof t?t:oH(!!t),v):a},v.extent=function(t){return arguments.length?(s="function"==typeof t?t:oH([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),v):s},v.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],v):[l[0],l[1]]},v.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],v):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},v.constrain=function(t){return arguments.length?(o=t,v):o},v.duration=function(t){return arguments.length?(d=+t,v):d},v.interpolate=function(t){return arguments.length?(h=t,v):h},v.on=function(){var t=u.on.apply(u,arguments)
|
|
13373
|
+
return t===u?v:t},v.clickDistance=function(t){return arguments.length?(m=(t=+t)*t,v):Math.sqrt(m)},v.tapDistance=function(t){return arguments.length?(g=+t,v):g},v}aH.prototype
|
|
13374
|
+
const bH=new TextDecoder("utf-8"),yH=t=>bH.decode(t),wH=new TextEncoder,xH=t=>wH.encode(t),CH=t=>"function"==typeof t,kH=t=>null!=t&&Object(t)===t,SH=t=>kH(t)&&CH(t.then),_H=t=>kH(t)&&CH(t[Symbol.iterator]),IH=t=>kH(t)&&CH(t[Symbol.asyncIterator]),MH=t=>kH(t)&&kH(t.schema),$H=t=>kH(t)&&"done"in t&&"value"in t,EH=t=>kH(t)&&CH(t.stat)&&(t=>"number"==typeof t)(t.fd),DH=t=>kH(t)&&TH(t.body),AH=t=>"_getDOMStream"in t&&"_getNodeStream"in t,TH=t=>kH(t)&&CH(t.cancel)&&CH(t.getReader)&&!AH(t),OH=t=>kH(t)&&CH(t.read)&&CH(t.pipe)&&(t=>"boolean"==typeof t)(t.readable)&&!AH(t),RH=t=>kH(t)&&CH(t.clear)&&CH(t.bytes)&&CH(t.position)&&CH(t.setPosition)&&CH(t.capacity)&&CH(t.getBufferIdentifier)&&CH(t.createLong),FH="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:ArrayBuffer
|
|
13375
|
+
function NH(t,e,n=0,i=e.byteLength){const s=t.byteLength,o=new Uint8Array(t.buffer,t.byteOffset,s),r=new Uint8Array(e.buffer,e.byteOffset,Math.min(i,s))
|
|
13376
|
+
return o.set(r,n),t}function LH(t,e){const n=function(t){const e=t[0]?[t[0]]:[]
|
|
13375
13377
|
let n,i,s,o
|
|
13376
13378
|
for(let r,a,l=0,c=0,d=t.length;++l<d;)r=e[c],a=t[l],!r||!a||r.buffer!==a.buffer||a.byteOffset<r.byteOffset?a&&(e[++c]=a):(({byteOffset:n,byteLength:s}=r),({byteOffset:i,byteLength:o}=a),n+s<i||i+o<n?a&&(e[++c]=a):e[c]=new Uint8Array(r.buffer,n,i-n+o))
|
|
13377
13379
|
return e}(t),i=n.reduce(((t,e)=>t+e.byteLength),0)
|
|
13378
13380
|
let s,o,r,a=0,l=-1
|
|
13379
13381
|
const c=Math.min(e||Number.POSITIVE_INFINITY,i)
|
|
13380
|
-
for(const t=n.length;++l<t;){if(s=n[l],o=s.subarray(0,Math.min(s.length,c-a)),c<=a+o.length){o.length<s.length?n[l]=s.subarray(o.length):o.length===s.length&&l++,r?
|
|
13381
|
-
break}
|
|
13382
|
-
return n instanceof t?t===Uint8Array?new t(n.buffer,n.byteOffset,n.byteLength):n:n?("string"==typeof n&&(n=
|
|
13383
|
-
const
|
|
13384
|
-
return yield*
|
|
13385
|
-
do{n=e.next(yield
|
|
13386
|
-
function
|
|
13387
|
-
const n=function(t){return s(this,arguments,(function*(){yield yield i(yield i(t))}))},a="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof
|
|
13388
|
-
do{e=t.next(yield null==e?void 0:e.value)}while(!e.done)}(t[Symbol.iterator]())))))}))}(e):
|
|
13389
|
-
return yield i(yield*o(r(
|
|
13390
|
-
do{n=yield i(e.next(yield yield i(
|
|
13391
|
-
var
|
|
13392
|
-
function l(){return"peek"===i?
|
|
13393
|
-
const c=
|
|
13394
|
-
try{do{if(({done:e,value:n}=Number.isNaN(s-a)?c.next():c.next(s-a)),!e&&n.byteLength>0&&(r.push(n),a+=n.byteLength),e||s<=a)do{({cmd:i,size:s}=yield l())}while(s<a)}while(!e)}catch(t){(o=!0)&&"function"==typeof c.throw&&c.throw(t)}finally{!1===o&&"function"==typeof c.return&&c.return(null)}return null}(t)),fromAsyncIterable:t=>
|
|
13395
|
-
function c(){return"peek"===s?
|
|
13396
|
-
const d=
|
|
13397
|
-
try{do{if(({done:e,value:n}=Number.isNaN(o-l)?yield i(d.next()):yield i(d.next(o-l))),!e&&n.byteLength>0&&(a.push(n),l+=n.byteLength),e||o<=l)do{({cmd:s,size:o}=yield yield i(c()))}while(o<l)}while(!e)}catch(t){(r=!0)&&"function"==typeof d.throw&&(yield i(d.throw(t)))}finally{!1===r&&"function"==typeof d.return&&(yield i(d.return(new Uint8Array(0))))}return yield i(null)}))}(t)),fromDOMStream:t=>
|
|
13398
|
-
function c(){return"peek"===n?
|
|
13399
|
-
const d=new
|
|
13400
|
-
try{do{if(({done:o,value:e}=Number.isNaN(s-l)?yield i(d.read()):yield i(d.read(s-l))),!o&&e.byteLength>0&&(a.push(
|
|
13382
|
+
for(const t=n.length;++l<t;){if(s=n[l],o=s.subarray(0,Math.min(s.length,c-a)),c<=a+o.length){o.length<s.length?n[l]=s.subarray(o.length):o.length===s.length&&l++,r?NH(r,o,a):r=o
|
|
13383
|
+
break}NH(r||(r=new Uint8Array(c)),o,a),a+=o.length}return[r||new Uint8Array(0),n.slice(l),i-(r?r.byteLength:0)]}function BH(t,e){let n=$H(e)?e.value:e
|
|
13384
|
+
return n instanceof t?t===Uint8Array?new t(n.buffer,n.byteOffset,n.byteLength):n:n?("string"==typeof n&&(n=xH(n)),n instanceof ArrayBuffer||n instanceof FH?new t(n):RH(n)?BH(t,n.bytes()):ArrayBuffer.isView(n)?n.byteLength<=0?new t(0):new t(n.buffer,n.byteOffset,n.byteLength/t.BYTES_PER_ELEMENT):t.from(n)):new t(0)}const PH=t=>BH(Int32Array,t),zH=t=>BH(BigInt64Array,t),VH=t=>BH(Uint8Array,t),HH=t=>(t.next(),t)
|
|
13385
|
+
const UH=t=>function*(t,e){const n=function*(t){yield t},i="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof FH?n(e):_H(e)?e:n(e)
|
|
13386
|
+
return yield*HH(function*(e){let n=null
|
|
13387
|
+
do{n=e.next(yield BH(t,n))}while(!n.done)}(i[Symbol.iterator]())),new t}(Uint8Array,t)
|
|
13388
|
+
function qH(t,e){return s(this,arguments,(function*(){if(SH(e))return yield i(yield i(yield*o(r(qH(t,yield i(e))))))
|
|
13389
|
+
const n=function(t){return s(this,arguments,(function*(){yield yield i(yield i(t))}))},a="string"==typeof e||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof FH?n(e):_H(e)?function(t){return s(this,arguments,(function*(){yield i(yield*o(r(HH(function*(t){let e=null
|
|
13390
|
+
do{e=t.next(yield null==e?void 0:e.value)}while(!e.done)}(t[Symbol.iterator]())))))}))}(e):IH(e)?e:n(e)
|
|
13391
|
+
return yield i(yield*o(r(HH(function(e){return s(this,arguments,(function*(){let n=null
|
|
13392
|
+
do{n=yield i(e.next(yield yield i(BH(t,n))))}while(!n.done)}))}(a[Symbol.asyncIterator]()))))),yield i(new t)}))}const jH=t=>qH(Uint8Array,t)
|
|
13393
|
+
var WH={fromIterable:t=>GH(function*(t){let e,n,i,s,o=!1,r=[],a=0
|
|
13394
|
+
function l(){return"peek"===i?LH(r,s)[0]:([n,r,a]=LH(r,s),n)}({cmd:i,size:s}=(yield null)||{cmd:"read",size:0})
|
|
13395
|
+
const c=UH(t)[Symbol.iterator]()
|
|
13396
|
+
try{do{if(({done:e,value:n}=Number.isNaN(s-a)?c.next():c.next(s-a)),!e&&n.byteLength>0&&(r.push(n),a+=n.byteLength),e||s<=a)do{({cmd:i,size:s}=yield l())}while(s<a)}while(!e)}catch(t){(o=!0)&&"function"==typeof c.throw&&c.throw(t)}finally{!1===o&&"function"==typeof c.return&&c.return(null)}return null}(t)),fromAsyncIterable:t=>GH(function(t){return s(this,arguments,(function*(){let e,n,s,o,r=!1,a=[],l=0
|
|
13397
|
+
function c(){return"peek"===s?LH(a,o)[0]:([n,a,l]=LH(a,o),n)}({cmd:s,size:o}=(yield yield i(null))||{cmd:"read",size:0})
|
|
13398
|
+
const d=jH(t)[Symbol.asyncIterator]()
|
|
13399
|
+
try{do{if(({done:e,value:n}=Number.isNaN(o-l)?yield i(d.next()):yield i(d.next(o-l))),!e&&n.byteLength>0&&(a.push(n),l+=n.byteLength),e||o<=l)do{({cmd:s,size:o}=yield yield i(c()))}while(o<l)}while(!e)}catch(t){(r=!0)&&"function"==typeof d.throw&&(yield i(d.throw(t)))}finally{!1===r&&"function"==typeof d.return&&(yield i(d.return(new Uint8Array(0))))}return yield i(null)}))}(t)),fromDOMStream:t=>GH(function(t){return s(this,arguments,(function*(){let e,n,s,o=!1,r=!1,a=[],l=0
|
|
13400
|
+
function c(){return"peek"===n?LH(a,s)[0]:([e,a,l]=LH(a,s),e)}({cmd:n,size:s}=(yield yield i(null))||{cmd:"read",size:0})
|
|
13401
|
+
const d=new ZH(t)
|
|
13402
|
+
try{do{if(({done:o,value:e}=Number.isNaN(s-l)?yield i(d.read()):yield i(d.read(s-l))),!o&&e.byteLength>0&&(a.push(VH(e)),l+=e.byteLength),o||s<=l)do{({cmd:n,size:s}=yield yield i(c()))}while(s<l)}while(!o)}catch(t){(r=!0)&&(yield i(d.cancel(t)))}finally{!1===r?yield i(d.cancel()):t.locked&&d.releaseLock()}return yield i(null)}))}(t)),fromNodeStream:t=>GH(function(t){return s(this,arguments,(function*(){const e=[]
|
|
13401
13403
|
let n,s,o,r="error",a=!1,l=null,c=0,d=[]
|
|
13402
|
-
function h(){return"peek"===n?
|
|
13403
|
-
try{e[0]=
|
|
13404
|
-
do{if(e[2]=
|
|
13405
|
-
if((a="end"===r)||(Number.isFinite(s-c)?(o=
|
|
13404
|
+
function h(){return"peek"===n?LH(d,s)[0]:([o,d,c]=LH(d,s),o)}if(({cmd:n,size:s}=(yield yield i(null))||{cmd:"read",size:0}),t.isTTY)return yield yield i(new Uint8Array(0)),yield i(null)
|
|
13405
|
+
try{e[0]=KH(t,"end"),e[1]=KH(t,"error")
|
|
13406
|
+
do{if(e[2]=KH(t,"readable"),[r,l]=yield i(Promise.race(e.map((t=>t[2])))),"error"===r)break
|
|
13407
|
+
if((a="end"===r)||(Number.isFinite(s-c)?(o=VH(t.read(s-c)),o.byteLength<s-c&&(o=VH(t.read()))):o=VH(t.read()),o.byteLength>0&&(d.push(o),c+=o.byteLength)),a||s<=c)do{({cmd:n,size:s}=yield yield i(h()))}while(s<c)}while(!a)}finally{yield i(u(e,"error"===r?l:null))}return yield i(null)
|
|
13406
13408
|
function u(e,n){return o=d=null,new Promise(((i,s)=>{for(const[n,i]of e)t.off(n,i)
|
|
13407
13409
|
try{const e=t.destroy
|
|
13408
13410
|
e&&e.call(t,n),n=void 0}catch(t){n=t||n}finally{null!=n?s(n):i()}}))}}))}(t)),toDOMStream(t,e){throw new Error('"toDOMStream" not available in this environment')},toNodeStream(t,e){throw new Error('"toNodeStream" not available in this environment')}}
|
|
13409
|
-
const
|
|
13410
|
-
class
|
|
13411
|
+
const GH=t=>(t.next(),t)
|
|
13412
|
+
class ZH{constructor(t){this.source=t,this.reader=null,this.reader=this.source.getReader(),this.reader.closed.catch((()=>{}))}get closed(){return this.reader?this.reader.closed.catch((()=>{})):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(t){return e(this,void 0,void 0,(function*(){const{reader:e,source:n}=this
|
|
13411
13413
|
e&&(yield e.cancel(t).catch((()=>{}))),n&&n.locked&&this.releaseLock()}))}read(t){return e(this,void 0,void 0,(function*(){if(0===t)return{done:null==this.reader,value:new Uint8Array(0)}
|
|
13412
13414
|
const e=yield this.reader.read()
|
|
13413
|
-
return!e.done&&(e.value=
|
|
13415
|
+
return!e.done&&(e.value=VH(e)),e}))}}const KH=(t,e)=>{const n=t=>i([e,t])
|
|
13414
13416
|
let i
|
|
13415
13417
|
return[e,n,new Promise((s=>(i=s)&&t.once(e,n)))]}
|
|
13416
|
-
var
|
|
13417
|
-
!function(t){t[t.V1=0]="V1",t[t.V2=1]="V2",t[t.V3=2]="V3",t[t.V4=3]="V4",t[t.V5=4]="V5"}(
|
|
13418
|
-
const
|
|
13419
|
-
var
|
|
13420
|
-
!function(t){t[t.UTF8_BYTES=1]="UTF8_BYTES",t[t.UTF16_STRING=2]="UTF16_STRING"}(
|
|
13421
|
-
let
|
|
13418
|
+
var YH,XH,JH,QH,tU,eU
|
|
13419
|
+
!function(t){t[t.V1=0]="V1",t[t.V2=1]="V2",t[t.V3=2]="V3",t[t.V4=3]="V4",t[t.V5=4]="V5"}(YH||(YH={})),function(t){t[t.Sparse=0]="Sparse",t[t.Dense=1]="Dense"}(XH||(XH={})),function(t){t[t.HALF=0]="HALF",t[t.SINGLE=1]="SINGLE",t[t.DOUBLE=2]="DOUBLE"}(JH||(JH={})),function(t){t[t.DAY=0]="DAY",t[t.MILLISECOND=1]="MILLISECOND"}(QH||(QH={})),function(t){t[t.SECOND=0]="SECOND",t[t.MILLISECOND=1]="MILLISECOND",t[t.MICROSECOND=2]="MICROSECOND",t[t.NANOSECOND=3]="NANOSECOND"}(tU||(tU={})),function(t){t[t.YEAR_MONTH=0]="YEAR_MONTH",t[t.DAY_TIME=1]="DAY_TIME",t[t.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"}(eU||(eU={}))
|
|
13420
|
+
const nU=new Int32Array(2),iU=new Float32Array(nU.buffer),sU=new Float64Array(nU.buffer),oU=1===new Uint16Array(new Uint8Array([1,0]).buffer)[0]
|
|
13421
|
+
var rU
|
|
13422
|
+
!function(t){t[t.UTF8_BYTES=1]="UTF8_BYTES",t[t.UTF16_STRING=2]="UTF16_STRING"}(rU||(rU={}))
|
|
13423
|
+
let aU=class t{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new t(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<<BigInt(32)))}readUint64(t){return BigInt.asUintN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<<BigInt(32)))}readFloat32(t){return nU[0]=this.readInt32(t),iU[0]}readFloat64(t){return nU[oU?0:1]=this.readInt32(t),nU[oU?1:0]=this.readInt32(t+4),sU[0]}writeInt8(t,e){this.bytes_[t]=e}writeUint8(t,e){this.bytes_[t]=e}writeInt16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeUint16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeInt32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeUint32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeInt64(t,e){this.writeInt32(t,Number(BigInt.asIntN(32,e))),this.writeInt32(t+4,Number(BigInt.asIntN(32,e>>BigInt(32))))}writeUint64(t,e){this.writeUint32(t,Number(BigInt.asUintN(32,e))),this.writeUint32(t+4,Number(BigInt.asUintN(32,e>>BigInt(32))))}writeFloat32(t,e){iU[0]=e,this.writeInt32(t,nU[0])}writeFloat64(t,e){sU[0]=e,this.writeInt32(t,nU[oU?0:1]),this.writeInt32(t+4,nU[oU?1:0])}getBufferIdentifier(){if(this.bytes_.length<this.position_+4+4)throw new Error("FlatBuffers: ByteBuffer is too short to contain an identifier.")
|
|
13422
13424
|
let t=""
|
|
13423
13425
|
for(let e=0;e<4;e++)t+=String.fromCharCode(this.readInt8(this.position_+4+e))
|
|
13424
13426
|
return t}__offset(t,e){const n=t-this.readInt32(t)
|
|
@@ -13426,19 +13428,19 @@ return e<this.readInt16(n)?this.readInt16(n+e):0}__union(t,e){return t.bb_pos=e+
|
|
|
13426
13428
|
const n=this.readInt32(t)
|
|
13427
13429
|
t+=4
|
|
13428
13430
|
const i=this.bytes_.subarray(t,t+n)
|
|
13429
|
-
return e===
|
|
13431
|
+
return e===rU.UTF8_BYTES?i:this.text_decoder_.decode(i)}__union_with_string(t,e){return"string"==typeof t?this.__string(e):this.__union(t,e)}__indirect(t){return t+this.readInt32(t)}__vector(t){return t+this.readInt32(t)+4}__vector_len(t){return this.readInt32(t+this.readInt32(t))}__has_identifier(t){if(4!=t.length)throw new Error("FlatBuffers: file identifier must be length 4")
|
|
13430
13432
|
for(let e=0;e<4;e++)if(t.charCodeAt(e)!=this.readInt8(this.position()+4+e))return!1
|
|
13431
13433
|
return!0}createScalarList(t,e){const n=[]
|
|
13432
13434
|
for(let i=0;i<e;++i){const e=t(i)
|
|
13433
13435
|
null!==e&&n.push(e)}return n}createObjList(t,e){const n=[]
|
|
13434
13436
|
for(let i=0;i<e;++i){const e=t(i)
|
|
13435
|
-
null!==e&&n.push(e.unpack())}return n}},
|
|
13436
|
-
this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,this.text_encoder=new TextEncoder,e=t||1024,this.bb=
|
|
13437
|
+
null!==e&&n.push(e.unpack())}return n}},lU=class t{constructor(t){let e
|
|
13438
|
+
this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,this.text_encoder=new TextEncoder,e=t||1024,this.bb=aU.allocate(e),this.space=e}clear(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null}forceDefaults(t){this.force_defaults=t}dataBuffer(){return this.bb}asUint8Array(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())}prep(e,n){e>this.minalign&&(this.minalign=e)
|
|
13437
13439
|
const i=1+~(this.bb.capacity()-this.space+n)&e-1
|
|
13438
13440
|
for(;this.space<i+e+n;){const e=this.bb.capacity()
|
|
13439
13441
|
this.bb=t.growByteBuffer(this.bb),this.space+=this.bb.capacity()-e}this.pad(i)}pad(t){for(let e=0;e<t;e++)this.bb.writeInt8(--this.space,0)}writeInt8(t){this.bb.writeInt8(this.space-=1,t)}writeInt16(t){this.bb.writeInt16(this.space-=2,t)}writeInt32(t){this.bb.writeInt32(this.space-=4,t)}writeInt64(t){this.bb.writeInt64(this.space-=8,t)}writeFloat32(t){this.bb.writeFloat32(this.space-=4,t)}writeFloat64(t){this.bb.writeFloat64(this.space-=8,t)}addInt8(t){this.prep(1,0),this.writeInt8(t)}addInt16(t){this.prep(2,0),this.writeInt16(t)}addInt32(t){this.prep(4,0),this.writeInt32(t)}addInt64(t){this.prep(8,0),this.writeInt64(t)}addFloat32(t){this.prep(4,0),this.writeFloat32(t)}addFloat64(t){this.prep(8,0),this.writeFloat64(t)}addFieldInt8(t,e,n){(this.force_defaults||e!=n)&&(this.addInt8(e),this.slot(t))}addFieldInt16(t,e,n){(this.force_defaults||e!=n)&&(this.addInt16(e),this.slot(t))}addFieldInt32(t,e,n){(this.force_defaults||e!=n)&&(this.addInt32(e),this.slot(t))}addFieldInt64(t,e,n){(this.force_defaults||e!==n)&&(this.addInt64(e),this.slot(t))}addFieldFloat32(t,e,n){(this.force_defaults||e!=n)&&(this.addFloat32(e),this.slot(t))}addFieldFloat64(t,e,n){(this.force_defaults||e!=n)&&(this.addFloat64(e),this.slot(t))}addFieldOffset(t,e,n){(this.force_defaults||e!=n)&&(this.addOffset(e),this.slot(t))}addFieldStruct(t,e,n){e!=n&&(this.nested(e),this.slot(t))}nested(t){if(t!=this.offset())throw new TypeError("FlatBuffers: struct must be serialized inline.")}notNested(){if(this.isNested)throw new TypeError("FlatBuffers: object serialization must not be nested.")}slot(t){null!==this.vtable&&(this.vtable[t]=this.offset())}offset(){return this.bb.capacity()-this.space}static growByteBuffer(t){const e=t.capacity()
|
|
13440
13442
|
if(3221225472&e)throw new Error("FlatBuffers: cannot grow buffer beyond 2 gigabytes.")
|
|
13441
|
-
const n=e<<1,i=
|
|
13443
|
+
const n=e<<1,i=aU.allocate(n)
|
|
13442
13444
|
return i.setPosition(n-e),i.bytes().set(t.bytes(),n-e),i}addOffset(t){this.prep(4,0),this.writeInt32(this.offset()-t+4)}startObject(t){this.notNested(),null==this.vtable&&(this.vtable=[]),this.vtable_in_use=t
|
|
13443
13445
|
for(let e=0;e<t;e++)this.vtable[e]=0
|
|
13444
13446
|
this.isNested=!0,this.object_start=this.offset()}endObject(){if(null==this.vtable||!this.isNested)throw new Error("FlatBuffers: endObject called without startObject")
|
|
@@ -13468,105 +13470,105 @@ return e=t instanceof Uint8Array?t:this.text_encoder.encode(t),this.addInt8(0),t
|
|
|
13468
13470
|
for(let n=0;n<t.length;++n){const i=t[n]
|
|
13469
13471
|
if(null===i)throw new TypeError("FlatBuffers: Argument for createObjectOffsetList cannot contain null.")
|
|
13470
13472
|
e.push(this.createObjectOffset(i))}return e}createStructOffsetList(t,e){return e(this,t.length),this.createObjectOffsetList(t.slice().reverse()),this.endVector()}}
|
|
13471
|
-
var
|
|
13472
|
-
!function(t){t[t.BUFFER=0]="BUFFER"}(
|
|
13473
|
-
class
|
|
13474
|
-
return t?this.bb.readInt8(this.bb_pos+t):
|
|
13475
|
-
return t?this.bb.readInt8(this.bb_pos+t):
|
|
13473
|
+
var cU,dU
|
|
13474
|
+
!function(t){t[t.BUFFER=0]="BUFFER"}(cU||(cU={})),function(t){t[t.LZ4_FRAME=0]="LZ4_FRAME",t[t.ZSTD=1]="ZSTD"}(dU||(dU={}))
|
|
13475
|
+
class hU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBodyCompression(t,e){return(e||new hU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsBodyCompression(t,e){return t.setPosition(t.position()+4),(e||new hU).__init(t.readInt32(t.position())+t.position(),t)}codec(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13476
|
+
return t?this.bb.readInt8(this.bb_pos+t):dU.LZ4_FRAME}method(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13477
|
+
return t?this.bb.readInt8(this.bb_pos+t):cU.BUFFER}static startBodyCompression(t){t.startObject(2)}static addCodec(t,e){t.addFieldInt8(0,e,dU.LZ4_FRAME)}static addMethod(t,e){t.addFieldInt8(1,e,cU.BUFFER)}static endBodyCompression(t){return t.endObject()}static createBodyCompression(t,e,n){return hU.startBodyCompression(t),hU.addCodec(t,e),hU.addMethod(t,n),hU.endBodyCompression(t)}}class uU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}length(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createBuffer(t,e,n){return t.prep(8,16),t.writeInt64(BigInt(null!=n?n:0)),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}}let pU=class{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}length(){return this.bb.readInt64(this.bb_pos)}nullCount(){return this.bb.readInt64(this.bb_pos+8)}static sizeOf(){return 16}static createFieldNode(t,e,n){return t.prep(8,16),t.writeInt64(BigInt(null!=n?n:0)),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}},fU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsRecordBatch(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsRecordBatch(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}length(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13476
13478
|
return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}nodes(t,e){const n=this.bb.__offset(this.bb_pos,6)
|
|
13477
|
-
return n?(e||new
|
|
13479
|
+
return n?(e||new pU).__init(this.bb.__vector(this.bb_pos+n)+16*t,this.bb):null}nodesLength(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13478
13480
|
return t?this.bb.__vector_len(this.bb_pos+t):0}buffers(t,e){const n=this.bb.__offset(this.bb_pos,8)
|
|
13479
|
-
return n?(e||new
|
|
13481
|
+
return n?(e||new uU).__init(this.bb.__vector(this.bb_pos+n)+16*t,this.bb):null}buffersLength(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13480
13482
|
return t?this.bb.__vector_len(this.bb_pos+t):0}compression(t){const e=this.bb.__offset(this.bb_pos,10)
|
|
13481
|
-
return e?(t||new
|
|
13483
|
+
return e?(t||new hU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}static startRecordBatch(t){t.startObject(4)}static addLength(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addNodes(t,e){t.addFieldOffset(1,e,0)}static startNodesVector(t,e){t.startVector(16,e,8)}static addBuffers(t,e){t.addFieldOffset(2,e,0)}static startBuffersVector(t,e){t.startVector(16,e,8)}static addCompression(t,e){t.addFieldOffset(3,e,0)}static endRecordBatch(t){return t.endObject()}},mU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDictionaryBatch(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDictionaryBatch(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}id(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13482
13484
|
return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}data(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13483
|
-
return e?(t||new
|
|
13485
|
+
return e?(t||new fU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}isDelta(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13484
13486
|
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startDictionaryBatch(t){t.startObject(3)}static addId(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addData(t,e){t.addFieldOffset(1,e,0)}static addIsDelta(t,e){t.addFieldInt8(2,+e,0)}static endDictionaryBatch(t){return t.endObject()}}
|
|
13485
|
-
var
|
|
13486
|
-
!function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"}(
|
|
13487
|
-
class
|
|
13487
|
+
var gU,vU
|
|
13488
|
+
!function(t){t[t.Little=0]="Little",t[t.Big=1]="Big"}(gU||(gU={})),function(t){t[t.DenseArray=0]="DenseArray"}(vU||(vU={}))
|
|
13489
|
+
class bU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsInt(t,e){return(e||new bU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInt(t,e){return t.setPosition(t.position()+4),(e||new bU).__init(t.readInt32(t.position())+t.position(),t)}bitWidth(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13488
13490
|
return t?this.bb.readInt32(this.bb_pos+t):0}isSigned(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13489
|
-
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startInt(t){t.startObject(2)}static addBitWidth(t,e){t.addFieldInt32(0,e,0)}static addIsSigned(t,e){t.addFieldInt8(1,+e,0)}static endInt(t){return t.endObject()}static createInt(t,e,n){return
|
|
13491
|
+
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startInt(t){t.startObject(2)}static addBitWidth(t,e){t.addFieldInt32(0,e,0)}static addIsSigned(t,e){t.addFieldInt8(1,+e,0)}static endInt(t){return t.endObject()}static createInt(t,e,n){return bU.startInt(t),bU.addBitWidth(t,e),bU.addIsSigned(t,n),bU.endInt(t)}}class yU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDictionaryEncoding(t,e){return(e||new yU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsDictionaryEncoding(t,e){return t.setPosition(t.position()+4),(e||new yU).__init(t.readInt32(t.position())+t.position(),t)}id(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13490
13492
|
return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}indexType(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13491
|
-
return e?(t||new
|
|
13493
|
+
return e?(t||new bU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}isOrdered(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13492
13494
|
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}dictionaryKind(){const t=this.bb.__offset(this.bb_pos,10)
|
|
13493
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13495
|
+
return t?this.bb.readInt16(this.bb_pos+t):vU.DenseArray}static startDictionaryEncoding(t){t.startObject(4)}static addId(t,e){t.addFieldInt64(0,e,BigInt("0"))}static addIndexType(t,e){t.addFieldOffset(1,e,0)}static addIsOrdered(t,e){t.addFieldInt8(2,+e,0)}static addDictionaryKind(t,e){t.addFieldInt16(3,e,vU.DenseArray)}static endDictionaryEncoding(t){return t.endObject()}}class wU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsKeyValue(t,e){return(e||new wU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsKeyValue(t,e){return t.setPosition(t.position()+4),(e||new wU).__init(t.readInt32(t.position())+t.position(),t)}key(t){const e=this.bb.__offset(this.bb_pos,4)
|
|
13494
13496
|
return e?this.bb.__string(this.bb_pos+e,t):null}value(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13495
|
-
return e?this.bb.__string(this.bb_pos+e,t):null}static startKeyValue(t){t.startObject(2)}static addKey(t,e){t.addFieldOffset(0,e,0)}static addValue(t,e){t.addFieldOffset(1,e,0)}static endKeyValue(t){return t.endObject()}static createKeyValue(t,e,n){return
|
|
13496
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13497
|
+
return e?this.bb.__string(this.bb_pos+e,t):null}static startKeyValue(t){t.startObject(2)}static addKey(t,e){t.addFieldOffset(0,e,0)}static addValue(t,e){t.addFieldOffset(1,e,0)}static endKeyValue(t){return t.endObject()}static createKeyValue(t,e,n){return wU.startKeyValue(t),wU.addKey(t,e),wU.addValue(t,n),wU.endKeyValue(t)}}let xU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBinary(t){t.startObject(0)}static endBinary(t){return t.endObject()}static createBinary(e){return t.startBinary(e),t.endBinary(e)}},CU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsBool(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsBool(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startBool(t){t.startObject(0)}static endBool(t){return t.endObject()}static createBool(e){return t.startBool(e),t.endBool(e)}},kU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDate(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDate(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13498
|
+
return t?this.bb.readInt16(this.bb_pos+t):QH.MILLISECOND}static startDate(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,QH.MILLISECOND)}static endDate(t){return t.endObject()}static createDate(e,n){return t.startDate(e),t.addUnit(e,n),t.endDate(e)}},SU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDecimal(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDecimal(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}precision(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13497
13499
|
return t?this.bb.readInt32(this.bb_pos+t):0}scale(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13498
13500
|
return t?this.bb.readInt32(this.bb_pos+t):0}bitWidth(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13499
|
-
return t?this.bb.readInt32(this.bb_pos+t):128}static startDecimal(t){t.startObject(3)}static addPrecision(t,e){t.addFieldInt32(0,e,0)}static addScale(t,e){t.addFieldInt32(1,e,0)}static addBitWidth(t,e){t.addFieldInt32(2,e,128)}static endDecimal(t){return t.endObject()}static createDecimal(e,n,i,s){return t.startDecimal(e),t.addPrecision(e,n),t.addScale(e,i),t.addBitWidth(e,s),t.endDecimal(e)}},
|
|
13500
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13501
|
-
return t?this.bb.readInt32(this.bb_pos+t):0}static startFixedSizeBinary(t){t.startObject(1)}static addByteWidth(t,e){t.addFieldInt32(0,e,0)}static endFixedSizeBinary(t){return t.endObject()}static createFixedSizeBinary(e,n){return t.startFixedSizeBinary(e),t.addByteWidth(e,n),t.endFixedSizeBinary(e)}},
|
|
13501
|
+
return t?this.bb.readInt32(this.bb_pos+t):128}static startDecimal(t){t.startObject(3)}static addPrecision(t,e){t.addFieldInt32(0,e,0)}static addScale(t,e){t.addFieldInt32(1,e,0)}static addBitWidth(t,e){t.addFieldInt32(2,e,128)}static endDecimal(t){return t.endObject()}static createDecimal(e,n,i,s){return t.startDecimal(e),t.addPrecision(e,n),t.addScale(e,i),t.addBitWidth(e,s),t.endDecimal(e)}},_U=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsDuration(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsDuration(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13502
|
+
return t?this.bb.readInt16(this.bb_pos+t):tU.MILLISECOND}static startDuration(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,tU.MILLISECOND)}static endDuration(t){return t.endObject()}static createDuration(e,n){return t.startDuration(e),t.addUnit(e,n),t.endDuration(e)}},IU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFixedSizeBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}byteWidth(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13503
|
+
return t?this.bb.readInt32(this.bb_pos+t):0}static startFixedSizeBinary(t){t.startObject(1)}static addByteWidth(t,e){t.addFieldInt32(0,e,0)}static endFixedSizeBinary(t){return t.endObject()}static createFixedSizeBinary(e,n){return t.startFixedSizeBinary(e),t.addByteWidth(e,n),t.endFixedSizeBinary(e)}},MU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFixedSizeList(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFixedSizeList(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}listSize(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13502
13504
|
return t?this.bb.readInt32(this.bb_pos+t):0}static startFixedSizeList(t){t.startObject(1)}static addListSize(t,e){t.addFieldInt32(0,e,0)}static endFixedSizeList(t){return t.endObject()}static createFixedSizeList(e,n){return t.startFixedSizeList(e),t.addListSize(e,n),t.endFixedSizeList(e)}}
|
|
13503
|
-
class
|
|
13504
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13505
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13506
|
-
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startMap(t){t.startObject(1)}static addKeysSorted(t,e){t.addFieldInt8(0,+e,0)}static endMap(t){return t.endObject()}static createMap(e,n){return t.startMap(e),t.addKeysSorted(e,n),t.endMap(e)}},
|
|
13507
|
-
class
|
|
13508
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13509
|
-
return t?this.bb.readInt32(this.bb_pos+t):32}static startTime(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,
|
|
13510
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13511
|
-
return e?this.bb.__string(this.bb_pos+e,t):null}static startTimestamp(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,
|
|
13512
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13505
|
+
class $U{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFloatingPoint(t,e){return(e||new $U).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFloatingPoint(t,e){return t.setPosition(t.position()+4),(e||new $U).__init(t.readInt32(t.position())+t.position(),t)}precision(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13506
|
+
return t?this.bb.readInt16(this.bb_pos+t):JH.HALF}static startFloatingPoint(t){t.startObject(1)}static addPrecision(t,e){t.addFieldInt16(0,e,JH.HALF)}static endFloatingPoint(t){return t.endObject()}static createFloatingPoint(t,e){return $U.startFloatingPoint(t),$U.addPrecision(t,e),$U.endFloatingPoint(t)}}class EU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsInterval(t,e){return(e||new EU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsInterval(t,e){return t.setPosition(t.position()+4),(e||new EU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13507
|
+
return t?this.bb.readInt16(this.bb_pos+t):eU.YEAR_MONTH}static startInterval(t){t.startObject(1)}static addUnit(t,e){t.addFieldInt16(0,e,eU.YEAR_MONTH)}static endInterval(t){return t.endObject()}static createInterval(t,e){return EU.startInterval(t),EU.addUnit(t,e),EU.endInterval(t)}}let DU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsLargeBinary(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeBinary(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeBinary(t){t.startObject(0)}static endLargeBinary(t){return t.endObject()}static createLargeBinary(e){return t.startLargeBinary(e),t.endLargeBinary(e)}},AU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsLargeUtf8(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsLargeUtf8(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startLargeUtf8(t){t.startObject(0)}static endLargeUtf8(t){return t.endObject()}static createLargeUtf8(e){return t.startLargeUtf8(e),t.endLargeUtf8(e)}},TU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsList(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsList(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startList(t){t.startObject(0)}static endList(t){return t.endObject()}static createList(e){return t.startList(e),t.endList(e)}},OU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMap(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMap(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}keysSorted(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13508
|
+
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}static startMap(t){t.startObject(1)}static addKeysSorted(t,e){t.addFieldInt8(0,+e,0)}static endMap(t){return t.endObject()}static createMap(e,n){return t.startMap(e),t.addKeysSorted(e,n),t.endMap(e)}},RU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsNull(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsNull(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startNull(t){t.startObject(0)}static endNull(t){return t.endObject()}static createNull(e){return t.startNull(e),t.endNull(e)}}
|
|
13509
|
+
class FU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsStruct_(t,e){return(e||new FU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsStruct_(t,e){return t.setPosition(t.position()+4),(e||new FU).__init(t.readInt32(t.position())+t.position(),t)}static startStruct_(t){t.startObject(0)}static endStruct_(t){return t.endObject()}static createStruct_(t){return FU.startStruct_(t),FU.endStruct_(t)}}class NU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsTime(t,e){return(e||new NU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTime(t,e){return t.setPosition(t.position()+4),(e||new NU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13510
|
+
return t?this.bb.readInt16(this.bb_pos+t):tU.MILLISECOND}bitWidth(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13511
|
+
return t?this.bb.readInt32(this.bb_pos+t):32}static startTime(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,tU.MILLISECOND)}static addBitWidth(t,e){t.addFieldInt32(1,e,32)}static endTime(t){return t.endObject()}static createTime(t,e,n){return NU.startTime(t),NU.addUnit(t,e),NU.addBitWidth(t,n),NU.endTime(t)}}class LU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsTimestamp(t,e){return(e||new LU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsTimestamp(t,e){return t.setPosition(t.position()+4),(e||new LU).__init(t.readInt32(t.position())+t.position(),t)}unit(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13512
|
+
return t?this.bb.readInt16(this.bb_pos+t):tU.SECOND}timezone(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13513
|
+
return e?this.bb.__string(this.bb_pos+e,t):null}static startTimestamp(t){t.startObject(2)}static addUnit(t,e){t.addFieldInt16(0,e,tU.SECOND)}static addTimezone(t,e){t.addFieldOffset(1,e,0)}static endTimestamp(t){return t.endObject()}static createTimestamp(t,e,n){return LU.startTimestamp(t),LU.addUnit(t,e),LU.addTimezone(t,n),LU.endTimestamp(t)}}class BU{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUnion(t,e){return(e||new BU).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUnion(t,e){return t.setPosition(t.position()+4),(e||new BU).__init(t.readInt32(t.position())+t.position(),t)}mode(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13514
|
+
return t?this.bb.readInt16(this.bb_pos+t):XH.Sparse}typeIds(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
13513
13515
|
return e?this.bb.readInt32(this.bb.__vector(this.bb_pos+e)+4*t):0}typeIdsLength(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13514
13516
|
return t?this.bb.__vector_len(this.bb_pos+t):0}typeIdsArray(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13515
|
-
return t?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}static startUnion(t){t.startObject(2)}static addMode(t,e){t.addFieldInt16(0,e,
|
|
13517
|
+
return t?new Int32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+t),this.bb.__vector_len(this.bb_pos+t)):null}static startUnion(t){t.startObject(2)}static addMode(t,e){t.addFieldInt16(0,e,XH.Sparse)}static addTypeIds(t,e){t.addFieldOffset(1,e,0)}static createTypeIdsVector(t,e){t.startVector(4,e.length,4)
|
|
13516
13518
|
for(let n=e.length-1;n>=0;n--)t.addInt32(e[n])
|
|
13517
|
-
return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,n){return
|
|
13518
|
-
var
|
|
13519
|
-
!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.FloatingPoint=3]="FloatingPoint",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct_=13]="Struct_",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.LargeList=21]="LargeList",t[t.RunEndEncoded=22]="RunEndEncoded"}(
|
|
13520
|
-
let
|
|
13519
|
+
return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,n){return BU.startUnion(t),BU.addMode(t,e),BU.addTypeIds(t,n),BU.endUnion(t)}}let PU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUtf8(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(e){return t.startUtf8(e),t.endUtf8(e)}}
|
|
13520
|
+
var zU
|
|
13521
|
+
!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.FloatingPoint=3]="FloatingPoint",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct_=13]="Struct_",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.LargeList=21]="LargeList",t[t.RunEndEncoded=22]="RunEndEncoded"}(zU||(zU={}))
|
|
13522
|
+
let VU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsField(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}name(t){const e=this.bb.__offset(this.bb_pos,4)
|
|
13521
13523
|
return e?this.bb.__string(this.bb_pos+e,t):null}nullable(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13522
13524
|
return!!t&&!!this.bb.readInt8(this.bb_pos+t)}typeType(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13523
|
-
return t?this.bb.readUint8(this.bb_pos+t):
|
|
13525
|
+
return t?this.bb.readUint8(this.bb_pos+t):zU.NONE}type(t){const e=this.bb.__offset(this.bb_pos,10)
|
|
13524
13526
|
return e?this.bb.__union(t,this.bb_pos+e):null}dictionary(t){const e=this.bb.__offset(this.bb_pos,12)
|
|
13525
|
-
return e?(t||new
|
|
13527
|
+
return e?(t||new yU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(e,n){const i=this.bb.__offset(this.bb_pos,14)
|
|
13526
13528
|
return i?(n||new t).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+4*e),this.bb):null}childrenLength(){const t=this.bb.__offset(this.bb_pos,14)
|
|
13527
13529
|
return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,16)
|
|
13528
|
-
return n?(e||new
|
|
13529
|
-
return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,
|
|
13530
|
+
return n?(e||new wU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,16)
|
|
13531
|
+
return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,zU.NONE)}static addType(t,e){t.addFieldOffset(3,e,0)}static addDictionary(t,e){t.addFieldOffset(4,e,0)}static addChildren(t,e){t.addFieldOffset(5,e,0)}static createChildrenVector(t,e){t.startVector(4,e.length,4)
|
|
13530
13532
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
13531
13533
|
return t.endVector()}static startChildrenVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(6,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
|
|
13532
13534
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
13533
|
-
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},
|
|
13534
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13535
|
-
return n?(e||new
|
|
13535
|
+
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},HU=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsSchema(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13536
|
+
return t?this.bb.readInt16(this.bb_pos+t):gU.Little}fields(t,e){const n=this.bb.__offset(this.bb_pos,6)
|
|
13537
|
+
return n?(e||new VU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}fieldsLength(){const t=this.bb.__offset(this.bb_pos,6)
|
|
13536
13538
|
return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,8)
|
|
13537
|
-
return n?(e||new
|
|
13539
|
+
return n?(e||new wU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,8)
|
|
13538
13540
|
return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){const e=this.bb.__offset(this.bb_pos,10)
|
|
13539
13541
|
return e?this.bb.readInt64(this.bb.__vector(this.bb_pos+e)+8*t):BigInt(0)}featuresLength(){const t=this.bb.__offset(this.bb_pos,10)
|
|
13540
|
-
return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,
|
|
13542
|
+
return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,gU.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4)
|
|
13541
13543
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
13542
13544
|
return t.endVector()}static startFieldsVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(2,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
|
|
13543
13545
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
13544
13546
|
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static addFeatures(t,e){t.addFieldOffset(3,e,0)}static createFeaturesVector(t,e){t.startVector(8,e.length,8)
|
|
13545
13547
|
for(let n=e.length-1;n>=0;n--)t.addInt64(e[n])
|
|
13546
13548
|
return t.endVector()}static startFeaturesVector(t,e){t.startVector(8,e,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,e){t.finish(e)}static finishSizePrefixedSchemaBuffer(t,e){t.finish(e,void 0,!0)}static createSchema(e,n,i,s,o){return t.startSchema(e),t.addEndianness(e,n),t.addFields(e,i),t.addCustomMetadata(e,s),t.addFeatures(e,o),t.endSchema(e)}}
|
|
13547
|
-
var
|
|
13548
|
-
!function(t){t[t.NONE=0]="NONE",t[t.Schema=1]="Schema",t[t.DictionaryBatch=2]="DictionaryBatch",t[t.RecordBatch=3]="RecordBatch",t[t.Tensor=4]="Tensor",t[t.SparseTensor=5]="SparseTensor"}(
|
|
13549
|
-
function
|
|
13549
|
+
var UU,qU,jU
|
|
13550
|
+
!function(t){t[t.NONE=0]="NONE",t[t.Schema=1]="Schema",t[t.DictionaryBatch=2]="DictionaryBatch",t[t.RecordBatch=3]="RecordBatch",t[t.Tensor=4]="Tensor",t[t.SparseTensor=5]="SparseTensor"}(UU||(UU={})),function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Duration=18]="Duration",t[t.LargeBinary=19]="LargeBinary",t[t.LargeUtf8=20]="LargeUtf8",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth",t[t.DurationSecond=-27]="DurationSecond",t[t.DurationMillisecond=-28]="DurationMillisecond",t[t.DurationMicrosecond=-29]="DurationMicrosecond",t[t.DurationNanosecond=-30]="DurationNanosecond"}(qU||(qU={})),function(t){t[t.OFFSET=0]="OFFSET",t[t.DATA=1]="DATA",t[t.VALIDITY=2]="VALIDITY",t[t.TYPE=3]="TYPE"}(jU||(jU={}))
|
|
13551
|
+
function WU(t){if(null===t)return"null"
|
|
13550
13552
|
if(undefined===t)return"undefined"
|
|
13551
13553
|
switch(typeof t){case"number":case"bigint":return`${t}`
|
|
13552
|
-
case"string":return`"${t}"`}return"function"==typeof t[Symbol.toPrimitive]?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map((t=>
|
|
13553
|
-
return Number(t)}function
|
|
13554
|
-
function
|
|
13555
|
-
case"string":return
|
|
13556
|
-
case"default":return function(t){if(8===t.byteLength){return new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}return
|
|
13557
|
-
const
|
|
13558
|
-
function
|
|
13554
|
+
case"string":return`"${t}"`}return"function"==typeof t[Symbol.toPrimitive]?t[Symbol.toPrimitive]("string"):ArrayBuffer.isView(t)?t instanceof BigInt64Array||t instanceof BigUint64Array?`[${[...t].map((t=>WU(t)))}]`:`[${t}]`:ArrayBuffer.isView(t)?`[${t}]`:JSON.stringify(t,((t,e)=>"bigint"==typeof e?`${e}`:e))}function GU(t){if("bigint"==typeof t&&(t<Number.MIN_SAFE_INTEGER||t>Number.MAX_SAFE_INTEGER))throw new TypeError(`${t} is not safe to convert to a number.`)
|
|
13555
|
+
return Number(t)}function ZU(t,e){return GU(t/e)+GU(t%e)/GU(e)}const KU=Symbol.for("isArrowBigNum")
|
|
13556
|
+
function YU(t,...e){return 0===e.length?Object.setPrototypeOf(BH(this.TypedArray,t),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(t,...e),this.constructor.prototype)}function XU(...t){return YU.apply(this,t)}function JU(...t){return YU.apply(this,t)}function QU(...t){return YU.apply(this,t)}YU.prototype[KU]=!0,YU.prototype.toJSON=function(){return`"${nq(this)}"`},YU.prototype.valueOf=function(t){return eq(this,t)},YU.prototype.toString=function(){return nq(this)},YU.prototype[Symbol.toPrimitive]=function(t="default"){switch(t){case"number":return eq(this)
|
|
13557
|
+
case"string":return nq(this)
|
|
13558
|
+
case"default":return function(t){if(8===t.byteLength){return new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}return nq(t)}(this)}return nq(this)},Object.setPrototypeOf(XU.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(JU.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(QU.prototype,Object.create(Uint32Array.prototype)),Object.assign(XU.prototype,YU.prototype,{constructor:XU,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(JU.prototype,YU.prototype,{constructor:JU,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(QU.prototype,YU.prototype,{constructor:QU,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array})
|
|
13559
|
+
const tq=BigInt(4294967296)*BigInt(4294967296)-BigInt(1)
|
|
13560
|
+
function eq(t,e){const{buffer:n,byteOffset:i,byteLength:s,signed:o}=t,r=new BigUint64Array(n,i,s/8),a=o&&r.at(-1)&BigInt(1)<<BigInt(63)
|
|
13559
13561
|
let l=BigInt(0),c=0
|
|
13560
|
-
if(a){for(const t of r)l|=(t^
|
|
13562
|
+
if(a){for(const t of r)l|=(t^tq)*(BigInt(1)<<BigInt(64*c++))
|
|
13561
13563
|
l*=BigInt(-1),l-=BigInt(1)}else for(const t of r)l|=t*(BigInt(1)<<BigInt(64*c++))
|
|
13562
13564
|
if("number"==typeof e){const t=BigInt(Math.pow(10,e)),n=l%t
|
|
13563
|
-
return
|
|
13565
|
+
return GU(l/t)+GU(n)/GU(t)}return GU(l)}function nq(t){if(8===t.byteLength){return`${new t.BigIntArray(t.buffer,t.byteOffset,1)[0]}`}if(!t.signed)return iq(t)
|
|
13564
13566
|
let e=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2)
|
|
13565
|
-
if(new Int16Array([e.at(-1)])[0]>=0)return
|
|
13567
|
+
if(new Int16Array([e.at(-1)])[0]>=0)return iq(t)
|
|
13566
13568
|
e=e.slice()
|
|
13567
13569
|
let n=1
|
|
13568
13570
|
for(let t=0;t<e.length;t++){const i=e[t],s=~i+n
|
|
13569
|
-
e[t]=s,n&=0===i?1:0}return`-${
|
|
13571
|
+
e[t]=s,n&=0===i?1:0}return`-${iq(e)}`}function iq(t){let e=""
|
|
13570
13572
|
const n=new Uint32Array(2)
|
|
13571
13573
|
let i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2)
|
|
13572
13574
|
const s=new Uint32Array((i=new Uint16Array(i).reverse()).buffer)
|
|
@@ -13574,269 +13576,269 @@ let o=-1
|
|
|
13574
13576
|
const r=i.length-1
|
|
13575
13577
|
do{for(n[0]=i[o=0];o<r;)i[o++]=n[1]=n[0]/10,n[0]=(n[0]-10*n[1]<<16)+i[o]
|
|
13576
13578
|
i[o]=n[1]=n[0]/10,n[0]=n[0]-10*n[1],e=`${n[0]}${e}`}while(s[0]||s[1]||s[2]||s[3])
|
|
13577
|
-
return null!=e?e:"0"}class
|
|
13578
|
-
case!1:return new
|
|
13579
|
-
class
|
|
13580
|
-
class
|
|
13581
|
-
class
|
|
13579
|
+
return null!=e?e:"0"}class sq{static new(t,e){switch(e){case!0:return new XU(t)
|
|
13580
|
+
case!1:return new JU(t)}switch(t.constructor){case Int8Array:case Int16Array:case Int32Array:case BigInt64Array:return new XU(t)}return 16===t.byteLength?new QU(t):new JU(t)}static signed(t){return new XU(t)}static unsigned(t){return new JU(t)}static decimal(t){return new QU(t)}constructor(t,e){return sq.new(t,e)}}var oq,rq,aq,lq,cq,dq,hq,uq,pq,fq,mq,gq,vq,bq,yq,wq,xq,Cq,kq,Sq,_q,Iq,Mq
|
|
13581
|
+
class $q{static isNull(t){return(null==t?void 0:t.typeId)===qU.Null}static isInt(t){return(null==t?void 0:t.typeId)===qU.Int}static isFloat(t){return(null==t?void 0:t.typeId)===qU.Float}static isBinary(t){return(null==t?void 0:t.typeId)===qU.Binary}static isLargeBinary(t){return(null==t?void 0:t.typeId)===qU.LargeBinary}static isUtf8(t){return(null==t?void 0:t.typeId)===qU.Utf8}static isLargeUtf8(t){return(null==t?void 0:t.typeId)===qU.LargeUtf8}static isBool(t){return(null==t?void 0:t.typeId)===qU.Bool}static isDecimal(t){return(null==t?void 0:t.typeId)===qU.Decimal}static isDate(t){return(null==t?void 0:t.typeId)===qU.Date}static isTime(t){return(null==t?void 0:t.typeId)===qU.Time}static isTimestamp(t){return(null==t?void 0:t.typeId)===qU.Timestamp}static isInterval(t){return(null==t?void 0:t.typeId)===qU.Interval}static isDuration(t){return(null==t?void 0:t.typeId)===qU.Duration}static isList(t){return(null==t?void 0:t.typeId)===qU.List}static isStruct(t){return(null==t?void 0:t.typeId)===qU.Struct}static isUnion(t){return(null==t?void 0:t.typeId)===qU.Union}static isFixedSizeBinary(t){return(null==t?void 0:t.typeId)===qU.FixedSizeBinary}static isFixedSizeList(t){return(null==t?void 0:t.typeId)===qU.FixedSizeList}static isMap(t){return(null==t?void 0:t.typeId)===qU.Map}static isDictionary(t){return(null==t?void 0:t.typeId)===qU.Dictionary}static isDenseUnion(t){return $q.isUnion(t)&&t.mode===XH.Dense}static isSparseUnion(t){return $q.isUnion(t)&&t.mode===XH.Sparse}constructor(t){this.typeId=t}}oq=Symbol.toStringTag,$q[oq]=((Mq=$q.prototype).children=null,Mq.ArrayType=Array,Mq.OffsetArrayType=Int32Array,Mq[Symbol.toStringTag]="DataType")
|
|
13582
|
+
class Eq extends $q{constructor(){super(qU.Null)}toString(){return"Null"}}rq=Symbol.toStringTag,Eq[rq]=(t=>t[Symbol.toStringTag]="Null")(Eq.prototype)
|
|
13583
|
+
class Dq extends $q{constructor(t,e){super(qU.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array
|
|
13582
13584
|
case 16:return this.isSigned?Int16Array:Uint16Array
|
|
13583
13585
|
case 32:return this.isSigned?Int32Array:Uint32Array
|
|
13584
|
-
case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}
|
|
13585
|
-
class
|
|
13586
|
-
class
|
|
13587
|
-
case
|
|
13588
|
-
case
|
|
13589
|
-
class
|
|
13590
|
-
class
|
|
13591
|
-
class
|
|
13592
|
-
class
|
|
13593
|
-
class
|
|
13594
|
-
class
|
|
13595
|
-
class
|
|
13596
|
-
class
|
|
13597
|
-
case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}
|
|
13598
|
-
class
|
|
13599
|
-
class
|
|
13600
|
-
class
|
|
13601
|
-
class
|
|
13602
|
-
class
|
|
13603
|
-
class
|
|
13604
|
-
class
|
|
13605
|
-
class
|
|
13606
|
-
class
|
|
13607
|
-
if(super(
|
|
13586
|
+
case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}aq=Symbol.toStringTag,Dq[aq]=(t=>(t.isSigned=null,t.bitWidth=null,t[Symbol.toStringTag]="Int"))(Dq.prototype)
|
|
13587
|
+
class Aq extends Dq{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(Aq.prototype,"ArrayType",{value:Int32Array})
|
|
13588
|
+
class Tq extends $q{constructor(t){super(qU.Float),this.precision=t}get ArrayType(){switch(this.precision){case JH.HALF:return Uint16Array
|
|
13589
|
+
case JH.SINGLE:return Float32Array
|
|
13590
|
+
case JH.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}lq=Symbol.toStringTag,Tq[lq]=(t=>(t.precision=null,t[Symbol.toStringTag]="Float"))(Tq.prototype)
|
|
13591
|
+
class Oq extends $q{constructor(){super(qU.Binary)}toString(){return"Binary"}}cq=Symbol.toStringTag,Oq[cq]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Binary"))(Oq.prototype)
|
|
13592
|
+
class Rq extends $q{constructor(){super(qU.LargeBinary)}toString(){return"LargeBinary"}}dq=Symbol.toStringTag,Rq[dq]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeBinary"))(Rq.prototype)
|
|
13593
|
+
class Fq extends $q{constructor(){super(qU.Utf8)}toString(){return"Utf8"}}hq=Symbol.toStringTag,Fq[hq]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Utf8"))(Fq.prototype)
|
|
13594
|
+
class Nq extends $q{constructor(){super(qU.LargeUtf8)}toString(){return"LargeUtf8"}}uq=Symbol.toStringTag,Nq[uq]=(t=>(t.ArrayType=Uint8Array,t.OffsetArrayType=BigInt64Array,t[Symbol.toStringTag]="LargeUtf8"))(Nq.prototype)
|
|
13595
|
+
class Lq extends $q{constructor(){super(qU.Bool)}toString(){return"Bool"}}pq=Symbol.toStringTag,Lq[pq]=(t=>(t.ArrayType=Uint8Array,t[Symbol.toStringTag]="Bool"))(Lq.prototype)
|
|
13596
|
+
class Bq extends $q{constructor(t,e,n=128){super(qU.Decimal),this.scale=t,this.precision=e,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}fq=Symbol.toStringTag,Bq[fq]=(t=>(t.scale=null,t.precision=null,t.ArrayType=Uint32Array,t[Symbol.toStringTag]="Decimal"))(Bq.prototype)
|
|
13597
|
+
class Pq extends $q{constructor(t){super(qU.Date),this.unit=t}toString(){return`Date${32*(this.unit+1)}<${QH[this.unit]}>`}get ArrayType(){return this.unit===QH.DAY?Int32Array:BigInt64Array}}mq=Symbol.toStringTag,Pq[mq]=(t=>(t.unit=null,t[Symbol.toStringTag]="Date"))(Pq.prototype)
|
|
13598
|
+
class zq extends $q{constructor(t,e){super(qU.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${tU[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array
|
|
13599
|
+
case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}gq=Symbol.toStringTag,zq[gq]=(t=>(t.unit=null,t.bitWidth=null,t[Symbol.toStringTag]="Time"))(zq.prototype)
|
|
13600
|
+
class Vq extends $q{constructor(t,e){super(qU.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${tU[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}vq=Symbol.toStringTag,Vq[vq]=(t=>(t.unit=null,t.timezone=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Timestamp"))(Vq.prototype)
|
|
13601
|
+
class Hq extends $q{constructor(t){super(qU.Interval),this.unit=t}toString(){return`Interval<${eU[this.unit]}>`}}bq=Symbol.toStringTag,Hq[bq]=(t=>(t.unit=null,t.ArrayType=Int32Array,t[Symbol.toStringTag]="Interval"))(Hq.prototype)
|
|
13602
|
+
class Uq extends $q{constructor(t){super(qU.Duration),this.unit=t}toString(){return`Duration<${tU[this.unit]}>`}}yq=Symbol.toStringTag,Uq[yq]=(t=>(t.unit=null,t.ArrayType=BigInt64Array,t[Symbol.toStringTag]="Duration"))(Uq.prototype)
|
|
13603
|
+
class qq extends $q{constructor(t){super(qU.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}wq=Symbol.toStringTag,qq[wq]=(t=>(t.children=null,t[Symbol.toStringTag]="List"))(qq.prototype)
|
|
13604
|
+
class jq extends $q{constructor(t){super(qU.Struct),this.children=t}toString(){return`Struct<{${this.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}xq=Symbol.toStringTag,jq[xq]=(t=>(t.children=null,t[Symbol.toStringTag]="Struct"))(jq.prototype)
|
|
13605
|
+
class Wq extends $q{constructor(t,e,n){super(qU.Union),this.mode=t,this.children=n,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce(((t,e,n)=>(t[e]=n)&&t||t),Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map((t=>`${t.type}`)).join(" | ")}>`}}Cq=Symbol.toStringTag,Wq[Cq]=(t=>(t.mode=null,t.typeIds=null,t.children=null,t.typeIdToChildIndex=null,t.ArrayType=Int8Array,t[Symbol.toStringTag]="Union"))(Wq.prototype)
|
|
13606
|
+
class Gq extends $q{constructor(t){super(qU.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}kq=Symbol.toStringTag,Gq[kq]=(t=>(t.byteWidth=null,t.ArrayType=Uint8Array,t[Symbol.toStringTag]="FixedSizeBinary"))(Gq.prototype)
|
|
13607
|
+
class Zq extends $q{constructor(t,e){super(qU.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}Sq=Symbol.toStringTag,Zq[Sq]=(t=>(t.children=null,t.listSize=null,t[Symbol.toStringTag]="FixedSizeList"))(Zq.prototype)
|
|
13608
|
+
class Kq extends $q{constructor(t,e=!1){var n,i,s
|
|
13609
|
+
if(super(qU.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",null===(n=null==t?void 0:t.type)||void 0===n?void 0:n.children)){const e=null===(i=null==t?void 0:t.type)||void 0===i?void 0:i.children[0]
|
|
13608
13610
|
e&&(e.name="key")
|
|
13609
13611
|
const n=null===(s=null==t?void 0:t.type)||void 0===s?void 0:s.children[1]
|
|
13610
|
-
n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}
|
|
13611
|
-
const
|
|
13612
|
-
var
|
|
13613
|
-
class
|
|
13614
|
-
switch(t.typeId){case
|
|
13615
|
-
case
|
|
13616
|
-
case
|
|
13617
|
-
case
|
|
13618
|
-
default:return 1}}
|
|
13619
|
-
class
|
|
13620
|
-
if("string"==typeof e&&e in
|
|
13621
|
-
if(e&&e instanceof
|
|
13622
|
-
if((null==e?void 0:e.type)&&e.type instanceof
|
|
13623
|
-
return
|
|
13624
|
-
switch(e){case
|
|
13612
|
+
n&&(n.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map((t=>`${t.name}:${t.type}`)).join(", ")}}>`}}_q=Symbol.toStringTag,Kq[_q]=(t=>(t.children=null,t.keysSorted=null,t[Symbol.toStringTag]="Map_"))(Kq.prototype)
|
|
13613
|
+
const Yq=(Xq=-1,()=>++Xq)
|
|
13614
|
+
var Xq
|
|
13615
|
+
class Jq extends $q{constructor(t,e,n,i){super(qU.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=null==n?Yq():GU(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}function Qq(t){const e=t
|
|
13616
|
+
switch(t.typeId){case qU.Decimal:return t.bitWidth/32
|
|
13617
|
+
case qU.Interval:return 1+e.unit
|
|
13618
|
+
case qU.FixedSizeList:return e.listSize
|
|
13619
|
+
case qU.FixedSizeBinary:return e.byteWidth
|
|
13620
|
+
default:return 1}}Iq=Symbol.toStringTag,Jq[Iq]=(t=>(t.id=null,t.indices=null,t.isOrdered=null,t.dictionary=null,t[Symbol.toStringTag]="Dictionary"))(Jq.prototype)
|
|
13621
|
+
class tj{visitMany(t,...e){return t.map(((t,n)=>this.visit(t,...e.map((t=>t[n])))))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return function(t,e,n=!0){if("number"==typeof e)return ej(t,e,n)
|
|
13622
|
+
if("string"==typeof e&&e in qU)return ej(t,qU[e],n)
|
|
13623
|
+
if(e&&e instanceof $q)return ej(t,nj(e),n)
|
|
13624
|
+
if((null==e?void 0:e.type)&&e.type instanceof $q)return ej(t,nj(e.type),n)
|
|
13625
|
+
return ej(t,qU.NONE,n)}(this,t,e)}getVisitFnByTypeId(t,e=!0){return ej(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function ej(t,e,n=!0){let i=null
|
|
13626
|
+
switch(e){case qU.Null:i=t.visitNull
|
|
13625
13627
|
break
|
|
13626
|
-
case
|
|
13628
|
+
case qU.Bool:i=t.visitBool
|
|
13627
13629
|
break
|
|
13628
|
-
case
|
|
13630
|
+
case qU.Int:i=t.visitInt
|
|
13629
13631
|
break
|
|
13630
|
-
case
|
|
13632
|
+
case qU.Int8:i=t.visitInt8||t.visitInt
|
|
13631
13633
|
break
|
|
13632
|
-
case
|
|
13634
|
+
case qU.Int16:i=t.visitInt16||t.visitInt
|
|
13633
13635
|
break
|
|
13634
|
-
case
|
|
13636
|
+
case qU.Int32:i=t.visitInt32||t.visitInt
|
|
13635
13637
|
break
|
|
13636
|
-
case
|
|
13638
|
+
case qU.Int64:i=t.visitInt64||t.visitInt
|
|
13637
13639
|
break
|
|
13638
|
-
case
|
|
13640
|
+
case qU.Uint8:i=t.visitUint8||t.visitInt
|
|
13639
13641
|
break
|
|
13640
|
-
case
|
|
13642
|
+
case qU.Uint16:i=t.visitUint16||t.visitInt
|
|
13641
13643
|
break
|
|
13642
|
-
case
|
|
13644
|
+
case qU.Uint32:i=t.visitUint32||t.visitInt
|
|
13643
13645
|
break
|
|
13644
|
-
case
|
|
13646
|
+
case qU.Uint64:i=t.visitUint64||t.visitInt
|
|
13645
13647
|
break
|
|
13646
|
-
case
|
|
13648
|
+
case qU.Float:i=t.visitFloat
|
|
13647
13649
|
break
|
|
13648
|
-
case
|
|
13650
|
+
case qU.Float16:i=t.visitFloat16||t.visitFloat
|
|
13649
13651
|
break
|
|
13650
|
-
case
|
|
13652
|
+
case qU.Float32:i=t.visitFloat32||t.visitFloat
|
|
13651
13653
|
break
|
|
13652
|
-
case
|
|
13654
|
+
case qU.Float64:i=t.visitFloat64||t.visitFloat
|
|
13653
13655
|
break
|
|
13654
|
-
case
|
|
13656
|
+
case qU.Utf8:i=t.visitUtf8
|
|
13655
13657
|
break
|
|
13656
|
-
case
|
|
13658
|
+
case qU.LargeUtf8:i=t.visitLargeUtf8
|
|
13657
13659
|
break
|
|
13658
|
-
case
|
|
13660
|
+
case qU.Binary:i=t.visitBinary
|
|
13659
13661
|
break
|
|
13660
|
-
case
|
|
13662
|
+
case qU.LargeBinary:i=t.visitLargeBinary
|
|
13661
13663
|
break
|
|
13662
|
-
case
|
|
13664
|
+
case qU.FixedSizeBinary:i=t.visitFixedSizeBinary
|
|
13663
13665
|
break
|
|
13664
|
-
case
|
|
13666
|
+
case qU.Date:i=t.visitDate
|
|
13665
13667
|
break
|
|
13666
|
-
case
|
|
13668
|
+
case qU.DateDay:i=t.visitDateDay||t.visitDate
|
|
13667
13669
|
break
|
|
13668
|
-
case
|
|
13670
|
+
case qU.DateMillisecond:i=t.visitDateMillisecond||t.visitDate
|
|
13669
13671
|
break
|
|
13670
|
-
case
|
|
13672
|
+
case qU.Timestamp:i=t.visitTimestamp
|
|
13671
13673
|
break
|
|
13672
|
-
case
|
|
13674
|
+
case qU.TimestampSecond:i=t.visitTimestampSecond||t.visitTimestamp
|
|
13673
13675
|
break
|
|
13674
|
-
case
|
|
13676
|
+
case qU.TimestampMillisecond:i=t.visitTimestampMillisecond||t.visitTimestamp
|
|
13675
13677
|
break
|
|
13676
|
-
case
|
|
13678
|
+
case qU.TimestampMicrosecond:i=t.visitTimestampMicrosecond||t.visitTimestamp
|
|
13677
13679
|
break
|
|
13678
|
-
case
|
|
13680
|
+
case qU.TimestampNanosecond:i=t.visitTimestampNanosecond||t.visitTimestamp
|
|
13679
13681
|
break
|
|
13680
|
-
case
|
|
13682
|
+
case qU.Time:i=t.visitTime
|
|
13681
13683
|
break
|
|
13682
|
-
case
|
|
13684
|
+
case qU.TimeSecond:i=t.visitTimeSecond||t.visitTime
|
|
13683
13685
|
break
|
|
13684
|
-
case
|
|
13686
|
+
case qU.TimeMillisecond:i=t.visitTimeMillisecond||t.visitTime
|
|
13685
13687
|
break
|
|
13686
|
-
case
|
|
13688
|
+
case qU.TimeMicrosecond:i=t.visitTimeMicrosecond||t.visitTime
|
|
13687
13689
|
break
|
|
13688
|
-
case
|
|
13690
|
+
case qU.TimeNanosecond:i=t.visitTimeNanosecond||t.visitTime
|
|
13689
13691
|
break
|
|
13690
|
-
case
|
|
13692
|
+
case qU.Decimal:i=t.visitDecimal
|
|
13691
13693
|
break
|
|
13692
|
-
case
|
|
13694
|
+
case qU.List:i=t.visitList
|
|
13693
13695
|
break
|
|
13694
|
-
case
|
|
13696
|
+
case qU.Struct:i=t.visitStruct
|
|
13695
13697
|
break
|
|
13696
|
-
case
|
|
13698
|
+
case qU.Union:i=t.visitUnion
|
|
13697
13699
|
break
|
|
13698
|
-
case
|
|
13700
|
+
case qU.DenseUnion:i=t.visitDenseUnion||t.visitUnion
|
|
13699
13701
|
break
|
|
13700
|
-
case
|
|
13702
|
+
case qU.SparseUnion:i=t.visitSparseUnion||t.visitUnion
|
|
13701
13703
|
break
|
|
13702
|
-
case
|
|
13704
|
+
case qU.Dictionary:i=t.visitDictionary
|
|
13703
13705
|
break
|
|
13704
|
-
case
|
|
13706
|
+
case qU.Interval:i=t.visitInterval
|
|
13705
13707
|
break
|
|
13706
|
-
case
|
|
13708
|
+
case qU.IntervalDayTime:i=t.visitIntervalDayTime||t.visitInterval
|
|
13707
13709
|
break
|
|
13708
|
-
case
|
|
13710
|
+
case qU.IntervalYearMonth:i=t.visitIntervalYearMonth||t.visitInterval
|
|
13709
13711
|
break
|
|
13710
|
-
case
|
|
13712
|
+
case qU.Duration:i=t.visitDuration
|
|
13711
13713
|
break
|
|
13712
|
-
case
|
|
13714
|
+
case qU.DurationSecond:i=t.visitDurationSecond||t.visitDuration
|
|
13713
13715
|
break
|
|
13714
|
-
case
|
|
13716
|
+
case qU.DurationMillisecond:i=t.visitDurationMillisecond||t.visitDuration
|
|
13715
13717
|
break
|
|
13716
|
-
case
|
|
13718
|
+
case qU.DurationMicrosecond:i=t.visitDurationMicrosecond||t.visitDuration
|
|
13717
13719
|
break
|
|
13718
|
-
case
|
|
13720
|
+
case qU.DurationNanosecond:i=t.visitDurationNanosecond||t.visitDuration
|
|
13719
13721
|
break
|
|
13720
|
-
case
|
|
13722
|
+
case qU.FixedSizeList:i=t.visitFixedSizeList
|
|
13721
13723
|
break
|
|
13722
|
-
case
|
|
13724
|
+
case qU.Map:i=t.visitMap}if("function"==typeof i)return i
|
|
13723
13725
|
if(!n)return()=>null
|
|
13724
|
-
throw new Error(`Unrecognized type '${
|
|
13725
|
-
case
|
|
13726
|
-
switch(e){case 8:return n?
|
|
13727
|
-
case 16:return n?
|
|
13728
|
-
case 32:return n?
|
|
13729
|
-
case 64:return n?
|
|
13730
|
-
case
|
|
13731
|
-
case
|
|
13732
|
-
case
|
|
13733
|
-
case
|
|
13734
|
-
case
|
|
13735
|
-
case
|
|
13736
|
-
case
|
|
13737
|
-
case
|
|
13738
|
-
case
|
|
13739
|
-
case
|
|
13740
|
-
case
|
|
13741
|
-
case
|
|
13742
|
-
case
|
|
13743
|
-
case
|
|
13744
|
-
case
|
|
13745
|
-
case
|
|
13746
|
-
case
|
|
13747
|
-
case
|
|
13748
|
-
case
|
|
13749
|
-
case
|
|
13750
|
-
case
|
|
13751
|
-
case
|
|
13752
|
-
case
|
|
13753
|
-
case
|
|
13754
|
-
case
|
|
13755
|
-
case
|
|
13756
|
-
case
|
|
13757
|
-
case
|
|
13758
|
-
case
|
|
13759
|
-
case
|
|
13760
|
-
case
|
|
13761
|
-
case
|
|
13762
|
-
const
|
|
13763
|
-
function
|
|
13726
|
+
throw new Error(`Unrecognized type '${qU[e]}'`)}function nj(t){switch(t.typeId){case qU.Null:return qU.Null
|
|
13727
|
+
case qU.Int:{const{bitWidth:e,isSigned:n}=t
|
|
13728
|
+
switch(e){case 8:return n?qU.Int8:qU.Uint8
|
|
13729
|
+
case 16:return n?qU.Int16:qU.Uint16
|
|
13730
|
+
case 32:return n?qU.Int32:qU.Uint32
|
|
13731
|
+
case 64:return n?qU.Int64:qU.Uint64}return qU.Int}case qU.Float:switch(t.precision){case JH.HALF:return qU.Float16
|
|
13732
|
+
case JH.SINGLE:return qU.Float32
|
|
13733
|
+
case JH.DOUBLE:return qU.Float64}return qU.Float
|
|
13734
|
+
case qU.Binary:return qU.Binary
|
|
13735
|
+
case qU.LargeBinary:return qU.LargeBinary
|
|
13736
|
+
case qU.Utf8:return qU.Utf8
|
|
13737
|
+
case qU.LargeUtf8:return qU.LargeUtf8
|
|
13738
|
+
case qU.Bool:return qU.Bool
|
|
13739
|
+
case qU.Decimal:return qU.Decimal
|
|
13740
|
+
case qU.Time:switch(t.unit){case tU.SECOND:return qU.TimeSecond
|
|
13741
|
+
case tU.MILLISECOND:return qU.TimeMillisecond
|
|
13742
|
+
case tU.MICROSECOND:return qU.TimeMicrosecond
|
|
13743
|
+
case tU.NANOSECOND:return qU.TimeNanosecond}return qU.Time
|
|
13744
|
+
case qU.Timestamp:switch(t.unit){case tU.SECOND:return qU.TimestampSecond
|
|
13745
|
+
case tU.MILLISECOND:return qU.TimestampMillisecond
|
|
13746
|
+
case tU.MICROSECOND:return qU.TimestampMicrosecond
|
|
13747
|
+
case tU.NANOSECOND:return qU.TimestampNanosecond}return qU.Timestamp
|
|
13748
|
+
case qU.Date:switch(t.unit){case QH.DAY:return qU.DateDay
|
|
13749
|
+
case QH.MILLISECOND:return qU.DateMillisecond}return qU.Date
|
|
13750
|
+
case qU.Interval:switch(t.unit){case eU.DAY_TIME:return qU.IntervalDayTime
|
|
13751
|
+
case eU.YEAR_MONTH:return qU.IntervalYearMonth}return qU.Interval
|
|
13752
|
+
case qU.Duration:switch(t.unit){case tU.SECOND:return qU.DurationSecond
|
|
13753
|
+
case tU.MILLISECOND:return qU.DurationMillisecond
|
|
13754
|
+
case tU.MICROSECOND:return qU.DurationMicrosecond
|
|
13755
|
+
case tU.NANOSECOND:return qU.DurationNanosecond}return qU.Duration
|
|
13756
|
+
case qU.Map:return qU.Map
|
|
13757
|
+
case qU.List:return qU.List
|
|
13758
|
+
case qU.Struct:return qU.Struct
|
|
13759
|
+
case qU.Union:switch(t.mode){case XH.Dense:return qU.DenseUnion
|
|
13760
|
+
case XH.Sparse:return qU.SparseUnion}return qU.Union
|
|
13761
|
+
case qU.FixedSizeBinary:return qU.FixedSizeBinary
|
|
13762
|
+
case qU.FixedSizeList:return qU.FixedSizeList
|
|
13763
|
+
case qU.Dictionary:return qU.Dictionary}throw new Error(`Unrecognized type '${qU[t.typeId]}'`)}tj.prototype.visitInt8=null,tj.prototype.visitInt16=null,tj.prototype.visitInt32=null,tj.prototype.visitInt64=null,tj.prototype.visitUint8=null,tj.prototype.visitUint16=null,tj.prototype.visitUint32=null,tj.prototype.visitUint64=null,tj.prototype.visitFloat16=null,tj.prototype.visitFloat32=null,tj.prototype.visitFloat64=null,tj.prototype.visitDateDay=null,tj.prototype.visitDateMillisecond=null,tj.prototype.visitTimestampSecond=null,tj.prototype.visitTimestampMillisecond=null,tj.prototype.visitTimestampMicrosecond=null,tj.prototype.visitTimestampNanosecond=null,tj.prototype.visitTimeSecond=null,tj.prototype.visitTimeMillisecond=null,tj.prototype.visitTimeMicrosecond=null,tj.prototype.visitTimeNanosecond=null,tj.prototype.visitDenseUnion=null,tj.prototype.visitSparseUnion=null,tj.prototype.visitIntervalDayTime=null,tj.prototype.visitIntervalYearMonth=null,tj.prototype.visitDuration=null,tj.prototype.visitDurationSecond=null,tj.prototype.visitDurationMillisecond=null,tj.prototype.visitDurationMicrosecond=null,tj.prototype.visitDurationNanosecond=null
|
|
13764
|
+
const ij=new Float64Array(1),sj=new Uint32Array(ij.buffer)
|
|
13765
|
+
function oj(t){const e=(31744&t)>>10,n=(1023&t)/1024,i=Math.pow(-1,(32768&t)>>15)
|
|
13764
13766
|
switch(e){case 31:return i*(n?Number.NaN:1/0)
|
|
13765
|
-
case 0:return i*(n?6103515625e-14*n:0)}return i*Math.pow(2,e-15)*(1+n)}class
|
|
13766
|
-
t.set(i.subarray(0,o-s),s)}},
|
|
13767
|
-
|
|
13768
|
-
const e=(2147483648&
|
|
13769
|
-
let n=2146435072&
|
|
13770
|
-
return n>=1089470464?
|
|
13771
|
-
|
|
13772
|
-
|
|
13773
|
-
|
|
13774
|
-
i?e[s>>3]|=1<<s%8:e[s>>3]&=~(1<<s%8)})),
|
|
13775
|
-
case
|
|
13776
|
-
case
|
|
13777
|
-
case
|
|
13778
|
-
case
|
|
13779
|
-
case
|
|
13780
|
-
case
|
|
13781
|
-
case
|
|
13767
|
+
case 0:return i*(n?6103515625e-14*n:0)}return i*Math.pow(2,e-15)*(1+n)}class rj extends tj{}function aj(t){return(e,n,i)=>{if(e.setValid(n,null!=i))return t(e,n,i)}}const lj=(t,e,n,i)=>{if(n+1<e.length){const s=GU(e[n]),o=GU(e[n+1])
|
|
13768
|
+
t.set(i.subarray(0,o-s),s)}},cj=({values:t},e,n)=>{t[e]=n},dj=({values:t},e,n)=>{t[e]=n},hj=({values:t},e,n)=>{t[e]=function(t){if(t!=t)return 32256
|
|
13769
|
+
ij[0]=t
|
|
13770
|
+
const e=(2147483648&sj[1])>>16&65535
|
|
13771
|
+
let n=2146435072&sj[1],i=0
|
|
13772
|
+
return n>=1089470464?sj[0]>0?n=31744:(n=(2080374784&n)>>16,i=(1048575&sj[1])>>10):n<=1056964608?(i=1048576+(1048575&sj[1]),i=1048576+(i<<(n>>20)-998)>>21,n=0):(n=n-1056964608>>10,i=512+(1048575&sj[1])>>10),e|n|65535&i}(n)},uj=({values:t},e,n)=>{((t,e,n)=>{t[e]=Math.floor(n/864e5)})(t,e,n.valueOf())},pj=({values:t},e,n)=>{t[e]=BigInt(n)},fj=({values:t,valueOffsets:e},n,i)=>lj(t,e,n,i),mj=({values:t,valueOffsets:e},n,i)=>lj(t,e,n,xH(i)),gj=({values:t},e,n)=>{t[e]=BigInt(n/1e3)},vj=({values:t},e,n)=>{t[e]=BigInt(n)},bj=({values:t},e,n)=>{t[e]=BigInt(1e3*n)},yj=({values:t},e,n)=>{t[e]=BigInt(1e6*n)},wj=({values:t},e,n)=>{t[e]=n},xj=({values:t},e,n)=>{t[e]=n},Cj=({values:t},e,n)=>{t[e]=n},kj=({values:t},e,n)=>{t[e]=n},Sj=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
|
|
13773
|
+
Tj.visit(s,t.valueOffsets[e],n)},_j=(t,e,n)=>{const i=t.type.typeIdToChildIndex[t.typeIds[e]],s=t.children[i]
|
|
13774
|
+
Tj.visit(s,e,n)},Ij=({values:t},e,n)=>{t.set(n.subarray(0,2),2*e)},Mj=({values:t},e,n)=>{t[e]=12*n[0]+n[1]%12},$j=({values:t},e,n)=>{t[e]=n},Ej=({values:t},e,n)=>{t[e]=n},Dj=({values:t},e,n)=>{t[e]=n},Aj=({values:t},e,n)=>{t[e]=n}
|
|
13775
|
+
rj.prototype.visitBool=aj((({offset:t,values:e},n,i)=>{const s=t+n
|
|
13776
|
+
i?e[s>>3]|=1<<s%8:e[s>>3]&=~(1<<s%8)})),rj.prototype.visitInt=aj(cj),rj.prototype.visitInt8=aj(cj),rj.prototype.visitInt16=aj(cj),rj.prototype.visitInt32=aj(cj),rj.prototype.visitInt64=aj(cj),rj.prototype.visitUint8=aj(cj),rj.prototype.visitUint16=aj(cj),rj.prototype.visitUint32=aj(cj),rj.prototype.visitUint64=aj(cj),rj.prototype.visitFloat=aj(((t,e,n)=>{switch(t.type.precision){case JH.HALF:return hj(t,e,n)
|
|
13777
|
+
case JH.SINGLE:case JH.DOUBLE:return dj(t,e,n)}})),rj.prototype.visitFloat16=aj(hj),rj.prototype.visitFloat32=aj(dj),rj.prototype.visitFloat64=aj(dj),rj.prototype.visitUtf8=aj(mj),rj.prototype.visitLargeUtf8=aj(mj),rj.prototype.visitBinary=aj(fj),rj.prototype.visitLargeBinary=aj(fj),rj.prototype.visitFixedSizeBinary=aj((({stride:t,values:e},n,i)=>{e.set(i.subarray(0,t),t*n)})),rj.prototype.visitDate=aj(((t,e,n)=>{t.type.unit===QH.DAY?uj(t,e,n):pj(t,e,n)})),rj.prototype.visitDateDay=aj(uj),rj.prototype.visitDateMillisecond=aj(pj),rj.prototype.visitTimestamp=aj(((t,e,n)=>{switch(t.type.unit){case tU.SECOND:return gj(t,e,n)
|
|
13778
|
+
case tU.MILLISECOND:return vj(t,e,n)
|
|
13779
|
+
case tU.MICROSECOND:return bj(t,e,n)
|
|
13780
|
+
case tU.NANOSECOND:return yj(t,e,n)}})),rj.prototype.visitTimestampSecond=aj(gj),rj.prototype.visitTimestampMillisecond=aj(vj),rj.prototype.visitTimestampMicrosecond=aj(bj),rj.prototype.visitTimestampNanosecond=aj(yj),rj.prototype.visitTime=aj(((t,e,n)=>{switch(t.type.unit){case tU.SECOND:return wj(t,e,n)
|
|
13781
|
+
case tU.MILLISECOND:return xj(t,e,n)
|
|
13782
|
+
case tU.MICROSECOND:return Cj(t,e,n)
|
|
13783
|
+
case tU.NANOSECOND:return kj(t,e,n)}})),rj.prototype.visitTimeSecond=aj(wj),rj.prototype.visitTimeMillisecond=aj(xj),rj.prototype.visitTimeMicrosecond=aj(Cj),rj.prototype.visitTimeNanosecond=aj(kj),rj.prototype.visitDecimal=aj((({values:t,stride:e},n,i)=>{t.set(i.subarray(0,e),e*n)})),rj.prototype.visitList=aj(((t,e,n)=>{const i=t.children[0],s=t.valueOffsets,o=Tj.getVisitFn(i)
|
|
13782
13784
|
if(Array.isArray(n))for(let t=-1,r=s[e],a=s[e+1];r<a;)o(i,r++,n[++t])
|
|
13783
|
-
else for(let t=-1,r=s[e],a=s[e+1];r<a;)o(i,r++,n.get(++t))})),
|
|
13785
|
+
else for(let t=-1,r=s[e],a=s[e+1];r<a;)o(i,r++,n.get(++t))})),rj.prototype.visitStruct=aj(((t,e,n)=>{const i=t.type.children.map((t=>Tj.getVisitFn(t.type))),s=n instanceof Map?(o=e,r=n,(t,e,n,i)=>e&&t(e,o,r.get(n.name))):n instanceof eG?((t,e)=>(n,i,s,o)=>i&&n(i,t,e.get(o)))(e,n):Array.isArray(n)?((t,e)=>(n,i,s,o)=>i&&n(i,t,e[o]))(e,n):((t,e)=>(n,i,s,o)=>i&&n(i,t,e[s.name]))(e,n)
|
|
13784
13786
|
var o,r
|
|
13785
|
-
t.type.children.forEach(((e,n)=>s(i[n],t.children[n],e,n)))})),
|
|
13786
|
-
null===(i=t.dictionary)||void 0===i||i.set(t.values[e],n)})),
|
|
13787
|
-
case
|
|
13788
|
-
case
|
|
13789
|
-
case
|
|
13787
|
+
t.type.children.forEach(((e,n)=>s(i[n],t.children[n],e,n)))})),rj.prototype.visitUnion=aj(((t,e,n)=>{t.type.mode===XH.Dense?Sj(t,e,n):_j(t,e,n)})),rj.prototype.visitDenseUnion=aj(Sj),rj.prototype.visitSparseUnion=aj(_j),rj.prototype.visitDictionary=aj(((t,e,n)=>{var i
|
|
13788
|
+
null===(i=t.dictionary)||void 0===i||i.set(t.values[e],n)})),rj.prototype.visitInterval=aj(((t,e,n)=>{t.type.unit===eU.DAY_TIME?Ij(t,e,n):Mj(t,e,n)})),rj.prototype.visitIntervalDayTime=aj(Ij),rj.prototype.visitIntervalYearMonth=aj(Mj),rj.prototype.visitDuration=aj(((t,e,n)=>{switch(t.type.unit){case tU.SECOND:return $j(t,e,n)
|
|
13789
|
+
case tU.MILLISECOND:return Ej(t,e,n)
|
|
13790
|
+
case tU.MICROSECOND:return Dj(t,e,n)
|
|
13791
|
+
case tU.NANOSECOND:return Aj(t,e,n)}})),rj.prototype.visitDurationSecond=aj($j),rj.prototype.visitDurationMillisecond=aj(Ej),rj.prototype.visitDurationMicrosecond=aj(Dj),rj.prototype.visitDurationNanosecond=aj(Aj),rj.prototype.visitFixedSizeList=aj(((t,e,n)=>{const{stride:i}=t,s=t.children[0],o=Tj.getVisitFn(s)
|
|
13790
13792
|
if(Array.isArray(n))for(let t=-1,r=e*i;++t<i;)o(s,r+t,n[t])
|
|
13791
|
-
else for(let t=-1,r=e*i;++t<i;)o(s,r+t,n.get(t))})),
|
|
13793
|
+
else for(let t=-1,r=e*i;++t<i;)o(s,r+t,n.get(t))})),rj.prototype.visitMap=aj(((t,e,n)=>{const i=t.children[0],{valueOffsets:s}=t,o=Tj.getVisitFn(i)
|
|
13792
13794
|
let{[e]:r,[e+1]:a}=s
|
|
13793
13795
|
const l=n instanceof Map?n.entries():Object.entries(n)
|
|
13794
13796
|
for(const t of l)if(o(i,r,t),++r>=a)break}))
|
|
13795
|
-
const
|
|
13796
|
-
class
|
|
13797
|
-
for(let s=-1,o=n.length;++s<o;)i[n[s].name]=
|
|
13798
|
-
return i}toString(){return`{${[...this].map((([t,e])=>`${
|
|
13799
|
-
return t<this.numChildren?(this.childIndex=t+1,{done:!1,value:[this.childFields[t].name,
|
|
13800
|
-
class
|
|
13801
|
-
const n=t[
|
|
13802
|
-
if(-1!==n){const i=
|
|
13803
|
-
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[
|
|
13804
|
-
return-1!==i?(
|
|
13805
|
-
const i=
|
|
13806
|
-
return t.subarray(i,s)},
|
|
13807
|
-
return null!==i?
|
|
13808
|
-
return
|
|
13809
|
-
return
|
|
13810
|
-
return i[0]=Math.trunc(n/12),i[1]=Math.trunc(n%12),i},
|
|
13811
|
-
|
|
13812
|
-
return
|
|
13813
|
-
case
|
|
13814
|
-
case
|
|
13815
|
-
case
|
|
13816
|
-
case
|
|
13817
|
-
case
|
|
13818
|
-
case
|
|
13819
|
-
return new
|
|
13820
|
-
return null===(n=t.dictionary)||void 0===n?void 0:n.get(t.values[e])})),
|
|
13821
|
-
case
|
|
13822
|
-
case
|
|
13823
|
-
case
|
|
13824
|
-
return new
|
|
13825
|
-
return new
|
|
13826
|
-
const
|
|
13827
|
-
class
|
|
13828
|
-
for(let i=-1,s=t.length;++i<s;)n[t.get(i)]=
|
|
13829
|
-
return n}toString(){return`{${[...this].map((([t,e])=>`${
|
|
13830
|
-
return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),
|
|
13831
|
-
const n=t[
|
|
13832
|
-
if(-1!==n){const i=
|
|
13833
|
-
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[
|
|
13834
|
-
return-1!==i?(
|
|
13835
|
-
function
|
|
13797
|
+
const Tj=new rj,Oj=Symbol.for("parent"),Rj=Symbol.for("rowIndex")
|
|
13798
|
+
class Fj{constructor(t,e){return this[Oj]=t,this[Rj]=e,new Proxy(this,new Lj)}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Rj],e=this[Oj],n=e.type.children,i={}
|
|
13799
|
+
for(let s=-1,o=n.length;++s<o;)i[n[s].name]=cW.visit(e.children[s],t)
|
|
13800
|
+
return i}toString(){return`{${[...this].map((([t,e])=>`${WU(t)}: ${WU(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Nj(this[Oj],this[Rj])}}class Nj{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex
|
|
13801
|
+
return t<this.numChildren?(this.childIndex=t+1,{done:!1,value:[this.childFields[t].name,cW.visit(this.children[t],this.rowIndex)]}):{done:!0,value:null}}}Object.defineProperties(Fj.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Oj]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Rj]:{writable:!0,enumerable:!1,configurable:!1,value:-1}})
|
|
13802
|
+
class Lj{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Oj].type.children.map((t=>t.name))}has(t,e){return-1!==t[Oj].type.children.findIndex((t=>t.name===e))}getOwnPropertyDescriptor(t,e){if(-1!==t[Oj].type.children.findIndex((t=>t.name===e)))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
|
|
13803
|
+
const n=t[Oj].type.children.findIndex((t=>t.name===e))
|
|
13804
|
+
if(-1!==n){const i=cW.visit(t[Oj].children[n],t[Rj])
|
|
13805
|
+
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[Oj].type.children.findIndex((t=>t.name===e))
|
|
13806
|
+
return-1!==i?(Tj.visit(t[Oj].children[i],t[Rj],n),Reflect.set(t,e,n)):!(!Reflect.has(t,e)&&"symbol"!=typeof e)&&Reflect.set(t,e,n)}}class Bj extends tj{}function Pj(t){return(e,n)=>e.getValid(n)?t(e,n):null}const zj=(t,e,n)=>{if(n+1>=e.length)return null
|
|
13807
|
+
const i=GU(e[n]),s=GU(e[n+1])
|
|
13808
|
+
return t.subarray(i,s)},Vj=({values:t},e)=>((t,e)=>864e5*t[e])(t,e),Hj=({values:t},e)=>GU(t[e]),Uj=({stride:t,values:e},n)=>e[t*n],qj=({values:t},e)=>t[e],jj=({values:t,valueOffsets:e},n)=>zj(t,e,n),Wj=({values:t,valueOffsets:e},n)=>{const i=zj(t,e,n)
|
|
13809
|
+
return null!==i?yH(i):null},Gj=({values:t},e)=>1e3*GU(t[e]),Zj=({values:t},e)=>GU(t[e]),Kj=({values:t},e)=>ZU(t[e],BigInt(1e3)),Yj=({values:t},e)=>ZU(t[e],BigInt(1e6)),Xj=({values:t},e)=>t[e],Jj=({values:t},e)=>t[e],Qj=({values:t},e)=>t[e],tW=({values:t},e)=>t[e],eW=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
|
|
13810
|
+
return cW.visit(i,t.valueOffsets[e])},nW=(t,e)=>{const n=t.type.typeIdToChildIndex[t.typeIds[e]],i=t.children[n]
|
|
13811
|
+
return cW.visit(i,e)},iW=({values:t},e)=>t.subarray(2*e,2*(e+1)),sW=({values:t},e)=>{const n=t[e],i=new Int32Array(2)
|
|
13812
|
+
return i[0]=Math.trunc(n/12),i[1]=Math.trunc(n%12),i},oW=({values:t},e)=>t[e],rW=({values:t},e)=>t[e],aW=({values:t},e)=>t[e],lW=({values:t},e)=>t[e]
|
|
13813
|
+
Bj.prototype.visitNull=Pj(((t,e)=>null)),Bj.prototype.visitBool=Pj((({offset:t,values:e},n)=>{const i=t+n
|
|
13814
|
+
return!!(e[i>>3]&1<<i%8)})),Bj.prototype.visitInt=Pj((({values:t},e)=>t[e])),Bj.prototype.visitInt8=Pj(Uj),Bj.prototype.visitInt16=Pj(Uj),Bj.prototype.visitInt32=Pj(Uj),Bj.prototype.visitInt64=Pj(qj),Bj.prototype.visitUint8=Pj(Uj),Bj.prototype.visitUint16=Pj(Uj),Bj.prototype.visitUint32=Pj(Uj),Bj.prototype.visitUint64=Pj(qj),Bj.prototype.visitFloat=Pj((({type:t,values:e},n)=>t.precision!==JH.HALF?e[n]:oj(e[n]))),Bj.prototype.visitFloat16=Pj((({stride:t,values:e},n)=>oj(e[t*n]))),Bj.prototype.visitFloat32=Pj(Uj),Bj.prototype.visitFloat64=Pj(Uj),Bj.prototype.visitUtf8=Pj(Wj),Bj.prototype.visitLargeUtf8=Pj(Wj),Bj.prototype.visitBinary=Pj(jj),Bj.prototype.visitLargeBinary=Pj(jj),Bj.prototype.visitFixedSizeBinary=Pj((({stride:t,values:e},n)=>e.subarray(t*n,t*(n+1)))),Bj.prototype.visitDate=Pj(((t,e)=>t.type.unit===QH.DAY?Vj(t,e):Hj(t,e))),Bj.prototype.visitDateDay=Pj(Vj),Bj.prototype.visitDateMillisecond=Pj(Hj),Bj.prototype.visitTimestamp=Pj(((t,e)=>{switch(t.type.unit){case tU.SECOND:return Gj(t,e)
|
|
13815
|
+
case tU.MILLISECOND:return Zj(t,e)
|
|
13816
|
+
case tU.MICROSECOND:return Kj(t,e)
|
|
13817
|
+
case tU.NANOSECOND:return Yj(t,e)}})),Bj.prototype.visitTimestampSecond=Pj(Gj),Bj.prototype.visitTimestampMillisecond=Pj(Zj),Bj.prototype.visitTimestampMicrosecond=Pj(Kj),Bj.prototype.visitTimestampNanosecond=Pj(Yj),Bj.prototype.visitTime=Pj(((t,e)=>{switch(t.type.unit){case tU.SECOND:return Xj(t,e)
|
|
13818
|
+
case tU.MILLISECOND:return Jj(t,e)
|
|
13819
|
+
case tU.MICROSECOND:return Qj(t,e)
|
|
13820
|
+
case tU.NANOSECOND:return tW(t,e)}})),Bj.prototype.visitTimeSecond=Pj(Xj),Bj.prototype.visitTimeMillisecond=Pj(Jj),Bj.prototype.visitTimeMicrosecond=Pj(Qj),Bj.prototype.visitTimeNanosecond=Pj(tW),Bj.prototype.visitDecimal=Pj((({values:t,stride:e},n)=>sq.decimal(t.subarray(e*n,e*(n+1))))),Bj.prototype.visitList=Pj(((t,e)=>{const{valueOffsets:n,stride:i,children:s}=t,{[e*i]:o,[e*i+1]:r}=n,a=s[0].slice(o,r-o)
|
|
13821
|
+
return new eG([a])})),Bj.prototype.visitStruct=Pj(((t,e)=>new Fj(t,e))),Bj.prototype.visitUnion=Pj(((t,e)=>t.type.mode===XH.Dense?eW(t,e):nW(t,e))),Bj.prototype.visitDenseUnion=Pj(eW),Bj.prototype.visitSparseUnion=Pj(nW),Bj.prototype.visitDictionary=Pj(((t,e)=>{var n
|
|
13822
|
+
return null===(n=t.dictionary)||void 0===n?void 0:n.get(t.values[e])})),Bj.prototype.visitInterval=Pj(((t,e)=>t.type.unit===eU.DAY_TIME?iW(t,e):sW(t,e))),Bj.prototype.visitIntervalDayTime=Pj(iW),Bj.prototype.visitIntervalYearMonth=Pj(sW),Bj.prototype.visitDuration=Pj(((t,e)=>{switch(t.type.unit){case tU.SECOND:return oW(t,e)
|
|
13823
|
+
case tU.MILLISECOND:return rW(t,e)
|
|
13824
|
+
case tU.MICROSECOND:return aW(t,e)
|
|
13825
|
+
case tU.NANOSECOND:return lW(t,e)}})),Bj.prototype.visitDurationSecond=Pj(oW),Bj.prototype.visitDurationMillisecond=Pj(rW),Bj.prototype.visitDurationMicrosecond=Pj(aW),Bj.prototype.visitDurationNanosecond=Pj(lW),Bj.prototype.visitFixedSizeList=Pj(((t,e)=>{const{stride:n,children:i}=t,s=i[0].slice(e*n,n)
|
|
13826
|
+
return new eG([s])})),Bj.prototype.visitMap=Pj(((t,e)=>{const{valueOffsets:n,children:i}=t,{[e]:s,[e+1]:o}=n,r=i[0]
|
|
13827
|
+
return new fW(r.slice(s,o-s))}))
|
|
13828
|
+
const cW=new Bj,dW=Symbol.for("keys"),hW=Symbol.for("vals"),uW=Symbol.for("kKeysAsStrings"),pW=Symbol.for("_kKeysAsStrings")
|
|
13829
|
+
class fW{constructor(t){return this[dW]=new eG([t.children[0]]).memoize(),this[hW]=t.children[1],new Proxy(this,new gW)}get[uW](){return this[pW]||(this[pW]=Array.from(this[dW].toArray(),String))}[Symbol.iterator](){return new mW(this[dW],this[hW])}get size(){return this[dW].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[dW],e=this[hW],n={}
|
|
13830
|
+
for(let i=-1,s=t.length;++i<s;)n[t.get(i)]=cW.visit(e,i)
|
|
13831
|
+
return n}toString(){return`{${[...this].map((([t,e])=>`${WU(t)}: ${WU(e)}`)).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class mW{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex
|
|
13832
|
+
return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),cW.visit(this.vals,t)]})}}class gW{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[uW]}has(t,e){return t[uW].includes(e)}getOwnPropertyDescriptor(t,e){if(-1!==t[uW].indexOf(e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e]
|
|
13833
|
+
const n=t[uW].indexOf(e)
|
|
13834
|
+
if(-1!==n){const i=cW.visit(Reflect.get(t,hW),n)
|
|
13835
|
+
return Reflect.set(t,e,i),i}}set(t,e,n){const i=t[uW].indexOf(e)
|
|
13836
|
+
return-1!==i?(Tj.visit(Reflect.get(t,hW),i,n),Reflect.set(t,e,n)):!!Reflect.has(t,e)&&Reflect.set(t,e,n)}}let vW
|
|
13837
|
+
function bW(t,e,n,i){const{length:s=0}=t
|
|
13836
13838
|
let o="number"!=typeof e?0:e,r="number"!=typeof n?s:n
|
|
13837
|
-
return o<0&&(o=(o%s+s)%s),r<0&&(r=(r%s+s)%s),r<o&&(
|
|
13838
|
-
const
|
|
13839
|
-
function
|
|
13839
|
+
return o<0&&(o=(o%s+s)%s),r<0&&(r=(r%s+s)%s),r<o&&(vW=o,o=r,r=vW),r>s&&(r=s),i?i(t,o,r):[o,r]}Object.defineProperties(fW.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[dW]:{writable:!0,enumerable:!1,configurable:!1,value:null},[hW]:{writable:!0,enumerable:!1,configurable:!1,value:null},[pW]:{writable:!0,enumerable:!1,configurable:!1,value:null}})
|
|
13840
|
+
const yW=(t,e)=>t<0?e+t:t,wW=t=>t!=t
|
|
13841
|
+
function xW(t){if("object"!==typeof t||null===t)return wW(t)?wW:e=>e===t
|
|
13840
13842
|
if(t instanceof Date){const e=t.valueOf()
|
|
13841
13843
|
return t=>t instanceof Date&&t.valueOf()===e}return ArrayBuffer.isView(t)?e=>!!e&&function(t,e){let n=0
|
|
13842
13844
|
const i=t.length
|
|
@@ -13844,203 +13846,203 @@ if(i!==e.length)return!1
|
|
|
13844
13846
|
if(i>0)do{if(t[n]!==e[n])return!1}while(++n<i)
|
|
13845
13847
|
return!0}(t,e):t instanceof Map?function(t){let e=-1
|
|
13846
13848
|
const n=[]
|
|
13847
|
-
for(const i of t.values())n[++e]=
|
|
13848
|
-
return
|
|
13849
|
-
for(let n=-1,i=t.length;++n<i;)e[n]=
|
|
13850
|
-
return
|
|
13851
|
-
for(let n=-1,i=t.length;++n<i;)e[n]=
|
|
13852
|
-
return
|
|
13849
|
+
for(const i of t.values())n[++e]=xW(i)
|
|
13850
|
+
return CW(n)}(t):Array.isArray(t)?function(t){const e=[]
|
|
13851
|
+
for(let n=-1,i=t.length;++n<i;)e[n]=xW(t[n])
|
|
13852
|
+
return CW(e)}(t):t instanceof eG?function(t){const e=[]
|
|
13853
|
+
for(let n=-1,i=t.length;++n<i;)e[n]=xW(t.get(n))
|
|
13854
|
+
return CW(e)}(t):function(t,e=!1){const n=Object.keys(t)
|
|
13853
13855
|
if(!e&&0===n.length)return()=>!1
|
|
13854
13856
|
const i=[]
|
|
13855
|
-
for(let e=-1,s=n.length;++e<s;)i[e]=
|
|
13856
|
-
return
|
|
13857
|
+
for(let e=-1,s=n.length;++e<s;)i[e]=xW(t[n[e]])
|
|
13858
|
+
return CW(i,n)}(t,!0)}function CW(t,e){return n=>{if(!n||"object"!=typeof n)return!1
|
|
13857
13859
|
switch(n.constructor){case Array:return function(t,e){const n=t.length
|
|
13858
13860
|
if(e.length!==n)return!1
|
|
13859
13861
|
for(let i=-1;++i<n;)if(!t[i](e[i]))return!1
|
|
13860
13862
|
return!0}(t,n)
|
|
13861
|
-
case Map:return
|
|
13862
|
-
case
|
|
13863
|
+
case Map:return kW(t,n,n.keys())
|
|
13864
|
+
case fW:case Fj:case Object:case void 0:return kW(t,n,e||Object.keys(n))}return n instanceof eG&&function(t,e){const n=t.length
|
|
13863
13865
|
if(e.length!==n)return!1
|
|
13864
13866
|
for(let i=-1;++i<n;)if(!t[i](e.get(i)))return!1
|
|
13865
|
-
return!0}(t,n)}}function
|
|
13867
|
+
return!0}(t,n)}}function kW(t,e,n){const i=n[Symbol.iterator](),s=e instanceof Map?e.keys():Object.keys(e)[Symbol.iterator](),o=e instanceof Map?e.values():Object.values(e)[Symbol.iterator]()
|
|
13866
13868
|
let r=0
|
|
13867
13869
|
const a=t.length
|
|
13868
13870
|
let l=o.next(),c=i.next(),d=s.next()
|
|
13869
|
-
for(;r<a&&!c.done&&!d.done&&!l.done&&(c.value===d.value&&t[r](l.value));++r,c=i.next(),d=s.next(),l=o.next());return!!(r===a&&c.done&&d.done&&l.done)||(i.return&&i.return(),s.return&&s.return(),o.return&&o.return(),!1)}function
|
|
13871
|
+
for(;r<a&&!c.done&&!d.done&&!l.done&&(c.value===d.value&&t[r](l.value));++r,c=i.next(),d=s.next(),l=o.next());return!!(r===a&&c.done&&d.done&&l.done)||(i.return&&i.return(),s.return&&s.return(),o.return&&o.return(),!1)}function SW(t,e,n,i){return!!(n&1<<i)}function _W(t,e,n,i){return(n&1<<i)>>i}function IW(t,e,n){const i=n.byteLength+7&-8
|
|
13870
13872
|
if(t>0||n.byteLength<i){const s=new Uint8Array(i)
|
|
13871
|
-
return s.set(t%8==0?n.subarray(t>>3):
|
|
13873
|
+
return s.set(t%8==0?n.subarray(t>>3):MW(new $W(n,t,e,null,SW)).subarray(0,i)),s}return n}function MW(t){const e=[]
|
|
13872
13874
|
let n=0,i=0,s=0
|
|
13873
13875
|
for(const o of t)o&&(s|=1<<i),8==++i&&(e[n++]=s,s=i=0);(0===n||i>0)&&(e[n++]=s)
|
|
13874
13876
|
const o=new Uint8Array(e.length+7&-8)
|
|
13875
|
-
return o.set(e),o}class
|
|
13877
|
+
return o.set(e),o}class $W{constructor(t,e,n,i,s){this.bytes=t,this.length=n,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index<this.length?(8===this.bit&&(this.bit=0,this.byte=this.bytes[this.byteIndex++]),{value:this.get(this.context,this.index++,this.byte,this.bit++)}):{done:!0,value:null}}[Symbol.iterator](){return this}}function EW(t,e,n){if(n-e<=0)return 0
|
|
13876
13878
|
if(n-e<8){let i=0
|
|
13877
|
-
for(const s of new
|
|
13879
|
+
for(const s of new $W(t,e,n-e,t,_W))i+=s
|
|
13878
13880
|
return i}const i=n>>3<<3,s=e+(e%8==0?0:8-e%8)
|
|
13879
|
-
return
|
|
13881
|
+
return EW(t,e,s)+EW(t,i,n)+function(t,e,n){let i=0,s=Math.trunc(e)
|
|
13880
13882
|
const o=new DataView(t.buffer,t.byteOffset,t.byteLength),r=void 0===n?t.byteLength:s+n
|
|
13881
|
-
for(;r-s>=4;)i+=
|
|
13882
|
-
for(;r-s>=2;)i+=
|
|
13883
|
-
for(;r-s>=1;)i+=
|
|
13884
|
-
return i}(t,s>>3,i-s>>3)}function
|
|
13885
|
-
return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24}class
|
|
13886
|
-
return
|
|
13883
|
+
for(;r-s>=4;)i+=DW(o.getUint32(s)),s+=4
|
|
13884
|
+
for(;r-s>=2;)i+=DW(o.getUint16(s)),s+=2
|
|
13885
|
+
for(;r-s>=1;)i+=DW(o.getUint8(s)),s+=1
|
|
13886
|
+
return i}(t,s>>3,i-s>>3)}function DW(t){let e=Math.trunc(t)
|
|
13887
|
+
return e-=e>>>1&1431655765,e=(858993459&e)+(e>>>2&858993459),16843009*(e+(e>>>4)&252645135)>>>24}class AW{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(0!==this._nullCount){const{type:t}=this
|
|
13888
|
+
return $q.isSparseUnion(t)||$q.isDenseUnion(t)?this.children.some((t=>t.nullable)):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0
|
|
13887
13889
|
const{valueOffsets:e,values:n,nullBitmap:i,typeIds:s}=this
|
|
13888
|
-
return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce(((t,e)=>t+e.byteLength),t)}get nullCount(){if(
|
|
13890
|
+
return e&&(t+=e.byteLength),n&&(t+=n.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce(((t,e)=>t+e.byteLength),t)}get nullCount(){if($q.isUnion(this.type))return this.children.reduce(((t,e)=>t+e.nullCount),0)
|
|
13889
13891
|
let t,e=this._nullCount
|
|
13890
|
-
return e<=-1&&(t=this.nullBitmap)&&(this._nullCount=e=0===t.length?0:this.length
|
|
13891
|
-
this.type=t,this.children=o,this.dictionary=r,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1)),s instanceof
|
|
13892
|
-
if(
|
|
13892
|
+
return e<=-1&&(t=this.nullBitmap)&&(this._nullCount=e=0===t.length?0:this.length-EW(t,this.offset,this.offset+this.length)),e}constructor(t,e,n,i,s,o=[],r){let a
|
|
13893
|
+
this.type=t,this.children=o,this.dictionary=r,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1)),s instanceof AW?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=Qq(t),s&&((a=s[0])&&(this.valueOffsets=a),(a=s[1])&&(this.values=a),(a=s[2])&&(this.nullBitmap=a),(a=s[3])&&(this.typeIds=a)))}getValid(t){const{type:e}=this
|
|
13894
|
+
if($q.isUnion(e)){const n=e,i=this.children[n.typeIdToChildIndex[this.typeIds[t]]],s=n.mode===XH.Dense?this.valueOffsets[t]:t
|
|
13893
13895
|
return i.getValid(s)}if(this.nullable&&this.nullCount>0){const e=this.offset+t
|
|
13894
|
-
return
|
|
13896
|
+
return!!(this.nullBitmap[e>>3]&1<<e%8)}return!0}setValid(t,e){let n
|
|
13895
13897
|
const{type:i}=this
|
|
13896
|
-
if(
|
|
13898
|
+
if($q.isUnion(i)){const s=i,o=this.children[s.typeIdToChildIndex[this.typeIds[t]]],r=s.mode===XH.Dense?this.valueOffsets[t]:t
|
|
13897
13899
|
n=o.getValid(r),o.setValid(r,e)}else{let{nullBitmap:i}=this
|
|
13898
|
-
const{offset:s,length:o}=this,r=s+t,a=1<<r%8,l=r>>3;(!i||i.byteLength<=l)&&(i=new Uint8Array((s+o+63&-64)>>3).fill(255),this.nullCount>0?(i.set(
|
|
13900
|
+
const{offset:s,length:o}=this,r=s+t,a=1<<r%8,l=r>>3;(!i||i.byteLength<=l)&&(i=new Uint8Array((s+o+63&-64)>>3).fill(255),this.nullCount>0?(i.set(IW(s,o,this.nullBitmap),0),Object.assign(this,{nullBitmap:i})):Object.assign(this,{nullBitmap:i,_nullCount:0}))
|
|
13899
13901
|
const c=i[l]
|
|
13900
|
-
n
|
|
13901
|
-
return this.clone(this.type,this.offset+t,e,o,a,0===s.length||this.valueOffsets?s:this._sliceChildren(s,r*t,r*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===
|
|
13902
|
+
n=!!(c&a),i[l]=e?c|a:c&~a}return n!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,n=this.length,i=this._nullCount,s=this,o=this.children){return new AW(t,e,n,i,s,o,this.dictionary)}slice(t,e){const{stride:n,typeId:i,children:s}=this,o=+(0===this._nullCount)-1,r=16===i?n:1,a=this._sliceBuffers(t,e,n,i)
|
|
13903
|
+
return this.clone(this.type,this.offset+t,e,o,a,0===s.length||this.valueOffsets?s:this._sliceChildren(s,r*t,r*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===qU.Null)return this.clone(this.type,0,t,0)
|
|
13902
13904
|
const{length:e,nullCount:n}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3)
|
|
13903
|
-
i[e>>3]=(1<<e-(-8&e))-1,n>0&&i.set(
|
|
13905
|
+
i[e>>3]=(1<<e-(-8&e))-1,n>0&&i.set(IW(this.offset,e,this.nullBitmap),0)
|
|
13904
13906
|
const s=this.buffers
|
|
13905
|
-
return s[
|
|
13907
|
+
return s[jU.VALIDITY]=i,this.clone(this.type,0,t,n+(t-e),s)}_sliceBuffers(t,e,n,i){let s
|
|
13906
13908
|
const{buffers:o}=this
|
|
13907
|
-
return(s=o[
|
|
13908
|
-
class
|
|
13909
|
-
return new
|
|
13910
|
-
return new
|
|
13911
|
-
return new
|
|
13912
|
-
return new
|
|
13913
|
-
return new
|
|
13914
|
-
return new
|
|
13915
|
-
return new
|
|
13916
|
-
return new
|
|
13917
|
-
return new
|
|
13918
|
-
return new
|
|
13919
|
-
return new
|
|
13920
|
-
return new
|
|
13921
|
-
return new
|
|
13922
|
-
return new
|
|
13923
|
-
return new
|
|
13924
|
-
if(
|
|
13925
|
-
const a=
|
|
13926
|
-
return new
|
|
13927
|
-
return new
|
|
13928
|
-
return new
|
|
13929
|
-
return new
|
|
13930
|
-
return new
|
|
13931
|
-
return new
|
|
13932
|
-
function
|
|
13933
|
-
if(!t.done)return t;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function
|
|
13909
|
+
return(s=o[jU.TYPE])&&(o[jU.TYPE]=s.subarray(t,t+e)),(s=o[jU.OFFSET])&&(o[jU.OFFSET]=s.subarray(t,t+e+1))||(s=o[jU.DATA])&&(o[jU.DATA]=6===i?s:s.subarray(n*t,n*(t+e))),o}_sliceChildren(t,e,n){return t.map((t=>t.slice(e,n)))}}AW.prototype.children=Object.freeze([])
|
|
13910
|
+
class TW extends tj{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{type:e,offset:n=0,length:i=0}=t
|
|
13911
|
+
return new AW(e,n,i,i)}visitBool(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length>>3,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13912
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitInt(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13913
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitFloat(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13914
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitUtf8(t){const{type:e,offset:n=0}=t,i=VH(t.data),s=VH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13915
|
+
return new AW(e,n,r,a,[o,i,s])}visitLargeUtf8(t){const{type:e,offset:n=0}=t,i=VH(t.data),s=VH(t.nullBitmap),o=zH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13916
|
+
return new AW(e,n,r,a,[o,i,s])}visitBinary(t){const{type:e,offset:n=0}=t,i=VH(t.data),s=VH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13917
|
+
return new AW(e,n,r,a,[o,i,s])}visitLargeBinary(t){const{type:e,offset:n=0}=t,i=VH(t.data),s=VH(t.nullBitmap),o=zH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13918
|
+
return new AW(e,n,r,a,[o,i,s])}visitFixedSizeBinary(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13919
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitDate(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13920
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitTimestamp(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13921
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitTime(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13922
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitDecimal(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13923
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitList(t){const{type:e,offset:n=0,child:i}=t,s=VH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13924
|
+
return new AW(e,n,r,a,[o,void 0,s],[i])}visitStruct(t){const{type:e,offset:n=0,children:i=[]}=t,s=VH(t.nullBitmap),{length:o=i.reduce(((t,{length:e})=>Math.max(t,e)),0),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13925
|
+
return new AW(e,n,o,r,[void 0,void 0,s],i)}visitUnion(t){const{type:e,offset:n=0,children:i=[]}=t,s=BH(e.ArrayType,t.typeIds),{length:o=s.length,nullCount:r=-1}=t
|
|
13926
|
+
if($q.isSparseUnion(e))return new AW(e,n,o,r,[void 0,void 0,void 0,s],i)
|
|
13927
|
+
const a=PH(t.valueOffsets)
|
|
13928
|
+
return new AW(e,n,o,r,[a,void 0,void 0,s],i)}visitDictionary(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.indices.ArrayType,t.data),{dictionary:o=new eG([(new TW).visit({type:e.dictionary})])}=t,{length:r=s.length,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13929
|
+
return new AW(e,n,r,a,[void 0,s,i],[],o)}visitInterval(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13930
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitDuration(t){const{type:e,offset:n=0}=t,i=VH(t.nullBitmap),s=BH(e.ArrayType,t.data),{length:o=s.length,nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13931
|
+
return new AW(e,n,o,r,[void 0,s,i])}visitFixedSizeList(t){const{type:e,offset:n=0,child:i=(new TW).visit({type:e.valueType})}=t,s=VH(t.nullBitmap),{length:o=i.length/Qq(e),nullCount:r=(t.nullBitmap?-1:0)}=t
|
|
13932
|
+
return new AW(e,n,o,r,[void 0,void 0,s],[i])}visitMap(t){const{type:e,offset:n=0,child:i=(new TW).visit({type:e.childType})}=t,s=VH(t.nullBitmap),o=PH(t.valueOffsets),{length:r=o.length-1,nullCount:a=(t.nullBitmap?-1:0)}=t
|
|
13933
|
+
return new AW(e,n,r,a,[o,void 0,s],[i])}}const OW=new TW
|
|
13934
|
+
function RW(t){return OW.visit(t)}class FW{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndex<this.numChunks;){const t=this.chunkIterator.next()
|
|
13935
|
+
if(!t.done)return t;++this.chunkIndex<this.numChunks&&(this.chunkIterator=this.getChunkIterator(this.chunkIndex))}return{done:!0,value:null}}[Symbol.iterator](){return this}}function NW(t){return t.reduce(((t,e)=>t+e.nullCount),0)}function LW(t){return t.reduce(((t,e,n)=>(t[n+1]=t[n]+e.length,t)),new Uint32Array(t.length+1))}function BW(t,e,n,i){const s=[]
|
|
13934
13936
|
for(let o=-1,r=t.length;++o<r;){const r=t[o],a=e[o],{length:l}=r
|
|
13935
13937
|
if(a>=i)break
|
|
13936
13938
|
if(n>=a+l)continue
|
|
13937
13939
|
if(a>=n&&a+l<=i){s.push(r)
|
|
13938
13940
|
continue}const c=Math.max(0,n-a),d=Math.min(i-a,l)
|
|
13939
|
-
s.push(r.slice(c,d-c))}return 0===s.length&&s.push(t[0].slice(0,0)),s}function
|
|
13941
|
+
s.push(r.slice(c,d-c))}return 0===s.length&&s.push(t[0].slice(0,0)),s}function PW(t,e,n,i){let s=0,o=0,r=e.length-1
|
|
13940
13942
|
do{if(s>=r-1)return n<e[r]?i(t,s,n-e[s]):null
|
|
13941
|
-
o=s+Math.trunc(.5*(r-s)),n<e[o]?r=o:s=o}while(s<r)}function
|
|
13943
|
+
o=s+Math.trunc(.5*(r-s)),n<e[o]?r=o:s=o}while(s<r)}function zW(t,e){return t.getValid(e)}function VW(t){function e(e,n,i){return t(e[n],i)}return function(t){return PW(this.data,this._offsets,t,e)}}function HW(t){let e
|
|
13942
13944
|
function n(n,i,s){return t(n[i],s,e)}return function(t,i){const s=this.data
|
|
13943
13945
|
e=i
|
|
13944
|
-
const o=
|
|
13945
|
-
return e=void 0,o}}function
|
|
13946
|
+
const o=PW(s,this._offsets,t,n)
|
|
13947
|
+
return e=void 0,o}}function UW(t){let e
|
|
13946
13948
|
function n(n,i,s){let o=s,r=0,a=0
|
|
13947
13949
|
for(let s=i-1,l=n.length;++s<l;){const i=n[s]
|
|
13948
13950
|
if(~(r=t(i,e,o)))return a+r
|
|
13949
13951
|
o=0,a+=i.length}return-1}return function(t,i){e=t
|
|
13950
|
-
const s=this.data,o="number"!=typeof i?n(s,0,0):
|
|
13951
|
-
return e=void 0,o}}class
|
|
13952
|
-
if(null===e)switch(t.typeId){case
|
|
13952
|
+
const s=this.data,o="number"!=typeof i?n(s,0,0):PW(s,this._offsets,i,n)
|
|
13953
|
+
return e=void 0,o}}class qW extends tj{}function jW(t,e,n){if(void 0===e)return-1
|
|
13954
|
+
if(null===e)switch(t.typeId){case qU.Union:case qU.Dictionary:break
|
|
13953
13955
|
default:return function(t,e){const{nullBitmap:n}=t
|
|
13954
13956
|
if(!n||t.nullCount<=0)return-1
|
|
13955
13957
|
let i=0
|
|
13956
|
-
for(const s of new
|
|
13958
|
+
for(const s of new $W(n,t.offset+(e||0),t.length,n,SW)){if(!s)return i;++i}return-1}(t,n)}const i=cW.getVisitFn(t),s=xW(e)
|
|
13957
13959
|
for(let e=(n||0)-1,o=t.length;++e<o;)if(s(i(t,e)))return e
|
|
13958
|
-
return-1}function
|
|
13960
|
+
return-1}function WW(t,e,n){const i=cW.getVisitFn(t),s=xW(e)
|
|
13959
13961
|
for(let e=(n||0)-1,o=t.length;++e<o;)if(s(i(t,e)))return e
|
|
13960
|
-
return-1}
|
|
13961
|
-
const
|
|
13962
|
-
class
|
|
13963
|
-
if(0===t.nullCount&&1===t.stride&&(
|
|
13962
|
+
return-1}qW.prototype.visitNull=function(t,e){return null===e&&t.length>0?0:-1},qW.prototype.visitBool=jW,qW.prototype.visitInt=jW,qW.prototype.visitInt8=jW,qW.prototype.visitInt16=jW,qW.prototype.visitInt32=jW,qW.prototype.visitInt64=jW,qW.prototype.visitUint8=jW,qW.prototype.visitUint16=jW,qW.prototype.visitUint32=jW,qW.prototype.visitUint64=jW,qW.prototype.visitFloat=jW,qW.prototype.visitFloat16=jW,qW.prototype.visitFloat32=jW,qW.prototype.visitFloat64=jW,qW.prototype.visitUtf8=jW,qW.prototype.visitLargeUtf8=jW,qW.prototype.visitBinary=jW,qW.prototype.visitLargeBinary=jW,qW.prototype.visitFixedSizeBinary=jW,qW.prototype.visitDate=jW,qW.prototype.visitDateDay=jW,qW.prototype.visitDateMillisecond=jW,qW.prototype.visitTimestamp=jW,qW.prototype.visitTimestampSecond=jW,qW.prototype.visitTimestampMillisecond=jW,qW.prototype.visitTimestampMicrosecond=jW,qW.prototype.visitTimestampNanosecond=jW,qW.prototype.visitTime=jW,qW.prototype.visitTimeSecond=jW,qW.prototype.visitTimeMillisecond=jW,qW.prototype.visitTimeMicrosecond=jW,qW.prototype.visitTimeNanosecond=jW,qW.prototype.visitDecimal=jW,qW.prototype.visitList=jW,qW.prototype.visitStruct=jW,qW.prototype.visitUnion=jW,qW.prototype.visitDenseUnion=WW,qW.prototype.visitSparseUnion=WW,qW.prototype.visitDictionary=jW,qW.prototype.visitInterval=jW,qW.prototype.visitIntervalDayTime=jW,qW.prototype.visitIntervalYearMonth=jW,qW.prototype.visitDuration=jW,qW.prototype.visitDurationSecond=jW,qW.prototype.visitDurationMillisecond=jW,qW.prototype.visitDurationMicrosecond=jW,qW.prototype.visitDurationNanosecond=jW,qW.prototype.visitFixedSizeList=jW,qW.prototype.visitMap=jW
|
|
13963
|
+
const GW=new qW
|
|
13964
|
+
class ZW extends tj{}function KW(t){const{type:e}=t
|
|
13965
|
+
if(0===t.nullCount&&1===t.stride&&($q.isInt(e)&&64!==e.bitWidth||$q.isTime(e)&&64!==e.bitWidth||$q.isFloat(e)&&e.precision!==JH.HALF))return new FW(t.data.length,(e=>{const n=t.data[e]
|
|
13964
13966
|
return n.values.subarray(0,n.length)[Symbol.iterator]()}))
|
|
13965
13967
|
let n=0
|
|
13966
|
-
return new
|
|
13967
|
-
return n+=i,new
|
|
13968
|
-
const
|
|
13969
|
-
var
|
|
13970
|
-
const
|
|
13971
|
-
class
|
|
13972
|
-
const s=t[0]instanceof
|
|
13973
|
-
if(0===s.length||s.some((t=>!(t instanceof
|
|
13968
|
+
return new FW(t.data.length,(e=>{const i=t.data[e].length,s=t.slice(n,n+i)
|
|
13969
|
+
return n+=i,new YW(s)}))}class YW{constructor(t){this.vector=t,this.index=0}next(){return this.index<this.vector.length?{value:this.vector.get(this.index++)}:{done:!0,value:null}}[Symbol.iterator](){return this}}ZW.prototype.visitNull=KW,ZW.prototype.visitBool=KW,ZW.prototype.visitInt=KW,ZW.prototype.visitInt8=KW,ZW.prototype.visitInt16=KW,ZW.prototype.visitInt32=KW,ZW.prototype.visitInt64=KW,ZW.prototype.visitUint8=KW,ZW.prototype.visitUint16=KW,ZW.prototype.visitUint32=KW,ZW.prototype.visitUint64=KW,ZW.prototype.visitFloat=KW,ZW.prototype.visitFloat16=KW,ZW.prototype.visitFloat32=KW,ZW.prototype.visitFloat64=KW,ZW.prototype.visitUtf8=KW,ZW.prototype.visitLargeUtf8=KW,ZW.prototype.visitBinary=KW,ZW.prototype.visitLargeBinary=KW,ZW.prototype.visitFixedSizeBinary=KW,ZW.prototype.visitDate=KW,ZW.prototype.visitDateDay=KW,ZW.prototype.visitDateMillisecond=KW,ZW.prototype.visitTimestamp=KW,ZW.prototype.visitTimestampSecond=KW,ZW.prototype.visitTimestampMillisecond=KW,ZW.prototype.visitTimestampMicrosecond=KW,ZW.prototype.visitTimestampNanosecond=KW,ZW.prototype.visitTime=KW,ZW.prototype.visitTimeSecond=KW,ZW.prototype.visitTimeMillisecond=KW,ZW.prototype.visitTimeMicrosecond=KW,ZW.prototype.visitTimeNanosecond=KW,ZW.prototype.visitDecimal=KW,ZW.prototype.visitList=KW,ZW.prototype.visitStruct=KW,ZW.prototype.visitUnion=KW,ZW.prototype.visitDenseUnion=KW,ZW.prototype.visitSparseUnion=KW,ZW.prototype.visitDictionary=KW,ZW.prototype.visitInterval=KW,ZW.prototype.visitIntervalDayTime=KW,ZW.prototype.visitIntervalYearMonth=KW,ZW.prototype.visitDuration=KW,ZW.prototype.visitDurationSecond=KW,ZW.prototype.visitDurationMillisecond=KW,ZW.prototype.visitDurationMicrosecond=KW,ZW.prototype.visitDurationNanosecond=KW,ZW.prototype.visitFixedSizeList=KW,ZW.prototype.visitMap=KW
|
|
13970
|
+
const XW=new ZW
|
|
13971
|
+
var JW
|
|
13972
|
+
const QW={},tG={}
|
|
13973
|
+
class eG{constructor(t){var e,n,i
|
|
13974
|
+
const s=t[0]instanceof eG?t.flatMap((t=>t.data)):t
|
|
13975
|
+
if(0===s.length||s.some((t=>!(t instanceof AW))))throw new TypeError("Vector constructor expects an Array of Data instances.")
|
|
13974
13976
|
const o=null===(e=s[0])||void 0===e?void 0:e.type
|
|
13975
13977
|
switch(s.length){case 0:this._offsets=[0]
|
|
13976
13978
|
break
|
|
13977
|
-
case 1:{const{get:t,set:e,indexOf:n}=
|
|
13978
|
-
this.isValid=t=>
|
|
13979
|
-
break}default:Object.setPrototypeOf(this,
|
|
13980
|
-
switch(t.typeId){case
|
|
13979
|
+
case 1:{const{get:t,set:e,indexOf:n}=QW[o.typeId],i=s[0]
|
|
13980
|
+
this.isValid=t=>zW(i,t),this.get=e=>t(i,e),this.set=(t,n)=>e(i,t,n),this.indexOf=t=>n(i,t),this._offsets=[0,i.length]
|
|
13981
|
+
break}default:Object.setPrototypeOf(this,tG[o.typeId]),this._offsets=LW(s)}this.data=s,this.type=o,this.stride=Qq(o),this.numChildren=null!==(i=null===(n=o.children)||void 0===n?void 0:n.length)&&void 0!==i?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce(((t,e)=>t+e.byteLength),0)}get nullable(){return this.data.some((t=>t.nullable))}get nullCount(){return NW(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${qU[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(yW(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return XW.visit(this)}concat(...t){return new eG(this.data.concat(t.flatMap((t=>t.data)).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new eG(bW(this,t,e,(({data:t,_offsets:e},n,i)=>BW(t,e,n,i))))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:n,stride:i,ArrayType:s}=this
|
|
13982
|
+
switch(t.typeId){case qU.Int:case qU.Float:case qU.Decimal:case qU.Time:case qU.Timestamp:switch(e.length){case 0:return new s
|
|
13981
13983
|
case 1:return e[0].values.subarray(0,n*i)
|
|
13982
13984
|
default:return e.reduce(((t,{values:e,length:n})=>(t.array.set(e.subarray(0,n*i),t.offset),t.offset+=n*i,t)),{array:new s(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e
|
|
13983
|
-
return this.getChildAt(null===(e=this.type.children)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.numChildren?new
|
|
13985
|
+
return this.getChildAt(null===(e=this.type.children)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.numChildren?new eG(this.data.map((({children:e})=>e[t]))):null}get isMemoized(){return!!$q.isDictionary(this.type)&&this.data[0].dictionary.isMemoized}memoize(){if($q.isDictionary(this.type)){const t=new nG(this.data[0].dictionary),e=this.data.map((e=>{const n=e.clone()
|
|
13984
13986
|
return n.dictionary=t,n}))
|
|
13985
|
-
return new
|
|
13987
|
+
return new eG(e)}return new nG(this)}unmemoize(){if($q.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map((e=>{const n=e.clone()
|
|
13986
13988
|
return n.dictionary=t,n}))
|
|
13987
|
-
return new
|
|
13988
|
-
const e=Object.keys(
|
|
13989
|
-
for(const n of e){const e=
|
|
13990
|
-
|
|
13991
|
-
class
|
|
13989
|
+
return new eG(e)}return this}}JW=Symbol.toStringTag,eG[JW]=(t=>{t.type=$q.prototype,t.data=[],t.length=0,t.stride=1,t.numChildren=0,t._offsets=new Uint32Array([0]),t[Symbol.isConcatSpreadable]=!0
|
|
13990
|
+
const e=Object.keys(qU).map((t=>qU[t])).filter((t=>"number"==typeof t&&t!==qU.NONE))
|
|
13991
|
+
for(const n of e){const e=cW.getVisitFnByTypeId(n),i=Tj.getVisitFnByTypeId(n),s=GW.getVisitFnByTypeId(n)
|
|
13992
|
+
QW[n]={get:e,set:i,indexOf:s},tG[n]=Object.create(t,{isValid:{value:VW(zW)},get:{value:VW(cW.getVisitFnByTypeId(n))},set:{value:HW(Tj.getVisitFnByTypeId(n))},indexOf:{value:UW(GW.getVisitFnByTypeId(n))}})}return"Vector"})(eG.prototype)
|
|
13993
|
+
class nG extends eG{constructor(t){super(t.data)
|
|
13992
13994
|
const e=this.get,n=this.set,i=this.slice,s=new Array(this.length)
|
|
13993
13995
|
Object.defineProperty(this,"get",{value(t){const n=s[t]
|
|
13994
13996
|
if(void 0!==n)return n
|
|
13995
13997
|
const i=e.call(this,t)
|
|
13996
|
-
return s[t]=i,i}}),Object.defineProperty(this,"set",{value(t,e){n.call(this,t,e),s[t]=e}}),Object.defineProperty(this,"slice",{value:(t,e)=>new
|
|
13997
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
13998
|
-
return e?(t||new
|
|
13999
|
-
return n?(e||new
|
|
13998
|
+
return s[t]=i,i}}),Object.defineProperty(this,"set",{value(t,e){n.call(this,t,e),s[t]=e}}),Object.defineProperty(this,"slice",{value:(t,e)=>new nG(i.call(this,t,e))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new eG(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class iG{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(t,e,n,i){return t.prep(8,24),t.writeInt64(BigInt(null!=i?i:0)),t.pad(4),t.writeInt32(n),t.writeInt64(BigInt(null!=e?e:0)),t.offset()}}class sG{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFooter(t,e){return(e||new sG).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+4),(e||new sG).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4)
|
|
13999
|
+
return t?this.bb.readInt16(this.bb_pos+t):YH.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6)
|
|
14000
|
+
return e?(t||new HU).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const n=this.bb.__offset(this.bb_pos,8)
|
|
14001
|
+
return n?(e||new iG).__init(this.bb.__vector(this.bb_pos+n)+24*t,this.bb):null}dictionariesLength(){const t=this.bb.__offset(this.bb_pos,8)
|
|
14000
14002
|
return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,e){const n=this.bb.__offset(this.bb_pos,10)
|
|
14001
|
-
return n?(e||new
|
|
14003
|
+
return n?(e||new iG).__init(this.bb.__vector(this.bb_pos+n)+24*t,this.bb):null}recordBatchesLength(){const t=this.bb.__offset(this.bb_pos,10)
|
|
14002
14004
|
return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12)
|
|
14003
|
-
return n?(e||new
|
|
14004
|
-
return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,
|
|
14005
|
+
return n?(e||new wU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12)
|
|
14006
|
+
return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,YH.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
|
|
14005
14007
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
14006
|
-
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}class
|
|
14007
|
-
return new
|
|
14008
|
-
return new
|
|
14009
|
-
return!~e||(n[e]=t.clone({metadata:
|
|
14010
|
-
return new
|
|
14011
|
-
class
|
|
14012
|
-
return t[0]&&"object"==typeof t[0]&&(({name:e}=t[0]),void 0===n&&(n=t[0].type),void 0===i&&(i=t[0].nullable),void 0===s&&(s=t[0].metadata)),new
|
|
14013
|
-
return t[0]&&"object"==typeof t[0]?({name:e=this.name,type:n=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0]):[e=this.name,n=this.type,i=this.nullable,s=this.metadata]=t,
|
|
14014
|
-
if(
|
|
14015
|
-
i.children&&i.children.length>0&&
|
|
14016
|
-
var
|
|
14017
|
-
class
|
|
14018
|
-
const e=
|
|
14019
|
-
return new
|
|
14020
|
-
|
|
14021
|
-
for(const n of[...t.recordBatches()].slice().reverse())
|
|
14008
|
+
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}class oG{constructor(t=[],e,n,i=YH.V5){this.fields=t||[],this.metadata=e||new Map,n||(n=lG(t)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map((t=>t.name))}toString(){return`Schema<{ ${this.fields.map(((t,e)=>`${e}: ${t}`)).join(", ")} }>`}select(t){const e=new Set(t),n=this.fields.filter((t=>e.has(t.name)))
|
|
14009
|
+
return new oG(n,this.metadata)}selectAt(t){const e=t.map((t=>this.fields[t])).filter(Boolean)
|
|
14010
|
+
return new oG(e,this.metadata)}assign(...t){const e=t[0]instanceof oG?t[0]:Array.isArray(t[0])?new oG(t[0]):new oG(t),n=[...this.fields],i=aG(aG(new Map,this.metadata),e.metadata),s=e.fields.filter((t=>{const e=n.findIndex((e=>e.name===t.name))
|
|
14011
|
+
return!~e||(n[e]=t.clone({metadata:aG(aG(new Map,n[e].metadata),t.metadata)}))&&!1})),o=lG(s,new Map)
|
|
14012
|
+
return new oG([...n,...s],i,new Map([...this.dictionaries,...o]))}}oG.prototype.fields=null,oG.prototype.metadata=null,oG.prototype.dictionaries=null
|
|
14013
|
+
class rG{static new(...t){let[e,n,i,s]=t
|
|
14014
|
+
return t[0]&&"object"==typeof t[0]&&(({name:e}=t[0]),void 0===n&&(n=t[0].type),void 0===i&&(i=t[0].nullable),void 0===s&&(s=t[0].metadata)),new rG(`${e}`,n,i,s)}constructor(t,e,n=!1,i){this.name=t,this.type=e,this.nullable=n,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,n,i,s]=t
|
|
14015
|
+
return t[0]&&"object"==typeof t[0]?({name:e=this.name,type:n=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0]):[e=this.name,n=this.type,i=this.nullable,s=this.metadata]=t,rG.new(e,n,i,s)}}function aG(t,e){return new Map([...t||new Map,...e||new Map])}function lG(t,e=new Map){for(let n=-1,i=t.length;++n<i;){const i=t[n].type
|
|
14016
|
+
if($q.isDictionary(i))if(e.has(i.id)){if(e.get(i.id)!==i.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else e.set(i.id,i.dictionary)
|
|
14017
|
+
i.children&&i.children.length>0&&lG(i.children,e)}return e}rG.prototype.type=null,rG.prototype.name=null,rG.prototype.nullable=null,rG.prototype.metadata=null
|
|
14018
|
+
var cG=lU,dG=aU
|
|
14019
|
+
class hG{static decode(t){t=new dG(VH(t))
|
|
14020
|
+
const e=sG.getRootAsFooter(t),n=oG.decode(e.schema(),new Map,e.version())
|
|
14021
|
+
return new uG(n,e)}static encode(t){const e=new cG,n=oG.encode(e,t.schema)
|
|
14022
|
+
sG.startRecordBatchesVector(e,t.numRecordBatches)
|
|
14023
|
+
for(const n of[...t.recordBatches()].slice().reverse())pG.encode(e,n)
|
|
14022
14024
|
const i=e.endVector()
|
|
14023
|
-
|
|
14024
|
-
for(const n of[...t.dictionaryBatches()].slice().reverse())
|
|
14025
|
+
sG.startDictionariesVector(e,t.numDictionaries)
|
|
14026
|
+
for(const n of[...t.dictionaryBatches()].slice().reverse())pG.encode(e,n)
|
|
14025
14027
|
const s=e.endVector()
|
|
14026
|
-
return
|
|
14027
|
-
if(e)return
|
|
14028
|
-
if(e)return
|
|
14029
|
-
return
|
|
14030
|
-
class
|
|
14031
|
-
for(;t.length>0;)t.shift().resolve(
|
|
14032
|
-
this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return
|
|
14033
|
-
throw new Error("AsyncQueue is closed")}}class
|
|
14028
|
+
return sG.startFooter(e),sG.addSchema(e,n),sG.addVersion(e,YH.V5),sG.addRecordBatches(e,i),sG.addDictionaries(e,s),sG.finishFooterBuffer(e,sG.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=YH.V5,n,i){this.schema=t,this.version=e,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let t,e=-1,n=this.numRecordBatches;++e<n;)(t=this.getRecordBatch(e))&&(yield t)}*dictionaryBatches(){for(let t,e=-1,n=this.numDictionaries;++e<n;)(t=this.getDictionaryBatch(e))&&(yield t)}getRecordBatch(t){return t>=0&&t<this.numRecordBatches&&this._recordBatches[t]||null}getDictionaryBatch(t){return t>=0&&t<this.numDictionaries&&this._dictionaryBatches[t]||null}}class uG extends hG{get numRecordBatches(){return this._footer.recordBatchesLength()}get numDictionaries(){return this._footer.dictionariesLength()}constructor(t,e){super(t,e.version()),this._footer=e}getRecordBatch(t){if(t>=0&&t<this.numRecordBatches){const e=this._footer.recordBatches(t)
|
|
14029
|
+
if(e)return pG.decode(e)}return null}getDictionaryBatch(t){if(t>=0&&t<this.numDictionaries){const e=this._footer.dictionaries(t)
|
|
14030
|
+
if(e)return pG.decode(e)}return null}}class pG{static decode(t){return new pG(t.metaDataLength(),t.bodyLength(),t.offset())}static encode(t,e){const{metaDataLength:n}=e,i=BigInt(e.offset),s=BigInt(e.bodyLength)
|
|
14031
|
+
return iG.createBlock(t,i,n,s)}constructor(t,e,n){this.metaDataLength=t,this.offset=GU(n),this.bodyLength=GU(e)}}const fG=Object.freeze({done:!0,value:void 0})
|
|
14032
|
+
class mG{constructor(t){this._json=t}get schema(){return this._json.schema}get batches(){return this._json.batches||[]}get dictionaries(){return this._json.dictionaries||[]}}class gG{tee(){return this._getDOMStream().tee()}pipe(t,e){return this._getNodeStream().pipe(t,e)}pipeTo(t,e){return this._getDOMStream().pipeTo(t,e)}pipeThrough(t,e){return this._getDOMStream().pipeThrough(t,e)}_getDOMStream(){return this._DOMStream||(this._DOMStream=this.toDOMStream())}_getNodeStream(){return this._nodeStream||(this._nodeStream=this.toNodeStream())}}class vG extends gG{constructor(){super(),this._values=[],this.resolvers=[],this._closedPromise=new Promise((t=>this._closedPromiseResolve=t))}get closed(){return this._closedPromise}cancel(t){return e(this,void 0,void 0,(function*(){yield this.return(t)}))}write(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}abort(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}close(){if(this._closedPromiseResolve){const{resolvers:t}=this
|
|
14033
|
+
for(;t.length>0;)t.shift().resolve(fG)
|
|
14034
|
+
this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return WH.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return WH.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return e(this,void 0,void 0,(function*(){return yield this.abort(t),fG}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),fG}))}read(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"read")).value}))}peek(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"peek")).value}))}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise(((t,e)=>{this.resolvers.push({resolve:t,reject:e})})):Promise.resolve(fG)}_ensureOpen(){if(this._closedPromiseResolve)return!0
|
|
14035
|
+
throw new Error("AsyncQueue is closed")}}class bG extends vG{write(t){if((t=VH(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?yH(this.toUint8Array(!0)):this.toUint8Array(!1).then(yH)}toUint8Array(t=!1){return t?LH(this._values)[0]:(()=>e(this,void 0,void 0,(function*(){var t,e,n,i
|
|
14034
14036
|
const s=[]
|
|
14035
14037
|
let o=0
|
|
14036
14038
|
try{for(var a,l=!0,c=r(this);!(t=(a=yield c.next()).done);l=!0){i=a.value,l=!1
|
|
14037
14039
|
const t=i
|
|
14038
|
-
s.push(t),o+=t.byteLength}}catch(t){e={error:t}}finally{try{l||t||!(n=c.return)||(yield n.call(c))}finally{if(e)throw e.error}}return
|
|
14039
|
-
return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}return(t){return e(this,void 0,void 0,(function*(){const e=this.source.return&&(yield this.source.return(t))||
|
|
14040
|
-
return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}}class
|
|
14040
|
+
s.push(t),o+=t.byteLength}}catch(t){e={error:t}}finally{try{l||t||!(n=c.return)||(yield n.call(c))}finally{if(e)throw e.error}}return LH(s,o)[0]})))()}}class yG{constructor(t){t&&(this.source=new xG(WH.fromIterable(t)))}[Symbol.iterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class wG{constructor(t){t instanceof wG?this.source=t.source:t instanceof bG?this.source=new CG(WH.fromAsyncIterable(t)):OH(t)?this.source=new CG(WH.fromNodeStream(t)):TH(t)?this.source=new CG(WH.fromDOMStream(t)):DH(t)?this.source=new CG(WH.fromDOMStream(t.body)):_H(t)?this.source=new CG(WH.fromIterable(t)):(SH(t)||IH(t))&&(this.source=new CG(WH.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class xG{constructor(t){this.source=t}cancel(t){this.return(t)}peek(t){return this.next(t,"peek").value}read(t){return this.next(t,"read").value}next(t,e="read"){return this.source.next({cmd:e,size:t})}throw(t){return Object.create(this.source.throw&&this.source.throw(t)||fG)}return(t){return Object.create(this.source.return&&this.source.return(t)||fG)}}class CG{constructor(t){this.source=t,this._closedPromise=new Promise((t=>this._closedPromiseResolve=t))}cancel(t){return e(this,void 0,void 0,(function*(){yield this.return(t)}))}get closed(){return this._closedPromise}read(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"read")).value}))}peek(t){return e(this,void 0,void 0,(function*(){return(yield this.next(t,"peek")).value}))}next(t){return e(this,arguments,void 0,(function*(t,e="read"){return yield this.source.next({cmd:e,size:t})}))}throw(t){return e(this,void 0,void 0,(function*(){const e=this.source.throw&&(yield this.source.throw(t))||fG
|
|
14041
|
+
return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}return(t){return e(this,void 0,void 0,(function*(){const e=this.source.return&&(yield this.source.return(t))||fG
|
|
14042
|
+
return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)}))}}class kG extends yG{constructor(t,e){super(),this.position=0,this.buffer=VH(t),this.size=void 0===e?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:n}=this.readAt(t,4)
|
|
14041
14043
|
return new DataView(e,n).getInt32(0,!0)}seek(t){return this.position=Math.min(t,this.size),t<this.size}read(t){const{buffer:e,size:n,position:i}=this
|
|
14042
14044
|
return e&&i<n?("number"!=typeof t&&(t=Number.POSITIVE_INFINITY),this.position=Math.min(n,i+Math.min(n-i,t)),e.subarray(i,this.position)):null}readAt(t,e){const n=this.buffer,i=Math.min(this.size,t+e)
|
|
14043
|
-
return n?n.subarray(t,i):new Uint8Array(e)}close(){this.buffer&&(this.buffer=null)}throw(t){return this.close(),{done:!0,value:t}}return(t){return this.close(),{done:!0,value:t}}}class
|
|
14045
|
+
return n?n.subarray(t,i):new Uint8Array(e)}close(){this.buffer&&(this.buffer=null)}throw(t){return this.close(),{done:!0,value:t}}return(t){return this.close(),{done:!0,value:t}}}class SG extends wG{constructor(t,n){super(),this.position=0,this._handle=t,"number"==typeof n?this.size=n:this._pending=(()=>e(this,void 0,void 0,(function*(){this.size=(yield t.stat()).size,delete this._pending})))()}readInt32(t){return e(this,void 0,void 0,(function*(){const{buffer:e,byteOffset:n}=yield this.readAt(t,4)
|
|
14044
14046
|
return new DataView(e,n).getInt32(0,!0)}))}seek(t){return e(this,void 0,void 0,(function*(){return this._pending&&(yield this._pending),this.position=Math.min(t,this.size),t<this.size}))}read(t){return e(this,void 0,void 0,(function*(){this._pending&&(yield this._pending)
|
|
14045
14047
|
const{_handle:e,size:n,position:i}=this
|
|
14046
14048
|
if(e&&i<n){"number"!=typeof t&&(t=Number.POSITIVE_INFINITY)
|
|
@@ -14051,255 +14053,255 @@ return l}return null}))}readAt(t,n){return e(this,void 0,void 0,(function*(){thi
|
|
|
14051
14053
|
const{_handle:e,size:i}=this
|
|
14052
14054
|
if(e&&t+n<i){const s=Math.min(i,t+n),o=new Uint8Array(s-t)
|
|
14053
14055
|
return(yield e.read(o,0,n,t)).buffer}return new Uint8Array(n)}))}close(){return e(this,void 0,void 0,(function*(){const t=this._handle
|
|
14054
|
-
this._handle=null,t&&(yield t.close())}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}}function
|
|
14055
|
-
class
|
|
14056
|
+
this._handle=null,t&&(yield t.close())}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.close(),{done:!0,value:t}}))}}function _G(t){return t<0&&(t=4294967295+t+1),`0x${t.toString(16)}`}const IG=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8]
|
|
14057
|
+
class MG{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,65535&this.buffer[1],this.buffer[0]>>>16,65535&this.buffer[0]]),n=new Uint32Array([t.buffer[1]>>>16,65535&t.buffer[1],t.buffer[0]>>>16,65535&t.buffer[0]])
|
|
14056
14058
|
let i=e[3]*n[3]
|
|
14057
14059
|
this.buffer[0]=65535&i
|
|
14058
14060
|
let s=i>>>16
|
|
14059
14061
|
return i=e[2]*n[3],s+=i,i=e[3]*n[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0<i?65536:0,this.buffer[1]+=s>>>16,this.buffer[1]+=e[1]*n[3]+e[2]*n[2]+e[3]*n[1],this.buffer[1]+=e[0]*n[3]+e[1]*n[2]+e[2]*n[1]+e[3]*n[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0
|
|
14060
|
-
this.buffer[1]+=t.buffer[1],e<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]<t.buffer[1]||this.buffer[1]===t.buffer[1]&&this.buffer[0]<t.buffer[0]}equals(t){return this.buffer[1]===t.buffer[1]&&this.buffer[0]==t.buffer[0]}greaterThan(t){return t.lessThan(this)}hex(){return`${
|
|
14061
|
-
for(let e=0;e<n;){const s=8<n-e?8:n-e,o=new
|
|
14062
|
+
this.buffer[1]+=t.buffer[1],e<this.buffer[0]>>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]<t.buffer[1]||this.buffer[1]===t.buffer[1]&&this.buffer[0]<t.buffer[0]}equals(t){return this.buffer[1]===t.buffer[1]&&this.buffer[0]==t.buffer[0]}greaterThan(t){return t.lessThan(this)}hex(){return`${_G(this.buffer[1])} ${_G(this.buffer[0])}`}}class $G extends MG{times(t){return this._times(t),this}plus(t){return this._plus(t),this}static from(t,e=new Uint32Array(2)){return $G.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return $G.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.length,i=new $G(e)
|
|
14063
|
+
for(let e=0;e<n;){const s=8<n-e?8:n-e,o=new $G(new Uint32Array([Number.parseInt(t.slice(e,e+s),10),0])),r=new $G(new Uint32Array([IG[s],0]))
|
|
14062
14064
|
i.times(r),i.plus(o),e+=s}return i}static convertArray(t){const e=new Uint32Array(2*t.length)
|
|
14063
|
-
for(let n=-1,i=t.length;++n<i;)MG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
|
|
14064
|
-
return e}static multiply(t,e){return new MG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new MG(new Uint32Array(t.buffer)).plus(e)}}class $G extends IG{negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],0==this.buffer[0]&&++this.buffer[1],this}times(t){return this._times(t),this}plus(t){return this._plus(t),this}lessThan(t){const e=this.buffer[1]<<0,n=t.buffer[1]<<0
|
|
14065
|
-
return e<n||e===n&&this.buffer[0]<t.buffer[0]}static from(t,e=new Uint32Array(2)){return $G.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return $G.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.startsWith("-"),i=t.length,s=new $G(e)
|
|
14066
|
-
for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new $G(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0])),r=new $G(new Uint32Array([_G[n],0]))
|
|
14067
|
-
s.times(r),s.plus(o),e+=n}return n?s.negate():s}static convertArray(t){const e=new Uint32Array(2*t.length)
|
|
14068
14065
|
for(let n=-1,i=t.length;++n<i;)$G.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
|
|
14069
|
-
return e}static multiply(t,e){return new $G(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new $G(new Uint32Array(t.buffer)).plus(e)}}class EG
|
|
14070
|
-
|
|
14066
|
+
return e}static multiply(t,e){return new $G(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new $G(new Uint32Array(t.buffer)).plus(e)}}class EG extends MG{negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],0==this.buffer[0]&&++this.buffer[1],this}times(t){return this._times(t),this}plus(t){return this._plus(t),this}lessThan(t){const e=this.buffer[1]|0,n=t.buffer[1]|0
|
|
14067
|
+
return e<n||e===n&&this.buffer[0]<t.buffer[0]}static from(t,e=new Uint32Array(2)){return EG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(2)){return EG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(2)){const n=t.startsWith("-"),i=t.length,s=new EG(e)
|
|
14068
|
+
for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new EG(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0])),r=new EG(new Uint32Array([IG[n],0]))
|
|
14069
|
+
s.times(r),s.plus(o),e+=n}return n?s.negate():s}static convertArray(t){const e=new Uint32Array(2*t.length)
|
|
14070
|
+
for(let n=-1,i=t.length;++n<i;)EG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+2*n*4,2))
|
|
14071
|
+
return e}static multiply(t,e){return new EG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new EG(new Uint32Array(t.buffer)).plus(e)}}class DG{constructor(t){this.buffer=t}high(){return new EG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2))}low(){return new EG(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset,2))}negate(){return this.buffer[0]=1+~this.buffer[0],this.buffer[1]=~this.buffer[1],this.buffer[2]=~this.buffer[2],this.buffer[3]=~this.buffer[3],0==this.buffer[0]&&++this.buffer[1],0==this.buffer[1]&&++this.buffer[2],0==this.buffer[2]&&++this.buffer[3],this}times(t){const e=new $G(new Uint32Array([this.buffer[3],0])),n=new $G(new Uint32Array([this.buffer[2],0])),i=new $G(new Uint32Array([this.buffer[1],0])),s=new $G(new Uint32Array([this.buffer[0],0])),o=new $G(new Uint32Array([t.buffer[3],0])),r=new $G(new Uint32Array([t.buffer[2],0])),a=new $G(new Uint32Array([t.buffer[1],0])),l=new $G(new Uint32Array([t.buffer[0],0]))
|
|
14072
|
+
let c=$G.multiply(s,l)
|
|
14071
14073
|
this.buffer[0]=c.low()
|
|
14072
|
-
const d=new
|
|
14073
|
-
c
|
|
14074
|
-
return new
|
|
14075
|
-
return e[3]=this.buffer[3]+t.buffer[3]>>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]<this.buffer[0]>>>0&&++e[1],e[1]<this.buffer[1]>>>0&&++e[2],e[2]<this.buffer[2]>>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${
|
|
14076
|
-
for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new
|
|
14074
|
+
const d=new $G(new Uint32Array([c.high(),0]))
|
|
14075
|
+
c=$G.multiply(i,l),d.plus(c),c=$G.multiply(s,a),d.plus(c),this.buffer[1]=d.low(),this.buffer[3]=d.lessThan(c)?1:0,this.buffer[2]=d.high()
|
|
14076
|
+
return new $G(new Uint32Array(this.buffer.buffer,this.buffer.byteOffset+8,2)).plus($G.multiply(n,l)).plus($G.multiply(i,a)).plus($G.multiply(s,r)),this.buffer[3]+=$G.multiply(e,l).plus($G.multiply(n,a)).plus($G.multiply(i,r)).plus($G.multiply(s,o)).low(),this}plus(t){const e=new Uint32Array(4)
|
|
14077
|
+
return e[3]=this.buffer[3]+t.buffer[3]>>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]<this.buffer[0]>>>0&&++e[1],e[1]<this.buffer[1]>>>0&&++e[2],e[2]<this.buffer[2]>>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${_G(this.buffer[3])} ${_G(this.buffer[2])} ${_G(this.buffer[1])} ${_G(this.buffer[0])}`}static multiply(t,e){return new DG(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new DG(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return DG.fromString("string"==typeof t?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return DG.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const n=t.startsWith("-"),i=t.length,s=new DG(e)
|
|
14078
|
+
for(let e=n?1:0;e<i;){const n=8<i-e?8:i-e,o=new DG(new Uint32Array([Number.parseInt(t.slice(e,e+n),10),0,0,0])),r=new DG(new Uint32Array([IG[n],0,0,0]))
|
|
14077
14079
|
s.times(r),s.plus(o),e+=n}return n?s.negate():s}static convertArray(t){const e=new Uint32Array(4*t.length)
|
|
14078
|
-
for(let n=-1,i=t.length;++n<i;)
|
|
14079
|
-
return e}}class
|
|
14080
|
-
return
|
|
14080
|
+
for(let n=-1,i=t.length;++n<i;)DG.from(t[n],new Uint32Array(e.buffer,e.byteOffset+16*n,4))
|
|
14081
|
+
return e}}class AG extends tj{constructor(t,e,n,i,s=YH.V5){super(),this.nodesIndex=-1,this.buffersIndex=-1,this.bytes=t,this.nodes=e,this.buffers=n,this.dictionaries=i,this.metadataVersion=s}visit(t){return super.visit(t instanceof rG?t.type:t)}visitNull(t,{length:e}=this.nextFieldNode()){return RW({type:t,length:e})}visitBool(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitInt(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFloat(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitUtf8(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeUtf8(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitLargeBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),data:this.readData(t)})}visitFixedSizeBinary(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDate(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTimestamp(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitTime(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDecimal(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitList(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}visitStruct(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),children:this.visitMany(t.children)})}visitUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return this.metadataVersion<YH.V5&&this.readNullBitmap(t,n),t.mode===XH.Sparse?this.visitSparseUnion(t,{length:e,nullCount:n}):this.visitDenseUnion(t,{length:e,nullCount:n})}visitDenseUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,typeIds:this.readTypeIds(t),valueOffsets:this.readOffsets(t),children:this.visitMany(t.children)})}visitSparseUnion(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,typeIds:this.readTypeIds(t),children:this.visitMany(t.children)})}visitDictionary(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t.indices),dictionary:this.readDictionary(t)})}visitInterval(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitDuration(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),data:this.readData(t)})}visitFixedSizeList(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),child:this.visit(t.children[0])})}visitMap(t,{length:e,nullCount:n}=this.nextFieldNode()){return RW({type:t,length:e,nullCount:n,nullBitmap:this.readNullBitmap(t,n),valueOffsets:this.readOffsets(t),child:this.visit(t.children[0])})}nextFieldNode(){return this.nodes[++this.nodesIndex]}nextBufferRange(){return this.buffers[++this.buffersIndex]}readNullBitmap(t,e,n=this.nextBufferRange()){return e>0&&this.readData(t,n)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class TG extends AG{constructor(t,e,n,i,s){super(new Uint8Array(0),e,n,i,s),this.sources=t}readNullBitmap(t,e,{offset:n}=this.nextBufferRange()){return e<=0?new Uint8Array(0):MW(this.sources[n])}readOffsets(t,{offset:e}=this.nextBufferRange()){return BH(Uint8Array,BH(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return BH(Uint8Array,BH(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:n}=this
|
|
14082
|
+
return $q.isTimestamp(t)||($q.isInt(t)||$q.isTime(t))&&64===t.bitWidth||$q.isDuration(t)||$q.isDate(t)&&t.unit===QH.MILLISECOND?BH(Uint8Array,EG.convertArray(n[e])):$q.isDecimal(t)?BH(Uint8Array,DG.convertArray(n[e])):$q.isBinary(t)||$q.isLargeBinary(t)||$q.isFixedSizeBinary(t)?function(t){const e=t.join(""),n=new Uint8Array(e.length/2)
|
|
14081
14083
|
for(let t=0;t<e.length;t+=2)n[t>>1]=Number.parseInt(e.slice(t,t+2),16)
|
|
14082
|
-
return n}(n[e])
|
|
14083
|
-
const
|
|
14084
|
-
function
|
|
14084
|
+
return n}(n[e]):$q.isBool(t)?MW(n[e]):$q.isUtf8(t)||$q.isLargeUtf8(t)?xH(n[e].join("")):BH(Uint8Array,BH(t.ArrayType,n[e].map((t=>+t))))}}class OG extends tj{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every(((t,n)=>this.compareFields(t,e[n])))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function RG(t,e){return e instanceof t.constructor}function FG(t,e){return t===e||RG(t,e)}function NG(t,e){return t===e||RG(t,e)&&t.bitWidth===e.bitWidth&&t.isSigned===e.isSigned}function LG(t,e){return t===e||RG(t,e)&&t.precision===e.precision}function BG(t,e){return t===e||RG(t,e)&&t.unit===e.unit}function PG(t,e){return t===e||RG(t,e)&&t.unit===e.unit&&t.timezone===e.timezone}function zG(t,e){return t===e||RG(t,e)&&t.unit===e.unit&&t.bitWidth===e.bitWidth}function VG(t,e){return t===e||RG(t,e)&&t.mode===e.mode&&t.typeIds.every(((t,n)=>t===e.typeIds[n]))&&qG.compareManyFields(t.children,e.children)}function HG(t,e){return t===e||RG(t,e)&&t.unit===e.unit}function UG(t,e){return t===e||RG(t,e)&&t.unit===e.unit}OG.prototype.visitNull=FG,OG.prototype.visitBool=FG,OG.prototype.visitInt=NG,OG.prototype.visitInt8=NG,OG.prototype.visitInt16=NG,OG.prototype.visitInt32=NG,OG.prototype.visitInt64=NG,OG.prototype.visitUint8=NG,OG.prototype.visitUint16=NG,OG.prototype.visitUint32=NG,OG.prototype.visitUint64=NG,OG.prototype.visitFloat=LG,OG.prototype.visitFloat16=LG,OG.prototype.visitFloat32=LG,OG.prototype.visitFloat64=LG,OG.prototype.visitUtf8=FG,OG.prototype.visitLargeUtf8=FG,OG.prototype.visitBinary=FG,OG.prototype.visitLargeBinary=FG,OG.prototype.visitFixedSizeBinary=function(t,e){return t===e||RG(t,e)&&t.byteWidth===e.byteWidth},OG.prototype.visitDate=BG,OG.prototype.visitDateDay=BG,OG.prototype.visitDateMillisecond=BG,OG.prototype.visitTimestamp=PG,OG.prototype.visitTimestampSecond=PG,OG.prototype.visitTimestampMillisecond=PG,OG.prototype.visitTimestampMicrosecond=PG,OG.prototype.visitTimestampNanosecond=PG,OG.prototype.visitTime=zG,OG.prototype.visitTimeSecond=zG,OG.prototype.visitTimeMillisecond=zG,OG.prototype.visitTimeMicrosecond=zG,OG.prototype.visitTimeNanosecond=zG,OG.prototype.visitDecimal=FG,OG.prototype.visitList=function(t,e){return t===e||RG(t,e)&&t.children.length===e.children.length&&qG.compareManyFields(t.children,e.children)},OG.prototype.visitStruct=function(t,e){return t===e||RG(t,e)&&t.children.length===e.children.length&&qG.compareManyFields(t.children,e.children)},OG.prototype.visitUnion=VG,OG.prototype.visitDenseUnion=VG,OG.prototype.visitSparseUnion=VG,OG.prototype.visitDictionary=function(t,e){return t===e||RG(t,e)&&t.id===e.id&&t.isOrdered===e.isOrdered&&qG.visit(t.indices,e.indices)&&qG.visit(t.dictionary,e.dictionary)},OG.prototype.visitInterval=HG,OG.prototype.visitIntervalDayTime=HG,OG.prototype.visitIntervalYearMonth=HG,OG.prototype.visitDuration=UG,OG.prototype.visitDurationSecond=UG,OG.prototype.visitDurationMillisecond=UG,OG.prototype.visitDurationMicrosecond=UG,OG.prototype.visitDurationNanosecond=UG,OG.prototype.visitFixedSizeList=function(t,e){return t===e||RG(t,e)&&t.listSize===e.listSize&&t.children.length===e.children.length&&qG.compareManyFields(t.children,e.children)},OG.prototype.visitMap=function(t,e){return t===e||RG(t,e)&&t.keysSorted===e.keysSorted&&t.children.length===e.children.length&&qG.compareManyFields(t.children,e.children)}
|
|
14085
|
+
const qG=new OG
|
|
14086
|
+
function jG(t,e){return qG.compareSchemas(t,e)}function WG(t,e){return function(t,e){const n=[...t.fields],i=[],s={numBatches:e.reduce(((t,e)=>Math.max(t,e.length)),0)}
|
|
14085
14087
|
let o=0,r=0,a=-1
|
|
14086
14088
|
const l=e.length
|
|
14087
14089
|
let c,d=[]
|
|
14088
14090
|
for(;s.numBatches-- >0;){for(r=Number.POSITIVE_INFINITY,a=-1;++a<l;)d[a]=c=e[a].shift(),r=Math.min(r,c?c.length:r)
|
|
14089
|
-
Number.isFinite(r)&&(d=
|
|
14091
|
+
Number.isFinite(r)&&(d=GG(n,r,d,e,s),r>0&&(i[o++]=RW({type:new jq(n),length:r,nullCount:0,children:d.slice()})))}return[t=t.assign(n),i.map((e=>new XG(t,e)))]}(t,e.map((t=>t.data.concat())))}function GG(t,e,n,i,s){var o
|
|
14090
14092
|
const r=(e+63&-64)>>3
|
|
14091
14093
|
for(let a=-1,l=i.length;++a<l;){const l=n[a],c=null==l?void 0:l.length
|
|
14092
14094
|
if(c>=e)c===e?n[a]=l:(n[a]=l.slice(0,e),s.numBatches=Math.max(s.numBatches,i[a].unshift(l.slice(e,c-e))))
|
|
14093
14095
|
else{const i=t[a]
|
|
14094
|
-
t[a]=i.clone({nullable:!0}),n[a]=null!==(o=null==l?void 0:l._changeLengthAndBackfillNullBitmap(e))&&void 0!==o?o:
|
|
14095
|
-
class
|
|
14096
|
-
if(0===t.length)return this.batches=[],this.schema=new
|
|
14096
|
+
t[a]=i.clone({nullable:!0}),n[a]=null!==(o=null==l?void 0:l._changeLengthAndBackfillNullBitmap(e))&&void 0!==o?o:RW({type:i.type,length:e,nullCount:e,nullBitmap:new Uint8Array(r)})}}return n}var ZG,KG
|
|
14097
|
+
class YG{constructor(...t){var e,n
|
|
14098
|
+
if(0===t.length)return this.batches=[],this.schema=new oG([]),this._offsets=[0],this
|
|
14097
14099
|
let i,s
|
|
14098
|
-
t[0]instanceof
|
|
14099
|
-
const o=t=>{if(t){if(t instanceof
|
|
14100
|
-
if(t instanceof
|
|
14101
|
-
if(t instanceof
|
|
14100
|
+
t[0]instanceof oG&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop())
|
|
14101
|
+
const o=t=>{if(t){if(t instanceof XG)return[t]
|
|
14102
|
+
if(t instanceof YG)return t.batches
|
|
14103
|
+
if(t instanceof AW){if(t.type instanceof jq)return[new XG(new oG(t.type.children),t)]}else{if(Array.isArray(t))return t.flatMap((t=>o(t)))
|
|
14102
14104
|
if("function"==typeof t[Symbol.iterator])return[...t].flatMap((t=>o(t)))
|
|
14103
|
-
if("object"==typeof t){const e=Object.keys(t),n=e.map((e=>new
|
|
14104
|
-
return 0===o.length?[new
|
|
14105
|
-
if(i=null!==(n=null!=i?i:null===(e=r[0])||void 0===e?void 0:e.schema)&&void 0!==n?n:new
|
|
14106
|
-
for(const t of r){if(!(t instanceof
|
|
14107
|
-
if(!
|
|
14108
|
-
return new
|
|
14109
|
-
const i=
|
|
14110
|
-
return new
|
|
14111
|
-
if(0===e.length){const{type:n}=this.schema.fields[t],i=
|
|
14112
|
-
e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new
|
|
14105
|
+
if("object"==typeof t){const e=Object.keys(t),n=e.map((e=>new eG([t[e]]))),s=null!=i?i:new oG(e.map(((t,e)=>new rG(String(t),n[e].type,n[e].nullable)))),[,o]=WG(s,n)
|
|
14106
|
+
return 0===o.length?[new XG(t)]:o}}}return[]},r=t.flatMap((t=>o(t)))
|
|
14107
|
+
if(i=null!==(n=null!=i?i:null===(e=r[0])||void 0===e?void 0:e.schema)&&void 0!==n?n:new oG([]),!(i instanceof oG))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
|
|
14108
|
+
for(const t of r){if(!(t instanceof XG))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.")
|
|
14109
|
+
if(!jG(i,t.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=r,this._offsets=null!=s?s:LW(this.data)}get data(){return this.batches.map((({data:t})=>t))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce(((t,e)=>t+e.length),0)}get nullCount(){return-1===this._nullCount&&(this._nullCount=NW(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(yW(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?XW.visit(new eG(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[\n ${this.toArray().join(",\n ")}\n]`}concat(...t){const e=this.schema,n=this.data.concat(t.flatMap((({data:t})=>t)))
|
|
14110
|
+
return new YG(e,n.map((t=>new XG(e,t))))}slice(t,e){const n=this.schema;[t,e]=bW({length:this.numRows},t,e)
|
|
14111
|
+
const i=BW(this.data,this._offsets,t,e)
|
|
14112
|
+
return new YG(n,i.map((t=>new XG(n,t))))}getChild(t){return this.getChildAt(this.schema.fields.findIndex((e=>e.name===t)))}getChildAt(t){if(t>-1&&t<this.schema.fields.length){const e=this.data.map((e=>e.children[t]))
|
|
14113
|
+
if(0===e.length){const{type:n}=this.schema.fields[t],i=RW({type:n,length:0,nullCount:0})
|
|
14114
|
+
e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new eG(e)}return null}setChild(t,e){var n
|
|
14113
14115
|
return this.setChildAt(null===(n=this.schema.fields)||void 0===n?void 0:n.findIndex((e=>e.name===t)),e)}setChildAt(t,e){let n=this.schema,i=[...this.batches]
|
|
14114
|
-
if(t>-1&&t<this.numCols){e||(e=new
|
|
14115
|
-
const s=n.fields.slice(),o=s[t].clone({type:e.type}),r=this.schema.fields.map(((t,e)=>this.getChildAt(e)));[s[t],r[t]]=[o,e],[n,i]=
|
|
14116
|
+
if(t>-1&&t<this.numCols){e||(e=new eG([RW({type:new Eq,length:this.numRows})]))
|
|
14117
|
+
const s=n.fields.slice(),o=s[t].clone({type:e.type}),r=this.schema.fields.map(((t,e)=>this.getChildAt(e)));[s[t],r[t]]=[o,e],[n,i]=WG(n,r)}return new YG(n,i)}select(t){const e=this.schema.fields.reduce(((t,e,n)=>t.set(e.name,n)),new Map)
|
|
14116
14118
|
return this.selectAt(t.map((t=>e.get(t))).filter((t=>t>-1)))}selectAt(t){const e=this.schema.selectAt(t),n=this.batches.map((e=>e.selectAt(t)))
|
|
14117
|
-
return new
|
|
14119
|
+
return new YG(e,n)}assign(t){const e=this.schema.fields,[n,i]=t.schema.fields.reduce(((t,n,i)=>{const[s,o]=t,r=e.findIndex((t=>t.name===n.name))
|
|
14118
14120
|
return~r?o[r]=i:s.push(i),t}),[[],[]]),s=this.schema.assign(t.schema),o=[...e.map(((t,e)=>[e,i[e]])).map((([e,n])=>void 0===n?this.getChildAt(e):t.getChildAt(n))),...n.map((e=>t.getChildAt(e)))].filter(Boolean)
|
|
14119
|
-
return new
|
|
14120
|
-
let
|
|
14121
|
-
if([,this.data=
|
|
14121
|
+
return new YG(...WG(s,o))}}ZG=Symbol.toStringTag,YG[ZG]=(t=>(t.schema=null,t.batches=[],t._offsets=new Uint32Array([0]),t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,t.isValid=VW(zW),t.get=VW(cW.getVisitFn(qU.Struct)),t.set=HW(Tj.getVisitFn(qU.Struct)),t.indexOf=UW(GW.getVisitFn(qU.Struct)),"Table"))(YG.prototype)
|
|
14122
|
+
let XG=class t{constructor(...t){switch(t.length){case 2:if([this.schema]=t,!(this.schema instanceof oG))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.")
|
|
14123
|
+
if([,this.data=RW({nullCount:0,type:new jq(this.schema.fields),children:this.schema.fields.map((t=>RW({type:t.type,nullCount:0})))})]=t,!(this.data instanceof AW))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=JG(this.schema,this.data.children)
|
|
14122
14124
|
break
|
|
14123
|
-
case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce(((t,n,i)=>(t.children[i]=e[n],t.length=Math.max(t.length,e[n].length),t.fields[i]=
|
|
14124
|
-
break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=
|
|
14125
|
+
case 1:{const[e]=t,{fields:n,children:i,length:s}=Object.keys(e).reduce(((t,n,i)=>(t.children[i]=e[n],t.length=Math.max(t.length,e[n].length),t.fields[i]=rG.new({name:n,type:e[n].type,nullable:!0}),t)),{length:0,fields:new Array,children:new Array}),o=new oG(n),r=RW({type:new jq(n),length:s,children:i,nullCount:0});[this.schema,this.data]=JG(o,r.children,s)
|
|
14126
|
+
break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=QG(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return cW.visit(this.data,t)}at(t){return this.get(yW(t,this.numRows))}set(t,e){return Tj.visit(this.data,t,e)}indexOf(t,e){return GW.visit(this.data,t,e)}[Symbol.iterator](){return XW.visit(new eG([this.data]))}toArray(){return[...this]}concat(...t){return new YG(this.schema,[this,...t])}slice(e,n){const[i]=new eG([this.data]).slice(e,n).data
|
|
14125
14127
|
return new t(this.schema,i)}getChild(t){var e
|
|
14126
|
-
return this.getChildAt(null===(e=this.schema.fields)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.schema.fields.length?new
|
|
14128
|
+
return this.getChildAt(null===(e=this.schema.fields)||void 0===e?void 0:e.findIndex((e=>e.name===t)))}getChildAt(t){return t>-1&&t<this.schema.fields.length?new eG([this.data.children[t]]):null}setChild(t,e){var n
|
|
14127
14129
|
return this.setChildAt(null===(n=this.schema.fields)||void 0===n?void 0:n.findIndex((e=>e.name===t)),e)}setChildAt(e,n){let i=this.schema,s=this.data
|
|
14128
|
-
if(e>-1&&e<this.numCols){n||(n=new
|
|
14129
|
-
const t=i.fields.slice(),o=s.children.slice(),r=t[e].clone({type:n.type});[t[e],o[e]]=[r,n.data[0]],i=new
|
|
14130
|
+
if(e>-1&&e<this.numCols){n||(n=new eG([RW({type:new Eq,length:this.numRows})]))
|
|
14131
|
+
const t=i.fields.slice(),o=s.children.slice(),r=t[e].clone({type:n.type});[t[e],o[e]]=[r,n.data[0]],i=new oG(t,new Map(this.schema.metadata)),s=RW({type:new jq(t),children:o})}return new t(i,s)}select(e){const n=this.schema.select(e),i=new jq(n.fields),s=[]
|
|
14130
14132
|
for(const t of e){const e=this.schema.fields.findIndex((e=>e.name===t))
|
|
14131
|
-
~e&&(s[e]=this.data.children[e])}return new t(n,
|
|
14133
|
+
~e&&(s[e]=this.data.children[e])}return new t(n,RW({type:i,length:this.numRows,children:s}))}selectAt(e){const n=this.schema.selectAt(e),i=e.map((t=>this.data.children[t])).filter(Boolean),s=RW({type:new jq(n.fields),length:this.numRows,children:i})
|
|
14132
14134
|
return new t(n,s)}}
|
|
14133
|
-
function
|
|
14135
|
+
function JG(t,e,n=e.reduce(((t,e)=>Math.max(t,e.length)),0)){var i
|
|
14134
14136
|
const s=[...t.fields],o=[...e],r=(n+63&-64)>>3
|
|
14135
14137
|
for(const[a,l]of t.fields.entries()){const t=e[a]
|
|
14136
|
-
t&&t.length===n||(s[a]=l.clone({nullable:!0}),o[a]=null!==(i=null==t?void 0:t._changeLengthAndBackfillNullBitmap(n))&&void 0!==i?i:
|
|
14138
|
+
t&&t.length===n||(s[a]=l.clone({nullable:!0}),o[a]=null!==(i=null==t?void 0:t._changeLengthAndBackfillNullBitmap(n))&&void 0!==i?i:RW({type:l.type,length:n,nullCount:n,nullBitmap:new Uint8Array(r)}))}return[t.assign(s),RW({type:new jq(s),length:n,children:o})]}function QG(t,e,n=new Map){var i,s
|
|
14137
14139
|
if((null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0)>0&&(null==t?void 0:t.length)===(null==e?void 0:e.length))for(let i=-1,o=t.length;++i<o;){const{type:o}=t[i],r=e[i]
|
|
14138
|
-
for(const t of[r,...(null===(s=null==r?void 0:r.dictionary)||void 0===s?void 0:s.data)||[]])
|
|
14139
|
-
if(
|
|
14140
|
-
if(n.has(t)){if(n.get(t)!==r.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else(null==r?void 0:r.dictionary)&&n.set(t,r.dictionary)}}return n}
|
|
14141
|
-
class
|
|
14142
|
-
super(t,
|
|
14143
|
-
return t?this.bb.readInt16(this.bb_pos+t):
|
|
14144
|
-
return t?this.bb.readUint8(this.bb_pos+t):
|
|
14140
|
+
for(const t of[r,...(null===(s=null==r?void 0:r.dictionary)||void 0===s?void 0:s.data)||[]])QG(o.children,null==t?void 0:t.children,n)
|
|
14141
|
+
if($q.isDictionary(o)){const{id:t}=o
|
|
14142
|
+
if(n.has(t)){if(n.get(t)!==r.dictionary)throw new Error("Cannot create Schema containing two different dictionaries with the same Id")}else(null==r?void 0:r.dictionary)&&n.set(t,r.dictionary)}}return n}KG=Symbol.toStringTag,XG[KG]=(t=>(t._nullCount=-1,t[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(XG.prototype)
|
|
14143
|
+
class tZ extends XG{constructor(t){const e=t.fields.map((t=>RW({type:t.type})))
|
|
14144
|
+
super(t,RW({type:new jq(t.fields),nullCount:0,children:e}))}}let eZ=class t{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(e,n){return(n||new t).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,n){return e.setPosition(e.position()+4),(n||new t).__init(e.readInt32(e.position())+e.position(),e)}version(){const t=this.bb.__offset(this.bb_pos,4)
|
|
14145
|
+
return t?this.bb.readInt16(this.bb_pos+t):YH.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6)
|
|
14146
|
+
return t?this.bb.readUint8(this.bb_pos+t):UU.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8)
|
|
14145
14147
|
return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10)
|
|
14146
14148
|
return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const n=this.bb.__offset(this.bb_pos,12)
|
|
14147
|
-
return n?(e||new
|
|
14148
|
-
return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,
|
|
14149
|
+
return n?(e||new wU).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12)
|
|
14150
|
+
return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,YH.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,UU.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4)
|
|
14149
14151
|
for(let n=e.length-1;n>=0;n--)t.addOffset(e[n])
|
|
14150
14152
|
return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(e,n,i,s,o,r){return t.startMessage(e),t.addVersion(e,n),t.addHeaderType(e,i),t.addHeader(e,s),t.addBodyLength(e,o),t.addCustomMetadata(e,r),t.endMessage(e)}}
|
|
14151
|
-
const
|
|
14152
|
-
return
|
|
14153
|
-
const n=
|
|
14154
|
-
return
|
|
14155
|
-
return
|
|
14156
|
-
function
|
|
14157
|
-
var n}),[])}function
|
|
14158
|
-
i.VALIDITY&&e.push(new
|
|
14159
|
-
switch(n){case"NONE":case"null":return new
|
|
14160
|
-
case"binary":return new
|
|
14161
|
-
case"largebinary":return new
|
|
14162
|
-
case"utf8":return new
|
|
14163
|
-
case"largeutf8":return new
|
|
14164
|
-
case"bool":return new
|
|
14165
|
-
case"list":return new
|
|
14166
|
-
case"struct":case"struct_":return new
|
|
14167
|
-
return new
|
|
14168
|
-
return new
|
|
14169
|
-
return new
|
|
14170
|
-
return new
|
|
14171
|
-
return new
|
|
14172
|
-
return new
|
|
14173
|
-
return new
|
|
14174
|
-
return new
|
|
14175
|
-
return new
|
|
14176
|
-
return new
|
|
14177
|
-
return new
|
|
14178
|
-
return new
|
|
14179
|
-
class
|
|
14180
|
-
return n._createHeader=function(t,e){return()=>{switch(e){case
|
|
14181
|
-
case
|
|
14182
|
-
case
|
|
14183
|
-
const e=
|
|
14184
|
-
return o._createHeader=function(t,e){return()=>{switch(e){case
|
|
14185
|
-
case
|
|
14186
|
-
case
|
|
14153
|
+
const nZ=new class extends tj{visit(t,e){return null==t||null==e?void 0:super.visit(t,e)}visitNull(t,e){return RU.startNull(e),RU.endNull(e)}visitInt(t,e){return bU.startInt(e),bU.addBitWidth(e,t.bitWidth),bU.addIsSigned(e,t.isSigned),bU.endInt(e)}visitFloat(t,e){return $U.startFloatingPoint(e),$U.addPrecision(e,t.precision),$U.endFloatingPoint(e)}visitBinary(t,e){return xU.startBinary(e),xU.endBinary(e)}visitLargeBinary(t,e){return DU.startLargeBinary(e),DU.endLargeBinary(e)}visitBool(t,e){return CU.startBool(e),CU.endBool(e)}visitUtf8(t,e){return PU.startUtf8(e),PU.endUtf8(e)}visitLargeUtf8(t,e){return AU.startLargeUtf8(e),AU.endLargeUtf8(e)}visitDecimal(t,e){return SU.startDecimal(e),SU.addScale(e,t.scale),SU.addPrecision(e,t.precision),SU.addBitWidth(e,t.bitWidth),SU.endDecimal(e)}visitDate(t,e){return kU.startDate(e),kU.addUnit(e,t.unit),kU.endDate(e)}visitTime(t,e){return NU.startTime(e),NU.addUnit(e,t.unit),NU.addBitWidth(e,t.bitWidth),NU.endTime(e)}visitTimestamp(t,e){const n=t.timezone&&e.createString(t.timezone)||void 0
|
|
14154
|
+
return LU.startTimestamp(e),LU.addUnit(e,t.unit),void 0!==n&&LU.addTimezone(e,n),LU.endTimestamp(e)}visitInterval(t,e){return EU.startInterval(e),EU.addUnit(e,t.unit),EU.endInterval(e)}visitDuration(t,e){return _U.startDuration(e),_U.addUnit(e,t.unit),_U.endDuration(e)}visitList(t,e){return TU.startList(e),TU.endList(e)}visitStruct(t,e){return FU.startStruct_(e),FU.endStruct_(e)}visitUnion(t,e){BU.startTypeIdsVector(e,t.typeIds.length)
|
|
14155
|
+
const n=BU.createTypeIdsVector(e,t.typeIds)
|
|
14156
|
+
return BU.startUnion(e),BU.addMode(e,t.mode),BU.addTypeIds(e,n),BU.endUnion(e)}visitDictionary(t,e){const n=this.visit(t.indices,e)
|
|
14157
|
+
return yU.startDictionaryEncoding(e),yU.addId(e,BigInt(t.id)),yU.addIsOrdered(e,t.isOrdered),void 0!==n&&yU.addIndexType(e,n),yU.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return IU.startFixedSizeBinary(e),IU.addByteWidth(e,t.byteWidth),IU.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return MU.startFixedSizeList(e),MU.addListSize(e,t.listSize),MU.endFixedSizeList(e)}visitMap(t,e){return OU.startMap(e),OU.addKeysSorted(e,t.keysSorted),OU.endMap(e)}}
|
|
14158
|
+
function iZ(t){return new pZ(t.count,oZ(t.columns),rZ(t.columns))}function sZ(t,e){return(t.children||[]).filter(Boolean).map((t=>rG.fromJSON(t,e)))}function oZ(t){return(t||[]).reduce(((t,e)=>{return[...t,new gZ(e.count,(n=e.VALIDITY,(n||[]).reduce(((t,e)=>t+ +(0===e)),0))),...oZ(e.children)]
|
|
14159
|
+
var n}),[])}function rZ(t,e=[]){for(let n=-1,i=(t||[]).length;++n<i;){const i=t[n]
|
|
14160
|
+
i.VALIDITY&&e.push(new mZ(e.length,i.VALIDITY.length)),i.TYPE_ID&&e.push(new mZ(e.length,i.TYPE_ID.length)),i.OFFSET&&e.push(new mZ(e.length,i.OFFSET.length)),i.DATA&&e.push(new mZ(e.length,i.DATA.length)),e=rZ(i.children,e)}return e}function aZ(t=[]){return new Map(t.map((({key:t,value:e})=>[t,e])))}function lZ(t){return new Dq(t.isSigned,t.bitWidth)}function cZ(t,e){const n=t.type.name
|
|
14161
|
+
switch(n){case"NONE":case"null":return new Eq
|
|
14162
|
+
case"binary":return new Oq
|
|
14163
|
+
case"largebinary":return new Rq
|
|
14164
|
+
case"utf8":return new Fq
|
|
14165
|
+
case"largeutf8":return new Nq
|
|
14166
|
+
case"bool":return new Lq
|
|
14167
|
+
case"list":return new qq((e||[])[0])
|
|
14168
|
+
case"struct":case"struct_":return new jq(e||[])}switch(n){case"int":{const e=t.type
|
|
14169
|
+
return new Dq(e.isSigned,e.bitWidth)}case"floatingpoint":{const e=t.type
|
|
14170
|
+
return new Tq(JH[e.precision])}case"decimal":{const e=t.type
|
|
14171
|
+
return new Bq(e.scale,e.precision,e.bitWidth)}case"date":{const e=t.type
|
|
14172
|
+
return new Pq(QH[e.unit])}case"time":{const e=t.type
|
|
14173
|
+
return new zq(tU[e.unit],e.bitWidth)}case"timestamp":{const e=t.type
|
|
14174
|
+
return new Vq(tU[e.unit],e.timezone)}case"interval":{const e=t.type
|
|
14175
|
+
return new Hq(eU[e.unit])}case"duration":{const e=t.type
|
|
14176
|
+
return new Uq(tU[e.unit])}case"union":{const n=t.type,[i,...s]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("")
|
|
14177
|
+
return new Wq(XH[o],n.typeIds||[],e||[])}case"fixedsizebinary":{const e=t.type
|
|
14178
|
+
return new Gq(e.byteWidth)}case"fixedsizelist":{const n=t.type
|
|
14179
|
+
return new Zq(n.listSize,(e||[])[0])}case"map":{const n=t.type
|
|
14180
|
+
return new Kq((e||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${n}"`)}var dZ=lU,hZ=aU
|
|
14181
|
+
class uZ{static fromJSON(t,e){const n=new uZ(0,YH.V5,e)
|
|
14182
|
+
return n._createHeader=function(t,e){return()=>{switch(e){case UU.Schema:return oG.fromJSON(t)
|
|
14183
|
+
case UU.RecordBatch:return pZ.fromJSON(t)
|
|
14184
|
+
case UU.DictionaryBatch:return fZ.fromJSON(t)}throw new Error(`Unrecognized Message type: { name: ${UU[e]}, type: ${e} }`)}}(t,e),n}static decode(t){t=new hZ(VH(t))
|
|
14185
|
+
const e=eZ.getRootAsMessage(t),n=e.bodyLength(),i=e.version(),s=e.headerType(),o=new uZ(n,i,s)
|
|
14186
|
+
return o._createHeader=function(t,e){return()=>{switch(e){case UU.Schema:return oG.decode(t.header(new HU),new Map,t.version())
|
|
14187
|
+
case UU.RecordBatch:return pZ.decode(t.header(new fU),t.version())
|
|
14188
|
+
case UU.DictionaryBatch:return fZ.decode(t.header(new mU),t.version())}throw new Error(`Unrecognized Message type: { name: ${UU[e]}, type: ${e} }`)}}(e,s),o}static encode(t){const e=new dZ
|
|
14187
14189
|
let n=-1
|
|
14188
|
-
return t.isSchema()?n=
|
|
14189
|
-
if(t instanceof
|
|
14190
|
-
if(t instanceof
|
|
14191
|
-
throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===
|
|
14192
|
-
for(let i,s=-1,o=-1,r=t.childrenLength();++s<r;)(i=t.children(s))&&(n[++o]=
|
|
14193
|
-
return n}function
|
|
14190
|
+
return t.isSchema()?n=oG.encode(e,t.header()):t.isRecordBatch()?n=pZ.encode(e,t.header()):t.isDictionaryBatch()&&(n=fZ.encode(e,t.header())),eZ.startMessage(e),eZ.addVersion(e,YH.V5),eZ.addHeader(e,n),eZ.addHeaderType(e,t.headerType),eZ.addBodyLength(e,BigInt(t.bodyLength)),eZ.finishMessageBuffer(e,eZ.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof oG)return new uZ(0,YH.V5,UU.Schema,t)
|
|
14191
|
+
if(t instanceof pZ)return new uZ(e,YH.V5,UU.RecordBatch,t)
|
|
14192
|
+
if(t instanceof fZ)return new uZ(e,YH.V5,UU.DictionaryBatch,t)
|
|
14193
|
+
throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===UU.Schema}isRecordBatch(){return this.headerType===UU.RecordBatch}isDictionaryBatch(){return this.headerType===UU.DictionaryBatch}constructor(t,e,n,i){this._version=e,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=GU(t)}}class pZ{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,n){this._nodes=e,this._buffers=n,this._length=GU(t)}}class fZ{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,n=!1){this._data=t,this._isDelta=n,this._id=GU(e)}}class mZ{constructor(t,e){this.offset=GU(t),this.length=GU(e)}}class gZ{constructor(t,e){this.length=GU(t),this.nullCount=GU(e)}}function vZ(t,e){const n=[]
|
|
14194
|
+
for(let i,s=-1,o=-1,r=t.childrenLength();++s<r;)(i=t.children(s))&&(n[++o]=rG.decode(i,e))
|
|
14195
|
+
return n}function bZ(t){const e=new Map
|
|
14194
14196
|
if(t)for(let n,i,s=-1,o=Math.trunc(t.customMetadataLength());++s<o;)(n=t.customMetadata(s))&&null!=(i=n.key())&&e.set(i,n.value())
|
|
14195
|
-
return e}function
|
|
14196
|
-
switch(n){case
|
|
14197
|
-
case
|
|
14198
|
-
case
|
|
14199
|
-
case
|
|
14200
|
-
case
|
|
14201
|
-
case
|
|
14202
|
-
case
|
|
14203
|
-
case
|
|
14204
|
-
return new
|
|
14205
|
-
return new
|
|
14206
|
-
return new
|
|
14207
|
-
return new
|
|
14208
|
-
return new
|
|
14209
|
-
return new
|
|
14210
|
-
return new
|
|
14211
|
-
return new
|
|
14212
|
-
return new
|
|
14213
|
-
return new
|
|
14214
|
-
return new
|
|
14215
|
-
return new
|
|
14197
|
+
return e}function yZ(t){return new Dq(t.isSigned(),t.bitWidth())}function wZ(t,e){const n=t.typeType()
|
|
14198
|
+
switch(n){case zU.NONE:case zU.Null:return new Eq
|
|
14199
|
+
case zU.Binary:return new Oq
|
|
14200
|
+
case zU.LargeBinary:return new Rq
|
|
14201
|
+
case zU.Utf8:return new Fq
|
|
14202
|
+
case zU.LargeUtf8:return new Nq
|
|
14203
|
+
case zU.Bool:return new Lq
|
|
14204
|
+
case zU.List:return new qq((e||[])[0])
|
|
14205
|
+
case zU.Struct_:return new jq(e||[])}switch(n){case zU.Int:{const e=t.type(new bU)
|
|
14206
|
+
return new Dq(e.isSigned(),e.bitWidth())}case zU.FloatingPoint:{const e=t.type(new $U)
|
|
14207
|
+
return new Tq(e.precision())}case zU.Decimal:{const e=t.type(new SU)
|
|
14208
|
+
return new Bq(e.scale(),e.precision(),e.bitWidth())}case zU.Date:{const e=t.type(new kU)
|
|
14209
|
+
return new Pq(e.unit())}case zU.Time:{const e=t.type(new NU)
|
|
14210
|
+
return new zq(e.unit(),e.bitWidth())}case zU.Timestamp:{const e=t.type(new LU)
|
|
14211
|
+
return new Vq(e.unit(),e.timezone())}case zU.Interval:{const e=t.type(new EU)
|
|
14212
|
+
return new Hq(e.unit())}case zU.Duration:{const e=t.type(new _U)
|
|
14213
|
+
return new Uq(e.unit())}case zU.Union:{const n=t.type(new BU)
|
|
14214
|
+
return new Wq(n.mode(),n.typeIdsArray()||[],e||[])}case zU.FixedSizeBinary:{const e=t.type(new IU)
|
|
14215
|
+
return new Gq(e.byteWidth())}case zU.FixedSizeList:{const n=t.type(new MU)
|
|
14216
|
+
return new Zq(n.listSize(),(e||[])[0])}case zU.Map:{const n=t.type(new OU)
|
|
14217
|
+
return new Kq((e||[])[0],n.keysSorted())}}throw new Error(`Unrecognized type: "${zU[n]}" (${n})`)}rG.encode=function(t,e){let n=-1,i=-1,s=-1
|
|
14216
14218
|
const o=e.type
|
|
14217
14219
|
let r=e.typeId
|
|
14218
|
-
|
|
14219
|
-
const a=(o.children||[]).map((e=>
|
|
14220
|
-
return
|
|
14220
|
+
$q.isDictionary(o)?(r=o.dictionary.typeId,s=nZ.visit(o,t),i=nZ.visit(o.dictionary,t)):i=nZ.visit(o,t)
|
|
14221
|
+
const a=(o.children||[]).map((e=>rG.encode(t,e))),l=VU.createChildrenVector(t,a),c=e.metadata&&e.metadata.size>0?VU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
|
|
14222
|
+
return wU.startKeyValue(t),wU.addKey(t,i),wU.addValue(t,s),wU.endKeyValue(t)}))):-1
|
|
14221
14223
|
e.name&&(n=t.createString(e.name))
|
|
14222
|
-
|
|
14223
|
-
return
|
|
14224
|
-
e&&(a=t.dictionary())?e.has(n=
|
|
14225
|
-
return i||null},
|
|
14226
|
-
return e&&(o=t.dictionary)?e.has(n=o.id)?(i=(i=o.indexType)?
|
|
14227
|
-
|
|
14228
|
-
const i=
|
|
14229
|
-
return
|
|
14230
|
-
|
|
14231
|
-
return
|
|
14232
|
-
for(let i,s=-1,o=-1,r=t.fieldsLength();++s<r;)(i=t.fields(s))&&(n[++o]=
|
|
14224
|
+
VU.startField(t),VU.addType(t,i),VU.addTypeType(t,r),VU.addChildren(t,l),VU.addNullable(t,!!e.nullable),-1!==n&&VU.addName(t,n);-1!==s&&VU.addDictionary(t,s);-1!==c&&VU.addCustomMetadata(t,c)
|
|
14225
|
+
return VU.endField(t)},rG.decode=function(t,e){let n,i,s,o,r,a
|
|
14226
|
+
e&&(a=t.dictionary())?e.has(n=GU(a.id()))?(o=(o=a.indexType())?yZ(o):new Aq,r=new Jq(e.get(n),o,n,a.isOrdered()),i=new rG(t.name(),r,t.nullable(),bZ(t))):(o=(o=a.indexType())?yZ(o):new Aq,e.set(n,s=wZ(t,vZ(t,e))),r=new Jq(s,o,n,a.isOrdered()),i=new rG(t.name(),r,t.nullable(),bZ(t))):(s=wZ(t,vZ(t,e)),i=new rG(t.name(),s,t.nullable(),bZ(t)))
|
|
14227
|
+
return i||null},rG.fromJSON=function(t,e){let n,i,s,o,r,a
|
|
14228
|
+
return e&&(o=t.dictionary)?e.has(n=o.id)?(i=(i=o.indexType)?lZ(i):new Aq,a=new Jq(e.get(n),i,n,o.isOrdered),s=new rG(t.name,a,t.nullable,aZ(t.metadata))):(i=(i=o.indexType)?lZ(i):new Aq,e.set(n,r=cZ(t,sZ(t,e))),a=new Jq(r,i,n,o.isOrdered),s=new rG(t.name,a,t.nullable,aZ(t.metadata))):(r=cZ(t,sZ(t,e)),s=new rG(t.name,r,t.nullable,aZ(t.metadata))),s||null},oG.encode=function(t,e){const n=e.fields.map((e=>rG.encode(t,e)))
|
|
14229
|
+
HU.startFieldsVector(t,n.length)
|
|
14230
|
+
const i=HU.createFieldsVector(t,n),s=e.metadata&&e.metadata.size>0?HU.createCustomMetadataVector(t,[...e.metadata].map((([e,n])=>{const i=t.createString(`${e}`),s=t.createString(`${n}`)
|
|
14231
|
+
return wU.startKeyValue(t),wU.addKey(t,i),wU.addValue(t,s),wU.endKeyValue(t)}))):-1
|
|
14232
|
+
HU.startSchema(t),HU.addFields(t,i),HU.addEndianness(t,xZ?gU.Little:gU.Big),-1!==s&&HU.addCustomMetadata(t,s)
|
|
14233
|
+
return HU.endSchema(t)},oG.decode=function(t,e=new Map,n=YH.V5){const i=function(t,e){const n=[]
|
|
14234
|
+
for(let i,s=-1,o=-1,r=t.fieldsLength();++s<r;)(i=t.fields(s))&&(n[++o]=rG.decode(i,e))
|
|
14233
14235
|
return n}(t,e)
|
|
14234
|
-
return new
|
|
14235
|
-
|
|
14236
|
-
for(const e of n.slice().reverse())
|
|
14236
|
+
return new oG(i,bZ(t),e,n)},oG.fromJSON=function(t,e=new Map){return new oG(function(t,e){return(t.fields||[]).filter(Boolean).map((t=>rG.fromJSON(t,e)))}(t,e),aZ(t.metadata),e)},pZ.encode=function(t,e){const n=e.nodes||[],i=e.buffers||[]
|
|
14237
|
+
fU.startNodesVector(t,n.length)
|
|
14238
|
+
for(const e of n.slice().reverse())gZ.encode(t,e)
|
|
14237
14239
|
const s=t.endVector()
|
|
14238
|
-
|
|
14239
|
-
for(const e of i.slice().reverse())
|
|
14240
|
+
fU.startBuffersVector(t,i.length)
|
|
14241
|
+
for(const e of i.slice().reverse())mZ.encode(t,e)
|
|
14240
14242
|
const o=t.endVector()
|
|
14241
|
-
return
|
|
14242
|
-
return new
|
|
14243
|
-
for(let n,i=-1,s=-1,o=t.nodesLength();++i<o;)(n=t.nodes(i))&&(e[++s]=
|
|
14243
|
+
return fU.startRecordBatch(t),fU.addLength(t,BigInt(e.length)),fU.addNodes(t,s),fU.addBuffers(t,o),fU.endRecordBatch(t)},pZ.decode=function(t,e=YH.V5){if(null!==t.compression())throw new Error("Record batch compression not implemented")
|
|
14244
|
+
return new pZ(t.length(),function(t){const e=[]
|
|
14245
|
+
for(let n,i=-1,s=-1,o=t.nodesLength();++i<o;)(n=t.nodes(i))&&(e[++s]=gZ.decode(n))
|
|
14244
14246
|
return e}(t),function(t,e){const n=[]
|
|
14245
|
-
for(let i,s=-1,o=-1,r=t.buffersLength();++s<r;)(i=t.buffers(s))&&(e<
|
|
14246
|
-
return n}(t,e))},
|
|
14247
|
-
return
|
|
14248
|
-
const
|
|
14249
|
-
return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]})(),
|
|
14250
|
-
class
|
|
14251
|
-
return(t=this.readMetadataLength()).done||-1===t.value&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?
|
|
14247
|
+
for(let i,s=-1,o=-1,r=t.buffersLength();++s<r;)(i=t.buffers(s))&&(e<YH.V4&&(i.bb_pos+=8*(s+1)),n[++o]=mZ.decode(i))
|
|
14248
|
+
return n}(t,e))},pZ.fromJSON=iZ,fZ.encode=function(t,e){const n=pZ.encode(t,e.data)
|
|
14249
|
+
return mU.startDictionaryBatch(t),mU.addId(t,BigInt(e.id)),mU.addIsDelta(t,e.isDelta),mU.addData(t,n),mU.endDictionaryBatch(t)},fZ.decode=function(t,e=YH.V5){return new fZ(pZ.decode(t.data(),e),t.id(),t.isDelta())},fZ.fromJSON=function(t){return new fZ(iZ(t.data),t.id,t.isDelta)},gZ.encode=function(t,e){return pU.createFieldNode(t,BigInt(e.length),BigInt(e.nullCount))},gZ.decode=function(t){return new gZ(t.length(),t.nullCount())},mZ.encode=function(t,e){return uU.createBuffer(t,BigInt(e.offset),BigInt(e.length))},mZ.decode=function(t){return new mZ(t.offset(),t.length())}
|
|
14250
|
+
const xZ=(()=>{const t=new ArrayBuffer(2)
|
|
14251
|
+
return new DataView(t).setInt16(0,256,!0),256===new Int16Array(t)[0]})(),CZ=t=>`Expected ${UU[t]} Message in stream, but was null or length 0.`,kZ=t=>`Header pointer of flatbuffer-encoded ${UU[t]} Message is null or length 0.`,SZ=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,_Z=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`
|
|
14252
|
+
class IZ{constructor(t){this.source=t instanceof yG?t:new yG(t)}[Symbol.iterator](){return this}next(){let t
|
|
14253
|
+
return(t=this.readMetadataLength()).done||-1===t.value&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?fG:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e
|
|
14252
14254
|
if((e=this.next()).done)return null
|
|
14253
|
-
if(null!=t&&e.value.headerType!==t)throw new Error(
|
|
14255
|
+
if(null!=t&&e.value.headerType!==t)throw new Error(CZ(t))
|
|
14254
14256
|
return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0)
|
|
14255
|
-
const e=
|
|
14256
|
-
if(e.byteLength<t)throw new Error(
|
|
14257
|
-
return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}readSchema(t=!1){const e=
|
|
14258
|
-
if(t&&!i)throw new Error(
|
|
14259
|
-
return i}readMetadataLength(){const t=this.source.read(
|
|
14257
|
+
const e=VH(this.source.read(t))
|
|
14258
|
+
if(e.byteLength<t)throw new Error(_Z(t,e.byteLength))
|
|
14259
|
+
return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}readSchema(t=!1){const e=UU.Schema,n=this.readMessage(e),i=null==n?void 0:n.header()
|
|
14260
|
+
if(t&&!i)throw new Error(kZ(e))
|
|
14261
|
+
return i}readMetadataLength(){const t=this.source.read(EZ),e=t&&new aU(t),n=(null==e?void 0:e.readInt32(0))||0
|
|
14260
14262
|
return{done:0===n,value:n}}readMetadata(t){const e=this.source.read(t)
|
|
14261
|
-
if(!e)return
|
|
14262
|
-
if(e.byteLength<t)throw new Error(
|
|
14263
|
-
return{done:!1,value:
|
|
14264
|
-
return(t=yield this.readMetadataLength()).done||-1===t.value&&(t=yield this.readMetadataLength()).done||(t=yield this.readMetadata(t.value)).done?
|
|
14263
|
+
if(!e)return fG
|
|
14264
|
+
if(e.byteLength<t)throw new Error(SZ(t,e.byteLength))
|
|
14265
|
+
return{done:!1,value:uZ.decode(e)}}}class MZ{constructor(t,e){this.source=t instanceof wG?t:EH(t)?new SG(t,e):new wG(t)}[Symbol.asyncIterator](){return this}next(){return e(this,void 0,void 0,(function*(){let t
|
|
14266
|
+
return(t=yield this.readMetadataLength()).done||-1===t.value&&(t=yield this.readMetadataLength()).done||(t=yield this.readMetadata(t.value)).done?fG:t}))}throw(t){return e(this,void 0,void 0,(function*(){return yield this.source.throw(t)}))}return(t){return e(this,void 0,void 0,(function*(){return yield this.source.return(t)}))}readMessage(t){return e(this,void 0,void 0,(function*(){let e
|
|
14265
14267
|
if((e=yield this.next()).done)return null
|
|
14266
|
-
if(null!=t&&e.value.headerType!==t)throw new Error(
|
|
14268
|
+
if(null!=t&&e.value.headerType!==t)throw new Error(CZ(t))
|
|
14267
14269
|
return e.value}))}readMessageBody(t){return e(this,void 0,void 0,(function*(){if(t<=0)return new Uint8Array(0)
|
|
14268
|
-
const e=
|
|
14269
|
-
if(e.byteLength<t)throw new Error(
|
|
14270
|
-
return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}))}readSchema(){return e(this,arguments,void 0,(function*(t=!1){const e=
|
|
14271
|
-
if(t&&!i)throw new Error(
|
|
14272
|
-
return i}))}readMetadataLength(){return e(this,void 0,void 0,(function*(){const t=yield this.source.read(
|
|
14270
|
+
const e=VH(yield this.source.read(t))
|
|
14271
|
+
if(e.byteLength<t)throw new Error(_Z(t,e.byteLength))
|
|
14272
|
+
return e.byteOffset%8==0&&e.byteOffset+e.byteLength<=e.buffer.byteLength?e:e.slice()}))}readSchema(){return e(this,arguments,void 0,(function*(t=!1){const e=UU.Schema,n=yield this.readMessage(e),i=null==n?void 0:n.header()
|
|
14273
|
+
if(t&&!i)throw new Error(kZ(e))
|
|
14274
|
+
return i}))}readMetadataLength(){return e(this,void 0,void 0,(function*(){const t=yield this.source.read(EZ),e=t&&new aU(t),n=(null==e?void 0:e.readInt32(0))||0
|
|
14273
14275
|
return{done:0===n,value:n}}))}readMetadata(t){return e(this,void 0,void 0,(function*(){const e=yield this.source.read(t)
|
|
14274
|
-
if(!e)return
|
|
14275
|
-
if(e.byteLength<t)throw new Error(
|
|
14276
|
-
return{done:!1,value:
|
|
14276
|
+
if(!e)return fG
|
|
14277
|
+
if(e.byteLength<t)throw new Error(SZ(t,e.byteLength))
|
|
14278
|
+
return{done:!1,value:uZ.decode(e)}}))}}class $Z extends IZ{constructor(t){super(new Uint8Array(0)),this._schema=!1,this._body=[],this._batchIndex=0,this._dictionaryIndex=0,this._json=t instanceof mG?t:new mG(t)}next(){const{_json:t}=this
|
|
14277
14279
|
if(!this._schema){this._schema=!0
|
|
14278
|
-
return{done:!1,value:
|
|
14280
|
+
return{done:!1,value:uZ.fromJSON(t.schema,UU.Schema)}}if(this._dictionaryIndex<t.dictionaries.length){const e=t.dictionaries[this._dictionaryIndex++]
|
|
14279
14281
|
this._body=e.data.columns
|
|
14280
|
-
return{done:!1,value:
|
|
14282
|
+
return{done:!1,value:uZ.fromJSON(e,UU.DictionaryBatch)}}if(this._batchIndex<t.batches.length){const e=t.batches[this._batchIndex++]
|
|
14281
14283
|
this._body=e.columns
|
|
14282
|
-
return{done:!1,value:
|
|
14284
|
+
return{done:!1,value:uZ.fromJSON(e,UU.RecordBatch)}}return this._body=[],fG}readMessageBody(t){return function t(e){return(e||[]).reduce(((e,n)=>[...e,...n.VALIDITY&&[n.VALIDITY]||[],...n.TYPE_ID&&[n.TYPE_ID]||[],...n.OFFSET&&[n.OFFSET]||[],...n.DATA&&[n.DATA]||[],...t(n.children)]),[])}(this._body)}readMessage(t){let e
|
|
14283
14285
|
if((e=this.next()).done)return null
|
|
14284
|
-
if(null!=t&&e.value.headerType!==t)throw new Error(
|
|
14285
|
-
return e.value}readSchema(){const t=
|
|
14286
|
-
if(!e||!n)throw new Error(
|
|
14287
|
-
return n}}const
|
|
14288
|
-
for(let t=0;t<6;t+=1)
|
|
14289
|
-
function
|
|
14290
|
-
return!0}const
|
|
14291
|
-
class
|
|
14292
|
-
return
|
|
14293
|
-
return e>=
|
|
14294
|
-
return e&&e.byteLength>=4?
|
|
14295
|
-
return e&&e.byteLength>=4?
|
|
14286
|
+
if(null!=t&&e.value.headerType!==t)throw new Error(CZ(t))
|
|
14287
|
+
return e.value}readSchema(){const t=UU.Schema,e=this.readMessage(t),n=null==e?void 0:e.header()
|
|
14288
|
+
if(!e||!n)throw new Error(kZ(t))
|
|
14289
|
+
return n}}const EZ=4,DZ="ARROW1",AZ=new Uint8Array(6)
|
|
14290
|
+
for(let t=0;t<6;t+=1)AZ[t]=DZ.codePointAt(t)
|
|
14291
|
+
function TZ(t,e=0){for(let n=-1,i=AZ.length;++n<i;)if(AZ[n]!==t[e+n])return!1
|
|
14292
|
+
return!0}const OZ=AZ.length,RZ=OZ+EZ,FZ=2*OZ+EZ
|
|
14293
|
+
class NZ extends gG{constructor(t){super(),this._impl=t}get closed(){return this._impl.closed}get schema(){return this._impl.schema}get autoDestroy(){return this._impl.autoDestroy}get dictionaries(){return this._impl.dictionaries}get numDictionaries(){return this._impl.numDictionaries}get numRecordBatches(){return this._impl.numRecordBatches}get footer(){return this._impl.isFile()?this._impl.footer:null}isSync(){return this._impl.isSync()}isAsync(){return this._impl.isAsync()}isFile(){return this._impl.isFile()}isStream(){return this._impl.isStream()}next(){return this._impl.next()}throw(t){return this._impl.throw(t)}return(t){return this._impl.return(t)}cancel(){return this._impl.cancel()}reset(t){return this._impl.reset(t),this._DOMStream=void 0,this._nodeStream=void 0,this}open(t){const e=this._impl.open(t)
|
|
14294
|
+
return SH(e)?e.then((()=>this)):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return WH.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return WH.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof NZ?t:MH(t)?function(t){return new LZ(new WZ(t))}(t):EH(t)?function(t){return e(this,void 0,void 0,(function*(){const{size:e}=yield t.stat(),n=new SG(t,e)
|
|
14295
|
+
return e>=FZ&&TZ(yield n.readAt(0,OZ+7&-8))?new zZ(new jZ(n)):new BZ(new UZ(n))}))}(t):SH(t)?(()=>e(this,void 0,void 0,(function*(){return yield NZ.from(yield t)})))():DH(t)||TH(t)||OH(t)||IH(t)?function(t){return e(this,void 0,void 0,(function*(){const e=yield t.peek(OZ+7&-8)
|
|
14296
|
+
return e&&e.byteLength>=4?TZ(e)?new PZ(new qZ(yield t.read())):new BZ(new UZ(t)):new BZ(new UZ(function(){return s(this,arguments,(function*(){}))}()))}))}(new wG(t)):function(t){const e=t.peek(OZ+7&-8)
|
|
14297
|
+
return e&&e.byteLength>=4?TZ(e)?new PZ(new qZ(t.read())):new LZ(new HZ(t)):new LZ(new HZ(function*(){}()))}(new yG(t))}static readAll(t){return t instanceof NZ?t.isSync()?ZZ(t):KZ(t):MH(t)||ArrayBuffer.isView(t)||_H(t)||$H(t)?ZZ(t):KZ(t)}}class LZ extends NZ{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return s(this,arguments,(function*(){yield i(yield*o(r(this[Symbol.iterator]())))}))}}class BZ extends NZ{constructor(t){super(t),this._impl=t}readAll(){return e(this,void 0,void 0,(function*(){var t,e,n,i
|
|
14296
14298
|
const s=new Array
|
|
14297
14299
|
try{for(var o,a=!0,l=r(this);!(t=(o=yield l.next()).done);a=!0){i=o.value,a=!1
|
|
14298
14300
|
const t=i
|
|
14299
|
-
s.push(t)}}catch(t){e={error:t}}finally{try{a||t||!(n=l.return)||(yield n.call(l))}finally{if(e)throw e.error}}return s}))}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class
|
|
14300
|
-
return new
|
|
14301
|
+
s.push(t)}}catch(t){e={error:t}}finally{try{a||t||!(n=l.return)||(yield n.call(l))}finally{if(e)throw e.error}}return s}))}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class PZ extends LZ{constructor(t){super(t),this._impl=t}}class zZ extends BZ{constructor(t){super(t),this._impl=t}}class VZ{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const n=this._loadVectors(t,e,this.schema.fields),i=RW({type:new jq(this.schema.fields),length:t.length,children:n})
|
|
14302
|
+
return new XG(this.schema,i)}_loadDictionaryBatch(t,e){const{id:n,isDelta:i}=t,{dictionaries:s,schema:o}=this,r=s.get(n)
|
|
14301
14303
|
if(i||!r){const s=o.dictionaries.get(n),a=this._loadVectors(t.data,e,[s])
|
|
14302
|
-
return(r&&i?r.concat(new
|
|
14304
|
+
return(r&&i?r.concat(new eG(a)):new eG(a)).memoize()}return r.memoize()}_loadVectors(t,e,n){return new AG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class HZ extends VZ{constructor(t,e){super(e),this._reader=MH(t)?new $Z(this._handle=t):new IZ(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=GZ(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):fG}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):fG}next(){if(this.closed)return fG
|
|
14303
14305
|
let t
|
|
14304
14306
|
const{_reader:e}=this
|
|
14305
14307
|
for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header())
|
|
@@ -14307,7 +14309,7 @@ else{if(t.isRecordBatch()){this._recordBatchIndex++
|
|
|
14307
14309
|
const n=t.header(),i=e.readMessageBody(t.bodyLength)
|
|
14308
14310
|
return{done:!1,value:this._loadRecordBatch(n,i)}}if(t.isDictionaryBatch()){this._dictionaryIndex++
|
|
14309
14311
|
const n=t.header(),i=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i)
|
|
14310
|
-
this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new
|
|
14312
|
+
this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new tZ(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class UZ extends VZ{constructor(t,e){super(e),this._reader=new MZ(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return e(this,void 0,void 0,(function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}))}open(t){return e(this,void 0,void 0,(function*(){return this.closed||(this.autoDestroy=GZ(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this}))}throw(t){return e(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):fG}))}return(t){return e(this,void 0,void 0,(function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):fG}))}next(){return e(this,void 0,void 0,(function*(){if(this.closed)return fG
|
|
14311
14313
|
let t
|
|
14312
14314
|
const{_reader:e}=this
|
|
14313
14315
|
for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header())
|
|
@@ -14315,40 +14317,40 @@ else{if(t.isRecordBatch()){this._recordBatchIndex++
|
|
|
14315
14317
|
const n=t.header(),i=yield e.readMessageBody(t.bodyLength)
|
|
14316
14318
|
return{done:!1,value:this._loadRecordBatch(n,i)}}if(t.isDictionaryBatch()){this._dictionaryIndex++
|
|
14317
14319
|
const n=t.header(),i=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(n,i)
|
|
14318
|
-
this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new
|
|
14320
|
+
this.dictionaries.set(n.id,s)}}return this.schema&&0===this._recordBatchIndex?(this._recordBatchIndex++,{done:!1,value:new tZ(this.schema)}):yield this.return()}))}_readNextMessageAndValidate(t){return e(this,void 0,void 0,(function*(){return yield this._reader.readMessage(t)}))}}class qZ extends HZ{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof kG?t:new kG(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema
|
|
14319
14321
|
for(const t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e
|
|
14320
14322
|
if(this.closed)return null
|
|
14321
14323
|
this._footer||this.open()
|
|
14322
14324
|
const n=null===(e=this._footer)||void 0===e?void 0:e.getRecordBatch(t)
|
|
14323
|
-
if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(
|
|
14325
|
+
if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(UU.RecordBatch)
|
|
14324
14326
|
if(null==t?void 0:t.isRecordBatch()){const e=t.header(),n=this._reader.readMessageBody(t.bodyLength)
|
|
14325
14327
|
return this._loadRecordBatch(e,n)}}return null}_readDictionaryBatch(t){var e
|
|
14326
14328
|
const n=null===(e=this._footer)||void 0===e?void 0:e.getDictionaryBatch(t)
|
|
14327
|
-
if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(
|
|
14329
|
+
if(n&&this._handle.seek(n.offset)){const t=this._reader.readMessage(UU.DictionaryBatch)
|
|
14328
14330
|
if(null==t?void 0:t.isDictionaryBatch()){const e=t.header(),n=this._reader.readMessageBody(t.bodyLength),i=this._loadDictionaryBatch(e,n)
|
|
14329
|
-
this.dictionaries.set(e.id,i)}}}_readFooter(){const{_handle:t}=this,e=t.size-
|
|
14330
|
-
return
|
|
14331
|
+
this.dictionaries.set(e.id,i)}}}_readFooter(){const{_handle:t}=this,e=t.size-RZ,n=t.readInt32(e),i=t.readAt(e-n,n)
|
|
14332
|
+
return hG.decode(i)}_readNextMessageAndValidate(t){var e
|
|
14331
14333
|
if(this._footer||this.open(),this._footer&&this._recordBatchIndex<this.numRecordBatches){const n=null===(e=this._footer)||void 0===e?void 0:e.getRecordBatch(this._recordBatchIndex)
|
|
14332
|
-
if(n&&this._handle.seek(n.offset))return this._reader.readMessage(t)}return null}}class
|
|
14333
|
-
super(t instanceof
|
|
14334
|
+
if(n&&this._handle.seek(n.offset))return this._reader.readMessage(t)}return null}}class jZ extends UZ{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,...e){const n="number"!=typeof e[0]?e.shift():void 0,i=e[0]instanceof Map?e.shift():void 0
|
|
14335
|
+
super(t instanceof SG?t:new SG(t,n),i)}isFile(){return!0}isAsync(){return!0}open(t){const n=Object.create(null,{open:{get:()=>super.open}})
|
|
14334
14336
|
return e(this,void 0,void 0,(function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema
|
|
14335
14337
|
for(const t of this._footer.dictionaryBatches())t&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield n.open.call(this,t)}))}readRecordBatch(t){return e(this,void 0,void 0,(function*(){var e
|
|
14336
14338
|
if(this.closed)return null
|
|
14337
14339
|
this._footer||(yield this.open())
|
|
14338
14340
|
const n=null===(e=this._footer)||void 0===e?void 0:e.getRecordBatch(t)
|
|
14339
|
-
if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(
|
|
14341
|
+
if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(UU.RecordBatch)
|
|
14340
14342
|
if(null==t?void 0:t.isRecordBatch()){const e=t.header(),n=yield this._reader.readMessageBody(t.bodyLength)
|
|
14341
14343
|
return this._loadRecordBatch(e,n)}}return null}))}_readDictionaryBatch(t){return e(this,void 0,void 0,(function*(){var e
|
|
14342
14344
|
const n=null===(e=this._footer)||void 0===e?void 0:e.getDictionaryBatch(t)
|
|
14343
|
-
if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(
|
|
14345
|
+
if(n&&(yield this._handle.seek(n.offset))){const t=yield this._reader.readMessage(UU.DictionaryBatch)
|
|
14344
14346
|
if(null==t?void 0:t.isDictionaryBatch()){const e=t.header(),n=yield this._reader.readMessageBody(t.bodyLength),i=this._loadDictionaryBatch(e,n)
|
|
14345
14347
|
this.dictionaries.set(e.id,i)}}}))}_readFooter(){return e(this,void 0,void 0,(function*(){const{_handle:t}=this
|
|
14346
14348
|
t._pending&&(yield t._pending)
|
|
14347
|
-
const e=t.size-
|
|
14348
|
-
return
|
|
14349
|
-
if(e&&(yield this._handle.seek(e.offset)))return yield this._reader.readMessage(t)}return null}))}}class
|
|
14350
|
-
try{if(!e.open({autoDestroy:!1}).closed)do{yield e}while(!e.reset().open().closed)}finally{e.cancel()}}function
|
|
14351
|
-
try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(yield i(e.reset().open())).closed)}finally{yield i(e.cancel())}}))}const
|
|
14349
|
+
const e=t.size-RZ,n=yield t.readInt32(e),i=yield t.readAt(e-n,n)
|
|
14350
|
+
return hG.decode(i)}))}_readNextMessageAndValidate(t){return e(this,void 0,void 0,(function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex<this.numRecordBatches){const e=this._footer.getRecordBatch(this._recordBatchIndex)
|
|
14351
|
+
if(e&&(yield this._handle.seek(e.offset)))return yield this._reader.readMessage(t)}return null}))}}class WZ extends HZ{constructor(t,e){super(t,e)}_loadVectors(t,e,n){return new TG(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}function GZ(t,e){return e&&"boolean"==typeof e.autoDestroy?e.autoDestroy:t.autoDestroy}function*ZZ(t){const e=NZ.from(t)
|
|
14352
|
+
try{if(!e.open({autoDestroy:!1}).closed)do{yield e}while(!e.reset().open().closed)}finally{e.cancel()}}function KZ(t){return s(this,arguments,(function*(){const e=yield i(NZ.from(t))
|
|
14353
|
+
try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(yield i(e.reset().open())).closed)}finally{yield i(e.cancel())}}))}const YZ=Q`
|
|
14352
14354
|
<div class="wafer-map-container">
|
|
14353
14355
|
<svg class="svg-root">
|
|
14354
14356
|
<g ${Ut("zoomContainer")} transform=${t=>t.transform.toString()}>
|
|
@@ -14379,7 +14381,7 @@ try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(y
|
|
|
14379
14381
|
/>
|
|
14380
14382
|
</svg>
|
|
14381
14383
|
</div>
|
|
14382
|
-
`,
|
|
14384
|
+
`,XZ=Mt`
|
|
14383
14385
|
${Vs("inline-block")}
|
|
14384
14386
|
|
|
14385
14387
|
:host {
|
|
@@ -14469,67 +14471,67 @@ try{if(!(yield i(e.open({autoDestroy:!1}))).closed)do{yield yield i(e)}while(!(y
|
|
|
14469
14471
|
outline-width: 0px;
|
|
14470
14472
|
}
|
|
14471
14473
|
`
|
|
14472
|
-
function
|
|
14474
|
+
function JZ(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function QZ(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function tK(t){let e,n,i
|
|
14473
14475
|
function s(t,i,s=0,o=t.length){if(s<o){if(0!==e(i,i))return o
|
|
14474
14476
|
do{const e=s+o>>>1
|
|
14475
|
-
n(t[e],i)<0?s=e+1:o=e}while(s<o)}return s}return 2!==t.length?(e=
|
|
14477
|
+
n(t[e],i)<0?s=e+1:o=e}while(s<o)}return s}return 2!==t.length?(e=JZ,n=(e,n)=>JZ(t(e),n),i=(e,n)=>t(e)-n):(e=t===JZ||t===QZ?t:eK,n=t,i=t),{left:s,center:function(t,e,n=0,o=t.length){const r=s(t,e,n,o-1)
|
|
14476
14478
|
return r>n&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,i,s=0,o=t.length){if(s<o){if(0!==e(i,i))return o
|
|
14477
14479
|
do{const e=s+o>>>1
|
|
14478
|
-
n(t[e],i)<=0?s=e+1:o=e}while(s<o)}return s}}}function
|
|
14479
|
-
|
|
14480
|
-
class
|
|
14480
|
+
n(t[e],i)<=0?s=e+1:o=e}while(s<o)}return s}}}function eK(){return 0}function nK(t){return null===t?NaN:+t}const iK=tK(JZ).right
|
|
14481
|
+
tK(nK).center
|
|
14482
|
+
class sK extends Map{constructor(t,e=rK){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(oK(this,t))}has(t){return super.has(oK(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const i=e(n)
|
|
14481
14483
|
return t.has(i)?t.get(i):(t.set(i,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const i=e(n)
|
|
14482
14484
|
t.has(i)&&(n=t.get(i),t.delete(i))
|
|
14483
|
-
return n}(this,t))}}function
|
|
14484
|
-
return t.has(i)?t.get(i):n}function
|
|
14485
|
-
function
|
|
14485
|
+
return n}(this,t))}}function oK({_intern:t,_key:e},n){const i=e(n)
|
|
14486
|
+
return t.has(i)?t.get(i):n}function rK(t){return null!==t&&"object"==typeof t?t.valueOf():t}const aK=Math.sqrt(50),lK=Math.sqrt(10),cK=Math.sqrt(2)
|
|
14487
|
+
function dK(t,e,n){const i=(e-t)/Math.max(0,n),s=Math.floor(Math.log10(i)),o=i/Math.pow(10,s),r=o>=aK?10:o>=lK?5:o>=cK?2:1
|
|
14486
14488
|
let a,l,c
|
|
14487
|
-
return s<0?(c=Math.pow(10,-s)/r,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,s)*r,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?
|
|
14489
|
+
return s<0?(c=Math.pow(10,-s)/r,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,s)*r,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?dK(t,e,2*n):[a,l,c]}function hK(t,e,n){return dK(t=+t,e=+e,n=+n)[2]}function uK(t,e,n=nK){if((i=t.length)&&!isNaN(e=+e)){if(e<=0||i<2)return+n(t[0],0,t)
|
|
14488
14490
|
if(e>=1)return+n(t[i-1],i-1,t)
|
|
14489
14491
|
var i,s=(i-1)*e,o=Math.floor(s),r=+n(t[o],o,t)
|
|
14490
|
-
return r+(+n(t[o+1],o+1,t)-r)*(s-o)}}function
|
|
14492
|
+
return r+(+n(t[o+1],o+1,t)-r)*(s-o)}}function pK(t,e,n){t=+t,e=+e,n=(s=arguments.length)<2?(e=t,t=0,1):s<3?1:+n
|
|
14491
14493
|
for(var i=-1,s=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(s);++i<s;)o[i]=t+i*n
|
|
14492
|
-
return o}function
|
|
14494
|
+
return o}function fK(t,e){switch(arguments.length){case 0:break
|
|
14493
14495
|
case 1:this.range(t)
|
|
14494
14496
|
break
|
|
14495
|
-
default:this.range(e).domain(t)}return this}const
|
|
14496
|
-
function
|
|
14497
|
+
default:this.range(e).domain(t)}return this}const mK=Symbol("implicit")
|
|
14498
|
+
function gK(){var t=new sK,e=[],n=[],i=mK
|
|
14497
14499
|
function s(s){let o=t.get(s)
|
|
14498
|
-
if(void 0===o){if(i!==
|
|
14500
|
+
if(void 0===o){if(i!==mK)return i
|
|
14499
14501
|
t.set(s,o=e.push(s)-1)}return n[o%n.length]}return s.domain=function(n){if(!arguments.length)return e.slice()
|
|
14500
|
-
e=[],t=new
|
|
14502
|
+
e=[],t=new sK
|
|
14501
14503
|
for(const i of n)t.has(i)||t.set(i,e.push(i)-1)
|
|
14502
|
-
return s},s.range=function(t){return arguments.length?(n=Array.from(t),s):n.slice()},s.unknown=function(t){return arguments.length?(i=t,s):i},s.copy=function(){return
|
|
14504
|
+
return s},s.range=function(t){return arguments.length?(n=Array.from(t),s):n.slice()},s.unknown=function(t){return arguments.length?(i=t,s):i},s.copy=function(){return gK(e,n).unknown(i)},fK.apply(s,arguments),s}function vK(){var t,e,n=gK().unknown(void 0),i=n.domain,s=n.range,o=0,r=1,a=!1,l=0,c=0,d=.5
|
|
14503
14505
|
function h(){var n=i().length,h=r<o,u=h?r:o,p=h?o:r
|
|
14504
14506
|
t=(p-u)/Math.max(1,n-l+2*c),a&&(t=Math.floor(t)),u+=(p-u-t*(n-l))*d,e=t*(1-l),a&&(u=Math.round(u),e=Math.round(e))
|
|
14505
|
-
var f=
|
|
14506
|
-
return s(h?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([o,r]=t,o=+o,r=+r,h()):[o,r]},n.rangeRound=function(t){return[o,r]=t,o=+o,r=+r,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),h()):d},n.copy=function(){return
|
|
14507
|
-
function
|
|
14508
|
-
var n}function
|
|
14509
|
-
return s<i?(i=
|
|
14510
|
-
for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++r<i;)s[r]=
|
|
14511
|
-
return function(e){var n=
|
|
14512
|
-
return o[n](s[n](e))}}function
|
|
14507
|
+
var f=pK(n).map((function(e){return u+t*e}))
|
|
14508
|
+
return s(h?f.reverse():f)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([o,r]=t,o=+o,r=+r,h()):[o,r]},n.rangeRound=function(t){return[o,r]=t,o=+o,r=+r,a=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,h()):a},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),h()):d},n.copy=function(){return vK(i(),[o,r]).round(a).paddingInner(l).paddingOuter(c).align(d)},fK.apply(h(),arguments)}function bK(t){return+t}var yK=[0,1]
|
|
14509
|
+
function wK(t){return t}function xK(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n})
|
|
14510
|
+
var n}function CK(t,e,n){var i=t[0],s=t[1],o=e[0],r=e[1]
|
|
14511
|
+
return s<i?(i=xK(s,i),o=n(r,o)):(i=xK(i,s),o=n(o,r)),function(t){return o(i(t))}}function kK(t,e,n){var i=Math.min(t.length,e.length)-1,s=new Array(i),o=new Array(i),r=-1
|
|
14512
|
+
for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++r<i;)s[r]=xK(t[r],t[r+1]),o[r]=n(e[r],e[r+1])
|
|
14513
|
+
return function(e){var n=iK(t,e,1,i)-1
|
|
14514
|
+
return o[n](s[n](e))}}function SK(){var t,e,n,i,s,o,r=yK,a=yK,l=jz,c=wK
|
|
14513
14515
|
function d(){var t,e,n,l=Math.min(r.length,a.length)
|
|
14514
|
-
return c!==
|
|
14516
|
+
return c!==wK&&(t=r[0],e=r[l-1],t>e&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=l>2?kK:CK,s=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(s||(s=i(r.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=i(a,r.map(t),zz)))(n)))},h.domain=function(t){return arguments.length?(r=Array.from(t,bK),d()):r.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),d()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=Wz,d()},h.clamp=function(t){return arguments.length?(c=!!t||wK,d()):c!==wK},h.interpolate=function(t){return arguments.length?(l=t,d()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,d()}}function _K(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null
|
|
14515
14517
|
var n,i=t.slice(0,n)
|
|
14516
|
-
return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function
|
|
14517
|
-
function
|
|
14518
|
+
return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function IK(t){return(t=_K(Math.abs(t)))?t[1]:NaN}var MK,$K=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i
|
|
14519
|
+
function EK(t){if(!(e=$K.exec(t)))throw new Error("invalid format: "+t)
|
|
14518
14520
|
var e
|
|
14519
|
-
return new
|
|
14521
|
+
return new DK({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function DK(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function AK(t,e){var n=_K(t,e)
|
|
14520
14522
|
if(!n)return t+""
|
|
14521
14523
|
var i=n[0],s=n[1]
|
|
14522
|
-
return s<0?"0."+new Array(-s).join("0")+i:i.length>s+1?i.slice(0,s+1)+"."+i.slice(s+1):i+new Array(s-i.length+2).join("0")}
|
|
14523
|
-
var
|
|
14524
|
+
return s<0?"0."+new Array(-s).join("0")+i:i.length>s+1?i.slice(0,s+1)+"."+i.slice(s+1):i+new Array(s-i.length+2).join("0")}EK.prototype=DK.prototype,DK.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}
|
|
14525
|
+
var TK={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>AK(100*t,e),r:AK,s:function(t,e){var n=_K(t,e)
|
|
14524
14526
|
if(!n)return t+""
|
|
14525
|
-
var i=n[0],s=n[1],o=s-(
|
|
14526
|
-
return o===r?i:o>r?i+new Array(o-r+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+
|
|
14527
|
-
function
|
|
14528
|
-
function
|
|
14529
|
-
return o.reverse().join(n)}),s=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?
|
|
14530
|
-
function h(t){var e=(t
|
|
14531
|
-
"n"===b?(m=!0,b="g"):
|
|
14532
|
-
var y="$"===u?s:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?o:/[%p]/.test(b)?l:"",x=
|
|
14527
|
+
var i=n[0],s=n[1],o=s-(MK=3*Math.max(-8,Math.min(8,Math.floor(s/3))))+1,r=i.length
|
|
14528
|
+
return o===r?i:o>r?i+new Array(o-r+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+_K(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)}
|
|
14529
|
+
function OK(t){return t}var RK,FK,NK,LK=Array.prototype.map,BK=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]
|
|
14530
|
+
function PK(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?OK:(e=LK.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var s=t.length,o=[],r=0,a=e[0],l=0;s>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(t.substring(s-=a,s+a)),!((l+=a+1)>i));)a=e[r=(r+1)%e.length]
|
|
14531
|
+
return o.reverse().join(n)}),s=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",r=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?OK:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(LK.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",d=void 0===t.nan?"NaN":t.nan+""
|
|
14532
|
+
function h(t){var e=(t=EK(t)).fill,n=t.align,h=t.sign,u=t.symbol,p=t.zero,f=t.width,m=t.comma,g=t.precision,v=t.trim,b=t.type
|
|
14533
|
+
"n"===b?(m=!0,b="g"):TK[b]||(void 0===g&&(g=12),v=!0,b="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=")
|
|
14534
|
+
var y="$"===u?s:"#"===u&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===u?o:/[%p]/.test(b)?l:"",x=TK[b],C=/[defgprs%]/.test(b)
|
|
14533
14535
|
function k(t){var s,o,l,u=y,k=w
|
|
14534
14536
|
if("c"===b)k=x(t)+k,t=""
|
|
14535
14537
|
else{var S=(t=+t)<0||1/t<0
|
|
@@ -14538,7 +14540,7 @@ break
|
|
|
14538
14540
|
case"0":0===s&&(s=i),e=i
|
|
14539
14541
|
break
|
|
14540
14542
|
default:if(!+t[i])break t
|
|
14541
|
-
s>0&&(s=0)}return s>0?t.slice(0,s)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?
|
|
14543
|
+
s>0&&(s=0)}return s>0?t.slice(0,s)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),u=(S?"("===h?h:c:"-"===h||"("===h?"":h)+u,k=("s"===b?BK[8+MK/3]:"")+k+(S&&"("===h?")":""),C)for(s=-1,o=t.length;++s<o;)if(48>(l=t.charCodeAt(s))||l>57){k=(46===l?r+t.slice(s+1):t.slice(s))+k,t=t.slice(0,s)
|
|
14542
14544
|
break}}m&&!p&&(t=i(t,1/0))
|
|
14543
14545
|
var _=u.length+t.length+k.length,I=_<f?new Array(f-_+1).join(e):""
|
|
14544
14546
|
switch(m&&p&&(t=i(I+t,I.length?f-k.length:1/0),I=""),n){case"<":t=u+t+k+I
|
|
@@ -14547,19 +14549,19 @@ case"=":t=u+I+t+k
|
|
|
14547
14549
|
break
|
|
14548
14550
|
case"^":t=I.slice(0,_=I.length>>1)+u+t+k+I.slice(_)
|
|
14549
14551
|
break
|
|
14550
|
-
default:t=I+u+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t
|
|
14551
|
-
return function(t){return n(s*t)+o}}}}function
|
|
14552
|
-
const i=(e=+e)<(t=+t),s=i?
|
|
14552
|
+
default:t=I+u+t+k}return a(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=EK(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(IK(e)/3))),s=Math.pow(10,-i),o=BK[8+i/3]
|
|
14553
|
+
return function(t){return n(s*t)+o}}}}function zK(t,e,n,i){var s,o=function(t,e,n){n=+n
|
|
14554
|
+
const i=(e=+e)<(t=+t),s=i?hK(e,t,n):hK(t,e,n)
|
|
14553
14555
|
return(i?-1:1)*(s<0?1/-s:s)}(t,e,n)
|
|
14554
|
-
switch((i
|
|
14555
|
-
return null!=i.precision||isNaN(s=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(
|
|
14556
|
-
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(s=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,
|
|
14556
|
+
switch((i=EK(null==i?",f":i)).type){case"s":var r=Math.max(Math.abs(t),Math.abs(e))
|
|
14557
|
+
return null!=i.precision||isNaN(s=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(IK(e)/3)))-IK(Math.abs(t)))}(o,r))||(i.precision=s),NK(i,r)
|
|
14558
|
+
case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(s=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,IK(e)-IK(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=s-("e"===i.type))
|
|
14557
14559
|
break
|
|
14558
|
-
case"f":case"%":null!=i.precision||isNaN(s=function(t){return Math.max(0,-
|
|
14560
|
+
case"f":case"%":null!=i.precision||isNaN(s=function(t){return Math.max(0,-IK(Math.abs(t)))}(o))||(i.precision=s-2*("%"===i.type))}return FK(i)}function VK(t){var e=t.domain
|
|
14559
14561
|
return t.ticks=function(t){var n=e()
|
|
14560
14562
|
return function(t,e,n){if(!((n=+n)>0))return[]
|
|
14561
14563
|
if((t=+t)==(e=+e))return[t]
|
|
14562
|
-
const i=e<t,[s,o,r]=i?
|
|
14564
|
+
const i=e<t,[s,o,r]=i?dK(e,t,n):dK(t,e,n)
|
|
14563
14565
|
if(!(o>=s))return[]
|
|
14564
14566
|
const a=o-s+1,l=new Array(a)
|
|
14565
14567
|
if(i)if(r<0)for(let t=0;t<a;++t)l[t]=(o-t)/-r
|
|
@@ -14567,33 +14569,23 @@ else for(let t=0;t<a;++t)l[t]=(o-t)*r
|
|
|
14567
14569
|
else if(r<0)for(let t=0;t<a;++t)l[t]=(s+t)/-r
|
|
14568
14570
|
else for(let t=0;t<a;++t)l[t]=(s+t)*r
|
|
14569
14571
|
return l}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var i=e()
|
|
14570
|
-
return
|
|
14572
|
+
return zK(i[0],i[i.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10)
|
|
14571
14573
|
var i,s,o=e(),r=0,a=o.length-1,l=o[r],c=o[a],d=10
|
|
14572
|
-
for(c<l&&(s=l,l=c,c=s,s=r,r=a,a=s);d-- >0;){if((s=
|
|
14574
|
+
for(c<l&&(s=l,l=c,c=s,s=r,r=a,a=s);d-- >0;){if((s=hK(l,c,n))===i)return o[r]=l,o[a]=c,e(o)
|
|
14573
14575
|
if(s>0)l=Math.floor(l/s)*s,c=Math.ceil(c/s)*s
|
|
14574
14576
|
else{if(!(s<0))break
|
|
14575
|
-
l=Math.ceil(l*s)/s,c=Math.floor(c*s)/s}i=s}return t},t}function
|
|
14576
|
-
return t.copy=function(){return e=t,
|
|
14577
|
-
var e},
|
|
14577
|
+
l=Math.ceil(l*s)/s,c=Math.floor(c*s)/s}i=s}return t},t}function HK(){var t=SK()(wK,wK)
|
|
14578
|
+
return t.copy=function(){return e=t,HK().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())
|
|
14579
|
+
var e},fK.apply(t,arguments),VK(t)}function UK(){var t,e=[],n=[],i=[]
|
|
14578
14580
|
function s(){var t=0,s=Math.max(1,n.length)
|
|
14579
|
-
for(i=new Array(s-1);++t<s;)i[t-1]=
|
|
14580
|
-
return o}function o(e){return null==e||isNaN(e=+e)?t:n[
|
|
14581
|
+
for(i=new Array(s-1);++t<s;)i[t-1]=uK(e,t/s)
|
|
14582
|
+
return o}function o(e){return null==e||isNaN(e=+e)?t:n[iK(i,e)]}return o.invertExtent=function(t){var s=n.indexOf(t)
|
|
14581
14583
|
return s<0?[NaN,NaN]:[s>0?i[s-1]:e[0],s<i.length?i[s]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice()
|
|
14582
14584
|
e=[]
|
|
14583
14585
|
for(let n of t)null==n||isNaN(n=+n)||e.push(n)
|
|
14584
|
-
return e.sort(
|
|
14585
|
-
const
|
|
14586
|
-
class
|
|
14587
|
-
const t=t=>null!==t
|
|
14588
|
-
void 0===this.wafermap.diesTable&&(this._diesRenderInfo=this.wafermap.dies.map((t=>this.computeDieRenderInfo(t))).filter(t))}computeDieRenderInfo(t){const e=this.wafermap.dataManager.margin,n=this.wafermap.dataManager.horizontalScale(t.x),i=this.wafermap.dataManager.verticalScale(t.y)
|
|
14589
|
-
return void 0===n||void 0===i?null:{x:n+e.right,y:i+e.top,fillStyle:this.calculateFillStyle(t.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,t.tags),text:this.buildLabel(t.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}createD3ColorScale(t,e){return this.isColorScaleLinear(e)?VK().domain(t.values.map((t=>+t))).range(t.colors):mK().domain(t.values).range(t.colors)}dieHasData(t){return null!=t&&""!==t}buildLabel(t,e,n,i){if(n||!this.dieHasData(t))return""
|
|
14590
|
-
const s=`${t}${i}`
|
|
14591
|
-
return s.length>=e?`${s.substring(0,e)}…`:s}calculateOpacity(t,e){if(!e||0===e.length)return 1
|
|
14592
|
-
const n=new Set(e)
|
|
14593
|
-
return t?.some((t=>n.has(t)))?1:this.nonHighlightedOpacity}isColorScaleLinear(t){return t===KK}isColorScaleOrdinal(t){return t===YK}calculateFillStyle(t,e,n,i){let s=this.emptyDieColor
|
|
14594
|
-
if(this.dieHasData(t)&&(isNaN(+t)?s=this.nanDieColor:this.isColorScaleLinear(e)?s=this.d3ColorScale(+t):this.isColorScaleOrdinal(e)&&(s=this.d3ColorScale(t))),void 0===s)return this.emptyDieColor
|
|
14595
|
-
let o=eo(s)
|
|
14596
|
-
return null===o?this.emptyDieColor:(o=new Gs(o.r,o.g,o.b,this.calculateOpacity(i,n)),o.toStringWebRGBA())}}class JK{get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get radius(){return this.computations.radius}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get invertedHorizontalScale(){return this.computations.invertedHorizontalScale}get verticalScale(){return this.computations.verticalScale}get invertedVerticalScale(){return this.computations.invertedVerticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get diesRenderInfo(){return this.prerendering.diesRenderInfo}get data(){return this.dataMap}constructor(t){this.wafermap=t,this.computations=new class{get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get radius(){return this._radius}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get invertedHorizontalScale(){return this._invertedHorizontalScale}get invertedVerticalScale(){return this._invertedVerticalScale}constructor(t){this.wafermap=t,this.defaultPadding=0,this.baseMarginPercentage=.04}updateContainerDimensions(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
|
|
14586
|
+
return e.sort(JZ),s()},o.range=function(t){return arguments.length?(n=Array.from(t),s()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return UK().domain(e).range(n).unknown(t)},fK.apply(o,arguments)}RK=PK({thousands:",",grouping:[3],currency:["$",""]}),FK=RK.format,NK=RK.formatPrefix
|
|
14587
|
+
const qK="bottom-left",jK="bottom-right",WK="top-left",GK="top",ZK="show",KK="hide",YK="linear",XK="ordinal"
|
|
14588
|
+
let JK=class{get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get radius(){return this._radius}get margin(){return this._margin}get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get invertedHorizontalScale(){return this._invertedHorizontalScale}get invertedVerticalScale(){return this._invertedVerticalScale}constructor(t){this.wafermap=t,this.defaultPadding=0,this.baseMarginPercentage=.04}updateContainerDimensions(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
|
|
14597
14589
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(t,this._margin)
|
|
14598
14590
|
const s=Math.min(this._containerDimensions.width,this._containerDimensions.height)
|
|
14599
14591
|
this._radius=s/2,this.updateScales()}updateScales(){const t=Math.min(this._containerDimensions.width,this._containerDimensions.height),e=this.gridDimensionsValidAndDefined()?this.calculateGridDimensionsFromBoundingBox():this.calculateGridDimensionsFromDies(this.wafermap.dies),n=this.wafermap.originLocation
|
|
@@ -14603,11 +14595,22 @@ this._dieDimensions={width:isNaN(i)?0:i,height:isNaN(s)?0:s}}gridDimensionsValid
|
|
|
14603
14595
|
return"number"==typeof this.wafermap.gridMaxY&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX&&(t.origin.x=this.wafermap.gridMinX,t.origin.y=this.wafermap.gridMinY,t.rows=this.wafermap.gridMaxY-this.wafermap.gridMinY+1,t.cols=this.wafermap.gridMaxX-this.wafermap.gridMinX+1),t}calculateGridDimensionsFromDies(t){if(0===t.length||void 0===t[0])return{origin:{x:0,y:0},rows:0,cols:0}
|
|
14604
14596
|
const e={x:t[0].x,y:t[0].y},n={x:t[0].x,y:t[0].y}
|
|
14605
14597
|
for(const i of t)i.x<e.x&&(e.x=i.x),i.y<e.y&&(e.y=i.y),i.x>n.x&&(n.x=i.x),i.y>n.y&&(n.y=i.y)
|
|
14606
|
-
return{origin:e,rows:n.y-e.y+1,cols:n.x-e.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=
|
|
14607
|
-
return t===
|
|
14608
|
-
return t===
|
|
14609
|
-
return t===
|
|
14610
|
-
return t===
|
|
14598
|
+
return{origin:e,rows:n.y-e.y+1,cols:n.x-e.x+1}}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e,n){const i=vK().domain(pK(e.origin.x,e.origin.x+e.cols)).paddingInner(0).paddingOuter(0).align(0).round(!1)
|
|
14599
|
+
return t===qK||t===WK?i.range([0,n]):i.range([n,0])}createInvertedHorizontalScale(t,e,n){const i=UK().domain([0,n])
|
|
14600
|
+
return t===qK||t===WK?i.range(pK(e.origin.x,e.origin.x+e.cols)):i.range(pK(e.origin.x,e.origin.x+e.cols).reverse())}createVerticalScale(t,e,n){const i=vK().domain(pK(e.origin.y,e.origin.y+e.rows)).paddingInner(this.defaultPadding).paddingOuter(0).align(0).round(!1)
|
|
14601
|
+
return t===qK||t===jK?i.range([n,0]):i.range([0,n])}createInvertedVerticalScale(t,e,n){const i=UK().domain([0,n])
|
|
14602
|
+
return t===qK||t===jK?i.range(pK(e.origin.y,e.origin.y+e.rows).reverse()):i.range(pK(e.origin.y,e.origin.y+e.rows))}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}}
|
|
14603
|
+
class QK{get labelsFontSize(){return this._labelsFontSize}get diesRenderInfo(){return this._diesRenderInfo}constructor(t){this.wafermap=t,this.fontSizeFactor=.8,this.nonHighlightedOpacity=.3,this.emptyDieColor="rgba(218,223,236,1)",this.nanDieColor="rgba(122,122,122,1)"}updateLabelsFontSize(){this._labelsFontSize=this.calculateLabelsFontSize(this.wafermap.dataManager.dieDimensions,this.wafermap.maxCharacters),this.updateDiesRenderInfo()}updateDiesRenderInfo(){this.d3ColorScale=this.createD3ColorScale(this.wafermap.colorScale,this.wafermap.colorScaleMode)
|
|
14604
|
+
const t=t=>null!==t
|
|
14605
|
+
void 0===this.wafermap.diesTable&&(this._diesRenderInfo=this.wafermap.dies.map((t=>this.computeDieRenderInfo(t))).filter(t))}computeDieRenderInfo(t){const e=this.wafermap.dataManager.margin,n=this.wafermap.dataManager.horizontalScale(t.x),i=this.wafermap.dataManager.verticalScale(t.y)
|
|
14606
|
+
return void 0===n||void 0===i?null:{x:n+e.right,y:i+e.top,fillStyle:this.calculateFillStyle(t.value,this.wafermap.colorScaleMode,this.wafermap.highlightedTags,t.tags),text:this.buildLabel(t.value,this.wafermap.maxCharacters,this.wafermap.dieLabelsHidden,this.wafermap.dieLabelsSuffix)}}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}createD3ColorScale(t,e){return this.isColorScaleLinear(e)?HK().domain(t.values.map((t=>+t))).range(t.colors):gK().domain(t.values).range(t.colors)}dieHasData(t){return null!=t&&""!==t}buildLabel(t,e,n,i){if(n||!this.dieHasData(t))return""
|
|
14607
|
+
const s=`${t}${i}`
|
|
14608
|
+
return s.length>=e?`${s.substring(0,e)}…`:s}calculateOpacity(t,e){if(!e||0===e.length)return 1
|
|
14609
|
+
const n=new Set(e)
|
|
14610
|
+
return t?.some((t=>n.has(t)))?1:this.nonHighlightedOpacity}isColorScaleLinear(t){return t===YK}isColorScaleOrdinal(t){return t===XK}calculateFillStyle(t,e,n,i){let s=this.emptyDieColor
|
|
14611
|
+
if(this.dieHasData(t)&&(isNaN(+t)?s=this.nanDieColor:this.isColorScaleLinear(e)?s=this.d3ColorScale(+t):this.isColorScaleOrdinal(e)&&(s=this.d3ColorScale(t))),void 0===s)return this.emptyDieColor
|
|
14612
|
+
let o=eo(s)
|
|
14613
|
+
return null===o?this.emptyDieColor:(o=new Gs(o.r,o.g,o.b,this.calculateOpacity(i,n)),o.toStringWebRGBA())}}class tY{get containerDimensions(){return this.computations.containerDimensions}get dieDimensions(){return this.computations.dieDimensions}get radius(){return this.computations.radius}get margin(){return this.computations.margin}get horizontalScale(){return this.computations.horizontalScale}get invertedHorizontalScale(){return this.computations.invertedHorizontalScale}get verticalScale(){return this.computations.verticalScale}get invertedVerticalScale(){return this.computations.invertedVerticalScale}get labelsFontSize(){return this.prerendering.labelsFontSize}get diesRenderInfo(){return this.prerendering.diesRenderInfo}get data(){return this.dataMap}constructor(t){this.wafermap=t,this.computations=new JK(t),this.prerendering=new QK(t)}updateContainerDimensions(){this.computations.updateContainerDimensions(),this.updateDataMap(),this.updateLabelsFontSize()}updateScales(){this.computations.updateScales(),this.updateDataMap(),this.updateLabelsFontSize()}updateLabelsFontSize(){this.prerendering.updateLabelsFontSize()}updateDiesRenderInfo(){this.prerendering.updateDiesRenderInfo()}getWaferMapDie(t){return this.dataMap.get(`${t.x}_${t.y}`)}updateDataMap(){this.dataMap=new Map(this.wafermap.dies.map((t=>[`${t.x}_${t.y}`,t])))}}class eY{constructor(t){this.wafermap=t,this.minDieDim=50}updateSortedDiesAndDrawWafer(){this.dies=this.wafermap.dataManager.diesRenderInfo.sort(((t,e)=>t.fillStyle>e.fillStyle?1:e.fillStyle>t.fillStyle?-1:0)),this.drawWafer()}drawWafer(){this.wafermap.canvasContext.save(),this.clearCanvas(),this.scaleCanvas(),this.renderDies(),this.renderText(),this.wafermap.canvasContext.restore(),this.renderHover()}renderHover(){void 0!==this.wafermap.dataManager.dieDimensions&&void 0!==this.wafermap.transform&&(this.wafermap.hoverWidth=this.wafermap.dataManager.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.dataManager.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?KK:ZK,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.dataManager.horizontalScale(this.wafermap.hoverDie.x)
|
|
14611
14614
|
if(void 0===t)return""
|
|
14612
14615
|
const e=this.wafermap.dataManager.verticalScale(this.wafermap.hoverDie.y)
|
|
14613
14616
|
if(void 0===e)return""
|
|
@@ -14620,80 +14623,89 @@ if(t*e*(this.wafermap.transform.k||1)>=this.minDieDim){const n=this.wafermap.dat
|
|
|
14620
14623
|
i.font=`${n.toString()}px sans-serif`,i.fillStyle="#ffffff",i.textAlign="center",i.lineCap="butt"
|
|
14621
14624
|
const s=i.measureText("M"),o=this.wafermap.transform.invert([0,0]),r=this.wafermap.transform.invert([this.wafermap.canvas.width,this.wafermap.canvas.height])
|
|
14622
14625
|
o[0]-=t,o[1]-=e
|
|
14623
|
-
for(const n of this.dies)this.isDieVisible(n,o,r)&&i.fillText(n.text,n.x+t/2,n.y+e/2+s.width/2,t-t/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(t,e,n){return t.x>=e[0]&&t.x<n[0]&&t.y>=e[1]&&t.y<n[1]}}const
|
|
14624
|
-
class
|
|
14626
|
+
for(const n of this.dies)this.isDieVisible(n,o,r)&&i.fillText(n.text,n.x+t/2,n.y+e/2+s.width/2,t-t/100*20)}}clearCanvas(){this.wafermap.canvasContext.clearRect(0,0,this.wafermap.canvas.width,this.wafermap.canvas.height)}scaleCanvas(){this.wafermap.canvasContext.translate(this.wafermap.transform.x,this.wafermap.transform.y),this.wafermap.canvasContext.scale(this.wafermap.transform.k,this.wafermap.transform.k)}isDieVisible(t,e,n){return t.x>=e[0]&&t.x<n[0]&&t.y>=e[1]&&t.y<n[1]}}const nY=["highlightedTags","canvasWidth","canvasHeight","originLocation","gridMinX","gridMaxX","gridMinY","gridMaxY","dies","maxCharacters","colorScale","colorScaleMode","dieLabelsHidden","dieLabelsSuffix","transform","hoverDie"]
|
|
14627
|
+
class iY extends RE{constructor(t){super(nY),this.wafermap=t,this.updateQueued=!1}get requiresEventsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")||this.isTracked("transform")}get requiresWorkerWaferSetup(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")||this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")||this.isTracked("maxCharacters")||this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresContainerDimensionsUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresComponentResizeUpdate(){return this.isTracked("canvasWidth")||this.isTracked("canvasHeight")}get requiresScalesUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresInputDataUpdate(){return this.isTracked("originLocation")||this.isTracked("gridMinX")||this.isTracked("gridMaxX")||this.isTracked("gridMinY")||this.isTracked("gridMaxY")||this.isTracked("dies")}get requiresLabelsFontSizeUpdate(){return this.isTracked("maxCharacters")}get requiresDiesRenderInfoUpdate(){return this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresColorAndTextUpdate(){return this.isTracked("maxCharacters")||this.isTracked("highlightedTags")||this.isTracked("colorScale")||this.isTracked("colorScaleMode")||this.isTracked("dieLabelsHidden")||this.isTracked("dieLabelsSuffix")}get requiresDrawnWaferUpdate(){return this.isTracked("transform")}get requiresRenderHoverUpdate(){return this.isTracked("hoverDie")}queueUpdate(){this.wafermap.$fastController.isConnected&&!this.updateQueued&&(this.updateQueued=!0,void 0===this.wafermap.currentTask?b.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1})):(async()=>{await this.wafermap.currentTask,b.queueUpdate((()=>{this.wafermap.update(),this.untrackAll(),this.updateQueued=!1,this.wafermap.currentTask=void 0}))})())}}class sY{constructor(t){this.wafermap=t,this.invalidGridDimensions=!1,this.invalidDiesTableSchema=!1}getValidity(){return{invalidGridDimensions:this.invalidGridDimensions,invalidDiesTableSchema:this.invalidDiesTableSchema}}isValid(){return Object.values(this.getValidity()).every((t=>!1===t))}validateGridDimensions(){return this.invalidGridDimensions=!1,void 0===this.wafermap.gridMinX&&void 0===this.wafermap.gridMaxX&&void 0===this.wafermap.gridMinY&&void 0===this.wafermap.gridMaxY?this.invalidGridDimensions=!1:("number"!=typeof this.wafermap.gridMinX||"number"!=typeof this.wafermap.gridMaxX||"number"!=typeof this.wafermap.gridMinY||"number"!=typeof this.wafermap.gridMaxY||this.wafermap.gridMaxX<this.wafermap.gridMinX||this.wafermap.gridMaxY<this.wafermap.gridMinY)&&(this.invalidGridDimensions=!0),!this.invalidGridDimensions}validateDiesTableSchema(){if(this.invalidDiesTableSchema=!1,void 0===this.wafermap.diesTable)this.invalidDiesTableSchema=!1
|
|
14625
14628
|
else{const t=this.wafermap.diesTable.schema.fields,e=t.find((t=>"colIndex"===t.name)),n=t.find((t=>"rowIndex"===t.name)),i=t.find((t=>"value"===t.name))
|
|
14626
|
-
e&&n&&i
|
|
14629
|
+
e&&n&&i&&$q.isInt(e.type)&&32===e.type.bitWidth&&$q.isInt(n.type)&&32===n.type.bitWidth&&$q.isFloat(i.type)&&i.type.precision===JH.DOUBLE||(this.invalidDiesTableSchema=!0)}return!this.invalidDiesTableSchema}}
|
|
14627
14630
|
/**
|
|
14628
14631
|
* @license
|
|
14629
14632
|
* Copyright 2019 Google LLC
|
|
14630
14633
|
* SPDX-License-Identifier: Apache-2.0
|
|
14631
|
-
*/const
|
|
14632
|
-
return
|
|
14634
|
+
*/const oY=Symbol("Comlink.proxy"),rY=Symbol("Comlink.endpoint"),aY=Symbol("Comlink.releaseProxy"),lY=Symbol("Comlink.finalizer"),cY=Symbol("Comlink.thrown"),dY=t=>"object"==typeof t&&null!==t||"function"==typeof t,hY=new Map([["proxy",{canHandle:t=>dY(t)&&t[oY],serialize(t){const{port1:e,port2:n}=new MessageChannel
|
|
14635
|
+
return uY(t,e),[n,[n]]},deserialize:t=>(t.start(),fY(t))}],["throw",{canHandle:t=>dY(t)&&cY in t,serialize({value:t}){let e
|
|
14633
14636
|
return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value)
|
|
14634
14637
|
throw t.value}}]])
|
|
14635
|
-
function
|
|
14638
|
+
function uY(t,e=globalThis,n=["*"]){e.addEventListener("message",(function i(s){if(!s||!s.data)return
|
|
14636
14639
|
if(!function(t,e){for(const n of t){if(e===n||"*"===n)return!0
|
|
14637
14640
|
if(n instanceof RegExp&&n.test(e))return!0}return!1}(n,s.origin))return void console.warn(`Invalid origin '${s.origin}' for comlink proxy`)
|
|
14638
|
-
const{id:o,type:r,path:a}=Object.assign({path:[]},s.data),l=(s.data.argumentList||[]).map(
|
|
14641
|
+
const{id:o,type:r,path:a}=Object.assign({path:[]},s.data),l=(s.data.argumentList||[]).map(SY)
|
|
14639
14642
|
let c
|
|
14640
14643
|
try{const e=a.slice(0,-1).reduce(((t,e)=>t[e]),t),n=a.reduce(((t,e)=>t[e]),t)
|
|
14641
14644
|
switch(r){case"GET":c=n
|
|
14642
14645
|
break
|
|
14643
|
-
case"SET":e[a.slice(-1)[0]]=
|
|
14646
|
+
case"SET":e[a.slice(-1)[0]]=SY(s.data.value),c=!0
|
|
14644
14647
|
break
|
|
14645
14648
|
case"APPLY":c=n.apply(e,l)
|
|
14646
14649
|
break
|
|
14647
|
-
case"CONSTRUCT":c=function(t){return Object.assign(t,{[
|
|
14650
|
+
case"CONSTRUCT":c=function(t){return Object.assign(t,{[oY]:!0})}(new n(...l))
|
|
14648
14651
|
break
|
|
14649
14652
|
case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel
|
|
14650
|
-
|
|
14653
|
+
uY(t,n),c=CY(e,[e])}break
|
|
14651
14654
|
case"RELEASE":c=void 0
|
|
14652
14655
|
break
|
|
14653
|
-
default:return}}catch(t){c={value:t,[
|
|
14654
|
-
e.postMessage(Object.assign(Object.assign({},s),{id:o}),a),"RELEASE"===r&&(e.removeEventListener("message",i),
|
|
14655
|
-
e.postMessage(Object.assign(Object.assign({},n),{id:o}),i)}))})),e.start&&e.start()}function
|
|
14656
|
-
|
|
14657
|
-
function
|
|
14658
|
-
const s=new Proxy(n,{get(n,o){if(
|
|
14656
|
+
default:return}}catch(t){c={value:t,[cY]:0}}Promise.resolve(c).catch((t=>({value:t,[cY]:0}))).then((n=>{const[s,a]=kY(n)
|
|
14657
|
+
e.postMessage(Object.assign(Object.assign({},s),{id:o}),a),"RELEASE"===r&&(e.removeEventListener("message",i),pY(e),lY in t&&"function"==typeof t[lY]&&t[lY]())})).catch((t=>{const[n,i]=kY({value:new TypeError("Unserializable return value"),[cY]:0})
|
|
14658
|
+
e.postMessage(Object.assign(Object.assign({},n),{id:o}),i)}))})),e.start&&e.start()}function pY(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function fY(t,e){return yY(t,[],e)}function mY(t){if(t)throw new Error("Proxy has been released and is not useable")}function gY(t){return _Y(t,{type:"RELEASE"}).then((()=>{pY(t)}))}const vY=new WeakMap,bY="FinalizationRegistry"in globalThis&&new FinalizationRegistry((t=>{const e=(vY.get(t)||0)-1
|
|
14659
|
+
vY.set(t,e),0===e&&gY(t)}))
|
|
14660
|
+
function yY(t,e=[],n=function(){}){let i=!1
|
|
14661
|
+
const s=new Proxy(n,{get(n,o){if(mY(i),o===aY)return()=>{!function(t){bY&&bY.unregister(t)}(s),gY(t),i=!0}
|
|
14659
14662
|
if("then"===o){if(0===e.length)return{then:()=>s}
|
|
14660
|
-
const n=
|
|
14661
|
-
return n.then.bind(n)}return
|
|
14662
|
-
const[r,a]=
|
|
14663
|
-
return
|
|
14663
|
+
const n=_Y(t,{type:"GET",path:e.map((t=>t.toString()))}).then(SY)
|
|
14664
|
+
return n.then.bind(n)}return yY(t,[...e,o])},set(n,s,o){mY(i)
|
|
14665
|
+
const[r,a]=kY(o)
|
|
14666
|
+
return _Y(t,{type:"SET",path:[...e,s].map((t=>t.toString())),value:r},a).then(SY)},apply(n,s,o){mY(i)
|
|
14664
14667
|
const r=e[e.length-1]
|
|
14665
|
-
if(r===
|
|
14666
|
-
if("bind"===r)return
|
|
14667
|
-
const[a,l]=
|
|
14668
|
-
return
|
|
14669
|
-
const[o,r]=
|
|
14670
|
-
return
|
|
14671
|
-
return function(t,e){const n=(
|
|
14672
|
-
|
|
14668
|
+
if(r===rY)return _Y(t,{type:"ENDPOINT"}).then(SY)
|
|
14669
|
+
if("bind"===r)return yY(t,e.slice(0,-1))
|
|
14670
|
+
const[a,l]=wY(o)
|
|
14671
|
+
return _Y(t,{type:"APPLY",path:e.map((t=>t.toString())),argumentList:a},l).then(SY)},construct(n,s){mY(i)
|
|
14672
|
+
const[o,r]=wY(s)
|
|
14673
|
+
return _Y(t,{type:"CONSTRUCT",path:e.map((t=>t.toString())),argumentList:o},r).then(SY)}})
|
|
14674
|
+
return function(t,e){const n=(vY.get(e)||0)+1
|
|
14675
|
+
vY.set(e,n),bY&&bY.register(t,e,t)}(s,t),s}function wY(t){const e=t.map(kY)
|
|
14673
14676
|
return[e.map((t=>t[0])),(n=e.map((t=>t[1])),Array.prototype.concat.apply([],n))]
|
|
14674
|
-
var n}const
|
|
14675
|
-
function
|
|
14676
|
-
return[{type:"HANDLER",name:e,value:i},s]}return[{type:"RAW",value:t},
|
|
14677
|
-
case"RAW":return t.value}}function
|
|
14678
|
-
t.addEventListener("message",(function e(n){n.data&&n.data.id&&n.data.id===s&&(t.removeEventListener("message",e),i(n.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:s},e),n)}))}let
|
|
14679
|
-
class _Y{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===SY){const t=new Blob(['var MatrixRenderer = (function (exports) {\n \'use strict\';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol("Comlink.proxy");\n const createEndpoint = Symbol("Comlink.endpoint");\n const releaseProxy = Symbol("Comlink.releaseProxy");\n const finalizer = Symbol("Comlink.finalizer");\n const throwMarker = Symbol("Comlink.thrown");\n const isObject = (val) => (typeof val === "object" && val !== null) || typeof val === "function";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n ["proxy", proxyTransferHandler],\n ["throw", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === "*") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = ["*"]) {\n ep.addEventListener("message", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin \'${ev.origin}\' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case "GET" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case "SET" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case "APPLY" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case "CONSTRUCT" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case "ENDPOINT" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case "RELEASE" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === "RELEASE" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener("message", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === "function") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError("Unserializable return value"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === "MessagePort";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n return createProxy(ep, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error("Proxy has been released and is not useable");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: "RELEASE" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = "FinalizationRegistry" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === "then") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: "GET" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: "SET" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: "ENDPOINT" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === "bind") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "APPLY" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "CONSTRUCT" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: "HANDLER" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: "RAW" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case "HANDLER" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case "RAW" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener("message", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener("message", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join("-");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink\'s `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = \'rgba(218,223,236,1)\';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: \'\',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext(\'2d\');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = \'#ffffff\';\n this.context.textAlign = \'center\';\n this.context.lineCap = \'butt\';\n const approximateTextHeight = this.context.measureText(\'M\');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || \'NaN\'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n'],{type:"text/javascript"})
|
|
14680
|
-
|
|
14677
|
+
var n}const xY=new WeakMap
|
|
14678
|
+
function CY(t,e){return xY.set(t,e),t}function kY(t){for(const[e,n]of hY)if(n.canHandle(t)){const[i,s]=n.serialize(t)
|
|
14679
|
+
return[{type:"HANDLER",name:e,value:i},s]}return[{type:"RAW",value:t},xY.get(t)||[]]}function SY(t){switch(t.type){case"HANDLER":return hY.get(t.name).deserialize(t.value)
|
|
14680
|
+
case"RAW":return t.value}}function _Y(t,e,n){return new Promise((i=>{const s=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-")
|
|
14681
|
+
t.addEventListener("message",(function e(n){n.data&&n.data.id&&n.data.id===s&&(t.removeEventListener("message",e),i(n.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:s},e),n)}))}let IY
|
|
14682
|
+
class MY{constructor(t){this.wafermap=t,this.minDieDim=100}async setupWafer(t){if(void 0===this.matrixRenderer){const{matrixRenderer:t}=await(async()=>{if(void 0===IY){const t=new Blob(['var MatrixRenderer = (function (exports) {\n \'use strict\';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol("Comlink.proxy");\n const createEndpoint = Symbol("Comlink.endpoint");\n const releaseProxy = Symbol("Comlink.releaseProxy");\n const finalizer = Symbol("Comlink.finalizer");\n const throwMarker = Symbol("Comlink.thrown");\n const isObject = (val) => (typeof val === "object" && val !== null) || typeof val === "function";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n ["proxy", proxyTransferHandler],\n ["throw", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === "*") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = ["*"]) {\n ep.addEventListener("message", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin \'${ev.origin}\' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case "GET" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case "SET" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case "APPLY" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case "CONSTRUCT" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case "ENDPOINT" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case "RELEASE" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === "RELEASE" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener("message", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === "function") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError("Unserializable return value"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === "MessagePort";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n return createProxy(ep, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error("Proxy has been released and is not useable");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: "RELEASE" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = "FinalizationRegistry" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === "then") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: "GET" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: "SET" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: "ENDPOINT" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === "bind") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "APPLY" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: "CONSTRUCT" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: "HANDLER" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: "RAW" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case "HANDLER" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case "RAW" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener("message", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener("message", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join("-");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink\'s `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = \'rgba(218,223,236,1)\';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: \'\',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext(\'2d\');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = \'#ffffff\';\n this.context.textAlign = \'center\';\n this.context.lineCap = \'butt\';\n const approximateTextHeight = this.context.measureText(\'M\');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || \'NaN\'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n'],{type:"text/javascript"})
|
|
14683
|
+
IY=URL.createObjectURL(t)}const t=new Worker(IY),e=fY(t)
|
|
14681
14684
|
return{matrixRenderer:await new e,terminate:()=>t.terminate()}})()
|
|
14682
14685
|
this.matrixRenderer=t
|
|
14683
14686
|
const e=this.wafermap.workerCanvas.transferControlToOffscreen()
|
|
14684
|
-
await this.matrixRenderer.setCanvas(
|
|
14685
|
-
await this.matrixRenderer.setTransformConfig({transform:t.transform,topLeftCanvasCorner:{x:e[0]-t.dieDimensions.width,y:e[1]-t.dieDimensions.height},bottomRightCanvasCorner:{x:n[0],y:n[1]}}),await this.matrixRenderer.drawWafer(),!t.dieLabelsHidden&&t.dieDimensions&&t.dieDimensions.width*t.dieDimensions.height*(t.transform.k||1)>=this.minDieDim&&await this.matrixRenderer.drawText()}renderHover(){void 0!==this.wafermap.computations.dieDimensions&&void 0!==this.wafermap.transform&&(this.wafermap.hoverWidth=this.wafermap.computations.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.computations.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?ZK
|
|
14687
|
+
await this.matrixRenderer.setCanvas(CY(e,[e]))}await this.matrixRenderer.setCanvasDimensions(t.canvasDimensions),await this.matrixRenderer.setRenderConfig(t.renderConfig),await this.matrixRenderer.setMatrixData(t.columnIndices,t.rowIndices,t.values)}async drawWafer(t){const e=t.transform.invert([0,0]),n=t.transform.invert([t.canvasDimensions.width,t.canvasDimensions.height])
|
|
14688
|
+
await this.matrixRenderer.setTransformConfig({transform:t.transform,topLeftCanvasCorner:{x:e[0]-t.dieDimensions.width,y:e[1]-t.dieDimensions.height},bottomRightCanvasCorner:{x:n[0],y:n[1]}}),await this.matrixRenderer.drawWafer(),!t.dieLabelsHidden&&t.dieDimensions&&t.dieDimensions.width*t.dieDimensions.height*(t.transform.k||1)>=this.minDieDim&&await this.matrixRenderer.drawText()}renderHover(){void 0!==this.wafermap.computations.dieDimensions&&void 0!==this.wafermap.transform&&(this.wafermap.hoverWidth=this.wafermap.computations.dieDimensions.width*this.wafermap.transform.k,this.wafermap.hoverHeight=this.wafermap.computations.dieDimensions.height*this.wafermap.transform.k,this.wafermap.hoverOpacity=void 0===this.wafermap.hoverDie?KK:ZK,this.wafermap.hoverTransform=this.calculateHoverTransform())}calculateHoverTransform(){if(void 0!==this.wafermap.hoverDie){const t=this.wafermap.computations.horizontalScale(this.wafermap.hoverDie.x)
|
|
14686
14689
|
if(void 0===t)return""
|
|
14687
14690
|
const e=this.wafermap.computations.verticalScale(this.wafermap.hoverDie.y)
|
|
14688
14691
|
if(void 0===e)return""
|
|
14689
14692
|
const n=this.wafermap.transform.apply([t+this.wafermap.computations.margin.left,e+this.wafermap.computations.margin.top])
|
|
14690
|
-
return`translate(${n[0]}, ${n[1]})`}return""}}class
|
|
14693
|
+
return`translate(${n[0]}, ${n[1]})`}return""}}let $Y=class{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(this.wafermap.isExperimentalUpdate())return
|
|
14694
|
+
const e={x:t.offsetX,y:t.offsetY}
|
|
14695
|
+
if(!this.hoversOverDie(e))return void(this.wafermap.hoverDie=void 0)
|
|
14696
|
+
const n=this.wafermap.transform.invert([e.x,e.y]),i=this.calculateDieCoordinates({x:n[0],y:n[1]})
|
|
14697
|
+
this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(!this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===qK||e===WK?Math.floor:Math.ceil,i=e===qK||e===jK?Math.floor:Math.ceil
|
|
14698
|
+
return{x:n(this.wafermap.dataManager.invertedHorizontalScale(t.x-this.wafermap.dataManager.margin.left)),y:i(this.wafermap.dataManager.invertedVerticalScale(t.y-this.wafermap.dataManager.margin.top))}}}hoversOverDie(t){const e=this.wafermap.canvasContext.getImageData(t.x,t.y,1,1).data
|
|
14699
|
+
let n=0
|
|
14700
|
+
for(const t of e)n+=t
|
|
14701
|
+
return n>0}}
|
|
14702
|
+
class EY{constructor(t){this.wafermap=t,this.onMouseMove=t=>{if(!this.wafermap.isExperimentalUpdate())return
|
|
14691
14703
|
const e=this.wafermap.transform.invert([t.offsetX,t.offsetY]),n=this.calculateDieCoordinates({x:e[0],y:e[1]})
|
|
14692
14704
|
if(void 0===n||!this.isDieInGrid(n.x,n.y))return void(this.wafermap.hoverDie=void 0)
|
|
14693
14705
|
const i=this.wafermap.diesTable.getChild("colIndex").toArray(),s=this.wafermap.diesTable.getChild("rowIndex").toArray()
|
|
14694
14706
|
for(let t=0;t<i.length;t++)if(i[t]===n.x&&s[t]===n.y)return void(this.wafermap.hoverDie={index:t,x:n.x,y:n.y})
|
|
14695
|
-
this.wafermap.hoverDie=void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===
|
|
14696
|
-
return{x:n(this.wafermap.computations.horizontalScale.invert(t.x-this.wafermap.computations.margin.left)),y:i(this.wafermap.computations.verticalScale.invert(t.y-this.wafermap.computations.margin.top))}}}isDieInGrid(t,e){return t>=this.wafermap.computations.gridMinX&&t<=this.wafermap.computations.gridMaxX&&e>=this.wafermap.computations.gridMinY&&e<=this.wafermap.computations.gridMaxY}}class
|
|
14707
|
+
this.wafermap.hoverDie=void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===qK||e===WK?Math.floor:Math.ceil,i=e===qK||e===jK?Math.ceil:Math.floor
|
|
14708
|
+
return{x:n(this.wafermap.computations.horizontalScale.invert(t.x-this.wafermap.computations.margin.left)),y:i(this.wafermap.computations.verticalScale.invert(t.y-this.wafermap.computations.margin.top))}}}isDieInGrid(t,e){return t>=this.wafermap.computations.gridMinX&&t<=this.wafermap.computations.gridMaxX&&e>=this.wafermap.computations.gridMinY&&e<=this.wafermap.computations.gridMaxY}}class DY{constructor(t){this.wafermap=t,this.scaleExtent=[1,100],this.minExtentPoint=[0,0],this.onWheelMove=t=>{t.preventDefault()},this.wafermapNotifier=x.getNotifier(this.wafermap),this.wafermapNotifier.subscribe(this,"canvasWidth"),this.wafermapNotifier.subscribe(this,"canvasHeight")}connect(){this.createZoomBehavior(),this.wafermap.addEventListener("wheel",this.onWheelMove,{passive:!1})}disconnect(){vH().on("zoom",null)(KP(this.wafermap)),this.wafermap.removeEventListener("wheel",this.onWheelMove)}handleChange(t,e){t!==this.wafermap||"canvasWidth"!==e&&"canvasHeight"!==e||this.createZoomBehavior()}createZoomBehavior(){vH().scaleExtent(this.scaleExtent).translateExtent([this.minExtentPoint,[this.wafermap.canvasWidth,this.wafermap.canvasHeight]]).on("zoom",(t=>{this.wafermap.transform=t.transform}))(KP(this.wafermap))}}class AY{get horizontalScale(){return this._horizontalScale}get verticalScale(){return this._verticalScale}get containerDimensions(){return this._containerDimensions}get dieDimensions(){return this._dieDimensions}get margin(){return this._margin}get verticalCoefficient(){return this._verticalCoefficient}get horizontalCoefficient(){return this._horizontalCoefficient}get horizontalConstant(){return this._horizontalConstant}get verticalConstant(){return this._verticalConstant}get gridMinX(){return this._gridMinX}get gridMaxX(){return this._gridMaxX}get gridMinY(){return this._gridMinY}get gridMaxY(){return this._gridMaxY}get labelsFontSize(){return this._labelsFontSize}get colorScale(){return this._colorScale}constructor(t){this.wafermap=t,this.baseMarginPercentage=.04,this.fontSizeFactor=.8,this.colorScaleResolution=10}componentResizeUpdate(){const t={width:this.wafermap.canvasWidth,height:this.wafermap.canvasHeight},e=Math.min(t.width,t.height),n={top:(t.height-e)/2,right:(t.width-e)/2,bottom:(t.height-e)/2,left:(t.width-e)/2},i={top:e*this.baseMarginPercentage,right:e*this.baseMarginPercentage,bottom:e*this.baseMarginPercentage,left:e*this.baseMarginPercentage}
|
|
14697
14709
|
this._margin=this.calculateMarginAddition(i,n),this._containerDimensions=this.calculateContainerDimensions(t,this.margin),this.inputDataUpdate()}inputDataUpdate(){if(void 0===this._containerDimensions)return void this.componentResizeUpdate()
|
|
14698
14710
|
const t=Math.min(this._containerDimensions.width,this._containerDimensions.height)
|
|
14699
14711
|
this.gridDimensionsValidAndDefined()?this.setGridDimensionsFromBoundingBox():this.setGridDimensionsFromDies()
|
|
@@ -14701,32 +14713,24 @@ const e=this.wafermap.originLocation
|
|
|
14701
14713
|
this._horizontalScale=this.createHorizontalScale(e,t),this._verticalScale=this.createVerticalScale(e,t),this._horizontalCoefficient=this._horizontalScale(1)-this._horizontalScale(0),this._verticalCoefficient=this._verticalScale(1)-this._verticalScale(0),this._horizontalConstant=this._horizontalScale(0),this._verticalConstant=this._verticalScale(0),this._dieDimensions={width:Math.abs(this._horizontalScale(0)-this._horizontalScale(1)),height:Math.abs(this._verticalScale(0)-this._verticalScale(1))},this.colorAndTextUpdate()}colorAndTextUpdate(){void 0!==this._dieDimensions?(this._labelsFontSize=this.calculateLabelsFontSize(this._dieDimensions,this.wafermap.maxCharacters),this._colorScale=this.calculateColorScale()):this.inputDataUpdate()}gridDimensionsValidAndDefined(){return!this.wafermap.validity.invalidGridDimensions&&"number"==typeof this.wafermap.gridMinX&&"number"==typeof this.wafermap.gridMinY&&"number"==typeof this.wafermap.gridMaxX&&"number"==typeof this.wafermap.gridMinX}setGridDimensionsFromBoundingBox(){this._gridMinX=this.wafermap.gridMinX,this._gridMinY=this.wafermap.gridMinY,this._gridMaxX=this.wafermap.gridMaxX,this._gridMaxY=this.wafermap.gridMaxY}setGridDimensionsFromDies(){if(void 0===this.wafermap.diesTable)return
|
|
14702
14714
|
const t=this.wafermap.diesTable.getChild("colIndex").toArray(),e=this.wafermap.diesTable.getChild("rowIndex").toArray(),n={x:t[0],y:e[0]},i={x:t[0],y:e[0]}
|
|
14703
14715
|
for(let s=0;s<t.length;s++)t[s]<n.x&&(n.x=t[s]),t[s]>i.x&&(i.x=t[s]),e[s]<n.y&&(n.y=e[s]),e[s]>i.y&&(i.y=e[s])
|
|
14704
|
-
this._gridMinX=n.x,this._gridMinY=n.y,this._gridMaxX=i.x,this._gridMaxY=i.y}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e){const n=
|
|
14705
|
-
return t===
|
|
14706
|
-
return t===
|
|
14716
|
+
this._gridMinX=n.x,this._gridMinY=n.y,this._gridMaxX=i.x,this._gridMaxY=i.y}calculateContainerDimensions(t,e){return{width:t.width-e.left-e.right,height:t.height-e.top-e.bottom}}createHorizontalScale(t,e){const n=HK()
|
|
14717
|
+
return t===qK||t===WK?n.domain([this._gridMinX,this._gridMaxX+1]).range([0,e]):n.domain([this._gridMinX-1,this._gridMaxX]).range([e,0])}createVerticalScale(t,e){const n=HK()
|
|
14718
|
+
return t===qK||t===jK?n.domain([this._gridMinY-1,this._gridMaxY]).range([e,0]):n.domain([this._gridMinY,this._gridMaxY+1]).range([0,e])}calculateMarginAddition(t,e){return{top:t.top+e.top,right:t.right+e.right,bottom:t.bottom+e.bottom,left:t.left+e.left}}calculateColorScale(){if(this.wafermap.colorScaleMode===YK){const t=this.wafermap.colorScale.values.map((t=>+t)),e=HK().domain(t).range(this.wafermap.colorScale.colors)
|
|
14707
14719
|
let n=t[0],i=t[0]
|
|
14708
14720
|
t.forEach((t=>{t<n&&(n=t),t>i&&(i=t)}))
|
|
14709
|
-
return
|
|
14710
|
-
const e={x:t.offsetX,y:t.offsetY}
|
|
14711
|
-
if(!this.hoversOverDie(e))return void(this.wafermap.hoverDie=void 0)
|
|
14712
|
-
const n=this.wafermap.transform.invert([e.x,e.y]),i=this.calculateDieCoordinates({x:n[0],y:n[1]})
|
|
14713
|
-
this.wafermap.hoverDie=void 0!==i?this.wafermap.dataManager.getWaferMapDie(i):void 0},this.onMouseOut=t=>{this.wafermap.hoverDie=void 0}}connect(){this.wafermap.addEventListener("mousemove",this.onMouseMove),this.wafermap.addEventListener("mouseout",this.onMouseOut)}disconnect(){this.wafermap.removeEventListener("mousemove",this.onMouseMove),this.wafermap.removeEventListener("mouseout",this.onMouseOut)}calculateDieCoordinates(t){if(!this.wafermap.isExperimentalUpdate()){const e=this.wafermap.originLocation,n=e===UK||e===jK?Math.floor:Math.ceil,i=e===UK||e===qK?Math.floor:Math.ceil
|
|
14714
|
-
return{x:n(this.wafermap.dataManager.invertedHorizontalScale(t.x-this.wafermap.dataManager.margin.left)),y:i(this.wafermap.dataManager.invertedVerticalScale(t.y-this.wafermap.dataManager.margin.top))}}}hoversOverDie(t){const e=this.wafermap.canvasContext.getImageData(t.x,t.y,1,1).data
|
|
14715
|
-
let n=0
|
|
14716
|
-
for(const t of e)n+=t
|
|
14717
|
-
return n>0}}(this.asRequiredFieldsWaferMap),this.experimentalHoverHandler=new IY(this.asRequiredFieldsWaferMap),this.zoomHandler=new MY(this.asRequiredFieldsWaferMap),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new nY(this.asRequiredFieldsWaferMap)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.hoverHandler.connect(),this.experimentalHoverHandler.connect(),this.zoomHandler.connect(),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.hoverHandler.disconnect(),this.experimentalHoverHandler.disconnect(),this.zoomHandler.disconnect(),this.resizeObserver.unobserve(this)}async experimentalUpdate(){if(!this.validity.invalidDiesTableSchema){if(this.waferMapUpdateTracker.requiresEventsUpdate){this.waferMapUpdateTracker.requiresComponentResizeUpdate?this.computations.componentResizeUpdate():this.waferMapUpdateTracker.requiresInputDataUpdate?this.computations.inputDataUpdate():this.waferMapUpdateTracker.requiresColorAndTextUpdate&&this.computations.colorAndTextUpdate()
|
|
14721
|
+
return pK(n,i,(i-n)/(t.length*this.colorScaleResolution)).concat(i).map((t=>({color:e(t),value:t})))}return this.wafermap.colorScale.colors.map(((t,e)=>({color:t,value:+this.wafermap.colorScale.values[e]}))).sort(((t,e)=>t.value-e.value))}calculateLabelsFontSize(t,e){return Math.min(t.height,t.width/(.5*Math.max(2,e))*this.fontSizeFactor)}}class TY extends We{constructor(){super(...arguments),this.waferMapUpdateTracker=new iY(this.asRequiredFieldsWaferMap),this.originLocation=qK,this.gridMinX=void 0,this.gridMaxX=void 0,this.gridMinY=void 0,this.gridMaxY=void 0,this.orientation=GK,this.maxCharacters=4,this.dieLabelsHidden=!1,this.dieLabelsSuffix="",this.colorScaleMode=YK,this.computations=new AY(this.asRequiredFieldsWaferMap),this.dataManager=new tY(this.asRequiredFieldsWaferMap),this.workerRenderer=new MY(this.asRequiredFieldsWaferMap),this.renderer=new eY(this.asRequiredFieldsWaferMap),this.renderQueued=!1,this.transform=lH,this.hoverTransform="",this.hoverOpacity=KK,this.hoverWidth=0,this.hoverHeight=0,this.highlightedTags=[],this.dies=[],this.colorScale={colors:[],values:[]},this.hoverHandler=new $Y(this.asRequiredFieldsWaferMap),this.experimentalHoverHandler=new EY(this.asRequiredFieldsWaferMap),this.zoomHandler=new DY(this.asRequiredFieldsWaferMap),this.resizeObserver=this.createResizeObserver(),this.waferMapValidator=new sY(this.asRequiredFieldsWaferMap)}get validity(){return this.waferMapValidator.getValidity()}connectedCallback(){super.connectedCallback(),this.canvasContext=this.canvas.getContext("2d",{willReadFrequently:!0}),this.hoverHandler.connect(),this.experimentalHoverHandler.connect(),this.zoomHandler.connect(),this.resizeObserver.observe(this),this.waferMapUpdateTracker.trackAll()}disconnectedCallback(){super.disconnectedCallback(),this.hoverHandler.disconnect(),this.experimentalHoverHandler.disconnect(),this.zoomHandler.disconnect(),this.resizeObserver.unobserve(this)}async experimentalUpdate(){if(!this.validity.invalidDiesTableSchema){if(this.waferMapUpdateTracker.requiresEventsUpdate){this.waferMapUpdateTracker.requiresComponentResizeUpdate?this.computations.componentResizeUpdate():this.waferMapUpdateTracker.requiresInputDataUpdate?this.computations.inputDataUpdate():this.waferMapUpdateTracker.requiresColorAndTextUpdate&&this.computations.colorAndTextUpdate()
|
|
14718
14722
|
const t=this.createSnapshot()
|
|
14719
14723
|
this.waferMapUpdateTracker.requiresWorkerWaferSetup&&await this.workerRenderer.setupWafer(t),await this.workerRenderer.drawWafer(t)}this.workerRenderer.renderHover()}}update(){this.validate(),this.isExperimentalUpdate()?this.currentTask=this.experimentalUpdate():this.waferMapUpdateTracker.requiresEventsUpdate?this.waferMapUpdateTracker.requiresContainerDimensionsUpdate?(this.dataManager.updateContainerDimensions(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresScalesUpdate?(this.dataManager.updateScales(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate?(this.dataManager.updateLabelsFontSize(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate?(this.dataManager.updateDiesRenderInfo(),this.renderer.updateSortedDiesAndDrawWafer()):this.waferMapUpdateTracker.requiresDrawnWaferUpdate&&this.renderer.drawWafer():this.waferMapUpdateTracker.requiresRenderHoverUpdate&&this.renderer.renderHover()}isExperimentalUpdate(){return void 0!==this.diesTable}async setData(t){Array.isArray(t)?this.dies=t:this.diesTable=t,await b.nextUpdate(),void 0!==this.currentTask&&await this.currentTask}createSnapshot(){const t={width:this.canvasWidth??0,height:this.canvasHeight??0},e={dieDimensions:this.computations.dieDimensions,margin:this.computations.margin,verticalCoefficient:this.computations.verticalCoefficient,horizontalCoefficient:this.computations.horizontalCoefficient,horizontalConstant:this.computations.horizontalConstant,verticalConstant:this.computations.verticalConstant,gridMinX:this.computations.gridMinX,gridMaxX:this.computations.gridMaxX,gridMinY:this.computations.gridMinY,gridMaxY:this.computations.gridMaxY,labelsFontSize:this.computations.labelsFontSize,colorScale:this.computations.colorScale,dieLabelsSuffix:this.dieLabelsSuffix,maxCharacters:this.maxCharacters},n=this.computations.dieDimensions,i=this.transform,s=this.dieLabelsHidden
|
|
14720
14724
|
if(void 0===this.diesTable)return{canvasDimensions:t,renderConfig:e,dieDimensions:n,transform:i,dieLabelsHidden:s,columnIndices:Int32Array.from([]),rowIndices:Int32Array.from([]),values:Float64Array.from([])}
|
|
14721
14725
|
return{canvasDimensions:t,renderConfig:e,columnIndices:this.diesTable.getChild("colIndex").toArray(),rowIndices:this.diesTable.getChild("rowIndex").toArray(),values:this.diesTable.getChild("value").toArray(),dieDimensions:n,transform:i,dieLabelsHidden:s}}validate(){this.waferMapValidator.validateGridDimensions(),this.waferMapValidator.validateDiesTableSchema()}createResizeObserver(){return new ResizeObserver((t=>{const e=t[0]
|
|
14722
14726
|
if(void 0===e)return
|
|
14723
14727
|
const{height:n,width:i}=e.contentRect
|
|
14724
|
-
this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}diesTableChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}get asRequiredFieldsWaferMap(){return this}}
|
|
14725
|
-
return
|
|
14726
|
-
const
|
|
14727
|
-
_i.getOrCreate().withPrefix("nimble").register(
|
|
14728
|
-
const
|
|
14729
|
-
${
|
|
14728
|
+
this.canvas.width=i,this.canvas.height=n,this.canvasWidth=i,this.canvasHeight=n}))}originLocationChanged(){this.waferMapUpdateTracker.track("originLocation"),this.waferMapUpdateTracker.queueUpdate()}gridMinXChanged(){this.waferMapUpdateTracker.track("gridMinX"),this.waferMapUpdateTracker.queueUpdate()}gridMaxXChanged(){this.waferMapUpdateTracker.track("gridMaxX"),this.waferMapUpdateTracker.queueUpdate()}gridMinYChanged(){this.waferMapUpdateTracker.track("gridMinY"),this.waferMapUpdateTracker.queueUpdate()}gridMaxYChanged(){this.waferMapUpdateTracker.track("gridMaxY"),this.waferMapUpdateTracker.queueUpdate()}maxCharactersChanged(){this.waferMapUpdateTracker.track("maxCharacters"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsHiddenChanged(){this.waferMapUpdateTracker.track("dieLabelsHidden"),this.waferMapUpdateTracker.queueUpdate()}dieLabelsSuffixChanged(){this.waferMapUpdateTracker.track("dieLabelsSuffix"),this.waferMapUpdateTracker.queueUpdate()}colorScaleModeChanged(){this.waferMapUpdateTracker.track("colorScaleMode"),this.waferMapUpdateTracker.queueUpdate()}highlightedTagsChanged(){this.waferMapUpdateTracker.track("highlightedTags"),this.waferMapUpdateTracker.queueUpdate()}diesChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}diesTableChanged(){this.waferMapUpdateTracker.track("dies"),this.waferMapUpdateTracker.queueUpdate()}colorScaleChanged(){this.waferMapUpdateTracker.track("colorScale"),this.waferMapUpdateTracker.queueUpdate()}transformChanged(){this.waferMapUpdateTracker.track("transform"),this.waferMapUpdateTracker.queueUpdate()}canvasWidthChanged(){this.waferMapUpdateTracker.track("canvasWidth"),this.waferMapUpdateTracker.queueUpdate()}canvasHeightChanged(){this.waferMapUpdateTracker.track("canvasHeight"),this.waferMapUpdateTracker.queueUpdate()}hoverDieChanged(){this.$emit("die-hover",{currentDie:this.hoverDie}),this.waferMapUpdateTracker.track("hoverDie"),this.waferMapUpdateTracker.queueUpdate()}get asRequiredFieldsWaferMap(){return this}}TY.Arrow={tableFromIPC:function t(e){const n=NZ.from(e)
|
|
14729
|
+
return SH(n)?n.then((e=>t(e))):n.isAsync()?n.readAll().then((t=>new YG(t))):new YG(n.readAll())}},t([ft({attribute:"origin-location"})],TY.prototype,"originLocation",void 0),t([ft({attribute:"grid-min-x",converter:ut})],TY.prototype,"gridMinX",void 0),t([ft({attribute:"grid-max-x",converter:ut})],TY.prototype,"gridMaxX",void 0),t([ft({attribute:"grid-min-y",converter:ut})],TY.prototype,"gridMinY",void 0),t([ft({attribute:"grid-max-y",converter:ut})],TY.prototype,"gridMaxY",void 0),t([ft],TY.prototype,"orientation",void 0),t([ft({attribute:"max-characters",converter:ut})],TY.prototype,"maxCharacters",void 0),t([ft({attribute:"die-labels-hidden",mode:"boolean"})],TY.prototype,"dieLabelsHidden",void 0),t([ft({attribute:"die-labels-suffix"})],TY.prototype,"dieLabelsSuffix",void 0),t([ft({attribute:"color-scale-mode"})],TY.prototype,"colorScaleMode",void 0),t([C],TY.prototype,"renderer",void 0),t([C],TY.prototype,"canvasWidth",void 0),t([C],TY.prototype,"canvasHeight",void 0),t([C],TY.prototype,"transform",void 0),t([C],TY.prototype,"hoverTransform",void 0),t([C],TY.prototype,"hoverOpacity",void 0),t([C],TY.prototype,"hoverWidth",void 0),t([C],TY.prototype,"hoverHeight",void 0),t([C],TY.prototype,"hoverDie",void 0),t([C],TY.prototype,"highlightedTags",void 0),t([C],TY.prototype,"dies",void 0),t([C],TY.prototype,"diesTable",void 0),t([C],TY.prototype,"colorScale",void 0)
|
|
14730
|
+
const OY=TY.compose({baseName:"wafer-map",template:YZ,styles:XZ})
|
|
14731
|
+
_i.getOrCreate().withPrefix("nimble").register(OY())
|
|
14732
|
+
const RY=Mt`
|
|
14733
|
+
${FY="inline-block",`${Bs(FY)}:host{box-sizing:border-box;}*{box-sizing:border-box;}:host::before,:host::after,::before,::after{box-sizing:border-box;}`}
|
|
14730
14734
|
|
|
14731
14735
|
:host {
|
|
14732
14736
|
border: 2px solid ${hl};
|
|
@@ -14749,8 +14753,8 @@ const AY=Mt`
|
|
|
14749
14753
|
color: ${Hc};
|
|
14750
14754
|
}
|
|
14751
14755
|
`
|
|
14752
|
-
var
|
|
14753
|
-
const
|
|
14754
|
-
const
|
|
14755
|
-
_i.getOrCreate().withPrefix("spright").register(
|
|
14756
|
+
var FY
|
|
14757
|
+
const NY=Q`<slot></slot>`
|
|
14758
|
+
const LY=class extends We{}.compose({baseName:"rectangle",template:NY,styles:RY})
|
|
14759
|
+
_i.getOrCreate().withPrefix("spright").register(LY())}()
|
|
14756
14760
|
//# sourceMappingURL=all-components-bundle.min.js.map
|