Socket
Socket
Sign inDemoInstall

@storybook/router

Package Overview
Dependencies
3
Maintainers
9
Versions
1530
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.0-pr-26886-sha-b094da7b to 0.0.0-pr-26923-sha-300a6ba8

dist/chunk-4TLWAHSC.mjs

4

dist/index.d.ts

@@ -324,2 +324,3 @@ import { StoryData } from './utils.js';

startsWith?: boolean;
hideOnly?: boolean;
children: ReactNode;

@@ -330,5 +331,6 @@ }

startsWith?: false;
hideOnly?: boolean;
children: ReactNode;
}
declare const useNavigate: () => (to: To | number, { plain, ...options }?: NavigateOptions) => void;
declare const useNavigate: () => (to: To | number, { plain, ...options }?: any) => void;
/**

@@ -335,0 +337,0 @@ * A component that will navigate to a new location/path when clicked

@@ -1,2 +0,2 @@

"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var require_freeGlobal=__commonJS({"../../node_modules/lodash/_freeGlobal.js"(exports2,module2){"use strict";var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;module2.exports=freeGlobal}});var require_root=__commonJS({"../../node_modules/lodash/_root.js"(exports2,module2){"use strict";var freeGlobal=require_freeGlobal(),freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();module2.exports=root}});var require_Symbol=__commonJS({"../../node_modules/lodash/_Symbol.js"(exports2,module2){"use strict";var root=require_root(),Symbol2=root.Symbol;module2.exports=Symbol2}});var require_getRawTag=__commonJS({"../../node_modules/lodash/_getRawTag.js"(exports2,module2){"use strict";var Symbol2=require_Symbol(),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=Symbol2?Symbol2.toStringTag:void 0;function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=void 0;var unmasked=!0}catch{}var result=nativeObjectToString.call(value);return unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]),result}module2.exports=getRawTag}});var require_objectToString=__commonJS({"../../node_modules/lodash/_objectToString.js"(exports2,module2){"use strict";var objectProto=Object.prototype,nativeObjectToString=objectProto.toString;function objectToString(value){return nativeObjectToString.call(value)}module2.exports=objectToString}});var require_baseGetTag=__commonJS({"../../node_modules/lodash/_baseGetTag.js"(exports2,module2){"use strict";var Symbol2=require_Symbol(),getRawTag=require_getRawTag(),objectToString=require_objectToString(),nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol2?Symbol2.toStringTag:void 0;function baseGetTag(value){return value==null?value===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}module2.exports=baseGetTag}});var require_overArg=__commonJS({"../../node_modules/lodash/_overArg.js"(exports2,module2){"use strict";function overArg(func,transform){return function(arg){return func(transform(arg))}}module2.exports=overArg}});var require_getPrototype=__commonJS({"../../node_modules/lodash/_getPrototype.js"(exports2,module2){"use strict";var overArg=require_overArg(),getPrototype=overArg(Object.getPrototypeOf,Object);module2.exports=getPrototype}});var require_isObjectLike=__commonJS({"../../node_modules/lodash/isObjectLike.js"(exports2,module2){"use strict";function isObjectLike(value){return value!=null&&typeof value=="object"}module2.exports=isObjectLike}});var require_isPlainObject=__commonJS({"../../node_modules/lodash/isPlainObject.js"(exports2,module2){"use strict";var baseGetTag=require_baseGetTag(),getPrototype=require_getPrototype(),isObjectLike=require_isObjectLike(),objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject2(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag)return!1;var proto=getPrototype(value);if(proto===null)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return typeof Ctor=="function"&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}module2.exports=isPlainObject2}});var src_exports={};__export(src_exports,{BaseLocationProvider:()=>BaseLocationProvider,DEEPLY_EQUAL:()=>DEEPLY_EQUAL,Link:()=>Link2,Location:()=>Location,LocationProvider:()=>LocationProvider,Match:()=>Match,Route:()=>Route2,buildArgsParam:()=>buildArgsParam,deepDiff:()=>deepDiff,getMatch:()=>getMatch,parsePath:()=>parsePath,queryFromLocation:()=>queryFromLocation,queryFromString:()=>queryFromString,stringifyQuery:()=>stringifyQuery,useNavigate:()=>useNavigate2});module.exports=__toCommonJS(src_exports);var import_client_logger=require("@storybook/client-logger");var has=Object.prototype.hasOwnProperty;function find(iter,tar,key){for(key of iter.keys())if(dequal(key,tar))return key}function dequal(foo,bar){var ctor,len,tmp;if(foo===bar)return!0;if(foo&&bar&&(ctor=foo.constructor)===bar.constructor){if(ctor===Date)return foo.getTime()===bar.getTime();if(ctor===RegExp)return foo.toString()===bar.toString();if(ctor===Array){if((len=foo.length)===bar.length)for(;len--&&dequal(foo[len],bar[len]););return len===-1}if(ctor===Set){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len,tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!bar.has(tmp))return!1;return!0}if(ctor===Map){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len[0],tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!dequal(len[1],bar.get(tmp)))return!1;return!0}if(ctor===ArrayBuffer)foo=new Uint8Array(foo),bar=new Uint8Array(bar);else if(ctor===DataView){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo.getInt8(len)===bar.getInt8(len););return len===-1}if(ArrayBuffer.isView(foo)){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo[len]===bar[len];);return len===-1}if(!ctor||typeof foo=="object"){len=0;for(ctor in foo)if(has.call(foo,ctor)&&++len&&!has.call(bar,ctor)||!(ctor in bar)||!dequal(foo[ctor],bar[ctor]))return!1;return Object.keys(bar).length===len}}return foo!==foo&&bar!==bar}var import_isPlainObject=__toESM(require_isPlainObject()),import_memoizerific=__toESM(require("memoizerific")),import_qs=__toESM(require("qs"));function dedent(templ){for(var values=[],_i=1;_i<arguments.length;_i++)values[_i-1]=arguments[_i];var strings=Array.from(typeof templ=="string"?[templ]:templ);strings[strings.length-1]=strings[strings.length-1].replace(/\r?\n([\t ]*)$/,"");var indentLengths=strings.reduce(function(arr,str){var matches=str.match(/\n([\t ]+|(?!\s).)/g);return matches?arr.concat(matches.map(function(match){var _a,_b;return(_b=(_a=match.match(/[\t ]/g))===null||_a===void 0?void 0:_a.length)!==null&&_b!==void 0?_b:0})):arr},[]);if(indentLengths.length){var pattern_1=new RegExp(`
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var require_freeGlobal=__commonJS({"../../node_modules/lodash/_freeGlobal.js"(exports,module2){"use strict";var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;module2.exports=freeGlobal}});var require_root=__commonJS({"../../node_modules/lodash/_root.js"(exports,module2){"use strict";var freeGlobal=require_freeGlobal(),freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();module2.exports=root}});var require_Symbol=__commonJS({"../../node_modules/lodash/_Symbol.js"(exports,module2){"use strict";var root=require_root(),Symbol2=root.Symbol;module2.exports=Symbol2}});var require_getRawTag=__commonJS({"../../node_modules/lodash/_getRawTag.js"(exports,module2){"use strict";var Symbol2=require_Symbol(),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=Symbol2?Symbol2.toStringTag:void 0;function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=void 0;var unmasked=!0}catch{}var result=nativeObjectToString.call(value);return unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]),result}module2.exports=getRawTag}});var require_objectToString=__commonJS({"../../node_modules/lodash/_objectToString.js"(exports,module2){"use strict";var objectProto=Object.prototype,nativeObjectToString=objectProto.toString;function objectToString(value){return nativeObjectToString.call(value)}module2.exports=objectToString}});var require_baseGetTag=__commonJS({"../../node_modules/lodash/_baseGetTag.js"(exports,module2){"use strict";var Symbol2=require_Symbol(),getRawTag=require_getRawTag(),objectToString=require_objectToString(),nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol2?Symbol2.toStringTag:void 0;function baseGetTag(value){return value==null?value===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}module2.exports=baseGetTag}});var require_overArg=__commonJS({"../../node_modules/lodash/_overArg.js"(exports,module2){"use strict";function overArg(func,transform){return function(arg){return func(transform(arg))}}module2.exports=overArg}});var require_getPrototype=__commonJS({"../../node_modules/lodash/_getPrototype.js"(exports,module2){"use strict";var overArg=require_overArg(),getPrototype=overArg(Object.getPrototypeOf,Object);module2.exports=getPrototype}});var require_isObjectLike=__commonJS({"../../node_modules/lodash/isObjectLike.js"(exports,module2){"use strict";function isObjectLike(value){return value!=null&&typeof value=="object"}module2.exports=isObjectLike}});var require_isPlainObject=__commonJS({"../../node_modules/lodash/isPlainObject.js"(exports,module2){"use strict";var baseGetTag=require_baseGetTag(),getPrototype=require_getPrototype(),isObjectLike=require_isObjectLike(),objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject2(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag)return!1;var proto=getPrototype(value);if(proto===null)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return typeof Ctor=="function"&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}module2.exports=isPlainObject2}});var src_exports={};__export(src_exports,{BaseLocationProvider:()=>BaseLocationProvider,DEEPLY_EQUAL:()=>DEEPLY_EQUAL,Link:()=>Link2,Location:()=>Location,LocationProvider:()=>LocationProvider,Match:()=>Match,Route:()=>Route2,buildArgsParam:()=>buildArgsParam,deepDiff:()=>deepDiff,getMatch:()=>getMatch,parsePath:()=>parsePath,queryFromLocation:()=>queryFromLocation,queryFromString:()=>queryFromString,stringifyQuery:()=>stringifyQuery,useNavigate:()=>useNavigate2});module.exports=__toCommonJS(src_exports);var import_client_logger=require("@storybook/client-logger");var has=Object.prototype.hasOwnProperty;function find(iter,tar,key){for(key of iter.keys())if(dequal(key,tar))return key}function dequal(foo,bar){var ctor,len,tmp;if(foo===bar)return!0;if(foo&&bar&&(ctor=foo.constructor)===bar.constructor){if(ctor===Date)return foo.getTime()===bar.getTime();if(ctor===RegExp)return foo.toString()===bar.toString();if(ctor===Array){if((len=foo.length)===bar.length)for(;len--&&dequal(foo[len],bar[len]););return len===-1}if(ctor===Set){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len,tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!bar.has(tmp))return!1;return!0}if(ctor===Map){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len[0],tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!dequal(len[1],bar.get(tmp)))return!1;return!0}if(ctor===ArrayBuffer)foo=new Uint8Array(foo),bar=new Uint8Array(bar);else if(ctor===DataView){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo.getInt8(len)===bar.getInt8(len););return len===-1}if(ArrayBuffer.isView(foo)){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo[len]===bar[len];);return len===-1}if(!ctor||typeof foo=="object"){len=0;for(ctor in foo)if(has.call(foo,ctor)&&++len&&!has.call(bar,ctor)||!(ctor in bar)||!dequal(foo[ctor],bar[ctor]))return!1;return Object.keys(bar).length===len}}return foo!==foo&&bar!==bar}var import_isPlainObject=__toESM(require_isPlainObject()),import_memoizerific=__toESM(require("memoizerific")),import_qs=__toESM(require("qs"));function dedent(templ){for(var values=[],_i=1;_i<arguments.length;_i++)values[_i-1]=arguments[_i];var strings=Array.from(typeof templ=="string"?[templ]:templ);strings[strings.length-1]=strings[strings.length-1].replace(/\r?\n([\t ]*)$/,"");var indentLengths=strings.reduce(function(arr,str){var matches=str.match(/\n([\t ]+|(?!\s).)/g);return matches?arr.concat(matches.map(function(match){var _a,_b;return(_b=(_a=match.match(/[\t ]/g))===null||_a===void 0?void 0:_a.length)!==null&&_b!==void 0?_b:0})):arr},[]);if(indentLengths.length){var pattern_1=new RegExp(`
[ ]{`+Math.min.apply(Math,indentLengths)+"}","g");strings=strings.map(function(str){return str.replace(pattern_1,`

@@ -6,6 +6,6 @@ `)})}strings[0]=strings[0].replace(/^\r?\n/,"");var string=strings[0];return values.forEach(function(value,i){var endentations=string.match(/(?:^|\n)( *)$/),endentation=endentations?endentations[1]:"",indentedValue=value;typeof value=="string"&&value.includes(`

`).map(function(str,i2){return i2===0?str:""+endentation+str}).join(`
`)),string+=indentedValue+strings[i+1]}),string}var splitPathRegex=/\/([^/]+)\/(?:(.*)_)?([^/]+)?/,parsePath=(0,import_memoizerific.default)(1e3)(path=>{let result={viewMode:void 0,storyId:void 0,refId:void 0};if(path){let[,viewMode,refId,storyId]=path.toLowerCase().match(splitPathRegex)||[];viewMode&&Object.assign(result,{viewMode,storyId,refId})}return result}),DEEPLY_EQUAL=Symbol("Deeply equal"),deepDiff=(value,update)=>{if(typeof value!=typeof update)return update;if(dequal(value,update))return DEEPLY_EQUAL;if(Array.isArray(value)&&Array.isArray(update)){let res=update.reduce((acc,upd,index)=>{let diff=deepDiff(value[index],upd);return diff!==DEEPLY_EQUAL&&(acc[index]=diff),acc},new Array(update.length));return update.length>=value.length?res:res.concat(new Array(value.length-update.length).fill(void 0))}return(0,import_isPlainObject.default)(value)&&(0,import_isPlainObject.default)(update)?Object.keys({...value,...update}).reduce((acc,key)=>{let diff=deepDiff(value?.[key],update?.[key]);return diff===DEEPLY_EQUAL?acc:Object.assign(acc,{[key]:diff})},{}):update},VALIDATION_REGEXP=/^[a-zA-Z0-9 _-]*$/,NUMBER_REGEXP=/^-?[0-9]+(\.[0-9]+)?$/,HEX_REGEXP=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,COLOR_REGEXP=/^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,validateArgs=(key="",value)=>key===null||key===""||!VALIDATION_REGEXP.test(key)?!1:value==null||value instanceof Date||typeof value=="number"||typeof value=="boolean"?!0:typeof value=="string"?VALIDATION_REGEXP.test(value)||NUMBER_REGEXP.test(value)||HEX_REGEXP.test(value)||COLOR_REGEXP.test(value):Array.isArray(value)?value.every(v=>validateArgs(key,v)):(0,import_isPlainObject.default)(value)?Object.entries(value).every(([k,v])=>validateArgs(k,v)):!1,encodeSpecialValues=value=>value===void 0?"!undefined":value===null?"!null":typeof value=="string"?HEX_REGEXP.test(value)?`!hex(${value.slice(1)})`:COLOR_REGEXP.test(value)?`!${value.replace(/[\s%]/g,"")}`:value:typeof value=="boolean"?`!${value}`:Array.isArray(value)?value.map(encodeSpecialValues):(0,import_isPlainObject.default)(value)?Object.entries(value).reduce((acc,[key,val])=>Object.assign(acc,{[key]:encodeSpecialValues(val)}),{}):value,QS_OPTIONS={encode:!1,delimiter:";",allowDots:!0,format:"RFC1738",serializeDate:date=>`!date(${date.toISOString()})`},buildArgsParam=(initialArgs,args)=>{let update=deepDiff(initialArgs,args);if(!update||update===DEEPLY_EQUAL)return"";let object=Object.entries(update).reduce((acc,[key,value])=>validateArgs(key,value)?Object.assign(acc,{[key]:value}):(import_client_logger.once.warn(dedent`
`)),string+=indentedValue+strings[i+1]}),string}var splitPathRegex=/\/([^/]+)\/(?:(.*)_)?([^/]+)?/,parsePath=(0,import_memoizerific.default)(1e3)(path=>{let result={viewMode:void 0,storyId:void 0,refId:void 0};if(path){let[,viewMode,refId,storyId]=path.toLowerCase().match(splitPathRegex)||[];viewMode&&Object.assign(result,{viewMode,storyId,refId})}return result}),DEEPLY_EQUAL=Symbol("Deeply equal"),deepDiff=(value,update)=>{if(typeof value!=typeof update)return update;if(dequal(value,update))return DEEPLY_EQUAL;if(Array.isArray(value)&&Array.isArray(update)){let res=update.reduce((acc,upd,index)=>{let diff=deepDiff(value[index],upd);return diff!==DEEPLY_EQUAL&&(acc[index]=diff),acc},new Array(update.length));return update.length>=value.length?res:res.concat(new Array(value.length-update.length).fill(void 0))}return(0,import_isPlainObject.default)(value)&&(0,import_isPlainObject.default)(update)?Object.keys({...value,...update}).reduce((acc,key)=>{let diff=deepDiff(value==null?void 0:value[key],update==null?void 0:update[key]);return diff===DEEPLY_EQUAL?acc:Object.assign(acc,{[key]:diff})},{}):update},VALIDATION_REGEXP=/^[a-zA-Z0-9 _-]*$/,NUMBER_REGEXP=/^-?[0-9]+(\.[0-9]+)?$/,HEX_REGEXP=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,COLOR_REGEXP=/^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,validateArgs=(key="",value)=>key===null||key===""||!VALIDATION_REGEXP.test(key)?!1:value==null||value instanceof Date||typeof value=="number"||typeof value=="boolean"?!0:typeof value=="string"?VALIDATION_REGEXP.test(value)||NUMBER_REGEXP.test(value)||HEX_REGEXP.test(value)||COLOR_REGEXP.test(value):Array.isArray(value)?value.every(v=>validateArgs(key,v)):(0,import_isPlainObject.default)(value)?Object.entries(value).every(([k,v])=>validateArgs(k,v)):!1,encodeSpecialValues=value=>value===void 0?"!undefined":value===null?"!null":typeof value=="string"?HEX_REGEXP.test(value)?`!hex(${value.slice(1)})`:COLOR_REGEXP.test(value)?`!${value.replace(/[\s%]/g,"")}`:value:typeof value=="boolean"?`!${value}`:Array.isArray(value)?value.map(encodeSpecialValues):(0,import_isPlainObject.default)(value)?Object.entries(value).reduce((acc,[key,val])=>Object.assign(acc,{[key]:encodeSpecialValues(val)}),{}):value,QS_OPTIONS={encode:!1,delimiter:";",allowDots:!0,format:"RFC1738",serializeDate:date=>`!date(${date.toISOString()})`},buildArgsParam=(initialArgs,args)=>{let update=deepDiff(initialArgs,args);if(!update||update===DEEPLY_EQUAL)return"";let object=Object.entries(update).reduce((acc,[key,value])=>validateArgs(key,value)?Object.assign(acc,{[key]:value}):(import_client_logger.once.warn(dedent`
Omitted potentially unsafe URL args.
More info: https://storybook.js.org/docs/react/writing-stories/args#setting-args-through-the-url
`),acc),{});return import_qs.default.stringify(encodeSpecialValues(object),QS_OPTIONS).replace(/ /g,"+").split(";").map(part=>part.replace("=",":")).join(";")},queryFromString=(0,import_memoizerific.default)(1e3)(s=>s!==void 0?import_qs.default.parse(s,{ignoreQueryPrefix:!0}):{}),queryFromLocation=location=>queryFromString(location.search),stringifyQuery=query=>import_qs.default.stringify(query,{addQueryPrefix:!0,encode:!1}),getMatch=(0,import_memoizerific.default)(1e3)((current,target,startsWith=!0)=>{if(startsWith){if(typeof target!="string")throw new Error("startsWith only works with string targets");return current&&current.startsWith(target)?{path:current}:null}let currentIsTarget=typeof target=="string"&&current===target,matchTarget=current&&target&&current.match(target);return currentIsTarget||matchTarget?{path:current}:null});var scope=(()=>{let win;return typeof window<"u"?win=window:typeof globalThis<"u"?win=globalThis:typeof global<"u"?win=global:typeof self<"u"?win=self:win={},win})();var import_react3=__toESM(require("react"));var import_react2=require("react");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}var Action;(function(Action2){Action2.Pop="POP",Action2.Push="PUSH",Action2.Replace="REPLACE"})(Action||(Action={}));var readOnly=process.env.NODE_ENV!=="production"?function(obj){return Object.freeze(obj)}:function(obj){return obj};function warning(cond,message){if(!cond){typeof console<"u"&&console.warn(message);try{throw new Error(message)}catch{}}}var BeforeUnloadEventType="beforeunload";var PopStateEventType="popstate";function createBrowserHistory(options){options===void 0&&(options={});var _options=options,_options$window=_options.window,window2=_options$window===void 0?document.defaultView:_options$window,globalHistory=window2.history;function getIndexAndLocation(){var _window$location=window2.location,pathname=_window$location.pathname,search=_window$location.search,hash=_window$location.hash,state=globalHistory.state||{};return[state.idx,readOnly({pathname,search,hash,state:state.usr||null,key:state.key||"default"})]}var blockedPopTx=null;function handlePop(){if(blockedPopTx)blockers.call(blockedPopTx),blockedPopTx=null;else{var nextAction=Action.Pop,_getIndexAndLocation=getIndexAndLocation(),nextIndex=_getIndexAndLocation[0],nextLocation=_getIndexAndLocation[1];if(blockers.length)if(nextIndex!=null){var delta=index-nextIndex;delta&&(blockedPopTx={action:nextAction,location:nextLocation,retry:function(){go(delta*-1)}},go(delta))}else process.env.NODE_ENV!=="production"&&warning(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else applyTx(nextAction)}}window2.addEventListener(PopStateEventType,handlePop);var action=Action.Pop,_getIndexAndLocation2=getIndexAndLocation(),index=_getIndexAndLocation2[0],location=_getIndexAndLocation2[1],listeners=createEvents(),blockers=createEvents();index==null&&(index=0,globalHistory.replaceState(_extends({},globalHistory.state,{idx:index}),""));function createHref(to){return typeof to=="string"?to:createPath(to)}function getNextLocation(to,state){return state===void 0&&(state=null),readOnly(_extends({pathname:location.pathname,hash:"",search:""},typeof to=="string"?parsePath2(to):to,{state,key:createKey()}))}function getHistoryStateAndUrl(nextLocation,index2){return[{usr:nextLocation.state,key:nextLocation.key,idx:index2},createHref(nextLocation)]}function allowTx(action2,location2,retry){return!blockers.length||(blockers.call({action:action2,location:location2,retry}),!1)}function applyTx(nextAction){action=nextAction;var _getIndexAndLocation3=getIndexAndLocation();index=_getIndexAndLocation3[0],location=_getIndexAndLocation3[1],listeners.call({action,location})}function push(to,state){var nextAction=Action.Push,nextLocation=getNextLocation(to,state);function retry(){push(to,state)}if(allowTx(nextAction,nextLocation,retry)){var _getHistoryStateAndUr=getHistoryStateAndUrl(nextLocation,index+1),historyState=_getHistoryStateAndUr[0],url=_getHistoryStateAndUr[1];try{globalHistory.pushState(historyState,"",url)}catch{window2.location.assign(url)}applyTx(nextAction)}}function replace(to,state){var nextAction=Action.Replace,nextLocation=getNextLocation(to,state);function retry(){replace(to,state)}if(allowTx(nextAction,nextLocation,retry)){var _getHistoryStateAndUr2=getHistoryStateAndUrl(nextLocation,index),historyState=_getHistoryStateAndUr2[0],url=_getHistoryStateAndUr2[1];globalHistory.replaceState(historyState,"",url),applyTx(nextAction)}}function go(delta){globalHistory.go(delta)}var history={get action(){return action},get location(){return location},createHref,push,replace,go,back:function(){go(-1)},forward:function(){go(1)},listen:function(listener){return listeners.push(listener)},block:function(blocker){var unblock=blockers.push(blocker);return blockers.length===1&&window2.addEventListener(BeforeUnloadEventType,promptBeforeUnload),function(){unblock(),blockers.length||window2.removeEventListener(BeforeUnloadEventType,promptBeforeUnload)}}};return history}function promptBeforeUnload(event){event.preventDefault(),event.returnValue=""}function createEvents(){var handlers=[];return{get length(){return handlers.length},push:function(fn){return handlers.push(fn),function(){handlers=handlers.filter(function(handler){return handler!==fn})}},call:function(arg){handlers.forEach(function(fn){return fn&&fn(arg)})}}}function createKey(){return Math.random().toString(36).substr(2,8)}function createPath(_ref){var _ref$pathname=_ref.pathname,pathname=_ref$pathname===void 0?"/":_ref$pathname,_ref$search=_ref.search,search=_ref$search===void 0?"":_ref$search,_ref$hash=_ref.hash,hash=_ref$hash===void 0?"":_ref$hash;return search&&search!=="?"&&(pathname+=search.charAt(0)==="?"?search:"?"+search),hash&&hash!=="#"&&(pathname+=hash.charAt(0)==="#"?hash:"#"+hash),pathname}function parsePath2(path){var parsedPath={};if(path){var hashIndex=path.indexOf("#");hashIndex>=0&&(parsedPath.hash=path.substr(hashIndex),path=path.substr(0,hashIndex));var searchIndex=path.indexOf("?");searchIndex>=0&&(parsedPath.search=path.substr(searchIndex),path=path.substr(0,searchIndex)),path&&(parsedPath.pathname=path)}return parsedPath}var import_react=require("react");function invariant(cond,message){if(!cond)throw new Error(message)}function warning2(cond,message){if(!cond){typeof console<"u"&&console.warn(message);try{throw new Error(message)}catch{}}}var NavigationContext=(0,import_react.createContext)(null);process.env.NODE_ENV!=="production"&&(NavigationContext.displayName="Navigation");var LocationContext=(0,import_react.createContext)(null);process.env.NODE_ENV!=="production"&&(LocationContext.displayName="Location");var RouteContext=(0,import_react.createContext)({outlet:null,matches:[]});process.env.NODE_ENV!=="production"&&(RouteContext.displayName="Route");function Router(_ref3){let{basename:basenameProp="/",children=null,location:locationProp,navigationType=Action.Pop,navigator,static:staticProp=!1}=_ref3;useInRouterContext()&&(process.env.NODE_ENV!=="production"?invariant(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):invariant(!1));let basename=normalizePathname(basenameProp),navigationContext=(0,import_react.useMemo)(()=>({basename,navigator,static:staticProp}),[basename,navigator,staticProp]);typeof locationProp=="string"&&(locationProp=parsePath2(locationProp));let{pathname="/",search="",hash="",state=null,key="default"}=locationProp,location=(0,import_react.useMemo)(()=>{let trailingPathname=stripBasename(pathname,basename);return trailingPathname==null?null:{pathname:trailingPathname,search,hash,state,key}},[basename,pathname,search,hash,state,key]);return process.env.NODE_ENV!=="production"&&warning2(location!=null,'<Router basename="'+basename+'"> is not able to match the URL '+('"'+pathname+search+hash+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),location==null?null:(0,import_react.createElement)(NavigationContext.Provider,{value:navigationContext},(0,import_react.createElement)(LocationContext.Provider,{children,value:{location,navigationType}}))}function useHref(to){useInRouterContext()||(process.env.NODE_ENV!=="production"?invariant(!1,"useHref() may be used only in the context of a <Router> component."):invariant(!1));let{basename,navigator}=(0,import_react.useContext)(NavigationContext),{hash,pathname,search}=useResolvedPath(to),joinedPathname=pathname;if(basename!=="/"){let toPathname=getToPathname(to),endsWithSlash=toPathname!=null&&toPathname.endsWith("/");joinedPathname=pathname==="/"?basename+(endsWithSlash?"/":""):joinPaths([basename,pathname])}return navigator.createHref({pathname:joinedPathname,search,hash})}function useInRouterContext(){return(0,import_react.useContext)(LocationContext)!=null}function useLocation(){return useInRouterContext()||(process.env.NODE_ENV!=="production"?invariant(!1,"useLocation() may be used only in the context of a <Router> component."):invariant(!1)),(0,import_react.useContext)(LocationContext).location}function useNavigate(){useInRouterContext()||(process.env.NODE_ENV!=="production"?invariant(!1,"useNavigate() may be used only in the context of a <Router> component."):invariant(!1));let{basename,navigator}=(0,import_react.useContext)(NavigationContext),{matches}=(0,import_react.useContext)(RouteContext),{pathname:locationPathname}=useLocation(),routePathnamesJson=JSON.stringify(matches.map(match=>match.pathnameBase)),activeRef=(0,import_react.useRef)(!1);return(0,import_react.useEffect)(()=>{activeRef.current=!0}),(0,import_react.useCallback)(function(to,options){if(options===void 0&&(options={}),process.env.NODE_ENV!=="production"&&warning2(activeRef.current,"You should call navigate() in a React.useEffect(), not when your component is first rendered."),!activeRef.current)return;if(typeof to=="number"){navigator.go(to);return}let path=resolveTo(to,JSON.parse(routePathnamesJson),locationPathname);basename!=="/"&&(path.pathname=joinPaths([basename,path.pathname])),(options.replace?navigator.replace:navigator.push)(path,options.state)},[basename,navigator,routePathnamesJson,locationPathname])}function useResolvedPath(to){let{matches}=(0,import_react.useContext)(RouteContext),{pathname:locationPathname}=useLocation(),routePathnamesJson=JSON.stringify(matches.map(match=>match.pathnameBase));return(0,import_react.useMemo)(()=>resolveTo(to,JSON.parse(routePathnamesJson),locationPathname),[to,routePathnamesJson,locationPathname])}function resolvePath(to,fromPathname){fromPathname===void 0&&(fromPathname="/");let{pathname:toPathname,search="",hash=""}=typeof to=="string"?parsePath2(to):to;return{pathname:toPathname?toPathname.startsWith("/")?toPathname:resolvePathname(toPathname,fromPathname):fromPathname,search:normalizeSearch(search),hash:normalizeHash(hash)}}function resolvePathname(relativePath,fromPathname){let segments=fromPathname.replace(/\/+$/,"").split("/");return relativePath.split("/").forEach(segment=>{segment===".."?segments.length>1&&segments.pop():segment!=="."&&segments.push(segment)}),segments.length>1?segments.join("/"):"/"}function resolveTo(toArg,routePathnames,locationPathname){let to=typeof toArg=="string"?parsePath2(toArg):toArg,toPathname=toArg===""||to.pathname===""?"/":to.pathname,from;if(toPathname==null)from=locationPathname;else{let routePathnameIndex=routePathnames.length-1;if(toPathname.startsWith("..")){let toSegments=toPathname.split("/");for(;toSegments[0]==="..";)toSegments.shift(),routePathnameIndex-=1;to.pathname=toSegments.join("/")}from=routePathnameIndex>=0?routePathnames[routePathnameIndex]:"/"}let path=resolvePath(to,from);return toPathname&&toPathname!=="/"&&toPathname.endsWith("/")&&!path.pathname.endsWith("/")&&(path.pathname+="/"),path}function getToPathname(to){return to===""||to.pathname===""?"/":typeof to=="string"?parsePath2(to).pathname:to.pathname}function stripBasename(pathname,basename){if(basename==="/")return pathname;if(!pathname.toLowerCase().startsWith(basename.toLowerCase()))return null;let nextChar=pathname.charAt(basename.length);return nextChar&&nextChar!=="/"?null:pathname.slice(basename.length)||"/"}var joinPaths=paths=>paths.join("/").replace(/\/\/+/g,"/"),normalizePathname=pathname=>pathname.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=search=>!search||search==="?"?"":search.startsWith("?")?search:"?"+search,normalizeHash=hash=>!hash||hash==="#"?"":hash.startsWith("#")?hash:"#"+hash;function _extends2(){return _extends2=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends2.apply(this,arguments)}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}var _excluded=["onClick","reloadDocument","replace","state","target","to"],_excluded2=["aria-current","caseSensitive","className","end","style","to"];function BrowserRouter(_ref){let{basename,children,window:window2}=_ref,historyRef=(0,import_react2.useRef)();historyRef.current==null&&(historyRef.current=createBrowserHistory({window:window2}));let history=historyRef.current,[state,setState]=(0,import_react2.useState)({action:history.action,location:history.location});return(0,import_react2.useLayoutEffect)(()=>history.listen(setState),[history]),(0,import_react2.createElement)(Router,{basename,children,location:state.location,navigationType:state.action,navigator:history})}function isModifiedEvent(event){return!!(event.metaKey||event.altKey||event.ctrlKey||event.shiftKey)}var Link=(0,import_react2.forwardRef)(function(_ref3,ref){let{onClick,reloadDocument,replace=!1,state,target,to}=_ref3,rest=_objectWithoutPropertiesLoose(_ref3,_excluded),href=useHref(to),internalOnClick=useLinkClickHandler(to,{replace,state,target});function handleClick(event){onClick&&onClick(event),!event.defaultPrevented&&!reloadDocument&&internalOnClick(event)}return(0,import_react2.createElement)("a",_extends2({},rest,{href,onClick:handleClick,ref,target}))});process.env.NODE_ENV!=="production"&&(Link.displayName="Link");var NavLink=(0,import_react2.forwardRef)(function(_ref4,ref){let{"aria-current":ariaCurrentProp="page",caseSensitive=!1,className:classNameProp="",end=!1,style:styleProp,to}=_ref4,rest=_objectWithoutPropertiesLoose(_ref4,_excluded2),location=useLocation(),path=useResolvedPath(to),locationPathname=location.pathname,toPathname=path.pathname;caseSensitive||(locationPathname=locationPathname.toLowerCase(),toPathname=toPathname.toLowerCase());let isActive=locationPathname===toPathname||!end&&locationPathname.startsWith(toPathname)&&locationPathname.charAt(toPathname.length)==="/",ariaCurrent=isActive?ariaCurrentProp:void 0,className;typeof classNameProp=="function"?className=classNameProp({isActive}):className=[classNameProp,isActive?"active":null].filter(Boolean).join(" ");let style=typeof styleProp=="function"?styleProp({isActive}):styleProp;return(0,import_react2.createElement)(Link,_extends2({},rest,{"aria-current":ariaCurrent,className,ref,style,to}))});process.env.NODE_ENV!=="production"&&(NavLink.displayName="NavLink");function useLinkClickHandler(to,_temp){let{target,replace:replaceProp,state}=_temp===void 0?{}:_temp,navigate=useNavigate(),location=useLocation(),path=useResolvedPath(to);return(0,import_react2.useCallback)(event=>{if(event.button===0&&(!target||target==="_self")&&!isModifiedEvent(event)){event.preventDefault();let replace=!!replaceProp||createPath(location)===createPath(path);navigate(to,{replace,state})}},[location,navigate,path,replaceProp,state,target,to])}var{document:document2}=scope,getBase=()=>`${document2.location.pathname}?`,useNavigate2=()=>{let navigate=useNavigate();return(0,import_react3.useCallback)((to,{plain,...options}={})=>{if(typeof to=="string"&&to.startsWith("#")){document2.location.hash=to;return}if(typeof to=="string"){let target=plain?to:`?path=${to}`;return navigate(target,options)}if(typeof to=="number")return navigate(to)},[])},Link2=({to,children,...rest})=>import_react3.default.createElement(Link,{to:`${getBase()}path=${to}`,...rest},children);Link2.displayName="QueryLink";var Location=({children})=>{let location=useLocation(),{path,singleStory}=queryFromString(location.search),{viewMode,storyId,refId}=parsePath(path);return import_react3.default.createElement(import_react3.default.Fragment,null,children({path:path||"/",location,viewMode,storyId,refId,singleStory:singleStory==="true"}))};Location.displayName="QueryLocation";function Match({children,path:targetPath,startsWith=!1}){return import_react3.default.createElement(Location,null,({path:urlPath,...rest})=>children({match:getMatch(urlPath,targetPath,startsWith),...rest}))}Match.displayName="QueryMatch";function Route2(input){let{children,...rest}=input;return rest.startsWith===void 0&&(rest.startsWith=!1),import_react3.default.createElement(Match,{...rest},({match})=>match?children:null)}Route2.displayName="Route";var LocationProvider=(...args)=>BrowserRouter(...args),BaseLocationProvider=(...args)=>Router(...args);0&&(module.exports={BaseLocationProvider,DEEPLY_EQUAL,Link,Location,LocationProvider,Match,Route,buildArgsParam,deepDiff,getMatch,parsePath,queryFromLocation,queryFromString,stringifyQuery,useNavigate});
`),acc),{});return import_qs.default.stringify(encodeSpecialValues(object),QS_OPTIONS).replace(/ /g,"+").split(";").map(part=>part.replace("=",":")).join(";")},queryFromString=(0,import_memoizerific.default)(1e3)(s=>s!==void 0?import_qs.default.parse(s,{ignoreQueryPrefix:!0}):{}),queryFromLocation=location=>queryFromString(location.search),stringifyQuery=query=>import_qs.default.stringify(query,{addQueryPrefix:!0,encode:!1}),getMatch=(0,import_memoizerific.default)(1e3)((current,target,startsWith=!0)=>{if(startsWith){if(typeof target!="string")throw new Error("startsWith only works with string targets");return current&&current.startsWith(target)?{path:current}:null}let currentIsTarget=typeof target=="string"&&current===target,matchTarget=current&&target&&current.match(target);return currentIsTarget||matchTarget?{path:current}:null});var scope=(()=>{let win;return typeof window<"u"?win=window:typeof globalThis<"u"?win=globalThis:typeof global<"u"?win=global:typeof self<"u"?win=self:win={},win})();var import_react4=__toESM(require("react"));var import_react2=require("react");function _extends(){return _extends=Object.assign?Object.assign.bind():function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends.apply(this,arguments)}var Action;(function(Action2){Action2.Pop="POP",Action2.Push="PUSH",Action2.Replace="REPLACE"})(Action||(Action={}));var readOnly=process.env.NODE_ENV!=="production"?function(obj){return Object.freeze(obj)}:function(obj){return obj};function warning(cond,message){if(!cond){typeof console<"u"&&console.warn(message);try{throw new Error(message)}catch{}}}var BeforeUnloadEventType="beforeunload";var PopStateEventType="popstate";function createBrowserHistory(options){options===void 0&&(options={});var _options=options,_options$window=_options.window,window2=_options$window===void 0?document.defaultView:_options$window,globalHistory=window2.history;function getIndexAndLocation(){var _window$location=window2.location,pathname=_window$location.pathname,search=_window$location.search,hash=_window$location.hash,state=globalHistory.state||{};return[state.idx,readOnly({pathname,search,hash,state:state.usr||null,key:state.key||"default"})]}var blockedPopTx=null;function handlePop(){if(blockedPopTx)blockers.call(blockedPopTx),blockedPopTx=null;else{var nextAction=Action.Pop,_getIndexAndLocation=getIndexAndLocation(),nextIndex=_getIndexAndLocation[0],nextLocation=_getIndexAndLocation[1];if(blockers.length)if(nextIndex!=null){var delta=index-nextIndex;delta&&(blockedPopTx={action:nextAction,location:nextLocation,retry:function(){go(delta*-1)}},go(delta))}else process.env.NODE_ENV!=="production"&&warning(!1,"You are trying to block a POP navigation to a location that was not created by the history library. The block will fail silently in production, but in general you should do all navigation with the history library (instead of using window.history.pushState directly) to avoid this situation.");else applyTx(nextAction)}}window2.addEventListener(PopStateEventType,handlePop);var action=Action.Pop,_getIndexAndLocation2=getIndexAndLocation(),index=_getIndexAndLocation2[0],location=_getIndexAndLocation2[1],listeners=createEvents(),blockers=createEvents();index==null&&(index=0,globalHistory.replaceState(_extends({},globalHistory.state,{idx:index}),""));function createHref(to){return typeof to=="string"?to:createPath(to)}function getNextLocation(to,state){return state===void 0&&(state=null),readOnly(_extends({pathname:location.pathname,hash:"",search:""},typeof to=="string"?parsePath2(to):to,{state,key:createKey()}))}function getHistoryStateAndUrl(nextLocation,index2){return[{usr:nextLocation.state,key:nextLocation.key,idx:index2},createHref(nextLocation)]}function allowTx(action2,location2,retry){return!blockers.length||(blockers.call({action:action2,location:location2,retry}),!1)}function applyTx(nextAction){action=nextAction;var _getIndexAndLocation3=getIndexAndLocation();index=_getIndexAndLocation3[0],location=_getIndexAndLocation3[1],listeners.call({action,location})}function push(to,state){var nextAction=Action.Push,nextLocation=getNextLocation(to,state);function retry(){push(to,state)}if(allowTx(nextAction,nextLocation,retry)){var _getHistoryStateAndUr=getHistoryStateAndUrl(nextLocation,index+1),historyState=_getHistoryStateAndUr[0],url=_getHistoryStateAndUr[1];try{globalHistory.pushState(historyState,"",url)}catch{window2.location.assign(url)}applyTx(nextAction)}}function replace(to,state){var nextAction=Action.Replace,nextLocation=getNextLocation(to,state);function retry(){replace(to,state)}if(allowTx(nextAction,nextLocation,retry)){var _getHistoryStateAndUr2=getHistoryStateAndUrl(nextLocation,index),historyState=_getHistoryStateAndUr2[0],url=_getHistoryStateAndUr2[1];globalHistory.replaceState(historyState,"",url),applyTx(nextAction)}}function go(delta){globalHistory.go(delta)}var history={get action(){return action},get location(){return location},createHref,push,replace,go,back:function(){go(-1)},forward:function(){go(1)},listen:function(listener){return listeners.push(listener)},block:function(blocker){var unblock=blockers.push(blocker);return blockers.length===1&&window2.addEventListener(BeforeUnloadEventType,promptBeforeUnload),function(){unblock(),blockers.length||window2.removeEventListener(BeforeUnloadEventType,promptBeforeUnload)}}};return history}function promptBeforeUnload(event){event.preventDefault(),event.returnValue=""}function createEvents(){var handlers=[];return{get length(){return handlers.length},push:function(fn){return handlers.push(fn),function(){handlers=handlers.filter(function(handler){return handler!==fn})}},call:function(arg){handlers.forEach(function(fn){return fn&&fn(arg)})}}}function createKey(){return Math.random().toString(36).substr(2,8)}function createPath(_ref){var _ref$pathname=_ref.pathname,pathname=_ref$pathname===void 0?"/":_ref$pathname,_ref$search=_ref.search,search=_ref$search===void 0?"":_ref$search,_ref$hash=_ref.hash,hash=_ref$hash===void 0?"":_ref$hash;return search&&search!=="?"&&(pathname+=search.charAt(0)==="?"?search:"?"+search),hash&&hash!=="#"&&(pathname+=hash.charAt(0)==="#"?hash:"#"+hash),pathname}function parsePath2(path){var parsedPath={};if(path){var hashIndex=path.indexOf("#");hashIndex>=0&&(parsedPath.hash=path.substr(hashIndex),path=path.substr(0,hashIndex));var searchIndex=path.indexOf("?");searchIndex>=0&&(parsedPath.search=path.substr(searchIndex),path=path.substr(0,searchIndex)),path&&(parsedPath.pathname=path)}return parsedPath}var import_react=require("react");function invariant(cond,message){if(!cond)throw new Error(message)}function warning2(cond,message){if(!cond){typeof console<"u"&&console.warn(message);try{throw new Error(message)}catch{}}}var NavigationContext=(0,import_react.createContext)(null);process.env.NODE_ENV!=="production"&&(NavigationContext.displayName="Navigation");var LocationContext=(0,import_react.createContext)(null);process.env.NODE_ENV!=="production"&&(LocationContext.displayName="Location");var RouteContext=(0,import_react.createContext)({outlet:null,matches:[]});process.env.NODE_ENV!=="production"&&(RouteContext.displayName="Route");function Router(_ref3){let{basename:basenameProp="/",children=null,location:locationProp,navigationType=Action.Pop,navigator,static:staticProp=!1}=_ref3;useInRouterContext()&&(process.env.NODE_ENV!=="production"?invariant(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):invariant(!1));let basename=normalizePathname(basenameProp),navigationContext=(0,import_react.useMemo)(()=>({basename,navigator,static:staticProp}),[basename,navigator,staticProp]);typeof locationProp=="string"&&(locationProp=parsePath2(locationProp));let{pathname="/",search="",hash="",state=null,key="default"}=locationProp,location=(0,import_react.useMemo)(()=>{let trailingPathname=stripBasename(pathname,basename);return trailingPathname==null?null:{pathname:trailingPathname,search,hash,state,key}},[basename,pathname,search,hash,state,key]);return process.env.NODE_ENV!=="production"&&warning2(location!=null,'<Router basename="'+basename+'"> is not able to match the URL '+('"'+pathname+search+hash+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),location==null?null:(0,import_react.createElement)(NavigationContext.Provider,{value:navigationContext},(0,import_react.createElement)(LocationContext.Provider,{children,value:{location,navigationType}}))}function useHref(to){useInRouterContext()||(process.env.NODE_ENV!=="production"?invariant(!1,"useHref() may be used only in the context of a <Router> component."):invariant(!1));let{basename,navigator}=(0,import_react.useContext)(NavigationContext),{hash,pathname,search}=useResolvedPath(to),joinedPathname=pathname;if(basename!=="/"){let toPathname=getToPathname(to),endsWithSlash=toPathname!=null&&toPathname.endsWith("/");joinedPathname=pathname==="/"?basename+(endsWithSlash?"/":""):joinPaths([basename,pathname])}return navigator.createHref({pathname:joinedPathname,search,hash})}function useInRouterContext(){return(0,import_react.useContext)(LocationContext)!=null}function useLocation(){return useInRouterContext()||(process.env.NODE_ENV!=="production"?invariant(!1,"useLocation() may be used only in the context of a <Router> component."):invariant(!1)),(0,import_react.useContext)(LocationContext).location}function useNavigate(){useInRouterContext()||(process.env.NODE_ENV!=="production"?invariant(!1,"useNavigate() may be used only in the context of a <Router> component."):invariant(!1));let{basename,navigator}=(0,import_react.useContext)(NavigationContext),{matches}=(0,import_react.useContext)(RouteContext),{pathname:locationPathname}=useLocation(),routePathnamesJson=JSON.stringify(matches.map(match=>match.pathnameBase)),activeRef=(0,import_react.useRef)(!1);return(0,import_react.useEffect)(()=>{activeRef.current=!0}),(0,import_react.useCallback)(function(to,options){if(options===void 0&&(options={}),process.env.NODE_ENV!=="production"&&warning2(activeRef.current,"You should call navigate() in a React.useEffect(), not when your component is first rendered."),!activeRef.current)return;if(typeof to=="number"){navigator.go(to);return}let path=resolveTo(to,JSON.parse(routePathnamesJson),locationPathname);basename!=="/"&&(path.pathname=joinPaths([basename,path.pathname])),(options.replace?navigator.replace:navigator.push)(path,options.state)},[basename,navigator,routePathnamesJson,locationPathname])}function useResolvedPath(to){let{matches}=(0,import_react.useContext)(RouteContext),{pathname:locationPathname}=useLocation(),routePathnamesJson=JSON.stringify(matches.map(match=>match.pathnameBase));return(0,import_react.useMemo)(()=>resolveTo(to,JSON.parse(routePathnamesJson),locationPathname),[to,routePathnamesJson,locationPathname])}function resolvePath(to,fromPathname){fromPathname===void 0&&(fromPathname="/");let{pathname:toPathname,search="",hash=""}=typeof to=="string"?parsePath2(to):to;return{pathname:toPathname?toPathname.startsWith("/")?toPathname:resolvePathname(toPathname,fromPathname):fromPathname,search:normalizeSearch(search),hash:normalizeHash(hash)}}function resolvePathname(relativePath,fromPathname){let segments=fromPathname.replace(/\/+$/,"").split("/");return relativePath.split("/").forEach(segment=>{segment===".."?segments.length>1&&segments.pop():segment!=="."&&segments.push(segment)}),segments.length>1?segments.join("/"):"/"}function resolveTo(toArg,routePathnames,locationPathname){let to=typeof toArg=="string"?parsePath2(toArg):toArg,toPathname=toArg===""||to.pathname===""?"/":to.pathname,from;if(toPathname==null)from=locationPathname;else{let routePathnameIndex=routePathnames.length-1;if(toPathname.startsWith("..")){let toSegments=toPathname.split("/");for(;toSegments[0]==="..";)toSegments.shift(),routePathnameIndex-=1;to.pathname=toSegments.join("/")}from=routePathnameIndex>=0?routePathnames[routePathnameIndex]:"/"}let path=resolvePath(to,from);return toPathname&&toPathname!=="/"&&toPathname.endsWith("/")&&!path.pathname.endsWith("/")&&(path.pathname+="/"),path}function getToPathname(to){return to===""||to.pathname===""?"/":typeof to=="string"?parsePath2(to).pathname:to.pathname}function stripBasename(pathname,basename){if(basename==="/")return pathname;if(!pathname.toLowerCase().startsWith(basename.toLowerCase()))return null;let nextChar=pathname.charAt(basename.length);return nextChar&&nextChar!=="/"?null:pathname.slice(basename.length)||"/"}var joinPaths=paths=>paths.join("/").replace(/\/\/+/g,"/"),normalizePathname=pathname=>pathname.replace(/\/+$/,"").replace(/^\/*/,"/"),normalizeSearch=search=>!search||search==="?"?"":search.startsWith("?")?search:"?"+search,normalizeHash=hash=>!hash||hash==="#"?"":hash.startsWith("#")?hash:"#"+hash;function _extends2(){return _extends2=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)Object.prototype.hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target},_extends2.apply(this,arguments)}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={},sourceKeys=Object.keys(source),key,i;for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],!(excluded.indexOf(key)>=0)&&(target[key]=source[key]);return target}var _excluded=["onClick","reloadDocument","replace","state","target","to"],_excluded2=["aria-current","caseSensitive","className","end","style","to"];function BrowserRouter(_ref){let{basename,children,window:window2}=_ref,historyRef=(0,import_react2.useRef)();historyRef.current==null&&(historyRef.current=createBrowserHistory({window:window2}));let history=historyRef.current,[state,setState]=(0,import_react2.useState)({action:history.action,location:history.location});return(0,import_react2.useLayoutEffect)(()=>history.listen(setState),[history]),(0,import_react2.createElement)(Router,{basename,children,location:state.location,navigationType:state.action,navigator:history})}function isModifiedEvent(event){return!!(event.metaKey||event.altKey||event.ctrlKey||event.shiftKey)}var Link=(0,import_react2.forwardRef)(function(_ref3,ref){let{onClick,reloadDocument,replace=!1,state,target,to}=_ref3,rest=_objectWithoutPropertiesLoose(_ref3,_excluded),href=useHref(to),internalOnClick=useLinkClickHandler(to,{replace,state,target});function handleClick(event){onClick&&onClick(event),!event.defaultPrevented&&!reloadDocument&&internalOnClick(event)}return(0,import_react2.createElement)("a",_extends2({},rest,{href,onClick:handleClick,ref,target}))});process.env.NODE_ENV!=="production"&&(Link.displayName="Link");var NavLink=(0,import_react2.forwardRef)(function(_ref4,ref){let{"aria-current":ariaCurrentProp="page",caseSensitive=!1,className:classNameProp="",end=!1,style:styleProp,to}=_ref4,rest=_objectWithoutPropertiesLoose(_ref4,_excluded2),location=useLocation(),path=useResolvedPath(to),locationPathname=location.pathname,toPathname=path.pathname;caseSensitive||(locationPathname=locationPathname.toLowerCase(),toPathname=toPathname.toLowerCase());let isActive=locationPathname===toPathname||!end&&locationPathname.startsWith(toPathname)&&locationPathname.charAt(toPathname.length)==="/",ariaCurrent=isActive?ariaCurrentProp:void 0,className;typeof classNameProp=="function"?className=classNameProp({isActive}):className=[classNameProp,isActive?"active":null].filter(Boolean).join(" ");let style=typeof styleProp=="function"?styleProp({isActive}):styleProp;return(0,import_react2.createElement)(Link,_extends2({},rest,{"aria-current":ariaCurrent,className,ref,style,to}))});process.env.NODE_ENV!=="production"&&(NavLink.displayName="NavLink");function useLinkClickHandler(to,_temp){let{target,replace:replaceProp,state}=_temp===void 0?{}:_temp,navigate=useNavigate(),location=useLocation(),path=useResolvedPath(to);return(0,import_react2.useCallback)(event=>{if(event.button===0&&(!target||target==="_self")&&!isModifiedEvent(event)){event.preventDefault();let replace=!!replaceProp||createPath(location)===createPath(path);navigate(to,{replace,state})}},[location,navigate,path,replaceProp,state,target,to])}var import_react3=__toESM(require("react")),ToggleVisibility=({hidden,children})=>import_react3.default.createElement("div",{hidden},children);var{document:document2}=scope,getBase=()=>`${document2.location.pathname}?`,useNavigate2=()=>{let navigate=useNavigate();return(0,import_react4.useCallback)((to,{plain,...options}={})=>{if(typeof to=="string"&&to.startsWith("#")){document2.location.hash=to;return}if(typeof to=="string"){let target=plain?to:`?path=${to}`;return navigate(target,options)}if(typeof to=="number")return navigate(to)},[])},Link2=({to,children,...rest})=>import_react4.default.createElement(Link,{to:`${getBase()}path=${to}`,...rest},children);Link2.displayName="QueryLink";var Location=({children})=>{let location=useLocation(),{path,singleStory}=queryFromString(location.search),{viewMode,storyId,refId}=parsePath(path);return import_react4.default.createElement(import_react4.default.Fragment,null,children({path:path||"/",location,viewMode,storyId,refId,singleStory:singleStory==="true"}))};Location.displayName="QueryLocation";function Match({children,path:targetPath,startsWith=!1}){return import_react4.default.createElement(Location,null,({path:urlPath,...rest})=>children({match:getMatch(urlPath,targetPath,startsWith),...rest}))}Match.displayName="QueryMatch";function Route2(input){let{children,hideOnly,...rest}=input;return rest.startsWith===void 0&&(rest.startsWith=!1),import_react4.default.createElement(Match,{...rest},({match})=>hideOnly?import_react4.default.createElement(ToggleVisibility,{hidden:!match},children):match?children:null)}Route2.displayName="Route";var LocationProvider=(...args)=>BrowserRouter(...args),BaseLocationProvider=(...args)=>Router(...args);0&&(module.exports={BaseLocationProvider,DEEPLY_EQUAL,Link,Location,LocationProvider,Match,Route,buildArgsParam,deepDiff,getMatch,parsePath,queryFromLocation,queryFromString,stringifyQuery,useNavigate});

@@ -1,2 +0,2 @@

"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var require_freeGlobal=__commonJS({"../../node_modules/lodash/_freeGlobal.js"(exports2,module2){"use strict";var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;module2.exports=freeGlobal}});var require_root=__commonJS({"../../node_modules/lodash/_root.js"(exports2,module2){"use strict";var freeGlobal=require_freeGlobal(),freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();module2.exports=root}});var require_Symbol=__commonJS({"../../node_modules/lodash/_Symbol.js"(exports2,module2){"use strict";var root=require_root(),Symbol2=root.Symbol;module2.exports=Symbol2}});var require_getRawTag=__commonJS({"../../node_modules/lodash/_getRawTag.js"(exports2,module2){"use strict";var Symbol2=require_Symbol(),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=Symbol2?Symbol2.toStringTag:void 0;function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=void 0;var unmasked=!0}catch{}var result=nativeObjectToString.call(value);return unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]),result}module2.exports=getRawTag}});var require_objectToString=__commonJS({"../../node_modules/lodash/_objectToString.js"(exports2,module2){"use strict";var objectProto=Object.prototype,nativeObjectToString=objectProto.toString;function objectToString(value){return nativeObjectToString.call(value)}module2.exports=objectToString}});var require_baseGetTag=__commonJS({"../../node_modules/lodash/_baseGetTag.js"(exports2,module2){"use strict";var Symbol2=require_Symbol(),getRawTag=require_getRawTag(),objectToString=require_objectToString(),nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol2?Symbol2.toStringTag:void 0;function baseGetTag(value){return value==null?value===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}module2.exports=baseGetTag}});var require_overArg=__commonJS({"../../node_modules/lodash/_overArg.js"(exports2,module2){"use strict";function overArg(func,transform){return function(arg){return func(transform(arg))}}module2.exports=overArg}});var require_getPrototype=__commonJS({"../../node_modules/lodash/_getPrototype.js"(exports2,module2){"use strict";var overArg=require_overArg(),getPrototype=overArg(Object.getPrototypeOf,Object);module2.exports=getPrototype}});var require_isObjectLike=__commonJS({"../../node_modules/lodash/isObjectLike.js"(exports2,module2){"use strict";function isObjectLike(value){return value!=null&&typeof value=="object"}module2.exports=isObjectLike}});var require_isPlainObject=__commonJS({"../../node_modules/lodash/isPlainObject.js"(exports2,module2){"use strict";var baseGetTag=require_baseGetTag(),getPrototype=require_getPrototype(),isObjectLike=require_isObjectLike(),objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject2(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag)return!1;var proto=getPrototype(value);if(proto===null)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return typeof Ctor=="function"&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}module2.exports=isPlainObject2}});var utils_exports={};__export(utils_exports,{DEEPLY_EQUAL:()=>DEEPLY_EQUAL,buildArgsParam:()=>buildArgsParam,deepDiff:()=>deepDiff,getMatch:()=>getMatch,parsePath:()=>parsePath,queryFromLocation:()=>queryFromLocation,queryFromString:()=>queryFromString,stringifyQuery:()=>stringifyQuery});module.exports=__toCommonJS(utils_exports);var import_client_logger=require("@storybook/client-logger");var has=Object.prototype.hasOwnProperty;function find(iter,tar,key){for(key of iter.keys())if(dequal(key,tar))return key}function dequal(foo,bar){var ctor,len,tmp;if(foo===bar)return!0;if(foo&&bar&&(ctor=foo.constructor)===bar.constructor){if(ctor===Date)return foo.getTime()===bar.getTime();if(ctor===RegExp)return foo.toString()===bar.toString();if(ctor===Array){if((len=foo.length)===bar.length)for(;len--&&dequal(foo[len],bar[len]););return len===-1}if(ctor===Set){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len,tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!bar.has(tmp))return!1;return!0}if(ctor===Map){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len[0],tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!dequal(len[1],bar.get(tmp)))return!1;return!0}if(ctor===ArrayBuffer)foo=new Uint8Array(foo),bar=new Uint8Array(bar);else if(ctor===DataView){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo.getInt8(len)===bar.getInt8(len););return len===-1}if(ArrayBuffer.isView(foo)){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo[len]===bar[len];);return len===-1}if(!ctor||typeof foo=="object"){len=0;for(ctor in foo)if(has.call(foo,ctor)&&++len&&!has.call(bar,ctor)||!(ctor in bar)||!dequal(foo[ctor],bar[ctor]))return!1;return Object.keys(bar).length===len}}return foo!==foo&&bar!==bar}var import_isPlainObject=__toESM(require_isPlainObject()),import_memoizerific=__toESM(require("memoizerific")),import_qs=__toESM(require("qs"));function dedent(templ){for(var values=[],_i=1;_i<arguments.length;_i++)values[_i-1]=arguments[_i];var strings=Array.from(typeof templ=="string"?[templ]:templ);strings[strings.length-1]=strings[strings.length-1].replace(/\r?\n([\t ]*)$/,"");var indentLengths=strings.reduce(function(arr,str){var matches=str.match(/\n([\t ]+|(?!\s).)/g);return matches?arr.concat(matches.map(function(match){var _a,_b;return(_b=(_a=match.match(/[\t ]/g))===null||_a===void 0?void 0:_a.length)!==null&&_b!==void 0?_b:0})):arr},[]);if(indentLengths.length){var pattern_1=new RegExp(`
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var require_freeGlobal=__commonJS({"../../node_modules/lodash/_freeGlobal.js"(exports,module2){"use strict";var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;module2.exports=freeGlobal}});var require_root=__commonJS({"../../node_modules/lodash/_root.js"(exports,module2){"use strict";var freeGlobal=require_freeGlobal(),freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();module2.exports=root}});var require_Symbol=__commonJS({"../../node_modules/lodash/_Symbol.js"(exports,module2){"use strict";var root=require_root(),Symbol2=root.Symbol;module2.exports=Symbol2}});var require_getRawTag=__commonJS({"../../node_modules/lodash/_getRawTag.js"(exports,module2){"use strict";var Symbol2=require_Symbol(),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=Symbol2?Symbol2.toStringTag:void 0;function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=void 0;var unmasked=!0}catch{}var result=nativeObjectToString.call(value);return unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]),result}module2.exports=getRawTag}});var require_objectToString=__commonJS({"../../node_modules/lodash/_objectToString.js"(exports,module2){"use strict";var objectProto=Object.prototype,nativeObjectToString=objectProto.toString;function objectToString(value){return nativeObjectToString.call(value)}module2.exports=objectToString}});var require_baseGetTag=__commonJS({"../../node_modules/lodash/_baseGetTag.js"(exports,module2){"use strict";var Symbol2=require_Symbol(),getRawTag=require_getRawTag(),objectToString=require_objectToString(),nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol2?Symbol2.toStringTag:void 0;function baseGetTag(value){return value==null?value===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value)}module2.exports=baseGetTag}});var require_overArg=__commonJS({"../../node_modules/lodash/_overArg.js"(exports,module2){"use strict";function overArg(func,transform){return function(arg){return func(transform(arg))}}module2.exports=overArg}});var require_getPrototype=__commonJS({"../../node_modules/lodash/_getPrototype.js"(exports,module2){"use strict";var overArg=require_overArg(),getPrototype=overArg(Object.getPrototypeOf,Object);module2.exports=getPrototype}});var require_isObjectLike=__commonJS({"../../node_modules/lodash/isObjectLike.js"(exports,module2){"use strict";function isObjectLike(value){return value!=null&&typeof value=="object"}module2.exports=isObjectLike}});var require_isPlainObject=__commonJS({"../../node_modules/lodash/isPlainObject.js"(exports,module2){"use strict";var baseGetTag=require_baseGetTag(),getPrototype=require_getPrototype(),isObjectLike=require_isObjectLike(),objectTag="[object Object]",funcProto=Function.prototype,objectProto=Object.prototype,funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject2(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag)return!1;var proto=getPrototype(value);if(proto===null)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return typeof Ctor=="function"&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}module2.exports=isPlainObject2}});var utils_exports={};__export(utils_exports,{DEEPLY_EQUAL:()=>DEEPLY_EQUAL,buildArgsParam:()=>buildArgsParam,deepDiff:()=>deepDiff,getMatch:()=>getMatch,parsePath:()=>parsePath,queryFromLocation:()=>queryFromLocation,queryFromString:()=>queryFromString,stringifyQuery:()=>stringifyQuery});module.exports=__toCommonJS(utils_exports);var import_client_logger=require("@storybook/client-logger");var has=Object.prototype.hasOwnProperty;function find(iter,tar,key){for(key of iter.keys())if(dequal(key,tar))return key}function dequal(foo,bar){var ctor,len,tmp;if(foo===bar)return!0;if(foo&&bar&&(ctor=foo.constructor)===bar.constructor){if(ctor===Date)return foo.getTime()===bar.getTime();if(ctor===RegExp)return foo.toString()===bar.toString();if(ctor===Array){if((len=foo.length)===bar.length)for(;len--&&dequal(foo[len],bar[len]););return len===-1}if(ctor===Set){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len,tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!bar.has(tmp))return!1;return!0}if(ctor===Map){if(foo.size!==bar.size)return!1;for(len of foo)if(tmp=len[0],tmp&&typeof tmp=="object"&&(tmp=find(bar,tmp),!tmp)||!dequal(len[1],bar.get(tmp)))return!1;return!0}if(ctor===ArrayBuffer)foo=new Uint8Array(foo),bar=new Uint8Array(bar);else if(ctor===DataView){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo.getInt8(len)===bar.getInt8(len););return len===-1}if(ArrayBuffer.isView(foo)){if((len=foo.byteLength)===bar.byteLength)for(;len--&&foo[len]===bar[len];);return len===-1}if(!ctor||typeof foo=="object"){len=0;for(ctor in foo)if(has.call(foo,ctor)&&++len&&!has.call(bar,ctor)||!(ctor in bar)||!dequal(foo[ctor],bar[ctor]))return!1;return Object.keys(bar).length===len}}return foo!==foo&&bar!==bar}var import_isPlainObject=__toESM(require_isPlainObject()),import_memoizerific=__toESM(require("memoizerific")),import_qs=__toESM(require("qs"));function dedent(templ){for(var values=[],_i=1;_i<arguments.length;_i++)values[_i-1]=arguments[_i];var strings=Array.from(typeof templ=="string"?[templ]:templ);strings[strings.length-1]=strings[strings.length-1].replace(/\r?\n([\t ]*)$/,"");var indentLengths=strings.reduce(function(arr,str){var matches=str.match(/\n([\t ]+|(?!\s).)/g);return matches?arr.concat(matches.map(function(match){var _a,_b;return(_b=(_a=match.match(/[\t ]/g))===null||_a===void 0?void 0:_a.length)!==null&&_b!==void 0?_b:0})):arr},[]);if(indentLengths.length){var pattern_1=new RegExp(`
[ ]{`+Math.min.apply(Math,indentLengths)+"}","g");strings=strings.map(function(str){return str.replace(pattern_1,`

@@ -6,3 +6,3 @@ `)})}strings[0]=strings[0].replace(/^\r?\n/,"");var string=strings[0];return values.forEach(function(value,i){var endentations=string.match(/(?:^|\n)( *)$/),endentation=endentations?endentations[1]:"",indentedValue=value;typeof value=="string"&&value.includes(`

`).map(function(str,i2){return i2===0?str:""+endentation+str}).join(`
`)),string+=indentedValue+strings[i+1]}),string}var splitPathRegex=/\/([^/]+)\/(?:(.*)_)?([^/]+)?/,parsePath=(0,import_memoizerific.default)(1e3)(path=>{let result={viewMode:void 0,storyId:void 0,refId:void 0};if(path){let[,viewMode,refId,storyId]=path.toLowerCase().match(splitPathRegex)||[];viewMode&&Object.assign(result,{viewMode,storyId,refId})}return result}),DEEPLY_EQUAL=Symbol("Deeply equal"),deepDiff=(value,update)=>{if(typeof value!=typeof update)return update;if(dequal(value,update))return DEEPLY_EQUAL;if(Array.isArray(value)&&Array.isArray(update)){let res=update.reduce((acc,upd,index)=>{let diff=deepDiff(value[index],upd);return diff!==DEEPLY_EQUAL&&(acc[index]=diff),acc},new Array(update.length));return update.length>=value.length?res:res.concat(new Array(value.length-update.length).fill(void 0))}return(0,import_isPlainObject.default)(value)&&(0,import_isPlainObject.default)(update)?Object.keys({...value,...update}).reduce((acc,key)=>{let diff=deepDiff(value?.[key],update?.[key]);return diff===DEEPLY_EQUAL?acc:Object.assign(acc,{[key]:diff})},{}):update},VALIDATION_REGEXP=/^[a-zA-Z0-9 _-]*$/,NUMBER_REGEXP=/^-?[0-9]+(\.[0-9]+)?$/,HEX_REGEXP=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,COLOR_REGEXP=/^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,validateArgs=(key="",value)=>key===null||key===""||!VALIDATION_REGEXP.test(key)?!1:value==null||value instanceof Date||typeof value=="number"||typeof value=="boolean"?!0:typeof value=="string"?VALIDATION_REGEXP.test(value)||NUMBER_REGEXP.test(value)||HEX_REGEXP.test(value)||COLOR_REGEXP.test(value):Array.isArray(value)?value.every(v=>validateArgs(key,v)):(0,import_isPlainObject.default)(value)?Object.entries(value).every(([k,v])=>validateArgs(k,v)):!1,encodeSpecialValues=value=>value===void 0?"!undefined":value===null?"!null":typeof value=="string"?HEX_REGEXP.test(value)?`!hex(${value.slice(1)})`:COLOR_REGEXP.test(value)?`!${value.replace(/[\s%]/g,"")}`:value:typeof value=="boolean"?`!${value}`:Array.isArray(value)?value.map(encodeSpecialValues):(0,import_isPlainObject.default)(value)?Object.entries(value).reduce((acc,[key,val])=>Object.assign(acc,{[key]:encodeSpecialValues(val)}),{}):value,QS_OPTIONS={encode:!1,delimiter:";",allowDots:!0,format:"RFC1738",serializeDate:date=>`!date(${date.toISOString()})`},buildArgsParam=(initialArgs,args)=>{let update=deepDiff(initialArgs,args);if(!update||update===DEEPLY_EQUAL)return"";let object=Object.entries(update).reduce((acc,[key,value])=>validateArgs(key,value)?Object.assign(acc,{[key]:value}):(import_client_logger.once.warn(dedent`
`)),string+=indentedValue+strings[i+1]}),string}var splitPathRegex=/\/([^/]+)\/(?:(.*)_)?([^/]+)?/,parsePath=(0,import_memoizerific.default)(1e3)(path=>{let result={viewMode:void 0,storyId:void 0,refId:void 0};if(path){let[,viewMode,refId,storyId]=path.toLowerCase().match(splitPathRegex)||[];viewMode&&Object.assign(result,{viewMode,storyId,refId})}return result}),DEEPLY_EQUAL=Symbol("Deeply equal"),deepDiff=(value,update)=>{if(typeof value!=typeof update)return update;if(dequal(value,update))return DEEPLY_EQUAL;if(Array.isArray(value)&&Array.isArray(update)){let res=update.reduce((acc,upd,index)=>{let diff=deepDiff(value[index],upd);return diff!==DEEPLY_EQUAL&&(acc[index]=diff),acc},new Array(update.length));return update.length>=value.length?res:res.concat(new Array(value.length-update.length).fill(void 0))}return(0,import_isPlainObject.default)(value)&&(0,import_isPlainObject.default)(update)?Object.keys({...value,...update}).reduce((acc,key)=>{let diff=deepDiff(value==null?void 0:value[key],update==null?void 0:update[key]);return diff===DEEPLY_EQUAL?acc:Object.assign(acc,{[key]:diff})},{}):update},VALIDATION_REGEXP=/^[a-zA-Z0-9 _-]*$/,NUMBER_REGEXP=/^-?[0-9]+(\.[0-9]+)?$/,HEX_REGEXP=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,COLOR_REGEXP=/^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,validateArgs=(key="",value)=>key===null||key===""||!VALIDATION_REGEXP.test(key)?!1:value==null||value instanceof Date||typeof value=="number"||typeof value=="boolean"?!0:typeof value=="string"?VALIDATION_REGEXP.test(value)||NUMBER_REGEXP.test(value)||HEX_REGEXP.test(value)||COLOR_REGEXP.test(value):Array.isArray(value)?value.every(v=>validateArgs(key,v)):(0,import_isPlainObject.default)(value)?Object.entries(value).every(([k,v])=>validateArgs(k,v)):!1,encodeSpecialValues=value=>value===void 0?"!undefined":value===null?"!null":typeof value=="string"?HEX_REGEXP.test(value)?`!hex(${value.slice(1)})`:COLOR_REGEXP.test(value)?`!${value.replace(/[\s%]/g,"")}`:value:typeof value=="boolean"?`!${value}`:Array.isArray(value)?value.map(encodeSpecialValues):(0,import_isPlainObject.default)(value)?Object.entries(value).reduce((acc,[key,val])=>Object.assign(acc,{[key]:encodeSpecialValues(val)}),{}):value,QS_OPTIONS={encode:!1,delimiter:";",allowDots:!0,format:"RFC1738",serializeDate:date=>`!date(${date.toISOString()})`},buildArgsParam=(initialArgs,args)=>{let update=deepDiff(initialArgs,args);if(!update||update===DEEPLY_EQUAL)return"";let object=Object.entries(update).reduce((acc,[key,value])=>validateArgs(key,value)?Object.assign(acc,{[key]:value}):(import_client_logger.once.warn(dedent`
Omitted potentially unsafe URL args.

@@ -9,0 +9,0 @@

{
"name": "@storybook/router",
"version": "0.0.0-pr-26886-sha-b094da7b",
"version": "0.0.0-pr-26923-sha-300a6ba8",
"description": "Core Storybook Router",

@@ -52,3 +52,3 @@ "keywords": [

"dependencies": {
"@storybook/client-logger": "0.0.0-pr-26886-sha-b094da7b",
"@storybook/client-logger": "0.0.0-pr-26923-sha-300a6ba8",
"memoizerific": "^1.11.3",

@@ -61,7 +61,7 @@ "qs": "^6.10.0"

"lodash": "^4.17.21",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^16.8.0",
"react-dom": "^16.8.0",
"react-router-dom": "6.0.2",
"ts-dedent": "^2.0.0",
"typescript": "^5.3.2"
"typescript": "~4.9.3"
},

@@ -68,0 +68,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc