@designcrowd/fe-shared-lib 1.6.10-voiceText → 1.6.10
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.
- package/dist/css/tailwind-brandCrowd.css +6 -109
- package/dist/css/tailwind-brandPage.css +6 -105
- package/dist/css/tailwind-crazyDomains.css +6 -109
- package/dist/css/tailwind-designCom.css +6 -109
- package/dist/css/tailwind-designCrowd.css +6 -109
- package/index.js +0 -2
- package/package.json +1 -1
- package/public/css/tailwind-brandCrowd.css +6 -23
- package/public/css/tailwind-brandPage.css +6 -15
- package/public/css/tailwind-crazyDomains.css +6 -23
- package/public/css/tailwind-designCom.css +6 -23
- package/public/css/tailwind-designCrowd.css +6 -23
- package/src/atoms/components/Dropdown/Dropdown.vue +7 -1
- package/src/atoms/components/Icon/Icon.vue +0 -2
- package/src/atoms/components/Modal/Modal.vue +9 -0
- package/.claude/settings.local.json +0 -59
- package/.storybook-static/assets/Auth-DT64t5h-.css +0 -1
- package/.storybook-static/assets/Auth.stories-C6eXcTSu.js +0 -490
- package/.storybook-static/assets/AuthCrazyDomains.stories-DGvEoWCa.js +0 -73
- package/.storybook-static/assets/Button-5UzSGUF6.css +0 -1
- package/.storybook-static/assets/Button-DKdQT6Fq.js +0 -1
- package/.storybook-static/assets/ButtonGroup-DDPXuhxR.css +0 -1
- package/.storybook-static/assets/ButtonGroup.stories-DlrYMRSk.js +0 -504
- package/.storybook-static/assets/ButtonPrimary-Bu6bXb_c.css +0 -1
- package/.storybook-static/assets/ButtonPrimary-BvWW6Duz.js +0 -1
- package/.storybook-static/assets/Buttons.stories-CKmd6hkZ.js +0 -761
- package/.storybook-static/assets/ButtonsCrazyDomains.stories-DdEuOUrn.js +0 -199
- package/.storybook-static/assets/Checkbox.mixin-DkHpdvGa.js +0 -1
- package/.storybook-static/assets/Checkbox.stories-DPBUC2Mx.js +0 -246
- package/.storybook-static/assets/Checktile.stories-ByaFwplD.js +0 -88
- package/.storybook-static/assets/CollapsiblePanel.stories-Y6q3gP9j.js +0 -56
- package/.storybook-static/assets/ColorPicker.stories-DdxPUB_R.js +0 -73
- package/.storybook-static/assets/CopyToClipboardText.stories-J9qndWxd.js +0 -32
- package/.storybook-static/assets/Dropdown.stories-1zKPATii.js +0 -159
- package/.storybook-static/assets/DropdownItem-BV-BdThU.css +0 -1
- package/.storybook-static/assets/DropdownItem-DA6TdpDb.js +0 -1
- package/.storybook-static/assets/FormControl.mixin-DcEBwrV3.js +0 -1
- package/.storybook-static/assets/HashRouteModal.stories-BGxvqE22.js +0 -60
- package/.storybook-static/assets/HelloBar-CYEZR2kQ.js +0 -1
- package/.storybook-static/assets/HelloBar.stories-597Kxj0W.js +0 -342
- package/.storybook-static/assets/Icon-C17LFvsP.js +0 -145
- package/.storybook-static/assets/Icon.stories-B9iAmcTU.js +0 -151
- package/.storybook-static/assets/Icon.stories-CR5vT9H7.js +0 -791
- package/.storybook-static/assets/Loader-BWGoT_xC.js +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours-CExzox1Z.js +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours-CeAaMKke.css +0 -1
- package/.storybook-static/assets/LogoBusinessBrandColours.stories-kuxAH8B8.js +0 -36
- package/.storybook-static/assets/Masonry-C2MNiGg0.css +0 -1
- package/.storybook-static/assets/Masonry.stories-CTXJLQ_i.js +0 -71
- package/.storybook-static/assets/Modal-CGwEIF5R.css +0 -1
- package/.storybook-static/assets/Modal-CydTNprT.js +0 -1
- package/.storybook-static/assets/Modal.stories-DZiG5NGM.js +0 -345
- package/.storybook-static/assets/Notice.stories-ChOj8CWm.js +0 -222
- package/.storybook-static/assets/NumberStepper-Blffv09R.css +0 -1
- package/.storybook-static/assets/NumberStepper.stories-CVbKJ_oJ.js +0 -64
- package/.storybook-static/assets/PaymentConfigList-BpUMV6cp.css +0 -1
- package/.storybook-static/assets/PaymentConfigList.stories-DUD7OZBS.js +0 -130
- package/.storybook-static/assets/Picture-B8m1I9xN.js +0 -1
- package/.storybook-static/assets/Picture.stories-MMzybhJ6.js +0 -119
- package/.storybook-static/assets/Pill-DLXZ_TL8.js +0 -1
- package/.storybook-static/assets/Pill.stories-DCP7szJm.js +0 -18
- package/.storybook-static/assets/PillBar-os4mJV3M.css +0 -1
- package/.storybook-static/assets/PillBar.stories-Bry-zQ6f.js +0 -41
- package/.storybook-static/assets/Price-C4GZbDSa.js +0 -1
- package/.storybook-static/assets/Price.stories-CMHly9V0.js +0 -337
- package/.storybook-static/assets/PromoCard.stories-xsbFtADE.js +0 -299
- package/.storybook-static/assets/PublishBrandPageModal-Q9-mNG1q.css +0 -1
- package/.storybook-static/assets/PublishBrandPageModal.stories-C9XzW_1m.js +0 -324
- package/.storybook-static/assets/SearchBar.stories-DaIneOSz.js +0 -12
- package/.storybook-static/assets/Select-DnioWQmi.css +0 -1
- package/.storybook-static/assets/Select.stories-BmGYB4pw.js +0 -108
- package/.storybook-static/assets/SellDomainNameList.fixtures-LC6fjr_b.js +0 -1
- package/.storybook-static/assets/SellDomainNameListModal-DH6khE10.css +0 -1
- package/.storybook-static/assets/SellDomainNameListModal-ymtVclFP.js +0 -1
- package/.storybook-static/assets/SellDomainNameListModal.stories-DvGvylgx.js +0 -71
- package/.storybook-static/assets/SellDomainNameListSearchResult-Cpxq0jDA.css +0 -1
- package/.storybook-static/assets/SellDomainNameListSearchResult-D-1CrQyf.js +0 -1
- package/.storybook-static/assets/SellDomainNameSearchWithResults-bX--zu97.js +0 -1
- package/.storybook-static/assets/SellDomainNameSearchWithResults.stories-DRUJjSdH.js +0 -37
- package/.storybook-static/assets/SellDomainNameWidget.stories-CC3LX10s.js +0 -36
- package/.storybook-static/assets/SignIn-CPjf8_2O.css +0 -1
- package/.storybook-static/assets/SignIn-DI0DSDFe.js +0 -1
- package/.storybook-static/assets/Slider-Cog2FFdj.css +0 -1
- package/.storybook-static/assets/Slider.stories-B2KGwnJy.js +0 -141
- package/.storybook-static/assets/SparkleIcon.stories-Dk904hVE.js +0 -547
- package/.storybook-static/assets/StarRating-BtKh7pzm.css +0 -1
- package/.storybook-static/assets/StarRating.stories-d2mgOuo2.js +0 -45
- package/.storybook-static/assets/TabMenu.stories-Cg2yenqj.js +0 -47
- package/.storybook-static/assets/TextCopyField-B66NKTk_.js +0 -1
- package/.storybook-static/assets/TextCopyField.stories-B4_ZlfLU.js +0 -47
- package/.storybook-static/assets/TextInput-CMoUjT_5.js +0 -1
- package/.storybook-static/assets/TextInput.stories-oyyxxf3j.js +0 -233
- package/.storybook-static/assets/Textarea.stories-BvhZR6K2.js +0 -207
- package/.storybook-static/assets/Toggle.stories-yT5-rL2k.js +0 -161
- package/.storybook-static/assets/Tooltip-DyXIgFQH.css +0 -1
- package/.storybook-static/assets/Tooltip-ZukyujG5.js +0 -1
- package/.storybook-static/assets/Tooltip.stories-sJFylRS_.js +0 -953
- package/.storybook-static/assets/UploadYourLogoApplication-Dmw8QcH3.css +0 -1
- package/.storybook-static/assets/UploadYourLogoApplication.stories-C9AvzHO_.js +0 -186
- package/.storybook-static/assets/UploadYourLogoDropzone-B1ffcicv.js +0 -24
- package/.storybook-static/assets/UploadYourLogoDropzone-DQqACf-e.css +0 -1
- package/.storybook-static/assets/UploadYourLogoDropzone.stories-D1Dt2ord.js +0 -55
- package/.storybook-static/assets/UploadedLogoSearchResultCard.stories-D8oF1Yrx.js +0 -79
- package/.storybook-static/assets/WebsiteContextualUpgradeModal-8u1zOZrW.css +0 -1
- package/.storybook-static/assets/WebsiteContextualUpgradeModal.stories-mtcvWOAg.js +0 -211
- package/.storybook-static/assets/_commonjsHelpers-CE1G-McA.js +0 -1
- package/.storybook-static/assets/_plugin-vue_export-helper-DlAUqK2U.js +0 -1
- package/.storybook-static/assets/api-lSJGRrF2.js +0 -1
- package/.storybook-static/assets/axe-DrS73Vi2.js +0 -20
- package/.storybook-static/assets/brand-crowd-api.client-D45NKshX.js +0 -1
- package/.storybook-static/assets/bundled-translations-BoWhEDU_.js +0 -1
- package/.storybook-static/assets/bundled-translations.de-DE-C4lqla4O.js +0 -1
- package/.storybook-static/assets/bundled-translations.es-ES-BxMIllUH.js +0 -1
- package/.storybook-static/assets/bundled-translations.fr-CA-MxZpyz0w.js +0 -1
- package/.storybook-static/assets/bundled-translations.fr-FR-N7UPCZVr.js +0 -1
- package/.storybook-static/assets/bundled-translations.pt-BR-C8tscYuG.js +0 -1
- package/.storybook-static/assets/bundled-translations.pt-PT-Dszj5Xfa.js +0 -1
- package/.storybook-static/assets/carousel-BelyIYOK.css +0 -1
- package/.storybook-static/assets/carousel.stories-CJw3-Iy6.js +0 -668
- package/.storybook-static/assets/event-constants-CMO9VQVu.js +0 -1
- package/.storybook-static/assets/iframe-B3A6OXQU.js +0 -1104
- package/.storybook-static/assets/index-B-eiLVzF.js +0 -7
- package/.storybook-static/assets/index-QquxUozE.js +0 -6
- package/.storybook-static/assets/matchers-5TDFFDYO-HJu_DfWo.js +0 -14
- package/.storybook-static/assets/mediaQueryMixin-CISNqd93.js +0 -1
- package/.storybook-static/assets/preload-helper-PPVm8Dsz.js +0 -1
- package/.storybook-static/assets/tracking-ATsLLehC.js +0 -1
- package/.storybook-static/css/tailwind-brandCrowd.css +0 -2508
- package/.storybook-static/css/tailwind-brandPage.css +0 -2188
- package/.storybook-static/css/tailwind-crazyDomains.css +0 -2508
- package/.storybook-static/css/tailwind-designCom.css +0 -2508
- package/.storybook-static/css/tailwind-designCrowd.css +0 -2508
- package/.storybook-static/favicon-wrapper.svg +0 -46
- package/.storybook-static/favicon.svg +0 -1
- package/.storybook-static/iframe.html +0 -713
- package/.storybook-static/index.html +0 -148
- package/.storybook-static/index.json +0 -1
- package/.storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/.storybook-static/nunito-sans-bold.woff2 +0 -0
- package/.storybook-static/nunito-sans-italic.woff2 +0 -0
- package/.storybook-static/nunito-sans-regular.woff2 +0 -0
- package/.storybook-static/project.json +0 -1
- package/.storybook-static/sb-addons/a11y-1/manager-bundle.js +0 -57
- package/.storybook-static/sb-addons/links-2/manager-bundle.js +0 -3
- package/.storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -628
- package/.storybook-static/sb-addons/themes-3/manager-bundle.js +0 -3
- package/.storybook-static/sb-common-assets/favicon-wrapper.svg +0 -46
- package/.storybook-static/sb-common-assets/favicon.svg +0 -1
- package/.storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/.storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/.storybook-static/sb-manager/globals-runtime.js +0 -77935
- package/.storybook-static/sb-manager/globals.js +0 -24
- package/.storybook-static/sb-manager/manager-stores.js +0 -23
- package/.storybook-static/sb-manager/runtime.js +0 -20404
- package/.storybook-static/vite-inject-mocker-entry.js +0 -2
- package/src/atoms/components/Icon/icons/microphone.vue +0 -5
- package/src/atoms/components/VoiceToTextButton/VoiceToTextButton.stories.js +0 -107
- package/src/atoms/components/VoiceToTextButton/VoiceToTextButton.vue +0 -84
- package/src/useVoiceToText.js +0 -174
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as ke}from"./assets/preload-helper-PPVm8Dsz.js";var O={client:!0},ae=class{registryByUrl=new Map;registryById=new Map;clear(){this.registryByUrl.clear(),this.registryById.clear()}keys(){return this.registryByUrl.keys()}add(e){this.registryByUrl.set(e.url,e),this.registryById.set(e.id,e)}register(e,r,t,n,i){let a=typeof e=="object"?e.type:e;if(typeof e=="object"){let o=e;if(o instanceof X||o instanceof q||o instanceof W||o instanceof F)throw new TypeError(`[vitest] Cannot register a mock that is already defined. Expected a JSON representation from \`MockedModule.toJSON\`, instead got "${o.type}". Use "registry.add()" to update a mock instead.`);if(o.type==="automock"){let s=X.fromJSON(o);return this.add(s),s}else if(o.type==="autospy"){let s=q.fromJSON(o);return this.add(s),s}else if(o.type==="redirect"){let s=F.fromJSON(o);return this.add(s),s}else throw o.type==="manual"?new Error("Cannot set serialized manual mock. Define a factory function manually with `ManualMockedModule.fromJSON()`."):new Error(`Unknown mock type: ${o.type}`)}if(typeof r!="string")throw new TypeError("[vitest] Mocks require a raw string.");if(typeof n!="string")throw new TypeError("[vitest] Mocks require a url string.");if(typeof t!="string")throw new TypeError("[vitest] Mocks require an id string.");if(a==="manual"){if(typeof i!="function")throw new TypeError("[vitest] Manual mocks require a factory function.");let o=new W(r,t,n,i);return this.add(o),o}else if(a==="automock"||a==="autospy"){let o=a==="automock"?new X(r,t,n):new q(r,t,n);return this.add(o),o}else if(a==="redirect"){if(typeof i!="string")throw new TypeError("[vitest] Redirect mocks require a redirect string.");let o=new F(r,t,n,i);return this.add(o),o}else throw new Error(`[vitest] Unknown mock type: ${a}`)}delete(e){this.registryByUrl.delete(e)}get(e){return this.registryByUrl.get(e)}getById(e){return this.registryById.get(e)}has(e){return this.registryByUrl.has(e)}},X=class{type="automock";constructor(e,r,t){this.raw=e,this.id=r,this.url=t}static fromJSON(e){return new q(e.raw,e.id,e.url)}toJSON(){return{type:this.type,url:this.url,raw:this.raw,id:this.id}}},q=class le{type="autospy";constructor(r,t,n){this.raw=r,this.id=t,this.url=n}static fromJSON(r){return new le(r.raw,r.id,r.url)}toJSON(){return{type:this.type,url:this.url,id:this.id,raw:this.raw}}},F=class ce{type="redirect";constructor(r,t,n,i){this.raw=r,this.id=t,this.url=n,this.redirect=i}static fromJSON(r){return new ce(r.raw,r.id,r.url,r.redirect)}toJSON(){return{type:this.type,url:this.url,raw:this.raw,id:this.id,redirect:this.redirect}}},W=class ue{cache;type="manual";constructor(r,t,n,i){this.raw=r,this.id=t,this.url=n,this.factory=i}async resolve(){if(this.cache)return this.cache;let r;try{r=await this.factory()}catch(t){let n=new Error('[vitest] There was an error when mocking a module. If you are using "vi.mock" factory, make sure there are no top level variables inside, since this call is hoisted to top of the file. Read more: https://vitest.dev/api/vi.html#vi-mock');throw n.cause=t,n}if(r===null||typeof r!="object"||Array.isArray(r))throw new TypeError(`[vitest] vi.mock("${this.raw}", factory?: () => unknown) is not returning an object. Did you mean to return an object with a "default" key?`);return this.cache=r}static fromJSON(r,t){return new ue(r.raw,r.id,r.url,t)}toJSON(){return{type:this.type,url:this.url,id:this.id,raw:this.raw}}};function we(e,r,t={}){let n=new Array,i=new Se,a=(u,d,y)=>{try{return u[d]=y,!0}catch{return!1}},o=(u,d)=>{let y=D(u),g=y==="Module"||!!u.__esModule;for(let{key:m,descriptor:I}of Y(u,g,e.globalConstructors)){if(!g&&I.get){try{Object.defineProperty(d,m,I)}catch{}continue}if(_e(m,y))continue;let v=u[m],l=i.getId(v);if(l!==void 0){n.push(()=>a(d,m,i.getMockedValue(l)));continue}let c=D(v);if(Array.isArray(v)){a(d,m,[]);continue}let x=c.includes("Function")&&typeof v=="function";if((!x||v._isMockFunction)&&c!=="Object"&&c!=="Module"){a(d,m,v);continue}if(a(d,m,x?v:{})){if(x){let R=function(){if(this instanceof d[m])for(let{key:b,descriptor:$}of Y(this,!1,e.globalConstructors)){if($.get)continue;let C=this[b];if(D(C).includes("Function")&&typeof C=="function"){let p=this[b],h=_(this,b).mockImplementation(p),B=h.mockReset;h.mockRestore=h.mockReset=()=>(B.call(h),h.mockImplementation(p),h)}}};if(!e.spyOn)throw new Error("[@vitest/mocker] `spyOn` is not defined. This is a Vitest error. Please open a new issue with reproduction.");let _=e.spyOn,M=_(d,m);if(e.type==="automock"){M.mockImplementation(R);let b=M.mockReset;M.mockRestore=M.mockReset=()=>(b.call(M),M.mockImplementation(R),M)}Object.defineProperty(d[m],"length",{value:0})}i.track(v,d[m]),o(v,d[m])}}},s=t;o(r,s);for(let u of n)u();return s}var Se=class{idMap=new Map;mockedValueMap=new Map;getId(e){return this.idMap.get(e)}getMockedValue(e){return this.mockedValueMap.get(e)}track(e,r){let t=this.idMap.size;return this.idMap.set(e,t),this.mockedValueMap.set(t,r),t}};function D(e){return Object.prototype.toString.apply(e).slice(8,-1)}function _e(e,r){return r.includes("Function")&&typeof e=="string"&&["arguments","callee","caller","length","name"].includes(e)}function Y(e,r,t){let{Map:n,Object:i,Function:a,RegExp:o,Array:s}=t,u=new n,d=e;do{if(d===i.prototype||d===a.prototype||d===o.prototype)break;Ee(d,y=>{let g=i.getOwnPropertyDescriptor(d,y);g&&u.set(y,{key:y,descriptor:g})})}while(d=i.getPrototypeOf(d));if(r&&!u.has("default")&&"default"in e){let y=i.getOwnPropertyDescriptor(e,"default");y&&u.set("default",{key:"default",descriptor:y})}return s.from(u.values())}function Ee(e,r){let t=typeof r=="function"?r:n=>r.add(n);Object.getOwnPropertyNames(e).forEach(t),Object.getOwnPropertySymbols(e).forEach(t)}var Ie=/^[A-Za-z]:\//;function fe(e=""){return e&&e.replace(/\\/g,"/").replace(Ie,r=>r.toUpperCase())}var be=/^[/\\]{2}/,xe=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Te=/^[A-Za-z]:$/,Me=/.(\.[^./]+|\.)$/,Pe=function(e){if(e.length===0)return".";e=fe(e);let r=e.match(be),t=K(e),n=e[e.length-1]==="/";return e=$e(e,!t),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),Te.test(e)&&(e+="/"),r?t?`//${e}`:`//./${e}`:t&&!K(e)?`/${e}`:e)},Re=function(...e){let r="";for(let t of e)if(t)if(r.length>0){let n=r[r.length-1]==="/",i=t[0]==="/";n&&i?r+=t.slice(1):r+=n||i?t:`/${t}`}else r+=t;return Pe(r)};function $e(e,r){let t="",n=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else{if(o==="/")break;o="/"}if(o==="/"){if(!(i===s-1||a===1))if(a===2){if(t.length<2||n!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let u=t.lastIndexOf("/");u===-1?(t="",n=0):(t=t.slice(0,u),n=t.length-1-t.lastIndexOf("/")),i=s,a=0;continue}else if(t.length>0){t="",n=0,i=s,a=0;continue}}r&&(t+=t.length>0?"/..":"..",n=2)}else t.length>0?t+=`/${e.slice(i+1,s)}`:t=e.slice(i+1,s),n=s-i-1;i=s,a=0}else o==="."&&a!==-1?++a:a=-1}return t}var K=function(e){return xe.test(e)},Ae=function(e){if(e==="..")return"";let r=Me.exec(fe(e));return r&&r[1]||""},Oe={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},Ce=Object.entries(Oe);function j(e){return String(e)}j.open="";j.close="";function Ne(e=!1){let r=typeof O<"u"?O:void 0,t=r?.env||{},n=r?.argv||[];return!("NO_COLOR"in t||n.includes("--no-color"))&&("FORCE_COLOR"in t||n.includes("--color")||r?.platform==="win32"||e&&t.TERM!=="dumb"||"CI"in t)||typeof window<"u"&&!!window.chrome}function Le(e=!1){let r=Ne(e),t=(o,s,u,d)=>{let y="",g=0;do y+=o.substring(g,d)+u,g=d+s.length,d=o.indexOf(s,g);while(~d);return y+o.substring(g)},n=(o,s,u=o)=>{let d=y=>{let g=String(y),m=g.indexOf(s,o.length);return~m?o+t(g,s,u,m)+s:o+g+s};return d.open=o,d.close=s,d},i={isColorSupported:r},a=o=>`\x1B[${o}m`;for(let[o,s]of Ce)i[o]=r?n(a(s[0]),a(s[1]),s[2]):j;return i}Le();function de(e,r){return r.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function pe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H={exports:{}},w={},Z;function Je(){if(Z)return w;Z=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),I=Symbol.for("react.client.reference");function v(l){if(typeof l=="object"&&l!==null){var c=l.$$typeof;switch(c){case e:switch(l=l.type,l){case t:case i:case n:case u:case d:case m:return l;default:switch(l=l&&l.$$typeof,l){case o:case s:case g:case y:return l;case a:return l;default:return c}}case r:return c}}}return w.ContextConsumer=a,w.ContextProvider=o,w.Element=e,w.ForwardRef=s,w.Fragment=t,w.Lazy=g,w.Memo=y,w.Portal=r,w.Profiler=i,w.StrictMode=n,w.Suspense=u,w.SuspenseList=d,w.isContextConsumer=function(l){return v(l)===a},w.isContextProvider=function(l){return v(l)===o},w.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===e},w.isForwardRef=function(l){return v(l)===s},w.isFragment=function(l){return v(l)===t},w.isLazy=function(l){return v(l)===g},w.isMemo=function(l){return v(l)===y},w.isPortal=function(l){return v(l)===r},w.isProfiler=function(l){return v(l)===i},w.isStrictMode=function(l){return v(l)===n},w.isSuspense=function(l){return v(l)===u},w.isSuspenseList=function(l){return v(l)===d},w.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===t||l===i||l===n||l===u||l===d||typeof l=="object"&&l!==null&&(l.$$typeof===g||l.$$typeof===y||l.$$typeof===o||l.$$typeof===a||l.$$typeof===s||l.$$typeof===I||l.getModuleId!==void 0)},w.typeOf=v,w}var G;function Be(){return G||(G=1,H.exports=Je()),H.exports}var he=Be(),Xe=pe(he),qe=de({__proto__:null,default:Xe},[he]),Q={exports:{}},k={},ee;function Fe(){if(ee)return k;ee=1;var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),s=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),I=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function l(c){if(typeof c=="object"&&c!==null){var x=c.$$typeof;switch(x){case e:switch(c=c.type,c){case t:case i:case n:case d:case y:return c;default:switch(c=c&&c.$$typeof,c){case s:case o:case u:case m:case g:case a:return c;default:return x}}case r:return x}}}return k.ContextConsumer=o,k.ContextProvider=a,k.Element=e,k.ForwardRef=u,k.Fragment=t,k.Lazy=m,k.Memo=g,k.Portal=r,k.Profiler=i,k.StrictMode=n,k.Suspense=d,k.SuspenseList=y,k.isAsyncMode=function(){return!1},k.isConcurrentMode=function(){return!1},k.isContextConsumer=function(c){return l(c)===o},k.isContextProvider=function(c){return l(c)===a},k.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===e},k.isForwardRef=function(c){return l(c)===u},k.isFragment=function(c){return l(c)===t},k.isLazy=function(c){return l(c)===m},k.isMemo=function(c){return l(c)===g},k.isPortal=function(c){return l(c)===r},k.isProfiler=function(c){return l(c)===i},k.isStrictMode=function(c){return l(c)===n},k.isSuspense=function(c){return l(c)===d},k.isSuspenseList=function(c){return l(c)===y},k.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===t||c===i||c===n||c===d||c===y||c===I||typeof c=="object"&&c!==null&&(c.$$typeof===m||c.$$typeof===g||c.$$typeof===a||c.$$typeof===o||c.$$typeof===u||c.$$typeof===v||c.getModuleId!==void 0)},k.typeOf=l,k}var te;function De(){return te||(te=1,Q.exports=Fe()),Q.exports}var ye=De(),Ue=pe(ye),ze=de({__proto__:null,default:Ue},[ye]),je=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"];Object.fromEntries(je.map(e=>[e,r=>ze[e](r)||qe[e](r)]));var Ve=()=>"Promise{…}";try{let{getPromiseDetails:e,kPending:r,kRejected:t}=O.binding("util");Array.isArray(e(Promise.resolve()))&&(Ve=(n,i)=>{let[a,o]=e(n);return a===r?"Promise{<pending>}":`Promise${a===t?"!":""}{${i.inspect(o,i)}}`})}catch{}function We(e){let{message:r="$$stack trace error",stackTraceLimit:t=1}=e||{},n=Error.stackTraceLimit,i=Error.prepareStackTrace;Error.stackTraceLimit=t,Error.prepareStackTrace=o=>o.stack;let a=new Error(r).stack||"";return Error.prepareStackTrace=i,Error.stackTraceLimit=n,a}var U,re;function Ye(){if(re)return U;re=1;var e,r,t,n,i,a,o,s,u,d,y,g,m,I,v,l,c,x,R;return m=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy,g=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,e=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy,v=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,y=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,l=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,R=/[\t\v\f\ufeff\p{Zs}]+/uy,s=/\r?\n|[\r\u2028\u2029]/y,u=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,I=/\/\/.*/y,t=/[<>.:={}]|\/(?![\/*])/y,r=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy,n=/(['"])(?:(?!\1)[^])*(\1)?/y,i=/[^<>{}]+/y,x=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,c=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,a=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,o=/^(?:return|throw|yield)$/,d=RegExp(s.source),U=function*(_,{jsx:M=!1}={}){var b,$,C,p,h,B,f,P,V,T,N,S,L,E;for({length:B}=_,p=0,h="",E=[{tag:"JS"}],b=[],N=0,S=!1;p<B;){switch(P=E[E.length-1],P.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(_[p]==="/"&&(x.test(h)||a.test(h))&&(m.lastIndex=p,f=m.exec(_))){p=m.lastIndex,h=f[0],S=!0,yield{type:"RegularExpressionLiteral",value:f[0],closed:f[1]!==void 0&&f[1]!=="\\"};continue}if(g.lastIndex=p,f=g.exec(_)){switch(L=f[0],V=g.lastIndex,T=L,L){case"(":h==="?NonExpressionParenKeyword"&&E.push({tag:"JSNonExpressionParen",nesting:N}),N++,S=!1;break;case")":N--,S=!0,P.tag==="JSNonExpressionParen"&&N===P.nesting&&(E.pop(),T="?NonExpressionParenEnd",S=!1);break;case"{":g.lastIndex=0,C=!c.test(h)&&(x.test(h)||a.test(h)),b.push(C),S=!1;break;case"}":switch(P.tag){case"InterpolationInTemplate":if(b.length===P.nesting){l.lastIndex=p,f=l.exec(_),p=l.lastIndex,h=f[0],f[1]==="${"?(h="?InterpolationInTemplate",S=!1,yield{type:"TemplateMiddle",value:f[0]}):(E.pop(),S=!0,yield{type:"TemplateTail",value:f[0],closed:f[1]==="`"});continue}break;case"InterpolationInJSX":if(b.length===P.nesting){E.pop(),p+=1,h="}",yield{type:"JSXPunctuator",value:"}"};continue}}S=b.pop(),T=S?"?ExpressionBraceEnd":"}";break;case"]":S=!0;break;case"++":case"--":T=S?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(M&&(x.test(h)||a.test(h))){E.push({tag:"JSXTag"}),p+=1,h="<",yield{type:"JSXPunctuator",value:L};continue}S=!1;break;default:S=!1}p=V,h=T,yield{type:"Punctuator",value:L};continue}if(e.lastIndex=p,f=e.exec(_)){switch(p=e.lastIndex,T=f[0],f[0]){case"for":case"if":case"while":case"with":h!=="."&&h!=="?."&&(T="?NonExpressionParenKeyword")}h=T,S=!a.test(f[0]),yield{type:f[1]==="#"?"PrivateIdentifier":"IdentifierName",value:f[0]};continue}if(v.lastIndex=p,f=v.exec(_)){p=v.lastIndex,h=f[0],S=!0,yield{type:"StringLiteral",value:f[0],closed:f[2]!==void 0};continue}if(y.lastIndex=p,f=y.exec(_)){p=y.lastIndex,h=f[0],S=!0,yield{type:"NumericLiteral",value:f[0]};continue}if(l.lastIndex=p,f=l.exec(_)){p=l.lastIndex,h=f[0],f[1]==="${"?(h="?InterpolationInTemplate",E.push({tag:"InterpolationInTemplate",nesting:b.length}),S=!1,yield{type:"TemplateHead",value:f[0]}):(S=!0,yield{type:"NoSubstitutionTemplate",value:f[0],closed:f[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(t.lastIndex=p,f=t.exec(_)){switch(p=t.lastIndex,T=f[0],f[0]){case"<":E.push({tag:"JSXTag"});break;case">":E.pop(),h==="/"||P.tag==="JSXTagEnd"?(T="?JSX",S=!0):E.push({tag:"JSXChildren"});break;case"{":E.push({tag:"InterpolationInJSX",nesting:b.length}),T="?InterpolationInJSX",S=!1;break;case"/":h==="<"&&(E.pop(),E[E.length-1].tag==="JSXChildren"&&E.pop(),E.push({tag:"JSXTagEnd"}))}h=T,yield{type:"JSXPunctuator",value:f[0]};continue}if(r.lastIndex=p,f=r.exec(_)){p=r.lastIndex,h=f[0],yield{type:"JSXIdentifier",value:f[0]};continue}if(n.lastIndex=p,f=n.exec(_)){p=n.lastIndex,h=f[0],yield{type:"JSXString",value:f[0],closed:f[2]!==void 0};continue}break;case"JSXChildren":if(i.lastIndex=p,f=i.exec(_)){p=i.lastIndex,h=f[0],yield{type:"JSXText",value:f[0]};continue}switch(_[p]){case"<":E.push({tag:"JSXTag"}),p++,h="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":E.push({tag:"InterpolationInJSX",nesting:b.length}),p++,h="?InterpolationInJSX",S=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(R.lastIndex=p,f=R.exec(_)){p=R.lastIndex,yield{type:"WhiteSpace",value:f[0]};continue}if(s.lastIndex=p,f=s.exec(_)){p=s.lastIndex,S=!1,o.test(h)&&(h="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:f[0]};continue}if(u.lastIndex=p,f=u.exec(_)){p=u.lastIndex,d.test(f[0])&&(S=!1,o.test(h)&&(h="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:f[0],closed:f[1]!==void 0};continue}if(I.lastIndex=p,f=I.exec(_)){p=I.lastIndex,S=!1,yield{type:"SingleLineComment",value:f[0]};continue}$=String.fromCodePoint(_.codePointAt(p)),p+=$.length,h=$,S=!1,yield{type:P.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:$}}},U}Ye();var me={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]};new Set(me.keyword);new Set(me.strict);var ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ke=new Uint8Array(64),He=new Uint8Array(128);for(let e=0;e<ne.length;e++){let r=ne.charCodeAt(e);Ke[e]=r,He[r]=e}var ie;(function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"})(ie||(ie={}));var Ze=/^[A-Za-z]:\//;function Ge(e=""){return e&&e.replace(/\\/g,"/").replace(Ze,r=>r.toUpperCase())}var Qe=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function et(){return typeof O<"u"&&typeof O.cwd=="function"?O.cwd().replace(/\\/g,"/"):"/"}var tt=function(...e){e=e.map(n=>Ge(n));let r="",t=!1;for(let n=e.length-1;n>=-1&&!t;n--){let i=n>=0?e[n]:et();!i||i.length===0||(r=`${i}/${r}`,t=oe(i))}return r=rt(r,!t),t&&!oe(r)?`/${r}`:r.length>0?r:"."};function rt(e,r){let t="",n=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else{if(o==="/")break;o="/"}if(o==="/"){if(!(i===s-1||a===1))if(a===2){if(t.length<2||n!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let u=t.lastIndexOf("/");u===-1?(t="",n=0):(t=t.slice(0,u),n=t.length-1-t.lastIndexOf("/")),i=s,a=0;continue}else if(t.length>0){t="",n=0,i=s,a=0;continue}}r&&(t+=t.length>0?"/..":"..",n=2)}else t.length>0?t+=`/${e.slice(i+1,s)}`:t=e.slice(i+1,s),n=s-i-1;i=s,a=0}else o==="."&&a!==-1?++a:a=-1}return t}var oe=function(e){return Qe.test(e)},ge=/^\s*at .*(?:\S:\d+|\(native\))/m,nt=/^(?:eval@)?(?:\[native code\])?$/;function ve(e){if(!e.includes(":"))return[e];let r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!r)return[e];let t=r[1];if(t.startsWith("async ")&&(t=t.slice(6)),t.startsWith("http:")||t.startsWith("https:")){let n=new URL(t);n.searchParams.delete("import"),n.searchParams.delete("browserv"),t=n.pathname+n.hash+n.search}if(t.startsWith("/@fs/")){let n=/^\/@fs\/[a-zA-Z]:\//.test(t);t=t.slice(n?5:4)}return[t,r[2]||void 0,r[3]||void 0]}function it(e){let r=e.trim();if(nt.test(r)||(r.includes(" > eval")&&(r=r.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!r.includes("@")&&!r.includes(":")))return null;let t=/((.*".+"[^@]*)?[^@]*)(@)/,n=r.match(t),i=n&&n[1]?n[1]:void 0,[a,o,s]=ve(r.replace(t,""));return!a||!o||!s?null:{file:a,method:i||"",line:Number.parseInt(o),column:Number.parseInt(s)}}function ot(e){let r=e.trim();return ge.test(r)?st(r):it(r)}function st(e){let r=e.trim();if(!ge.test(r))return null;r.includes("(eval ")&&(r=r.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let t=r.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;let[i,a,o]=ve(n?n[1]:t),s=n&&t||"",u=i&&["eval","<anonymous>"].includes(i)?void 0:i;return!u||!a||!o?null:(s.startsWith("async ")&&(s=s.slice(6)),u.startsWith("file://")&&(u=u.slice(7)),u=u.startsWith("node:")||u.startsWith("internal:")?u:tt(u),s&&(s=s.replace(/__vite_ssr_import_\d+__\./g,"")),{method:s,file:u,line:Number.parseInt(a),column:Number.parseInt(o)})}function at(e){let r=e?.globalThisKey;function t(){return typeof globalThis[r]<"u"?globalThis[r]:new Proxy({},{get(n,i){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(i)}() is forbidden.`)}})}return{hoisted(n){if(typeof n!="function")throw new TypeError(`vi.hoisted() expects a function, but received a ${typeof n}`);return n()},mock(n,i){if(typeof n!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof n}`);let a=A("mock");t().queueMock(n,a,typeof i=="function"?()=>i(()=>t().importActual(n,a)):i)},unmock(n){if(typeof n!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof n}`);t().queueUnmock(n,A("unmock"))},doMock(n,i){if(typeof n!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof n}`);let a=A("doMock");t().queueMock(n,a,typeof i=="function"?()=>i(()=>t().importActual(n,a)):i)},doUnmock(n){if(typeof n!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof n}`);t().queueUnmock(n,A("doUnmock"))},async importActual(n){return t().importActual(n,A("importActual"))},async importMock(n){return t().importMock(n,A("importMock"))}}}function A(e){let r=We({stackTraceLimit:5}).split(`
|
|
2
|
-
`),t=r.findIndex(i=>i.includes(` at Object.${e}`)||i.includes(`${e}@`));return ot(r[t+1])?.file||""}var{now:se}=Date,lt=class{registry=new ae;queue=new Set;mockedIds=new Set;constructor(e,r,t,n){this.interceptor=e,this.rpc=r,this.spyOn=t,this.config=n}async prepare(){this.queue.size&&await Promise.all([...this.queue.values()])}async resolveFactoryModule(e){let r=this.registry.get(e);if(!r||r.type!=="manual")throw new Error(`Mock ${e} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);return await r.resolve()}getFactoryModule(e){let r=this.registry.get(e);if(!r||r.type!=="manual")throw new Error(`Mock ${e} wasn't registered. This is probably a Vitest error. Please, open a new issue with reproduction.`);if(!r.cache)throw new Error(`Mock ${e} wasn't resolved. This is probably a Vitest error. Please, open a new issue with reproduction.`);return r.cache}async invalidate(){let e=Array.from(this.mockedIds);e.length&&(await this.rpc.invalidate(e),await this.interceptor.invalidate(),this.registry.clear())}async importActual(e,r){let t=await this.rpc.resolveId(e,r);if(t==null)throw new Error(`[vitest] Cannot resolve "${e}" imported from "${r}"`);let n=Ae(t.id),i=new URL(t.url,location.href),a=`_vitest_original&ext${n}`,o=`${i.pathname}${i.search?`${i.search}&${a}`:`?${a}`}${i.hash}`;return this.wrapDynamicImport(()=>import(o)).then(s=>{if(!t.optimized||typeof s.default>"u")return s;let u=s.default;return u?.__esModule?u:{...typeof u=="object"&&!Array.isArray(u)||typeof u=="function"?u:{},default:u}})}async importMock(e,r){await this.prepare();let{resolvedId:t,resolvedUrl:n,redirectUrl:i}=await this.rpc.resolveMock(e,r,{mock:"auto"}),a=this.resolveMockPath(J(n)),o=this.registry.get(a);if(!o)if(i){let s=new URL(this.resolveMockPath(J(i)),location.href).toString();o=new F(e,t,a,s)}else o=new X(e,t,a);if(o.type==="manual")return await o.resolve();if(o.type==="automock"||o.type==="autospy"){let s=new URL(`/@id/${t}`,location.href),u=s.search?`${s.search}&t=${se()}`:`?t=${se()}`,d=await ke(()=>import(`${s.pathname}${u}&mock=${o.type}${s.hash}`),[],import.meta.url);return this.mockObject(d,o.type)}return import(o.redirect)}mockObject(e,r="automock"){return we({globalConstructors:{Object,Function,Array,Map,RegExp},spyOn:this.spyOn,type:r},e)}queueMock(e,r,t){let n=this.rpc.resolveMock(e,r,{mock:typeof t=="function"?"factory":t?.spy?"spy":"auto"}).then(async({redirectUrl:i,resolvedId:a,resolvedUrl:o,needsInterop:s,mockType:u})=>{let d=this.resolveMockPath(J(o));this.mockedIds.add(a);let y=typeof t=="function"?async()=>{let I=await t();return s?{default:I}:I}:void 0,g=typeof i=="string"?new URL(this.resolveMockPath(J(i)),location.href).toString():null,m;u==="manual"?m=this.registry.register("manual",e,a,d,y):u==="autospy"?m=this.registry.register("autospy",e,a,d):u==="redirect"?m=this.registry.register("redirect",e,a,d,g):m=this.registry.register("automock",e,a,d),await this.interceptor.register(m)}).finally(()=>{this.queue.delete(n)});this.queue.add(n)}queueUnmock(e,r){let t=this.rpc.resolveId(e,r).then(async n=>{if(!n)return;let i=this.resolveMockPath(J(n.url));this.mockedIds.add(n.id),this.registry.delete(i),await this.interceptor.delete(i)}).finally(()=>{this.queue.delete(t)});this.queue.add(t)}wrapDynamicImport(e){return typeof e=="function"?new Promise((r,t)=>{this.prepare().finally(()=>{e().then(r,t)})}):e}resolveMockPath(e){let r=this.config,t=Re("/@fs/",r.root);return e.startsWith(r.root)?e.slice(r.root.length):e.startsWith(t)?e.slice(t.length):e}},ct=/(\?|&)v=\w{8}/;function J(e){return e.replace(ct,"")}var ut=class{mocks=new ae;constructor(){}async register(e){this.mocks.add(e)}async delete(e){this.mocks.delete(e)}async invalidate(){this.mocks.clear()}},z=e=>{switch(e){case"resolveId":return Promise.resolve({id:"",url:"",optimized:!1});case"resolveMock":return Promise.resolve({mockType:"dummy",resolvedId:"",resolvedUrl:"",redirectUrl:"",needsInterop:!1});case"invalidate":return Promise.resolve()}},ft=class extends lt{queueMock(){}};function dt(e){let r=new ft(e("__vitest_mocker__"),{resolveId(t,n){return z("resolveId")},resolveMock(t,n,i){return z("resolveMock")},async invalidate(t){return z("invalidate")}},(...t)=>globalThis.__STORYBOOK_MODULE_TEST__.spyOn(...t),{root:""});return globalThis.__vitest_mocker__=r,at({globalThisKey:"__vitest_mocker__"})}globalThis.__STORYBOOK_MOCKER__=dt(()=>new ut);
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import VoiceToTextButton from './VoiceToTextButton.vue';
|
|
2
|
-
import TextInput from '../TextInput/TextInput.vue';
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Components/VoiceToTextButton',
|
|
6
|
-
component: VoiceToTextButton,
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const Default = () => ({
|
|
10
|
-
components: { VoiceToTextButton },
|
|
11
|
-
template: '<VoiceToTextButton />',
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export const WithTranscriptDisplay = () => ({
|
|
15
|
-
components: { VoiceToTextButton, TextInput },
|
|
16
|
-
data() {
|
|
17
|
-
return {
|
|
18
|
-
transcript: '',
|
|
19
|
-
isListening: false,
|
|
20
|
-
error: null,
|
|
21
|
-
};
|
|
22
|
-
},
|
|
23
|
-
template: `
|
|
24
|
-
<div class="tw-flex tw-flex-col tw-gap-4 tw-max-w-md">
|
|
25
|
-
<div class="tw-flex tw-gap-2 tw-items-end">
|
|
26
|
-
<TextInput
|
|
27
|
-
v-model="transcript"
|
|
28
|
-
label="Search"
|
|
29
|
-
placeholder="Click the mic and speak..."
|
|
30
|
-
class="tw-flex-1"
|
|
31
|
-
/>
|
|
32
|
-
<VoiceToTextButton
|
|
33
|
-
@on-transcript="transcript = $event"
|
|
34
|
-
@on-interim-transcript="transcript = $event"
|
|
35
|
-
@on-start="isListening = true; error = null"
|
|
36
|
-
@on-stop="isListening = false"
|
|
37
|
-
@on-error="error = $event"
|
|
38
|
-
/>
|
|
39
|
-
</div>
|
|
40
|
-
<div class="tw-text-sm tw-text-grayscale-600">
|
|
41
|
-
<p v-if="isListening" class="tw-text-primary-500 tw-font-medium">
|
|
42
|
-
Listening... speak now
|
|
43
|
-
</p>
|
|
44
|
-
<p v-else-if="error" class="tw-text-error-500">
|
|
45
|
-
{{ error }}
|
|
46
|
-
</p>
|
|
47
|
-
<p v-else>
|
|
48
|
-
Click the microphone button to start voice input
|
|
49
|
-
</p>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
`,
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
WithTranscriptDisplay.story = {
|
|
56
|
-
name: 'Interactive Demo',
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const Disabled = () => ({
|
|
60
|
-
components: { VoiceToTextButton },
|
|
61
|
-
template: `
|
|
62
|
-
<div class="tw-flex tw-gap-4 tw-items-center">
|
|
63
|
-
<div class="tw-text-center">
|
|
64
|
-
<VoiceToTextButton />
|
|
65
|
-
<p class="tw-text-xs tw-mt-2 tw-text-grayscale-600">Enabled</p>
|
|
66
|
-
</div>
|
|
67
|
-
<div class="tw-text-center">
|
|
68
|
-
<VoiceToTextButton :disabled="true" />
|
|
69
|
-
<p class="tw-text-xs tw-mt-2 tw-text-grayscale-600">Disabled</p>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
`,
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
Disabled.story = {
|
|
76
|
-
name: 'Disabled State',
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export const LanguageVariants = () => ({
|
|
80
|
-
components: { VoiceToTextButton },
|
|
81
|
-
data() {
|
|
82
|
-
return {
|
|
83
|
-
languages: [
|
|
84
|
-
{ code: 'en-US', name: 'English (US)' },
|
|
85
|
-
{ code: 'de-DE', name: 'German' },
|
|
86
|
-
{ code: 'fr-FR', name: 'French' },
|
|
87
|
-
{ code: 'es-ES', name: 'Spanish' },
|
|
88
|
-
],
|
|
89
|
-
};
|
|
90
|
-
},
|
|
91
|
-
template: `
|
|
92
|
-
<div class="tw-flex tw-flex-wrap tw-gap-4">
|
|
93
|
-
<div
|
|
94
|
-
v-for="lang in languages"
|
|
95
|
-
:key="lang.code"
|
|
96
|
-
class="tw-text-center tw-p-2 tw-border tw-border-grayscale-300 tw-rounded"
|
|
97
|
-
>
|
|
98
|
-
<VoiceToTextButton :lang="lang.code" />
|
|
99
|
-
<p class="tw-text-xs tw-mt-2">{{ lang.name }}</p>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
`,
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
LanguageVariants.story = {
|
|
106
|
-
name: 'Language Variants',
|
|
107
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Button
|
|
3
|
-
v-if="isSupported"
|
|
4
|
-
icon="microphone"
|
|
5
|
-
:disabled="disabled"
|
|
6
|
-
variant="outline"
|
|
7
|
-
:class="{ 'voice-listening': isListening }"
|
|
8
|
-
:aria-label="isListening ? 'Stop voice input' : 'Start voice input'"
|
|
9
|
-
data-test="voice-to-text-button"
|
|
10
|
-
@on-click="toggle"
|
|
11
|
-
/>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup>
|
|
15
|
-
import { watch, toRef } from 'vue';
|
|
16
|
-
import Button from '../Button/Button.vue';
|
|
17
|
-
import { useVoiceToText } from '../../../useVoiceToText';
|
|
18
|
-
|
|
19
|
-
const props = defineProps({
|
|
20
|
-
lang: {
|
|
21
|
-
type: String,
|
|
22
|
-
default: 'en-US',
|
|
23
|
-
},
|
|
24
|
-
disabled: {
|
|
25
|
-
type: Boolean,
|
|
26
|
-
default: false,
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const emit = defineEmits(['on-transcript', 'on-interim-transcript', 'on-start', 'on-stop', 'on-error']);
|
|
31
|
-
|
|
32
|
-
const { isSupported, isListening, transcript, isFinal, error, toggle, setLang } = useVoiceToText({
|
|
33
|
-
lang: props.lang,
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// Keep recognition language in sync with prop
|
|
37
|
-
watch(toRef(props, 'lang'), setLang);
|
|
38
|
-
|
|
39
|
-
// Watch for transcript changes and emit appropriate events
|
|
40
|
-
watch(
|
|
41
|
-
[transcript, isFinal],
|
|
42
|
-
([newTranscript, newIsFinal]) => {
|
|
43
|
-
if (newIsFinal && newTranscript) {
|
|
44
|
-
emit('on-transcript', newTranscript);
|
|
45
|
-
} else if (newTranscript) {
|
|
46
|
-
emit('on-interim-transcript', newTranscript);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{ flush: 'sync' },
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
// Watch for listening state changes
|
|
53
|
-
watch(isListening, (newVal, oldVal) => {
|
|
54
|
-
if (newVal && !oldVal) {
|
|
55
|
-
emit('on-start');
|
|
56
|
-
}
|
|
57
|
-
if (!newVal && oldVal) {
|
|
58
|
-
emit('on-stop');
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// Watch for errors
|
|
63
|
-
watch(error, (newError) => {
|
|
64
|
-
if (newError) {
|
|
65
|
-
emit('on-error', newError);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<style scoped>
|
|
71
|
-
.voice-listening {
|
|
72
|
-
animation: voice-pulse 1.5s ease-in-out infinite;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@keyframes voice-pulse {
|
|
76
|
-
0%,
|
|
77
|
-
100% {
|
|
78
|
-
box-shadow: 0 0 0 0 var(--color-primary, rgba(242, 27, 63, 0.4));
|
|
79
|
-
}
|
|
80
|
-
50% {
|
|
81
|
-
box-shadow: 0 0 0 8px transparent;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
</style>
|
package/src/useVoiceToText.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { ref, computed, readonly } from 'vue';
|
|
2
|
-
|
|
3
|
-
// Singleton instance and state (lazily initialized)
|
|
4
|
-
let recognition = null;
|
|
5
|
-
let isInitialized = false;
|
|
6
|
-
let errorClearTimeout = null;
|
|
7
|
-
let state = null;
|
|
8
|
-
|
|
9
|
-
// Error message mapping per spec
|
|
10
|
-
const ERROR_MESSAGES = {
|
|
11
|
-
'not-allowed': 'Microphone permission was denied. Please allow access.',
|
|
12
|
-
'language-not-supported': 'This language is not supported.',
|
|
13
|
-
network: 'A network error occurred. Please check your connection.',
|
|
14
|
-
'audio-capture': 'No microphone was found or microphone is not working.',
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const ERROR_CLEAR_DELAY = 5000;
|
|
18
|
-
|
|
19
|
-
function getState() {
|
|
20
|
-
if (!state) {
|
|
21
|
-
state = {
|
|
22
|
-
isListening: ref(false),
|
|
23
|
-
transcript: ref(''),
|
|
24
|
-
isFinal: ref(false),
|
|
25
|
-
error: ref(null),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return state;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Singleton composable that wraps the Web Speech API (SpeechRecognition).
|
|
33
|
-
* All calls to useVoiceToText() return the same shared instance.
|
|
34
|
-
*
|
|
35
|
-
* @param {Object} options
|
|
36
|
-
* @param {string} options.lang - BCP 47 language tag (default: 'en-US')
|
|
37
|
-
* @returns {Object} Voice-to-text state and controls
|
|
38
|
-
*/
|
|
39
|
-
export function useVoiceToText(options = {}) {
|
|
40
|
-
const { lang = 'en-US' } = options;
|
|
41
|
-
|
|
42
|
-
// Get or create shared state
|
|
43
|
-
const { isListening, transcript, isFinal, error } = getState();
|
|
44
|
-
|
|
45
|
-
// Check for browser support
|
|
46
|
-
const SpeechRecognition =
|
|
47
|
-
typeof window !== 'undefined' ? window.SpeechRecognition || window.webkitSpeechRecognition : null;
|
|
48
|
-
|
|
49
|
-
const isSupported = computed(() => !!SpeechRecognition);
|
|
50
|
-
|
|
51
|
-
// Initialize singleton once
|
|
52
|
-
if (!isInitialized && SpeechRecognition) {
|
|
53
|
-
recognition = new SpeechRecognition();
|
|
54
|
-
recognition.continuous = true;
|
|
55
|
-
recognition.interimResults = true;
|
|
56
|
-
|
|
57
|
-
recognition.onresult = (event) => {
|
|
58
|
-
let interimTranscript = '';
|
|
59
|
-
let finalTranscript = '';
|
|
60
|
-
|
|
61
|
-
for (let i = event.resultIndex; i < event.results.length; i += 1) {
|
|
62
|
-
const result = event.results[i];
|
|
63
|
-
if (result.isFinal) {
|
|
64
|
-
finalTranscript += result[0].transcript;
|
|
65
|
-
} else {
|
|
66
|
-
interimTranscript += result[0].transcript;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (finalTranscript) {
|
|
71
|
-
transcript.value = finalTranscript;
|
|
72
|
-
isFinal.value = true;
|
|
73
|
-
} else {
|
|
74
|
-
transcript.value = interimTranscript;
|
|
75
|
-
isFinal.value = false;
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
recognition.onerror = (event) => {
|
|
80
|
-
// Suppress no-speech and aborted errors per spec
|
|
81
|
-
if (event.error === 'no-speech' || event.error === 'aborted') {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const message = ERROR_MESSAGES[event.error] || 'An error occurred with speech recognition.';
|
|
86
|
-
error.value = message;
|
|
87
|
-
|
|
88
|
-
// eslint-disable-next-line no-console
|
|
89
|
-
console.warn('[useVoiceToText]', event.error, message);
|
|
90
|
-
|
|
91
|
-
// Auto-clear error after timeout
|
|
92
|
-
if (errorClearTimeout) {
|
|
93
|
-
clearTimeout(errorClearTimeout);
|
|
94
|
-
}
|
|
95
|
-
errorClearTimeout = setTimeout(() => {
|
|
96
|
-
error.value = null;
|
|
97
|
-
}, ERROR_CLEAR_DELAY);
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
recognition.onend = () => {
|
|
101
|
-
isListening.value = false;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
isInitialized = true;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Update language on existing instance
|
|
108
|
-
if (recognition) {
|
|
109
|
-
recognition.lang = lang;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const start = () => {
|
|
113
|
-
if (!recognition || isListening.value) return;
|
|
114
|
-
|
|
115
|
-
// Clear previous state
|
|
116
|
-
transcript.value = '';
|
|
117
|
-
isFinal.value = false;
|
|
118
|
-
error.value = null;
|
|
119
|
-
if (errorClearTimeout) {
|
|
120
|
-
clearTimeout(errorClearTimeout);
|
|
121
|
-
errorClearTimeout = null;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
try {
|
|
125
|
-
recognition.start();
|
|
126
|
-
isListening.value = true;
|
|
127
|
-
} catch (e) {
|
|
128
|
-
// Handle case where recognition is already started
|
|
129
|
-
// eslint-disable-next-line no-console
|
|
130
|
-
console.warn('[useVoiceToText] Failed to start:', e.message);
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
const stop = () => {
|
|
135
|
-
if (!recognition || !isListening.value) return;
|
|
136
|
-
|
|
137
|
-
try {
|
|
138
|
-
recognition.stop();
|
|
139
|
-
} catch (e) {
|
|
140
|
-
// Handle case where recognition is already stopped
|
|
141
|
-
// eslint-disable-next-line no-console
|
|
142
|
-
console.warn('[useVoiceToText] Failed to stop:', e.message);
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
const toggle = () => {
|
|
147
|
-
if (isListening.value) {
|
|
148
|
-
stop();
|
|
149
|
-
} else {
|
|
150
|
-
start();
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
const setLang = (newLang) => {
|
|
155
|
-
if (recognition) {
|
|
156
|
-
recognition.lang = newLang;
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
// State (reactive, read-only)
|
|
162
|
-
isSupported,
|
|
163
|
-
isListening: readonly(isListening),
|
|
164
|
-
transcript: readonly(transcript),
|
|
165
|
-
isFinal: readonly(isFinal),
|
|
166
|
-
error: readonly(error),
|
|
167
|
-
|
|
168
|
-
// Actions
|
|
169
|
-
start,
|
|
170
|
-
stop,
|
|
171
|
-
toggle,
|
|
172
|
-
setLang,
|
|
173
|
-
};
|
|
174
|
-
}
|