@knapsack/core 4.70.5--canary.4921.ef6d5e7.0 → 4.70.5--canary.4960.c3d6fb1.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -23,36 +23,36 @@ function _interopNamespace(e) {
23
23
 
24
24
  var r__namespace = /*#__PURE__*/_interopNamespace(r);
25
25
 
26
- var zt=Object.create;var be=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Bt=Object.getOwnPropertyNames;var Ut=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty;var s=(e,t)=>be(e,"name",{value:t,configurable:!0});var ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wt=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bt(t))!Lt.call(e,o)&&o!==n&&be(e,o,{get:()=>t[o],enumerable:!(a=Kt(t,o))||a.enumerable});return e};var $t=(e,t,n)=>(n=e!=null?zt(Ut(e)):{},Wt(be(n,"default",{value:e,enumerable:!0}),e));var Me=ne((Mn,Oe)=>{Oe.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};});var ze=ne((Fn,Fe)=>{Fe.exports=s(function(t){return !t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},"isArrayish");});var Ue=ne((Kn,Be)=>{var Ht=ze(),Gt=Array.prototype.concat,jt=Array.prototype.slice,Ke=Be.exports=s(function(t){for(var n=[],a=0,o=t.length;a<o;a++){var d=t[a];Ht(d)?n=Gt.call(n,jt.call(d)):n.push(d);}return n},"swizzle");Ke.wrap=function(e){return function(){return e(Ke(arguments))}};});var He=ne((Un,$e)=>{var j=Me(),J=Ue(),Le=Object.hasOwnProperty,We=Object.create(null);for(ae in j)Le.call(j,ae)&&(We[j[ae]]=ae);var ae,_=$e.exports={to:{},get:{}};_.get=function(e){var t=e.substring(0,3).toLowerCase(),n,a;switch(t){case"hsl":n=_.get.hsl(e),a="hsl";break;case"hwb":n=_.get.hwb(e),a="hwb";break;default:n=_.get.rgb(e),a="rgb";break}return n?{model:a,value:n}:null};_.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,a=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^(\w+)$/,c=[0,0,0,1],l,p,E;if(l=e.match(n)){for(E=l[2],l=l[1],p=0;p<3;p++){var re=p*2;c[p]=parseInt(l.slice(re,re+2),16);}E&&(c[3]=parseInt(E,16)/255);}else if(l=e.match(t)){for(l=l[1],E=l[3],p=0;p<3;p++)c[p]=parseInt(l[p]+l[p],16);E&&(c[3]=parseInt(E+E,16)/255);}else if(l=e.match(a)){for(p=0;p<3;p++)c[p]=parseInt(l[p+1],0);l[4]&&(l[5]?c[3]=parseFloat(l[4])*.01:c[3]=parseFloat(l[4]));}else if(l=e.match(o)){for(p=0;p<3;p++)c[p]=Math.round(parseFloat(l[p+1])*2.55);l[4]&&(l[5]?c[3]=parseFloat(l[4])*.01:c[3]=parseFloat(l[4]));}else return (l=e.match(d))?l[1]==="transparent"?[0,0,0,0]:Le.call(j,l[1])?(c=j[l[1]],c[3]=1,c):null:null;for(p=0;p<3;p++)c[p]=O(c[p],0,255);return c[3]=O(c[3],0,1),c};_.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var a=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,d=O(parseFloat(n[2]),0,100),c=O(parseFloat(n[3]),0,100),l=O(isNaN(a)?1:a,0,1);return [o,d,c,l]}return null};_.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var a=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,d=O(parseFloat(n[2]),0,100),c=O(parseFloat(n[3]),0,100),l=O(isNaN(a)?1:a,0,1);return [o,d,c,l]}return null};_.to.hex=function(){var e=J(arguments);return "#"+ie(e[0])+ie(e[1])+ie(e[2])+(e[3]<1?ie(Math.round(e[3]*255)):"")};_.to.rgb=function(){var e=J(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};_.to.rgb.percent=function(){var e=J(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),a=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+n+"%, "+a+"%)":"rgba("+t+"%, "+n+"%, "+a+"%, "+e[3]+")"};_.to.hsl=function(){var e=J(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};_.to.hwb=function(){var e=J(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};_.to.keyword=function(e){return We[e.slice(0,3)]};function O(e,t,n){return Math.min(Math.max(t,e),n)}s(O,"clamp");function ie(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}s(ie,"hexDouble");});var it=$t(He());var Ye=Symbol.for("immer-nothing"),Ge=Symbol.for("immer-draftable"),C=Symbol.for("immer-state"),Jt=process.env.NODE_ENV!=="production"?[function(e){return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return `'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return `'original' expects a draft, got: ${e}`}]:[];function v(e,...t){if(process.env.NODE_ENV!=="production"){let n=Jt[e],a=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${a}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}s(v,"die");var W=Object.getPrototypeOf;function M(e){return !!e&&!!e[C]}s(M,"isDraft");function K(e){return e?Qe(e)||Array.isArray(e)||!!e[Ge]||!!e.constructor?.[Ge]||ce(e)||de(e):!1}s(K,"isDraftable");var Xt=Object.prototype.constructor.toString();function Qe(e){if(!e||typeof e!="object")return !1;let t=W(e);if(t===null)return !0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Xt}s(Qe,"isPlainObject");function se(e,t){ue(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e);}):e.forEach((n,a)=>t(a,n,e));}s(se,"each");function ue(e){let t=e[C];return t?t.type_:Array.isArray(e)?1:ce(e)?2:de(e)?3:0}s(ue,"getArchtype");function Se(e,t){return ue(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}s(Se,"has");function Ze(e,t,n){let a=ue(e);a===2?e.set(t,n):a===3?e.add(n):e[t]=n;}s(Ze,"set");function qt(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}s(qt,"is");function ce(e){return e instanceof Map}s(ce,"isMap");function de(e){return e instanceof Set}s(de,"isSet");function z(e){return e.copy_||e.base_}s(z,"latest");function _e(e,t){if(ce(e))return new Map(e);if(de(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=Qe(e);if(t===!0||t==="class_only"&&!n){let a=Object.getOwnPropertyDescriptors(e);delete a[C];let o=Reflect.ownKeys(a);for(let d=0;d<o.length;d++){let c=o[d],l=a[c];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(a[c]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[c]});}return Object.create(W(e),a)}else {let a=W(e);if(a!==null&&n)return {...e};let o=Object.create(a);return Object.assign(o,e)}}s(_e,"shallowCopy");function Ae(e,t=!1){return pe(e)||M(e)||!K(e)||(ue(e)>1&&(e.set=e.add=e.clear=e.delete=Yt),Object.freeze(e),t&&Object.entries(e).forEach(([n,a])=>Ae(a,!0))),e}s(Ae,"freeze");function Yt(){v(2);}s(Yt,"dontMutateFrozenCollections");function pe(e){return Object.isFrozen(e)}s(pe,"isFrozen");var Qt={};function B(e){let t=Qt[e];return t||v(0,e),t}s(B,"getPlugin");var X;function et(){return X}s(et,"getCurrentScope");function Zt(e,t){return {drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}s(Zt,"createScope");function je(e,t){t&&(B("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t);}s(je,"usePatchesInScope");function Ce(e){we(e),e.drafts_.forEach(er),e.drafts_=null;}s(Ce,"revokeScope");function we(e){e===X&&(X=e.parent_);}s(we,"leaveScope");function Je(e){return X=Zt(X,e)}s(Je,"enterScope");function er(e){let t=e[C];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0;}s(er,"revokeDraft");function Xe(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[C].modified_&&(Ce(t),v(4)),K(e)&&(e=oe(t,e),t.parent_||le(t,e)),t.patches_&&B("Patches").generateReplacementPatches_(n[C].base_,e,t.patches_,t.inversePatches_)):e=oe(t,n,[]),Ce(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ye?e:void 0}s(Xe,"processResult");function oe(e,t,n){if(pe(t))return t;let a=t[C];if(!a)return se(t,(o,d)=>qe(e,a,t,o,d,n)),t;if(a.scope_!==e)return t;if(!a.modified_)return le(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;let o=a.copy_,d=o,c=!1;a.type_===3&&(d=new Set(o),o.clear(),c=!0),se(d,(l,p)=>qe(e,a,o,l,p,n,c)),le(e,o,!1),n&&e.patches_&&B("Patches").generatePatches_(a,n,e.patches_,e.inversePatches_);}return a.copy_}s(oe,"finalize");function qe(e,t,n,a,o,d,c){if(process.env.NODE_ENV!=="production"&&o===n&&v(5),M(o)){let l=d&&t&&t.type_!==3&&!Se(t.assigned_,a)?d.concat(a):void 0,p=oe(e,o,l);if(Ze(n,a,p),M(p))e.canAutoFreeze_=!1;else return}else c&&n.add(o);if(K(o)&&!pe(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;oe(e,o),(!t||!t.scope_.parent_)&&typeof a!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,a)&&le(e,o);}}s(qe,"finalizeProperty");function le(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ae(t,n);}s(le,"maybeFreeze");function tr(e,t){let n=Array.isArray(e),a={type_:n?1:0,scope_:t?t.scope_:et(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=a,d=Ee;n&&(o=[a],d=q);let{revoke:c,proxy:l}=Proxy.revocable(o,d);return a.draft_=l,a.revoke_=c,l}s(tr,"createProxyProxy");var Ee={get(e,t){if(t===C)return e;let n=z(e);if(!Se(n,t))return rr(e,n,t);let a=n[t];return e.finalized_||!K(a)?a:a===ve(e.base_,t)?(ke(e),e.copy_[t]=xe(a,e)):a},has(e,t){return t in z(e)},ownKeys(e){return Reflect.ownKeys(z(e))},set(e,t,n){let a=tt(z(e),t);if(a?.set)return a.set.call(e.draft_,n),!0;if(!e.modified_){let o=ve(z(e),t),d=o?.[C];if(d&&d.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(qt(n,o)&&(n!==void 0||Se(e.base_,t)))return !0;ke(e),Te(e);}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ve(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ke(e),Te(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=z(e),a=Reflect.getOwnPropertyDescriptor(n,t);return a&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:a.enumerable,value:n[t]}},defineProperty(){v(11);},getPrototypeOf(e){return W(e.base_)},setPrototypeOf(){v(12);}},q={};se(Ee,(e,t)=>{q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};});q.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&v(13),q.set.call(this,e,t,void 0)};q.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&v(14),Ee.set.call(this,e[0],t,n,e[0])};function ve(e,t){let n=e[C];return (n?z(n):e)[t]}s(ve,"peek");function rr(e,t,n){let a=tt(t,n);return a?"value"in a?a.value:a.get?.call(e.draft_):void 0}s(rr,"readPropFromProto");function tt(e,t){if(!(t in e))return;let n=W(e);for(;n;){let a=Object.getOwnPropertyDescriptor(n,t);if(a)return a;n=W(n);}}s(tt,"getDescriptorFromProto");function Te(e){e.modified_||(e.modified_=!0,e.parent_&&Te(e.parent_));}s(Te,"markChanged");function ke(e){e.copy_||(e.copy_=_e(e.base_,e.scope_.immer_.useStrictShallowCopy_));}s(ke,"prepareCopy");var nr=class{static{s(this,"Immer2");}constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,a)=>{if(typeof t=="function"&&typeof n!="function"){let d=n;n=t;let c=this;return s(function(p=d,...E){return c.produce(p,re=>n.call(this,re,...E))},"curriedProduce")}typeof n!="function"&&v(6),a!==void 0&&typeof a!="function"&&v(7);let o;if(K(t)){let d=Je(this),c=xe(t,void 0),l=!0;try{o=n(c),l=!1;}finally{l?Ce(d):we(d);}return je(d,a),Xe(o,d)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Ye&&(o=void 0),this.autoFreeze_&&Ae(o,!0),a){let d=[],c=[];B("Patches").generateReplacementPatches_(t,o,d,c),a(d,c);}return o}else v(1,t);},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return (c,...l)=>this.produceWithPatches(c,p=>t(p,...l));let a,o;return [this.produce(t,n,(c,l)=>{a=c,o=l;}),a,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy);}createDraft(e){K(e)||v(8),M(e)&&(e=ar(e));let t=Je(this),n=xe(e,void 0);return n[C].isManual_=!0,we(t),n}finishDraft(e,t){let n=e&&e[C];(!n||!n.isManual_)&&v(9);let{scope_:a}=n;return je(a,t),Xe(void 0,a)}setAutoFreeze(e){this.autoFreeze_=e;}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e;}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));let a=B("Patches").applyPatches_;return M(e)?a(e,t):this.produce(e,o=>a(o,t))}};function xe(e,t){let n=ce(e)?B("MapSet").proxyMap_(e,t):de(e)?B("MapSet").proxySet_(e,t):tr(e,t);return (t?t.scope_:et()).drafts_.push(n),n}s(xe,"createProxy");function ar(e){return M(e)||v(10,e),rt(e)}s(ar,"current");function rt(e){if(!K(e)||pe(e))return e;let t=e[C],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=_e(e,t.scope_.immer_.useStrictShallowCopy_);}else n=_e(e,!0);return se(n,(a,o)=>{Ze(n,a,rt(o));}),t&&(t.finalized_=!1),n}s(rt,"currentImpl");var w=new nr;w.produceWithPatches.bind(w);w.setAutoFreeze.bind(w);w.setUseStrictShallowCopy.bind(w);w.applyPatches.bind(w);w.createDraft.bind(w);w.finishDraft.bind(w);var or=Object.defineProperty,u=s((e,t)=>or(e,"name",{value:t,configurable:!0}),"o");function st(e){if(typeof e!="string")return !1;try{return !!it.default.get(e)}catch{return !1}}s(st,"Ne");u(st,"isColor");var ge=r.define("ColorStringStruct",e=>typeof e=="string"&&st(e)),y=r.union([r.type({type:r.literal("value"),colorValue:ge}),r.type({type:r.literal("design-token"),tokenName:r.string()})]);r.type({type:r.literal("design-token"),tokenName:r.string()});var nt=r.object({unit:r.enums(["rem","px"]),value:r.number()}),at=r.union([r.string(),r.number()]),lr=(e=>(e.woff2="woff2",e.woff="woff",e))(lr||{}),ur=r.enums(["woff2","woff"]),cr=r.type({format:ur,type:r.literal("url"),path:r.string()}),ee=r.type({family:r.optional(r.string()),weight:r.optional(r.union([at,r.size(r.array(at),2)])),src:r.optional(r.array(cr)),style:r.optional(r.string()),display:r.optional(r.enums(["auto","block","swap","fallback","optional"])),variationSettings:r.optional(r.string()),unicodeRange:r.optional(r.string())}),dr=(e=>(e.inherit="As typed",e.capitalize="Capitalize",e.lowercase="Lowercase",e.uppercase="Uppercase",e))(dr||{}),pr=(e=>(e["ultra-condensed"]="Ultra-condensed",e["extra-condensed"]="Extra-condensed",e.condensed="Condensed",e["semi-condensed"]="Semi-condensed",e.normal="Normal",e["semi-expanded"]="Semi-expanded",e.expanded="Expanded",e["extra-expanded"]="Extra-expanded",e["ultra-expanded"]="Ultra-expanded",e))(pr||{}),te=r.type({fontWeight:r.optional(r.union([r.string(),r.number()])),textColor:r.optional(y),hoverColor:r.optional(y),underline:r.optional(r.boolean()),textTransform:r.optional(r.enums(["inherit","capitalize","lowercase","uppercase"])),fontStretch:r.optional(r.enums(["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"]))}),fr=r.type({min:nt,max:r.optional(nt)}),f=r.type({fontSize:r.optional(fr),lineHeight:r.optional(r.union([r.string(),r.number()])),fontWeight:r.optional(r.union([r.string(),r.number()])),letterSpacing:r.optional(r.string()),fontFamily:r.optional(r.string()),textColor:r.optional(y),textTransform:r.optional(r.enums(["inherit","capitalize","lowercase","uppercase"])),fontStretch:r.optional(r.enums(["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"]))});var G=r.union([f,r.type({accentColor:r.optional(y)})]),me=r.union([G,r.type({hoverColor:r.optional(y),backgroundColor:r.optional(y)})]),ye=r.union([G,r.type({backgroundColor:r.optional(y)})]);r.object({version:r.literal(1),oldSillySidebarBgColor:ge});r.object({version:r.literal(2),anotherSillySidebarBgColor:ge});r.object({version:r.literal(3),sidebarBgColor:ge});r.object({version:r.literal(4),primaryColor:y,darkColor:y,lightColor:y,enableSidebarIcons:r.optional(r.defaulted(r.boolean(),!0))});r.object({version:r.literal(5),primaryColor:y,darkColor:y,lightColor:y,linkColor:y,enableSidebarIcons:r.optional(r.defaulted(r.boolean(),!0))});r.object({version:r.literal(6),primaryColor:y,darkColor:y,lightColor:y,linkColor:y,enableSidebarIcons:r.optional(r.defaulted(r.boolean(),!0)),appearance:r.type({customFonts:r.optional(r.array(ee)),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});r.object({version:r.literal(7),primaryColor:y,darkColor:y,lightColor:y,linkColor:y,enableSidebarIcons:r.optional(r.defaulted(r.boolean(),!0)),appearance:r.type({customFonts:r.optional(r.array(ee)),navigation:r.optional(r.type({primaryNav:r.optional(me),secondaryNav:r.optional(ye),tabs:r.optional(G)})),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});r.object({version:r.literal(8),primaryColor:y,darkColor:y,lightColor:y,linkColor:y,appearance:r.type({customFonts:r.optional(r.array(ee)),navigation:r.optional(r.type({primaryNav:r.optional(me),secondaryNav:r.optional(ye),tabs:r.optional(G)})),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});r.object({version:r.literal(9),appearance:r.type({customFonts:r.optional(r.array(ee)),navigation:r.optional(r.type({primaryNav:r.optional(me),secondaryNav:r.optional(ye),tabs:r.optional(G)})),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});r.object({version:r.literal(10),appearance:r.type({customFonts:r.optional(r.array(ee)),navigation:r.optional(r.type({primaryNav:r.optional(me),secondaryNav:r.optional(ye),tabs:r.optional(G)})),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingXLarge:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),headingXSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});function ot(e){return typeof e!="string"?!1:e.split("{").length-1===1&&e.startsWith("{")&&e.endsWith("}")}s(ot,"He");u(ot,"isTokenReference");function I(e){return typeof e=="string"&&e.includes("{")}s(I,"b");u(I,"hasTokenReferences");function lt(e){return !ot(e)}s(lt,"Je");u(lt,"isNotTokenReference");var h=r__namespace.define("Token Reference",e=>typeof e!="string"?!1:lt(e)?"Must start and end with curly braces":!0),gr={border:"border",shadow:"shadow",transition:"transition"},mr=Object.values(gr),yr={string:"string",number:"number",boolean:"boolean",color:"color",dimension:"dimension",duration:"duration",fontWeight:"fontWeight",strokeStyle:"strokeStyle",cubicBezier:"cubicBezier"},hr=Object.values(yr);function Ve(e){return mr.includes(e)}s(Ve,"J");u(Ve,"isTokenTypeComposite");function ut(e){return hr.includes(e)}s(ut,"ye");u(ut,"isTokenTypeSingular");utils.expectType([{inset:!1,color:"#000",offsetX:"0px",offsetY:"0px",spread:"0px",blur:"0px"},{color:"#000",offsetX:"0px",offsetY:"0px",spread:"0px",blur:"0px",inset:!0}]);var b=r__namespace.type({id:r__namespace.string(),description:r__namespace.optional(r__namespace.string()),references:r__namespace.optional(r__namespace.array(r__namespace.array(r__namespace.string()))),tokenConfig:r__namespace.optional(r__namespace.type({purpose:r__namespace.optional(r__namespace.string())}))});utils.expectType([{type:"duration",value:"1ms",originalValue:"1ms",id:"1",kind:"static"},{type:"duration",value:"1ms",kind:"ref",id:"1",originalValue:"{a.b}",referencedTokenId:"1"},{type:"duration",value:"1ms",originalValue:"1ms",id:"1",kind:"ref"},{type:"duration",value:"1ms",kind:"static",id:"1",originalValue:"{a.b}",referencedTokenId:"1"},{type:"color",value:"#000",kind:"static",id:"1",originalValue:"#000"},{type:"color",value:"#000",kind:"ref",id:"1",originalValue:"{c.b}",referencedTokenId:"c.b"},{type:"cubicBezier",kind:"static",value:[0,0,0,1],originalValue:[0,0,0,1],id:"1"}]);function br(e){return Ve(e.type)}s(br,"co");u(br,"isTokenDataComposite");utils.expectType([{type:"border",kind:"static",id:"1",value:{color:"#000",style:"solid",width:"1px"},originalValue:{color:"#000",style:"solid",width:"1px"}},{type:"border",kind:"ref",referencedTokenId:"a.b",id:"1",value:{color:"red",style:"dashed",width:"2px"},originalValue:"{a.b}"},{type:"shadow",value:{color:"#000",offsetX:"1px",offsetY:"1px",blur:"1px",spread:"1px",inset:!1},originalValue:{color:"#000",offsetX:"{a.a}",offsetY:"1px",blur:"1px",spread:"1px",inset:!1},id:"1",kind:"static"},{type:"shadow",kind:"ref",referencedTokenId:"a.b",value:{inset:!0,color:"red",offsetX:"1px",blur:"2px",offsetY:"3px",spread:"4px"},originalValue:"{a.b}",id:"1"},{type:"transition",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:"{a.b}",kind:"ref",referencedTokenId:"a.b",id:"1"},{type:"transition",kind:"static",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:{duration:"100ms",delay:"{a.c}",timingFunction:"{a.c}"},id:"1"},{type:"transition",kind:"static",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},id:"1"}]);function ct(e){return typeof e=="string"&&!I(e)}s(ct,"et");u(ct,"isTokenValueColor");var $=r__namespace.define("Color Value",e=>typeof e!="string"?"Value must be a string":e===""?"Value must not be empty":I(e)?"Value must not contain {} (token references)":!0),vr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("color"),value:$,kind:r__namespace.literal("static"),originalValue:$}),b),kr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("color"),value:$,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function Y(e){return typeof e=="string"&&(e.endsWith("px")||e.endsWith("rem"))&&!I(e)}s(Y,"Y");u(Y,"isTokenValueDimension");var D=r__namespace.define("Dimension Value",e=>typeof e!="string"?"Value must be a string":I(e)?"Value must not contain {} (token references)":!e.endsWith("px")&&!e.endsWith("rem")&&!e.endsWith("em")&&!e.endsWith("%")?"Value must end with px, rem, em or %":!0),Sr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("dimension"),value:D,kind:r__namespace.literal("static"),originalValue:D}),b),_r=r__namespace.assign(r__namespace.type({type:r__namespace.literal("dimension"),value:D,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function Cr(e){return typeof e=="string"&&e.endsWith("ms")&&!I(e)}s(Cr,"go");u(Cr,"isTokenValueDuration");var L=r__namespace.define("Duration Value",e=>typeof e!="string"?"Value must be a string":I(e)?"Value must not contain {} (token references)":/^\d+ms$/.test(e)?!0:'Value must be a number followed by "ms" (e.g., "100ms")'),wr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("duration"),value:L,kind:r__namespace.literal("static"),originalValue:L}),b),Tr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("duration"),value:L,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function xr(e){return (typeof e=="string"||typeof e=="number")&&!I(e)}s(xr,"uo");u(xr,"isTokenValueFontWeight");var De=r__namespace.define("Font Weight Value",e=>typeof e!="string"&&typeof e!="number"?"Value must be a string or number":I(e)?"Value must not contain {} (token references)":!0),Ar=r__namespace.assign(r__namespace.type({type:r__namespace.literal("fontWeight"),value:De,kind:r__namespace.literal("static"),originalValue:De}),b),Er=r__namespace.assign(r__namespace.type({type:r__namespace.literal("fontWeight"),value:De,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),Q=r__namespace.define("Cubic Bezier Value",e=>Array.isArray(e)?e.length!==4||!e.every(t=>typeof t=="number")?"Value must be an array of 4 numbers":e[0]<0||e[0]>1||e[2]<0||e[2]>1?"The first and third cubicBezier values must be between 0 and 1":!0:"Value must be an array"),Dr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("cubicBezier"),value:Q,kind:r__namespace.literal("static"),originalValue:Q}),b),Nr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("cubicBezier"),value:Q,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function dt(e){return utils.isObject(e)&&ct(e.color)&&Y(e.offsetX)&&Y(e.offsetY)&&Y(e.blur)&&Y(e.spread)}s(dt,"gt");u(dt,"isTokenValueShadow");var pt=r__namespace.define("Shadow Value",e=>dt(e)?!0:`Expected a shadow value, got ${JSON.stringify(e)}`),Vr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("shadow"),value:pt,kind:r__namespace.literal("static"),originalValue:r__namespace.type({color:r__namespace.union([$,h]),offsetX:r__namespace.union([D,h]),offsetY:r__namespace.union([D,h]),blur:r__namespace.union([D,h]),spread:r__namespace.union([D,h]),inset:r__namespace.union([r__namespace.optional(r__namespace.boolean()),h])})}),b),Rr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("shadow"),value:pt,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),H=r__namespace.union([r__namespace.literal("solid"),r__namespace.literal("dashed"),r__namespace.literal("dotted"),r__namespace.literal("double"),r__namespace.literal("groove"),r__namespace.literal("ridge"),r__namespace.literal("outset"),r__namespace.literal("inset")]);function ft(e){return utils.isObject(e)&&$.is(e.color)&&H.is(e.style)&&D.is(e.width)}s(ft,"mt");u(ft,"isTokenValueBorder");var gt=r__namespace.define("Border Value",ft),Ir=r__namespace.assign(r__namespace.type({type:r__namespace.literal("border"),value:gt,kind:r__namespace.literal("static"),originalValue:r__namespace.type({color:r__namespace.union([$,h]),style:r__namespace.union([H,h]),width:r__namespace.union([D,h])})}),b),Pr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("border"),value:gt,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function mt(e){return utils.isObject(e)&&Q.is(e.timingFunction)&&L.is(e.duration)&&L.is(e.delay)}s(mt,"kt");u(mt,"isTokenValueTransition");var yt=r__namespace.define("Transition Value",mt),Or=r__namespace.assign(r__namespace.type({type:r__namespace.literal("transition"),value:yt,kind:r__namespace.literal("static"),originalValue:r__namespace.type({timingFunction:r__namespace.union([Q,h]),duration:r__namespace.union([L,h]),delay:r__namespace.union([L,h])})}),b),Mr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("transition"),value:yt,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),Fr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("string"),value:r__namespace.string(),kind:r__namespace.literal("static"),originalValue:r__namespace.string()}),b),zr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("string"),value:r__namespace.string(),kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),Kr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("strokeStyle"),value:H,kind:r__namespace.literal("static"),originalValue:H}),b),Br=r__namespace.assign(r__namespace.type({type:r__namespace.literal("strokeStyle"),value:H,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:H}),b),Ur=r__namespace.assign(r__namespace.type({type:r__namespace.literal("number"),value:r__namespace.number(),kind:r__namespace.literal("static"),originalValue:r__namespace.number()}),b),Lr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("number"),value:r__namespace.number(),kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),Wr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("boolean"),value:r__namespace.boolean(),kind:r__namespace.literal("static"),originalValue:r__namespace.boolean()}),b),$r=r__namespace.assign(r__namespace.type({type:r__namespace.literal("boolean"),value:r__namespace.boolean(),kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);u(e=>{if(!utils.isObject(e))throw new Error(`Expected token data to be an object, got ${JSON.stringify(e)}`);if(!utils.isObjKey("type",e))throw new Error(`Expected token data to have a "type" property, got ${JSON.stringify(e)}`);if(typeof e.type!="string")throw new Error(`Expected token data "type" property to be a string, got ${JSON.stringify(e)}`);let t=e.type,n=e.kind;try{switch(t){case"boolean":n==="ref"?$r.assert(e):Wr.assert(e);return;case"border":n==="ref"?Pr.assert(e):Ir.assert(e);return;case"color":n==="ref"?kr.assert(e):vr.assert(e);return;case"cubicBezier":n==="ref"?Nr.assert(e):Dr.assert(e);return;case"dimension":n==="ref"?_r.assert(e):Sr.assert(e);return;case"duration":n==="ref"?Tr.assert(e):wr.assert(e);return;case"fontWeight":n==="ref"?Er.assert(e):Ar.assert(e);return;case"number":n==="ref"?Lr.assert(e):Ur.assert(e);return;case"shadow":n==="ref"?Rr.assert(e):Vr.assert(e);return;case"string":n==="ref"?zr.assert(e):Fr.assert(e);return;case"strokeStyle":n==="ref"?Br.assert(e):Kr.assert(e);return;case"transition":n==="ref"?Mr.assert(e):Or.assert(e);return;default:throw new Error(`Unknown token data type: ${t}`)}}catch(a){throw a instanceof r__namespace.StructError?new Error(`Invalid token data for type "${t}": ${a.message}. Received this data: "${JSON.stringify(e)}"`):a}},"assertTokenData");utils.expectType([{type:"dimension",kind:"static",value:"1px"},{type:"dimension",kind:"ref",referencedTokenId:"a.b"}]);utils.expectType([{type:"border",kind:"ref",referencedTokenId:"a.b"},{type:"border",kind:"static",value:{color:{kind:"static",type:"color",value:"red"},style:{kind:"ref",type:"strokeStyle",referencedTokenId:""},width:{kind:"static",type:"dimension",value:"2px"}}}]);utils.expectType([{type:"transition",kind:"ref",referencedTokenId:"a.b"},{type:"transition",kind:"static",value:{delay:{kind:"static",type:"duration",value:"1ms"},duration:{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},timingFunction:{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]}}}]);function Hr(e){return ut(e?.type)}s(Hr,"Do");u(Hr,"isTokenSrcValueInfoSingular");function Gr(e){return Ve(e?.type)}s(Gr,"ho");u(Gr,"isTokenSrcValueInfoComposite");utils.expectType([{type:"dimension",kind:"static",value:"1px"},{type:"transition",kind:"ref",referencedTokenId:"a.b"},{type:"transition",kind:"ref",value:"1px"},{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]},{type:"transition",kind:"static",value:{delay:{kind:"static",type:"duration",value:"1ms"},duration:{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},timingFunction:{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]}}}]);function ht(e){return utils.isObject(e)&&utils.isObjKey("cloud.knapsack",e)}s(ht,"Rt");u(ht,"isTokenSrcExtensions");utils.expectType(["#ddd",!0,[83,1,1,1],{color:"#000",style:"solid",width:"1px"},{inset:!0,color:"#000",offsetX:"0px",offsetY:"{spacing.medium}",spread:"0px",blur:"0px"},{timingFunction:"{timing.ease}",duration:"{timing.duration.medium}",delay:"7ms",color:"#000"}]);function jr(e){return !!(utils.isObject(e)&&utils.isObjKey("$value",e))}s(jr,"Ro");u(jr,"isTokenSrc");function bt(e){return utils.isObject(e)&&!ht(e)&&!utils.isObjKey("$value",e)&&!utils.isObjKey("cloud.knapsack",e)}s(bt,"Bt");u(bt,"isTokenGroup");function Jr(e){if(bt(e)){let t=e.$extensions["cloud.knapsack"].group.collectionInfo;if(utils.isObjKey("type",t)&&utils.isObjKey("referenceId",t))return !0}return !1}s(Jr,"Bo");u(Jr,"isTokenTypeVarRef");function Xr(e){let t=typeof e;if(t==="string"||t==="number"||t==="boolean")return t;throw new Error(`Invalid token value type: ${JSON.stringify(t)}. Token value is: ${JSON.stringify(e)}`)}s(Xr,"Ao");u(Xr,"getPrimitiveValue");u(e=>e.includes("px")||e.includes("rem")||e.includes("em")||e.includes("%"),"isDimensionString");function qr(e){let{value:t,unit:n}=utils.parseNumberWithUnit(e);if(!n)return {value:t};if(n!=="px"&&n!=="rem"&&n!=="em"&&n!=="%")throw new Error(`Invalid unit "${n}" for value: ${t}`);return {value:t,unit:n}}s(qr,"Oo");u(qr,"parseTokenDimensionValue");u(e=>utils.isObject(e)&&e.type==="text","isSlottedText");function Yr(e){return utils.isObject(e)&&e.type==="template-demo"}s(Yr,"jo");u(Yr,"isSlottedTemplateDemo");function Qr(e){return utils.isObject(e)&&e.type==="template-reference"}s(Qr,"Wo");u(Qr,"isSlottedTemplateReference");var Zr=(e=>(e.portrait="portrait",e.landscape="landscape",e))(Zr||{});function en(e){return e?.type==="data"}s(en,"_o");u(en,"isDataDemo");function tn(e){return e?.type==="template"}s(tn,"Lo");u(tn,"isTemplateDemo");var rn=(e=>(e.auto="auto",e.small="small",e.medium="medium",e.large="large",e.full="full",e))(rn||{});function vt(e){return !utils.isObject(e)||!["assetSetsState","customPagesState","navsState","patternsState","tokensSrc","db"].every(t=>utils.isObjKey(t,e))?!1:!utils.isObjKey("metaState",e)}s(vt,"At");u(vt,"isKsAppClientDataNoMeta");r.define("KsAppClientDataNoMeta",vt);function kt(e){return utils.isObject(e)?["assetSetsState","customPagesState","navsState","patternsState","tokensSrc","metaState","db"].every(t=>utils.isObjKey(t,e)):!1}s(kt,"Kt");u(kt,"isKsAppClientDataAndMeta");r.define("KsAppClientDataAndMeta",kt);r.type({isLocalDev:r.boolean(),plugins:r.array(r.type({id:r.string(),hasContent:r.boolean(),clientPluginPath:r.optional(r.string()),cssPath:r.optional(r.string())})),meta:r.optional(r.type({version:r.optional(r.string()),hasKnapsackCloud:r.boolean(),knapsackCloudSiteId:r.optional(r.string()),serverPort:r.optional(r.number()),websocketsPort:r.optional(r.number()),https:r.optional(r.boolean()),cacheDir:r.optional(r.string()),ksVersions:r.type({app:r.string()})}))});function St(e){return !utils.isObject(e)||!["assetSetsState","customPagesState","navsState","patternsState","settingsState","tokensState"].every(t=>utils.isObjKey(t,e))?!1:!utils.isObjKey("metaState",e)}s(St,"Ut");u(St,"isKsAppClientDataNoMetaV3");r.define("KsAppClientDataNoMeta",St);function _t(e){return utils.isObject(e)?["assetSetsState","customPagesState","navsState","patternsState","settingsState","tokensState","metaState"].every(t=>utils.isObjKey(t,e)):!1}s(_t,"zt");u(_t,"isKsAppClientDataAndMetaV3");r.define("KsAppClientDataAndMeta",_t);r.type({isLocalDev:r.boolean(),plugins:r.array(r.type({id:r.string(),hasContent:r.boolean(),clientPluginPath:r.optional(r.string()),cssPath:r.optional(r.string())})),meta:r.optional(r.type({version:r.optional(r.string()),hasKnapsackCloud:r.boolean(),knapsackCloudSiteId:r.optional(r.string()),serverPort:r.optional(r.number()),websocketsPort:r.optional(r.number()),https:r.optional(r.boolean()),cacheDir:r.optional(r.string()),ksVersions:r.type({app:r.string()})}))});({version:"4.1.7",checkIfNeeded:u(e=>!0,"checkIfNeeded"),migrate:u(e=>{if(!M(e))throw new Error("Tried to run migrations on appClientData but it is not an Immer Draft");Object.values(e.patternsState.patterns).forEach(t=>{delete t.demoSize;}),Object.values(e.db.demos.byId).forEach(t=>{t.type==="data"&&(Object.entries(t.data.slots??{}).forEach(([n,a])=>{t.data.slots[n]=a.map(o=>typeof o=="string"?{type:"text",text:o}:(o.type==="template-reference"||o.type==="text"||(o.type="template-demo"),o));}),!(t.patternId&&t.templateId)&&(()=>{for(let{id:n,templates:a=[]}of Object.values(e.patternsState.patterns))for(let{id:o,demoIds:d=[]}of a)if(d.includes(t.id)){t.patternId=n,t.templateId=o;return}})());});},"migrate")});var sn=(e=>(e.string="string",e.boolean="boolean",e.number="number",e.object="object",e.options="options",e.function="function",e.customTypeScript="customTypeScript",e.array="array",e.arrayOfObjects="arrayOfObjects",e.arrayOfStrings="arrayOfStrings",e.unknown="unknown",e))(sn||{});u(e=>"type"in e&&e.type==="string"&&!("enum"in e),"isStringProp");u(e=>"type"in e&&e.type==="number","isNumberProp");u(e=>"type"in e&&e.type==="boolean","isBooleanProp");u(e=>"enum"in e,"isOptionsProp");u(e=>"typeof"in e&&e?.typeof==="function","isFunctionProp");u(e=>!("typeof"in e)&&"tsType"in e,"isCustomTypeScriptProp");u(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="object","isArrayOfObjectsProp");u(e=>"type"in e&&e.type==="object"&&"properties"in e&&Object.keys(e.properties).length>0,"isObjectProp");u(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="string","isArrayOfStringsProp");var Ct=r__namespace.object({op:r__namespace.union([r__namespace.literal("replace"),r__namespace.literal("remove"),r__namespace.literal("add")]),path:r__namespace.array(r__namespace.union([r__namespace.string(),r__namespace.number()])),value:r__namespace.optional(r__namespace.any())}),on=Ct;u(e=>on.is(e),"isPatch");var Ne=r__namespace.array(Ct),ln=Ne;u(e=>ln.is(e),"isPatches");var wt=r__namespace.type({patches:Ne,inversePatches:r__namespace.optional(Ne),event:r__namespace.optional(r__namespace.object({type:r__namespace.string()})),id:r__namespace.string(),date:r__namespace.string(),userId:r__namespace.optional(r__namespace.string())}),un=wt;u(e=>un.is(e),"isKsRemoteChange");var cn=r__namespace.array(wt),dn=cn;u(e=>dn.is(e),"isKsRemoteChanges");var pn=(e=>(e.ready="ready",e))(pn||{});var fn=(e=>(e.GitHub="GitHub",e.GitLab="GitLab",e.GitLabRest="GitLabRest",e.Bitbucket="Bitbucket",e.Azure="Azure",e))(fn||{}),gn=(e=>(e.Conflicting="CONFLICTING",e.Mergeable="MERGEABLE",e.Unknown="UNKNOWN",e))(gn||{}),mn=(e=>(e.Create="CREATE",e.Move="MOVE",e.Update="UPDATE",e.Chmod="CHMOD",e))(mn||{}),yn=(e=>(e.Base64="BASE64",e.Text="TEXT",e))(yn||{}),hn={ADMIN:"ADMIN",ANONYMOUS:"ANONYMOUS",CONTRIBUTOR:"CONTRIBUTOR",EDITOR:"EDITOR",MANAGER:"MANAGER",VIEWER:"VIEWER"},Tt=Object.values(hn);var Vt=r.enums(Tt),Sn=Vt,$a=s(e=>e==="ADMIN","canRoleAdmin"),Rt=["ADMIN","MANAGER"],Ha=s(e=>Rt.includes(e),"canRoleManageUsers"),It=[...Rt,"EDITOR"],Ga=s(e=>It.includes(e),"canRoleDelete"),Pt=[...It,"CONTRIBUTOR"],ja=s(e=>Pt.includes(e),"canRoleEdit"),_n=["ADMIN"],Ja=s(e=>_n.includes(e),"canRolePublish"),Cn=[...Pt,"VIEWER"],Xa=s(e=>Cn.includes(e),"canRoleView"),wn=s(e=>Sn.is(e),"isRoleValid"),Ot=(n=>(n.user="user",n.anonymous="anonymous",n))(Ot||{}),Et=r.enums(Object.values(Ot)),Tn=r.object({"x-hasura-allowed-roles":r.array(Et),"x-hasura-default-role":Et,"x-hasura-user-id":r.optional(r.string())}),xn=r.object({userId:r.string(),isSuperAdmin:r.boolean(),sitesByRole:r.record(Vt,r.array(r.string()))}),An=r.type({exp:r.number(),email:r.optional(r.string()),email_verified:r.optional(r.union([r.string(),r.boolean()])),iat:r.number(),iss:r.string(),sub:r.string(),aud:r.union([r.string(),r.array(r.string())])}),En="https://hasura.io/jwt/claims",Mt="https://knapsack.cloud",Dn=r.object({[En]:Tn,[Mt]:xn}),Nn=r.assign(An,Dn);function Vn(e){return Object.entries(e).reduce((t,[n,a])=>(wn(n)&&a.forEach(o=>{t[o]=n;}),t),{})}s(Vn,"expandSitesByRole");var Rn={isSuperAdmin:!1,userId:"",siteRoleMap:{},getSiteRole:s(()=>"ANONYMOUS","getSiteRole")},qa=s(e=>{if(!Nn.is(e))return Rn;let{sitesByRole:t,...n}=e[Mt],a=Vn(t);return {...n,siteRoleMap:a,getSiteRole:s(o=>n.isSuperAdmin?"ADMIN":a[o]||"ANONYMOUS","getSiteRole")}},"getKsClaims");var Za="/site-deployed",ei="/github-auth";var{KS_DB_URL:he}=process.env;if(he&&!utils.isUrl(he))throw new Error(`KS_DB_URL is not a valid URL: '${he}'`);var Ft=he||"https://db.knapsack.cloud",Pn=new URL("/v1/graphql",Ft).toString(),ni={dbUrl:Ft,dbGqlEndpoint:Pn};var ii={siteId:"X-KS-Site-ID",instanceId:"X-KS-Instance-Id",appClientVersion:"X-KS-App-Client-Version"};
26
+ var Lt=Object.create;var be=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var $t=Object.getOwnPropertyNames;var Ht=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var s=(e,t)=>be(e,"name",{value:t,configurable:!0});var ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var jt=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of $t(t))!Gt.call(e,o)&&o!==n&&be(e,o,{get:()=>t[o],enumerable:!(a=Wt(t,o))||a.enumerable});return e};var Jt=(e,t,n)=>(n=e!=null?Lt(Ht(e)):{},jt(be(n,"default",{value:e,enumerable:!0}),e));var Me=ne((Wn,Oe)=>{Oe.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};});var ze=ne(($n,Fe)=>{Fe.exports=s(function(t){return !t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},"isArrayish");});var Ue=ne((Gn,Be)=>{var Xt=ze(),qt=Array.prototype.concat,Yt=Array.prototype.slice,Ke=Be.exports=s(function(t){for(var n=[],a=0,o=t.length;a<o;a++){var d=t[a];Xt(d)?n=qt.call(n,Yt.call(d)):n.push(d);}return n},"swizzle");Ke.wrap=function(e){return function(){return e(Ke(arguments))}};});var He=ne((Jn,$e)=>{var j=Me(),J=Ue(),Le=Object.hasOwnProperty,We=Object.create(null);for(ae in j)Le.call(j,ae)&&(We[j[ae]]=ae);var ae,_=$e.exports={to:{},get:{}};_.get=function(e){var t=e.substring(0,3).toLowerCase(),n,a;switch(t){case"hsl":n=_.get.hsl(e),a="hsl";break;case"hwb":n=_.get.hwb(e),a="hwb";break;default:n=_.get.rgb(e),a="rgb";break}return n?{model:a,value:n}:null};_.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,a=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^(\w+)$/,c=[0,0,0,1],l,p,E;if(l=e.match(n)){for(E=l[2],l=l[1],p=0;p<3;p++){var re=p*2;c[p]=parseInt(l.slice(re,re+2),16);}E&&(c[3]=parseInt(E,16)/255);}else if(l=e.match(t)){for(l=l[1],E=l[3],p=0;p<3;p++)c[p]=parseInt(l[p]+l[p],16);E&&(c[3]=parseInt(E+E,16)/255);}else if(l=e.match(a)){for(p=0;p<3;p++)c[p]=parseInt(l[p+1],0);l[4]&&(l[5]?c[3]=parseFloat(l[4])*.01:c[3]=parseFloat(l[4]));}else if(l=e.match(o)){for(p=0;p<3;p++)c[p]=Math.round(parseFloat(l[p+1])*2.55);l[4]&&(l[5]?c[3]=parseFloat(l[4])*.01:c[3]=parseFloat(l[4]));}else return (l=e.match(d))?l[1]==="transparent"?[0,0,0,0]:Le.call(j,l[1])?(c=j[l[1]],c[3]=1,c):null:null;for(p=0;p<3;p++)c[p]=O(c[p],0,255);return c[3]=O(c[3],0,1),c};_.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var a=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,d=O(parseFloat(n[2]),0,100),c=O(parseFloat(n[3]),0,100),l=O(isNaN(a)?1:a,0,1);return [o,d,c,l]}return null};_.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var a=parseFloat(n[4]),o=(parseFloat(n[1])%360+360)%360,d=O(parseFloat(n[2]),0,100),c=O(parseFloat(n[3]),0,100),l=O(isNaN(a)?1:a,0,1);return [o,d,c,l]}return null};_.to.hex=function(){var e=J(arguments);return "#"+ie(e[0])+ie(e[1])+ie(e[2])+(e[3]<1?ie(Math.round(e[3]*255)):"")};_.to.rgb=function(){var e=J(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};_.to.rgb.percent=function(){var e=J(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),a=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+n+"%, "+a+"%)":"rgba("+t+"%, "+n+"%, "+a+"%, "+e[3]+")"};_.to.hsl=function(){var e=J(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};_.to.hwb=function(){var e=J(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};_.to.keyword=function(e){return We[e.slice(0,3)]};function O(e,t,n){return Math.min(Math.max(t,e),n)}s(O,"clamp");function ie(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}s(ie,"hexDouble");});var it=Jt(He());var Ye=Symbol.for("immer-nothing"),Ge=Symbol.for("immer-draftable"),C=Symbol.for("immer-state"),Qt=process.env.NODE_ENV!=="production"?[function(e){return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return `'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return `'original' expects a draft, got: ${e}`}]:[];function v(e,...t){if(process.env.NODE_ENV!=="production"){let n=Qt[e],a=typeof n=="function"?n.apply(null,t):n;throw new Error(`[Immer] ${a}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}s(v,"die");var W=Object.getPrototypeOf;function M(e){return !!e&&!!e[C]}s(M,"isDraft");function K(e){return e?Qe(e)||Array.isArray(e)||!!e[Ge]||!!e.constructor?.[Ge]||ce(e)||de(e):!1}s(K,"isDraftable");var Zt=Object.prototype.constructor.toString();function Qe(e){if(!e||typeof e!="object")return !1;let t=W(e);if(t===null)return !0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Zt}s(Qe,"isPlainObject");function se(e,t){ue(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e);}):e.forEach((n,a)=>t(a,n,e));}s(se,"each");function ue(e){let t=e[C];return t?t.type_:Array.isArray(e)?1:ce(e)?2:de(e)?3:0}s(ue,"getArchtype");function ke(e,t){return ue(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}s(ke,"has");function Ze(e,t,n){let a=ue(e);a===2?e.set(t,n):a===3?e.add(n):e[t]=n;}s(Ze,"set");function er(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}s(er,"is");function ce(e){return e instanceof Map}s(ce,"isMap");function de(e){return e instanceof Set}s(de,"isSet");function z(e){return e.copy_||e.base_}s(z,"latest");function _e(e,t){if(ce(e))return new Map(e);if(de(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=Qe(e);if(t===!0||t==="class_only"&&!n){let a=Object.getOwnPropertyDescriptors(e);delete a[C];let o=Reflect.ownKeys(a);for(let d=0;d<o.length;d++){let c=o[d],l=a[c];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(a[c]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[c]});}return Object.create(W(e),a)}else {let a=W(e);if(a!==null&&n)return {...e};let o=Object.create(a);return Object.assign(o,e)}}s(_e,"shallowCopy");function Ae(e,t=!1){return pe(e)||M(e)||!K(e)||(ue(e)>1&&(e.set=e.add=e.clear=e.delete=tr),Object.freeze(e),t&&Object.entries(e).forEach(([n,a])=>Ae(a,!0))),e}s(Ae,"freeze");function tr(){v(2);}s(tr,"dontMutateFrozenCollections");function pe(e){return Object.isFrozen(e)}s(pe,"isFrozen");var rr={};function B(e){let t=rr[e];return t||v(0,e),t}s(B,"getPlugin");var X;function et(){return X}s(et,"getCurrentScope");function nr(e,t){return {drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}s(nr,"createScope");function je(e,t){t&&(B("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t);}s(je,"usePatchesInScope");function Ce(e){Te(e),e.drafts_.forEach(ar),e.drafts_=null;}s(Ce,"revokeScope");function Te(e){e===X&&(X=e.parent_);}s(Te,"leaveScope");function Je(e){return X=nr(X,e)}s(Je,"enterScope");function ar(e){let t=e[C];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0;}s(ar,"revokeDraft");function Xe(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[C].modified_&&(Ce(t),v(4)),K(e)&&(e=oe(t,e),t.parent_||le(t,e)),t.patches_&&B("Patches").generateReplacementPatches_(n[C].base_,e,t.patches_,t.inversePatches_)):e=oe(t,n,[]),Ce(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Ye?e:void 0}s(Xe,"processResult");function oe(e,t,n){if(pe(t))return t;let a=t[C];if(!a)return se(t,(o,d)=>qe(e,a,t,o,d,n)),t;if(a.scope_!==e)return t;if(!a.modified_)return le(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;let o=a.copy_,d=o,c=!1;a.type_===3&&(d=new Set(o),o.clear(),c=!0),se(d,(l,p)=>qe(e,a,o,l,p,n,c)),le(e,o,!1),n&&e.patches_&&B("Patches").generatePatches_(a,n,e.patches_,e.inversePatches_);}return a.copy_}s(oe,"finalize");function qe(e,t,n,a,o,d,c){if(process.env.NODE_ENV!=="production"&&o===n&&v(5),M(o)){let l=d&&t&&t.type_!==3&&!ke(t.assigned_,a)?d.concat(a):void 0,p=oe(e,o,l);if(Ze(n,a,p),M(p))e.canAutoFreeze_=!1;else return}else c&&n.add(o);if(K(o)&&!pe(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;oe(e,o),(!t||!t.scope_.parent_)&&typeof a!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,a)&&le(e,o);}}s(qe,"finalizeProperty");function le(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ae(t,n);}s(le,"maybeFreeze");function ir(e,t){let n=Array.isArray(e),a={type_:n?1:0,scope_:t?t.scope_:et(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=a,d=Ee;n&&(o=[a],d=q);let{revoke:c,proxy:l}=Proxy.revocable(o,d);return a.draft_=l,a.revoke_=c,l}s(ir,"createProxyProxy");var Ee={get(e,t){if(t===C)return e;let n=z(e);if(!ke(n,t))return sr(e,n,t);let a=n[t];return e.finalized_||!K(a)?a:a===ve(e.base_,t)?(Se(e),e.copy_[t]=xe(a,e)):a},has(e,t){return t in z(e)},ownKeys(e){return Reflect.ownKeys(z(e))},set(e,t,n){let a=tt(z(e),t);if(a?.set)return a.set.call(e.draft_,n),!0;if(!e.modified_){let o=ve(z(e),t),d=o?.[C];if(d&&d.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(er(n,o)&&(n!==void 0||ke(e.base_,t)))return !0;Se(e),we(e);}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ve(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Se(e),we(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=z(e),a=Reflect.getOwnPropertyDescriptor(n,t);return a&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:a.enumerable,value:n[t]}},defineProperty(){v(11);},getPrototypeOf(e){return W(e.base_)},setPrototypeOf(){v(12);}},q={};se(Ee,(e,t)=>{q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)};});q.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&v(13),q.set.call(this,e,t,void 0)};q.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&v(14),Ee.set.call(this,e[0],t,n,e[0])};function ve(e,t){let n=e[C];return (n?z(n):e)[t]}s(ve,"peek");function sr(e,t,n){let a=tt(t,n);return a?"value"in a?a.value:a.get?.call(e.draft_):void 0}s(sr,"readPropFromProto");function tt(e,t){if(!(t in e))return;let n=W(e);for(;n;){let a=Object.getOwnPropertyDescriptor(n,t);if(a)return a;n=W(n);}}s(tt,"getDescriptorFromProto");function we(e){e.modified_||(e.modified_=!0,e.parent_&&we(e.parent_));}s(we,"markChanged");function Se(e){e.copy_||(e.copy_=_e(e.base_,e.scope_.immer_.useStrictShallowCopy_));}s(Se,"prepareCopy");var or=class{static{s(this,"Immer2");}constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,a)=>{if(typeof t=="function"&&typeof n!="function"){let d=n;n=t;let c=this;return s(function(p=d,...E){return c.produce(p,re=>n.call(this,re,...E))},"curriedProduce")}typeof n!="function"&&v(6),a!==void 0&&typeof a!="function"&&v(7);let o;if(K(t)){let d=Je(this),c=xe(t,void 0),l=!0;try{o=n(c),l=!1;}finally{l?Ce(d):Te(d);}return je(d,a),Xe(o,d)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Ye&&(o=void 0),this.autoFreeze_&&Ae(o,!0),a){let d=[],c=[];B("Patches").generateReplacementPatches_(t,o,d,c),a(d,c);}return o}else v(1,t);},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return (c,...l)=>this.produceWithPatches(c,p=>t(p,...l));let a,o;return [this.produce(t,n,(c,l)=>{a=c,o=l;}),a,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy);}createDraft(e){K(e)||v(8),M(e)&&(e=lr(e));let t=Je(this),n=xe(e,void 0);return n[C].isManual_=!0,Te(t),n}finishDraft(e,t){let n=e&&e[C];(!n||!n.isManual_)&&v(9);let{scope_:a}=n;return je(a,t),Xe(void 0,a)}setAutoFreeze(e){this.autoFreeze_=e;}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e;}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));let a=B("Patches").applyPatches_;return M(e)?a(e,t):this.produce(e,o=>a(o,t))}};function xe(e,t){let n=ce(e)?B("MapSet").proxyMap_(e,t):de(e)?B("MapSet").proxySet_(e,t):ir(e,t);return (t?t.scope_:et()).drafts_.push(n),n}s(xe,"createProxy");function lr(e){return M(e)||v(10,e),rt(e)}s(lr,"current");function rt(e){if(!K(e)||pe(e))return e;let t=e[C],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=_e(e,t.scope_.immer_.useStrictShallowCopy_);}else n=_e(e,!0);return se(n,(a,o)=>{Ze(n,a,rt(o));}),t&&(t.finalized_=!1),n}s(rt,"currentImpl");var T=new or;T.produceWithPatches.bind(T);T.setAutoFreeze.bind(T);T.setUseStrictShallowCopy.bind(T);T.applyPatches.bind(T);T.createDraft.bind(T);T.finishDraft.bind(T);var st=Object.defineProperty,u=s((e,t)=>st(e,"name",{value:t,configurable:!0}),"o"),ot=s((e,t)=>{for(var n in t)st(e,n,{get:t[n],enumerable:!0});},"ge");function lt(e){if(typeof e!="string")return !1;try{return !!it.default.get(e)}catch{return !1}}s(lt,"Fe");u(lt,"isColor");var ge=r.define("ColorStringStruct",e=>typeof e=="string"&&lt(e)),m=r.union([r.type({type:r.literal("value"),colorValue:ge}),r.type({type:r.literal("design-token"),tokenName:r.string()})]);r.type({type:r.literal("design-token"),tokenName:r.string()});var nt=r.object({unit:r.enums(["rem","px"]),value:r.number()}),at=r.union([r.string(),r.number()]),dr=(e=>(e.woff2="woff2",e.woff="woff",e))(dr||{}),pr=r.enums(["woff2","woff"]),fr=r.type({format:pr,type:r.literal("url"),path:r.string()}),ee=r.type({family:r.optional(r.string()),weight:r.optional(r.union([at,r.size(r.array(at),2)])),src:r.optional(r.array(fr)),style:r.optional(r.string()),display:r.optional(r.enums(["auto","block","swap","fallback","optional"])),variationSettings:r.optional(r.string()),unicodeRange:r.optional(r.string())}),gr=(e=>(e.inherit="As typed",e.capitalize="Capitalize",e.lowercase="Lowercase",e.uppercase="Uppercase",e))(gr||{}),yr=(e=>(e["ultra-condensed"]="Ultra-condensed",e["extra-condensed"]="Extra-condensed",e.condensed="Condensed",e["semi-condensed"]="Semi-condensed",e.normal="Normal",e["semi-expanded"]="Semi-expanded",e.expanded="Expanded",e["extra-expanded"]="Extra-expanded",e["ultra-expanded"]="Ultra-expanded",e))(yr||{}),te=r.type({fontWeight:r.optional(r.union([r.string(),r.number()])),textColor:r.optional(m),hoverColor:r.optional(m),underline:r.optional(r.boolean()),textTransform:r.optional(r.enums(["inherit","capitalize","lowercase","uppercase"])),fontStretch:r.optional(r.enums(["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"]))}),mr=r.type({min:nt,max:r.optional(nt)}),f=r.type({fontSize:r.optional(mr),lineHeight:r.optional(r.union([r.string(),r.number()])),fontWeight:r.optional(r.union([r.string(),r.number()])),letterSpacing:r.optional(r.string()),fontFamily:r.optional(r.string()),textColor:r.optional(m),textTransform:r.optional(r.enums(["inherit","capitalize","lowercase","uppercase"])),fontStretch:r.optional(r.enums(["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"]))});var G=r.union([f,r.type({accentColor:r.optional(m)})]),ye=r.union([G,r.type({hoverColor:r.optional(m),backgroundColor:r.optional(m)})]),me=r.union([G,r.type({backgroundColor:r.optional(m)})]);r.object({version:r.literal(1),oldSillySidebarBgColor:ge});r.object({version:r.literal(2),anotherSillySidebarBgColor:ge});r.object({version:r.literal(3),sidebarBgColor:ge});r.object({version:r.literal(4),primaryColor:m,darkColor:m,lightColor:m,enableSidebarIcons:r.optional(r.defaulted(r.boolean(),!0))});r.object({version:r.literal(5),primaryColor:m,darkColor:m,lightColor:m,linkColor:m,enableSidebarIcons:r.optional(r.defaulted(r.boolean(),!0))});r.object({version:r.literal(6),primaryColor:m,darkColor:m,lightColor:m,linkColor:m,enableSidebarIcons:r.optional(r.defaulted(r.boolean(),!0)),appearance:r.type({customFonts:r.optional(r.array(ee)),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});r.object({version:r.literal(7),primaryColor:m,darkColor:m,lightColor:m,linkColor:m,enableSidebarIcons:r.optional(r.defaulted(r.boolean(),!0)),appearance:r.type({customFonts:r.optional(r.array(ee)),navigation:r.optional(r.type({primaryNav:r.optional(ye),secondaryNav:r.optional(me),tabs:r.optional(G)})),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});r.object({version:r.literal(8),primaryColor:m,darkColor:m,lightColor:m,linkColor:m,appearance:r.type({customFonts:r.optional(r.array(ee)),navigation:r.optional(r.type({primaryNav:r.optional(ye),secondaryNav:r.optional(me),tabs:r.optional(G)})),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});r.object({version:r.literal(9),appearance:r.type({customFonts:r.optional(r.array(ee)),navigation:r.optional(r.type({primaryNav:r.optional(ye),secondaryNav:r.optional(me),tabs:r.optional(G)})),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});r.object({version:r.literal(10),appearance:r.type({customFonts:r.optional(r.array(ee)),navigation:r.optional(r.type({primaryNav:r.optional(ye),secondaryNav:r.optional(me),tabs:r.optional(G)})),pageElements:r.type({pageTitle:r.optional(f),pageDescription:r.optional(f),headingXLarge:r.optional(f),headingLarge:r.optional(f),headingMedium:r.optional(f),headingSmall:r.optional(f),headingXSmall:r.optional(f),bodyText:r.optional(f),link:r.optional(te)})})});function ut(e){return typeof e!="string"?!1:e.split("{").length-1===1&&e.startsWith("{")&&e.endsWith("}")}s(ut,"Qe");u(ut,"isTokenReference");function P(e){return typeof e=="string"&&e.includes("{")}s(P,"b");u(P,"hasTokenReferences");function ct(e){return !ut(e)}s(ct,"Ze");u(ct,"isNotTokenReference");var h=r__namespace.define("Token Reference",e=>typeof e!="string"?!1:ct(e)?"Must start and end with curly braces":!0),hr={border:"border",shadow:"shadow",transition:"transition"},br=Object.values(hr),vr={string:"string",number:"number",boolean:"boolean",color:"color",dimension:"dimension",duration:"duration",fontWeight:"fontWeight",strokeStyle:"strokeStyle",cubicBezier:"cubicBezier"},Sr=Object.values(vr);function Ve(e){return br.includes(e)}s(Ve,"q");u(Ve,"isTokenTypeComposite");function dt(e){return Sr.includes(e)}s(dt,"Te");u(dt,"isTokenTypeSingular");utils.expectType([{inset:!1,color:"#000",offsetX:"0px",offsetY:"0px",spread:"0px",blur:"0px"},{color:"#000",offsetX:"0px",offsetY:"0px",spread:"0px",blur:"0px",inset:!0}]);var b=r__namespace.type({id:r__namespace.string(),description:r__namespace.optional(r__namespace.string()),references:r__namespace.optional(r__namespace.array(r__namespace.array(r__namespace.string()))),tokenConfig:r__namespace.optional(r__namespace.type({purpose:r__namespace.optional(r__namespace.string())}))});utils.expectType([{type:"duration",value:"1ms",originalValue:"1ms",id:"1",kind:"static"},{type:"duration",value:"1ms",kind:"ref",id:"1",originalValue:"{a.b}",referencedTokenId:"1"},{type:"duration",value:"1ms",originalValue:"1ms",id:"1",kind:"ref"},{type:"duration",value:"1ms",kind:"static",id:"1",originalValue:"{a.b}",referencedTokenId:"1"},{type:"color",value:"#000",kind:"static",id:"1",originalValue:"#000"},{type:"color",value:"#000",kind:"ref",id:"1",originalValue:"{c.b}",referencedTokenId:"c.b"},{type:"cubicBezier",kind:"static",value:[0,0,0,1],originalValue:[0,0,0,1],id:"1"}]);function kr(e){return Ve(e.type)}s(kr,"To");u(kr,"isTokenDataComposite");utils.expectType([{type:"border",kind:"static",id:"1",value:{color:"#000",style:"solid",width:"1px"},originalValue:{color:"#000",style:"solid",width:"1px"}},{type:"border",kind:"ref",referencedTokenId:"a.b",id:"1",value:{color:"red",style:"dashed",width:"2px"},originalValue:"{a.b}"},{type:"shadow",value:{color:"#000",offsetX:"1px",offsetY:"1px",blur:"1px",spread:"1px",inset:!1},originalValue:{color:"#000",offsetX:"{a.a}",offsetY:"1px",blur:"1px",spread:"1px",inset:!1},id:"1",kind:"static"},{type:"shadow",kind:"ref",referencedTokenId:"a.b",value:{inset:!0,color:"red",offsetX:"1px",blur:"2px",offsetY:"3px",spread:"4px"},originalValue:"{a.b}",id:"1"},{type:"transition",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:"{a.b}",kind:"ref",referencedTokenId:"a.b",id:"1"},{type:"transition",kind:"static",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:{duration:"100ms",delay:"{a.c}",timingFunction:"{a.c}"},id:"1"},{type:"transition",kind:"static",value:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},originalValue:{duration:"100ms",delay:"200ms",timingFunction:[0,0,0,0]},id:"1"}]);function pt(e){return typeof e=="string"&&!P(e)}s(pt,"it");u(pt,"isTokenValueColor");var $=r__namespace.define("Color Value",e=>typeof e!="string"?"Value must be a string":e===""?"Value must not be empty":P(e)?"Value must not contain {} (token references)":!0),_r=r__namespace.assign(r__namespace.type({type:r__namespace.literal("color"),value:$,kind:r__namespace.literal("static"),originalValue:$}),b),Cr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("color"),value:$,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function Y(e){return typeof e=="string"&&(e.endsWith("px")||e.endsWith("rem"))&&!P(e)}s(Y,"J");u(Y,"isTokenValueDimension");var D=r__namespace.define("Dimension Value",e=>typeof e!="string"?"Value must be a string":P(e)?"Value must not contain {} (token references)":!e.endsWith("px")&&!e.endsWith("rem")&&!e.endsWith("em")&&!e.endsWith("%")?"Value must end with px, rem, em or %":!0),Tr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("dimension"),value:D,kind:r__namespace.literal("static"),originalValue:D}),b),wr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("dimension"),value:D,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function xr(e){return typeof e=="string"&&e.endsWith("ms")&&!P(e)}s(xr,"So");u(xr,"isTokenValueDuration");var L=r__namespace.define("Duration Value",e=>typeof e!="string"?"Value must be a string":P(e)?"Value must not contain {} (token references)":/^\d+ms$/.test(e)?!0:'Value must be a number followed by "ms" (e.g., "100ms")'),Ar=r__namespace.assign(r__namespace.type({type:r__namespace.literal("duration"),value:L,kind:r__namespace.literal("static"),originalValue:L}),b),Er=r__namespace.assign(r__namespace.type({type:r__namespace.literal("duration"),value:L,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function Dr(e){return (typeof e=="string"||typeof e=="number")&&!P(e)}s(Dr,"Co");u(Dr,"isTokenValueFontWeight");var De=r__namespace.define("Font Weight Value",e=>typeof e!="string"&&typeof e!="number"?"Value must be a string or number":P(e)?"Value must not contain {} (token references)":!0),Nr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("fontWeight"),value:De,kind:r__namespace.literal("static"),originalValue:De}),b),Vr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("fontWeight"),value:De,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),Q=r__namespace.define("Cubic Bezier Value",e=>Array.isArray(e)?e.length!==4||!e.every(t=>typeof t=="number")?"Value must be an array of 4 numbers":e[0]<0||e[0]>1||e[2]<0||e[2]>1?"The first and third cubicBezier values must be between 0 and 1":!0:"Value must be an array"),Ir=r__namespace.assign(r__namespace.type({type:r__namespace.literal("cubicBezier"),value:Q,kind:r__namespace.literal("static"),originalValue:Q}),b),Pr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("cubicBezier"),value:Q,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function ft(e){return utils.isObject(e)&&pt(e.color)&&Y(e.offsetX)&&Y(e.offsetY)&&Y(e.blur)&&Y(e.spread)}s(ft,"yt");u(ft,"isTokenValueShadow");var gt=r__namespace.define("Shadow Value",e=>ft(e)?!0:`Expected a shadow value, got ${JSON.stringify(e)}`),Rr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("shadow"),value:gt,kind:r__namespace.literal("static"),originalValue:r__namespace.type({color:r__namespace.union([$,h]),offsetX:r__namespace.union([D,h]),offsetY:r__namespace.union([D,h]),blur:r__namespace.union([D,h]),spread:r__namespace.union([D,h]),inset:r__namespace.union([r__namespace.optional(r__namespace.boolean()),h])})}),b),Or=r__namespace.assign(r__namespace.type({type:r__namespace.literal("shadow"),value:gt,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),H=r__namespace.union([r__namespace.literal("solid"),r__namespace.literal("dashed"),r__namespace.literal("dotted"),r__namespace.literal("double"),r__namespace.literal("groove"),r__namespace.literal("ridge"),r__namespace.literal("outset"),r__namespace.literal("inset")]);function yt(e){return utils.isObject(e)&&$.is(e.color)&&H.is(e.style)&&D.is(e.width)}s(yt,"St");u(yt,"isTokenValueBorder");var mt=r__namespace.define("Border Value",yt),Mr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("border"),value:mt,kind:r__namespace.literal("static"),originalValue:r__namespace.type({color:r__namespace.union([$,h]),style:r__namespace.union([H,h]),width:r__namespace.union([D,h])})}),b),Fr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("border"),value:mt,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);function ht(e){return utils.isObject(e)&&Q.is(e.timingFunction)&&L.is(e.duration)&&L.is(e.delay)}s(ht,"bt");u(ht,"isTokenValueTransition");var bt=r__namespace.define("Transition Value",ht),zr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("transition"),value:bt,kind:r__namespace.literal("static"),originalValue:r__namespace.type({timingFunction:r__namespace.union([Q,h]),duration:r__namespace.union([L,h]),delay:r__namespace.union([L,h])})}),b),Kr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("transition"),value:bt,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),Br=r__namespace.assign(r__namespace.type({type:r__namespace.literal("string"),value:r__namespace.string(),kind:r__namespace.literal("static"),originalValue:r__namespace.string()}),b),Ur=r__namespace.assign(r__namespace.type({type:r__namespace.literal("string"),value:r__namespace.string(),kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),Lr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("strokeStyle"),value:H,kind:r__namespace.literal("static"),originalValue:H}),b),Wr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("strokeStyle"),value:H,kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:H}),b),$r=r__namespace.assign(r__namespace.type({type:r__namespace.literal("number"),value:r__namespace.number(),kind:r__namespace.literal("static"),originalValue:r__namespace.number()}),b),Hr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("number"),value:r__namespace.number(),kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b),Gr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("boolean"),value:r__namespace.boolean(),kind:r__namespace.literal("static"),originalValue:r__namespace.boolean()}),b),jr=r__namespace.assign(r__namespace.type({type:r__namespace.literal("boolean"),value:r__namespace.boolean(),kind:r__namespace.literal("ref"),originalValue:h,referencedTokenId:r__namespace.string()}),b);u(e=>{if(!utils.isObject(e))throw new Error(`Expected token data to be an object, got ${JSON.stringify(e)}`);if(!utils.isObjKey("type",e))throw new Error(`Expected token data to have a "type" property, got ${JSON.stringify(e)}`);if(typeof e.type!="string")throw new Error(`Expected token data "type" property to be a string, got ${JSON.stringify(e)}`);let t=e.type,n=e.kind;try{switch(t){case"boolean":n==="ref"?jr.assert(e):Gr.assert(e);return;case"border":n==="ref"?Fr.assert(e):Mr.assert(e);return;case"color":n==="ref"?Cr.assert(e):_r.assert(e);return;case"cubicBezier":n==="ref"?Pr.assert(e):Ir.assert(e);return;case"dimension":n==="ref"?wr.assert(e):Tr.assert(e);return;case"duration":n==="ref"?Er.assert(e):Ar.assert(e);return;case"fontWeight":n==="ref"?Vr.assert(e):Nr.assert(e);return;case"number":n==="ref"?Hr.assert(e):$r.assert(e);return;case"shadow":n==="ref"?Or.assert(e):Rr.assert(e);return;case"string":n==="ref"?Ur.assert(e):Br.assert(e);return;case"strokeStyle":n==="ref"?Wr.assert(e):Lr.assert(e);return;case"transition":n==="ref"?Kr.assert(e):zr.assert(e);return;default:throw new Error(`Unknown token data type: ${t}`)}}catch(a){throw a instanceof r__namespace.StructError?new Error(`Invalid token data for type "${t}": ${a.message}. Received this data: "${JSON.stringify(e)}"`):a}},"assertTokenData");utils.expectType([{type:"dimension",kind:"static",value:"1px"},{type:"dimension",kind:"ref",referencedTokenId:"a.b"}]);utils.expectType([{type:"border",kind:"ref",referencedTokenId:"a.b"},{type:"border",kind:"static",value:{color:{kind:"static",type:"color",value:"red"},style:{kind:"ref",type:"strokeStyle",referencedTokenId:""},width:{kind:"static",type:"dimension",value:"2px"}}}]);utils.expectType([{type:"transition",kind:"ref",referencedTokenId:"a.b"},{type:"transition",kind:"static",value:{delay:{kind:"static",type:"duration",value:"1ms"},duration:{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},timingFunction:{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]}}}]);function Jr(e){return dt(e?.type)}s(Jr,"Bo");u(Jr,"isTokenSrcValueInfoSingular");function Xr(e){return Ve(e?.type)}s(Xr,"Eo");u(Xr,"isTokenSrcValueInfoComposite");utils.expectType([{type:"dimension",kind:"static",value:"1px"},{type:"transition",kind:"ref",referencedTokenId:"a.b"},{type:"transition",kind:"ref",value:"1px"},{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]},{type:"transition",kind:"static",value:{delay:{kind:"static",type:"duration",value:"1ms"},duration:{kind:"ref",type:"duration",referencedTokenId:"animation.slow"},timingFunction:{kind:"static",type:"cubicBezier",value:[.4,0,.2,1]}}}]);function vt(e){return utils.isObject(e)&&utils.isObjKey("cloud.knapsack",e)}s(vt,"At");u(vt,"isTokenSrcExtensions");utils.expectType(["#ddd",!0,[83,1,1,1],{color:"#000",style:"solid",width:"1px"},{inset:!0,color:"#000",offsetX:"0px",offsetY:"{spacing.medium}",spread:"0px",blur:"0px"},{timingFunction:"{timing.ease}",duration:"{timing.duration.medium}",delay:"7ms",color:"#000"}]);function qr(e){return !!(utils.isObject(e)&&utils.isObjKey("$value",e))}s(qr,"Oo");u(qr,"isTokenSrc");function St(e){return utils.isObject(e)&&!vt(e)&&!utils.isObjKey("$value",e)&&!utils.isObjKey("cloud.knapsack",e)}s(St,"Kt");u(St,"isTokenGroup");function Yr(e){if(St(e)){let t=e.$extensions["cloud.knapsack"].group.collectionInfo;if(utils.isObjKey("type",t)&&utils.isObjKey("referenceId",t))return !0}return !1}s(Yr,"Fo");u(Yr,"isTokenTypeVarRef");function Qr(e){let t=typeof e;if(t==="string"||t==="number"||t==="boolean")return t;throw new Error(`Invalid token value type: ${JSON.stringify(t)}. Token value is: ${JSON.stringify(e)}`)}s(Qr,"jo");u(Qr,"getPrimitiveValue");u(e=>e.includes("px")||e.includes("rem")||e.includes("em")||e.includes("%"),"isDimensionString");function Zr(e){let{value:t,unit:n}=utils.parseNumberWithUnit(e);if(!n)return {value:t};if(n!=="px"&&n!=="rem"&&n!=="em"&&n!=="%")throw new Error(`Invalid unit "${n}" for value: ${t}`);return {value:t,unit:n}}s(Zr,"_o");u(Zr,"parseTokenDimensionValue");u(e=>utils.isObject(e)&&e.type==="text","isSlottedText");function en(e){return utils.isObject(e)&&e.type==="template-demo"}s(en,"qo");u(en,"isSlottedTemplateDemo");function tn(e){return utils.isObject(e)&&e.type==="template-reference"}s(tn,"Jo");u(tn,"isSlottedTemplateReference");var rn=(e=>(e.portrait="portrait",e.landscape="landscape",e))(rn||{});function nn(e){return e?.type==="data"}s(nn,"Yo");u(nn,"isDataDemo");function an(e){return e?.type==="template"}s(an,"Xo");u(an,"isTemplateDemo");var sn=(e=>(e.auto="auto",e.small="small",e.medium="medium",e.large="large",e.full="full",e))(sn||{});function kt(e){return !utils.isObject(e)||!["assetSetsState","customPagesState","navsState","patternsState","tokensSrc","db"].every(t=>utils.isObjKey(t,e))?!1:!utils.isObjKey("metaState",e)}s(kt,"zt");u(kt,"isKsAppClientDataNoMeta");r.define("KsAppClientDataNoMeta",kt);function _t(e){return utils.isObject(e)?["assetSetsState","customPagesState","navsState","patternsState","tokensSrc","metaState","db"].every(t=>utils.isObjKey(t,e)):!1}s(_t,"Mt");u(_t,"isKsAppClientDataAndMeta");r.define("KsAppClientDataAndMeta",_t);r.type({isLocalDev:r.boolean(),plugins:r.array(r.type({id:r.string(),hasContent:r.boolean(),clientPluginPath:r.optional(r.string()),cssPath:r.optional(r.string())})),meta:r.optional(r.type({version:r.optional(r.string()),hasKnapsackCloud:r.boolean(),knapsackCloudSiteId:r.optional(r.string()),serverPort:r.optional(r.number()),websocketsPort:r.optional(r.number()),https:r.optional(r.boolean()),cacheDir:r.optional(r.string()),ksVersions:r.type({app:r.string()})}))});function Ct(e){return !utils.isObject(e)||!["assetSetsState","customPagesState","navsState","patternsState","settingsState","tokensState"].every(t=>utils.isObjKey(t,e))?!1:!utils.isObjKey("metaState",e)}s(Ct,"_t");u(Ct,"isKsAppClientDataNoMetaV3");r.define("KsAppClientDataNoMeta",Ct);function Tt(e){return utils.isObject(e)?["assetSetsState","customPagesState","navsState","patternsState","settingsState","tokensState","metaState"].every(t=>utils.isObjKey(t,e)):!1}s(Tt,"Lt");u(Tt,"isKsAppClientDataAndMetaV3");r.define("KsAppClientDataAndMeta",Tt);r.type({isLocalDev:r.boolean(),plugins:r.array(r.type({id:r.string(),hasContent:r.boolean(),clientPluginPath:r.optional(r.string()),cssPath:r.optional(r.string())})),meta:r.optional(r.type({version:r.optional(r.string()),hasKnapsackCloud:r.boolean(),knapsackCloudSiteId:r.optional(r.string()),serverPort:r.optional(r.number()),websocketsPort:r.optional(r.number()),https:r.optional(r.boolean()),cacheDir:r.optional(r.string()),ksVersions:r.type({app:r.string()})}))});({version:"4.1.7",checkIfNeeded:u(e=>!0,"checkIfNeeded"),migrate:u(e=>{if(!M(e))throw new Error("Tried to run migrations on appClientData but it is not an Immer Draft");Object.values(e.patternsState.patterns).forEach(t=>{delete t.demoSize;}),Object.values(e.db.demos.byId).forEach(t=>{t.type==="data"&&(Object.entries(t.data.slots??{}).forEach(([n,a])=>{t.data.slots[n]=a.map(o=>typeof o=="string"?{type:"text",text:o}:(o.type==="template-reference"||o.type==="text"||(o.type="template-demo"),o));}),!(t.patternId&&t.templateId)&&(()=>{for(let{id:n,templates:a=[]}of Object.values(e.patternsState.patterns))for(let{id:o,demoIds:d=[]}of a)if(d.includes(t.id)){t.patternId=n,t.templateId=o;return}})());});},"migrate")});var un=(e=>(e.string="string",e.boolean="boolean",e.number="number",e.object="object",e.options="options",e.function="function",e.customTypeScript="customTypeScript",e.array="array",e.arrayOfObjects="arrayOfObjects",e.arrayOfStrings="arrayOfStrings",e.unknown="unknown",e))(un||{});u(e=>"type"in e&&e.type==="string"&&!("enum"in e),"isStringProp");u(e=>"type"in e&&e.type==="number","isNumberProp");u(e=>"type"in e&&e.type==="boolean","isBooleanProp");u(e=>"enum"in e,"isOptionsProp");u(e=>"typeof"in e&&e?.typeof==="function","isFunctionProp");u(e=>!("typeof"in e)&&"tsType"in e,"isCustomTypeScriptProp");u(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="object","isArrayOfObjectsProp");u(e=>"type"in e&&e.type==="object"&&"properties"in e&&Object.keys(e.properties).length>0,"isObjectProp");u(e=>"type"in e&&e.type==="array"&&"items"in e&&e.items.type==="string","isArrayOfStringsProp");var wt=r__namespace.object({op:r__namespace.union([r__namespace.literal("replace"),r__namespace.literal("remove"),r__namespace.literal("add")]),path:r__namespace.array(r__namespace.union([r__namespace.string(),r__namespace.number()])),value:r__namespace.optional(r__namespace.any())}),cn=wt;u(e=>cn.is(e),"isPatch");var Ne=r__namespace.array(wt),dn=Ne;u(e=>dn.is(e),"isPatches");var xt=r__namespace.type({patches:Ne,inversePatches:r__namespace.optional(Ne),event:r__namespace.optional(r__namespace.object({type:r__namespace.string()})),id:r__namespace.string(),date:r__namespace.string(),userId:r__namespace.optional(r__namespace.string())}),pn=xt;u(e=>pn.is(e),"isKsRemoteChange");var fn=r__namespace.array(xt),gn=fn;u(e=>gn.is(e),"isKsRemoteChanges");var yn=(e=>(e.ready="ready",e))(yn||{});var mn=(e=>(e.GitHub="GitHub",e.GitLab="GitLab",e.GitLabRest="GitLabRest",e.Bitbucket="Bitbucket",e.Azure="Azure",e))(mn||{}),hn=(e=>(e.Conflicting="CONFLICTING",e.Mergeable="MERGEABLE",e.Unknown="UNKNOWN",e))(hn||{}),bn=(e=>(e.Create="CREATE",e.Move="MOVE",e.Update="UPDATE",e.Chmod="CHMOD",e))(bn||{}),vn=(e=>(e.Base64="BASE64",e.Text="TEXT",e))(vn||{}),Sn={};ot(Sn,{ACTIONS:s(()=>At,"ACTIONS"),endpoint:s(()=>kn,"endpoint")});var kn="/plugins",At=(e=>(e.getContent="getContent",e))(At||{}),_n={};ot(_n,{ACTIONS:s(()=>Et,"ACTIONS"),endpoint:s(()=>Cn,"endpoint")});var Cn="/files",Et=(e=>(e.verify="verify",e))(Et||{}),Tn={ADMIN:"ADMIN",ANONYMOUS:"ANONYMOUS",CONTRIBUTOR:"CONTRIBUTOR",EDITOR:"EDITOR",MANAGER:"MANAGER",VIEWER:"VIEWER"},Dt=Object.values(Tn);var Ot=r.enums(Dt),En=Ot,Ya=s(e=>e==="ADMIN","canRoleAdmin"),Mt=["ADMIN","MANAGER"],Qa=s(e=>Mt.includes(e),"canRoleManageUsers"),Ft=[...Mt,"EDITOR"],Za=s(e=>Ft.includes(e),"canRoleDelete"),zt=[...Ft,"CONTRIBUTOR"],ei=s(e=>zt.includes(e),"canRoleEdit"),Dn=["ADMIN"],ti=s(e=>Dn.includes(e),"canRolePublish"),Nn=[...zt,"VIEWER"],ri=s(e=>Nn.includes(e),"canRoleView"),Vn=s(e=>En.is(e),"isRoleValid"),Kt=(n=>(n.user="user",n.anonymous="anonymous",n))(Kt||{}),It=r.enums(Object.values(Kt)),In=r.object({"x-hasura-allowed-roles":r.array(It),"x-hasura-default-role":It,"x-hasura-user-id":r.optional(r.string())}),Pn=r.object({userId:r.string(),isSuperAdmin:r.boolean(),sitesByRole:r.record(Ot,r.array(r.string()))}),Rn=r.type({exp:r.number(),email:r.optional(r.string()),email_verified:r.optional(r.union([r.string(),r.boolean()])),iat:r.number(),iss:r.string(),sub:r.string(),aud:r.union([r.string(),r.array(r.string())])}),On="https://hasura.io/jwt/claims",Bt="https://knapsack.cloud",Mn=r.object({[On]:In,[Bt]:Pn}),Fn=r.assign(Rn,Mn);function zn(e){return Object.entries(e).reduce((t,[n,a])=>(Vn(n)&&a.forEach(o=>{t[o]=n;}),t),{})}s(zn,"expandSitesByRole");var Kn={isSuperAdmin:!1,userId:"",siteRoleMap:{},getSiteRole:s(()=>"ANONYMOUS","getSiteRole")},ni=s(e=>{if(!Fn.is(e))return Kn;let{sitesByRole:t,...n}=e[Bt],a=zn(t);return {...n,siteRoleMap:a,getSiteRole:s(o=>n.isSuperAdmin?"ADMIN":a[o]||"ANONYMOUS","getSiteRole")}},"getKsClaims");var si="/site-deployed",oi="/github-auth";var{KS_DB_URL:he}=process.env;if(he&&!utils.isUrl(he))throw new Error(`KS_DB_URL is not a valid URL: '${he}'`);var Ut=he||"https://db.knapsack.cloud",Un=new URL("/v1/graphql",Ut).toString(),ci={dbUrl:Ut,dbGqlEndpoint:Un};var pi={siteId:"X-KS-Site-ID",instanceId:"X-KS-Instance-Id",appClientVersion:"X-KS-App-Client-Version"};
27
27
 
28
- exports.HASURA_CLAIMS_NAMESPACE = En;
29
- exports.HasuraClaimsStruct = Tn;
30
- exports.HasuraRoles = Ot;
31
- exports.JwtBaseStruct = An;
32
- exports.JwtCustomClaimsStruct = Dn;
33
- exports.JwtWithCustomClaimsStruct = Nn;
34
- exports.KNAPSACK_CLAIMS_NAMESPACE = Mt;
35
- exports.KsClaimsStruct = xn;
36
- exports.RolesEnums = Vt;
37
- exports.RolesEnumsStruct = Sn;
38
- exports.canRoleAdmin = $a;
39
- exports.canRoleDelete = Ga;
40
- exports.canRoleEdit = ja;
41
- exports.canRoleManageUsers = Ha;
42
- exports.canRolePublish = Ja;
43
- exports.canRoleView = Xa;
44
- exports.defaultAnonymousKsClaims = Rn;
45
- exports.expandSitesByRole = Vn;
46
- exports.getKsClaims = qa;
47
- exports.gitHubOauthInternalEndpoint = ei;
48
- exports.isRoleValid = wn;
49
- exports.ksHttpHeaders = ii;
50
- exports.ksUrls = ni;
51
- exports.rolesThatCanDelete = It;
52
- exports.rolesThatCanEdit = Pt;
53
- exports.rolesThatCanManageUsers = Rt;
54
- exports.rolesThatCanPublish = _n;
55
- exports.rolesThatCanView = Cn;
56
- exports.siteDeployedWebhookEndpoint = Za;
28
+ exports.HASURA_CLAIMS_NAMESPACE = On;
29
+ exports.HasuraClaimsStruct = In;
30
+ exports.HasuraRoles = Kt;
31
+ exports.JwtBaseStruct = Rn;
32
+ exports.JwtCustomClaimsStruct = Mn;
33
+ exports.JwtWithCustomClaimsStruct = Fn;
34
+ exports.KNAPSACK_CLAIMS_NAMESPACE = Bt;
35
+ exports.KsClaimsStruct = Pn;
36
+ exports.RolesEnums = Ot;
37
+ exports.RolesEnumsStruct = En;
38
+ exports.canRoleAdmin = Ya;
39
+ exports.canRoleDelete = Za;
40
+ exports.canRoleEdit = ei;
41
+ exports.canRoleManageUsers = Qa;
42
+ exports.canRolePublish = ti;
43
+ exports.canRoleView = ri;
44
+ exports.defaultAnonymousKsClaims = Kn;
45
+ exports.expandSitesByRole = zn;
46
+ exports.getKsClaims = ni;
47
+ exports.gitHubOauthInternalEndpoint = oi;
48
+ exports.isRoleValid = Vn;
49
+ exports.ksHttpHeaders = pi;
50
+ exports.ksUrls = ci;
51
+ exports.rolesThatCanDelete = Ft;
52
+ exports.rolesThatCanEdit = zt;
53
+ exports.rolesThatCanManageUsers = Mt;
54
+ exports.rolesThatCanPublish = Dn;
55
+ exports.rolesThatCanView = Nn;
56
+ exports.siteDeployedWebhookEndpoint = si;
57
57
  //# sourceMappingURL=index.js.map
58
58
  //# sourceMappingURL=index.js.map