159 lines
No EOL
147 KiB
JavaScript
159 lines
No EOL
147 KiB
JavaScript
import{n as e}from"./chunk-BneVvdWh.js";import{a as t,c as n,n as r,o as i,s as a}from"./chunk-3LY4VQVK-Di70sXb8.js";var o,s,c=e((()=>{o=`storybook/background`,`${o}`,s=`storybook/measure-addon`,`${s}`,`${s}`,`${s}`,`${s}`}));function l(){try{return!!globalThis.__vitest_browser__||!!globalThis.window?.navigator?.userAgent?.match(/StorybookTestRunner/)}catch{return!1}}var u=e((()=>{})),d,f=e((()=>{d={AUTODOCS:`autodocs`,ATTACHED_MDX:`attached-mdx`,UNATTACHED_MDX:`unattached-mdx`,PLAY_FN:`play-fn`,TEST_FN:`test-fn`,DEV:`dev`,TEST:`test`,MANIFEST:`manifest`}})),p,m,h,g,_,v,y,b=e((()=>{n(),p=t({"../../node_modules/picoquery/lib/string-util.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.encodeString=r;var t=Array.from({length:256},(e,t)=>`%`+((t<16?`0`:``)+t.toString(16)).toUpperCase()),n=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function r(e){let r=e.length;if(r===0)return``;let i=``,a=0,o=0;outer:for(;o<r;o++){let s=e.charCodeAt(o);for(;s<128;){if(n[s]!==1&&(a<o&&(i+=e.slice(a,o)),a=o+1,i+=t[s]),++o===r)break outer;s=e.charCodeAt(o)}if(a<o&&(i+=e.slice(a,o)),s<2048){a=o+1,i+=t[192|s>>6]+t[128|s&63];continue}if(s<55296||s>=57344){a=o+1,i+=t[224|s>>12]+t[128|s>>6&63]+t[128|s&63];continue}if(++o,o>=r)throw Error(`URI malformed`);let c=e.charCodeAt(o)&1023;a=o+1,s=65536+((s&1023)<<10|c),i+=t[240|s>>18]+t[128|s>>12&63]+t[128|s>>6&63]+t[128|s&63]}return a===0?e:a<r?i+e.slice(a):i}}}),m=t({"../../node_modules/picoquery/lib/shared.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultOptions=e.defaultShouldSerializeObject=e.defaultValueSerializer=void 0;var t=p();e.defaultValueSerializer=e=>{switch(typeof e){case`string`:return(0,t.encodeString)(e);case`bigint`:case`boolean`:return``+e;case`number`:if(Number.isFinite(e))return e<1e21?``+e:(0,t.encodeString)(``+e);break}return e instanceof Date?(0,t.encodeString)(e.toISOString()):``},e.defaultShouldSerializeObject=e=>e instanceof Date;var n=e=>e;e.defaultOptions={nesting:!0,nestingSyntax:`dot`,arrayRepeat:!1,arrayRepeatSyntax:`repeat`,delimiter:38,valueDeserializer:n,valueSerializer:e.defaultValueSerializer,keyDeserializer:n,shouldSerializeObject:e.defaultShouldSerializeObject}}}),h=t({"../../node_modules/picoquery/lib/object-util.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.getDeepObject=i,e.stringifyObject=u;var t=m(),n=p();function r(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function i(e,t,n,i,a){if(r(t))return e;let o=e[t];return typeof o==`object`&&o?o:!i&&(a||typeof n==`number`||typeof n==`string`&&n*0==0&&n.indexOf(`.`)===-1)?e[t]=[]:e[t]={}}var a=20,o=`[]`,s=`[`,c=`]`,l=`.`;function u(e,r,i=0,d,f){let{nestingSyntax:p=t.defaultOptions.nestingSyntax,arrayRepeat:m=t.defaultOptions.arrayRepeat,arrayRepeatSyntax:h=t.defaultOptions.arrayRepeatSyntax,nesting:g=t.defaultOptions.nesting,delimiter:_=t.defaultOptions.delimiter,valueSerializer:v=t.defaultOptions.valueSerializer,shouldSerializeObject:y=t.defaultOptions.shouldSerializeObject}=r,b=typeof _==`number`?String.fromCharCode(_):_,x=f===!0&&m,S=p===`dot`||p===`js`&&!f;if(i>a)return``;let C=``,w=!0,T=!1;for(let t in e){let a=e[t];if(a===void 0)continue;let f;d?(f=d,x?h===`bracket`&&(f+=o):S?(f+=l,f+=t):(f+=s,f+=t,f+=c)):f=t,w||(C+=b),typeof a==`object`&&a&&!y(a)?(T=a.pop!==void 0,(g||m&&T)&&(C+=u(a,r,i+1,f,T))):(C+=(0,n.encodeString)(f),C+=`=`,C+=v(a,t)),w&&=!1}return C}}}),g=t({"../../node_modules/picoquery/lib/decode-uri-component.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.decodeURIComponent=i;var t=12,n=0,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function i(e){let i=e.indexOf(`%`);if(i===-1)return e;let a=e.length,s=``,c=0,l=0,u=i,d=t;for(;i>-1&&i<a;){let f=o(e[i+1],4)|o(e[i+2],0),p=r[f];if(d=r[256+d+p],l=l<<6|f&r[364+p],d===t)s+=e.slice(c,u),s+=l<=65535?String.fromCharCode(l):String.fromCharCode(55232+(l>>10),56320+(l&1023)),l=0,c=i+3,i=u=e.indexOf(`%`,c);else{if(d===n)return null;if(i+=3,i<a&&e.charCodeAt(i)===37)continue;return null}}return s+e.slice(c)}var a={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function o(e,t){let n=a[e];return n===void 0?255:n<<t}}}),_=t({"../../node_modules/picoquery/lib/parse.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.numberValueDeserializer=e.numberKeyDeserializer=void 0,e.parse=s;var t=h(),n=m(),r=g();e.numberKeyDeserializer=e=>{let t=Number(e);return Number.isNaN(t)?e:t},e.numberValueDeserializer=e=>{let t=Number(e);return Number.isNaN(t)?e:t};var i=/\+/g,a=function(){};a.prototype=Object.create(null);function o(e,t,n,a,o){let s=e.substring(t,n);return a&&(s=s.replace(i,` `)),o&&(s=(0,r.decodeURIComponent)(s)||s),s}function s(e,s){let{valueDeserializer:c=n.defaultOptions.valueDeserializer,keyDeserializer:l=n.defaultOptions.keyDeserializer,arrayRepeatSyntax:u=n.defaultOptions.arrayRepeatSyntax,nesting:d=n.defaultOptions.nesting,arrayRepeat:f=n.defaultOptions.arrayRepeat,nestingSyntax:p=n.defaultOptions.nestingSyntax,delimiter:m=n.defaultOptions.delimiter}=s??{},h=typeof m==`string`?m.charCodeAt(0):m,g=p===`js`,_=new a;if(typeof e!=`string`)return _;let v=e.length,y=``,b=-1,x=-1,S=-1,C=_,w,T=``,E=``,D=!1,O=!1,k=!1,A=!1,ee=!1,te=!1,j=0,ne=-1,re=-1,ie=-1;for(let n=0;n<v+1;n++){if(j=n===v?h:e.charCodeAt(n),j===h){if(te=x>b,te||(x=n),S!==x-1&&(E=o(e,S+1,ne>-1?ne:x,k,D),T=l(E),w!==void 0&&(C=(0,t.getDeepObject)(C,w,T,g&&ee,void 0))),te||T!==``){te&&(y=e.slice(x+1,n),A&&(y=y.replace(i,` `)),O&&(y=(0,r.decodeURIComponent)(y)||y));let t=c(y,T);if(f){let e=C[T];e===void 0?ne>-1?C[T]=[t]:C[T]=t:e.pop?e.push(t):C[T]=[e,t]}else C[T]=t}y=``,b=n,x=n,D=!1,O=!1,k=!1,A=!1,ee=!1,ne=-1,S=n,C=_,w=void 0,T=``}else j===93?(f&&u===`bracket`&&ie===91&&(ne=re),d&&(p===`index`||g)&&x<=b&&(S!==re&&(E=o(e,S+1,n,k,D),T=l(E),w!==void 0&&(C=(0,t.getDeepObject)(C,w,T,void 0,void 0)),w=T,k=!1,D=!1),S=n,ee=!1)):j===46?d&&(p===`dot`||g)&&x<=b&&(S!==re&&(E=o(e,S+1,n,k,D),T=l(E),w!==void 0&&(C=(0,t.getDeepObject)(C,w,T,g)),w=T,k=!1,D=!1),ee=!0,S=n):j===91?d&&(p===`index`||g)&&x<=b&&(S!==re&&(E=o(e,S+1,n,k,D),T=l(E),g&&w!==void 0&&(C=(0,t.getDeepObject)(C,w,T,g)),w=T,k=!1,D=!1,ee=!1),S=n):j===61?x<=b?x=n:O=!0:j===43?x>b?A=!0:k=!0:j===37&&(x>b?O=!0:D=!0);re=n,ie=j}return _}}}),v=t({"../../node_modules/picoquery/lib/stringify.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.stringify=n;var t=h();function n(e,n){if(typeof e!=`object`||!e)return``;let r=n??{};return(0,t.stringifyObject)(e,r)}}}),y=t({"../../node_modules/picoquery/lib/main.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.stringify=e.parse=void 0;var r=_();Object.defineProperty(e,`parse`,{enumerable:!0,get:function(){return r.parse}});var i=v();Object.defineProperty(e,`stringify`,{enumerable:!0,get:function(){return i.stringify}}),n(m(),e)}})}));function x(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function S(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function C(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function w(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function T(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var E,D,O,k,A,ee,te,j,ne,re,ie,ae,oe,M,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve=e((()=>{E=`[object RegExp]`,D=`[object String]`,O=`[object Number]`,k=`[object Boolean]`,A=`[object Symbol]`,ee=`[object Date]`,te=`[object Map]`,j=`[object Set]`,ne=`[object Array]`,re=`[object Function]`,ie=`[object ArrayBuffer]`,ae=`[object Object]`,oe=`[object Error]`,M=`[object DataView]`,se=`[object Uint8Array]`,ce=`[object Uint8ClampedArray]`,le=`[object Uint16Array]`,ue=`[object Uint32Array]`,de=`[object BigUint64Array]`,fe=`[object Int8Array]`,pe=`[object Int16Array]`,me=`[object Int32Array]`,he=`[object BigInt64Array]`,ge=`[object Float32Array]`,_e=`[object Float64Array]`}));function ye(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let a=r[i],o=e[a];n[a]=t(o,a,e)}return n}function be(e){return e===`__proto__`}function N(e,t,n){let r=Object.keys(t);for(let i=0;i<r.length;i++){let a=r[i];if(be(a))continue;let o=t[a],s=e[a],c=n(s,o,a,e,t);c===void 0?Array.isArray(o)?Array.isArray(s)?e[a]=N(s,o,n):e[a]=N([],o,n):x(o)?x(s)?e[a]=N(s,o,n):e[a]=N({},o,n):(s===void 0||o!==void 0)&&(e[a]=o):e[a]=c}return e}function xe(e,t){let n={};for(let r=0;r<t.length;r++){let i=t[r];Object.hasOwn(e,i)&&(n[i]=e[i])}return n}function Se(e){if(S(e))return e;if(Array.isArray(e)||C(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e),n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t=new n(e.message);return t.stack=e.stack,t.name=e.name,t.cause=e.cause,t}if(typeof File<`u`&&e instanceof File)return new n([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e==`object`){let n=Object.create(t);return Object.assign(n,e)}return e}function Ce(e,t){let n={...e};for(let e=0;e<t.length;e++){let r=t[e];delete n[r]}return n}function we(e,t){return N(Se(e),t,function e(t,n){if(Array.isArray(n))return N(Array.isArray(t)?Se(t):[],n,e);if(x(n))return x(t)?N(Se(t),n,e):N({},n,e)})}var Te=e((()=>{ve()}));function Ee(e){return Wt.some(t=>t===e)}function De(e){return!!e.__docgenInfo}function Oe(e){return e!=null&&Object.keys(e).length>0}function ke(e,t){return De(e)?e.__docgenInfo[t]:null}function Ae(e){return De(e)?Gt(e.__docgenInfo.description):``}function je(e){return/^\s+$/.test(e)}function Me(e){let t=e.match(/\r+$/);return t==null?[``,e]:[e.slice(-t[0].length),e.slice(0,-t[0].length)]}function Ne(e){let t=e.match(/^\s+/);return t==null?[``,e]:[e.slice(0,t[0].length),e.slice(t[0].length)]}function Pe(e){return e.split(/\n/)}function Fe(e={}){return Object.assign({tag:``,name:``,type:``,optional:!1,description:``,problems:[],source:[]},e)}function Ie(e={}){return Object.assign({start:``,delimiter:``,postDelimiter:``,tag:``,postTag:``,name:``,postName:``,type:``,postType:``,description:``,end:``,lineEnd:``},e)}function Le({fence:e="```"}={}){let t=Re(e),n=(e,n)=>t(e)?!n:n;return function(e){let t=[[]],r=!1;for(let i of e)qt.test(i.tokens.description)&&!r?t.push([i]):t[t.length-1].push(i),r=n(i.tokens.description,r);return t}}function Re(e){return typeof e==`string`?t=>t.split(e).length%2==0:e}function ze({startLine:e=0,markers:t=Kt}={}){let n=null,r=e;return function(e){let i=e,a=Ie();if([a.lineEnd,i]=Me(i),[a.start,i]=Ne(i),n===null&&i.startsWith(t.start)&&!i.startsWith(t.nostart)&&(n=[],a.delimiter=i.slice(0,t.start.length),i=i.slice(t.start.length),[a.postDelimiter,i]=Ne(i)),n===null)return r++,null;let o=i.trimRight().endsWith(t.end);if(a.delimiter===``&&i.startsWith(t.delim)&&!i.startsWith(t.end)&&(a.delimiter=t.delim,i=i.slice(t.delim.length),[a.postDelimiter,i]=Ne(i)),o){let e=i.trimRight();a.end=i.slice(e.length-t.end.length),i=e.slice(0,-t.end.length)}if(a.description=i,n.push({number:r,source:e,tokens:a}),r++,o){let e=n.slice();return n=null,e}return null}}function Be({tokenizers:e}){return function(t){var n;let r=Fe({source:t});for(let t of e)if(r=t(r),(n=r.problems[r.problems.length-1])!=null&&n.critical)break;return r}}function P(){return e=>{let{tokens:t}=e.source[0],n=t.description.match(/\s*(@(\S+))(\s*)/);return n===null?(e.problems.push({code:`spec:tag:prefix`,message:`tag should start with "@" symbol`,line:e.source[0].number,critical:!0}),e):(t.tag=n[1],t.postTag=n[3],t.description=t.description.slice(n[0].length),e.tag=n[2],e)}}function Ve(e=`compact`){let t=He(e);return e=>{let n=0,r=[];for(let[t,{tokens:i}]of e.source.entries()){let a=``;if(t===0&&i.description[0]!==`{`)return e;for(let e of i.description)if(e===`{`&&n++,e===`}`&&n--,a+=e,n===0)break;if(r.push([i,a]),n===0)break}if(n!==0)return e.problems.push({code:`spec:type:unpaired-curlies`,message:`unpaired curlies`,line:e.source[0].number,critical:!0}),e;let i=[],a=r[0][0].postDelimiter.length;for(let[e,[t,n]]of r.entries())t.type=n,e>0&&(t.type=t.postDelimiter.slice(a)+n,t.postDelimiter=t.postDelimiter.slice(0,a)),[t.postType,t.description]=Ne(t.description.slice(n.length)),i.push(t.type);return i[0]=i[0].slice(1),i[i.length-1]=i[i.length-1].slice(0,-1),e.type=t(i),e}}function He(e){return e===`compact`?e=>e.map(Jt).join(``):e===`preserve`?e=>e.join(`
|
|
`):e}function F(){let e=(e,{tokens:t},n)=>t.type===``?e:n;return t=>{let{tokens:n}=t.source[t.source.reduce(e,0)],r=n.description.trimLeft(),i=r.split(`"`);if(i.length>1&&i[0]===``&&i.length%2==1)return t.name=i[1],n.name=`"${i[1]}"`,[n.postName,n.description]=Ne(r.slice(n.name.length)),t;let a=0,o=``,s=!1,c;for(let e of r){if(a===0&&je(e))break;e===`[`&&a++,e===`]`&&a--,o+=e}if(a!==0)return t.problems.push({code:`spec:name:unpaired-brackets`,message:`unpaired brackets`,line:t.source[0].number,critical:!0}),t;let l=o;if(o[0]===`[`&&o[o.length-1]===`]`){s=!0,o=o.slice(1,-1);let e=o.split(`=`);if(o=e[0].trim(),e[1]!==void 0&&(c=e.slice(1).join(`=`).trim()),o===``)return t.problems.push({code:`spec:name:empty-name`,message:`empty name`,line:t.source[0].number,critical:!0}),t;if(c===``)return t.problems.push({code:`spec:name:empty-default`,message:`empty default value`,line:t.source[0].number,critical:!0}),t;if(!Yt(c)&&/=(?!>)/.test(c))return t.problems.push({code:`spec:name:invalid-default`,message:`invalid default value syntax`,line:t.source[0].number,critical:!0}),t}return t.optional=s,t.name=o,n.name=l,c!==void 0&&(t.default=c),[n.postName,n.description]=Ne(r.slice(n.name.length)),t}}function Ue(e=`compact`,t=Kt){let n=We(e);return e=>(e.description=n(e.source,t),e)}function We(e){return e===`compact`?Ge:e===`preserve`?Ke:e}function Ge(e,t=Kt){return e.map(({tokens:{description:e}})=>e.trim()).filter(e=>e!==``).join(` `)}function Ke(e,t=Kt){if(e.length===0)return``;e[0].tokens.description===``&&e[0].tokens.delimiter===t.start&&(e=e.slice(1));let n=e[e.length-1];return n!==void 0&&n.tokens.description===``&&n.tokens.end.endsWith(t.end)&&(e=e.slice(0,-1)),e=e.slice(e.reduce(Xt,0)),e.map(Zt).join(`
|
|
`)}function I({startLine:e=0,fence:t="```",spacing:n=`compact`,markers:r=Kt,tokenizers:i=[P(),Ve(n),F(),Ue(n)]}={}){if(e<0||e%1>0)throw Error(`Invalid startLine`);let a=ze({startLine:e,markers:r}),o=Le({fence:t}),s=Be({tokenizers:i}),c=We(n);return function(e){let t=[];for(let n of Pe(e)){let e=a(n);if(e===null)continue;let i=o(e),l=i.slice(1).map(s);t.push({description:c(i[0],r),tags:l,source:e,problems:l.reduce((e,t)=>e.concat(t.problems),[])})}return t}}function qe(e,t={}){return I(t)(e)}function Je(e){return e!=null&&e.includes(`@`)}function Ye(e){let t=qe(`/**
|
|
`+(e??``).split(`
|
|
`).map(e=>` * ${e}`).join(`
|
|
`)+`
|
|
*/`,{spacing:`preserve`});if(!t||t.length===0)throw Error(`Cannot parse JSDoc tags.`);return t[0]}function Xe(e,t){let n={params:null,deprecated:null,returns:null,ignore:!1};for(let r of e.tags)if(!(t!==void 0&&!t.includes(r.tag)))if(r.tag===`ignore`){n.ignore=!0;break}else switch(r.tag){case`param`:case`arg`:case`argument`:{let e=Qe(r);e!=null&&(n.params??=[],n.params.push(e));break}case`deprecated`:{let e=$e(r);e!=null&&(n.deprecated=e);break}case`returns`:{let e=nt(r);e!=null&&(n.returns=e);break}default:break}return n}function Ze(e){return e.replace(/[\.-]$/,``)}function Qe(e){if(!e.name||e.name===`-`)return null;let t=rt(e.type);return{name:e.name,type:t,description:tt(e.description),getPrettyName:()=>Ze(e.name),getTypeName:()=>t?it(t):null}}function $e(e){return e.name?et(e.name,e.description):null}function et(e,t){return tt(e===``?t:`${e} ${t}`)}function tt(e){let t=e.replace(/^- /g,``).trim();return t===``?null:t}function nt(e){let t=rt(e.type);return t?{type:t,description:et(e.name,e.description),getTypeName:()=>it(t)}:null}function rt(e){try{return(0,Qt.parse)(e,`typescript`)}catch{return null}}function it(e){return(0,Qt.transform)(tn,e)}function at(e){return e.length>90}function ot(e){return e.length>50}function L(e,t){return e===t?{summary:e}:{summary:e,detail:t}}function st(e,t){if(e!=null){let{value:n}=e;if(!Ee(n))return ot(n)?L(t?.name,n):L(n)}return null}function ct({name:e,value:t,elements:n,raw:r}){return t??(n==null?r??e:n.map(ct).join(` | `))}function lt({name:e,raw:t,elements:n}){return L(n==null?t==null?e:t.replace(/^\|\s*/,``):n.map(ct).join(` | `))}function ut({type:e,raw:t}){return L(t??e)}function dt({type:e,raw:t}){return t==null?L(e):at(t)?L(e,t):L(t)}function ft(e){let{type:t}=e;return t===`object`?dt(e):ut(e)}function pt({name:e,raw:t}){return t==null?L(e):at(t)?L(e,t):L(t)}function mt(e){if(e==null)return null;switch(e.name){case`union`:return lt(e);case`signature`:return ft(e);default:return pt(e)}}function ht({defaultValue:e}){if(e!=null){let{value:t}=e;if(!Ee(t))return L(t)}return null}function gt({tsType:e,required:t}){if(e==null)return null;let n=e.name;return t||(n=n.replace(` | undefined`,``)),L([`Array`,`Record`,`signature`].includes(e.name)?e.raw:n)}function _t(e){return e==null?null:L(e.name)}function vt(e){let{computed:t,func:n}=e;return typeof t>`u`&&typeof n>`u`}function yt(e){return e?e.name===`string`?!0:e.name===`enum`?Array.isArray(e.value)&&e.value.every(({value:e})=>typeof e==`string`&&e[0]===`"`&&e[e.length-1]===`"`):!1:!1}function bt(e,t){if(e!=null){let{value:n}=e;if(!Ee(n))return vt(e)&&yt(t)?L(JSON.stringify(n)):L(n)}return null}function xt(e,t,n){let{description:r,required:i,defaultValue:a}=n;return{name:e,type:_t(t),required:i,description:r,defaultValue:bt(a,t)}}function St(e,t){if(t?.includesJsDoc){let{description:n,extractedTags:r}=t;n!=null&&(e.description=t.description);let i={...r,params:r?.params?.map(e=>({name:e.getPrettyName(),description:e.description}))};Object.values(i).filter(Boolean).length>0&&(e.jsDocTags=i)}return e}function Ct(e,t,n,r){let i=en(t.description);return i.includesJsDoc&&i.ignore?null:{propDef:r(e,t,i),jsDocTags:i.extractedTags,docgenInfo:t,typeSystem:n}}function wt(e){return e==null?``:Ae(e)}var Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn=e((()=>{Te(),ve(),n(),Tt=t({"../../node_modules/jsdoc-type-pratt-parser/dist/index.js"(e,t){(function(n,r){typeof e==`object`&&typeof t<`u`?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.jtpp={}))})(e,(function(e){function t(e){return e.text!==void 0&&e.text!==``?`'${e.type}' with value '${e.text}'`:`'${e.type}'`}class n extends Error{constructor(e){super(`No parslet found for token: ${t(e)}`),this.token=e,Object.setPrototypeOf(this,n.prototype)}getToken(){return this.token}}class r extends Error{constructor(e){super(`The parsing ended early. The next token was: ${t(e)}`),this.token=e,Object.setPrototypeOf(this,r.prototype)}getToken(){return this.token}}class i extends Error{constructor(e,t){let n=`Unexpected type: '${e.type}'.`;t!==void 0&&(n+=` Message: ${t}`),super(n),Object.setPrototypeOf(this,i.prototype)}}function a(e){return t=>t.startsWith(e)?{type:e,text:e}:null}function o(e){let t=0,n,r=e[0],i=!1;if(r!==`'`&&r!==`"`)return null;for(;t<e.length;){if(t++,n=e[t],!i&&n===r){t++;break}i=!i&&n===`\\`}if(n!==r)throw Error(`Unterminated String`);return e.slice(0,t)}let s=RegExp(`[$_\\p{ID_Start}]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}`,`u`),c=RegExp(`[$\\-\\p{ID_Continue}\\u200C\\u200D]|\\\\u\\p{Hex_Digit}{4}|\\\\u\\{0*(?:\\p{Hex_Digit}{1,5}|10\\p{Hex_Digit}{4})\\}`,`u`);function l(e){let t=e[0];if(!s.test(t))return null;let n=1;do{if(t=e[n],!c.test(t))break;n++}while(n<e.length);return e.slice(0,n)}let u=/^(NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity))/;function d(e){return u.exec(e)?.[0]??null}let f=e=>{let t=l(e);return t==null?null:{type:`Identifier`,text:t}};function p(e){return t=>{if(!t.startsWith(e))return null;let n=t[e.length];return n!==void 0&&c.test(n)?null:{type:e,text:e}}}let m=[e=>e.length>0?null:{type:`EOF`,text:``},a(`=>`),a(`(`),a(`)`),a(`{`),a(`}`),a(`[`),a(`]`),a(`|`),a(`&`),a(`<`),a(`>`),a(`,`),a(`;`),a(`*`),a(`?`),a(`!`),a(`=`),a(`:`),a(`...`),a(`.`),a(`#`),a(`~`),a(`/`),a(`@`),p(`undefined`),p(`null`),p(`function`),p(`this`),p(`new`),p(`module`),p(`event`),p(`extends`),p(`external`),p(`infer`),p(`typeof`),p(`keyof`),p(`readonly`),p(`import`),p(`is`),p(`in`),p(`asserts`),e=>{let t=d(e);return t===null?null:{type:`Number`,text:t}},f,e=>{let t=o(e);return t==null?null:{type:`StringValue`,text:t}}],h=/^\s*\n\s*/;class g{static create(e){let t=this.read(e);e=t.text;let n=this.read(e);return e=n.text,new g(e,void 0,t.token,n.token)}constructor(e,t,n,r){this.text=``,this.text=e,this.previous=t,this.current=n,this.next=r}static read(e,t=!1){t||=h.test(e),e=e.trim();for(let n of m){let r=n(e);if(r!==null){let n=Object.assign(Object.assign({},r),{startOfLine:t});return e=e.slice(n.text.length),{text:e,token:n}}}throw Error(`Unexpected Token `+e)}advance(){let e=g.read(this.text);return new g(e.text,this.current,this.next,e.token)}}function _(e){if(e===void 0)throw Error(`Unexpected undefined`);if(e.type===`JsdocTypeKeyValue`||e.type===`JsdocTypeParameterList`||e.type===`JsdocTypeProperty`||e.type===`JsdocTypeReadonlyProperty`||e.type===`JsdocTypeObjectField`||e.type===`JsdocTypeJsdocObjectField`||e.type===`JsdocTypeIndexSignature`||e.type===`JsdocTypeMappedType`||e.type===`JsdocTypeTypeParameter`)throw new i(e);return e}function v(e){return e.type===`JsdocTypeKeyValue`?b(e):_(e)}function y(e){return e.type===`JsdocTypeName`?e:b(e)}function b(e){if(e.type!==`JsdocTypeKeyValue`)throw new i(e);return e}function x(e){if(e.type===`JsdocTypeVariadic`){if(e.element?.type===`JsdocTypeName`)return e;throw new i(e)}if(e.type!==`JsdocTypeNumber`&&e.type!==`JsdocTypeName`)throw new i(e);return e}function S(e){if(e.type===`JsdocTypeTuple`||e.type===`JsdocTypeGeneric`&&e.meta.brackets===`square`)return e;throw new i(e)}function C(e){return e.type===`JsdocTypeIndexSignature`||e.type===`JsdocTypeMappedType`}var w;(function(e){e[e.ALL=0]=`ALL`,e[e.PARAMETER_LIST=1]=`PARAMETER_LIST`,e[e.OBJECT=2]=`OBJECT`,e[e.KEY_VALUE=3]=`KEY_VALUE`,e[e.INDEX_BRACKETS=4]=`INDEX_BRACKETS`,e[e.UNION=5]=`UNION`,e[e.INTERSECTION=6]=`INTERSECTION`,e[e.PREFIX=7]=`PREFIX`,e[e.INFIX=8]=`INFIX`,e[e.TUPLE=9]=`TUPLE`,e[e.SYMBOL=10]=`SYMBOL`,e[e.OPTIONAL=11]=`OPTIONAL`,e[e.NULLABLE=12]=`NULLABLE`,e[e.KEY_OF_TYPE_OF=13]=`KEY_OF_TYPE_OF`,e[e.FUNCTION=14]=`FUNCTION`,e[e.ARROW=15]=`ARROW`,e[e.ARRAY_BRACKETS=16]=`ARRAY_BRACKETS`,e[e.GENERIC=17]=`GENERIC`,e[e.NAME_PATH=18]=`NAME_PATH`,e[e.PARENTHESIS=19]=`PARENTHESIS`,e[e.SPECIAL_TYPES=20]=`SPECIAL_TYPES`})(w||={});class T{constructor(e,t,n){this.grammar=e,typeof t==`string`?this._lexer=g.create(t):this._lexer=t,this.baseParser=n}get lexer(){return this._lexer}parse(){let e=this.parseType(w.ALL);if(this.lexer.current.type!==`EOF`)throw new r(this.lexer.current);return e}parseType(e){return _(this.parseIntermediateType(e))}parseIntermediateType(e){let t=this.tryParslets(null,e);if(t===null)throw new n(this.lexer.current);return this.parseInfixIntermediateType(t,e)}parseInfixIntermediateType(e,t){let n=this.tryParslets(e,t);for(;n!==null;)e=n,n=this.tryParslets(e,t);return e}tryParslets(e,t){for(let n of this.grammar){let r=n(this,t,e);if(r!==null)return r}return null}consume(e){return Array.isArray(e)||(e=[e]),e.includes(this.lexer.current.type)?(this._lexer=this.lexer.advance(),!0):!1}acceptLexerState(e){this._lexer=e.lexer}}function E(e){return e===`}`||e===`EOF`||e===`|`||e===`,`||e===`)`||e===`>`}let D=(e,t,n)=>{let r=e.lexer.current.type,i=e.lexer.next.type;return n==null&&r===`?`&&!E(i)||n!=null&&r===`?`?(e.consume(`?`),n==null?{type:`JsdocTypeNullable`,element:e.parseType(w.NULLABLE),meta:{position:`prefix`}}:{type:`JsdocTypeNullable`,element:_(n),meta:{position:`suffix`}}):null};function O(e){let t=(t,n,r)=>{let i=t.lexer.current.type,a=t.lexer.next.type;if(r===null){if(`parsePrefix`in e&&e.accept(i,a))return e.parsePrefix(t)}else if(`parseInfix`in e&&e.precedence>n&&e.accept(i,a))return e.parseInfix(t,r);return null};return Object.defineProperty(t,`name`,{value:e.name}),t}let k=O({name:`optionalParslet`,accept:e=>e===`=`,precedence:w.OPTIONAL,parsePrefix:e=>(e.consume(`=`),{type:`JsdocTypeOptional`,element:e.parseType(w.OPTIONAL),meta:{position:`prefix`}}),parseInfix:(e,t)=>(e.consume(`=`),{type:`JsdocTypeOptional`,element:_(t),meta:{position:`suffix`}})}),A=O({name:`numberParslet`,accept:e=>e===`Number`,parsePrefix:e=>{let t=parseFloat(e.lexer.current.text);return e.consume(`Number`),{type:`JsdocTypeNumber`,value:t}}}),ee=O({name:`parenthesisParslet`,accept:e=>e===`(`,parsePrefix:e=>{if(e.consume(`(`),e.consume(`)`))return{type:`JsdocTypeParameterList`,elements:[]};let t=e.parseIntermediateType(w.ALL);if(!e.consume(`)`))throw Error(`Unterminated parenthesis`);return t.type===`JsdocTypeParameterList`?t:t.type===`JsdocTypeKeyValue`?{type:`JsdocTypeParameterList`,elements:[t]}:{type:`JsdocTypeParenthesis`,element:_(t)}}}),te=O({name:`specialTypesParslet`,accept:(e,t)=>e===`?`&&E(t)||e===`null`||e===`undefined`||e===`*`,parsePrefix:e=>{if(e.consume(`null`))return{type:`JsdocTypeNull`};if(e.consume(`undefined`))return{type:`JsdocTypeUndefined`};if(e.consume(`*`))return{type:`JsdocTypeAny`};if(e.consume(`?`))return{type:`JsdocTypeUnknown`};throw Error(`Unacceptable token: `+e.lexer.current.text)}}),j=O({name:`notNullableParslet`,accept:e=>e===`!`,precedence:w.NULLABLE,parsePrefix:e=>(e.consume(`!`),{type:`JsdocTypeNotNullable`,element:e.parseType(w.NULLABLE),meta:{position:`prefix`}}),parseInfix:(e,t)=>(e.consume(`!`),{type:`JsdocTypeNotNullable`,element:_(t),meta:{position:`suffix`}})});function ne({allowTrailingComma:e}){return O({name:`parameterListParslet`,accept:e=>e===`,`,precedence:w.PARAMETER_LIST,parseInfix:(e,t)=>{let r=[v(t)];e.consume(`,`);do try{let t=e.parseIntermediateType(w.PARAMETER_LIST);r.push(v(t))}catch(e){if(e instanceof n)break;throw e}while(e.consume(`,`));if(r.length>0&&r.slice(0,-1).some(e=>e.type===`JsdocTypeVariadic`))throw Error(`Only the last parameter may be a rest parameter`);return{type:`JsdocTypeParameterList`,elements:r}}})}let re=O({name:`genericParslet`,accept:(e,t)=>e===`<`||e===`.`&&t===`<`,precedence:w.GENERIC,parseInfix:(e,t)=>{let n=e.consume(`.`);e.consume(`<`);let r=[],a=!1;if(e.consume(`infer`)){a=!0;let t=e.parseIntermediateType(w.SYMBOL);if(t.type!==`JsdocTypeName`)throw new i(t,`A typescript asserts always has to have a name on the left side.`);r.push(t)}else do r.push(e.parseType(w.PARAMETER_LIST));while(e.consume(`,`));if(!e.consume(`>`))throw Error(`Unterminated generic parameter list`);return Object.assign(Object.assign({type:`JsdocTypeGeneric`,left:_(t),elements:r},a?{infer:!0}:{}),{meta:{brackets:`angle`,dot:n}})}}),ie=O({name:`unionParslet`,accept:e=>e===`|`,precedence:w.UNION,parseInfix:(e,t)=>{e.consume(`|`);let n=[];do n.push(e.parseType(w.UNION));while(e.consume(`|`));return{type:`JsdocTypeUnion`,elements:[_(t),...n]}}}),ae=[D,k,A,ee,te,j,ne({allowTrailingComma:!0}),re,ie,k];function oe({allowSquareBracketsOnAnyType:e,allowJsdocNamePaths:t,pathGrammar:n}){return function(r,a,o){if(o==null||a>=w.NAME_PATH)return null;let s=r.lexer.current.type,c=r.lexer.next.type;if(!(s===`.`&&c!==`<`||s===`[`&&(e||o.type===`JsdocTypeName`)||t&&(s===`~`||s===`#`)))return null;let l,u=!1;r.consume(`.`)?l=`property`:r.consume(`[`)?(l=`property-brackets`,u=!0):r.consume(`~`)?l=`inner`:(r.consume(`#`),l=`instance`);let d=n===null?r:new T(n,r.lexer,r),f=d.parseIntermediateType(w.NAME_PATH);r.acceptLexerState(d);let p;switch(f.type){case`JsdocTypeName`:p={type:`JsdocTypeProperty`,value:f.value,meta:{quote:void 0}};break;case`JsdocTypeNumber`:p={type:`JsdocTypeProperty`,value:f.value.toString(10),meta:{quote:void 0}};break;case`JsdocTypeStringValue`:p={type:`JsdocTypeProperty`,value:f.value,meta:{quote:f.meta.quote}};break;case`JsdocTypeSpecialNamePath`:if(f.specialType===`event`)p=f;else throw new i(f,`Type 'JsdocTypeSpecialNamePath' is only allowed with specialType 'event'`);break;default:throw new i(f,`Expecting 'JsdocTypeName', 'JsdocTypeNumber', 'JsdocStringValue' or 'JsdocTypeSpecialNamePath'`)}if(u&&!r.consume(`]`)){let e=r.lexer.current;throw Error(`Unterminated square brackets. Next token is '${e.type}' with text '${e.text}'`)}return{type:`JsdocTypeNamePath`,left:_(o),right:p,pathType:l}}}function M({allowedAdditionalTokens:e}){return O({name:`nameParslet`,accept:t=>t===`Identifier`||t===`this`||t===`new`||e.includes(t),parsePrefix:e=>{let{type:t,text:n}=e.lexer.current;return e.consume(t),{type:`JsdocTypeName`,value:n}}})}let se=O({name:`stringValueParslet`,accept:e=>e===`StringValue`,parsePrefix:e=>{let t=e.lexer.current.text;return e.consume(`StringValue`),{type:`JsdocTypeStringValue`,value:t.slice(1,-1),meta:{quote:t[0]===`'`?`single`:`double`}}}});function ce({pathGrammar:e,allowedTypes:t}){return O({name:`specialNamePathParslet`,accept:e=>t.includes(e),parsePrefix:t=>{let n=t.lexer.current.type;if(t.consume(n),!t.consume(`:`))return{type:`JsdocTypeName`,value:n};let r,i=t.lexer.current;if(t.consume(`StringValue`))r={type:`JsdocTypeSpecialNamePath`,value:i.text.slice(1,-1),specialType:n,meta:{quote:i.text[0]===`'`?`single`:`double`}};else{let e=``,a=[`Identifier`,`@`,`/`];for(;a.some(e=>t.consume(e));)e+=i.text,i=t.lexer.current;r={type:`JsdocTypeSpecialNamePath`,value:e,specialType:n,meta:{quote:void 0}}}let a=new T(e,t.lexer,t),o=a.parseInfixIntermediateType(r,w.ALL);return t.acceptLexerState(a),_(o)}})}let le=[M({allowedAdditionalTokens:[`external`,`module`]}),se,A,oe({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:null})],ue=[...le,ce({allowedTypes:[`event`],pathGrammar:le})];function de(e){let t;if(e.type===`JsdocTypeParameterList`)t=e.elements;else if(e.type===`JsdocTypeParenthesis`)t=[e.element];else throw new i(e);return t.map(e=>v(e))}function fe(e){let t=de(e);if(t.some(e=>e.type===`JsdocTypeKeyValue`))throw Error(`No parameter should be named`);return t}function pe({allowNamedParameters:e,allowNoReturnType:t,allowWithoutParenthesis:n,allowNewAsFunctionKeyword:r}){return O({name:`functionParslet`,accept:(e,t)=>e===`function`||r&&e===`new`&&t===`(`,parsePrefix:r=>{let i=r.consume(`new`);r.consume(`function`);let a=r.lexer.current.type===`(`;if(!a){if(!n)throw Error(`function is missing parameter list`);return{type:`JsdocTypeName`,value:`function`}}let o={type:`JsdocTypeFunction`,parameters:[],arrow:!1,constructor:i,parenthesis:a},s=r.parseIntermediateType(w.FUNCTION);if(e===void 0)o.parameters=fe(s);else{if(i&&s.type===`JsdocTypeFunction`&&s.arrow)return o=s,o.constructor=!0,o;o.parameters=de(s);for(let t of o.parameters)if(t.type===`JsdocTypeKeyValue`&&!e.includes(t.key))throw Error(`only allowed named parameters are ${e.join(`, `)} but got ${t.type}`)}if(r.consume(`:`))o.returnType=r.parseType(w.PREFIX);else if(!t)throw Error(`function is missing return type`);return o}})}function me({allowPostfix:e,allowEnclosingBrackets:t}){return O({name:`variadicParslet`,accept:e=>e===`...`,precedence:w.PREFIX,parsePrefix:e=>{e.consume(`...`);let r=t&&e.consume(`[`);try{let t=e.parseType(w.PREFIX);if(r&&!e.consume(`]`))throw Error(`Unterminated variadic type. Missing ']'`);return{type:`JsdocTypeVariadic`,element:_(t),meta:{position:`prefix`,squareBrackets:r}}}catch(e){if(e instanceof n){if(r)throw Error(`Empty square brackets for variadic are not allowed.`);return{type:`JsdocTypeVariadic`,meta:{position:void 0,squareBrackets:!1}}}else throw e}},parseInfix:e?(e,t)=>(e.consume(`...`),{type:`JsdocTypeVariadic`,element:_(t),meta:{position:`suffix`,squareBrackets:!1}}):void 0})}let he=O({name:`symbolParslet`,accept:e=>e===`(`,precedence:w.SYMBOL,parseInfix:(e,t)=>{if(t.type!==`JsdocTypeName`)throw Error(`Symbol expects a name on the left side. (Reacting on '(')`);e.consume(`(`);let n={type:`JsdocTypeSymbol`,value:t.value};if(!e.consume(`)`)&&(n.element=x(e.parseIntermediateType(w.SYMBOL)),!e.consume(`)`)))throw Error(`Symbol does not end after value`);return n}}),ge=O({name:`arrayBracketsParslet`,precedence:w.ARRAY_BRACKETS,accept:(e,t)=>e===`[`&&t===`]`,parseInfix:(e,t)=>(e.consume(`[`),e.consume(`]`),{type:`JsdocTypeGeneric`,left:{type:`JsdocTypeName`,value:`Array`},elements:[_(t)],meta:{brackets:`square`,dot:!1}})});function _e({objectFieldGrammar:e,allowKeyTypes:t}){return O({name:`objectParslet`,accept:e=>e===`{`,parsePrefix:n=>{n.consume(`{`);let r={type:`JsdocTypeObject`,meta:{separator:`comma`},elements:[]};if(!n.consume(`}`)){let a,o=new T(e,n.lexer,n);for(;;){o.acceptLexerState(n);let e=o.parseIntermediateType(w.OBJECT);n.acceptLexerState(o),e===void 0&&t&&(e=n.parseIntermediateType(w.OBJECT));let s=!1;if(e.type===`JsdocTypeNullable`&&(s=!0,e=e.element),e.type===`JsdocTypeNumber`||e.type===`JsdocTypeName`||e.type===`JsdocTypeStringValue`){let t;e.type===`JsdocTypeStringValue`&&(t=e.meta.quote),r.elements.push({type:`JsdocTypeObjectField`,key:e.value.toString(),right:void 0,optional:s,readonly:!1,meta:{quote:t}})}else if(e.type===`JsdocTypeObjectField`||e.type===`JsdocTypeJsdocObjectField`)r.elements.push(e);else throw new i(e);if(n.lexer.current.startOfLine)a=`linebreak`,n.consume(`,`)||n.consume(`;`);else if(n.consume(`,`))a=`comma`;else if(n.consume(`;`))a=`semicolon`;else break;if(n.lexer.current.type===`}`)break}if(r.meta.separator=a??`comma`,a===`linebreak`&&(r.meta.propertyIndent=` `),!n.consume(`}`))throw Error(`Unterminated record type. Missing '}'`)}return r}})}function ve({allowSquaredProperties:e,allowKeyTypes:t,allowReadonly:n,allowOptional:r}){return O({name:`objectFieldParslet`,precedence:w.KEY_VALUE,accept:e=>e===`:`,parseInfix:(a,o)=>{let s=!1,c=!1;r&&o.type===`JsdocTypeNullable`&&(s=!0,o=o.element),n&&o.type===`JsdocTypeReadonlyProperty`&&(c=!0,o=o.element);let l=a.baseParser??a;if(l.acceptLexerState(a),o.type===`JsdocTypeNumber`||o.type===`JsdocTypeName`||o.type===`JsdocTypeStringValue`||C(o)){if(C(o)&&!e)throw new i(o);l.consume(`:`);let t;o.type===`JsdocTypeStringValue`&&(t=o.meta.quote);let n=l.parseType(w.KEY_VALUE);return a.acceptLexerState(l),{type:`JsdocTypeObjectField`,key:C(o)?o:o.value.toString(),right:n,optional:s,readonly:c,meta:{quote:t}}}else{if(!t)throw new i(o);l.consume(`:`);let e=l.parseType(w.KEY_VALUE);return a.acceptLexerState(l),{type:`JsdocTypeJsdocObjectField`,left:_(o),right:e}}}})}function ye({allowOptional:e,allowVariadic:t}){return O({name:`keyValueParslet`,precedence:w.KEY_VALUE,accept:e=>e===`:`,parseInfix:(n,r)=>{let a=!1,o=!1;if(e&&r.type===`JsdocTypeNullable`&&(a=!0,r=r.element),t&&r.type===`JsdocTypeVariadic`&&r.element!==void 0&&(o=!0,r=r.element),r.type!==`JsdocTypeName`)throw new i(r);n.consume(`:`);let s=n.parseType(w.KEY_VALUE);return{type:`JsdocTypeKeyValue`,key:r.value,right:s,optional:a,variadic:o}}})}let be=[...ae,pe({allowWithoutParenthesis:!0,allowNamedParameters:[`this`,`new`],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),se,ce({allowedTypes:[`module`,`external`,`event`],pathGrammar:ue}),me({allowEnclosingBrackets:!0,allowPostfix:!0}),M({allowedAdditionalTokens:[`keyof`]}),he,ge,oe({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:ue})],N=[...be,_e({objectFieldGrammar:[M({allowedAdditionalTokens:[`typeof`,`module`,`in`]}),ve({allowSquaredProperties:!1,allowKeyTypes:!0,allowOptional:!1,allowReadonly:!1}),...be],allowKeyTypes:!0}),ye({allowOptional:!0,allowVariadic:!0})],xe=O({name:`typeOfParslet`,accept:e=>e===`typeof`,parsePrefix:e=>(e.consume(`typeof`),{type:`JsdocTypeTypeof`,element:e.parseType(w.KEY_OF_TYPE_OF)})}),Se=[M({allowedAdditionalTokens:[`typeof`,`module`,`keyof`,`event`,`external`,`in`]}),D,k,se,A,ve({allowSquaredProperties:!1,allowKeyTypes:!1,allowOptional:!1,allowReadonly:!1})],Ce=[...ae,_e({allowKeyTypes:!1,objectFieldGrammar:Se}),M({allowedAdditionalTokens:[`event`,`external`,`in`]}),xe,pe({allowWithoutParenthesis:!1,allowNamedParameters:[`this`,`new`],allowNoReturnType:!0,allowNewAsFunctionKeyword:!1}),me({allowEnclosingBrackets:!1,allowPostfix:!1}),M({allowedAdditionalTokens:[`keyof`]}),ce({allowedTypes:[`module`],pathGrammar:ue}),oe({allowSquareBracketsOnAnyType:!1,allowJsdocNamePaths:!0,pathGrammar:ue}),ye({allowOptional:!1,allowVariadic:!1}),he],we=O({name:`assertsParslet`,accept:e=>e===`asserts`,parsePrefix:e=>{e.consume(`asserts`);let t=e.parseIntermediateType(w.SYMBOL);if(t.type!==`JsdocTypeName`)throw new i(t,`A typescript asserts always has to have a name on the left side.`);return e.consume(`is`)?{type:`JsdocTypeAsserts`,left:t,right:_(e.parseIntermediateType(w.INFIX))}:{type:`JsdocTypeAssertsPlain`,element:t}}});function Te({allowQuestionMark:e}){return O({name:`tupleParslet`,accept:e=>e===`[`,parsePrefix:e=>{e.consume(`[`);let t={type:`JsdocTypeTuple`,elements:[]};if(e.consume(`]`))return t;let n=e.parseIntermediateType(w.ALL);if(n.type===`JsdocTypeParameterList`?n.elements[0].type===`JsdocTypeKeyValue`?t.elements=n.elements.map(b):t.elements=n.elements.map(_):n.type===`JsdocTypeKeyValue`?t.elements=[b(n)]:t.elements=[_(n)],!e.consume(`]`))throw Error(`Unterminated '['`);if(t.elements.some(e=>e.type===`JsdocTypeUnknown`))throw Error(`Question mark in tuple not allowed`);return t}})}let Ee=O({name:`keyOfParslet`,accept:e=>e===`keyof`,parsePrefix:e=>(e.consume(`keyof`),{type:`JsdocTypeKeyof`,element:_(e.parseType(w.KEY_OF_TYPE_OF))})}),De=O({name:`importParslet`,accept:e=>e===`import`,parsePrefix:e=>{if(e.consume(`import`),!e.consume(`(`))throw Error(`Missing parenthesis after import keyword`);let t=e.parseType(w.PREFIX);if(t.type!==`JsdocTypeStringValue`)throw Error(`Only string values are allowed as paths for imports`);if(!e.consume(`)`))throw Error(`Missing closing parenthesis after import keyword`);return{type:`JsdocTypeImport`,element:t}}}),Oe=O({name:`readonlyPropertyParslet`,accept:e=>e===`readonly`,parsePrefix:e=>(e.consume(`readonly`),{type:`JsdocTypeReadonlyProperty`,element:e.parseIntermediateType(w.KEY_VALUE)})}),ke=O({name:`arrowFunctionParslet`,precedence:w.ARROW,accept:e=>e===`=>`,parseInfix:(e,t)=>(e.consume(`=>`),{type:`JsdocTypeFunction`,parameters:de(t).map(y),arrow:!0,constructor:!1,parenthesis:!0,returnType:e.parseType(w.OBJECT)})}),Ae=O({name:`genericArrowFunctionParslet`,accept:e=>e===`<`,parsePrefix:e=>{let t=[];e.consume(`<`);do{let n,r=e.parseIntermediateType(w.SYMBOL);if(r.type===`JsdocTypeOptional`&&(r=r.element,n=e.parseType(w.SYMBOL)),r.type!==`JsdocTypeName`)throw new i(r);let a;e.consume(`extends`)&&(a=e.parseType(w.SYMBOL),a.type===`JsdocTypeOptional`&&(a=a.element,n=e.parseType(w.SYMBOL)));let o={type:`JsdocTypeTypeParameter`,name:r};if(a!==void 0&&(o.constraint=a),n!==void 0&&(o.defaultValue=n),t.push(o),e.consume(`>`))break}while(e.consume(`,`));let n=e.parseIntermediateType(w.SYMBOL);return n.typeParameters=t,n}}),je=O({name:`intersectionParslet`,accept:e=>e===`&`,precedence:w.INTERSECTION,parseInfix:(e,t)=>{e.consume(`&`);let n=[];do n.push(e.parseType(w.INTERSECTION));while(e.consume(`&`));return{type:`JsdocTypeIntersection`,elements:[_(t),...n]}}}),Me=O({name:`predicateParslet`,precedence:w.INFIX,accept:e=>e===`is`,parseInfix:(e,t)=>{if(t.type!==`JsdocTypeName`)throw new i(t,`A typescript predicate always has to have a name on the left side.`);return e.consume(`is`),{type:`JsdocTypePredicate`,left:t,right:_(e.parseIntermediateType(w.INFIX))}}}),Ne=O({name:`objectSquareBracketPropertyParslet`,accept:e=>e===`[`,parsePrefix:e=>{if(e.baseParser===void 0)throw Error(`Only allowed inside object grammar`);e.consume(`[`);let t=e.lexer.current.text;e.consume(`Identifier`);let n;if(e.consume(`:`)){let r=e.baseParser;r.acceptLexerState(e),n={type:`JsdocTypeIndexSignature`,key:t,right:r.parseType(w.INDEX_BRACKETS)},e.acceptLexerState(r)}else if(e.consume(`in`)){let r=e.baseParser;r.acceptLexerState(e),n={type:`JsdocTypeMappedType`,key:t,right:r.parseType(w.ARRAY_BRACKETS)},e.acceptLexerState(r)}else throw Error(`Missing ':' or 'in' inside square bracketed property.`);if(!e.consume(`]`))throw Error(`Unterminated square brackets`);return n}}),Pe=O({name:`readonlyArrayParslet`,accept:e=>e===`readonly`,parsePrefix:e=>(e.consume(`readonly`),{type:`JsdocTypeReadonlyArray`,element:S(e.parseIntermediateType(w.ALL))})}),Fe=O({name:`conditionalParslet`,precedence:w.INFIX,accept:e=>e===`extends`,parseInfix:(e,t)=>{e.consume(`extends`);let n=e.parseType(w.KEY_OF_TYPE_OF).element,r=e.parseType(w.INFIX);return e.consume(`:`),{type:`JsdocTypeConditional`,checksType:_(t),extendsType:n,trueType:r,falseType:e.parseType(w.INFIX)}}}),Ie=[Oe,M({allowedAdditionalTokens:[`typeof`,`module`,`keyof`,`event`,`external`,`in`]}),D,k,se,A,ve({allowSquaredProperties:!0,allowKeyTypes:!1,allowOptional:!0,allowReadonly:!0}),Ne],Le=[...ae,_e({allowKeyTypes:!1,objectFieldGrammar:Ie}),Pe,xe,Ee,De,se,pe({allowWithoutParenthesis:!0,allowNoReturnType:!1,allowNamedParameters:[`this`,`new`,`args`],allowNewAsFunctionKeyword:!0}),Te({allowQuestionMark:!1}),me({allowEnclosingBrackets:!1,allowPostfix:!1}),we,Fe,M({allowedAdditionalTokens:[`event`,`external`,`in`]}),ce({allowedTypes:[`module`],pathGrammar:ue}),ge,ke,Ae,oe({allowSquareBracketsOnAnyType:!0,allowJsdocNamePaths:!1,pathGrammar:ue}),je,Me,ye({allowVariadic:!0,allowOptional:!0})];function Re(e,t){switch(t){case`closure`:return new T(Ce,e).parse();case`jsdoc`:return new T(N,e).parse();case`typescript`:return new T(Le,e).parse()}}function ze(e,t=[`typescript`,`closure`,`jsdoc`]){let n;for(let r of t)try{return Re(e,r)}catch(e){n=e}throw n}function Be(e,t){let n=e[t.type];if(n===void 0)throw Error(`In this set of transform rules exists no rule for type ${t.type}.`);return n(t,t=>Be(e,t))}function P(e){throw Error(`This transform is not available. Are you trying the correct parsing mode?`)}function Ve(e){let t={params:[]};for(let n of e.parameters)n.type===`JsdocTypeKeyValue`?n.key===`this`?t.this=n.right:n.key===`new`?t.new=n.right:t.params.push(n):t.params.push(n);return t}function He(e,t,n){return e===`prefix`?n+t:t+n}function F(e,t){switch(t){case`double`:return`"${e}"`;case`single`:return`'${e}'`;case void 0:return e}}function Ue(){return{JsdocTypeParenthesis:(e,t)=>`(${e.element===void 0?``:t(e.element)})`,JsdocTypeKeyof:(e,t)=>`keyof ${t(e.element)}`,JsdocTypeFunction:(e,t)=>{if(e.arrow){if(e.returnType===void 0)throw Error(`Arrow function needs a return type.`);let n=`${e.typeParameters===void 0?``:`<${e.typeParameters.map(t).join(`, `)??``}>`}(${e.parameters.map(t).join(`, `)}) => ${t(e.returnType)}`;return e.constructor&&(n=`new `+n),n}else{let n=e.constructor?`new`:`function`;return e.parenthesis&&(n+=`(${e.parameters.map(t).join(`, `)})`,e.returnType!==void 0&&(n+=`: ${t(e.returnType)}`)),n}},JsdocTypeName:e=>e.value,JsdocTypeTuple:(e,t)=>`[${e.elements.map(t).join(`, `)}]`,JsdocTypeVariadic:(e,t)=>e.meta.position===void 0?`...`:He(e.meta.position,t(e.element),`...`),JsdocTypeNamePath:(e,t)=>{let n=t(e.left),r=t(e.right);switch(e.pathType){case`inner`:return`${n}~${r}`;case`instance`:return`${n}#${r}`;case`property`:return`${n}.${r}`;case`property-brackets`:return`${n}[${r}]`}},JsdocTypeStringValue:e=>F(e.value,e.meta.quote),JsdocTypeAny:()=>`*`,JsdocTypeGeneric:(e,t)=>{if(e.meta.brackets===`square`){let n=e.elements[0],r=t(n);return n.type===`JsdocTypeUnion`||n.type===`JsdocTypeIntersection`?`(${r})[]`:`${r}[]`}else return`${t(e.left)}${e.meta.dot?`.`:``}<${e.infer===!0?`infer `:``}${e.elements.map(t).join(`, `)}>`},JsdocTypeImport:(e,t)=>`import(${t(e.element)})`,JsdocTypeObjectField:(e,t)=>{let n=``;return e.readonly&&(n+=`readonly `),typeof e.key==`string`?n+=F(e.key,e.meta.quote):n+=t(e.key),e.optional&&(n+=`?`),e.right===void 0?n:n+`: ${t(e.right)}`},JsdocTypeJsdocObjectField:(e,t)=>`${t(e.left)}: ${t(e.right)}`,JsdocTypeKeyValue:(e,t)=>{let n=e.key;return e.optional&&(n+=`?`),e.variadic&&(n=`...`+n),e.right===void 0?n:n+`: ${t(e.right)}`},JsdocTypeSpecialNamePath:e=>`${e.specialType}:${F(e.value,e.meta.quote)}`,JsdocTypeNotNullable:(e,t)=>He(e.meta.position,t(e.element),`!`),JsdocTypeNull:()=>`null`,JsdocTypeNullable:(e,t)=>He(e.meta.position,t(e.element),`?`),JsdocTypeNumber:e=>e.value.toString(),JsdocTypeObject:(e,t)=>`{${(e.meta.separator===`linebreak`&&e.elements.length>1?`
|
|
`+(e.meta.propertyIndent??``):``)+e.elements.map(t).join(e.meta.separator===`comma`?`, `:e.meta.separator===`linebreak`?`
|
|
`+(e.meta.propertyIndent??``):`; `)+(e.meta.separator===`linebreak`&&e.elements.length>1?`
|
|
`:``)}}`,JsdocTypeOptional:(e,t)=>He(e.meta.position,t(e.element),`=`),JsdocTypeSymbol:(e,t)=>`${e.value}(${e.element===void 0?``:t(e.element)})`,JsdocTypeTypeof:(e,t)=>`typeof ${t(e.element)}`,JsdocTypeUndefined:()=>`undefined`,JsdocTypeUnion:(e,t)=>e.elements.map(t).join(` | `),JsdocTypeUnknown:()=>`?`,JsdocTypeIntersection:(e,t)=>e.elements.map(t).join(` & `),JsdocTypeProperty:e=>F(e.value,e.meta.quote),JsdocTypePredicate:(e,t)=>`${t(e.left)} is ${t(e.right)}`,JsdocTypeIndexSignature:(e,t)=>`[${e.key}: ${t(e.right)}]`,JsdocTypeMappedType:(e,t)=>`[${e.key} in ${t(e.right)}]`,JsdocTypeAsserts:(e,t)=>`asserts ${t(e.left)} is ${t(e.right)}`,JsdocTypeReadonlyArray:(e,t)=>`readonly ${t(e.element)}`,JsdocTypeAssertsPlain:(e,t)=>`asserts ${t(e.element)}`,JsdocTypeConditional:(e,t)=>`${t(e.checksType)} extends ${t(e.extendsType)} ? ${t(e.trueType)} : ${t(e.falseType)}`,JsdocTypeTypeParameter:(e,t)=>`${t(e.name)}${e.constraint===void 0?``:` extends ${t(e.constraint)}`}${e.defaultValue===void 0?``:` = ${t(e.defaultValue)}`}`}}let We=Ue();function Ge(e){return Be(We,e)}let Ke=`null.true.false.break.case.catch.class.const.continue.debugger.default.delete.do.else.export.extends.finally.for.function.if.import.in.instanceof.new.return.super.switch.this.throw.try.typeof.var.void.while.with.yield`.split(`.`);function I(e){let t={type:`NameExpression`,name:e};return Ke.includes(e)&&(t.reservedWord=!0),t}let qe={JsdocTypeOptional:(e,t)=>{let n=t(e.element);return n.optional=!0,n},JsdocTypeNullable:(e,t)=>{let n=t(e.element);return n.nullable=!0,n},JsdocTypeNotNullable:(e,t)=>{let n=t(e.element);return n.nullable=!1,n},JsdocTypeVariadic:(e,t)=>{if(e.element===void 0)throw Error(`dots without value are not allowed in catharsis mode`);let n=t(e.element);return n.repeatable=!0,n},JsdocTypeAny:()=>({type:`AllLiteral`}),JsdocTypeNull:()=>({type:`NullLiteral`}),JsdocTypeStringValue:e=>I(F(e.value,e.meta.quote)),JsdocTypeUndefined:()=>({type:`UndefinedLiteral`}),JsdocTypeUnknown:()=>({type:`UnknownLiteral`}),JsdocTypeFunction:(e,t)=>{let n=Ve(e),r={type:`FunctionType`,params:n.params.map(t)};return n.this!==void 0&&(r.this=t(n.this)),n.new!==void 0&&(r.new=t(n.new)),e.returnType!==void 0&&(r.result=t(e.returnType)),r},JsdocTypeGeneric:(e,t)=>({type:`TypeApplication`,applications:e.elements.map(e=>t(e)),expression:t(e.left)}),JsdocTypeSpecialNamePath:e=>I(e.specialType+`:`+F(e.value,e.meta.quote)),JsdocTypeName:e=>e.value===`function`?{type:`FunctionType`,params:[]}:I(e.value),JsdocTypeNumber:e=>I(e.value.toString()),JsdocTypeObject:(e,t)=>{let n={type:`RecordType`,fields:[]};for(let r of e.elements)r.type!==`JsdocTypeObjectField`&&r.type!==`JsdocTypeJsdocObjectField`?n.fields.push({type:`FieldType`,key:t(r),value:void 0}):n.fields.push(t(r));return n},JsdocTypeObjectField:(e,t)=>{if(typeof e.key!=`string`)throw Error(`Index signatures and mapped types are not supported`);return{type:`FieldType`,key:I(F(e.key,e.meta.quote)),value:e.right===void 0?void 0:t(e.right)}},JsdocTypeJsdocObjectField:(e,t)=>({type:`FieldType`,key:t(e.left),value:t(e.right)}),JsdocTypeUnion:(e,t)=>({type:`TypeUnion`,elements:e.elements.map(e=>t(e))}),JsdocTypeKeyValue:(e,t)=>({type:`FieldType`,key:I(e.key),value:e.right===void 0?void 0:t(e.right)}),JsdocTypeNamePath:(e,t)=>{let n=t(e.left),r;r=e.right.type===`JsdocTypeSpecialNamePath`?t(e.right).name:F(e.right.value,e.right.meta.quote);let i=e.pathType===`inner`?`~`:e.pathType===`instance`?`#`:`.`;return I(`${n.name}${i}${r}`)},JsdocTypeSymbol:e=>{let t=``,n=e.element,r=!1;return n?.type===`JsdocTypeVariadic`&&(n.meta.position===`prefix`?t=`...`:r=!0,n=n.element),n?.type===`JsdocTypeName`?t+=n.value:n?.type===`JsdocTypeNumber`&&(t+=n.value.toString()),r&&(t+=`...`),I(`${e.value}(${t})`)},JsdocTypeParenthesis:(e,t)=>t(_(e.element)),JsdocTypeMappedType:P,JsdocTypeIndexSignature:P,JsdocTypeImport:P,JsdocTypeKeyof:P,JsdocTypeTuple:P,JsdocTypeTypeof:P,JsdocTypeIntersection:P,JsdocTypeProperty:P,JsdocTypePredicate:P,JsdocTypeAsserts:P,JsdocTypeReadonlyArray:P,JsdocTypeAssertsPlain:P,JsdocTypeConditional:P,JsdocTypeTypeParameter:P};function Je(e){return Be(qe,e)}function Ye(e){switch(e){case void 0:return`none`;case`single`:return`single`;case`double`:return`double`}}function Xe(e){switch(e){case`inner`:return`INNER_MEMBER`;case`instance`:return`INSTANCE_MEMBER`;case`property`:return`MEMBER`;case`property-brackets`:return`MEMBER`}}function Ze(e,t){return t.length===2?{type:e,left:t[0],right:t[1]}:{type:e,left:t[0],right:Ze(e,t.slice(1))}}let Qe={JsdocTypeOptional:(e,t)=>({type:`OPTIONAL`,value:t(e.element),meta:{syntax:e.meta.position===`prefix`?`PREFIX_EQUAL_SIGN`:`SUFFIX_EQUALS_SIGN`}}),JsdocTypeNullable:(e,t)=>({type:`NULLABLE`,value:t(e.element),meta:{syntax:e.meta.position===`prefix`?`PREFIX_QUESTION_MARK`:`SUFFIX_QUESTION_MARK`}}),JsdocTypeNotNullable:(e,t)=>({type:`NOT_NULLABLE`,value:t(e.element),meta:{syntax:e.meta.position===`prefix`?`PREFIX_BANG`:`SUFFIX_BANG`}}),JsdocTypeVariadic:(e,t)=>{let n={type:`VARIADIC`,meta:{syntax:e.meta.position===`prefix`?`PREFIX_DOTS`:e.meta.position===`suffix`?`SUFFIX_DOTS`:`ONLY_DOTS`}};return e.element!==void 0&&(n.value=t(e.element)),n},JsdocTypeName:e=>({type:`NAME`,name:e.value}),JsdocTypeTypeof:(e,t)=>({type:`TYPE_QUERY`,name:t(e.element)}),JsdocTypeTuple:(e,t)=>({type:`TUPLE`,entries:e.elements.map(t)}),JsdocTypeKeyof:(e,t)=>({type:`KEY_QUERY`,value:t(e.element)}),JsdocTypeImport:e=>({type:`IMPORT`,path:{type:`STRING_VALUE`,quoteStyle:Ye(e.element.meta.quote),string:e.element.value}}),JsdocTypeUndefined:()=>({type:`NAME`,name:`undefined`}),JsdocTypeAny:()=>({type:`ANY`}),JsdocTypeFunction:(e,t)=>{let n=Ve(e),r={type:e.arrow?`ARROW`:`FUNCTION`,params:n.params.map(e=>{if(e.type===`JsdocTypeKeyValue`){if(e.right===void 0)throw Error(`Function parameter without ':' is not expected to be 'KEY_VALUE'`);return{type:`NAMED_PARAMETER`,name:e.key,typeName:t(e.right)}}else return t(e)}),new:null,returns:null};return n.this===void 0?e.arrow||(r.this=null):r.this=t(n.this),n.new!==void 0&&(r.new=t(n.new)),e.returnType!==void 0&&(r.returns=t(e.returnType)),r},JsdocTypeGeneric:(e,t)=>{let n={type:`GENERIC`,subject:t(e.left),objects:e.elements.map(t),meta:{syntax:e.meta.brackets===`square`?`SQUARE_BRACKET`:e.meta.dot?`ANGLE_BRACKET_WITH_DOT`:`ANGLE_BRACKET`}};return e.meta.brackets===`square`&&e.elements[0].type===`JsdocTypeFunction`&&!e.elements[0].parenthesis&&(n.objects[0]={type:`NAME`,name:`function`}),n},JsdocTypeObjectField:(e,t)=>{if(typeof e.key!=`string`)throw Error(`Index signatures and mapped types are not supported`);if(e.right===void 0)return{type:`RECORD_ENTRY`,key:e.key,quoteStyle:Ye(e.meta.quote),value:null,readonly:!1};let n=t(e.right);return e.optional&&(n={type:`OPTIONAL`,value:n,meta:{syntax:`SUFFIX_KEY_QUESTION_MARK`}}),{type:`RECORD_ENTRY`,key:e.key.toString(),quoteStyle:Ye(e.meta.quote),value:n,readonly:!1}},JsdocTypeJsdocObjectField:()=>{throw Error(`Keys may not be typed in jsdoctypeparser.`)},JsdocTypeKeyValue:(e,t)=>{if(e.right===void 0)return{type:`RECORD_ENTRY`,key:e.key,quoteStyle:`none`,value:null,readonly:!1};let n=t(e.right);return e.optional&&(n={type:`OPTIONAL`,value:n,meta:{syntax:`SUFFIX_KEY_QUESTION_MARK`}}),{type:`RECORD_ENTRY`,key:e.key,quoteStyle:`none`,value:n,readonly:!1}},JsdocTypeObject:(e,t)=>{let n=[];for(let r of e.elements)(r.type===`JsdocTypeObjectField`||r.type===`JsdocTypeJsdocObjectField`)&&n.push(t(r));return{type:`RECORD`,entries:n}},JsdocTypeSpecialNamePath:e=>{if(e.specialType!==`module`)throw Error(`jsdoctypeparser does not support type ${e.specialType} at this point.`);return{type:`MODULE`,value:{type:`FILE_PATH`,quoteStyle:Ye(e.meta.quote),path:e.value}}},JsdocTypeNamePath:(e,t)=>{let n=!1,r,i;e.right.type===`JsdocTypeSpecialNamePath`&&e.right.specialType===`event`?(n=!0,r=e.right.value,i=Ye(e.right.meta.quote)):(r=e.right.value,i=Ye(e.right.meta.quote));let a={type:Xe(e.pathType),owner:t(e.left),name:r,quoteStyle:i,hasEventPrefix:n};if(a.owner.type===`MODULE`){let e=a.owner;return a.owner=a.owner.value,e.value=a,e}else return a},JsdocTypeUnion:(e,t)=>Ze(`UNION`,e.elements.map(t)),JsdocTypeParenthesis:(e,t)=>({type:`PARENTHESIS`,value:t(_(e.element))}),JsdocTypeNull:()=>({type:`NAME`,name:`null`}),JsdocTypeUnknown:()=>({type:`UNKNOWN`}),JsdocTypeStringValue:e=>({type:`STRING_VALUE`,quoteStyle:Ye(e.meta.quote),string:e.value}),JsdocTypeIntersection:(e,t)=>Ze(`INTERSECTION`,e.elements.map(t)),JsdocTypeNumber:e=>({type:`NUMBER_VALUE`,number:e.value.toString()}),JsdocTypeSymbol:P,JsdocTypeProperty:P,JsdocTypePredicate:P,JsdocTypeMappedType:P,JsdocTypeIndexSignature:P,JsdocTypeAsserts:P,JsdocTypeReadonlyArray:P,JsdocTypeAssertsPlain:P,JsdocTypeConditional:P,JsdocTypeTypeParameter:P};function $e(e){return Be(Qe,e)}function et(){return{JsdocTypeIntersection:(e,t)=>({type:`JsdocTypeIntersection`,elements:e.elements.map(t)}),JsdocTypeGeneric:(e,t)=>({type:`JsdocTypeGeneric`,left:t(e.left),elements:e.elements.map(t),meta:{dot:e.meta.dot,brackets:e.meta.brackets}}),JsdocTypeNullable:e=>e,JsdocTypeUnion:(e,t)=>({type:`JsdocTypeUnion`,elements:e.elements.map(t)}),JsdocTypeUnknown:e=>e,JsdocTypeUndefined:e=>e,JsdocTypeTypeof:(e,t)=>({type:`JsdocTypeTypeof`,element:t(e.element)}),JsdocTypeSymbol:(e,t)=>{let n={type:`JsdocTypeSymbol`,value:e.value};return e.element!==void 0&&(n.element=t(e.element)),n},JsdocTypeOptional:(e,t)=>({type:`JsdocTypeOptional`,element:t(e.element),meta:{position:e.meta.position}}),JsdocTypeObject:(e,t)=>({type:`JsdocTypeObject`,meta:{separator:`comma`},elements:e.elements.map(t)}),JsdocTypeNumber:e=>e,JsdocTypeNull:e=>e,JsdocTypeNotNullable:(e,t)=>({type:`JsdocTypeNotNullable`,element:t(e.element),meta:{position:e.meta.position}}),JsdocTypeSpecialNamePath:e=>e,JsdocTypeObjectField:(e,t)=>({type:`JsdocTypeObjectField`,key:e.key,right:e.right===void 0?void 0:t(e.right),optional:e.optional,readonly:e.readonly,meta:e.meta}),JsdocTypeJsdocObjectField:(e,t)=>({type:`JsdocTypeJsdocObjectField`,left:t(e.left),right:t(e.right)}),JsdocTypeKeyValue:(e,t)=>({type:`JsdocTypeKeyValue`,key:e.key,right:e.right===void 0?void 0:t(e.right),optional:e.optional,variadic:e.variadic}),JsdocTypeImport:(e,t)=>({type:`JsdocTypeImport`,element:t(e.element)}),JsdocTypeAny:e=>e,JsdocTypeStringValue:e=>e,JsdocTypeNamePath:e=>e,JsdocTypeVariadic:(e,t)=>{let n={type:`JsdocTypeVariadic`,meta:{position:e.meta.position,squareBrackets:e.meta.squareBrackets}};return e.element!==void 0&&(n.element=t(e.element)),n},JsdocTypeTuple:(e,t)=>({type:`JsdocTypeTuple`,elements:e.elements.map(t)}),JsdocTypeName:e=>e,JsdocTypeFunction:(e,t)=>{let n={type:`JsdocTypeFunction`,arrow:e.arrow,parameters:e.parameters.map(t),constructor:e.constructor,parenthesis:e.parenthesis};return e.returnType!==void 0&&(n.returnType=t(e.returnType)),n},JsdocTypeKeyof:(e,t)=>({type:`JsdocTypeKeyof`,element:t(e.element)}),JsdocTypeParenthesis:(e,t)=>({type:`JsdocTypeParenthesis`,element:t(e.element)}),JsdocTypeProperty:e=>e,JsdocTypePredicate:(e,t)=>({type:`JsdocTypePredicate`,left:t(e.left),right:t(e.right)}),JsdocTypeIndexSignature:(e,t)=>({type:`JsdocTypeIndexSignature`,key:e.key,right:t(e.right)}),JsdocTypeMappedType:(e,t)=>({type:`JsdocTypeMappedType`,key:e.key,right:t(e.right)}),JsdocTypeAsserts:(e,t)=>({type:`JsdocTypeAsserts`,left:t(e.left),right:t(e.right)}),JsdocTypeReadonlyArray:(e,t)=>({type:`JsdocTypeReadonlyArray`,element:t(e.element)}),JsdocTypeAssertsPlain:(e,t)=>({type:`JsdocTypeAssertsPlain`,element:t(e.element)}),JsdocTypeConditional:(e,t)=>({type:`JsdocTypeConditional`,checksType:t(e.checksType),extendsType:t(e.extendsType),trueType:t(e.trueType),falseType:t(e.falseType)}),JsdocTypeTypeParameter:(e,t)=>({type:`JsdocTypeTypeParameter`,name:t(e.name),constraint:e.constraint===void 0?void 0:t(e.constraint),defaultValue:e.defaultValue===void 0?void 0:t(e.defaultValue)})}}let tt={JsdocTypeAny:[],JsdocTypeFunction:[`parameters`,`returnType`],JsdocTypeGeneric:[`left`,`elements`],JsdocTypeImport:[],JsdocTypeIndexSignature:[`right`],JsdocTypeIntersection:[`elements`],JsdocTypeKeyof:[`element`],JsdocTypeKeyValue:[`right`],JsdocTypeMappedType:[`right`],JsdocTypeName:[],JsdocTypeNamePath:[`left`,`right`],JsdocTypeNotNullable:[`element`],JsdocTypeNull:[],JsdocTypeNullable:[`element`],JsdocTypeNumber:[],JsdocTypeObject:[`elements`],JsdocTypeObjectField:[`right`],JsdocTypeJsdocObjectField:[`left`,`right`],JsdocTypeOptional:[`element`],JsdocTypeParenthesis:[`element`],JsdocTypeSpecialNamePath:[],JsdocTypeStringValue:[],JsdocTypeSymbol:[`element`],JsdocTypeTuple:[`elements`],JsdocTypeTypeof:[`element`],JsdocTypeUndefined:[],JsdocTypeUnion:[`elements`],JsdocTypeUnknown:[],JsdocTypeVariadic:[`element`],JsdocTypeProperty:[],JsdocTypePredicate:[`left`,`right`],JsdocTypeAsserts:[`left`,`right`],JsdocTypeReadonlyArray:[`element`],JsdocTypeAssertsPlain:[`element`],JsdocTypeConditional:[`checksType`,`extendsType`,`trueType`,`falseType`],JsdocTypeTypeParameter:[`name`,`constraint`,`defaultValue`]};function nt(e,t,n,r,i){r?.(e,t,n);let a=tt[e.type];for(let t of a){let n=e[t];if(n!==void 0)if(Array.isArray(n))for(let a of n)nt(a,e,t,r,i);else nt(n,e,t,r,i)}i?.(e,t,n)}function rt(e,t,n){nt(e,void 0,void 0,t,n)}e.catharsisTransform=Je,e.identityTransformRules=et,e.jtpTransform=$e,e.parse=Re,e.stringify=Ge,e.stringifyRules=Ue,e.transform=Be,e.traverse=rt,e.tryParse=ze,e.visitorKeys=tt}))}}),{UnknownArgTypesError:Et}=__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__,Dt=e=>e.name===`literal`,Ot=e=>e.value.replace(/['|"]/g,``),kt=e=>{switch(e.type){case`function`:return{name:`function`};case`object`:let t={};return e.signature.properties.forEach(e=>{t[e.key]=At(e.value)}),{name:`object`,value:t};default:throw new Et({type:e,language:`Flow`})}},At=e=>{let{name:t,raw:n}=e,r={};switch(typeof n<`u`&&(r.raw=n),e.name){case`literal`:return{...r,name:`other`,value:e.value};case`string`:case`number`:case`symbol`:case`boolean`:return{...r,name:t};case`Array`:return{...r,name:`array`,value:e.elements.map(At)};case`signature`:return{...r,...kt(e)};case`union`:return e.elements?.every(Dt)?{...r,name:`enum`,value:e.elements?.map(Ot)}:{...r,name:t,value:e.elements?.map(At)};case`intersection`:return{...r,name:t,value:e.elements?.map(At)};default:return{...r,name:`other`,value:t}}},jt=/^['"]|['"]$/g,Mt=e=>e.replace(jt,``),Nt=e=>jt.test(e),Pt=e=>{let t=Mt(e);return Nt(e)||Number.isNaN(Number(t))?t:Number(t)},Ft=/^\(.*\) => /,It=e=>{let{name:t,raw:n,computed:r,value:i}=e,a={};switch(typeof n<`u`&&(a.raw=n),t){case`enum`:{let e=r?i:i.map(e=>Pt(e.value));return{...a,name:t,value:e}}case`string`:case`number`:case`symbol`:return{...a,name:t};case`func`:return{...a,name:`function`};case`bool`:case`boolean`:return{...a,name:`boolean`};case`arrayOf`:case`array`:return{...a,name:`array`,value:i&&It(i)};case`object`:return{...a,name:t};case`objectOf`:return{...a,name:t,value:It(i)};case`shape`:case`exact`:let e=ye(i,e=>It(e));return{...a,name:`object`,value:e};case`union`:return{...a,name:`union`,value:i.map(e=>It(e))};default:{if(t?.indexOf(`|`)>0)try{let e=t.split(`|`).map(e=>JSON.parse(e));return{...a,name:`enum`,value:e}}catch{}let e=i?`${t}(${i})`:t,n=Ft.test(t)?`function`:`other`;return{...a,name:n,value:e}}}},{UnknownArgTypesError:Lt}=__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__,Rt=e=>e.name===`literal`,zt=e=>e.name===`undefined`,Bt=e=>{switch(e.type){case`function`:return{name:`function`};case`object`:let t={};return e.signature.properties.forEach(e=>{t[e.key]=Vt(e.value)}),{name:`object`,value:t};default:throw new Lt({type:e,language:`Typescript`})}},Vt=e=>{let{name:t,raw:n}=e,r={};switch(typeof n<`u`&&(r.raw=n),e.name){case`string`:case`number`:case`symbol`:case`boolean`:return{...r,name:t};case`Array`:return{...r,name:`array`,value:e.elements.map(Vt)};case`signature`:return{...r,...Bt(e)};case`union`:{let n=e.elements.filter(e=>!zt(e));if(n.length>0&&n.every(Rt)){let e=n.filter(Rt);return{...r,name:`enum`,value:e.map(e=>Pt(e.value))}}return{...r,name:t,value:e.elements.map(Vt)}}case`intersection`:return{...r,name:t,value:e.elements.map(Vt)};default:return{...r,name:`other`,value:t}}},Ht=e=>{let{type:t,tsType:n,flowType:r}=e;try{if(t!=null)return It(t);if(n!=null)return Vt(n);if(r!=null)return At(r)}catch(e){console.error(e)}return null},Ut=(e=>(e.JAVASCRIPT=`JavaScript`,e.FLOW=`Flow`,e.TYPESCRIPT=`TypeScript`,e.UNKNOWN=`Unknown`,e))(Ut||{}),Wt=[`null`,`undefined`],Gt=e=>{if(!e)return``;if(typeof e==`string`)return e;throw Error(`Description: expected string, got: ${JSON.stringify(e)}`)},(function(e){e.start=`/**`,e.nostart=`/***`,e.delim=`*`,e.end=`*/`})(Kt=Kt||={}),qt=/^@\S+/,Jt=e=>e.trim(),Yt=e=>e&&e.startsWith(`"`)&&e.endsWith(`"`),Xt=(e,{tokens:t},n)=>t.type===``?e:n,Zt=({tokens:e})=>(e.delimiter===``?e.start:e.postDelimiter.slice(1))+e.description,Qt=a(Tt(),1),$t={tags:[`param`,`arg`,`argument`,`returns`,`ignore`,`deprecated`]},en=(e,t=$t)=>{if(!Je(e))return{includesJsDoc:!1,ignore:!1};let n=Ye(e),r=Xe(n,t.tags);return r.ignore?{includesJsDoc:!0,ignore:!0}:{includesJsDoc:!0,ignore:!1,description:n.description.trim(),extractedTags:r}},tn=(0,Qt.stringifyRules)(),nn=tn.JsdocTypeObject,tn.JsdocTypeAny=()=>`any`,tn.JsdocTypeObject=(e,t)=>`(${nn(e,t)})`,tn.JsdocTypeOptional=(e,t)=>t(e.element),tn.JsdocTypeNullable=(e,t)=>t(e.element),tn.JsdocTypeNotNullable=(e,t)=>t(e.element),tn.JsdocTypeUnion=(e,t)=>e.elements.map(t).join(`|`),rn=(e,t)=>{let{flowType:n,description:r,required:i,defaultValue:a}=t;return{name:e,type:mt(n),required:i,description:r,defaultValue:st(a??null,n??null)}},an=(e,t)=>{let{description:n,required:r}=t;return{name:e,type:gt(t),required:r,description:n,defaultValue:ht(t)}},on=(e,t,n)=>{let r=xt(e,t.type,t);return r.sbType=Ht(t),St(r,n)},sn=(e,t,n)=>{let r=an(e,t);return r.sbType=Ht(t),St(r,n)},cn=(e,t,n)=>{let r=rn(e,t);return r.sbType=Ht(t),St(r,n)},ln=(e,t,n)=>St(xt(e,{name:`unknown`},t),n),un=e=>{switch(e){case`JavaScript`:return on;case`TypeScript`:return sn;case`Flow`:return cn;default:return ln}},dn=e=>e.type==null?e.flowType==null?e.tsType==null?`Unknown`:`TypeScript`:`Flow`:`JavaScript`,fn=e=>{let t=dn(e[0]),n=un(t);return e.map(e=>{let r=e;return e.type?.elements&&(r={...e,type:{...e.type,value:e.type.elements}}),Ct(r.name,r,t,n)})},pn=e=>{let t=Object.keys(e),n=dn(e[t[0]]),r=un(n);return t.map(t=>{let i=e[t];return i==null?null:Ct(t,i,n,r)}).filter(Boolean)},mn=(e,t)=>{let n=ke(e,t);return Oe(n)?Array.isArray(n)?fn(n):pn(n):[]},hn=(...e)=>{let t={},n=e.filter(Boolean),r=n.reduce((e,n)=>(Object.entries(n).forEach(([n,r])=>{let i=e[n];Array.isArray(r)||typeof i>`u`?e[n]=r:x(r)&&x(i)?t[n]=!0:typeof r<`u`&&(e[n]=r)}),e),{});return Object.keys(t).forEach(e=>{let t=n.filter(Boolean).map(t=>t[e]).filter(e=>typeof e<`u`);t.every(e=>x(e))?r[e]=hn(...t):r[e]=t[t.length-1]}),r},gn=e=>{let{component:t,argTypes:n,parameters:{docs:r={}}}=e,{extractArgTypes:i}=r;if(!i||!t)return n;let a=i(t);return a?hn(a,n):n},_n=`storybook/docs`,`${_n}`,vn=`${_n}/snippet-rendered`,yn=(e=>(e.AUTO=`auto`,e.CODE=`code`,e.DYNAMIC=`dynamic`,e))(yn||{})}));function xn(){}var Sn=e((()=>{}));function Cn(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function wn(e,t,n){return Tn(e,t,void 0,void 0,void 0,void 0,n)}function Tn(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return En(e,t,a,o)}return En(e,t,a,o)}function En(e,t,n,r){if(Object.is(e,t))return!0;let i=T(e),a=T(t);if(i===`[object Arguments]`&&(i=`[object Object]`),a===`[object Arguments]`&&(a=`[object Object]`),i!==a)return!1;switch(i){case D:return e.toString()===t.toString();case O:return Cn(e.valueOf(),t.valueOf());case k:case ee:case A:return Object.is(e.valueOf(),t.valueOf());case E:return e.source===t.source&&e.flags===t.flags;case re:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case te:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!Tn(a,t.get(i),i,e,t,n,r))return!1;return!0;case j:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>Tn(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case ne:case se:case ce:case le:case ue:case de:case fe:case pe:case me:case he:case ge:case _e:if(typeof Buffer<`u`&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!Tn(e[i],t[i],i,e,t,n,r))return!1;return!0;case ie:return e.byteLength===t.byteLength?En(new Uint8Array(e),new Uint8Array(t),n,r):!1;case M:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:En(new Uint8Array(e),new Uint8Array(t),n,r);case oe:return e.name===t.name&&e.message===t.message;case ae:{if(!(En(e.constructor,t.constructor,n,r)||x(e)&&x(t)))return!1;let i=[...Object.keys(e),...w(e)],a=[...Object.keys(t),...w(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!Tn(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function Dn(e,t){return wn(e,t,xn)}var On=e((()=>{Sn(),ve()})),kn=e((()=>{})),An,jn,Mn,Nn,Pn,Fn,In=e((()=>{An=`storybook/highlight`,jn=`${An}/add`,Mn=`${An}/remove`,Nn=`${An}/reset`,Pn=`${An}/scroll-into-view`,Fn=2147483647})),Ln,Rn,zn=e((()=>{Ln=`storybook/actions`,`${Ln}`,Rn=`${Ln}/action-event`,`${Ln}`}));function Bn(e,t={}){let n={...Vn,...t},r=function(...r){if(t.implicit){let t=(`__STORYBOOK_PREVIEW__`in Un?Un.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find(e=>e.phase===`playing`||e.phase===`rendering`);if(t){let n=!globalThis?.FEATURES?.disallowImplicitActionsInRenderV8,r=new Hn({phase:t.phase,name:e,deprecated:n});if(n)console.warn(r);else throw r}}let i=Wn.getChannel(),a=Date.now().toString(36)+Math.random().toString(36).substring(2),o=r.map(qn),s={id:a,count:0,data:{name:e,args:r.length>1?o:o[0]},options:{...n,maxDepth:5+(n.depth||3)}};i.emit(Rn,s)};return r.isAction=!0,r.implicit=t.implicit,r}var Vn,Hn,Un,Wn,Gn,Kn,qn,Jn=e((()=>{zn(),Vn={depth:10,clearOnStoryChange:!0,limit:50},{ImplicitActionsDuringRendering:Hn}=__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__,{global:Un}=__STORYBOOK_MODULE_GLOBAL__,{addons:Wn}=__STORYBOOK_MODULE_PREVIEW_API__,Gn=(e,t)=>{let n=Object.getPrototypeOf(e);return!n||t(n)?n:Gn(n,t)},Kn=e=>!!(typeof e==`object`&&e&&Gn(e,e=>/^Synthetic(?:Base)?Event$/.test(e.constructor.name))&&typeof e.persist==`function`),qn=e=>{if(Kn(e)){let t=Object.create(e.constructor.prototype,Object.getOwnPropertyDescriptors(e));t.persist();let n=Object.getOwnPropertyDescriptor(t,`view`),r=n?.value;return typeof r==`object`&&r?.constructor.name===`Window`&&Object.defineProperty(t,`view`,{...n,value:Object.create(r.constructor.prototype)}),t}return e}})),Yn,Xn=e((()=>{Yn=`storybook/viewport`,`${Yn}`,`${Yn}`})),R,Zn=e((()=>{R={CALL:`storybook/instrumenter/call`,SYNC:`storybook/instrumenter/sync`,START:`storybook/instrumenter/start`,BACK:`storybook/instrumenter/back`,GOTO:`storybook/instrumenter/goto`,NEXT:`storybook/instrumenter/next`,END:`storybook/instrumenter/end`}}));function Qn(e){return String(e)}function $n(e=!1){let t=typeof process<`u`?process:void 0,n=t?.env||{},r=t?.argv||[];return!(`NO_COLOR`in n||r.includes(`--no-color`))&&(`FORCE_COLOR`in n||r.includes(`--color`)||t?.platform===`win32`||e&&n.TERM!==`dumb`||`CI`in n)||typeof window<`u`&&!!window.chrome}function er(e=!1){let t=$n(e),n=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},r=(e,t,r=e)=>{let i=i=>{let a=String(i),o=a.indexOf(t,e.length);return~o?e+n(a,t,r,o)+t:e+a+t};return i.open=e,i.close=t,i},i={isColorSupported:t},a=e=>`\x1B[${e}m`;for(let[e,n]of Ka)i[e]=t?r(a(n[0]),a(n[1]),n[2]):Qn;return i}function tr(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!==`default`&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function nr(e,t){let n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let t of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,t).enumerable&&r.push(t);return r}function rr(e,t,n,r,i,a,o=`: `){let s=``,c=0,l=e.next();if(!l.done){s+=t.spacingOuter;let u=n+t.indent;for(;!l.done;){if(s+=u,c++===t.maxWidth){s+=`…`;break}let n=a(l.value[0],t,u,r,i),d=a(l.value[1],t,u,r,i);s+=n+o+d,l=e.next(),l.done?t.min||(s+=`,`):s+=`,${t.spacingInner}`}s+=t.spacingOuter+n}return s}function ir(e,t,n,r,i,a){let o=``,s=0,c=e.next();if(!c.done){o+=t.spacingOuter;let l=n+t.indent;for(;!c.done;){if(o+=l,s++===t.maxWidth){o+=`…`;break}o+=a(c.value,t,l,r,i),c=e.next(),c.done?t.min||(o+=`,`):o+=`,${t.spacingInner}`}o+=t.spacingOuter+n}return o}function ar(e,t,n,r,i,a){let o=``;e=e instanceof ArrayBuffer?new DataView(e):e;let s=e=>e instanceof DataView,c=s(e)?e.byteLength:e.length;if(c>0){o+=t.spacingOuter;let l=n+t.indent;for(let n=0;n<c;n++){if(o+=l,n===t.maxWidth){o+=`…`;break}(s(e)||n in e)&&(o+=a(s(e)?e.getInt8(n):e[n],t,l,r,i)),n<c-1?o+=`,${t.spacingInner}`:t.min||(o+=`,`)}o+=t.spacingOuter+n}return o}function or(e,t,n,r,i,a){let o=``,s=nr(e,t.compareKeys);if(s.length>0){o+=t.spacingOuter;let c=n+t.indent;for(let n=0;n<s.length;n++){let l=s[n],u=a(l,t,c,r,i),d=a(e[l],t,c,r,i);o+=`${c+u}: ${d}`,n<s.length-1?o+=`,${t.spacingInner}`:t.min||(o+=`,`)}o+=t.spacingOuter+n}return o}function sr(e){return $a.has(e)||eo.test(e)}function cr(e){return e.constructor.name===`NamedNodeMap`}function lr(e){return e.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}function ur(e,t,n,r,i,a,o){let s=r+n.indent,c=n.colors;return e.map(e=>{let l=t[e],u=o(l,n,s,i,a);return typeof l!=`string`&&(u.includes(`
|
|
`)&&(u=n.spacingOuter+s+u+n.spacingOuter+r),u=`{${u}}`),`${n.spacingInner+r+c.prop.open+e+c.prop.close}=${c.value.open}${u}${c.value.close}`}).join(``)}function dr(e,t,n,r,i,a){return e.map(e=>t.spacingOuter+n+(typeof e==`string`?fr(e,t):a(e,t,n,r,i))).join(``)}function fr(e,t){let n=t.colors.content;return n.open+lr(e)+n.close}function pr(e,t){let n=t.colors.comment;return`${n.open}<!--${lr(e)}-->${n.close}`}function mr(e,t,n,r,i){let a=r.colors.tag;return`${a.open}<${e}${t&&a.close+t+r.spacingOuter+i+a.open}${n?`>${a.close}${n}${r.spacingOuter}${i}${a.open}</${e}`:`${t&&!r.min?``:` `}/`}>${a.close}`}function hr(e,t){let n=t.colors.tag;return`${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}function gr(e){try{return typeof e.hasAttribute==`function`&&e.hasAttribute(`is`)}catch{return!1}}function _r(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,i=typeof r==`string`&&r.includes(`-`)||gr(e);return n===io&&(co.test(t)||i)||n===ao&&t===`Text`||n===oo&&t===`Comment`||n===so&&t===`DocumentFragment`}function vr(e){return e.nodeType===ao}function yr(e){return e.nodeType===oo}function br(e){return e.nodeType===so}function xr(e,t,n,r,i,a,o){return++r>t.maxDepth?Co(So(o)):`${So(o)+wo}{${rr(e.entries(),t,n,r,i,a)}}`}function Sr(e){let t=0;return{next(){if(t<e._keys.length){let n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}function Cr(e,t,n,r,i,a){let o=So(e._name||`Record`);return++r>t.maxDepth?Co(o):`${o+wo}{${rr(Sr(e),t,n,r,i,a)}}`}function wr(e,t,n,r,i,a){let o=So(`Seq`);return++r>t.maxDepth?Co(o):e[ho]?`${o+wo}{${e._iter||e._object?rr(e.entries(),t,n,r,i,a):To}}`:`${o+wo}[${e._iter||e._array||e._collection||e._iterable?ir(e.values(),t,n,r,i,a):To}]`}function Tr(e,t,n,r,i,a,o){return++r>t.maxDepth?Co(So(o)):`${So(o)+wo}[${ir(e.values(),t,n,r,i,a)}]`}function Er(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function Dr(){if(Ao)return U;Ao=1;var e=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),n=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),i=Symbol.for(`react.profiler`),a=Symbol.for(`react.consumer`),o=Symbol.for(`react.context`),s=Symbol.for(`react.forward_ref`),c=Symbol.for(`react.suspense`),l=Symbol.for(`react.suspense_list`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.view_transition`),p=Symbol.for(`react.client.reference`);function m(p){if(typeof p==`object`&&p){var m=p.$$typeof;switch(m){case e:switch(p=p.type,p){case n:case i:case r:case c:case l:case f:return p;default:switch(p&&=p.$$typeof,p){case o:case s:case d:case u:return p;case a:return p;default:return m}}case t:return m}}}return U.ContextConsumer=a,U.ContextProvider=o,U.Element=e,U.ForwardRef=s,U.Fragment=n,U.Lazy=d,U.Memo=u,U.Portal=t,U.Profiler=i,U.StrictMode=r,U.Suspense=c,U.SuspenseList=l,U.isContextConsumer=function(e){return m(e)===a},U.isContextProvider=function(e){return m(e)===o},U.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},U.isForwardRef=function(e){return m(e)===s},U.isFragment=function(e){return m(e)===n},U.isLazy=function(e){return m(e)===d},U.isMemo=function(e){return m(e)===u},U.isPortal=function(e){return m(e)===t},U.isProfiler=function(e){return m(e)===i},U.isStrictMode=function(e){return m(e)===r},U.isSuspense=function(e){return m(e)===c},U.isSuspenseList=function(e){return m(e)===l},U.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===n||e===i||e===r||e===c||e===l||typeof e==`object`&&!!e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===o||e.$$typeof===a||e.$$typeof===s||e.$$typeof===p||e.getModuleId!==void 0)},U.typeOf=m,U}function Or(){return jo||(jo=1,ko.exports=Dr()),ko.exports}function kr(){if(Fo)return W;Fo=1;var e=Symbol.for(`react.element`),t=Symbol.for(`react.portal`),n=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),i=Symbol.for(`react.profiler`),a=Symbol.for(`react.provider`),o=Symbol.for(`react.context`),s=Symbol.for(`react.server_context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.suspense_list`),d=Symbol.for(`react.memo`),f=Symbol.for(`react.lazy`),p=Symbol.for(`react.offscreen`),m=Symbol.for(`react.module.reference`);function h(p){if(typeof p==`object`&&p){var m=p.$$typeof;switch(m){case e:switch(p=p.type,p){case n:case i:case r:case l:case u:return p;default:switch(p&&=p.$$typeof,p){case s:case o:case c:case f:case d:case a:return p;default:return m}}case t:return m}}}return W.ContextConsumer=o,W.ContextProvider=a,W.Element=e,W.ForwardRef=c,W.Fragment=n,W.Lazy=f,W.Memo=d,W.Portal=t,W.Profiler=i,W.StrictMode=r,W.Suspense=l,W.SuspenseList=u,W.isAsyncMode=function(){return!1},W.isConcurrentMode=function(){return!1},W.isContextConsumer=function(e){return h(e)===o},W.isContextProvider=function(e){return h(e)===a},W.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},W.isForwardRef=function(e){return h(e)===c},W.isFragment=function(e){return h(e)===n},W.isLazy=function(e){return h(e)===f},W.isMemo=function(e){return h(e)===d},W.isPortal=function(e){return h(e)===t},W.isProfiler=function(e){return h(e)===i},W.isStrictMode=function(e){return h(e)===r},W.isSuspense=function(e){return h(e)===l},W.isSuspenseList=function(e){return h(e)===u},W.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===n||e===i||e===r||e===l||e===u||e===p||typeof e==`object`&&!!e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===a||e.$$typeof===o||e.$$typeof===c||e.$$typeof===m||e.getModuleId!==void 0)},W.typeOf=h,W}function Ar(){return Io||(Io=1,Po.exports=kr()),Po.exports}function jr(e,t=[]){if(Array.isArray(e))for(let n of e)jr(n,t);else e!=null&&e!==!1&&e!==``&&t.push(e);return t}function Mr(e){let t=e.type;if(typeof t==`string`)return t;if(typeof t==`function`)return t.displayName||t.name||`Unknown`;if(zo.isFragment(e))return`React.Fragment`;if(zo.isSuspense(e))return`React.Suspense`;if(typeof t==`object`&&t){if(zo.isContextProvider(e))return`Context.Provider`;if(zo.isContextConsumer(e))return`Context.Consumer`;if(zo.isForwardRef(e)){if(t.displayName)return t.displayName;let e=t.render.displayName||t.render.name||``;return e===``?`ForwardRef`:`ForwardRef(${e})`}if(zo.isMemo(e)){let e=t.displayName||t.type.displayName||t.type.name||``;return e===``?`Memo`:`Memo(${e})`}}return`UNDEFINED`}function Nr(e){let{props:t}=e;return Object.keys(t).filter(e=>e!==`children`&&t[e]!==void 0).sort()}function Pr(e){let{props:t}=e;return t?Object.keys(t).filter(e=>t[e]!==void 0).sort():[]}function Fr(e){return typeof e.constructor==`function`&&e.constructor.name||`Object`}function Ir(e){return typeof window<`u`&&e===window}function Lr(e){return e===`[object Array]`||e===`[object ArrayBuffer]`||e===`[object DataView]`||e===`[object Float32Array]`||e===`[object Float64Array]`||e===`[object Int8Array]`||e===`[object Int16Array]`||e===`[object Int32Array]`||e===`[object Uint8Array]`||e===`[object Uint8ClampedArray]`||e===`[object Uint16Array]`||e===`[object Uint32Array]`}function Rr(e){return Object.is(e,-0)?`-0`:String(e)}function zr(e){return`${e}n`}function Br(e,t){return t?`[Function ${e.name||`anonymous`}]`:`[Function]`}function Vr(e){return String(e).replace(Zo,`Symbol($1)`)}function Hr(e){return`[${Yo.call(e)}]`}function Ur(e,t,n,r){if(e===!0||e===!1)return`${e}`;if(e===void 0)return`undefined`;if(e===null)return`null`;let i=typeof e;if(i===`number`)return Rr(e);if(i===`bigint`)return zr(e);if(i===`string`)return r?`"${e.replaceAll(/"|\\/g,`\\$&`)}"`:`"${e}"`;if(i===`function`)return Br(e,t);if(i===`symbol`)return Vr(e);let a=qo.call(e);return a===`[object WeakMap]`?`WeakMap {}`:a===`[object WeakSet]`?`WeakSet {}`:a===`[object Function]`||a===`[object GeneratorFunction]`?Br(e,t):a===`[object Symbol]`?Vr(e):a===`[object Date]`?Number.isNaN(+e)?`Date { NaN }`:Jo.call(e):a===`[object Error]`?Hr(e):a===`[object RegExp]`?n?Xo.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,`\\$&`):Xo.call(e):e instanceof Error?Hr(e):null}function Wr(e,t,n,r,i,a){if(i.includes(e))return`[Circular]`;i=[...i],i.push(e);let o=++r>t.maxDepth,s=t.min;if(t.callToJSON&&!o&&e.toJSON&&typeof e.toJSON==`function`&&!a)return Jr(e.toJSON(),t,n,r,i,!0);let c=qo.call(e);return c===`[object Arguments]`?o?`[Arguments]`:`${s?``:`Arguments `}[${ar(e,t,n,r,i,Jr)}]`:Lr(c)?o?`[${e.constructor.name}]`:`${s||!t.printBasicPrototype&&e.constructor.name===`Array`?``:`${e.constructor.name} `}[${ar(e,t,n,r,i,Jr)}]`:c===`[object Map]`?o?`[Map]`:`Map {${rr(e.entries(),t,n,r,i,Jr,` => `)}}`:c===`[object Set]`?o?`[Set]`:`Set {${ir(e.values(),t,n,r,i,Jr)}}`:o||Ir(e)?`[${Fr(e)}]`:`${s||!t.printBasicPrototype&&Fr(e)===`Object`?``:`${Fr(e)} `}{${or(e,t,n,r,i,Jr)}}`}function Gr(e){return e.serialize!=null}function Kr(e,t,n,r,i,a){let o;try{o=Gr(e)?e.serialize(t,n,r,i,a,Jr):e.print(t,e=>Jr(e,n,r,i,a),e=>{let t=r+n.indent;return t+e.replaceAll(Qo,`
|
|
${t}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(e){throw new $o(e.message,e.stack)}if(typeof o!=`string`)throw TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof o}".`);return o}function qr(e,t){for(let n of e)try{if(n.test(t))return n}catch(e){throw new $o(e.message,e.stack)}return null}function Jr(e,t,n,r,i,a){let o=qr(t.plugins,e);if(o!==null)return Kr(o,e,t,n,r,i);let s=Ur(e,t.printFunctionName,t.escapeRegex,t.escapeString);return s===null?Wr(e,t,n,r,i,a):s}function Yr(e){for(let t of Object.keys(e))if(!Object.prototype.hasOwnProperty.call(G,t))throw Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw Error(`pretty-format: Options "min" and "indent" cannot be used together.`)}function Xr(){return ns.reduce((e,t)=>{let n=ts[t],r=n&&H[n];if(r&&typeof r.close==`string`&&typeof r.open==`string`)e[t]=r;else throw Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);return e},Object.create(null))}function Zr(){return ns.reduce((e,t)=>(e[t]={close:``,open:``},e),Object.create(null))}function Qr(e){return e?.printFunctionName??G.printFunctionName}function $r(e){return e?.escapeRegex??G.escapeRegex}function ei(e){return e?.escapeString??G.escapeString}function ti(e){return{callToJSON:e?.callToJSON??G.callToJSON,colors:e?.highlight?Xr():Zr(),compareKeys:typeof e?.compareKeys==`function`||e?.compareKeys===null?e.compareKeys:G.compareKeys,escapeRegex:$r(e),escapeString:ei(e),indent:e?.min?``:ni(e?.indent??G.indent),maxDepth:e?.maxDepth??G.maxDepth,maxWidth:e?.maxWidth??G.maxWidth,min:e?.min??G.min,plugins:e?.plugins??G.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:Qr(e),spacingInner:e?.min?` `:`
|
|
`,spacingOuter:e?.min?``:`
|
|
`}}function ni(e){return Array.from({length:e+1}).join(` `)}function z(e,t){if(t&&(Yr(t),t.plugins)){let n=qr(t.plugins,e);if(n!==null)return Kr(n,e,ti(t),``,0,[])}let n=Ur(e,Qr(t),$r(t),ei(t));return n===null?Wr(e,ti(t),``,0,[]):n}function ri(e,t){let n=is[as[t]]||is[t]||``;return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}function ii({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:a=1/0,breakLength:o=1/0,seen:s=[],truncate:c=1/0,stylize:l=String}={},u){let d={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(a),breakLength:Number(o),truncate:Number(c),seen:s,inspect:u,stylize:l};return d.colors&&(d.stylize=ri),d}function ai(e){return e>=`\ud800`&&e<=`\udbff`}function oi(e,t,n=os){e=String(e);let r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let i=t-r;return i>0&&ai(e[i-1])&&--i,`${e.slice(0,i)}${n}`}return e}function B(e,t,n,r=`, `){n||=t.inspect;let i=e.length;if(i===0)return``;let a=t.truncate,o=``,s=``,c=``;for(let l=0;l<i;l+=1){let i=l+1===e.length,u=l+2===e.length;c=`${os}(${e.length-l})`;let d=e[l];t.truncate=a-o.length-(i?0:r.length);let f=s||n(d,t)+(i?``:r),p=o.length+f.length,m=p+c.length;if(i&&p>a&&o.length+c.length<=a||!i&&!u&&m>a||(s=i?``:n(e[l+1],t)+(u?``:r),!i&&u&&m>a&&p+s.length>a))break;if(o+=f,!i&&!u&&p+s.length>=a){c=`${os}(${e.length-l-1})`;break}c=``}return`${o}${c}`}function si(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`)}function ci([e,t],n){return n.truncate-=2,typeof e==`string`?e=si(e):typeof e!=`number`&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}function li(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return`[]`;t.truncate-=4;let r=B(e,t);t.truncate-=r.length;let i=``;return n.length&&(i=B(n.map(t=>[t,e[t]]),t,ci)),`[ ${r}${i?`, ${i}`:``} ]`}function V(e,t){let n=ss(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let i=``;for(let n=0;n<e.length;n++){let r=`${t.stylize(oi(e[n],t.truncate),`number`)}${n===e.length-1?``:`, `}`;if(t.truncate-=r.length,e[n]!==e.length&&t.truncate<=3){i+=`${os}(${e.length-e[n]+1})`;break}i+=r}let a=``;return r.length&&(a=B(r.map(t=>[t,e[t]]),t,ci)),`${n}[ ${i}${a?`, ${a}`:``} ]`}function ui(e,t){let n=e.toJSON();if(n===null)return`Invalid Date`;let r=n.split(`T`),i=r[0];return t.stylize(`${i}T${oi(r[1],t.truncate-i.length-1)}`,`date`)}function di(e,t){let n=e[Symbol.toStringTag]||`Function`,r=e.name;return r?t.stylize(`[${n} ${oi(r,t.truncate-11)}]`,`special`):t.stylize(`[${n}]`,`special`)}function fi([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}function pi(e){let t=[];return e.forEach((e,n)=>{t.push([n,e])}),t}function mi(e,t){return e.size===0?`Map{}`:(t.truncate-=7,`Map{ ${B(pi(e),t,fi)} }`)}function hi(e,t){return cs(e)?t.stylize(`NaN`,`number`):e===1/0?t.stylize(`Infinity`,`number`):e===-1/0?t.stylize(`-Infinity`,`number`):e===0?t.stylize(1/e==1/0?`+0`:`-0`,`number`):t.stylize(oi(String(e),t.truncate),`number`)}function gi(e,t){let n=oi(e.toString(),t.truncate-1);return n!==os&&(n+=`n`),t.stylize(n,`bigint`)}function _i(e,t){let n=e.toString().split(`/`)[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${oi(i,r)}/${n}`,`regexp`)}function vi(e){let t=[];return e.forEach(e=>{t.push(e)}),t}function yi(e,t){return e.size===0?`Set{}`:(t.truncate-=7,`Set{ ${B(vi(e),t)} }`)}function bi(e){return us[e]||`\\u${`0000${e.charCodeAt(0).toString(ds)}`.slice(-fs)}`}function xi(e,t){return ls.test(e)&&(e=e.replace(ls,bi)),t.stylize(`'${oi(e,t.truncate-2)}'`,`string`)}function Si(e){return`description`in Symbol.prototype?e.description?`Symbol(${e.description})`:`Symbol()`:e.toString()}function Ci(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return`{}`;if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let i=B(n.map(t=>[t,e[t]]),t,ci),a=B(r.map(t=>[t,e[t]]),t,ci);t.seen.pop();let o=``;return i&&a&&(o=`, `),`{ ${i}${o}${a} }`}function wi(e,t){let n=``;return hs&&hs in e&&(n=e[hs]),n||=e.constructor.name,(!n||n===`_class`)&&(n=`<Anonymous Class>`),t.truncate-=n.length,`${n}${Ci(e,t)}`}function Ti(e,t){return e.length===0?`Arguments[]`:(t.truncate-=13,`Arguments[ ${B(e,t)} ]`)}function Ei(e,t){let n=Object.getOwnPropertyNames(e).filter(e=>gs.indexOf(e)===-1),r=e.name;t.truncate-=r.length;let i=``;if(typeof e.message==`string`?i=oi(e.message,t.truncate):n.unshift(`message`),i=i?`: ${i}`:``,t.truncate-=i.length+5,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let a=B(n.map(t=>[t,e[t]]),t,ci);return`${r}${i}${a?` { ${a} }`:``}`}function Di([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),`yellow`)}=${n.stylize(`"${t}"`,`string`)}`:`${n.stylize(String(e),`yellow`)}`}function Oi(e,t){return B(e,t,ki,`
|
|
`)}function ki(e,t){switch(e.nodeType){case 1:return Ai(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function Ai(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,`special`),a=t.stylize(`>`,`special`),o=t.stylize(`</${r}>`,`special`);t.truncate-=r.length*2+5;let s=``;n.length>0&&(s+=` `,s+=B(n.map(t=>[t,e.getAttribute(t)]),t,Di,` `)),t.truncate-=s.length;let c=t.truncate,l=Oi(e.children,t);return l&&l.length>c&&(l=`${os}(${e.children.length})`),`${i}${s}${a}${l}${o}`}function ji(e,t={}){let n=ii(t,ji),{customInspect:r}=n,i=e===null?`null`:typeof e;if(i===`object`&&(i=Cs.call(e).slice(8,-1)),i in xs)return xs[i](e,n);if(r&&e){let t=Ss(e,n,i);if(t)return typeof t==`string`?t:ji(t,n)}let a=e?Object.getPrototypeOf(e):!1;return a===Object.prototype||a===null?Ci(e,n):e&&typeof HTMLElement==`function`&&e instanceof HTMLElement?Ai(e,n):`constructor`in e?e.constructor===Object?Ci(e,n):wi(e,n):e===Object(e)?Ci(e,n):n.stylize(String(e),i)}function Mi(e,t=10,{maxLength:n,...r}={}){let i=n??1e4,a;try{a=z(e,{maxDepth:t,escapeString:!1,plugins:As,...r})}catch{a=z(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:As,...r})}return a.length>=i&&t>1?Mi(e,Math.floor(Math.min(t,2**53-1)/2),{maxLength:n,...r}):a}function Ni(...e){if(typeof e[0]!=`string`){let t=[];for(let n=0;n<e.length;n++)t.push(Pi(e[n],{depth:0,colors:!1}));return t.join(` `)}let t=e.length,n=1,r=e[0],i=String(r).replace(js,r=>{if(r===`%%`)return`%`;if(n>=t)return r;switch(r){case`%s`:{let t=e[n++];return typeof t==`bigint`?`${t.toString()}n`:typeof t==`number`&&t===0&&1/t<0?`-0`:typeof t==`object`&&t?typeof t.toString==`function`&&t.toString!==Object.prototype.toString?t.toString():Pi(t,{depth:0,colors:!1}):String(t)}case`%d`:{let t=e[n++];return typeof t==`bigint`?`${t.toString()}n`:Number(t).toString()}case`%i`:{let t=e[n++];return typeof t==`bigint`?`${t.toString()}n`:Number.parseInt(String(t)).toString()}case`%f`:return Number.parseFloat(String(e[n++])).toString();case`%o`:return Pi(e[n++],{showHidden:!0,showProxy:!0});case`%O`:return Pi(e[n++]);case`%c`:return n++,``;case`%j`:try{return JSON.stringify(e[n++])}catch(e){let t=e.message;if(t.includes(`circular structure`)||t.includes(`cyclic structures`)||t.includes(`cyclic object`))return`[Circular]`;throw e}default:return r}});for(let r=e[n];n<t;r=e[++n])typeof r!=`object`||!r?i+=` ${r}`:i+=` ${Pi(r)}`;return i}function Pi(e,t={}){return t.truncate===0&&(t.truncate=1/0),ji(e,t)}function Fi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function Ii(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function Li(e){return Object.prototype.toString.apply(e).slice(8,-1)}function Ri(e,t){let n=typeof t==`function`?t:e=>t.add(e);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function zi(e){let t=new Set;return Ii(e)?[]:(Ri(e,t),Array.from(t))}function Bi(e,t=Ms){return Vi(e,new WeakMap,t)}function Vi(e,t,n=Ms){let r,i;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(i=Array.from({length:r=e.length}),t.set(e,i);r--;)i[r]=Vi(e[r],t,n);return i}if(Object.prototype.toString.call(e)===`[object Object]`){i=Object.create(Object.getPrototypeOf(e)),t.set(e,i);let r=zi(e);for(let a of r){let r=Object.getOwnPropertyDescriptor(e,a);if(!r)continue;let o=Vi(e[a],t,n);n.forceWritable?Object.defineProperty(i,a,{enumerable:r.enumerable,configurable:!0,writable:!0,value:o}):`get`in r?Object.defineProperty(i,a,{...r,get(){return o}}):Object.defineProperty(i,a,{...r,value:o})}return i}return e}function Hi(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),i=r,a=0;for(;n<i;)e.substring(a,i)===t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i}function Ui(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),i=r,a=0;for(;n<i;)e.substring(e.length-i,e.length-a)===t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i}function Wi(e,t){let n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));let i=Math.min(n,r);if(e===t)return i;let a=0,o=1;for(;;){let n=e.substring(i-o),r=t.indexOf(n);if(r===-1)return a;o+=r,(r===0||e.substring(i-o)===t.substring(0,o))&&(a=o,o++)}}function Gi(e){let t=!1,n=[],r=0,i=null,a=0,o=0,s=0,c=0,l=0;for(;a<e.length;)e[a][0]===J?(n[r++]=a,o=c,s=l,c=0,l=0,i=e[a][1]):(e[a][0]===q?c+=e[a][1].length:l+=e[a][1].length,i&&i.length<=Math.max(o,s)&&i.length<=Math.max(c,l)&&(e.splice(n[r-1],0,new Y(K,i)),e[n[r-1]+1][0]=q,r--,r--,a=r>0?n[r-1]:-1,o=0,s=0,c=0,l=0,i=null,t=!0)),a++;for(t&&qi(e),Ki(e),a=1;a<e.length;){if(e[a-1][0]===K&&e[a][0]===q){let t=e[a-1][1],n=e[a][1],r=Wi(t,n),i=Wi(n,t);r>=i?(r>=t.length/2||r>=n.length/2)&&(e.splice(a,0,new Y(J,n.substring(0,r))),e[a-1][1]=t.substring(0,t.length-r),e[a+1][1]=n.substring(r),a++):(i>=t.length/2||i>=n.length/2)&&(e.splice(a,0,new Y(J,t.substring(0,i))),e[a-1][0]=q,e[a-1][1]=n.substring(0,n.length-i),e[a+1][0]=K,e[a+1][1]=t.substring(i),a++),a++}a++}}function Ki(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===J&&e[t+1][0]===J){let n=e[t-1][1],r=e[t][1],i=e[t+1][1],a=Ui(n,r);if(a){let e=r.substring(r.length-a);n=n.substring(0,n.length-a),r=e+r.substring(0,r.length-a),i=e+i}let o=n,s=r,c=i,l=Ji(n,r)+Ji(r,i);for(;r.charAt(0)===i.charAt(0);){n+=r.charAt(0),r=r.substring(1)+i.charAt(0),i=i.substring(1);let e=Ji(n,r)+Ji(r,i);e>=l&&(l=e,o=n,s=r,c=i)}e[t-1][1]!==o&&(o?e[t-1][1]=o:(e.splice(t-1,1),t--),e[t][1]=s,c?e[t+1][1]=c:(e.splice(t+1,1),t--))}t++}}function qi(e){e.push(new Y(J,``));let t=0,n=0,r=0,i=``,a=``,o;for(;t<e.length;)switch(e[t][0]){case q:r++,a+=e[t][1],t++;break;case K:n++,i+=e[t][1],t++;break;case J:n+r>1?(n!==0&&r!==0&&(o=Hi(a,i),o!==0&&(t-n-r>0&&e[t-n-r-1][0]===J?e[t-n-r-1][1]+=a.substring(0,o):(e.splice(0,0,new Y(J,a.substring(0,o))),t++),a=a.substring(o),i=i.substring(o)),o=Ui(a,i),o!==0&&(e[t][1]=a.substring(a.length-o)+e[t][1],a=a.substring(0,a.length-o),i=i.substring(0,i.length-o))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,new Y(K,i)),t++),a.length&&(e.splice(t,0,new Y(q,a)),t++),t++):t!==0&&e[t-1][0]===J?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i=``,a=``;break}e[e.length-1][1]===``&&e.pop();let s=!1;for(t=1;t<e.length-1;)e[t-1][0]===J&&e[t+1][0]===J&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),s=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),s=!0)),t++;s&&qi(e)}function Ji(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(Ns),a=r.match(Ns),o=i&&n.match(Ps),s=a&&r.match(Ps),c=o&&n.match(Fs),l=s&&r.match(Fs),u=c&&e.match(Is),d=l&&t.match(Ls);return u||d?5:c||l?4:i&&!o&&s?3:o||s?2:i||a?1:0}function Yi(){if(Vs)return Bs;Vs=1,Object.defineProperty(Bs,`__esModule`,{value:!0}),Bs.default=d;let e=`diff-sequences`,t=(e,t,n,r,i)=>{let a=0;for(;e<t&&n<r&&i(e,n);)e+=1,n+=1,a+=1;return a},n=(e,t,n,r,i)=>{let a=0;for(;e<=t&&n<=r&&i(t,r);)--t,--r,a+=1;return a},r=(e,n,r,i,a,o,s)=>{let c=0,l=-e,u=o[c],d=u;o[c]+=t(u+1,n,i+u-l+1,r,a);let f=e<s?e:s;for(c+=1,l+=2;c<=f;c+=1,l+=2){if(c!==e&&d<o[c])u=o[c];else if(u=d+1,n<=u)return c-1;d=o[c],o[c]=u+t(u+1,n,i+u-l+1,r,a)}return s},i=(e,t,r,i,a,o,s)=>{let c=0,l=e,u=o[c],d=u;o[c]-=n(t,u-1,r,i+u-l-1,a);let f=e<s?e:s;for(c+=1,l-=2;c<=f;c+=1,l-=2){if(c!==e&&o[c]<d)u=o[c];else if(u=d-1,u<t)return c-1;d=o[c],o[c]=u-n(t,u-1,r,i+u-l-1,a)}return s},a=(e,r,i,a,o,s,c,l,u,d,f)=>{let p=a-r,m=i-r,h=o-a-m,g=-h-(e-1),_=-h+(e-1),v=0,y=e<l?e:l;for(let l=0,m=-e;l<=y;l+=1,m+=2){let y=l===0||l!==e&&v<c[l],b=y?c[l]:v,x=y?b:b+1,S=p+x-m,C=t(x+1,i,S+1,o,s),w=x+C;if(v=c[l],c[l]=w,g<=m&&m<=_){let t=(e-1-(m+h))/2;if(t<=d&&u[t]-1<=w){let t=p+b-(y?m+1:m-1),c=n(r,b,a,t,s),l=b-c,u=t-c,d=l+1,h=u+1;f.nChangePreceding=e-1,e-1===d+h-r-a?(f.aEndPreceding=r,f.bEndPreceding=a):(f.aEndPreceding=d,f.bEndPreceding=h),f.nCommonPreceding=c,c!==0&&(f.aCommonPreceding=d,f.bCommonPreceding=h),f.nCommonFollowing=C,C!==0&&(f.aCommonFollowing=x+1,f.bCommonFollowing=S+1);let g=w+1,_=S+C+1;return f.nChangeFollowing=e-1,e-1===i+o-g-_?(f.aStartFollowing=i,f.bStartFollowing=o):(f.aStartFollowing=g,f.bStartFollowing=_),!0}}}return!1},o=(e,r,i,a,o,s,c,l,u,d,f)=>{let p=o-i,m=i-r,h=o-a-m,g=h-e,_=h+e,v=0,y=e<d?e:d;for(let d=0,m=e;d<=y;d+=1,m-=2){let y=d===0||d!==e&&u[d]<v,b=y?u[d]:v,x=y?b:b-1,S=p+x-m,C=n(r,x-1,a,S-1,s),w=x-C;if(v=u[d],u[d]=w,g<=m&&m<=_){let n=(e+(m-h))/2;if(n<=l&&w-1<=c[n]){let n=S-C;if(f.nChangePreceding=e,e===w+n-r-a?(f.aEndPreceding=r,f.bEndPreceding=a):(f.aEndPreceding=w,f.bEndPreceding=n),f.nCommonPreceding=C,C!==0&&(f.aCommonPreceding=w,f.bCommonPreceding=n),f.nChangeFollowing=e-1,e===1)f.nCommonFollowing=0,f.aStartFollowing=i,f.bStartFollowing=o;else{let n=p+b-(y?m-1:m+1),r=t(b,i,n,o,s);f.nCommonFollowing=r,r!==0&&(f.aCommonFollowing=b,f.bCommonFollowing=n);let a=b+r,c=n+r;e-1===i+o-a-c?(f.aStartFollowing=i,f.bStartFollowing=o):(f.aStartFollowing=a,f.bStartFollowing=c)}return!0}}}return!1},s=(t,n,s,c,l,u,d,f,p)=>{let m=c-n,h=l-s,g=s-n,_=l-c,v=_-g,y=g,b=g;if(d[0]=n-1,f[0]=s,v%2==0){let e=(t||v)/2,a=(g+_)/2;for(let t=1;t<=a;t+=1)if(y=r(t,s,l,m,u,d,y),t<e)b=i(t,n,c,h,u,f,b);else if(o(t,n,s,c,l,u,d,y,f,b,p))return}else{let e=((t||v)+1)/2,o=(g+_+1)/2,x=1;for(y=r(x,s,l,m,u,d,y),x+=1;x<=o;x+=1)if(b=i(x-1,n,c,h,u,f,b),x<e)y=r(x,s,l,m,u,d,y);else if(a(x,n,s,c,l,u,d,y,f,b,p))return}throw Error(`${e}: no overlap aStart=${n} aEnd=${s} bStart=${c} bEnd=${l}`)},c=(e,t,n,r,i,a,o,l,u,d)=>{if(i-r<n-t){if(a=!a,a&&o.length===1){let{foundSubsequence:e,isCommon:t}=o[0];o[1]={foundSubsequence:(t,n,r)=>{e(t,r,n)},isCommon:(e,n)=>t(n,e)}}let e=t,s=n;t=r,n=i,r=e,i=s}let{foundSubsequence:f,isCommon:p}=o[a?1:0];s(e,t,n,r,i,p,l,u,d);let{nChangePreceding:m,aEndPreceding:h,bEndPreceding:g,nCommonPreceding:_,aCommonPreceding:v,bCommonPreceding:y,nCommonFollowing:b,aCommonFollowing:x,bCommonFollowing:S,nChangeFollowing:C,aStartFollowing:w,bStartFollowing:T}=d;t<h&&r<g&&c(m,t,h,r,g,a,o,l,u,d),_!==0&&f(_,v,y),b!==0&&f(b,x,S),w<n&&T<i&&c(C,w,n,T,i,a,o,l,u,d)},l=(t,n)=>{if(typeof n!=`number`)throw TypeError(`${e}: ${t} typeof ${typeof n} is not a number`);if(!Number.isSafeInteger(n))throw RangeError(`${e}: ${t} value ${n} is not a safe integer`);if(n<0)throw RangeError(`${e}: ${t} value ${n} is a negative integer`)},u=(t,n)=>{let r=typeof n;if(r!==`function`)throw TypeError(`${e}: ${t} typeof ${r} is not a function`)};function d(e,r,i,a){l(`aLength`,e),l(`bLength`,r),u(`isCommon`,i),u(`foundSubsequence`,a);let o=t(0,e,0,r,i);if(o!==0&&a(o,0,0),e!==o||r!==o){let t=o,s=o,l=n(t,e-1,s,r-1,i),u=e-l,d=r-l,f=o+l;e!==f&&r!==f&&c(0,t,u,s,d,!1,[{foundSubsequence:a,isCommon:i}],[0],[0],{aCommonFollowing:0,aCommonPreceding:0,aEndPreceding:0,aStartFollowing:0,bCommonFollowing:0,bCommonPreceding:0,bEndPreceding:0,bStartFollowing:0,nChangeFollowing:0,nChangePreceding:0,nCommonFollowing:0,nCommonPreceding:0}),l!==0&&a(l,u,d)}}return Bs}function Xi(e,t){return e.replace(/\s+$/,e=>t(e))}function Zi(e,t,n,r,i,a){return e.length===0?r===` `?t&&a.length!==0?n(`${r} ${a}`):``:n(r):n(`${r} ${Xi(e,i)}`)}function Qi(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:a}){return Zi(e,t,n,r,i,a)}function $i(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:a}){return Zi(e,t,n,r,i,a)}function ea(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:a}){return Zi(e,t,n,r,i,a)}function ta(e,t,n,r,{patchColor:i}){return i(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function na(e,t){let n=e.length,r=t.contextLines,i=r+r,a=n,o=!1,s=0,c=0;for(;c!==n;){let t=c;for(;c!==n&&e[c][0]===J;)c+=1;if(t!==c)if(t===0)c>r&&(a-=c-r,o=!0);else if(c===n){let e=c-t;e>r&&(a-=e-r,o=!0)}else{let e=c-t;e>i&&(a-=e-i,s+=1)}for(;c!==n&&e[c][0]!==J;)c+=1}let l=s!==0||o;s===0?o&&(a+=1):a+=s+1;let u=a-1,d=[],f=0;l&&d.push(``);let p=0,m=0,h=0,g=0,_=e=>{let n=d.length;d.push(ea(e,n===0||n===u,t)),h+=1,g+=1},v=e=>{let n=d.length;d.push(Qi(e,n===0||n===u,t)),h+=1},y=e=>{let n=d.length;d.push($i(e,n===0||n===u,t)),g+=1};for(c=0;c!==n;){let a=c;for(;c!==n&&e[c][0]===J;)c+=1;if(a!==c)if(a===0){c>r&&(a=c-r,p=a,m=a,h=p,g=m);for(let t=a;t!==c;t+=1)_(e[t][1])}else if(c===n){let t=c-a>r?a+r:c;for(let n=a;n!==t;n+=1)_(e[n][1])}else{let n=c-a;if(n>i){let o=a+r;for(let t=a;t!==o;t+=1)_(e[t][1]);d[f]=ta(p,h,m,g,t),f=d.length,d.push(``);let s=n-i;p=h+s,m=g+s,h=p,g=m;for(let t=c-r;t!==c;t+=1)_(e[t][1])}else for(let t=a;t!==c;t+=1)_(e[t][1])}for(;c!==n&&e[c][0]===K;)v(e[c][1]),c+=1;for(;c!==n&&e[c][0]===q;)y(e[c][1]),c+=1}return l&&(d[f]=ta(p,h,m,g,t)),d.join(`
|
|
`)}function ra(e,t){return e.map((e,n,r)=>{let i=e[1],a=n===0||n===r.length-1;switch(e[0]){case K:return Qi(i,a,t);case q:return $i(i,a,t);default:return ea(i,a,t)}}).join(`
|
|
`)}function ia(){return{aAnnotation:`Expected`,aColor:H.green,aIndicator:`-`,bAnnotation:`Received`,bColor:H.red,bIndicator:`+`,changeColor:H.inverse,changeLineTrailingSpaceColor:Us,commonColor:H.dim,commonIndicator:` `,commonLineTrailingSpaceColor:Us,compareKeys:void 0,contextLines:Ws,emptyFirstOrLastLinePlaceholder:``,expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:H.yellow,printBasicPrototype:!1,truncateThreshold:Gs,truncateAnnotation:`... Diff result is truncated`,truncateAnnotationColor:Us}}function aa(e){return e&&typeof e==`function`?e:void 0}function oa(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:Ws}function sa(e={}){return{...ia(),...e,compareKeys:aa(e.compareKeys),contextLines:oa(e.contextLines)}}function ca(e){return e.length===1&&e[0].length===0}function la(e){let t=0,n=0;return e.forEach(e=>{switch(e[0]){case K:t+=1;break;case q:n+=1;break}}),{a:t,b:n}}function ua({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:i,bIndicator:a,includeChangeCounts:o,omitAnnotationLines:s},c){if(s)return``;let l=``,u=``;if(o){let t=String(c.a),i=String(c.b),o=r.length-e.length,s=` `.repeat(Math.max(0,o)),d=` `.repeat(Math.max(0,-o)),f=i.length-t.length,p=` `.repeat(Math.max(0,f)),m=` `.repeat(Math.max(0,-f));l=`${s} ${n} ${p}${t}`,u=`${d} ${a} ${m}${i}`}let d=`${n} ${e}${l}`,f=`${a} ${r}${u}`;return`${t(d)}
|
|
${i(f)}
|
|
|
|
`}function da(e,t,n){return ua(n,la(e))+(n.expand?ra(e,n):na(e,n))+(t?n.truncateAnnotationColor(`
|
|
${n.truncateAnnotation}`):``)}function fa(e,t,n){let r=sa(n),[i,a]=ma(ca(e)?[]:e,ca(t)?[]:t,r);return da(i,a,r)}function pa(e,t,n,r,i){if(ca(e)&&ca(n)&&(e=[],n=[]),ca(t)&&ca(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return fa(e,t,i);let[a,o]=ma(n,r,i),s=0,c=0;return a.forEach(n=>{switch(n[0]){case K:n[1]=e[s],s+=1;break;case q:n[1]=t[c],c+=1;break;default:n[1]=t[c],s+=1,c+=1}}),da(a,o,sa(i))}function ma(e,t,n){let r=n?.truncateThreshold??!1,i=Math.max(Math.floor(n?.truncateThreshold??0),0),a=r?Math.min(e.length,i):e.length,o=r?Math.min(t.length,i):t.length,s=a!==e.length||o!==t.length,c=(n,r)=>e[n]===t[r],l=[],u=0,d=0;for(Hs(a,o,c,(n,r,i)=>{for(;u!==r;u+=1)l.push(new Y(K,e[u]));for(;d!==i;d+=1)l.push(new Y(q,t[d]));for(;n!==0;--n,u+=1,d+=1)l.push(new Y(J,t[d]))});u!==a;u+=1)l.push(new Y(K,e[u]));for(;d!==o;d+=1)l.push(new Y(q,t[d]));return[l,s]}function ha(e){if(e===void 0)return`undefined`;if(e===null)return`null`;if(Array.isArray(e))return`array`;if(typeof e==`boolean`)return`boolean`;if(typeof e==`function`)return`function`;if(typeof e==`number`)return`number`;if(typeof e==`string`)return`string`;if(typeof e==`bigint`)return`bigint`;if(typeof e==`object`){if(e!=null){if(e.constructor===RegExp)return`regexp`;if(e.constructor===Map)return`map`;if(e.constructor===Set)return`set`;if(e.constructor===Date)return`date`}return`object`}else if(typeof e==`symbol`)return`symbol`;throw Error(`value of unknown type: ${e}`)}function ga(e){return e.includes(`\r
|
|
`)?`\r
|
|
`:`
|
|
`}function _a(e,t,n){let r=n?.truncateThreshold??!1,i=Math.max(Math.floor(n?.truncateThreshold??0),0),a=e.length,o=t.length;if(r){let n=e.includes(`
|
|
`),r=t.includes(`
|
|
`),s=ga(e),c=ga(t),l=n?`${e.split(s,i).join(s)}
|
|
`:e,u=r?`${t.split(c,i).join(c)}
|
|
`:t;a=l.length,o=u.length}let s=a!==e.length||o!==t.length,c=(n,r)=>e[n]===t[r],l=0,u=0,d=[];return Hs(a,o,c,(n,r,i)=>{l!==r&&d.push(new Y(K,e.slice(l,r))),u!==i&&d.push(new Y(q,t.slice(u,i))),l=r+n,u=i+n,d.push(new Y(J,t.slice(i,u)))}),l!==a&&d.push(new Y(K,e.slice(l))),u!==o&&d.push(new Y(q,t.slice(u))),[d,s]}function va(e,t,n){return t.reduce((t,r)=>t+(r[0]===J?r[1]:r[0]===e&&r[1].length!==0?n(r[1]):``),``)}function ya(e,t){let n=new Ks(K,t),r=new Ks(q,t),i=new qs(n,r);return e.forEach(e=>{switch(e[0]){case K:n.align(e);break;case q:r.align(e);break;default:i.align(e)}}),i.getLines()}function ba(e,t){if(t){let t=e.length-1;return e.some((e,n)=>e[0]===J&&(n!==t||e[1]!==`
|
|
`))}return e.some(e=>e[0]===J)}function xa(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
|
|
`)||t.includes(`
|
|
`),[i,a]=Sa(r?`${e}
|
|
`:e,r?`${t}
|
|
`:t,!0,n);if(ba(i,r)){let e=sa(n);return da(ya(i,e.changeColor),a,e)}}return fa(e.split(`
|
|
`),t.split(`
|
|
`),n)}function Sa(e,t,n,r){let[i,a]=_a(e,t,r);return n&&Gi(i),[i,a]}function Ca(e,t){let{commonColor:n}=sa(t);return n(e)}function wa(e,t,n){if(Object.is(e,t))return``;let r=ha(e),i=r,a=!1;if(r===`object`&&typeof e.asymmetricMatch==`function`){if(e.$$typeof!==Symbol.for(`jest.asymmetricMatcher`)||typeof e.getExpectedType!=`function`)return;i=e.getExpectedType(),a=i===`string`}if(i!==ha(t)){let r=function(e){return e.length<=p?e:`${e.slice(0,p)}...`},{aAnnotation:i,aColor:a,aIndicator:o,bAnnotation:s,bColor:c,bIndicator:l}=sa(n),u=ka(nc,n),d=z(e,u),f=z(t,u),p=1e5;return d=r(d),f=r(f),`${`${a(`${o} ${i}:`)}
|
|
${d}`}
|
|
|
|
${`${c(`${l} ${s}:`)}
|
|
${f}`}`}if(!a)switch(r){case`string`:return fa(e.split(`
|
|
`),t.split(`
|
|
`),n);case`boolean`:case`number`:return Ta(e,t,n);case`map`:return Oa(Ea(e),Ea(t),n);case`set`:return Oa(Da(e),Da(t),n);default:return Oa(e,t,n)}}function Ta(e,t,n){let r=z(e,tc),i=z(t,tc);return r===i?``:fa(r.split(`
|
|
`),i.split(`
|
|
`),n)}function Ea(e){return new Map(Array.from(e.entries()).sort())}function Da(e){return new Set(Array.from(e.values()).sort())}function Oa(e,t,n){let r,i=!1;try{r=Aa(e,t,ka(tc,n),n)}catch{i=!0}let a=Ca(Rs,n);return(r===void 0||r===a)&&(r=Aa(e,t,ka(nc,n),n),r!==a&&!i&&(r=`${Ca(zs,n)}
|
|
|
|
${r}`)),r}function ka(e,t){let{compareKeys:n,printBasicPrototype:r,maxDepth:i}=sa(t);return{...e,compareKeys:n,printBasicPrototype:r,maxDepth:i??e.maxDepth}}function Aa(e,t,n,r){let i={...n,indent:0},a=z(e,i),o=z(t,i);if(a===o)return Ca(Rs,r);{let i=z(e,n),s=z(t,n);return pa(i.split(`
|
|
`),s.split(`
|
|
`),a.split(`
|
|
`),o.split(`
|
|
`),r)}}function ja(e){return Li(e)===`Object`&&typeof e.asymmetricMatch==`function`}function Ma(e,t){let n=Li(e);return n===Li(t)&&(n===`Object`||n===`Array`)}function Na(e,t,n){let{aAnnotation:r,bAnnotation:i}=sa(n);if(typeof t==`string`&&typeof e==`string`&&t.length>0&&e.length>0&&t.length<=rc&&e.length<=rc&&t!==e){if(t.includes(`
|
|
`)||e.includes(`
|
|
`))return xa(t,e,n);let[a]=Sa(t,e,!0),o=a.some(e=>e[0]===J),s=Fa(r,i);return`${s(r)+Ra(za(a,K,o))}
|
|
${s(i)+La(za(a,q,o))}`}let a=Bi(t,{forceWritable:!0}),{replacedExpected:o,replacedActual:s}=Pa(Bi(e,{forceWritable:!0}),a);return wa(o,s,n)}function Pa(e,t,n=new WeakSet,r=new WeakSet){return e instanceof Error&&t instanceof Error&&typeof e.cause<`u`&&typeof t.cause>`u`?(delete e.cause,{replacedActual:e,replacedExpected:t}):Ma(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),zi(t).forEach(i=>{let a=t[i],o=e[i];if(ja(a))a.asymmetricMatch(o)&&(e[i]=a);else if(ja(o))o.asymmetricMatch(a)&&(t[i]=o);else if(Ma(o,a)){let s=Pa(o,a,n,r);e[i]=s.replacedActual,t[i]=s.replacedExpected}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function Fa(...e){let t=e.reduce((e,t)=>t.length>e?t.length:e,0);return e=>`${e}: ${` `.repeat(t-e.length)}`}function Ia(e){return e.replace(/\s+$/gm,e=>ic.repeat(e.length))}function La(e){return H.red(Ia(Mi(e)))}function Ra(e){return H.green(Ia(Mi(e)))}function za(e,t,n){return e.reduce((e,r)=>e+(r[0]===J?r[1]:r[0]===t?n?H.inverse(r[1]):r[1]:``),``)}function Ba(e){return e&&(e[oc]||e[ac])}function Va(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e==`string`?`<unserializable>: ${e}`:`<unserializable>`}function Ha(e,t=new WeakMap){if(!e||typeof e==`string`)return e;if(e instanceof Error&&`toJSON`in e&&typeof e.toJSON==`function`){let n=e.toJSON();return n&&n!==e&&typeof n==`object`&&(typeof e.message==`string`&&Ua(()=>n.message??=e.message),typeof e.stack==`string`&&Ua(()=>n.stack??=e.stack),typeof e.name==`string`&&Ua(()=>n.name??=e.name),e.cause!=null&&Ua(()=>n.cause??=Ha(e.cause,t))),Ha(n,t)}if(typeof e==`function`)return`Function<${e.name||`anonymous`}>`;if(typeof e==`symbol`)return e.toString();if(typeof e!=`object`)return e;if(typeof Buffer<`u`&&e instanceof Buffer)return`<Buffer(${e.length}) ...>`;if(typeof Uint8Array<`u`&&e instanceof Uint8Array)return`<Uint8Array(${e.length}) ...>`;if(Ba(e))return Ha(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype===`AsyncFunction`)return`Promise`;if(typeof Element<`u`&&e instanceof Element)return e.tagName;if(typeof e.asymmetricMatch==`function`)return`${e.toString()} ${Ni(e.sample)}`;if(typeof e.toJSON==`function`)return Ha(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=Array(e.length);return t.set(e,n),e.forEach((e,r)=>{try{n[r]=Ha(e,t)}catch(e){n[r]=Va(e)}}),n}else{let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==sc;)Object.getOwnPropertyNames(r).forEach(r=>{if(!(r in n))try{n[r]=Ha(e[r],t)}catch(e){delete n[r],n[r]=Va(e)}}),r=Object.getPrototypeOf(r);return n}}function Ua(e){try{return e()}catch{}}function Wa(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,``)}function Ga(e,t,n=new WeakSet){if(!e||typeof e!=`object`)return{message:String(e)};let r=e;(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0)&&(r.diff=Na(r.actual,r.expected,{...t,...r.diffOptions})),`expected`in r&&typeof r.expected!=`string`&&(r.expected=Mi(r.expected,10)),`actual`in r&&typeof r.actual!=`string`&&(r.actual=Mi(r.actual,10));try{typeof r.message==`string`&&(r.message=Wa(r.message))}catch{}try{!n.has(r)&&typeof r.cause==`object`&&(n.add(r),r.cause=Ga(r.cause,t,n))}catch{}try{return Ha(r)}catch(e){return Ha(Error(`Failed to fully serialize error: ${e?.message}
|
|
Inner error message: ${r?.message}`))}}var Ka,H,qa,Ja,Ya,Xa,Za,Qa,$a,eo,to,no,ro,io,ao,oo,so,co,lo,uo,fo,po,mo,ho,go,_o,vo,yo,bo,xo,So,Co,wo,To,Eo,Do,Oo,ko,U,Ao,jo,Mo,No,Po,W,Fo,Io,Lo,Ro,zo,Bo,Vo,Ho,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,Qo,$o,es,ts,ns,G,rs,is,as,os,ss,cs,ls,us,ds,fs,ps,ms,hs,gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks,As,js,Ms,K,q,J,Y,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs,$s,ec,tc,nc,rc,ic,ac,oc,sc,cc=e((()=>{Ka=Object.entries({reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}),Qn.open=``,Qn.close=``,Ka.reduce((e,[t])=>(e[t]=Qn,e),{isColorSupported:!1}),H=er(),qa=typeof Symbol==`function`&&Symbol.for?Symbol.for(`jest.asymmetricMatcher`):1267621,Ja=` `,Ya=(e,t,n,r,i,a)=>{let o=e.toString();if(o===`ArrayContaining`||o===`ArrayNotContaining`)return++r>t.maxDepth?`[${o}]`:`${o+Ja}[${ar(e.sample,t,n,r,i,a)}]`;if(o===`ObjectContaining`||o===`ObjectNotContaining`)return++r>t.maxDepth?`[${o}]`:`${o+Ja}{${or(e.sample,t,n,r,i,a)}}`;if(o===`StringMatching`||o===`StringNotMatching`||o===`StringContaining`||o===`StringNotContaining`)return o+Ja+a(e.sample,t,n,r,i);if(typeof e.toAsymmetricMatcher!=`function`)throw TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},Xa=e=>e&&e.$$typeof===qa,Za={serialize:Ya,test:Xa},Qa=` `,$a=new Set([`DOMStringMap`,`NamedNodeMap`]),eo=/^(?:HTML\w*Collection|NodeList)$/,to=e=>e&&e.constructor&&!!e.constructor.name&&sr(e.constructor.name),no=(e,t,n,r,i,a)=>{let o=e.constructor.name;return++r>t.maxDepth?`[${o}]`:(t.min?``:o+Qa)+($a.has(o)?`{${or(cr(e)?[...e].reduce((e,t)=>(e[t.name]=t.value,e),{}):{...e},t,n,r,i,a)}}`:`[${ar([...e],t,n,r,i,a)}]`)},ro={serialize:no,test:to},io=1,ao=3,oo=8,so=11,co=/^(?:(?:HTML|SVG)\w*)?Element$/,lo=e=>{var t;return(e==null||(t=e.constructor)==null?void 0:t.name)&&_r(e)},uo=(e,t,n,r,i,a)=>{if(vr(e))return fr(e.data,t);if(yr(e))return pr(e.data,t);let o=br(e)?`DocumentFragment`:e.tagName.toLowerCase();return++r>t.maxDepth?hr(o,t):mr(o,ur(br(e)?[]:Array.from(e.attributes,e=>e.name).sort(),br(e)?{}:[...e.attributes].reduce((e,t)=>(e[t.name]=t.value,e),{}),t,n+t.indent,r,i,a),dr(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,i,a),t,n)},fo={serialize:uo,test:lo},po=`@@__IMMUTABLE_ITERABLE__@@`,mo=`@@__IMMUTABLE_LIST__@@`,ho=`@@__IMMUTABLE_KEYED__@@`,go=`@@__IMMUTABLE_MAP__@@`,_o=`@@__IMMUTABLE_ORDERED__@@`,vo=`@@__IMMUTABLE_RECORD__@@`,yo=`@@__IMMUTABLE_SEQ__@@`,bo=`@@__IMMUTABLE_SET__@@`,xo=`@@__IMMUTABLE_STACK__@@`,So=e=>`Immutable.${e}`,Co=e=>`[${e}]`,wo=` `,To=`…`,Eo=(e,t,n,r,i,a)=>e[go]?xr(e,t,n,r,i,a,e[_o]?`OrderedMap`:`Map`):e[mo]?Tr(e,t,n,r,i,a,`List`):e[bo]?Tr(e,t,n,r,i,a,e[_o]?`OrderedSet`:`Set`):e[xo]?Tr(e,t,n,r,i,a,`Stack`):e[yo]?wr(e,t,n,r,i,a):Cr(e,t,n,r,i,a),Do=e=>e&&(e[po]===!0||e[vo]===!0),Oo={serialize:Eo,test:Do},ko={exports:{}},U={},Mo=Or(),No=tr({__proto__:null,default:Er(Mo)},[Mo]),Po={exports:{}},W={},Lo=Ar(),Ro=tr({__proto__:null,default:Er(Lo)},[Lo]),zo=Object.fromEntries([`isAsyncMode`,`isConcurrentMode`,`isContextConsumer`,`isContextProvider`,`isElement`,`isForwardRef`,`isFragment`,`isLazy`,`isMemo`,`isPortal`,`isProfiler`,`isStrictMode`,`isSuspense`,`isSuspenseList`,`isValidElementType`].map(e=>[e,t=>Ro[e](t)||No[e](t)])),Bo=(e,t,n,r,i,a)=>++r>t.maxDepth?hr(Mr(e),t):mr(Mr(e),ur(Nr(e),e.props,t,n+t.indent,r,i,a),dr(jr(e.props.children),t,n+t.indent,r,i,a),t,n),Vo=e=>e!=null&&zo.isElement(e),Ho={serialize:Bo,test:Vo},Uo=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.test.json`):245830487,Wo=(e,t,n,r,i,a)=>++r>t.maxDepth?hr(e.type,t):mr(e.type,e.props?ur(Pr(e),e.props,t,n+t.indent,r,i,a):``,e.children?dr(e.children,t,n+t.indent,r,i,a):``,t,n),Go=e=>e&&e.$$typeof===Uo,Ko={serialize:Wo,test:Go},qo=Object.prototype.toString,Jo=Date.prototype.toISOString,Yo=Error.prototype.toString,Xo=RegExp.prototype.toString,Zo=/^Symbol\((.*)\)(.*)$/,Qo=/\n/g,$o=class extends Error{constructor(e,t){super(e),this.stack=t,this.name=this.constructor.name}},es={test:e=>e&&e instanceof Error,serialize(e,t,n,r,i,a){if(i.includes(e))return`[Circular]`;i=[...i,e];let o=++r>t.maxDepth,{message:s,cause:c,...l}=e,u={message:s,...typeof c<`u`?{cause:c}:{},...e instanceof AggregateError?{errors:e.errors}:{},...l},d=e.name===`Error`?Fr(e):e.name;return o?`[${d}]`:`${d} {${rr(Object.entries(u).values(),t,n,r,i,a)}}`}},ts={comment:`gray`,content:`reset`,prop:`yellow`,tag:`cyan`,value:`green`},ns=Object.keys(ts),G={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,maxWidth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:ts},rs={AsymmetricMatcher:Za,DOMCollection:ro,DOMElement:fo,Immutable:Oo,ReactElement:Ho,ReactTestComponent:Ko,Error:es},is={bold:[`1`,`22`],dim:[`2`,`22`],italic:[`3`,`23`],underline:[`4`,`24`],inverse:[`7`,`27`],hidden:[`8`,`28`],strike:[`9`,`29`],black:[`30`,`39`],red:[`31`,`39`],green:[`32`,`39`],yellow:[`33`,`39`],blue:[`34`,`39`],magenta:[`35`,`39`],cyan:[`36`,`39`],white:[`37`,`39`],brightblack:[`30;1`,`39`],brightred:[`31;1`,`39`],brightgreen:[`32;1`,`39`],brightyellow:[`33;1`,`39`],brightblue:[`34;1`,`39`],brightmagenta:[`35;1`,`39`],brightcyan:[`36;1`,`39`],brightwhite:[`37;1`,`39`],grey:[`90`,`39`]},as={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`},os=`…`,ss=e=>typeof Buffer==`function`&&e instanceof Buffer?`Buffer`:e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,cs=Number.isNaN||(e=>e!==e),ls=RegExp(`['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]`,`g`),us={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,"'":`\\'`,"\\":`\\\\`},ds=16,fs=4,ps=()=>`Promise{…}`;try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding(`util`);Array.isArray(e(Promise.resolve()))&&(ps=(r,i)=>{let[a,o]=e(r);return a===t?`Promise{<pending>}`:`Promise${a===n?`!`:``}{${i.inspect(o,i)}}`})}catch{}ms=ps,hs=typeof Symbol<`u`&&Symbol.toStringTag?Symbol.toStringTag:!1,gs=[`stack`,`line`,`column`,`name`,`message`,`fileName`,`lineNumber`,`columnNumber`,`number`,`description`,`cause`],_s=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`chai/inspect`):`@@chai/inspect`,vs=Symbol.for(`nodejs.util.inspect.custom`),ys=new WeakMap,bs={},xs={undefined:(e,t)=>t.stylize(`undefined`,`undefined`),null:(e,t)=>t.stylize(`null`,`null`),boolean:(e,t)=>t.stylize(String(e),`boolean`),Boolean:(e,t)=>t.stylize(String(e),`boolean`),number:hi,Number:hi,bigint:gi,BigInt:gi,string:xi,String:xi,function:di,Function:di,symbol:Si,Symbol:Si,Array:li,Date:ui,Map:mi,Set:yi,RegExp:_i,Promise:ms,WeakSet:(e,t)=>t.stylize(`WeakSet{…}`,`special`),WeakMap:(e,t)=>t.stylize(`WeakMap{…}`,`special`),Arguments:Ti,Int8Array:V,Uint8Array:V,Uint8ClampedArray:V,Int16Array:V,Uint16Array:V,Int32Array:V,Uint32Array:V,Float32Array:V,Float64Array:V,Generator:()=>``,DataView:()=>``,ArrayBuffer:()=>``,Error:Ei,HTMLCollection:Oi,NodeList:Oi},Ss=(e,t,n)=>_s in e&&typeof e[_s]==`function`?e[_s](t):vs in e&&typeof e[vs]==`function`?e[vs](t.depth,t):`inspect`in e&&typeof e.inspect==`function`?e.inspect(t.depth,t):`constructor`in e&&ys.has(e.constructor)?ys.get(e.constructor)(e,t):bs[n]?bs[n](e,t):``,Cs=Object.prototype.toString,{AsymmetricMatcher:ws,DOMCollection:Ts,DOMElement:Es,Immutable:Ds,ReactElement:Os,ReactTestComponent:ks}=rs,As=[ks,Os,Es,Ts,Ds,ws],js=/%[sdjifoOc%]/g,Ms={forceWritable:!1},K=-1,q=1,J=0,Y=class{0;1;constructor(e,t){this[0]=e,this[1]=t}},Ns=/[^a-z0-9]/i,Ps=/\s/,Fs=/[\r\n]/,Is=/\n\r?\n$/,Ls=/^\r?\n\r?\n/,Rs=`Compared values have no visual difference.`,zs="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",Bs={},Hs=Fi(Yi()),Us=e=>e,Ws=5,Gs=0,Ks=class{op;line;lines;changeColor;constructor(e,t){this.op=e,this.line=[],this.lines=[],this.changeColor=t}pushSubstring(e){this.pushDiff(new Y(this.op,e))}pushLine(){this.lines.push(this.line.length===1?this.line[0][0]===this.op?this.line[0]:new Y(this.op,this.line[0][1]):new Y(this.op,va(this.op,this.line,this.changeColor))),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(e){this.line.push(e)}align(e){let t=e[1];if(t.includes(`
|
|
`)){let e=t.split(`
|
|
`),n=e.length-1;e.forEach((e,t)=>{t<n?(this.pushSubstring(e),this.pushLine()):e.length!==0&&this.pushSubstring(e)})}else this.pushDiff(e)}moveLinesTo(e){this.isLineEmpty()||this.pushLine(),e.push(...this.lines),this.lines.length=0}},qs=class{deleteBuffer;insertBuffer;lines;constructor(e,t){this.deleteBuffer=e,this.insertBuffer=t,this.lines=[]}pushDiffCommonLine(e){this.lines.push(e)}pushDiffChangeLines(e){let t=e[1].length===0;(!t||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(e),(!t||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(e)}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines)}align(e){let t=e[0],n=e[1];if(n.includes(`
|
|
`)){let e=n.split(`
|
|
`),r=e.length-1;e.forEach((e,n)=>{if(n===0){let n=new Y(t,e);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(n)):(this.pushDiffChangeLines(n),this.flushChangeLines())}else n<r?this.pushDiffCommonLine(new Y(t,e)):e.length!==0&&this.pushDiffChangeLines(new Y(t,e))})}else this.pushDiffChangeLines(e)}getLines(){return this.flushChangeLines(),this.lines}},{AsymmetricMatcher:Js,DOMCollection:Ys,DOMElement:Xs,Immutable:Zs,ReactElement:Qs,ReactTestComponent:$s}=rs,ec=[$s,Qs,Xs,Ys,Zs,Js,rs.Error],tc={maxDepth:20,plugins:ec},nc={callToJSON:!1,maxDepth:8,plugins:ec},rc=2e4,ic=`·`,ac=`@@__IMMUTABLE_RECORD__@@`,oc=`@@__IMMUTABLE_ITERABLE__@@`,sc=Object.getPrototypeOf({})}));function lc(e,t={}){try{let n=!1,r=!1;return X.window?.location?.search?.includes(`instrument=true`)?n=!0:X.window?.location?.search?.includes(`instrument=false`)&&(r=!0),X.window?.parent===X.window&&!n||r?e:(X.window&&!X.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__&&(X.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__=new wc),(X.window?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__).instrument(e,t))}catch(t){return fc.warn(t),e}}function uc(e,t){let n=e;for(;n!=null;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}}function dc(e){if(typeof e!=`function`)return!1;let t=Object.getOwnPropertyDescriptor(e,`prototype`);return t?!t.writable:!1}var fc,pc,mc,hc,X,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc=e((()=>{Zn(),cc(),{once:fc}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{FORCE_REMOUNT:pc,SET_CURRENT_STORY:mc,STORY_RENDER_PHASE_CHANGED:hc}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:X}=__STORYBOOK_MODULE_GLOBAL__,gc=globalThis.__STORYBOOK_ADDONS_PREVIEW,_c=Error("This function ran after the play function completed. Did you forget to `await` it?"),vc=e=>Object.prototype.toString.call(e)===`[object Object]`,yc=e=>Object.prototype.toString.call(e)===`[object Module]`,bc=e=>{if(!vc(e)&&!yc(e))return!1;if(e.constructor===void 0)return!0;let t=e.constructor.prototype;return!!vc(t)},xc=e=>{try{return new e.constructor}catch{return{}}},Sc=()=>({renderPhase:`preparing`,isDebugging:!1,isPlaying:!1,isLocked:!1,cursor:0,calls:[],shadowCalls:[],callRefsByResult:new Map,chainedCallIds:new Set,ancestors:[],playUntil:void 0,resolvers:{},syncTimeout:void 0}),Cc=(e,t=!1)=>{let n=(t?e.shadowCalls:e.calls).filter(e=>e.retain);if(!n.length)return;let r=new Map(Array.from(e.callRefsByResult.entries()).filter(([,e])=>e.retain));return{cursor:n.length,calls:n,callRefsByResult:r}},wc=class{constructor(){this.detached=!1,this.initialized=!1,this.state={},this.loadParentWindowState=()=>{try{this.state=X.window?.parent?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__||{}}catch{this.detached=!0}},this.updateParentWindowState=()=>{try{X.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__=this.state}catch{this.detached=!0}},this.loadParentWindowState();let e=({storyId:e,renderPhase:t,isPlaying:n=!0,isDebugging:r=!1})=>{let i=this.getState(e);this.setState(e,{...Sc(),...Cc(i,r),renderPhase:t||i.renderPhase,shadowCalls:r?i.shadowCalls:[],chainedCallIds:r?i.chainedCallIds:new Set,playUntil:r?i.playUntil:void 0,isPlaying:n,isDebugging:r}),this.sync(e)},t=e=>({storyId:t,playUntil:n})=>{this.getState(t).isDebugging||this.setState(t,({calls:e})=>({calls:[],shadowCalls:e.map(e=>({...e,status:`waiting`})),isDebugging:!0}));let r=this.getLog(t);this.setState(t,({shadowCalls:e})=>{if(n||!r.length)return{playUntil:n};let t=e.findIndex(e=>e.id===r[0].callId);return{playUntil:e.slice(0,t).filter(e=>e.interceptable&&!e.ancestors?.length).slice(-1)[0]?.id}}),e.emit(pc,{storyId:t,isDebugging:!0})},n=e=>({storyId:n})=>{let r=this.getLog(n).filter(e=>!e.ancestors?.length),i=r.reduceRight((e,t,n)=>e>=0||t.status===`waiting`?e:n,-1);t(e)({storyId:n,playUntil:r[i-1]?.callId})},r=e=>({storyId:n,callId:r})=>{let{calls:i,shadowCalls:a,resolvers:o}=this.getState(n),s=i.find(({id:e})=>e===r),c=a.find(({id:e})=>e===r);if(!s&&c&&Object.values(o).length>0){let e=this.getLog(n).find(e=>e.status===`waiting`)?.callId;c.id!==e&&this.setState(n,{playUntil:c.id}),Object.values(o).forEach(e=>e())}else t(e)({storyId:n,playUntil:r})},i=e=>({storyId:n})=>{let{resolvers:r}=this.getState(n);if(Object.values(r).length>0)Object.values(r).forEach(e=>e());else{let r=this.getLog(n).find(e=>e.status===`waiting`)?.callId;r?t(e)({storyId:n,playUntil:r}):a({storyId:n})}},a=({storyId:e})=>{this.setState(e,{playUntil:void 0,isDebugging:!1}),Object.values(this.getState(e).resolvers).forEach(e=>e())},o=({storyId:t,newPhase:n})=>{let{isDebugging:r}=this.getState(t);if(n===`preparing`&&r||n===`playing`)return e({storyId:t,renderPhase:n,isDebugging:r});n===`played`?this.setState(t,{renderPhase:n,isLocked:!1,isPlaying:!1,isDebugging:!1}):n===`errored`?this.setState(t,{renderPhase:n,isLocked:!1,isPlaying:!1}):n===`aborted`?this.setState(t,{renderPhase:n,isLocked:!0,isPlaying:!1}):this.setState(t,{renderPhase:n}),this.sync(t)};gc&&gc.ready().then(()=>{this.channel=gc.getChannel(),this.channel.on(pc,e),this.channel.on(hc,o),this.channel.on(mc,()=>{this.initialized?this.cleanup():this.initialized=!0}),this.channel.on(R.START,t(this.channel)),this.channel.on(R.BACK,n(this.channel)),this.channel.on(R.GOTO,r(this.channel)),this.channel.on(R.NEXT,i(this.channel)),this.channel.on(R.END,a)})}getState(e){return this.state[e]||Sc()}setState(e,t){if(e){let n=this.getState(e),r=typeof t==`function`?t(n):t;this.state={...this.state,[e]:{...n,...r}},this.updateParentWindowState()}}cleanup(){this.state=Object.entries(this.state).reduce((e,[t,n])=>{let r=Cc(n);return r&&(e[t]=Object.assign(Sc(),r)),e},{});let e={controlStates:{detached:this.detached,start:!1,back:!1,goto:!1,next:!1,end:!1},logItems:[]};this.channel?.emit(R.SYNC,e),this.updateParentWindowState()}getLog(e){let{calls:t,shadowCalls:n}=this.getState(e),r=[...n];t.forEach((e,t)=>{r[t]=e});let i=new Set;return r.reduceRight((e,t)=>(t.args.forEach(e=>{e?.__callId__&&i.add(e.__callId__)}),t.path.forEach(e=>{e.__callId__&&i.add(e.__callId__)}),(t.interceptable||t.exception)&&!i.has(t.id)&&(e.unshift({callId:t.id,status:t.status,ancestors:t.ancestors}),i.add(t.id)),e),[])}instrument(e,t,n=0){if(!bc(e))return e;let{mutate:r=!1,path:i=[]}=t,a=t.getKeys?t.getKeys(e,n):Object.keys(e);return n+=1,a.reduce((r,a)=>{let o=uc(e,a);if(typeof o?.get==`function`){if(o.configurable){let s=()=>o?.get?.bind(e)?.();Object.defineProperty(r,a,{get:()=>this.instrument(s(),{...t,path:i.concat(a)},n)})}return r}let s=e[a];return typeof s==`function`?`__originalFn__`in s&&typeof s.__originalFn__==`function`?(r[a]=s,r):(r[a]=(...n)=>this.track(a,s,e,n,t),r[a].__originalFn__=s,Object.defineProperty(r[a],`name`,{value:a,writable:!1}),Object.keys(s).length>0&&Object.assign(r[a],this.instrument({...s},{...t,path:i.concat(a)},n)),r):(r[a]=this.instrument(s,{...t,path:i.concat(a)},n),r)},r?e:xc(e))}track(e,t,n,r,i){let a=r?.[0]?.__storyId__||X.__STORYBOOK_PREVIEW__?.selectionStore?.selection?.storyId,{cursor:o,ancestors:s}=this.getState(a);this.setState(a,{cursor:o+1});let c=`${s.slice(-1)[0]||a} [${o}] ${e}`,{path:l=[],intercept:u=!1,retain:d=!1}=i,f=typeof u==`function`?u(e,l):u,p={id:c,cursor:o,storyId:a,ancestors:s,path:l,method:e,args:r,interceptable:f,retain:d},m=(f&&!s.length?this.intercept:this.invoke).call(this,t,n,p,i);return this.instrument(m,{...i,mutate:!0,path:[{__callId__:p.id}]})}intercept(e,t,n,r){let{chainedCallIds:i,isDebugging:a,playUntil:o}=this.getState(n.storyId),s=i.has(n.id);return!a||s||o?(o===n.id&&this.setState(n.storyId,{playUntil:void 0}),this.invoke(e,t,n,r)):new Promise(e=>{this.setState(n.storyId,({resolvers:t})=>({isLocked:!1,resolvers:{...t,[n.id]:e}}))}).then(()=>(this.setState(n.storyId,e=>{let{[n.id]:t,...r}=e.resolvers;return{isLocked:!0,resolvers:r}}),this.invoke(e,t,n,r)))}invoke(e,t,n,r){let{callRefsByResult:i,renderPhase:a}=this.getState(n.storyId),o=(e,t,n)=>{if(n.includes(e))return`[Circular]`;if(n=[...n,e],t>25)return`...`;if(i.has(e))return i.get(e);if(e instanceof Array)return e.map(e=>o(e,++t,n));if(e instanceof Date)return{__date__:{value:e.toISOString()}};if(e instanceof Error){let{name:t,message:n,stack:r}=e;return{__error__:{name:t,message:n,stack:r}}}if(e instanceof RegExp){let{flags:t,source:n}=e;return{__regexp__:{flags:t,source:n}}}if(e instanceof X.window?.HTMLElement){let{prefix:t,localName:n,id:r,classList:i,innerText:a}=e;return{__element__:{prefix:t,localName:n,id:r,classNames:Array.from(i),innerText:a}}}return typeof e==`function`?{__function__:{name:`getMockName`in e?e.getMockName():e.name}}:typeof e==`symbol`?{__symbol__:{description:e.description}}:typeof e==`object`&&e?.constructor?.name&&e?.constructor?.name!==`Object`?{__class__:{name:e.constructor.name}}:Object.prototype.toString.call(e)===`[object Object]`?Object.fromEntries(Object.entries(e).map(([e,r])=>[e,o(r,++t,n)])):e},s={...n,args:n.args.map(e=>o(e,0,[]))};n.path.forEach(e=>{e?.__callId__&&this.setState(n.storyId,({chainedCallIds:t})=>({chainedCallIds:new Set(Array.from(t).concat(e.__callId__))}))});let c=e=>{if(e instanceof Error){let{name:t,message:r,stack:i,callId:a=n.id}=e,{showDiff:o=void 0,diff:c=void 0,actual:l=void 0,expected:u=void 0}=e.name===`AssertionError`?Ga(e):e,d={name:t,message:r,stack:i,callId:a,showDiff:o,diff:c,actual:l,expected:u};if(this.update({...s,status:`error`,exception:d}),this.setState(n.storyId,t=>({callRefsByResult:new Map([...Array.from(t.callRefsByResult.entries()),[e,{__callId__:n.id,retain:n.retain}]])})),n.ancestors?.length)throw Object.prototype.hasOwnProperty.call(e,`callId`)||Object.defineProperty(e,`callId`,{value:n.id}),e}throw e};try{if(a===`played`&&!n.retain)throw _c;let i=(r.getArgs?r.getArgs(n,this.getState(n.storyId)):n.args).map(e=>typeof e!=`function`||dc(e)||Object.keys(e).length?e:(...t)=>{let{cursor:r,ancestors:i}=this.getState(n.storyId);this.setState(n.storyId,{cursor:0,ancestors:[...i,n.id]});let a=()=>this.setState(n.storyId,{cursor:r,ancestors:i}),o=!1;try{let n=e(...t);return n instanceof Promise?(o=!0,n.finally(a)):n}finally{o||a()}}),o=e.apply(t,i);return o&&[`object`,`function`,`symbol`].includes(typeof o)&&this.setState(n.storyId,e=>({callRefsByResult:new Map([...Array.from(e.callRefsByResult.entries()),[o,{__callId__:n.id,retain:n.retain}]])})),this.update({...s,status:o instanceof Promise?`active`:`done`}),o instanceof Promise?o.then(e=>(this.update({...s,status:`done`}),e),c):o}catch(e){return c(e)}}update(e){this.channel?.emit(R.CALL,e),this.setState(e.storyId,({calls:t})=>{let n=t.concat(e).reduce((e,t)=>Object.assign(e,{[t.id]:t}),{});return{calls:Object.values(n).sort((e,t)=>e.id.localeCompare(t.id,void 0,{numeric:!0}))}}),this.sync(e.storyId)}sync(e){let t=()=>{let{isLocked:t,isPlaying:n}=this.getState(e),r=this.getLog(e),i=r.filter(({ancestors:e})=>!e.length).find(e=>e.status===`waiting`)?.callId,a=r.some(e=>e.status===`active`);if(this.detached||t||a||r.length===0){let e={controlStates:{detached:this.detached,start:!1,back:!1,goto:!1,next:!1,end:!1},logItems:r};this.channel?.emit(R.SYNC,e);return}let o=r.some(e=>e.status===`done`||e.status===`error`),s={controlStates:{detached:this.detached,start:o,back:o,goto:!0,next:n,end:n},logItems:r,pausedAt:i};this.channel?.emit(R.SYNC,s)};this.setState(e,({syncTimeout:e})=>(clearTimeout(e),{syncTimeout:setTimeout(t,0)}))}}})),Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,Pc,Fc,Ic,Lc,Rc,zc,Bc,Vc,Hc,Uc,Wc,Gc,Kc,qc,Jc,Z,Yc,Xc,Zc,Qc,$c,el,Q,tl,nl,rl,il,al,ol,sl,cl,$,ll,ul,dl,fl,pl,ml,hl,gl,_l,vl,yl,bl,xl,Sl,Cl,wl,Tl,El,Dl,Ol,kl=e((()=>{c(),kn(),r(),In(),Jn(),Xn(),n(),kl(),Tc(),Ec=t({"../../node_modules/@ngard/tiny-isequal/index.js"(e){Object.defineProperty(e,`__esModule`,{value:!0}),e.isEqual=(function(){var e=Object.prototype.toString,t=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:Object.keys;return function(r,i){return(function r(i,a,o){var s,c,l,u=e.call(i),d=e.call(a);if(i===a)return!0;if(i==null||a==null)return!1;if(o.indexOf(i)>-1&&o.indexOf(a)>-1)return!0;if(o.push(i,a),u!=d||(s=n(i),c=n(a),s.length!=c.length||s.some(function(e){return!r(i[e],a[e],o)})))return!1;switch(u.slice(8,-1)){case`Symbol`:return i.valueOf()==a.valueOf();case`Date`:case`Number`:return+i==+a||+i!=+i&&+a!=+a;case`RegExp`:case`Function`:case`String`:case`Boolean`:return``+i==``+a;case`Set`:case`Map`:s=i.entries(),c=a.entries();do if(!r((l=s.next()).value,c.next().value,o))return!1;while(!l.done);return!0;case`ArrayBuffer`:i=new Uint8Array(i),a=new Uint8Array(a);case`DataView`:i=new Uint8Array(i.buffer),a=new Uint8Array(a.buffer);case`Float32Array`:case`Float64Array`:case`Int8Array`:case`Int16Array`:case`Int32Array`:case`Uint8Array`:case`Uint16Array`:case`Uint32Array`:case`Uint8ClampedArray`:case`Arguments`:case`Array`:if(i.length!=a.length)return!1;for(l=0;l<i.length;l++)if((l in i||l in a)&&(l in i!=l in a||!r(i[l],a[l],o)))return!1;return!0;case`Object`:return r(t(i),t(a),o);default:return!1}})(r,i,[])}})()}}),Dc=a(Ec(),1),Oc=e=>e.map(e=>typeof e<`u`).filter(Boolean).length,kc=(e,t)=>{let{exists:n,eq:r,neq:i,truthy:a}=e;if(Oc([n,r,i,a])>1)throw Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:r,neq:i})}`);if(typeof r<`u`)return(0,Dc.isEqual)(t,r);if(typeof i<`u`)return!(0,Dc.isEqual)(t,i);if(typeof n<`u`){let e=typeof t<`u`;return n?e:!e}return typeof a>`u`||a?!!t:!t},Ac=(e,t,n)=>{if(!e.if)return!0;let{arg:r,global:i}=e.if;if(Oc([r,i])!==1)throw Error(`Invalid conditional value ${JSON.stringify({arg:r,global:i})}`);let a=r?t[r]:n[i];return kc(e.if,a)},jc={},i(jc,{argsEnhancers:()=>Fc}),Mc=(e,t)=>typeof t[e]>`u`&&!(e in t),Nc=e=>{let{initialArgs:t,argTypes:n,id:r,parameters:{actions:i}}=e;if(!i||i.disable||!i.argTypesRegex||!n)return{};let a=new RegExp(i.argTypesRegex);return Object.entries(n).filter(([e])=>!!a.test(e)).reduce((e,[n,i])=>(Mc(n,t)&&(e[n]=Bn(n,{implicit:!0,id:r})),e),{})},Pc=e=>{let{initialArgs:t,argTypes:n,parameters:{actions:r}}=e;return r?.disable||!n?{}:Object.entries(n).filter(([e,t])=>!!t.action).reduce((e,[n,r])=>(Mc(n,t)&&(e[n]=Bn(typeof r.action==`string`?r.action:n)),e),{})},Fc=[Pc,Nc],Ic={},i(Ic,{loaders:()=>Bc}),{onMockCall:Lc}=__STORYBOOK_MODULE_TEST__,Rc=!1,zc=e=>{let{parameters:t}=e;t?.actions?.disable||Rc||(Lc((e,t)=>{let n=e.getMockName();n!==`spy`&&n!==`vi.fn()`&&(!/^next\/.*::/.test(n)||[`next/router::useRouter()`,`next/navigation::useRouter()`,`next/navigation::redirect`,`next/cache::`,`next/headers::cookies().set`,`next/headers::cookies().delete`,`next/headers::headers().set`,`next/headers::headers().delete`].some(e=>n.startsWith(e)))&&Bn(n)(t)}),Rc=!0)},Bc=[zc],{useEffect:Vc}=__STORYBOOK_MODULE_PREVIEW_API__,{document:Hc}=globalThis,Uc=()=>globalThis?.matchMedia?!!globalThis.matchMedia(`(prefers-reduced-motion: reduce)`)?.matches:!1,Uc(),globalThis.FEATURES?.backgrounds,{step:Wc}=lc({step:async(e,t,n)=>t(n)},{intercept:!0}),{addons:Gc}=__STORYBOOK_MODULE_PREVIEW_API__,{STORY_RENDER_PHASE_CHANGED:Kc}=__STORYBOOK_MODULE_CORE_EVENTS__,qc={chevronLeft:[`M9.10355 10.1464C9.29882 10.3417 9.29882 10.6583 9.10355 10.8536C8.90829 11.0488 8.59171 11.0488 8.39645 10.8536L4.89645 7.35355C4.70118 7.15829 4.70118 6.84171 4.89645 6.64645L8.39645 3.14645C8.59171 2.95118 8.90829 2.95118 9.10355 3.14645C9.29882 3.34171 9.29882 3.65829 9.10355 3.85355L5.95711 7L9.10355 10.1464Z`],chevronRight:[`M4.89645 10.1464C4.70118 10.3417 4.70118 10.6583 4.89645 10.8536C5.09171 11.0488 5.40829 11.0488 5.60355 10.8536L9.10355 7.35355C9.29882 7.15829 9.29882 6.84171 9.10355 6.64645L5.60355 3.14645C5.40829 2.95118 5.09171 2.95118 4.89645 3.14645C4.70118 3.34171 4.70118 3.65829 4.89645 3.85355L8.04289 7L4.89645 10.1464Z`],info:[`M7 5.5a.5.5 0 01.5.5v4a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zM7 4.5A.75.75 0 107 3a.75.75 0 000 1.5z`,`M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z`],shareAlt:[`M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z`,`M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z`]},Jc=`svg,path,rect,circle,line,polyline,polygon,ellipse,text`.split(`,`),Z=(e,t={},n)=>{let r=Jc.includes(e)?document.createElementNS(`http://www.w3.org/2000/svg`,e):document.createElement(e);return Object.entries(t).forEach(([e,t])=>{/[A-Z]/.test(e)?(e===`onClick`&&(r.addEventListener(`click`,t),r.addEventListener(`keydown`,e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())})),e===`onMouseEnter`&&r.addEventListener(`mouseenter`,t),e===`onMouseLeave`&&r.addEventListener(`mouseleave`,t)):r.setAttribute(e,t)}),n?.forEach(e=>{if(!(e==null||e===!1))try{r.appendChild(e)}catch{r.appendChild(document.createTextNode(String(e)))}}),r},Yc=e=>qc[e]&&Z(`svg`,{width:`14`,height:`14`,viewBox:`0 0 14 14`,xmlns:`http://www.w3.org/2000/svg`},qc[e].map(e=>Z(`path`,{fill:`currentColor`,"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:e}))),Xc=e=>{if(`elements`in e){let{elements:t,color:n,style:r}=e;return{id:void 0,priority:0,selectors:t,styles:{outline:`2px ${r} ${n}`,outlineOffset:`2px`,boxShadow:`0 0 0 6px rgba(255,255,255,0.6)`},menu:void 0}}let{menu:t,...n}=e;return{id:void 0,priority:0,styles:{outline:`2px dashed #029cfd`},...n,menu:Array.isArray(t)?t.every(Array.isArray)?t:[t]:void 0}},Zc=e=>e instanceof Function,Qc=new Map,$c=new Map,el=new Map,Q=e=>{let t=Symbol();return $c.set(t,[]),Qc.set(t,e),{get:()=>Qc.get(t),set:e=>{let n=Qc.get(t),r=Zc(e)?e(n):e;r!==n&&(Qc.set(t,r),$c.get(t)?.forEach(e=>{el.get(e)?.(),el.set(e,e(r))}))},subscribe:e=>($c.get(t)?.push(e),()=>{let n=$c.get(t);n&&$c.set(t,n.filter(t=>t!==e))}),teardown:()=>{$c.get(t)?.forEach(e=>{el.get(e)?.(),el.delete(e)}),$c.delete(t),Qc.delete(t)}}},tl=e=>{let t=document.getElementById(`storybook-root`),n=new Map;for(let r of e){let{priority:e=0}=r;for(let i of r.selectors){let a=[...document.querySelectorAll(`:is(${i}):not([id^="storybook-"], [id^="storybook-"] *, [class^="sb-"], [class^="sb-"] *)`),...t?.querySelectorAll(i)||[]];for(let t of a){let a=n.get(t);(!a||a.priority<=e)&&n.set(t,{...r,priority:e,selectors:Array.from(new Set((a?.selectors||[]).concat(i)))})}}}return n},nl=e=>Array.from(e.entries()).map(([e,{selectors:t,styles:n,hoverStyles:r,focusStyles:i,menu:a}])=>{let{top:o,left:s,width:c,height:l}=e.getBoundingClientRect(),{position:u}=getComputedStyle(e);return{element:e,selectors:t,styles:n,hoverStyles:r,focusStyles:i,menu:a,top:u===`fixed`?o:o+window.scrollY,left:u===`fixed`?s:s+window.scrollX,width:c,height:l}}).sort((e,t)=>t.width*t.height-e.width*e.height),rl=(e,t)=>{let n=e.getBoundingClientRect(),{x:r,y:i}=t;return n?.top&&n?.left&&r>=n.left&&r<=n.left+n.width&&i>=n.top&&i<=n.top+n.height},il=(e,t,n)=>{if(!t||!n)return!1;let{left:r,top:i,width:a,height:o}=e;o<28&&(i-=Math.round((28-o)/2),o=28),a<28&&(r-=Math.round((28-a)/2),a=28),t.style.position===`fixed`&&(r+=window.scrollX,i+=window.scrollY);let{x:s,y:c}=n;return s>=r&&s<=r+a&&c>=i&&c<=i+o},al=(e,t,n={})=>{let{x:r,y:i}=t,{margin:a=5,topOffset:o=0,centered:s=!1}=n,{scrollX:c,scrollY:l,innerHeight:u,innerWidth:d}=window,f=Math.min(e.style.position===`fixed`?i-l:i,u-e.clientHeight-a-o+l),p=s?e.clientWidth/2:0,m=e.style.position===`fixed`?Math.max(Math.min(r-c,d-p-a),p+a):Math.max(Math.min(r,d-p-a+c),p+a+c);Object.assign(e.style,{...m!==r&&{left:`${m}px`},...f!==i&&{top:`${f}px`}})},ol=e=>{window.HTMLElement.prototype.hasOwnProperty(`showPopover`)&&e.showPopover()},sl=e=>{window.HTMLElement.prototype.hasOwnProperty(`showPopover`)&&e.hidePopover()},cl=e=>({top:e.top,left:e.left,width:e.width,height:e.height,selectors:e.selectors,element:{attributes:Object.fromEntries(Array.from(e.element.attributes).map(e=>[e.name,e.value])),localName:e.element.localName,tagName:e.element.tagName,outerHTML:e.element.outerHTML}}),$=`storybook-highlights-menu`,ll=`storybook-highlights-root`,ul=`storybook-root`,dl=e=>{if(globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED)return;globalThis.__STORYBOOK_HIGHLIGHT_INITIALIZED=!0;let{document:t}=globalThis,n=Q([]),r=Q(new Map),i=Q([]),a=Q(),o=Q(),s=Q([]),c=Q([]),l=Q(),u=Q(),d=t.getElementById(ll);n.subscribe(()=>{d||(d=Z(`div`,{id:ll}),t.body.appendChild(d))}),n.subscribe(e=>{let n=t.getElementById(ul);if(!n)return;r.set(tl(e));let i=new MutationObserver(()=>r.set(tl(e)));return i.observe(n,{subtree:!0,childList:!0}),()=>{i.disconnect()}}),r.subscribe(e=>{let n=()=>requestAnimationFrame(()=>i.set(nl(e))),r=new ResizeObserver(n);r.observe(t.body),Array.from(e.keys()).forEach(e=>r.observe(e));let a=Array.from(t.body.querySelectorAll(`*`)).filter(e=>{let{overflow:t,overflowX:n,overflowY:r}=window.getComputedStyle(e);return[`auto`,`scroll`].some(e=>[t,n,r].includes(e))});return a.forEach(e=>e.addEventListener(`scroll`,n)),()=>{r.disconnect(),a.forEach(e=>e.removeEventListener(`scroll`,n))}}),r.subscribe(e=>{let n=Array.from(e.keys()).filter(({style:e})=>e.position===`sticky`),r=()=>requestAnimationFrame(()=>{i.set(e=>e.map(e=>{if(n.includes(e.element)){let{top:t,left:n}=e.element.getBoundingClientRect();return{...e,top:t+window.scrollY,left:n+window.scrollX}}return e}))});return t.addEventListener(`scroll`,r),()=>t.removeEventListener(`scroll`,r)}),r.subscribe(e=>{s.set(t=>t.filter(({element:t})=>e.has(t)))}),s.subscribe(e=>{e.length?(u.set(t=>e.some(e=>e.element===t?.element)?t:void 0),l.set(t=>e.some(e=>e.element===t?.element)?t:void 0)):(u.set(void 0),l.set(void 0),a.set(void 0))});let f=new Map(new Map);n.subscribe(e=>{e.forEach(({keyframes:e})=>{if(e){let n=f.get(e);n||(n=t.createElement(`style`),n.setAttribute(`data-highlight`,`keyframes`),f.set(e,n),t.head.appendChild(n)),n.innerHTML=e}}),f.forEach((t,n)=>{e.some(e=>e.keyframes===n)||(t.remove(),f.delete(n))})});let p=new Map(new Map);i.subscribe(e=>{e.forEach(e=>{let t=p.get(e.element);if(d&&!t){let n={popover:`manual`,"data-highlight-dimensions":`w${e.width.toFixed(0)}h${e.height.toFixed(0)}`,"data-highlight-coordinates":`x${e.left.toFixed(0)}y${e.top.toFixed(0)}`};t=d.appendChild(Z(`div`,n,[Z(`div`)])),p.set(e.element,t)}}),p.forEach((t,n)=>{e.some(({element:e})=>e===n)||(t.remove(),p.delete(n))})}),i.subscribe(e=>{let n=e.filter(e=>e.menu);if(!n.length)return;let r=e=>{requestAnimationFrame(()=>{let r=t.getElementById($),i={x:e.pageX,y:e.pageY};if(r&&!rl(r,i)){let e=n.filter(e=>il(e,p.get(e.element),i));a.set(e.length?i:void 0),s.set(e)}})};return t.addEventListener(`click`,r),()=>t.removeEventListener(`click`,r)});let m=()=>{let e=t.getElementById($),n=o.get();!n||e&&rl(e,n)||c.set(e=>{let t=i.get().filter(e=>il(e,p.get(e.element),n)),r=e.filter(e=>t.includes(e)),a=t.filter(t=>!e.includes(t)),o=e.length-r.length;return a.length||o?[...r,...a]:e})};o.subscribe(m),i.subscribe(m);let h=()=>{let e=u.get(),t=e?[e]:s.get(),n=t.length===1?t[0]:l.get(),r=a.get()!==void 0;i.get().forEach(e=>{let i=p.get(e.element);if(i){let a=n===e,o=r?n?a:t.includes(e):c.get()?.includes(e);Object.assign(i.style,{animation:`none`,background:`transparent`,border:`none`,boxSizing:`border-box`,outline:`none`,outlineOffset:`0px`,...e.styles,...o?e.hoverStyles:{},...a?e.focusStyles:{},position:getComputedStyle(e.element).position===`fixed`?`fixed`:`absolute`,zIndex:Fn-10,top:`${e.top}px`,left:`${e.left}px`,width:`${e.width}px`,height:`${e.height}px`,margin:0,padding:0,cursor:e.menu&&o?`pointer`:`default`,pointerEvents:e.menu?`auto`:`none`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`visible`}),Object.assign(i.children[0].style,{width:`100%`,height:`100%`,minHeight:`28px`,minWidth:`28px`,boxSizing:`content-box`,padding:i.style.outlineWidth||`0px`}),ol(i)}})};i.subscribe(h),s.subscribe(h),c.subscribe(h),l.subscribe(h),u.subscribe(h);let g=()=>{if(!d)return;let n=t.getElementById($);if(n)n.innerHTML=``;else{let e={id:$,popover:`manual`};n=d.appendChild(Z(`div`,e)),d.appendChild(Z(`style`,{},[`
|
|
#${$} {
|
|
position: absolute;
|
|
z-index: ${Fn};
|
|
width: 300px;
|
|
padding: 0px;
|
|
margin: 15px 0 0 0;
|
|
transform: translateX(-50%);
|
|
font-family: "Nunito Sans", -apple-system, ".SFNSText-Regular", "San Francisco", BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
font-size: 12px;
|
|
background: white;
|
|
border: none;
|
|
border-radius: 6px;
|
|
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.05), 0 5px 15px 0 rgba(0, 0, 0, 0.1);
|
|
color: #2E3438;
|
|
}
|
|
#${$} ul {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
#${$} > ul {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
padding: 4px 0;
|
|
}
|
|
#${$} li {
|
|
padding: 0 4px;
|
|
margin: 0;
|
|
}
|
|
#${$} li > :not(ul) {
|
|
display: flex;
|
|
padding: 8px;
|
|
margin: 0;
|
|
align-items: center;
|
|
gap: 8px;
|
|
border-radius: 4px;
|
|
}
|
|
#${$} button {
|
|
width: 100%;
|
|
border: 0;
|
|
background: transparent;
|
|
color: inherit;
|
|
text-align: left;
|
|
font-family: inherit;
|
|
font-size: inherit;
|
|
}
|
|
#${$} button:focus-visible {
|
|
outline-color: #029CFD;
|
|
}
|
|
#${$} button:hover {
|
|
background: rgba(2, 156, 253, 0.07);
|
|
color: #029CFD;
|
|
cursor: pointer;
|
|
}
|
|
#${$} li code {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
line-height: 16px;
|
|
font-size: 11px;
|
|
}
|
|
#${$} li svg {
|
|
flex-shrink: 0;
|
|
margin: 1px;
|
|
color: #73828C;
|
|
}
|
|
#${$} li > button:hover svg, #${$} li > button:focus-visible svg {
|
|
color: #029CFD;
|
|
}
|
|
#${$} .element-list li svg {
|
|
display: none;
|
|
}
|
|
#${$} li.selectable svg, #${$} li.selected svg {
|
|
display: block;
|
|
}
|
|
#${$} .menu-list {
|
|
border-top: 1px solid rgba(38, 85, 115, 0.15);
|
|
}
|
|
#${$} .menu-list > li:not(:last-child) {
|
|
padding-bottom: 4px;
|
|
margin-bottom: 4px;
|
|
border-bottom: 1px solid rgba(38, 85, 115, 0.15);
|
|
}
|
|
#${$} .menu-items, #${$} .menu-items li {
|
|
padding: 0;
|
|
}
|
|
#${$} .menu-item {
|
|
display: flex;
|
|
}
|
|
#${$} .menu-item-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-grow: 1;
|
|
}
|
|
`]))}let r=u.get(),i=r?[r]:s.get();if(i.length&&(n.style.position=getComputedStyle(i[0].element).position===`fixed`?`fixed`:`absolute`,n.appendChild(Z(`ul`,{class:`element-list`},i.map(e=>{let t=i.length>1&&!!e.menu?.some(t=>t.some(t=>!t.selectors||t.selectors.some(t=>e.selectors.includes(t)))),n=t?{class:`selectable`,onClick:()=>u.set(e),onMouseEnter:()=>l.set(e),onMouseLeave:()=>l.set(void 0)}:r?{class:`selected`,onClick:()=>u.set(void 0)}:{},a=t||r;return Z(`li`,n,[Z(a?`button`:`div`,a?{type:`button`}:{},[r?Yc(`chevronLeft`):null,Z(`code`,{},[e.element.outerHTML]),t?Yc(`chevronRight`):null])])})))),u.get()||s.get().length===1){let t=u.get()||s.get()[0],r=t.menu?.filter(e=>e.some(e=>!e.selectors||e.selectors.some(e=>t.selectors.includes(e))));r?.length&&n.appendChild(Z(`ul`,{class:`menu-list`},r.map(n=>Z(`li`,{},[Z(`ul`,{class:`menu-items`},n.map(({id:n,title:r,description:i,iconLeft:a,iconRight:o,clickEvent:s})=>{let c=s&&(()=>e.emit(s,n,cl(t)));return Z(`li`,{},[Z(c?`button`:`div`,c?{class:`menu-item`,type:`button`,onClick:c}:{class:`menu-item`},[a?Yc(a):null,Z(`div`,{class:`menu-item-content`},[Z(i?`strong`:`span`,{},[r]),i&&Z(`span`,{},[i])]),o?Yc(o):null])])}))]))))}let o=a.get();o?(Object.assign(n.style,{display:`block`,left:`${n.style.position===`fixed`?o.x-window.scrollX:o.x}px`,top:`${n.style.position===`fixed`?o.y-window.scrollY:o.y}px`}),ol(n),requestAnimationFrame(()=>al(n,o,{topOffset:15,centered:!0}))):(sl(n),Object.assign(n.style,{display:`none`}))};s.subscribe(g),u.subscribe(g);let _=e=>{let t=Xc(e);n.set(e=>{let n=t.id?e.filter(e=>e.id!==t.id):e;return t.selectors?.length?[...n,t]:n})},v=e=>{e&&n.set(t=>t.filter(t=>t.id!==e))},y=()=>{n.set([]),r.set(new Map),i.set([]),a.set(void 0),o.set(void 0),s.set([]),c.set([]),l.set(void 0),u.set(void 0)},b;t.body.addEventListener(`mousemove`,e=>{requestAnimationFrame(()=>o.set({x:e.pageX,y:e.pageY}))}),e.on(jn,_),e.on(Mn,v),e.on(Nn,y),e.on(Pn,(e,r)=>{let i=`scrollIntoView-highlight`;clearTimeout(b),v(i);let a=t.querySelector(e);if(!a){console.warn(`Cannot scroll into view: ${e} not found`);return}a.scrollIntoView({behavior:`smooth`,block:`center`,...r});let o=`kf-${Math.random().toString(36).substring(2,15)}`;n.set(t=>[...t,{id:i,priority:1e3,selectors:[e],styles:{outline:`2px solid #1EA7FD`,outlineOffset:`-1px`,animation:`${o} 3s linear forwards`},keyframes:`@keyframes ${o} {
|
|
0% { outline: 2px solid #1EA7FD; }
|
|
20% { outline: 2px solid #1EA7FD00; }
|
|
40% { outline: 2px solid #1EA7FD; }
|
|
60% { outline: 2px solid #1EA7FD00; }
|
|
80% { outline: 2px solid #1EA7FD; }
|
|
100% { outline: 2px solid #1EA7FD00; }
|
|
}`}]),b=setTimeout(()=>v(i),3500)}),e.on(Kc,({newPhase:e})=>{e===`loading`&&y()})},globalThis?.FEATURES?.highlight&&Gc?.ready&&Gc.ready().then(dl),{useEffect:fl}=__STORYBOOK_MODULE_PREVIEW_API__,{global:pl}=__STORYBOOK_MODULE_GLOBAL__,{global:ml}=__STORYBOOK_MODULE_GLOBAL__,{global:hl}=__STORYBOOK_MODULE_GLOBAL__,globalThis.FEATURES?.measure,{useEffect:gl,useMemo:_l}=__STORYBOOK_MODULE_PREVIEW_API__,{global:vl}=__STORYBOOK_MODULE_GLOBAL__,globalThis.FEATURES?.outline,{clearAllMocks:yl,fn:bl,isMockFunction:xl,resetAllMocks:Sl,restoreAllMocks:Cl,uninstrumentedUserEvent:wl,within:Tl}=__STORYBOOK_MODULE_TEST__,El=e=>e.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,`-`).replace(/-+/g,`-`).replace(/^-+/,``).replace(/-+$/,``),Dl=(e,t)=>{let n=El(e);if(n===``)throw Error(`Invalid ${t} '${e}', must include alphanumeric characters`);return n},Ol=(e,t)=>`${Dl(e,`kind`)}${t?`--${Dl(t,`name`)}`:``}`}));export{f as A,xe as C,b as D,x as E,l as M,y as O,Ce as S,ve as T,ot as _,On as a,ye as b,yn as c,gn as d,wt as f,bn as g,De as h,Ol as i,u as j,d as k,Ut as l,ke as m,kl as n,Dn as o,mn as p,El as r,vn as s,Ac as t,L as u,at as v,we as w,N as x,Te as y}; |