{"version":3,"file":"preview-87eac49b.js","sources":["../../node_modules/@storybook/addon-links/dist/chunk-JT3VIYBO.mjs","../../node_modules/@storybook/addon-links/dist/chunk-DXNAW7Q2.mjs","../../node_modules/@storybook/addon-links/dist/preview.mjs"],"sourcesContent":["var ADDON_ID=\"storybook/links\",PARAM_KEY=\"links\",constants_default={NAVIGATE:`${ADDON_ID}/navigate`,REQUEST:`${ADDON_ID}/request`,RECEIVE:`${ADDON_ID}/receive`};\n\nexport { ADDON_ID, PARAM_KEY, constants_default };\n","import { PARAM_KEY } from './chunk-JT3VIYBO.mjs';\nimport { global } from '@storybook/global';\nimport { makeDecorator, addons } from '@storybook/preview-api';\nimport { STORY_CHANGED, SELECT_STORY } from '@storybook/core-events';\nimport { toId } from '@storybook/csf';\n\nvar{document,HTMLElement}=global;function parseQuery(queryString){let query={},pairs=(queryString[0]===\"?\"?queryString.substring(1):queryString).split(\"&\").filter(Boolean);for(let i=0;iaddons.getChannel().emit(SELECT_STORY,params),hrefTo=(title,name)=>new Promise(resolve=>{let{location}=document,query=parseQuery(location.search),existingId=[].concat(query.id)[0],titleToLink=title||existingId.split(\"--\",2)[0],path=`/story/${toId(titleToLink,name)}`,sbPath=location.pathname.replace(/iframe\\.html$/,\"\"),url=`${location.origin+sbPath}?${Object.entries({path}).map(item=>`${item[0]}=${item[1]}`).join(\"&\")}`;resolve(url);}),valueOrCall=args=>value=>typeof value==\"function\"?value(...args):value,linkTo=(idOrTitle,nameInput)=>(...args)=>{let resolver=valueOrCall(args),title=resolver(idOrTitle),name=nameInput?resolver(nameInput):!1;title?.match(/--/)&&!name?navigate({storyId:title}):name&&title?navigate({kind:title,story:name}):title?navigate({kind:title}):name&&navigate({story:name});},linksListener=e=>{let{target}=e;if(!(target instanceof HTMLElement))return;let element=target,{sbKind:kind,sbStory:story}=element.dataset;(kind||story)&&(e.preventDefault(),navigate({kind,story}));},hasListener=!1,on=()=>{hasListener||(hasListener=!0,document.addEventListener(\"click\",linksListener));},off=()=>{hasListener&&(hasListener=!1,document.removeEventListener(\"click\",linksListener));},withLinks=makeDecorator({name:\"withLinks\",parameterName:PARAM_KEY,wrapper:(getStory,context)=>(on(),addons.getChannel().once(STORY_CHANGED,off),getStory(context))});\n\nexport { hrefTo, linkTo, navigate, withLinks };\n","import './chunk-VJY7NXNQ.mjs';\nimport { withLinks } from './chunk-DXNAW7Q2.mjs';\nimport './chunk-JT3VIYBO.mjs';\n\nvar decorators=[withLinks];\n\nexport { decorators };\n"],"names":["PARAM_KEY","global","makeDecorator","addons","STORY_CHANGED","SELECT_STORY","document","HTMLElement","navigate","params","linksListener","target","element","kind","story","hasListener","on","off","withLinks","getStory","context","decorators"],"mappings":"4BAAG,IAA4BA,EAAU,QCCzC,KAAA,CAAA,OAAAC,CAAA,EAAA,4BACA,CAAA,cAAAC,EAAA,OAAAC,CAAA,EAAA,iCACA,CAAA,cAAAC,EAAA,aAAAC,CAAA,EAAA,iCAGA,GAAG,CAAC,SAAAC,EAAS,YAAAC,CAAW,EAAEN,EAAoSO,EAASC,GAAQN,EAAO,WAAU,EAAG,KAAKE,EAAaI,CAAM,EAAyvBC,EAAc,GAAG,CAAC,GAAG,CAAC,OAAAC,CAAM,EAAE,EAAE,GAAG,EAAEA,aAAkBJ,GAAa,OAAO,IAAIK,EAAQD,EAAO,CAAC,OAAOE,EAAK,QAAQC,CAAK,EAAEF,EAAQ,SAASC,GAAMC,KAAS,EAAE,eAAc,EAAGN,EAAS,CAAC,KAAAK,EAAK,MAAAC,CAAK,CAAC,EAAG,EAAEC,EAAY,GAAGC,EAAG,IAAI,CAACD,IAAcA,EAAY,GAAGT,EAAS,iBAAiB,QAAQI,CAAa,EAAG,EAAEO,EAAI,IAAI,CAACF,IAAcA,EAAY,GAAGT,EAAS,oBAAoB,QAAQI,CAAa,EAAG,EAAEQ,EAAUhB,EAAc,CAAC,KAAK,YAAY,cAAcF,EAAU,QAAQ,CAACmB,EAASC,KAAWJ,IAAKb,EAAO,WAAU,EAAG,KAAKC,EAAca,CAAG,EAAEE,EAASC,CAAO,EAAE,CAAC,ECF/pDC,EAAW,CAACH,CAAS","x_google_ignoreList":[0,1,2]}