Files
components/assets/Tile.stories.377da30f.js
T

52 lines
28 KiB
JavaScript

var xe=Object.defineProperty;var i=(e,t)=>xe(e,"name",{value:t,configurable:!0});import{b as V,r as c,j as m,a as W,F as ne,R as ae}from"./jsx-runtime.ed5c3280.js";import{j as Se}from"./iframe.95c22648.js";import{m as Ce}from"./make-decorator.0fd4df31.js";/**
* @remix-run/router v1.0.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$.apply(this,arguments)}i($,"_extends$1");var C;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(C||(C={}));function be(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((h,y)=>f(h,typeof h=="string"?null:h.state,y===0?"default":void 0));let l=u(r==null?a.length-1:r),o=C.Pop,s=null;function u(h){return Math.min(Math.max(h,0),a.length-1)}i(u,"clampIndex");function d(){return a[l]}i(d,"getCurrentLocation");function f(h,y,v){y===void 0&&(y=null);let x=_e(a?d().pathname:"/",h,y,v);return Ee(x.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(h)),x}return i(f,"createMemoryLocation"),{get index(){return l},get action(){return o},get location(){return d()},createHref(h){return typeof h=="string"?h:F(h)},push(h,y){o=C.Push;let v=f(h,y);l+=1,a.splice(l,a.length,v),n&&s&&s({action:o,location:v})},replace(h,y){o=C.Replace;let v=f(h,y);a[l]=v,n&&s&&s({action:o,location:v})},go(h){o=C.Pop,l=u(l+h),s&&s({action:o,location:d()})},listen(h){return s=h,()=>{s=null}}}}i(be,"createMemoryHistory");function Ee(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}i(Ee,"warning$1");function Pe(){return Math.random().toString(36).substr(2,8)}i(Pe,"createKey");function _e(e,t,r,n){return r===void 0&&(r=null),$({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?T(t):t,{state:r,key:t&&t.key||n||Pe()})}i(_e,"createLocation");function F(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}i(F,"createPath");function T(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}i(T,"parsePath");var X;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(X||(X={}));function Re(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?T(t):t,a=ie(n.pathname||"/",r);if(a==null)return null;let l=oe(e);Te(l);let o=null;for(let s=0;o==null&&s<l.length;++s)o=$e(l[s],a);return o}i(Re,"matchRoutes");function oe(e,t,r,n){return t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n=""),e.forEach((a,l)=>{let o={relativePath:a.path||"",caseSensitive:a.caseSensitive===!0,childrenIndex:l,route:a};o.relativePath.startsWith("/")&&(g(o.relativePath.startsWith(n),'Absolute route path "'+o.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),o.relativePath=o.relativePath.slice(n.length));let s=b([n,o.relativePath]),u=r.concat(o);a.children&&a.children.length>0&&(g(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),oe(a.children,t,u,s)),!(a.path==null&&!a.index)&&t.push({path:s,score:Me(s,a.index),routesMeta:u})}),t}i(oe,"flattenRoutes");function Te(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:De(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}i(Te,"rankRouteBranches");const we=/^:\w+$/,Ae=3,Oe=2,Le=1,Ie=10,ke=-2,Q=i(e=>e==="*","isSplat");function Me(e,t){let r=e.split("/"),n=r.length;return r.some(Q)&&(n+=ke),t&&(n+=Oe),r.filter(a=>!Q(a)).reduce((a,l)=>a+(we.test(l)?Ae:l===""?Le:Ie),n)}i(Me,"computeScore");function De(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}i(De,"compareIndexes");function $e(e,t){let{routesMeta:r}=e,n={},a="/",l=[];for(let o=0;o<r.length;++o){let s=r[o],u=o===r.length-1,d=a==="/"?t:t.slice(a.length)||"/",f=Ne({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},d);if(!f)return null;Object.assign(n,f.params);let p=s.route;l.push({params:n,pathname:b([a,f.pathname]),pathnameBase:Fe(b([a,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(a=b([a,f.pathnameBase]))}return l}i($e,"matchRouteBranch");function je(e,t){return t===void 0&&(t={}),e.replace(/:(\w+)/g,(r,n)=>(g(t[n]!=null,'Missing ":'+n+'" param'),t[n])).replace(/(\/?)\*/,(r,n,a,l)=>{const o="*";return t[o]==null?l==="/*"?"/":"":""+n+t[o]})}i(je,"generatePath");function Ne(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Ue(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let l=a[0],o=l.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((d,f,p)=>{if(f==="*"){let h=s[p]||"";o=l.slice(0,l.length-h.length).replace(/(.)\/+$/,"$1")}return d[f]=Be(s[p]||"",f),d},{}),pathname:l,pathnameBase:o,pattern:e}}i(Ne,"matchPath");function Ue(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),le(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(o,s)=>(n.push(s),"([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a+=r?"\\/*$":"(?:(?=[@.~-]|%[0-9A-F]{2})|\\b|\\/|$)",[new RegExp(a,t?void 0:"i"),n]}i(Ue,"compilePath");function Be(e,t){try{return decodeURIComponent(e)}catch(r){return le(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}i(Be,"safelyDecodeURIComponent");function ie(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}i(ie,"stripBasename");function g(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}i(g,"invariant");function le(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}i(le,"warning");function Ve(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?T(e):e;return{pathname:r?r.startsWith("/")?r:We(r,t):t,search:He(n),hash:Ge(a)}}i(Ve,"resolvePath");function We(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}i(We,"resolvePathname");function se(e,t,r,n){n===void 0&&(n=!1);let a=typeof e=="string"?T(e):$({},e),l=e===""||a.pathname==="",o=l?"/":a.pathname,s;if(n||o==null)s=r;else{let p=t.length-1;if(o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),p-=1;a.pathname=h.join("/")}s=p>=0?t[p]:"/"}let u=Ve(a,s),d=o&&o!=="/"&&o.endsWith("/"),f=(l||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(d||f)&&(u.pathname+="/"),u}i(se,"resolveTo");const b=i(e=>e.join("/").replace(/\/\/+/g,"/"),"joinPaths"),Fe=i(e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),"normalizePathname"),He=i(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),Ge=i(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash");class ue{constructor(t,r,n){this.status=t,this.statusText=r||"",this.data=n}}i(ue,"ErrorResponse");function Ke(e){return e instanceof ue}i(Ke,"isRouteErrorResponse");/**
* React Router v6.4.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}i(H,"_extends");function Ye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}i(Ye,"isPolyfill");const Je=typeof Object.is=="function"?Object.is:Ye,{useState:ze,useEffect:qe,useLayoutEffect:Xe,useDebugValue:Qe}=V;function Ze(e,t,r){const n=t(),[{inst:a},l]=ze({inst:{value:n,getSnapshot:t}});return Xe(()=>{a.value=n,a.getSnapshot=t,U(a)&&l({inst:a})},[e,n,t]),qe(()=>(U(a)&&l({inst:a}),e(i(()=>{U(a)&&l({inst:a})},"handleStoreChange"))),[e]),Qe(n),n}i(Ze,"useSyncExternalStore$2");function U(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!Je(r,n)}catch{return!0}}i(U,"checkIfSnapshotChanged");function et(e,t,r){return t()}i(et,"useSyncExternalStore$1");const tt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rt=!tt,nt=rt?et:Ze;"useSyncExternalStore"in V&&(e=>e.useSyncExternalStore)(V);const at=c.exports.createContext(null),ot=c.exports.createContext(null),ce=c.exports.createContext(null),z=c.exports.createContext(null),w=c.exports.createContext(null),E=c.exports.createContext({outlet:null,matches:[]}),fe=c.exports.createContext(null);function it(e,t){let{relative:r}=t===void 0?{}:t;A()||g(!1);let{basename:n,navigator:a}=c.exports.useContext(z),{hash:l,pathname:o,search:s}=pe(e,{relative:r}),u=o;return n!=="/"&&(u=o==="/"?n:b([n,o])),a.createHref({pathname:u,search:s,hash:l})}i(it,"useHref");function A(){return c.exports.useContext(w)!=null}i(A,"useInRouterContext");function P(){return A()||g(!1),c.exports.useContext(w).location}i(P,"useLocation");function lt(){return c.exports.useContext(w).navigationType}i(lt,"useNavigationType");function he(e){return e.filter((t,r)=>r===0||!t.route.index&&t.pathnameBase!==e[r-1].pathnameBase)}i(he,"getPathContributingMatches");function de(){A()||g(!1);let{basename:e,navigator:t}=c.exports.useContext(z),{matches:r}=c.exports.useContext(E),{pathname:n}=P(),a=JSON.stringify(he(r).map(s=>s.pathnameBase)),l=c.exports.useRef(!1);return c.exports.useEffect(()=>{l.current=!0}),c.exports.useCallback(function(s,u){if(u===void 0&&(u={}),!l.current)return;if(typeof s=="number"){t.go(s);return}let d=se(s,JSON.parse(a),n,u.relative==="path");e!=="/"&&(d.pathname=d.pathname==="/"?e:b([e,d.pathname])),(u.replace?t.replace:t.push)(d,u.state,u)},[e,t,a,n])}i(de,"useNavigate");function st(){let{matches:e}=c.exports.useContext(E),t=e[e.length-1];return t?t.params:{}}i(st,"useParams");function pe(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=c.exports.useContext(E),{pathname:a}=P(),l=JSON.stringify(he(n).map(o=>o.pathnameBase));return c.exports.useMemo(()=>se(e,JSON.parse(l),a,r==="path"),[e,l,a,r])}i(pe,"useResolvedPath");function ut(e,t){A()||g(!1);let r=c.exports.useContext(ce),{matches:n}=c.exports.useContext(E),a=n[n.length-1],l=a?a.params:{};a&&a.pathname;let o=a?a.pathnameBase:"/";a&&a.route;let s=P(),u;if(t){var d;let v=typeof t=="string"?T(t):t;o==="/"||((d=v.pathname)==null?void 0:d.startsWith(o))||g(!1),u=v}else u=s;let f=u.pathname||"/",p=o==="/"?f:f.slice(o.length)||"/",h=Re(e,{pathname:p}),y=ht(h&&h.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:b([o,v.pathname]),pathnameBase:v.pathnameBase==="/"?o:b([o,v.pathnameBase])})),n,r||void 0);return t?m(w.Provider,{value:{location:H({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:C.Pop},children:y}):y}i(ut,"useRoutes");function ct(){let e=pt(),t=Ke(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},l={padding:"2px 4px",backgroundColor:n};return W(ne,{children:[m("h2",{children:"Unhandled Thrown Error!"}),m("h3",{style:{fontStyle:"italic"},children:t}),r?m("pre",{style:a,children:r}):null,m("p",{children:"\u{1F4BF} Hey developer \u{1F44B}"}),W("p",{children:["You can provide a way better UX than this when your app throws errors by providing your own\xA0",m("code",{style:l,children:"errorElement"})," props on\xA0",m("code",{style:l,children:"<Route>"})]})]})}i(ct,"DefaultErrorElement");class me extends c.exports.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error,location:t.location}:{error:t.error||r.error,location:r.location}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?m(fe.Provider,{value:this.state.error,children:this.props.component}):this.props.children}}i(me,"RenderErrorBoundary");function ft(e){let{routeContext:t,match:r,children:n}=e,a=c.exports.useContext(at);return a&&r.route.errorElement&&(a._deepestRenderedBoundaryId=r.route.id),m(E.Provider,{value:t,children:n})}i(ft,"RenderedRoute");function ht(e,t,r){if(t===void 0&&(t=[]),e==null)if(r!=null&&r.errors)e=r.matches;else return null;let n=e,a=r==null?void 0:r.errors;if(a!=null){let l=n.findIndex(o=>o.route.id&&(a==null?void 0:a[o.route.id]));l>=0||g(!1),n=n.slice(0,Math.min(n.length,l+1))}return n.reduceRight((l,o,s)=>{let u=o.route.id?a==null?void 0:a[o.route.id]:null,d=r?o.route.errorElement||m(ct,{}):null,f=i(()=>m(ft,{match:o,routeContext:{outlet:l,matches:t.concat(n.slice(0,s+1))},children:u?d:o.route.element!==void 0?o.route.element:l}),"getChildren");return r&&(o.route.errorElement||s===0)?m(me,{location:r.location,component:d,error:u,children:f()}):f()},null)}i(ht,"_renderMatches");var G;(function(e){e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(G||(G={}));function dt(e){let t=c.exports.useContext(ce);return t||g(!1),t}i(dt,"useDataRouterState");function pt(){var e;let t=c.exports.useContext(fe),r=dt(G.UseRouteError),n=c.exports.useContext(E),a=n.matches[n.matches.length-1];return t||(n||g(!1),a.route.id||g(!1),(e=r.errors)==null?void 0:e[a.route.id])}i(pt,"useRouteError");function mt(e){let{basename:t,children:r,initialEntries:n,initialIndex:a}=e,l=c.exports.useRef();l.current==null&&(l.current=be({initialEntries:n,initialIndex:a,v5Compat:!0}));let o=l.current,[s,u]=c.exports.useState({action:o.action,location:o.location});return c.exports.useLayoutEffect(()=>o.listen(u),[o]),m(vt,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:o})}i(mt,"MemoryRouter");function K(e){g(!1)}i(K,"Route");function vt(e){let{basename:t="/",children:r=null,location:n,navigationType:a=C.Pop,navigator:l,static:o=!1}=e;A()&&g(!1);let s=t.replace(/^\/*/,"/"),u=c.exports.useMemo(()=>({basename:s,navigator:l,static:o}),[s,l,o]);typeof n=="string"&&(n=T(n));let{pathname:d="/",search:f="",hash:p="",state:h=null,key:y="default"}=n,v=c.exports.useMemo(()=>{let x=ie(d,s);return x==null?null:{pathname:x,search:f,hash:p,state:h,key:y}},[s,d,f,p,h,y]);return v==null?null:m(z.Provider,{value:u,children:m(w.Provider,{children:r,value:{location:v,navigationType:a}})})}i(vt,"Router");function yt(e){let{children:t,location:r}=e,n=c.exports.useContext(ot),a=n&&!t?n.router.routes:Y(t);return ut(a,r)}i(yt,"Routes");var Z;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Z||(Z={}));new Promise(()=>{});function Y(e,t){t===void 0&&(t=[]);let r=[];return c.exports.Children.forEach(e,(n,a)=>{if(!c.exports.isValidElement(n))return;if(n.type===c.exports.Fragment){r.push.apply(r,Y(n.props.children,t));return}n.type!==K&&g(!1);let l=[...t,a],o={id:n.props.id||l.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,hasErrorBoundary:n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle};n.props.children&&(o.children=Y(n.props.children,l)),r.push(o)}),r}i(Y,"createRoutesFromChildren");/**
* React Router DOM v6.4.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function gt(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,l;for(l=0;l<n.length;l++)a=n[l],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}i(gt,"_objectWithoutPropertiesLoose");function xt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}i(xt,"isModifiedEvent");function St(e,t){return e.button===0&&(!t||t==="_self")&&!xt(e)}i(St,"shouldProcessLinkClick");function J(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}i(J,"createSearchParams");function Ct(e,t){let r=J(e);for(let n of t.keys())r.has(n)||t.getAll(n).forEach(a=>{r.append(n,a)});return r}i(Ct,"getSearchParamsForLocation");const bt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],Et=c.exports.forwardRef(i(function(t,r){let{onClick:n,relative:a,reloadDocument:l,replace:o,state:s,target:u,to:d,preventScrollReset:f}=t,p=gt(t,bt),h=it(d,{relative:a}),y=Pt(d,{replace:o,state:s,target:u,preventScrollReset:f,relative:a});function v(x){n&&n(x),x.defaultPrevented||y(x)}return i(v,"handleClick"),m("a",{...p,href:h,onClick:l?n:v,ref:r,target:u})},"LinkWithRef"));function Pt(e,t){let{target:r,replace:n,state:a,preventScrollReset:l,relative:o}=t===void 0?{}:t,s=de(),u=P(),d=pe(e,{relative:o});return c.exports.useCallback(f=>{if(St(f,r)){f.preventDefault();let p=n!==void 0?n:F(u)===F(d);s(e,{replace:p,state:a,preventScrollReset:l,relative:o})}},[u,s,d,n,a,r,e,l,o])}i(Pt,"useLinkClickHandler");function _t(e){let t=c.exports.useRef(J(e)),r=P(),n=c.exports.useMemo(()=>Ct(r.search,t.current),[r.search]),a=de(),l=c.exports.useCallback((o,s)=>{const u=J(typeof o=="function"?o(n):o);a("?"+u,s)},[a,n]);return[n,l]}i(_t,"useSearchParams");var k="storybook/react-router-v6",Rt="reactRouter",S={CLEAR:"".concat(k,"/clear"),NAVIGATION:"".concat(k,"/navigation"),STORY_LOADED:"".concat(k,"/story-loaded"),ROUTE_MATCHES:"".concat(k,"/route-matches")},Tt=i(function(){var t=P();return"".concat(t.pathname).concat(t.search).concat(t.hash)},"useCurrentUrl"),ve=ae.createContext([]),ye=i(function(){return ae.useContext(ve)},"useDeepRouteMatches");function wt(e,t){return It(e)||Lt(e,t)||Ot(e,t)||At()}i(wt,"_slicedToArray$2");function At(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}i(At,"_nonIterableRest$2");function Ot(e,t){if(!!e){if(typeof e=="string")return ee(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ee(e,t)}}i(Ot,"_unsupportedIterableToArray$2");function ee(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}i(ee,"_arrayLikeToArray$2");function Lt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],a=!0,l=!1,o,s;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));a=!0);}catch(u){l=!0,s=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(l)throw s}}return n}}i(Lt,"_iterableToArrayLimit$2");function It(e){if(Array.isArray(e))return e}i(It,"_arrayWithHoles$2");var kt=i(function(){var t=P(),r=st(),n=_t(),a=wt(n,1),l=a[0],o=lt(),s=ye(),u={};l.forEach(function(p,h){u[h]=p});var d=Tt(),f=s.map(function(p){return[p.route.path,p.params]});return function(p){switch(p){case S.STORY_LOADED:{var h={url:d,path:t.pathname,routeParams:r,searchParams:u,routeMatches:f,hash:t.hash,routeState:t.state};return{key:t.key,type:S.STORY_LOADED,data:h}}case S.NAVIGATION:{var y={url:d,path:t.pathname,routeParams:r,searchParams:u,hash:t.hash,routeState:t.state,routeMatches:f,navigationType:o};return{key:t.key,type:S.NAVIGATION,data:y}}case S.ROUTE_MATCHES:return{key:"matches-".concat(t.key,"-").concat(f.length),type:S.ROUTE_MATCHES,data:{matches:f}}}}},"useRouterEvent");function Mt(){var e={};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}i(Mt,"defer");function B(e,t){return Nt(e)||jt(e,t)||$t(e,t)||Dt()}i(B,"_slicedToArray$1");function Dt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}i(Dt,"_nonIterableRest$1");function $t(e,t){if(!!e){if(typeof e=="string")return te(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return te(e,t)}}i($t,"_unsupportedIterableToArray$1");function te(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}i(te,"_arrayLikeToArray$1");function jt(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],a=!0,l=!1,o,s;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));a=!0);}catch(u){l=!0,s=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(l)throw s}}return n}}i(jt,"_iterableToArrayLimit$1");function Nt(e){if(Array.isArray(e))return e}i(Nt,"_arrayWithHoles$1");var Ut=i(function(t){var r=t.children,n=Se.getChannel(),a=P(),l=c.exports.useState(),o=B(l,2),s=o[0],u=o[1],d=c.exports.useState(!1),f=B(d,2),p=f[0],h=f[1],y=c.exports.useState([]),v=B(y,2),x=v[0],O=v[1],_=kt(),R=ye(),L=c.exports.useRef(Mt());return c.exports.useLayoutEffect(function(){u(a)}),c.exports.useEffect(function(){p&&L.current.resolve()},[p]),c.exports.useEffect(function(){O(R);var I=setTimeout(function(){p||(h(!0),n.emit(S.STORY_LOADED,_(S.STORY_LOADED)))},0);return function(){return clearTimeout(I)}},[p,R]),c.exports.useEffect(function(){s!==void 0&&s.key!==a.key&&L.current.promise.then(function(){n.emit(S.NAVIGATION,_(S.NAVIGATION))})},[a]),c.exports.useEffect(function(){p&&R.length>x.length&&(O(R),n.emit(S.ROUTE_MATCHES,_(S.ROUTE_MATCHES)))},[R]),m(ne,{children:r})},"RouterLogger");function Bt(e,t){return Ht(e)||Ft(e,t)||Wt(e,t)||Vt()}i(Bt,"_slicedToArray");function Vt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}i(Vt,"_nonIterableRest");function Wt(e,t){if(!!e){if(typeof e=="string")return re(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return re(e,t)}}i(Wt,"_unsupportedIterableToArray");function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}i(re,"_arrayLikeToArray");function Ft(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],a=!0,l=!1,o,s;try{for(r=r.call(e);!(a=(o=r.next()).done)&&(n.push(o.value),!(t&&n.length===t));a=!0);}catch(u){l=!0,s=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(l)throw s}}return n}}i(Ft,"_iterableToArrayLimit");function Ht(e){if(Array.isArray(e))return e}i(Ht,"_arrayWithHoles");var Gt=i(function(t){var r,n=t.children,a=t.browserPath,l=t.routePath,o=t.routeParams,s=t.searchParams,u=t.routeState,d=t.outlet,f=je(l,o),p=new URLSearchParams(s).toString(),h=p.length>0?"?".concat(p):"",y=c.exports.useState([]),v=Bt(y,2),x=v[0],O=v[1];E.Provider._context=new Proxy((r=E.Provider._context)!==null&&r!==void 0?r:{},{set:i(function(L,I,N){return I==="_currentValue"&&O(function(q){return N.matches.length>q.length?N.matches:q}),Reflect.set(L,I,N)},"set")});var _={search:h,state:u};return a!==void 0&&(_.pathname=a),a===void 0&&f!==""&&(_.pathname=f),m(ve.Provider,{value:x,children:m(mt,{initialEntries:[_],children:m(yt,{children:m(K,{path:l,element:m(Ut,{children:n}),children:d&&m(K,{index:!0,element:d})})})})})},"StoryRouter");function j(e){return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(e)}i(j,"_typeof");var Kt=Ce({name:"withRouter",parameterName:Rt,wrapper:i(function(t,r,n){var a=n.parameters,l=a===void 0?{}:a,o=l.routePath,s=o===void 0?"*":o,u=l.routeParams,d=l.routeState,f=l.searchParams,p=l.outlet,h=l.browserPath;if(typeof s!="string")throw new Error("React Router decorator : `path` must be a string");if(u!==void 0&&j(u)!=="object")throw new Error("React Router decorator : `params` must be an object with strings as values");if(f!==void 0&&j(f)!=="object")throw new Error("React Router decorator : `search` must be an object with strings as values");return m(Gt,{browserPath:h,routePath:s,routeParams:u,searchParams:f,routeState:d,outlet:p,children:t(r)})},"wrapper")});module&&module.hot&&module.hot.decline&&module.hot.decline();const Yt=i(e=>c.exports.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 0 24 24",width:"24px",role:"img",...e},c.exports.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),c.exports.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})),"SvgSearch"),Jt="_tile_1c4l6_1",zt="_background_1c4l6_12",qt="_textContainer_1c4l6_40",Xt="_iconContainer_1c4l6_46",M={tile:Jt,background:zt,textContainer:qt,iconContainer:Xt},D=i(({text:e,icon:t,linkTo:r,onClick:n})=>W(Et,{to:r,onClick:n,className:M.tile,children:[m("div",{className:M.background}),m("span",{className:M.iconContainer,children:m(t,{})}),m("span",{className:M.textContainer,children:e})]}),"Tile"),ge=D;try{D.displayName="Tile",D.__docgenInfo={description:"",displayName:"Tile",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"FunctionComponent<Component<SVGProps<SVGSVGElement>>> & { title?: string | undefined; }"}},linkTo:{defaultValue:null,description:"",name:"linkTo",required:!0,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => unknown)"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/tile/Tile.tsx#Tile"]={docgenInfo:D.__docgenInfo,name:"Tile",path:"src/components/tile/Tile.tsx#Tile"})}catch{}const ar={parameters:{storySource:{source:`import React from "react";
import { withRouter } from "storybook-addon-react-router-v6";
// @ts-ignore
import { ReactComponent as Icon } from "../assets/search.svg";
import { ComponentStory, ComponentMeta } from "@storybook/react";
import Tile from "../components/tile";
import { Link } from "react-router-dom";
export default { title: "Tile", component: Tile, decorators: [withRouter] } as ComponentMeta<typeof Tile>;
const Template: ComponentStory<typeof Tile> = (args) => <Tile {...args} />;
export const defaultTile = Template.bind({});
defaultTile.args = {
icon: Icon,
};
`,locationsMap:{"default-tile":{startLoc:{col:46,line:13},endLoc:{col:74,line:13},startBody:{col:46,line:13},endBody:{col:74,line:13}}}}},title:"Tile",component:ge,decorators:[Kt]},Qt=i(e=>m(ge,{...e}),"Template"),Zt=Qt.bind({});Zt.args={icon:Yt};const or=["defaultTile"];export{or as __namedExportsOrder,ar as default,Zt as defaultTile};
//# sourceMappingURL=Tile.stories.377da30f.js.map