@milaboratories/pl-model-common 1.16.2 → 1.16.4

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.
@@ -94,6 +94,12 @@ export declare function isDataInfo<Blob>(value: unknown): value is DataInfo<Blob
94
94
  * @returns A new DataInfo object with transformed blob references
95
95
  */
96
96
  export declare function mapDataInfo<B1, B2>(dataInfo: DataInfo<B1>, mapFn: (blob: B1) => B2): DataInfo<B2>;
97
+ /**
98
+ * @param dataInfo - The source DataInfo object
99
+ * @param cb - Callback, function that have access to every blob to visit them all
100
+ * @returns Nothing
101
+ */
102
+ export declare function visitDataInfo<B>(dataInfo: DataInfo<B>, cb: (blob: B) => void): void;
97
103
  /**
98
104
  * Represents a single key-value entry in a column's explicit data structure.
99
105
  * Used when directly instantiating PColumns with explicit data.
@@ -1 +1 @@
1
- {"version":3,"file":"data_info.d.ts","sourceRoot":"","sources":["../../../src/drivers/pframe/data_info.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,wBAAwB;IACxB,GAAG,EAAE,UAAU,CAAC;IAEhB,oCAAoC;IACpC,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IAEb,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACpC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,CAAC,IAAI,IAAI;IAC1C,0DA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E,EAAE,EACvC,eAAe,EAAE,eAAe,CAAC,EAAE,CAAC,EACpC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,GACtB,eAAe,CAAC,EAAE,CAAC,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -19,6 +19,10 @@ export declare class PFrameError extends Error {
19
19
  name: string;
20
20
  }
21
21
  export declare function isPFrameError(error: unknown): error is PFrameError;
22
+ export declare class PFrameDriverError extends PFrameError {
23
+ name: string;
24
+ }
25
+ export declare function isPFrameDriverError(error: unknown): error is PFrameDriverError;
22
26
  export declare function ensureError(value: unknown): Error;
23
27
  export type SerializedError = {
24
28
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACnC,IAAI,SAAgB;CACrB;AAED;;GAEG;AACH,qBAAa,OAAQ,SAAQ,KAAK;IAChC,IAAI,SAAa;CAClB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,GAAG;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,CAEpF;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAMrD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,qBAAa,WAAY,SAAQ,KAAK;IACpC,IAAI,SAAiB;CACtB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE;AAmBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAMjD;AAID,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EA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ACV,CAAC;AAEF,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAK3D;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,eAAe,CAAC,CAK9F;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAKhG;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAOnE;AAED,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAOhG;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,EAAE,eAAe,CAAC,CAGxF;AAED,wBAAsB,qBAAqB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAGrH"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var se=Object.defineProperty;var ae=(e,n,t)=>n in e?se(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var l=(e,n,t)=>ae(e,typeof n!="symbol"?n+"":n,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("zod"),g=require("canonicalize");function ue(e){if(e.code!==void 0)return{code:e.code,sdkVersion:e.sdkVersion,featureFlags:e.featureFlags}}function y(e){if(e!==void 0)return typeof e=="string"?{__renderLambda:!0,handle:e,retentive:!1}:e}function ce(e){if(e.v3!==void 0){const{initialArgs:n,initialUiState:t,inputsValid:r,outputs:o,renderingMode:i,sdkVersion:a,featureFlags:s,sections:u,title:c,enrichmentTargets:f}=e.v3,{code:ie}=e;return{initialArgs:n,initialUiState:t,inputsValid:r,outputs:o,renderingMode:i,sdkVersion:a,featureFlags:s,sections:u,title:c,code:ie,enrichmentTargets:f}}else if(e.inputsValid!==void 0){const{sdkVersion:n,renderingMode:t,outputs:r,inputsValid:o,sections:i,initialArgs:a,code:s}=e,u=Object.keys(e);if(n===void 0||t===void 0||r===void 0||o===void 0||i===void 0||a===void 0)throw new Error(`Malformed config v2. SDK version ${n}; Fields = ${u.join(", ")}`);return{sdkVersion:n,renderingMode:t,initialArgs:a,outputs:Object.fromEntries(Object.entries(r).map(([c,f])=>[c,y(f)])),inputsValid:y(o),sections:y(i),initialUiState:void 0,code:s}}else if(e.renderingMode!==void 0){const{sdkVersion:n,canRun:t,renderingMode:r,outputs:o,sections:i,initialArgs:a,code:s}=e,u=Object.keys(e);if(r===void 0||o===void 0||t===void 0||i===void 0||a===void 0)throw new Error(`Malformed config v1. SDK version ${n}; Fields = ${u.join(", ")}`);return{sdkVersion:n??"unknown",renderingMode:r,initialArgs:a,outputs:Object.fromEntries(Object.entries(o).map(([c,f])=>[c,y(f)])),inputsValid:y(t),sections:y(i),initialUiState:void 0,code:s}}else{const{sdkVersion:n}=e,t=Object.keys(e);throw new Error(`Config format not supported: SDK = ${n}; Fields = ${t.join(", ")}`)}}const fe=m.z.object({from:m.z.number(),to:m.z.number()});function de(e,n){if(!(e==null||n==null))return{from:e,to:n}}function le(e,n){if(e.from<0||e.to<0||e.from>=e.to)throw new Error(`${n}: invalid bytes range: ${e}`)}function me(e){return e!==void 0&&e.startsWith("log+live://log/")}function k(e){throw new Error("Unexpected object: "+e)}const R="upload://upload/",$="index://index/";function J(e){return e.startsWith(R)}function j(e){return e.startsWith($)}function D(e){if(j(e)){const n=e.slice($.length);return JSON.parse(decodeURIComponent(n)).path}else if(J(e)){const n=e.slice(R.length);return JSON.parse(decodeURIComponent(n)).localPath}k(e)}function pe(e){return e.replace(/^.*[\\/]/,"")}function ye(e){return pe(D(e))}function he(e){if(!e||typeof e!="object")return!1;const n=e;if(!("type"in n))return!1;switch(n.type){case"Json":return typeof n.keyLength=="number"&&n.data!==void 0&&typeof n.data=="object";case"JsonPartitioned":return typeof n.partitionKeyLength=="number"&&n.parts!==void 0&&typeof n.parts=="object";case"BinaryPartitioned":return typeof n.partitionKeyLength=="number"&&n.parts!==void 0&&typeof n.parts=="object";default:return!1}}function ge(e,n){if(e!==void 0)switch(e.type){case"Json":return e;case"JsonPartitioned":{const t={};for(const[r,o]of Object.entries(e.parts))t[r]=n(o);return{...e,parts:t}}case"BinaryPartitioned":{const t={};for(const[r,o]of Object.entries(e.parts))t[r]={index:n(o.index),values:n(o.values)};return{...e,parts:t}}}}function L(e){if(!e||typeof e!="object")return!1;const n=e;if(!("type"in n))return!1;switch(n.type){case"Json":return typeof n.keyLength=="number"&&Array.isArray(n.data);case"JsonPartitioned":return typeof n.partitionKeyLength=="number"&&Array.isArray(n.parts);case"BinaryPartitioned":return typeof n.partitionKeyLength=="number"&&Array.isArray(n.parts);default:return!1}}function be(e){return L(e)?e.type==="JsonPartitioned"||e.type==="BinaryPartitioned":!1}function we(e){switch(e.type){case"Json":{const n=Object.entries(e.data).map(([t,r])=>({key:JSON.parse(t),value:r}));return{type:"Json",keyLength:e.keyLength,data:n}}case"JsonPartitioned":{const n=Object.entries(e.parts).map(([t,r])=>({key:JSON.parse(t),value:r}));return{type:"JsonPartitioned",partitionKeyLength:e.partitionKeyLength,parts:n}}case"BinaryPartitioned":{const n=Object.entries(e.parts).map(([t,r])=>({key:JSON.parse(t),value:r}));return{type:"BinaryPartitioned",partitionKeyLength:e.partitionKeyLength,parts:n}}}}function Ae(e){switch(e.type){case"Json":{const n={};for(const t of e.data)n[JSON.stringify(t.key)]=t.value;return{type:"Json",keyLength:e.keyLength,data:n}}case"JsonPartitioned":{const n={};for(const t of e.parts)n[JSON.stringify(t.key)]=t.value;return{type:"JsonPartitioned",partitionKeyLength:e.partitionKeyLength,parts:n}}case"BinaryPartitioned":{const n={};for(const t of e.parts)n[JSON.stringify(t.key)]=t.value;return{type:"BinaryPartitioned",partitionKeyLength:e.partitionKeyLength,parts:n}}}}function Pe(e,n){if(e!==void 0)switch(e.type){case"Json":return e;case"JsonPartitioned":{const t=e.parts.map(r=>({key:r.key,value:n(r.value)}));return{...e,parts:t}}case"BinaryPartitioned":{const t=e.parts.map(r=>({key:r.key,value:{index:n(r.value.index),values:n(r.value.values)}}));return{...e,parts:t}}}}const B=-2147483648,P=-9007199254740991n,Ee=NaN,xe=NaN,z=null,U=null;function b(e,n){switch(n){case"Int":return e===B;case"Long":return e===Number(P)||e===P;case"Float":return Number.isNaN(e);case"Double":return Number.isNaN(e);case"String":return e===z;case"Bytes":return e===U;default:throw Error(`unsupported data type: ${n}`)}}function ke(e){if(!T(e))throw new Error(`Expected not-NA PValue, got ${e}`);return e}function T(e,n){if(!n)return typeof e=="string"||typeof e=="number"&&isFinite(e)||typeof e=="bigint";if(b(e,n))return!1;switch(n){case"Int":return typeof e=="number";case"Long":return typeof e=="number"||typeof e=="bigint";case"Float":return typeof e=="number";case"Double":return typeof e=="number";case"String":return typeof e=="string";case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${n}`)}}function M(e,n){if(!n)return e===null||typeof e=="string"||typeof e=="number"||typeof e=="bigint";if(b(e,n))return!0;switch(n){case"Int":return typeof e=="number";case"Long":return typeof e=="number"||typeof e=="bigint";case"Float":return typeof e=="number";case"Double":return typeof e=="number";case"String":return typeof e=="string";case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${n}`)}}function Se(e){if(e===null||typeof e=="string"||typeof e=="number")return e;if(typeof e=="bigint")return{bigint:e.toString()};throw new Error(`Type ${typeof e} (value ${e}) not yet supported.`)}function K(e,n){if(e===null||typeof e=="string"||typeof e=="number"||typeof e=="bigint"){if(n&&!b(e,n)&&!M(e,n))throw new Error(`Unexpected value type, got ${typeof e}, expected ${n}`);return e}if(typeof e=="object"&&e!==null&&"bigint"in e&&typeof e.bigint=="string"){if(n&&n!=="Long")throw new Error(`Unexpected value type, got serialized bigint, expected ${n}`);return BigInt(e.bigint)}throw new Error(`Unsupported type ${typeof e} (value ${e}).`)}function Ie(e){if(e=q(e),e===null)throw new Error("Value is null");return e}function q(e){if(e=K(e),e===null)return null;if(typeof e=="string")return e;if(typeof e=="number"){if(!isFinite(e))throw new Error(`Value is not finite (${e})`);return e}if(typeof e=="bigint")return Number(e);throw new Error(`Unexpected value type: ${typeof e}`)}function _(e,n){const t=Math.floor(n/8),r=1<<7-n%8;return(e[t]&r)>0}const H={type:"absent"},W=null;function Ne(e){return typeof e=="object"&&e!==null&&e.type==="absent"}function ve(e,n,t={}){if(_(e.absent,n))return t.absent===void 0?H:t.absent;const r=e.data[n],o=e.type;if(b(r,o))return t.na===void 0?W:t.na;switch(o){case"Int":return r;case"Long":return Number(r);case"Float":return r;case"Double":return r;case"String":return r;case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${o}`)}}function Ce(e){return{kind:e.kind,valueType:e.valueType,name:e.name,domain:e.domain,parentAxes:e.parentAxes,axesId:S(e.axesSpec)}}function Ve(e){return{columnId:e.id,spec:e.spec}}function p(e){const{type:n,name:t,domain:r}=e,o={type:n,name:t};return r&&Object.entries(r).length>0&&Object.assign(o,{domain:r}),o}function S(e){return e.map(p)}function Fe(e){return g(p(e))}function Oe(e,n){if(e===void 0)return n===void 0;if(n===void 0)return!0;for(const t in n)if(e[t]!==n[t])return!1;return!0}function G(e,n){return e.name===n.name&&Oe(e.domain,n.domain)}function Re(e,n){return{...e,src:h(e.src,n)}}function h(e,n){switch(e.type){case"column":return{type:"column",column:n(e.column)};case"slicedColumn":return{type:"slicedColumn",column:n(e.column),newId:e.newId,axisFilters:e.axisFilters};case"inlineColumn":return e;case"inner":case"full":return{type:e.type,entries:e.entries.map(t=>h(t,n))};case"outer":return{type:"outer",primary:h(e.primary,n),secondary:e.secondary.map(t=>h(t,n))};default:k(e)}}function $e(e){switch(e.type){case"axis":return{type:"axis",id:e.id};case"column":return{type:"column",id:e.id}}}function X(e){return g(e)}function Je(e){return JSON.parse(e)}function F(e){return g(p(e))}function O(e,n){return JSON.stringify([e,n])}class je{constructor(n){l(this,"domains",new Map);l(this,"axes",new Map);l(this,"domainPacks",[]);l(this,"domainPackToAnchor",new Map);this.anchors=n;const t=Object.entries(n);t.sort((r,o)=>r[0].localeCompare(o[0]));for(const[r,o]of t){for(let i=0;i<o.axesSpec.length;i++){const a=o.axesSpec[i],s=F(a);this.axes.set(s,{anchor:r,idx:i})}if(o.domain!==void 0){const i=Object.entries(o.domain);i.sort((a,s)=>a[0].localeCompare(s[0])),this.domainPackToAnchor.set(JSON.stringify(i),r),this.domainPacks.push(i.map(([a])=>a));for(const[a,s]of i){const u=O(a,s);this.domains.set(u,r)}}}}derive(n,t){const r={name:n.name,axes:[]};let o;if(n.domain!==void 0)e:for(const a of this.domainPacks){const s=[];for(const c of a){const f=n.domain[c];if(f!==void 0)s.push([c,f]);else break e}const u=this.domainPackToAnchor.get(JSON.stringify(s));if(u!==void 0){r.domainAnchor=u,o=new Set(a);break}}for(const[a,s]of Object.entries(n.domain??{})){if(o!==void 0&&o.has(a))continue;const u=O(a,s),c=this.domains.get(u);r.domain??(r.domain={}),r.domain[a]=c?{anchor:c}:s}if(r.axes=n.axesSpec.map(a=>{const s=F(a),u=this.axes.get(s);return u===void 0?p(a):u}),!t||t.length===0)return r;const i=[];for(const a of t){const[s,u]=a;if(typeof s=="number"){if(s<0||s>=n.axesSpec.length)throw new Error(`Axis index ${s} is out of bounds (0-${n.axesSpec.length-1})`);i.push([s,u])}else{const c=n.axesSpec.findIndex(f=>f.name===s);if(c===-1)throw new Error(`Axis with name "${s}" not found in the column specification`);i.push([c,u])}}return i.sort((a,s)=>a[0]-s[0]),{source:r,axisFilters:i}}deriveS(n,t){return X(this.derive(n,t))}}function De(e,n,t){const r={...n},o=(t==null?void 0:t.ignoreMissingDomains)??!1;if(r.domainAnchor!==void 0){const i=e[r.domainAnchor];if(!i)throw new Error(`Anchor "${r.domainAnchor}" not found`);const a=i.domain||{};r.domain={...a,...r.domain},delete r.domainAnchor}if(r.domain){const i={};for(const[a,s]of Object.entries(r.domain))if(typeof s=="string")i[a]=s;else{const u=e[s.anchor];if(!u)throw new Error(`Anchor "${s.anchor}" not found for domain key "${a}"`);if(!u.domain||u.domain[a]===void 0){if(!o)throw new Error(`Domain key "${a}" not found in anchor "${s.anchor}"`);continue}i[a]=u.domain[a]}r.domain=i}return r.axes&&(r.axes=r.axes.map(i=>Le(e,i))),r}function Le(e,n){if(!Be(n))return n;const t=n.anchor,r=e[t];if(!r)throw new Error(`Anchor "${t}" not found for axis reference`);if("idx"in n){if(n.idx<0||n.idx>=r.axesSpec.length)throw new Error(`Axis index ${n.idx} out of bounds for anchor "${t}"`);return r.axesSpec[n.idx]}else if("name"in n){const o=r.axesSpec.filter(i=>i.name===n.name);if(o.length>1)throw new Error(`Multiple axes with name "${n.name}" found in anchor "${t}"`);if(o.length===0)throw new Error(`Axis with name "${n.name}" not found in anchor "${t}"`);return o[0]}else if("id"in n){const o=r.axesSpec.filter(i=>G(n.id,p(i)));if(o.length>1)throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);if(o.length===0)throw new Error(`No matching axis found for matcher in anchor "${t}"`);return o[0]}throw new Error("Unsupported axis reference type")}function Be(e){return typeof e=="object"&&"anchor"in e}function ze(e){return typeof e=="object"&&e!==null&&"source"in e&&"axisFilters"in e}function d(e){return e.kind==="PColumn"}function Q(e){return d(e.spec)}function Ue(e){return d(e.obj)}function Te(e){return d(e.obj.spec)}function Me(e){if(!Q(e))throw new Error(`not a PColumn (kind = ${e.spec.kind})`);return e}function Ke(e,n){return e===void 0?void 0:{...e,data:n(e.data)}}function qe(e){const n=new Map,t=r=>{switch(r.type){case"column":n.set(r.column.id,r.column);return;case"slicedColumn":n.set(r.column.id,r.column);return;case"inlineColumn":return;case"full":case"inner":for(const o of r.entries)t(o);return;case"outer":t(r.primary);for(const o of r.secondary)t(o);return;default:k(r)}};return t(e),[...n.values()]}function _e(e){throw new Error("Unexpected object: "+e)}function w(e,n){switch(e.type){case"and":for(const t of e.operands)if(!w(t,n))return!1;return!0;case"or":for(const t of e.operands)if(w(t,n))return!0;return!1;case"not":return!w(e.operand,n);case"name":return d(n)&&n.name===e.name;case"name_pattern":return d(n)&&!!n.name.match(e.pattern);case"annotation":return d(n)&&n.annotations!==void 0&&n.annotations[e.annotation]===e.value;case"annotation_pattern":return d(n)&&n.annotations!==void 0&&n.annotations[e.annotation]!==void 0&&!!n.annotations[e.annotation].match(e.pattern);case"has_axes":return d(n)&&e.axes.every(t=>n.axesSpec.some(r=>(t.type===void 0||t.type===r.type)&&(t.name===void 0||t.name===r.name)&&(t.domain===void 0||Object.keys(t.domain).length===0||r.domain!==void 0&&Object.entries(t.domain).every(([o,i])=>r.domain[o]===i))));default:_e(e)}}function E(e,n){if(e.name!==void 0&&e.name!==n.name)return!1;if(e.type!==void 0){if(Array.isArray(e.type)){if(!e.type.includes(n.type))return!1}else if(e.type!==n.type)return!1}if(e.domain!==void 0){const t=n.domain||{};for(const[r,o]of Object.entries(e.domain))if(t[r]!==o)return!1}return!0}function x(e,n){if(n.name!==void 0&&e.name!==n.name||n.namePattern!==void 0&&!new RegExp(n.namePattern).test(e.name))return!1;if(n.type!==void 0){if(Array.isArray(n.type)){if(!n.type.includes(e.valueType))return!1}else if(n.type!==e.valueType)return!1}if(n.domain!==void 0){const t=e.domain||{};for(const[r,o]of Object.entries(n.domain))if(t[r]!==o)return!1}if(n.axes!==void 0){const t=e.axesSpec.map(p);if(n.partialAxesMatch){for(const r of n.axes)if(!t.some(o=>E(r,o)))return!1}else{if(t.length!==n.axes.length)return!1;for(let r=0;r<n.axes.length;r++)if(!E(n.axes[r],t[r]))return!1}}if(n.annotations!==void 0){const t=e.annotations||{};for(const[r,o]of Object.entries(n.annotations))if(t[r]!==o)return!1}if(n.annotationPatterns!==void 0){const t=e.annotations||{};for(const[r,o]of Object.entries(n.annotationPatterns)){const i=t[r];if(i===void 0||!new RegExp(o).test(i))return!1}}return!0}function He(e){return Array.isArray(e)?n=>e.some(t=>d(n)&&x(n,t)):n=>d(n)&&x(n,e)}function We(e){const n={kind:e.kind,name:e.name};return e.domain!==void 0&&(n.domain=e.domain),d(e)&&(n.axesSpec=S(e.axesSpec)),g(n)}const Ge={href:"/"},Xe=m.z.object({__isRef:m.z.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:m.z.string().describe("Upstream block id"),name:m.z.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:m.z.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").readonly();function Qe(e){return typeof e=="object"&&e!==null&&"__isRef"in e&&e.__isRef===!0&&"blockId"in e&&"name"in e}function Ye(e,n,t=!1){return t?{__isRef:!0,blockId:e,name:n,requireEnrichments:!0}:{__isRef:!0,blockId:e,name:n}}function Ze(e,n=!0){if(n)return{...e,requireEnrichments:!0};{const{requireEnrichments:t,...r}=e;return r}}function en(e,n,t=!1){return e.blockId===n.blockId&&e.name===n.name&&(t||e.requireEnrichments===n.requireEnrichments)}function nn(e,n){return e.ok?{ok:!0,value:n(e.value)}:e}function tn(e){if(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray)return new DataView(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new DataView(e);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const rn="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",on="0123456789ABCDEFGHIJKLMNOPQRSTUV",sn="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Y(e,n,t){t=t||{};let r,o;switch(n){case"RFC3548":case"RFC4648":r=rn,o=!0;break;case"RFC4648-HEX":r=on,o=!0;break;case"Crockford":r=sn,o=!1;break;default:throw new Error("Unknown base32 variant: "+String(n))}const i=t.padding!==void 0?t.padding:o,a=tn(e);let s=0,u=0,c="";for(let f=0;f<a.byteLength;f++)for(u=u<<8|a.getUint8(f),s+=8;s>=5;)c+=r[u>>>s-5&31],s-=5;if(s>0&&(c+=r[u<<5-s&31]),i)for(;c.length%8!==0;)c+="=";return c}const I=15,Z=24,N=m.z.string().length(Z).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function an(){const e=new Uint8Array(I);return crypto.getRandomValues(e),N.parse(Y(e,"RFC4648"))}function ee(e){if(e.length!==I)throw new Error(`Wrong number of bytes: ${e.length}`);return N.parse(Y(e,"RFC4648"))}async function un(e){const n=new TextEncoder,t=await crypto.subtle.digest("SHA-256",n.encode(e));return ee(new Uint8Array(t.slice(0,15)))}function cn(e){return JSON.stringify(e)}function fn(e){return g(e)}function dn(e){return JSON.parse(e)}class ln extends Error{constructor(){super(...arguments);l(this,"name","AbortError")}}class mn extends Error{constructor(){super(...arguments);l(this,"name","UiError")}}function pn(e){return e instanceof Error&&e.name==="AbortError"}function ne(e){return e instanceof Error?e.name==="AbortError"||ne(e.cause):!1}function yn(e){return e instanceof Error&&e.name==="AggregateError"}class hn extends Error{constructor(){super(...arguments);l(this,"name","PFrameError")}}function gn(e){return e instanceof Error&&e.name==="PFrameError"}function bn(e){if(typeof e=="string")return`String value was thrown: ${e}`;if(e&&typeof e=="object")try{return`Plain object was thrown: ${JSON.stringify(e)}`}catch(n){return`Non-serializable object was thrown (JSON.stringify failed: ${n instanceof Error?n.message:String(n)}): ${String(e)}`}return`Non-Error value (${typeof e}) was thrown: ${e}`}function A(e){return e instanceof Error?e:new Error(bn(e))}function v(e){const n=e.cause?v(e.cause):void 0,t=new Error(e.message,n!==void 0?{cause:n}:void 0);return t.name=e.name||"Error",t.stack=e.stack,t}function C(e){const n=A(e),t=n.cause?C(n.cause):void 0;return{name:n.name,message:n.message,stack:n.stack,...n.cause!==void 0&&{cause:t}}}function wn(e){if(e.error)throw e.error;return e.value}function V(e){return e.error?{error:C(e.error)}:{value:e.value}}function An(e){return e.error?{error:v(e.error)}:{value:e.value}}function te(e){try{return{value:e()}}catch(n){return{error:A(n)}}}async function re(e){try{return{value:await e()}}catch(n){return{error:A(n)}}}function Pn(e){const n=te(e);return V(n)}async function En(e){const n=await re(e);return V(n)}const xn=["supportsLazyState"],kn=["requiresUIAPIVersion","requiresModelAPIVersion"];function Sn(e,n,t=!0){return e===void 0?!1:e[n]===t}function In(e){return e===void 0?new Set:new Set(Object.entries(e).filter(([n,t])=>n.startsWith("requires")&&t===!0).map(([n])=>n))}function Nn(e){return e===void 0?new Set:new Set(Object.entries(e).filter(([n,t])=>n.startsWith("supports")&&t===!0).map(([n])=>n))}class oe extends Error{constructor(t){super(`Some of the block requirements are not supported by the runtime: ${Array.from(t.entries()).map(([r,o])=>`${r}: ${o}`).join(", ")}`);l(this,"name","IncompatibleFlagsError");this.incompatibleFlags=t}}class vn{constructor(){l(this,"supportedRequirements",new Map)}addSupportedRequirement(n,t=!0){return this.supportedRequirements.has(n)||this.supportedRequirements.set(n,new Set),this.supportedRequirements.get(n).add(t),this}getIncompatibleFlags(n){if(n===void 0)return;const t=new Map;for(const[r,o]of Object.entries(n))if(r.startsWith("requires")){if(o===void 0)continue;const i=this.supportedRequirements.get(r);(i===void 0||!i.has(o))&&t.set(r,o)}return t.size===0?void 0:t}checkCompatibility(n){return this.getIncompatibleFlags(n)===void 0}throwIfIncompatible(n){const t=this.getIncompatibleFlags(n);if(t!==void 0)throw new oe(t)}}exports.AbortError=ln;exports.AllRequiresFeatureFlags=kn;exports.AllSupportsFeatureFlags=xn;exports.AnchoredIdDeriver=je;exports.DefaultNavigationState=Ge;exports.IncompatibleFlagsError=oe;exports.PFrameError=hn;exports.PTableAbsent=H;exports.PTableNA=W;exports.PValueBytesNA=U;exports.PValueDoubleNA=xe;exports.PValueFloatNA=Ee;exports.PValueIntNA=B;exports.PValueLongNA=P;exports.PValueStringNA=z;exports.PlId=N;exports.PlIdBytes=I;exports.PlIdLength=Z;exports.PlRef=Xe;exports.RangeBytes=fe;exports.RuntimeCapabilities=vn;exports.UiError=mn;exports.canonicalizeAxisId=Fe;exports.canonicalizeJson=fn;exports.checkBlockFlag=Sn;exports.createPlRef=Ye;exports.dataInfoToEntries=we;exports.deriveNativeId=We;exports.deserializeError=v;exports.deserializeResult=An;exports.digestPlId=un;exports.ensureError=A;exports.ensureNotNAPValue=ke;exports.ensurePColumn=Me;exports.entriesToDataInfo=Ae;exports.executePSpecPredicate=w;exports.extractAllColumns=qe;exports.extractAllRequirements=In;exports.extractAllSupports=Nn;exports.extractCodeWithInfo=ue;exports.extractConfigGeneric=ce;exports.getAxesId=S;exports.getAxisId=p;exports.getColumnIdAndSpec=Ve;exports.getFileNameFromHandle=ye;exports.getFilePathFromHandle=D;exports.getPColumnSpecId=Ce;exports.getPTableColumnId=$e;exports.hasAbortError=ne;exports.isAbortError=pn;exports.isAggregateError=yn;exports.isDataInfo=he;exports.isDataInfoEntries=L;exports.isFilteredPColumn=ze;exports.isImportFileHandleIndex=j;exports.isImportFileHandleUpload=J;exports.isLiveLog=me;exports.isNotNAPValue=T;exports.isPColumn=Q;exports.isPColumnResult=Te;exports.isPColumnSpec=d;exports.isPColumnSpecResult=Ue;exports.isPFrameError=gn;exports.isPTableAbsent=Ne;exports.isPValue=M;exports.isPartitionedDataInfoEntries=be;exports.isPlRef=Qe;exports.isValueAbsent=_;exports.isValueNA=b;exports.mapDataInfo=ge;exports.mapDataInfoEntries=Pe;exports.mapJoinEntry=h;exports.mapPObjectData=Ke;exports.mapPTableDef=Re;exports.mapValueInVOE=nn;exports.matchAxis=E;exports.matchAxisId=G;exports.matchPColumn=x;exports.newRangeBytesOpt=de;exports.pTableValue=ve;exports.pValueToStringOrNumber=Ie;exports.pValueToStringOrNumberOrNull=q;exports.parseColumnId=Je;exports.parseJson=dn;exports.plId=ee;exports.plRefsEqual=en;exports.resolveAnchors=De;exports.safeConvertToPValue=K;exports.selectorsToPredicate=He;exports.serializeError=C;exports.serializeResult=V;exports.stringifyColumnId=X;exports.stringifyJson=cn;exports.toJsonSafePValue=Se;exports.uniquePlId=an;exports.unwrapResult=wn;exports.validateRangeBytes=le;exports.withEnrichments=Ze;exports.wrapAndSerialize=Pn;exports.wrapAndSerializeAsync=En;exports.wrapAsyncCallback=re;exports.wrapCallback=te;
1
+ "use strict";var ae=Object.defineProperty;var ue=(e,n,t)=>n in e?ae(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var l=(e,n,t)=>ue(e,typeof n!="symbol"?n+"":n,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("zod"),g=require("canonicalize");function ce(e){if(e.code!==void 0)return{code:e.code,sdkVersion:e.sdkVersion,featureFlags:e.featureFlags}}function y(e){if(e!==void 0)return typeof e=="string"?{__renderLambda:!0,handle:e,retentive:!1}:e}function fe(e){if(e.v3!==void 0){const{initialArgs:n,initialUiState:t,inputsValid:r,outputs:o,renderingMode:i,sdkVersion:a,featureFlags:s,sections:u,title:c,enrichmentTargets:f}=e.v3,{code:se}=e;return{initialArgs:n,initialUiState:t,inputsValid:r,outputs:o,renderingMode:i,sdkVersion:a,featureFlags:s,sections:u,title:c,code:se,enrichmentTargets:f}}else if(e.inputsValid!==void 0){const{sdkVersion:n,renderingMode:t,outputs:r,inputsValid:o,sections:i,initialArgs:a,code:s}=e,u=Object.keys(e);if(n===void 0||t===void 0||r===void 0||o===void 0||i===void 0||a===void 0)throw new Error(`Malformed config v2. SDK version ${n}; Fields = ${u.join(", ")}`);return{sdkVersion:n,renderingMode:t,initialArgs:a,outputs:Object.fromEntries(Object.entries(r).map(([c,f])=>[c,y(f)])),inputsValid:y(o),sections:y(i),initialUiState:void 0,code:s}}else if(e.renderingMode!==void 0){const{sdkVersion:n,canRun:t,renderingMode:r,outputs:o,sections:i,initialArgs:a,code:s}=e,u=Object.keys(e);if(r===void 0||o===void 0||t===void 0||i===void 0||a===void 0)throw new Error(`Malformed config v1. SDK version ${n}; Fields = ${u.join(", ")}`);return{sdkVersion:n??"unknown",renderingMode:r,initialArgs:a,outputs:Object.fromEntries(Object.entries(o).map(([c,f])=>[c,y(f)])),inputsValid:y(t),sections:y(i),initialUiState:void 0,code:s}}else{const{sdkVersion:n}=e,t=Object.keys(e);throw new Error(`Config format not supported: SDK = ${n}; Fields = ${t.join(", ")}`)}}const de=m.z.object({from:m.z.number(),to:m.z.number()});function le(e,n){if(!(e==null||n==null))return{from:e,to:n}}function me(e,n){if(e.from<0||e.to<0||e.from>=e.to)throw new Error(`${n}: invalid bytes range: ${e}`)}function pe(e){return e!==void 0&&e.startsWith("log+live://log/")}function k(e){throw new Error("Unexpected object: "+e)}const D="upload://upload/",R="index://index/";function $(e){return e.startsWith(D)}function J(e){return e.startsWith(R)}function j(e){if(J(e)){const n=e.slice(R.length);return JSON.parse(decodeURIComponent(n)).path}else if($(e)){const n=e.slice(D.length);return JSON.parse(decodeURIComponent(n)).localPath}k(e)}function ye(e){return e.replace(/^.*[\\/]/,"")}function he(e){return ye(j(e))}function ge(e){if(!e||typeof e!="object")return!1;const n=e;if(!("type"in n))return!1;switch(n.type){case"Json":return typeof n.keyLength=="number"&&n.data!==void 0&&typeof n.data=="object";case"JsonPartitioned":return typeof n.partitionKeyLength=="number"&&n.parts!==void 0&&typeof n.parts=="object";case"BinaryPartitioned":return typeof n.partitionKeyLength=="number"&&n.parts!==void 0&&typeof n.parts=="object";default:return!1}}function be(e,n){if(e!==void 0)switch(e.type){case"Json":return e;case"JsonPartitioned":{const t={};for(const[r,o]of Object.entries(e.parts))t[r]=n(o);return{...e,parts:t}}case"BinaryPartitioned":{const t={};for(const[r,o]of Object.entries(e.parts))t[r]={index:n(o.index),values:n(o.values)};return{...e,parts:t}}}}function we(e,n){switch(e.type){case"Json":break;case"JsonPartitioned":{for(const[t,r]of Object.entries(e.parts))n(r);break}case"BinaryPartitioned":{for(const[t,r]of Object.entries(e.parts))n(r.index),n(r.values);break}}}function B(e){if(!e||typeof e!="object")return!1;const n=e;if(!("type"in n))return!1;switch(n.type){case"Json":return typeof n.keyLength=="number"&&Array.isArray(n.data);case"JsonPartitioned":return typeof n.partitionKeyLength=="number"&&Array.isArray(n.parts);case"BinaryPartitioned":return typeof n.partitionKeyLength=="number"&&Array.isArray(n.parts);default:return!1}}function Pe(e){return B(e)?e.type==="JsonPartitioned"||e.type==="BinaryPartitioned":!1}function Ae(e){switch(e.type){case"Json":{const n=Object.entries(e.data).map(([t,r])=>({key:JSON.parse(t),value:r}));return{type:"Json",keyLength:e.keyLength,data:n}}case"JsonPartitioned":{const n=Object.entries(e.parts).map(([t,r])=>({key:JSON.parse(t),value:r}));return{type:"JsonPartitioned",partitionKeyLength:e.partitionKeyLength,parts:n}}case"BinaryPartitioned":{const n=Object.entries(e.parts).map(([t,r])=>({key:JSON.parse(t),value:r}));return{type:"BinaryPartitioned",partitionKeyLength:e.partitionKeyLength,parts:n}}}}function Ee(e){switch(e.type){case"Json":{const n={};for(const t of e.data)n[JSON.stringify(t.key)]=t.value;return{type:"Json",keyLength:e.keyLength,data:n}}case"JsonPartitioned":{const n={};for(const t of e.parts)n[JSON.stringify(t.key)]=t.value;return{type:"JsonPartitioned",partitionKeyLength:e.partitionKeyLength,parts:n}}case"BinaryPartitioned":{const n={};for(const t of e.parts)n[JSON.stringify(t.key)]=t.value;return{type:"BinaryPartitioned",partitionKeyLength:e.partitionKeyLength,parts:n}}}}function xe(e,n){if(e!==void 0)switch(e.type){case"Json":return e;case"JsonPartitioned":{const t=e.parts.map(r=>({key:r.key,value:n(r.value)}));return{...e,parts:t}}case"BinaryPartitioned":{const t=e.parts.map(r=>({key:r.key,value:{index:n(r.value.index),values:n(r.value.values)}}));return{...e,parts:t}}}}const L=-2147483648,A=-9007199254740991n,ke=NaN,Se=NaN,z=null,U=null;function b(e,n){switch(n){case"Int":return e===L;case"Long":return e===Number(A)||e===A;case"Float":return Number.isNaN(e);case"Double":return Number.isNaN(e);case"String":return e===z;case"Bytes":return e===U;default:throw Error(`unsupported data type: ${n}`)}}function ve(e){if(!T(e))throw new Error(`Expected not-NA PValue, got ${e}`);return e}function T(e,n){if(!n)return typeof e=="string"||typeof e=="number"&&isFinite(e)||typeof e=="bigint";if(b(e,n))return!1;switch(n){case"Int":return typeof e=="number";case"Long":return typeof e=="number"||typeof e=="bigint";case"Float":return typeof e=="number";case"Double":return typeof e=="number";case"String":return typeof e=="string";case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${n}`)}}function M(e,n){if(!n)return e===null||typeof e=="string"||typeof e=="number"||typeof e=="bigint";if(b(e,n))return!0;switch(n){case"Int":return typeof e=="number";case"Long":return typeof e=="number"||typeof e=="bigint";case"Float":return typeof e=="number";case"Double":return typeof e=="number";case"String":return typeof e=="string";case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${n}`)}}function Ie(e){if(e===null||typeof e=="string"||typeof e=="number")return e;if(typeof e=="bigint")return{bigint:e.toString()};throw new Error(`Type ${typeof e} (value ${e}) not yet supported.`)}function K(e,n){if(e===null||typeof e=="string"||typeof e=="number"||typeof e=="bigint"){if(n&&!b(e,n)&&!M(e,n))throw new Error(`Unexpected value type, got ${typeof e}, expected ${n}`);return e}if(typeof e=="object"&&e!==null&&"bigint"in e&&typeof e.bigint=="string"){if(n&&n!=="Long")throw new Error(`Unexpected value type, got serialized bigint, expected ${n}`);return BigInt(e.bigint)}throw new Error(`Unsupported type ${typeof e} (value ${e}).`)}function Ne(e){if(e=q(e),e===null)throw new Error("Value is null");return e}function q(e){if(e=K(e),e===null)return null;if(typeof e=="string")return e;if(typeof e=="number"){if(!isFinite(e))throw new Error(`Value is not finite (${e})`);return e}if(typeof e=="bigint")return Number(e);throw new Error(`Unexpected value type: ${typeof e}`)}function _(e,n){const t=Math.floor(n/8),r=1<<7-n%8;return(e[t]&r)>0}const H={type:"absent"},W=null;function Ce(e){return typeof e=="object"&&e!==null&&e.type==="absent"}function Fe(e,n,t={}){if(_(e.absent,n))return t.absent===void 0?H:t.absent;const r=e.data[n],o=e.type;if(b(r,o))return t.na===void 0?W:t.na;switch(o){case"Int":return r;case"Long":return Number(r);case"Float":return r;case"Double":return r;case"String":return r;case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${o}`)}}function Ve(e){return{kind:e.kind,valueType:e.valueType,name:e.name,domain:e.domain,parentAxes:e.parentAxes,axesId:S(e.axesSpec)}}function Oe(e){return{columnId:e.id,spec:e.spec}}function p(e){const{type:n,name:t,domain:r}=e,o={type:n,name:t};return r&&Object.entries(r).length>0&&Object.assign(o,{domain:r}),o}function S(e){return e.map(p)}function De(e){return g(p(e))}function Re(e,n){if(e===void 0)return n===void 0;if(n===void 0)return!0;for(const t in n)if(e[t]!==n[t])return!1;return!0}function G(e,n){return e.name===n.name&&Re(e.domain,n.domain)}function $e(e,n){return{...e,src:h(e.src,n)}}function h(e,n){switch(e.type){case"column":return{type:"column",column:n(e.column)};case"slicedColumn":return{type:"slicedColumn",column:n(e.column),newId:e.newId,axisFilters:e.axisFilters};case"inlineColumn":return e;case"inner":case"full":return{type:e.type,entries:e.entries.map(t=>h(t,n))};case"outer":return{type:"outer",primary:h(e.primary,n),secondary:e.secondary.map(t=>h(t,n))};default:k(e)}}function Je(e){switch(e.type){case"axis":return{type:"axis",id:e.id};case"column":return{type:"column",id:e.id}}}function X(e){return g(e)}function je(e){return JSON.parse(e)}function V(e){return g(p(e))}function O(e,n){return JSON.stringify([e,n])}class Be{constructor(n){l(this,"domains",new Map);l(this,"axes",new Map);l(this,"domainPacks",[]);l(this,"domainPackToAnchor",new Map);this.anchors=n;const t=Object.entries(n);t.sort((r,o)=>r[0].localeCompare(o[0]));for(const[r,o]of t){for(let i=0;i<o.axesSpec.length;i++){const a=o.axesSpec[i],s=V(a);this.axes.set(s,{anchor:r,idx:i})}if(o.domain!==void 0){const i=Object.entries(o.domain);i.sort((a,s)=>a[0].localeCompare(s[0])),this.domainPackToAnchor.set(JSON.stringify(i),r),this.domainPacks.push(i.map(([a])=>a));for(const[a,s]of i){const u=O(a,s);this.domains.set(u,r)}}}}derive(n,t){const r={name:n.name,axes:[]};let o;if(n.domain!==void 0)e:for(const a of this.domainPacks){const s=[];for(const c of a){const f=n.domain[c];if(f!==void 0)s.push([c,f]);else break e}const u=this.domainPackToAnchor.get(JSON.stringify(s));if(u!==void 0){r.domainAnchor=u,o=new Set(a);break}}for(const[a,s]of Object.entries(n.domain??{})){if(o!==void 0&&o.has(a))continue;const u=O(a,s),c=this.domains.get(u);r.domain??(r.domain={}),r.domain[a]=c?{anchor:c}:s}if(r.axes=n.axesSpec.map(a=>{const s=V(a),u=this.axes.get(s);return u===void 0?p(a):u}),!t||t.length===0)return r;const i=[];for(const a of t){const[s,u]=a;if(typeof s=="number"){if(s<0||s>=n.axesSpec.length)throw new Error(`Axis index ${s} is out of bounds (0-${n.axesSpec.length-1})`);i.push([s,u])}else{const c=n.axesSpec.findIndex(f=>f.name===s);if(c===-1)throw new Error(`Axis with name "${s}" not found in the column specification`);i.push([c,u])}}return i.sort((a,s)=>a[0]-s[0]),{source:r,axisFilters:i}}deriveS(n,t){return X(this.derive(n,t))}}function Le(e,n,t){const r={...n},o=(t==null?void 0:t.ignoreMissingDomains)??!1;if(r.domainAnchor!==void 0){const i=e[r.domainAnchor];if(!i)throw new Error(`Anchor "${r.domainAnchor}" not found`);const a=i.domain||{};r.domain={...a,...r.domain},delete r.domainAnchor}if(r.domain){const i={};for(const[a,s]of Object.entries(r.domain))if(typeof s=="string")i[a]=s;else{const u=e[s.anchor];if(!u)throw new Error(`Anchor "${s.anchor}" not found for domain key "${a}"`);if(!u.domain||u.domain[a]===void 0){if(!o)throw new Error(`Domain key "${a}" not found in anchor "${s.anchor}"`);continue}i[a]=u.domain[a]}r.domain=i}return r.axes&&(r.axes=r.axes.map(i=>ze(e,i))),r}function ze(e,n){if(!Ue(n))return n;const t=n.anchor,r=e[t];if(!r)throw new Error(`Anchor "${t}" not found for axis reference`);if("idx"in n){if(n.idx<0||n.idx>=r.axesSpec.length)throw new Error(`Axis index ${n.idx} out of bounds for anchor "${t}"`);return r.axesSpec[n.idx]}else if("name"in n){const o=r.axesSpec.filter(i=>i.name===n.name);if(o.length>1)throw new Error(`Multiple axes with name "${n.name}" found in anchor "${t}"`);if(o.length===0)throw new Error(`Axis with name "${n.name}" not found in anchor "${t}"`);return o[0]}else if("id"in n){const o=r.axesSpec.filter(i=>G(n.id,p(i)));if(o.length>1)throw new Error(`Multiple matching axes found for matcher in anchor "${t}"`);if(o.length===0)throw new Error(`No matching axis found for matcher in anchor "${t}"`);return o[0]}throw new Error("Unsupported axis reference type")}function Ue(e){return typeof e=="object"&&"anchor"in e}function Te(e){return typeof e=="object"&&e!==null&&"source"in e&&"axisFilters"in e}function d(e){return e.kind==="PColumn"}function Q(e){return d(e.spec)}function Me(e){return d(e.obj)}function Ke(e){return d(e.obj.spec)}function qe(e){if(!Q(e))throw new Error(`not a PColumn (kind = ${e.spec.kind})`);return e}function _e(e,n){return e===void 0?void 0:{...e,data:n(e.data)}}function He(e){const n=new Map,t=r=>{switch(r.type){case"column":n.set(r.column.id,r.column);return;case"slicedColumn":n.set(r.column.id,r.column);return;case"inlineColumn":return;case"full":case"inner":for(const o of r.entries)t(o);return;case"outer":t(r.primary);for(const o of r.secondary)t(o);return;default:k(r)}};return t(e),[...n.values()]}function We(e){throw new Error("Unexpected object: "+e)}function w(e,n){switch(e.type){case"and":for(const t of e.operands)if(!w(t,n))return!1;return!0;case"or":for(const t of e.operands)if(w(t,n))return!0;return!1;case"not":return!w(e.operand,n);case"name":return d(n)&&n.name===e.name;case"name_pattern":return d(n)&&!!n.name.match(e.pattern);case"annotation":return d(n)&&n.annotations!==void 0&&n.annotations[e.annotation]===e.value;case"annotation_pattern":return d(n)&&n.annotations!==void 0&&n.annotations[e.annotation]!==void 0&&!!n.annotations[e.annotation].match(e.pattern);case"has_axes":return d(n)&&e.axes.every(t=>n.axesSpec.some(r=>(t.type===void 0||t.type===r.type)&&(t.name===void 0||t.name===r.name)&&(t.domain===void 0||Object.keys(t.domain).length===0||r.domain!==void 0&&Object.entries(t.domain).every(([o,i])=>r.domain[o]===i))));default:We(e)}}function E(e,n){if(e.name!==void 0&&e.name!==n.name)return!1;if(e.type!==void 0){if(Array.isArray(e.type)){if(!e.type.includes(n.type))return!1}else if(e.type!==n.type)return!1}if(e.domain!==void 0){const t=n.domain||{};for(const[r,o]of Object.entries(e.domain))if(t[r]!==o)return!1}return!0}function x(e,n){if(n.name!==void 0&&e.name!==n.name||n.namePattern!==void 0&&!new RegExp(n.namePattern).test(e.name))return!1;if(n.type!==void 0){if(Array.isArray(n.type)){if(!n.type.includes(e.valueType))return!1}else if(n.type!==e.valueType)return!1}if(n.domain!==void 0){const t=e.domain||{};for(const[r,o]of Object.entries(n.domain))if(t[r]!==o)return!1}if(n.axes!==void 0){const t=e.axesSpec.map(p);if(n.partialAxesMatch){for(const r of n.axes)if(!t.some(o=>E(r,o)))return!1}else{if(t.length!==n.axes.length)return!1;for(let r=0;r<n.axes.length;r++)if(!E(n.axes[r],t[r]))return!1}}if(n.annotations!==void 0){const t=e.annotations||{};for(const[r,o]of Object.entries(n.annotations))if(t[r]!==o)return!1}if(n.annotationPatterns!==void 0){const t=e.annotations||{};for(const[r,o]of Object.entries(n.annotationPatterns)){const i=t[r];if(i===void 0||!new RegExp(o).test(i))return!1}}return!0}function Ge(e){return Array.isArray(e)?n=>e.some(t=>d(n)&&x(n,t)):n=>d(n)&&x(n,e)}function Xe(e){const n={kind:e.kind,name:e.name};return e.domain!==void 0&&(n.domain=e.domain),d(e)&&(n.axesSpec=S(e.axesSpec)),g(n)}const Qe={href:"/"},Ye=m.z.object({__isRef:m.z.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:m.z.string().describe("Upstream block id"),name:m.z.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:m.z.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").readonly();function Ze(e){return typeof e=="object"&&e!==null&&"__isRef"in e&&e.__isRef===!0&&"blockId"in e&&"name"in e}function en(e,n,t=!1){return t?{__isRef:!0,blockId:e,name:n,requireEnrichments:!0}:{__isRef:!0,blockId:e,name:n}}function nn(e,n=!0){if(n)return{...e,requireEnrichments:!0};{const{requireEnrichments:t,...r}=e;return r}}function tn(e,n,t=!1){return e.blockId===n.blockId&&e.name===n.name&&(t||e.requireEnrichments===n.requireEnrichments)}function rn(e,n){return e.ok?{ok:!0,value:n(e.value)}:e}function on(e){if(e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray)return new DataView(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new DataView(e);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}const sn="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",an="0123456789ABCDEFGHIJKLMNOPQRSTUV",un="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Y(e,n,t){t=t||{};let r,o;switch(n){case"RFC3548":case"RFC4648":r=sn,o=!0;break;case"RFC4648-HEX":r=an,o=!0;break;case"Crockford":r=un,o=!1;break;default:throw new Error("Unknown base32 variant: "+String(n))}const i=t.padding!==void 0?t.padding:o,a=on(e);let s=0,u=0,c="";for(let f=0;f<a.byteLength;f++)for(u=u<<8|a.getUint8(f),s+=8;s>=5;)c+=r[u>>>s-5&31],s-=5;if(s>0&&(c+=r[u<<5-s&31]),i)for(;c.length%8!==0;)c+="=";return c}const v=15,Z=24,I=m.z.string().length(Z).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function cn(){const e=new Uint8Array(v);return crypto.getRandomValues(e),I.parse(Y(e,"RFC4648"))}function ee(e){if(e.length!==v)throw new Error(`Wrong number of bytes: ${e.length}`);return I.parse(Y(e,"RFC4648"))}async function fn(e){const n=new TextEncoder,t=await crypto.subtle.digest("SHA-256",n.encode(e));return ee(new Uint8Array(t.slice(0,15)))}function dn(e){return JSON.stringify(e)}function ln(e){return g(e)}function mn(e){return JSON.parse(e)}class pn extends Error{constructor(){super(...arguments);l(this,"name","AbortError")}}class yn extends Error{constructor(){super(...arguments);l(this,"name","UiError")}}function hn(e){return e instanceof Error&&e.name==="AbortError"}function ne(e){return e instanceof Error?e.name==="AbortError"||ne(e.cause):!1}function gn(e){return e instanceof Error&&e.name==="AggregateError"}class te extends Error{constructor(){super(...arguments);l(this,"name","PFrameError")}}function bn(e){return e instanceof Error&&e.name==="PFrameError"}class wn extends te{constructor(){super(...arguments);l(this,"name","PFrameError.Driver")}}function Pn(e){return e instanceof Error&&e.name==="PFrameError.Driver"}function An(e){if(typeof e=="string")return`String value was thrown: ${e}`;if(e&&typeof e=="object")try{return`Plain object was thrown: ${JSON.stringify(e)}`}catch(n){return`Non-serializable object was thrown (JSON.stringify failed: ${n instanceof Error?n.message:String(n)}): ${String(e)}`}return`Non-Error value (${typeof e}) was thrown: ${e}`}function P(e){return e instanceof Error?e:new Error(An(e))}function N(e){const n=e.cause?N(e.cause):void 0,t=new Error(e.message,n!==void 0?{cause:n}:void 0);return t.name=e.name||"Error",t.stack=e.stack,t}function C(e){const n=P(e),t=n.cause?C(n.cause):void 0;return{name:n.name,message:n.message,stack:n.stack,...n.cause!==void 0&&{cause:t}}}function En(e){if(e.error)throw e.error;return e.value}function F(e){return e.error?{error:C(e.error)}:{value:e.value}}function xn(e){return e.error?{error:N(e.error)}:{value:e.value}}function re(e){try{return{value:e()}}catch(n){return{error:P(n)}}}async function oe(e){try{return{value:await e()}}catch(n){return{error:P(n)}}}function kn(e){const n=re(e);return F(n)}async function Sn(e){const n=await oe(e);return F(n)}const vn=["supportsLazyState"],In=["requiresUIAPIVersion","requiresModelAPIVersion"];function Nn(e,n,t=!0){return e===void 0?!1:e[n]===t}function Cn(e){return e===void 0?new Set:new Set(Object.entries(e).filter(([n,t])=>n.startsWith("requires")&&t===!0).map(([n])=>n))}function Fn(e){return e===void 0?new Set:new Set(Object.entries(e).filter(([n,t])=>n.startsWith("supports")&&t===!0).map(([n])=>n))}class ie extends Error{constructor(t){super(`Some of the block requirements are not supported by the runtime: ${Array.from(t.entries()).map(([r,o])=>`${r}: ${o}`).join(", ")}`);l(this,"name","IncompatibleFlagsError");this.incompatibleFlags=t}}class Vn{constructor(){l(this,"supportedRequirements",new Map)}addSupportedRequirement(n,t=!0){return this.supportedRequirements.has(n)||this.supportedRequirements.set(n,new Set),this.supportedRequirements.get(n).add(t),this}getIncompatibleFlags(n){if(n===void 0)return;const t=new Map;for(const[r,o]of Object.entries(n))if(r.startsWith("requires")){if(o===void 0)continue;const i=this.supportedRequirements.get(r);(i===void 0||!i.has(o))&&t.set(r,o)}return t.size===0?void 0:t}checkCompatibility(n){return this.getIncompatibleFlags(n)===void 0}throwIfIncompatible(n){const t=this.getIncompatibleFlags(n);if(t!==void 0)throw new ie(t)}}exports.AbortError=pn;exports.AllRequiresFeatureFlags=In;exports.AllSupportsFeatureFlags=vn;exports.AnchoredIdDeriver=Be;exports.DefaultNavigationState=Qe;exports.IncompatibleFlagsError=ie;exports.PFrameDriverError=wn;exports.PFrameError=te;exports.PTableAbsent=H;exports.PTableNA=W;exports.PValueBytesNA=U;exports.PValueDoubleNA=Se;exports.PValueFloatNA=ke;exports.PValueIntNA=L;exports.PValueLongNA=A;exports.PValueStringNA=z;exports.PlId=I;exports.PlIdBytes=v;exports.PlIdLength=Z;exports.PlRef=Ye;exports.RangeBytes=de;exports.RuntimeCapabilities=Vn;exports.UiError=yn;exports.canonicalizeAxisId=De;exports.canonicalizeJson=ln;exports.checkBlockFlag=Nn;exports.createPlRef=en;exports.dataInfoToEntries=Ae;exports.deriveNativeId=Xe;exports.deserializeError=N;exports.deserializeResult=xn;exports.digestPlId=fn;exports.ensureError=P;exports.ensureNotNAPValue=ve;exports.ensurePColumn=qe;exports.entriesToDataInfo=Ee;exports.executePSpecPredicate=w;exports.extractAllColumns=He;exports.extractAllRequirements=Cn;exports.extractAllSupports=Fn;exports.extractCodeWithInfo=ce;exports.extractConfigGeneric=fe;exports.getAxesId=S;exports.getAxisId=p;exports.getColumnIdAndSpec=Oe;exports.getFileNameFromHandle=he;exports.getFilePathFromHandle=j;exports.getPColumnSpecId=Ve;exports.getPTableColumnId=Je;exports.hasAbortError=ne;exports.isAbortError=hn;exports.isAggregateError=gn;exports.isDataInfo=ge;exports.isDataInfoEntries=B;exports.isFilteredPColumn=Te;exports.isImportFileHandleIndex=J;exports.isImportFileHandleUpload=$;exports.isLiveLog=pe;exports.isNotNAPValue=T;exports.isPColumn=Q;exports.isPColumnResult=Ke;exports.isPColumnSpec=d;exports.isPColumnSpecResult=Me;exports.isPFrameDriverError=Pn;exports.isPFrameError=bn;exports.isPTableAbsent=Ce;exports.isPValue=M;exports.isPartitionedDataInfoEntries=Pe;exports.isPlRef=Ze;exports.isValueAbsent=_;exports.isValueNA=b;exports.mapDataInfo=be;exports.mapDataInfoEntries=xe;exports.mapJoinEntry=h;exports.mapPObjectData=_e;exports.mapPTableDef=$e;exports.mapValueInVOE=rn;exports.matchAxis=E;exports.matchAxisId=G;exports.matchPColumn=x;exports.newRangeBytesOpt=le;exports.pTableValue=Fe;exports.pValueToStringOrNumber=Ne;exports.pValueToStringOrNumberOrNull=q;exports.parseColumnId=je;exports.parseJson=mn;exports.plId=ee;exports.plRefsEqual=tn;exports.resolveAnchors=Le;exports.safeConvertToPValue=K;exports.selectorsToPredicate=Ge;exports.serializeError=C;exports.serializeResult=F;exports.stringifyColumnId=X;exports.stringifyJson=dn;exports.toJsonSafePValue=Ie;exports.uniquePlId=cn;exports.unwrapResult=En;exports.validateRangeBytes=me;exports.visitDataInfo=we;exports.withEnrichments=nn;exports.wrapAndSerialize=kn;exports.wrapAndSerializeAsync=Sn;exports.wrapAsyncCallback=oe;exports.wrapCallback=re;
2
2
  //# sourceMappingURL=index.js.map