diff --git a/dist/bundle.d.ts b/dist/bundle.d.ts index 6d4791372a..b871bcfaac 100644 --- a/dist/bundle.d.ts +++ b/dist/bundle.d.ts @@ -1944,6 +1944,16 @@ export interface ObjectSchemaDefinition exte * @hidden */ groupIdProperty?: PropertyIdentifier; + /** + * The name of a property within {@link ObjectSchemaDefinition.properties} that represents a unique id for a + * parent entity for the object. It is recommended for sync table schemas with a bodyTextProperty to specify an + * a parentIdProperty, which uniquely identifies the entity that groups 1 to multiple rows. Note though that + * specifying a bodyTextProperty does not necessarily require it to be chunked into multiple rows. But if it is, + * a sync table where each row is a partial chunk of a larger document may want to specify a parent id that + * represents the document, while each row's id can be unique to the chunk. + * @hidden + */ + parentIdProperty?: K; /** * The name of the property within {@link ObjectSchemaDefinition.properties} that can be be interpreted as * text representing the body of this entity. diff --git a/dist/bundle.js b/dist/bundle.js index 644af532e8..2221174a49 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,7 +1,7 @@ -"use strict";var Sn=Object.create;var De=Object.defineProperty;var Pn=Object.getOwnPropertyDescriptor;var An=Object.getOwnPropertyNames;var bn=Object.getPrototypeOf,Dn=Object.prototype.hasOwnProperty;var i=(t,e)=>De(t,"name",{value:e,configurable:!0});var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),On=(t,e)=>{for(var r in e)De(t,r,{get:e[r],enumerable:!0})},Tr=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of An(e))!Dn.call(t,o)&&o!==r&&De(t,o,{get:()=>e[o],enumerable:!(a=Pn(e,o))||a.enumerable});return t};var Ne=(t,e,r)=>(r=t!=null?Sn(bn(t)):{},Tr(e||!t||!t.__esModule?De(r,"default",{value:t,enumerable:!0}):r,t)),Fn=t=>Tr(De({},"__esModule",{value:!0}),t);var Ar=E((Ki,Pr)=>{var kn=i(t=>t[0].toLocaleUpperCase()+t.slice(1),"titlecase");Pr.exports=t=>{if(t==null||typeof t.toString!="function")return"";let e=t.toString().trim();if(e==="")return"";if(e.length===1)return e.toLocaleUpperCase();let r=e.match(/[a-zA-Z0-9]+/g);return r?r.map(a=>kn(a)).join(""):e}});var Mr=E((Xi,qe)=>{var Rn=function(){"use strict";function t(u,m){return m!=null&&u instanceof m}i(t,"_instanceof");var e;try{e=Map}catch{e=i(function(){},"nativeMap")}var r;try{r=Set}catch{r=i(function(){},"nativeSet")}var a;try{a=Promise}catch{a=i(function(){},"nativePromise")}function o(u,m,l,A,x){typeof m=="object"&&(l=m.depth,A=m.prototype,x=m.includeNonEnumerable,m=m.circular);var P=[],S=[],d=typeof Buffer<"u";typeof m>"u"&&(m=!0),typeof l>"u"&&(l=1/0);function F(f,g){if(f===null)return null;if(g===0)return f;var b,D;if(typeof f!="object")return f;if(t(f,e))b=new e;else if(t(f,r))b=new r;else if(t(f,a))b=new a(function(w,C){f.then(function(N){w(F(N,g-1))},function(N){C(F(N,g-1))})});else if(o.__isArray(f))b=[];else if(o.__isRegExp(f))b=new RegExp(f.source,c(f)),f.lastIndex&&(b.lastIndex=f.lastIndex);else if(o.__isDate(f))b=new Date(f.getTime());else{if(d&&Buffer.isBuffer(f))return Buffer.allocUnsafe?b=Buffer.allocUnsafe(f.length):b=new Buffer(f.length),f.copy(b),b;t(f,Error)?b=Object.create(f):typeof A>"u"?(D=Object.getPrototypeOf(f),b=Object.create(D)):(b=Object.create(A),D=A)}if(m){var M=P.indexOf(f);if(M!=-1)return S[M];P.push(f),S.push(b)}t(f,e)&&f.forEach(function(w,C){var N=F(C,g-1),G=F(w,g-1);b.set(N,G)}),t(f,r)&&f.forEach(function(w){var C=F(w,g-1);b.add(C)});for(var h in f){var R;D&&(R=Object.getOwnPropertyDescriptor(D,h)),!(R&&R.set==null)&&(b[h]=F(f[h],g-1))}if(Object.getOwnPropertySymbols)for(var V=Object.getOwnPropertySymbols(f),h=0;h{"use strict";Cr.exports=i(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),a=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var n=Object.getOwnPropertySymbols(e);if(n.length!==1||n[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==o||s.enumerable!==!0)return!1}return!0},"hasSymbols")});var Br=E((as,_r)=>{"use strict";var Nr=typeof Symbol<"u"&&Symbol,En=jr();_r.exports=i(function(){return typeof Nr!="function"||typeof Symbol!="function"||typeof Nr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:En()},"hasNativeSymbols")});var Vr=E((os,Ur)=>{"use strict";var Mn="Function.prototype.bind called on incompatible ",Ut=Array.prototype.slice,Cn=Object.prototype.toString,jn="[object Function]";Ur.exports=i(function(e){var r=this;if(typeof r!="function"||Cn.call(r)!==jn)throw new TypeError(Mn+r);for(var a=Ut.call(arguments,1),o,n=i(function(){if(this instanceof o){var u=r.apply(this,a.concat(Ut.call(arguments)));return Object(u)===u?u:this}else return r.apply(e,a.concat(Ut.call(arguments)))},"binder"),s=Math.max(0,r.length-a.length),p=[],y=0;y{"use strict";var Nn=Vr();Ir.exports=Function.prototype.bind||Nn});var Kr=E((ps,Hr)=>{"use strict";var _n=Ge();Hr.exports=_n.call(Function.call,Object.prototype.hasOwnProperty)});var ze=E((cs,$r)=>{"use strict";var O,ge=SyntaxError,Wr=Function,Te=TypeError,Vt=i(function(t){try{return Wr('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),ie=Object.getOwnPropertyDescriptor;if(ie)try{ie({},"")}catch{ie=null}var It=i(function(){throw new Te},"throwTypeError"),Bn=ie?function(){try{return arguments.callee,It}catch{try{return ie(arguments,"callee").get}catch{return It}}}():It,de=Br()(),W=Object.getPrototypeOf||function(t){return t.__proto__},he={},Un=typeof Uint8Array>"u"?O:W(Uint8Array),se={"%AggregateError%":typeof AggregateError>"u"?O:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?O:ArrayBuffer,"%ArrayIteratorPrototype%":de?W([][Symbol.iterator]()):O,"%AsyncFromSyncIteratorPrototype%":O,"%AsyncFunction%":he,"%AsyncGenerator%":he,"%AsyncGeneratorFunction%":he,"%AsyncIteratorPrototype%":he,"%Atomics%":typeof Atomics>"u"?O:Atomics,"%BigInt%":typeof BigInt>"u"?O:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?O:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?O:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?O:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?O:Float32Array,"%Float64Array%":typeof Float64Array>"u"?O:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?O:FinalizationRegistry,"%Function%":Wr,"%GeneratorFunction%":he,"%Int8Array%":typeof Int8Array>"u"?O:Int8Array,"%Int16Array%":typeof Int16Array>"u"?O:Int16Array,"%Int32Array%":typeof Int32Array>"u"?O:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":de?W(W([][Symbol.iterator]())):O,"%JSON%":typeof JSON=="object"?JSON:O,"%Map%":typeof Map>"u"?O:Map,"%MapIteratorPrototype%":typeof Map>"u"||!de?O:W(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?O:Promise,"%Proxy%":typeof Proxy>"u"?O:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?O:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?O:Set,"%SetIteratorPrototype%":typeof Set>"u"||!de?O:W(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?O:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":de?W(""[Symbol.iterator]()):O,"%Symbol%":de?Symbol:O,"%SyntaxError%":ge,"%ThrowTypeError%":Bn,"%TypedArray%":Un,"%TypeError%":Te,"%Uint8Array%":typeof Uint8Array>"u"?O:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?O:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?O:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?O:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?O:WeakMap,"%WeakRef%":typeof WeakRef>"u"?O:WeakRef,"%WeakSet%":typeof WeakSet>"u"?O:WeakSet};try{null.error}catch(t){Lr=W(W(t)),se["%Error.prototype%"]=Lr}var Lr,Vn=i(function t(e){var r;if(e==="%AsyncFunction%")r=Vt("async function () {}");else if(e==="%GeneratorFunction%")r=Vt("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Vt("async function* () {}");else if(e==="%AsyncGenerator%"){var a=t("%AsyncGeneratorFunction%");a&&(r=a.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&(r=W(o.prototype))}return se[e]=r,r},"doEval"),qr={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ve=Ge(),We=Kr(),In=ve.call(Function.call,Array.prototype.concat),Hn=ve.call(Function.apply,Array.prototype.splice),Gr=ve.call(Function.call,String.prototype.replace),$e=ve.call(Function.call,String.prototype.slice),Kn=ve.call(Function.call,RegExp.prototype.exec),Ln=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,qn=/\\(\\)?/g,Gn=i(function(e){var r=$e(e,0,1),a=$e(e,-1);if(r==="%"&&a!=="%")throw new ge("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&r!=="%")throw new ge("invalid intrinsic syntax, expected opening `%`");var o=[];return Gr(e,Ln,function(n,s,p,y){o[o.length]=p?Gr(y,qn,"$1"):s||n}),o},"stringToPath"),Wn=i(function(e,r){var a=e,o;if(We(qr,a)&&(o=qr[a],a="%"+o[0]+"%"),We(se,a)){var n=se[a];if(n===he&&(n=Vn(a)),typeof n>"u"&&!r)throw new Te("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:a,value:n}}throw new ge("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");$r.exports=i(function(e,r){if(typeof e!="string"||e.length===0)throw new Te("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Te('"allowMissing" argument must be a boolean');if(Kn(/^%?[^%]*%?$/,e)===null)throw new ge("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=Gn(e),o=a.length>0?a[0]:"",n=Wn("%"+o+"%",r),s=n.name,p=n.value,y=!1,c=n.alias;c&&(o=c[0],Hn(a,In([0,1],c)));for(var u=1,m=!0;u=a.length){var P=ie(p,l);m=!!P,m&&"get"in P&&!("originalValue"in P.get)?p=P.get:p=p[l]}else m=We(p,l),p=p[l];m&&!y&&(se[s]=p)}}return p},"GetIntrinsic")});var Xr=E((ys,Qe)=>{"use strict";var Ht=Ge(),xe=ze(),Jr=xe("%Function.prototype.apply%"),Yr=xe("%Function.prototype.call%"),Zr=xe("%Reflect.apply%",!0)||Ht.call(Yr,Jr),zr=xe("%Object.getOwnPropertyDescriptor%",!0),pe=xe("%Object.defineProperty%",!0),$n=xe("%Math.max%");if(pe)try{pe({},"a",{value:1})}catch{pe=null}Qe.exports=i(function(e){var r=Zr(Ht,Yr,arguments);if(zr&&pe){var a=zr(r,"length");a.configurable&&pe(r,"length",{value:1+$n(0,e.length-(arguments.length-1))})}return r},"callBind");var Qr=i(function(){return Zr(Ht,Jr,arguments)},"applyBind");pe?pe(Qe.exports,"apply",{value:Qr}):Qe.exports.apply=Qr});var aa=E((ls,ra)=>{"use strict";var ea=ze(),ta=Xr(),zn=ta(ea("String.prototype.indexOf"));ra.exports=i(function(e,r){var a=ea(e,!!r);return typeof a=="function"&&zn(e,".prototype.")>-1?ta(a):a},"callBoundIntrinsic")});var na=E(()=>{});var Da=E((Ts,ba)=>{var Yt=typeof Map=="function"&&Map.prototype,Kt=Object.getOwnPropertyDescriptor&&Yt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ye=Yt&&Kt&&typeof Kt.get=="function"?Kt.get:null,oa=Yt&&Map.prototype.forEach,Zt=typeof Set=="function"&&Set.prototype,Lt=Object.getOwnPropertyDescriptor&&Zt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ze=Zt&&Lt&&typeof Lt.get=="function"?Lt.get:null,ia=Zt&&Set.prototype.forEach,Qn=typeof WeakMap=="function"&&WeakMap.prototype,we=Qn?WeakMap.prototype.has:null,Jn=typeof WeakSet=="function"&&WeakSet.prototype,Re=Jn?WeakSet.prototype.has:null,Yn=typeof WeakRef=="function"&&WeakRef.prototype,sa=Yn?WeakRef.prototype.deref:null,Zn=Boolean.prototype.valueOf,Xn=Object.prototype.toString,eo=Function.prototype.toString,to=String.prototype.match,Xt=String.prototype.slice,ne=String.prototype.replace,ro=String.prototype.toUpperCase,pa=String.prototype.toLowerCase,Ta=RegExp.prototype.test,ca=Array.prototype.concat,$=Array.prototype.join,ao=Array.prototype.slice,ma=Math.floor,Wt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qt=Object.getOwnPropertySymbols,$t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Se=typeof Symbol=="function"&&typeof Symbol.iterator=="object",I=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Se||!0)?Symbol.toStringTag:null,ga=Object.prototype.propertyIsEnumerable,ya=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function ua(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ta.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var a=t<0?-ma(-t):ma(t);if(a!==t){var o=String(a),n=Xt.call(e,o.length+1);return ne.call(o,r,"$&_")+"."+ne.call(ne.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ne.call(e,r,"$&_")}i(ua,"addNumericSeparator");var zt=na(),la=zt.custom,fa=Sa(la)?la:null;ba.exports=i(function t(e,r,a,o){var n=r||{};if(ae(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ae(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ae(n,"customInspect")?n.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ae(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ae(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=n.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Aa(e,n);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var y=String(e);return p?ua(e,y):y}if(typeof e=="bigint"){var c=String(e)+"n";return p?ua(e,c):c}var u=typeof n.depth>"u"?5:n.depth;if(typeof a>"u"&&(a=0),a>=u&&u>0&&typeof e=="object")return Qt(e)?"[Array]":"[Object]";var m=Ao(n,a);if(typeof o>"u")o=[];else if(Pa(o,e)>=0)return"[Circular]";function l(k,T,w){if(T&&(o=ao.call(o),o.push(T)),w){var C={depth:n.depth};return ae(n,"quoteStyle")&&(C.quoteStyle=n.quoteStyle),t(k,C,a+1,o)}return t(k,n,a+1,o)}if(i(l,"inspect"),typeof e=="function"&&!da(e)){var A=uo(e),x=Je(e,l);return"[Function"+(A?": "+A:" (anonymous)")+"]"+(x.length>0?" { "+$.call(x,", ")+" }":"")}if(Sa(e)){var P=Se?ne.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):$t.call(e);return typeof e=="object"&&!Se?ke(P):P}if(xo(e)){for(var S="<"+pa.call(String(e.nodeName)),d=e.attributes||[],F=0;F",S}if(Qt(e)){if(e.length===0)return"[]";var f=Je(e,l);return m&&!Po(f)?"["+Jt(f,m)+"]":"[ "+$.call(f,", ")+" ]"}if(io(e)){var g=Je(e,l);return!("cause"in Error.prototype)&&"cause"in e&&!ga.call(e,"cause")?"{ ["+String(e)+"] "+$.call(ca.call("[cause]: "+l(e.cause),g),", ")+" }":g.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+$.call(g,", ")+" }"}if(typeof e=="object"&&s){if(fa&&typeof e[fa]=="function"&&zt)return zt(e,{depth:u-a});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(lo(e)){var b=[];return oa&&oa.call(e,function(k,T){b.push(l(T,e,!0)+" => "+l(k,e))}),ha("Map",Ye.call(e),b,m)}if(To(e)){var D=[];return ia&&ia.call(e,function(k){D.push(l(k,e))}),ha("Set",Ze.call(e),D,m)}if(fo(e))return Gt("WeakMap");if(go(e))return Gt("WeakSet");if(ho(e))return Gt("WeakRef");if(po(e))return ke(l(Number(e)));if(mo(e))return ke(l(Wt.call(e)));if(co(e))return ke(Zn.call(e));if(so(e))return ke(l(String(e)));if(!oo(e)&&!da(e)){var M=Je(e,l),h=ya?ya(e)===Object.prototype:e instanceof Object||e.constructor===Object,R=e instanceof Object?"":"null prototype",V=!h&&I&&Object(e)===e&&I in e?Xt.call(oe(e),8,-1):R?"Object":"",U=h||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",v=U+(V||R?"["+$.call(ca.call([],V||[],R||[]),": ")+"] ":"");return M.length===0?v+"{}":m?v+"{"+Jt(M,m)+"}":v+"{ "+$.call(M,", ")+" }"}return String(e)},"inspect_");function xa(t,e,r){var a=(r.quoteStyle||e)==="double"?'"':"'";return a+t+a}i(xa,"wrapQuotes");function no(t){return ne.call(String(t),/"/g,""")}i(no,"quote");function Qt(t){return oe(t)==="[object Array]"&&(!I||!(typeof t=="object"&&I in t))}i(Qt,"isArray");function oo(t){return oe(t)==="[object Date]"&&(!I||!(typeof t=="object"&&I in t))}i(oo,"isDate");function da(t){return oe(t)==="[object RegExp]"&&(!I||!(typeof t=="object"&&I in t))}i(da,"isRegExp");function io(t){return oe(t)==="[object Error]"&&(!I||!(typeof t=="object"&&I in t))}i(io,"isError");function so(t){return oe(t)==="[object String]"&&(!I||!(typeof t=="object"&&I in t))}i(so,"isString");function po(t){return oe(t)==="[object Number]"&&(!I||!(typeof t=="object"&&I in t))}i(po,"isNumber");function co(t){return oe(t)==="[object Boolean]"&&(!I||!(typeof t=="object"&&I in t))}i(co,"isBoolean");function Sa(t){if(Se)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!$t)return!1;try{return $t.call(t),!0}catch{}return!1}i(Sa,"isSymbol");function mo(t){if(!t||typeof t!="object"||!Wt)return!1;try{return Wt.call(t),!0}catch{}return!1}i(mo,"isBigInt");var yo=Object.prototype.hasOwnProperty||function(t){return t in this};function ae(t,e){return yo.call(t,e)}i(ae,"has");function oe(t){return Xn.call(t)}i(oe,"toStr");function uo(t){if(t.name)return t.name;var e=to.call(eo.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}i(uo,"nameOf");function Pa(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,a=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,a="... "+r+" more character"+(r>1?"s":"");return Aa(Xt.call(t,0,e.maxStringLength),e)+a}var o=ne.call(ne.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,So);return xa(o,"single",e)}i(Aa,"inspectString");function So(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+ro.call(e.toString(16))}i(So,"lowbyte");function ke(t){return"Object("+t+")"}i(ke,"markBoxed");function Gt(t){return t+" { ? }"}i(Gt,"weakCollectionOf");function ha(t,e,r,a){var o=a?Jt(r,a):$.call(r,", ");return t+" ("+e+") {"+o+"}"}i(ha,"collectionOf");function Po(t){for(var e=0;e=0)return!1;return!0}i(Po,"singleLineValues");function Ao(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=$.call(Array(t.indent+1)," ");else return null;return{base:r,prev:$.call(Array(e+1),r)}}i(Ao,"getIndent");function Jt(t,e){if(t.length===0)return"";var r=` +"use strict";var Pn=Object.create;var De=Object.defineProperty;var An=Object.getOwnPropertyDescriptor;var bn=Object.getOwnPropertyNames;var Dn=Object.getPrototypeOf,On=Object.prototype.hasOwnProperty;var i=(t,e)=>De(t,"name",{value:e,configurable:!0});var M=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Fn=(t,e)=>{for(var r in e)De(t,r,{get:e[r],enumerable:!0})},Tr=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of bn(e))!On.call(t,o)&&o!==r&&De(t,o,{get:()=>e[o],enumerable:!(a=An(e,o))||a.enumerable});return t};var Ne=(t,e,r)=>(r=t!=null?Pn(Dn(t)):{},Tr(e||!t||!t.__esModule?De(r,"default",{value:t,enumerable:!0}):r,t)),vn=t=>Tr(De({},"__esModule",{value:!0}),t);var Ar=M((Li,Pr)=>{var wn=i(t=>t[0].toLocaleUpperCase()+t.slice(1),"titlecase");Pr.exports=t=>{if(t==null||typeof t.toString!="function")return"";let e=t.toString().trim();if(e==="")return"";if(e.length===1)return e.toLocaleUpperCase();let r=e.match(/[a-zA-Z0-9]+/g);return r?r.map(a=>wn(a)).join(""):e}});var Mr=M((es,qe)=>{var En=function(){"use strict";function t(u,m){return m!=null&&u instanceof m}i(t,"_instanceof");var e;try{e=Map}catch{e=i(function(){},"nativeMap")}var r;try{r=Set}catch{r=i(function(){},"nativeSet")}var a;try{a=Promise}catch{a=i(function(){},"nativePromise")}function o(u,m,l,b,x){typeof m=="object"&&(l=m.depth,b=m.prototype,x=m.includeNonEnumerable,m=m.circular);var A=[],S=[],d=typeof Buffer<"u";typeof m>"u"&&(m=!0),typeof l>"u"&&(l=1/0);function F(f,g){if(f===null)return null;if(g===0)return f;var P,D;if(typeof f!="object")return f;if(t(f,e))P=new e;else if(t(f,r))P=new r;else if(t(f,a))P=new a(function(R,k){f.then(function(G){R(F(G,g-1))},function(G){k(F(G,g-1))})});else if(o.__isArray(f))P=[];else if(o.__isRegExp(f))P=new RegExp(f.source,c(f)),f.lastIndex&&(P.lastIndex=f.lastIndex);else if(o.__isDate(f))P=new Date(f.getTime());else{if(d&&Buffer.isBuffer(f))return Buffer.allocUnsafe?P=Buffer.allocUnsafe(f.length):P=new Buffer(f.length),f.copy(P),P;t(f,Error)?P=Object.create(f):typeof b>"u"?(D=Object.getPrototypeOf(f),P=Object.create(D)):(P=Object.create(b),D=b)}if(m){var j=A.indexOf(f);if(j!=-1)return S[j];A.push(f),S.push(P)}t(f,e)&&f.forEach(function(R,k){var G=F(k,g-1),H=F(R,g-1);P.set(G,H)}),t(f,r)&&f.forEach(function(R){var k=F(R,g-1);P.add(k)});for(var h in f){var E;D&&(E=Object.getOwnPropertyDescriptor(D,h)),!(E&&E.set==null)&&(P[h]=F(f[h],g-1))}if(Object.getOwnPropertySymbols)for(var U=Object.getOwnPropertySymbols(f),h=0;h{"use strict";Cr.exports=i(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),a=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(a)!=="[object Symbol]")return!1;var o=42;e[r]=o;for(r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var n=Object.getOwnPropertySymbols(e);if(n.length!==1||n[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,r);if(s.value!==o||s.enumerable!==!0)return!1}return!0},"hasSymbols")});var Br=M((ns,_r)=>{"use strict";var Nr=typeof Symbol<"u"&&Symbol,Mn=jr();_r.exports=i(function(){return typeof Nr!="function"||typeof Symbol!="function"||typeof Nr("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Mn()},"hasNativeSymbols")});var Vr=M((is,Ur)=>{"use strict";var Cn="Function.prototype.bind called on incompatible ",Ut=Array.prototype.slice,jn=Object.prototype.toString,Nn="[object Function]";Ur.exports=i(function(e){var r=this;if(typeof r!="function"||jn.call(r)!==Nn)throw new TypeError(Cn+r);for(var a=Ut.call(arguments,1),o,n=i(function(){if(this instanceof o){var u=r.apply(this,a.concat(Ut.call(arguments)));return Object(u)===u?u:this}else return r.apply(e,a.concat(Ut.call(arguments)))},"binder"),s=Math.max(0,r.length-a.length),p=[],y=0;y{"use strict";var _n=Vr();Ir.exports=Function.prototype.bind||_n});var Kr=M((cs,Hr)=>{"use strict";var Bn=Ge();Hr.exports=Bn.call(Function.call,Object.prototype.hasOwnProperty)});var ze=M((ms,$r)=>{"use strict";var O,xe=SyntaxError,Wr=Function,ge=TypeError,Vt=i(function(t){try{return Wr('"use strict"; return ('+t+").constructor;")()}catch{}},"getEvalledConstructor"),ie=Object.getOwnPropertyDescriptor;if(ie)try{ie({},"")}catch{ie=null}var It=i(function(){throw new ge},"throwTypeError"),Un=ie?function(){try{return arguments.callee,It}catch{try{return ie(arguments,"callee").get}catch{return It}}}():It,he=Br()(),W=Object.getPrototypeOf||function(t){return t.__proto__},Te={},Vn=typeof Uint8Array>"u"?O:W(Uint8Array),se={"%AggregateError%":typeof AggregateError>"u"?O:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?O:ArrayBuffer,"%ArrayIteratorPrototype%":he?W([][Symbol.iterator]()):O,"%AsyncFromSyncIteratorPrototype%":O,"%AsyncFunction%":Te,"%AsyncGenerator%":Te,"%AsyncGeneratorFunction%":Te,"%AsyncIteratorPrototype%":Te,"%Atomics%":typeof Atomics>"u"?O:Atomics,"%BigInt%":typeof BigInt>"u"?O:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?O:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?O:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?O:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?O:Float32Array,"%Float64Array%":typeof Float64Array>"u"?O:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?O:FinalizationRegistry,"%Function%":Wr,"%GeneratorFunction%":Te,"%Int8Array%":typeof Int8Array>"u"?O:Int8Array,"%Int16Array%":typeof Int16Array>"u"?O:Int16Array,"%Int32Array%":typeof Int32Array>"u"?O:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":he?W(W([][Symbol.iterator]())):O,"%JSON%":typeof JSON=="object"?JSON:O,"%Map%":typeof Map>"u"?O:Map,"%MapIteratorPrototype%":typeof Map>"u"||!he?O:W(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?O:Promise,"%Proxy%":typeof Proxy>"u"?O:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?O:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?O:Set,"%SetIteratorPrototype%":typeof Set>"u"||!he?O:W(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?O:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":he?W(""[Symbol.iterator]()):O,"%Symbol%":he?Symbol:O,"%SyntaxError%":xe,"%ThrowTypeError%":Un,"%TypedArray%":Vn,"%TypeError%":ge,"%Uint8Array%":typeof Uint8Array>"u"?O:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?O:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?O:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?O:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?O:WeakMap,"%WeakRef%":typeof WeakRef>"u"?O:WeakRef,"%WeakSet%":typeof WeakSet>"u"?O:WeakSet};try{null.error}catch(t){Lr=W(W(t)),se["%Error.prototype%"]=Lr}var Lr,In=i(function t(e){var r;if(e==="%AsyncFunction%")r=Vt("async function () {}");else if(e==="%GeneratorFunction%")r=Vt("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Vt("async function* () {}");else if(e==="%AsyncGenerator%"){var a=t("%AsyncGeneratorFunction%");a&&(r=a.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&(r=W(o.prototype))}return se[e]=r,r},"doEval"),qr={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ve=Ge(),We=Kr(),Hn=ve.call(Function.call,Array.prototype.concat),Kn=ve.call(Function.apply,Array.prototype.splice),Gr=ve.call(Function.call,String.prototype.replace),$e=ve.call(Function.call,String.prototype.slice),Ln=ve.call(Function.call,RegExp.prototype.exec),qn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Gn=/\\(\\)?/g,Wn=i(function(e){var r=$e(e,0,1),a=$e(e,-1);if(r==="%"&&a!=="%")throw new xe("invalid intrinsic syntax, expected closing `%`");if(a==="%"&&r!=="%")throw new xe("invalid intrinsic syntax, expected opening `%`");var o=[];return Gr(e,qn,function(n,s,p,y){o[o.length]=p?Gr(y,Gn,"$1"):s||n}),o},"stringToPath"),$n=i(function(e,r){var a=e,o;if(We(qr,a)&&(o=qr[a],a="%"+o[0]+"%"),We(se,a)){var n=se[a];if(n===Te&&(n=In(a)),typeof n>"u"&&!r)throw new ge("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:a,value:n}}throw new xe("intrinsic "+e+" does not exist!")},"getBaseIntrinsic");$r.exports=i(function(e,r){if(typeof e!="string"||e.length===0)throw new ge("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ge('"allowMissing" argument must be a boolean');if(Ln(/^%?[^%]*%?$/,e)===null)throw new xe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var a=Wn(e),o=a.length>0?a[0]:"",n=$n("%"+o+"%",r),s=n.name,p=n.value,y=!1,c=n.alias;c&&(o=c[0],Kn(a,Hn([0,1],c)));for(var u=1,m=!0;u=a.length){var A=ie(p,l);m=!!A,m&&"get"in A&&!("originalValue"in A.get)?p=A.get:p=p[l]}else m=We(p,l),p=p[l];m&&!y&&(se[s]=p)}}return p},"GetIntrinsic")});var Xr=M((us,Qe)=>{"use strict";var Ht=Ge(),Se=ze(),Jr=Se("%Function.prototype.apply%"),Yr=Se("%Function.prototype.call%"),Zr=Se("%Reflect.apply%",!0)||Ht.call(Yr,Jr),zr=Se("%Object.getOwnPropertyDescriptor%",!0),pe=Se("%Object.defineProperty%",!0),zn=Se("%Math.max%");if(pe)try{pe({},"a",{value:1})}catch{pe=null}Qe.exports=i(function(e){var r=Zr(Ht,Yr,arguments);if(zr&&pe){var a=zr(r,"length");a.configurable&&pe(r,"length",{value:1+zn(0,e.length-(arguments.length-1))})}return r},"callBind");var Qr=i(function(){return Zr(Ht,Jr,arguments)},"applyBind");pe?pe(Qe.exports,"apply",{value:Qr}):Qe.exports.apply=Qr});var aa=M((fs,ra)=>{"use strict";var ea=ze(),ta=Xr(),Qn=ta(ea("String.prototype.indexOf"));ra.exports=i(function(e,r){var a=ea(e,!!r);return typeof a=="function"&&Qn(e,".prototype.")>-1?ta(a):a},"callBoundIntrinsic")});var na=M(()=>{});var Da=M((gs,ba)=>{var Yt=typeof Map=="function"&&Map.prototype,Kt=Object.getOwnPropertyDescriptor&&Yt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ye=Yt&&Kt&&typeof Kt.get=="function"?Kt.get:null,oa=Yt&&Map.prototype.forEach,Zt=typeof Set=="function"&&Set.prototype,Lt=Object.getOwnPropertyDescriptor&&Zt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ze=Zt&&Lt&&typeof Lt.get=="function"?Lt.get:null,ia=Zt&&Set.prototype.forEach,Jn=typeof WeakMap=="function"&&WeakMap.prototype,we=Jn?WeakMap.prototype.has:null,Yn=typeof WeakSet=="function"&&WeakSet.prototype,Re=Yn?WeakSet.prototype.has:null,Zn=typeof WeakRef=="function"&&WeakRef.prototype,sa=Zn?WeakRef.prototype.deref:null,Xn=Boolean.prototype.valueOf,eo=Object.prototype.toString,to=Function.prototype.toString,ro=String.prototype.match,Xt=String.prototype.slice,ne=String.prototype.replace,ao=String.prototype.toUpperCase,pa=String.prototype.toLowerCase,Ta=RegExp.prototype.test,ca=Array.prototype.concat,$=Array.prototype.join,no=Array.prototype.slice,ma=Math.floor,Wt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qt=Object.getOwnPropertySymbols,$t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Pe=typeof Symbol=="function"&&typeof Symbol.iterator=="object",V=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Pe||!0)?Symbol.toStringTag:null,ga=Object.prototype.propertyIsEnumerable,ya=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function ua(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ta.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var a=t<0?-ma(-t):ma(t);if(a!==t){var o=String(a),n=Xt.call(e,o.length+1);return ne.call(o,r,"$&_")+"."+ne.call(ne.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ne.call(e,r,"$&_")}i(ua,"addNumericSeparator");var zt=na(),la=zt.custom,fa=Sa(la)?la:null;ba.exports=i(function t(e,r,a,o){var n=r||{};if(ae(n,"quoteStyle")&&n.quoteStyle!=="single"&&n.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ae(n,"maxStringLength")&&(typeof n.maxStringLength=="number"?n.maxStringLength<0&&n.maxStringLength!==1/0:n.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=ae(n,"customInspect")?n.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ae(n,"indent")&&n.indent!==null&&n.indent!==" "&&!(parseInt(n.indent,10)===n.indent&&n.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ae(n,"numericSeparator")&&typeof n.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=n.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Aa(e,n);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var y=String(e);return p?ua(e,y):y}if(typeof e=="bigint"){var c=String(e)+"n";return p?ua(e,c):c}var u=typeof n.depth>"u"?5:n.depth;if(typeof a>"u"&&(a=0),a>=u&&u>0&&typeof e=="object")return Qt(e)?"[Array]":"[Object]";var m=bo(n,a);if(typeof o>"u")o=[];else if(Pa(o,e)>=0)return"[Circular]";function l(w,T,R){if(T&&(o=no.call(o),o.push(T)),R){var k={depth:n.depth};return ae(n,"quoteStyle")&&(k.quoteStyle=n.quoteStyle),t(w,k,a+1,o)}return t(w,n,a+1,o)}if(i(l,"inspect"),typeof e=="function"&&!da(e)){var b=lo(e),x=Je(e,l);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(x.length>0?" { "+$.call(x,", ")+" }":"")}if(Sa(e)){var A=Pe?ne.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):$t.call(e);return typeof e=="object"&&!Pe?ke(A):A}if(So(e)){for(var S="<"+pa.call(String(e.nodeName)),d=e.attributes||[],F=0;F",S}if(Qt(e)){if(e.length===0)return"[]";var f=Je(e,l);return m&&!Ao(f)?"["+Jt(f,m)+"]":"[ "+$.call(f,", ")+" ]"}if(so(e)){var g=Je(e,l);return!("cause"in Error.prototype)&&"cause"in e&&!ga.call(e,"cause")?"{ ["+String(e)+"] "+$.call(ca.call("[cause]: "+l(e.cause),g),", ")+" }":g.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+$.call(g,", ")+" }"}if(typeof e=="object"&&s){if(fa&&typeof e[fa]=="function"&&zt)return zt(e,{depth:u-a});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(fo(e)){var P=[];return oa&&oa.call(e,function(w,T){P.push(l(T,e,!0)+" => "+l(w,e))}),ha("Map",Ye.call(e),P,m)}if(go(e)){var D=[];return ia&&ia.call(e,function(w){D.push(l(w,e))}),ha("Set",Ze.call(e),D,m)}if(ho(e))return Gt("WeakMap");if(xo(e))return Gt("WeakSet");if(To(e))return Gt("WeakRef");if(co(e))return ke(l(Number(e)));if(yo(e))return ke(l(Wt.call(e)));if(mo(e))return ke(Xn.call(e));if(po(e))return ke(l(String(e)));if(!io(e)&&!da(e)){var j=Je(e,l),h=ya?ya(e)===Object.prototype:e instanceof Object||e.constructor===Object,E=e instanceof Object?"":"null prototype",U=!h&&V&&Object(e)===e&&V in e?Xt.call(oe(e),8,-1):E?"Object":"",B=h||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",v=B+(U||E?"["+$.call(ca.call([],U||[],E||[]),": ")+"] ":"");return j.length===0?v+"{}":m?v+"{"+Jt(j,m)+"}":v+"{ "+$.call(j,", ")+" }"}return String(e)},"inspect_");function xa(t,e,r){var a=(r.quoteStyle||e)==="double"?'"':"'";return a+t+a}i(xa,"wrapQuotes");function oo(t){return ne.call(String(t),/"/g,""")}i(oo,"quote");function Qt(t){return oe(t)==="[object Array]"&&(!V||!(typeof t=="object"&&V in t))}i(Qt,"isArray");function io(t){return oe(t)==="[object Date]"&&(!V||!(typeof t=="object"&&V in t))}i(io,"isDate");function da(t){return oe(t)==="[object RegExp]"&&(!V||!(typeof t=="object"&&V in t))}i(da,"isRegExp");function so(t){return oe(t)==="[object Error]"&&(!V||!(typeof t=="object"&&V in t))}i(so,"isError");function po(t){return oe(t)==="[object String]"&&(!V||!(typeof t=="object"&&V in t))}i(po,"isString");function co(t){return oe(t)==="[object Number]"&&(!V||!(typeof t=="object"&&V in t))}i(co,"isNumber");function mo(t){return oe(t)==="[object Boolean]"&&(!V||!(typeof t=="object"&&V in t))}i(mo,"isBoolean");function Sa(t){if(Pe)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!$t)return!1;try{return $t.call(t),!0}catch{}return!1}i(Sa,"isSymbol");function yo(t){if(!t||typeof t!="object"||!Wt)return!1;try{return Wt.call(t),!0}catch{}return!1}i(yo,"isBigInt");var uo=Object.prototype.hasOwnProperty||function(t){return t in this};function ae(t,e){return uo.call(t,e)}i(ae,"has");function oe(t){return eo.call(t)}i(oe,"toStr");function lo(t){if(t.name)return t.name;var e=ro.call(to.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}i(lo,"nameOf");function Pa(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,a=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,a="... "+r+" more character"+(r>1?"s":"");return Aa(Xt.call(t,0,e.maxStringLength),e)+a}var o=ne.call(ne.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Po);return xa(o,"single",e)}i(Aa,"inspectString");function Po(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+ao.call(e.toString(16))}i(Po,"lowbyte");function ke(t){return"Object("+t+")"}i(ke,"markBoxed");function Gt(t){return t+" { ? }"}i(Gt,"weakCollectionOf");function ha(t,e,r,a){var o=a?Jt(r,a):$.call(r,", ");return t+" ("+e+") {"+o+"}"}i(ha,"collectionOf");function Ao(t){for(var e=0;e=0)return!1;return!0}i(Ao,"singleLineValues");function bo(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=$.call(Array(t.indent+1)," ");else return null;return{base:r,prev:$.call(Array(e+1),r)}}i(bo,"getIndent");function Jt(t,e){if(t.length===0)return"";var r=` `+e.prev+e.base;return r+$.call(t,","+r)+` -`+e.prev}i(Jt,"indentedJoin");function Je(t,e){var r=Qt(t),a=[];if(r){a.length=t.length;for(var o=0;o{"use strict";var er=ze(),Pe=aa(),bo=Da(),Do=er("%TypeError%"),Xe=er("%WeakMap%",!0),et=er("%Map%",!0),Oo=Pe("WeakMap.prototype.get",!0),Fo=Pe("WeakMap.prototype.set",!0),vo=Pe("WeakMap.prototype.has",!0),ko=Pe("Map.prototype.get",!0),wo=Pe("Map.prototype.set",!0),Ro=Pe("Map.prototype.has",!0),tr=i(function(t,e){for(var r=t,a;(a=r.next)!==null;r=a)if(a.key===e)return r.next=a.next,a.next=t.next,t.next=a,a},"listGetNode"),Eo=i(function(t,e){var r=tr(t,e);return r&&r.value},"listGet"),Mo=i(function(t,e,r){var a=tr(t,e);a?a.value=r:t.next={key:e,next:t.next,value:r}},"listSet"),Co=i(function(t,e){return!!tr(t,e)},"listHas");Oa.exports=i(function(){var e,r,a,o={assert:function(n){if(!o.has(n))throw new Do("Side channel does not contain "+bo(n))},get:function(n){if(Xe&&n&&(typeof n=="object"||typeof n=="function")){if(e)return Oo(e,n)}else if(et){if(r)return ko(r,n)}else if(a)return Eo(a,n)},has:function(n){if(Xe&&n&&(typeof n=="object"||typeof n=="function")){if(e)return vo(e,n)}else if(et){if(r)return Ro(r,n)}else if(a)return Co(a,n);return!1},set:function(n,s){Xe&&n&&(typeof n=="object"||typeof n=="function")?(e||(e=new Xe),Fo(e,n,s)):et?(r||(r=new et),wo(r,n,s)):(a||(a={key:{},next:null}),Mo(a,n,s))}};return o},"getSideChannel")});var tt=E((Ps,va)=>{"use strict";var jo=String.prototype.replace,No=/%20/g,rr={RFC1738:"RFC1738",RFC3986:"RFC3986"};va.exports={default:rr.RFC3986,formatters:{RFC1738:function(t){return jo.call(t,No,"+")},RFC3986:function(t){return String(t)}},RFC1738:rr.RFC1738,RFC3986:rr.RFC3986}});var nr=E((As,wa)=>{"use strict";var _o=tt(),ar=Object.prototype.hasOwnProperty,ce=Array.isArray,z=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Bo=i(function(e){for(;e.length>1;){var r=e.pop(),a=r.obj[r.prop];if(ce(a)){for(var o=[],n=0;n=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||n===_o.RFC1738&&(c===40||c===41)){p+=s.charAt(y);continue}if(c<128){p=p+z[c];continue}if(c<2048){p=p+(z[192|c>>6]+z[128|c&63]);continue}if(c<55296||c>=57344){p=p+(z[224|c>>12]+z[128|c>>6&63]+z[128|c&63]);continue}y+=1,c=65536+((c&1023)<<10|s.charCodeAt(y)&1023),p+=z[240|c>>18]+z[128|c>>12&63]+z[128|c>>6&63]+z[128|c&63]}return p},"encode"),Ko=i(function(e){for(var r=[{obj:{o:e},prop:"o"}],a=[],o=0;o{"use strict";var Ma=Fa(),rt=nr(),Ee=tt(),$o=Object.prototype.hasOwnProperty,Ra={brackets:i(function(e){return e+"[]"},"brackets"),comma:"comma",indices:i(function(e,r){return e+"["+r+"]"},"indices"),repeat:i(function(e){return e},"repeat")},ee=Array.isArray,zo=Array.prototype.push,Ca=i(function(t,e){zo.apply(t,ee(e)?e:[e])},"pushToArray"),Qo=Date.prototype.toISOString,Ea=Ee.default,H={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:rt.encode,encodeValuesOnly:!1,format:Ea,formatter:Ee.formatters[Ea],indices:!1,serializeDate:i(function(e){return Qo.call(e)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},Jo=i(function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},"isNonNullishPrimitive"),or={},Yo=i(function t(e,r,a,o,n,s,p,y,c,u,m,l,A,x,P,S){for(var d=e,F=S,f=0,g=!1;(F=F.get(or))!==void 0&&!g;){var b=F.get(e);if(f+=1,typeof b<"u"){if(b===f)throw new RangeError("Cyclic object value");g=!0}typeof F.get(or)>"u"&&(f=0)}if(typeof y=="function"?d=y(r,d):d instanceof Date?d=m(d):a==="comma"&&ee(d)&&(d=rt.maybeMap(d,function(C){return C instanceof Date?m(C):C})),d===null){if(n)return p&&!x?p(r,H.encoder,P,"key",l):r;d=""}if(Jo(d)||rt.isBuffer(d)){if(p){var D=x?r:p(r,H.encoder,P,"key",l);return[A(D)+"="+A(p(d,H.encoder,P,"value",l))]}return[A(r)+"="+A(String(d))]}var M=[];if(typeof d>"u")return M;var h;if(a==="comma"&&ee(d))x&&p&&(d=rt.maybeMap(d,p)),h=[{value:d.length>0?d.join(",")||null:void 0}];else if(ee(y))h=y;else{var R=Object.keys(d);h=c?R.sort(c):R}for(var V=o&&ee(d)&&d.length===1?r+"[]":r,U=0;U"u"?H.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:H.charsetSentinel,delimiter:typeof e.delimiter>"u"?H.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:H.encode,encoder:typeof e.encoder=="function"?e.encoder:H.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:H.encodeValuesOnly,filter:n,format:a,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:H.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:H.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:H.strictNullHandling}},"normalizeStringifyOptions");ja.exports=function(t,e){var r=t,a=Zo(e),o,n;typeof a.filter=="function"?(n=a.filter,r=n("",r)):ee(a.filter)&&(n=a.filter,o=n);var s=[];if(typeof r!="object"||r===null)return"";var p;e&&e.arrayFormat in Ra?p=e.arrayFormat:e&&"indices"in e?p=e.indices?"indices":"repeat":p="indices";var y=Ra[p];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=y==="comma"&&e&&e.commaRoundTrip;o||(o=Object.keys(r)),a.sort&&o.sort(a.sort);for(var u=Ma(),m=0;m0?x+A:""}});var Ua=E((Fs,Ba)=>{"use strict";var Ae=nr(),ir=Object.prototype.hasOwnProperty,Xo=Array.isArray,B={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ae.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},ei=i(function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},"interpretNumericEntities"),_a=i(function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},"parseArrayValue"),ti="utf8=%26%2310003%3B",ri="utf8=%E2%9C%93",ai=i(function(e,r){var a={__proto__:null},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,n=r.parameterLimit===1/0?void 0:r.parameterLimit,s=o.split(r.delimiter,n),p=-1,y,c=r.charset;if(r.charsetSentinel)for(y=0;y-1&&(x=Xo(x)?[x]:x),ir.call(a,A)?a[A]=Ae.combine(a[A],x):a[A]=x}return a},"parseQueryStringValues"),ni=i(function(t,e,r,a){for(var o=a?e:_a(e,r),n=t.length-1;n>=0;--n){var s,p=t[n];if(p==="[]"&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var y=p.charAt(0)==="["&&p.charAt(p.length-1)==="]"?p.slice(1,-1):p,c=parseInt(y,10);!r.parseArrays&&y===""?s={0:o}:!isNaN(c)&&p!==y&&String(c)===y&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(s=[],s[c]=o):y!=="__proto__"&&(s[y]=o)}o=s}return o},"parseObject"),oi=i(function(e,r,a,o){if(e){var n=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,p=/(\[[^[\]]*])/g,y=a.depth>0&&s.exec(n),c=y?n.slice(0,y.index):n,u=[];if(c){if(!a.plainObjects&&ir.call(Object.prototype,c)&&!a.allowPrototypes)return;u.push(c)}for(var m=0;a.depth>0&&(y=p.exec(n))!==null&&m"u"?B.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?B.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:B.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:B.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:B.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:B.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:B.comma,decoder:typeof e.decoder=="function"?e.decoder:B.decoder,delimiter:typeof e.delimiter=="string"||Ae.isRegExp(e.delimiter)?e.delimiter:B.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:B.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:B.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:B.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:B.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:B.strictNullHandling}},"normalizeParseOptions");Ba.exports=function(t,e){var r=ii(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var a=typeof t=="string"?ai(t,r):t,o=r.plainObjects?Object.create(null):{},n=Object.keys(a),s=0;s{"use strict";var si=Na(),pi=Ua(),ci=tt();Va.exports={formats:ci,parse:pi,stringify:si}});var Ka=E((ws,Ha)=>{"use strict";Ha.exports=i(function(e,r){if(r=r.split(":")[0],e=+e,!e)return!1;switch(r){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0},"required")});var Ga=E(sr=>{"use strict";var mi=Object.prototype.hasOwnProperty,yi;function La(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}i(La,"decode");function qa(t){try{return encodeURIComponent(t)}catch{return null}}i(qa,"encode");function ui(t){for(var e=/([^=?#&]+)=?([^&]*)/g,r={},a;a=e.exec(t);){var o=La(a[1]),n=La(a[2]);o===null||n===null||o in r||(r[o]=n)}return r}i(ui,"querystring");function li(t,e){e=e||"";var r=[],a,o;typeof e!="string"&&(e="?");for(o in t)if(mi.call(t,o)){if(a=t[o],!a&&(a===null||a===yi||isNaN(a))&&(a=""),o=qa(o),a=qa(a),o===null||a===null)continue;r.push(o+"="+a)}return r.length?e+r.join("&"):""}i(li,"querystringify");sr.stringify=li;sr.parse=ui});var Xa=E((Cs,Za)=>{"use strict";var $a=Ka(),at=Ga(),fi=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,za=/[\n\r\t]/g,di=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Qa=/:\d+$/,hi=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Ti=/^[a-zA-Z]:/;function cr(t){return(t||"").toString().replace(fi,"")}i(cr,"trimLeft");var pr=[["#","hash"],["?","query"],i(function(e,r){return Q(r.protocol)?e.replace(/\\/g,"/"):e},"sanitize"),["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Wa={hash:1,query:1};function Ja(t){var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e={};var r=e.location||{};t=t||r;var a={},o=typeof t,n;if(t.protocol==="blob:")a=new J(unescape(t.pathname),{});else if(o==="string"){a=new J(t,{});for(n in Wa)delete a[n]}else if(o==="object"){for(n in t)n in Wa||(a[n]=t[n]);a.slashes===void 0&&(a.slashes=di.test(t.href))}return a}i(Ja,"lolcation");function Q(t){return t==="file:"||t==="ftp:"||t==="http:"||t==="https:"||t==="ws:"||t==="wss:"}i(Q,"isSpecial");function Ya(t,e){t=cr(t),t=t.replace(za,""),e=e||{};var r=hi.exec(t),a=r[1]?r[1].toLowerCase():"",o=!!r[2],n=!!r[3],s=0,p;return o?n?(p=r[2]+r[3]+r[4],s=r[2].length+r[3].length):(p=r[2]+r[4],s=r[2].length):n?(p=r[3]+r[4],s=r[3].length):p=r[4],a==="file:"?s>=2&&(p=p.slice(2)):Q(a)?p=r[4]:a?o&&(p=p.slice(2)):s>=2&&Q(e.protocol)&&(p=r[4]),{protocol:a,slashes:o||Q(a),slashesCount:s,rest:p}}i(Ya,"extractProtocol");function gi(t,e){if(t==="")return e;for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),a=r.length,o=r[a-1],n=!1,s=0;a--;)r[a]==="."?r.splice(a,1):r[a]===".."?(r.splice(a,1),s++):s&&(a===0&&(n=!0),r.splice(a,1),s--);return n&&r.unshift(""),(o==="."||o==="..")&&r.push(""),r.join("/")}i(gi,"resolve");function J(t,e,r){if(t=cr(t),t=t.replace(za,""),!(this instanceof J))return new J(t,e,r);var a,o,n,s,p,y,c=pr.slice(),u=typeof e,m=this,l=0;for(u!=="object"&&u!=="string"&&(r=e,e=null),r&&typeof r!="function"&&(r=at.parse),e=Ja(e),o=Ya(t||"",e),a=!o.protocol&&!o.slashes,m.slashes=o.slashes||a&&e.slashes,m.protocol=o.protocol||e.protocol||"",t=o.rest,(o.protocol==="file:"&&(o.slashesCount!==2||Ti.test(t))||!o.slashes&&(o.protocol||o.slashesCount<2||!Q(m.protocol)))&&(c[3]=[/(.*)/,"pathname"]);l_t,AuthenticationType:()=>_e,ConnectionRequirement:()=>Oe,CurrencyFormat:()=>kt,DurationUnit:()=>Nt,EmailDisplayType:()=>Rt,ImageCornerStyle:()=>Ct,ImageOutline:()=>Mt,ImageShapeStyle:()=>jt,LinkDisplayType:()=>Et,MissingScopesError:()=>pt,NetworkConnection:()=>xt,OptionsType:()=>Ve,PackDefinitionBuilder:()=>je,ParameterType:()=>Ue,PostSetupType:()=>Tt,PrecannedDateRange:()=>St,PropertyLabelValueTemplate:()=>Or,ScaleIconSet:()=>wt,StatusCodeError:()=>st,SvgConstants:()=>ht,TokenExchangeCredentialsLocation:()=>gt,Type:()=>Be,UpdateOutcome:()=>ur,UserVisibleError:()=>ue,ValidFetchMethods:()=>xr,ValueHintType:()=>Le,ValueType:()=>Fe,assertCondition:()=>Z,autocompleteSearchObjects:()=>cn,ensureExists:()=>_,ensureNonEmptyString:()=>ye,ensureUnreachable:()=>me,generateSchema:()=>Ke,getEffectivePropertyKeysFromSchema:()=>ln,getQueryParams:()=>en,joinUrl:()=>tn,makeAttributionNode:()=>Fr,makeDynamicSyncTable:()=>ft,makeEmptyFormula:()=>yn,makeFormula:()=>Me,makeMetadataFormula:()=>ut,makeObjectSchema:()=>te,makeParameter:()=>ct,makePropertyOptionsFormula:()=>lt,makeReferenceSchemaFromObjectSchema:()=>Rr,makeSchema:()=>kr,makeSimpleAutocompleteMetadataFormula:()=>fr,makeSyncTable:()=>Ce,makeTranslateObjectFormula:()=>mn,newPack:()=>un,simpleAutocomplete:()=>lr,withIdentity:()=>Er,withQueryParams:()=>ot});module.exports=Fn(ki);var _e=(S=>(S.None="None",S.HeaderBearerToken="HeaderBearerToken",S.CustomHeaderToken="CustomHeaderToken",S.MultiHeaderToken="MultiHeaderToken",S.QueryParamToken="QueryParamToken",S.MultiQueryParamToken="MultiQueryParamToken",S.OAuth2="OAuth2",S.OAuth2ClientCredentials="OAuth2ClientCredentials",S.WebBasic="WebBasic",S.Custom="Custom",S.AWSAccessKey="AWSAccessKey",S.AWSAssumeRole="AWSAssumeRole",S.CodaApiHeaderBearerToken="CodaApiHeaderBearerToken",S.GoogleDomainWideDelegation="GoogleDomainWideDelegation",S.GoogleServiceAccount="GoogleServiceAccount",S.Various="Various",S))(_e||{}),Tt=(e=>(e.SetEndpoint="SetEndPoint",e))(Tt||{}),gt=(a=>(a.Automatic="Automatic",a.Body="Body",a.AuthorizationHeader="AuthorizationHeader",a))(gt||{});var Be=(c=>(c[c.string=0]="string",c[c.number=1]="number",c[c.object=2]="object",c[c.boolean=3]="boolean",c[c.date=4]="date",c[c.html=5]="html",c[c.image=6]="image",c[c.file=7]="file",c[c.markdown=8]="markdown",c))(Be||{});var Ue=(h=>(h.String="string",h.Number="number",h.Boolean="boolean",h.Date="date",h.Html="html",h.Image="image",h.File="file",h.Markdown="markdown",h.StringArray="stringArray",h.SparseStringArray="sparseStringArray",h.NumberArray="numberArray",h.SparseNumberArray="sparseNumberArray",h.BooleanArray="booleanArray",h.SparseBooleanArray="sparseBooleanArray",h.DateArray="dateArray",h.SparseDateArray="sparseDateArray",h.HtmlArray="htmlArray`",h.SparseHtmlArray="sparseHtmlArray",h.ImageArray="imageArray",h.SparseImageArray="sparseImageArray",h.FileArray="fileArray",h.SparseFileArray="sparseFileArray",h.MarkdownArray="markdownArray`",h.SparseMarkdownArray="sparseMarkdownArray",h))(Ue||{}),gr={string:0,number:1,boolean:3,date:4,html:5,image:6,file:7,markdown:8,stringArray:{type:"array",items:0},numberArray:{type:"array",items:1},booleanArray:{type:"array",items:3},dateArray:{type:"array",items:4},"htmlArray`":{type:"array",items:5},imageArray:{type:"array",items:6},fileArray:{type:"array",items:7},"markdownArray`":{type:"array",items:8},sparseStringArray:{type:"array",items:0,allowEmpty:!0},sparseNumberArray:{type:"array",items:1,allowEmpty:!0},sparseBooleanArray:{type:"array",items:3,allowEmpty:!0},sparseDateArray:{type:"array",items:4,allowEmpty:!0},sparseHtmlArray:{type:"array",items:5,allowEmpty:!0},sparseImageArray:{type:"array",items:6,allowEmpty:!0},sparseFileArray:{type:"array",items:7,allowEmpty:!0},sparseMarkdownArray:{type:"array",items:8,allowEmpty:!0}},Oe=(a=>(a.None="none",a.Optional="optional",a.Required="required",a))(Oe||{}),xt=(a=>(a.None="none",a.Optional="optional",a.Required="required",a))(xt||{}),xr=["GET","PATCH","POST","PUT","DELETE","HEAD"],St=(T=>(T.Yesterday="yesterday",T.Last7Days="last_7_days",T.Last30Days="last_30_days",T.Last90Days="last_90_days",T.Last180Days="last_180_days",T.Last365Days="last_365_days",T.LastWeek="last_week",T.LastMonth="last_month",T.Last3Months="last_3_months",T.Last6Months="last_6_months",T.LastYear="last_year",T.Today="today",T.ThisWeek="this_week",T.ThisMonth="this_month",T.YearToDate="year_to_date",T.ThisYear="this_year",T.Last7AndNext7Days="last_7_and_next_7_days",T.Last30AndNext30Days="last_30_and_next_30_days",T.Tomorrow="tomorrow",T.Next7Days="next_7_days",T.Next30Days="next_30_days",T.Next90Days="next_90_days",T.Next180Days="next_180_days",T.Next365Days="next_365_days",T.NextWeek="next_week",T.NextMonth="next_month",T.Next3Months="next_3_months",T.Next6Months="next_6_months",T.NextYear="next_year",T.Everything="everything",T))(St||{}),Ve=(e=>(e.Dynamic="__coda_dynamic__",e))(Ve||{});function me(t,e){throw new Error(e||`Unreachable code hit with value ${String(t)}`)}i(me,"ensureUnreachable");function ye(t,e){if(typeof t!="string"||t.length===0)throw new(Pt(e))(e||`Expected non-empty string for ${String(t)}`);return t}i(ye,"ensureNonEmptyString");function _(t,e){if(typeof t>"u"||t===null)throw new(Pt(e))(e||`Expected value for ${String(t)}`);return t}i(_,"ensureExists");function Pt(t){return t?ue:Error}i(Pt,"getErrorConstructor");function Z(t,e){if(!t)throw new(Pt(e))(e||"Assertion failed")}i(Z,"assertCondition");function X(t){return JSON.parse(JSON.stringify(t))}i(X,"deepCopy");function Sr(t){return t&&typeof t=="object"&&"then"in t}i(Sr,"isPromise");function le(t){return new At(t)}i(le,"objectSchemaHelper");var Ot=class Ot{constructor(e){this._schema=e,this._checkAgainstAllProperties(e)}_checkAgainstAllProperties(e){let{id:r,idProperty:a,primary:o,displayProperty:n,featuredProperties:s,featured:p,identity:y,options:c,properties:u,type:m,attribution:l,codaType:A,requireForUpdates:x,includeUnknownProperties:P,titleProperty:S,linkProperty:d,subtitleProperties:F,snippetProperty:f,imageProperty:g,description:b,createdAtProperty:D,createdByProperty:M,modifiedAtProperty:h,modifiedByProperty:R,userEmailProperty:V,userIdProperty:U,groupIdProperty:v,bodyTextProperty:k,popularityRankProperty:T,...w}=e;}get id(){return this._schema.idProperty??this._schema.id}get primary(){return this._schema.displayProperty??this._schema.primary}get featured(){return this._schema.featuredProperties??this._schema.featured}get identity(){return this._schema.identity}get options(){return this._schema.options}get properties(){return this._schema.properties}get type(){return this._schema.type}get attribution(){return this._schema.attribution??this._schema.identity?.attribution}get codaType(){return this._schema.codaType}get requireForUpdates(){return this._schema.requireForUpdates}};i(Ot,"ObjectSchemaHelper");var At=Ot;function Dt(t){return new bt(t)}i(Dt,"setEndpointDefHelper");var Ft=class Ft{constructor(e){this._step=e}get getOptions(){return _(this._step.getOptions??this._step.getOptionsFormula)}};i(Ft,"SetEndpointDefHelper");var bt=Ft;var Dr=Ne(Ar());var Fe=(n=>(n.Boolean="boolean",n.Number="number",n.String="string",n.Array="array",n.Object="object",n))(Fe||{}),Le=(D=>(D.Date="date",D.Time="time",D.DateTime="datetime",D.Duration="duration",D.Email="email",D.Person="person",D.Percent="percent",D.Currency="currency",D.ImageReference="image",D.ImageAttachment="imageAttachment",D.Url="url",D.Markdown="markdown",D.Html="html",D.Embed="embed",D.Reference="reference",D.Attachment="attachment",D.Slider="slider",D.Scale="scale",D.ProgressBar="progressBar",D.Toggle="toggle",D.CodaInternalRichText="codaInternalRichText",D.SelectList="selectList",D))(Le||{});var kt=(a=>(a.Currency="currency",a.Accounting="accounting",a.Financial="financial",a))(kt||{}),wt=(g=>(g.Star="star",g.Circle="circle",g.Fire="fire",g.Bug="bug",g.Diamond="diamond",g.Bell="bell",g.ThumbsUp="thumbsup",g.Heart="heart",g.Chili="chili",g.Smiley="smiley",g.Lightning="lightning",g.Currency="currency",g.Coffee="coffee",g.Person="person",g.Battery="battery",g.Cocktail="cocktail",g.Cloud="cloud",g.Sun="sun",g.Checkmark="checkmark",g.LightBulb="lightbulb",g))(wt||{}),Rt=(a=>(a.IconAndEmail="iconAndEmail",a.IconOnly="iconOnly",a.EmailOnly="emailOnly",a))(Rt||{}),Et=(n=>(n.IconOnly="iconOnly",n.Url="url",n.Title="title",n.Card="card",n.Embed="embed",n))(Et||{}),Mt=(r=>(r.Disabled="disabled",r.Solid="solid",r))(Mt||{}),Ct=(r=>(r.Rounded="rounded",r.Square="square",r))(Ct||{}),jt=(r=>(r.Auto="auto",r.Circle="circle",r))(jt||{}),Nt=(o=>(o.Days="days",o.Hours="hours",o.Minutes="minutes",o.Seconds="seconds",o))(Nt||{});var Or="{VALUE}";var _t=(a=>(a[a.Text=1]="Text",a[a.Link=2]="Link",a[a.Image=3]="Image",a))(_t||{});function Fr(t){return t}i(Fr,"makeAttributionNode");function vr(t){return!!(t&&t.type==="object")}i(vr,"isObject");function He(t){return!!(t&&t.type==="array")}i(He,"isArray");function Bt(t){return!!t?.codaType&&["selectList","reference"].includes(t.codaType)}i(Bt,"unwrappedSchemaSupportsOptions");function fe(t){if(!He(t))return t;if(!He(t.items))return t.items}i(fe,"maybeUnwrapArraySchema");function Ke(t){if(Array.isArray(t)){if(t.length===0)throw new Error("Must have representative value.");return{type:"array",items:Ke(t[0])}}if(typeof t=="object"){let e={};if(t===null)return{type:"string"};for(let r in t)t.hasOwnProperty(r)&&(e[r]=Ke(t[r]));return{type:"object",properties:e}}else{if(typeof t=="string")return{type:"string"};if(typeof t=="boolean")return{type:"boolean"};if(typeof t=="number")return{type:"number"}}return me(t)}i(Ke,"generateSchema");function kr(t){return t}i(kr,"makeSchema");function te(t){let e={...t,type:"object"};for(let r of Object.keys(e.properties))if(r!=="type"){let a=r,n=fe(e.properties[r])?.options,s=typeof n=="function"?n:void 0;if(e.properties[a]=X(e.properties[r]),s){let p=fe(e.properties[a]);_(p,"deepCopy() broke maybeUnwrapArraySchema?..."),p.options=s}}return wr(e),e}i(te,"makeObjectSchema");function wr(t){if(t.codaType==="reference"){let{id:e,identity:r,primary:a}=le(t);Ie(e,"idProperty",t.codaType),Ie(r,"identity",t.codaType),Ie(a,"displayProperty",t.codaType),vt(_(e),t,"idProperty"),vt(_(a),t,"displayProperty")}if(t.codaType==="person"){let{id:e}=le(t);Ie(e,"idProperty",t.codaType),vt(_(e),t,"idProperty")}for(let[e,r]of Object.entries(t.properties))r.type==="object"&&wr(r)}i(wr,"validateObjectSchema");function Ie(t,e,r){_(t,`Objects with codaType "${r}" require a "${e}" property in the schema definition.`)}i(Ie,"checkRequiredFieldInObjectSchema");function vt(t,e,r){let{properties:a,codaType:o}=e;Z(a[t],`${r} set to undefined field "${t}"`),Z(a[t].required,`Field "${t}" must be marked as required in schema with codaType "${o}".`)}i(vt,"checkSchemaPropertyIsRequired");function q(t){return(0,Dr.default)(t).replace(/:/g,"_")}i(q,"normalizeSchemaKey");function br(t,e){return e.hasOwnProperty(q(t))?q(t):t.split(".").map(r=>{let a=r,o="";return r.includes("[")&&(a=r.substring(0,r.indexOf("[")),o=r.substring(r.indexOf("["))),q(a)+o}).join(".")}i(br,"normalizeSchemaKeyPath");function L(t,e){if(typeof t=="string")return br(t,e);let{label:r,property:a,placeholder:o,...n}=t;return{property:br(a,e),label:r,placeholder:o}}i(L,"normalizeSchemaPropertyIdentifier");function re(t){return He(t)?{...t,type:"array",items:re(t.items)}:vr(t)?wn(t):{...t}}i(re,"normalizeSchema");function wn(t){let e={},{attribution:r,options:a,requireForUpdates:o,codaType:n,description:s,displayProperty:p,featured:y,featuredProperties:c,id:u,identity:m,idProperty:l,imageProperty:A,includeUnknownProperties:x,linkProperty:P,primary:S,properties:d,snippetProperty:F,subtitleProperties:f,titleProperty:g,type:b,__packId:D,createdAtProperty:M,createdByProperty:h,modifiedAtProperty:R,modifiedByProperty:V,userEmailProperty:U,userIdProperty:v,groupIdProperty:k,bodyTextProperty:T,popularityRankProperty:w,...C}=t;for(let N of Object.keys(d)){let G=q(N),Y=d[N],{displayName:be,fixedId:fn,fromKey:dn,mutable:hn,originalKey:Tn,required:gn}=Y;if(Tn)throw new Error("Original key is only for internal use.");let xn={displayName:be,fixedId:fn,fromKey:dn||(G!==N?N:void 0),mutable:hn,originalKey:N,required:gn};e[G]=Object.assign(re(Y),xn)}return{attribution:r,options:a,requireForUpdates:o,codaType:n,description:s,displayProperty:p?q(p):void 0,featured:y?y.map(q):void 0,featuredProperties:c?c.map(q):void 0,id:u?q(u):void 0,identity:m,idProperty:l?q(l):void 0,imageProperty:A?L(A,e):void 0,includeUnknownProperties:x,linkProperty:P?L(P,e):void 0,primary:S?q(S):void 0,properties:e,snippetProperty:F?L(F,e):void 0,subtitleProperties:f?f.map(N=>L(N,e)):void 0,titleProperty:g?L(g,e):void 0,createdAtProperty:M?L(M,e):void 0,createdByProperty:h?L(h,e):void 0,modifiedAtProperty:R?L(R,e):void 0,modifiedByProperty:V?L(V,e):void 0,userEmailProperty:U?L(U,e):void 0,userIdProperty:v?L(v,e):void 0,groupIdProperty:k?L(k,e):void 0,bodyTextProperty:T?L(T,e):void 0,popularityRankProperty:w?L(w,e):void 0,type:"object"}}i(wn,"normalizeObjectSchema");function Rr(t,e){let{type:r,id:a,primary:o,identity:n,properties:s,options:p,requireForUpdates:y}=le(t),{mutable:c}=t;_(n||e,"Source schema must have an identity field, or you must provide an identity name for the reference.");let u=_(a),m={[u]:s[u]};o&&o!==a&&(_(s[o],`Display property "${o}" must refer to a valid property schema.`),m[o]=s[o]);let l={codaType:"reference",displayProperty:o,identity:n||{name:_(e)},idProperty:a,mutable:c,options:p,properties:m,type:r,requireForUpdates:y};return te(l)}i(Rr,"makeReferenceSchemaFromObjectSchema");function Er(t,e){return te({...X(t),identity:{name:ye(e)}})}i(Er,"withIdentity");var an=Ne(Mr());var nt=Ne(Ia()),mr=Ne(Xa());function ot(t,e){if(!e)return t;let r=(0,mr.default)(t),a=Object.assign({},nt.default.parse(r.query,{ignoreQueryPrefix:!0}),e);return r.set("query",nt.default.stringify(JSON.parse(JSON.stringify(a)),{addQueryPrefix:!0})),r.toString()}i(ot,"withQueryParams");function en(t){let e=(0,mr.default)(t);return nt.default.parse(e.query,{ignoreQueryPrefix:!0})}i(en,"getQueryParams");function tn(...t){if(!t||!t.length)return"";let e=[];for(let a of t)ye(a),e.length===0?e.push(a):e.push(a.replace(/^\/+/,"")),a.endsWith("/")||e.push("/");let r=e.join("");return t[t.length-1].endsWith("/")?r:r.slice(0,r.length-1)}i(tn,"join");function Pi(t,e,r){let a={};return t.forEach(o=>{let n=e[o];if(typeof n>"u"){if(r&&r.has(o))return;n=""}a[o]=n}),a}i(Pi,"generateParamMap");function rn(t,e,r){let a={};return t.forEach(o=>{let n=e[o];if(typeof n>"u"){if(r&&r.has(o))return;n=""}a[o]=encodeURIComponent(String(n))}),a}i(rn,"generateQueryParamMap");function Ai(t,e){let r=t;for(let[a,o]of Object.entries(e))r=r.replace(`{${a}}`,o);return r}i(Ai,"formatString");function yr(t,e){let{url:r,queryParams:a,nameMapping:o,bodyTemplate:n,bodyParams:s,method:p,headers:y,transforms:c}=t,u=new Map,m=new Set,l=new Set;e.forEach((P,S)=>{let d=o&&o[P.name]||P.name;if(m.has(d))throw new Error(`Duplicate name ${d} detected`);m.add(d),P.optional&&l.add(d),u.set(S,d)});let A=!!(a&&a.length),x=!!(s&&s.length);return i(function(S){let d={};S.forEach((b,D)=>{let M=_(u.get(D)),h=c?c[M]:void 0;if(h){let R=h(b);R&&typeof R=="object"?Object.assign(d,R):d[M]=R}else d[M]=b});let F=Ai(r,rn(Object.keys(d),d)),f=A?ot(F,rn(_(a),d,l)):F,g;if(n&&(g=(0,an.default)(n)),x){let b=Pi(_(s),d,l);g=g?{...g,...b}:b}return{url:f,method:p,headers:{Accept:"application/json","Content-Type":"application/json",...y},body:g?JSON.stringify(g):void 0}},"requestHandler")}i(yr,"generateRequestHandler");function it(t){let{projectKey:e}=t;return i(function(a){let{body:o}=a;return typeof o!="object"?o:e?o[e]:o},"objectResponseHandler")}i(it,"generateObjectResponseHandler");var dr=class dr extends Error{constructor(r,a){super(r);this.isUserVisible=!0;this.internalError=a}};i(dr,"UserVisibleError");var ue=dr,mt=class mt extends Error{constructor(r,a,o,n){super(`${r} - ${JSON.stringify(a)}`);this.name="StatusCodeError";this.statusCode=r,this.body=a,this.error=a,this.options=o;let s=n?.body;typeof s=="object"&&(s=JSON.stringify(s)),this.response={...n,body:s}}static isStatusCodeError(r){return"name"in r&&r.name===mt.name}};i(mt,"StatusCodeError");var st=mt,yt=class yt extends Error{constructor(r){super(r||"Additional permissions are required");this.name="MissingScopesError"}static isMissingScopesError(r){return"name"in r&&r.name===yt.name}};i(yt,"MissingScopesError");var pt=yt;function pn(t){return"isDynamic"in t}i(pn,"isDynamicSyncTable");function K(t){return typeof t=="function"?ut(t):t}i(K,"wrapMetadataFunction");function nn(t){return t?.type==="array"?t:{type:"array",items:t}}i(nn,"transformToArraySchema");function bi(t){if(t)return{...t,execute(e,r){let a=t.execute(e,r);return Sr(a)?a.then(o=>nn(o)):nn(a)}}}i(bi,"wrapGetSchema");function ct(t){let{type:e,autocomplete:r,crawlStrategy:a,...o}=t,n=gr[e],s;if(Array.isArray(r)){let y=fr(r);s=K(y)}else s=K(r);let p;if(a)if(a.parentTable){let{tableName:y,propertyKey:c,inheritPermissions:u}=a.parentTable;p={parentTable:{tableName:y,propertyKey:q(c),inheritPermissions:u}}}else p=a;return Object.freeze({...o,autocomplete:s,type:n,crawlStrategy:p})}i(ct,"makeParameter");var ur=(r=>(r.Success="success",r.Error="error",r))(ur||{}),on=1e3;function Me(t){let e;switch(t.resultType){case"string":{let a={...t,codaType:"codaType"in t?t.codaType:void 0,formulaSchema:"schema"in t?t.schema:void 0},{onError:o,resultType:n,codaType:s,formulaSchema:p,...y}=a;Z(s!=="selectList","ValueHintType.SelectList is not supported for formula result types."),e={...y,resultType:0,schema:p||(s?{type:"string",codaType:s}:void 0)};break}case"number":{let a={...t,codaType:"codaType"in t?t.codaType:void 0,formulaSchema:"schema"in t?t.schema:void 0},{onError:o,resultType:n,codaType:s,formulaSchema:p,...y}=a;e={...y,resultType:1,schema:p||(s?{type:"number",codaType:s}:void 0)};break}case"boolean":{let{onError:a,resultType:o,...n}=t;e={...n,resultType:3};break}case"array":{let{onError:a,resultType:o,items:n,...s}=t;e={...s,resultType:2,schema:X(re({type:"array",items:n}))};break}case"object":{let{onError:a,resultType:o,schema:n,...s}=t;e={...s,resultType:2,schema:X(re(n))};break}default:return me(t)}let r=t.onError;if(r){let a=e.execute;e.execute=async function(o,n){try{return await a(o,n)}catch(s){return r(s)}}}return j(e,t.connectionRequirement)}i(Me,"makeFormula");function ut(t,e){return Oi({name:"getMetadata",description:"Gets metadata",execute([r,a],o){let n={};try{n=JSON.parse(a||"")}catch{}return t(o,r,n)},parameters:[ct({type:"string",name:"search",description:"Metadata to search for.",optional:!0}),ct({type:"string",name:"formulaContext",description:"Serialized JSON for metadata.",optional:!0})],examples:[],connectionRequirement:e?.connectionRequirement||"optional"})}i(ut,"makeMetadataFormula");function lt({execute:t,schema:e,name:r}){if(!(t instanceof Function))throw new Error("Value for execute must be a function");let a=t,o=i(async([],p)=>a(p),"innerExecute"),n={connectionRequirement:"optional",execute:o,name:r,description:`A property options function for ${r}`,parameters:[],resultType:"array",items:e};return Me(n)}i(lt,"makePropertyOptionsFormula");function lr(t,e){let r=(t||"").toLowerCase(),a=e.filter(n=>(typeof n=="string"||typeof n=="number"?n:n.display).toString().toLowerCase().includes(r)),o=[];for(let n of a)typeof n=="string"?o.push({value:n,display:n}):typeof n=="number"?o.push({value:n,display:n.toString()}):o.push(n);return Promise.resolve(o)}i(lr,"simpleAutocomplete");async function cn(t,e,r,a){if(typeof t!="string")throw new TypeError(`Expecting a string for "search" parameter but received ${t}`);let o=t.toLowerCase(),n=[];for(let s of e){let p=s[r];if(!p.toLowerCase().includes(o))continue;let y=s[a];n.push({display:p,value:y})}return n}i(cn,"autocompleteSearchObjects");function fr(t){return ut((e,r)=>lr(r,t),{connectionRequirement:"optional"})}i(fr,"makeSimpleAutocompleteMetadataFormula");function sn(t){return t&&t.schema}i(sn,"isResponseHandlerTemplate");function Di(t){return t&&t.example}i(Di,"isResponseExampleTemplate");function Oi({response:t,...e}){let r;if(t)if(sn(t)&&t.schema){let o=X(t.schema);t.schema=re(o),r=t.schema}else Di(t);let a=e.execute;if(sn(t)){let{onError:o}=t,n=a,s=it(t);a=i(async function(y,c){let u;try{u=await n(y,c)}catch(m){if(o)u=o(m);else throw m}return s({body:u||{},status:200,headers:{}})},"exec")}return Object.assign({},e,{resultType:2,execute:a,schema:r})}i(Oi,"makeObjectFormula");function Ce({name:t,description:e,identityName:r,schema:a,formula:o,connectionRequirement:n,dynamicOptions:s={},role:p}){let{getSchema:y,entityName:c,defaultAddDynamicColumns:u}=s,{execute:m,executeUpdate:l,executeGetPermissions:A,...x}=j(o,n),P=X(a);if(!r)throw new Error("Sync table schemas must set an identityName");if(P.identity){if(P.identity.name&&P.identity.name!==r)throw new Error(`Identity name mismatch for sync table ${t}. Either remove the schema's identity.name (${P.identity.name}) or ensure it matches the table's identityName (${r}).`);P.identity={...P.identity,name:r}}else P.identity={name:r};if(p==="users"){if(!P.userEmailProperty)throw new Error("Sync table schemas with role users must set a userEmailProperty");if(!P.userIdProperty)throw new Error("Sync table schemas with role users must set a userIdProperty")}if(p==="groupMembers"){if(!P.groupIdProperty)throw new Error("Sync table schemas with role groupMembers must set a groupIdProperty");if(!P.userIdProperty)throw new Error("Sync table schemas with role groupMembers must set a userIdProperty")}let S=bi(K(y)),d=te(P),F=vi({inputSchema:a,schema:d,identityName:r});s.propertyOptions&&(F??(F={}),F.__coda_dynamic__=lt({execute:s.propertyOptions,schema:te({properties:{}}),name:`${r}.DynamicPropertyOptions`}));let f=re(d),g=S?void 0:{type:"array",items:f},{identity:b,id:D,primary:M}=le(d);if(!(M&&D))throw new Error("Sync table schemas should have defined properties for idProperty and displayProperty");if(!b)throw new Error("Unknown error creating sync table identity");if(t.includes(" "))throw new Error("Sync table name should not include spaces");let h=it({schema:g}),R=i(async function(k,T){let w=await m(k,T)||{},C=T.sync.schema,N=h({body:w.result||[],status:200,headers:{}},C),{continuation:G,completion:Y}=w,be={result:N};return G&&(be.continuation=G),Y&&(be.completion=Y),be},"exec"),V=l?i(async function(k,T,w){let{result:C}=await l(k,T,w)||{},N=w.sync.schema;return{result:h({body:C||[],status:200,headers:{}},N)}},"execUpdate"):void 0,U=A?i(async function(k,T,w){let C=await A(k,T,w),{rowAccessDefinitions:N}=C,G=N.filter(Y=>Y.permissions.length>on);if(G.length>0)throw new Error(`Objects with ids: ${G.map(Y=>Y.rowId).join(", ")} returned more permissions than the maximum allowed of ${on} per object`);return C},"execGetPermissions"):void 0;return{name:t,description:e,schema:f,identityName:r,getter:{...x,cacheTtlSecs:0,execute:R,executeUpdate:V,schema:g,isSyncFormula:!0,supportsUpdates:!!V,supportsGetPermissions:!!U,connectionRequirement:x.connectionRequirement||n,resultType:2,executeGetPermissions:U},getSchema:j(S,n),entityName:c,defaultAddDynamicColumns:u,namedPropertyOptions:dt(F,n),role:p}}i(Ce,"makeSyncTable");function ft({name:t,description:e,getName:r,getSchema:a,identityName:o,getDisplayUrl:n,formula:s,listDynamicUrls:p,searchDynamicUrls:y,entityName:c,connectionRequirement:u,defaultAddDynamicColumns:m,placeholderSchema:l,propertyOptions:A}){let x=l||te({type:"object",idProperty:"id",displayProperty:"id",identity:{name:o},properties:{id:{type:"string"}}}),P=K(r),S=K(a),d=K(n),F=K(p),f=K(y);return{...Ce({name:t,description:e,identityName:o,schema:x,formula:s,connectionRequirement:u,dynamicOptions:{getSchema:S,entityName:c,defaultAddDynamicColumns:m,propertyOptions:A}}),isDynamic:!0,getDisplayUrl:j(d,u),listDynamicUrls:j(F,u),searchDynamicUrls:j(f,u),getName:j(P,u)}}i(ft,"makeDynamicSyncTable");function mn({response:t,...e}){let{request:r,...a}=e,{parameters:o}=a;t.schema=t.schema?re(t.schema):void 0;let{onError:n}=t,s=yr(r,o),p=it(t);function y(c,u){return u.fetcher.fetch(s(c)).catch(m=>{if(n)return n(m);throw m}).then(p)}return i(y,"execute"),Object.assign({},a,{execute:y,resultType:2,schema:t.schema})}i(mn,"makeTranslateObjectFormula");function yn(t){let{request:e,...r}=t,{parameters:a}=r,o=yr(e,a);function n(s,p){return p.fetcher.fetch(o(s)).then(()=>"")}return i(n,"execute"),Object.assign({},r,{execute:n,resultType:0})}i(yn,"makeEmptyFormula");function dt(t,e){if(!t)return t;let r={};for(let a of Object.keys(t))r[a]=j(t[a],e);return r}i(dt,"maybeRewriteConnectionForNamedPropertyOptions");function j(t,e){return t&&e?{...t,parameters:t.parameters.map(r=>({...r,autocomplete:r.autocomplete?j(r.autocomplete,e):void 0})),varargParameters:t.varargParameters?.map(r=>({...r,autocomplete:r.autocomplete?j(r.autocomplete,e):void 0})),connectionRequirement:e}:t}i(j,"maybeRewriteConnectionForFormula");function Fi(t){let e=[];for(let r of Object.keys(t.properties)){let a=fe(t.properties[r]);if(!a||!("options"in a))continue;let{options:o}=a;o&&typeof o=="function"&&e.push(r)}return e}i(Fi,"listPropertiesWithOptionsFunctions");function vi({inputSchema:t,schema:e,identityName:r}){let a={},o=Fi(t);if(o.length){for(let n of o){let s=fe(t.properties[n]),p=fe(e.properties[n]);Z(Bt(s),`Property "${n}" must have codaType of ValueHintType.SelectList or ValueHintType.Reference to configure property options`),Z(Bt(p),`Property "${n}" lost codaType on deep copy?...`),p.options=n,a[n]=lt({execute:s.options,schema:e.properties[n],name:`${r}.${n}.Options`})}return a}}i(vi,"moveJsPropertyOptionsFunctionsToFormulas");function un(t){return new je(t)}i(un,"newPack");var hr=class hr{constructor(e){let{formulas:r,formats:a,syncTables:o,networkDomains:n,defaultAuthentication:s,systemConnectionAuthentication:p,version:y,formulaNamespace:c}=e||{};this.formulas=r||[],this.formats=a||[],this.syncTables=o||[],this.networkDomains=n||[],this.defaultAuthentication=s,this.systemConnectionAuthentication=p,this.version=y,this.formulaNamespace=c||"Deprecated"}addFormula(e){let r=Me({...e,connectionRequirement:e.connectionRequirement||this._defaultConnectionRequirement});return this.formulas.push(r),this}addSyncTable({name:e,description:r,identityName:a,schema:o,formula:n,connectionRequirement:s,dynamicOptions:p={}}){let y=s||this._defaultConnectionRequirement,c=Ce({name:e,description:r,identityName:a,schema:o,formula:n,connectionRequirement:y,dynamicOptions:p});return this.syncTables.push(c),this}addDynamicSyncTable(e){let r=ft({...e,connectionRequirement:e.connectionRequirement||this._defaultConnectionRequirement});return this.syncTables.push(r),this}addColumnFormat(e){return this.formats.push(e),this}setUserAuthentication(e){let{defaultConnectionRequirement:r="required",...a}=e;if(a.type==="None"||a.type==="Various")this.defaultAuthentication=a;else{let{getConnectionName:o,getConnectionUserId:n,postSetup:s,...p}=a,y=K(o),c=K(n),u=s?.map(m=>({...m,getOptions:K(Dt(m).getOptions)}));this.defaultAuthentication={...p,getConnectionName:y,getConnectionUserId:c,postSetup:u}}return a.type!=="None"&&this._setDefaultConnectionRequirement(r),this}setSystemAuthentication(e){let{getConnectionName:r,getConnectionUserId:a,postSetup:o,...n}=e,s=K(r),p=K(a),y=o?.map(c=>({...c,getOptions:K(Dt(c).getOptions)}));return this.systemConnectionAuthentication={...n,getConnectionName:s,getConnectionUserId:p,postSetup:y},this}addNetworkDomain(...e){return this.networkDomains.push(...e),this}setVersion(e){return this.version=e,this}_setDefaultConnectionRequirement(e){return this._defaultConnectionRequirement=e,this.formulas=this.formulas.map(r=>r.connectionRequirement?r:j(r,e)),this.syncTables=this.syncTables.map(r=>r.getter.connectionRequirement?r:pn(r)?{...r,getter:j(r.getter,e),getName:j(r.getName,e),getDisplayUrl:j(r.getDisplayUrl,e),getSchema:j(r.getSchema,e),listDynamicUrls:j(r.listDynamicUrls,e),searchDynamicUrls:j(r.searchDynamicUrls,e),namedPropertyOptions:dt(r.namedPropertyOptions,e)}:{...r,getter:j(r.getter,e),getSchema:j(r.getSchema,e),namedPropertyOptions:dt(r.namedPropertyOptions,e)}),this}};i(hr,"PackDefinitionBuilder");var je=hr;function ln(t){if(t.type==="array"&&(t=t.items),t.type==="object")return[...new Set(Object.entries(t.properties).map(([e,r])=>r.fromKey||e))]}i(ln,"getEffectivePropertyKeysFromSchema");var ht;(a=>(a.DarkModeFragmentId="DarkMode",a.DataUrlPrefix="data:image/svg+xml;base64,",a.DataUrlPrefixWithDarkModeSupport="data:image/svg+xml;supportsDarkMode=1;base64,"))(ht||(ht={})); +`+e.prev}i(Jt,"indentedJoin");function Je(t,e){var r=Qt(t),a=[];if(r){a.length=t.length;for(var o=0;o{"use strict";var er=ze(),Ae=aa(),Do=Da(),Oo=er("%TypeError%"),Xe=er("%WeakMap%",!0),et=er("%Map%",!0),Fo=Ae("WeakMap.prototype.get",!0),vo=Ae("WeakMap.prototype.set",!0),ko=Ae("WeakMap.prototype.has",!0),wo=Ae("Map.prototype.get",!0),Ro=Ae("Map.prototype.set",!0),Eo=Ae("Map.prototype.has",!0),tr=i(function(t,e){for(var r=t,a;(a=r.next)!==null;r=a)if(a.key===e)return r.next=a.next,a.next=t.next,t.next=a,a},"listGetNode"),Mo=i(function(t,e){var r=tr(t,e);return r&&r.value},"listGet"),Co=i(function(t,e,r){var a=tr(t,e);a?a.value=r:t.next={key:e,next:t.next,value:r}},"listSet"),jo=i(function(t,e){return!!tr(t,e)},"listHas");Oa.exports=i(function(){var e,r,a,o={assert:function(n){if(!o.has(n))throw new Oo("Side channel does not contain "+Do(n))},get:function(n){if(Xe&&n&&(typeof n=="object"||typeof n=="function")){if(e)return Fo(e,n)}else if(et){if(r)return wo(r,n)}else if(a)return Mo(a,n)},has:function(n){if(Xe&&n&&(typeof n=="object"||typeof n=="function")){if(e)return ko(e,n)}else if(et){if(r)return Eo(r,n)}else if(a)return jo(a,n);return!1},set:function(n,s){Xe&&n&&(typeof n=="object"||typeof n=="function")?(e||(e=new Xe),vo(e,n,s)):et?(r||(r=new et),Ro(r,n,s)):(a||(a={key:{},next:null}),Co(a,n,s))}};return o},"getSideChannel")});var tt=M((As,va)=>{"use strict";var No=String.prototype.replace,_o=/%20/g,rr={RFC1738:"RFC1738",RFC3986:"RFC3986"};va.exports={default:rr.RFC3986,formatters:{RFC1738:function(t){return No.call(t,_o,"+")},RFC3986:function(t){return String(t)}},RFC1738:rr.RFC1738,RFC3986:rr.RFC3986}});var nr=M((bs,wa)=>{"use strict";var Bo=tt(),ar=Object.prototype.hasOwnProperty,ce=Array.isArray,z=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Uo=i(function(e){for(;e.length>1;){var r=e.pop(),a=r.obj[r.prop];if(ce(a)){for(var o=[],n=0;n=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||n===Bo.RFC1738&&(c===40||c===41)){p+=s.charAt(y);continue}if(c<128){p=p+z[c];continue}if(c<2048){p=p+(z[192|c>>6]+z[128|c&63]);continue}if(c<55296||c>=57344){p=p+(z[224|c>>12]+z[128|c>>6&63]+z[128|c&63]);continue}y+=1,c=65536+((c&1023)<<10|s.charCodeAt(y)&1023),p+=z[240|c>>18]+z[128|c>>12&63]+z[128|c>>6&63]+z[128|c&63]}return p},"encode"),Lo=i(function(e){for(var r=[{obj:{o:e},prop:"o"}],a=[],o=0;o{"use strict";var Ma=Fa(),rt=nr(),Ee=tt(),zo=Object.prototype.hasOwnProperty,Ra={brackets:i(function(e){return e+"[]"},"brackets"),comma:"comma",indices:i(function(e,r){return e+"["+r+"]"},"indices"),repeat:i(function(e){return e},"repeat")},ee=Array.isArray,Qo=Array.prototype.push,Ca=i(function(t,e){Qo.apply(t,ee(e)?e:[e])},"pushToArray"),Jo=Date.prototype.toISOString,Ea=Ee.default,I={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:rt.encode,encodeValuesOnly:!1,format:Ea,formatter:Ee.formatters[Ea],indices:!1,serializeDate:i(function(e){return Jo.call(e)},"serializeDate"),skipNulls:!1,strictNullHandling:!1},Yo=i(function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},"isNonNullishPrimitive"),or={},Zo=i(function t(e,r,a,o,n,s,p,y,c,u,m,l,b,x,A,S){for(var d=e,F=S,f=0,g=!1;(F=F.get(or))!==void 0&&!g;){var P=F.get(e);if(f+=1,typeof P<"u"){if(P===f)throw new RangeError("Cyclic object value");g=!0}typeof F.get(or)>"u"&&(f=0)}if(typeof y=="function"?d=y(r,d):d instanceof Date?d=m(d):a==="comma"&&ee(d)&&(d=rt.maybeMap(d,function(k){return k instanceof Date?m(k):k})),d===null){if(n)return p&&!x?p(r,I.encoder,A,"key",l):r;d=""}if(Yo(d)||rt.isBuffer(d)){if(p){var D=x?r:p(r,I.encoder,A,"key",l);return[b(D)+"="+b(p(d,I.encoder,A,"value",l))]}return[b(r)+"="+b(String(d))]}var j=[];if(typeof d>"u")return j;var h;if(a==="comma"&&ee(d))x&&p&&(d=rt.maybeMap(d,p)),h=[{value:d.length>0?d.join(",")||null:void 0}];else if(ee(y))h=y;else{var E=Object.keys(d);h=c?E.sort(c):E}for(var U=o&&ee(d)&&d.length===1?r+"[]":r,B=0;B"u"?I.allowDots:!!e.allowDots,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:I.charsetSentinel,delimiter:typeof e.delimiter>"u"?I.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:I.encode,encoder:typeof e.encoder=="function"?e.encoder:I.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:I.encodeValuesOnly,filter:n,format:a,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:I.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:I.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:I.strictNullHandling}},"normalizeStringifyOptions");ja.exports=function(t,e){var r=t,a=Xo(e),o,n;typeof a.filter=="function"?(n=a.filter,r=n("",r)):ee(a.filter)&&(n=a.filter,o=n);var s=[];if(typeof r!="object"||r===null)return"";var p;e&&e.arrayFormat in Ra?p=e.arrayFormat:e&&"indices"in e?p=e.indices?"indices":"repeat":p="indices";var y=Ra[p];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=y==="comma"&&e&&e.commaRoundTrip;o||(o=Object.keys(r)),a.sort&&o.sort(a.sort);for(var u=Ma(),m=0;m0?x+b:""}});var Ua=M((vs,Ba)=>{"use strict";var be=nr(),ir=Object.prototype.hasOwnProperty,ei=Array.isArray,_={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:be.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},ti=i(function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},"interpretNumericEntities"),_a=i(function(t,e){return t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1?t.split(","):t},"parseArrayValue"),ri="utf8=%26%2310003%3B",ai="utf8=%E2%9C%93",ni=i(function(e,r){var a={__proto__:null},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,n=r.parameterLimit===1/0?void 0:r.parameterLimit,s=o.split(r.delimiter,n),p=-1,y,c=r.charset;if(r.charsetSentinel)for(y=0;y-1&&(x=ei(x)?[x]:x),ir.call(a,b)?a[b]=be.combine(a[b],x):a[b]=x}return a},"parseQueryStringValues"),oi=i(function(t,e,r,a){for(var o=a?e:_a(e,r),n=t.length-1;n>=0;--n){var s,p=t[n];if(p==="[]"&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var y=p.charAt(0)==="["&&p.charAt(p.length-1)==="]"?p.slice(1,-1):p,c=parseInt(y,10);!r.parseArrays&&y===""?s={0:o}:!isNaN(c)&&p!==y&&String(c)===y&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(s=[],s[c]=o):y!=="__proto__"&&(s[y]=o)}o=s}return o},"parseObject"),ii=i(function(e,r,a,o){if(e){var n=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/,p=/(\[[^[\]]*])/g,y=a.depth>0&&s.exec(n),c=y?n.slice(0,y.index):n,u=[];if(c){if(!a.plainObjects&&ir.call(Object.prototype,c)&&!a.allowPrototypes)return;u.push(c)}for(var m=0;a.depth>0&&(y=p.exec(n))!==null&&m"u"?_.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?_.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:_.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:_.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:_.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:_.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:_.comma,decoder:typeof e.decoder=="function"?e.decoder:_.decoder,delimiter:typeof e.delimiter=="string"||be.isRegExp(e.delimiter)?e.delimiter:_.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:_.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:_.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:_.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:_.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:_.strictNullHandling}},"normalizeParseOptions");Ba.exports=function(t,e){var r=si(e);if(t===""||t===null||typeof t>"u")return r.plainObjects?Object.create(null):{};for(var a=typeof t=="string"?ni(t,r):t,o=r.plainObjects?Object.create(null):{},n=Object.keys(a),s=0;s{"use strict";var pi=Na(),ci=Ua(),mi=tt();Va.exports={formats:mi,parse:ci,stringify:pi}});var Ka=M((Rs,Ha)=>{"use strict";Ha.exports=i(function(e,r){if(r=r.split(":")[0],e=+e,!e)return!1;switch(r){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0},"required")});var Ga=M(sr=>{"use strict";var yi=Object.prototype.hasOwnProperty,ui;function La(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}i(La,"decode");function qa(t){try{return encodeURIComponent(t)}catch{return null}}i(qa,"encode");function li(t){for(var e=/([^=?#&]+)=?([^&]*)/g,r={},a;a=e.exec(t);){var o=La(a[1]),n=La(a[2]);o===null||n===null||o in r||(r[o]=n)}return r}i(li,"querystring");function fi(t,e){e=e||"";var r=[],a,o;typeof e!="string"&&(e="?");for(o in t)if(yi.call(t,o)){if(a=t[o],!a&&(a===null||a===ui||isNaN(a))&&(a=""),o=qa(o),a=qa(a),o===null||a===null)continue;r.push(o+"="+a)}return r.length?e+r.join("&"):""}i(fi,"querystringify");sr.stringify=fi;sr.parse=li});var Xa=M((js,Za)=>{"use strict";var $a=Ka(),at=Ga(),di=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,za=/[\n\r\t]/g,hi=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Qa=/:\d+$/,Ti=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,gi=/^[a-zA-Z]:/;function cr(t){return(t||"").toString().replace(di,"")}i(cr,"trimLeft");var pr=[["#","hash"],["?","query"],i(function(e,r){return Q(r.protocol)?e.replace(/\\/g,"/"):e},"sanitize"),["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],Wa={hash:1,query:1};function Ja(t){var e;typeof window<"u"?e=window:typeof global<"u"?e=global:typeof self<"u"?e=self:e={};var r=e.location||{};t=t||r;var a={},o=typeof t,n;if(t.protocol==="blob:")a=new J(unescape(t.pathname),{});else if(o==="string"){a=new J(t,{});for(n in Wa)delete a[n]}else if(o==="object"){for(n in t)n in Wa||(a[n]=t[n]);a.slashes===void 0&&(a.slashes=hi.test(t.href))}return a}i(Ja,"lolcation");function Q(t){return t==="file:"||t==="ftp:"||t==="http:"||t==="https:"||t==="ws:"||t==="wss:"}i(Q,"isSpecial");function Ya(t,e){t=cr(t),t=t.replace(za,""),e=e||{};var r=Ti.exec(t),a=r[1]?r[1].toLowerCase():"",o=!!r[2],n=!!r[3],s=0,p;return o?n?(p=r[2]+r[3]+r[4],s=r[2].length+r[3].length):(p=r[2]+r[4],s=r[2].length):n?(p=r[3]+r[4],s=r[3].length):p=r[4],a==="file:"?s>=2&&(p=p.slice(2)):Q(a)?p=r[4]:a?o&&(p=p.slice(2)):s>=2&&Q(e.protocol)&&(p=r[4]),{protocol:a,slashes:o||Q(a),slashesCount:s,rest:p}}i(Ya,"extractProtocol");function xi(t,e){if(t==="")return e;for(var r=(e||"/").split("/").slice(0,-1).concat(t.split("/")),a=r.length,o=r[a-1],n=!1,s=0;a--;)r[a]==="."?r.splice(a,1):r[a]===".."?(r.splice(a,1),s++):s&&(a===0&&(n=!0),r.splice(a,1),s--);return n&&r.unshift(""),(o==="."||o==="..")&&r.push(""),r.join("/")}i(xi,"resolve");function J(t,e,r){if(t=cr(t),t=t.replace(za,""),!(this instanceof J))return new J(t,e,r);var a,o,n,s,p,y,c=pr.slice(),u=typeof e,m=this,l=0;for(u!=="object"&&u!=="string"&&(r=e,e=null),r&&typeof r!="function"&&(r=at.parse),e=Ja(e),o=Ya(t||"",e),a=!o.protocol&&!o.slashes,m.slashes=o.slashes||a&&e.slashes,m.protocol=o.protocol||e.protocol||"",t=o.rest,(o.protocol==="file:"&&(o.slashesCount!==2||gi.test(t))||!o.slashes&&(o.protocol||o.slashesCount<2||!Q(m.protocol)))&&(c[3]=[/(.*)/,"pathname"]);l_t,AuthenticationType:()=>_e,ConnectionRequirement:()=>Oe,CurrencyFormat:()=>kt,DurationUnit:()=>Nt,EmailDisplayType:()=>Rt,ImageCornerStyle:()=>Ct,ImageOutline:()=>Mt,ImageShapeStyle:()=>jt,LinkDisplayType:()=>Et,MissingScopesError:()=>pt,NetworkConnection:()=>xt,OptionsType:()=>Ve,PackDefinitionBuilder:()=>je,ParameterType:()=>Ue,PostSetupType:()=>Tt,PrecannedDateRange:()=>St,PropertyLabelValueTemplate:()=>Or,ScaleIconSet:()=>wt,StatusCodeError:()=>st,SvgConstants:()=>ht,TokenExchangeCredentialsLocation:()=>gt,Type:()=>Be,UpdateOutcome:()=>ur,UserVisibleError:()=>le,ValidFetchMethods:()=>xr,ValueHintType:()=>Le,ValueType:()=>Fe,assertCondition:()=>Z,autocompleteSearchObjects:()=>cn,ensureExists:()=>N,ensureNonEmptyString:()=>ue,ensureUnreachable:()=>ye,generateSchema:()=>Ke,getEffectivePropertyKeysFromSchema:()=>ln,getQueryParams:()=>en,joinUrl:()=>tn,makeAttributionNode:()=>Fr,makeDynamicSyncTable:()=>ft,makeEmptyFormula:()=>yn,makeFormula:()=>Me,makeMetadataFormula:()=>ut,makeObjectSchema:()=>te,makeParameter:()=>ct,makePropertyOptionsFormula:()=>lt,makeReferenceSchemaFromObjectSchema:()=>Rr,makeSchema:()=>kr,makeSimpleAutocompleteMetadataFormula:()=>fr,makeSyncTable:()=>Ce,makeTranslateObjectFormula:()=>mn,newPack:()=>un,simpleAutocomplete:()=>lr,withIdentity:()=>Er,withQueryParams:()=>ot});module.exports=vn(wi);var _e=(S=>(S.None="None",S.HeaderBearerToken="HeaderBearerToken",S.CustomHeaderToken="CustomHeaderToken",S.MultiHeaderToken="MultiHeaderToken",S.QueryParamToken="QueryParamToken",S.MultiQueryParamToken="MultiQueryParamToken",S.OAuth2="OAuth2",S.OAuth2ClientCredentials="OAuth2ClientCredentials",S.WebBasic="WebBasic",S.Custom="Custom",S.AWSAccessKey="AWSAccessKey",S.AWSAssumeRole="AWSAssumeRole",S.CodaApiHeaderBearerToken="CodaApiHeaderBearerToken",S.GoogleDomainWideDelegation="GoogleDomainWideDelegation",S.GoogleServiceAccount="GoogleServiceAccount",S.Various="Various",S))(_e||{}),Tt=(e=>(e.SetEndpoint="SetEndPoint",e))(Tt||{}),gt=(a=>(a.Automatic="Automatic",a.Body="Body",a.AuthorizationHeader="AuthorizationHeader",a))(gt||{});var Be=(c=>(c[c.string=0]="string",c[c.number=1]="number",c[c.object=2]="object",c[c.boolean=3]="boolean",c[c.date=4]="date",c[c.html=5]="html",c[c.image=6]="image",c[c.file=7]="file",c[c.markdown=8]="markdown",c))(Be||{});var Ue=(h=>(h.String="string",h.Number="number",h.Boolean="boolean",h.Date="date",h.Html="html",h.Image="image",h.File="file",h.Markdown="markdown",h.StringArray="stringArray",h.SparseStringArray="sparseStringArray",h.NumberArray="numberArray",h.SparseNumberArray="sparseNumberArray",h.BooleanArray="booleanArray",h.SparseBooleanArray="sparseBooleanArray",h.DateArray="dateArray",h.SparseDateArray="sparseDateArray",h.HtmlArray="htmlArray`",h.SparseHtmlArray="sparseHtmlArray",h.ImageArray="imageArray",h.SparseImageArray="sparseImageArray",h.FileArray="fileArray",h.SparseFileArray="sparseFileArray",h.MarkdownArray="markdownArray`",h.SparseMarkdownArray="sparseMarkdownArray",h))(Ue||{}),gr={string:0,number:1,boolean:3,date:4,html:5,image:6,file:7,markdown:8,stringArray:{type:"array",items:0},numberArray:{type:"array",items:1},booleanArray:{type:"array",items:3},dateArray:{type:"array",items:4},"htmlArray`":{type:"array",items:5},imageArray:{type:"array",items:6},fileArray:{type:"array",items:7},"markdownArray`":{type:"array",items:8},sparseStringArray:{type:"array",items:0,allowEmpty:!0},sparseNumberArray:{type:"array",items:1,allowEmpty:!0},sparseBooleanArray:{type:"array",items:3,allowEmpty:!0},sparseDateArray:{type:"array",items:4,allowEmpty:!0},sparseHtmlArray:{type:"array",items:5,allowEmpty:!0},sparseImageArray:{type:"array",items:6,allowEmpty:!0},sparseFileArray:{type:"array",items:7,allowEmpty:!0},sparseMarkdownArray:{type:"array",items:8,allowEmpty:!0}},Oe=(a=>(a.None="none",a.Optional="optional",a.Required="required",a))(Oe||{}),xt=(a=>(a.None="none",a.Optional="optional",a.Required="required",a))(xt||{}),xr=["GET","PATCH","POST","PUT","DELETE","HEAD"],St=(T=>(T.Yesterday="yesterday",T.Last7Days="last_7_days",T.Last30Days="last_30_days",T.Last90Days="last_90_days",T.Last180Days="last_180_days",T.Last365Days="last_365_days",T.LastWeek="last_week",T.LastMonth="last_month",T.Last3Months="last_3_months",T.Last6Months="last_6_months",T.LastYear="last_year",T.Today="today",T.ThisWeek="this_week",T.ThisMonth="this_month",T.YearToDate="year_to_date",T.ThisYear="this_year",T.Last7AndNext7Days="last_7_and_next_7_days",T.Last30AndNext30Days="last_30_and_next_30_days",T.Tomorrow="tomorrow",T.Next7Days="next_7_days",T.Next30Days="next_30_days",T.Next90Days="next_90_days",T.Next180Days="next_180_days",T.Next365Days="next_365_days",T.NextWeek="next_week",T.NextMonth="next_month",T.Next3Months="next_3_months",T.Next6Months="next_6_months",T.NextYear="next_year",T.Everything="everything",T))(St||{}),Ve=(e=>(e.Dynamic="__coda_dynamic__",e))(Ve||{});function ye(t,e){throw new Error(e||`Unreachable code hit with value ${String(t)}`)}i(ye,"ensureUnreachable");function ue(t,e){if(typeof t!="string"||t.length===0)throw new(Pt(e))(e||`Expected non-empty string for ${String(t)}`);return t}i(ue,"ensureNonEmptyString");function N(t,e){if(typeof t>"u"||t===null)throw new(Pt(e))(e||`Expected value for ${String(t)}`);return t}i(N,"ensureExists");function Pt(t){return t?le:Error}i(Pt,"getErrorConstructor");function Z(t,e){if(!t)throw new(Pt(e))(e||"Assertion failed")}i(Z,"assertCondition");function X(t){return JSON.parse(JSON.stringify(t))}i(X,"deepCopy");function Sr(t){return t&&typeof t=="object"&&"then"in t}i(Sr,"isPromise");function fe(t){return new At(t)}i(fe,"objectSchemaHelper");var Ot=class Ot{constructor(e){this._schema=e,this._checkAgainstAllProperties(e)}_checkAgainstAllProperties(e){let{id:r,idProperty:a,primary:o,displayProperty:n,featuredProperties:s,featured:p,identity:y,options:c,properties:u,type:m,attribution:l,codaType:b,requireForUpdates:x,includeUnknownProperties:A,titleProperty:S,linkProperty:d,subtitleProperties:F,snippetProperty:f,imageProperty:g,description:P,createdAtProperty:D,createdByProperty:j,modifiedAtProperty:h,modifiedByProperty:E,userEmailProperty:U,userIdProperty:B,groupIdProperty:v,bodyTextProperty:w,popularityRankProperty:T,parentIdProperty:R,...k}=e;}get id(){return this._schema.idProperty??this._schema.id}get primary(){return this._schema.displayProperty??this._schema.primary}get featured(){return this._schema.featuredProperties??this._schema.featured}get identity(){return this._schema.identity}get options(){return this._schema.options}get properties(){return this._schema.properties}get type(){return this._schema.type}get attribution(){return this._schema.attribution??this._schema.identity?.attribution}get codaType(){return this._schema.codaType}get requireForUpdates(){return this._schema.requireForUpdates}};i(Ot,"ObjectSchemaHelper");var At=Ot;function Dt(t){return new bt(t)}i(Dt,"setEndpointDefHelper");var Ft=class Ft{constructor(e){this._step=e}get getOptions(){return N(this._step.getOptions??this._step.getOptionsFormula)}};i(Ft,"SetEndpointDefHelper");var bt=Ft;var Dr=Ne(Ar());var Fe=(n=>(n.Boolean="boolean",n.Number="number",n.String="string",n.Array="array",n.Object="object",n))(Fe||{}),Le=(D=>(D.Date="date",D.Time="time",D.DateTime="datetime",D.Duration="duration",D.Email="email",D.Person="person",D.Percent="percent",D.Currency="currency",D.ImageReference="image",D.ImageAttachment="imageAttachment",D.Url="url",D.Markdown="markdown",D.Html="html",D.Embed="embed",D.Reference="reference",D.Attachment="attachment",D.Slider="slider",D.Scale="scale",D.ProgressBar="progressBar",D.Toggle="toggle",D.CodaInternalRichText="codaInternalRichText",D.SelectList="selectList",D))(Le||{});var kt=(a=>(a.Currency="currency",a.Accounting="accounting",a.Financial="financial",a))(kt||{}),wt=(g=>(g.Star="star",g.Circle="circle",g.Fire="fire",g.Bug="bug",g.Diamond="diamond",g.Bell="bell",g.ThumbsUp="thumbsup",g.Heart="heart",g.Chili="chili",g.Smiley="smiley",g.Lightning="lightning",g.Currency="currency",g.Coffee="coffee",g.Person="person",g.Battery="battery",g.Cocktail="cocktail",g.Cloud="cloud",g.Sun="sun",g.Checkmark="checkmark",g.LightBulb="lightbulb",g))(wt||{}),Rt=(a=>(a.IconAndEmail="iconAndEmail",a.IconOnly="iconOnly",a.EmailOnly="emailOnly",a))(Rt||{}),Et=(n=>(n.IconOnly="iconOnly",n.Url="url",n.Title="title",n.Card="card",n.Embed="embed",n))(Et||{}),Mt=(r=>(r.Disabled="disabled",r.Solid="solid",r))(Mt||{}),Ct=(r=>(r.Rounded="rounded",r.Square="square",r))(Ct||{}),jt=(r=>(r.Auto="auto",r.Circle="circle",r))(jt||{}),Nt=(o=>(o.Days="days",o.Hours="hours",o.Minutes="minutes",o.Seconds="seconds",o))(Nt||{});var Or="{VALUE}";var _t=(a=>(a[a.Text=1]="Text",a[a.Link=2]="Link",a[a.Image=3]="Image",a))(_t||{});function Fr(t){return t}i(Fr,"makeAttributionNode");function vr(t){return!!(t&&t.type==="object")}i(vr,"isObject");function He(t){return!!(t&&t.type==="array")}i(He,"isArray");function Bt(t){return!!t?.codaType&&["selectList","reference"].includes(t.codaType)}i(Bt,"unwrappedSchemaSupportsOptions");function de(t){if(!He(t))return t;if(!He(t.items))return t.items}i(de,"maybeUnwrapArraySchema");function Ke(t){if(Array.isArray(t)){if(t.length===0)throw new Error("Must have representative value.");return{type:"array",items:Ke(t[0])}}if(typeof t=="object"){let e={};if(t===null)return{type:"string"};for(let r in t)t.hasOwnProperty(r)&&(e[r]=Ke(t[r]));return{type:"object",properties:e}}else{if(typeof t=="string")return{type:"string"};if(typeof t=="boolean")return{type:"boolean"};if(typeof t=="number")return{type:"number"}}return ye(t)}i(Ke,"generateSchema");function kr(t){return t}i(kr,"makeSchema");function te(t){let e={...t,type:"object"};for(let r of Object.keys(e.properties))if(r!=="type"){let a=r,n=de(e.properties[r])?.options,s=typeof n=="function"?n:void 0;if(e.properties[a]=X(e.properties[r]),s){let p=de(e.properties[a]);N(p,"deepCopy() broke maybeUnwrapArraySchema?..."),p.options=s}}return wr(e),e}i(te,"makeObjectSchema");function wr(t){if(t.codaType==="reference"){let{id:e,identity:r,primary:a}=fe(t);Ie(e,"idProperty",t.codaType),Ie(r,"identity",t.codaType),Ie(a,"displayProperty",t.codaType),vt(N(e),t,"idProperty"),vt(N(a),t,"displayProperty")}if(t.codaType==="person"){let{id:e}=fe(t);Ie(e,"idProperty",t.codaType),vt(N(e),t,"idProperty")}for(let[e,r]of Object.entries(t.properties))r.type==="object"&&wr(r)}i(wr,"validateObjectSchema");function Ie(t,e,r){N(t,`Objects with codaType "${r}" require a "${e}" property in the schema definition.`)}i(Ie,"checkRequiredFieldInObjectSchema");function vt(t,e,r){let{properties:a,codaType:o}=e;Z(a[t],`${r} set to undefined field "${t}"`),Z(a[t].required,`Field "${t}" must be marked as required in schema with codaType "${o}".`)}i(vt,"checkSchemaPropertyIsRequired");function q(t){return(0,Dr.default)(t).replace(/:/g,"_")}i(q,"normalizeSchemaKey");function br(t,e){return e.hasOwnProperty(q(t))?q(t):t.split(".").map(r=>{let a=r,o="";return r.includes("[")&&(a=r.substring(0,r.indexOf("[")),o=r.substring(r.indexOf("["))),q(a)+o}).join(".")}i(br,"normalizeSchemaKeyPath");function L(t,e){if(typeof t=="string")return br(t,e);let{label:r,property:a,placeholder:o,...n}=t;return{property:br(a,e),label:r,placeholder:o}}i(L,"normalizeSchemaPropertyIdentifier");function re(t){return He(t)?{...t,type:"array",items:re(t.items)}:vr(t)?Rn(t):{...t}}i(re,"normalizeSchema");function Rn(t){let e={},{attribution:r,options:a,requireForUpdates:o,codaType:n,description:s,displayProperty:p,featured:y,featuredProperties:c,id:u,identity:m,idProperty:l,parentIdProperty:b,imageProperty:x,includeUnknownProperties:A,linkProperty:S,primary:d,properties:F,snippetProperty:f,subtitleProperties:g,titleProperty:P,type:D,__packId:j,createdAtProperty:h,createdByProperty:E,modifiedAtProperty:U,modifiedByProperty:B,userEmailProperty:v,userIdProperty:w,groupIdProperty:T,bodyTextProperty:R,popularityRankProperty:k,...G}=t;for(let H of Object.keys(F)){let Y=q(H),me=F[H],{displayName:fn,fixedId:dn,fromKey:hn,mutable:Tn,originalKey:gn,required:xn}=me;if(gn)throw new Error("Original key is only for internal use.");let Sn={displayName:fn,fixedId:dn,fromKey:hn||(Y!==H?H:void 0),mutable:Tn,originalKey:H,required:xn};e[Y]=Object.assign(re(me),Sn)}return{attribution:r,options:a,requireForUpdates:o,codaType:n,description:s,displayProperty:p?q(p):void 0,featured:y?y.map(q):void 0,featuredProperties:c?c.map(q):void 0,id:u?q(u):void 0,identity:m,idProperty:l?q(l):void 0,parentIdProperty:b?q(b):void 0,imageProperty:x?L(x,e):void 0,includeUnknownProperties:A,linkProperty:S?L(S,e):void 0,primary:d?q(d):void 0,properties:e,snippetProperty:f?L(f,e):void 0,subtitleProperties:g?g.map(H=>L(H,e)):void 0,titleProperty:P?L(P,e):void 0,createdAtProperty:h?L(h,e):void 0,createdByProperty:E?L(E,e):void 0,modifiedAtProperty:U?L(U,e):void 0,modifiedByProperty:B?L(B,e):void 0,userEmailProperty:v?L(v,e):void 0,userIdProperty:w?L(w,e):void 0,groupIdProperty:T?L(T,e):void 0,bodyTextProperty:R?L(R,e):void 0,popularityRankProperty:k?L(k,e):void 0,type:"object"}}i(Rn,"normalizeObjectSchema");function Rr(t,e){let{type:r,id:a,primary:o,identity:n,properties:s,options:p,requireForUpdates:y}=fe(t),{mutable:c}=t;N(n||e,"Source schema must have an identity field, or you must provide an identity name for the reference.");let u=N(a),m={[u]:s[u]};o&&o!==a&&(N(s[o],`Display property "${o}" must refer to a valid property schema.`),m[o]=s[o]);let l={codaType:"reference",displayProperty:o,identity:n||{name:N(e)},idProperty:a,mutable:c,options:p,properties:m,type:r,requireForUpdates:y};return te(l)}i(Rr,"makeReferenceSchemaFromObjectSchema");function Er(t,e){return te({...X(t),identity:{name:ue(e)}})}i(Er,"withIdentity");var an=Ne(Mr());var nt=Ne(Ia()),mr=Ne(Xa());function ot(t,e){if(!e)return t;let r=(0,mr.default)(t),a=Object.assign({},nt.default.parse(r.query,{ignoreQueryPrefix:!0}),e);return r.set("query",nt.default.stringify(JSON.parse(JSON.stringify(a)),{addQueryPrefix:!0})),r.toString()}i(ot,"withQueryParams");function en(t){let e=(0,mr.default)(t);return nt.default.parse(e.query,{ignoreQueryPrefix:!0})}i(en,"getQueryParams");function tn(...t){if(!t||!t.length)return"";let e=[];for(let a of t)ue(a),e.length===0?e.push(a):e.push(a.replace(/^\/+/,"")),a.endsWith("/")||e.push("/");let r=e.join("");return t[t.length-1].endsWith("/")?r:r.slice(0,r.length-1)}i(tn,"join");function Ai(t,e,r){let a={};return t.forEach(o=>{let n=e[o];if(typeof n>"u"){if(r&&r.has(o))return;n=""}a[o]=n}),a}i(Ai,"generateParamMap");function rn(t,e,r){let a={};return t.forEach(o=>{let n=e[o];if(typeof n>"u"){if(r&&r.has(o))return;n=""}a[o]=encodeURIComponent(String(n))}),a}i(rn,"generateQueryParamMap");function bi(t,e){let r=t;for(let[a,o]of Object.entries(e))r=r.replace(`{${a}}`,o);return r}i(bi,"formatString");function yr(t,e){let{url:r,queryParams:a,nameMapping:o,bodyTemplate:n,bodyParams:s,method:p,headers:y,transforms:c}=t,u=new Map,m=new Set,l=new Set;e.forEach((A,S)=>{let d=o&&o[A.name]||A.name;if(m.has(d))throw new Error(`Duplicate name ${d} detected`);m.add(d),A.optional&&l.add(d),u.set(S,d)});let b=!!(a&&a.length),x=!!(s&&s.length);return i(function(S){let d={};S.forEach((P,D)=>{let j=N(u.get(D)),h=c?c[j]:void 0;if(h){let E=h(P);E&&typeof E=="object"?Object.assign(d,E):d[j]=E}else d[j]=P});let F=bi(r,rn(Object.keys(d),d)),f=b?ot(F,rn(N(a),d,l)):F,g;if(n&&(g=(0,an.default)(n)),x){let P=Ai(N(s),d,l);g=g?{...g,...P}:P}return{url:f,method:p,headers:{Accept:"application/json","Content-Type":"application/json",...y},body:g?JSON.stringify(g):void 0}},"requestHandler")}i(yr,"generateRequestHandler");function it(t){let{projectKey:e}=t;return i(function(a){let{body:o}=a;return typeof o!="object"?o:e?o[e]:o},"objectResponseHandler")}i(it,"generateObjectResponseHandler");var dr=class dr extends Error{constructor(r,a){super(r);this.isUserVisible=!0;this.internalError=a}};i(dr,"UserVisibleError");var le=dr,mt=class mt extends Error{constructor(r,a,o,n){super(`${r} - ${JSON.stringify(a)}`);this.name="StatusCodeError";this.statusCode=r,this.body=a,this.error=a,this.options=o;let s=n?.body;typeof s=="object"&&(s=JSON.stringify(s)),this.response={...n,body:s}}static isStatusCodeError(r){return"name"in r&&r.name===mt.name}};i(mt,"StatusCodeError");var st=mt,yt=class yt extends Error{constructor(r){super(r||"Additional permissions are required");this.name="MissingScopesError"}static isMissingScopesError(r){return"name"in r&&r.name===yt.name}};i(yt,"MissingScopesError");var pt=yt;function pn(t){return"isDynamic"in t}i(pn,"isDynamicSyncTable");function K(t){return typeof t=="function"?ut(t):t}i(K,"wrapMetadataFunction");function nn(t){return t?.type==="array"?t:{type:"array",items:t}}i(nn,"transformToArraySchema");function Di(t){if(t)return{...t,execute(e,r){let a=t.execute(e,r);return Sr(a)?a.then(o=>nn(o)):nn(a)}}}i(Di,"wrapGetSchema");function ct(t){let{type:e,autocomplete:r,crawlStrategy:a,...o}=t,n=gr[e],s;if(Array.isArray(r)){let y=fr(r);s=K(y)}else s=K(r);let p;if(a)if(a.parentTable){let{tableName:y,propertyKey:c,inheritPermissions:u}=a.parentTable;p={parentTable:{tableName:y,propertyKey:q(c),inheritPermissions:u}}}else p=a;return Object.freeze({...o,autocomplete:s,type:n,crawlStrategy:p})}i(ct,"makeParameter");var ur=(r=>(r.Success="success",r.Error="error",r))(ur||{}),on=1e3;function Me(t){let e;switch(t.resultType){case"string":{let a={...t,codaType:"codaType"in t?t.codaType:void 0,formulaSchema:"schema"in t?t.schema:void 0},{onError:o,resultType:n,codaType:s,formulaSchema:p,...y}=a;Z(s!=="selectList","ValueHintType.SelectList is not supported for formula result types."),e={...y,resultType:0,schema:p||(s?{type:"string",codaType:s}:void 0)};break}case"number":{let a={...t,codaType:"codaType"in t?t.codaType:void 0,formulaSchema:"schema"in t?t.schema:void 0},{onError:o,resultType:n,codaType:s,formulaSchema:p,...y}=a;e={...y,resultType:1,schema:p||(s?{type:"number",codaType:s}:void 0)};break}case"boolean":{let{onError:a,resultType:o,...n}=t;e={...n,resultType:3};break}case"array":{let{onError:a,resultType:o,items:n,...s}=t;e={...s,resultType:2,schema:X(re({type:"array",items:n}))};break}case"object":{let{onError:a,resultType:o,schema:n,...s}=t;e={...s,resultType:2,schema:X(re(n))};break}default:return ye(t)}let r=t.onError;if(r){let a=e.execute;e.execute=async function(o,n){try{return await a(o,n)}catch(s){return r(s)}}}return C(e,t.connectionRequirement)}i(Me,"makeFormula");function ut(t,e){return Fi({name:"getMetadata",description:"Gets metadata",execute([r,a],o){let n={};try{n=JSON.parse(a||"")}catch{}return t(o,r,n)},parameters:[ct({type:"string",name:"search",description:"Metadata to search for.",optional:!0}),ct({type:"string",name:"formulaContext",description:"Serialized JSON for metadata.",optional:!0})],examples:[],connectionRequirement:e?.connectionRequirement||"optional"})}i(ut,"makeMetadataFormula");function lt({execute:t,schema:e,name:r}){if(!(t instanceof Function))throw new Error("Value for execute must be a function");let a=t,o=i(async([],p)=>a(p),"innerExecute"),n={connectionRequirement:"optional",execute:o,name:r,description:`A property options function for ${r}`,parameters:[],resultType:"array",items:e};return Me(n)}i(lt,"makePropertyOptionsFormula");function lr(t,e){let r=(t||"").toLowerCase(),a=e.filter(n=>(typeof n=="string"||typeof n=="number"?n:n.display).toString().toLowerCase().includes(r)),o=[];for(let n of a)typeof n=="string"?o.push({value:n,display:n}):typeof n=="number"?o.push({value:n,display:n.toString()}):o.push(n);return Promise.resolve(o)}i(lr,"simpleAutocomplete");async function cn(t,e,r,a){if(typeof t!="string")throw new TypeError(`Expecting a string for "search" parameter but received ${t}`);let o=t.toLowerCase(),n=[];for(let s of e){let p=s[r];if(!p.toLowerCase().includes(o))continue;let y=s[a];n.push({display:p,value:y})}return n}i(cn,"autocompleteSearchObjects");function fr(t){return ut((e,r)=>lr(r,t),{connectionRequirement:"optional"})}i(fr,"makeSimpleAutocompleteMetadataFormula");function sn(t){return t&&t.schema}i(sn,"isResponseHandlerTemplate");function Oi(t){return t&&t.example}i(Oi,"isResponseExampleTemplate");function Fi({response:t,...e}){let r;if(t)if(sn(t)&&t.schema){let o=X(t.schema);t.schema=re(o),r=t.schema}else Oi(t);let a=e.execute;if(sn(t)){let{onError:o}=t,n=a,s=it(t);a=i(async function(y,c){let u;try{u=await n(y,c)}catch(m){if(o)u=o(m);else throw m}return s({body:u||{},status:200,headers:{}})},"exec")}return Object.assign({},e,{resultType:2,execute:a,schema:r})}i(Fi,"makeObjectFormula");function Ce({name:t,description:e,identityName:r,schema:a,formula:o,connectionRequirement:n,dynamicOptions:s={},role:p}){let{getSchema:y,entityName:c,defaultAddDynamicColumns:u}=s,{execute:m,executeUpdate:l,executeGetPermissions:b,...x}=C(o,n),A=X(a);if(!r)throw new Error("Sync table schemas must set an identityName");if(A.identity){if(A.identity.name&&A.identity.name!==r)throw new Error(`Identity name mismatch for sync table ${t}. Either remove the schema's identity.name (${A.identity.name}) or ensure it matches the table's identityName (${r}).`);A.identity={...A.identity,name:r}}else A.identity={name:r};if(p==="users"){if(!A.userEmailProperty)throw new Error("Sync table schemas with role users must set a userEmailProperty");if(!A.userIdProperty)throw new Error("Sync table schemas with role users must set a userIdProperty")}if(p==="groupMembers"){if(!A.groupIdProperty)throw new Error("Sync table schemas with role groupMembers must set a groupIdProperty");if(!A.userIdProperty)throw new Error("Sync table schemas with role groupMembers must set a userIdProperty")}let S=Di(K(y)),d=te(A),F=ki({inputSchema:a,schema:d,identityName:r});s.propertyOptions&&(F??(F={}),F.__coda_dynamic__=lt({execute:s.propertyOptions,schema:te({properties:{}}),name:`${r}.DynamicPropertyOptions`}));let f=re(d),g=S?void 0:{type:"array",items:f},{identity:P,id:D,primary:j}=fe(d);if(!(j&&D))throw new Error("Sync table schemas should have defined properties for idProperty and displayProperty");if(!P)throw new Error("Unknown error creating sync table identity");if(t.includes(" "))throw new Error("Sync table name should not include spaces");let h=it({schema:g}),E=i(async function(w,T){let R=await m(w,T)||{},k=T.sync.schema,G=h({body:R.result||[],status:200,headers:{}},k),{continuation:H,completion:Y}=R,me={result:G};return H&&(me.continuation=H),Y&&(me.completion=Y),me},"exec"),U=l?i(async function(w,T,R){let{result:k}=await l(w,T,R)||{},G=R.sync.schema;return{result:h({body:k||[],status:200,headers:{}},G)}},"execUpdate"):void 0,B=b?i(async function(w,T,R){let k=await b(w,T,R),{rowAccessDefinitions:G}=k,H=G.filter(Y=>Y.permissions.length>on);if(H.length>0)throw new Error(`Objects with ids: ${H.map(Y=>Y.rowId).join(", ")} returned more permissions than the maximum allowed of ${on} per object`);return k},"execGetPermissions"):void 0;return{name:t,description:e,schema:f,identityName:r,getter:{...x,cacheTtlSecs:0,execute:E,executeUpdate:U,schema:g,isSyncFormula:!0,supportsUpdates:!!U,supportsGetPermissions:!!B,connectionRequirement:x.connectionRequirement||n,resultType:2,executeGetPermissions:B},getSchema:C(S,n),entityName:c,defaultAddDynamicColumns:u,namedPropertyOptions:dt(F,n),role:p}}i(Ce,"makeSyncTable");function ft({name:t,description:e,getName:r,getSchema:a,identityName:o,getDisplayUrl:n,formula:s,listDynamicUrls:p,searchDynamicUrls:y,entityName:c,connectionRequirement:u,defaultAddDynamicColumns:m,placeholderSchema:l,propertyOptions:b}){let x=l||te({type:"object",idProperty:"id",displayProperty:"id",identity:{name:o},properties:{id:{type:"string"}}}),A=K(r),S=K(a),d=K(n),F=K(p),f=K(y);return{...Ce({name:t,description:e,identityName:o,schema:x,formula:s,connectionRequirement:u,dynamicOptions:{getSchema:S,entityName:c,defaultAddDynamicColumns:m,propertyOptions:b}}),isDynamic:!0,getDisplayUrl:C(d,u),listDynamicUrls:C(F,u),searchDynamicUrls:C(f,u),getName:C(A,u)}}i(ft,"makeDynamicSyncTable");function mn({response:t,...e}){let{request:r,...a}=e,{parameters:o}=a;t.schema=t.schema?re(t.schema):void 0;let{onError:n}=t,s=yr(r,o),p=it(t);function y(c,u){return u.fetcher.fetch(s(c)).catch(m=>{if(n)return n(m);throw m}).then(p)}return i(y,"execute"),Object.assign({},a,{execute:y,resultType:2,schema:t.schema})}i(mn,"makeTranslateObjectFormula");function yn(t){let{request:e,...r}=t,{parameters:a}=r,o=yr(e,a);function n(s,p){return p.fetcher.fetch(o(s)).then(()=>"")}return i(n,"execute"),Object.assign({},r,{execute:n,resultType:0})}i(yn,"makeEmptyFormula");function dt(t,e){if(!t)return t;let r={};for(let a of Object.keys(t))r[a]=C(t[a],e);return r}i(dt,"maybeRewriteConnectionForNamedPropertyOptions");function C(t,e){return t&&e?{...t,parameters:t.parameters.map(r=>({...r,autocomplete:r.autocomplete?C(r.autocomplete,e):void 0})),varargParameters:t.varargParameters?.map(r=>({...r,autocomplete:r.autocomplete?C(r.autocomplete,e):void 0})),connectionRequirement:e}:t}i(C,"maybeRewriteConnectionForFormula");function vi(t){let e=[];for(let r of Object.keys(t.properties)){let a=de(t.properties[r]);if(!a||!("options"in a))continue;let{options:o}=a;o&&typeof o=="function"&&e.push(r)}return e}i(vi,"listPropertiesWithOptionsFunctions");function ki({inputSchema:t,schema:e,identityName:r}){let a={},o=vi(t);if(o.length){for(let n of o){let s=de(t.properties[n]),p=de(e.properties[n]);Z(Bt(s),`Property "${n}" must have codaType of ValueHintType.SelectList or ValueHintType.Reference to configure property options`),Z(Bt(p),`Property "${n}" lost codaType on deep copy?...`),p.options=n,a[n]=lt({execute:s.options,schema:e.properties[n],name:`${r}.${n}.Options`})}return a}}i(ki,"moveJsPropertyOptionsFunctionsToFormulas");function un(t){return new je(t)}i(un,"newPack");var hr=class hr{constructor(e){let{formulas:r,formats:a,syncTables:o,networkDomains:n,defaultAuthentication:s,systemConnectionAuthentication:p,version:y,formulaNamespace:c}=e||{};this.formulas=r||[],this.formats=a||[],this.syncTables=o||[],this.networkDomains=n||[],this.defaultAuthentication=s,this.systemConnectionAuthentication=p,this.version=y,this.formulaNamespace=c||"Deprecated"}addFormula(e){let r=Me({...e,connectionRequirement:e.connectionRequirement||this._defaultConnectionRequirement});return this.formulas.push(r),this}addSyncTable({name:e,description:r,identityName:a,schema:o,formula:n,connectionRequirement:s,dynamicOptions:p={}}){let y=s||this._defaultConnectionRequirement,c=Ce({name:e,description:r,identityName:a,schema:o,formula:n,connectionRequirement:y,dynamicOptions:p});return this.syncTables.push(c),this}addDynamicSyncTable(e){let r=ft({...e,connectionRequirement:e.connectionRequirement||this._defaultConnectionRequirement});return this.syncTables.push(r),this}addColumnFormat(e){return this.formats.push(e),this}setUserAuthentication(e){let{defaultConnectionRequirement:r="required",...a}=e;if(a.type==="None"||a.type==="Various")this.defaultAuthentication=a;else{let{getConnectionName:o,getConnectionUserId:n,postSetup:s,...p}=a,y=K(o),c=K(n),u=s?.map(m=>({...m,getOptions:K(Dt(m).getOptions)}));this.defaultAuthentication={...p,getConnectionName:y,getConnectionUserId:c,postSetup:u}}return a.type!=="None"&&this._setDefaultConnectionRequirement(r),this}setSystemAuthentication(e){let{getConnectionName:r,getConnectionUserId:a,postSetup:o,...n}=e,s=K(r),p=K(a),y=o?.map(c=>({...c,getOptions:K(Dt(c).getOptions)}));return this.systemConnectionAuthentication={...n,getConnectionName:s,getConnectionUserId:p,postSetup:y},this}addNetworkDomain(...e){return this.networkDomains.push(...e),this}setVersion(e){return this.version=e,this}_setDefaultConnectionRequirement(e){return this._defaultConnectionRequirement=e,this.formulas=this.formulas.map(r=>r.connectionRequirement?r:C(r,e)),this.syncTables=this.syncTables.map(r=>r.getter.connectionRequirement?r:pn(r)?{...r,getter:C(r.getter,e),getName:C(r.getName,e),getDisplayUrl:C(r.getDisplayUrl,e),getSchema:C(r.getSchema,e),listDynamicUrls:C(r.listDynamicUrls,e),searchDynamicUrls:C(r.searchDynamicUrls,e),namedPropertyOptions:dt(r.namedPropertyOptions,e)}:{...r,getter:C(r.getter,e),getSchema:C(r.getSchema,e),namedPropertyOptions:dt(r.namedPropertyOptions,e)}),this}};i(hr,"PackDefinitionBuilder");var je=hr;function ln(t){if(t.type==="array"&&(t=t.items),t.type==="object")return[...new Set(Object.entries(t.properties).map(([e,r])=>r.fromKey||e))]}i(ln,"getEffectivePropertyKeysFromSchema");var ht;(a=>(a.DarkModeFragmentId="DarkMode",a.DataUrlPrefix="data:image/svg+xml;base64,",a.DataUrlPrefixWithDarkModeSupport="data:image/svg+xml;supportsDarkMode=1;base64,"))(ht||(ht={})); /*! Bundled license information: pascalcase/index.js: diff --git a/dist/helpers/migration.js b/dist/helpers/migration.js index e9fc7ef941..4699c8f486 100644 --- a/dist/helpers/migration.js +++ b/dist/helpers/migration.js @@ -22,7 +22,7 @@ class ObjectSchemaHelper { // Properties needed by ObjectSchemaHelper clients. id, idProperty, primary, displayProperty, featuredProperties, featured, identity, options, properties, type, attribution, codaType, requireForUpdates, // Properties not needed by ObjectSchemaHelper clients. - includeUnknownProperties, titleProperty, linkProperty, subtitleProperties, snippetProperty, imageProperty, description, createdAtProperty, createdByProperty, modifiedAtProperty, modifiedByProperty, userEmailProperty, userIdProperty, groupIdProperty, bodyTextProperty, popularityRankProperty, ...rest } = schema; + includeUnknownProperties, titleProperty, linkProperty, subtitleProperties, snippetProperty, imageProperty, description, createdAtProperty, createdByProperty, modifiedAtProperty, modifiedByProperty, userEmailProperty, userIdProperty, groupIdProperty, bodyTextProperty, popularityRankProperty, parentIdProperty, ...rest } = schema; (0, ensure_2.ensureNever)(); } get id() { diff --git a/dist/schema.d.ts b/dist/schema.d.ts index d04116b42a..91ec1f8528 100644 --- a/dist/schema.d.ts +++ b/dist/schema.d.ts @@ -1086,6 +1086,16 @@ export interface ObjectSchemaDefinition exte * @hidden */ groupIdProperty?: PropertyIdentifier; + /** + * The name of a property within {@link ObjectSchemaDefinition.properties} that represents a unique id for a + * parent entity for the object. It is recommended for sync table schemas with a bodyTextProperty to specify an + * a parentIdProperty, which uniquely identifies the entity that groups 1 to multiple rows. Note though that + * specifying a bodyTextProperty does not necessarily require it to be chunked into multiple rows. But if it is, + * a sync table where each row is a partial chunk of a larger document may want to specify a parent id that + * represents the document, while each row's id can be unique to the chunk. + * @hidden + */ + parentIdProperty?: K; /** * The name of the property within {@link ObjectSchemaDefinition.properties} that can be be interpreted as * text representing the body of this entity. diff --git a/dist/schema.js b/dist/schema.js index b0046ae4ce..718a841e63 100644 --- a/dist/schema.js +++ b/dist/schema.js @@ -691,7 +691,7 @@ function normalizeSchema(schema) { exports.normalizeSchema = normalizeSchema; function normalizeObjectSchema(schema) { const normalizedProperties = {}; - const { attribution, options, requireForUpdates, codaType, description, displayProperty, featured, featuredProperties, id, identity, idProperty, imageProperty, includeUnknownProperties, linkProperty, primary, properties, snippetProperty, subtitleProperties, titleProperty, type, + const { attribution, options, requireForUpdates, codaType, description, displayProperty, featured, featuredProperties, id, identity, idProperty, parentIdProperty, imageProperty, includeUnknownProperties, linkProperty, primary, properties, snippetProperty, subtitleProperties, titleProperty, type, // eslint-disable-next-line @typescript-eslint/naming-convention __packId, createdAtProperty, createdByProperty, modifiedAtProperty, modifiedByProperty, userEmailProperty, userIdProperty, groupIdProperty, bodyTextProperty, popularityRankProperty, ...rest } = schema; // Have TS ensure we don't forget about new fields in this function. @@ -725,6 +725,7 @@ function normalizeObjectSchema(schema) { id: id ? normalizeSchemaKey(id) : undefined, identity, idProperty: idProperty ? normalizeSchemaKey(idProperty) : undefined, + parentIdProperty: parentIdProperty ? normalizeSchemaKey(parentIdProperty) : undefined, imageProperty: imageProperty ? normalizeSchemaPropertyIdentifier(imageProperty, normalizedProperties) : undefined, includeUnknownProperties, linkProperty: linkProperty ? normalizeSchemaPropertyIdentifier(linkProperty, normalizedProperties) : undefined, diff --git a/dist/testing/upload_validation.js b/dist/testing/upload_validation.js index a793a2e6f0..ae0c0ee783 100644 --- a/dist/testing/upload_validation.js +++ b/dist/testing/upload_validation.js @@ -943,6 +943,7 @@ function buildMetadataSchema({ sdkVersion }) { description: z.string().optional(), id: z.string().min(1).optional(), idProperty: z.string().min(1).optional(), + parentIdProperty: z.string().min(1).optional(), primary: z.string().min(1).optional(), displayProperty: z.string().min(1).optional(), codaType: z.enum([...schema_10.ObjectHintValueTypes]).optional(), @@ -1010,6 +1011,11 @@ function buildMetadataSchema({ sdkVersion }) { return (0, object_utils_2.isNil)(schemaHelper.id) || schemaHelper.id in schemaHelper.properties; }, { message: 'The "idProperty" property must appear as a key in the "properties" object.', + }) + .refine(data => { + return (0, object_utils_2.isNil)(data.parentIdProperty) || data.parentIdProperty in data.properties; + }, { + message: 'The "parentIdProperty" property must appear as a key in the "properties" object.', }) .refine(data => { const schemaHelper = (0, migration_1.objectSchemaHelper)(data); diff --git a/helpers/migration.ts b/helpers/migration.ts index 24f482ae6f..db2690d02a 100644 --- a/helpers/migration.ts +++ b/helpers/migration.ts @@ -60,6 +60,7 @@ class ObjectSchemaHelper> { groupIdProperty, bodyTextProperty, popularityRankProperty, + parentIdProperty, ...rest } = schema; diff --git a/package.json b/package.json index 8467438569..5235e00418 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codahq/packs-sdk", - "version": "1.7.8-prerelease.1", + "version": "1.7.8-prerelease.2", "license": "MIT", "workspaces": [ "dev/eslint" diff --git a/schema.ts b/schema.ts index 471006f81d..e7fcb7252f 100644 --- a/schema.ts +++ b/schema.ts @@ -1247,6 +1247,16 @@ export interface ObjectSchemaDefinition * @hidden */ groupIdProperty?: PropertyIdentifier; + /** + * The name of a property within {@link ObjectSchemaDefinition.properties} that represents a unique id for a + * parent entity for the object. It is recommended for sync table schemas with a bodyTextProperty to specify an + * a parentIdProperty, which uniquely identifies the entity that groups 1 to multiple rows. Note though that + * specifying a bodyTextProperty does not necessarily require it to be chunked into multiple rows. But if it is, + * a sync table where each row is a partial chunk of a larger document may want to specify a parent id that + * represents the document, while each row's id can be unique to the chunk. + * @hidden + */ + parentIdProperty?: K; /** * The name of the property within {@link ObjectSchemaDefinition.properties} that can be be interpreted as @@ -1884,6 +1894,7 @@ export function normalizeObjectSchema(schema: GenericObjectSchema): GenericObjec id, identity, idProperty, + parentIdProperty, imageProperty, includeUnknownProperties, linkProperty, @@ -1937,6 +1948,7 @@ export function normalizeObjectSchema(schema: GenericObjectSchema): GenericObjec id: id ? normalizeSchemaKey(id) : undefined, identity, idProperty: idProperty ? normalizeSchemaKey(idProperty) : undefined, + parentIdProperty: parentIdProperty ? normalizeSchemaKey(parentIdProperty) : undefined, imageProperty: imageProperty ? normalizeSchemaPropertyIdentifier(imageProperty, normalizedProperties) : undefined, includeUnknownProperties, linkProperty: linkProperty ? normalizeSchemaPropertyIdentifier(linkProperty, normalizedProperties) : undefined, diff --git a/testing/upload_validation.ts b/testing/upload_validation.ts index 52209321db..aaf6f29435 100644 --- a/testing/upload_validation.ts +++ b/testing/upload_validation.ts @@ -1159,6 +1159,7 @@ function buildMetadataSchema({sdkVersion}: BuildMetadataSchemaArgs): { description: z.string().optional(), id: z.string().min(1).optional(), idProperty: z.string().min(1).optional(), + parentIdProperty: z.string().min(1).optional(), primary: z.string().min(1).optional(), displayProperty: z.string().min(1).optional(), codaType: z.enum([...ObjectHintValueTypes]).optional(), @@ -1232,6 +1233,14 @@ function buildMetadataSchema({sdkVersion}: BuildMetadataSchemaArgs): { message: 'The "idProperty" property must appear as a key in the "properties" object.', }, ) + .refine( + data => { + return isNil(data.parentIdProperty) || data.parentIdProperty in data.properties; + }, + { + message: 'The "parentIdProperty" property must appear as a key in the "properties" object.', + }, + ) .refine( data => { const schemaHelper = objectSchemaHelper(data as GenericObjectSchema);