@malloy-publisher/app 0.0.203 → 0.0.205
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-doc.yaml +146 -0
- package/dist/assets/{EnvironmentPage-BVQ7glKP.js → EnvironmentPage-CAge6UHD.js} +1 -1
- package/dist/assets/HomePage-DhTe8qpa.js +1 -0
- package/dist/assets/{MainPage-bYOWcgDP.js → MainPage-CeTxxGex.js} +2 -2
- package/dist/assets/MaterializationsPage-CpDHB70t.js +1 -0
- package/dist/assets/ModelPage-D9sSMb75.js +1 -0
- package/dist/assets/PackagePage-LRqQWrFY.js +1 -0
- package/dist/assets/{RouteError-_J-EBz7W.js → RouteError-xT6kuCNw.js} +1 -1
- package/dist/assets/{WorkbookPage-Bjs9Nm-_.js → WorkbookPage-DsIh9svZ.js} +1 -1
- package/dist/assets/{core-BPLlx5VM.es-C2ARtwWI.js → core-C2sQrwVu.es-Bjem0hym.js} +1 -1
- package/dist/assets/{index-CqUWJELr.js → index-BdOZDcce.js} +2 -2
- package/dist/assets/index-DHHAcY5o.js +1812 -0
- package/dist/assets/index-RX3QOTde.js +455 -0
- package/dist/assets/index.umd-D2WH3D-f.js +2469 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/HomePage-D9drXoZX.js +0 -1
- package/dist/assets/ModelPage-DT0gjNy1.js +0 -1
- package/dist/assets/PackagePage-N1ZBNJul.js +0 -1
- package/dist/assets/index-BeNwIeYQ.js +0 -454
- package/dist/assets/index-Dx7qi2LO.js +0 -1803
- package/dist/assets/index.umd-BXm2lnUO.js +0 -1145
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{an as Ni}from"./index-RX3QOTde.js";function Mi(u,M){for(var z=0;z<M.length;z++){const V=M[z];if(typeof V!="string"&&!Array.isArray(V)){for(const g in V)if(g!=="default"&&!(g in u)){const l=Object.getOwnPropertyDescriptor(V,g);l&&Object.defineProperty(u,g,l.get?l:{enumerable:!0,get:()=>V[g]})}}}return Object.freeze(Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}))}var kr={},Rt={},Mr;function Jt(){if(Mr)return Rt;Mr=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.formatRef=u,Rt.isRef=M,Rt.isDataNode=z,Rt.isEnvRef=V;function u(g){let l="$";for(let c=0;c<g.linkUps;c++)l+="^";let f=!0;for(const c of g.linkTo)typeof c=="string"?((!f||g.linkUps>0)&&(l+="."),l+=c,f=!1):l+=`[${c}]`;return l}function M(g){return typeof g=="object"&&g!==null&&"linkTo"in g&&"linkUps"in g&&!Array.isArray(g)&&!(g instanceof Date)}function z(g){return typeof g=="object"&&g!==null&&!M(g)}function V(g){return typeof g=="object"&&g!==null&&"env"in g&&!Array.isArray(g)&&!(g instanceof Date)}return Rt}var $t={},jr;function vn(){if(jr)return $t;jr=1,Object.defineProperty($t,"__esModule",{value:!0}),$t.MotValue=$t.Mot=void 0,$t.buildMot=d;const u=Jt();class M{text(...w){return this.get(...w)._text()}numeric(...w){return this.get(...w)._numeric()}boolean(...w){return this.get(...w)._boolean()}date(...w){return this.get(...w)._date()}valueType(...w){return this.get(...w)._valueType()}values(...w){return this.get(...w)._values()}texts(...w){const E=this.get(...w)._values();if(!E)return;const x=[];for(const G of E){const oe=G._text();if(oe===void 0)return;x.push(oe)}return x}numerics(...w){const E=this.get(...w)._values();if(!E)return;const x=[];for(const G of E){const oe=G._numeric();if(oe===void 0)return;x.push(oe)}return x}booleans(...w){const E=this.get(...w)._values();if(!E)return;const x=[];for(const G of E){const oe=G._boolean();if(oe===void 0)return;x.push(oe)}return x}dates(...w){const E=this.get(...w)._values();if(!E)return;const x=[];for(const G of E){const oe=G._date();if(oe===void 0)return;x.push(oe)}return x}has(...w){return this.get(...w).exists}}$t.Mot=M;class z extends M{constructor(w,E,x=!0){super(),this.isRef=!1,this._val=w,this._props=E,this.exists=x}_text(){return this._val?.type==="string"?this._val.value:void 0}_numeric(){return this._val?.type==="number"?this._val.value:void 0}_boolean(){return this._val?.type==="boolean"?this._val.value:void 0}_date(){return this._val?.type==="date"?this._val.value:void 0}_values(){return this._val?.type==="array"?this._val.value:void 0}_valueType(){return this._val?.type}get keys(){return this._props.keys()}get entries(){return this._props.entries()}get(...w){let E=this;for(const x of w){if(typeof x=="number"){const G=E.values();if(!G||!Number.isInteger(x)||x<0||x>=G.length)return f;E=G[x]}else E===this?E=this._props.get(x)??f:E=E.get(x);if(!E.exists)return f}return E}}$t.MotValue=z;class V extends M{constructor(w,E){super(),this.exists=!0,this.isRef=!0,this._target=E}_text(){return this._target.text()}_numeric(){return this._target.numeric()}_boolean(){return this._target.boolean()}_date(){return this._target.date()}_values(){return this._target.values()}_valueType(){return this._target.valueType()}get keys(){return this._target.keys}get entries(){return this._target.entries}get(...w){return this._target.get(...w)}}const g={[Symbol.iterator]:()=>({next:()=>({done:!0,value:void 0})})};class l extends M{constructor(){super(...arguments),this.exists=!1,this.isRef=!1}_text(){}_numeric(){}_boolean(){}_date(){}_values(){}_valueType(){}get keys(){return g}get entries(){return g}get(...w){return this}}const f=new l,c={createMot(e,w){return new z(e,w)},createRefMot(e,w){return new V(e,w)},undefinedMot:f};function s(e,w,E,x){let G,oe;if(e.linkUps===0)G=w,oe=[];else{const N=E.length-e.linkUps;if(N<0||N>=E.length)return;G=E[N],oe=E.slice(0,N)}let C=G,R=oe,P=G;for(let N=0;N<e.linkTo.length;N++){if((0,u.isRef)(C)){if(x.has(C))return;x.add(C);const Ee=s(C,w,R,x);if(x.delete(C),!Ee)return;C=Ee.target,R=Ee.ancestors,P=C,N--;continue}const ye=C,Se=e.linkTo[N];if(typeof Se=="string"){if(!ye.properties||!(Se in ye.properties))return;N>0&&(R=[...R,P]),P=ye,C=ye.properties[Se]}else{if(!ye.eq||!Array.isArray(ye.eq)||Se>=ye.eq.length)return;N>0&&(R=[...R,P]),P=ye,C=ye.eq[Se]}}if((0,u.isRef)(C)){if(x.has(C))return;x.add(C);const N=s(C,w,R,x);return x.delete(C),N}return{target:C,ancestors:R}}function d(e,w){const E=w?.env,x=w?.factory??c,G=x.undefinedMot,oe=new Map;function C(N,ye,Se){if(N.deleted)return G;if(oe.has(N))return oe.get(N);const Ee=new Map,xe=P(N.eq,ye,Se,N),ve=x.createMot(xe,Ee);if(oe.set(N,ve),N.properties)for(const[$e,D]of Object.entries(N.properties)){const B=R(D,ye,Se,N);B.exists&&Ee.set($e,B)}return ve}function R(N,ye,Se,Ee){if((0,u.isRef)(N)){const ve=new Set;ve.add(N);const $e=s(N,ye,Se,ve);if(!$e||$e.target.deleted)return G;const D=C($e.target,ye,$e.ancestors);return x.createRefMot(N,D)}const xe=N;return xe.deleted?G:C(xe,ye,[...Se,Ee])}function P(N,ye,Se,Ee){if(N!==void 0){if((0,u.isEnvRef)(N)){const xe=E?E[N.env]:void 0;return xe===void 0?void 0:{type:"string",value:xe}}if(Array.isArray(N)){const xe=[...Se,Ee],ve=[];for(const $e of N)ve.push(R($e,ye,xe,Ee));return{type:"array",value:ve}}if(typeof N=="string")return{type:"string",value:N};if(typeof N=="number")return{type:"number",value:N};if(typeof N=="boolean")return{type:"boolean",value:N};if(N instanceof Date)return{type:"date",value:N}}}return C(e,e,[e])}return $t}var yt={},ir={},Ur;function ji(){if(Ur)return ir;Ur=1,Object.defineProperty(ir,"__esModule",{value:!0}),ir.parse=V;class u{constructor(l){this.input=l,this.pos=0}peekChar(){return this.pos<this.input.length?this.input[this.pos]:void 0}advance(l){this.pos+=l}startsWith(l){return this.input.startsWith(l,this.pos)}eatChar(l){return this.peekChar()===l?(this.advance(1),!0):!1}expectChar(l){if(!this.eatChar(l))throw this.errorPoint(`Expected '${l}'`)}position(){const l=this.input.substring(0,this.pos),f=(l.match(/\n/g)||[]).length,c=l.lastIndexOf(`
|
|
2
2
|
`),s=this.pos-(c===-1?0:c+1);return{line:f,column:s,offset:this.pos}}errorPoint(l){const f=this.position();return{code:"tag-parse-syntax-error",message:l,begin:f,end:f}}errorSpan(l,f){return{code:"tag-parse-syntax-error",message:l,begin:f,end:this.position()}}skipWs(){for(;;){for(;this.pos<this.input.length;){const l=this.input[this.pos];if(l===" "||l===" "||l==="\r"||l===`
|
|
3
3
|
`)this.pos++;else break}if(this.peekChar()==="#")for(;this.pos<this.input.length;){const l=this.input[this.pos];if(l==="\r"||l===`
|
|
4
4
|
`)break;this.pos++}else break}}skipWsAndCommas(){for(this.skipWs();this.peekChar()===",";)this.advance(1),this.skipWs()}parseStatements(){const l=[];for(this.skipWsAndCommas();this.pos<this.input.length;)l.push(this.parseStatement()),this.skipWsAndCommas();return l}parseStatement(){const l=this.position();if(this.startsWith("-..."))return this.advance(4),{kind:"clearAll",span:{begin:l,end:this.position()}};if(this.peekChar()==="-")return this.advance(1),{kind:"define",path:this.parsePropName(),deleted:!0,span:{begin:l,end:this.position()}};const f=this.parsePropName();this.skipWs();const c=this.peekChar();if(c===":"&&this.startsWith(":=")){this.advance(2),this.skipWs();const s=this.parseEqValue();if(this.skipWs(),this.peekChar()==="{"){const d=this.parsePropertiesBlock();return{kind:"assignBoth",path:f,value:s,properties:d,span:{begin:l,end:this.position()}}}return{kind:"assignBoth",path:f,value:s,properties:null,span:{begin:l,end:this.position()}}}if(c==="="){if(this.advance(1),this.skipWs(),this.peekChar()==="{")throw this.errorPoint("'=' requires a value; use ': { ... }' to replace properties");const s=this.parseEqValue();if(this.skipWs(),this.peekChar()==="{"){const d=this.parsePropertiesBlock();return{kind:"setEq",path:f,value:s,properties:d,span:{begin:l,end:this.position()}}}return{kind:"setEq",path:f,value:s,properties:null,span:{begin:l,end:this.position()}}}if(c===":"){this.advance(1),this.skipWs();const s=this.parsePropertiesBlock();return{kind:"replaceProperties",path:f,properties:s,span:{begin:l,end:this.position()}}}if(c==="{"){const s=this.parsePropertiesBlock();return{kind:"updateProperties",path:f,properties:s,span:{begin:l,end:this.position()}}}return{kind:"define",path:f,deleted:!1,span:{begin:l,end:this.position()}}}parsePropName(){const f=[this.parseIdentifier()];for(;this.peekChar()===".";)this.advance(1),f.push(this.parseIdentifier());return f}parseIdentifier(){return this.peekChar()==="`"?this.parseBacktickString():this.parseBareString()}parseEqValue(l=!0){const f=this.peekChar();if(l&&f==="[")return{kind:"array",elements:this.parseArray()};if(this.startsWith("<<<"))return{kind:"scalar",value:{kind:"string",value:this.parseHeredoc()}};if(f==="@")return{kind:"scalar",value:this.parseAtValue()};if(f==="$")return{kind:"scalar",value:this.parseReference()};if(f==='"')return this.startsWith('"""')?{kind:"scalar",value:{kind:"string",value:this.parseTripleString()}}:{kind:"scalar",value:{kind:"string",value:this.parseDoubleQuotedString()}};if(f==="'")return this.startsWith("'''")?{kind:"scalar",value:{kind:"string",value:this.parseTripleSingleQuotedString()}}:{kind:"scalar",value:{kind:"string",value:this.parseSingleQuotedString()}};if(f!==void 0&&(f==="-"||f>="0"&&f<="9"||f==="."))return this.parseNumberOrString();if(f!==void 0&&M(f))return{kind:"scalar",value:{kind:"string",value:this.parseBareString()}};throw this.errorPoint("Expected a value")}parseAtValue(){const l=this.position();if(this.expectChar("@"),this.startsWith("true")&&!this.isBareCharAt(4))return this.advance(4),{kind:"boolean",value:!0};if(this.startsWith("false")&&!this.isBareCharAt(5))return this.advance(5),{kind:"boolean",value:!1};if(this.startsWith("none")&&!this.isBareCharAt(4))return this.advance(4),{kind:"none"};if(this.startsWith("env."))return this.advance(4),{kind:"env",name:this.parseIdentifier()};const f=this.peekChar();if(f!==void 0&&f>="0"&&f<="9")return this.parseDate(l);const c=this.pos;for(;this.pos<this.input.length&&M(this.input[this.pos]);)this.pos++;const s=this.pos>c?this.input.substring(c,this.pos):"";throw this.errorSpan(`Illegal constant @${s}; expected @true, @false, @none, @env.NAME, or @date`,l)}isBareCharAt(l){const f=this.pos+l;return f<this.input.length&&M(this.input[f])}parseDate(l){const f=this.pos;if(this.consumeDigits(4,l),this.expectChar("-"),this.consumeDigits(2,l),this.expectChar("-"),this.consumeDigits(2,l),this.peekChar()==="T"){if(this.advance(1),this.consumeDigits(2,l),this.expectChar(":"),this.consumeDigits(2,l),this.peekChar()===":"&&(this.advance(1),this.consumeDigits(2,l),this.peekChar()===".")){this.advance(1);const d=this.pos;for(;this.pos<this.input.length&&this.input[this.pos]>="0"&&this.input[this.pos]<="9";)this.pos++;if(this.pos===d)throw this.errorSpan("Expected fractional digits in date",l)}const s=this.peekChar();s==="Z"?this.advance(1):(s==="+"||s==="-")&&(this.advance(1),this.consumeDigits(2,l),this.peekChar()===":"&&this.advance(1),this.consumeDigits(2,l))}return{kind:"date",value:this.input.substring(f,this.pos)}}consumeDigits(l,f){for(let c=0;c<l;c++){const s=this.peekChar();if(s===void 0||s<"0"||s>"9")throw this.errorSpan("Expected digit",f);this.advance(1)}}parseNumberOrString(){const l=this.pos,f=this.position(),c=this.peekChar()==="-";c&&this.advance(1);let s=!1,d=!1;for(;this.pos<this.input.length&&this.input[this.pos]>="0"&&this.input[this.pos]<="9";)s=!0,this.advance(1);if(this.peekChar()==="."){d=!0,this.advance(1);const G=this.pos;for(;this.pos<this.input.length&&this.input[this.pos]>="0"&&this.input[this.pos]<="9";)this.advance(1);if(this.pos===G)return this.pos=l,this.parseIntegerOrBare(l,c)}if(!s&&!d){if(this.pos=l,c)throw this.errorPoint("Expected a value");return{kind:"scalar",value:{kind:"string",value:this.parseBareString()}}}const e=this.peekChar();if(e==="e"||e==="E"){this.advance(1);const G=this.peekChar();(G==="+"||G==="-")&&this.advance(1);const oe=this.pos;for(;this.pos<this.input.length&&this.input[this.pos]>="0"&&this.input[this.pos]<="9";)this.advance(1);if(this.pos===oe)throw this.errorSpan("Expected exponent digits",f)}const w=this.peekChar();if(w!==void 0&&M(w)&&!(w>="0"&&w<="9")){if(this.pos=l,c)throw this.errorPoint("Expected a value");return{kind:"scalar",value:{kind:"string",value:this.parseBareString()}}}const E=this.input.substring(l,this.pos),x=parseFloat(E);if(isNaN(x))throw this.errorSpan(`Invalid number: ${E}`,f);return{kind:"scalar",value:{kind:"number",value:x}}}parseIntegerOrBare(l,f){this.pos=l;const c=this.position();f&&this.advance(1);const s=this.pos;for(;this.pos<this.input.length&&this.input[this.pos]>="0"&&this.input[this.pos]<="9";)this.advance(1);if(this.pos===s){if(this.pos=l,f)throw this.errorPoint("Expected a value");return{kind:"scalar",value:{kind:"string",value:this.parseBareString()}}}if(!f){const E=this.peekChar();if(E!==void 0&&M(E)&&!(E>="0"&&E<="9"))return this.pos=l,{kind:"scalar",value:{kind:"string",value:this.parseBareString()}}}const d=this.peekChar();if(d==="e"||d==="E"){this.advance(1);const E=this.peekChar();(E==="+"||E==="-")&&this.advance(1);const x=this.pos;for(;this.pos<this.input.length&&this.input[this.pos]>="0"&&this.input[this.pos]<="9";)this.advance(1);if(this.pos===x)throw this.errorSpan("Expected exponent digits",c)}const e=this.input.substring(l,this.pos),w=parseFloat(e);if(isNaN(w))throw this.errorSpan(`Invalid number: ${e}`,c);return{kind:"scalar",value:{kind:"number",value:w}}}parseBareString(){const l=this.pos;for(;this.pos<this.input.length&&M(this.input[this.pos]);)this.pos++;if(this.pos===l)throw this.errorPoint("Expected an identifier");return this.input.substring(l,this.pos)}parseDoubleQuotedString(){const l=this.position();this.expectChar('"');let f="";for(;;){const c=this.peekChar();if(c===void 0||c==="\r"||c===`
|
|
@@ -20,7 +20,7 @@ ${l} ]`:f+=`
|
|
|
20
20
|
${l} =: ${this.eq}`),this.properties)for(const c in this.properties)f+=`
|
|
21
21
|
${l} ${c}: ${this.properties[c].peek(g+2)}`;return f+=`
|
|
22
22
|
${l}}`,f}constructor(g={},l){if(this._read=!1,l!==void 0&&(this._parent=l),g.eq!==void 0&&(Array.isArray(g.eq)?this.eq=g.eq.map(f=>f instanceof u?f:new u(f,this)):this.eq=g.eq),g.properties){this.properties={};for(const[f,c]of Object.entries(g.properties))this.properties[f]=c instanceof u?c:new u(c,this)}g.deleted&&(this.deleted=g.deleted),g.prefix&&(this.prefix=g.prefix)}static withPrefix(g){return new u({prefix:g})}tag(...g){return this.find(g)}text(...g){var l;const f=(l=this.find(g))===null||l===void 0?void 0:l.getEq();if(!(f===void 0||Array.isArray(f)))return f instanceof Date?f.toISOString():String(f)}scalarType(...g){var l;const f=g.length>0?(l=this.find(g))===null||l===void 0?void 0:l.getEq():this.getEq();if(!(f===void 0||Array.isArray(f)))return f instanceof Date?"date":typeof f}numeric(...g){var l;const f=(l=this.find(g))===null||l===void 0?void 0:l.getEq();if(typeof f=="number")return f;if(typeof f=="string"){const c=Number.parseFloat(f);if(!Number.isNaN(c))return c}}boolean(...g){var l;const f=(l=this.find(g))===null||l===void 0?void 0:l.getEq();if(typeof f=="boolean")return f}isTrue(...g){var l;return((l=this.find(g))===null||l===void 0?void 0:l.getEq())===!0}isFalse(...g){var l;return((l=this.find(g))===null||l===void 0?void 0:l.getEq())===!1}date(...g){var l;const f=(l=this.find(g))===null||l===void 0?void 0:l.getEq();if(f instanceof Date)return f}bare(...g){const l=this.find(g);if(l!==void 0)return!l.hasProperties()}getEq(){return this.eq}getProperty(g){var l;return(l=this.properties)===null||l===void 0?void 0:l[g]}getArrayElement(g){if(Array.isArray(this.eq)&&g<this.eq.length)return this.eq[g]}get dict(){var g;return(g=this.properties)!==null&&g!==void 0?g:{}}*entries(){if(this.properties)for(const g in this.properties)yield[g,this.properties[g]]}*keys(){if(this.properties)for(const g in this.properties)yield g}hasProperties(){return this.properties!==void 0&&Object.keys(this.properties).length>0}array(...g){const l=this.find(g);if(l===void 0)return;const f=l.getEq();if(Array.isArray(f))return f.map((c,s)=>l.getArrayElement(s))}textArray(...g){const l=this.find(g);if(l===void 0)return;const f=l.getEq();if(Array.isArray(f))return f.reduce((c,s,d)=>{const e=l.getArrayElement(d),w=e?.getEq();return w===void 0||Array.isArray(w)?c:w instanceof Date?c.concat(w.toISOString()):c.concat(String(w))},[])}numericArray(...g){const l=this.find(g);if(l===void 0)return;const f=l.getEq();if(Array.isArray(f))return f.reduce((c,s,d)=>{const e=l.getArrayElement(d),w=e?.getEq();if(typeof w=="number")return c.concat(w);if(typeof w=="string"){const E=Number.parseFloat(w);if(!Number.isNaN(E))return c.concat(E)}return c},[])}getProperties(){return this.properties===void 0&&(this.properties={}),this.properties}clone(g){this._read=!0;const l=new u({},g);if(l.prefix=this.prefix,l.deleted=this.deleted,l.location=this.location,l._clonedFrom=this,this.eq!==void 0&&(Array.isArray(this.eq)?l.eq=this.eq.map(f=>f.clone(l)):l.eq=this.eq instanceof Date?new Date(this.eq):this.eq),this.properties){l.properties={};for(const[f,c]of Object.entries(this.properties))l.properties[f]=c.clone(l)}return l}toJSON(){const g={};if(this.eq!==void 0&&(Array.isArray(this.eq)?g.eq=this.eq.map(l=>l.toJSON()):g.eq=this.eq),this.properties!==void 0){g.properties={};for(const[l,f]of Object.entries(this.properties))g.properties[l]=f.toJSON()}return this.deleted&&(g.deleted=!0),this.prefix&&(g.prefix=this.prefix),this.location&&(g.location=this.location),g}validateReferences(){const g=[];return this.collectReferenceErrors(g,[]),g}collectReferenceErrors(g,l){if(this.properties)for(const[f,c]of Object.entries(this.properties))c.deleted||c.collectReferenceErrors(g,[...l,f]);Array.isArray(this.eq)&&this.eq.forEach((f,c)=>{f.collectReferenceErrors(g,[...l,`[${c}]`])})}static escapeString(g){return g.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n")}static escapeProp(g){return g.replace(/\\/g,"\\\\").replace(/`/g,"\\`")}static quoteAndEscape(g,l=!1){return g.match(/^[0-9A-Za-z_]+$/)?g:l?`\`${u.escapeProp(g)}\``:`"${u.escapeString(g)}"`}static serializeScalar(g){return typeof g=="boolean"?g?"@true":"@false":g instanceof Date?`@${g.toISOString()}`:typeof g=="number"?String(g):u.quoteAndEscape(g)}toString(){var g;let l=(g=this.prefix)!==null&&g!==void 0?g:"# ";function f(d){var e;const w=Object.keys((e=d.properties)!==null&&e!==void 0?e:{});for(let E=0;E<w.length;E++)s(w[E],d.properties[w[E]]),E<w.length-1&&(l+=" ")}function c(d,e=!1){if(d.eq!==void 0)if(e||(l+=" = "),Array.isArray(d.eq)){l+="[";for(let w=0;w<d.eq.length;w++)c(d.eq[w],!0),w!==d.eq.length-1&&(l+=", ");l+="]"}else l+=u.serializeScalar(d.eq);if(d.properties){const w=Object.keys(d.properties);!e&&w.length===1&&!w.some(E=>{var x;return((x=d.properties)!==null&&x!==void 0?x:{})[E].deleted})&&d.eq===void 0?(l+=".",f(d)):((!e||d.eq!==void 0)&&(l+=" "),l+="{ ",f(d),l+=" }")}}function s(d,e){if(e.deleted){l+=`-${u.quoteAndEscape(d,!0)}`;return}l+=u.quoteAndEscape(d,!0),c(e)}return f(this),l+=`
|
|
23
|
-
`,l}find(g){let l=this;for(const f of g){let c;if(typeof f=="number"?c=l.getArrayElement(f):c=l.getProperty(f),c===void 0)return;c.markRead(),l=c}return l.deleted?void 0:l}markRead(){this._read=!0,this._clonedFrom&&(this._clonedFrom._read=!0)}get wasRead(){return this._read}*walk(g=[]){if(this.properties)for(const[l,f]of Object.entries(this.properties)){if(f.deleted)continue;const c=[...g,l];yield{path:c,tag:f},yield*f.walk(c)}if(Array.isArray(this.eq))for(let l=0;l<this.eq.length;l++){const f=[...g,l.toString()];yield{path:f,tag:this.eq[l]},yield*this.eq[l].walk(f)}}resetReadTracking(){this._read=!1;for(const{tag:g}of this.walk())g._read=!1}getUnreadProperties(g=[]){const l=[];if(this.properties)for(const[f,c]of Object.entries(this.properties)){if(c.deleted)continue;const s=[...g,f];c._read?l.push(...c.getUnreadProperties(s)):l.push(s)}return l}has(...g){return this.find(g)!==void 0}set(g,l=null){let f=this,c,s;for(const d of g)if(c=f,s=d,typeof d=="number"){if(f.eq===void 0||!Array.isArray(f.eq))f.eq=Array.from({length:d+1}).map(()=>new u({},f));else if(f.eq.length<=d){const e=f.eq,w=Array.from({length:d+1}).map((E,x)=>x<e.length?e[x]:new u({},f));f.eq=w}f=f.eq[d]}else{const e=f.properties;e===void 0?(f.properties={[d]:new u({},f)},f=f.properties[d]):d in e?(f=e[d],f.deleted&&(f.deleted=!1)):(e[d]=new u({},f),f=e[d])}if(l===null)f.eq=void 0;else if(l instanceof u){const d=l.clone(c);c&&s!==void 0&&(typeof s=="number"&&Array.isArray(c.eq)?c.eq[s]=d:typeof s=="string"&&c.properties&&(c.properties[s]=d))}else typeof l=="string"||typeof l=="number"||typeof l=="boolean"||l instanceof Date?f.eq=l:Array.isArray(l)&&(f.eq=l.map(d=>new u({eq:d},f)));return this}delete(...g){return this.remove(g,!1)}unset(...g){return this.remove(g,!0)}remove(g,l=!1){var f;let c=this;for(const d of g.slice(0,g.length-1))if(typeof d=="number"){if(c.eq===void 0||!Array.isArray(c.eq)){if(!l)return this;c.eq=Array.from({length:d}).map(()=>new u({},c))}else if(c.eq.length<=d){if(!l)return this;const e=c.eq,w=Array.from({length:d}).map((E,x)=>x<e.length?e[x]:new u({},c));c.eq=w}c=c.eq[d]}else{const e=c.properties;if(e===void 0){if(!l)return this;c.properties={[d]:new u({},c)},c=c.properties[d]}else if(d in e)c=e[d];else{if(!l)return this;e[d]=new u({},c),c=e[d]}}const s=g[g.length-1];return typeof s=="string"?c.properties&&s in c.properties?delete c.properties[s]:l&&((f=c.properties)!==null&&f!==void 0||(c.properties={}),c.properties[s]=new u({deleted:!0},c)):Array.isArray(c.eq)&&c.eq.splice(s,1),this}}xt.Tag=u,u.ids=new Map,u.nextTagId=1e3;function M(V){const g={};return V.eq!==void 0&&(Array.isArray(V.eq)?g.eq=V.eq.map(l=>M(l)):g.eq=V.eq),V.properties!==void 0&&(g.properties=z(V.properties)),V.deleted&&(g.deleted=!0),g}function z(V){const g={};for(const[l,f]of Object.entries(V))g[l]=M(f);return g}return xt}var Vt={},tn;function Ji(){if(tn)return Vt;tn=1;var u={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.TagParser=void 0,Vt.parseTag=s,Vt.parseAnnotation=d;const M=Wi(),z=An();function V(e){const w=e.search(/[ \n]/);return w>0?e.slice(w):""}function g(e){return{code:e.code,message:e.message,line:e.begin.line,offset:e.begin.column}}function l(e,w){const E=w.get(e.parseId);if(E)return{url:E.url,range:{start:{line:E.startLine+e.begin.line,character:e.begin.line===0?E.startColumn+e.begin.column:e.begin.column},end:{line:E.startLine+e.end.line,character:e.end.line===0?E.startColumn+e.end.column:e.end.column}}}}function f(e,w,E){if((0,M.isRef)(e))return new z.Tag({deleted:!0},w);const x=new z.Tag({},w);if(e.location&&E&&(x.location=l(e.location,E)),e.eq!==void 0)if(Array.isArray(e.eq))x.eq=e.eq.map(G=>f(G,x,E));else if((0,M.isEnvRef)(e.eq)){const G=u[e.eq.env];G!==void 0&&(x.eq=G)}else e.eq instanceof Date?x.eq=new Date(e.eq):x.eq=e.eq;if(e.properties!==void 0){x.properties={};for(const[G,oe]of Object.entries(e.properties))x.properties[G]=f(oe,x,E)}return e.deleted&&(x.deleted=!0),x}class c{constructor(){this.origins=new Map,this.session=new M.MOTLYSession}parse(w,E){return this.parseSource(w,0,E)}parseAnnotation(w,E){const x=V(w),G=w.length-x.length;return this.parseSource(x,G,E)}parseSource(w,E,x){const{parseId:G,errors:oe}=this.session.parse(w);x&&this.origins.set(G,{url:x.url,startLine:x.startLine,startColumn:x.startColumn+E});const C=oe.map(g);return{tag:new z.Tag,log:C}}finish(){const E=this.session.finish().getValue();return this.session.dispose(),f(E,void 0,this.origins)}}Vt.TagParser=c;function s(e){const w=new c;if(typeof e=="string"){const{log:x}=w.parse(e);return{tag:w.finish(),log:x}}const E=[];for(let x=0;x<e.length;x++){const G=w.parse(e[x]);for(const oe of G.log)E.push({...oe,line:x+oe.line})}return{tag:w.finish(),log:E}}function d(e){const w=new c;if(typeof e=="string"){const{log:x}=w.parseAnnotation(e);return{tag:w.finish(),log:x}}const E=[];for(let x=0;x<e.length;x++){const G=w.parseAnnotation(e[x]);for(const oe of G.log)E.push({...oe,line:x+oe.line})}return{tag:w.finish(),log:E}}return Vt}var ar={},rn;function Xi(){if(rn)return ar;rn=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.parseString=M;var u;(function(z){z[z.Normal=0]="Normal",z[z.ReverseVirgule=1]="ReverseVirgule",z[z.Unicode=2]="Unicode"})(u||(u={}));function M(z,V=""){let g=z.slice(V.length),l=u.Normal;V.length&&(g=g.slice(0,-V.length));let f="",c="";for(const s of g)switch(l){case u.Normal:{s==="\\"?l=u.ReverseVirgule:f+=s;break}case u.ReverseVirgule:{let d=s;if(s==="u"){l=u.Unicode,c="";continue}s==="b"?d="\b":s==="f"?d="\f":s==="n"?d=`
|
|
23
|
+
`,l}find(g){let l=this;for(const f of g){let c;if(typeof f=="number"?c=l.getArrayElement(f):c=l.getProperty(f),c===void 0)return;c.markRead(),l=c}return l.deleted?void 0:l}markRead(){this._read=!0,this._clonedFrom&&(this._clonedFrom._read=!0)}get wasRead(){return this._read}*walk(g=[]){if(this.properties)for(const[l,f]of Object.entries(this.properties)){if(f.deleted)continue;const c=[...g,l];yield{path:c,tag:f},yield*f.walk(c)}if(Array.isArray(this.eq))for(let l=0;l<this.eq.length;l++){const f=[...g,l.toString()];yield{path:f,tag:this.eq[l]},yield*this.eq[l].walk(f)}}resetReadTracking(){this._read=!1;for(const{tag:g}of this.walk())g._read=!1}getUnreadProperties(g=[]){const l=[];if(this.properties)for(const[f,c]of Object.entries(this.properties)){if(c.deleted)continue;const s=[...g,f];c._read?l.push(...c.getUnreadProperties(s)):l.push(s)}return l}has(...g){return this.find(g)!==void 0}set(g,l=null){let f=this,c,s;for(const d of g)if(c=f,s=d,typeof d=="number"){if(f.eq===void 0||!Array.isArray(f.eq))f.eq=Array.from({length:d+1}).map(()=>new u({},f));else if(f.eq.length<=d){const e=f.eq,w=Array.from({length:d+1}).map((E,x)=>x<e.length?e[x]:new u({},f));f.eq=w}f=f.eq[d]}else{const e=f.properties;e===void 0?(f.properties={[d]:new u({},f)},f=f.properties[d]):d in e?(f=e[d],f.deleted&&(f.deleted=!1)):(e[d]=new u({},f),f=e[d])}if(l===null)f.eq=void 0;else if(l instanceof u){const d=l.clone(c);c&&s!==void 0&&(typeof s=="number"&&Array.isArray(c.eq)?c.eq[s]=d:typeof s=="string"&&c.properties&&(c.properties[s]=d))}else typeof l=="string"||typeof l=="number"||typeof l=="boolean"||l instanceof Date?f.eq=l:Array.isArray(l)&&(f.eq=l.map(d=>new u({eq:d},f)));return this}delete(...g){return this.remove(g,!1)}unset(...g){return this.remove(g,!0)}remove(g,l=!1){var f;let c=this;for(const d of g.slice(0,g.length-1))if(typeof d=="number"){if(c.eq===void 0||!Array.isArray(c.eq)){if(!l)return this;c.eq=Array.from({length:d}).map(()=>new u({},c))}else if(c.eq.length<=d){if(!l)return this;const e=c.eq,w=Array.from({length:d}).map((E,x)=>x<e.length?e[x]:new u({},c));c.eq=w}c=c.eq[d]}else{const e=c.properties;if(e===void 0){if(!l)return this;c.properties={[d]:new u({},c)},c=c.properties[d]}else if(d in e)c=e[d];else{if(!l)return this;e[d]=new u({},c),c=e[d]}}const s=g[g.length-1];return typeof s=="string"?c.properties&&s in c.properties?delete c.properties[s]:l&&((f=c.properties)!==null&&f!==void 0||(c.properties={}),c.properties[s]=new u({deleted:!0},c)):Array.isArray(c.eq)&&c.eq.splice(s,1),this}}xt.Tag=u,u.ids=new Map,u.nextTagId=1e3;function M(V){const g={};return V.eq!==void 0&&(Array.isArray(V.eq)?g.eq=V.eq.map(l=>M(l)):g.eq=V.eq),V.properties!==void 0&&(g.properties=z(V.properties)),V.deleted&&(g.deleted=!0),g}function z(V){const g={};for(const[l,f]of Object.entries(V))g[l]=M(f);return g}return xt}var Vt={},tn;function Ji(){if(tn)return Vt;tn=1;var u={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.TagParser=void 0,Vt.parseTag=s,Vt.parseAnnotation=d;const M=Wi(),z=An();function V(e){const w=e.search(/[ \t\r\n]/);return w>0?e.slice(w):""}function g(e){return{code:e.code,message:e.message,line:e.begin.line,offset:e.begin.column}}function l(e,w){const E=w.get(e.parseId);if(E)return{url:E.url,range:{start:{line:E.startLine+e.begin.line,character:e.begin.line===0?E.startColumn+e.begin.column:e.begin.column},end:{line:E.startLine+e.end.line,character:e.end.line===0?E.startColumn+e.end.column:e.end.column}}}}function f(e,w,E){if((0,M.isRef)(e))return new z.Tag({deleted:!0},w);const x=new z.Tag({},w);if(e.location&&E&&(x.location=l(e.location,E)),e.eq!==void 0)if(Array.isArray(e.eq))x.eq=e.eq.map(G=>f(G,x,E));else if((0,M.isEnvRef)(e.eq)){const G=u[e.eq.env];G!==void 0&&(x.eq=G)}else e.eq instanceof Date?x.eq=new Date(e.eq):x.eq=e.eq;if(e.properties!==void 0){x.properties={};for(const[G,oe]of Object.entries(e.properties))x.properties[G]=f(oe,x,E)}return e.deleted&&(x.deleted=!0),x}class c{constructor(){this.origins=new Map,this.session=new M.MOTLYSession}parse(w,E){return this.parseSource(w,0,E)}parseAnnotation(w,E){const x=V(w),G=w.length-x.length;return this.parseSource(x,G,E)}parseSource(w,E,x){const{parseId:G,errors:oe}=this.session.parse(w);x&&this.origins.set(G,{url:x.url,startLine:x.startLine,startColumn:x.startColumn+E});const C=oe.map(g);return{tag:new z.Tag,log:C}}finish(){const E=this.session.finish().getValue();return this.session.dispose(),f(E,void 0,this.origins)}}Vt.TagParser=c;function s(e){const w=new c;if(typeof e=="string"){const{log:x}=w.parse(e);return{tag:w.finish(),log:x}}const E=[];for(let x=0;x<e.length;x++){const G=w.parse(e[x]);for(const oe of G.log)E.push({...oe,line:x+oe.line})}return{tag:w.finish(),log:E}}function d(e){const w=new c;if(typeof e=="string"){const{log:x}=w.parseAnnotation(e);return{tag:w.finish(),log:x}}const E=[];for(let x=0;x<e.length;x++){const G=w.parseAnnotation(e[x]);for(const oe of G.log)E.push({...oe,line:x+oe.line})}return{tag:w.finish(),log:E}}return Vt}var ar={},rn;function Xi(){if(rn)return ar;rn=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.parseString=M;var u;(function(z){z[z.Normal=0]="Normal",z[z.ReverseVirgule=1]="ReverseVirgule",z[z.Unicode=2]="Unicode"})(u||(u={}));function M(z,V=""){let g=z.slice(V.length),l=u.Normal;V.length&&(g=g.slice(0,-V.length));let f="",c="";for(const s of g)switch(l){case u.Normal:{s==="\\"?l=u.ReverseVirgule:f+=s;break}case u.ReverseVirgule:{let d=s;if(s==="u"){l=u.Unicode,c="";continue}s==="b"?d="\b":s==="f"?d="\f":s==="n"?d=`
|
|
24
24
|
`:s==="r"?d="\r":s==="t"&&(d=" "),f+=d,l=u.Normal;break}case u.Unicode:"ABCDEFabcdef0123456789".includes(s)?(c+=s,c.length===4&&(f+=String.fromCharCode(parseInt(c,16)),l=u.Normal)):l=u.Normal}return f}return ar}var nn;function Zi(){return nn||(nn=1,(function(u){var M=pt&&pt.__createBinding||(Object.create?(function(f,c,s,d){d===void 0&&(d=s);var e=Object.getOwnPropertyDescriptor(c,s);(!e||("get"in e?!c.__esModule:e.writable||e.configurable))&&(e={enumerable:!0,get:function(){return c[s]}}),Object.defineProperty(f,d,e)}):(function(f,c,s,d){d===void 0&&(d=s),f[d]=c[s]})),z=pt&&pt.__setModuleDefault||(Object.create?(function(f,c){Object.defineProperty(f,"default",{enumerable:!0,value:c})}):function(f,c){f.default=c}),V=pt&&pt.__exportStar||function(f,c){for(var s in f)s!=="default"&&!Object.prototype.hasOwnProperty.call(c,s)&&M(c,f,s)},g=pt&&pt.__importStar||(function(){var f=function(c){return f=Object.getOwnPropertyNames||function(s){var d=[];for(var e in s)Object.prototype.hasOwnProperty.call(s,e)&&(d[d.length]=e);return d},f(c)};return function(c){if(c&&c.__esModule)return c;var s={};if(c!=null)for(var d=f(c),e=0;e<d.length;e++)d[e]!=="default"&&M(s,c,d[e]);return z(s,c),s}})();Object.defineProperty(u,"__esModule",{value:!0}),u.ParseUtil=u.TagParser=u.parseAnnotation=u.parseTag=void 0,V(An(),u);var l=Ji();Object.defineProperty(u,"parseTag",{enumerable:!0,get:function(){return l.parseTag}}),Object.defineProperty(u,"parseAnnotation",{enumerable:!0,get:function(){return l.parseAnnotation}}),Object.defineProperty(u,"TagParser",{enumerable:!0,get:function(){return l.TagParser}}),u.ParseUtil=g(Xi())})(pt)),pt}var It={},dt={},sn;function Nt(){if(sn)return dt;sn=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.isChainOp=u,dt.isStringCondition=M,dt.isStringFilter=z,dt.isBooleanFilter=V,dt.isNumberFilter=g,dt.isTemporalFilter=l,dt.isFilterExpression=f,dt.isFilterable=c;function u(s){return["and","or",","].includes(s)}function M(s){return["starts","ends","contains","="].includes(s.operator)}function z(s){return typeof s=="object"&&s!==null&&"operator"in s&&typeof s.operator=="string"&&["starts","ends","contains","=","~","null","empty","and","or",",","()"].includes(s.operator)}function V(s){return typeof s=="object"&&s!==null&&"operator"in s&&typeof s.operator=="string"&&["null","true","false","=false","=true"].includes(s.operator)}function g(s){return typeof s=="object"&&s!==null&&"operator"in s&&typeof s.operator=="string"&&["range","<=",">=","!=","=",">","<","and","or","()","null"].includes(s.operator)}function l(s){return typeof s=="object"&&s!==null&&"operator"in s&&typeof s.operator=="string"&&["literal","before","after","to","for","in","and","or","in_last","this","last","next","()","null"].includes(s.operator)}function f(s){return typeof s=="object"&&s!==null&&"operator"in s}function c(s){return["string","number","boolean","timestamp","timestamptz","date"].includes(s)}return dt}var Ht={},an;function es(){return an||(an=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.BooleanFilterExpression=void 0,Ht.BooleanFilterExpression={parse(u){var M;if(u.match(/^\s*$/))return{parsed:null,log:[]};const z={parsed:null,log:[]};let V=u.toLowerCase().trim().replace(/\s\s+/," "),g=!1;if(V.startsWith("not ")&&(g=!0,V=V.slice(4)),V==="true")z.parsed={operator:"true"};else if(V==="=true")z.parsed={operator:"=true"};else if(V==="false")z.parsed={operator:"false"};else if(V==="=false")z.parsed={operator:"=false"};else if(V==="null")z.parsed={operator:"null"};else{const l=u.match(/[^\s]/),f=l&&(M=l.index)!==null&&M!==void 0?M:0;z.log=[{message:`Illegal boolean filter '${V}'. Must be one of true,=true,false,=false,null`,severity:"error",startIndex:f,endIndex:f+u.length-1}]}return g&&z.parsed&&(z.parsed.not=!0),z},unparse(u){return u===null?"":(u.not?"not ":"")+u.operator}}),Ht}var Sr={},ot={},on;function lr(){if(on)return ot;on=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.maybeNot=M,ot.unescape=z,ot.escape=V,ot.matchOp=l,ot.conjoin=c,ot.joinNumbers=s,ot.mkRange=d,ot.mkValues=e,ot.numNot=w,ot.temporalNot=E,ot.joinTemporal=x,ot.timeLiteral=G,ot.mkUnits=oe;const u=Nt();function M(C){const[R,P]=C;return R&&P&&(0,u.isStringFilter)(P)?{...P,not:!0}:P}function z(C){return C.replace(/\\(.)/g,"$1")}function V(C){const R=C.toLowerCase();return R==="null"||R==="empty"?"\\"+C:C.replace(/([,; |()\\%_-])/g,"\\$1")}function g(C){let R=!1,P=!1,N=0,ye=!1;const Se=C.length;for(let Ee=0;Ee<Se;Ee+=1){const xe=C[Ee];if(xe===" "||xe===" "){N+=1;continue}N=0,xe==="%"?(ye=!0,Ee===0&&(R=!0),P=!0):(P=!1,xe==="\\"?Ee+=1:xe==="_"&&(ye=!0))}return{hasLike:ye,percentEnd:P&&Se>1,percentStart:R&&Se>1,endSpace:N}}function l(C){let R=C.trimStart();const{hasLike:P,percentEnd:N,percentStart:ye,endSpace:Se}=g(R);if(Se>0&&(R=R.slice(0,-Se)),P){if(ye&&N){const Ee=R.slice(1,-1);if(!g(Ee).hasLike&&Ee.length>0)return{operator:"contains",values:[z(Ee)]}}else if(N){const Ee=R.slice(0,-1);if(!g(Ee).hasLike)return{operator:"starts",values:[z(Ee)]}}else if(ye){const Ee=R.slice(1);if(!g(Ee).hasLike)return{operator:"ends",values:[z(Ee)]}}return{operator:"~",escaped_values:[R]}}return R.toLowerCase()==="null"?{operator:"null"}:R.toLowerCase()==="empty"?{operator:"empty"}:{operator:"=",values:[z(R)]}}function f(C,R){var P,N;return C.operator===R.operator&&((P=C.not)!==null&&P!==void 0?P:!1)===((N=R.not)!==null&&N!==void 0?N:!1)}function c(C,R,P){if(R=R.toLowerCase(),(0,u.isStringFilter)(C)&&(0,u.isStringFilter)(P)){if(R===","){if(C.operator==="~"&&f(C,P))return{...C,escaped_values:[...C.escaped_values,...P.escaped_values]};if((0,u.isStringCondition)(C)&&f(C,P))return{...C,values:[...C.values,...P.values]}}const N=R===","?",":R==="|"?"or":R===";"?"and":void 0;if(N)return C.operator===N?{...C,members:[...C.members,P]}:{operator:N,members:[C,P]}}return null}function s(C,R,P){if(R=R.toLowerCase(),(0,u.isNumberFilter)(C)&&(0,u.isNumberFilter)(P)){if(R==="or"&&C.operator==="="&&f(C,P)){const N={operator:"=",values:[...C.values,...P.values]};return C.not&&(N.not=!0),N}if(R==="and"||R==="or")return C.operator===R?{...C,members:[...C.members,P]}:{operator:R,members:[C,P]}}return null}function d(C,R,P,N){return{operator:"range",startValue:R,startOperator:C==="("?">":">=",endValue:P,endOperator:N===")"?"<":"<="}}function e(C,R){return{values:[C,...R]}}function w(C,R){return(0,u.isNumberFilter)(C)&&R?C.operator==="="?{operator:"!=",values:C.values}:C.operator==="!="?{operator:"=",values:C.values}:{...C,not:!0}:C}function E(C,R){if((0,u.isTemporalFilter)(C)&&R){if("not"in C){const P={...C};return C.not?delete P.not:P.not=!0,P}return{...C,not:!0}}return C}function x(C,R,P){return R=R.toLowerCase(),(0,u.isTemporalFilter)(C)&&(0,u.isTemporalFilter)(P)&&(R==="and"||R==="or")?C.operator===R?{...C,members:[...C.members,P]}:{operator:R,members:[C,P]}:null}function G(C,R){const P={moment:"literal",literal:C};return R&&(P.units=R),P}function oe(C){switch(C.toLowerCase()){case"second":case"seconds":return"second";case"minute":case"minutes":return"minute";case"hour":case"hours":return"hour";case"day":case"days":return"day";case"week":case"weeks":return"week";case"month":case"months":return"month";case"quarter":case"quarters":return"quarter";case"year":case"years":return"year"}}return ot}var Er,ln;function ts(){if(ln)return Er;ln=1;const{numNot:u,mkRange:M,joinNumbers:z,mkValues:V}=lr();function g(s,d){function e(){this.constructor=s}e.prototype=d.prototype,s.prototype=new e}function l(s,d,e,w){var E=Error.call(this,s);return Object.setPrototypeOf&&Object.setPrototypeOf(E,l.prototype),E.expected=d,E.found=e,E.location=w,E.name="SyntaxError",E}g(l,Error);function f(s,d,e){return e=e||" ",s.length>d?s:(d-=s.length,e+=e.repeat(d),s+e.slice(0,d))}l.prototype.format=function(s){var d="Error: "+this.message;if(this.location){var e=null,w;for(w=0;w<s.length;w++)if(s[w].source===this.location.source){e=s[w].text.split(/\r\n|\n|\r/g);break}var E=this.location.start,x=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(E):E,G=this.location.source+":"+x.line+":"+x.column;if(e){var oe=this.location.end,C=f("",x.line.toString().length," "),R=e[E.line-1],P=E.line===oe.line?oe.column:R.length+1,N=P-E.column||1;d+=`
|
|
25
25
|
--> `+G+`
|
|
26
26
|
`+C+` |
|