@storybook/addon-onboarding 0.0.0-pr-26827-sha-9b2b60fc → 0.0.0-pr-27008-sha-307d4fb3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/preset.js +2 -2
  2. package/package.json +10 -10
package/dist/preset.js CHANGED
@@ -521,7 +521,7 @@ ${rootStack}`,err}}}}});var require_lib19=__commonJS({"../../node_modules/@babel
521
521
 
522
522
  return FUNCTION_ID;
523
523
  })(FUNCTION)
524
- `),visitor={"ReferencedIdentifier|BindingIdentifier"(path14,state){path14.node.name!==state.name||path14.scope.getBindingIdentifier(state.name)!==state.outerDeclar||(state.selfReference=!0,path14.stop());}};function getNameFromLiteralId(id2){return isNullLiteral(id2)?"null":isRegExpLiteral(id2)?`_${id2.pattern}_${id2.flags}`:isTemplateLiteral(id2)?id2.quasis.map(quasi=>quasi.value.raw).join(""):id2.value!==void 0?id2.value+"":""}function wrap(state,method,id2,scope){if(state.selfReference)if(scope.hasBinding(id2.name)&&!scope.hasGlobal(id2.name))scope.rename(id2.name);else {if(!isFunction(method))return;let build=buildPropertyMethodAssignmentWrapper;method.generator&&(build=buildGeneratorPropertyMethodAssignmentWrapper);let template=build({FUNCTION:method,FUNCTION_ID:id2,FUNCTION_KEY:scope.generateUidIdentifier(id2.name)}).expression,params=template.callee.body.body[0].params;for(let i3=0,len=getFunctionArity(method);i3<len;i3++)params.push(scope.generateUidIdentifier("x"));return template}method.id=id2,scope.getProgramParent().references[id2.name]=!0;}function visit(node,name,scope){let state={selfAssignment:!1,selfReference:!1,outerDeclar:scope.getBindingIdentifier(name),name},binding=scope.getOwnBinding(name);return binding?binding.kind==="param"&&(state.selfReference=!0):(state.outerDeclar||scope.hasGlobal(name))&&scope.traverse(node,visitor,state),state}function _default2({node,parent,scope,id:id2},localBinding=!1,supportUnicodeId=!1){if(node.id)return;if((isObjectProperty(parent)||isObjectMethod(parent,{kind:"method"}))&&(!parent.computed||isLiteral(parent.key)))id2=parent.key;else if(isVariableDeclarator(parent)){if(id2=parent.id,isIdentifier(id2)&&!localBinding){let binding=scope.parent.getBinding(id2.name);if(binding&&binding.constant&&scope.getBinding(id2.name)===binding){node.id=cloneNode(id2),node.id[NOT_LOCAL_BINDING]=!0;return}}}else if(isAssignmentExpression(parent,{operator:"="}))id2=parent.left;else if(!id2)return;let name;if(id2&&isLiteral(id2)?name=getNameFromLiteralId(id2):id2&&isIdentifier(id2)&&(name=id2.name),name===void 0||!supportUnicodeId&&isFunction(node)&&/[\uD800-\uDFFF]/.test(name))return;name=toBindingIdentifierName(name);let newId=identifier(name);newId[NOT_LOCAL_BINDING]=!0;let state=visit(node,name,scope);return wrap(state,node,newId,scope)||node}}});var require_conversion=__commonJS({"../../node_modules/@babel/traverse/lib/path/conversion.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.arrowFunctionToExpression=arrowFunctionToExpression;exports.ensureBlock=ensureBlock;exports.toComputedKey=toComputedKey;exports.unwrapFunctionEnvironment=unwrapFunctionEnvironment;var _t14=require_lib13(),_helperEnvironmentVisitor=require_lib16(),_helperFunctionName=require_lib20(),_visitors=require_visitors(),{arrowFunctionExpression,assignmentExpression,binaryExpression,blockStatement,callExpression,conditionalExpression,expressionStatement,identifier,isIdentifier,jsxIdentifier,logicalExpression,LOGICAL_OPERATORS,memberExpression,metaProperty,numericLiteral,objectExpression,restElement,returnStatement,sequenceExpression,spreadElement,stringLiteral,super:_super,thisExpression,toExpression,unaryExpression}=_t14;function toComputedKey(){let key2;if(this.isMemberExpression())key2=this.node.property;else if(this.isProperty()||this.isMethod())key2=this.node.key;else throw new ReferenceError("todo");return this.node.computed||isIdentifier(key2)&&(key2=stringLiteral(key2.name)),key2}function ensureBlock(){let body=this.get("body"),bodyNode=body.node;if(Array.isArray(body))throw new Error("Can't convert array path to a block statement");if(!bodyNode)throw new Error("Can't convert node without a body");if(body.isBlockStatement())return bodyNode;let statements=[],stringPath="body",key2,listKey;body.isStatement()?(listKey="body",key2=0,statements.push(body.node)):(stringPath+=".body.0",this.isFunction()?(key2="argument",statements.push(returnStatement(body.node))):(key2="expression",statements.push(expressionStatement(body.node)))),this.node.body=blockStatement(statements);let parentPath=this.get(stringPath);return body.setup(parentPath,listKey?parentPath.node[listKey]:parentPath.node,listKey,key2),this.node}exports.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression();};function unwrapFunctionEnvironment(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");hoistFunctionEnvironment(this);}function setType(path14,type2){path14.node.type=type2;}function arrowFunctionToExpression({allowInsertArrow=!0,allowInsertArrowWithRest=allowInsertArrow,noNewArrows=!(_arguments$=>(_arguments$=arguments[0])==null?void 0:_arguments$.specCompliant)()}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");let{thisBinding,fnPath:fn11}=hoistFunctionEnvironment(this,noNewArrows,allowInsertArrow,allowInsertArrowWithRest);if(fn11.ensureBlock(),setType(fn11,"FunctionExpression"),!noNewArrows){let checkBinding=thisBinding?null:fn11.scope.generateUidIdentifier("arrowCheckId");return checkBinding&&fn11.parentPath.scope.push({id:checkBinding,init:objectExpression([])}),fn11.get("body").unshiftContainer("body",expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"),[thisExpression(),identifier(checkBinding?checkBinding.name:thisBinding)]))),fn11.replaceWith(callExpression(memberExpression((0, _helperFunctionName.default)(this,!0)||fn11.node,identifier("bind")),[checkBinding?identifier(checkBinding.name):thisExpression()])),fn11.get("callee.object")}return fn11}var getSuperCallsVisitor=(0, _visitors.merge)([{CallExpression(child,{allSuperCalls}){child.get("callee").isSuper()&&allSuperCalls.push(child);}},_helperEnvironmentVisitor.default]);function hoistFunctionEnvironment(fnPath,noNewArrows=!0,allowInsertArrow=!0,allowInsertArrowWithRest=!0){let arrowParent,thisEnvFn=fnPath.findParent(p7=>{if(p7.isArrowFunctionExpression()){return (arrowParent)!=null||(arrowParent=p7),!1}return p7.isFunction()||p7.isProgram()||p7.isClassProperty({static:!1})||p7.isClassPrivateProperty({static:!1})}),inConstructor=thisEnvFn.isClassMethod({kind:"constructor"});if(thisEnvFn.isClassProperty()||thisEnvFn.isClassPrivateProperty())if(arrowParent)thisEnvFn=arrowParent;else if(allowInsertArrow)fnPath.replaceWith(callExpression(arrowFunctionExpression([],toExpression(fnPath.node)),[])),thisEnvFn=fnPath.get("callee"),fnPath=thisEnvFn.get("body");else throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");let{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}=getScopeInformation(fnPath);if(inConstructor&&superCalls.length>0){if(!allowInsertArrow)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!allowInsertArrowWithRest)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");let allSuperCalls=[];thisEnvFn.traverse(getSuperCallsVisitor,{allSuperCalls});let superBinding=getSuperBinding(thisEnvFn);allSuperCalls.forEach(superCall=>{let callee=identifier(superBinding);callee.loc=superCall.node.callee.loc,superCall.get("callee").replaceWith(callee);});}if(argumentsPaths.length>0){let argumentsBinding=getBinding(thisEnvFn,"arguments",()=>{let args=()=>identifier("arguments");return thisEnvFn.scope.path.isProgram()?conditionalExpression(binaryExpression("===",unaryExpression("typeof",args()),stringLiteral("undefined")),thisEnvFn.scope.buildUndefinedNode(),args()):args()});argumentsPaths.forEach(argumentsChild=>{let argsRef=identifier(argumentsBinding);argsRef.loc=argumentsChild.node.loc,argumentsChild.replaceWith(argsRef);});}if(newTargetPaths.length>0){let newTargetBinding=getBinding(thisEnvFn,"newtarget",()=>metaProperty(identifier("new"),identifier("target")));newTargetPaths.forEach(targetChild=>{let targetRef=identifier(newTargetBinding);targetRef.loc=targetChild.node.loc,targetChild.replaceWith(targetRef);});}if(superProps.length>0){if(!allowInsertArrow)throw superProps[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");superProps.reduce((acc,superProp)=>acc.concat(standardizeSuperProperty(superProp)),[]).forEach(superProp=>{let key2=superProp.node.computed?"":superProp.get("property").node.name,superParentPath=superProp.parentPath,isAssignment=superParentPath.isAssignmentExpression({left:superProp.node}),isCall=superParentPath.isCallExpression({callee:superProp.node}),isTaggedTemplate=superParentPath.isTaggedTemplateExpression({tag:superProp.node}),superBinding=getSuperPropBinding(thisEnvFn,isAssignment,key2),args=[];if(superProp.node.computed&&args.push(superProp.get("property").node),isAssignment){let value=superParentPath.node.right;args.push(value);}let call=callExpression(identifier(superBinding),args);isCall?(superParentPath.unshiftContainer("arguments",thisExpression()),superProp.replaceWith(memberExpression(call,identifier("call"))),thisPaths.push(superParentPath.get("arguments.0"))):isAssignment?superParentPath.replaceWith(call):isTaggedTemplate?(superProp.replaceWith(callExpression(memberExpression(call,identifier("bind"),!1),[thisExpression()])),thisPaths.push(superProp.get("arguments.0"))):superProp.replaceWith(call);});}let thisBinding;return (thisPaths.length>0||!noNewArrows)&&(thisBinding=getThisBinding(thisEnvFn,inConstructor),(noNewArrows||inConstructor&&hasSuperClass(thisEnvFn))&&(thisPaths.forEach(thisChild=>{let thisRef=thisChild.isJSX()?jsxIdentifier(thisBinding):identifier(thisBinding);thisRef.loc=thisChild.node.loc,thisChild.replaceWith(thisRef);}),noNewArrows||(thisBinding=null))),{thisBinding,fnPath}}function isLogicalOp(op3){return LOGICAL_OPERATORS.includes(op3)}function standardizeSuperProperty(superProp){if(superProp.parentPath.isAssignmentExpression()&&superProp.parentPath.node.operator!=="="){let assignmentPath=superProp.parentPath,op3=assignmentPath.node.operator.slice(0,-1),value=assignmentPath.node.right,isLogicalAssignment=isLogicalOp(op3);if(superProp.node.computed){let tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,assignmentExpression("=",tmp,property),!0)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op3,memberExpression(object,identifier(tmp.name),!0),value));}else {let object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,property)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op3,memberExpression(object,identifier(property.name)),value));}return isLogicalAssignment?assignmentPath.replaceWith(logicalExpression(op3,assignmentPath.node.left,assignmentPath.node.right)):assignmentPath.node.operator="=",[assignmentPath.get("left"),assignmentPath.get("right").get("left")]}else if(superProp.parentPath.isUpdateExpression()){let updateExpr=superProp.parentPath,tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),computedKey=superProp.node.computed?superProp.scope.generateDeclaredUidIdentifier("prop"):null,parts=[assignmentExpression("=",tmp,memberExpression(superProp.node.object,computedKey?assignmentExpression("=",computedKey,superProp.node.property):superProp.node.property,superProp.node.computed)),assignmentExpression("=",memberExpression(superProp.node.object,computedKey?identifier(computedKey.name):superProp.node.property,superProp.node.computed),binaryExpression(superProp.parentPath.node.operator[0],identifier(tmp.name),numericLiteral(1)))];superProp.parentPath.node.prefix||parts.push(identifier(tmp.name)),updateExpr.replaceWith(sequenceExpression(parts));let left=updateExpr.get("expressions.0.right"),right=updateExpr.get("expressions.1.left");return [left,right]}return [superProp];function rightExpression(op3,left,right){return op3==="="?assignmentExpression("=",left,right):binaryExpression(op3,left,right)}}function hasSuperClass(thisEnvFn){return thisEnvFn.isClassMethod()&&!!thisEnvFn.parentPath.parentPath.node.superClass}var assignSuperThisVisitor=(0, _visitors.merge)([{CallExpression(child,{supers,thisBinding}){child.get("callee").isSuper()&&(supers.has(child.node)||(supers.add(child.node),child.replaceWithMultiple([child.node,assignmentExpression("=",identifier(thisBinding),identifier("this"))])));}},_helperEnvironmentVisitor.default]);function getThisBinding(thisEnvFn,inConstructor){return getBinding(thisEnvFn,"this",thisBinding=>{if(!inConstructor||!hasSuperClass(thisEnvFn))return thisExpression();thisEnvFn.traverse(assignSuperThisVisitor,{supers:new WeakSet,thisBinding});})}function getSuperBinding(thisEnvFn){return getBinding(thisEnvFn,"supercall",()=>{let argsBinding=thisEnvFn.scope.generateUidIdentifier("args");return arrowFunctionExpression([restElement(argsBinding)],callExpression(_super(),[spreadElement(identifier(argsBinding.name))]))})}function getSuperPropBinding(thisEnvFn,isAssignment,propName){return getBinding(thisEnvFn,`superprop_${isAssignment?"set":"get"}:${propName||""}`,()=>{let argsList=[],fnBody;if(propName)fnBody=memberExpression(_super(),identifier(propName));else {let method=thisEnvFn.scope.generateUidIdentifier("prop");argsList.unshift(method),fnBody=memberExpression(_super(),identifier(method.name),!0);}if(isAssignment){let valueIdent=thisEnvFn.scope.generateUidIdentifier("value");argsList.push(valueIdent),fnBody=assignmentExpression("=",fnBody,identifier(valueIdent.name));}return arrowFunctionExpression(argsList,fnBody)})}function getBinding(thisEnvFn,key2,init){let cacheKey="binding:"+key2,data=thisEnvFn.getData(cacheKey);if(!data){let id2=thisEnvFn.scope.generateUidIdentifier(key2);data=id2.name,thisEnvFn.setData(cacheKey,data),thisEnvFn.scope.push({id:id2,init:init(data)});}return data}var getScopeInformationVisitor=(0, _visitors.merge)([{ThisExpression(child,{thisPaths}){thisPaths.push(child);},JSXIdentifier(child,{thisPaths}){child.node.name==="this"&&(!child.parentPath.isJSXMemberExpression({object:child.node})&&!child.parentPath.isJSXOpeningElement({name:child.node})||thisPaths.push(child));},CallExpression(child,{superCalls}){child.get("callee").isSuper()&&superCalls.push(child);},MemberExpression(child,{superProps}){child.get("object").isSuper()&&superProps.push(child);},Identifier(child,{argumentsPaths}){if(!child.isReferencedIdentifier({name:"arguments"}))return;let curr=child.scope;do{if(curr.hasOwnBinding("arguments")){curr.rename("arguments");return}if(curr.path.isFunction()&&!curr.path.isArrowFunctionExpression())break}while(curr=curr.parent);argumentsPaths.push(child);},MetaProperty(child,{newTargetPaths}){child.get("meta").isIdentifier({name:"new"})&&child.get("property").isIdentifier({name:"target"})&&newTargetPaths.push(child);}},_helperEnvironmentVisitor.default]);function getScopeInformation(fnPath){let thisPaths=[],argumentsPaths=[],newTargetPaths=[],superProps=[],superCalls=[];return fnPath.traverse(getScopeInformationVisitor,{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}),{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}}}});var require_introspection=__commonJS({"../../node_modules/@babel/traverse/lib/path/introspection.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports._resolve=_resolve;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.canSwapBetweenExpressionAndStatement=canSwapBetweenExpressionAndStatement;exports.equals=equals;exports.getSource=getSource;exports.has=has;exports.is=void 0;exports.isCompletionRecord=isCompletionRecord;exports.isConstantExpression=isConstantExpression;exports.isInStrictMode=isInStrictMode;exports.isNodeType=isNodeType;exports.isStatementOrBlock=isStatementOrBlock;exports.isStatic=isStatic;exports.isnt=isnt;exports.matchesPattern=matchesPattern;exports.referencesImport=referencesImport;exports.resolve=resolve4;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;var _t14=require_lib13(),{STATEMENT_OR_BLOCK_KEYS,VISITOR_KEYS,isBlockStatement,isExpression,isIdentifier,isLiteral,isStringLiteral,isType,matchesPattern:_matchesPattern}=_t14;function matchesPattern(pattern,allowPartial){return _matchesPattern(this.node,pattern,allowPartial)}function has(key2){let val=this.node&&this.node[key2];return val&&Array.isArray(val)?!!val.length:!!val}function isStatic(){return this.scope.isStatic(this.node)}exports.is=has;function isnt(key2){return !this.has(key2)}function equals(key2,value){return this.node[key2]===value}function isNodeType(type2){return isType(this.type,type2)}function canHaveVariableDeclarationOrExpression(){return (this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function canSwapBetweenExpressionAndStatement(replacement){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?isBlockStatement(replacement):this.isBlockStatement()?isExpression(replacement):!1}function isCompletionRecord(allowInsideFunction){let path14=this,first=!0;do{let{type:type2,container}=path14;if(!first&&(path14.isFunction()||type2==="StaticBlock"))return !!allowInsideFunction;if(first=!1,Array.isArray(container)&&path14.key!==container.length-1)return !1}while((path14=path14.parentPath)&&!path14.isProgram()&&!path14.isDoExpression());return !0}function isStatementOrBlock(){return this.parentPath.isLabeledStatement()||isBlockStatement(this.container)?!1:STATEMENT_OR_BLOCK_KEYS.includes(this.key)}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===importName||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?isStringLiteral(this.node.property,{value:importName}):this.node.property.name===importName)){let object=this.get("object");return object.isReferencedIdentifier()&&object.referencesImport(moduleSource,"*")}return !1}let binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return !1;let path14=binding.path,parent=path14.parentPath;if(!parent.isImportDeclaration())return !1;if(parent.node.source.value===moduleSource){if(!importName)return !0}else return !1;return !!(path14.isImportDefaultSpecifier()&&importName==="default"||path14.isImportNamespaceSpecifier()&&importName==="*"||path14.isImportSpecifier()&&isIdentifier(path14.node.imported,{name:importName}))}function getSource(){let node=this.node;if(node.end){let code=this.hub.getCode();if(code)return code.slice(node.start,node.end)}return ""}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function getOuterFunction(path14){return path14.isProgram()?path14:(path14.parentPath.scope.getFunctionParent()||path14.parentPath.scope.getProgramParent()).path}function isExecutionUncertain(type2,key2){switch(type2){case"LogicalExpression":return key2==="right";case"ConditionalExpression":case"IfStatement":return key2==="consequent"||key2==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return key2==="body";case"ForStatement":return key2==="body"||key2==="update";case"SwitchStatement":return key2==="cases";case"TryStatement":return key2==="handler";case"AssignmentPattern":return key2==="right";case"OptionalMemberExpression":return key2==="property";case"OptionalCallExpression":return key2==="arguments";default:return !1}}function isExecutionUncertainInList(paths,maxIndex){for(let i3=0;i3<maxIndex;i3++){let path14=paths[i3];if(isExecutionUncertain(path14.parent.type,path14.parentKey))return !0}return !1}var SYMBOL_CHECKING=Symbol();function _guessExecutionStatusRelativeTo(target){return _guessExecutionStatusRelativeToCached(this,target,new Map)}function _guessExecutionStatusRelativeToCached(base,target,cache3){let funcParent={this:getOuterFunction(base),target:getOuterFunction(target)};if(funcParent.target.node!==funcParent.this.node)return _guessExecutionStatusRelativeToDifferentFunctionsCached(base,funcParent.target,cache3);let paths={target:target.getAncestry(),this:base.getAncestry()};if(paths.target.indexOf(base)>=0)return "after";if(paths.this.indexOf(target)>=0)return "before";let commonPath,commonIndex={target:0,this:0};for(;!commonPath&&commonIndex.this<paths.this.length;){let path14=paths.this[commonIndex.this];commonIndex.target=paths.target.indexOf(path14),commonIndex.target>=0?commonPath=path14:commonIndex.this++;}if(!commonPath)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(isExecutionUncertainInList(paths.this,commonIndex.this-1)||isExecutionUncertainInList(paths.target,commonIndex.target-1))return "unknown";let divergence={this:paths.this[commonIndex.this-1],target:paths.target[commonIndex.target-1]};if(divergence.target.listKey&&divergence.this.listKey&&divergence.target.container===divergence.this.container)return divergence.target.key>divergence.this.key?"before":"after";let keys=VISITOR_KEYS[commonPath.type],keyPosition={this:keys.indexOf(divergence.this.parentKey),target:keys.indexOf(divergence.target.parentKey)};return keyPosition.target>keyPosition.this?"before":"after"}function _guessExecutionStatusRelativeToDifferentFunctionsInternal(base,target,cache3){if(target.isFunctionDeclaration()){if(target.parentPath.isExportDeclaration())return "unknown"}else return _guessExecutionStatusRelativeToCached(base,target,cache3)==="before"?"before":"unknown";let binding=target.scope.getBinding(target.node.id.name);if(!binding.references)return "before";let referencePaths=binding.referencePaths,allStatus;for(let path14 of referencePaths){if(!!path14.find(path15=>path15.node===target.node))continue;if(path14.key!=="callee"||!path14.parentPath.isCallExpression())return "unknown";let status=_guessExecutionStatusRelativeToCached(base,path14,cache3);if(allStatus&&allStatus!==status)return "unknown";allStatus=status;}return allStatus}function _guessExecutionStatusRelativeToDifferentFunctionsCached(base,target,cache3){let nodeMap=cache3.get(base.node),cached;if(!nodeMap)cache3.set(base.node,nodeMap=new Map);else if(cached=nodeMap.get(target.node))return cached===SYMBOL_CHECKING?"unknown":cached;nodeMap.set(target.node,SYMBOL_CHECKING);let result=_guessExecutionStatusRelativeToDifferentFunctionsInternal(base,target,cache3);return nodeMap.set(target.node,result),result}function resolve4(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){if(!(resolved&&resolved.indexOf(this)>=0))if(resolved=resolved||[],resolved.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(dangerous,resolved)}else if(this.isReferencedIdentifier()){let binding=this.scope.getBinding(this.node.name);if(!binding||!binding.constant||binding.kind==="module")return;if(binding.path!==this){let ret=binding.path.resolve(dangerous,resolved);return this.find(parent=>parent.node===ret.node)?void 0:ret}}else {if(this.isTypeCastExpression())return this.get("expression").resolve(dangerous,resolved);if(dangerous&&this.isMemberExpression()){let targetKey=this.toComputedKey();if(!isLiteral(targetKey))return;let targetName=targetKey.value,target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){let props=target.get("properties");for(let prop of props){if(!prop.isProperty())continue;let key2=prop.get("key"),match=prop.isnt("computed")&&key2.isIdentifier({name:targetName});if(match=match||key2.isLiteral({value:targetName}),match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){let elem=target.get("elements")[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}}function isConstantExpression(){if(this.isIdentifier()){let binding=this.scope.getBinding(this.node.name);return binding?binding.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(expression=>expression.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator}=this.node;return operator!=="in"&&operator!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function isInStrictMode(){return !!(this.isProgram()?this:this.parentPath).find(path14=>{if(path14.isProgram({sourceType:"module"})||path14.isClass())return !0;if(path14.isArrowFunctionExpression()&&!path14.get("body").isBlockStatement())return !1;let body;if(path14.isFunction())body=path14.node.body;else if(path14.isProgram())body=path14.node;else return !1;for(let directive of body.directives)if(directive.value.value==="use strict")return !0})}}});var require_context=__commonJS({"../../node_modules/@babel/traverse/lib/path/context.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._call=_call;exports._getQueueContexts=_getQueueContexts;exports._resyncKey=_resyncKey;exports._resyncList=_resyncList;exports._resyncParent=_resyncParent;exports._resyncRemoved=_resyncRemoved;exports.call=call;exports.isBlacklisted=exports.isDenylisted=isDenylisted;exports.popContext=popContext;exports.pushContext=pushContext;exports.requeue=requeue;exports.resync=resync;exports.setContext=setContext;exports.setKey=setKey;exports.setScope=setScope;exports.setup=setup;exports.skip=skip3;exports.skipKey=skipKey;exports.stop=stop;exports.visit=visit;var _traverseNode=require_traverse_node(),_index=require_path4();function call(key2){let opts=this.opts;if(this.debug(key2),this.node&&this._call(opts[key2]))return !0;if(this.node){var _opts$this$node$type;return this._call((_opts$this$node$type=opts[this.node.type])==null?void 0:_opts$this$node$type[key2])}return !1}function _call(fns){if(!fns)return !1;for(let fn11 of fns){if(!fn11)continue;let node=this.node;if(!node)return !0;let ret=fn11.call(this.state,this,this.state);if(ret&&typeof ret=="object"&&typeof ret.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(ret)throw new Error(`Unexpected return value from visitor method ${fn11}`);if(this.node!==node||this._traverseFlags>0)return !0}return !1}function isDenylisted(){var _this$opts$denylist;let denylist=(_this$opts$denylist=this.opts.denylist)!=null?_this$opts$denylist:this.opts.blacklist;return denylist&&denylist.indexOf(this.node.type)>-1}function restoreContext(path14,context){path14.context!==context&&(path14.context=context,path14.state=context.state,path14.opts=context.opts);}function visit(){var _this$opts$shouldSkip,_this$opts;if(!this.node||this.isDenylisted()||(_this$opts$shouldSkip=(_this$opts=this.opts).shouldSkip)!=null&&_this$opts$shouldSkip.call(_this$opts,this))return !1;let currentContext=this.context;return this.shouldSkip||this.call("enter")?(this.debug("Skip..."),this.shouldStop):(restoreContext(this,currentContext),this.debug("Recursing into..."),this.shouldStop=(0, _traverseNode.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),restoreContext(this,currentContext),this.call("exit"),this.shouldStop)}function skip3(){this.shouldSkip=!0;}function skipKey(key2){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[key2]=!0;}function stop(){this._traverseFlags|=_index.SHOULD_SKIP|_index.SHOULD_STOP;}function setScope(){var _this$opts2,_this$scope;if((_this$opts2=this.opts)!=null&&_this$opts2.noScope)return;let path14=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&path14.isMethod()||this.key==="discriminant"&&path14.isSwitchStatement())&&(path14=path14.parentPath);let target;for(;path14&&!target;){var _path$opts;if((_path$opts=path14.opts)!=null&&_path$opts.noScope)return;target=path14.scope,path14=path14.parentPath;}this.scope=this.getScope(target),(_this$scope=this.scope)==null||_this$scope.init();}function setContext(context){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,context&&(this.context=context,this.state=context.state,this.opts=context.opts),this.setScope(),this}function resync(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey());}function _resyncParent(){this.parentPath&&(this.parent=this.parentPath.node);}function _resyncKey(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let i3=0;i3<this.container.length;i3++)if(this.container[i3]===this.node){this.setKey(i3);return}}else for(let key2 of Object.keys(this.container))if(this.container[key2]===this.node){this.setKey(key2);return}this.key=null;}}function _resyncList(){if(!this.parent||!this.inList)return;let newContainer=this.parent[this.listKey];this.container!==newContainer&&(this.container=newContainer||null);}function _resyncRemoved(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&this._markRemoved();}function popContext(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0);}function pushContext(context){this.contexts.push(context),this.setContext(context);}function setup(parentPath,container,listKey,key2){this.listKey=listKey,this.container=container,this.parentPath=parentPath||this.parentPath,this.setKey(key2);}function setKey(key2){var _this$node;this.key=key2,this.node=this.container[this.key],this.type=(_this$node=this.node)==null?void 0:_this$node.type;}function requeue(pathToQueue=this){if(pathToQueue.removed)return;let contexts=this.contexts;for(let context of contexts)context.maybeQueue(pathToQueue);}function _getQueueContexts(){let path14=this,contexts=this.contexts;for(;!contexts.length&&(path14=path14.parentPath,!!path14);)contexts=path14.contexts;return contexts}}});var require_removal_hooks=__commonJS({"../../node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.hooks=void 0;exports.hooks=[function(self2,parent){if(self2.key==="test"&&(parent.isWhile()||parent.isSwitchCase())||self2.key==="declaration"&&parent.isExportDeclaration()||self2.key==="body"&&parent.isLabeledStatement()||self2.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===1||self2.key==="expression"&&parent.isExpressionStatement())return parent.remove(),!0},function(self2,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1)return parent.replaceWith(parent.node.expressions[0]),!0},function(self2,parent){if(parent.isBinary())return self2.key==="left"?parent.replaceWith(parent.node.right):parent.replaceWith(parent.node.left),!0},function(self2,parent){if(parent.isIfStatement()&&self2.key==="consequent"||self2.key==="body"&&(parent.isLoop()||parent.isArrowFunctionExpression()))return self2.replaceWith({type:"BlockStatement",body:[]}),!0}];}});var require_removal=__commonJS({"../../node_modules/@babel/traverse/lib/path/removal.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._assertUnremoved=_assertUnremoved;exports._callRemovalHooks=_callRemovalHooks;exports._markRemoved=_markRemoved;exports._remove=_remove;exports._removeFromScope=_removeFromScope;exports.remove=remove;var _removalHooks=require_removal_hooks(),_cache2=require_cache(),_index=require_path4(),_t14=require_lib13(),{getBindingIdentifiers}=_t14;function remove(){var _this$opts;if(this._assertUnremoved(),this.resync(),(_this$opts=this.opts)!=null&&_this$opts.noScope||this._removeFromScope(),this._callRemovalHooks()){this._markRemoved();return}this.shareCommentsWithSiblings(),this._remove(),this._markRemoved();}function _removeFromScope(){let bindings=getBindingIdentifiers(this.node,!1,!1,!0);Object.keys(bindings).forEach(name=>this.scope.removeBinding(name));}function _callRemovalHooks(){if(this.parentPath){for(let fn11 of _removalHooks.hooks)if(fn11(this,this.parentPath))return !0}}function _remove(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null);}function _markRemoved(){this._traverseFlags|=_index.SHOULD_SKIP|_index.REMOVED,this.parent&&(0, _cache2.getCachedPaths)(this.hub,this.parent).delete(this.node),this.node=null;}function _assertUnremoved(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}}});var require_hoister=__commonJS({"../../node_modules/@babel/traverse/lib/path/lib/hoister.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var _t14=require_lib13(),_t22=_t14,{react}=_t14,{cloneNode,jsxExpressionContainer,variableDeclaration,variableDeclarator}=_t22,referenceVisitor={ReferencedIdentifier(path14,state){if(path14.isJSXIdentifier()&&react.isCompatTag(path14.node.name)&&!path14.parentPath.isJSXMemberExpression())return;if(path14.node.name==="this"){let scope=path14.scope;do if(scope.path.isFunction()&&!scope.path.isArrowFunctionExpression())break;while(scope=scope.parent);scope&&state.breakOnScopePaths.push(scope.path);}let binding=path14.scope.getBinding(path14.node.name);if(binding){for(let violation of binding.constantViolations)if(violation.scope!==binding.path.scope){state.mutableBinding=!0,path14.stop();return}binding===state.scope.getBinding(path14.node.name)&&(state.bindings[path14.node.name]=binding);}}},PathHoister=class{constructor(path14,scope){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=scope,this.path=path14,this.attachAfter=!1;}isCompatibleScope(scope){for(let key2 of Object.keys(this.bindings)){let binding=this.bindings[key2];if(!scope.bindingIdentifierEquals(key2,binding.identifier))return !1}return !0}getCompatibleScopes(){let scope=this.path.scope;do{if(this.isCompatibleScope(scope))this.scopes.push(scope);else break;if(this.breakOnScopePaths.indexOf(scope.path)>=0)break}while(scope=scope.parent)}getAttachmentPath(){let path14=this._getAttachmentPath();if(!path14)return;let targetScope=path14.scope;if(targetScope.path===path14&&(targetScope=path14.scope.parent),targetScope.path.isProgram()||targetScope.path.isFunction())for(let name of Object.keys(this.bindings)){if(!targetScope.hasOwnBinding(name))continue;let binding=this.bindings[name];if(binding.kind==="param"||binding.path.parentKey==="params")continue;if(this.getAttachmentParentForPath(binding.path).key>=path14.key){this.attachAfter=!0,path14=binding.path;for(let violationPath of binding.constantViolations)this.getAttachmentParentForPath(violationPath).key>path14.key&&(path14=violationPath);}}return path14}_getAttachmentPath(){let scope=this.scopes.pop();if(scope){if(scope.path.isFunction())if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;let bodies=scope.path.get("body").get("body");for(let i3=0;i3<bodies.length;i3++)if(!bodies[i3].node._blockHoist)return bodies[i3]}else return this.getNextScopeAttachmentParent();else if(scope.path.isProgram())return this.getNextScopeAttachmentParent()}}getNextScopeAttachmentParent(){let scope=this.scopes.pop();if(scope)return this.getAttachmentParentForPath(scope.path)}getAttachmentParentForPath(path14){do if(!path14.parentPath||Array.isArray(path14.container)&&path14.isStatement())return path14;while(path14=path14.parentPath)}hasOwnParamBindings(scope){for(let name of Object.keys(this.bindings)){if(!scope.hasOwnBinding(name))continue;let binding=this.bindings[name];if(binding.kind==="param"&&binding.constant)return !0}return !1}run(){if(this.path.traverse(referenceVisitor,this),this.mutableBinding)return;this.getCompatibleScopes();let attachTo=this.getAttachmentPath();if(!attachTo||attachTo.getFunctionParent()===this.path.getFunctionParent())return;let uid=attachTo.scope.generateUidIdentifier("ref"),declarator=variableDeclarator(uid,this.path.node),insertFn=this.attachAfter?"insertAfter":"insertBefore",[attached]=attachTo[insertFn]([attachTo.isVariableDeclarator()?declarator:variableDeclaration("var",[declarator])]),parent=this.path.parentPath;return parent.isJSXElement()&&this.path.container===parent.node.children&&(uid=jsxExpressionContainer(uid)),this.path.replaceWith(cloneNode(uid)),attachTo.isVariableDeclarator()?attached.get("init"):attached.get("declarations.0.init")}};exports.default=PathHoister;}});var require_modification=__commonJS({"../../node_modules/@babel/traverse/lib/path/modification.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._containerInsert=_containerInsert;exports._containerInsertAfter=_containerInsertAfter;exports._containerInsertBefore=_containerInsertBefore;exports._verifyNodeList=_verifyNodeList;exports.hoist=hoist;exports.insertAfter=insertAfter;exports.insertBefore=insertBefore;exports.pushContainer=pushContainer;exports.unshiftContainer=unshiftContainer;exports.updateSiblingKeys=updateSiblingKeys;var _cache2=require_cache(),_hoister=require_hoister(),_index=require_path4(),_t14=require_lib13(),{arrowFunctionExpression,assertExpression,assignmentExpression,blockStatement,callExpression,cloneNode,expressionStatement,isAssignmentExpression,isCallExpression,isExportNamedDeclaration,isExpression,isIdentifier,isSequenceExpression,isSuper,thisExpression}=_t14;function insertBefore(nodes_){this._assertUnremoved();let nodes=this._verifyNodeList(nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertBefore(nodes);if(this.isNodeType("Expression")&&!this.isJSXElement()||parentPath.isForStatement()&&this.key==="init")return this.node&&nodes.push(this.node),this.replaceExpressionWithStatements(nodes);if(Array.isArray(this.container))return this._containerInsertBefore(nodes);if(this.isStatementOrBlock()){let node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||node.expression!=null);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.unshiftContainer("body",nodes)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);let paths=[];this.container.splice(from,0,...nodes);for(let i3=0;i3<nodes.length;i3++){var _this$context;let to5=from+i3,path14=this.getSibling(to5);paths.push(path14),(_this$context=this.context)!=null&&_this$context.queue&&path14.pushContext(this.context);}let contexts=this._getQueueContexts();for(let path14 of paths){path14.setScope(),path14.debug("Inserted.");for(let context of contexts)context.maybeQueue(path14,!0);}return paths}function _containerInsertBefore(nodes){return this._containerInsert(this.key,nodes)}function _containerInsertAfter(nodes){return this._containerInsert(this.key+1,nodes)}var last=arr=>arr[arr.length-1];function isHiddenInSequenceExpression(path14){return isSequenceExpression(path14.parent)&&(last(path14.parent.expressions)!==path14.node||isHiddenInSequenceExpression(path14.parentPath))}function isAlmostConstantAssignment(node,scope){if(!isAssignmentExpression(node)||!isIdentifier(node.left))return !1;let blockScope=scope.getBlockParent();return blockScope.hasOwnBinding(node.left.name)&&blockScope.getOwnBinding(node.left.name).constantViolations.length<=1}function insertAfter(nodes_){if(this._assertUnremoved(),this.isSequenceExpression())return last(this.get("expressions")).insertAfter(nodes_);let nodes=this._verifyNodeList(nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertAfter(nodes.map(node=>isExpression(node)?expressionStatement(node):node));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!parentPath.isJSXElement()||parentPath.isForStatement()&&this.key==="init"){if(this.node){let node=this.node,{scope}=this;if(scope.path.isPattern())return assertExpression(node),this.replaceWith(callExpression(arrowFunctionExpression([],node),[])),this.get("callee.body").insertAfter(nodes),[this];if(isHiddenInSequenceExpression(this))nodes.unshift(node);else if(isCallExpression(node)&&isSuper(node.callee))nodes.unshift(node),nodes.push(thisExpression());else if(isAlmostConstantAssignment(node,scope))nodes.unshift(node),nodes.push(cloneNode(node.left));else if(scope.isPure(node,!0))nodes.push(node);else {parentPath.isMethod({computed:!0,key:node})&&(scope=scope.parent);let temp=scope.generateDeclaredUidIdentifier();nodes.unshift(expressionStatement(assignmentExpression("=",cloneNode(temp),node))),nodes.push(expressionStatement(cloneNode(temp)));}}return this.replaceExpressionWithStatements(nodes)}else {if(Array.isArray(this.container))return this._containerInsertAfter(nodes);if(this.isStatementOrBlock()){let node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||node.expression!=null);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.pushContainer("body",nodes)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}function updateSiblingKeys(fromIndex,incrementBy){if(!this.parent)return;let paths=(0, _cache2.getCachedPaths)(this.hub,this.parent)||[];for(let[,path14]of paths)typeof path14.key=="number"&&path14.key>=fromIndex&&(path14.key+=incrementBy);}function _verifyNodeList(nodes){if(!nodes)return [];Array.isArray(nodes)||(nodes=[nodes]);for(let i3=0;i3<nodes.length;i3++){let node=nodes[i3],msg;if(node?typeof node!="object"?msg="contains a non-object node":node.type?node instanceof _index.default&&(msg="has a NodePath when it expected a raw object"):msg="without a type":msg="has falsy node",msg){let type2=Array.isArray(node)?"array":typeof node;throw new Error(`Node list ${msg} with the index of ${i3} and type of ${type2}`)}}return nodes}function unshiftContainer(listKey,nodes){return this._assertUnremoved(),nodes=this._verifyNodeList(nodes),_index.default.get({parentPath:this,parent:this.node,container:this.node[listKey],listKey,key:0}).setContext(this.context)._containerInsertBefore(nodes)}function pushContainer(listKey,nodes){this._assertUnremoved();let verifiedNodes=this._verifyNodeList(nodes),container=this.node[listKey];return _index.default.get({parentPath:this,parent:this.node,container,listKey,key:container.length}).setContext(this.context).replaceWithMultiple(verifiedNodes)}function hoist(scope=this.scope){return new _hoister.default(this,scope).run()}}});var require_family=__commonJS({"../../node_modules/@babel/traverse/lib/path/family.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._getKey=_getKey;exports._getPattern=_getPattern;exports.get=get;exports.getAllNextSiblings=getAllNextSiblings;exports.getAllPrevSiblings=getAllPrevSiblings;exports.getBindingIdentifierPaths=getBindingIdentifierPaths;exports.getBindingIdentifiers=getBindingIdentifiers;exports.getCompletionRecords=getCompletionRecords;exports.getNextSibling=getNextSibling;exports.getOpposite=getOpposite;exports.getOuterBindingIdentifierPaths=getOuterBindingIdentifierPaths;exports.getOuterBindingIdentifiers=getOuterBindingIdentifiers;exports.getPrevSibling=getPrevSibling;exports.getSibling=getSibling;var _index=require_path4(),_t14=require_lib13(),{getBindingIdentifiers:_getBindingIdentifiers,getOuterBindingIdentifiers:_getOuterBindingIdentifiers,isDeclaration,numericLiteral,unaryExpression}=_t14,NORMAL_COMPLETION=0,BREAK_COMPLETION=1;function NormalCompletion(path14){return {type:NORMAL_COMPLETION,path:path14}}function BreakCompletion(path14){return {type:BREAK_COMPLETION,path:path14}}function getOpposite(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function addCompletionRecords(path14,records,context){return path14&&records.push(..._getCompletionRecords(path14,context)),records}function completionRecordForSwitch(cases,records,context){let lastNormalCompletions=[];for(let i3=0;i3<cases.length;i3++){let casePath=cases[i3],caseCompletions=_getCompletionRecords(casePath,context),normalCompletions=[],breakCompletions=[];for(let c8 of caseCompletions)c8.type===NORMAL_COMPLETION&&normalCompletions.push(c8),c8.type===BREAK_COMPLETION&&breakCompletions.push(c8);normalCompletions.length&&(lastNormalCompletions=normalCompletions),records.push(...breakCompletions);}return records.push(...lastNormalCompletions),records}function normalCompletionToBreak(completions){completions.forEach(c8=>{c8.type=BREAK_COMPLETION;});}function replaceBreakStatementInBreakCompletion(completions,reachable){completions.forEach(c8=>{c8.path.isBreakStatement({label:null})&&(reachable?c8.path.replaceWith(unaryExpression("void",numericLiteral(0))):c8.path.remove());});}function getStatementListCompletion(paths,context){let completions=[];if(context.canHaveBreak){let lastNormalCompletions=[];for(let i3=0;i3<paths.length;i3++){let path14=paths[i3],newContext=Object.assign({},context,{inCaseClause:!1});path14.isBlockStatement()&&(context.inCaseClause||context.shouldPopulateBreak)?newContext.shouldPopulateBreak=!0:newContext.shouldPopulateBreak=!1;let statementCompletions=_getCompletionRecords(path14,newContext);if(statementCompletions.length>0&&statementCompletions.every(c8=>c8.type===BREAK_COMPLETION)){lastNormalCompletions.length>0&&statementCompletions.every(c8=>c8.path.isBreakStatement({label:null}))?(normalCompletionToBreak(lastNormalCompletions),completions.push(...lastNormalCompletions),lastNormalCompletions.some(c8=>c8.path.isDeclaration())&&(completions.push(...statementCompletions),replaceBreakStatementInBreakCompletion(statementCompletions,!0)),replaceBreakStatementInBreakCompletion(statementCompletions,!1)):(completions.push(...statementCompletions),context.shouldPopulateBreak||replaceBreakStatementInBreakCompletion(statementCompletions,!0));break}if(i3===paths.length-1)completions.push(...statementCompletions);else {lastNormalCompletions=[];for(let i4=0;i4<statementCompletions.length;i4++){let c8=statementCompletions[i4];c8.type===BREAK_COMPLETION&&completions.push(c8),c8.type===NORMAL_COMPLETION&&lastNormalCompletions.push(c8);}}}}else if(paths.length)for(let i3=paths.length-1;i3>=0;i3--){let pathCompletions=_getCompletionRecords(paths[i3],context);if(pathCompletions.length>1||pathCompletions.length===1&&!pathCompletions[0].path.isVariableDeclaration()){completions.push(...pathCompletions);break}}return completions}function _getCompletionRecords(path14,context){let records=[];if(path14.isIfStatement())records=addCompletionRecords(path14.get("consequent"),records,context),records=addCompletionRecords(path14.get("alternate"),records,context);else {if(path14.isDoExpression()||path14.isFor()||path14.isWhile()||path14.isLabeledStatement())return addCompletionRecords(path14.get("body"),records,context);if(path14.isProgram()||path14.isBlockStatement())return getStatementListCompletion(path14.get("body"),context);if(path14.isFunction())return _getCompletionRecords(path14.get("body"),context);if(path14.isTryStatement())records=addCompletionRecords(path14.get("block"),records,context),records=addCompletionRecords(path14.get("handler"),records,context);else {if(path14.isCatchClause())return addCompletionRecords(path14.get("body"),records,context);if(path14.isSwitchStatement())return completionRecordForSwitch(path14.get("cases"),records,context);if(path14.isSwitchCase())return getStatementListCompletion(path14.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0});path14.isBreakStatement()?records.push(BreakCompletion(path14)):records.push(NormalCompletion(path14));}}return records}function getCompletionRecords(){return _getCompletionRecords(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1}).map(r8=>r8.path)}function getSibling(key2){return _index.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key2}).setContext(this.context)}function getPrevSibling(){return this.getSibling(this.key-1)}function getNextSibling(){return this.getSibling(this.key+1)}function getAllNextSiblings(){let _key=this.key,sibling=this.getSibling(++_key),siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(++_key);return siblings}function getAllPrevSiblings(){let _key=this.key,sibling=this.getSibling(--_key),siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(--_key);return siblings}function get(key2,context=!0){context===!0&&(context=this.context);let parts=key2.split(".");return parts.length===1?this._getKey(key2,context):this._getPattern(parts,context)}function _getKey(key2,context){let node=this.node,container=node[key2];return Array.isArray(container)?container.map((_8,i3)=>_index.default.get({listKey:key2,parentPath:this,parent:node,container,key:i3}).setContext(context)):_index.default.get({parentPath:this,parent:node,container:node,key:key2}).setContext(context)}function _getPattern(parts,context){let path14=this;for(let part of parts)part==="."?path14=path14.parentPath:Array.isArray(path14)?path14=path14[part]:path14=path14.get(part,context);return path14}function getBindingIdentifiers(duplicates){return _getBindingIdentifiers(this.node,duplicates)}function getOuterBindingIdentifiers(duplicates){return _getOuterBindingIdentifiers(this.node,duplicates)}function getBindingIdentifierPaths(duplicates=!1,outerOnly=!1){let search=[this],ids=Object.create(null);for(;search.length;){let id2=search.shift();if(!id2||!id2.node)continue;let keys=_getBindingIdentifiers.keys[id2.node.type];if(id2.isIdentifier()){duplicates?(ids[id2.node.name]=ids[id2.node.name]||[]).push(id2):ids[id2.node.name]=id2;continue}if(id2.isExportDeclaration()){let declaration=id2.get("declaration");isDeclaration(declaration)&&search.push(declaration);continue}if(outerOnly){if(id2.isFunctionDeclaration()){search.push(id2.get("id"));continue}if(id2.isFunctionExpression())continue}if(keys)for(let i3=0;i3<keys.length;i3++){let key2=keys[i3],child=id2.get(key2);Array.isArray(child)?search.push(...child):child.node&&search.push(child);}}return ids}function getOuterBindingIdentifierPaths(duplicates=!1){return this.getBindingIdentifierPaths(duplicates,!0)}}});var require_comments2=__commonJS({"../../node_modules/@babel/traverse/lib/path/comments.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.addComment=addComment;exports.addComments=addComments;exports.shareCommentsWithSiblings=shareCommentsWithSiblings;var _t14=require_lib13(),{addComment:_addComment,addComments:_addComments}=_t14;function shareCommentsWithSiblings(){if(typeof this.key=="string")return;let node=this.node;if(!node)return;let trailing=node.trailingComments,leading=node.leadingComments;if(!trailing&&!leading)return;let prev=this.getSibling(this.key-1),next=this.getSibling(this.key+1),hasPrev=!!prev.node,hasNext=!!next.node;hasPrev&&(leading&&prev.addComments("trailing",removeIfExisting(leading,prev.node.trailingComments)),trailing&&!hasNext&&prev.addComments("trailing",trailing)),hasNext&&(trailing&&next.addComments("leading",removeIfExisting(trailing,next.node.leadingComments)),leading&&!hasPrev&&next.addComments("leading",leading));}function removeIfExisting(list,toRemove){if(!(toRemove!=null&&toRemove.length))return list;let set2=new Set(toRemove);return list.filter(el8=>!set2.has(el8))}function addComment(type2,content,line5){_addComment(this.node,type2,content,line5);}function addComments(type2,comments){_addComments(this.node,type2,comments);}}});var require_path4=__commonJS({"../../node_modules/@babel/traverse/lib/path/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=exports.SHOULD_STOP=exports.SHOULD_SKIP=exports.REMOVED=void 0;var virtualTypes=require_virtual_types(),_debug=require_src(),_index=require_lib21(),_index2=require_scope2(),_t14=require_lib13(),t25=_t14,cache3=require_cache(),_generator=require_lib14(),NodePath_ancestry=require_ancestry(),NodePath_inference=require_inference(),NodePath_replacement=require_replacement(),NodePath_evaluation=require_evaluation(),NodePath_conversion=require_conversion(),NodePath_introspection=require_introspection(),NodePath_context=require_context(),NodePath_removal=require_removal(),NodePath_modification=require_modification(),NodePath_family=require_family(),NodePath_comments=require_comments2(),NodePath_virtual_types_validator=require_virtual_types_validator(),{validate}=_t14,debug=_debug("babel"),REMOVED=exports.REMOVED=1,SHOULD_STOP=exports.SHOULD_STOP=2,SHOULD_SKIP=exports.SHOULD_SKIP=4,NodePath=class _NodePath{constructor(hub,parent){this.contexts=[],this.state=null,this.opts=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this.parent=parent,this.hub=hub,this.data=null,this.context=null,this.scope=null;}static get({hub,parentPath,parent,container,listKey,key:key2}){if(!hub&&parentPath&&(hub=parentPath.hub),!parent)throw new Error("To get a node path the parent needs to exist");let targetNode=container[key2],paths=cache3.getOrCreateCachedPaths(hub,parent),path14=paths.get(targetNode);return path14||(path14=new _NodePath(hub,parent),targetNode&&paths.set(targetNode,path14)),path14.setup(parentPath,container,listKey,key2),path14}getScope(scope){return this.isScope()?new _index2.default(this):scope}setData(key2,val){return this.data==null&&(this.data=Object.create(null)),this.data[key2]=val}getData(key2,def){this.data==null&&(this.data=Object.create(null));let val=this.data[key2];return val===void 0&&def!==void 0&&(val=this.data[key2]=def),val}hasNode(){return this.node!=null}buildCodeFrameError(msg,Error2=SyntaxError){return this.hub.buildError(this.node,msg,Error2)}traverse(visitor,state){(0, _index.default)(this.node,visitor,this.scope,state,this);}set(key2,node){validate(this.node,key2,node),this.node[key2]=node;}getPathLocation(){let parts=[],path14=this;do{let key2=path14.key;path14.inList&&(key2=`${path14.listKey}[${key2}]`),parts.unshift(key2);}while(path14=path14.parentPath);return parts.join(".")}debug(message){debug.enabled&&debug(`${this.getPathLocation()} ${this.type}: ${message}`);}toString(){return (0, _generator.default)(this.node).code}get inList(){return !!this.listKey}set inList(inList){inList||(this.listKey=null);}get parentKey(){return this.listKey||this.key}get shouldSkip(){return !!(this._traverseFlags&SHOULD_SKIP)}set shouldSkip(v11){v11?this._traverseFlags|=SHOULD_SKIP:this._traverseFlags&=~SHOULD_SKIP;}get shouldStop(){return !!(this._traverseFlags&SHOULD_STOP)}set shouldStop(v11){v11?this._traverseFlags|=SHOULD_STOP:this._traverseFlags&=~SHOULD_STOP;}get removed(){return !!(this._traverseFlags&REMOVED)}set removed(v11){v11?this._traverseFlags|=REMOVED:this._traverseFlags&=~REMOVED;}};Object.assign(NodePath.prototype,NodePath_ancestry,NodePath_inference,NodePath_replacement,NodePath_evaluation,NodePath_conversion,NodePath_introspection,NodePath_context,NodePath_removal,NodePath_modification,NodePath_family,NodePath_comments);NodePath.prototype._guessExecutionStatusRelativeToDifferentFunctions=NodePath_introspection._guessExecutionStatusRelativeTo;for(let type2 of t25.TYPES){let typeKey=`is${type2}`,fn11=t25[typeKey];NodePath.prototype[typeKey]=function(opts){return fn11(this.node,opts)},NodePath.prototype[`assert${type2}`]=function(opts){if(!fn11(this.node,opts))throw new TypeError(`Expected node path of type ${type2}`)};}Object.assign(NodePath.prototype,NodePath_virtual_types_validator);for(let type2 of Object.keys(virtualTypes))type2[0]!=="_"&&(t25.TYPES.includes(type2)||t25.TYPES.push(type2));exports.default=NodePath;}});var require_context2=__commonJS({"../../node_modules/@babel/traverse/lib/context.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var _index=require_path4(),_t14=require_lib13(),{VISITOR_KEYS}=_t14,TraversalContext=class{constructor(scope,opts,state,parentPath){this.queue=null,this.priorityQueue=null,this.parentPath=parentPath,this.scope=scope,this.state=state,this.opts=opts;}shouldVisit(node){let opts=this.opts;if(opts.enter||opts.exit||opts[node.type])return !0;let keys=VISITOR_KEYS[node.type];if(!(keys!=null&&keys.length))return !1;for(let key2 of keys)if(node[key2])return !0;return !1}create(node,container,key2,listKey){return _index.default.get({parentPath:this.parentPath,parent:node,container,key:key2,listKey})}maybeQueue(path14,notPriority){this.queue&&(notPriority?this.queue.push(path14):this.priorityQueue.push(path14));}visitMultiple(container,parent,listKey){if(container.length===0)return !1;let queue=[];for(let key2=0;key2<container.length;key2++){let node=container[key2];node&&this.shouldVisit(node)&&queue.push(this.create(parent,container,key2,listKey));}return this.visitQueue(queue)}visitSingle(node,key2){return this.shouldVisit(node[key2])?this.visitQueue([this.create(node,node,key2)]):!1}visitQueue(queue){this.queue=queue,this.priorityQueue=[];let visited=new WeakSet,stop=!1,visitIndex=0;for(;visitIndex<queue.length;){let path14=queue[visitIndex];if(visitIndex++,path14.resync(),(path14.contexts.length===0||path14.contexts[path14.contexts.length-1]!==this)&&path14.pushContext(this),path14.key===null)continue;let{node}=path14;if(!visited.has(node)){if(node&&visited.add(node),path14.visit()){stop=!0;break}if(this.priorityQueue.length&&(stop=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=queue,stop))break}}for(let i3=0;i3<visitIndex;i3++)queue[i3].popContext();return this.queue=null,stop}visit(node,key2){let nodes=node[key2];return nodes?Array.isArray(nodes)?this.visitMultiple(nodes,node,key2):this.visitSingle(node,key2):!1}};exports.default=TraversalContext;}});var require_traverse_node=__commonJS({"../../node_modules/@babel/traverse/lib/traverse-node.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.traverseNode=traverseNode;var _context=require_context2(),_t14=require_lib13(),{VISITOR_KEYS}=_t14;function traverseNode(node,opts,scope,state,path14,skipKeys,visitSelf){let keys=VISITOR_KEYS[node.type];if(!keys)return !1;let context=new _context.default(scope,opts,state,path14);if(visitSelf)return skipKeys!=null&&skipKeys[path14.parentKey]?!1:context.visitQueue([path14]);for(let key2 of keys)if(!(skipKeys!=null&&skipKeys[key2])&&context.visit(node,key2))return !0;return !1}}});var require_hub=__commonJS({"../../node_modules/@babel/traverse/lib/hub.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var Hub=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(node,msg,Error2=TypeError){return new Error2(msg)}};exports.default=Hub;}});var require_lib21=__commonJS({"../../node_modules/@babel/traverse/lib/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});Object.defineProperty(exports,"Hub",{enumerable:!0,get:function(){return _hub.default}});Object.defineProperty(exports,"NodePath",{enumerable:!0,get:function(){return _index.default}});Object.defineProperty(exports,"Scope",{enumerable:!0,get:function(){return _index2.default}});exports.visitors=exports.default=void 0;var visitors=require_visitors();exports.visitors=visitors;var _t14=require_lib13(),cache3=require_cache(),_traverseNode=require_traverse_node(),_index=require_path4(),_index2=require_scope2(),_hub=require_hub(),{VISITOR_KEYS,removeProperties,traverseFast}=_t14;function traverse(parent,opts={},scope,state,parentPath,visitSelf){if(parent){if(!opts.noScope&&!scope&&parent.type!=="Program"&&parent.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${parent.type} node without passing scope and parentPath.`);if(!parentPath&&visitSelf)throw new Error("visitSelf can only be used when providing a NodePath.");VISITOR_KEYS[parent.type]&&(visitors.explode(opts),(0, _traverseNode.traverseNode)(parent,opts,scope,state,parentPath,null,visitSelf));}}exports.default=traverse;traverse.visitors=visitors;traverse.verify=visitors.verify;traverse.explode=visitors.explode;traverse.cheap=function(node,enter){traverseFast(node,enter);};traverse.node=function(node,opts,scope,state,path14,skipKeys){(0, _traverseNode.traverseNode)(node,opts,scope,state,path14,skipKeys);};traverse.clearNode=function(node,opts){removeProperties(node,opts);};traverse.removeProperties=function(tree,opts){return traverseFast(tree,traverse.clearNode,opts),tree};function hasDenylistedType(path14,state){path14.node.type===state.type&&(state.has=!0,path14.stop());}traverse.hasType=function(tree,type2,denylistTypes){if(denylistTypes!=null&&denylistTypes.includes(tree.type))return !1;if(tree.type===type2)return !0;let state={has:!1,type:type2};return traverse(tree,{noScope:!0,denylist:denylistTypes,enter:hasDenylistedType},null,state),state.has};traverse.cache=cache3;}});var require_dist5=__commonJS({"../../node_modules/@storybook/csf/dist/index.js"(exports){var F16=Object.create,u=Object.defineProperty,B15=Object.getOwnPropertyDescriptor,C15=Object.getOwnPropertyNames,h7=Object.getPrototypeOf,w13=Object.prototype.hasOwnProperty,I15=(r8,e4)=>()=>(e4||r8((e4={exports:{}}).exports,e4),e4.exports),E10=(r8,e4,n,t25)=>{if(e4&&typeof e4=="object"||typeof e4=="function")for(let a3 of C15(e4))!w13.call(r8,a3)&&a3!==n&&u(r8,a3,{get:()=>e4[a3],enumerable:!(t25=B15(e4,a3))||t25.enumerable});return r8},v11=(r8,e4,n)=>(n=r8!=null?F16(h7(r8)):{},E10(e4||!r8||!r8.__esModule?u(n,"default",{value:r8,enumerable:!0}):n,r8)),x11=I15(T11=>{Object.defineProperty(T11,"__esModule",{value:!0}),T11.isEqual=function(){var r8=Object.prototype.toString,e4=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t25){return Object.keys(t25).concat(Object.getOwnPropertySymbols(t25))}:Object.keys;return function(t25,a3){return function i3(o3,s,d7){var y13,g4,p7,l=r8.call(o3),b15=r8.call(s);if(o3===s)return !0;if(o3==null||s==null)return !1;if(d7.indexOf(o3)>-1&&d7.indexOf(s)>-1)return !0;if(d7.push(o3,s),l!=b15||(y13=n(o3),g4=n(s),y13.length!=g4.length||y13.some(function(A14){return !i3(o3[A14],s[A14],d7)})))return !1;switch(l.slice(8,-1)){case"Symbol":return o3.valueOf()==s.valueOf();case"Date":case"Number":return +o3==+s||+o3!=+o3&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+o3==""+s;case"Set":case"Map":y13=o3.entries(),g4=s.entries();do if(!i3((p7=y13.next()).value,g4.next().value,d7))return !1;while(!p7.done);return !0;case"ArrayBuffer":o3=new Uint8Array(o3),s=new Uint8Array(s);case"DataView":o3=new Uint8Array(o3.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o3.length!=s.length)return !1;for(p7=0;p7<o3.length;p7++)if((p7 in o3||p7 in s)&&(p7 in o3!=p7 in s||!i3(o3[p7],s[p7],d7)))return !1;return !0;case"Object":return i3(e4(o3),e4(s),d7);default:return !1}}(t25,a3,[])}}();});function R17(r8){return r8.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e4,n,t25,a3)=>`${n} ${t25}${a3}`).replace(/([a-z])([A-Z])/g,(e4,n,t25)=>`${n} ${t25}`).replace(/([a-z])([0-9])/gi,(e4,n,t25)=>`${n} ${t25}`).replace(/([0-9])([a-z])/gi,(e4,n,t25)=>`${n} ${t25}`).replace(/(\s|^)(\w)/g,(e4,n,t25)=>`${n}${t25.toUpperCase()}`).replace(/ +/g," ").trim()}var c8=v11(x11()),S11=r8=>r8.map(e4=>typeof e4<"u").filter(Boolean).length,P16=(r8,e4)=>{let{exists:n,eq:t25,neq:a3,truthy:i3}=r8;if(S11([n,t25,a3,i3])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t25,neq:a3})}`);if(typeof t25<"u")return (0, c8.isEqual)(e4,t25);if(typeof a3<"u")return !(0, c8.isEqual)(e4,a3);if(typeof n<"u"){let s=typeof e4<"u";return n?s:!s}return typeof i3>"u"||i3?!!e4:!e4},O14=(r8,e4,n)=>{if(!r8.if)return !0;let{arg:t25,global:a3}=r8.if;if(S11([t25,a3])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t25,global:a3})}`);let i3=t25?e4[t25]:n[a3];return P16(r8.if,i3)},k14=r8=>r8.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m4=(r8,e4)=>{let n=k14(r8);if(n==="")throw new Error(`Invalid ${e4} '${r8}', must include alphanumeric characters`);return n},N16=(r8,e4)=>`${m4(r8,"kind")}${e4?`--${m4(e4,"name")}`:""}`,M11=r8=>R17(r8);function f10(r8,e4){return Array.isArray(e4)?e4.includes(r8):r8.match(e4)}function G21(r8,{includeStories:e4,excludeStories:n}){return r8!=="__esModule"&&(!e4||f10(r8,e4))&&(!n||!f10(r8,n))}var V16=(r8,{rootSeparator:e4,groupSeparator:n})=>{let[t25,a3]=r8.split(e4,2),i3=(a3||r8).split(n).filter(o3=>!!o3);return {root:a3?t25:null,groups:i3}};exports.includeConditionalArg=O14;exports.isExportStory=G21;exports.parseKind=V16;exports.sanitize=k14;exports.storyNameFromExport=M11;exports.toId=N16;}});var require_dist6=__commonJS({"../../lib/csf-tools/dist/index.js"(exports,module){var __create4=Object.create,__defProp6=Object.defineProperty,__getOwnPropDesc4=Object.getOwnPropertyDescriptor,__getOwnPropNames4=Object.getOwnPropertyNames,__getProtoOf4=Object.getPrototypeOf,__hasOwnProp4=Object.prototype.hasOwnProperty,__export6=(target,all)=>{for(var name in all)__defProp6(target,name,{get:all[name],enumerable:!0});},__copyProps4=(to5,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key2 of __getOwnPropNames4(from))!__hasOwnProp4.call(to5,key2)&&key2!==except&&__defProp6(to5,key2,{get:()=>from[key2],enumerable:!(desc=__getOwnPropDesc4(from,key2))||desc.enumerable});return to5},__toESM4=(mod,isNodeMode,target)=>(target=mod!=null?__create4(__getProtoOf4(mod)):{},__copyProps4(isNodeMode||!mod||!mod.__esModule?__defProp6(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS2=mod=>__copyProps4(__defProp6({},"__esModule",{value:!0}),mod),src_exports3={};__export6(src_exports3,{ConfigFile:()=>ConfigFile,CsfFile:()=>CsfFile,NoMetaError:()=>NoMetaError,babelParse:()=>babelParse,babelParseExpression:()=>babelParseExpression,babelPrint:()=>babelPrint,enrichCsf:()=>enrichCsf,enrichCsfMeta:()=>enrichCsfMeta,enrichCsfStory:()=>enrichCsfStory,extractDescription:()=>extractDescription,extractSource:()=>extractSource,formatConfig:()=>formatConfig,formatCsf:()=>formatCsf,getStorySortParameter:()=>getStorySortParameter,loadConfig:()=>loadConfig4,loadCsf:()=>loadCsf,parserOptions:()=>parserOptions,printConfig:()=>printConfig,printCsf:()=>printCsf,readConfig:()=>readConfig,readCsf:()=>readCsf,writeConfig:()=>writeConfig,writeCsf:()=>writeCsf});module.exports=__toCommonJS2(src_exports3);var import_fs_extra=__toESM4(require_lib6()),import_ts_dedent=(init_esm(),__toCommonJS(esm_exports)),t25=__toESM4(require_lib13()),generate=__toESM4(require_lib14()),recast2=__toESM4(require_main6()),traverse=__toESM4(require_lib21()),import_csf=require_dist5(),babelParser=__toESM4(require_lib17()),recast=__toESM4(require_main6());function parseWithFlowOrTypescript(source2,parserOptions2){let parserPlugins=/^\s*\/\/\s*@flow/.test(source2)?["flow"]:["typescript"],mergedParserOptions={...parserOptions2,plugins:[...parserOptions2.plugins??[],...parserPlugins]};return babelParser.parse(source2,mergedParserOptions)}var parserOptions={sourceType:"module",plugins:["jsx","decorators-legacy","classProperties"],tokens:!0},babelParse=code=>recast.parse(code,{parser:{parse(source2){return parseWithFlowOrTypescript(source2,parserOptions)}}}),babelPrint=ast=>recast.print(ast,{quote:"single",trailingComma:!0,tabWidth:2,wrapColumn:80,arrowParensAlways:!0}).code,babelParseExpression=code=>babelParser.parseExpression(code,parserOptions),t26=__toESM4(require_lib13()),findVarInitialization=(identifier3,program)=>{let init=null,declarations=null;return program.body.find(node=>(t26.isVariableDeclaration(node)?declarations=node.declarations:t26.isExportNamedDeclaration(node)&&t26.isVariableDeclaration(node.declaration)&&(declarations=node.declaration.declarations),declarations&&declarations.find(decl=>t26.isVariableDeclarator(decl)&&t26.isIdentifier(decl.id)&&decl.id.name===identifier3?(init=decl.init,!0):!1))),init},logger=console;function parseIncludeExclude(prop){if(t25.isArrayExpression(prop))return prop.elements.map(e4=>{if(t25.isStringLiteral(e4))return e4.value;throw new Error(`Expected string literal: ${e4}`)});if(t25.isStringLiteral(prop))return new RegExp(prop.value);if(t25.isRegExpLiteral(prop))return new RegExp(prop.pattern,prop.flags);throw new Error(`Unknown include/exclude: ${prop}`)}function parseTags(prop){if(!t25.isArrayExpression(prop))throw new Error("CSF: Expected tags array");return prop.elements.map(e4=>{if(t25.isStringLiteral(e4))return e4.value;throw new Error("CSF: Expected tag to be string literal")})}var formatLocation2=(node,fileName)=>{let{line:line5,column:column2}=node.loc?.start||{};return `${fileName||""} (line ${line5}, col ${column2})`.trim()},isArgsStory=(init,parent,csf)=>{let storyFn=init;if(t25.isCallExpression(init)){let{callee,arguments:bindArguments}=init;if(t25.isProgram(parent)&&t25.isMemberExpression(callee)&&t25.isIdentifier(callee.object)&&t25.isIdentifier(callee.property)&&callee.property.name==="bind"&&(bindArguments.length===0||bindArguments.length===1&&t25.isObjectExpression(bindArguments[0])&&bindArguments[0].properties.length===0)){let boundIdentifier=callee.object.name,template=findVarInitialization(boundIdentifier,parent);template&&(csf._templates[boundIdentifier]=template,storyFn=template);}}return t25.isArrowFunctionExpression(storyFn)||t25.isFunctionDeclaration(storyFn)?storyFn.params.length>0:!1},parseExportsOrder=init=>{if(t25.isArrayExpression(init))return init.elements.map(item=>{if(t25.isStringLiteral(item))return item.value;throw new Error(`Expected string literal named export: ${item}`)});throw new Error(`Expected array of string literals: ${init}`)},sortExports=(exportByName,order)=>order.reduce((acc,name)=>{let namedExport=exportByName[name];return namedExport&&(acc[name]=namedExport),acc},{}),NoMetaError=class extends Error{constructor(message,ast,fileName){super(import_ts_dedent.dedent`
524
+ `),visitor={"ReferencedIdentifier|BindingIdentifier"(path14,state){path14.node.name!==state.name||path14.scope.getBindingIdentifier(state.name)!==state.outerDeclar||(state.selfReference=!0,path14.stop());}};function getNameFromLiteralId(id2){return isNullLiteral(id2)?"null":isRegExpLiteral(id2)?`_${id2.pattern}_${id2.flags}`:isTemplateLiteral(id2)?id2.quasis.map(quasi=>quasi.value.raw).join(""):id2.value!==void 0?id2.value+"":""}function wrap(state,method,id2,scope){if(state.selfReference)if(scope.hasBinding(id2.name)&&!scope.hasGlobal(id2.name))scope.rename(id2.name);else {if(!isFunction(method))return;let build=buildPropertyMethodAssignmentWrapper;method.generator&&(build=buildGeneratorPropertyMethodAssignmentWrapper);let template=build({FUNCTION:method,FUNCTION_ID:id2,FUNCTION_KEY:scope.generateUidIdentifier(id2.name)}).expression,params=template.callee.body.body[0].params;for(let i3=0,len=getFunctionArity(method);i3<len;i3++)params.push(scope.generateUidIdentifier("x"));return template}method.id=id2,scope.getProgramParent().references[id2.name]=!0;}function visit(node,name,scope){let state={selfAssignment:!1,selfReference:!1,outerDeclar:scope.getBindingIdentifier(name),name},binding=scope.getOwnBinding(name);return binding?binding.kind==="param"&&(state.selfReference=!0):(state.outerDeclar||scope.hasGlobal(name))&&scope.traverse(node,visitor,state),state}function _default2({node,parent,scope,id:id2},localBinding=!1,supportUnicodeId=!1){if(node.id)return;if((isObjectProperty(parent)||isObjectMethod(parent,{kind:"method"}))&&(!parent.computed||isLiteral(parent.key)))id2=parent.key;else if(isVariableDeclarator(parent)){if(id2=parent.id,isIdentifier(id2)&&!localBinding){let binding=scope.parent.getBinding(id2.name);if(binding&&binding.constant&&scope.getBinding(id2.name)===binding){node.id=cloneNode(id2),node.id[NOT_LOCAL_BINDING]=!0;return}}}else if(isAssignmentExpression(parent,{operator:"="}))id2=parent.left;else if(!id2)return;let name;if(id2&&isLiteral(id2)?name=getNameFromLiteralId(id2):id2&&isIdentifier(id2)&&(name=id2.name),name===void 0||!supportUnicodeId&&isFunction(node)&&/[\uD800-\uDFFF]/.test(name))return;name=toBindingIdentifierName(name);let newId=identifier(name);newId[NOT_LOCAL_BINDING]=!0;let state=visit(node,name,scope);return wrap(state,node,newId,scope)||node}}});var require_conversion=__commonJS({"../../node_modules/@babel/traverse/lib/path/conversion.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.arrowFunctionToExpression=arrowFunctionToExpression;exports.ensureBlock=ensureBlock;exports.toComputedKey=toComputedKey;exports.unwrapFunctionEnvironment=unwrapFunctionEnvironment;var _t14=require_lib13(),_helperEnvironmentVisitor=require_lib16(),_helperFunctionName=require_lib20(),_visitors=require_visitors(),{arrowFunctionExpression,assignmentExpression,binaryExpression,blockStatement,callExpression,conditionalExpression,expressionStatement,identifier,isIdentifier,jsxIdentifier,logicalExpression,LOGICAL_OPERATORS,memberExpression,metaProperty,numericLiteral,objectExpression,restElement,returnStatement,sequenceExpression,spreadElement,stringLiteral,super:_super,thisExpression,toExpression,unaryExpression}=_t14;function toComputedKey(){let key2;if(this.isMemberExpression())key2=this.node.property;else if(this.isProperty()||this.isMethod())key2=this.node.key;else throw new ReferenceError("todo");return this.node.computed||isIdentifier(key2)&&(key2=stringLiteral(key2.name)),key2}function ensureBlock(){let body=this.get("body"),bodyNode=body.node;if(Array.isArray(body))throw new Error("Can't convert array path to a block statement");if(!bodyNode)throw new Error("Can't convert node without a body");if(body.isBlockStatement())return bodyNode;let statements=[],stringPath="body",key2,listKey;body.isStatement()?(listKey="body",key2=0,statements.push(body.node)):(stringPath+=".body.0",this.isFunction()?(key2="argument",statements.push(returnStatement(body.node))):(key2="expression",statements.push(expressionStatement(body.node)))),this.node.body=blockStatement(statements);let parentPath=this.get(stringPath);return body.setup(parentPath,listKey?parentPath.node[listKey]:parentPath.node,listKey,key2),this.node}exports.arrowFunctionToShadowed=function(){this.isArrowFunctionExpression()&&this.arrowFunctionToExpression();};function unwrapFunctionEnvironment(){if(!this.isArrowFunctionExpression()&&!this.isFunctionExpression()&&!this.isFunctionDeclaration())throw this.buildCodeFrameError("Can only unwrap the environment of a function.");hoistFunctionEnvironment(this);}function setType(path14,type2){path14.node.type=type2;}function arrowFunctionToExpression({allowInsertArrow=!0,allowInsertArrowWithRest=allowInsertArrow,noNewArrows=!(_arguments$=>(_arguments$=arguments[0])==null?void 0:_arguments$.specCompliant)()}={}){if(!this.isArrowFunctionExpression())throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");let{thisBinding,fnPath:fn11}=hoistFunctionEnvironment(this,noNewArrows,allowInsertArrow,allowInsertArrowWithRest);if(fn11.ensureBlock(),setType(fn11,"FunctionExpression"),!noNewArrows){let checkBinding=thisBinding?null:fn11.scope.generateUidIdentifier("arrowCheckId");return checkBinding&&fn11.parentPath.scope.push({id:checkBinding,init:objectExpression([])}),fn11.get("body").unshiftContainer("body",expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"),[thisExpression(),identifier(checkBinding?checkBinding.name:thisBinding)]))),fn11.replaceWith(callExpression(memberExpression((0, _helperFunctionName.default)(this,!0)||fn11.node,identifier("bind")),[checkBinding?identifier(checkBinding.name):thisExpression()])),fn11.get("callee.object")}return fn11}var getSuperCallsVisitor=(0, _visitors.merge)([{CallExpression(child,{allSuperCalls}){child.get("callee").isSuper()&&allSuperCalls.push(child);}},_helperEnvironmentVisitor.default]);function hoistFunctionEnvironment(fnPath,noNewArrows=!0,allowInsertArrow=!0,allowInsertArrowWithRest=!0){let arrowParent,thisEnvFn=fnPath.findParent(p7=>{if(p7.isArrowFunctionExpression()){return (arrowParent)!=null||(arrowParent=p7),!1}return p7.isFunction()||p7.isProgram()||p7.isClassProperty({static:!1})||p7.isClassPrivateProperty({static:!1})}),inConstructor=thisEnvFn.isClassMethod({kind:"constructor"});if(thisEnvFn.isClassProperty()||thisEnvFn.isClassPrivateProperty())if(arrowParent)thisEnvFn=arrowParent;else if(allowInsertArrow)fnPath.replaceWith(callExpression(arrowFunctionExpression([],toExpression(fnPath.node)),[])),thisEnvFn=fnPath.get("callee"),fnPath=thisEnvFn.get("body");else throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");let{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}=getScopeInformation(fnPath);if(inConstructor&&superCalls.length>0){if(!allowInsertArrow)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super()` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");if(!allowInsertArrowWithRest)throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");let allSuperCalls=[];thisEnvFn.traverse(getSuperCallsVisitor,{allSuperCalls});let superBinding=getSuperBinding(thisEnvFn);allSuperCalls.forEach(superCall=>{let callee=identifier(superBinding);callee.loc=superCall.node.callee.loc,superCall.get("callee").replaceWith(callee);});}if(argumentsPaths.length>0){let argumentsBinding=getBinding(thisEnvFn,"arguments",()=>{let args=()=>identifier("arguments");return thisEnvFn.scope.path.isProgram()?conditionalExpression(binaryExpression("===",unaryExpression("typeof",args()),stringLiteral("undefined")),thisEnvFn.scope.buildUndefinedNode(),args()):args()});argumentsPaths.forEach(argumentsChild=>{let argsRef=identifier(argumentsBinding);argsRef.loc=argumentsChild.node.loc,argumentsChild.replaceWith(argsRef);});}if(newTargetPaths.length>0){let newTargetBinding=getBinding(thisEnvFn,"newtarget",()=>metaProperty(identifier("new"),identifier("target")));newTargetPaths.forEach(targetChild=>{let targetRef=identifier(newTargetBinding);targetRef.loc=targetChild.node.loc,targetChild.replaceWith(targetRef);});}if(superProps.length>0){if(!allowInsertArrow)throw superProps[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', it's not possible to compile `super.prop` in an arrow function without compiling classes.\nPlease add '@babel/plugin-transform-classes' to your Babel configuration.");superProps.reduce((acc,superProp)=>acc.concat(standardizeSuperProperty(superProp)),[]).forEach(superProp=>{let key2=superProp.node.computed?"":superProp.get("property").node.name,superParentPath=superProp.parentPath,isAssignment=superParentPath.isAssignmentExpression({left:superProp.node}),isCall=superParentPath.isCallExpression({callee:superProp.node}),isTaggedTemplate=superParentPath.isTaggedTemplateExpression({tag:superProp.node}),superBinding=getSuperPropBinding(thisEnvFn,isAssignment,key2),args=[];if(superProp.node.computed&&args.push(superProp.get("property").node),isAssignment){let value=superParentPath.node.right;args.push(value);}let call=callExpression(identifier(superBinding),args);isCall?(superParentPath.unshiftContainer("arguments",thisExpression()),superProp.replaceWith(memberExpression(call,identifier("call"))),thisPaths.push(superParentPath.get("arguments.0"))):isAssignment?superParentPath.replaceWith(call):isTaggedTemplate?(superProp.replaceWith(callExpression(memberExpression(call,identifier("bind"),!1),[thisExpression()])),thisPaths.push(superProp.get("arguments.0"))):superProp.replaceWith(call);});}let thisBinding;return (thisPaths.length>0||!noNewArrows)&&(thisBinding=getThisBinding(thisEnvFn,inConstructor),(noNewArrows||inConstructor&&hasSuperClass(thisEnvFn))&&(thisPaths.forEach(thisChild=>{let thisRef=thisChild.isJSX()?jsxIdentifier(thisBinding):identifier(thisBinding);thisRef.loc=thisChild.node.loc,thisChild.replaceWith(thisRef);}),noNewArrows||(thisBinding=null))),{thisBinding,fnPath}}function isLogicalOp(op3){return LOGICAL_OPERATORS.includes(op3)}function standardizeSuperProperty(superProp){if(superProp.parentPath.isAssignmentExpression()&&superProp.parentPath.node.operator!=="="){let assignmentPath=superProp.parentPath,op3=assignmentPath.node.operator.slice(0,-1),value=assignmentPath.node.right,isLogicalAssignment=isLogicalOp(op3);if(superProp.node.computed){let tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,assignmentExpression("=",tmp,property),!0)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op3,memberExpression(object,identifier(tmp.name),!0),value));}else {let object=superProp.node.object,property=superProp.node.property;assignmentPath.get("left").replaceWith(memberExpression(object,property)),assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment?"=":op3,memberExpression(object,identifier(property.name)),value));}return isLogicalAssignment?assignmentPath.replaceWith(logicalExpression(op3,assignmentPath.node.left,assignmentPath.node.right)):assignmentPath.node.operator="=",[assignmentPath.get("left"),assignmentPath.get("right").get("left")]}else if(superProp.parentPath.isUpdateExpression()){let updateExpr=superProp.parentPath,tmp=superProp.scope.generateDeclaredUidIdentifier("tmp"),computedKey=superProp.node.computed?superProp.scope.generateDeclaredUidIdentifier("prop"):null,parts=[assignmentExpression("=",tmp,memberExpression(superProp.node.object,computedKey?assignmentExpression("=",computedKey,superProp.node.property):superProp.node.property,superProp.node.computed)),assignmentExpression("=",memberExpression(superProp.node.object,computedKey?identifier(computedKey.name):superProp.node.property,superProp.node.computed),binaryExpression(superProp.parentPath.node.operator[0],identifier(tmp.name),numericLiteral(1)))];superProp.parentPath.node.prefix||parts.push(identifier(tmp.name)),updateExpr.replaceWith(sequenceExpression(parts));let left=updateExpr.get("expressions.0.right"),right=updateExpr.get("expressions.1.left");return [left,right]}return [superProp];function rightExpression(op3,left,right){return op3==="="?assignmentExpression("=",left,right):binaryExpression(op3,left,right)}}function hasSuperClass(thisEnvFn){return thisEnvFn.isClassMethod()&&!!thisEnvFn.parentPath.parentPath.node.superClass}var assignSuperThisVisitor=(0, _visitors.merge)([{CallExpression(child,{supers,thisBinding}){child.get("callee").isSuper()&&(supers.has(child.node)||(supers.add(child.node),child.replaceWithMultiple([child.node,assignmentExpression("=",identifier(thisBinding),identifier("this"))])));}},_helperEnvironmentVisitor.default]);function getThisBinding(thisEnvFn,inConstructor){return getBinding(thisEnvFn,"this",thisBinding=>{if(!inConstructor||!hasSuperClass(thisEnvFn))return thisExpression();thisEnvFn.traverse(assignSuperThisVisitor,{supers:new WeakSet,thisBinding});})}function getSuperBinding(thisEnvFn){return getBinding(thisEnvFn,"supercall",()=>{let argsBinding=thisEnvFn.scope.generateUidIdentifier("args");return arrowFunctionExpression([restElement(argsBinding)],callExpression(_super(),[spreadElement(identifier(argsBinding.name))]))})}function getSuperPropBinding(thisEnvFn,isAssignment,propName){return getBinding(thisEnvFn,`superprop_${isAssignment?"set":"get"}:${propName||""}`,()=>{let argsList=[],fnBody;if(propName)fnBody=memberExpression(_super(),identifier(propName));else {let method=thisEnvFn.scope.generateUidIdentifier("prop");argsList.unshift(method),fnBody=memberExpression(_super(),identifier(method.name),!0);}if(isAssignment){let valueIdent=thisEnvFn.scope.generateUidIdentifier("value");argsList.push(valueIdent),fnBody=assignmentExpression("=",fnBody,identifier(valueIdent.name));}return arrowFunctionExpression(argsList,fnBody)})}function getBinding(thisEnvFn,key2,init){let cacheKey="binding:"+key2,data=thisEnvFn.getData(cacheKey);if(!data){let id2=thisEnvFn.scope.generateUidIdentifier(key2);data=id2.name,thisEnvFn.setData(cacheKey,data),thisEnvFn.scope.push({id:id2,init:init(data)});}return data}var getScopeInformationVisitor=(0, _visitors.merge)([{ThisExpression(child,{thisPaths}){thisPaths.push(child);},JSXIdentifier(child,{thisPaths}){child.node.name==="this"&&(!child.parentPath.isJSXMemberExpression({object:child.node})&&!child.parentPath.isJSXOpeningElement({name:child.node})||thisPaths.push(child));},CallExpression(child,{superCalls}){child.get("callee").isSuper()&&superCalls.push(child);},MemberExpression(child,{superProps}){child.get("object").isSuper()&&superProps.push(child);},Identifier(child,{argumentsPaths}){if(!child.isReferencedIdentifier({name:"arguments"}))return;let curr=child.scope;do{if(curr.hasOwnBinding("arguments")){curr.rename("arguments");return}if(curr.path.isFunction()&&!curr.path.isArrowFunctionExpression())break}while(curr=curr.parent);argumentsPaths.push(child);},MetaProperty(child,{newTargetPaths}){child.get("meta").isIdentifier({name:"new"})&&child.get("property").isIdentifier({name:"target"})&&newTargetPaths.push(child);}},_helperEnvironmentVisitor.default]);function getScopeInformation(fnPath){let thisPaths=[],argumentsPaths=[],newTargetPaths=[],superProps=[],superCalls=[];return fnPath.traverse(getScopeInformationVisitor,{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}),{thisPaths,argumentsPaths,newTargetPaths,superProps,superCalls}}}});var require_introspection=__commonJS({"../../node_modules/@babel/traverse/lib/path/introspection.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports._resolve=_resolve;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.canSwapBetweenExpressionAndStatement=canSwapBetweenExpressionAndStatement;exports.equals=equals;exports.getSource=getSource;exports.has=has;exports.is=void 0;exports.isCompletionRecord=isCompletionRecord;exports.isConstantExpression=isConstantExpression;exports.isInStrictMode=isInStrictMode;exports.isNodeType=isNodeType;exports.isStatementOrBlock=isStatementOrBlock;exports.isStatic=isStatic;exports.isnt=isnt;exports.matchesPattern=matchesPattern;exports.referencesImport=referencesImport;exports.resolve=resolve4;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;var _t14=require_lib13(),{STATEMENT_OR_BLOCK_KEYS,VISITOR_KEYS,isBlockStatement,isExpression,isIdentifier,isLiteral,isStringLiteral,isType,matchesPattern:_matchesPattern}=_t14;function matchesPattern(pattern,allowPartial){return _matchesPattern(this.node,pattern,allowPartial)}function has(key2){let val=this.node&&this.node[key2];return val&&Array.isArray(val)?!!val.length:!!val}function isStatic(){return this.scope.isStatic(this.node)}exports.is=has;function isnt(key2){return !this.has(key2)}function equals(key2,value){return this.node[key2]===value}function isNodeType(type2){return isType(this.type,type2)}function canHaveVariableDeclarationOrExpression(){return (this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function canSwapBetweenExpressionAndStatement(replacement){return this.key!=="body"||!this.parentPath.isArrowFunctionExpression()?!1:this.isExpression()?isBlockStatement(replacement):this.isBlockStatement()?isExpression(replacement):!1}function isCompletionRecord(allowInsideFunction){let path14=this,first=!0;do{let{type:type2,container}=path14;if(!first&&(path14.isFunction()||type2==="StaticBlock"))return !!allowInsideFunction;if(first=!1,Array.isArray(container)&&path14.key!==container.length-1)return !1}while((path14=path14.parentPath)&&!path14.isProgram()&&!path14.isDoExpression());return !0}function isStatementOrBlock(){return this.parentPath.isLabeledStatement()||isBlockStatement(this.container)?!1:STATEMENT_OR_BLOCK_KEYS.includes(this.key)}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier()){if(this.isJSXMemberExpression()&&this.node.property.name===importName||(this.isMemberExpression()||this.isOptionalMemberExpression())&&(this.node.computed?isStringLiteral(this.node.property,{value:importName}):this.node.property.name===importName)){let object=this.get("object");return object.isReferencedIdentifier()&&object.referencesImport(moduleSource,"*")}return !1}let binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return !1;let path14=binding.path,parent=path14.parentPath;if(!parent.isImportDeclaration())return !1;if(parent.node.source.value===moduleSource){if(!importName)return !0}else return !1;return !!(path14.isImportDefaultSpecifier()&&importName==="default"||path14.isImportNamespaceSpecifier()&&importName==="*"||path14.isImportSpecifier()&&isIdentifier(path14.node.imported,{name:importName}))}function getSource(){let node=this.node;if(node.end){let code=this.hub.getCode();if(code)return code.slice(node.start,node.end)}return ""}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function getOuterFunction(path14){return path14.isProgram()?path14:(path14.parentPath.scope.getFunctionParent()||path14.parentPath.scope.getProgramParent()).path}function isExecutionUncertain(type2,key2){switch(type2){case"LogicalExpression":return key2==="right";case"ConditionalExpression":case"IfStatement":return key2==="consequent"||key2==="alternate";case"WhileStatement":case"DoWhileStatement":case"ForInStatement":case"ForOfStatement":return key2==="body";case"ForStatement":return key2==="body"||key2==="update";case"SwitchStatement":return key2==="cases";case"TryStatement":return key2==="handler";case"AssignmentPattern":return key2==="right";case"OptionalMemberExpression":return key2==="property";case"OptionalCallExpression":return key2==="arguments";default:return !1}}function isExecutionUncertainInList(paths,maxIndex){for(let i3=0;i3<maxIndex;i3++){let path14=paths[i3];if(isExecutionUncertain(path14.parent.type,path14.parentKey))return !0}return !1}var SYMBOL_CHECKING=Symbol();function _guessExecutionStatusRelativeTo(target){return _guessExecutionStatusRelativeToCached(this,target,new Map)}function _guessExecutionStatusRelativeToCached(base,target,cache3){let funcParent={this:getOuterFunction(base),target:getOuterFunction(target)};if(funcParent.target.node!==funcParent.this.node)return _guessExecutionStatusRelativeToDifferentFunctionsCached(base,funcParent.target,cache3);let paths={target:target.getAncestry(),this:base.getAncestry()};if(paths.target.indexOf(base)>=0)return "after";if(paths.this.indexOf(target)>=0)return "before";let commonPath,commonIndex={target:0,this:0};for(;!commonPath&&commonIndex.this<paths.this.length;){let path14=paths.this[commonIndex.this];commonIndex.target=paths.target.indexOf(path14),commonIndex.target>=0?commonPath=path14:commonIndex.this++;}if(!commonPath)throw new Error("Internal Babel error - The two compared nodes don't appear to belong to the same program.");if(isExecutionUncertainInList(paths.this,commonIndex.this-1)||isExecutionUncertainInList(paths.target,commonIndex.target-1))return "unknown";let divergence={this:paths.this[commonIndex.this-1],target:paths.target[commonIndex.target-1]};if(divergence.target.listKey&&divergence.this.listKey&&divergence.target.container===divergence.this.container)return divergence.target.key>divergence.this.key?"before":"after";let keys=VISITOR_KEYS[commonPath.type],keyPosition={this:keys.indexOf(divergence.this.parentKey),target:keys.indexOf(divergence.target.parentKey)};return keyPosition.target>keyPosition.this?"before":"after"}function _guessExecutionStatusRelativeToDifferentFunctionsInternal(base,target,cache3){if(target.isFunctionDeclaration()){if(target.parentPath.isExportDeclaration())return "unknown"}else return _guessExecutionStatusRelativeToCached(base,target,cache3)==="before"?"before":"unknown";let binding=target.scope.getBinding(target.node.id.name);if(!binding.references)return "before";let referencePaths=binding.referencePaths,allStatus;for(let path14 of referencePaths){if(!!path14.find(path15=>path15.node===target.node))continue;if(path14.key!=="callee"||!path14.parentPath.isCallExpression())return "unknown";let status=_guessExecutionStatusRelativeToCached(base,path14,cache3);if(allStatus&&allStatus!==status)return "unknown";allStatus=status;}return allStatus}function _guessExecutionStatusRelativeToDifferentFunctionsCached(base,target,cache3){let nodeMap=cache3.get(base.node),cached;if(!nodeMap)cache3.set(base.node,nodeMap=new Map);else if(cached=nodeMap.get(target.node))return cached===SYMBOL_CHECKING?"unknown":cached;nodeMap.set(target.node,SYMBOL_CHECKING);let result=_guessExecutionStatusRelativeToDifferentFunctionsInternal(base,target,cache3);return nodeMap.set(target.node,result),result}function resolve4(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){if(!(resolved&&resolved.indexOf(this)>=0))if(resolved=resolved||[],resolved.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(dangerous,resolved)}else if(this.isReferencedIdentifier()){let binding=this.scope.getBinding(this.node.name);if(!binding||!binding.constant||binding.kind==="module")return;if(binding.path!==this){let ret=binding.path.resolve(dangerous,resolved);return this.find(parent=>parent.node===ret.node)?void 0:ret}}else {if(this.isTypeCastExpression())return this.get("expression").resolve(dangerous,resolved);if(dangerous&&this.isMemberExpression()){let targetKey=this.toComputedKey();if(!isLiteral(targetKey))return;let targetName=targetKey.value,target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){let props=target.get("properties");for(let prop of props){if(!prop.isProperty())continue;let key2=prop.get("key"),match=prop.isnt("computed")&&key2.isIdentifier({name:targetName});if(match=match||key2.isLiteral({value:targetName}),match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){let elem=target.get("elements")[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}}function isConstantExpression(){if(this.isIdentifier()){let binding=this.scope.getBinding(this.node.name);return binding?binding.constant:!1}if(this.isLiteral())return this.isRegExpLiteral()?!1:this.isTemplateLiteral()?this.get("expressions").every(expression=>expression.isConstantExpression()):!0;if(this.isUnaryExpression())return this.node.operator!=="void"?!1:this.get("argument").isConstantExpression();if(this.isBinaryExpression()){let{operator}=this.node;return operator!=="in"&&operator!=="instanceof"&&this.get("left").isConstantExpression()&&this.get("right").isConstantExpression()}return this.isMemberExpression()?!this.node.computed&&this.get("object").isIdentifier({name:"Symbol"})&&!this.scope.hasBinding("Symbol",{noGlobals:!0}):this.isCallExpression()?this.node.arguments.length===1&&this.get("callee").matchesPattern("Symbol.for")&&!this.scope.hasBinding("Symbol",{noGlobals:!0})&&this.get("arguments")[0].isStringLiteral():!1}function isInStrictMode(){return !!(this.isProgram()?this:this.parentPath).find(path14=>{if(path14.isProgram({sourceType:"module"})||path14.isClass())return !0;if(path14.isArrowFunctionExpression()&&!path14.get("body").isBlockStatement())return !1;let body;if(path14.isFunction())body=path14.node.body;else if(path14.isProgram())body=path14.node;else return !1;for(let directive of body.directives)if(directive.value.value==="use strict")return !0})}}});var require_context=__commonJS({"../../node_modules/@babel/traverse/lib/path/context.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._call=_call;exports._getQueueContexts=_getQueueContexts;exports._resyncKey=_resyncKey;exports._resyncList=_resyncList;exports._resyncParent=_resyncParent;exports._resyncRemoved=_resyncRemoved;exports.call=call;exports.isBlacklisted=exports.isDenylisted=isDenylisted;exports.popContext=popContext;exports.pushContext=pushContext;exports.requeue=requeue;exports.resync=resync;exports.setContext=setContext;exports.setKey=setKey;exports.setScope=setScope;exports.setup=setup;exports.skip=skip3;exports.skipKey=skipKey;exports.stop=stop;exports.visit=visit;var _traverseNode=require_traverse_node(),_index=require_path4();function call(key2){let opts=this.opts;if(this.debug(key2),this.node&&this._call(opts[key2]))return !0;if(this.node){var _opts$this$node$type;return this._call((_opts$this$node$type=opts[this.node.type])==null?void 0:_opts$this$node$type[key2])}return !1}function _call(fns){if(!fns)return !1;for(let fn11 of fns){if(!fn11)continue;let node=this.node;if(!node)return !0;let ret=fn11.call(this.state,this,this.state);if(ret&&typeof ret=="object"&&typeof ret.then=="function")throw new Error("You appear to be using a plugin with an async traversal visitor, which your current version of Babel does not support. If you're using a published plugin, you may need to upgrade your @babel/core version.");if(ret)throw new Error(`Unexpected return value from visitor method ${fn11}`);if(this.node!==node||this._traverseFlags>0)return !0}return !1}function isDenylisted(){var _this$opts$denylist;let denylist=(_this$opts$denylist=this.opts.denylist)!=null?_this$opts$denylist:this.opts.blacklist;return denylist&&denylist.indexOf(this.node.type)>-1}function restoreContext(path14,context){path14.context!==context&&(path14.context=context,path14.state=context.state,path14.opts=context.opts);}function visit(){var _this$opts$shouldSkip,_this$opts;if(!this.node||this.isDenylisted()||(_this$opts$shouldSkip=(_this$opts=this.opts).shouldSkip)!=null&&_this$opts$shouldSkip.call(_this$opts,this))return !1;let currentContext=this.context;return this.shouldSkip||this.call("enter")?(this.debug("Skip..."),this.shouldStop):(restoreContext(this,currentContext),this.debug("Recursing into..."),this.shouldStop=(0, _traverseNode.traverseNode)(this.node,this.opts,this.scope,this.state,this,this.skipKeys),restoreContext(this,currentContext),this.call("exit"),this.shouldStop)}function skip3(){this.shouldSkip=!0;}function skipKey(key2){this.skipKeys==null&&(this.skipKeys={}),this.skipKeys[key2]=!0;}function stop(){this._traverseFlags|=_index.SHOULD_SKIP|_index.SHOULD_STOP;}function setScope(){var _this$opts2,_this$scope;if((_this$opts2=this.opts)!=null&&_this$opts2.noScope)return;let path14=this.parentPath;((this.key==="key"||this.listKey==="decorators")&&path14.isMethod()||this.key==="discriminant"&&path14.isSwitchStatement())&&(path14=path14.parentPath);let target;for(;path14&&!target;){var _path$opts;if((_path$opts=path14.opts)!=null&&_path$opts.noScope)return;target=path14.scope,path14=path14.parentPath;}this.scope=this.getScope(target),(_this$scope=this.scope)==null||_this$scope.init();}function setContext(context){return this.skipKeys!=null&&(this.skipKeys={}),this._traverseFlags=0,context&&(this.context=context,this.state=context.state,this.opts=context.opts),this.setScope(),this}function resync(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey());}function _resyncParent(){this.parentPath&&(this.parent=this.parentPath.node);}function _resyncKey(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(let i3=0;i3<this.container.length;i3++)if(this.container[i3]===this.node){this.setKey(i3);return}}else for(let key2 of Object.keys(this.container))if(this.container[key2]===this.node){this.setKey(key2);return}this.key=null;}}function _resyncList(){if(!this.parent||!this.inList)return;let newContainer=this.parent[this.listKey];this.container!==newContainer&&(this.container=newContainer||null);}function _resyncRemoved(){(this.key==null||!this.container||this.container[this.key]!==this.node)&&this._markRemoved();}function popContext(){this.contexts.pop(),this.contexts.length>0?this.setContext(this.contexts[this.contexts.length-1]):this.setContext(void 0);}function pushContext(context){this.contexts.push(context),this.setContext(context);}function setup(parentPath,container,listKey,key2){this.listKey=listKey,this.container=container,this.parentPath=parentPath||this.parentPath,this.setKey(key2);}function setKey(key2){var _this$node;this.key=key2,this.node=this.container[this.key],this.type=(_this$node=this.node)==null?void 0:_this$node.type;}function requeue(pathToQueue=this){if(pathToQueue.removed)return;let contexts=this.contexts;for(let context of contexts)context.maybeQueue(pathToQueue);}function _getQueueContexts(){let path14=this,contexts=this.contexts;for(;!contexts.length&&(path14=path14.parentPath,!!path14);)contexts=path14.contexts;return contexts}}});var require_removal_hooks=__commonJS({"../../node_modules/@babel/traverse/lib/path/lib/removal-hooks.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.hooks=void 0;exports.hooks=[function(self2,parent){if(self2.key==="test"&&(parent.isWhile()||parent.isSwitchCase())||self2.key==="declaration"&&parent.isExportDeclaration()||self2.key==="body"&&parent.isLabeledStatement()||self2.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===1||self2.key==="expression"&&parent.isExpressionStatement())return parent.remove(),!0},function(self2,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1)return parent.replaceWith(parent.node.expressions[0]),!0},function(self2,parent){if(parent.isBinary())return self2.key==="left"?parent.replaceWith(parent.node.right):parent.replaceWith(parent.node.left),!0},function(self2,parent){if(parent.isIfStatement()&&self2.key==="consequent"||self2.key==="body"&&(parent.isLoop()||parent.isArrowFunctionExpression()))return self2.replaceWith({type:"BlockStatement",body:[]}),!0}];}});var require_removal=__commonJS({"../../node_modules/@babel/traverse/lib/path/removal.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._assertUnremoved=_assertUnremoved;exports._callRemovalHooks=_callRemovalHooks;exports._markRemoved=_markRemoved;exports._remove=_remove;exports._removeFromScope=_removeFromScope;exports.remove=remove;var _removalHooks=require_removal_hooks(),_cache2=require_cache(),_index=require_path4(),_t14=require_lib13(),{getBindingIdentifiers}=_t14;function remove(){var _this$opts;if(this._assertUnremoved(),this.resync(),(_this$opts=this.opts)!=null&&_this$opts.noScope||this._removeFromScope(),this._callRemovalHooks()){this._markRemoved();return}this.shareCommentsWithSiblings(),this._remove(),this._markRemoved();}function _removeFromScope(){let bindings=getBindingIdentifiers(this.node,!1,!1,!0);Object.keys(bindings).forEach(name=>this.scope.removeBinding(name));}function _callRemovalHooks(){if(this.parentPath){for(let fn11 of _removalHooks.hooks)if(fn11(this,this.parentPath))return !0}}function _remove(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null);}function _markRemoved(){this._traverseFlags|=_index.SHOULD_SKIP|_index.REMOVED,this.parent&&(0, _cache2.getCachedPaths)(this.hub,this.parent).delete(this.node),this.node=null;}function _assertUnremoved(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}}});var require_hoister=__commonJS({"../../node_modules/@babel/traverse/lib/path/lib/hoister.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var _t14=require_lib13(),_t22=_t14,{react}=_t14,{cloneNode,jsxExpressionContainer,variableDeclaration,variableDeclarator}=_t22,referenceVisitor={ReferencedIdentifier(path14,state){if(path14.isJSXIdentifier()&&react.isCompatTag(path14.node.name)&&!path14.parentPath.isJSXMemberExpression())return;if(path14.node.name==="this"){let scope=path14.scope;do if(scope.path.isFunction()&&!scope.path.isArrowFunctionExpression())break;while(scope=scope.parent);scope&&state.breakOnScopePaths.push(scope.path);}let binding=path14.scope.getBinding(path14.node.name);if(binding){for(let violation of binding.constantViolations)if(violation.scope!==binding.path.scope){state.mutableBinding=!0,path14.stop();return}binding===state.scope.getBinding(path14.node.name)&&(state.bindings[path14.node.name]=binding);}}},PathHoister=class{constructor(path14,scope){this.breakOnScopePaths=void 0,this.bindings=void 0,this.mutableBinding=void 0,this.scopes=void 0,this.scope=void 0,this.path=void 0,this.attachAfter=void 0,this.breakOnScopePaths=[],this.bindings={},this.mutableBinding=!1,this.scopes=[],this.scope=scope,this.path=path14,this.attachAfter=!1;}isCompatibleScope(scope){for(let key2 of Object.keys(this.bindings)){let binding=this.bindings[key2];if(!scope.bindingIdentifierEquals(key2,binding.identifier))return !1}return !0}getCompatibleScopes(){let scope=this.path.scope;do{if(this.isCompatibleScope(scope))this.scopes.push(scope);else break;if(this.breakOnScopePaths.indexOf(scope.path)>=0)break}while(scope=scope.parent)}getAttachmentPath(){let path14=this._getAttachmentPath();if(!path14)return;let targetScope=path14.scope;if(targetScope.path===path14&&(targetScope=path14.scope.parent),targetScope.path.isProgram()||targetScope.path.isFunction())for(let name of Object.keys(this.bindings)){if(!targetScope.hasOwnBinding(name))continue;let binding=this.bindings[name];if(binding.kind==="param"||binding.path.parentKey==="params")continue;if(this.getAttachmentParentForPath(binding.path).key>=path14.key){this.attachAfter=!0,path14=binding.path;for(let violationPath of binding.constantViolations)this.getAttachmentParentForPath(violationPath).key>path14.key&&(path14=violationPath);}}return path14}_getAttachmentPath(){let scope=this.scopes.pop();if(scope){if(scope.path.isFunction())if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;let bodies=scope.path.get("body").get("body");for(let i3=0;i3<bodies.length;i3++)if(!bodies[i3].node._blockHoist)return bodies[i3]}else return this.getNextScopeAttachmentParent();else if(scope.path.isProgram())return this.getNextScopeAttachmentParent()}}getNextScopeAttachmentParent(){let scope=this.scopes.pop();if(scope)return this.getAttachmentParentForPath(scope.path)}getAttachmentParentForPath(path14){do if(!path14.parentPath||Array.isArray(path14.container)&&path14.isStatement())return path14;while(path14=path14.parentPath)}hasOwnParamBindings(scope){for(let name of Object.keys(this.bindings)){if(!scope.hasOwnBinding(name))continue;let binding=this.bindings[name];if(binding.kind==="param"&&binding.constant)return !0}return !1}run(){if(this.path.traverse(referenceVisitor,this),this.mutableBinding)return;this.getCompatibleScopes();let attachTo=this.getAttachmentPath();if(!attachTo||attachTo.getFunctionParent()===this.path.getFunctionParent())return;let uid=attachTo.scope.generateUidIdentifier("ref"),declarator=variableDeclarator(uid,this.path.node),insertFn=this.attachAfter?"insertAfter":"insertBefore",[attached]=attachTo[insertFn]([attachTo.isVariableDeclarator()?declarator:variableDeclaration("var",[declarator])]),parent=this.path.parentPath;return parent.isJSXElement()&&this.path.container===parent.node.children&&(uid=jsxExpressionContainer(uid)),this.path.replaceWith(cloneNode(uid)),attachTo.isVariableDeclarator()?attached.get("init"):attached.get("declarations.0.init")}};exports.default=PathHoister;}});var require_modification=__commonJS({"../../node_modules/@babel/traverse/lib/path/modification.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._containerInsert=_containerInsert;exports._containerInsertAfter=_containerInsertAfter;exports._containerInsertBefore=_containerInsertBefore;exports._verifyNodeList=_verifyNodeList;exports.hoist=hoist;exports.insertAfter=insertAfter;exports.insertBefore=insertBefore;exports.pushContainer=pushContainer;exports.unshiftContainer=unshiftContainer;exports.updateSiblingKeys=updateSiblingKeys;var _cache2=require_cache(),_hoister=require_hoister(),_index=require_path4(),_t14=require_lib13(),{arrowFunctionExpression,assertExpression,assignmentExpression,blockStatement,callExpression,cloneNode,expressionStatement,isAssignmentExpression,isCallExpression,isExportNamedDeclaration,isExpression,isIdentifier,isSequenceExpression,isSuper,thisExpression}=_t14;function insertBefore(nodes_){this._assertUnremoved();let nodes=this._verifyNodeList(nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertBefore(nodes);if(this.isNodeType("Expression")&&!this.isJSXElement()||parentPath.isForStatement()&&this.key==="init")return this.node&&nodes.push(this.node),this.replaceExpressionWithStatements(nodes);if(Array.isArray(this.container))return this._containerInsertBefore(nodes);if(this.isStatementOrBlock()){let node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||node.expression!=null);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.unshiftContainer("body",nodes)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);let paths=[];this.container.splice(from,0,...nodes);for(let i3=0;i3<nodes.length;i3++){var _this$context;let to5=from+i3,path14=this.getSibling(to5);paths.push(path14),(_this$context=this.context)!=null&&_this$context.queue&&path14.pushContext(this.context);}let contexts=this._getQueueContexts();for(let path14 of paths){path14.setScope(),path14.debug("Inserted.");for(let context of contexts)context.maybeQueue(path14,!0);}return paths}function _containerInsertBefore(nodes){return this._containerInsert(this.key,nodes)}function _containerInsertAfter(nodes){return this._containerInsert(this.key+1,nodes)}var last=arr=>arr[arr.length-1];function isHiddenInSequenceExpression(path14){return isSequenceExpression(path14.parent)&&(last(path14.parent.expressions)!==path14.node||isHiddenInSequenceExpression(path14.parentPath))}function isAlmostConstantAssignment(node,scope){if(!isAssignmentExpression(node)||!isIdentifier(node.left))return !1;let blockScope=scope.getBlockParent();return blockScope.hasOwnBinding(node.left.name)&&blockScope.getOwnBinding(node.left.name).constantViolations.length<=1}function insertAfter(nodes_){if(this._assertUnremoved(),this.isSequenceExpression())return last(this.get("expressions")).insertAfter(nodes_);let nodes=this._verifyNodeList(nodes_),{parentPath,parent}=this;if(parentPath.isExpressionStatement()||parentPath.isLabeledStatement()||isExportNamedDeclaration(parent)||parentPath.isExportDefaultDeclaration()&&this.isDeclaration())return parentPath.insertAfter(nodes.map(node=>isExpression(node)?expressionStatement(node):node));if(this.isNodeType("Expression")&&!this.isJSXElement()&&!parentPath.isJSXElement()||parentPath.isForStatement()&&this.key==="init"){if(this.node){let node=this.node,{scope}=this;if(scope.path.isPattern())return assertExpression(node),this.replaceWith(callExpression(arrowFunctionExpression([],node),[])),this.get("callee.body").insertAfter(nodes),[this];if(isHiddenInSequenceExpression(this))nodes.unshift(node);else if(isCallExpression(node)&&isSuper(node.callee))nodes.unshift(node),nodes.push(thisExpression());else if(isAlmostConstantAssignment(node,scope))nodes.unshift(node),nodes.push(cloneNode(node.left));else if(scope.isPure(node,!0))nodes.push(node);else {parentPath.isMethod({computed:!0,key:node})&&(scope=scope.parent);let temp=scope.generateDeclaredUidIdentifier();nodes.unshift(expressionStatement(assignmentExpression("=",cloneNode(temp),node))),nodes.push(expressionStatement(cloneNode(temp)));}}return this.replaceExpressionWithStatements(nodes)}else {if(Array.isArray(this.container))return this._containerInsertAfter(nodes);if(this.isStatementOrBlock()){let node=this.node,shouldInsertCurrentNode=node&&(!this.isExpressionStatement()||node.expression!=null);return this.replaceWith(blockStatement(shouldInsertCurrentNode?[node]:[])),this.pushContainer("body",nodes)}else throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}function updateSiblingKeys(fromIndex,incrementBy){if(!this.parent)return;let paths=(0, _cache2.getCachedPaths)(this.hub,this.parent)||[];for(let[,path14]of paths)typeof path14.key=="number"&&path14.key>=fromIndex&&(path14.key+=incrementBy);}function _verifyNodeList(nodes){if(!nodes)return [];Array.isArray(nodes)||(nodes=[nodes]);for(let i3=0;i3<nodes.length;i3++){let node=nodes[i3],msg;if(node?typeof node!="object"?msg="contains a non-object node":node.type?node instanceof _index.default&&(msg="has a NodePath when it expected a raw object"):msg="without a type":msg="has falsy node",msg){let type2=Array.isArray(node)?"array":typeof node;throw new Error(`Node list ${msg} with the index of ${i3} and type of ${type2}`)}}return nodes}function unshiftContainer(listKey,nodes){return this._assertUnremoved(),nodes=this._verifyNodeList(nodes),_index.default.get({parentPath:this,parent:this.node,container:this.node[listKey],listKey,key:0}).setContext(this.context)._containerInsertBefore(nodes)}function pushContainer(listKey,nodes){this._assertUnremoved();let verifiedNodes=this._verifyNodeList(nodes),container=this.node[listKey];return _index.default.get({parentPath:this,parent:this.node,container,listKey,key:container.length}).setContext(this.context).replaceWithMultiple(verifiedNodes)}function hoist(scope=this.scope){return new _hoister.default(this,scope).run()}}});var require_family=__commonJS({"../../node_modules/@babel/traverse/lib/path/family.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports._getKey=_getKey;exports._getPattern=_getPattern;exports.get=get;exports.getAllNextSiblings=getAllNextSiblings;exports.getAllPrevSiblings=getAllPrevSiblings;exports.getBindingIdentifierPaths=getBindingIdentifierPaths;exports.getBindingIdentifiers=getBindingIdentifiers;exports.getCompletionRecords=getCompletionRecords;exports.getNextSibling=getNextSibling;exports.getOpposite=getOpposite;exports.getOuterBindingIdentifierPaths=getOuterBindingIdentifierPaths;exports.getOuterBindingIdentifiers=getOuterBindingIdentifiers;exports.getPrevSibling=getPrevSibling;exports.getSibling=getSibling;var _index=require_path4(),_t14=require_lib13(),{getBindingIdentifiers:_getBindingIdentifiers,getOuterBindingIdentifiers:_getOuterBindingIdentifiers,isDeclaration,numericLiteral,unaryExpression}=_t14,NORMAL_COMPLETION=0,BREAK_COMPLETION=1;function NormalCompletion(path14){return {type:NORMAL_COMPLETION,path:path14}}function BreakCompletion(path14){return {type:BREAK_COMPLETION,path:path14}}function getOpposite(){return this.key==="left"?this.getSibling("right"):this.key==="right"?this.getSibling("left"):null}function addCompletionRecords(path14,records,context){return path14&&records.push(..._getCompletionRecords(path14,context)),records}function completionRecordForSwitch(cases,records,context){let lastNormalCompletions=[];for(let i3=0;i3<cases.length;i3++){let casePath=cases[i3],caseCompletions=_getCompletionRecords(casePath,context),normalCompletions=[],breakCompletions=[];for(let c8 of caseCompletions)c8.type===NORMAL_COMPLETION&&normalCompletions.push(c8),c8.type===BREAK_COMPLETION&&breakCompletions.push(c8);normalCompletions.length&&(lastNormalCompletions=normalCompletions),records.push(...breakCompletions);}return records.push(...lastNormalCompletions),records}function normalCompletionToBreak(completions){completions.forEach(c8=>{c8.type=BREAK_COMPLETION;});}function replaceBreakStatementInBreakCompletion(completions,reachable){completions.forEach(c8=>{c8.path.isBreakStatement({label:null})&&(reachable?c8.path.replaceWith(unaryExpression("void",numericLiteral(0))):c8.path.remove());});}function getStatementListCompletion(paths,context){let completions=[];if(context.canHaveBreak){let lastNormalCompletions=[];for(let i3=0;i3<paths.length;i3++){let path14=paths[i3],newContext=Object.assign({},context,{inCaseClause:!1});path14.isBlockStatement()&&(context.inCaseClause||context.shouldPopulateBreak)?newContext.shouldPopulateBreak=!0:newContext.shouldPopulateBreak=!1;let statementCompletions=_getCompletionRecords(path14,newContext);if(statementCompletions.length>0&&statementCompletions.every(c8=>c8.type===BREAK_COMPLETION)){lastNormalCompletions.length>0&&statementCompletions.every(c8=>c8.path.isBreakStatement({label:null}))?(normalCompletionToBreak(lastNormalCompletions),completions.push(...lastNormalCompletions),lastNormalCompletions.some(c8=>c8.path.isDeclaration())&&(completions.push(...statementCompletions),replaceBreakStatementInBreakCompletion(statementCompletions,!0)),replaceBreakStatementInBreakCompletion(statementCompletions,!1)):(completions.push(...statementCompletions),context.shouldPopulateBreak||replaceBreakStatementInBreakCompletion(statementCompletions,!0));break}if(i3===paths.length-1)completions.push(...statementCompletions);else {lastNormalCompletions=[];for(let i4=0;i4<statementCompletions.length;i4++){let c8=statementCompletions[i4];c8.type===BREAK_COMPLETION&&completions.push(c8),c8.type===NORMAL_COMPLETION&&lastNormalCompletions.push(c8);}}}}else if(paths.length)for(let i3=paths.length-1;i3>=0;i3--){let pathCompletions=_getCompletionRecords(paths[i3],context);if(pathCompletions.length>1||pathCompletions.length===1&&!pathCompletions[0].path.isVariableDeclaration()){completions.push(...pathCompletions);break}}return completions}function _getCompletionRecords(path14,context){let records=[];if(path14.isIfStatement())records=addCompletionRecords(path14.get("consequent"),records,context),records=addCompletionRecords(path14.get("alternate"),records,context);else {if(path14.isDoExpression()||path14.isFor()||path14.isWhile()||path14.isLabeledStatement())return addCompletionRecords(path14.get("body"),records,context);if(path14.isProgram()||path14.isBlockStatement())return getStatementListCompletion(path14.get("body"),context);if(path14.isFunction())return _getCompletionRecords(path14.get("body"),context);if(path14.isTryStatement())records=addCompletionRecords(path14.get("block"),records,context),records=addCompletionRecords(path14.get("handler"),records,context);else {if(path14.isCatchClause())return addCompletionRecords(path14.get("body"),records,context);if(path14.isSwitchStatement())return completionRecordForSwitch(path14.get("cases"),records,context);if(path14.isSwitchCase())return getStatementListCompletion(path14.get("consequent"),{canHaveBreak:!0,shouldPopulateBreak:!1,inCaseClause:!0});path14.isBreakStatement()?records.push(BreakCompletion(path14)):records.push(NormalCompletion(path14));}}return records}function getCompletionRecords(){return _getCompletionRecords(this,{canHaveBreak:!1,shouldPopulateBreak:!1,inCaseClause:!1}).map(r8=>r8.path)}function getSibling(key2){return _index.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key2}).setContext(this.context)}function getPrevSibling(){return this.getSibling(this.key-1)}function getNextSibling(){return this.getSibling(this.key+1)}function getAllNextSiblings(){let _key=this.key,sibling=this.getSibling(++_key),siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(++_key);return siblings}function getAllPrevSiblings(){let _key=this.key,sibling=this.getSibling(--_key),siblings=[];for(;sibling.node;)siblings.push(sibling),sibling=this.getSibling(--_key);return siblings}function get(key2,context=!0){context===!0&&(context=this.context);let parts=key2.split(".");return parts.length===1?this._getKey(key2,context):this._getPattern(parts,context)}function _getKey(key2,context){let node=this.node,container=node[key2];return Array.isArray(container)?container.map((_8,i3)=>_index.default.get({listKey:key2,parentPath:this,parent:node,container,key:i3}).setContext(context)):_index.default.get({parentPath:this,parent:node,container:node,key:key2}).setContext(context)}function _getPattern(parts,context){let path14=this;for(let part of parts)part==="."?path14=path14.parentPath:Array.isArray(path14)?path14=path14[part]:path14=path14.get(part,context);return path14}function getBindingIdentifiers(duplicates){return _getBindingIdentifiers(this.node,duplicates)}function getOuterBindingIdentifiers(duplicates){return _getOuterBindingIdentifiers(this.node,duplicates)}function getBindingIdentifierPaths(duplicates=!1,outerOnly=!1){let search=[this],ids=Object.create(null);for(;search.length;){let id2=search.shift();if(!id2||!id2.node)continue;let keys=_getBindingIdentifiers.keys[id2.node.type];if(id2.isIdentifier()){duplicates?(ids[id2.node.name]=ids[id2.node.name]||[]).push(id2):ids[id2.node.name]=id2;continue}if(id2.isExportDeclaration()){let declaration=id2.get("declaration");isDeclaration(declaration)&&search.push(declaration);continue}if(outerOnly){if(id2.isFunctionDeclaration()){search.push(id2.get("id"));continue}if(id2.isFunctionExpression())continue}if(keys)for(let i3=0;i3<keys.length;i3++){let key2=keys[i3],child=id2.get(key2);Array.isArray(child)?search.push(...child):child.node&&search.push(child);}}return ids}function getOuterBindingIdentifierPaths(duplicates=!1){return this.getBindingIdentifierPaths(duplicates,!0)}}});var require_comments2=__commonJS({"../../node_modules/@babel/traverse/lib/path/comments.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.addComment=addComment;exports.addComments=addComments;exports.shareCommentsWithSiblings=shareCommentsWithSiblings;var _t14=require_lib13(),{addComment:_addComment,addComments:_addComments}=_t14;function shareCommentsWithSiblings(){if(typeof this.key=="string")return;let node=this.node;if(!node)return;let trailing=node.trailingComments,leading=node.leadingComments;if(!trailing&&!leading)return;let prev=this.getSibling(this.key-1),next=this.getSibling(this.key+1),hasPrev=!!prev.node,hasNext=!!next.node;hasPrev&&(leading&&prev.addComments("trailing",removeIfExisting(leading,prev.node.trailingComments)),trailing&&!hasNext&&prev.addComments("trailing",trailing)),hasNext&&(trailing&&next.addComments("leading",removeIfExisting(trailing,next.node.leadingComments)),leading&&!hasPrev&&next.addComments("leading",leading));}function removeIfExisting(list,toRemove){if(!(toRemove!=null&&toRemove.length))return list;let set2=new Set(toRemove);return list.filter(el8=>!set2.has(el8))}function addComment(type2,content,line5){_addComment(this.node,type2,content,line5);}function addComments(type2,comments){_addComments(this.node,type2,comments);}}});var require_path4=__commonJS({"../../node_modules/@babel/traverse/lib/path/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=exports.SHOULD_STOP=exports.SHOULD_SKIP=exports.REMOVED=void 0;var virtualTypes=require_virtual_types(),_debug=require_src(),_index=require_lib21(),_index2=require_scope2(),_t14=require_lib13(),t25=_t14,cache3=require_cache(),_generator=require_lib14(),NodePath_ancestry=require_ancestry(),NodePath_inference=require_inference(),NodePath_replacement=require_replacement(),NodePath_evaluation=require_evaluation(),NodePath_conversion=require_conversion(),NodePath_introspection=require_introspection(),NodePath_context=require_context(),NodePath_removal=require_removal(),NodePath_modification=require_modification(),NodePath_family=require_family(),NodePath_comments=require_comments2(),NodePath_virtual_types_validator=require_virtual_types_validator(),{validate}=_t14,debug=_debug("babel"),REMOVED=exports.REMOVED=1,SHOULD_STOP=exports.SHOULD_STOP=2,SHOULD_SKIP=exports.SHOULD_SKIP=4,NodePath=class _NodePath{constructor(hub,parent){this.contexts=[],this.state=null,this.opts=null,this._traverseFlags=0,this.skipKeys=null,this.parentPath=null,this.container=null,this.listKey=null,this.key=null,this.node=null,this.type=null,this.parent=parent,this.hub=hub,this.data=null,this.context=null,this.scope=null;}static get({hub,parentPath,parent,container,listKey,key:key2}){if(!hub&&parentPath&&(hub=parentPath.hub),!parent)throw new Error("To get a node path the parent needs to exist");let targetNode=container[key2],paths=cache3.getOrCreateCachedPaths(hub,parent),path14=paths.get(targetNode);return path14||(path14=new _NodePath(hub,parent),targetNode&&paths.set(targetNode,path14)),path14.setup(parentPath,container,listKey,key2),path14}getScope(scope){return this.isScope()?new _index2.default(this):scope}setData(key2,val){return this.data==null&&(this.data=Object.create(null)),this.data[key2]=val}getData(key2,def){this.data==null&&(this.data=Object.create(null));let val=this.data[key2];return val===void 0&&def!==void 0&&(val=this.data[key2]=def),val}hasNode(){return this.node!=null}buildCodeFrameError(msg,Error2=SyntaxError){return this.hub.buildError(this.node,msg,Error2)}traverse(visitor,state){(0, _index.default)(this.node,visitor,this.scope,state,this);}set(key2,node){validate(this.node,key2,node),this.node[key2]=node;}getPathLocation(){let parts=[],path14=this;do{let key2=path14.key;path14.inList&&(key2=`${path14.listKey}[${key2}]`),parts.unshift(key2);}while(path14=path14.parentPath);return parts.join(".")}debug(message){debug.enabled&&debug(`${this.getPathLocation()} ${this.type}: ${message}`);}toString(){return (0, _generator.default)(this.node).code}get inList(){return !!this.listKey}set inList(inList){inList||(this.listKey=null);}get parentKey(){return this.listKey||this.key}get shouldSkip(){return !!(this._traverseFlags&SHOULD_SKIP)}set shouldSkip(v11){v11?this._traverseFlags|=SHOULD_SKIP:this._traverseFlags&=~SHOULD_SKIP;}get shouldStop(){return !!(this._traverseFlags&SHOULD_STOP)}set shouldStop(v11){v11?this._traverseFlags|=SHOULD_STOP:this._traverseFlags&=~SHOULD_STOP;}get removed(){return !!(this._traverseFlags&REMOVED)}set removed(v11){v11?this._traverseFlags|=REMOVED:this._traverseFlags&=~REMOVED;}};Object.assign(NodePath.prototype,NodePath_ancestry,NodePath_inference,NodePath_replacement,NodePath_evaluation,NodePath_conversion,NodePath_introspection,NodePath_context,NodePath_removal,NodePath_modification,NodePath_family,NodePath_comments);NodePath.prototype._guessExecutionStatusRelativeToDifferentFunctions=NodePath_introspection._guessExecutionStatusRelativeTo;for(let type2 of t25.TYPES){let typeKey=`is${type2}`,fn11=t25[typeKey];NodePath.prototype[typeKey]=function(opts){return fn11(this.node,opts)},NodePath.prototype[`assert${type2}`]=function(opts){if(!fn11(this.node,opts))throw new TypeError(`Expected node path of type ${type2}`)};}Object.assign(NodePath.prototype,NodePath_virtual_types_validator);for(let type2 of Object.keys(virtualTypes))type2[0]!=="_"&&(t25.TYPES.includes(type2)||t25.TYPES.push(type2));exports.default=NodePath;}});var require_context2=__commonJS({"../../node_modules/@babel/traverse/lib/context.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var _index=require_path4(),_t14=require_lib13(),{VISITOR_KEYS}=_t14,TraversalContext=class{constructor(scope,opts,state,parentPath){this.queue=null,this.priorityQueue=null,this.parentPath=parentPath,this.scope=scope,this.state=state,this.opts=opts;}shouldVisit(node){let opts=this.opts;if(opts.enter||opts.exit||opts[node.type])return !0;let keys=VISITOR_KEYS[node.type];if(!(keys!=null&&keys.length))return !1;for(let key2 of keys)if(node[key2])return !0;return !1}create(node,container,key2,listKey){return _index.default.get({parentPath:this.parentPath,parent:node,container,key:key2,listKey})}maybeQueue(path14,notPriority){this.queue&&(notPriority?this.queue.push(path14):this.priorityQueue.push(path14));}visitMultiple(container,parent,listKey){if(container.length===0)return !1;let queue=[];for(let key2=0;key2<container.length;key2++){let node=container[key2];node&&this.shouldVisit(node)&&queue.push(this.create(parent,container,key2,listKey));}return this.visitQueue(queue)}visitSingle(node,key2){return this.shouldVisit(node[key2])?this.visitQueue([this.create(node,node,key2)]):!1}visitQueue(queue){this.queue=queue,this.priorityQueue=[];let visited=new WeakSet,stop=!1,visitIndex=0;for(;visitIndex<queue.length;){let path14=queue[visitIndex];if(visitIndex++,path14.resync(),(path14.contexts.length===0||path14.contexts[path14.contexts.length-1]!==this)&&path14.pushContext(this),path14.key===null)continue;let{node}=path14;if(!visited.has(node)){if(node&&visited.add(node),path14.visit()){stop=!0;break}if(this.priorityQueue.length&&(stop=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=queue,stop))break}}for(let i3=0;i3<visitIndex;i3++)queue[i3].popContext();return this.queue=null,stop}visit(node,key2){let nodes=node[key2];return nodes?Array.isArray(nodes)?this.visitMultiple(nodes,node,key2):this.visitSingle(node,key2):!1}};exports.default=TraversalContext;}});var require_traverse_node=__commonJS({"../../node_modules/@babel/traverse/lib/traverse-node.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.traverseNode=traverseNode;var _context=require_context2(),_t14=require_lib13(),{VISITOR_KEYS}=_t14;function traverseNode(node,opts,scope,state,path14,skipKeys,visitSelf){let keys=VISITOR_KEYS[node.type];if(!keys)return !1;let context=new _context.default(scope,opts,state,path14);if(visitSelf)return skipKeys!=null&&skipKeys[path14.parentKey]?!1:context.visitQueue([path14]);for(let key2 of keys)if(!(skipKeys!=null&&skipKeys[key2])&&context.visit(node,key2))return !0;return !1}}});var require_hub=__commonJS({"../../node_modules/@babel/traverse/lib/hub.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});exports.default=void 0;var Hub=class{getCode(){}getScope(){}addHelper(){throw new Error("Helpers are not supported by the default hub.")}buildError(node,msg,Error2=TypeError){return new Error2(msg)}};exports.default=Hub;}});var require_lib21=__commonJS({"../../node_modules/@babel/traverse/lib/index.js"(exports){Object.defineProperty(exports,"__esModule",{value:!0});Object.defineProperty(exports,"Hub",{enumerable:!0,get:function(){return _hub.default}});Object.defineProperty(exports,"NodePath",{enumerable:!0,get:function(){return _index.default}});Object.defineProperty(exports,"Scope",{enumerable:!0,get:function(){return _index2.default}});exports.visitors=exports.default=void 0;var visitors=require_visitors();exports.visitors=visitors;var _t14=require_lib13(),cache3=require_cache(),_traverseNode=require_traverse_node(),_index=require_path4(),_index2=require_scope2(),_hub=require_hub(),{VISITOR_KEYS,removeProperties,traverseFast}=_t14;function traverse(parent,opts={},scope,state,parentPath,visitSelf){if(parent){if(!opts.noScope&&!scope&&parent.type!=="Program"&&parent.type!=="File")throw new Error(`You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a ${parent.type} node without passing scope and parentPath.`);if(!parentPath&&visitSelf)throw new Error("visitSelf can only be used when providing a NodePath.");VISITOR_KEYS[parent.type]&&(visitors.explode(opts),(0, _traverseNode.traverseNode)(parent,opts,scope,state,parentPath,null,visitSelf));}}exports.default=traverse;traverse.visitors=visitors;traverse.verify=visitors.verify;traverse.explode=visitors.explode;traverse.cheap=function(node,enter){traverseFast(node,enter);};traverse.node=function(node,opts,scope,state,path14,skipKeys){(0, _traverseNode.traverseNode)(node,opts,scope,state,path14,skipKeys);};traverse.clearNode=function(node,opts){removeProperties(node,opts);};traverse.removeProperties=function(tree,opts){return traverseFast(tree,traverse.clearNode,opts),tree};function hasDenylistedType(path14,state){path14.node.type===state.type&&(state.has=!0,path14.stop());}traverse.hasType=function(tree,type2,denylistTypes){if(denylistTypes!=null&&denylistTypes.includes(tree.type))return !1;if(tree.type===type2)return !0;let state={has:!1,type:type2};return traverse(tree,{noScope:!0,denylist:denylistTypes,enter:hasDenylistedType},null,state),state.has};traverse.cache=cache3;}});var require_dist5=__commonJS({"../../node_modules/@storybook/csf/dist/index.js"(exports){var B15=Object.create,u=Object.defineProperty,C15=Object.getOwnPropertyDescriptor,F16=Object.getOwnPropertyNames,h7=Object.getPrototypeOf,w13=Object.prototype.hasOwnProperty,E10=(r8,e4)=>()=>(e4||r8((e4={exports:{}}).exports,e4),e4.exports),I15=(r8,e4,n,t25)=>{if(e4&&typeof e4=="object"||typeof e4=="function")for(let a3 of F16(e4))!w13.call(r8,a3)&&a3!==n&&u(r8,a3,{get:()=>e4[a3],enumerable:!(t25=C15(e4,a3))||t25.enumerable});return r8},k14=(r8,e4,n)=>(n=r8!=null?B15(h7(r8)):{},I15(e4||!r8||!r8.__esModule?u(n,"default",{value:r8,enumerable:!0}):n,r8)),x11=E10(T11=>{Object.defineProperty(T11,"__esModule",{value:!0}),T11.isEqual=function(){var r8=Object.prototype.toString,e4=Object.getPrototypeOf,n=Object.getOwnPropertySymbols?function(t25){return Object.keys(t25).concat(Object.getOwnPropertySymbols(t25))}:Object.keys;return function(t25,a3){return function i3(o3,s,d7){var y13,g4,p7,l=r8.call(o3),b15=r8.call(s);if(o3===s)return !0;if(o3==null||s==null)return !1;if(d7.indexOf(o3)>-1&&d7.indexOf(s)>-1)return !0;if(d7.push(o3,s),l!=b15||(y13=n(o3),g4=n(s),y13.length!=g4.length||y13.some(function(A14){return !i3(o3[A14],s[A14],d7)})))return !1;switch(l.slice(8,-1)){case"Symbol":return o3.valueOf()==s.valueOf();case"Date":case"Number":return +o3==+s||+o3!=+o3&&+s!=+s;case"RegExp":case"Function":case"String":case"Boolean":return ""+o3==""+s;case"Set":case"Map":y13=o3.entries(),g4=s.entries();do if(!i3((p7=y13.next()).value,g4.next().value,d7))return !1;while(!p7.done);return !0;case"ArrayBuffer":o3=new Uint8Array(o3),s=new Uint8Array(s);case"DataView":o3=new Uint8Array(o3.buffer),s=new Uint8Array(s.buffer);case"Float32Array":case"Float64Array":case"Int8Array":case"Int16Array":case"Int32Array":case"Uint8Array":case"Uint16Array":case"Uint32Array":case"Uint8ClampedArray":case"Arguments":case"Array":if(o3.length!=s.length)return !1;for(p7=0;p7<o3.length;p7++)if((p7 in o3||p7 in s)&&(p7 in o3!=p7 in s||!i3(o3[p7],s[p7],d7)))return !1;return !0;case"Object":return i3(e4(o3),e4(s),d7);default:return !1}}(t25,a3,[])}}();});function R17(r8){return r8.replace(/_/g," ").replace(/-/g," ").replace(/\./g," ").replace(/([^\n])([A-Z])([a-z])/g,(e4,n,t25,a3)=>`${n} ${t25}${a3}`).replace(/([a-z])([A-Z])/g,(e4,n,t25)=>`${n} ${t25}`).replace(/([a-z])([0-9])/gi,(e4,n,t25)=>`${n} ${t25}`).replace(/([0-9])([a-z])/gi,(e4,n,t25)=>`${n} ${t25}`).replace(/(\s|^)(\w)/g,(e4,n,t25)=>`${n}${t25.toUpperCase()}`).replace(/ +/g," ").trim()}var c8=k14(x11()),S11=r8=>r8.map(e4=>typeof e4<"u").filter(Boolean).length,v11=(r8,e4)=>{let{exists:n,eq:t25,neq:a3,truthy:i3}=r8;if(S11([n,t25,a3,i3])>1)throw new Error(`Invalid conditional test ${JSON.stringify({exists:n,eq:t25,neq:a3})}`);if(typeof t25<"u")return (0, c8.isEqual)(e4,t25);if(typeof a3<"u")return !(0, c8.isEqual)(e4,a3);if(typeof n<"u"){let s=typeof e4<"u";return n?s:!s}return typeof i3>"u"||i3?!!e4:!e4},P16=(r8,e4,n)=>{if(!r8.if)return !0;let{arg:t25,global:a3}=r8.if;if(S11([t25,a3])!==1)throw new Error(`Invalid conditional value ${JSON.stringify({arg:t25,global:a3})}`);let i3=t25?e4[t25]:n[a3];return v11(r8.if,i3)},O14=r8=>r8.toLowerCase().replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,""),m4=(r8,e4)=>{let n=O14(r8);if(n==="")throw new Error(`Invalid ${e4} '${r8}', must include alphanumeric characters`);return n},N16=(r8,e4)=>`${m4(r8,"kind")}${e4?`--${m4(e4,"name")}`:""}`,M11=r8=>R17(r8);function f10(r8,e4){return Array.isArray(e4)?e4.includes(r8):r8.match(e4)}function G21(r8,{includeStories:e4,excludeStories:n}){return r8!=="__esModule"&&(!e4||f10(r8,e4))&&(!n||!f10(r8,n))}var V16=(r8,{rootSeparator:e4,groupSeparator:n})=>{let[t25,a3]=r8.split(e4,2),i3=(a3||r8).split(n).filter(o3=>!!o3);return {root:a3?t25:null,groups:i3}};exports.includeConditionalArg=P16;exports.isExportStory=G21;exports.parseKind=V16;exports.sanitize=O14;exports.storyNameFromExport=M11;exports.toId=N16;}});var require_dist6=__commonJS({"../../lib/csf-tools/dist/index.js"(exports,module){var __create4=Object.create,__defProp6=Object.defineProperty,__getOwnPropDesc4=Object.getOwnPropertyDescriptor,__getOwnPropNames4=Object.getOwnPropertyNames,__getProtoOf4=Object.getPrototypeOf,__hasOwnProp4=Object.prototype.hasOwnProperty,__export6=(target,all)=>{for(var name in all)__defProp6(target,name,{get:all[name],enumerable:!0});},__copyProps4=(to5,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key2 of __getOwnPropNames4(from))!__hasOwnProp4.call(to5,key2)&&key2!==except&&__defProp6(to5,key2,{get:()=>from[key2],enumerable:!(desc=__getOwnPropDesc4(from,key2))||desc.enumerable});return to5},__toESM4=(mod,isNodeMode,target)=>(target=mod!=null?__create4(__getProtoOf4(mod)):{},__copyProps4(isNodeMode||!mod||!mod.__esModule?__defProp6(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS2=mod=>__copyProps4(__defProp6({},"__esModule",{value:!0}),mod),src_exports3={};__export6(src_exports3,{ConfigFile:()=>ConfigFile,CsfFile:()=>CsfFile,NoMetaError:()=>NoMetaError,babelParse:()=>babelParse,babelParseExpression:()=>babelParseExpression,babelPrint:()=>babelPrint,enrichCsf:()=>enrichCsf,enrichCsfMeta:()=>enrichCsfMeta,enrichCsfStory:()=>enrichCsfStory,extractDescription:()=>extractDescription,extractSource:()=>extractSource,formatConfig:()=>formatConfig,formatCsf:()=>formatCsf,getStorySortParameter:()=>getStorySortParameter,loadConfig:()=>loadConfig4,loadCsf:()=>loadCsf,parserOptions:()=>parserOptions,printConfig:()=>printConfig,printCsf:()=>printCsf,readConfig:()=>readConfig,readCsf:()=>readCsf,writeConfig:()=>writeConfig,writeCsf:()=>writeCsf});module.exports=__toCommonJS2(src_exports3);var import_fs_extra=__toESM4(require_lib6()),import_ts_dedent=(init_esm(),__toCommonJS(esm_exports)),t25=__toESM4(require_lib13()),generate=__toESM4(require_lib14()),recast2=__toESM4(require_main6()),traverse=__toESM4(require_lib21()),import_csf=require_dist5(),babelParser=__toESM4(require_lib17()),recast=__toESM4(require_main6());function parseWithFlowOrTypescript(source2,parserOptions2){let parserPlugins=/^\s*\/\/\s*@flow/.test(source2)?["flow"]:["typescript"],mergedParserOptions={...parserOptions2,plugins:[...parserOptions2.plugins??[],...parserPlugins]};return babelParser.parse(source2,mergedParserOptions)}var parserOptions={sourceType:"module",plugins:["jsx","decorators-legacy","classProperties"],tokens:!0},babelParse=code=>recast.parse(code,{parser:{parse(source2){return parseWithFlowOrTypescript(source2,parserOptions)}}}),babelPrint=ast=>recast.print(ast,{quote:"single",trailingComma:!0,tabWidth:2,wrapColumn:80,arrowParensAlways:!0}).code,babelParseExpression=code=>babelParser.parseExpression(code,parserOptions),t26=__toESM4(require_lib13()),findVarInitialization=(identifier3,program)=>{let init=null,declarations=null;return program.body.find(node=>(t26.isVariableDeclaration(node)?declarations=node.declarations:t26.isExportNamedDeclaration(node)&&t26.isVariableDeclaration(node.declaration)&&(declarations=node.declaration.declarations),declarations&&declarations.find(decl=>t26.isVariableDeclarator(decl)&&t26.isIdentifier(decl.id)&&decl.id.name===identifier3?(init=decl.init,!0):!1))),init},logger=console;function parseIncludeExclude(prop){if(t25.isArrayExpression(prop))return prop.elements.map(e4=>{if(t25.isStringLiteral(e4))return e4.value;throw new Error(`Expected string literal: ${e4}`)});if(t25.isStringLiteral(prop))return new RegExp(prop.value);if(t25.isRegExpLiteral(prop))return new RegExp(prop.pattern,prop.flags);throw new Error(`Unknown include/exclude: ${prop}`)}function parseTags(prop){if(!t25.isArrayExpression(prop))throw new Error("CSF: Expected tags array");return prop.elements.map(e4=>{if(t25.isStringLiteral(e4))return e4.value;throw new Error("CSF: Expected tag to be string literal")})}var formatLocation2=(node,fileName)=>{let{line:line5,column:column2}=node.loc?.start||{};return `${fileName||""} (line ${line5}, col ${column2})`.trim()},isArgsStory=(init,parent,csf)=>{let storyFn=init;if(t25.isCallExpression(init)){let{callee,arguments:bindArguments}=init;if(t25.isProgram(parent)&&t25.isMemberExpression(callee)&&t25.isIdentifier(callee.object)&&t25.isIdentifier(callee.property)&&callee.property.name==="bind"&&(bindArguments.length===0||bindArguments.length===1&&t25.isObjectExpression(bindArguments[0])&&bindArguments[0].properties.length===0)){let boundIdentifier=callee.object.name,template=findVarInitialization(boundIdentifier,parent);template&&(csf._templates[boundIdentifier]=template,storyFn=template);}}return t25.isArrowFunctionExpression(storyFn)||t25.isFunctionDeclaration(storyFn)?storyFn.params.length>0:!1},parseExportsOrder=init=>{if(t25.isArrayExpression(init))return init.elements.map(item=>{if(t25.isStringLiteral(item))return item.value;throw new Error(`Expected string literal named export: ${item}`)});throw new Error(`Expected array of string literals: ${init}`)},sortExports=(exportByName,order)=>order.reduce((acc,name)=>{let namedExport=exportByName[name];return namedExport&&(acc[name]=namedExport),acc},{}),NoMetaError=class extends Error{constructor(message,ast,fileName){super(import_ts_dedent.dedent`
525
525
  CSF: ${message} ${formatLocation2(ast,fileName)}
526
526
 
527
527
  More info: https://storybook.js.org/docs/react/writing-stories#default-export
@@ -1675,7 +1675,7 @@ in order for it to be formatted.`,cliCategory:"Other"},tabWidth:{type:"int",cate
1675
1675
  `),!mainConfigPath)throw new import_server_errors.MainFileMissingError({location:configDir})}function loadCustomPresets({configDir}){validateConfigurationFiles(configDir);let presets=serverRequire(import_path24.default.resolve(configDir,"presets"));if(serverRequire(import_path24.default.resolve(configDir,"main"))){let resolved=serverResolve(import_path24.default.resolve(configDir,"main"));if(resolved)return [resolved]}return presets||[]}var import_resolve_from=__toESM4(require_resolve_from()),safeResolveFrom=(path19,file)=>{try{return (0,import_resolve_from.default)(path19,file)}catch{return}},safeResolve=file=>{try{return __require.resolve(file)}catch{return}},import_path32=__toESM4(__require("path"));function normalizePath(id2){return import_path32.default.posix.normalize(slash3(id2))}function stripAbsNodeModulesPath(absPath){let splits=absPath.split(`node_modules${import_path32.default.sep}`);return normalizePath(splits[splits.length-1])}var isObject3=val=>val!=null&&typeof val=="object"&&Array.isArray(val)===!1,isFunction=val=>typeof val=="function";function filterPresetsConfig(presetsConfig){return presetsConfig.filter(preset=>{let presetName=typeof preset=="string"?preset:preset.name;return !/@storybook[\\\\/]preset-typescript/.test(presetName)})}function resolvePathToMjs(filePath){let{dir,name}=(0, import_path42.parse)(filePath),mjsPath=(0, import_path42.join)(dir,`${name}.mjs`);return safeResolve(mjsPath)?mjsPath:filePath}function resolvePresetFunction(input,presetOptions,storybookOptions){return isFunction(input)?[...input({...storybookOptions,...presetOptions})]:Array.isArray(input)?[...input]:[]}var resolveAddonName=(configDir,name,options9)=>{let resolve4=name.startsWith("/")?safeResolve:safeResolveFrom.bind(null,configDir),resolved=resolve4(name);if(resolved){let{dir:fdir,name:fname}=(0, import_path42.parse)(resolved);if(name.match(/\/(manager|register(-panel)?)(\.(js|mjs|ts|tsx|jsx))?$/))return {type:"virtual",name,managerEntries:[resolvePathToMjs((0, import_path42.join)(fdir,fname))]};if(name.match(/\/(preset)(\.(js|mjs|ts|tsx|jsx))?$/))return {type:"presets",name:resolved}}let checkExists=exportName=>{if(resolve4(`${name}${exportName}`))return `${name}${exportName}`},absolutizeExport=(exportName,preferMJS)=>{let found=resolve4(`${name}${exportName}`);if(found)return preferMJS?resolvePathToMjs(found):found},managerFile=absolutizeExport("/manager",!0),registerFile=absolutizeExport("/register",!0)||absolutizeExport("/register-panel",!0),previewFile=checkExists("/preview"),previewFileAbsolute=absolutizeExport("/preview",!0),presetFile=absolutizeExport("/preset",!1);if(!(managerFile||previewFile)&&presetFile)return {type:"presets",name:presetFile};if(managerFile||registerFile||previewFile||presetFile){let managerEntries=[];return managerFile&&managerEntries.push(managerFile),!managerFile&&registerFile&&!presetFile&&managerEntries.push(registerFile),{type:"virtual",name,...managerEntries.length?{managerEntries}:{},...previewFile?{previewAnnotations:[previewFileAbsolute?{bare:previewFile.includes("node_modules")?stripAbsNodeModulesPath(previewFile):previewFile,absolute:previewFileAbsolute}:previewFile]}:{},...presetFile?{presets:[{name:presetFile,options:options9}]}:{}}}if(resolved)return {type:"presets",name:resolved}},map2=({configDir})=>item=>{let options9=isObject3(item)&&item.options||void 0,name=isObject3(item)?item.name:item,resolved;try{resolved=resolveAddonName(configDir,name,options9);}catch{import_node_logger2.logger.error(`Addon value should end in /manager or /preview or /register OR it should be a valid preset https://storybook.js.org/docs/react/addons/writing-presets/
1676
1676
  ${item}`);return}if(!resolved){import_node_logger2.logger.warn(`Could not resolve addon "${name}", skipping. Is it installed?`);return}return {...options9?{options:options9}:{},...resolved}};async function getContent(input){if(input.type==="virtual"){let{type:type2,name:name2,...rest}=input;return rest}let name=input.name?input.name:input;return interopRequireDefault(name)}async function loadPreset(input,level,storybookOptions){let presetName=input.name?input.name:input;try{let presetOptions=input.options?input.options:{},contents=await getContent(input);if(typeof contents=="function"&&(contents=contents(storybookOptions,presetOptions)),Array.isArray(contents))return await loadPresets(contents,level+1,storybookOptions);if(isObject3(contents)){let{addons:addonsInput=[],presets:presetsInput=[],...rest}=contents,filter2=i3=>!0;storybookOptions.isCritical!==!0&&(storybookOptions.build?.test?.disabledAddons?.length||0)>0&&(filter2=i3=>{let name=i3.name?i3.name:i3;return !storybookOptions.build?.test?.disabledAddons?.find(n=>name.includes(n))});let subPresets=resolvePresetFunction(presetsInput,presetOptions,storybookOptions).filter(filter2),subAddons=resolvePresetFunction(addonsInput,presetOptions,storybookOptions).filter(filter2);return [...await loadPresets([...subPresets],level+1,storybookOptions),...await loadPresets([...subAddons.map(map2(storybookOptions))].filter(Boolean),level+1,storybookOptions),{name:presetName,preset:rest,options:presetOptions}]}throw new Error(import_ts_dedent2.dedent`
1677
1677
  ${input} is not a valid preset
1678
- `)}catch(error){if(storybookOptions?.isCritical)throw new import_server_errors2.CriticalPresetLoadError({error,presetName});let warning=level>0?` Failed to load preset: ${JSON.stringify(input)} on level ${level}`:` Failed to load preset: ${JSON.stringify(input)}`;return import_node_logger2.logger.warn(warning),import_node_logger2.logger.error(error),[]}}async function loadPresets(presets,level,storybookOptions){return !presets||!Array.isArray(presets)||!presets.length?[]:(await Promise.all(presets.map(async preset=>loadPreset(preset,level,storybookOptions)))).reduce((acc,loaded)=>acc.concat(loaded),[])}function applyPresets(presets,extension,config,args,storybookOptions){let presetResult=new Promise(res=>res(config));return presets.length?presets.reduce((accumulationPromise,{preset,options:options9})=>{let change=preset[extension];if(!change)return accumulationPromise;if(typeof change=="function"){let extensionFn=change,context={preset,combinedOptions:{...storybookOptions,...args,...options9,presetsList:presets,presets:{apply:async(ext,c8,a3={})=>applyPresets(presets,ext,c8,a3,storybookOptions)}}};return accumulationPromise.then(newConfig=>extensionFn.call(context.preset,newConfig,context.combinedOptions))}return accumulationPromise.then(newConfig=>Array.isArray(newConfig)&&Array.isArray(change)?[...newConfig,...change]:isObject3(newConfig)&&isObject3(change)?{...newConfig,...change}:change)},presetResult):presetResult}async function getPresets(presets,storybookOptions){let loadedPresets=await loadPresets(presets,0,storybookOptions);return {apply:async(extension,config,args={})=>applyPresets(loadedPresets,extension,config,args,storybookOptions)}}async function loadAllPresets(options9){let{corePresets=[],overridePresets=[],...restOptions}=options9,presetsConfig=[...corePresets,...loadCustomPresets(options9),...overridePresets],filteredPresetConfig=filterPresetsConfig(presetsConfig);return filteredPresetConfig.length<presetsConfig.length&&import_node_logger2.logger.warn("Storybook now supports TypeScript natively. You can safely remove `@storybook/preset-typescript`."),getPresets(filteredPresetConfig,restOptions)}var import_file_system_cache=__toESM4(require_lib5());function createFileSystemCache(options9){return (0, import_file_system_cache.default)(options9)}var import_path52=__toESM4(__require("path")),import_find_cache_dir=__toESM4(require_find_cache_dir());function resolvePathInStorybookCache(fileOrDirectoryName,sub="default"){let cacheDirectory=(0, import_find_cache_dir.default)({name:"storybook"});return cacheDirectory||=import_path52.default.join(process.cwd(),".cache","storybook"),import_path52.default.join(cacheDirectory,sub,fileOrDirectoryName)}var cache3=createFileSystemCache({basePath:resolvePathInStorybookCache("dev-server"),ns:"storybook"}),import_fs_extra2=require_lib6(),import_path72=__require("path"),import_tempy=__toESM4(require_tempy()),import_path62=__toESM4(__require("path")),import_fs_extra=__toESM4(require_lib6());function getStorybookConfiguration(storybookScript,shortName,longName){if(!storybookScript)return null;let parts=storybookScript.split(/[\s='"]+/),index=parts.indexOf(longName);return index===-1&&(index=parts.indexOf(shortName)),index===-1?null:parts[index+1]}var rendererPackages={"@storybook/react":"react","@storybook/vue3":"vue3","@storybook/angular":"angular","@storybook/html":"html","@storybook/web-components":"web-components","@storybook/polymer":"polymer","@storybook/ember":"ember","@storybook/svelte":"svelte","@storybook/preact":"preact","@storybook/server":"server","storybook-framework-qwik":"qwik","storybook-solidjs":"solid","@storybook/vue":"vue"},frameworkPackages={"@storybook/angular":"angular","@storybook/ember":"ember","@storybook/html-vite":"html-vite","@storybook/html-webpack5":"html-webpack5","@storybook/nextjs":"nextjs","@storybook/preact-vite":"preact-vite","@storybook/preact-webpack5":"preact-webpack5","@storybook/react-vite":"react-vite","@storybook/react-webpack5":"react-webpack5","@storybook/server-webpack5":"server-webpack5","@storybook/svelte-vite":"svelte-vite","@storybook/svelte-webpack5":"svelte-webpack5","@storybook/sveltekit":"sveltekit","@storybook/vue3-vite":"vue3-vite","@storybook/vue3-webpack5":"vue3-webpack5","@storybook/web-components-vite":"web-components-vite","@storybook/web-components-webpack5":"web-components-webpack5","storybook-framework-qwik":"qwik","storybook-solidjs-vite":"solid"},builderPackages=["@storybook/builder-webpack5","@storybook/builder-vite"],logger2=console,findDependency=({dependencies,devDependencies,peerDependencies},predicate)=>[Object.entries(dependencies||{}).find(predicate),Object.entries(devDependencies||{}).find(predicate),Object.entries(peerDependencies||{}).find(predicate)],getRendererInfo=packageJson=>{let[dep,devDep,peerDep]=findDependency(packageJson,([key2])=>rendererPackages[key2]),[pkg,version]=dep||devDep||peerDep||[];return dep&&devDep&&dep[0]===devDep[0]&&logger2.warn(`Found "${dep[0]}" in both "dependencies" and "devDependencies". This is probably a mistake.`),dep&&peerDep&&dep[0]===peerDep[0]&&logger2.warn(`Found "${dep[0]}" in both "dependencies" and "peerDependencies". This is probably a mistake.`),{version,frameworkPackage:pkg}},validConfigExtensions=["ts","js","tsx","jsx","mjs","cjs"],findConfigFile2=(prefix,configDir)=>{let filePrefix=import_path62.default.join(configDir,prefix),extension=validConfigExtensions.find(ext=>import_fs_extra.default.existsSync(`${filePrefix}.${ext}`));return extension?`${filePrefix}.${extension}`:null},getConfigInfo=(packageJson,configDir)=>{let storybookConfigDir=configDir??".storybook",storybookScript=packageJson.scripts?.storybook;if(storybookScript&&!configDir){let configParam=getStorybookConfiguration(storybookScript,"-c","--config-dir");configParam&&(storybookConfigDir=configParam);}return {configDir:storybookConfigDir,mainConfig:findConfigFile2("main",storybookConfigDir),previewConfig:findConfigFile2("preview",storybookConfigDir),managerConfig:findConfigFile2("manager",storybookConfigDir)}},getStorybookInfo=(packageJson,configDir)=>{let rendererInfo=getRendererInfo(packageJson),configInfo=getConfigInfo(packageJson,configDir);return {...rendererInfo,...configInfo}},versions_default={"@storybook/addon-a11y":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-actions":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-backgrounds":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-controls":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-docs":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-essentials":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-highlight":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-interactions":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-jest":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-links":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-mdx-gfm":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-measure":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-onboarding":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-outline":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-storysource":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-themes":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-toolbars":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/addon-viewport":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/angular":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/blocks":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/builder-manager":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/builder-vite":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/builder-webpack5":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/channels":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/cli":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/client-logger":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/codemod":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/components":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/core-common":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/core-events":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/core-server":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/core-webpack":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/csf-plugin":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/csf-tools":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/docs-tools":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/ember":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/html":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/html-vite":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/html-webpack5":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/instrumenter":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/manager":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/manager-api":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/nextjs":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/node-logger":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preact":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preact-vite":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preact-webpack5":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preset-create-react-app":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preset-html-webpack":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preset-preact-webpack":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preset-react-webpack":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preset-server-webpack":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preset-svelte-webpack":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preset-vue3-webpack":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preview":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/preview-api":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/react":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/react-dom-shim":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/react-vite":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/react-webpack5":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/router":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/server":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/server-webpack5":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/source-loader":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/svelte":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/svelte-vite":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/svelte-webpack5":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/sveltekit":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/telemetry":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/test":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/theming":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/types":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/vue3":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/vue3-vite":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/vue3-webpack5":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/web-components":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/web-components-vite":"0.0.0-pr-26827-sha-9b2b60fc","@storybook/web-components-webpack5":"0.0.0-pr-26827-sha-9b2b60fc",sb:"0.0.0-pr-26827-sha-9b2b60fc",storybook:"0.0.0-pr-26827-sha-9b2b60fc"};function parseList(str2){return str2.split(",").map(item=>item.trim()).filter(item=>item.length>0)}async function getCoercedStorybookVersion(packageManager){return (await Promise.all(Object.keys(rendererPackages).map(async pkg=>({name:pkg,version:await packageManager.getPackageVersion(pkg)})))).filter(({version})=>!!version)[0]?.version}function getEnvConfig(program,configEnv){Object.keys(configEnv).forEach(fieldName=>{let envVarName=configEnv[fieldName],envVarValue=process.env[envVarName];envVarValue&&(program[fieldName]=envVarValue);});}var createLogStream=async(logFileName="storybook.log")=>{let finalLogPath=(0, import_path72.join)(process.cwd(),logFileName),temporaryLogPath=import_tempy.default.file({name:logFileName}),logStream=(0, import_fs_extra2.createWriteStream)(temporaryLogPath,{encoding:"utf8"});return new Promise((resolve4,reject)=>{logStream.once("open",()=>{resolve4({logStream,moveLogFile:async()=>(0, import_fs_extra2.move)(temporaryLogPath,finalLogPath,{overwrite:!0}),clearLogFile:async()=>(0, import_fs_extra2.writeFile)(temporaryLogPath,""),removeLogFile:async()=>(0, import_fs_extra2.remove)(temporaryLogPath),readLogFile:async()=>(0, import_fs_extra2.readFile)(temporaryLogPath,"utf8")});}),logStream.once("error",reject);})},isCorePackage=pkg=>Object.keys(versions_default).includes(pkg),import_node_logger3=require_dist4(),predicateFor=addon=>entry=>{let name=entry.name||entry;return name&&name.replaceAll(/(\\){1,2}/g,"/").includes(addon)},isCorrectOrder=(addons,before,after)=>{let essentialsIndex=addons.findIndex(predicateFor("@storybook/addon-essentials")),beforeIndex=addons.findIndex(predicateFor(before.name)),afterIndex=addons.findIndex(predicateFor(after.name));return beforeIndex===-1&&before.inEssentials&&(beforeIndex=essentialsIndex),afterIndex===-1&&after.inEssentials&&(afterIndex=essentialsIndex),beforeIndex!==-1&&afterIndex!==-1&&beforeIndex<=afterIndex},checkAddonOrder=async({before,after,configFile,getConfig})=>{try{let config=await getConfig(configFile);if(!config?.addons){import_node_logger3.logger.warn("Unable to find 'addons' config in main Storybook config");return}if(!isCorrectOrder(config.addons,before,after)){let orEssentials=" (or '@storybook/addon-essentials')",beforeText=`'${before.name}'${before.inEssentials?orEssentials:""}`,afterText=`'${after.name}'${after.inEssentials?orEssentials:""}`;import_node_logger3.logger.warn(`Expected ${beforeText} to be listed before ${afterText} in main Storybook config.`);}}catch{import_node_logger3.logger.warn(`Unable to load config file: ${configFile}`);}},import_lazy_universal_dotenv=require_lib8(),import_path82=__toESM4(__require("path")),import_find_up=__toESM4(require_find_up3()),getProjectRoot=()=>{let result;if(process.env.STORYBOOK_PROJECT_ROOT)return process.env.STORYBOOK_PROJECT_ROOT;try{let found=import_find_up.default.sync(".git",{type:"directory"});found&&(result=import_path82.default.join(found,".."));}catch{}try{let found=import_find_up.default.sync(".svn",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}try{let found=import_find_up.default.sync(".hg",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}try{let splitDirname=__dirname.split("node_modules");result=result||(splitDirname.length>=2?splitDirname[0]:void 0);}catch{}try{let found=import_find_up.default.sync(".yarn",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}return result||process.cwd()},nodePathsToArray=nodePath=>nodePath.split(process.platform==="win32"?";":":").filter(Boolean).map(p7=>import_path82.default.resolve("./",p7)),relativePattern=/^\.{1,2}([/\\]|$)/;function normalizeStoryPath(filename){return relativePattern.test(filename)?filename:`.${import_path82.default.sep}${filename}`}function loadEnvs(options9={}){let defaultNodeEnv=options9.production?"production":"development",env3={NODE_ENV:process.env.NODE_ENV||defaultNodeEnv,NODE_PATH:process.env.NODE_PATH||"",STORYBOOK:process.env.STORYBOOK||"true",PUBLIC_URL:options9.production?".":""};Object.keys(process.env).filter(name=>/^STORYBOOK_/.test(name)).forEach(name=>{env3[name]=process.env[name];});let base=Object.entries(env3).reduce((acc,[k14,v11])=>Object.assign(acc,{[k14]:JSON.stringify(v11)}),{}),{stringified,raw}=(0, import_lazy_universal_dotenv.getEnvironment)({nodeEnv:env3.NODE_ENV}),fullRaw={...env3,...raw};return fullRaw.NODE_PATH=nodePathsToArray(fullRaw.NODE_PATH||""),{stringified:{...base,...stringified},raw:fullRaw}}var stringifyEnvs=raw=>Object.entries(raw).reduce((acc,[key2,value])=>(acc[key2]=JSON.stringify(value),acc),{}),stringifyProcessEnvs=raw=>Object.entries(raw).reduce((acc,[key2,value])=>(acc[`process.env.${key2}`]=JSON.stringify(value),acc),{}),NODE_MODULES_RE=/node_modules/,commonGlobOptions=glob2=>NODE_MODULES_RE.test(glob2)?{}:{ignore:["**/node_modules/**"]},frameworkToRenderer={angular:"angular",ember:"ember","html-vite":"html","html-webpack5":"html",nextjs:"react","preact-vite":"preact","preact-webpack5":"preact",qwik:"qwik","react-vite":"react","react-webpack5":"react","server-webpack5":"server",solid:"solid","svelte-vite":"svelte","svelte-webpack5":"svelte",sveltekit:"svelte","vue3-vite":"vue3","vue3-webpack5":"vue3","web-components-vite":"web-components","web-components-webpack5":"web-components",html:"html",preact:"preact","react-native":"react-native",react:"react",server:"server",svelte:"svelte",vue3:"vue3","web-components":"web-components"};async function getBuilderOptions(options9){let framework=await options9.presets.apply("framework",{},options9);if(typeof framework!="string"&&framework?.options?.builder)return framework.options.builder;let{builder}=await options9.presets.apply("core",{},options9);return typeof builder!="string"&&builder?.options?builder.options:{}}var import_ts_dedent3=(init_esm(),__toCommonJS(esm_exports)),import_path92=__toESM4(__require("path"));function normalizePath2(p7){return import_path92.default.posix.normalize(p7.replace(/\\/g,"/"))}async function getFrameworkName(options9){let framework=await options9.presets.apply("framework","",options9);if(!framework)throw new Error(import_ts_dedent3.dedent`
1678
+ `)}catch(error){if(storybookOptions?.isCritical)throw new import_server_errors2.CriticalPresetLoadError({error,presetName});let warning=level>0?` Failed to load preset: ${JSON.stringify(input)} on level ${level}`:` Failed to load preset: ${JSON.stringify(input)}`;return import_node_logger2.logger.warn(warning),import_node_logger2.logger.error(error),[]}}async function loadPresets(presets,level,storybookOptions){return !presets||!Array.isArray(presets)||!presets.length?[]:(await Promise.all(presets.map(async preset=>loadPreset(preset,level,storybookOptions)))).reduce((acc,loaded)=>acc.concat(loaded),[])}function applyPresets(presets,extension,config,args,storybookOptions){let presetResult=new Promise(res=>res(config));return presets.length?presets.reduce((accumulationPromise,{preset,options:options9})=>{let change=preset[extension];if(!change)return accumulationPromise;if(typeof change=="function"){let extensionFn=change,context={preset,combinedOptions:{...storybookOptions,...args,...options9,presetsList:presets,presets:{apply:async(ext,c8,a3={})=>applyPresets(presets,ext,c8,a3,storybookOptions)}}};return accumulationPromise.then(newConfig=>extensionFn.call(context.preset,newConfig,context.combinedOptions))}return accumulationPromise.then(newConfig=>Array.isArray(newConfig)&&Array.isArray(change)?[...newConfig,...change]:isObject3(newConfig)&&isObject3(change)?{...newConfig,...change}:change)},presetResult):presetResult}async function getPresets(presets,storybookOptions){let loadedPresets=await loadPresets(presets,0,storybookOptions);return {apply:async(extension,config,args={})=>applyPresets(loadedPresets,extension,config,args,storybookOptions)}}async function loadAllPresets(options9){let{corePresets=[],overridePresets=[],...restOptions}=options9,presetsConfig=[...corePresets,...loadCustomPresets(options9),...overridePresets],filteredPresetConfig=filterPresetsConfig(presetsConfig);return filteredPresetConfig.length<presetsConfig.length&&import_node_logger2.logger.warn("Storybook now supports TypeScript natively. You can safely remove `@storybook/preset-typescript`."),getPresets(filteredPresetConfig,restOptions)}var import_file_system_cache=__toESM4(require_lib5());function createFileSystemCache(options9){return (0, import_file_system_cache.default)(options9)}var import_path52=__toESM4(__require("path")),import_find_cache_dir=__toESM4(require_find_cache_dir());function resolvePathInStorybookCache(fileOrDirectoryName,sub="default"){let cacheDirectory=(0, import_find_cache_dir.default)({name:"storybook"});return cacheDirectory||=import_path52.default.join(process.cwd(),".cache","storybook"),import_path52.default.join(cacheDirectory,sub,fileOrDirectoryName)}var cache3=createFileSystemCache({basePath:resolvePathInStorybookCache("dev-server"),ns:"storybook"}),import_fs_extra2=require_lib6(),import_path72=__require("path"),import_tempy=__toESM4(require_tempy()),import_path62=__toESM4(__require("path")),import_fs_extra=__toESM4(require_lib6());function getStorybookConfiguration(storybookScript,shortName,longName){if(!storybookScript)return null;let parts=storybookScript.split(/[\s='"]+/),index=parts.indexOf(longName);return index===-1&&(index=parts.indexOf(shortName)),index===-1?null:parts[index+1]}var rendererPackages={"@storybook/react":"react","@storybook/vue3":"vue3","@storybook/angular":"angular","@storybook/html":"html","@storybook/web-components":"web-components","@storybook/polymer":"polymer","@storybook/ember":"ember","@storybook/svelte":"svelte","@storybook/preact":"preact","@storybook/server":"server","storybook-framework-qwik":"qwik","storybook-solidjs":"solid","@storybook/vue":"vue"},frameworkPackages={"@storybook/angular":"angular","@storybook/ember":"ember","@storybook/html-vite":"html-vite","@storybook/html-webpack5":"html-webpack5","@storybook/nextjs":"nextjs","@storybook/preact-vite":"preact-vite","@storybook/preact-webpack5":"preact-webpack5","@storybook/react-vite":"react-vite","@storybook/react-webpack5":"react-webpack5","@storybook/server-webpack5":"server-webpack5","@storybook/svelte-vite":"svelte-vite","@storybook/svelte-webpack5":"svelte-webpack5","@storybook/sveltekit":"sveltekit","@storybook/vue3-vite":"vue3-vite","@storybook/vue3-webpack5":"vue3-webpack5","@storybook/web-components-vite":"web-components-vite","@storybook/web-components-webpack5":"web-components-webpack5","storybook-framework-qwik":"qwik","storybook-solidjs-vite":"solid"},builderPackages=["@storybook/builder-webpack5","@storybook/builder-vite"],logger2=console,findDependency=({dependencies,devDependencies,peerDependencies},predicate)=>[Object.entries(dependencies||{}).find(predicate),Object.entries(devDependencies||{}).find(predicate),Object.entries(peerDependencies||{}).find(predicate)],getRendererInfo=packageJson=>{let[dep,devDep,peerDep]=findDependency(packageJson,([key2])=>rendererPackages[key2]),[pkg,version]=dep||devDep||peerDep||[];return dep&&devDep&&dep[0]===devDep[0]&&logger2.warn(`Found "${dep[0]}" in both "dependencies" and "devDependencies". This is probably a mistake.`),dep&&peerDep&&dep[0]===peerDep[0]&&logger2.warn(`Found "${dep[0]}" in both "dependencies" and "peerDependencies". This is probably a mistake.`),{version,frameworkPackage:pkg}},validConfigExtensions=["ts","js","tsx","jsx","mjs","cjs"],findConfigFile2=(prefix,configDir)=>{let filePrefix=import_path62.default.join(configDir,prefix),extension=validConfigExtensions.find(ext=>import_fs_extra.default.existsSync(`${filePrefix}.${ext}`));return extension?`${filePrefix}.${extension}`:null},getConfigInfo=(packageJson,configDir)=>{let storybookConfigDir=configDir??".storybook",storybookScript=packageJson.scripts?.storybook;if(storybookScript&&!configDir){let configParam=getStorybookConfiguration(storybookScript,"-c","--config-dir");configParam&&(storybookConfigDir=configParam);}return {configDir:storybookConfigDir,mainConfig:findConfigFile2("main",storybookConfigDir),previewConfig:findConfigFile2("preview",storybookConfigDir),managerConfig:findConfigFile2("manager",storybookConfigDir)}},getStorybookInfo=(packageJson,configDir)=>{let rendererInfo=getRendererInfo(packageJson),configInfo=getConfigInfo(packageJson,configDir);return {...rendererInfo,...configInfo}},versions_default={"@storybook/addon-a11y":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-actions":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-backgrounds":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-controls":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-docs":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-essentials":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-highlight":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-interactions":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-jest":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-links":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-mdx-gfm":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-measure":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-onboarding":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-outline":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-storysource":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-themes":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-toolbars":"0.0.0-pr-27008-sha-307d4fb3","@storybook/addon-viewport":"0.0.0-pr-27008-sha-307d4fb3","@storybook/angular":"0.0.0-pr-27008-sha-307d4fb3","@storybook/blocks":"0.0.0-pr-27008-sha-307d4fb3","@storybook/builder-manager":"0.0.0-pr-27008-sha-307d4fb3","@storybook/builder-vite":"0.0.0-pr-27008-sha-307d4fb3","@storybook/builder-webpack5":"0.0.0-pr-27008-sha-307d4fb3","@storybook/channels":"0.0.0-pr-27008-sha-307d4fb3","@storybook/cli":"0.0.0-pr-27008-sha-307d4fb3","@storybook/client-logger":"0.0.0-pr-27008-sha-307d4fb3","@storybook/codemod":"0.0.0-pr-27008-sha-307d4fb3","@storybook/components":"0.0.0-pr-27008-sha-307d4fb3","@storybook/core-common":"0.0.0-pr-27008-sha-307d4fb3","@storybook/core-events":"0.0.0-pr-27008-sha-307d4fb3","@storybook/core-server":"0.0.0-pr-27008-sha-307d4fb3","@storybook/core-webpack":"0.0.0-pr-27008-sha-307d4fb3","@storybook/csf-plugin":"0.0.0-pr-27008-sha-307d4fb3","@storybook/csf-tools":"0.0.0-pr-27008-sha-307d4fb3","@storybook/docs-tools":"0.0.0-pr-27008-sha-307d4fb3","@storybook/ember":"0.0.0-pr-27008-sha-307d4fb3","@storybook/html":"0.0.0-pr-27008-sha-307d4fb3","@storybook/html-vite":"0.0.0-pr-27008-sha-307d4fb3","@storybook/html-webpack5":"0.0.0-pr-27008-sha-307d4fb3","@storybook/instrumenter":"0.0.0-pr-27008-sha-307d4fb3","@storybook/manager":"0.0.0-pr-27008-sha-307d4fb3","@storybook/manager-api":"0.0.0-pr-27008-sha-307d4fb3","@storybook/nextjs":"0.0.0-pr-27008-sha-307d4fb3","@storybook/node-logger":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preact":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preact-vite":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preact-webpack5":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preset-create-react-app":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preset-html-webpack":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preset-preact-webpack":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preset-react-webpack":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preset-server-webpack":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preset-svelte-webpack":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preset-vue3-webpack":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preview":"0.0.0-pr-27008-sha-307d4fb3","@storybook/preview-api":"0.0.0-pr-27008-sha-307d4fb3","@storybook/react":"0.0.0-pr-27008-sha-307d4fb3","@storybook/react-dom-shim":"0.0.0-pr-27008-sha-307d4fb3","@storybook/react-vite":"0.0.0-pr-27008-sha-307d4fb3","@storybook/react-webpack5":"0.0.0-pr-27008-sha-307d4fb3","@storybook/router":"0.0.0-pr-27008-sha-307d4fb3","@storybook/server":"0.0.0-pr-27008-sha-307d4fb3","@storybook/server-webpack5":"0.0.0-pr-27008-sha-307d4fb3","@storybook/source-loader":"0.0.0-pr-27008-sha-307d4fb3","@storybook/svelte":"0.0.0-pr-27008-sha-307d4fb3","@storybook/svelte-vite":"0.0.0-pr-27008-sha-307d4fb3","@storybook/svelte-webpack5":"0.0.0-pr-27008-sha-307d4fb3","@storybook/sveltekit":"0.0.0-pr-27008-sha-307d4fb3","@storybook/telemetry":"0.0.0-pr-27008-sha-307d4fb3","@storybook/test":"0.0.0-pr-27008-sha-307d4fb3","@storybook/theming":"0.0.0-pr-27008-sha-307d4fb3","@storybook/types":"0.0.0-pr-27008-sha-307d4fb3","@storybook/vue3":"0.0.0-pr-27008-sha-307d4fb3","@storybook/vue3-vite":"0.0.0-pr-27008-sha-307d4fb3","@storybook/vue3-webpack5":"0.0.0-pr-27008-sha-307d4fb3","@storybook/web-components":"0.0.0-pr-27008-sha-307d4fb3","@storybook/web-components-vite":"0.0.0-pr-27008-sha-307d4fb3","@storybook/web-components-webpack5":"0.0.0-pr-27008-sha-307d4fb3",sb:"0.0.0-pr-27008-sha-307d4fb3",storybook:"0.0.0-pr-27008-sha-307d4fb3"};function parseList(str2){return str2.split(",").map(item=>item.trim()).filter(item=>item.length>0)}async function getCoercedStorybookVersion(packageManager){return (await Promise.all(Object.keys(rendererPackages).map(async pkg=>({name:pkg,version:await packageManager.getPackageVersion(pkg)})))).filter(({version})=>!!version)[0]?.version}function getEnvConfig(program,configEnv){Object.keys(configEnv).forEach(fieldName=>{let envVarName=configEnv[fieldName],envVarValue=process.env[envVarName];envVarValue&&(program[fieldName]=envVarValue);});}var createLogStream=async(logFileName="storybook.log")=>{let finalLogPath=(0, import_path72.join)(process.cwd(),logFileName),temporaryLogPath=import_tempy.default.file({name:logFileName}),logStream=(0, import_fs_extra2.createWriteStream)(temporaryLogPath,{encoding:"utf8"});return new Promise((resolve4,reject)=>{logStream.once("open",()=>{resolve4({logStream,moveLogFile:async()=>(0, import_fs_extra2.move)(temporaryLogPath,finalLogPath,{overwrite:!0}),clearLogFile:async()=>(0, import_fs_extra2.writeFile)(temporaryLogPath,""),removeLogFile:async()=>(0, import_fs_extra2.remove)(temporaryLogPath),readLogFile:async()=>(0, import_fs_extra2.readFile)(temporaryLogPath,"utf8")});}),logStream.once("error",reject);})},isCorePackage=pkg=>Object.keys(versions_default).includes(pkg),import_node_logger3=require_dist4(),predicateFor=addon=>entry=>{let name=entry.name||entry;return name&&name.replaceAll(/(\\){1,2}/g,"/").includes(addon)},isCorrectOrder=(addons,before,after)=>{let essentialsIndex=addons.findIndex(predicateFor("@storybook/addon-essentials")),beforeIndex=addons.findIndex(predicateFor(before.name)),afterIndex=addons.findIndex(predicateFor(after.name));return beforeIndex===-1&&before.inEssentials&&(beforeIndex=essentialsIndex),afterIndex===-1&&after.inEssentials&&(afterIndex=essentialsIndex),beforeIndex!==-1&&afterIndex!==-1&&beforeIndex<=afterIndex},checkAddonOrder=async({before,after,configFile,getConfig})=>{try{let config=await getConfig(configFile);if(!config?.addons){import_node_logger3.logger.warn("Unable to find 'addons' config in main Storybook config");return}if(!isCorrectOrder(config.addons,before,after)){let orEssentials=" (or '@storybook/addon-essentials')",beforeText=`'${before.name}'${before.inEssentials?orEssentials:""}`,afterText=`'${after.name}'${after.inEssentials?orEssentials:""}`;import_node_logger3.logger.warn(`Expected ${beforeText} to be listed before ${afterText} in main Storybook config.`);}}catch{import_node_logger3.logger.warn(`Unable to load config file: ${configFile}`);}},import_lazy_universal_dotenv=require_lib8(),import_path82=__toESM4(__require("path")),import_find_up=__toESM4(require_find_up3()),getProjectRoot=()=>{let result;if(process.env.STORYBOOK_PROJECT_ROOT)return process.env.STORYBOOK_PROJECT_ROOT;try{let found=import_find_up.default.sync(".git",{type:"directory"});found&&(result=import_path82.default.join(found,".."));}catch{}try{let found=import_find_up.default.sync(".svn",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}try{let found=import_find_up.default.sync(".hg",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}try{let splitDirname=__dirname.split("node_modules");result=result||(splitDirname.length>=2?splitDirname[0]:void 0);}catch{}try{let found=import_find_up.default.sync(".yarn",{type:"directory"});found&&(result=result||import_path82.default.join(found,".."));}catch{}return result||process.cwd()},nodePathsToArray=nodePath=>nodePath.split(process.platform==="win32"?";":":").filter(Boolean).map(p7=>import_path82.default.resolve("./",p7)),relativePattern=/^\.{1,2}([/\\]|$)/;function normalizeStoryPath(filename){return relativePattern.test(filename)?filename:`.${import_path82.default.sep}${filename}`}function loadEnvs(options9={}){let defaultNodeEnv=options9.production?"production":"development",env3={NODE_ENV:process.env.NODE_ENV||defaultNodeEnv,NODE_PATH:process.env.NODE_PATH||"",STORYBOOK:process.env.STORYBOOK||"true",PUBLIC_URL:options9.production?".":""};Object.keys(process.env).filter(name=>/^STORYBOOK_/.test(name)).forEach(name=>{env3[name]=process.env[name];});let base=Object.entries(env3).reduce((acc,[k14,v11])=>Object.assign(acc,{[k14]:JSON.stringify(v11)}),{}),{stringified,raw}=(0, import_lazy_universal_dotenv.getEnvironment)({nodeEnv:env3.NODE_ENV}),fullRaw={...env3,...raw};return fullRaw.NODE_PATH=nodePathsToArray(fullRaw.NODE_PATH||""),{stringified:{...base,...stringified},raw:fullRaw}}var stringifyEnvs=raw=>Object.entries(raw).reduce((acc,[key2,value])=>(acc[key2]=JSON.stringify(value),acc),{}),stringifyProcessEnvs=raw=>Object.entries(raw).reduce((acc,[key2,value])=>(acc[`process.env.${key2}`]=JSON.stringify(value),acc),{}),NODE_MODULES_RE=/node_modules/,commonGlobOptions=glob2=>NODE_MODULES_RE.test(glob2)?{}:{ignore:["**/node_modules/**"]},frameworkToRenderer={angular:"angular",ember:"ember","html-vite":"html","html-webpack5":"html",nextjs:"react","preact-vite":"preact","preact-webpack5":"preact",qwik:"qwik","react-vite":"react","react-webpack5":"react","server-webpack5":"server",solid:"solid","svelte-vite":"svelte","svelte-webpack5":"svelte",sveltekit:"svelte","vue3-vite":"vue3","vue3-webpack5":"vue3","web-components-vite":"web-components","web-components-webpack5":"web-components",html:"html",preact:"preact","react-native":"react-native",react:"react",server:"server",svelte:"svelte",vue3:"vue3","web-components":"web-components"};async function getBuilderOptions(options9){let framework=await options9.presets.apply("framework",{},options9);if(typeof framework!="string"&&framework?.options?.builder)return framework.options.builder;let{builder}=await options9.presets.apply("core",{},options9);return typeof builder!="string"&&builder?.options?builder.options:{}}var import_ts_dedent3=(init_esm(),__toCommonJS(esm_exports)),import_path92=__toESM4(__require("path"));function normalizePath2(p7){return import_path92.default.posix.normalize(p7.replace(/\\/g,"/"))}async function getFrameworkName(options9){let framework=await options9.presets.apply("framework","",options9);if(!framework)throw new Error(import_ts_dedent3.dedent`
1679
1679
  You must specify a framework in '.storybook/main.js' config.
1680
1680
 
1681
1681
  https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-field-mandatory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-onboarding",
3
- "version": "0.0.0-pr-26827-sha-9b2b60fc",
3
+ "version": "0.0.0-pr-27008-sha-307d4fb3",
4
4
  "description": "Storybook Addon Onboarding - Introduces a new onboarding experience",
5
5
  "keywords": [
6
6
  "storybook-addons",
@@ -50,16 +50,16 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@radix-ui/react-dialog": "^1.0.5",
53
- "@storybook/channels": "0.0.0-pr-26827-sha-9b2b60fc",
54
- "@storybook/components": "0.0.0-pr-26827-sha-9b2b60fc",
55
- "@storybook/core-events": "0.0.0-pr-26827-sha-9b2b60fc",
53
+ "@storybook/channels": "0.0.0-pr-27008-sha-307d4fb3",
54
+ "@storybook/components": "0.0.0-pr-27008-sha-307d4fb3",
55
+ "@storybook/core-events": "0.0.0-pr-27008-sha-307d4fb3",
56
56
  "@storybook/icons": "^1.2.5",
57
- "@storybook/manager-api": "0.0.0-pr-26827-sha-9b2b60fc",
58
- "@storybook/react": "0.0.0-pr-26827-sha-9b2b60fc",
59
- "@storybook/telemetry": "0.0.0-pr-26827-sha-9b2b60fc",
60
- "@storybook/test": "0.0.0-pr-26827-sha-9b2b60fc",
61
- "@storybook/theming": "0.0.0-pr-26827-sha-9b2b60fc",
62
- "@storybook/types": "0.0.0-pr-26827-sha-9b2b60fc",
57
+ "@storybook/manager-api": "0.0.0-pr-27008-sha-307d4fb3",
58
+ "@storybook/react": "0.0.0-pr-27008-sha-307d4fb3",
59
+ "@storybook/telemetry": "0.0.0-pr-27008-sha-307d4fb3",
60
+ "@storybook/test": "0.0.0-pr-27008-sha-307d4fb3",
61
+ "@storybook/theming": "0.0.0-pr-27008-sha-307d4fb3",
62
+ "@storybook/types": "0.0.0-pr-27008-sha-307d4fb3",
63
63
  "framer-motion": "^11.0.3",
64
64
  "react": "^18.2.0",
65
65
  "react-dom": "^18.2.0",