{"version":3,"file":"dist-DQdJsDnb.js","names":[],"sources":["../../../node_modules/stimulus-vite-helpers/dist/index.js"],"sourcesContent":["// src/index.ts\nvar CONTROLLER_FILENAME_REGEX = /^(?:.*?(?:controllers|components)\\/|\\.?\\.\\/)?(.+)(?:[/_-]controller\\..+?)$/;\nfunction registerControllers(application, controllerModules) {\n application.load(definitionsFromGlob(controllerModules));\n}\nfunction definitionsFromGlob(controllerModules) {\n return Object.entries(controllerModules).map(definitionFromEntry).filter((value) => value);\n}\nfunction definitionFromEntry([name, controllerModule]) {\n var _a;\n const identifier = identifierForGlobKey(name);\n const controllerConstructor = (_a = controllerModule.default) != null ? _a : controllerModule;\n if (identifier && typeof controllerConstructor === \"function\")\n return { identifier, controllerConstructor };\n}\nfunction identifierForGlobKey(key) {\n const logicalName = (key.match(CONTROLLER_FILENAME_REGEX) || [])[1];\n if (logicalName)\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n}\nexport {\n CONTROLLER_FILENAME_REGEX,\n definitionsFromGlob,\n identifierForGlobKey,\n registerControllers\n};\n"],"x_google_ignoreList":[0],"mappings":"AACA,IAAI,EAA4B,6EAChC,SAAS,EAAoB,EAAa,EAAmB,CAC3D,EAAY,KAAK,EAAoB,EAAkB,CAAC,CAE1D,SAAS,EAAoB,EAAmB,CAC9C,OAAO,OAAO,QAAQ,EAAkB,CAAC,IAAI,EAAoB,CAAC,OAAQ,GAAU,EAAM,CAE5F,SAAS,EAAoB,CAAC,EAAM,GAAmB,CAErD,IAAM,EAAa,EAAqB,EAAK,CACvC,EAA8B,EAAiB,SAAwB,EAC7E,GAAI,GAAc,OAAO,GAA0B,WACjD,MAAO,CAAE,aAAY,wBAAuB,CAEhD,SAAS,EAAqB,EAAK,CACjC,IAAM,GAAe,EAAI,MAAM,EAA0B,EAAI,EAAE,EAAE,GACjE,GAAI,EACF,OAAO,EAAY,QAAQ,KAAM,IAAI,CAAC,QAAQ,MAAO,KAAK"}