Public Access
MVP
This commit is contained in:
1 parent
51da011d12
commit
7f6116450f
187 files changed
+81911
-388
No files matched your search
@@ -0,0 +1,234 @@
|
||||
try{
|
||||
(()=>{var ke=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var x=__REACT__,{Children:Cm,Component:Om,Fragment:br,Profiler:_m,PureComponent:Im,StrictMode:Rm,Suspense:Tm,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Dm,cloneElement:Fm,createContext:Pm,createElement:se,createFactory:jm,createRef:Bm,forwardRef:km,isValidElement:Nm,lazy:Mm,memo:vr,startTransition:Lm,unstable_act:$m,useCallback:ko,useContext:zm,useDebugValue:qm,useDeferredValue:Um,useEffect:lt,useId:Hm,useImperativeHandle:Wm,useInsertionEffect:Vm,useLayoutEffect:Gm,useMemo:No,useReducer:Ym,useRef:Er,useState:We,useSyncExternalStore:Km,useTransition:Jm,version:Xm}=__REACT__;var ty=__STORYBOOK_API__,{ActiveTabs:ry,Consumer:Mo,ManagerContext:ny,Provider:oy,RequestResponseError:ay,addons:on,combineParameters:iy,controlOrMetaKey:sy,controlOrMetaSymbol:uy,eventMatchesShortcut:ly,eventToShortcut:cy,experimental_requestResponse:py,isMacLike:fy,isShortcutTaken:dy,keyToSymbol:hy,merge:my,mockChannel:yy,optionOrAltSymbol:gy,shortcutMatchesShortcut:by,shortcutToHumanString:vy,types:Lo,useAddonState:an,useArgTypes:Ey,useArgs:Sy,useChannel:$o,useGlobalTypes:Ay,useGlobals:wy,useParameter:zo,useSharedState:xy,useStoryPrepared:Cy,useStorybookApi:qo,useStorybookState:Oy}=__STORYBOOK_API__;var Dy=__STORYBOOK_COMPONENTS__,{A:Fy,ActionBar:Py,AddonPanel:Uo,Badge:Ho,Bar:Wo,Blockquote:jy,Button:Vo,ClipboardCode:By,Code:ky,DL:Ny,Div:My,DocumentWrapper:Ly,EmptyTabContent:Go,ErrorFormatter:$y,FlexBar:zy,Form:qy,H1:Uy,H2:Hy,H3:Wy,H4:Vy,H5:Gy,H6:Yy,HR:Ky,IconButton:sn,IconButtonSkeleton:Jy,Icons:Xy,Img:Qy,LI:Zy,Link:un,ListItem:eg,Loader:tg,Modal:rg,OL:ng,P:Yo,Placeholder:og,Pre:ag,ResetWrapper:ig,ScrollArea:sg,Separator:Ko,Spaced:Jo,Span:ug,StorybookIcon:lg,StorybookLogo:cg,Symbols:pg,SyntaxHighlighter:fg,TT:dg,TabBar:hg,TabButton:mg,TabWrapper:yg,Table:gg,Tabs:bg,TabsState:vg,TooltipLinkList:Eg,TooltipMessage:Sg,TooltipNote:ln,UL:Ag,WithTooltip:Et,WithTooltipPure:wg,Zoom:xg,codeCommon:Cg,components:Og,createCopyToClipboardFunction:_g,getStoryHref:Ig,icons:Rg,interleaveSeparators:Tg,nameSpaceClassNames:Dg,resetComponents:Fg,withReset:Pg}=__STORYBOOK_COMPONENTS__;var Mg=__STORYBOOK_CHANNELS__,{Channel:Xo,PostMessageTransport:Lg,WebsocketTransport:$g,createBrowserChannel:zg}=__STORYBOOK_CHANNELS__;var Vg=__STORYBOOK_CLIENT_LOGGER__,{deprecate:rt,logger:Se,once:ct,pretty:Gg}=__STORYBOOK_CLIENT_LOGGER__;var Qg=__STORYBOOK_CORE_EVENTS__,{ARGTYPES_INFO_REQUEST:Qo,ARGTYPES_INFO_RESPONSE:cn,CHANNEL_CREATED:Zg,CHANNEL_WS_DISCONNECT:eb,CONFIG_ERROR:Zo,CREATE_NEW_STORYFILE_REQUEST:tb,CREATE_NEW_STORYFILE_RESPONSE:rb,CURRENT_STORY_WAS_SET:pn,DOCS_PREPARED:ea,DOCS_RENDERED:Sr,FILE_COMPONENT_SEARCH_REQUEST:nb,FILE_COMPONENT_SEARCH_RESPONSE:ob,FORCE_REMOUNT:Xt,FORCE_RE_RENDER:Ar,GLOBALS_UPDATED:ta,NAVIGATE_URL:ab,PLAY_FUNCTION_THREW_EXCEPTION:wr,PRELOAD_ENTRIES:ra,PREVIEW_BUILDER_PROGRESS:ib,PREVIEW_KEYDOWN:na,REGISTER_SUBSCRIPTION:sb,REQUEST_WHATS_NEW_DATA:ub,RESET_STORY_ARGS:xr,RESULT_WHATS_NEW_DATA:lb,SAVE_STORY_REQUEST:cb,SAVE_STORY_RESPONSE:pb,SELECT_STORY:fb,SET_CONFIG:db,SET_CURRENT_STORY:fn,SET_GLOBALS:oa,SET_INDEX:hb,SET_STORIES:mb,SET_WHATS_NEW_CACHE:yb,SHARED_STATE_CHANGED:gb,SHARED_STATE_SET:bb,STORIES_COLLAPSE_ALL:vb,STORIES_EXPAND_ALL:Eb,STORY_ARGS_UPDATED:aa,STORY_CHANGED:ia,STORY_ERRORED:sa,STORY_INDEX_INVALIDATED:ua,STORY_MISSING:dn,STORY_PREPARED:la,STORY_RENDERED:Qt,STORY_RENDER_PHASE_CHANGED:nt,STORY_SPECIFIED:ca,STORY_THREW_EXCEPTION:Cr,STORY_UNCHANGED:pa,TELEMETRY_ERROR:Sb,TOGGLE_WHATS_NEW_NOTIFICATIONS:Ab,UNHANDLED_ERRORS_WHILE_PLAYING:Or,UPDATE_GLOBALS:_r,UPDATE_QUERY_PARAMS:fa,UPDATE_STORY_ARGS:Ir}=__STORYBOOK_CORE_EVENTS__;var Mu=Object.defineProperty,xe=(t,e)=>Mu(t,"name",{value:e,configurable:!0});function Ce(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var o=n.reduce(function(s,u){var l=u.match(/\n([\t ]+|(?!\s).)/g);return l?s.concat(l.map(function(f){var d,p;return(p=(d=f.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):s},[]);if(o.length){var a=new RegExp(`
|
||||
[ ]{`+Math.min.apply(Math,o)+"}","g");n=n.map(function(s){return s.replace(a,`
|
||||
`)})}n[0]=n[0].replace(/^\r?\n/,"");var i=n[0];return e.forEach(function(s,u){var l=i.match(/(?:^|\n)( *)$/),f=l?l[1]:"",d=s;typeof s=="string"&&s.includes(`
|
||||
`)&&(d=String(s).split(`
|
||||
`).map(function(p,g){return g===0?p:""+f+p}).join(`
|
||||
`)),i+=d+n[u+1]}),i}xe(Ce,"dedent");function hn({code:t,category:e}){let r=String(t).padStart(4,"0");return`SB_${e}_${r}`}xe(hn,"parseErrorCode");var da=class ha extends Error{category;code;data={};documentation;fromStorybook=!0;get fullErrorCode(){return hn({code:this.code,category:this.category})}get name(){let e=this.constructor.name;return`${this.fullErrorCode} (${e})`}constructor(e){super(ha.getFullMessage(e)),this.category=e.category,this.documentation=e.documentation??!1,this.code=e.code}static getFullMessage({documentation:e,code:r,category:n,message:o}){let a;return e===!0?a=`https://storybook.js.org/error/${hn({code:r,category:n})}`:typeof e=="string"?a=e:Array.isArray(e)&&(a=`
|
||||
${e.map(i=>` - ${i}`).join(`
|
||||
`)}`),`${o}${a!=null?`
|
||||
|
||||
More info: ${a}
|
||||
`:""}`}};xe(da,"StorybookError");var Ie=da,Lu=(t=>(t.BLOCKS="BLOCKS",t.DOCS_TOOLS="DOCS-TOOLS",t.PREVIEW_CLIENT_LOGGER="PREVIEW_CLIENT-LOGGER",t.PREVIEW_CHANNELS="PREVIEW_CHANNELS",t.PREVIEW_CORE_EVENTS="PREVIEW_CORE-EVENTS",t.PREVIEW_INSTRUMENTER="PREVIEW_INSTRUMENTER",t.PREVIEW_API="PREVIEW_API",t.PREVIEW_REACT_DOM_SHIM="PREVIEW_REACT-DOM-SHIM",t.PREVIEW_ROUTER="PREVIEW_ROUTER",t.PREVIEW_THEMING="PREVIEW_THEMING",t.RENDERER_HTML="RENDERER_HTML",t.RENDERER_PREACT="RENDERER_PREACT",t.RENDERER_REACT="RENDERER_REACT",t.RENDERER_SERVER="RENDERER_SERVER",t.RENDERER_SVELTE="RENDERER_SVELTE",t.RENDERER_VUE="RENDERER_VUE",t.RENDERER_VUE3="RENDERER_VUE3",t.RENDERER_WEB_COMPONENTS="RENDERER_WEB-COMPONENTS",t.FRAMEWORK_NEXTJS="FRAMEWORK_NEXTJS",t))(Lu||{}),ma=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:1,message:Ce`
|
||||
Couldn't find story matching id '${e.storyId}' after HMR.
|
||||
- Did you just rename a story?
|
||||
- Did you remove it from your CSF file?
|
||||
- Are you sure a story with the id '${e.storyId}' exists?
|
||||
- Please check the values in the stories field of your main.js config and see if they would match your CSF File.
|
||||
- Also check the browser console and terminal for potential error messages.`}),this.data=e}};xe(ma,"MissingStoryAfterHmrError");var ya=ma,$u=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:2,documentation:"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#using-implicit-actions-during-rendering-is-deprecated-for-example-in-the-play-function",message:Ce`
|
||||
We detected that you use an implicit action arg while ${e.phase} of your story.
|
||||
${e.deprecated?`
|
||||
This is deprecated and won't work in Storybook 8 anymore.
|
||||
`:""}
|
||||
Please provide an explicit spy to your args like this:
|
||||
import { fn } from '@storybook/test';
|
||||
...
|
||||
args: {
|
||||
${e.name}: fn()
|
||||
}`}),this.data=e}};xe($u,"ImplicitActionsDuringRendering");var ga=class extends Ie{constructor(){super({category:"PREVIEW_API",code:3,message:Ce`
|
||||
Cannot call \`storyStore.extract()\` without calling \`storyStore.cacheAllCsfFiles()\` first.
|
||||
|
||||
You probably meant to call \`await preview.extract()\` which does the above for you.`})}};xe(ga,"CalledExtractOnStoreError");var ba=ga,va=class extends Ie{constructor(){super({category:"PREVIEW_API",code:4,message:Ce`
|
||||
Expected your framework's preset to export a \`renderToCanvas\` field.
|
||||
|
||||
Perhaps it needs to be upgraded for Storybook 7.0?`,documentation:"https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#mainjs-framework-field"})}};xe(va,"MissingRenderToCanvasError");var Ea=va,Sa=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:5,message:Ce`
|
||||
Called \`Preview.${e.methodName}()\` before initialization.
|
||||
|
||||
The preview needs to load the story index before most methods can be called. If you want
|
||||
to call \`${e.methodName}\`, try \`await preview.initializationPromise;\` first.
|
||||
|
||||
If you didn't call the above code, then likely it was called by an addon that needs to
|
||||
do the above.`}),this.data=e}};xe(Sa,"CalledPreviewMethodBeforeInitializationError");var Ne=Sa,Aa=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:6,message:Ce`
|
||||
Error fetching \`/index.json\`:
|
||||
|
||||
${e.text}
|
||||
|
||||
If you are in development, this likely indicates a problem with your Storybook process,
|
||||
check the terminal for errors.
|
||||
|
||||
If you are in a deployed Storybook, there may have been an issue deploying the full Storybook
|
||||
build.`}),this.data=e}};xe(Aa,"StoryIndexFetchError");var wa=Aa,xa=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:7,message:Ce`
|
||||
Tried to render docs entry ${e.storyId} but it is a MDX file that has no CSF
|
||||
references, or autodocs for a CSF file that some doesn't refer to itself.
|
||||
|
||||
This likely is an internal error in Storybook's indexing, or you've attached the
|
||||
\`attached-mdx\` tag to an MDX file that is not attached.`}),this.data=e}};xe(xa,"MdxFileWithNoCsfReferencesError");var Ca=xa,Oa=class extends Ie{constructor(){super({category:"PREVIEW_API",code:8,message:Ce`
|
||||
Couldn't find any stories in your Storybook.
|
||||
|
||||
- Please check your stories field of your main.js config: does it match correctly?
|
||||
- Also check the browser console and terminal for error messages.`})}};xe(Oa,"EmptyIndexError");var _a=Oa,Ia=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:9,message:Ce`
|
||||
Couldn't find story matching '${e.storySpecifier}'.
|
||||
|
||||
- Are you sure a story with that id exists?
|
||||
- Please check your stories field of your main.js config.
|
||||
- Also check the browser console and terminal for error messages.`}),this.data=e}};xe(Ia,"NoStoryMatchError");var Ra=Ia,Ta=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:10,message:Ce`
|
||||
Couldn't find story matching id '${e.storyId}' after importing a CSF file.
|
||||
|
||||
The file was indexed as if the story was there, but then after importing the file in the browser
|
||||
we didn't find the story. Possible reasons:
|
||||
- You are using a custom story indexer that is misbehaving.
|
||||
- You have a custom file loader that is removing or renaming exports.
|
||||
|
||||
Please check your browser console and terminal for errors that may explain the issue.`}),this.data=e}};xe(Ta,"MissingStoryFromCsfFileError");var Da=Ta,Fa=class extends Ie{constructor(){super({category:"PREVIEW_API",code:11,message:Ce`
|
||||
Cannot access the Story Store until the index is ready.
|
||||
|
||||
It is not recommended to use methods directly on the Story Store anyway, in Storybook 9 we will
|
||||
remove access to the store entirely`})}};xe(Fa,"StoryStoreAccessedBeforeInitializationError");var Pa=Fa,ja=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:12,message:Ce`
|
||||
Incorrect use of mount in the play function.
|
||||
|
||||
To use mount in the play function, you must satisfy the following two requirements:
|
||||
|
||||
1. You *must* destructure the mount property from the \`context\` (the argument passed to your play function).
|
||||
This makes sure that Storybook does not start rendering the story before the play function begins.
|
||||
|
||||
2. Your Storybook framework or builder must be configured to transpile to ES2017 or newer.
|
||||
This is because destructuring statements and async/await usages are otherwise transpiled away,
|
||||
which prevents Storybook from recognizing your usage of \`mount\`.
|
||||
|
||||
Note that Angular is not supported. As async/await is transpiled to support the zone.js polyfill.
|
||||
|
||||
More info: https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-the-component-gets-rendered
|
||||
|
||||
Received the following play function:
|
||||
${e.playFunction}`}),this.data=e}};xe(ja,"MountMustBeDestructuredError");var Rr=ja,zu=class extends Ie{constructor(){super({category:"PREVIEW_API",code:13,message:Ce`
|
||||
You must configure testingLibraryRender to use play in portable stories.
|
||||
|
||||
import { render } from '@testing-library/[renderer]';
|
||||
|
||||
setProjectAnnotations({
|
||||
testingLibraryRender: render,
|
||||
});
|
||||
|
||||
For other testing renderers, you can configure \`renderToCanvas\` like so:
|
||||
|
||||
import { render } from 'your-test-renderer';
|
||||
|
||||
setProjectAnnotations({
|
||||
renderToCanvas: ({ storyFn }) => {
|
||||
const Story = storyFn();
|
||||
|
||||
// Svelte
|
||||
render(Story.Component, Story.props);
|
||||
|
||||
// Vue
|
||||
render(Story);
|
||||
|
||||
// or for React
|
||||
render(<Story/>);
|
||||
},
|
||||
});`})}};xe(zu,"TestingLibraryMustBeConfiguredError");var Ba=class extends Ie{constructor(e){super({category:"PREVIEW_API",code:14,message:Ce`
|
||||
No render function available for storyId '${e.id}'
|
||||
`}),this.data=e}};xe(Ba,"NoRenderFunctionError");var ka=Ba,Na=class extends Ie{constructor(){super({category:"PREVIEW_API",code:15,message:Ce`
|
||||
No component is mounted in your story.
|
||||
|
||||
This usually occurs when you destructure mount in the play function, but forget to call it.
|
||||
|
||||
For example:
|
||||
|
||||
async play({ mount, canvasElement }) {
|
||||
// 👈 mount should be called: await mount();
|
||||
const canvas = within(canvasElement);
|
||||
const button = await canvas.findByRole('button');
|
||||
await userEvent.click(button);
|
||||
};
|
||||
|
||||
Make sure to either remove it or call mount in your play function.
|
||||
`})}};xe(Na,"NoStoryMountedError");var Ma=Na,qu=class extends Ie{constructor(){super({category:"FRAMEWORK_NEXTJS",code:1,documentation:"https://storybook.js.org/docs/get-started/nextjs#faq",message:Ce`
|
||||
You are importing avif images, but you don't have sharp installed.
|
||||
|
||||
You have to install sharp in order to use image optimization features in Next.js.
|
||||
`})}};xe(qu,"NextJsSharpError");var Uu=class extends Ie{constructor(e){super({category:"FRAMEWORK_NEXTJS",code:2,message:Ce`
|
||||
Tried to access router mocks from "${e.importType}" but they were not created yet. You might be running code in an unsupported environment.
|
||||
`}),this.data=e}};xe(Uu,"NextjsRouterMocksNotAvailable");var Hu=class extends Ie{constructor(e){super({category:"DOCS-TOOLS",code:1,documentation:"https://github.com/storybookjs/storybook/issues/26606",message:Ce`
|
||||
There was a failure when generating detailed ArgTypes in ${e.language} for:
|
||||
${JSON.stringify(e.type,null,2)}
|
||||
|
||||
Storybook will fall back to use a generic type description instead.
|
||||
|
||||
This type is either not supported or it is a bug in the docgen generation in Storybook.
|
||||
If you think this is a bug, please detail it as much as possible in the Github issue.
|
||||
`}),this.data=e}};xe(Hu,"UnknownArgTypesError");var Wu=Object.create,qa=Object.defineProperty,Vu=Object.getOwnPropertyDescriptor,Gu=Object.getOwnPropertyNames,Yu=Object.getPrototypeOf,Ku=Object.prototype.hasOwnProperty,Ju=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Xu=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Gu(e))!Ku.call(t,o)&&o!==r&&qa(t,o,{get:()=>e[o],enumerable:!(n=Vu(e,o))||n.enumerable});return t},Qu=(t,e,r)=>(r=t!=null?Wu(Yu(t)):{},Xu(e||!t||!t.__esModule?qa(r,"default",{value:t,enumerable:!0}):r,t)),Zu=Ju(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isEqual=function(){var e=Object.prototype.toString,r=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(o){return Object.keys(o).concat(Object.getOwnPropertySymbols(o))}:Object.keys;return function(o,a){return function i(s,u,l){var f,d,p,g=e.call(s),h=e.call(u);if(s===u)return!0;if(s==null||u==null)return!1;if(l.indexOf(s)>-1&&l.indexOf(u)>-1)return!0;if(l.push(s,u),g!=h||(f=n(s),d=n(u),f.length!=d.length||f.some(function(v){return!i(s[v],u[v],l)})))return!1;switch(g.slice(8,-1)){case"Symbol":return s.valueOf()==u.valueOf();case"Date":case"Number":return+s==+u||+s!=+s&&+u!=+u;case"RegExp":case"Function":case"String":case"Boolean":return""+s==""+u;case"Set":case"Map":f=s.entries(),d=u.entries();do if(!i((p=f.next()).value,d.next().value,l))return!1;while(!p.done);return!0;case"ArrayBuffer":s=new Uint8Array(s),u=new Uint8Array(u);case"DataView":s=new Uint8Array(s.buffer),u=new Uint8Array(u.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(s.length!=u.length)return!1;for(p=0;p<s.length;p++)if((p in s||p in u)&&(p in s!=p in u||!i(s[p],u[p],l)))return!1;return!0;case"Object":return i(r(s),r(u),l);default:return!1}}(o,a,[])}}()});function el(t){return t.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e,r,n,o)=>`${r} ${n}${o}`).replace(/([a-z])([A-Z])/g,(e,r,n)=>`${r} ${n}`).replace(/([a-z])([0-9])/gi,(e,r,n)=>`${r} ${n}`).replace(/([0-9])([a-z])/gi,(e,r,n)=>`${r} ${n}`).replace(/(\s|^)(\w)/g,(e,r,n)=>`${r}${n.toUpperCase()}`).replace(/ +/g," ").trim()}var La=Qu(Zu()),Ua=t=>t.map(e=>typeof e<"u").filter(Boolean).length,tl=(t,e)=>{let{exists:r,eq:n,neq:o,truthy:a}=t;if(Ua([r,n,o,a])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:r,eq:n,neq:o})}`);if(typeof n<"u")return(0,La.isEqual)(e,n);if(typeof o<"u")return!(0,La.isEqual)(e,o);if(typeof r<"u"){let i=typeof e<"u";return r?i:!i}return typeof a>"u"||a?!!e:!e},Ha=(t,e,r)=>{if(!t.if)return!0;let{arg:n,global:o}=t.if;if(Ua([n,o])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:n,global:o})}`);let a=n?e[n]:r[o];return tl(t.if,a)},mn=t=>t.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),$a=(t,e)=>{let r=mn(t);if(r==="")throw new Error(`Invalid ${e} '${t}', must include alphanumeric characters`);return r},Wa=(t,e)=>`${$a(t,"kind")}${e?`--${$a(e,"name")}`:""}`,Va=t=>el(t);function za(t,e){return Array.isArray(e)?e.includes(t):t.match(e)}function Tr(t,{includeStories:e,excludeStories:r}){return t!=="__esModule"&&(!e||za(t,e))&&(!r||!za(t,r))}var Ga=(...t)=>{let e=t.reduce((r,n)=>(n.startsWith("!")?r.delete(n.slice(1)):r.add(n),r),new Set);return Array.from(e)};var rl=Object.create,kn=Object.defineProperty,nl=Object.getOwnPropertyDescriptor,ol=Object.getOwnPropertyNames,al=Object.getPrototypeOf,il=Object.prototype.hasOwnProperty,c=(t,e)=>kn(t,"name",{value:e,configurable:!0}),Dr=(t=>typeof ke<"u"?ke:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ke<"u"?ke:e)[r]}):t)(function(t){if(typeof ke<"u")return ke.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),R=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),sl=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ol(e))!il.call(t,o)&&o!==r&&kn(t,o,{get:()=>e[o],enumerable:!(n=nl(e,o))||n.enumerable});return t},Pe=(t,e,r)=>(r=t!=null?rl(al(t)):{},sl(e||!t||!t.__esModule?kn(r,"default",{value:t,enumerable:!0}):r,t)),ci=R((t,e)=>{(function(r){if(typeof t=="object"&&typeof e<"u")e.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"||typeof window<"u"?n=window:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){var r,n,o;return c(function a(i,s,u){function l(p,g){if(!s[p]){if(!i[p]){var h=typeof Dr=="function"&&Dr;if(!g&&h)return h(p,!0);if(f)return f(p,!0);var v=new Error("Cannot find module '"+p+"'");throw v.code="MODULE_NOT_FOUND",v}var b=s[p]={exports:{}};i[p][0].call(b.exports,function(m){var y=i[p][1][m];return l(y||m)},b,b.exports,a,i,s,u)}return s[p].exports}c(l,"s");for(var f=typeof Dr=="function"&&Dr,d=0;d<u.length;d++)l(u[d]);return l},"e")({1:[functLine truncated
|
||||
`)>=0)return!1;return!0}c(Gt,"singleLineValues");function mr(P,N){var pe;if(P.indent===" ")pe=" ";else if(typeof P.indent=="number"&&P.indent>0)pe=z.call(Array(P.indent+1)," ");else return null;return{base:pe,prev:z.call(Array(N+1),pe)}}c(mr,"getIndent");function Tt(P,N){if(P.length===0)return"";var pe=`
|
||||
`+N.prev+N.base;return pe+z.call(P,","+pe)+`
|
||||
`+N.prev}c(Tt,"indentedJoin");function Ye(P,N){var pe=le(P),S=[];if(pe){S.length=P.length;for(var O=0;O<P.length;O++)S[O]=ee(P,O)?N(P[O],P):""}var k=typeof _=="function"?_(P):[],Y;if(B){Y={};for(var X=0;X<k.length;X++)Y["$"+k[X]]=k[X]}for(var Z in P)ee(P,Z)&&(pe&&String(Number(Z))===Z&&Z<P.length||B&&Y["$"+Z]instanceof Symbol||(E.call(/[^\w$]/,Z)?S.push(N(Z,P)+": "+N(P[Z],P)):S.push(Z+": "+N(P[Z],P))));if(typeof _=="function")for(var ie=0;ie<k.length;ie++)$.call(P,k[ie])&&S.push("["+N(k[ie])+"]: "+N(P[k[ie]],P));return S}c(Ye,"arrObjKeys")}),lp=R((t,e)=>{"use strict";var r=zt(),n=ip(),o=up(),a=ar(),i=r("%WeakMap%",!0),s=r("%Map%",!0),u=n("WeakMap.prototype.get",!0),l=n("WeakMap.prototype.set",!0),f=n("WeakMap.prototype.has",!0),d=n("Map.prototype.get",!0),p=n("Map.prototype.set",!0),g=n("Map.prototype.has",!0),h=c(function(y,A){for(var w=y,C;(C=w.next)!==null;w=C)if(C.key===A)return w.next=C.next,C.next=y.next,y.next=C,C},"listGetNode"),v=c(function(y,A){var w=h(y,A);return w&&w.value},"listGet"),b=c(function(y,A,w){var C=h(y,A);C?C.value=w:y.next={key:A,next:y.next,value:w}},"listSet"),m=c(function(y,A){return!!h(y,A)},"listHas");e.exports=c(function(){var y,A,w,C={assert:c(function(I){if(!C.has(I))throw new a("Side channel does not contain "+o(I))},"assert"),get:c(function(I){if(i&&I&&(typeof I=="object"||typeof I=="function")){if(y)return u(y,I)}else if(s){if(A)return d(A,I)}else if(w)return v(w,I)},"get"),has:c(function(I){if(i&&I&&(typeof I=="object"||typeof I=="function")){if(y)return f(y,I)}else if(s){if(A)return g(A,I)}else if(w)return m(w,I);return!1},"has"),set:c(function(I,D){i&&I&&(typeof I=="object"||typeof I=="function")?(y||(y=new i),l(y,I,D)):s?(A||(A=new s),p(A,I,D)):(w||(w={key:{},next:null}),b(w,I,D))},"set")};return C},"getSideChannel")}),Xn=R((t,e)=>{"use strict";var r=String.prototype.replace,n=/%20/g,o={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports={default:o.RFC3986,formatters:{RFC1738:c(function(a){return r.call(a,n,"+")},"RFC1738"),RFC3986:c(function(a){return String(a)},"RFC3986")},RFC1738:o.RFC1738,RFC3986:o.RFC3986}}),Mi=R((t,e)=>{"use strict";var r=Xn(),n=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var y=[],A=0;A<256;++A)y.push("%"+((A<16?"0":"")+A.toString(16)).toUpperCase());return y}(),i=c(function(y){for(;y.length>1;){var A=y.pop(),w=A.obj[A.prop];if(o(w)){for(var C=[],I=0;I<w.length;++I)typeof w[I]<"u"&&C.push(w[I]);A.obj[A.prop]=C}}},"compactQueue"),s=c(function(y,A){for(var w=A&&A.plainObjects?Object.create(null):{},C=0;C<y.length;++C)typeof y[C]<"u"&&(w[C]=y[C]);return w},"arrayToObject"),u=c(function y(A,w,C){if(!w)return A;if(typeof w!="object"){if(o(A))A.push(w);else if(A&&typeof A=="object")(C&&(C.plainObjects||C.allowPrototypes)||!n.call(Object.prototype,w))&&(A[w]=!0);else return[A,w];return A}if(!A||typeof A!="object")return[A].concat(w);var I=A;return o(A)&&!o(w)&&(I=s(A,C)),o(A)&&o(w)?(w.forEach(function(D,E){if(n.call(A,E)){var j=A[E];j&&typeof j=="object"&&D&&typeof D=="object"?A[E]=y(j,D,C):A.push(D)}else A[E]=D}),A):Object.keys(w).reduce(function(D,E){var j=w[E];return n.call(D,E)?D[E]=y(D[E],j,C):D[E]=j,D},I)},"merge"),l=c(function(y,A){return Object.keys(A).reduce(function(w,C){return w[C]=A[C],w},y)},"assignSingleSource"),f=c(function(y,A,w){var C=y.replace(/\+/g," ");if(w==="iso-8859-1")return C.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(C)}catch{return C}},"decode"),d=1024,p=c(function(y,A,w,C,I){if(y.length===0)return y;var D=y;if(typeof y=="symbol"?D=Symbol.prototype.toString.call(y):typeof y!="string"&&(D=String(y)),w==="iso-8859-1")return escape(D).replace(/%u[0-9a-f]{4}/gi,function(_){return"%26%23"+parseInt(_.slice(2),16)+"%3B"});for(var E="",j=0;j<D.length;j+=d){for(var z=D.length>=d?D.slice(j,j+d):D,q=[],G=0;G<z.length;++G){var L=z.charCodeAt(G);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||I===r.RFC1738&&(L===40||L===41)){q[q.length]=z.charAt(G);continue}if(L<128){q[q.length]=a[L];continue}if(L<2048){q[q.length]=a[192|L>>6]+a[128|L&63];continue}if(L<55296||L>=57344){q[q.length]=a[224|L>>12]+a[128|L>>6&63]+a[128|L&63];continue}G+=1,L=65536+((L&1023)<<10|z.charCodeAt(G)&1023),q[q.length]=a[240|L>>18]+a[128|L>>12&63]+a[128|L>>6&63]+a[128|L&63]}E+=q.join("")}return E},"encode"),g=c(function(y){for(var A=[{obj:{o:y},prop:"o"}],w=[],C=0;C<A.length;++C)for(var I=A[C],D=I.obj[I.prop],E=Object.keys(D),j=0;j<E.length;++j){var z=E[j],q=D[z];typeof q=="object"&&q!==null&&w.indexOf(q)===-1&&(A.push({obj:D,prop:z}),w.push(q))}return i(A),y},"compact"),h=c(function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},"isRegExp"),v=c(function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},"isBuffer"),b=c(function(y,A){return[].concat(y,A)},"combine"),m=c(function(y,A){if(o(y)){for(var w=[],C=0;C<y.length;C+=1)w.push(A(y[C]));return w}return A(y)},"maybeMap");e.exports={arrayToObject:s,assign:l,combine:b,compact:g,
Line truncated
|
||||
`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nharr:"\u21AE",nhArr:"\u21CE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlarr:"\u219A",nlArr:"\u21CD",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nleftarrow:"\u219A",nLeftarrow:"\u21CD",nleftrightarrow:"\u21AE",nLeftrightarrow:"\u21CE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nopf:"\u{1D55F}",Nopf:"\u2115",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangle:"\u22EB",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",nparallel:"\u2226",npar:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",nprec:"\u2280",npreceq:"\u2AAF\u0338",npre:"\u2AAF\u0338",nrarrc:"\u2933\u0338",nrarr:"\u219B",nrArr:"\u21CF",nrarrw:"\u219D\u0338",nrightarrow:"\u219B",nRightarrow:"\u21CF",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nvdash:"\u22AC",nvDash:"\u22AD",nVdash:"\u22AE",nVDash:"\u22AF",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwarr:"\u2196",nwArr:"\u21D6",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",Ocirc:"\xD4",ocirc:"\xF4",ocir:"\u229A",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",orarr:"\u21BB",Or:"\u2A54",or:"\u2228",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",otimesas:"\u2A36",Otimes:"\u2A37",otimes:"\u2297",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var U=!0,M=!1,V;return{s:c(function(){B=B.call(_)},"s"),n:c(function(){var J=B.next();return U=J.done,J},"n"),e:c(function(J){M=!0,V=J},"e"),f:c(function(){try{!U&&B.return!=null&&B.return()}finally{if(M)throw V}},"f")}}c(a,"_createForOfIteratorHelper");function i(_,F){if(_){if(typeof _=="string")return s(_,F);var B=Object.prototype.toString.call(_).slice(8,-1);if(B==="Object"&&_.constructor&&(B=_.constructor.name),B==="Map"||B==="Set")return Array.from(_);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return s(_,F)}}c(i,"_unsupportedIterableToArray");function s(_,F){(F==null||F>_.length)&&(F=_.length);for(var B=0,H=new Array(F);B<F;B++)H[B]=_[B];return H}c(s,"_arrayLikeToArray");var u=mp(),l={fg:"#FFF",bg:"#000",newline:!1,escapeXML:!1,stream:!1,colors:f()};function f(){var _={0:"#000",1:"#A00",2:"#0A0",3:"#A50",4:"#00A",5:"#A0A",6:"#0AA",7:"#AAA",8:"#555",9:"#F55",10:"#5F5",11:"#FF5",12:"#55F",13:"#F5F",14:"#5FF",15:"#FFF"};return y(0,5).forEach(function(F){y(0,5).forEach(function(B){y(0,5).forEach(function(H){return d(F,B,H,_)})})}),y(0,23).forEach(function(F){var B=F+232,H=p(F*10+8);_[B]="#"+H+H+H}),_}c(f,"getDefaultColors");function d(_,F,B,H){var $=16+_*36+F*6+B,U=_>0?_*40+55:0,M=F>0?F*40+55:0,V=B>0?B*40+55:0;H[$]=g([U,M,V])}c(d,"setStyleColor");function p(_){for(var F=_.toString(16);F.length<2;)F="0"+F;return F}c(p,"toHexString");function g(_){var F=[],B=a(_),H;try{for(B.s();!(H=B.n()).done;){var $=H.value;F.push(p($))}}catch(U){B.e(U)}finally{B.f()}return"#"+F.join("")}c(g,"toColorHexString");function h(_,F,B,H){var $;return F==="text"?$=C(B,H):F==="display"?$=b(_,B,H):F==="xterm256Foreground"?$=E(_,H.colors[B]):F==="xterm256Background"?$=j(_,H.colors[B]):F==="rgb"&&($=v(_,B)),$}c(h,"generateOutput");function v(_,F){F=F.substring(2).slice(0,-1);var B=+F.substr(0,2),H=F.substring(5).split(";"),$=H.map(function(U){return("0"+Number(U).toString(16)).substr(-2)}).join("");return D(_,(B===38?"color:#":"background-color:#")+$)}c(v,"handleRgb");function b(_,F,B){F=parseInt(F,10);var H={"-1":c(function(){return"<br/>"},"_"),0:c(function(){return _.length&&m(_)},"_"),1:c(function(){return I(_,"b")},"_"),3:c(function(){return I(_,"i")},"_"),4:c(function(){return I(_,"u")},"_"),8:c(function(){return D(_,"display:none")},"_"),9:c(function(){return I(_,"strike")},"_"),22:c(function(){return D(_,"font-weight:normal;text-decoration:none;font-style:normal")},"_"),23:c(function(){return z(_,"i")},"_"),24:c(function(){return z(_,"u")},"_"),39:c(function(){return E(_,B.fg)},"_"),49:c(function(){return j(_,B.bg)},"_"),53:c(function(){return D(_,"text-decoration:overline")},"_")},$;return H[F]?$=H[F]():4<F&&F<7?$=I(_,"blink"):29<F&&F<38?$=E(_,B.colors[F-30]):39<F&&F<48?$=j(_,B.colors[F-40]):89<F&&F<98?$=E(_,B.colors[8+(F-90)]):99<F&&F<108&&($=j(_,B.colors[8+(F-100)])),$}c(b,"handleDisplay");function m(_){var F=_.slice(0);return _.length=0,F.reverse().map(function(B){return"</"+B+">"}).join("")}c(m,"resetStyles");function y(_,F){for(var B=[],H=_;H<=F;H++)B.push(H);return B}c(y,"range");function A(_){return function(F){return(_===null||F.category!==_)&&_!=="all"}}c(A,"notCategory");function w(_){_=parseInt(_,10);var F=null;return _===0?F="all":_===1?F="bold":2<_&&_<5?F="underline":4<_&&_<7?F="blink":_===8?F="hide":_===9?F="strike":29<_&&_<38||_===39||89<_&&_<98?F="foreground-color":(39<_&&_<48||_===49||99<_&&_<108)&&(F="background-color"),F}c(w,"categoryForCode");function C(_,F){return F.escapeXML?u.encodeXML(_):_}c(C,"pushText");function I(_,F,B){return B||(B=""),_.push(F),"<".concat(F).concat(B?' style="'.concat(B,'"'):"",">")}c(I,"pushTag");function D(_,F){return I(_,"span",F)}c(D,"pushStyle");function E(_,F){return I(_,"span","color:"+F)}c(E,"pushForegroundColor");function j(_,F){return I(_,"span","background-color:"+F)}c(j,"pushBackgroundColor");function z(_,F){var B;if(_.slice(-1)[0]===F&&(B=_.pop()),B)return"</"+F+">"}c(z,"closeTag");function q(_,F,B){var H=!1,$=3;function U(){return""}c(U,"remove");function M(W,ee){return B("xterm256Foreground",ee),""}c(M,"removeXterm256Foreground");function V(W,ee){return B("xterm256Background",ee),""}c(V,"removeXterm256Background");function J(W){return F.newline?B("display",-1):B("text",W),""}c(J,"newline");function te(W,ee){H=!0,ee.trim().length===0&&(ee="0"),ee=ee.trimRight(";").split(";");var ae=a(ee),_e;try{for(ae.s();!(_e=ae.n()).done;){var bt=_e.value;B("display",bt)}}catch(It){ae.e(It)}finally{ae.f()}return""}c(te,"ansiMess");function ue(W){return B("text",W),""}c(ue,"realText");function ne(W){return B("rgb",W),""}c(ne,"rgb");var le=[{pattern:/^\x08+/,sub:U},{pattern:/^\x1b\[[012]?K/,sub:U},{pattern:/^\x1b\[\(B/,sub:U},{pattern:/^\x1b\[[34]8;2;\d+;\d+;\d+m/,sub:ne},{pattern:/^\x1b\[38;5;(\d+)m/,sub:M},{pattern:/^\x1b\[48;5;(\d+)m/,sub:V},{pattern:/^\n/,sub:J},{pattern:/^\r+\n/,sub:J},{pattern:/^\r/,sub:J},{pattern:/^\x1b\[((?:\d{1,3};?)+|)m/,sub:te},{pattern:/^\x1
Line truncated
|
||||
Previous: ${o.deps}
|
||||
Incoming: ${r}`),(r==null||o.deps==null||!Ep(r,o.deps))&&(e(o),o.deps=r),o}throw Zn()}c(Vi,"useHook");function ir(t,e,r){let{memoizedState:n}=Vi(t,o=>{o.memoizedState=e()},r);return n}c(ir,"useMemoLike");function Sp(t,e){return ir("useMemo",t,e)}c(Sp,"useMemo");function tr(t,e){return ir("useCallback",()=>t,e)}c(tr,"useCallback");function to(t,e){return ir(t,()=>({current:e}),[])}c(to,"useRefLike");function Ap(t){return to("useRef",t)}c(Ap,"useRef");function Gi(){let t=eo();if(t!=null&&t.currentPhase!=="NONE")t.hasUpdates=!0;else try{dt.getChannel().emit(Ar)}catch{Se.warn("State updates of Storybook preview hooks work only in browser")}}c(Gi,"triggerUpdate");function ro(t,e){let r=to(t,typeof e=="function"?e():e),n=c(o=>{r.current=typeof o=="function"?o(r.current):o,Gi()},"setState");return[r.current,n]}c(ro,"useStateLike");function wp(t){return ro("useState",t)}c(wp,"useState");function xp(t,e,r){let n=r!=null?()=>r(e):e,[o,a]=ro("useReducer",n);return[o,c(i=>a(s=>t(s,i)),"dispatch")]}c(xp,"useReducer");function Yi(t,e){let r=Hr(),n=ir("useEffect",()=>({create:t}),e);r.currentEffects.includes(n)||r.currentEffects.push(n)}c(Yi,"useEffect");function Cp(t,e=[]){let r=dt.getChannel();return Yi(()=>(Object.entries(t).forEach(([n,o])=>r.on(n,o)),()=>{Object.entries(t).forEach(([n,o])=>r.removeListener(n,o))}),[...Object.keys(t),...e]),tr(r.emit.bind(r),[r])}c(Cp,"useChannel");function Wr(){let{currentContext:t}=Hr();if(t==null)throw Zn();return t}c(Wr,"useStoryContext");function Op(t,e){let{parameters:r}=Wr();if(t)return r[t]??e}c(Op,"useParameter");function _p(){let t=dt.getChannel(),{id:e,args:r}=Wr(),n=tr(a=>t.emit(Ir,{storyId:e,updatedArgs:a}),[t,e]),o=tr(a=>t.emit(xr,{storyId:e,argNames:a}),[t,e]);return[r,n,o]}c(_p,"useArgs");function Ip(){let t=dt.getChannel(),{globals:e}=Wr(),r=tr(n=>t.emit(_r,{globals:n}),[t]);return[e,r]}c(Ip,"useGlobals");var o2=c(({name:t,parameterName:e,wrapper:r,skipIfNoParametersOrOptions:n=!1})=>{let o=c(a=>(i,s)=>{let u=s.parameters&&s.parameters[e];return u&&u.disable||n&&!a&&!u?i(s):r(i,s,{options:a,parameters:u})},"decorator");return(...a)=>typeof a[0]=="function"?o()(...a):(...i)=>{if(i.length>1)return a.length>1?o(a)(...i):o(...a)(...i);throw new Error(`Passing stories directly into ${t}() is not allowed,
|
||||
instead use addDecorator(${t}) and pass options with the '${e}' parameter`)}},"makeDecorator"),bn=Pe(ci(),1),Rp=Pe(Ur(),1),Ja=Pe(Lc(),1),Tp=Pe(ci(),1),Dp=(0,Tp.default)(1)(t=>Object.values(t).reduce((e,r)=>(e[r.importPath]=e[r.importPath]||r,e),{})),Ki=class{entries;constructor({entries:e}={v:5,entries:{}}){this.entries=e}entryFromSpecifier(e){let r=Object.values(this.entries);if(e==="*")return r[0];if(typeof e=="string")return this.entries[e]?this.entries[e]:r.find(a=>a.id.startsWith(e));let{name:n,title:o}=e;return r.find(a=>a.name===n&&a.title===o)}storyIdToEntry(e){let r=this.entries[e];if(!r)throw new ya({storyId:e});return r}importPathToEntry(e){return Dp(this.entries)[e]}};c(Ki,"StoryIndexStore");var Fp=Ki,Xa=Object.prototype.hasOwnProperty;function xn(t,e,r){for(r of t.keys())if(Nt(r,e))return r}c(xn,"find");function Nt(t,e){var r,n,o;if(t===e)return!0;if(t&&e&&(r=t.constructor)===e.constructor){if(r===Date)return t.getTime()===e.getTime();if(r===RegExp)return t.toString()===e.toString();if(r===Array){if((n=t.length)===e.length)for(;n--&&Nt(t[n],e[n]););return n===-1}if(r===Set){if(t.size!==e.size)return!1;for(n of t)if(o=n,o&&typeof o=="object"&&(o=xn(e,o),!o)||!e.has(o))return!1;return!0}if(r===Map){if(t.size!==e.size)return!1;for(n of t)if(o=n[0],o&&typeof o=="object"&&(o=xn(e,o),!o)||!Nt(n[1],e.get(o)))return!1;return!0}if(r===ArrayBuffer)t=new Uint8Array(t),e=new Uint8Array(e);else if(r===DataView){if((n=t.byteLength)===e.byteLength)for(;n--&&t.getInt8(n)===e.getInt8(n););return n===-1}if(ArrayBuffer.isView(t)){if((n=t.byteLength)===e.byteLength)for(;n--&&t[n]===e[n];);return n===-1}if(!r||typeof t=="object"){n=0;for(r in t)if(Xa.call(t,r)&&++n&&!Xa.call(e,r)||!(r in e)||!Nt(t[r],e[r]))return!1;return Object.keys(e).length===n}}return t!==t&&e!==e}c(Nt,"dequal");var jr=Pe(Yn(),1);function qe(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var o=n.reduce(function(s,u){var l=u.match(/\n([\t ]+|(?!\s).)/g);return l?s.concat(l.map(function(f){var d,p;return(p=(d=f.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0})):s},[]);if(o.length){var a=new RegExp(`
|
||||
[ ]{`+Math.min.apply(Math,o)+"}","g");n=n.map(function(s){return s.replace(a,`
|
||||
`)})}n[0]=n[0].replace(/^\r?\n/,"");var i=n[0];return e.forEach(function(s,u){var l=i.match(/(?:^|\n)( *)$/),f=l?l[1]:"",d=s;typeof s=="string"&&s.includes(`
|
||||
`)&&(d=String(s).split(`
|
||||
`).map(function(p,g){return g===0?p:""+f+p}).join(`
|
||||
`)),i+=d+n[u+1]}),i}c(qe,"dedent");var Bt=Symbol("incompatible"),Cn=c((t,e)=>{let r=e.type;if(t==null||!r||e.mapping)return t;switch(r.name){case"string":return String(t);case"enum":return t;case"number":return Number(t);case"boolean":return String(t)==="true";case"array":return!r.value||!Array.isArray(t)?Bt:t.reduce((n,o,a)=>{let i=Cn(o,{type:r.value});return i!==Bt&&(n[a]=i),n},new Array(t.length));case"object":return typeof t=="string"||typeof t=="number"?t:!r.value||typeof t!="object"?Bt:Object.entries(t).reduce((n,[o,a])=>{let i=Cn(a,{type:r.value[o]});return i===Bt?n:Object.assign(n,{[o]:i})},{});default:return Bt}},"map"),Pp=c((t,e)=>Object.entries(t).reduce((r,[n,o])=>{if(!e[n])return r;let a=Cn(o,e[n]);return a===Bt?r:Object.assign(r,{[n]:a})},{}),"mapArgsToTypes"),On=c((t,e)=>Array.isArray(t)&&Array.isArray(e)?e.reduce((r,n,o)=>(r[o]=On(t[o],e[o]),r),[...t]).filter(r=>r!==void 0):!(0,jr.default)(t)||!(0,jr.default)(e)?e:Object.keys({...t,...e}).reduce((r,n)=>{if(n in e){let o=On(t[n],e[n]);o!==void 0&&(r[n]=o)}else r[n]=t[n];return r},{}),"combineArgs"),jp=c((t,e)=>Object.entries(e).reduce((r,[n,{options:o}])=>{function a(){return n in t&&(r[n]=t[n]),r}if(c(a,"allowArg"),!o)return a();if(!Array.isArray(o))return ct.error(qe`
|
||||
Invalid argType: '${n}.options' should be an array.
|
||||
|
||||
More info: https://storybook.js.org/docs/react/api/argtypes
|
||||
`),a();if(o.some(d=>d&&["object","function"].includes(typeof d)))return ct.error(qe`
|
||||
Invalid argType: '${n}.options' should only contain primitives. Use a 'mapping' for complex values.
|
||||
|
||||
More info: https://storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values
|
||||
`),a();let i=Array.isArray(t[n]),s=i&&t[n].findIndex(d=>!o.includes(d)),u=i&&s===-1;if(t[n]===void 0||o.includes(t[n])||u)return a();let l=i?`${n}[${s}]`:n,f=o.map(d=>typeof d=="string"?`'${d}'`:String(d)).join(", ");return ct.warn(`Received illegal value for '${l}'. Supported options: ${f}`),r},{}),"validateOptions"),Zt=Symbol("Deeply equal"),Br=c((t,e)=>{if(typeof t!=typeof e)return e;if(Nt(t,e))return Zt;if(Array.isArray(t)&&Array.isArray(e)){let r=e.reduce((n,o,a)=>{let i=Br(t[a],o);return i!==Zt&&(n[a]=i),n},new Array(e.length));return e.length>=t.length?r:r.concat(new Array(t.length-e.length).fill(void 0))}return(0,jr.default)(t)&&(0,jr.default)(e)?Object.keys({...t,...e}).reduce((r,n)=>{let o=Br(t?.[n],e?.[n]);return o===Zt?r:Object.assign(r,{[n]:o})},{}):e},"deepDiff"),Ji="UNTARGETED";function Xi({args:t,argTypes:e}){let r={};return Object.entries(t).forEach(([n,o])=>{let{target:a=Ji}=e[n]||{};r[a]=r[a]||{},r[a][n]=o}),r}c(Xi,"groupArgsByTarget");function Qi(t){return Object.keys(t).forEach(e=>t[e]===void 0&&delete t[e]),t}c(Qi,"deleteUndefined");var Zi=class{initialArgsByStoryId={};argsByStoryId={};get(e){if(!(e in this.argsByStoryId))throw new Error(`No args known for ${e} -- has it been rendered yet?`);return this.argsByStoryId[e]}setInitial(e){if(!this.initialArgsByStoryId[e.id])this.initialArgsByStoryId[e.id]=e.initialArgs,this.argsByStoryId[e.id]=e.initialArgs;else if(this.initialArgsByStoryId[e.id]!==e.initialArgs){let r=Br(this.initialArgsByStoryId[e.id],this.argsByStoryId[e.id]);this.initialArgsByStoryId[e.id]=e.initialArgs,this.argsByStoryId[e.id]=e.initialArgs,r!==Zt&&this.updateFromDelta(e,r)}}updateFromDelta(e,r){let n=jp(r,e.argTypes);this.argsByStoryId[e.id]=On(this.argsByStoryId[e.id],n)}updateFromPersisted(e,r){let n=Pp(r,e.argTypes);return this.updateFromDelta(e,n)}update(e,r){if(!(e in this.argsByStoryId))throw new Error(`No args known for ${e} -- has it been rendered yet?`);this.argsByStoryId[e]=Qi({...this.argsByStoryId[e],...r})}};c(Zi,"ArgsStore");var Bp=Zi,es=c((t={})=>Object.entries(t).reduce((e,[r,{defaultValue:n}])=>(typeof n<"u"&&(e[r]=n),e),{}),"getValuesFromArgTypes"),ts=class{allowedGlobalNames;initialGlobals;globals;constructor({globals:e={},globalTypes:r={}}){this.set({globals:e,globalTypes:r})}set({globals:e={},globalTypes:r={}}){let n=this.initialGlobals&&Br(this.initialGlobals,this.globals);this.allowedGlobalNames=new Set([...Object.keys(e),...Object.keys(r)]);let o=es(r);this.initialGlobals={...o,...e},this.globals=this.initialGlobals,n&&n!==Zt&&this.updateFromPersisted(n)}filterAllowedGlobals(e){return Object.entries(e).reduce((r,[n,o])=>(this.allowedGlobalNames.has(n)?r[n]=o:Se.warn(`Attempted to set a global (${n}) that is not defined in initial globals or globalTypes`),r),{})}updateFromPersisted(e){let r=this.filterAllowedGlobals(e);this.globals={...this.globals,...r}}get(){return this.globals}update(e){this.globals={...this.globals,...this.filterAllowedGlobals(e)}}};c(ts,"GlobalsStore");var kp=ts,Np=Pe(Ur(),1),Mp=c(t=>typeof t=="string"?{name:t}:t,"normalizeType"),Lp=c(t=>typeof t=="string"?{type:t}:t,"normalizeControl"),$p=c((t,e)=>{let{type:r,control:n,...o}=t,a={name:e,...o};return r&&(a.type=Mp(r)),n?a.control=Lp(n):n===!1&&(a.control={disable:!0}),a},"normalizeInputType"),kr=c(t=>(0,Np.default)(t,$p),"normalizeInputTypes"),Oe=c(t=>Array.isArray(t)?t:t?[t]:[],"normalizeArrays"),zp=qe`
|
||||
CSF .story annotations deprecated; annotate story functions directly:
|
||||
- StoryFn.story.name => StoryFn.storyName
|
||||
- StoryFn.story.(parameters|decorators) => StoryFn.(parameters|decorators)
|
||||
See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#hoisted-csf-annotations for details and codemod.
|
||||
`;function no(t,e,r){let n=e,o=typeof e=="function"?e:null,{story:a}=n;a&&(Se.debug("deprecated story",a),rt(zp));let i=Va(t),s=typeof n!="function"&&n.name||n.storyName||a?.name||i,u=[...Oe(n.decorators),...Oe(a?.decorators)],l={...a?.parameters,...n.parameters},f={...a?.args,...n.args},d={...a?.argTypes,...n.argTypes},p=[...Oe(n.loaders),...Oe(a?.loaders)],g=[...Oe(n.beforeEach),...Oe(a?.beforeEach)],{render:h,play:v,tags:b=[]}=n,m=l.__id||Wa(r.id,i);return{moduleExport:e,id:m,name:s,tags:b,decorators:u,parameters:l,args:f,argTypes:kr(d),loaders:p,beforeEach:g,...h&&{render:h},...o&&{userStoryFn:o},...v&&{play:v}}}c(no,"normalizeStory");function oo(t,e=t.title,r){let{id:n,argTypes:o}=t;return{id:mn(n||e),...t,title:e,...o&&{argTypes:kr(o)},parameters:{fileName:r,...t.parameters}}}c(oo,"normalizeComponentAnnotations");var qp=c(t=>{let{globals:e,globalTypes:r}=t;(e||r)&&Se.error("Global args/argTypes can only be set globally",JSON.stringify({globals:e,globalTypes:r}))},"checkGlobals"),Up=c(t=>{let{options:e}=t;e?.storySort&&Se.error("The storySort option parameter can only be set globally")},"checkStorySort"),Qa=c(t=>{t&&(qp(t),Up(t))},"checkDisallowedParameters");function rs(t,e,r){let{default:n,__namedExportsOrder:o,...a}=t,i=oo(n,r,e);Qa(i.parameters);let s={meta:i,stories:{},moduleExports:t};return Object.keys(a).forEach(u=>{if(Tr(u,i)){let l=no(u,a[u],i);Qa(l.parameters),s.stories[l.id]=l}}),s}c(rs,"processCSFFile");var vn=Pe(Yn(),1),wt=c((...t)=>{let e={},r=t.filter(Boolean),n=r.reduce((o,a)=>(Object.entries(a).forEach(([i,s])=>{let u=o[i];Array.isArray(s)||typeof u>"u"?o[i]=s:(0,vn.default)(s)&&(0,vn.default)(u)?e[i]=!0:typeof s<"u"&&(o[i]=s)}),o),{});return Object.keys(e).forEach(o=>{let a=r.filter(Boolean).map(i=>i[o]).filter(i=>typeof i<"u");a.every(i=>(0,vn.default)(i))?n[o]=wt(...a):n[o]=a[a.length-1]}),n},"combineParameters");function ns(t,e,r){let n=r(t);return o=>e(n,o)}c(ns,"decorateStory");function os({componentId:t,title:e,kind:r,id:n,name:o,story:a,parameters:i,initialArgs:s,argTypes:u,...l}={}){return l}c(os,"sanitizeStoryContextUpdate");function as(t,e){let r={},n=c(a=>i=>{if(!r.value)throw new Error("Decorated function called without init");return r.value={...r.value,...os(i)},a(r.value)},"bindWithContext"),o=e.reduce((a,i)=>ns(a,i,n),t);return a=>(r.value=a,o(a))}c(as,"defaultDecorateStory");function is(t){return t!=null&&ss(t).includes("mount")}c(is,"mountDestructured");function ss(t){let e=t.toString().match(/[^(]*\(([^)]*)/);if(!e)return[];let r=_n(e[1]);if(!r.length)return[];let n=r[0];return n.startsWith("{")&&n.endsWith("}")?_n(n.slice(1,-1).replace(/\s/g,"")).map(o=>o.replace(/:.*|=.*/g,"")):[]}c(ss,"getUsedProps");function _n(t){let e=[],r=[],n=0;for(let a=0;a<t.length;a++)if(t[a]==="{"||t[a]==="[")r.push(t[a]==="{"?"}":"]");else if(t[a]===r[r.length-1])r.pop();else if(!r.length&&t[a]===","){let i=t.substring(n,a).trim();i&&e.push(i),n=a+1}let o=t.substring(n).trim();return o&&e.push(o),e}c(_n,"splitByComma");function ao(t,e,r){let{moduleExport:n,id:o,name:a}=t||{},i=io(t,e,r),s=c(async C=>{let I={};for(let D of[..."__STORYBOOK_TEST_LOADERS__"in Re&&Array.isArray(Re.__STORYBOOK_TEST_LOADERS__)?[Re.__STORYBOOK_TEST_LOADERS__]:[],Oe(r.loaders),Oe(e.loaders),Oe(t.loaders)]){if(C.abortSignal.aborted)return I;let E=await Promise.all(D.map(j=>j(C)));Object.assign(I,...E)}return I},"applyLoaders"),u=c(async C=>{let I=new Array;for(let D of[...Oe(r.beforeEach),...Oe(e.beforeEach),...Oe(t.beforeEach)]){if(C.abortSignal.aborted)return I;let E=await D(C);E&&I.push(E)}return I},"applyBeforeEach"),l=c(C=>C.originalStoryFn(C.args,C),"undecoratedStoryFn"),{applyDecorators:f=as,runStep:d}=r,p=[...Oe(t?.decorators),...Oe(e?.decorators),...Oe(r?.decorators)],g=t?.userStoryFn||t?.render||e.render||r.render,h=vp(f)(l,p),v=c(C=>h(C),"unboundStoryFn"),b=t?.play??e?.play,m=is(b);if(!g&&!m)throw new ka({id:o});let y=c(C=>async()=>(await C.renderToCanvas(),C.canvas),"defaultMount"),A=t.mount??e.mount??r.mount??y,w=r.testingLibraryRender;return{...i,moduleExport:n,id:o,name:a,story:a,originalStoryFn:g,undecoratedStoryFn:l,unboundStoryFn:v,applyLoaders:s,applyBeforeEach:u,playFunction:b,runStep:d,mount:A,testingLibraryRender:w,renderToCanvas:r.renderToCanvas,usesMount:m}}c(ao,"prepareStory");function us(t,e,r){return{...io(void 0,t,e),moduleExport:r}}c(us,"prepareMeta");function io(t,e,r){let n=["dev","test"],o=Re.DOCS_OPTIONS?.autodocs===!0?["autodocs"]:[],a=Ga(...n,...o,...r.tags??[],...e.tags??[],...t?.tags??[]),i=wt(r.parameters,e.parameters,t?.parameters),{argTypesEnhancers:s=[],argsEnhancers:u=[]}=r,l=wt(r.argTypes,e.argTypes,t?.argTypes);if(t){let b=t?.userStoryFn||t?.render||e.render||r.render;i.__isArgsStory=b&&b.length>0}let f={...r.args,...e.args,...t?.args},d={componentId:e.id,title:e.title,kind:e.title,id:t?.id||e.id,name:t?.name||"__meta",story:t?.name||"__meta",component:e.component,subcomponents:e.subcomponents,tags:a,parameters:i,initialArgs:f,argTypes:l};d.argTypes=s.reduce((b,m)=>m({
Line truncated
|
||||
We've detected a cycle in arg '${e}'. Args should be JSON-serializable.
|
||||
|
||||
Consider using the mapping feature or fully custom args:
|
||||
- Mapping: https://storybook.js.org/docs/react/writing-stories/args#mapping-to-complex-arg-values
|
||||
- Custom args: https://storybook.js.org/docs/react/essentials/controls#fully-custom-args
|
||||
`),{name:"other",value:"cyclic object"}):(r.add(t),Array.isArray(t)?{name:"array",value:t.length>0?Rn(t[0],e,new Set(r)):{name:"other",value:"unknown"}}:{name:"object",value:(0,In.default)(t,o=>Rn(o,e,new Set(r)))}):{name:"object",value:{}}},"inferType"),ls=c(t=>{let{id:e,argTypes:r={},initialArgs:n={}}=t,o=(0,In.default)(n,(i,s)=>({name:s,type:Rn(i,`${e}.${s}`,new Set)})),a=(0,In.default)(r,(i,s)=>({name:s}));return wt(o,a,r)},"inferArgTypes");ls.secondPass=!0;var Hp=Pe(Ur(),1),Wp=Pe(Wc(),1),Za=c((t,e)=>Array.isArray(e)?e.includes(t):t.match(e),"matches"),Vp=c((t,e,r)=>!e&&!r?t:t&&(0,Wp.default)(t,(n,o)=>{let a=n.name||o;return(!e||Za(a,e))&&(!r||!Za(a,r))}),"filterArgTypes"),Gp=c((t,e,r)=>{let{type:n,options:o}=t;if(n){if(r.color&&r.color.test(e)){let a=n.name;if(a==="string")return{control:{type:"color"}};a!=="enum"&&Se.warn(`Addon controls: Control of type color only supports string, received "${a}" instead`)}if(r.date&&r.date.test(e))return{control:{type:"date"}};switch(n.name){case"array":return{control:{type:"object"}};case"boolean":return{control:{type:"boolean"}};case"string":return{control:{type:"text"}};case"number":return{control:{type:"number"}};case"enum":{let{value:a}=n;return{control:{type:a?.length<=5?"radio":"select"},options:a}}case"function":case"symbol":return null;default:return{control:{type:o?"select":"object"}}}}},"inferControl"),cs=c(t=>{let{argTypes:e,parameters:{__isArgsStory:r,controls:{include:n=null,exclude:o=null,matchers:a={}}={}}}=t;if(!r)return e;let i=Vp(e,n,o),s=(0,Hp.default)(i,(u,l)=>u?.type&&Gp(u,l,a));return wt(s,i)},"inferControls");cs.secondPass=!0;function Nr({argTypes:t,globalTypes:e,argTypesEnhancers:r,decorators:n,loaders:o,beforeEach:a,globals:i,initialGlobals:s,...u}){return i&&Object.keys(i).length>0&&rt(qe`
|
||||
The preview.js 'globals' field is deprecated and will be removed in Storybook 9.0.
|
||||
Please use 'initialGlobals' instead. Learn more:
|
||||
|
||||
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#previewjs-globals-renamed-to-initialglobals
|
||||
`),{...t&&{argTypes:kr(t)},...e&&{globalTypes:kr(e)},decorators:Oe(n),loaders:Oe(o),beforeEach:Oe(a),argTypesEnhancers:[...r||[],ls,cs],initialGlobals:wt(s,i),...u}}c(Nr,"normalizeProjectAnnotations");function ps(t){return async(e,r,n)=>{await t.reduceRight((o,a)=>async()=>a(e,o,n),async()=>r(n))()}}c(ps,"composeStepRunners");var Yp=c(t=>async()=>{let e=[];for(let r of t){let n=await r();n&&e.unshift(n)}return async()=>{for(let r of e)await r()}},"composeBeforeAllHooks");function Mt(t,e){return t.map(r=>r.default?.[e]??r[e]).filter(Boolean)}c(Mt,"getField");function pt(t,e,r={}){return Mt(t,e).reduce((n,o)=>{let a=Oe(o);return r.reverseFileOrder?[...a,...n]:[...n,...a]},[])}c(pt,"getArrayField");function kt(t,e){return Object.assign({},...Mt(t,e))}c(kt,"getObjectField");function St(t,e){return Mt(t,e).pop()}c(St,"getSingletonField");function uo(t){let e=pt(t,"argTypesEnhancers"),r=Mt(t,"runStep"),n=pt(t,"beforeAll");return{parameters:wt(...Mt(t,"parameters")),decorators:pt(t,"decorators",{reverseFileOrder:!(Re.FEATURES?.legacyDecoratorFileOrder??!1)}),args:kt(t,"args"),argsEnhancers:pt(t,"argsEnhancers"),argTypes:kt(t,"argTypes"),argTypesEnhancers:[...e.filter(o=>!o.secondPass),...e.filter(o=>o.secondPass)],globals:kt(t,"globals"),initialGlobals:kt(t,"initialGlobals"),globalTypes:kt(t,"globalTypes"),loaders:pt(t,"loaders"),beforeAll:Yp(n),beforeEach:pt(t,"beforeEach"),render:St(t,"render"),renderToCanvas:St(t,"renderToCanvas"),renderToDOM:St(t,"renderToDOM"),applyDecorators:St(t,"applyDecorators"),runStep:ps(r),tags:pt(t,"tags"),mount:St(t,"mount"),testingLibraryRender:St(t,"testingLibraryRender")}}c(uo,"composeConfigs");var Tn={},Kp="ComposedStory",Jp="Unnamed Story";function fs(t){return t?"default"in t?t.default:t:{}}c(fs,"extractAnnotation");function Xp(t){let e=Array.isArray(t)?t:[t];return Tn=uo(e.map(fs)),Tn}c(Xp,"setProjectAnnotations");var ft=[];function Qp(t,e,r,n,o){if(t===void 0)throw new Error("Expected a story but received undefined.");e.title=e.title??Kp;let a=oo(e),i=o||t.storyName||t.story?.name||t.name||Jp,s=no(i,t,a),u=Nr(uo([n??{},Tn,r??{}])),l=ao(s,a,u),f=es(u.globalTypes),d=c(()=>{let b=so({hooks:new Wi,globals:{...f,...u.initialGlobals},args:{...l.initialArgs},viewMode:"story",loaded:{},abortSignal:new AbortController().signal,step:c((m,y)=>l.runStep(m,y,b),"step"),canvasElement:null,canvas:{},...l,context:null,mount:null});return b.context=b,l.renderToCanvas&&(b.renderToCanvas=async()=>{let m=await l.renderToCanvas?.({componentId:l.componentId,title:l.title,id:l.id,name:l.name,tags:l.tags,showMain:c(()=>{},"showMain"),showError:c(y=>{},"showError"),showException:c(y=>{},"showException"),forceRemount:!0,storyContext:b,storyFn:c(()=>l.unboundStoryFn(b),"storyFn"),unboundStoryFn:l.unboundStoryFn},b.canvasElement);m&&ft.push(m)}),b.mount=l.mount(b),b},"initializeContext"),p,g=c(async b=>{let m=d();return m.canvasElement??=globalThis?.document?.body,p&&(m.loaded=p.loaded),Object.assign(m,b),l.playFunction(m)},"play"),h=c(b=>{let m=d();return Object.assign(m,b),ds(l,m)},"run"),v=l.playFunction?g:void 0;return Object.assign(c(function(b){let m=d();return p&&(m.loaded=p.loaded),m.args={...m.initialArgs,...b},l.unboundStoryFn(m)},"storyFn"),{id:l.id,storyName:i,load:c(async()=>{for(let m of[...ft].reverse())await m();ft.length=0;let b=d();b.loaded=await l.applyLoaders(b),ft.push(...(await l.applyBeforeEach(b)).filter(Boolean)),p=b},"load"),args:l.initialArgs,parameters:l.parameters,argTypes:l.argTypes,play:v,run:h,tags:l.tags})}c(Qp,"composeStory");function Zp(t,e,r){let{default:n,__esModule:o,__namedExportsOrder:a,...i}=t;return Object.entries(i).reduce((s,[u,l])=>Tr(u,n)?Object.assign(s,{[u]:r(l,n,e,u)}):s,{})}c(Zp,"composeStories");function ef(t){return t.extend({mount:c(async({mount:e,page:r},n)=>{await n(async(o,...a)=>{if(!("__pw_type"in o)||"__pw_type"in o&&o.__pw_type!=="jsx")throw new Error(qe`
|
||||
Portable stories in Playwright CT only work when referencing JSX elements.
|
||||
Please use JSX format for your components such as:
|
||||
|
||||
instead of:
|
||||
await mount(MyComponent, { props: { foo: 'bar' } })
|
||||
|
||||
do:
|
||||
await mount(<MyComponent foo="bar"/>)
|
||||
|
||||
More info: https://storybook.js.org/docs/api/portable-stories-playwright
|
||||
`);await r.evaluate(async s=>{let u=await globalThis.__pwUnwrapObject?.(s);return("__pw_type"in u?u.type:u)?.load?.()},o);let i=await e(o,...a);return await r.evaluate(async s=>{let u=await globalThis.__pwUnwrapObject?.(s),l="__pw_type"in u?u.type:u,f=document.querySelector("#root");return l?.play?.({canvasElement:f})},o),i})},"mount")})}c(ef,"createPlaywrightTest");async function ds(t,e){for(let o of[...ft].reverse())await o();if(ft.length=0,!e.canvasElement){let o=document.createElement("div");globalThis?.document?.body?.appendChild(o),e.canvasElement=o,ft.push(()=>{globalThis?.document?.body?.contains(o)&&globalThis?.document?.body?.removeChild(o)})}if(e.loaded=await t.applyLoaders(e),e.abortSignal.aborted)return;ft.push(...(await t.applyBeforeEach(e)).filter(Boolean));let r=t.playFunction,n=t.usesMount;n||await e.mount(),!e.abortSignal.aborted&&r&&(n||(e.mount=async()=>{throw new Rr({playFunction:r.toString()})}),await r(e))}c(ds,"runStory");var ei=1e3,tf=1e4,hs=class{constructor(e,r,n){this.importFn=r,this.storyIndex=new Fp(e),this.projectAnnotations=Nr(n);let{initialGlobals:o,globalTypes:a}=this.projectAnnotations;this.args=new Bp,this.globals=new kp({globals:o,globalTypes:a}),this.hooks={},this.cleanupCallbacks={},this.processCSFFileWithCache=(0,bn.default)(ei)(rs),this.prepareMetaWithCache=(0,bn.default)(ei)(us),this.prepareStoryWithCache=(0,bn.default)(tf)(ao)}storyIndex;projectAnnotations;globals;args;hooks;cleanupCallbacks;cachedCSFFiles;processCSFFileWithCache;prepareMetaWithCache;prepareStoryWithCache;setProjectAnnotations(e){this.projectAnnotations=Nr(e);let{initialGlobals:r,globalTypes:n}=e;this.globals.set({globals:r,globalTypes:n})}async onStoriesChanged({importFn:e,storyIndex:r}){e&&(this.importFn=e),r&&(this.storyIndex.entries=r.entries),this.cachedCSFFiles&&await this.cacheAllCSFFiles()}async storyIdToEntry(e){return this.storyIndex.storyIdToEntry(e)}async loadCSFFileByStoryId(e){let{importPath:r,title:n}=this.storyIndex.storyIdToEntry(e),o=await this.importFn(r);return this.processCSFFileWithCache(o,r,n)}async loadAllCSFFiles(){let e={};return Object.entries(this.storyIndex.entries).forEach(([r,{importPath:n}])=>{e[n]=r}),(await Promise.all(Object.entries(e).map(async([r,n])=>({importPath:r,csfFile:await this.loadCSFFileByStoryId(n)})))).reduce((r,{importPath:n,csfFile:o})=>(r[n]=o,r),{})}async cacheAllCSFFiles(){this.cachedCSFFiles=await this.loadAllCSFFiles()}preparedMetaFromCSFFile({csfFile:e}){let r=e.meta;return this.prepareMetaWithCache(r,this.projectAnnotations,e.moduleExports.default)}async loadStory({storyId:e}){let r=await this.loadCSFFileByStoryId(e);return this.storyFromCSFFile({storyId:e,csfFile:r})}storyFromCSFFile({storyId:e,csfFile:r}){let n=r.stories[e];if(!n)throw new Da({storyId:e});let o=r.meta,a=this.prepareStoryWithCache(n,o,this.projectAnnotations);return this.args.setInitial(a),this.hooks[a.id]=this.hooks[a.id]||new Wi,a}componentStoriesFromCSFFile({csfFile:e}){return Object.keys(this.storyIndex.entries).filter(r=>!!e.stories[r]).map(r=>this.storyFromCSFFile({storyId:r,csfFile:e}))}async loadEntry(e){let r=await this.storyIdToEntry(e),n=r.type==="docs"?r.storiesImports:[],[o,...a]=await Promise.all([this.importFn(r.importPath),...n.map(i=>{let s=this.storyIndex.importPathToEntry(i);return this.loadCSFFileByStoryId(s.id)})]);return{entryExports:o,csfFiles:a}}getStoryContext(e,{forceInitialArgs:r=!1}={}){return so({...e,args:r?e.initialArgs:this.args.get(e.id),globals:this.globals.get(),hooks:this.hooks[e.id]})}addCleanupCallbacks(e,r){this.cleanupCallbacks[e.id]=r}async cleanupStory(e){this.hooks[e.id].clean();let r=this.cleanupCallbacks[e.id];if(r)for(let n of[...r].reverse())await n();delete this.cleanupCallbacks[e.id]}extract(e={includeDocsOnly:!1}){let{cachedCSFFiles:r}=this;if(!r)throw new ba;return Object.entries(this.storyIndex.entries).reduce((n,[o,{type:a,importPath:i}])=>{if(a==="docs")return n;let s=r[i],u=this.storyFromCSFFile({storyId:o,csfFile:s});return!e.includeDocsOnly&&u.parameters.docsOnly||(n[o]=Object.entries(u).reduce((l,[f,d])=>f==="moduleExport"||typeof d=="function"?l:Array.isArray(d)?Object.assign(l,{[f]:d.slice().sort()}):Object.assign(l,{[f]:d}),{args:u.initialArgs})),n},{})}getSetStoriesPayload(){let e=this.extract({includeDocsOnly:!0}),r=Object.values(e).reduce((n,{title:o})=>(n[o]={},n),{});return{v:2,globals:this.globals.get(),globalParameters:{},kindParameters:r,stories:e}}getStoriesJsonData=c(()=>{let e=this.getSetStoriesPayload(),r=["fileName","docsOnly","framework","__id","__isArgsStory"];return{v:3,stories:(0,Rp.default)(e.stories,n=>{let{importPath:o}=this.storyIndex.entries[n.id];return{...(0,Ja.default)(n,["id","name","title"]),importPath:o,kind:n.title,story:n.name,parameters:{...(0,Ja.default)(n.parameters,r),fileName:o}}})}},"getStoriesJsonData");raw(){return rt("StoryStore.raw() is deprecated and will be removed in 9.0, please use extract() instead"),Object.values(this.extract()).map(({id:e})=>this.fromId(e)
Line truncated
|
||||
CSF Auto-title received a numeric fileName. This typically happens when
|
||||
webpack is mis-configured in production mode. To force webpack to produce
|
||||
filenames, set optimization.moduleIds = "named" in your webpack config.
|
||||
`);let i=ms(String(t));if(o.exec(i)){if(!r){let s=i.replace(n,""),u=Dn([a,s]).split("/");return u=nf(u),u.join("/")}return a?Dn([a,r]):r}},"userOrAutoTitleFromSpecifier"),_2=c((t,e,r)=>{for(let n=0;n<e.length;n+=1){let o=of(t,e[n],r);if(o)return o}return r||void 0},"userOrAutoTitle"),ti=/\s*\/\s*/,af=c((t={})=>(e,r)=>{if(e.title===r.title&&!t.includeNames)return 0;let n=t.method||"configure",o=t.order||[],a=e.title.trim().split(ti),i=r.title.trim().split(ti);t.includeNames&&(a.push(e.name),i.push(r.name));let s=0;for(;a[s]||i[s];){if(!a[s])return-1;if(!i[s])return 1;let u=a[s],l=i[s];if(u!==l){let d=o.indexOf(u),p=o.indexOf(l),g=o.indexOf("*");return d!==-1||p!==-1?(d===-1&&(g!==-1?d=g:d=o.length),p===-1&&(g!==-1?p=g:p=o.length),d-p):n==="configure"?0:u.localeCompare(l,t.locales?t.locales:void 0,{numeric:!0,sensitivity:"accent"})}let f=o.indexOf(u);f===-1&&(f=o.indexOf("*")),o=f!==-1&&Array.isArray(o[f+1])?o[f+1]:[],s+=1}return 0},"storySort"),sf=c((t,e,r)=>{if(e){let n;typeof e=="function"?n=e:n=af(e),t.sort(n)}else t.sort((n,o)=>r.indexOf(n.importPath)-r.indexOf(o.importPath));return t},"sortStoriesCommon"),I2=c((t,e,r)=>{try{return sf(t,e,r)}catch(n){throw new Error(qe`
|
||||
Error sorting stories with sort parameter ${e}:
|
||||
|
||||
> ${n.message}
|
||||
|
||||
Are you using a V6-style sort function in V7 mode?
|
||||
|
||||
More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort
|
||||
`)}},"sortStoriesV7"),Vr=new Error("prepareAborted"),{AbortController:ri}=globalThis;function Fn(t){try{let{name:e="Error",message:r=String(t),stack:n}=t;return{name:e,message:r,stack:n}}catch{return{name:"Error",message:String(t)}}}c(Fn,"serializeError");var ys=class{constructor(e,r,n,o,a,i,s={autoplay:!0,forceInitialArgs:!1},u){this.channel=e,this.store=r,this.renderToScreen=n,this.callbacks=o,this.id=a,this.viewMode=i,this.renderOptions=s,this.abortController=new ri,u&&(this.story=u,this.phase="preparing")}type="story";story;phase;abortController;canvasElement;notYetRendered=!0;rerenderEnqueued=!1;disableKeyListeners=!1;teardownRender=c(()=>{},"teardownRender");torndown=!1;async runPhase(e,r,n){this.phase=r,this.channel.emit(nt,{newPhase:this.phase,storyId:this.id}),n&&(await n(),this.checkIfAborted(e))}checkIfAborted(e){return e.aborted?(this.phase="aborted",this.channel.emit(nt,{newPhase:this.phase,storyId:this.id}),!0):!1}async prepare(){if(await this.runPhase(this.abortController.signal,"preparing",async()=>{this.story=await this.store.loadStory({storyId:this.id})}),this.abortController.signal.aborted)throw await this.store.cleanupStory(this.story),Vr}isEqual(e){return!!(this.id===e.id&&this.story&&this.story===e.story)}isPreparing(){return["preparing"].includes(this.phase)}isPending(){return["loading","beforeEach","rendering","playing"].includes(this.phase)}async renderToElement(e){return this.canvasElement=e,this.render({initial:!0,forceRemount:!0})}storyContext(){if(!this.story)throw new Error("Cannot call storyContext before preparing");let{forceInitialArgs:e}=this.renderOptions;return this.store.getStoryContext(this.story,{forceInitialArgs:e})}async render({initial:e=!1,forceRemount:r=!1}={}){let{canvasElement:n}=this;if(!this.story)throw new Error("cannot render when not prepared");let o=this.story;if(!n)throw new Error("cannot render when canvasElement is unset");let{id:a,componentId:i,title:s,name:u,tags:l,applyLoaders:f,applyBeforeEach:d,unboundStoryFn:p,playFunction:g,runStep:h}=o;r&&!e&&(this.cancelRender(),this.abortController=new ri);let v=this.abortController.signal,b=!1,m=o.usesMount;try{let y={...this.storyContext(),viewMode:this.viewMode,abortSignal:v,canvasElement:n,loaded:{},step:c((E,j)=>h(E,j,y),"step"),context:null,canvas:{},renderToCanvas:c(async()=>{let E=await this.renderToScreen(A,n);this.teardownRender=E||(()=>{}),b=!0},"renderToCanvas"),mount:c(async(...E)=>{this.callbacks.showStoryDuringRender?.();let j=null;return await this.runPhase(v,"rendering",async()=>{j=await o.mount(y)(...E)}),m&&await this.runPhase(v,"playing"),j},"mount")};y.context=y;let A={componentId:i,title:s,kind:s,id:a,name:u,story:u,tags:l,...this.callbacks,showError:c(E=>(this.phase="errored",this.callbacks.showError(E)),"showError"),showException:c(E=>(this.phase="errored",this.callbacks.showException(E)),"showException"),forceRemount:r||this.notYetRendered,storyContext:y,storyFn:c(()=>p(y),"storyFn"),unboundStoryFn:p};if(await this.runPhase(v,"loading",async()=>{y.loaded=await f(y)}),v.aborted)return;let w=await d(y);if(this.store.addCleanupCallbacks(o,w),this.checkIfAborted(v)||(!b&&!m&&await y.mount(),this.notYetRendered=!1,v.aborted))return;let C=this.story.parameters?.test?.dangerouslyIgnoreUnhandledErrors===!0,I=new Set,D=c(E=>I.add("error"in E?E.error:E.reason),"onError");if(this.renderOptions.autoplay&&r&&g&&this.phase!=="errored"){window.addEventListener("error",D),window.addEventListener("unhandledrejection",D),this.disableKeyListeners=!0;try{if(m?await g(y):(y.mount=async()=>{throw new Rr({playFunction:g.toString()})},await this.runPhase(v,"playing",async()=>g(y))),!b)throw new Ma;this.checkIfAborted(v),!C&&I.size>0?await this.runPhase(v,"errored"):await this.runPhase(v,"played")}catch(E){if(this.callbacks.showStoryDuringRender?.(),await this.runPhase(v,"errored",async()=>{this.channel.emit(wr,Fn(E))}),this.story.parameters.throwPlayFunctionExceptions!==!1)throw E;console.error(E)}if(!C&&I.size>0&&this.channel.emit(Or,Array.from(I).map(Fn)),this.disableKeyListeners=!1,window.removeEventListener("unhandledrejection",D),window.removeEventListener("error",D),v.aborted)return}await this.runPhase(v,"completed",async()=>this.channel.emit(Qt,a))}catch(y){this.phase="errored",this.callbacks.showException(y)}this.rerenderEnqueued&&(this.rerenderEnqueued=!1,this.render())}async rerender(){if(this.isPending()&&this.phase!=="playing")this.rerenderEnqueued=!0;else return this.render()}async remount(){return await this.teardown(),this.render({forceRemount:!0})}cancelRender(){this.abortController?.abort()}async teardown(){this.torndown=!0,this.cancelRender(),this.story&&await this.store.cleanupStory(this.story);for(let e=0;e<3;e+=1){if(!this.isPending()){await this.teardownRender();return}await new Promise(r=>setTimeout(r,0))}window.location.reload(),await new Promise(()=>{})}};c(ys,"StoryRender");var gs=ys,{fetch:uf}=Re,lf="./index.json",bs=class{constructor(e,r,n=dt.getChannel(),o=!0){this.importFn=e,t
Line truncated
|
||||
- Did you pass a component to the 'of' prop when the block only supports a story or a meta?
|
||||
- ... or vice versa?
|
||||
- Did you pass a story, CSF file or meta to the 'of' prop that is not indexed, ie. is not targeted by the 'stories' globs in the main configuration?`)}switch(n.type){case"component":return{...n,projectAnnotations:this.projectAnnotations};case"meta":return{...n,preparedMeta:this.store.preparedMetaFromCSFFile({csfFile:n.csfFile})};case"story":default:return n}}storyIdByName=c(e=>{let r=this.nameToStoryId.get(e);if(r)return r;throw new Error(`No story found with that name: ${e}`)},"storyIdByName");componentStories=c(()=>this.componentStoriesValue,"componentStories");componentStoriesFromCSFFile=c(e=>this.store.componentStoriesFromCSFFile({csfFile:e}),"componentStoriesFromCSFFile");storyById=c(e=>{if(!e){if(!this.primaryStory)throw new Error("No primary story defined for docs entry. Did you forget to use `<Meta>`?");return this.primaryStory}let r=this.storyIdToCSFFile.get(e);if(!r)throw new Error(`Called \`storyById\` for story that was never loaded: ${e}`);return this.store.storyFromCSFFile({storyId:e,csfFile:r})},"storyById");getStoryContext=c(e=>({...this.store.getStoryContext(e),loaded:{},viewMode:"docs"}),"getStoryContext");loadStory=c(e=>this.store.loadStory({storyId:e}),"loadStory")};c(vs,"DocsContext");var Es=vs,Ss=class{constructor(e,r,n,o){this.channel=e,this.store=r,this.entry=n,this.callbacks=o,this.id=n.id}type="docs";subtype="csf";id;story;rerender;teardownRender;torndown=!1;disableKeyListeners=!1;preparing=!1;csfFiles;isPreparing(){return this.preparing}async prepare(){this.preparing=!0;let{entryExports:e,csfFiles:r=[]}=await this.store.loadEntry(this.id);if(this.torndown)throw Vr;let{importPath:n,title:o}=this.entry,a=this.store.processCSFFileWithCache(e,n,o),i=Object.keys(a.stories)[0];this.story=this.store.storyFromCSFFile({storyId:i,csfFile:a}),this.csfFiles=[a,...r],this.preparing=!1}isEqual(e){return!!(this.id===e.id&&this.story&&this.story===e.story)}docsContext(e){if(!this.csfFiles)throw new Error("Cannot render docs before preparing");let r=new Es(this.channel,this.store,e,this.csfFiles);return this.csfFiles.forEach(n=>r.attachCSFFile(n)),r}async renderToElement(e,r){if(!this.story||!this.csfFiles)throw new Error("Cannot render docs before preparing");let n=this.docsContext(r),{docs:o}=this.story.parameters||{};if(!o)throw new Error("Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed");let a=await o.renderer(),{render:i}=a,s=c(async()=>{try{await i(n,o,e),this.channel.emit(Sr,this.id)}catch(u){this.callbacks.showException(u)}},"renderDocs");return this.rerender=async()=>s(),this.teardownRender=async({viewModeChanged:u})=>{!u||!e||a.unmount(e)},s()}async teardown({viewModeChanged:e}={}){this.teardownRender?.({viewModeChanged:e}),this.torndown=!0}};c(Ss,"CsfDocsRender");var ni=Ss,As=class{constructor(e,r,n,o){this.channel=e,this.store=r,this.entry=n,this.callbacks=o,this.id=n.id}type="docs";subtype="mdx";id;exports;rerender;teardownRender;torndown=!1;disableKeyListeners=!1;preparing=!1;csfFiles;isPreparing(){return this.preparing}async prepare(){this.preparing=!0;let{entryExports:e,csfFiles:r=[]}=await this.store.loadEntry(this.id);if(this.torndown)throw Vr;this.csfFiles=r,this.exports=e,this.preparing=!1}isEqual(e){return!!(this.id===e.id&&this.exports&&this.exports===e.exports)}docsContext(e){if(!this.csfFiles)throw new Error("Cannot render docs before preparing");return new Es(this.channel,this.store,e,this.csfFiles)}async renderToElement(e,r){if(!this.exports||!this.csfFiles||!this.store.projectAnnotations)throw new Error("Cannot render docs before preparing");let n=this.docsContext(r),{docs:o}=this.store.projectAnnotations.parameters||{};if(!o)throw new Error("Cannot render a story in viewMode=docs if `@storybook/addon-docs` is not installed");let a={...o,page:this.exports.default},i=await o.renderer(),{render:s}=i,u=c(async()=>{try{await s(n,a,e),this.channel.emit(Sr,this.id)}catch(l){this.callbacks.showException(l)}},"renderDocs");return this.rerender=async()=>u(),this.teardownRender=async({viewModeChanged:l}={})=>{!l||!e||(i.unmount(e),this.torndown=!0)},u()}async teardown({viewModeChanged:e}={}){this.teardownRender?.({viewModeChanged:e}),this.torndown=!0}};c(As,"MdxDocsRender");var oi=As,ff=globalThis;function ws(t){let e=t.composedPath&&t.composedPath()[0]||t.target;return/input|textarea/i.test(e.tagName)||e.getAttribute("contenteditable")!==null}c(ws,"focusInInput");var xs="attached-mdx",df="unattached-mdx";function Cs({tags:t}){return t?.includes(df)||t?.includes(xs)}c(Cs,"isMdxEntry");function Pr(t){return t.type==="story"}c(Pr,"isStoryRender");function Os(t){return t.type==="docs"}c(Os,"isDocsRender");function _s(t){return Os(t)&&t.subtype==="csf"}c(_s,"isCsfDocsRender");var Is=class extends cf{constructor(e,r,n,o){super(e,r,void 0,!1),this.importFn=e,this.getProjectAnnotations=r,this.selectionStore=n,this.view=o,this.initialize()}currentSelection;currentRender;setupListeners(){super.setupListeners(),ff.onkeydown=this.onKeydown.bind(thiLine truncated
|
||||
Omitted potentially unsafe URL args.
|
||||
|
||||
More info: https://storybook.js.org/docs/react/writing-stories/args#setting-args-through-the-url
|
||||
`),r),{})},"parseArgsParam"),{history:Ds,document:ot}=Re;function Fs(t){let e=(t||"").match(/^\/story\/(.+)/);if(!e)throw new Error(`Invalid path '${t}', must start with '/story/'`);return e[1]}c(Fs,"pathToId");var Ps=c(({selection:t,extraParams:e})=>{let r=typeof ot<"u"?ot.location.search:"",{path:n,selectedKind:o,selectedStory:a,...i}=Pn.default.parse(r,{ignoreQueryPrefix:!0});return Pn.default.stringify({...i,...e,...t&&{id:t.storyId,viewMode:t.viewMode}},{encode:!1,addQueryPrefix:!0})},"getQueryString"),vf=c(t=>{if(!t)return;let e=Ps({selection:t}),{hash:r=""}=ot.location;ot.title=t.storyId,Ds.replaceState({},"",`${ot.location.pathname}${e}${r}`)},"setPath"),Ef=c(t=>t!=null&&typeof t=="object"&&Array.isArray(t)===!1,"isObject"),er=c(t=>{if(t!==void 0){if(typeof t=="string")return t;if(Array.isArray(t))return er(t[0]);if(Ef(t))return er(Object.values(t).filter(Boolean))}},"getFirstString"),Sf=c(()=>{if(typeof ot<"u"){let t=Pn.default.parse(ot.location.search,{ignoreQueryPrefix:!0}),e=typeof t.args=="string"?ii(t.args):void 0,r=typeof t.globals=="string"?ii(t.globals):void 0,n=er(t.viewMode);(typeof n!="string"||!n.match(/docs|story/))&&(n="story");let o=er(t.path),a=o?Fs(o):er(t.id);if(a)return{storySpecifier:a,args:e,globals:r,viewMode:n}}return null},"getSelectionSpecifierFromPath"),js=class{selectionSpecifier;selection;constructor(){this.selectionSpecifier=Sf()}setSelection(e){this.selection=e,vf(this.selection)}setQueryParams(e){let r=Ps({extraParams:e}),{hash:n=""}=ot.location;Ds.replaceState({},"",`${ot.location.pathname}${r}${n}`)}};c(js,"UrlStore");var Af=js,wf=Pe(yp(),1),xf=Pe(Qn(),1),{document:De}=Re,si=100,Bs=(t=>(t.MAIN="MAIN",t.NOPREVIEW="NOPREVIEW",t.PREPARING_STORY="PREPARING_STORY",t.PREPARING_DOCS="PREPARING_DOCS",t.ERROR="ERROR",t))(Bs||{}),Sn={PREPARING_STORY:"sb-show-preparing-story",PREPARING_DOCS:"sb-show-preparing-docs",MAIN:"sb-show-main",NOPREVIEW:"sb-show-nopreview",ERROR:"sb-show-errordisplay"},An={centered:"sb-main-centered",fullscreen:"sb-main-fullscreen",padded:"sb-main-padded"},ui=new wf.default({escapeXML:!0}),ks=class{currentLayoutClass;testing=!1;preparingTimeout;constructor(){if(typeof De<"u"){let{__SPECIAL_TEST_PARAMETER__:e}=xf.default.parse(De.location.search,{ignoreQueryPrefix:!0});switch(e){case"preparing-story":{this.showPreparingStory(),this.testing=!0;break}case"preparing-docs":{this.showPreparingDocs(),this.testing=!0;break}default:}}}prepareForStory(e){return this.showStory(),this.applyLayout(e.parameters.layout),De.documentElement.scrollTop=0,De.documentElement.scrollLeft=0,this.storyRoot()}storyRoot(){return De.getElementById("storybook-root")}prepareForDocs(){return this.showMain(),this.showDocs(),this.applyLayout("fullscreen"),De.documentElement.scrollTop=0,De.documentElement.scrollLeft=0,this.docsRoot()}docsRoot(){return De.getElementById("storybook-docs")}applyLayout(e="padded"){if(e==="none"){De.body.classList.remove(this.currentLayoutClass),this.currentLayoutClass=null;return}this.checkIfLayoutExists(e);let r=An[e];De.body.classList.remove(this.currentLayoutClass),De.body.classList.add(r),this.currentLayoutClass=r}checkIfLayoutExists(e){An[e]||Se.warn(qe`
|
||||
The desired layout: ${e} is not a valid option.
|
||||
The possible options are: ${Object.keys(An).join(", ")}, none.
|
||||
`)}showMode(e){clearTimeout(this.preparingTimeout),Object.keys(Bs).forEach(r=>{r===e?De.body.classList.add(Sn[r]):De.body.classList.remove(Sn[r])})}showErrorDisplay({message:e="",stack:r=""}){let n=e,o=r,a=e.split(`
|
||||
`);a.length>1&&([n]=a,o=a.slice(1).join(`
|
||||
`).replace(/^\n/,"")),De.getElementById("error-message").innerHTML=ui.toHtml(n),De.getElementById("error-stack").innerHTML=ui.toHtml(o),this.showMode("ERROR")}showNoPreview(){this.testing||(this.showMode("NOPREVIEW"),this.storyRoot()?.setAttribute("hidden","true"),this.docsRoot()?.setAttribute("hidden","true"))}showPreparingStory({immediate:e=!1}={}){clearTimeout(this.preparingTimeout),e?this.showMode("PREPARING_STORY"):this.preparingTimeout=setTimeout(()=>this.showMode("PREPARING_STORY"),si)}showPreparingDocs({immediate:e=!1}={}){clearTimeout(this.preparingTimeout),e?this.showMode("PREPARING_DOCS"):this.preparingTimeout=setTimeout(()=>this.showMode("PREPARING_DOCS"),si)}showMain(){this.showMode("MAIN")}showDocs(){this.storyRoot().setAttribute("hidden","true"),this.docsRoot().removeAttribute("hidden")}showStory(){this.docsRoot().setAttribute("hidden","true"),this.storyRoot().removeAttribute("hidden")}showStoryDuringRender(){De.body.classList.add(Sn.MAIN)}};c(ks,"WebView");var Cf=ks,Of=class extends hf{constructor(e,r){super(e,r,new Af,new Cf),this.importFn=e,this.getProjectAnnotations=r,Re.__STORYBOOK_PREVIEW__=this}};c(Of,"PreviewWeb");var{document:At}=Re,_f=["application/javascript","application/ecmascript","application/x-ecmascript","application/x-javascript","text/ecmascript","text/javascript","text/javascript1.0","text/javascript1.1","text/javascript1.2","text/javascript1.3","text/javascript1.4","text/javascript1.5","text/jscript","text/livescript","text/x-ecmascript","text/x-javascript","module"],If="script",li="scripts-root";function Bn(){let t=At.createEvent("Event");t.initEvent("DOMContentLoaded",!0,!0),At.dispatchEvent(t)}c(Bn,"simulateDOMContentLoaded");function Ns(t,e,r){let n=At.createElement("script");n.type=t.type==="module"?"module":"text/javascript",t.src?(n.onload=e,n.onerror=e,n.src=t.src):n.textContent=t.innerText,r?r.appendChild(n):At.head.appendChild(n),t.parentNode.removeChild(t),t.src||e()}c(Ns,"insertScript");function lo(t,e,r=0){t[r](()=>{r++,r===t.length?e():lo(t,e,r)})}c(lo,"insertScriptsSequentially");function Rf(t){let e=At.getElementById(li);e?e.innerHTML="":(e=At.createElement("div"),e.id=li,At.body.appendChild(e));let r=Array.from(t.querySelectorAll(If));if(r.length){let n=[];r.forEach(o=>{let a=o.getAttribute("type");(!a||_f.includes(a))&&n.push(i=>Ns(o,i,e))}),n.length&&lo(n,Bn,void 0)}else Bn()}c(Rf,"simulatePageLoad");var i0=__STORYBOOK_CLIENT_LOGGER__,{deprecate:s0,logger:u0,once:Tf,pretty:l0}=__STORYBOOK_CLIENT_LOGGER__;var sr=(()=>{let t;return typeof window<"u"?t=window:typeof globalThis<"u"?t=globalThis:typeof window<"u"?t=window:typeof self<"u"?t=self:t={},t})();var Df=Object.create,Ms=Object.defineProperty,Ff=Object.getOwnPropertyDescriptor,Ls=Object.getOwnPropertyNames,Pf=Object.getPrototypeOf,jf=Object.prototype.hasOwnProperty,Bf=(t=>typeof ke<"u"?ke:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof ke<"u"?ke:e)[r]}):t)(function(t){if(typeof ke<"u")return ke.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),je=(t,e)=>function(){return e||(0,t[Ls(t)[0]])((e={exports:{}}).exports,e),e.exports},kf=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ls(e))!jf.call(t,o)&&o!==r&&Ms(t,o,{get:()=>e[o],enumerable:!(n=Ff(e,o))||n.enumerable});return t},Ct=(t,e,r)=>(r=t!=null?Df(Pf(t)):{},kf(e||!t||!t.__esModule?Ms(r,"default",{value:t,enumerable:!0}):r,t)),Nf=je({"../../node_modules/pretty-format/node_modules/ansi-styles/index.js"(t,e){var r=(a=0)=>i=>`\x1B[${38+a};5;${i}m`,n=(a=0)=>(i,s,u)=>`\x1B[${38+a};2;${i};${s};${u}m`;function o(){let a=new Map,i={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};i.color.gray=i.color.blackBright,i.bgColor.bgGray=i.bgColor.bgBlackBright,i.color.grey=i.color.blackBright,i.bgColor.bgGrey=i.bgColor.bgBlackBright;for(let[s,u]of Object.entries(i)){for(let[l,f]of Object.entries(u))i[l]={open:`\x1B[${f[0]}m`,close:`\x1B[${f[1]}m`},u[l]=i[l],a.set(f[0],f[1]);Object.defineProperty(i,s,{value:u,enumerable:!1})}return Object.defineProperty(i,"codes",{value:a,enumerable:!1}),i.color.close="\x1B[39m",i.bgColor.close="\x1B[49m",i.color.ansi256=r(),i.color.ansi16m=n(),i.bgColor.ansi256=r(10),i.bgColor.ansi16m=n(10),Object.defineProperties(i,{rgbToAnsi256:{value:(s,u,l)=>s===u&&u===l?s<8?16:s>248?231:Math.round((s-8)/
Line truncated
|
||||
`)!==-1&&(w=d.spacingOuter+b+w+d.spacingOuter+p),w=`{${w}}`),`${d.spacingInner+p+m.prop.open+y+m.prop.close}=${m.value.open}${w}${m.value.close}`}).join("")};t.printProps=n;var o=(l,f,d,p,g,h)=>l.map(v=>f.spacingOuter+d+(typeof v=="string"?a(v,f):h(v,f,d,p,g))).join("");t.printChildren=o;var a=(l,f)=>{let d=f.colors.content;return d.open+(0,e.default)(l)+d.close};t.printText=a;var i=(l,f)=>{let d=f.colors.comment;return`${d.open}<!--${(0,e.default)(l)}-->${d.close}`};t.printComment=i;var s=(l,f,d,p,g)=>{let h=p.colors.tag;return`${h.open}<${l}${f&&h.close+f+p.spacingOuter+g+h.open}${d?`>${h.close}${d}${p.spacingOuter}${g}${h.open}</${l}`:`${f&&!p.min?"":" "}/`}>${h.close}`};t.printElement=s;var u=(l,f)=>{let d=f.colors.tag;return`${d.open}<${l}${d.close} \u2026${d.open} />${d.close}`};t.printElementAsLeaf=u}}),zf=je({"../../node_modules/pretty-format/build/plugins/DOMElement.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var e=co(),r=1,n=3,o=8,a=11,i=/^((HTML|SVG)\w*)?Element$/,s=b=>{try{return typeof b.hasAttribute=="function"&&b.hasAttribute("is")}catch{return!1}},u=b=>{let m=b.constructor.name,{nodeType:y,tagName:A}=b,w=typeof A=="string"&&A.includes("-")||s(b);return y===r&&(i.test(m)||w)||y===n&&m==="Text"||y===o&&m==="Comment"||y===a&&m==="DocumentFragment"},l=b=>b?.constructor?.name&&u(b);t.test=l;function f(b){return b.nodeType===n}function d(b){return b.nodeType===o}function p(b){return b.nodeType===a}var g=(b,m,y,A,w,C)=>{if(f(b))return(0,e.printText)(b.data,m);if(d(b))return(0,e.printComment)(b.data,m);let I=p(b)?"DocumentFragment":b.tagName.toLowerCase();return++A>m.maxDepth?(0,e.printElementAsLeaf)(I,m):(0,e.printElement)(I,(0,e.printProps)(p(b)?[]:Array.from(b.attributes,D=>D.name).sort(),p(b)?{}:Array.from(b.attributes).reduce((D,E)=>(D[E.name]=E.value,D),{}),m,y+m.indent,A,w,C),(0,e.printChildren)(Array.prototype.slice.call(b.childNodes||b.children),m,y+m.indent,A,w,C),m,y)};t.serialize=g;var h={serialize:g,test:l},v=h;t.default=v}}),qf=je({"../../node_modules/pretty-format/build/plugins/Immutable.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.test=t.serialize=t.default=void 0;var e=Gr(),r="@@__IMMUTABLE_ITERABLE__@@",n="@@__IMMUTABLE_LIST__@@",o="@@__IMMUTABLE_KEYED__@@",a="@@__IMMUTABLE_MAP__@@",i="@@__IMMUTABLE_ORDERED__@@",s="@@__IMMUTABLE_RECORD__@@",u="@@__IMMUTABLE_SEQ__@@",l="@@__IMMUTABLE_SET__@@",f="@@__IMMUTABLE_STACK__@@",d=E=>`Immutable.${E}`,p=E=>`[${E}]`,g=" ",h="\u2026",v=(E,j,z,q,G,L,_)=>++q>j.maxDepth?p(d(_)):`${d(_)+g}{${(0,e.printIteratorEntries)(E.entries(),j,z,q,G,L)}}`;function b(E){let j=0;return{next(){if(j<E._keys.length){let z=E._keys[j++];return{done:!1,value:[z,E.get(z)]}}return{done:!0,value:void 0}}}}var m=(E,j,z,q,G,L)=>{let _=d(E._name||"Record");return++q>j.maxDepth?p(_):`${_+g}{${(0,e.printIteratorEntries)(b(E),j,z,q,G,L)}}`},y=(E,j,z,q,G,L)=>{let _=d("Seq");return++q>j.maxDepth?p(_):E[o]?`${_+g}{${E._iter||E._object?(0,e.printIteratorEntries)(E.entries(),j,z,q,G,L):h}}`:`${_+g}[${E._iter||E._array||E._collection||E._iterable?(0,e.printIteratorValues)(E.values(),j,z,q,G,L):h}]`},A=(E,j,z,q,G,L,_)=>++q>j.maxDepth?p(d(_)):`${d(_)+g}[${(0,e.printIteratorValues)(E.values(),j,z,q,G,L)}]`,w=(E,j,z,q,G,L)=>E[a]?v(E,j,z,q,G,L,E[i]?"OrderedMap":"Map"):E[n]?A(E,j,z,q,G,L,"List"):E[l]?A(E,j,z,q,G,L,E[i]?"OrderedSet":"Set"):E[f]?A(E,j,z,q,G,L,"Stack"):E[u]?y(E,j,z,q,G,L):m(E,j,z,q,G,L);t.serialize=w;var C=E=>E&&(E[r]===!0||E[s]===!0);t.test=C;var I={serialize:w,test:C},D=I;t.default=D}}),Uf=je({"../../node_modules/pretty-format/node_modules/react-is/cjs/react-is.development.js"(t){(function(){var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=!1,b=!1,m=!1,y=!1,A=!1,w;w=Symbol.for("react.module.reference");function C(W){return!!(typeof W=="string"||typeof W=="function"||W===n||W===a||A||W===o||W===f||W===d||y||W===h||v||b||m||typeof W=="object"&&W!==null&&(W.$$typeof===g||W.$$typeof===p||W.$$typeof===i||W.$$typeof===s||W.$$typeof===l||W.$$typeof===w||W.getModuleId!==void 0))}function I(W){if(typeof W=="object"&&W!==null){var ee=W.$$typeof;switch(ee){case e:var ae=W.type;switch(ae){case n:case a:case o:case f:case d:return ae;default:var _e=ae&&ae.$$typeof;switch(_e){case u:case s:case l:case g:case p:case i:return _e;default:return ee}}case r:return ee}}}var D=s,E=i,j=e,z=l,q=n,G=g,L=p,_=r,F=a,B=o,H=f,$=d,U=!1,M=!1;function V(W){return U||(U=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function J(W){return M||(M=!0,console.warn("The ReactIs.isConcurrentMode() ali
Line truncated
|
||||
${_e}`)},{edgeSpacing:Q.spacingOuter,min:Q.min,spacing:Q.spacingInner},Q.colors)}catch(ae){throw new y(ae.message,ae.stack)}if(typeof ee!="string")throw new Error(`pretty-format: Plugin must return type "string" but instead returned "${typeof ee}".`);return ee}function L(T,K){for(let Q=0;Q<T.length;Q++)try{if(T[Q].test(K))return T[Q]}catch(re){throw new y(re.message,re.stack)}return null}function _(T,K,Q,re,oe,W){let ee=L(K.plugins,T);if(ee!==null)return G(ee,T,K,Q,re,oe);let ae=j(T,K.printFunctionName,K.escapeRegex,K.escapeString);return ae!==null?ae:z(T,K,Q,re,oe,W)}var F={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},B=Object.keys(F),H=T=>T,$=H({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:F});t.DEFAULT_OPTIONS=$;function U(T){if(Object.keys(T).forEach(K=>{if(!Object.prototype.hasOwnProperty.call($,K))throw new Error(`pretty-format: Unknown option "${K}".`)}),T.min&&T.indent!==void 0&&T.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.');if(T.theme!==void 0){if(T.theme===null)throw new Error('pretty-format: Option "theme" must not be null.');if(typeof T.theme!="object")throw new Error(`pretty-format: Option "theme" must be of type "object" but instead received "${typeof T.theme}".`)}}var M=T=>B.reduce((K,Q)=>{let re=T.theme&&T.theme[Q]!==void 0?T.theme[Q]:F[Q],oe=re&&e.default[re];if(oe&&typeof oe.close=="string"&&typeof oe.open=="string")K[Q]=oe;else throw new Error(`pretty-format: Option "theme" has a key "${Q}" whose value "${re}" is undefined in ansi-styles.`);return K},Object.create(null)),V=()=>B.reduce((T,K)=>(T[K]={close:"",open:""},T),Object.create(null)),J=T=>T?.printFunctionName??$.printFunctionName,te=T=>T?.escapeRegex??$.escapeRegex,ue=T=>T?.escapeString??$.escapeString,ne=T=>({callToJSON:T?.callToJSON??$.callToJSON,colors:T?.highlight?M(T):V(),compareKeys:typeof T?.compareKeys=="function"||T?.compareKeys===null?T.compareKeys:$.compareKeys,escapeRegex:te(T),escapeString:ue(T),indent:T?.min?"":le(T?.indent??$.indent),maxDepth:T?.maxDepth??$.maxDepth,maxWidth:T?.maxWidth??$.maxWidth,min:T?.min??$.min,plugins:T?.plugins??$.plugins,printBasicPrototype:T?.printBasicPrototype??!0,printFunctionName:J(T),spacingInner:T?.min?" ":`
|
||||
`,spacingOuter:T?.min?"":`
|
||||
`});function le(T){return new Array(T+1).join(" ")}function ce(T,K){if(K&&(U(K),K.plugins)){let re=L(K.plugins,T);if(re!==null)return G(re,T,ne(K),"",0,[])}let Q=j(T,J(K),te(K),ue(K));return Q!==null?Q:z(T,ne(K),"",0,[])}var ye={AsymmetricMatcher:n.default,DOMCollection:o.default,DOMElement:a.default,Immutable:i.default,ReactElement:s.default,ReactTestComponent:u.default};t.plugins=ye;var Ee=ce;t.default=Ee}}),$s=je({"../../node_modules/diff-sequences/build/index.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var e="diff-sequences",r=0,n=(h,v,b,m,y)=>{let A=0;for(;h<v&&b<m&&y(h,b);)h+=1,b+=1,A+=1;return A},o=(h,v,b,m,y)=>{let A=0;for(;h<=v&&b<=m&&y(v,m);)v-=1,m-=1,A+=1;return A},a=(h,v,b,m,y,A,w)=>{let C=0,I=-h,D=A[C],E=D;A[C]+=n(D+1,v,m+D-I+1,b,y);let j=h<w?h:w;for(C+=1,I+=2;C<=j;C+=1,I+=2){if(C!==h&&E<A[C])D=A[C];else if(D=E+1,v<=D)return C-1;E=A[C],A[C]=D+n(D+1,v,m+D-I+1,b,y)}return w},i=(h,v,b,m,y,A,w)=>{let C=0,I=h,D=A[C],E=D;A[C]-=o(v,D-1,b,m+D-I-1,y);let j=h<w?h:w;for(C+=1,I-=2;C<=j;C+=1,I-=2){if(C!==h&&A[C]<E)D=A[C];else if(D=E-1,D<v)return C-1;E=A[C],A[C]=D-o(v,D-1,b,m+D-I-1,y)}return w},s=(h,v,b,m,y,A,w,C,I,D,E)=>{let j=m-v,z=b-v,q=y-m-z,G=-q-(h-1),L=-q+(h-1),_=r,F=h<C?h:C;for(let B=0,H=-h;B<=F;B+=1,H+=2){let $=B===0||B!==h&&_<w[B],U=$?w[B]:_,M=$?U:U+1,V=j+M-H,J=n(M+1,b,V+1,y,A),te=M+J;if(_=w[B],w[B]=te,G<=H&&H<=L){let ue=(h-1-(H+q))/2;if(ue<=D&&I[ue]-1<=te){let ne=j+U-($?H+1:H-1),le=o(v,U,m,ne,A),ce=U-le,ye=ne-le,Ee=ce+1,T=ye+1;E.nChangePreceding=h-1,h-1===Ee+T-v-m?(E.aEndPreceding=v,E.bEndPreceding=m):(E.aEndPreceding=Ee,E.bEndPreceding=T),E.nCommonPreceding=le,le!==0&&(E.aCommonPreceding=Ee,E.bCommonPreceding=T),E.nCommonFollowing=J,J!==0&&(E.aCommonFollowing=M+1,E.bCommonFollowing=V+1);let K=te+1,Q=V+J+1;return E.nChangeFollowing=h-1,h-1===b+y-K-Q?(E.aStartFollowing=b,E.bStartFollowing=y):(E.aStartFollowing=K,E.bStartFollowing=Q),!0}}}return!1},u=(h,v,b,m,y,A,w,C,I,D,E)=>{let j=y-b,z=b-v,q=y-m-z,G=q-h,L=q+h,_=r,F=h<D?h:D;for(let B=0,H=h;B<=F;B+=1,H-=2){let $=B===0||B!==h&&I[B]<_,U=$?I[B]:_,M=$?U:U-1,V=j+M-H,J=o(v,M-1,m,V-1,A),te=M-J;if(_=I[B],I[B]=te,G<=H&&H<=L){let ue=(h+(H-q))/2;if(ue<=C&&te-1<=w[ue]){let ne=V-J;if(E.nChangePreceding=h,h===te+ne-v-m?(E.aEndPreceding=v,E.bEndPreceding=m):(E.aEndPreceding=te,E.bEndPreceding=ne),E.nCommonPreceding=J,J!==0&&(E.aCommonPreceding=te,E.bCommonPreceding=ne),E.nChangeFollowing=h-1,h===1)E.nCommonFollowing=0,E.aStartFollowing=b,E.bStartFollowing=y;else{let le=j+U-($?H-1:H+1),ce=n(U,b,le,y,A);E.nCommonFollowing=ce,ce!==0&&(E.aCommonFollowing=U,E.bCommonFollowing=le);let ye=U+ce,Ee=le+ce;h-1===b+y-ye-Ee?(E.aStartFollowing=b,E.bStartFollowing=y):(E.aStartFollowing=ye,E.bStartFollowing=Ee)}return!0}}}return!1},l=(h,v,b,m,y,A,w,C,I)=>{let D=m-v,E=y-b,j=b-v,z=y-m,q=z-j,G=j,L=j;if(w[0]=v-1,C[0]=b,q%2===0){let _=(h||q)/2,F=(j+z)/2;for(let B=1;B<=F;B+=1)if(G=a(B,b,y,D,A,w,G),B<_)L=i(B,v,m,E,A,C,L);else if(u(B,v,b,m,y,A,w,G,C,L,I))return}else{let _=((h||q)+1)/2,F=(j+z+1)/2,B=1;for(G=a(B,b,y,D,A,w,G),B+=1;B<=F;B+=1)if(L=i(B-1,v,m,E,A,C,L),B<_)G=a(B,b,y,D,A,w,G);else if(s(B,v,b,m,y,A,w,G,C,L,I))return}throw new Error(`${e}: no overlap aStart=${v} aEnd=${b} bStart=${m} bEnd=${y}`)},f=(h,v,b,m,y,A,w,C,I,D)=>{if(y-m<b-v){if(A=!A,A&&w.length===1){let{foundSubsequence:ue,isCommon:ne}=w[0];w[1]={foundSubsequence:(le,ce,ye)=>{ue(le,ye,ce)},isCommon:(le,ce)=>ne(ce,le)}}let J=v,te=b;v=m,b=y,m=J,y=te}let{foundSubsequence:E,isCommon:j}=w[A?1:0];l(h,v,b,m,y,j,C,I,D);let{nChangePreceding:z,aEndPreceding:q,bEndPreceding:G,nCommonPreceding:L,aCommonPreceding:_,bCommonPreceding:F,nCommonFollowing:B,aCommonFollowing:H,bCommonFollowing:$,nChangeFollowing:U,aStartFollowing:M,bStartFollowing:V}=D;v<q&&m<G&&f(z,v,q,m,G,A,w,C,I,D),L!==0&&E(L,_,F),B!==0&&E(B,H,$),M<b&&V<y&&f(U,M,b,V,y,A,w,C,I,D)},d=(h,v)=>{if(typeof v!="number")throw new TypeError(`${e}: ${h} typeof ${typeof v} is not a number`);if(!Number.isSafeInteger(v))throw new RangeError(`${e}: ${h} value ${v} is not a safe integer`);if(v<0)throw new RangeError(`${e}: ${h} value ${v} is a negative integer`)},p=(h,v)=>{let b=typeof v;if(b!=="function")throw new TypeError(`${e}: ${h} typeof ${b} is not a function`)};function g(h,v,b,m){d("aLength",h),d("bLength",v),p("isCommon",b),p("foundSubsequence",m);let y=n(0,h,0,v,b);if(y!==0&&m(y,0,0),h!==y||v!==y){let A=y,w=y,C=o(A,h-1,w,v-1,b),I=h-C,D=v-C,E=y+C;h!==E&&v!==E&&f(0,A,I,w,D,!1,[{foundSubsequence:m,isCommon:b}],[r],[r],{aCommonFollowing:r,aCommonPreceding:r,aEndPreceding:r,aStartFollowing:r,bCommonFollowing:r,bCommonPreceding:r,bEndPreceding:r,bStartFollowing:r,nChangeFollowing:r,nChangePreceding:r,nCommonFollowing:r,nCommonPreceding:r}),C!==0&&m(C,I,D)}}}}),zs=je({"../../node_modules/loupe/loupe.js"(t,e){(function(r,n){typeof t=="object"&&typeof e<"u"?n(t):typeof define=="function"&&define.amd?define(["exports"],n):(r=typeof globalThis<"u"?globalThis:r||self,n(r.loupe={}))})(t,function(r){function n(S){"@babel/helpers - typeof";return typeof Symbol=="funct
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f={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"]},d={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},p="\u2026";function g(S,O){var k=f[d[O]]||f[O];return k?"\x1B[".concat(k[0],"m").concat(String(S),"\x1B[").concat(k[1],"m"):String(S)}function h(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.showHidden,k=O===void 0?!1:O,Y=S.depth,X=Y===void 0?2:Y,Z=S.colors,ie=Z===void 0?!1:Z,he=S.customInspect,we=he===void 0?!0:he,me=S.showProxy,Fe=me===void 0?!1:me,Ke=S.maxArrayLength,Dt=Ke===void 0?1/0:Ke,He=S.breakLength,Je=He===void 0?1/0:He,Xe=S.seen,Yt=Xe===void 0?[]:Xe,Ft=S.truncate,yr=Ft===void 0?1/0:Ft,Kt=S.stylize,Jt=Kt===void 0?String:Kt,Pt={showHidden:!!k,depth:Number(X),colors:!!ie,customInspect:!!we,showProxy:!!Fe,maxArrayLength:Number(Dt),breakLength:Number(Je),truncate:Number(yr),seen:Yt,stylize:Jt};return Pt.colors&&(Pt.stylize=g),Pt}function v(S,O){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p;S=String(S);var Y=k.length,X=S.length;return Y>O&&X>Y?k:X>O&&X>Y?"".concat(S.slice(0,O-Y)).concat(k):S}function b(S,O,k){var Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:", ";k=k||O.inspect;var X=S.length;if(X===0)return"";for(var Z=O.truncate,ie="",he="",we="",me=0;me<X;me+=1){var Fe=me+1===S.length,Ke=me+2===S.length;we="".concat(p,"(").concat(S.length-me,")");var Dt=S[me];O.truncate=Z-ie.length-(Fe?0:Y.length);var He=he||k(Dt,O)+(Fe?"":Y),Je=ie.length+He.length,Xe=Je+we.length;if(Fe&&Je>Z&&ie.length+we.length<=Z||!Fe&&!Ke&&Xe>Z||(he=Fe?"":k(S[me+1],O)+(Ke?"":Y),!Fe&&Ke&&Xe>Z&&Je+he.length>Z))break;if(ie+=He,!Fe&&!Ke&&Je+he.length>=Z){we="".concat(p,"(").concat(S.length-me-1,")");break}we=""}return"".concat(ie).concat(we)}function m(S){return S.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?S:JSON.stringify(S).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function y(S,O){var k=o(S,2),Y=k[0],X=k[1];return O.truncate-=2,typeof Y=="string"?Y=m(Y):typeof Y!="number"&&(Y="[".concat(O.inspect(Y,O),"]")),O.truncate-=Y.length,X=O.inspect(X,O),"".concat(Y,": ").concat(X)}function A(S,O){var k=Object.keys(S).slice(S.length);if(!S.length&&!k.length)return"[]";O.truncate-=4;var Y=b(S,O);O.truncate-=Y.length;var X="";return k.length&&(X=b(k.map(function(Z){return[Z,S[Z]]}),O,y)),"[ ".concat(Y).concat(X?", ".concat(X):""," ]")}var w=Function.prototype.toString,C=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/,I=512;function D(S){if(typeof S!="function")return null;var O="";if(typeof Function.prototype.name>"u"&&typeof S.name>"u"){var k=w.call(S);if(k.indexOf("(")>I)return O;var Y=k.match(C);Y&&(O=Y[1])}else O=S.name;return O}var E=D,j=function(S){return typeof Buffer=="function"&&S instanceof Buffer?"Buffer":S[Symbol.toStringTag]?S[Symbol.toStringTag]:E(S.constructor)};function z(S,O){var k=j(S);O.truncate-=k.length+4;var Y=Object.keys(S).slice(S.length);if(!S.length&&!Y.length)return"".concat(k,"[]");for(var X="",Z=0;Z<S.length;Z++){var ie="".concat(O.stylize(v(S[Z],O.truncate),"number")).concat(Z===S.length-1?"":", ");if(O.truncate-=ie.length,S[Z]!==S.length&&O.truncate<=3){X+="".concat(p,"(").concat(S.length-S[Z]+1,")");break}X+=ie}var he="";return Y.length&&(he=b(Y.map(function(we){return[we,S[we]]}),O,y)),"".concat(k,"[ ").concat(X).concat(he?", ".concat(he):""," ]")}function q(S,O){var k=S.toJSON();if(k===null)return"Invalid Date";var Y=k.split("T"),X=Y[0];return O.stylize("".concat(X,"T").concat(v(Y[1],O.truncate-X.length-1)),"date")}function G(S,O){var k=E(S);return k?O.stylize("[Function ".concat(v(k,O.truncate-11),"]"),"special"):O.stylize("[Function]","special")}function L(S,O){var k=o(S,2),Y=k[0],X=k[1];return O.truncate-=4,Y=O.inspect(Y,O),O.truncate-=Y.length,X=O.inspect(X,O),"".concat(Y," => ").concat(X)}function _(S){var O=[];return S.forEach(function(k,Y){O.push([Y,k])}),O}function F(S,O){var k=S.size-1;return k<=0?"Map{}":(O.truncate-=7,"Map{ ".concat(b(_(S),O,L)," }"))}var B=Number.isNaN||function(S){return S!==S};function H(S,O){return B(S)?O.stylize("NaN","number"):S===1/0?O.stylize("Infinity","number"):S===-1/0?O.stylize("-Infinity","number"):S===0?O.stylize(1/S===1/0?"+0":"-0","number"):O.stylize(v(S,O.truncate),"number")}function $(S,O){var k=v(S.toString(),O.truncate-1);return k!==p&&(k+="n"),O.stylize(k,"bigint")}function U(S,O){var k=S.toString().split("/")[2],Y=O.truncate-(2+k.length),X=S.source;return O.s
Line truncated
|
||||
`)}function Wt(S,O){var k=S.getAttributeNames(),Y=S.tagName.toLowerCase(),X=O.stylize("<".concat(Y),"special"),Z=O.stylize(">","special"),ie=O.stylize("</".concat(Y,">"),"special");O.truncate-=Y.length*2+5;var he="";k.length>0&&(he+=" ",he+=b(k.map(function(Fe){return[Fe,S.getAttribute(Fe)]}),O,dr," ")),O.truncate-=he.length;var we=O.truncate,me=Rt(S.children,O);return me&&me.length>we&&(me="".concat(p,"(").concat(S.children.length,")")),"".concat(X).concat(he).concat(Z).concat(me).concat(ie)}var hr=typeof Symbol=="function"&&typeof Symbol.for=="function",vt=hr?Symbol.for("chai/inspect"):"@@chai/inspect",Ge=!1;try{var Vt=Bf("util");Ge=Vt.inspect?Vt.inspect.custom:!1}catch{Ge=!1}function et(){this.key="chai/loupe__"+Math.random()+Date.now()}et.prototype={get:function(S){return S[this.key]},has:function(S){return this.key in S},set:function(S,O){Object.isExtensible(S)&&Object.defineProperty(S,this.key,{value:O,configurable:!0})}};var tt=new(typeof WeakMap=="function"?WeakMap:et),ut={},Gt={undefined:function(S,O){return O.stylize("undefined","undefined")},null:function(S,O){return O.stylize(null,"null")},boolean:function(S,O){return O.stylize(S,"boolean")},Boolean:function(S,O){return O.stylize(S,"boolean")},number:H,Number:H,bigint:$,BigInt:$,string:ce,String:ce,function:G,Function:G,symbol:ye,Symbol:ye,Array:A,Date:q,Map:F,Set:V,RegExp:U,Promise:oe,WeakSet:function(S,O){return O.stylize("WeakSet{\u2026}","special")},WeakMap:function(S,O){return O.stylize("WeakMap{\u2026}","special")},Arguments:_e,Int8Array:z,Uint8Array:z,Uint8ClampedArray:z,Int16Array:z,Uint16Array:z,Int32Array:z,Uint32Array:z,Float32Array:z,Float64Array:z,Generator:function(){return""},DataView:function(){return""},ArrayBuffer:function(){return""},Error:It,HTMLCollection:Rt,NodeList:Rt},mr=function(S,O,k){return vt in S&&typeof S[vt]=="function"?S[vt](O):Ge&&Ge in S&&typeof S[Ge]=="function"?S[Ge](O.depth,O):"inspect"in S&&typeof S.inspect=="function"?S.inspect(O.depth,O):"constructor"in S&&tt.has(S.constructor)?tt.get(S.constructor)(S,O):ut[k]?ut[k](S,O):""},Tt=Object.prototype.toString;function Ye(S,O){O=h(O),O.inspect=Ye;var k=O,Y=k.customInspect,X=S===null?"null":n(S);if(X==="object"&&(X=Tt.call(S).slice(8,-1)),Gt[X])return Gt[X](S,O);if(Y&&S){var Z=mr(S,O,X);if(Z)return typeof Z=="string"?Z:Ye(Z,O)}var ie=S?Object.getPrototypeOf(S):!1;return ie===Object.prototype||ie===null?W(S,O):S&&typeof HTMLElement=="function"&&S instanceof HTMLElement?Wt(S,O):"constructor"in S?S.constructor!==Object?ae(S,O):W(S,O):S===Object(S)?W(S,O):O.stylize(String(S),X)}function P(S,O){return tt.has(S)?!1:(tt.set(S,O),!0)}function N(S,O){return S in ut?!1:(ut[S]=O,!0)}var pe=vt;r.custom=pe,r.default=Ye,r.inspect=Ye,r.registerConstructor=P,r.registerStringTag=N,Object.defineProperty(r,"__esModule",{value:!0})})}}),Gf=Ct(po(),1),_0=Ct($s(),1),I0=Symbol("vitest:SAFE_COLORS"),Yf={bold:["\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"],dim:["\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"],italic:["\x1B[3m","\x1B[23m"],underline:["\x1B[4m","\x1B[24m"],inverse:["\x1B[7m","\x1B[27m"],hidden:["\x1B[8m","\x1B[28m"],strikethrough:["\x1B[9m","\x1B[29m"],black:["\x1B[30m","\x1B[39m"],red:["\x1B[31m","\x1B[39m"],green:["\x1B[32m","\x1B[39m"],yellow:["\x1B[33m","\x1B[39m"],blue:["\x1B[34m","\x1B[39m"],magenta:["\x1B[35m","\x1B[39m"],cyan:["\x1B[36m","\x1B[39m"],white:["\x1B[37m","\x1B[39m"],gray:["\x1B[90m","\x1B[39m"],bgBlack:["\x1B[40m","\x1B[49m"],bgRed:["\x1B[41m","\x1B[49m"],bgGreen:["\x1B[42m","\x1B[49m"],bgYellow:["\x1B[43m","\x1B[49m"],bgBlue:["\x1B[44m","\x1B[49m"],bgMagenta:["\x1B[45m","\x1B[49m"],bgCyan:["\x1B[46m","\x1B[49m"],bgWhite:["\x1B[47m","\x1B[49m"]},Kf=Object.entries(Yf);function fo(t){return String(t)}fo.open="";fo.close="";var R0=Kf.reduce((t,[e])=>(t[e]=fo,t),{isColorSupported:!1});var{AsymmetricMatcher:T0,DOMCollection:D0,DOMElement:F0,Immutable:P0,ReactElement:j0,ReactTestComponent:B0}=Gf.plugins;var Jf=Ct(po(),1),k0=Ct(zs(),1),{AsymmetricMatcher:N0,DOMCollection:M0,DOMElement:L0,Immutable:$0,ReactElement:z0,ReactTestComponent:q0}=Jf.plugins;Ct(po(),1);Ct($s(),1);Ct(zs(),1);var U0=Object.getPrototypeOf({});var de=(t=>(t.DONE="done",t.ERROR="error",t.ACTIVE="active",t.WAITING="waiting",t))(de||{}),ht={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"};var H0=new Error("This function ran after the play function completed. Did you forget to `await` it?");var X0=__STORYBOOK_THEMING__,{CacheProvider:Q0,ClassNames:Z0,Global:e1,ThemeProvider:t1,background:r1,color:n1,convert:o1,create:a1,createCache:i1,createGlobal:s1,createReset:u1,css:l1,darken:c1,ensure:p1,ignoreSsrWarning:f1,isPropValid:d1,jsx:h1,keyframes:m1,lighten:y1,styled:fe,themes:g1,typography:st,useTheme:ur,withTheme:b1}=__STORYBOOK_THEMING__;function Be(){return Be=Object.assign?Object.assign.bind():function(t){for(var
Line truncated
|
||||
`);return x.createElement("pre",{style:{margin:0,padding:"8px 10px 8px 36px",fontSize:st.size.s1,...e}},r.flatMap((n,o)=>{if(n.startsWith("expect(")){let f=hu(n,7),d=f&&7+f.length,p=f&&n.slice(d).match(/\.(to|last|nth)[A-Z]\w+\(/);if(p){let g=d+p.index+p[0].length,h=hu(n,g);if(h)return["expect(",x.createElement(wo,{key:`received_${f}`,value:f}),n.slice(d,g),x.createElement(xo,{key:`expected_${h}`,value:h}),n.slice(g+h.length),x.createElement("br",{key:`br${o}`})]}}if(n.match(/^\s*- /))return[x.createElement(xo,{key:n+o,value:n}),x.createElement("br",{key:`br${o}`})];if(n.match(/^\s*\+ /)||n.match(/^Received: $/))return[x.createElement(wo,{key:n+o,value:n}),x.createElement("br",{key:`br${o}`})];let[,a,i]=n.match(/^(Expected|Received): (.*)$/)||[];if(a&&i)return a==="Expected"?["Expected: ",x.createElement(xo,{key:n+o,value:Ao(i),parsed:!0}),x.createElement("br",{key:`br${o}`})]:["Received: ",x.createElement(wo,{key:n+o,value:Ao(i),parsed:!0}),x.createElement("br",{key:`br${o}`})];let[,s,u]=n.match(/(Expected number|Received number|Number) of calls: (\d+)$/i)||[];if(s&&u)return[`${s} of calls: `,x.createElement(_t,{key:n+o,value:Number(u)}),x.createElement("br",{key:`br${o}`})];let[,l]=n.match(/^Received has value: (.+)$/)||[];return l?["Received has value: ",x.createElement(_t,{key:n+o,value:Ao(l)}),x.createElement("br",{key:`br${o}`})]:[x.createElement("span",{key:n+o},n),x.createElement("br",{key:`br${o}`})]}))},Qh=fe.div({width:14,height:14,display:"flex",alignItems:"center",justifyContent:"center"}),Fu=({status:t})=>{let e=ur();switch(t){case de.DONE:return x.createElement(Qs,{color:e.color.positive,"data-testid":"icon-done"});case de.ERROR:return x.createElement(su,{color:e.color.negative,"data-testid":"icon-error"});case de.ACTIVE:return x.createElement(ou,{color:e.color.secondary,"data-testid":"icon-active"});case de.WAITING:return x.createElement(Qh,{"data-testid":"icon-waiting"},x.createElement(Zs,{color:Qr(.5,"#CCCCCC"),size:6}));default:return null}};function Zh(t){return Pu(t)||ju(t)}function Pu(t){return t&&typeof t=="object"&&"name"in t&&typeof t.name=="string"&&t.name==="AssertionError"}function ju(t){return t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"&&t.message.startsWith("expect(")}var em=fe.div(()=>({fontFamily:st.fonts.mono,fontSize:st.size.s1,overflowWrap:"break-word",inlineSize:"calc( 100% - 40px )"})),tm=fe("div",{shouldForwardProp:t=>!["call","pausedAt"].includes(t.toString())})(({theme:t,call:e})=>({position:"relative",display:"flex",flexDirection:"column",borderBottom:`1px solid ${t.appBorderColor}`,fontFamily:st.fonts.base,fontSize:13,...e.status===de.ERROR&&{backgroundColor:t.base==="dark"?Qr(.93,t.color.negative):t.background.warning},paddingLeft:e.ancestors.length*20}),({theme:t,call:e,pausedAt:r})=>r===e.id&&{"&::before":{content:'""',position:"absolute",top:-5,zIndex:1,borderTop:"4.5px solid transparent",borderLeft:`7px solid ${t.color.warning}`,borderBottom:"4.5px solid transparent"},"&::after":{content:'""',position:"absolute",top:-1,zIndex:1,width:"100%",borderTop:`1.5px solid ${t.color.warning}`}}),rm=fe.div(({theme:t,isInteractive:e})=>({display:"flex","&:hover":e?{}:{background:t.background.hoverable}})),nm=fe("button",{shouldForwardProp:t=>!["call"].includes(t.toString())})(({theme:t,disabled:e,call:r})=>({flex:1,display:"grid",background:"none",border:0,gridTemplateColumns:"15px 1fr",alignItems:"center",minHeight:40,margin:0,padding:"8px 15px",textAlign:"start",cursor:e||r.status===de.ERROR?"default":"pointer","&:focus-visible":{outline:0,boxShadow:`inset 3px 0 0 0 ${r.status===de.ERROR?t.color.warning:t.color.secondary}`,background:r.status===de.ERROR?"transparent":t.background.hoverable},"& > div":{opacity:r.status===de.WAITING?.5:1}})),om=fe.div({padding:6}),am=fe(sn)(({theme:t})=>({color:t.textMutedColor,margin:"0 3px"})),im=fe(ln)(({theme:t})=>({fontFamily:t.typography.fonts.base})),yu=fe("div")(({theme:t})=>({padding:"8px 10px 8px 36px",fontSize:st.size.s1,color:t.color.defaultText,pre:{margin:0,padding:0}})),sm=({exception:t})=>{if(ju(t))return se(mu,{...t});if(Pu(t))return se(yu,null,se(mu,{message:`${t.message}${t.diff?`
|
||||
|
||||
${t.diff}`:""}`,style:{padding:0}}),se("p",null,"See the full stack trace in the browser console."));let e=t.message.split(`
|
||||
|
||||
`),r=e.length>1;return se(yu,null,se("pre",null,e[0]),r&&se("p",null,"See the full stack trace in the browser console."))},um=({call:t,callsById:e,controls:r,controlStates:n,childCallIds:o,isHidden:a,isCollapsed:i,toggleCollapsed:s,pausedAt:u})=>{let[l,f]=We(!1),d=!n.goto||!t.interceptable||!!t.ancestors.length;return a?null:se(tm,{call:t,pausedAt:u},se(rm,{isInteractive:d},se(nm,{"aria-label":"Interaction step",call:t,onClick:()=>r.goto(t.id),disabled:d,onMouseEnter:()=>n.goto&&f(!0),onMouseLeave:()=>n.goto&&f(!1)},se(Fu,{status:l?de.ACTIVE:t.status}),se(em,{style:{marginLeft:6,marginBottom:1}},se(Po,{call:t,callsById:e}))),se(om,null,o?.length>0&&se(Et,{hasChrome:!1,tooltip:se(im,{note:`${i?"Show":"Hide"} interactions`})},se(am,{onClick:s},se(ru,null))))),t.status===de.ERROR&&t.exception?.callId===t.id&&se(sm,{exception:t.exception}))},lm=fe.div(({theme:t})=>({display:"flex",fontSize:t.typography.size.s2-1,gap:25})),cm=fe.div(({theme:t})=>({width:1,height:16,backgroundColor:t.appBorderColor})),pm=()=>{let[t,e]=We(!0),r=qo().getDocsUrl({subpath:Kd,versioned:!0,renderer:!0});return lt(()=>{let n=setTimeout(()=>{e(!1)},100);return()=>clearTimeout(n)},[]),t?null:x.createElement(Go,{title:"Interaction testing",description:x.createElement(x.Fragment,null,"Interaction tests allow you to verify the functional aspects of UIs. Write a play function for your story and you'll see it run here."),footer:x.createElement(lm,null,x.createElement(un,{href:Yd,target:"_blank",withArrow:!0},x.createElement(lu,null)," Watch 8m video"),x.createElement(cm,null),x.createElement(un,{href:r,target:"_blank",withArrow:!0},x.createElement(eu,null)," Read docs"))})},fm=fe.div(({theme:t})=>({height:"100%",background:t.background.content})),gu=fe.div(({theme:t})=>({borderBottom:`1px solid ${t.appBorderColor}`,backgroundColor:t.base==="dark"?Qr(.93,t.color.negative):t.background.warning,padding:15,fontSize:t.typography.size.s2-1,lineHeight:"19px"})),Co=fe.code(({theme:t})=>({margin:"0 1px",padding:3,fontSize:t.typography.size.s1-1,lineHeight:1,verticalAlign:"top",background:"rgba(0, 0, 0, 0.05)",border:`1px solid ${t.appBorderColor}`,borderRadius:3})),bu=fe.div({paddingBottom:4,fontWeight:"bold"}),dm=fe.p({margin:0,padding:"0 0 20px"}),vu=fe.pre(({theme:t})=>({margin:0,padding:0,"&:not(:last-child)":{paddingBottom:16},fontSize:t.typography.size.s1-1})),hm=vr(function({calls:t,controls:e,controlStates:r,interactions:n,fileName:o,hasException:a,caughtException:i,unhandledErrors:s,isPlaying:u,pausedAt:l,onScrollToEnd:f,endRef:d}){return se(fm,null,(n.length>0||a)&&se(ih,{controls:e,controlStates:r,status:u?de.ACTIVE:a?de.ERROR:de.DONE,storyFileName:o,onScrollToEnd:f}),se("div",{"aria-label":"Interactions list"},n.map(p=>se(um,{key:p.id,call:p,callsById:t,controls:e,controlStates:r,childCallIds:p.childCallIds,isHidden:p.isHidden,isCollapsed:p.isCollapsed,toggleCollapsed:p.toggleCollapsed,pausedAt:l}))),i&&!Zh(i)&&se(gu,null,se(bu,null,"Caught exception in ",se(Co,null,"play")," function"),se(vu,{"data-chromatic":"ignore"},Eu(i))),s&&se(gu,null,se(bu,null,"Unhandled Errors"),se(dm,null,"Found ",s.length," unhandled error",s.length>1?"s":""," ","while running the play function. This might cause false positive assertions. Resolve unhandled errors or ignore unhandled errors with setting the",se(Co,null,"test.dangerouslyIgnoreUnhandledErrors")," ","parameter to ",se(Co,null,"true"),"."),s.map((p,g)=>se(vu,{key:g,"data-chromatic":"ignore"},Eu(p)))),se("div",{ref:d}),!u&&!i&&n.length===0&&se(pm,null))});function Eu(t){return t.stack||`${t.name}: ${t.message}`}var Oo={start:!1,back:!1,goto:!1,next:!1,end:!1},Su=({log:t,calls:e,collapsed:r,setCollapsed:n})=>{let o=new Map,a=new Map;return t.map(({callId:i,ancestors:s,status:u})=>{let l=!1;return s.forEach(f=>{r.has(f)&&(l=!0),a.set(f,(a.get(f)||[]).concat(i))}),{...e.get(i),status:u,isHidden:l}}).map(i=>{let s=i.status===de.ERROR&&o.get(i.ancestors.slice(-1)[0])?.status===de.ACTIVE?de.ACTIVE:i.status;return o.set(i.id,{...i,status:s}),{...i,status:s,childCallIds:a.get(i.id),isCollapsed:r.has(i.id),toggleCollapsed:()=>n(u=>(u.has(i.id)?u.delete(i.id):u.add(i.id),new Set(u)))}})},mm=vr(function({storyId:t}){let[e,r]=an(en,{controlStates:Oo,isErrored:!1,pausedAt:void 0,interactions:[],isPlaying:!1,hasException:!1,caughtException:void 0,interactionsCount:0,unhandledErrors:void 0}),[n,o]=We(void 0),[a,i]=We(new Set),{controlStates:s=Oo,isErrored:u=!1,pausedAt:l=void 0,interactions:f=[],isPlaying:d=!1,caughtException:p=void 0,unhandledErrors:g=void 0}=e,h=Er([]),v=Er(new Map),b=({status:E,...j})=>v.current.set(j.id,j),m=Er();lt(()=>{let E;return sr.IntersectionObserver&&(E=new sr.IntersectionObserver(([j])=>o(j.isIntersecting?void 0:j.target),{root:sr.document.querySelector("#panel-tab-content")}),m.current&&E.observe(m.current)),()=>E?.disconnect()},[]);let y=$o({[ht.CALL]:b,[ht.SYNC]:E=>{r(j=>{let z=Su({log:E.logItems,calls:v.current,collapsed:a,setCollapsed:i});return{...j,controlStates:E.controlStates,
Line truncated
|
||||
}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }
|
||||
Whitespace-only changes.
Reference in new issue
Block a user