@ncino/web-components 5.1.0-preview.2 → 5.1.0-preview.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/components/page-header/gator/page-header.gator.js +46 -8
  2. package/dist/components/panel/gator/panel.storybook-test.js +1 -1
  3. package/dist/node_modules/.pnpm/storybook@9.0.17_@testing-library_dom@10.4.0_prettier@3.6.2/node_modules/storybook/dist/client-logger/index.js +1 -0
  4. package/dist/node_modules/.pnpm/storybook@9.0.17_@testing-library_dom@10.4.0_prettier@3.6.2/node_modules/storybook/dist/core-events/index.js +1 -0
  5. package/dist/node_modules/.pnpm/storybook@9.0.17_@testing-library_dom@10.4.0_prettier@3.6.2/node_modules/storybook/dist/instrumenter/index.js +48 -0
  6. package/dist/node_modules/.pnpm/storybook@9.0.17_@testing-library_dom@10.4.0_prettier@3.6.2/node_modules/storybook/dist/test/index.js +217 -0
  7. package/dist/packages/web-components/src/components/page-header/gator/page-header.gator.scss.js +1 -1
  8. package/dist/packages/web-components/src/components/text-detail/gator/text-detail.gator.scss.js +1 -1
  9. package/dist/packages/web-components/src/tokens/primitive.tokens.scss.js +1 -1
  10. package/dist/packages/web-components/src/tokens/semantic.tokens.scss.js +1 -1
  11. package/dist/types/components/page-header/gator/page-header.gator.d.ts +5 -0
  12. package/dist/utils/vitest-a11y-utils.js +1 -1
  13. package/dist/utils/vitest-utils.js +1 -1
  14. package/package.json +122 -137
  15. package/web-types.json +6 -1
  16. package/dist/assets/nCino_Avenir.woff +0 -0
  17. package/dist/assets/nCino_AvenirBd.woff +0 -0
  18. package/dist/assets/nCino_AvenirHv.woff +0 -0
  19. package/dist/assets/nCino_AvenirMd.woff +0 -0
  20. package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/channels/index.js +0 -20
  21. package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/client-logger/index.js +0 -1
  22. package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/core-events/index.js +0 -1
  23. package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/csf/index.js +0 -1
  24. package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/preview-api/index.js +0 -70
  25. package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/preview-errors.js +0 -130
  26. package/dist/node_modules/.pnpm/@storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/instrumenter/dist/index.js +0 -48
  27. package/dist/node_modules/.pnpm/@storybook_test@8.6.14_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/test/dist/index.js +0 -193
  28. /package/dist/node_modules/.pnpm/{@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.10_typescript@5.8.3__playwright@1.54.1_bec24bd4d36b5a538258c6baab40b42a → @vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.10_typescript@5.8.3__playwright@1.53.2_77c47ac19cbe97978028e1e5ac862536}/node_modules/@vitest/browser/context.js +0 -0
@@ -1,48 +0,0 @@
1
- import{once as Nn}from"../../../../../@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/client-logger/index.js";import{FORCE_REMOUNT as Qe,STORY_RENDER_PHASE_CHANGED as Tn,SET_CURRENT_STORY as An}from"../../../../../@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/core-events/index.js";import{addons as Mn}from"../../../../../@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/preview-api/index.js";import{global as L}from"../../../../../@storybook_global@5.0.0/node_modules/@storybook/global/dist/index.js";var In=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Pn={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]},Rn=Object.entries(Pn);function ze(e){return String(e)}ze.open="";ze.close="";function Ln(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 Dn(e=!1){let t=Ln(e),n=(o,u,s,a)=>{let c="",f=0;do c+=o.substring(f,a)+s,f=a+u.length,a=o.indexOf(u,f);while(~a);return c+o.substring(f)},r=(o,u,s=o)=>{let a=c=>{let f=String(c),b=f.indexOf(u,o.length);return~b?o+n(f,u,s,b)+u:o+f+u};return a.open=o,a.close=u,a},i={isColorSupported:t},l=o=>`\x1B[${o}m`;for(let[o,u]of Rn)i[o]=t?r(l(u[0]),l(u[1]),u[2]):ze;return i}var Q=Dn(!1);function jn(e,t){let n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let i of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,i).enumerable&&r.push(i);return r}function $e(e,t,n,r,i,l,o=": "){let u="",s=0,a=e.next();if(!a.done){u+=t.spacingOuter;let c=n+t.indent;for(;!a.done;){if(u+=c,s++===t.maxWidth){u+="…";break}let f=l(a.value[0],t,c,r,i),b=l(a.value[1],t,c,r,i);u+=f+o+b,a=e.next(),a.done?t.min||(u+=","):u+=`,${t.spacingInner}`}u+=t.spacingOuter+n}return u}function Ue(e,t,n,r,i,l){let o="",u=0,s=e.next();if(!s.done){o+=t.spacingOuter;let a=n+t.indent;for(;!s.done;){if(o+=a,u++===t.maxWidth){o+="…";break}o+=l(s.value,t,a,r,i),s=e.next(),s.done?t.min||(o+=","):o+=`,${t.spacingInner}`}o+=t.spacingOuter+n}return o}function _e(e,t,n,r,i,l){let o="";e=e instanceof ArrayBuffer?new DataView(e):e;let u=a=>a instanceof DataView,s=u(e)?e.byteLength:e.length;if(s>0){o+=t.spacingOuter;let a=n+t.indent;for(let c=0;c<s;c++){if(o+=a,c===t.maxWidth){o+="…";break}(u(e)||c in e)&&(o+=l(u(e)?e.getInt8(c):e[c],t,a,r,i)),c<s-1?o+=`,${t.spacingInner}`:t.min||(o+=",")}o+=t.spacingOuter+n}return o}function Ke(e,t,n,r,i,l){let o="",u=jn(e,t.compareKeys);if(u.length>0){o+=t.spacingOuter;let s=n+t.indent;for(let a=0;a<u.length;a++){let c=u[a],f=l(c,t,s,r,i),b=l(e[c],t,s,r,i);o+=`${s+f}: ${b}`,a<u.length-1?o+=`,${t.spacingInner}`:t.min||(o+=",")}o+=t.spacingOuter+n}return o}var Fn=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,Ee=" ",Bn=(e,t,n,r,i,l)=>{let o=e.toString();if(o==="ArrayContaining"||o==="ArrayNotContaining")return++r>t.maxDepth?`[${o}]`:`${o+Ee}[${_e(e.sample,t,n,r,i,l)}]`;if(o==="ObjectContaining"||o==="ObjectNotContaining")return++r>t.maxDepth?`[${o}]`:`${o+Ee}{${Ke(e.sample,t,n,r,i,l)}}`;if(o==="StringMatching"||o==="StringNotMatching"||o==="StringContaining"||o==="StringNotContaining")return o+Ee+l(e.sample,t,n,r,i);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},xn=e=>e&&e.$$typeof===Fn,kn={serialize:Bn,test:xn},zn=" ",Kt=new Set(["DOMStringMap","NamedNodeMap"]),Un=/^(?:HTML\w*Collection|NodeList)$/;function Kn(e){return Kt.has(e)||Un.test(e)}var qn=e=>e&&e.constructor&&!!e.constructor.name&&Kn(e.constructor.name);function Wn(e){return e.constructor.name==="NamedNodeMap"}var Yn=(e,t,n,r,i,l)=>{let o=e.constructor.name;return++r>t.maxDepth?`[${o}]`:(t.min?"":o+zn)+(Kt.has(o)?`{${Ke(Wn(e)?[...e].reduce((u,s)=>(u[s.name]=s.value,u),{}):{...e},t,n,r,i,l)}}`:`[${_e([...e],t,n,r,i,l)}]`)},Vn={serialize:Yn,test:qn};function qt(e){return e.replaceAll("<","&lt;").replaceAll(">","&gt;")}function qe(e,t,n,r,i,l,o){let u=r+n.indent,s=n.colors;return e.map(a=>{let c=t[a],f=o(c,n,u,i,l);return typeof c!="string"&&(f.includes(`
2
- `)&&(f=n.spacingOuter+u+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+s.prop.open+a+s.prop.close}=${s.value.open}${f}${s.value.close}`}).join("")}function We(e,t,n,r,i,l){return e.map(o=>t.spacingOuter+n+(typeof o=="string"?Wt(o,t):l(o,t,n,r,i))).join("")}function Wt(e,t){let n=t.colors.content;return n.open+qt(e)+n.close}function Hn(e,t){let n=t.colors.comment;return`${n.open}<!--${qt(e)}-->${n.close}`}function Ye(e,t,n,r,i){let l=r.colors.tag;return`${l.open}<${e}${t&&l.close+t+r.spacingOuter+i+l.open}${n?`>${l.close}${n}${r.spacingOuter}${i}${l.open}</${e}`:`${t&&!r.min?"":" "}/`}>${l.close}`}function Ve(e,t){let n=t.colors.tag;return`${n.open}<${e}${n.close} …${n.open} />${n.close}`}var Gn=1,Yt=3,Vt=8,Ht=11,Jn=/^(?:(?:HTML|SVG)\w*)?Element$/;function Xn(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function Zn(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,i=typeof r=="string"&&r.includes("-")||Xn(e);return n===Gn&&(Jn.test(t)||i)||n===Yt&&t==="Text"||n===Vt&&t==="Comment"||n===Ht&&t==="DocumentFragment"}var Qn=e=>{var t;return((t=e?.constructor)==null?void 0:t.name)&&Zn(e)};function vn(e){return e.nodeType===Yt}function er(e){return e.nodeType===Vt}function Ce(e){return e.nodeType===Ht}var tr=(e,t,n,r,i,l)=>{if(vn(e))return Wt(e.data,t);if(er(e))return Hn(e.data,t);let o=Ce(e)?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?Ve(o,t):Ye(o,qe(Ce(e)?[]:Array.from(e.attributes,u=>u.name).sort(),Ce(e)?{}:[...e.attributes].reduce((u,s)=>(u[s.name]=s.value,u),{}),t,n+t.indent,r,i,l),We(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,i,l),t,n)},nr={serialize:tr,test:Qn},rr="@@__IMMUTABLE_ITERABLE__@@",ir="@@__IMMUTABLE_LIST__@@",or="@@__IMMUTABLE_KEYED__@@",lr="@@__IMMUTABLE_MAP__@@",ve="@@__IMMUTABLE_ORDERED__@@",ur="@@__IMMUTABLE_RECORD__@@",sr="@@__IMMUTABLE_SEQ__@@",cr="@@__IMMUTABLE_SET__@@",ar="@@__IMMUTABLE_STACK__@@",ae=e=>`Immutable.${e}`,Oe=e=>`[${e}]`,fe=" ",et="…";function gr(e,t,n,r,i,l,o){return++r>t.maxDepth?Oe(ae(o)):`${ae(o)+fe}{${$e(e.entries(),t,n,r,i,l)}}`}function hr(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 fr(e,t,n,r,i,l){let o=ae(e._name||"Record");return++r>t.maxDepth?Oe(o):`${o+fe}{${$e(hr(e),t,n,r,i,l)}}`}function mr(e,t,n,r,i,l){let o=ae("Seq");return++r>t.maxDepth?Oe(o):e[or]?`${o+fe}{${e._iter||e._object?$e(e.entries(),t,n,r,i,l):et}}`:`${o+fe}[${e._iter||e._array||e._collection||e._iterable?Ue(e.values(),t,n,r,i,l):et}]`}function Ne(e,t,n,r,i,l,o){return++r>t.maxDepth?Oe(ae(o)):`${ae(o)+fe}[${Ue(e.values(),t,n,r,i,l)}]`}var pr=(e,t,n,r,i,l)=>e[lr]?gr(e,t,n,r,i,l,e[ve]?"OrderedMap":"Map"):e[ir]?Ne(e,t,n,r,i,l,"List"):e[cr]?Ne(e,t,n,r,i,l,e[ve]?"OrderedSet":"Set"):e[ar]?Ne(e,t,n,r,i,l,"Stack"):e[sr]?mr(e,t,n,r,i,l):fr(e,t,n,r,i,l),yr=e=>e&&(e[rr]===!0||e[ur]===!0),br={serialize:pr,test:yr},tt={exports:{}},C={},nt;function Sr(){if(nt)return C;nt=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"),l=Symbol.for("react.provider"),o=Symbol.for("react.context"),u=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function p(g){if(typeof g=="object"&&g!==null){var S=g.$$typeof;switch(S){case e:switch(g=g.type,g){case n:case i:case r:case a:case c:return g;default:switch(g=g&&g.$$typeof,g){case u:case o:case s:case b:case f:case l:return g;default:return S}}case t:return S}}}return C.ContextConsumer=o,C.ContextProvider=l,C.Element=e,C.ForwardRef=s,C.Fragment=n,C.Lazy=b,C.Memo=f,C.Portal=t,C.Profiler=i,C.StrictMode=r,C.Suspense=a,C.SuspenseList=c,C.isAsyncMode=function(){return!1},C.isConcurrentMode=function(){return!1},C.isContextConsumer=function(g){return p(g)===o},C.isContextProvider=function(g){return p(g)===l},C.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},C.isForwardRef=function(g){return p(g)===s},C.isFragment=function(g){return p(g)===n},C.isLazy=function(g){return p(g)===b},C.isMemo=function(g){return p(g)===f},C.isPortal=function(g){return p(g)===t},C.isProfiler=function(g){return p(g)===i},C.isStrictMode=function(g){return p(g)===r},C.isSuspense=function(g){return p(g)===a},C.isSuspenseList=function(g){return p(g)===c},C.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===n||g===i||g===r||g===a||g===c||g===h||typeof g=="object"&&g!==null&&(g.$$typeof===b||g.$$typeof===f||g.$$typeof===l||g.$$typeof===o||g.$$typeof===s||g.$$typeof===m||g.getModuleId!==void 0)},C.typeOf=p,C}var rt;function _r(){return rt||(rt=1,tt.exports=Sr()),tt.exports}var re=_r();function Gt(e,t=[]){if(Array.isArray(e))for(let n of e)Gt(n,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function it(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(re.isFragment(e))return"React.Fragment";if(re.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(re.isContextProvider(e))return"Context.Provider";if(re.isContextConsumer(e))return"Context.Consumer";if(re.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(re.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return"UNDEFINED"}function $r(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}var Or=(e,t,n,r,i,l)=>++r>t.maxDepth?Ve(it(e),t):Ye(it(e),qe($r(e),e.props,t,n+t.indent,r,i,l),We(Gt(e.props.children),t,n+t.indent,r,i,l),t,n),dr=e=>e!=null&&re.isElement(e),wr={serialize:Or,test:dr},Er=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function Cr(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}var Nr=(e,t,n,r,i,l)=>++r>t.maxDepth?Ve(e.type,t):Ye(e.type,e.props?qe(Cr(e),e.props,t,n+t.indent,r,i,l):"",e.children?We(e.children,t,n+t.indent,r,i,l):"",t,n),Tr=e=>e&&e.$$typeof===Er,Ar={serialize:Nr,test:Tr},Jt=Object.prototype.toString,Mr=Date.prototype.toISOString,Ir=Error.prototype.toString,ot=RegExp.prototype.toString;function Te(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function Pr(e){return typeof window<"u"&&e===window}var Rr=/^Symbol\((.*)\)(.*)$/,Lr=/\n/g,Xt=class extends Error{constructor(e,t){super(e),this.stack=t,this.name=this.constructor.name}};function Dr(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 jr(e){return Object.is(e,-0)?"-0":String(e)}function Fr(e){return`${e}n`}function lt(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function ut(e){return String(e).replace(Rr,"Symbol($1)")}function st(e){return`[${Ir.call(e)}]`}function Zt(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 jr(e);if(i==="bigint")return Fr(e);if(i==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(i==="function")return lt(e,t);if(i==="symbol")return ut(e);let l=Jt.call(e);return l==="[object WeakMap]"?"WeakMap {}":l==="[object WeakSet]"?"WeakSet {}":l==="[object Function]"||l==="[object GeneratorFunction]"?lt(e,t):l==="[object Symbol]"?ut(e):l==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":Mr.call(e):l==="[object Error]"?st(e):l==="[object RegExp]"?n?ot.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):ot.call(e):e instanceof Error?st(e):null}function Qt(e,t,n,r,i,l){if(i.includes(e))return"[Circular]";i=[...i],i.push(e);let o=++r>t.maxDepth,u=t.min;if(t.callToJSON&&!o&&e.toJSON&&typeof e.toJSON=="function"&&!l)return ee(e.toJSON(),t,n,r,i,!0);let s=Jt.call(e);return s==="[object Arguments]"?o?"[Arguments]":`${u?"":"Arguments "}[${_e(e,t,n,r,i,ee)}]`:Dr(s)?o?`[${e.constructor.name}]`:`${u||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${_e(e,t,n,r,i,ee)}]`:s==="[object Map]"?o?"[Map]":`Map {${$e(e.entries(),t,n,r,i,ee," => ")}}`:s==="[object Set]"?o?"[Set]":`Set {${Ue(e.values(),t,n,r,i,ee)}}`:o||Pr(e)?`[${Te(e)}]`:`${u||!t.printBasicPrototype&&Te(e)==="Object"?"":`${Te(e)} `}{${Ke(e,t,n,r,i,ee)}}`}function Br(e){return e.serialize!=null}function vt(e,t,n,r,i,l){let o;try{o=Br(e)?e.serialize(t,n,r,i,l,ee):e.print(t,u=>ee(u,n,r,i,l),u=>{let s=r+n.indent;return s+u.replaceAll(Lr,`
3
- ${s}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(u){throw new Xt(u.message,u.stack)}if(typeof o!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof o}".`);return o}function en(e,t){for(let n of e)try{if(n.test(t))return n}catch(r){throw new Xt(r.message,r.stack)}return null}function ee(e,t,n,r,i,l){let o=en(t.plugins,e);if(o!==null)return vt(o,e,t,n,r,i);let u=Zt(e,t.printFunctionName,t.escapeRegex,t.escapeString);return u!==null?u:Qt(e,t,n,r,i,l)}var He={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},tn=Object.keys(He),K={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:He};function xr(e){for(let t of Object.keys(e))if(!Object.prototype.hasOwnProperty.call(K,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}function kr(){return tn.reduce((e,t)=>{let n=He[t],r=n&&Q[n];if(r&&typeof r.close=="string"&&typeof r.open=="string")e[t]=r;else throw new 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 tn.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function nn(e){return e?.printFunctionName??K.printFunctionName}function rn(e){return e?.escapeRegex??K.escapeRegex}function on(e){return e?.escapeString??K.escapeString}function ct(e){return{callToJSON:e?.callToJSON??K.callToJSON,colors:e?.highlight?kr():zr(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:K.compareKeys,escapeRegex:rn(e),escapeString:on(e),indent:e?.min?"":Ur(e?.indent??K.indent),maxDepth:e?.maxDepth??K.maxDepth,maxWidth:e?.maxWidth??K.maxWidth,min:e?.min??K.min,plugins:e?.plugins??K.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:nn(e),spacingInner:e?.min?" ":`
4
- `,spacingOuter:e?.min?"":`
5
- `}}function Ur(e){return Array.from({length:e+1}).join(" ")}function Y(e,t){if(t&&(xr(t),t.plugins)){let r=en(t.plugins,e);if(r!==null)return vt(r,e,ct(t),"",0,[])}let n=Zt(e,nn(t),rn(t),on(t));return n!==null?n:Qt(e,ct(t),"",0,[])}var ln={AsymmetricMatcher:kn,DOMCollection:Vn,DOMElement:nr,Immutable:br,ReactElement:wr,ReactTestComponent:Ar},at={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"]},Kr={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},ge="…";function qr(e,t){let n=at[Kr[t]]||at[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}function Wr({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:l=1/0,breakLength:o=1/0,seen:u=[],truncate:s=1/0,stylize:a=String}={},c){let f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(l),breakLength:Number(o),truncate:Number(s),seen:u,inspect:c,stylize:a};return f.colors&&(f.stylize=qr),f}function Yr(e){return e>="\uD800"&&e<="\uDBFF"}function te(e,t,n=ge){e=String(e);let r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let l=t-r;return l>0&&Yr(e[l-1])&&(l=l-1),`${e.slice(0,l)}${n}`}return e}function q(e,t,n,r=", "){n=n||t.inspect;let i=e.length;if(i===0)return"";let l=t.truncate,o="",u="",s="";for(let a=0;a<i;a+=1){let c=a+1===e.length,f=a+2===e.length;s=`${ge}(${e.length-a})`;let b=e[a];t.truncate=l-o.length-(c?0:r.length);let h=u||n(b,t)+(c?"":r),m=o.length+h.length,p=m+s.length;if(c&&m>l&&o.length+s.length<=l||!c&&!f&&p>l||(u=c?"":n(e[a+1],t)+(f?"":r),!c&&f&&p>l&&m+u.length>l))break;if(o+=h,!c&&!f&&m+u.length>=l){s=`${ge}(${e.length-a-1})`;break}s=""}return`${o}${s}`}function Vr(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function me([e,t],n){return n.truncate-=2,typeof e=="string"?e=Vr(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}function Hr(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;let r=q(e,t);t.truncate-=r.length;let i="";return n.length&&(i=q(n.map(l=>[l,e[l]]),t,me)),`[ ${r}${i?`, ${i}`:""} ]`}var Gr=e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name;function X(e,t){let n=Gr(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 o=0;o<e.length;o++){let u=`${t.stylize(te(e[o],t.truncate),"number")}${o===e.length-1?"":", "}`;if(t.truncate-=u.length,e[o]!==e.length&&t.truncate<=3){i+=`${ge}(${e.length-e[o]+1})`;break}i+=u}let l="";return r.length&&(l=q(r.map(o=>[o,e[o]]),t,me)),`${n}[ ${i}${l?`, ${l}`:""} ]`}function Jr(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${te(r[1],t.truncate-i.length-1)}`,"date")}function gt(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${te(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function Xr([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}function Zr(e){let t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}function Qr(e,t){return e.size-1<=0?"Map{}":(t.truncate-=7,`Map{ ${q(Zr(e),t,Xr)} }`)}var vr=Number.isNaN||(e=>e!==e);function ht(e,t){return vr(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(te(String(e),t.truncate),"number")}function ft(e,t){let n=te(e.toString(),t.truncate-1);return n!==ge&&(n+="n"),t.stylize(n,"bigint")}function ei(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${te(i,r)}/${n}`,"regexp")}function ti(e){let t=[];return e.forEach(n=>{t.push(n)}),t}function ni(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${q(ti(e),t)} }`)}var mt=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),ri={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},ii=16;function oi(e){return ri[e]||`\\u${`0000${e.charCodeAt(0).toString(ii)}`.slice(-4)}`}function pt(e,t){return mt.test(e)&&(e=e.replace(mt,oi)),t.stylize(`'${te(e,t.truncate-2)}'`,"string")}function yt(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}var un=()=>"Promise{…}";try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(un=(r,i)=>{let[l,o]=e(r);return l===t?"Promise{<pending>}":`Promise${l===n?"!":""}{${i.inspect(o,i)}}`})}catch{}var li=un;function Se(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=q(n.map(u=>[u,e[u]]),t,me),l=q(r.map(u=>[u,e[u]]),t,me);t.seen.pop();let o="";return i&&l&&(o=", "),`{ ${i}${o}${l} }`}var Ae=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function ui(e,t){let n="";return Ae&&Ae in e&&(n=e[Ae]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Se(e,t)}`}function si(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${q(e,t)} ]`)}var ci=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function ai(e,t){let n=Object.getOwnPropertyNames(e).filter(o=>ci.indexOf(o)===-1),r=e.name;t.truncate-=r.length;let i="";if(typeof e.message=="string"?i=te(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 l=q(n.map(o=>[o,e[o]]),t,me);return`${r}${i}${l?` { ${l} }`:""}`}function gi([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function Le(e,t){return q(e,t,sn,`
6
- `)}function sn(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,"special"),l=t.stylize(">","special"),o=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let u="";n.length>0&&(u+=" ",u+=q(n.map(c=>[c,e.getAttribute(c)]),t,gi," ")),t.truncate-=u.length;let s=t.truncate,a=Le(e.children,t);return a&&a.length>s&&(a=`${ge}(${e.children.length})`),`${i}${u}${l}${a}${o}`}var hi=typeof Symbol=="function"&&typeof Symbol.for=="function",Me=hi?Symbol.for("chai/inspect"):"@@chai/inspect",ue=!1;try{let e=In("util");ue=e.inspect?e.inspect.custom:!1}catch{ue=!1}var bt=new WeakMap,St={},_t={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:ht,Number:ht,bigint:ft,BigInt:ft,string:pt,String:pt,function:gt,Function:gt,symbol:yt,Symbol:yt,Array:Hr,Date:Jr,Map:Qr,Set:ni,RegExp:ei,Promise:li,WeakSet:(e,t)=>t.stylize("WeakSet{…}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{…}","special"),Arguments:si,Int8Array:X,Uint8Array:X,Uint8ClampedArray:X,Int16Array:X,Uint16Array:X,Int32Array:X,Uint32Array:X,Float32Array:X,Float64Array:X,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:ai,HTMLCollection:Le,NodeList:Le},fi=(e,t,n)=>Me in e&&typeof e[Me]=="function"?e[Me](t):ue&&ue in e&&typeof e[ue]=="function"?e[ue](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&bt.has(e.constructor)?bt.get(e.constructor)(e,t):St[n]?St[n](e,t):"",mi=Object.prototype.toString;function De(e,t={}){let n=Wr(t,De),{customInspect:r}=n,i=e===null?"null":typeof e;if(i==="object"&&(i=mi.call(e).slice(8,-1)),i in _t)return _t[i](e,n);if(r&&e){let o=fi(e,n,i);if(o)return typeof o=="string"?o:De(o,n)}let l=e?Object.getPrototypeOf(e):!1;return l===Object.prototype||l===null?Se(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?sn(e,n):"constructor"in e?e.constructor!==Object?ui(e,n):Se(e,n):e===Object(e)?Se(e,n):n.stylize(String(e),i)}var{AsymmetricMatcher:pi,DOMCollection:yi,DOMElement:bi,Immutable:Si,ReactElement:_i,ReactTestComponent:$i}=ln,$t=[$i,_i,bi,yi,Si,pi];function pe(e,t=10,{maxLength:n,...r}={}){let i=n??1e4,l;try{l=Y(e,{maxDepth:t,escapeString:!1,plugins:$t,...r})}catch{l=Y(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:$t,...r})}return l.length>=i&&t>1?pe(e,Math.floor(t/2)):l}var Oi=/%[sdjifoOc%]/g;function di(...e){if(typeof e[0]!="string"){let l=[];for(let o=0;o<e.length;o++)l.push(he(e[o],{depth:0,colors:!1}));return l.join(" ")}let t=e.length,n=1,r=e[0],i=String(r).replace(Oi,l=>{if(l==="%%")return"%";if(n>=t)return l;switch(l){case"%s":{let o=e[n++];return typeof o=="bigint"?`${o.toString()}n`:typeof o=="number"&&o===0&&1/o<0?"-0":typeof o=="object"&&o!==null?he(o,{depth:0,colors:!1}):String(o)}case"%d":{let o=e[n++];return typeof o=="bigint"?`${o.toString()}n`:Number(o).toString()}case"%i":{let o=e[n++];return typeof o=="bigint"?`${o.toString()}n`:Number.parseInt(String(o)).toString()}case"%f":return Number.parseFloat(String(e[n++])).toString();case"%o":return he(e[n++],{showHidden:!0,showProxy:!0});case"%O":return he(e[n++]);case"%c":return n++,"";case"%j":try{return JSON.stringify(e[n++])}catch(o){let u=o.message;if(u.includes("circular structure")||u.includes("cyclic structures")||u.includes("cyclic object"))return"[Circular]";throw o}default:return l}});for(let l=e[n];n<t;l=e[++n])l===null||typeof l!="object"?i+=` ${l}`:i+=` ${he(l)}`;return i}function he(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),De(e,t)}function wi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ei(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function je(e){return Object.prototype.toString.apply(e).slice(8,-1)}function Ci(e,t){let n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function cn(e){let t=new Set;return Ei(e)?[]:(Ci(e,t),Array.from(t))}var an={forceWritable:!1};function Ot(e,t=an){return Fe(e,new WeakMap,t)}function Fe(e,t,n=an){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]=Fe(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 l=cn(e);for(let o of l){let u=Object.getOwnPropertyDescriptor(e,o);if(!u)continue;let s=Fe(e[o],t,n);n.forceWritable?Object.defineProperty(i,o,{enumerable:u.enumerable,configurable:!0,writable:!0,value:s}):"get"in u?Object.defineProperty(i,o,{...u,get(){return s}}):Object.defineProperty(i,o,{...u,value:s})}return i}return e}function dt(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 new Error(`value of unknown type: ${e}`)}var P=-1,I=1,A=0,T=class{0;1;constructor(e,t){this[0]=e,this[1]=t}},Ni=function(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,l=0;for(;n<i;)e.substring(l,i)===t.substring(l,i)?(n=i,l=n):r=i,i=Math.floor((r-n)/2+n);return i},gn=function(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,l=0;for(;n<i;)e.substring(e.length-i,e.length-l)===t.substring(t.length-i,t.length-l)?(n=i,l=n):r=i,i=Math.floor((r-n)/2+n);return i},wt=function(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 l=0,o=1;for(;;){let u=e.substring(i-o),s=t.indexOf(u);if(s===-1)return l;o+=s,(s===0||e.substring(i-o)===t.substring(0,o))&&(l=o,o++)}},Ti=function(e){let t=!1,n=[],r=0,i=null,l=0,o=0,u=0,s=0,a=0;for(;l<e.length;)e[l][0]===A?(n[r++]=l,o=s,u=a,s=0,a=0,i=e[l][1]):(e[l][0]===I?s+=e[l][1].length:a+=e[l][1].length,i&&i.length<=Math.max(o,u)&&i.length<=Math.max(s,a)&&(e.splice(n[r-1],0,new T(P,i)),e[n[r-1]+1][0]=I,r--,r--,l=r>0?n[r-1]:-1,o=0,u=0,s=0,a=0,i=null,t=!0)),l++;for(t&&hn(e),Ii(e),l=1;l<e.length;){if(e[l-1][0]===P&&e[l][0]===I){let c=e[l-1][1],f=e[l][1],b=wt(c,f),h=wt(f,c);b>=h?(b>=c.length/2||b>=f.length/2)&&(e.splice(l,0,new T(A,f.substring(0,b))),e[l-1][1]=c.substring(0,c.length-b),e[l+1][1]=f.substring(b),l++):(h>=c.length/2||h>=f.length/2)&&(e.splice(l,0,new T(A,c.substring(0,h))),e[l-1][0]=I,e[l-1][1]=f.substring(0,f.length-h),e[l+1][0]=P,e[l+1][1]=c.substring(h),l++),l++}l++}},Et=/[^a-z0-9]/i,Ct=/\s/,Nt=/[\r\n]/,Ai=/\n\r?\n$/,Mi=/^\r?\n\r?\n/;function Ii(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===A&&e[t+1][0]===A){let n=e[t-1][1],r=e[t][1],i=e[t+1][1],l=gn(n,r);if(l){let c=r.substring(r.length-l);n=n.substring(0,n.length-l),r=c+r.substring(0,r.length-l),i=c+i}let o=n,u=r,s=i,a=ye(n,r)+ye(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 c=ye(n,r)+ye(r,i);c>=a&&(a=c,o=n,u=r,s=i)}e[t-1][1]!==o&&(o?e[t-1][1]=o:(e.splice(t-1,1),t--),e[t][1]=u,s?e[t+1][1]=s:(e.splice(t+1,1),t--))}t++}}function hn(e){e.push(new T(A,""));let t=0,n=0,r=0,i="",l="",o;for(;t<e.length;)switch(e[t][0]){case I:r++,l+=e[t][1],t++;break;case P:n++,i+=e[t][1],t++;break;case A:n+r>1?(n!==0&&r!==0&&(o=Ni(l,i),o!==0&&(t-n-r>0&&e[t-n-r-1][0]===A?e[t-n-r-1][1]+=l.substring(0,o):(e.splice(0,0,new T(A,l.substring(0,o))),t++),l=l.substring(o),i=i.substring(o)),o=gn(l,i),o!==0&&(e[t][1]=l.substring(l.length-o)+e[t][1],l=l.substring(0,l.length-o),i=i.substring(0,i.length-o))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,new T(P,i)),t++),l.length&&(e.splice(t,0,new T(I,l)),t++),t++):t!==0&&e[t-1][0]===A?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i="",l="";break}e[e.length-1][1]===""&&e.pop();let u=!1;for(t=1;t<e.length-1;)e[t-1][0]===A&&e[t+1][0]===A&&(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),u=!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),u=!0)),t++;u&&hn(e)}function ye(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(Et),l=r.match(Et),o=i&&n.match(Ct),u=l&&r.match(Ct),s=o&&n.match(Nt),a=u&&r.match(Nt),c=s&&e.match(Ai),f=a&&t.match(Mi);return c||f?5:s||a?4:i&&!o&&u?3:o||u?2:i||l?1:0}var fn="Compared values have no visual difference.",Pi="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",be={},Tt;function Ri(){if(Tt)return be;Tt=1,Object.defineProperty(be,"__esModule",{value:!0}),be.default=b;let e="diff-sequences",t=0,n=(h,m,p,g,S)=>{let _=0;for(;h<m&&p<g&&S(h,p);)h+=1,p+=1,_+=1;return _},r=(h,m,p,g,S)=>{let _=0;for(;h<=m&&p<=g&&S(m,g);)m-=1,g-=1,_+=1;return _},i=(h,m,p,g,S,_,w)=>{let y=0,O=-h,d=_[y],$=d;_[y]+=n(d+1,m,g+d-O+1,p,S);let N=h<w?h:w;for(y+=1,O+=2;y<=N;y+=1,O+=2){if(y!==h&&$<_[y])d=_[y];else if(d=$+1,m<=d)return y-1;$=_[y],_[y]=d+n(d+1,m,g+d-O+1,p,S)}return w},l=(h,m,p,g,S,_,w)=>{let y=0,O=h,d=_[y],$=d;_[y]-=r(m,d-1,p,g+d-O-1,S);let N=h<w?h:w;for(y+=1,O-=2;y<=N;y+=1,O-=2){if(y!==h&&_[y]<$)d=_[y];else if(d=$-1,d<m)return y-1;$=_[y],_[y]=d-r(m,d-1,p,g+d-O-1,S)}return w},o=(h,m,p,g,S,_,w,y,O,d,$)=>{let N=g-m,V=p-m,D=S-g-V,R=-D-(h-1),F=-D+(h-1),B=t,H=h<y?h:y;for(let E=0,M=-h;E<=H;E+=1,M+=2){let G=E===0||E!==h&&B<w[E],j=G?w[E]:B,k=G?j:j+1,J=N+k-M,z=n(k+1,p,J+1,S,_),U=k+z;if(B=w[E],w[E]=U,R<=M&&M<=F){let ne=(h-1-(M+D))/2;if(ne<=d&&O[ne]-1<=U){let v=N+j-(G?M+1:M-1),x=r(m,j,g,v,_),W=j-x,oe=v-x,le=W+1,we=oe+1;$.nChangePreceding=h-1,h-1===le+we-m-g?($.aEndPreceding=m,$.bEndPreceding=g):($.aEndPreceding=le,$.bEndPreceding=we),$.nCommonPreceding=x,x!==0&&($.aCommonPreceding=le,$.bCommonPreceding=we),$.nCommonFollowing=z,z!==0&&($.aCommonFollowing=k+1,$.bCommonFollowing=J+1);let Xe=U+1,Ze=J+z+1;return $.nChangeFollowing=h-1,h-1===p+S-Xe-Ze?($.aStartFollowing=p,$.bStartFollowing=S):($.aStartFollowing=Xe,$.bStartFollowing=Ze),!0}}}return!1},u=(h,m,p,g,S,_,w,y,O,d,$)=>{let N=S-p,V=p-m,D=S-g-V,R=D-h,F=D+h,B=t,H=h<d?h:d;for(let E=0,M=h;E<=H;E+=1,M-=2){let G=E===0||E!==h&&O[E]<B,j=G?O[E]:B,k=G?j:j-1,J=N+k-M,z=r(m,k-1,g,J-1,_),U=k-z;if(B=O[E],O[E]=U,R<=M&&M<=F){let ne=(h+(M-D))/2;if(ne<=y&&U-1<=w[ne]){let v=J-z;if($.nChangePreceding=h,h===U+v-m-g?($.aEndPreceding=m,$.bEndPreceding=g):($.aEndPreceding=U,$.bEndPreceding=v),$.nCommonPreceding=z,z!==0&&($.aCommonPreceding=U,$.bCommonPreceding=v),$.nChangeFollowing=h-1,h===1)$.nCommonFollowing=0,$.aStartFollowing=p,$.bStartFollowing=S;else{let x=N+j-(G?M-1:M+1),W=n(j,p,x,S,_);$.nCommonFollowing=W,W!==0&&($.aCommonFollowing=j,$.bCommonFollowing=x);let oe=j+W,le=x+W;h-1===p+S-oe-le?($.aStartFollowing=p,$.bStartFollowing=S):($.aStartFollowing=oe,$.bStartFollowing=le)}return!0}}}return!1},s=(h,m,p,g,S,_,w,y,O)=>{let d=g-m,$=S-p,N=p-m,V=S-g,D=V-N,R=N,F=N;if(w[0]=m-1,y[0]=p,D%2===0){let B=(h||D)/2,H=(N+V)/2;for(let E=1;E<=H;E+=1)if(R=i(E,p,S,d,_,w,R),E<B)F=l(E,m,g,$,_,y,F);else if(u(E,m,p,g,S,_,w,R,y,F,O))return}else{let B=((h||D)+1)/2,H=(N+V+1)/2,E=1;for(R=i(E,p,S,d,_,w,R),E+=1;E<=H;E+=1)if(F=l(E-1,m,g,$,_,y,F),E<B)R=i(E,p,S,d,_,w,R);else if(o(E,m,p,g,S,_,w,R,y,F,O))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${p} bStart=${g} bEnd=${S}`)},a=(h,m,p,g,S,_,w,y,O,d)=>{if(S-g<p-m){if(_=!_,_&&w.length===1){let{foundSubsequence:ne,isCommon:v}=w[0];w[1]={foundSubsequence:(x,W,oe)=>{ne(x,oe,W)},isCommon:(x,W)=>v(W,x)}}let z=m,U=p;m=g,p=S,g=z,S=U}let{foundSubsequence:$,isCommon:N}=w[_?1:0];s(h,m,p,g,S,N,y,O,d);let{nChangePreceding:V,aEndPreceding:D,bEndPreceding:R,nCommonPreceding:F,aCommonPreceding:B,bCommonPreceding:H,nCommonFollowing:E,aCommonFollowing:M,bCommonFollowing:G,nChangeFollowing:j,aStartFollowing:k,bStartFollowing:J}=d;m<D&&g<R&&a(V,m,D,g,R,_,w,y,O,d),F!==0&&$(F,B,H),E!==0&&$(E,M,G),k<p&&J<S&&a(j,k,p,J,S,_,w,y,O,d)},c=(h,m)=>{if(typeof m!="number")throw new TypeError(`${e}: ${h} typeof ${typeof m} is not a number`);if(!Number.isSafeInteger(m))throw new RangeError(`${e}: ${h} value ${m} is not a safe integer`);if(m<0)throw new RangeError(`${e}: ${h} value ${m} is a negative integer`)},f=(h,m)=>{let p=typeof m;if(p!=="function")throw new TypeError(`${e}: ${h} typeof ${p} is not a function`)};function b(h,m,p,g){c("aLength",h),c("bLength",m),f("isCommon",p),f("foundSubsequence",g);let S=n(0,h,0,m,p);if(S!==0&&g(S,0,0),h!==S||m!==S){let _=S,w=S,y=r(_,h-1,w,m-1,p),O=h-y,d=m-y,$=S+y;h!==$&&m!==$&&a(0,_,O,w,d,!1,[{foundSubsequence:g,isCommon:p}],[t],[t],{aCommonFollowing:t,aCommonPreceding:t,aEndPreceding:t,aStartFollowing:t,bCommonFollowing:t,bCommonPreceding:t,bEndPreceding:t,bStartFollowing:t,nChangeFollowing:t,nChangePreceding:t,nCommonFollowing:t,nCommonPreceding:t}),y!==0&&g(y,O,d)}}return be}var Li=Ri(),mn=wi(Li);function Di(e,t){return e.replace(/\s+$/,n=>t(n))}function Ge(e,t,n,r,i,l){return e.length!==0?n(`${r} ${Di(e,i)}`):r!==" "?n(r):t&&l.length!==0?n(`${r} ${l}`):""}function pn(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:l}){return Ge(e,t,n,r,i,l)}function yn(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:l}){return Ge(e,t,n,r,i,l)}function bn(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:l}){return Ge(e,t,n,r,i,l)}function At(e,t,n,r,{patchColor:i}){return i(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function ji(e,t){let n=e.length,r=t.contextLines,i=r+r,l=n,o=!1,u=0,s=0;for(;s!==n;){let y=s;for(;s!==n&&e[s][0]===A;)s+=1;if(y!==s)if(y===0)s>r&&(l-=s-r,o=!0);else if(s===n){let O=s-y;O>r&&(l-=O-r,o=!0)}else{let O=s-y;O>i&&(l-=O-i,u+=1)}for(;s!==n&&e[s][0]!==A;)s+=1}let a=u!==0||o;u!==0?l+=u+1:o&&(l+=1);let c=l-1,f=[],b=0;a&&f.push("");let h=0,m=0,p=0,g=0,S=y=>{let O=f.length;f.push(bn(y,O===0||O===c,t)),p+=1,g+=1},_=y=>{let O=f.length;f.push(pn(y,O===0||O===c,t)),p+=1},w=y=>{let O=f.length;f.push(yn(y,O===0||O===c,t)),g+=1};for(s=0;s!==n;){let y=s;for(;s!==n&&e[s][0]===A;)s+=1;if(y!==s)if(y===0){s>r&&(y=s-r,h=y,m=y,p=h,g=m);for(let O=y;O!==s;O+=1)S(e[O][1])}else if(s===n){let O=s-y>r?y+r:s;for(let d=y;d!==O;d+=1)S(e[d][1])}else{let O=s-y;if(O>i){let d=y+r;for(let N=y;N!==d;N+=1)S(e[N][1]);f[b]=At(h,p,m,g,t),b=f.length,f.push("");let $=O-i;h=p+$,m=g+$,p=h,g=m;for(let N=s-r;N!==s;N+=1)S(e[N][1])}else for(let d=y;d!==s;d+=1)S(e[d][1])}for(;s!==n&&e[s][0]===P;)_(e[s][1]),s+=1;for(;s!==n&&e[s][0]===I;)w(e[s][1]),s+=1}return a&&(f[b]=At(h,p,m,g,t)),f.join(`
7
- `)}function Fi(e,t){return e.map((n,r,i)=>{let l=n[1],o=r===0||r===i.length-1;switch(n[0]){case P:return pn(l,o,t);case I:return yn(l,o,t);default:return bn(l,o,t)}}).join(`
8
- `)}var Ie=e=>e,Sn=5,Bi=0;function xi(){return{aAnnotation:"Expected",aColor:Q.green,aIndicator:"-",bAnnotation:"Received",bColor:Q.red,bIndicator:"+",changeColor:Q.inverse,changeLineTrailingSpaceColor:Ie,commonColor:Q.dim,commonIndicator:" ",commonLineTrailingSpaceColor:Ie,compareKeys:void 0,contextLines:Sn,emptyFirstOrLastLinePlaceholder:"",expand:!0,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:Q.yellow,truncateThreshold:Bi,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:Ie}}function ki(e){return e&&typeof e=="function"?e:void 0}function zi(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:Sn}function ie(e={}){return{...xi(),...e,compareKeys:ki(e.compareKeys),contextLines:zi(e.contextLines)}}function se(e){return e.length===1&&e[0].length===0}function Ui(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case P:t+=1;break;case I:n+=1;break}}),{a:t,b:n}}function Ki({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:i,bIndicator:l,includeChangeCounts:o,omitAnnotationLines:u},s){if(u)return"";let a="",c="";if(o){let h=String(s.a),m=String(s.b),p=r.length-e.length,g=" ".repeat(Math.max(0,p)),S=" ".repeat(Math.max(0,-p)),_=m.length-h.length,w=" ".repeat(Math.max(0,_)),y=" ".repeat(Math.max(0,-_));a=`${g} ${n} ${w}${h}`,c=`${S} ${l} ${y}${m}`}let f=`${n} ${e}${a}`,b=`${l} ${r}${c}`;return`${t(f)}
9
- ${i(b)}
10
-
11
- `}function Je(e,t,n){return Ki(n,Ui(e))+(n.expand?Fi(e,n):ji(e,n))+(t?n.truncateAnnotationColor(`
12
- ${n.truncateAnnotation}`):"")}function de(e,t,n){let r=ie(n),[i,l]=_n(se(e)?[]:e,se(t)?[]:t,r);return Je(i,l,r)}function qi(e,t,n,r,i){if(se(e)&&se(n)&&(e=[],n=[]),se(t)&&se(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return de(e,t,i);let[l,o]=_n(n,r,i),u=0,s=0;return l.forEach(a=>{switch(a[0]){case P:a[1]=e[u],u+=1;break;case I:a[1]=t[s],s+=1;break;default:a[1]=t[s],u+=1,s+=1}}),Je(l,o,ie(i))}function _n(e,t,n){let r=n?.truncateThreshold??!1,i=Math.max(Math.floor(n?.truncateThreshold??0),0),l=r?Math.min(e.length,i):e.length,o=r?Math.min(t.length,i):t.length,u=l!==e.length||o!==t.length,s=(b,h)=>e[b]===t[h],a=[],c=0,f=0;for(mn(l,o,s,(b,h,m)=>{for(;c!==h;c+=1)a.push(new T(P,e[c]));for(;f!==m;f+=1)a.push(new T(I,t[f]));for(;b!==0;b-=1,c+=1,f+=1)a.push(new T(A,t[f]))});c!==l;c+=1)a.push(new T(P,e[c]));for(;f!==o;f+=1)a.push(new T(I,t[f]));return[a,u]}function Mt(e){return e.includes(`\r
13
- `)?`\r
14
- `:`
15
- `}function Wi(e,t,n){let r=n?.truncateThreshold??!1,i=Math.max(Math.floor(n?.truncateThreshold??0),0),l=e.length,o=t.length;if(r){let b=e.includes(`
16
- `),h=t.includes(`
17
- `),m=Mt(e),p=Mt(t),g=b?`${e.split(m,i).join(m)}
18
- `:e,S=h?`${t.split(p,i).join(p)}
19
- `:t;l=g.length,o=S.length}let u=l!==e.length||o!==t.length,s=(b,h)=>e[b]===t[h],a=0,c=0,f=[];return mn(l,o,s,(b,h,m)=>{a!==h&&f.push(new T(P,e.slice(a,h))),c!==m&&f.push(new T(I,t.slice(c,m))),a=h+b,c=m+b,f.push(new T(A,t.slice(m,c)))}),a!==l&&f.push(new T(P,e.slice(a))),c!==o&&f.push(new T(I,t.slice(c))),[f,u]}function Yi(e,t,n){return t.reduce((r,i)=>r+(i[0]===A?i[1]:i[0]===e&&i[1].length!==0?n(i[1]):""),"")}var It=class{op;line;lines;changeColor;constructor(e,t){this.op=e,this.line=[],this.lines=[],this.changeColor=t}pushSubstring(e){this.pushDiff(new T(this.op,e))}pushLine(){this.lines.push(this.line.length!==1?new T(this.op,Yi(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new T(this.op,this.line[0][1])),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(`
20
- `)){let n=t.split(`
21
- `),r=n.length-1;n.forEach((i,l)=>{l<r?(this.pushSubstring(i),this.pushLine()):i.length!==0&&this.pushSubstring(i)})}else this.pushDiff(e)}moveLinesTo(e){this.isLineEmpty()||this.pushLine(),e.push(...this.lines),this.lines.length=0}},Vi=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(`
22
- `)){let r=n.split(`
23
- `),i=r.length-1;r.forEach((l,o)=>{if(o===0){let u=new T(t,l);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(u)):(this.pushDiffChangeLines(u),this.flushChangeLines())}else o<i?this.pushDiffCommonLine(new T(t,l)):l.length!==0&&this.pushDiffChangeLines(new T(t,l))})}else this.pushDiffChangeLines(e)}getLines(){return this.flushChangeLines(),this.lines}};function Hi(e,t){let n=new It(P,t),r=new It(I,t),i=new Vi(n,r);return e.forEach(l=>{switch(l[0]){case P:n.align(l);break;case I:r.align(l);break;default:i.align(l)}}),i.getLines()}function Gi(e,t){if(t){let n=e.length-1;return e.some((r,i)=>r[0]===A&&(i!==n||r[1]!==`
24
- `))}return e.some(n=>n[0]===A)}function Ji(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
25
- `)||t.includes(`
26
- `),[i,l]=$n(r?`${e}
27
- `:e,r?`${t}
28
- `:t,!0,n);if(Gi(i,r)){let o=ie(n),u=Hi(i,o.changeColor);return Je(u,l,o)}}return de(e.split(`
29
- `),t.split(`
30
- `),n)}function $n(e,t,n,r){let[i,l]=Wi(e,t,r);return Ti(i),[i,l]}function Be(e,t){let{commonColor:n}=ie(t);return n(e)}var{AsymmetricMatcher:Xi,DOMCollection:Zi,DOMElement:Qi,Immutable:vi,ReactElement:eo,ReactTestComponent:to}=ln,On=[to,eo,Qi,Zi,vi,Xi],xe={plugins:On},dn={callToJSON:!1,maxDepth:10,plugins:On};function no(e,t,n){if(Object.is(e,t))return"";let r=dt(e),i=r,l=!1;if(r==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return;i=e.getExpectedType(),l=i==="string"}if(i!==dt(t)){let{aAnnotation:o,aColor:u,aIndicator:s,bAnnotation:a,bColor:c,bIndicator:f}=ie(n),b=ke(dn,n),h=Y(e,b),m=Y(t,b),p=`${u(`${s} ${o}:`)}
31
- ${h}`,g=`${c(`${f} ${a}:`)}
32
- ${m}`;return`${p}
33
-
34
- ${g}`}if(!l)switch(r){case"string":return de(e.split(`
35
- `),t.split(`
36
- `),n);case"boolean":case"number":return ro(e,t,n);case"map":return Pe(Pt(e),Pt(t),n);case"set":return Pe(Rt(e),Rt(t),n);default:return Pe(e,t,n)}}function ro(e,t,n){let r=Y(e,xe),i=Y(t,xe);return r===i?"":de(r.split(`
37
- `),i.split(`
38
- `),n)}function Pt(e){return new Map(Array.from(e.entries()).sort())}function Rt(e){return new Set(Array.from(e.values()).sort())}function Pe(e,t,n){let r,i=!1;try{let o=ke(xe,n);r=Lt(e,t,o,n)}catch{i=!0}let l=Be(fn,n);if(r===void 0||r===l){let o=ke(dn,n);r=Lt(e,t,o,n),r!==l&&!i&&(r=`${Be(Pi,n)}
39
-
40
- ${r}`)}return r}function ke(e,t){let{compareKeys:n}=ie(t);return{...e,compareKeys:n}}function Lt(e,t,n,r){let i={...n,indent:0},l=Y(e,i),o=Y(t,i);if(l===o)return Be(fn,r);{let u=Y(e,n),s=Y(t,n);return qi(u.split(`
41
- `),s.split(`
42
- `),l.split(`
43
- `),o.split(`
44
- `),r)}}var Dt=2e4;function jt(e){return je(e)==="Object"&&typeof e.asymmetricMatch=="function"}function Ft(e,t){let n=je(e),r=je(t);return n===r&&(n==="Object"||n==="Array")}function io(e,t,n){let{aAnnotation:r,bAnnotation:i}=ie(n);if(typeof e=="string"&&typeof t=="string"&&e.length>0&&t.length>0&&e.length<=Dt&&t.length<=Dt&&e!==t){if(e.includes(`
45
- `)||t.includes(`
46
- `))return Ji(t,e,n);let[a]=$n(t,e),c=a.some(m=>m[0]===A),f=oo(r,i),b=f(r)+so(Bt(a,P,c)),h=f(i)+uo(Bt(a,I,c));return`${b}
47
- ${h}`}let l=Ot(e,{forceWritable:!0}),o=Ot(t,{forceWritable:!0}),{replacedExpected:u,replacedActual:s}=wn(l,o);return no(u,s,n)}function wn(e,t,n=new WeakSet,r=new WeakSet){return Ft(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),cn(t).forEach(i=>{let l=t[i],o=e[i];if(jt(l))l.asymmetricMatch(o)&&(e[i]=l);else if(jt(o))o.asymmetricMatch(l)&&(t[i]=o);else if(Ft(o,l)){let u=wn(o,l,n,r);e[i]=u.replacedActual,t[i]=u.replacedExpected}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function oo(...e){let t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}var lo="·";function En(e){return e.replace(/\s+$/gm,t=>lo.repeat(t.length))}function uo(e){return Q.red(En(pe(e)))}function so(e){return Q.green(En(pe(e)))}function Bt(e,t,n){return e.reduce((r,i)=>r+(i[0]===A?i[1]:i[0]===t?n?Q.inverse(i[1]):i[1]:""),"")}var co="@@__IMMUTABLE_RECORD__@@",ao="@@__IMMUTABLE_ITERABLE__@@";function go(e){return e&&(e[ao]||e[co])}var ho=Object.getPrototypeOf({});function xt(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}function ce(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(typeof e=="function")return`Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(go(e))return ce(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()} ${di(e.sample)}`;if(typeof e.toJSON=="function")return ce(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=new Array(e.length);return t.set(e,n),e.forEach((r,i)=>{try{n[i]=ce(r,t)}catch(l){n[i]=xt(l)}}),n}else{let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==ho;)Object.getOwnPropertyNames(r).forEach(i=>{if(!(i in n))try{n[i]=ce(e[i],t)}catch(l){delete n[i],n[i]=xt(l)}}),r=Object.getPrototypeOf(r);return n}}function fo(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}function Cn(e,t,n=new WeakSet){if(!e||typeof e!="object")return{message:String(e)};let r=e;r.stack&&(r.stackStr=String(r.stack)),r.name&&(r.nameStr=String(r.name)),(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0)&&(r.diff=io(r.actual,r.expected,{...t,...r.diffOptions})),typeof r.expected!="string"&&(r.expected=pe(r.expected,10)),typeof r.actual!="string"&&(r.actual=pe(r.actual,10));try{typeof r.message=="string"&&(r.message=fo(r.message))}catch{}try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=Cn(r.cause,t,n))}catch{}try{return ce(r)}catch(i){return ce(new Error(`Failed to fully serialize error: ${i?.message}
48
- Inner error message: ${r?.message}`))}}var mo=(e=>(e.DONE="done",e.ERROR="error",e.ACTIVE="active",e.WAITING="waiting",e))(mo||{}),Z={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"},kt={start:!1,back:!1,goto:!1,next:!1,end:!1},po=new Error("This function ran after the play function completed. Did you forget to `await` it?"),zt=e=>Object.prototype.toString.call(e)==="[object Object]",yo=e=>Object.prototype.toString.call(e)==="[object Module]",bo=e=>{if(!zt(e)&&!yo(e))return!1;if(e.constructor===void 0)return!0;let t=e.constructor.prototype;return!!zt(t)},So=e=>{try{return new e.constructor}catch{return{}}},Re=()=>({renderPhase:void 0,isDebugging:!1,isPlaying:!1,isLocked:!1,cursor:0,calls:[],shadowCalls:[],callRefsByResult:new Map,chainedCallIds:new Set,ancestors:[],playUntil:void 0,resolvers:{},syncTimeout:void 0}),Ut=(e,t=!1)=>{let n=(t?e.shadowCalls:e.calls).filter(i=>i.retain);if(!n.length)return;let r=new Map(Array.from(e.callRefsByResult.entries()).filter(([,i])=>i.retain));return{cursor:n.length,calls:n,callRefsByResult:r}},_o=class{constructor(){this.initialized=!1,this.channel=Mn.getChannel(),this.state=L.window?.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__||{};let e=({storyId:o,isPlaying:u=!0,isDebugging:s=!1})=>{let a=this.getState(o);this.setState(o,{...Re(),...Ut(a,s),shadowCalls:s?a.shadowCalls:[],chainedCallIds:s?a.chainedCallIds:new Set,playUntil:s?a.playUntil:void 0,isPlaying:u,isDebugging:s}),this.sync(o)};this.channel.on(Qe,e),this.channel.on(Tn,({storyId:o,newPhase:u})=>{let{isDebugging:s}=this.getState(o);this.setState(o,{renderPhase:u}),u==="preparing"&&s&&e({storyId:o}),u==="playing"&&e({storyId:o,isDebugging:s}),u==="played"&&this.setState(o,{isLocked:!1,isPlaying:!1,isDebugging:!1}),u==="errored"&&this.setState(o,{isLocked:!1,isPlaying:!1})}),this.channel.on(An,()=>{this.initialized?this.cleanup():this.initialized=!0});let t=({storyId:o,playUntil:u})=>{this.getState(o).isDebugging||this.setState(o,({calls:a})=>({calls:[],shadowCalls:a.map(c=>({...c,status:"waiting"})),isDebugging:!0}));let s=this.getLog(o);this.setState(o,({shadowCalls:a})=>{if(u||!s.length)return{playUntil:u};let c=a.findIndex(f=>f.id===s[0].callId);return{playUntil:a.slice(0,c).filter(f=>f.interceptable&&!f.ancestors?.length).slice(-1)[0]?.id}}),this.channel.emit(Qe,{storyId:o,isDebugging:!0})},n=({storyId:o})=>{let u=this.getLog(o).filter(a=>!a.ancestors?.length),s=u.reduceRight((a,c,f)=>a>=0||c.status==="waiting"?a:f,-1);t({storyId:o,playUntil:u[s-1]?.callId})},r=({storyId:o,callId:u})=>{let{calls:s,shadowCalls:a,resolvers:c}=this.getState(o),f=s.find(({id:h})=>h===u),b=a.find(({id:h})=>h===u);if(!f&&b&&Object.values(c).length>0){let h=this.getLog(o).find(m=>m.status==="waiting")?.callId;b.id!==h&&this.setState(o,{playUntil:b.id}),Object.values(c).forEach(m=>m())}else t({storyId:o,playUntil:u})},i=({storyId:o})=>{let{resolvers:u}=this.getState(o);if(Object.values(u).length>0)Object.values(u).forEach(s=>s());else{let s=this.getLog(o).find(a=>a.status==="waiting")?.callId;s?t({storyId:o,playUntil:s}):l({storyId:o})}},l=({storyId:o})=>{this.setState(o,{playUntil:void 0,isDebugging:!1}),Object.values(this.getState(o).resolvers).forEach(u=>u())};this.channel.on(Z.START,t),this.channel.on(Z.BACK,n),this.channel.on(Z.GOTO,r),this.channel.on(Z.NEXT,i),this.channel.on(Z.END,l)}getState(e){return this.state[e]||Re()}setState(e,t){let n=this.getState(e),r=typeof t=="function"?t(n):t;this.state={...this.state,[e]:{...n,...r}},L.window?.parent&&(L.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__=this.state)}cleanup(){this.state=Object.entries(this.state).reduce((t,[n,r])=>{let i=Ut(r);return i&&(t[n]=Object.assign(Re(),i)),t},{});let e={controlStates:kt,logItems:[]};this.channel.emit(Z.SYNC,e),L.window?.parent&&(L.window.parent.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__=this.state)}getLog(e){let{calls:t,shadowCalls:n}=this.getState(e),r=[...n];t.forEach((l,o)=>{r[o]=l});let i=new Set;return r.reduceRight((l,o)=>(o.args.forEach(u=>{u?.__callId__&&i.add(u.__callId__)}),o.path.forEach(u=>{u.__callId__&&i.add(u.__callId__)}),(o.interceptable||o.exception)&&!i.has(o.id)&&(l.unshift({callId:o.id,status:o.status,ancestors:o.ancestors}),i.add(o.id)),l),[])}instrument(e,t,n=0){if(!bo(e))return e;let{mutate:r=!1,path:i=[]}=t,l=t.getKeys?t.getKeys(e,n):Object.keys(e);return n+=1,l.reduce((o,u)=>{let s=$o(e,u);if(typeof s?.get=="function"){let c=()=>s?.get?.bind(e)?.();return Object.defineProperty(o,u,{get:()=>this.instrument(c(),{...t,path:i.concat(u)},n)}),o}let a=e[u];return typeof a!="function"?(o[u]=this.instrument(a,{...t,path:i.concat(u)},n),o):"__originalFn__"in a&&typeof a.__originalFn__=="function"?(o[u]=a,o):(o[u]=(...c)=>this.track(u,a,e,c,t),o[u].__originalFn__=a,Object.defineProperty(o[u],"name",{value:u,writable:!1}),Object.keys(a).length>0&&Object.assign(o[u],this.instrument({...a},{...t,path:i.concat(u)},n)),o)},r?e:So(e))}track(e,t,n,r,i){let l=r?.[0]?.__storyId__||L.__STORYBOOK_PREVIEW__?.selectionStore?.selection?.storyId,{cursor:o,ancestors:u}=this.getState(l);this.setState(l,{cursor:o+1});let s=`${u.slice(-1)[0]||l} [${o}] ${e}`,{path:a=[],intercept:c=!1,retain:f=!1}=i,b=typeof c=="function"?c(e,a):c,h={id:s,cursor:o,storyId:l,ancestors:u,path:a,method:e,args:r,interceptable:b,retain:f},m=(b&&!u.length?this.intercept:this.invoke).call(this,t,n,h,i);return this.instrument(m,{...i,mutate:!0,path:[{__callId__:h.id}]})}intercept(e,t,n,r){let{chainedCallIds:i,isDebugging:l,playUntil:o}=this.getState(n.storyId),u=i.has(n.id);return!l||u||o?(o===n.id&&this.setState(n.storyId,{playUntil:void 0}),this.invoke(e,t,n,r)):new Promise(s=>{this.setState(n.storyId,({resolvers:a})=>({isLocked:!1,resolvers:{...a,[n.id]:s}}))}).then(()=>(this.setState(n.storyId,s=>{let{[n.id]:a,...c}=s.resolvers;return{isLocked:!0,resolvers:c}}),this.invoke(e,t,n,r)))}invoke(e,t,n,r){let{callRefsByResult:i,renderPhase:l}=this.getState(n.storyId),o=25,u=(c,f,b)=>{if(b.includes(c))return"[Circular]";if(b=[...b,c],f>o)return"...";if(i.has(c))return i.get(c);if(c instanceof Array)return c.map(h=>u(h,++f,b));if(c instanceof Date)return{__date__:{value:c.toISOString()}};if(c instanceof Error){let{name:h,message:m,stack:p}=c;return{__error__:{name:h,message:m,stack:p}}}if(c instanceof RegExp){let{flags:h,source:m}=c;return{__regexp__:{flags:h,source:m}}}if(c instanceof L.window?.HTMLElement){let{prefix:h,localName:m,id:p,classList:g,innerText:S}=c,_=Array.from(g);return{__element__:{prefix:h,localName:m,id:p,classNames:_,innerText:S}}}return typeof c=="function"?{__function__:{name:"getMockName"in c?c.getMockName():c.name}}:typeof c=="symbol"?{__symbol__:{description:c.description}}:typeof c=="object"&&c?.constructor?.name&&c?.constructor?.name!=="Object"?{__class__:{name:c.constructor.name}}:Object.prototype.toString.call(c)==="[object Object]"?Object.fromEntries(Object.entries(c).map(([h,m])=>[h,u(m,++f,b)])):c},s={...n,args:n.args.map(c=>u(c,0,[]))};n.path.forEach(c=>{c?.__callId__&&this.setState(n.storyId,({chainedCallIds:f})=>({chainedCallIds:new Set(Array.from(f).concat(c.__callId__))}))});let a=c=>{if(c instanceof Error){let{name:f,message:b,stack:h,callId:m=n.id}=c,{showDiff:p=void 0,diff:g=void 0,actual:S=void 0,expected:_=void 0}=c.name==="AssertionError"?Cn(c):c,w={name:f,message:b,stack:h,callId:m,showDiff:p,diff:g,actual:S,expected:_};if(this.update({...s,status:"error",exception:w}),this.setState(n.storyId,y=>({callRefsByResult:new Map([...Array.from(y.callRefsByResult.entries()),[c,{__callId__:n.id,retain:n.retain}]])})),n.ancestors?.length)throw Object.prototype.hasOwnProperty.call(c,"callId")||Object.defineProperty(c,"callId",{value:n.id}),c}throw c};try{if(l==="played"&&!n.retain)throw po;let c=(r.getArgs?r.getArgs(n,this.getState(n.storyId)):n.args).map(b=>typeof b!="function"||Object.keys(b).length?b:(...h)=>{let{cursor:m,ancestors:p}=this.getState(n.storyId);this.setState(n.storyId,{cursor:0,ancestors:[...p,n.id]});let g=()=>this.setState(n.storyId,{cursor:m,ancestors:p}),S=!1;try{let _=b(...h);return _ instanceof Promise?(S=!0,_.finally(g)):_}finally{S||g()}}),f=e.apply(t,c);return f&&["object","function","symbol"].includes(typeof f)&&this.setState(n.storyId,b=>({callRefsByResult:new Map([...Array.from(b.callRefsByResult.entries()),[f,{__callId__:n.id,retain:n.retain}]])})),this.update({...s,status:f instanceof Promise?"active":"done"}),f instanceof Promise?f.then(b=>(this.update({...s,status:"done"}),b),a):f}catch(c){return a(c)}}update(e){this.channel.emit(Z.CALL,e),this.setState(e.storyId,({calls:t})=>{let n=t.concat(e).reduce((r,i)=>Object.assign(r,{[i.id]:i}),{});return{calls:Object.values(n).sort((r,i)=>r.id.localeCompare(i.id,void 0,{numeric:!0}))}}),this.sync(e.storyId)}sync(e){let t=()=>{let{isLocked:n,isPlaying:r}=this.getState(e),i=this.getLog(e),l=i.filter(({ancestors:a})=>!a.length).find(a=>a.status==="waiting")?.callId,o=i.some(a=>a.status==="active");if(n||o||i.length===0){let a={controlStates:kt,logItems:i};this.channel.emit(Z.SYNC,a);return}let u=i.some(a=>a.status==="done"||a.status==="error"),s={controlStates:{start:u,back:u,goto:!0,next:r,end:r},logItems:i,pausedAt:l};this.channel.emit(Z.SYNC,s)};this.setState(e,({syncTimeout:n})=>(clearTimeout(n),{syncTimeout:setTimeout(t,0)}))}};function No(e,t={}){try{let n=!1,r=!1;return L.window?.location?.search?.includes("instrument=true")?n=!0:L.window?.location?.search?.includes("instrument=false")&&(r=!0),L.window?.parent===L.window&&!n||r?e:(L.window&&!L.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__&&(L.window.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__=new _o),(L.window?.__STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__).instrument(e,t))}catch(n){return Nn.warn(n),e}}function $o(e,t){let n=e;for(;n!=null;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}export{mo as CallStates,Z as EVENTS,No as instrument};