2 lines
1.9 KiB
JavaScript
2 lines
1.9 KiB
JavaScript
import{v as u}from"./v4-D8aEg3BZ.js";const{addons:R}=__STORYBOOK_MODULE_PREVIEW_API__,{global:g}=__STORYBOOK_MODULE_GLOBAL__,{ImplicitActionsDuringRendering:m}=__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__;var P="actions",b="storybook/actions",A=`${b}/action-event`,a={depth:10,clearOnStoryChange:!0,limit:50},y=(e,n)=>{let t=Object.getPrototypeOf(e);return!t||n(t)?t:y(t,n)},D=e=>!!(typeof e=="object"&&e&&y(e,n=>/^Synthetic(?:Base)?Event$/.test(n.constructor.name))&&typeof e.persist=="function"),S=e=>{if(D(e)){let n=Object.create(e.constructor.prototype,Object.getOwnPropertyDescriptors(e));n.persist();let t=Object.getOwnPropertyDescriptor(n,"view"),o=t==null?void 0:t.value;return typeof o=="object"&&(o==null?void 0:o.constructor.name)==="Window"&&Object.defineProperty(n,"view",{...t,value:Object.create(o.constructor.prototype)}),n}return e},j=()=>typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?u():Date.now().toString(36)+Math.random().toString(36).substring(2);function v(e,n={}){let t={...a,...n},o=function(...i){var p,l;if(n.implicit){let O=(p="__STORYBOOK_PREVIEW__"in g?g.__STORYBOOK_PREVIEW__:void 0)==null?void 0:p.storyRenders.find(c=>c.phase==="playing"||c.phase==="rendering");if(O){let c=!((l=window==null?void 0:window.FEATURES)!=null&&l.disallowImplicitActionsInRenderV8),_=new m({phase:O.phase,name:e,deprecated:c});if(c)console.warn(_);else throw _}}let r=R.getChannel(),d=j(),E=5,s=i.map(S),f=i.length>1?s:s[0],h={id:d,count:0,data:{name:e,args:f},options:{...t,maxDepth:E+(t.depth||3),allowFunction:t.allowFunction||!1}};r.emit(A,h)};return o.isAction=!0,o.implicit=n.implicit,o}var I=(...e)=>{let n=a,t=e;t.length===1&&Array.isArray(t[0])&&([t]=t),t.length!==1&&typeof t[t.length-1]!="string"&&(n={...a,...t.pop()});let o=t[0];(t.length!==1||typeof o=="string")&&(o={},t.forEach(r=>{o[r]=r}));let i={};return Object.keys(o).forEach(r=>{i[r]=v(o[r],n)}),i};export{P,v as a,I as b};
|
|
//# sourceMappingURL=chunk-454WOBUV-5rTpxkNE.js.map
|