@screenreader-speech-capture/bridge 0.1.0-feat-expected-target-window.34 → 0.2.0
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/cli.mjs +1244 -948
- package/dist/ui/adapter-node.js +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/{4.DyY1vjRV.css → 4.DEk4yqpA.css} +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/4.DEk4yqpA.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DEk4yqpA.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{B1Ryegye.js → Bq3k_s8n.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/chunks/Bq3k_s8n.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Bq3k_s8n.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{CMWEX9XL.js → CEGGem4o.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/chunks/CEGGem4o.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CEGGem4o.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{tKonUL5Y.js → Cwz551Q0.js} +4 -3
- package/dist/ui/client/ui/_app/immutable/chunks/Cwz551Q0.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Cwz551Q0.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{4wvZDMeR.js → DJvJc_zO.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/chunks/DJvJc_zO.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DJvJc_zO.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{CK3uUd4t.js → DU8ibkb0.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/chunks/DU8ibkb0.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DU8ibkb0.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{BS7n1gMj.js → Dk73DTz3.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/chunks/Dk73DTz3.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/Dk73DTz3.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/{DOY87jO2.js → DoG5cwE3.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/chunks/DoG5cwE3.js.br +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DoG5cwE3.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/hhZsYtkz.js +3 -0
- package/dist/ui/client/ui/_app/immutable/chunks/hhZsYtkz.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/hhZsYtkz.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.Bic9wlww.js +2 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.Bic9wlww.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.Bic9wlww.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.IqK6bsxB.js +1 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.IqK6bsxB.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.IqK6bsxB.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/{3.WT26F_BF.js → 3.DYZ3H5TS.js} +1 -1
- package/dist/ui/client/ui/_app/immutable/nodes/3.DYZ3H5TS.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.DYZ3H5TS.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.Lwlmq1AY.js +180 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.Lwlmq1AY.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.Lwlmq1AY.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/{5.MzfJoePg.js → 5.rBMVkFpN.js} +5 -5
- package/dist/ui/client/ui/_app/immutable/nodes/5.rBMVkFpN.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.rBMVkFpN.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.nui9awM2.js +6 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.nui9awM2.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.nui9awM2.js.gz +0 -0
- package/dist/ui/client/ui/_app/version.json +1 -1
- package/dist/ui/client/ui/_app/version.json.br +0 -0
- package/dist/ui/client/ui/_app/version.json.gz +0 -0
- package/dist/ui/server/.vite/manifest.json +18 -29
- package/dist/ui/server/_app/immutable/assets/{_page.DyY1vjRV.css → _page.DEk4yqpA.css} +1 -1
- package/dist/ui/server/chunks/composition.js +60 -5
- package/dist/ui/server/chunks/composition.js.map +1 -1
- package/dist/ui/server/chunks/instance.js +3 -3
- package/dist/ui/server/chunks/internal.js +1 -1
- package/dist/ui/server/chunks/outlined-button.js +116 -0
- package/dist/ui/server/chunks/outlined-button.js.map +1 -0
- package/dist/ui/server/chunks/src.js +19 -13
- package/dist/ui/server/chunks/src.js.map +1 -1
- package/dist/ui/server/entries/hooks.server.js +3 -2
- package/dist/ui/server/entries/hooks.server.js.map +1 -1
- package/dist/ui/server/entries/pages/_layout.svelte.js +2 -3
- package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/_page.svelte.js +0 -1
- package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/settings/_page.svelte.js +139 -13
- package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/setup/_page.svelte.js +2 -3
- package/dist/ui/server/entries/pages/setup/_page.svelte.js.map +1 -1
- package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js +15 -10
- package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js.map +1 -1
- package/dist/ui/server/manifest-full.js +1 -1
- package/dist/ui/server/manifest.js +1 -1
- package/dist/ui/server/nodes/0.js +1 -1
- package/dist/ui/server/nodes/3.js +1 -1
- package/dist/ui/server/nodes/4.js +2 -2
- package/dist/ui/server/nodes/5.js +1 -1
- package/dist/ui/server/nodes/6.js +1 -1
- package/dist/ui/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/ui/client/ui/_app/immutable/assets/4.DyY1vjRV.css.br +0 -0
- package/dist/ui/client/ui/_app/immutable/assets/4.DyY1vjRV.css.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/4wvZDMeR.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/4wvZDMeR.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1Ryegye.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1Ryegye.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1vArRqi.js +0 -3
- package/dist/ui/client/ui/_app/immutable/chunks/B1vArRqi.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/B1vArRqi.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BS7n1gMj.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BS7n1gMj.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BnU72Mow.js +0 -2
- package/dist/ui/client/ui/_app/immutable/chunks/BnU72Mow.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/BnU72Mow.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CK3uUd4t.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CK3uUd4t.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CMWEX9XL.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/CMWEX9XL.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DOY87jO2.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/DOY87jO2.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/tKonUL5Y.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/chunks/tKonUL5Y.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.C8tsut3X.js +0 -2
- package/dist/ui/client/ui/_app/immutable/entry/app.C8tsut3X.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/entry/app.C8tsut3X.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.3bVKqGbx.js +0 -1
- package/dist/ui/client/ui/_app/immutable/nodes/0.3bVKqGbx.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/0.3bVKqGbx.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.WT26F_BF.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/3.WT26F_BF.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.tiDJxi6M.js +0 -160
- package/dist/ui/client/ui/_app/immutable/nodes/4.tiDJxi6M.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/4.tiDJxi6M.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.MzfJoePg.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/5.MzfJoePg.js.gz +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.bNZhqiRK.js +0 -6
- package/dist/ui/client/ui/_app/immutable/nodes/6.bNZhqiRK.js.br +0 -0
- package/dist/ui/client/ui/_app/immutable/nodes/6.bNZhqiRK.js.gz +0 -0
- package/dist/ui/server/chunks/filled-button.js +0 -116
- package/dist/ui/server/chunks/filled-button.js.map +0 -1
- package/dist/ui/server/chunks/icon.js +0 -49
- package/dist/ui/server/chunks/icon.js.map +0 -1
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,C as r,D as i,G as a,H as o,J as s,K as c,L as l,M as u,N as d,Q as f,S as p,T as m,U as h,V as g,W as _,X as v,Y as y,Z as b,_ as x,_t as S,b as C,dt as w,it as T,k as E,lt as D,mt as O,nt as k,ot as A,pt as j,q as ee,tt as te,ut as M,vt as N,x as ne,y as P,z as F}from"../chunks/0FroJ-XN.js";import{A as I,C as re,E as ie,G as ae,I as L,J as R,K as z,L as B,M as oe,R as se,V,W as H,X as U,Y as ce,_ as le,g as ue,h as de,j as fe,k as pe,m as me,p as he,q as W,t as ge,v as _e,w as ve,x as ye}from"../chunks/tKonUL5Y.js";import{t as be}from"../chunks/D-2Nx62w.js";import"../chunks/B1vArRqi.js";import{r as xe}from"../chunks/BS7n1gMj.js";import{a as Se,i as Ce,n as we,o as Te,r as Ee,s as De,t as Oe}from"../chunks/CMWEX9XL.js";import{n as ke,t as Ae}from"../chunks/DOY87jO2.js";import{t as je}from"../chunks/B1Ryegye.js";var Me;function Ne(e){return(t,n)=>ae(t,n,{get(){return(this.renderRoot??(Me??=document.createDocumentFragment())).querySelectorAll(e)}})}function Pe(e){return(t,n)=>{let{slot:r}=e??{},i=`slot`+(r?`[name=${r}]`:`:not([name])`);return ae(t,n,{get(){return(this.renderRoot?.querySelector(i))?.assignedNodes(e)??[]}})}}var Fe={path:`tcp.port`,label:`TCP port`,control:{kind:`text`,inputmode:`numeric`},help:()=>`The port the screen reader's speech voice sends to. Default 4449.`,format:String,parse(e){let t=ue(e);return t.ok?{ok:!0,value:t.port}:t},describe:String,consequence:e=>[`The speech voice on the VM sends to a fixed port, so also add a voice for ${e} (`,{code:`text-to-socket-engine-add-voice`},`) and select it in the screen reader.`]},Ie=[[`windows-874`,`Thai`],[`windows-1250`,`Central European`],[`windows-1251`,`Cyrillic`],[`windows-1252`,`Western European`],[`windows-1253`,`Greek`],[`windows-1254`,`Turkish`],[`windows-1255`,`Hebrew`],[`windows-1256`,`Arabic`],[`windows-1257`,`Baltic`],[`windows-1258`,`Vietnamese`],[`shift_jis`,`Japanese`],[`gbk`,`Simplified Chinese`],[`euc-kr`,`Korean`],[`big5`,`Traditional Chinese`],[`utf-8`,`Unicode`]].map(([e,t])=>({value:e,label:`${e} (${t})`}));function Le(e,t){return e.some(e=>e.value===t)?e:[...e,{value:t,label:t}]}var Re={path:`tcp.encoding`,label:`Text encoding`,control:{kind:`select`,options:Ie},help:()=>`The code page the speech voice sends: the VM's ANSI code page. Default windows-1252.`,format:e=>e,parse:e=>({ok:!0,value:e}),describe:e=>e,consequence:()=>[]},ze={path:`buffer.maxEntries`,label:`Speech buffer size`,control:{kind:`text`,inputmode:`numeric`,suffix:`entries`},help:()=>`How many speech entries the bridge keeps; then the oldest are dropped. Default 10000.`,format:String,parse(e){let t=me(e);return t.ok?{ok:!0,value:t.entries}:t},describe:String,consequence:()=>[]},Be={control:{kind:`checkbox`},format:String,parse:e=>({ok:!0,value:e===`true`}),describe:e=>e?`On`:`Off`},Ve=`The first start installs what is missing, which can take a minute or two.`,He={...Be,path:`playwright.enabled`,label:`Playwright server`,help:()=>`Tests connect to it to drive a browser on the VM.`,consequence:e=>[e?Ve:`Tests can't connect to a browser on the VM while it is off.`]},Ue=({runningPlaywright:e})=>e===null?`bundled version`:`bundled version (${e})`,We={path:`playwright.version`,label:`Playwright version`,control:{kind:`text`,inputmode:`text`},help:(e,{runningPlaywright:t,playwrightOff:n})=>`The exact version of the Playwright server, like 1.65.0. Use the version your tests use. Leave empty for the bundled version`+(e===null&&t!==null?` (${t}).`:`.`)+(n===!0?` Applies when the server is turned on.`:``),format:e=>e??``,parse(e){let t=de(e);return t.ok?{ok:!0,value:t.version}:t},describe:(e,t)=>e??Ue(t),consequence:()=>[`The first start of a new version installs it, which can take a minute or two. Your test projects need the same version.`]};function G(e,t){let[n,r]=t.split(`.`);return e[n][r]}function Ge(e,t,n){return e.filter(e=>{let r=t[e.path];return r!==void 0&&r.trim()!==e.format(G(n,e.path))})}function Ke(e,t,n){let r={},i={};for(let a of Ge(e,t,n)){let e=a.parse(t[a.path]);if(!e.ok){i[a.path]=e.message;continue}let[n,o]=a.path.split(`.`);(r[n]??={})[o]=e.value}return Object.keys(i).length>0?{ok:!1,errors:i}:{ok:!0,patch:r}}var qe={...Be,path:`mcp.enabled`,label:`Playwright MCP`,help:()=>`AI agents connect to it to drive a browser on the VM.`,consequence:e=>[e?Ve:`AI agents can't connect to a browser through it while it is off.`]},Je={error:`errors only`,warn:`errors and warnings`,info:`normal operation`,debug:`everything, with the speech`},Ye={path:`log.level`,label:`Log level`,control:{kind:`select`,options:_e.map(e=>({value:e,label:`${e} (${Je[e]})`}))},help:()=>`How much the bridge writes to its log. At debug that includes everything the screen reader says, in the log file. Default info.`,format:e=>e,parse:e=>({ok:!0,value:e}),describe:e=>e,consequence:e=>e===`debug`?[`What the screen reader says is then written to the log file.`]:[]},Xe=[Fe,Re,ze,He,We,qe,Ye];function Ze(e,t,n,r){return r[e]===void 0&&G(t,e)!==G(n,e)}var Qe=(e,t)=>{let[n,r]=t.split(`.`);return e[n][r]};function $e(e,t,n,r){return le(e,t).filter(e=>n[e]===void 0).map(n=>{let i=Xe.find(e=>e.path===n);if(i===void 0){let r=e=>JSON.stringify(Qe(e,n));return{path:n,label:n,from:r(e),to:r(t),consequence:[]}}let a=G(e,i.path),o=G(t,i.path);return{path:n,label:i.label,from:i.describe(a,r),to:i.describe(o,{...r,runningPlaywright:null}),consequence:i.consequence(o,a)}})}function et(e,t){if(!(e instanceof Error))return{field:null,message:`The settings could not be saved.`};if(!(e instanceof he)||e.field===void 0)return{field:null,message:e.message};let n=t.find(t=>t.path===e.field)??t.find(t=>e.message.includes(t.path)),r=Xe.reduce((e,t)=>e.replaceAll(t.path,t.label),e.message);return{field:n?.path??null,message:`${r}. Nothing was saved.`}}var tt=g(`<code class="svelte-1ko3bij"> </code>`),nt=g(`<li class="svelte-1ko3bij"><strong> </strong> <!></li>`),rt=g(`<section aria-labelledby="restart-heading" class="svelte-1ko3bij"><h2 id="restart-heading" class="svelte-1ko3bij"> </h2> <ul class="svelte-1ko3bij"></ul> <p class="svelte-1ko3bij">Restarting the bridge empties the recorded speech and sessions.</p> <md-outlined-button>Check again</md-outlined-button></section>`,2),it=g(`<!> <p role="status" tabindex="-1" class="result svelte-1ko3bij"> </p>`,1);function at(r,i){O(i,!0);let o=M(``),c,d=e=>e===1?`1 change waits for a restart`:`${e} changes wait for a restart`;async function f(){D(o,``),await i.onCheck(),D(o,i.reachable?i.changes.length===0?`No changes wait for a restart.`:`Checked: ${d(i.changes.length)}.`:`The bridge is not reachable.`,!0),await te(),i.changes.length===0&&c.focus()}var g=it(),_=y(g),S=r=>{var o=rt(),c=s(o),g=v(c,!0),_=b(c,2);E(_,21,()=>i.changes,e=>e.path,(r,i)=>{var a=nt(),o=s(a),c=v(o),d=b(o),f=b(d);E(f,17,()=>e(i).consequence,t,(t,r)=>{var i=n(),a=y(i),o=t=>{var n=h();A(()=>l(n,e(r))),F(t,n)},s=t=>{var n=tt(),i=v(n,!0);A(()=>l(i,e(r).code)),F(t,n)};u(a,t=>{typeof e(r)==`string`?t(o):t(s,-1)}),F(t,i)}),N(a),A(()=>{l(c,`${e(i).label??``}:`),l(d,` ${e(i).from??``} → ${e(i).to??``}. `)}),F(r,a)}),N(_);var x=b(_,4);p(x,`type`,`button`),m(x,1,`svelte-1ko3bij`),N(o),A(e=>l(g,e),[()=>d(i.changes.length)]),a(`click`,x,()=>void f()),F(r,o)};u(_,e=>{i.changes.length>0&&e(S)});var C=b(_,2),w=v(C,!0);x(C,e=>c=e,()=>c),A(()=>l(w,e(o))),F(r,g),j()}_([`click`]);function ot(e,t=q){let n=ct(e,t);return n&&(n.tabIndex=0,n.focus()),n}function st(e,t=q){let n=lt(e,t);return n&&(n.tabIndex=0,n.focus()),n}function K(e,t=q){for(let n=0;n<e.length;n++){let r=e[n];if(r.tabIndex===0&&t(r))return{item:r,index:n}}return null}function ct(e,t=q){for(let n of e)if(t(n))return n;return null}function lt(e,t=q){for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r))return r}return null}function ut(e,t,n=q,r=!0){for(let i=1;i<e.length;i++){let a=(i+t)%e.length;if(a<t&&!r)return null;let o=e[a];if(n(o))return o}return e[t]?e[t]:null}function dt(e,t,n=q,r=!0){for(let i=1;i<e.length;i++){let a=(t-i+e.length)%e.length;if(a>t&&!r)return null;let o=e[a];if(n(o))return o}return e[t]?e[t]:null}function ft(e,t,n=q,r=!0){if(t){let i=ut(e,t.index,n,r);return i&&(i.tabIndex=0,i.focus()),i}return ot(e,n)}function pt(e,t,n=q,r=!0){if(t){let i=dt(e,t.index,n,r);return i&&(i.tabIndex=0,i.focus()),i}return st(e,n)}function q(e){return!e.disabled}var J={ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowUp:`ArrowUp`,ArrowRight:`ArrowRight`,Home:`Home`,End:`End`},mt=class{constructor(e){this.handleKeydown=e=>{let t=e.key;if(e.defaultPrevented||!this.isNavigableKey(t))return;let n=this.items;if(!n.length)return;let r=K(n,this.isActivatable);e.preventDefault();let i=this.isRtl(),a=i?J.ArrowRight:J.ArrowLeft,o=i?J.ArrowLeft:J.ArrowRight,s=null;switch(t){case J.ArrowDown:case o:s=ft(n,r,this.isActivatable,this.wrapNavigation());break;case J.ArrowUp:case a:s=pt(n,r,this.isActivatable,this.wrapNavigation());break;case J.Home:s=ot(n,this.isActivatable);break;case J.End:s=st(n,this.isActivatable)}s&&r&&r.item!==s&&(r.item.tabIndex=-1)},this.onDeactivateItems=()=>{let e=this.items;for(let t of e)this.deactivateItem(t)},this.onRequestActivation=e=>{this.onDeactivateItems();let t=e.target;this.activateItem(t),t.focus()},this.onSlotchange=()=>{let e=this.items,t=!1;for(let n of e)!n.disabled&&n.tabIndex>-1&&!t?(t=!0,n.tabIndex=0):n.tabIndex=-1;if(t)return;let n=ct(e,this.isActivatable);n&&(n.tabIndex=0)};let{isItem:t,getPossibleItems:n,isRtl:r,deactivateItem:i,activateItem:a,isNavigableKey:o,isActivatable:s,wrapNavigation:c}=e;this.isItem=t,this.getPossibleItems=n,this.isRtl=r,this.deactivateItem=i,this.activateItem=a,this.isNavigableKey=o,this.isActivatable=s,this.wrapNavigation=c??(()=>!0)}get items(){let e=this.getPossibleItems(),t=[];for(let n of e){if(this.isItem(n)){t.push(n);continue}let e=n.item;e&&this.isItem(e)&&t.push(e)}return t}activateNextItem(){let e=this.items,t=K(e,this.isActivatable);return t&&(t.item.tabIndex=-1),ft(e,t,this.isActivatable,this.wrapNavigation())}activatePreviousItem(){let e=this.items,t=K(e,this.isActivatable);return t&&(t.item.tabIndex=-1),pt(e,t,this.isActivatable,this.wrapNavigation())}};function ht(e,t){return new CustomEvent(`close-menu`,{bubbles:!0,composed:!0,detail:{initiator:e,reason:t,itemPath:[e]}})}var gt=ht,_t={SPACE:`Space`,ENTER:`Enter`},vt={CLICK_SELECTION:`click-selection`,KEYDOWN:`keydown`},yt={ESCAPE:`Escape`,SPACE:_t.SPACE,ENTER:_t.ENTER};function bt(e){return Object.values(yt).some(t=>t===e)}function xt(e){return Object.values(_t).some(t=>t===e)}function St(e,t){let n=new Event(`md-contains`,{bubbles:!0,composed:!0}),r=[],i=e=>{r=e.composedPath()};return t.addEventListener(`md-contains`,i),e.dispatchEvent(n),t.removeEventListener(`md-contains`,i),r.length>0}var Y={NONE:`none`,LIST_ROOT:`list-root`,FIRST_ITEM:`first-item`,LAST_ITEM:`last-item`},Ct={END_START:`end-start`,END_END:`end-end`,START_START:`start-start`,START_END:`start-end`},wt=class{constructor(e,t){this.host=e,this.getProperties=t,this.surfaceStylesInternal={display:`none`},this.lastValues={isOpen:!1},this.host.addController(this)}get surfaceStyles(){return this.surfaceStylesInternal}async position(){let{surfaceEl:e,anchorEl:t,anchorCorner:n,surfaceCorner:r,positioning:i,xOffset:a,yOffset:o,disableBlockFlip:s,disableInlineFlip:c,repositionStrategy:l}=this.getProperties(),u=n.toLowerCase().trim(),d=r.toLowerCase().trim();if(!e||!t)return;let f=window.innerWidth,p=window.innerHeight,m=document.createElement(`div`);m.style.opacity=`0`,m.style.position=`fixed`,m.style.display=`block`,m.style.inset=`0`,document.body.appendChild(m);let h=m.getBoundingClientRect();m.remove();let g=window.innerHeight-h.bottom,_=window.innerWidth-h.right;this.surfaceStylesInternal={display:`block`,opacity:`0`},this.host.requestUpdate(),await this.host.updateComplete,e.popover&&e.isConnected&&e.showPopover();let v=e.getSurfacePositionClientRect?e.getSurfacePositionClientRect():e.getBoundingClientRect(),y=t.getSurfacePositionClientRect?t.getSurfacePositionClientRect():t.getBoundingClientRect(),[b,x]=d.split(`-`),[S,C]=u.split(`-`),w=getComputedStyle(e).direction===`ltr`,{blockInset:T,blockOutOfBoundsCorrection:E,surfaceBlockProperty:D}=this.calculateBlock({surfaceRect:v,anchorRect:y,anchorBlock:S,surfaceBlock:b,yOffset:o,positioning:i,windowInnerHeight:p,blockScrollbarHeight:g});if(E&&!s){let e=b===`start`?`end`:`start`,t=S===`start`?`end`:`start`,n=this.calculateBlock({surfaceRect:v,anchorRect:y,anchorBlock:t,surfaceBlock:e,yOffset:o,positioning:i,windowInnerHeight:p,blockScrollbarHeight:g});E>n.blockOutOfBoundsCorrection&&(T=n.blockInset,E=n.blockOutOfBoundsCorrection,D=n.surfaceBlockProperty)}let{inlineInset:O,inlineOutOfBoundsCorrection:k,surfaceInlineProperty:A}=this.calculateInline({surfaceRect:v,anchorRect:y,anchorInline:C,surfaceInline:x,xOffset:a,positioning:i,isLTR:w,windowInnerWidth:f,inlineScrollbarWidth:_});if(k&&!c){let e=x===`start`?`end`:`start`,t=C===`start`?`end`:`start`,n=this.calculateInline({surfaceRect:v,anchorRect:y,anchorInline:t,surfaceInline:e,xOffset:a,positioning:i,isLTR:w,windowInnerWidth:f,inlineScrollbarWidth:_});Math.abs(k)>Math.abs(n.inlineOutOfBoundsCorrection)&&(O=n.inlineInset,k=n.inlineOutOfBoundsCorrection,A=n.surfaceInlineProperty)}l===`move`&&(T-=E,O-=k),this.surfaceStylesInternal={display:`block`,opacity:`1`,[D]:`${T}px`,[A]:`${O}px`},l===`resize`&&(E&&(this.surfaceStylesInternal.height=`${v.height-E}px`),k&&(this.surfaceStylesInternal.width=`${v.width-k}px`)),this.host.requestUpdate()}calculateBlock(e){let{surfaceRect:t,anchorRect:n,anchorBlock:r,surfaceBlock:i,yOffset:a,positioning:o,windowInnerHeight:s,blockScrollbarHeight:c}=e,l=+(o===`fixed`||o===`document`),u=+(o===`document`),d=+(i===`start`),f=+(i===`end`),p=(r===i?0:1)*n.height+a,m=d*n.top+f*(s-n.bottom-c),h=d*window.scrollY-f*window.scrollY,g=Math.abs(Math.min(0,s-m-p-t.height));return{blockInset:l*m+u*h+p,blockOutOfBoundsCorrection:g,surfaceBlockProperty:i===`start`?`inset-block-start`:`inset-block-end`}}calculateInline(e){let{isLTR:t,surfaceInline:n,anchorInline:r,anchorRect:i,surfaceRect:a,xOffset:o,positioning:s,windowInnerWidth:c,inlineScrollbarWidth:l}=e,u=+(s===`fixed`||s===`document`),d=+(s===`document`),f=+!!t,p=+!t,m=+(n===`start`),h=+(n===`end`),g=(r===n?0:1)*i.width+o,_=m*i.left+h*(c-i.right-l),v=m*(c-i.right-l)+h*i.left,y=f*_+p*v,b=m*window.scrollX-h*window.scrollX,x=h*window.scrollX-m*window.scrollX,S=f*b+p*x,C=Math.abs(Math.min(0,c-y-g-a.width)),w=u*y+g+d*S,T=n===`start`?`inset-inline-start`:`inset-inline-end`;return(s===`document`||s===`fixed`)&&(T=n===`start`&&t||n===`end`&&!t?`left`:`right`),{inlineInset:w,inlineOutOfBoundsCorrection:C,surfaceInlineProperty:T}}hostUpdate(){this.onUpdate()}hostUpdated(){this.onUpdate()}async onUpdate(){let e=this.getProperties(),t=!1;for(let[n,r]of Object.entries(e))if(t||=r!==this.lastValues[n],t)break;let n=this.lastValues.isOpen!==e.isOpen,r=!!e.anchorEl,i=!!e.surfaceEl;t&&r&&i&&(this.lastValues.isOpen=e.isOpen,e.isOpen?(this.lastValues=e,await this.position(),e.onOpen()):n&&(await e.beforeClose(),this.close(),e.onClose()))}close(){this.surfaceStylesInternal={display:`none`},this.host.requestUpdate();let e=this.getProperties().surfaceEl;e?.popover&&e?.isConnected&&e.hidePopover()}},X={INDEX:0,ITEM:1,TEXT:2},Tt=class{constructor(e){this.getProperties=e,this.typeaheadRecords=[],this.typaheadBuffer=``,this.cancelTypeaheadTimeout=0,this.isTypingAhead=!1,this.lastActiveRecord=null,this.onKeydown=e=>{this.isTypingAhead?this.typeahead(e):this.beginTypeahead(e)},this.endTypeahead=()=>{this.isTypingAhead=!1,this.typaheadBuffer=``,this.typeaheadRecords=[]}}get items(){return this.getProperties().getItems()}get active(){return this.getProperties().active}beginTypeahead(e){this.active&&(e.code===`Space`||e.code===`Enter`||e.code.startsWith(`Arrow`)||e.code===`Escape`||(this.isTypingAhead=!0,this.typeaheadRecords=this.items.map((e,t)=>[t,e,e.typeaheadText.trim().toLowerCase()]),this.lastActiveRecord=this.typeaheadRecords.find(e=>e[X.ITEM].tabIndex===0)??null,this.lastActiveRecord&&(this.lastActiveRecord[X.ITEM].tabIndex=-1),this.typeahead(e)))}typeahead(e){if(e.defaultPrevented)return;if(clearTimeout(this.cancelTypeaheadTimeout),e.code===`Enter`||e.code.startsWith(`Arrow`)||e.code===`Escape`){this.endTypeahead(),this.lastActiveRecord&&(this.lastActiveRecord[X.ITEM].tabIndex=-1);return}e.code===`Space`&&e.preventDefault(),this.cancelTypeaheadTimeout=setTimeout(this.endTypeahead,this.getProperties().typeaheadBufferTime),this.typaheadBuffer+=e.key.toLowerCase();let t=this.lastActiveRecord?this.lastActiveRecord[X.INDEX]:-1,n=this.typeaheadRecords.length,r=e=>(e[X.INDEX]+n-t)%n,i=this.typeaheadRecords.filter(e=>!e[X.ITEM].disabled&&e[X.TEXT].startsWith(this.typaheadBuffer)).sort((e,t)=>r(e)-r(t));if(i.length===0){clearTimeout(this.cancelTypeaheadTimeout),this.lastActiveRecord&&(this.lastActiveRecord[X.ITEM].tabIndex=-1),this.endTypeahead();return}let a=this.typaheadBuffer.length===1,o;o=this.lastActiveRecord===i[0]&&a?i[1]??i[0]:i[0],this.lastActiveRecord&&(this.lastActiveRecord[X.ITEM].tabIndex=-1),this.lastActiveRecord=o,o[X.ITEM].tabIndex=0,o[X.ITEM].focus()}},Et=new Set([J.ArrowDown,J.ArrowUp,J.Home,J.End]),Dt=new Set([J.ArrowLeft,J.ArrowRight,...Et]);function Ot(e=document){let t=e.activeElement;for(;t&&t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}var Z=class extends L{get openDirection(){return this.menuCorner.split(`-`)[0]===`start`?`DOWN`:`UP`}get anchorElement(){return this.anchor?this.getRootNode().querySelector(`#${this.anchor}`):this.currentAnchorElement}set anchorElement(e){this.currentAnchorElement=e,this.requestUpdate(`anchorElement`)}constructor(){super(),this.anchor=``,this.positioning=`absolute`,this.quick=!1,this.hasOverflow=!1,this.open=!1,this.xOffset=0,this.yOffset=0,this.noHorizontalFlip=!1,this.noVerticalFlip=!1,this.typeaheadDelay=200,this.anchorCorner=Ct.END_START,this.menuCorner=Ct.START_START,this.stayOpenOnOutsideClick=!1,this.stayOpenOnFocusout=!1,this.skipRestoreFocus=!1,this.defaultFocus=Y.FIRST_ITEM,this.noNavigationWrap=!1,this.typeaheadActive=!0,this.isSubmenu=!1,this.pointerPath=[],this.isRepositioning=!1,this.openCloseAnimationSignal=fe(),this.listController=new mt({isItem:e=>e.hasAttribute(`md-menu-item`),getPossibleItems:()=>this.slotItems,isRtl:()=>getComputedStyle(this).direction===`rtl`,deactivateItem:e=>{e.selected=!1,e.tabIndex=-1},activateItem:e=>{e.selected=!0,e.tabIndex=0},isNavigableKey:e=>this.isSubmenu?e===(getComputedStyle(this).direction===`rtl`?J.ArrowLeft:J.ArrowRight)||Et.has(e):Dt.has(e),wrapNavigation:()=>!this.noNavigationWrap}),this.lastFocusedElement=null,this.typeaheadController=new Tt(()=>({getItems:()=>this.items,typeaheadBufferTime:this.typeaheadDelay,active:this.typeaheadActive})),this.currentAnchorElement=null,this.internals=this.attachInternals(),this.menuPositionController=new wt(this,()=>({anchorCorner:this.anchorCorner,surfaceCorner:this.menuCorner,surfaceEl:this.surfaceEl,anchorEl:this.anchorElement,positioning:this.positioning===`popover`?`document`:this.positioning,isOpen:this.open,xOffset:this.xOffset,yOffset:this.yOffset,disableBlockFlip:this.noVerticalFlip,disableInlineFlip:this.noHorizontalFlip,onOpen:this.onOpened,beforeClose:this.beforeClose,onClose:this.onClosed,repositionStrategy:this.hasOverflow&&this.positioning!==`popover`?`move`:`resize`})),this.onWindowResize=()=>{this.isRepositioning||this.positioning!==`document`&&this.positioning!==`fixed`&&this.positioning!==`popover`||(this.isRepositioning=!0,this.reposition(),this.isRepositioning=!1)},this.handleFocusout=async e=>{let t=this.anchorElement;if(this.stayOpenOnFocusout||!this.open||this.pointerPath.includes(t))return;if(e.relatedTarget){if(St(e.relatedTarget,this)||this.pointerPath.length!==0&&St(e.relatedTarget,t))return}else if(this.pointerPath.includes(this))return;let n=this.skipRestoreFocus;this.skipRestoreFocus=!0,this.close(),await this.updateComplete,this.skipRestoreFocus=n},this.onOpened=async()=>{this.lastFocusedElement=Ot();let e=this.items,t=K(e);t&&this.defaultFocus!==Y.NONE&&(t.item.tabIndex=-1);let n=!this.quick;switch(this.quick?this.dispatchEvent(new Event(`opening`)):n=!!await this.animateOpen(),this.defaultFocus){case Y.FIRST_ITEM:let t=ct(e);t&&(t.tabIndex=0,t.focus(),await t.updateComplete);break;case Y.LAST_ITEM:let n=lt(e);n&&(n.tabIndex=0,n.focus(),await n.updateComplete);break;case Y.LIST_ROOT:this.focus();break;default:case Y.NONE:}n||this.dispatchEvent(new Event(`opened`))},this.beforeClose=async()=>{this.open=!1,this.skipRestoreFocus||this.lastFocusedElement?.focus?.(),this.quick||await this.animateClose()},this.onClosed=()=>{this.quick&&(this.dispatchEvent(new Event(`closing`)),this.dispatchEvent(new Event(`closed`)))},this.onWindowPointerdown=e=>{this.pointerPath=e.composedPath()},this.onDocumentClick=e=>{if(!this.open)return;let t=e.composedPath();this.stayOpenOnOutsideClick||t.includes(this)||t.includes(this.anchorElement)||(this.open=!1)},this.internals.role=`menu`,this.addEventListener(`keydown`,this.handleKeydown),this.addEventListener(`keydown`,this.captureKeydown,{capture:!0}),this.addEventListener(`focusout`,this.handleFocusout)}get items(){return this.listController.items}willUpdate(e){e.has(`open`)&&(this.open?this.removeAttribute(`aria-hidden`):this.setAttribute(`aria-hidden`,`true`))}update(e){e.has(`open`)&&(this.open?this.setUpGlobalEventListeners():this.cleanUpGlobalEventListeners()),e.has(`positioning`)&&this.positioning===`popover`&&!this.showPopover&&(this.positioning=`fixed`),super.update(e)}connectedCallback(){super.connectedCallback(),this.open&&this.setUpGlobalEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.cleanUpGlobalEventListeners()}getBoundingClientRect(){return this.surfaceEl?this.surfaceEl.getBoundingClientRect():super.getBoundingClientRect()}getClientRects(){return this.surfaceEl?this.surfaceEl.getClientRects():super.getClientRects()}render(){return this.renderSurface()}renderSurface(){return V`
|
|
2
|
-
<div
|
|
3
|
-
class="menu ${oe(this.getSurfaceClasses())}"
|
|
4
|
-
style=${De(this.menuPositionController.surfaceStyles)}
|
|
5
|
-
popover=${this.positioning===`popover`?`manual`:B}>
|
|
6
|
-
${this.renderElevation()}
|
|
7
|
-
<div class="items">
|
|
8
|
-
<div class="item-padding"> ${this.renderMenuItems()} </div>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
`}renderMenuItems(){return V`<slot
|
|
12
|
-
@close-menu=${this.onCloseMenu}
|
|
13
|
-
@deactivate-items=${this.onDeactivateItems}
|
|
14
|
-
@request-activation=${this.onRequestActivation}
|
|
15
|
-
@deactivate-typeahead=${this.handleDeactivateTypeahead}
|
|
16
|
-
@activate-typeahead=${this.handleActivateTypeahead}
|
|
17
|
-
@stay-open-on-focusout=${this.handleStayOpenOnFocusout}
|
|
18
|
-
@close-on-focusout=${this.handleCloseOnFocusout}
|
|
19
|
-
@slotchange=${this.listController.onSlotchange}></slot>`}renderElevation(){return V`<md-elevation part="elevation"></md-elevation>`}getSurfaceClasses(){return{open:this.open,fixed:this.positioning===`fixed`,"has-overflow":this.hasOverflow}}captureKeydown(e){e.target===this&&!e.defaultPrevented&&bt(e.code)&&(e.preventDefault(),this.close()),this.typeaheadController.onKeydown(e)}async animateOpen(){let e=this.surfaceEl,t=this.slotEl;if(!e||!t)return!0;let n=this.openDirection;this.dispatchEvent(new Event(`opening`)),e.classList.toggle(`animating`,!0);let r=this.openCloseAnimationSignal.start(),i=e.offsetHeight,a=n===`UP`,o=this.items,s=250/o.length,c=e.animate([{height:`0px`},{height:`${i}px`}],{duration:500,easing:I.EMPHASIZED}),l=t.animate([{transform:a?`translateY(-${i}px)`:``},{transform:``}],{duration:500,easing:I.EMPHASIZED}),u=e.animate([{opacity:0},{opacity:1}],50),d=[];for(let e=0;e<o.length;e++){let t=o[a?o.length-1-e:e],n=t.animate([{opacity:0},{opacity:1}],{duration:250,delay:s*e});t.classList.toggle(`md-menu-hidden`,!0),n.addEventListener(`finish`,()=>{t.classList.toggle(`md-menu-hidden`,!1)}),d.push([t,n])}let f=e=>{},p=new Promise(e=>{f=e});return r.addEventListener(`abort`,()=>{c.cancel(),l.cancel(),u.cancel(),d.forEach(([e,t])=>{e.classList.toggle(`md-menu-hidden`,!1),t.cancel()}),f(!0)}),c.addEventListener(`finish`,()=>{e.classList.toggle(`animating`,!1),this.openCloseAnimationSignal.finish(),f(!1)}),await p}animateClose(){let e,t=new Promise(t=>{e=t}),n=this.surfaceEl,r=this.slotEl;if(!n||!r)return e(!1),t;let i=this.openDirection===`UP`;this.dispatchEvent(new Event(`closing`)),n.classList.toggle(`animating`,!0);let a=this.openCloseAnimationSignal.start(),o=n.offsetHeight,s=this.items,c=50/s.length,l=n.animate([{height:`${o}px`},{height:`${o*.35}px`}],{duration:150,easing:I.EMPHASIZED_ACCELERATE}),u=r.animate([{transform:``},{transform:i?`translateY(-${o*.65}px)`:``}],{duration:150,easing:I.EMPHASIZED_ACCELERATE}),d=n.animate([{opacity:1},{opacity:0}],{duration:50,delay:100}),f=[];for(let e=0;e<s.length;e++){let t=s[i?e:s.length-1-e],n=t.animate([{opacity:1},{opacity:0}],{duration:50,delay:50+c*e});n.addEventListener(`finish`,()=>{t.classList.toggle(`md-menu-hidden`,!0)}),f.push([t,n])}return a.addEventListener(`abort`,()=>{l.cancel(),u.cancel(),d.cancel(),f.forEach(([e,t])=>{t.cancel(),e.classList.toggle(`md-menu-hidden`,!1)}),e(!1)}),l.addEventListener(`finish`,()=>{n.classList.toggle(`animating`,!1),f.forEach(([e])=>{e.classList.toggle(`md-menu-hidden`,!1)}),this.openCloseAnimationSignal.finish(),this.dispatchEvent(new Event(`closed`)),e(!0)}),t}handleKeydown(e){this.pointerPath=[],this.listController.handleKeydown(e)}setUpGlobalEventListeners(){document.addEventListener(`click`,this.onDocumentClick,{capture:!0}),window.addEventListener(`pointerdown`,this.onWindowPointerdown),document.addEventListener(`resize`,this.onWindowResize,{passive:!0}),window.addEventListener(`resize`,this.onWindowResize,{passive:!0})}cleanUpGlobalEventListeners(){document.removeEventListener(`click`,this.onDocumentClick,{capture:!0}),window.removeEventListener(`pointerdown`,this.onWindowPointerdown),document.removeEventListener(`resize`,this.onWindowResize),window.removeEventListener(`resize`,this.onWindowResize)}onCloseMenu(){this.close()}onDeactivateItems(e){e.stopPropagation(),this.listController.onDeactivateItems()}onRequestActivation(e){e.stopPropagation(),this.listController.onRequestActivation(e)}handleDeactivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!1}handleActivateTypeahead(e){e.stopPropagation(),this.typeaheadActive=!0}handleStayOpenOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!0}handleCloseOnFocusout(e){e.stopPropagation(),this.stayOpenOnFocusout=!1}close(){this.open=!1,this.slotItems.forEach(e=>{e.close?.()})}show(){this.open=!0}activateNextItem(){return this.listController.activateNextItem()??null}activatePreviousItem(){return this.listController.activatePreviousItem()??null}reposition(){this.open&&this.menuPositionController.position()}};U([H(`.menu`)],Z.prototype,`surfaceEl`,void 0),U([H(`slot`)],Z.prototype,`slotEl`,void 0),U([W()],Z.prototype,`anchor`,void 0),U([W()],Z.prototype,`positioning`,void 0),U([W({type:Boolean})],Z.prototype,`quick`,void 0),U([W({type:Boolean,attribute:`has-overflow`})],Z.prototype,`hasOverflow`,void 0),U([W({type:Boolean,reflect:!0})],Z.prototype,`open`,void 0),U([W({type:Number,attribute:`x-offset`})],Z.prototype,`xOffset`,void 0),U([W({type:Number,attribute:`y-offset`})],Z.prototype,`yOffset`,void 0),U([W({type:Boolean,attribute:`no-horizontal-flip`})],Z.prototype,`noHorizontalFlip`,void 0),U([W({type:Boolean,attribute:`no-vertical-flip`})],Z.prototype,`noVerticalFlip`,void 0),U([W({type:Number,attribute:`typeahead-delay`})],Z.prototype,`typeaheadDelay`,void 0),U([W({attribute:`anchor-corner`})],Z.prototype,`anchorCorner`,void 0),U([W({attribute:`menu-corner`})],Z.prototype,`menuCorner`,void 0),U([W({type:Boolean,attribute:`stay-open-on-outside-click`})],Z.prototype,`stayOpenOnOutsideClick`,void 0),U([W({type:Boolean,attribute:`stay-open-on-focusout`})],Z.prototype,`stayOpenOnFocusout`,void 0),U([W({type:Boolean,attribute:`skip-restore-focus`})],Z.prototype,`skipRestoreFocus`,void 0),U([W({attribute:`default-focus`})],Z.prototype,`defaultFocus`,void 0),U([W({type:Boolean,attribute:`no-navigation-wrap`})],Z.prototype,`noNavigationWrap`,void 0),U([xe({flatten:!0})],Z.prototype,`slotItems`,void 0),U([z()],Z.prototype,`typeaheadActive`,void 0);var kt=R`:host{--md-elevation-level: var(--md-menu-container-elevation, 2);--md-elevation-shadow-color: var(--md-menu-container-shadow-color, var(--md-sys-color-shadow, #000));min-width:112px;color:unset;display:contents}md-focus-ring{--md-focus-ring-shape: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px))}.menu{border-radius:var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 4px));display:none;inset:auto;border:none;padding:0px;overflow:visible;background-color:rgba(0,0,0,0);color:inherit;opacity:0;z-index:20;position:absolute;user-select:none;max-height:inherit;height:inherit;min-width:inherit;max-width:inherit;scrollbar-width:inherit}.menu::backdrop{display:none}.fixed{position:fixed}.items{display:block;list-style-type:none;margin:0;outline:none;box-sizing:border-box;background-color:var(--md-menu-container-color, var(--md-sys-color-surface-container, #f3edf7));height:inherit;max-height:inherit;overflow:auto;min-width:inherit;max-width:inherit;border-radius:inherit;scrollbar-width:inherit}.item-padding{padding-block:var(--md-menu-top-space, 8px) var(--md-menu-bottom-space, 8px)}.has-overflow:not([popover]) .items{overflow:visible}.has-overflow.animating .items,.animating .items{overflow:hidden}.has-overflow.animating .items{pointer-events:none}.animating ::slotted(.md-menu-hidden){opacity:0}slot{display:block;height:inherit;max-height:inherit}::slotted(:is(md-divider,[role=separator])){margin:8px 0}@media(forced-colors: active){.menu{border-style:solid;border-color:CanvasText;border-width:1px}}
|
|
20
|
-
`;kt.styleSheet;var At=class extends Z{};At.styles=[kt],At=U([ce(`md-menu`)],At);var jt=class extends Oe{computeValidity(e){return this.selectControl||=document.createElement(`select`),se(V`<option value=${e.value}></option>`,this.selectControl),this.selectControl.value=e.value,this.selectControl.required=e.required,{validity:this.selectControl.validity,validationMessage:this.selectControl.validationMessage}}equals(e,t){return e.value===t.value&&e.required===t.required}copy({value:e,required:t}){return{value:e,required:t}}};function Mt(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r.selected&&t.push([r,n])}return t}var Nt,Pt=Symbol(`value`),Ft=pe(we(Te(ve(ie(L))))),Q=class extends Ft{get value(){return this[Pt]}set value(e){this.lastUserSetValue=e,this.select(e)}get options(){return this.menu?.items??[]}get selectedIndex(){let[e,t]=(this.getSelectedOptions()??[])[0]??[];return t??-1}set selectedIndex(e){this.lastUserSetSelectedIndex=e,this.selectIndex(e)}get selectedOptions(){return(this.getSelectedOptions()??[]).map(([e])=>e)}get hasError(){return this.error||this.nativeError}constructor(){super(),this.quick=!1,this.required=!1,this.errorText=``,this.label=``,this.noAsterisk=!1,this.supportingText=``,this.error=!1,this.menuPositioning=`popover`,this.clampMenuWidth=!1,this.typeaheadDelay=200,this.hasLeadingIcon=!1,this.displayText=``,this.menuAlign=`start`,this[Nt]=``,this.lastUserSetValue=null,this.lastUserSetSelectedIndex=null,this.lastSelectedOption=null,this.lastSelectedOptionRecords=[],this.nativeError=!1,this.nativeErrorText=``,this.focused=!1,this.open=!1,this.defaultFocus=Y.NONE,this.prevOpen=this.open,this.selectWidth=0,this.addEventListener(`focus`,this.handleFocus.bind(this)),this.addEventListener(`blur`,this.handleBlur.bind(this))}select(e){let t=this.options.find(t=>t.value===e);t&&this.selectItem(t)}selectIndex(e){let t=this.options[e];t&&this.selectItem(t)}reset(){for(let e of this.options)e.selected=e.hasAttribute(`selected`);this.updateValueAndDisplayText(),this.nativeError=!1,this.nativeErrorText=``}showPicker(){this.open=!0}[(Nt=Pt,Ee)](e){e?.preventDefault();let t=this.getErrorText();this.nativeError=!!e,this.nativeErrorText=this.validationMessage,t===this.getErrorText()&&this.field?.reannounceError()}update(e){if(this.hasUpdated||this.initUserSelection(),this.prevOpen!==this.open&&this.open){let e=this.getBoundingClientRect();this.selectWidth=e.width}this.prevOpen=this.open,super.update(e)}render(){return V`
|
|
21
|
-
<span
|
|
22
|
-
class="select ${oe(this.getRenderClasses())}"
|
|
23
|
-
@focusout=${this.handleFocusout}>
|
|
24
|
-
${this.renderField()} ${this.renderMenu()}
|
|
25
|
-
</span>
|
|
26
|
-
`}async firstUpdated(e){await this.menu?.updateComplete,this.lastSelectedOptionRecords.length||this.initUserSelection(),!this.lastSelectedOptionRecords.length&&!this.options.length&&setTimeout(()=>{this.updateValueAndDisplayText()}),super.firstUpdated(e)}getRenderClasses(){return{disabled:this.disabled,error:this.error,open:this.open}}renderField(){let e=this.ariaLabel||this.label;return ke`
|
|
27
|
-
<${this.fieldTag}
|
|
28
|
-
aria-haspopup="listbox"
|
|
29
|
-
role="combobox"
|
|
30
|
-
part="field"
|
|
31
|
-
id="field"
|
|
32
|
-
tabindex=${this.disabled?`-1`:`0`}
|
|
33
|
-
aria-label=${e||B}
|
|
34
|
-
aria-describedby="description"
|
|
35
|
-
aria-expanded=${this.open?`true`:`false`}
|
|
36
|
-
aria-controls="listbox"
|
|
37
|
-
class="field"
|
|
38
|
-
label=${this.label}
|
|
39
|
-
?no-asterisk=${this.noAsterisk}
|
|
40
|
-
.focused=${this.focused||this.open}
|
|
41
|
-
.populated=${!!this.displayText}
|
|
42
|
-
.disabled=${this.disabled}
|
|
43
|
-
.required=${this.required}
|
|
44
|
-
.error=${this.hasError}
|
|
45
|
-
?has-start=${this.hasLeadingIcon}
|
|
46
|
-
has-end
|
|
47
|
-
supporting-text=${this.supportingText}
|
|
48
|
-
error-text=${this.getErrorText()}
|
|
49
|
-
@keydown=${this.handleKeydown}
|
|
50
|
-
@click=${this.handleClick}>
|
|
51
|
-
${this.renderFieldContent()}
|
|
52
|
-
<div id="description" slot="aria-describedby"></div>
|
|
53
|
-
</${this.fieldTag}>`}renderFieldContent(){return[this.renderLeadingIcon(),this.renderLabel(),this.renderTrailingIcon()]}renderLeadingIcon(){return V`
|
|
54
|
-
<span class="icon leading" slot="start">
|
|
55
|
-
<slot name="leading-icon" @slotchange=${this.handleIconChange}></slot>
|
|
56
|
-
</span>
|
|
57
|
-
`}renderTrailingIcon(){return V`
|
|
58
|
-
<span class="icon trailing" slot="end">
|
|
59
|
-
<slot name="trailing-icon" @slotchange=${this.handleIconChange}>
|
|
60
|
-
<svg height="5" viewBox="7 10 10 5" focusable="false">
|
|
61
|
-
<polygon
|
|
62
|
-
class="down"
|
|
63
|
-
stroke="none"
|
|
64
|
-
fill-rule="evenodd"
|
|
65
|
-
points="7 10 12 15 17 10"></polygon>
|
|
66
|
-
<polygon
|
|
67
|
-
class="up"
|
|
68
|
-
stroke="none"
|
|
69
|
-
fill-rule="evenodd"
|
|
70
|
-
points="7 15 12 10 17 15"></polygon>
|
|
71
|
-
</svg>
|
|
72
|
-
</slot>
|
|
73
|
-
</span>
|
|
74
|
-
`}renderLabel(){return V`<div id="label">${this.displayText||V` `}</div>`}renderMenu(){let e=this.label||this.ariaLabel;return V`<div class="menu-wrapper">
|
|
75
|
-
<md-menu
|
|
76
|
-
id="listbox"
|
|
77
|
-
.defaultFocus=${this.defaultFocus}
|
|
78
|
-
role="listbox"
|
|
79
|
-
tabindex="-1"
|
|
80
|
-
aria-label=${e||B}
|
|
81
|
-
stay-open-on-focusout
|
|
82
|
-
part="menu"
|
|
83
|
-
exportparts="focus-ring: menu-focus-ring"
|
|
84
|
-
anchor="field"
|
|
85
|
-
style=${De({"--__menu-min-width":`${this.selectWidth}px`,"--__menu-max-width":this.clampMenuWidth?`${this.selectWidth}px`:void 0})}
|
|
86
|
-
no-navigation-wrap
|
|
87
|
-
.open=${this.open}
|
|
88
|
-
.quick=${this.quick}
|
|
89
|
-
.positioning=${this.menuPositioning}
|
|
90
|
-
.typeaheadDelay=${this.typeaheadDelay}
|
|
91
|
-
.anchorCorner=${this.menuAlign===`start`?`end-start`:`end-end`}
|
|
92
|
-
.menuCorner=${this.menuAlign===`start`?`start-start`:`start-end`}
|
|
93
|
-
@opening=${this.handleOpening}
|
|
94
|
-
@opened=${this.redispatchEvent}
|
|
95
|
-
@closing=${this.redispatchEvent}
|
|
96
|
-
@closed=${this.handleClosed}
|
|
97
|
-
@close-menu=${this.handleCloseMenu}
|
|
98
|
-
@request-selection=${this.handleRequestSelection}
|
|
99
|
-
@request-deselection=${this.handleRequestDeselection}>
|
|
100
|
-
${this.renderMenuContent()}
|
|
101
|
-
</md-menu>
|
|
102
|
-
</div>`}renderMenuContent(){return V`<slot></slot>`}handleKeydown(e){if(this.open||this.disabled||!this.menu)return;let t=this.menu.typeaheadController,n=e.code===`Space`||e.code===`ArrowDown`||e.code===`ArrowUp`||e.code===`End`||e.code===`Home`||e.code===`Enter`;if(!t.isTypingAhead&&n)switch(e.preventDefault(),this.open=!0,e.code){case`Space`:case`ArrowDown`:case`Enter`:this.defaultFocus=Y.NONE;break;case`End`:this.defaultFocus=Y.LAST_ITEM;break;case`ArrowUp`:case`Home`:this.defaultFocus=Y.FIRST_ITEM}else if(e.key.length===1){t.onKeydown(e),e.preventDefault();let{lastActiveRecord:n}=t;if(!n)return;this.labelEl?.setAttribute?.(`aria-live`,`polite`),this.selectItem(n[X.ITEM])&&this.dispatchInteractionEvents()}}handleClick(){this.open=!this.open}handleFocus(){this.focused=!0}handleBlur(){this.focused=!1}handleFocusout(e){e.relatedTarget&&St(e.relatedTarget,this)||(this.open=!1)}getSelectedOptions(){if(!this.menu)return this.lastSelectedOptionRecords=[],null;let e=this.menu.items;return this.lastSelectedOptionRecords=Mt(e),this.lastSelectedOptionRecords}async getUpdateComplete(){return await this.menu?.updateComplete,super.getUpdateComplete()}updateValueAndDisplayText(){let e=this.getSelectedOptions()??[],t=!1;if(e.length){let[n]=e[0];t=this.lastSelectedOption!==n,this.lastSelectedOption=n,this[Pt]=n.value,this.displayText=n.displayText}else t=this.lastSelectedOption!==null,this.lastSelectedOption=null,this[Pt]=``,this.displayText=``;return t}async handleOpening(e){if(this.labelEl?.removeAttribute?.(`aria-live`),this.redispatchEvent(e),this.defaultFocus!==Y.NONE)return;let t=this.menu.items,n=K(t)?.item,[r]=this.lastSelectedOptionRecords[0]??[null];n&&n!==r&&(n.tabIndex=-1),r??=t[0],r&&(r.tabIndex=0,r.focus())}redispatchEvent(e){je(this,e)}handleClosed(e){this.open=!1,this.redispatchEvent(e)}handleCloseMenu(e){let t=e.detail.reason,n=e.detail.itemPath[0];this.open=!1;let r=!1;t.kind===`click-selection`||t.kind===`keydown`&&xt(t.key)?r=this.selectItem(n):(n.tabIndex=-1,n.blur()),r&&this.dispatchInteractionEvents()}selectItem(e){return(this.getSelectedOptions()??[]).forEach(([t])=>{e!==t&&(t.selected=!1,t.tabIndex=-1)}),e.selected=!0,e.tabIndex=0,this.updateValueAndDisplayText()}handleRequestSelection(e){let t=e.target;this.lastSelectedOptionRecords.some(([e])=>e===t)||this.selectItem(t)}handleRequestDeselection(e){let t=e.target;this.lastSelectedOptionRecords.some(([e])=>e===t)&&this.updateValueAndDisplayText()}initUserSelection(){this.lastUserSetValue&&!this.lastSelectedOptionRecords.length?this.select(this.lastUserSetValue):this.lastUserSetSelectedIndex!==null&&!this.lastSelectedOptionRecords.length?this.selectIndex(this.lastUserSetSelectedIndex):this.updateValueAndDisplayText()}handleIconChange(){this.hasLeadingIcon=this.leadingIcons.length>0}dispatchInteractionEvents(){this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}getErrorText(){return this.error?this.errorText:this.nativeErrorText}[re](){return this.value}formResetCallback(){this.reset()}formStateRestoreCallback(e){this.value=e}click(){this.field?.click()}[Ce](){return new jt(()=>this)}[Se](){return this.field}};Q.shadowRootOptions={...L.shadowRootOptions,delegatesFocus:!0},U([W({type:Boolean})],Q.prototype,`quick`,void 0),U([W({type:Boolean})],Q.prototype,`required`,void 0),U([W({type:String,attribute:`error-text`})],Q.prototype,`errorText`,void 0),U([W()],Q.prototype,`label`,void 0),U([W({type:Boolean,attribute:`no-asterisk`})],Q.prototype,`noAsterisk`,void 0),U([W({type:String,attribute:`supporting-text`})],Q.prototype,`supportingText`,void 0),U([W({type:Boolean,reflect:!0})],Q.prototype,`error`,void 0),U([W({attribute:`menu-positioning`})],Q.prototype,`menuPositioning`,void 0),U([W({type:Boolean,attribute:`clamp-menu-width`})],Q.prototype,`clampMenuWidth`,void 0),U([W({type:Number,attribute:`typeahead-delay`})],Q.prototype,`typeaheadDelay`,void 0),U([W({type:Boolean,attribute:`has-leading-icon`})],Q.prototype,`hasLeadingIcon`,void 0),U([W({attribute:`display-text`})],Q.prototype,`displayText`,void 0),U([W({attribute:`menu-align`})],Q.prototype,`menuAlign`,void 0),U([W()],Q.prototype,`value`,null),U([W({type:Number,attribute:`selected-index`})],Q.prototype,`selectedIndex`,null),U([z()],Q.prototype,`nativeError`,void 0),U([z()],Q.prototype,`nativeErrorText`,void 0),U([z()],Q.prototype,`focused`,void 0),U([z()],Q.prototype,`open`,void 0),U([z()],Q.prototype,`defaultFocus`,void 0),U([H(`.field`)],Q.prototype,`field`,void 0),U([H(`md-menu`)],Q.prototype,`menu`,void 0),U([H(`#label`)],Q.prototype,`labelEl`,void 0),U([xe({slot:`leading-icon`,flatten:!0})],Q.prototype,`leadingIcons`,void 0);var It=class extends Q{constructor(){super(...arguments),this.fieldTag=Ae`md-outlined-field`}},Lt=R`:host{--_text-field-disabled-input-text-color: var(--md-outlined-select-text-field-disabled-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-input-text-opacity: var(--md-outlined-select-text-field-disabled-input-text-opacity, 0.38);--_text-field-disabled-label-text-color: var(--md-outlined-select-text-field-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-label-text-opacity: var(--md-outlined-select-text-field-disabled-label-text-opacity, 0.38);--_text-field-disabled-leading-icon-color: var(--md-outlined-select-text-field-disabled-leading-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-leading-icon-opacity: var(--md-outlined-select-text-field-disabled-leading-icon-opacity, 0.38);--_text-field-disabled-outline-color: var(--md-outlined-select-text-field-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-outline-opacity: var(--md-outlined-select-text-field-disabled-outline-opacity, 0.12);--_text-field-disabled-outline-width: var(--md-outlined-select-text-field-disabled-outline-width, 1px);--_text-field-disabled-supporting-text-color: var(--md-outlined-select-text-field-disabled-supporting-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-supporting-text-opacity: var(--md-outlined-select-text-field-disabled-supporting-text-opacity, 0.38);--_text-field-disabled-trailing-icon-color: var(--md-outlined-select-text-field-disabled-trailing-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-disabled-trailing-icon-opacity: var(--md-outlined-select-text-field-disabled-trailing-icon-opacity, 0.38);--_text-field-error-focus-input-text-color: var(--md-outlined-select-text-field-error-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-focus-label-text-color: var(--md-outlined-select-text-field-error-focus-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-leading-icon-color: var(--md-outlined-select-text-field-error-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-focus-outline-color: var(--md-outlined-select-text-field-error-focus-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-supporting-text-color: var(--md-outlined-select-text-field-error-focus-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-focus-trailing-icon-color: var(--md-outlined-select-text-field-error-focus-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-input-text-color: var(--md-outlined-select-text-field-error-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-hover-label-text-color: var(--md-outlined-select-text-field-error-hover-label-text-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-leading-icon-color: var(--md-outlined-select-text-field-error-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-hover-outline-color: var(--md-outlined-select-text-field-error-hover-outline-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-hover-supporting-text-color: var(--md-outlined-select-text-field-error-hover-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-hover-trailing-icon-color: var(--md-outlined-select-text-field-error-hover-trailing-icon-color, var(--md-sys-color-on-error-container, #410e0b));--_text-field-error-input-text-color: var(--md-outlined-select-text-field-error-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-error-label-text-color: var(--md-outlined-select-text-field-error-label-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-leading-icon-color: var(--md-outlined-select-text-field-error-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-error-outline-color: var(--md-outlined-select-text-field-error-outline-color, var(--md-sys-color-error, #b3261e));--_text-field-error-supporting-text-color: var(--md-outlined-select-text-field-error-supporting-text-color, var(--md-sys-color-error, #b3261e));--_text-field-error-trailing-icon-color: var(--md-outlined-select-text-field-error-trailing-icon-color, var(--md-sys-color-error, #b3261e));--_text-field-focus-input-text-color: var(--md-outlined-select-text-field-focus-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-focus-label-text-color: var(--md-outlined-select-text-field-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-leading-icon-color: var(--md-outlined-select-text-field-focus-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-outline-color: var(--md-outlined-select-text-field-focus-outline-color, var(--md-sys-color-primary, #6750a4));--_text-field-focus-outline-width: var(--md-outlined-select-text-field-focus-outline-width, 3px);--_text-field-focus-supporting-text-color: var(--md-outlined-select-text-field-focus-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-focus-trailing-icon-color: var(--md-outlined-select-text-field-focus-trailing-icon-color, var(--md-sys-color-primary, #6750a4));--_text-field-hover-input-text-color: var(--md-outlined-select-text-field-hover-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-label-text-color: var(--md-outlined-select-text-field-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-leading-icon-color: var(--md-outlined-select-text-field-hover-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-outline-color: var(--md-outlined-select-text-field-hover-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-hover-outline-width: var(--md-outlined-select-text-field-hover-outline-width, 1px);--_text-field-hover-supporting-text-color: var(--md-outlined-select-text-field-hover-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-hover-trailing-icon-color: var(--md-outlined-select-text-field-hover-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-input-text-color: var(--md-outlined-select-text-field-input-text-color, var(--md-sys-color-on-surface, #1d1b20));--_text-field-input-text-font: var(--md-outlined-select-text-field-input-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-input-text-line-height: var(--md-outlined-select-text-field-input-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-input-text-size: var(--md-outlined-select-text-field-input-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-input-text-weight: var(--md-outlined-select-text-field-input-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-label-text-color: var(--md-outlined-select-text-field-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-label-text-font: var(--md-outlined-select-text-field-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-label-text-line-height: var(--md-outlined-select-text-field-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));--_text-field-label-text-populated-line-height: var(--md-outlined-select-text-field-label-text-populated-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-label-text-populated-size: var(--md-outlined-select-text-field-label-text-populated-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-label-text-size: var(--md-outlined-select-text-field-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));--_text-field-label-text-weight: var(--md-outlined-select-text-field-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-leading-icon-color: var(--md-outlined-select-text-field-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-leading-icon-size: var(--md-outlined-select-text-field-leading-icon-size, 24px);--_text-field-outline-color: var(--md-outlined-select-text-field-outline-color, var(--md-sys-color-outline, #79747e));--_text-field-outline-width: var(--md-outlined-select-text-field-outline-width, 1px);--_text-field-supporting-text-color: var(--md-outlined-select-text-field-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-supporting-text-font: var(--md-outlined-select-text-field-supporting-text-font, var(--md-sys-typescale-body-small-font, var(--md-ref-typeface-plain, Roboto)));--_text-field-supporting-text-line-height: var(--md-outlined-select-text-field-supporting-text-line-height, var(--md-sys-typescale-body-small-line-height, 1rem));--_text-field-supporting-text-size: var(--md-outlined-select-text-field-supporting-text-size, var(--md-sys-typescale-body-small-size, 0.75rem));--_text-field-supporting-text-weight: var(--md-outlined-select-text-field-supporting-text-weight, var(--md-sys-typescale-body-small-weight, var(--md-ref-typeface-weight-regular, 400)));--_text-field-trailing-icon-color: var(--md-outlined-select-text-field-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_text-field-trailing-icon-size: var(--md-outlined-select-text-field-trailing-icon-size, 24px);--_text-field-container-shape-start-start: var(--md-outlined-select-text-field-container-shape-start-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-start-end: var(--md-outlined-select-text-field-container-shape-start-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-end: var(--md-outlined-select-text-field-container-shape-end-end, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--_text-field-container-shape-end-start: var(--md-outlined-select-text-field-container-shape-end-start, var(--md-outlined-select-text-field-container-shape, var(--md-sys-shape-corner-extra-small, 4px)));--md-outlined-field-container-shape-end-end: var(--_text-field-container-shape-end-end);--md-outlined-field-container-shape-end-start: var(--_text-field-container-shape-end-start);--md-outlined-field-container-shape-start-end: var(--_text-field-container-shape-start-end);--md-outlined-field-container-shape-start-start: var(--_text-field-container-shape-start-start);--md-outlined-field-content-color: var(--_text-field-input-text-color);--md-outlined-field-content-font: var(--_text-field-input-text-font);--md-outlined-field-content-line-height: var(--_text-field-input-text-line-height);--md-outlined-field-content-size: var(--_text-field-input-text-size);--md-outlined-field-content-weight: var(--_text-field-input-text-weight);--md-outlined-field-disabled-content-color: var(--_text-field-disabled-input-text-color);--md-outlined-field-disabled-content-opacity: var(--_text-field-disabled-input-text-opacity);--md-outlined-field-disabled-label-text-color: var(--_text-field-disabled-label-text-color);--md-outlined-field-disabled-label-text-opacity: var(--_text-field-disabled-label-text-opacity);--md-outlined-field-disabled-leading-content-color: var(--_text-field-disabled-leading-icon-color);--md-outlined-field-disabled-leading-content-opacity: var(--_text-field-disabled-leading-icon-opacity);--md-outlined-field-disabled-outline-color: var(--_text-field-disabled-outline-color);--md-outlined-field-disabled-outline-opacity: var(--_text-field-disabled-outline-opacity);--md-outlined-field-disabled-outline-width: var(--_text-field-disabled-outline-width);--md-outlined-field-disabled-supporting-text-color: var(--_text-field-disabled-supporting-text-color);--md-outlined-field-disabled-supporting-text-opacity: var(--_text-field-disabled-supporting-text-opacity);--md-outlined-field-disabled-trailing-content-color: var(--_text-field-disabled-trailing-icon-color);--md-outlined-field-disabled-trailing-content-opacity: var(--_text-field-disabled-trailing-icon-opacity);--md-outlined-field-error-content-color: var(--_text-field-error-input-text-color);--md-outlined-field-error-focus-content-color: var(--_text-field-error-focus-input-text-color);--md-outlined-field-error-focus-label-text-color: var(--_text-field-error-focus-label-text-color);--md-outlined-field-error-focus-leading-content-color: var(--_text-field-error-focus-leading-icon-color);--md-outlined-field-error-focus-outline-color: var(--_text-field-error-focus-outline-color);--md-outlined-field-error-focus-supporting-text-color: var(--_text-field-error-focus-supporting-text-color);--md-outlined-field-error-focus-trailing-content-color: var(--_text-field-error-focus-trailing-icon-color);--md-outlined-field-error-hover-content-color: var(--_text-field-error-hover-input-text-color);--md-outlined-field-error-hover-label-text-color: var(--_text-field-error-hover-label-text-color);--md-outlined-field-error-hover-leading-content-color: var(--_text-field-error-hover-leading-icon-color);--md-outlined-field-error-hover-outline-color: var(--_text-field-error-hover-outline-color);--md-outlined-field-error-hover-supporting-text-color: var(--_text-field-error-hover-supporting-text-color);--md-outlined-field-error-hover-trailing-content-color: var(--_text-field-error-hover-trailing-icon-color);--md-outlined-field-error-label-text-color: var(--_text-field-error-label-text-color);--md-outlined-field-error-leading-content-color: var(--_text-field-error-leading-icon-color);--md-outlined-field-error-outline-color: var(--_text-field-error-outline-color);--md-outlined-field-error-supporting-text-color: var(--_text-field-error-supporting-text-color);--md-outlined-field-error-trailing-content-color: var(--_text-field-error-trailing-icon-color);--md-outlined-field-focus-content-color: var(--_text-field-focus-input-text-color);--md-outlined-field-focus-label-text-color: var(--_text-field-focus-label-text-color);--md-outlined-field-focus-leading-content-color: var(--_text-field-focus-leading-icon-color);--md-outlined-field-focus-outline-color: var(--_text-field-focus-outline-color);--md-outlined-field-focus-outline-width: var(--_text-field-focus-outline-width);--md-outlined-field-focus-supporting-text-color: var(--_text-field-focus-supporting-text-color);--md-outlined-field-focus-trailing-content-color: var(--_text-field-focus-trailing-icon-color);--md-outlined-field-hover-content-color: var(--_text-field-hover-input-text-color);--md-outlined-field-hover-label-text-color: var(--_text-field-hover-label-text-color);--md-outlined-field-hover-leading-content-color: var(--_text-field-hover-leading-icon-color);--md-outlined-field-hover-outline-color: var(--_text-field-hover-outline-color);--md-outlined-field-hover-outline-width: var(--_text-field-hover-outline-width);--md-outlined-field-hover-supporting-text-color: var(--_text-field-hover-supporting-text-color);--md-outlined-field-hover-trailing-content-color: var(--_text-field-hover-trailing-icon-color);--md-outlined-field-label-text-color: var(--_text-field-label-text-color);--md-outlined-field-label-text-font: var(--_text-field-label-text-font);--md-outlined-field-label-text-line-height: var(--_text-field-label-text-line-height);--md-outlined-field-label-text-populated-line-height: var(--_text-field-label-text-populated-line-height);--md-outlined-field-label-text-populated-size: var(--_text-field-label-text-populated-size);--md-outlined-field-label-text-size: var(--_text-field-label-text-size);--md-outlined-field-label-text-weight: var(--_text-field-label-text-weight);--md-outlined-field-leading-content-color: var(--_text-field-leading-icon-color);--md-outlined-field-outline-color: var(--_text-field-outline-color);--md-outlined-field-outline-width: var(--_text-field-outline-width);--md-outlined-field-supporting-text-color: var(--_text-field-supporting-text-color);--md-outlined-field-supporting-text-font: var(--_text-field-supporting-text-font);--md-outlined-field-supporting-text-line-height: var(--_text-field-supporting-text-line-height);--md-outlined-field-supporting-text-size: var(--_text-field-supporting-text-size);--md-outlined-field-supporting-text-weight: var(--_text-field-supporting-text-weight);--md-outlined-field-trailing-content-color: var(--_text-field-trailing-icon-color)}[has-start] .icon.leading{font-size:var(--_text-field-leading-icon-size);height:var(--_text-field-leading-icon-size);width:var(--_text-field-leading-icon-size)}.icon.trailing{font-size:var(--_text-field-trailing-icon-size);height:var(--_text-field-trailing-icon-size);width:var(--_text-field-trailing-icon-size)}
|
|
103
|
-
`;Lt.styleSheet;var Rt=R`:host{color:unset;min-width:210px;display:flex}.field{cursor:default;outline:none}.select{position:relative;flex-direction:column}.icon.trailing svg,.icon ::slotted(*){fill:currentColor}.icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}.icon slot{display:flex;height:100%;width:100%;align-items:center;justify-content:center}.icon.trailing :is(.up,.down){opacity:0;transition:opacity 75ms linear 75ms}.select:not(.open) .down,.select.open .up{opacity:1}.field,.select,md-menu{min-width:inherit;width:inherit;max-width:inherit;display:flex}md-menu{min-width:var(--__menu-min-width);max-width:var(--__menu-max-width, inherit)}.menu-wrapper{width:0px;height:0px;max-width:inherit}md-menu ::slotted(:not[disabled]){cursor:pointer}.field,.select{width:100%}:host{display:inline-flex}:host([disabled]){pointer-events:none}
|
|
104
|
-
`;Rt.styleSheet;var zt=class extends It{};zt.styles=[Rt,Lt],zt=U([ce(`md-outlined-select`)],zt);var Bt=R`:host{display:flex;gap:16px;--md-ripple-hover-color: var(--md-menu-item-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-hover-opacity: var(--md-menu-item-hover-state-layer-opacity, 0.08);--md-ripple-pressed-color: var(--md-menu-item-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--md-ripple-pressed-opacity: var(--md-menu-item-pressed-state-layer-opacity, 0.12)}:host([disabled]){opacity:var(--md-menu-item-disabled-opacity, 0.3);pointer-events:none}md-focus-ring{z-index:1;--md-focus-ring-shape: 8px}a,button,li{background:none;border:none;padding:0;margin:0;text-align:unset;text-decoration:none}.list-item{border-radius:inherit;display:flex;flex:1;gap:inherit;max-width:inherit;min-width:inherit;outline:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.list-item:not(.disabled){cursor:pointer}[slot=container]{pointer-events:none}md-ripple{border-radius:inherit}md-item{border-radius:inherit;flex:1;color:var(--md-menu-item-label-text-color, var(--md-sys-color-on-surface, #1d1b20));font-family:var(--md-menu-item-label-text-font, var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-label-text-size, var(--md-sys-typescale-body-large-size, 1rem));line-height:var(--md-menu-item-label-text-line-height, var(--md-sys-typescale-body-large-line-height, 1.5rem));font-weight:var(--md-menu-item-label-text-weight, var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400)));min-height:var(--md-menu-item-one-line-container-height, 56px);padding-top:var(--md-menu-item-top-space, 12px);padding-bottom:var(--md-menu-item-bottom-space, 12px);padding-inline-start:var(--md-menu-item-leading-space, 16px);padding-inline-end:var(--md-menu-item-trailing-space, 16px);gap:inherit}md-item[multiline]{min-height:var(--md-menu-item-two-line-container-height, 72px)}[slot=supporting-text]{color:var(--md-menu-item-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-supporting-text-font, var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-supporting-text-size, var(--md-sys-typescale-body-medium-size, 0.875rem));line-height:var(--md-menu-item-supporting-text-line-height, var(--md-sys-typescale-body-medium-line-height, 1.25rem));font-weight:var(--md-menu-item-supporting-text-weight, var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400)))}[slot=trailing-supporting-text]{color:var(--md-menu-item-trailing-supporting-text-color, var(--md-sys-color-on-surface-variant, #49454f));font-family:var(--md-menu-item-trailing-supporting-text-font, var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto)));font-size:var(--md-menu-item-trailing-supporting-text-size, var(--md-sys-typescale-label-small-size, 0.6875rem));line-height:var(--md-menu-item-trailing-supporting-text-line-height, var(--md-sys-typescale-label-small-line-height, 1rem));font-weight:var(--md-menu-item-trailing-supporting-text-weight, var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500)))}:is([slot=start],[slot=end])::slotted(*){fill:currentColor}[slot=start]{color:var(--md-menu-item-leading-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}[slot=end]{color:var(--md-menu-item-trailing-icon-color, var(--md-sys-color-on-surface-variant, #49454f))}.list-item{background-color:var(--md-menu-item-container-color, transparent)}.list-item.selected{background-color:var(--md-menu-item-selected-container-color, var(--md-sys-color-secondary-container, #e8def8))}.selected:not(.disabled) ::slotted(*){color:var(--md-menu-item-selected-label-text-color, var(--md-sys-color-on-secondary-container, #1d192b))}@media(forced-colors: active){:host([disabled]),:host([disabled]) slot{color:GrayText;opacity:1}.list-item{position:relative}.list-item.selected::before{content:"";position:absolute;inset:0;box-sizing:border-box;border-radius:inherit;pointer-events:none;border:3px double CanvasText}}
|
|
105
|
-
`;Bt.styleSheet;var Vt=class extends L{constructor(){super(...arguments),this.multiline=!1}render(){return V`
|
|
106
|
-
<slot name="container"></slot>
|
|
107
|
-
<slot class="non-text" name="start"></slot>
|
|
108
|
-
<div class="text">
|
|
109
|
-
<slot name="overline" @slotchange=${this.handleTextSlotChange}></slot>
|
|
110
|
-
<slot
|
|
111
|
-
class="default-slot"
|
|
112
|
-
@slotchange=${this.handleTextSlotChange}></slot>
|
|
113
|
-
<slot name="headline" @slotchange=${this.handleTextSlotChange}></slot>
|
|
114
|
-
<slot
|
|
115
|
-
name="supporting-text"
|
|
116
|
-
@slotchange=${this.handleTextSlotChange}></slot>
|
|
117
|
-
</div>
|
|
118
|
-
<slot class="non-text" name="trailing-supporting-text"></slot>
|
|
119
|
-
<slot class="non-text" name="end"></slot>
|
|
120
|
-
`}handleTextSlotChange(){let e=!1,t=0;for(let n of this.textSlots)if(Ht(n)&&(t+=1),t>1){e=!0;break}this.multiline=e}};U([W({type:Boolean,reflect:!0})],Vt.prototype,`multiline`,void 0),U([Ne(`.text slot`)],Vt.prototype,`textSlots`,void 0);function Ht(e){for(let t of e.assignedNodes({flatten:!0})){let e=t.nodeType===Node.ELEMENT_NODE,n=t.nodeType===Node.TEXT_NODE&&t.textContent?.match(/\S/);if(e||n)return!0}return!1}var Ut=R`:host{color:var(--md-sys-color-on-surface, #1d1b20);font-family:var(--md-sys-typescale-body-large-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-large-size, 1rem);font-weight:var(--md-sys-typescale-body-large-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-large-line-height, 1.5rem);align-items:center;box-sizing:border-box;display:flex;gap:16px;min-height:56px;overflow:hidden;padding:12px 16px;position:relative;text-overflow:ellipsis}:host([multiline]){min-height:72px}[name=overline]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-body-medium-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-body-medium-size, 0.875rem);font-weight:var(--md-sys-typescale-body-medium-weight, var(--md-ref-typeface-weight-regular, 400));line-height:var(--md-sys-typescale-body-medium-line-height, 1.25rem)}[name=trailing-supporting-text]{color:var(--md-sys-color-on-surface-variant, #49454f);font-family:var(--md-sys-typescale-label-small-font, var(--md-ref-typeface-plain, Roboto));font-size:var(--md-sys-typescale-label-small-size, 0.6875rem);font-weight:var(--md-sys-typescale-label-small-weight, var(--md-ref-typeface-weight-medium, 500));line-height:var(--md-sys-typescale-label-small-line-height, 1rem)}[name=container]::slotted(*){inset:0;position:absolute}.default-slot{display:inline}.default-slot,.text ::slotted(*){overflow:hidden;text-overflow:ellipsis}.text{display:flex;flex:1;flex-direction:column;overflow:hidden}
|
|
121
|
-
`;Ut.styleSheet;var Wt=class extends Vt{};Wt.styles=[Ut],Wt=U([ce(`md-item`)],Wt);var Gt=class{constructor(e,t){this.host=e,this.internalTypeaheadText=null,this.onClick=()=>{this.host.keepOpen||this.host.dispatchEvent(gt(this.host,{kind:vt.CLICK_SELECTION}))},this.onKeydown=e=>{if(this.host.href&&e.code===`Enter`){let e=this.getInteractiveElement();e instanceof HTMLAnchorElement&&e.click()}if(e.defaultPrevented)return;let t=e.code;this.host.keepOpen&&t!==`Escape`||bt(t)&&(e.preventDefault(),this.host.dispatchEvent(gt(this.host,{kind:vt.KEYDOWN,key:t})))},this.getHeadlineElements=t.getHeadlineElements,this.getSupportingTextElements=t.getSupportingTextElements,this.getDefaultElements=t.getDefaultElements,this.getInteractiveElement=t.getInteractiveElement,this.host.addController(this)}get typeaheadText(){if(this.internalTypeaheadText!==null)return this.internalTypeaheadText;let e=this.getHeadlineElements(),t=[];return e.forEach(e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())}),t.length===0&&this.getDefaultElements().forEach(e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())}),t.length===0&&this.getSupportingTextElements().forEach(e=>{e.textContent&&e.textContent.trim()&&t.push(e.textContent.trim())}),t.join(` `)}get tagName(){switch(this.host.type){case`link`:return`a`;case`button`:return`button`;default:case`menuitem`:case`option`:return`li`}}get role(){return this.host.type===`option`?`option`:`menuitem`}hostConnected(){this.host.toggleAttribute(`md-menu-item`,!0)}hostUpdate(){this.host.href&&(this.host.type=`link`)}setTypeaheadText(e){this.internalTypeaheadText=e}};function Kt(){return new Event(`request-selection`,{bubbles:!0,composed:!0})}function qt(){return new Event(`request-deselection`,{bubbles:!0,composed:!0})}var Jt=class{get role(){return this.menuItemController.role}get typeaheadText(){return this.menuItemController.typeaheadText}setTypeaheadText(e){this.menuItemController.setTypeaheadText(e)}get displayText(){return this.internalDisplayText===null?this.menuItemController.typeaheadText:this.internalDisplayText}setDisplayText(e){this.internalDisplayText=e}constructor(e,t){this.host=e,this.internalDisplayText=null,this.firstUpdate=!0,this.onClick=()=>{this.menuItemController.onClick()},this.onKeydown=e=>{this.menuItemController.onKeydown(e)},this.lastSelected=this.host.selected,this.menuItemController=new Gt(e,t),e.addController(this)}hostUpdate(){this.lastSelected!==this.host.selected&&(this.host.ariaSelected=this.host.selected?`true`:`false`)}hostUpdated(){this.lastSelected!==this.host.selected&&!this.firstUpdate&&(this.host.selected?this.host.dispatchEvent(Kt()):this.host.dispatchEvent(qt())),this.lastSelected=this.host.selected,this.firstUpdate=!1}},Yt=pe(L),$=class extends Yt{constructor(){super(...arguments),this.disabled=!1,this.isMenuItem=!0,this.selected=!1,this.value=``,this.type=`option`,this.selectOptionController=new Jt(this,{getHeadlineElements:()=>this.headlineElements,getSupportingTextElements:()=>this.supportingTextElements,getDefaultElements:()=>this.defaultElements,getInteractiveElement:()=>this.listItemRoot})}get typeaheadText(){return this.selectOptionController.typeaheadText}set typeaheadText(e){this.selectOptionController.setTypeaheadText(e)}get displayText(){return this.selectOptionController.displayText}set displayText(e){this.selectOptionController.setDisplayText(e)}render(){return this.renderListItem(V`
|
|
122
|
-
<md-item>
|
|
123
|
-
<div slot="container">
|
|
124
|
-
${this.renderRipple()} ${this.renderFocusRing()}
|
|
125
|
-
</div>
|
|
126
|
-
<slot name="start" slot="start"></slot>
|
|
127
|
-
<slot name="end" slot="end"></slot>
|
|
128
|
-
${this.renderBody()}
|
|
129
|
-
</md-item>
|
|
130
|
-
`)}renderListItem(e){return V`
|
|
131
|
-
<li
|
|
132
|
-
id="item"
|
|
133
|
-
tabindex=${this.disabled?-1:0}
|
|
134
|
-
role=${this.selectOptionController.role}
|
|
135
|
-
aria-label=${this.ariaLabel||B}
|
|
136
|
-
aria-selected=${this.ariaSelected||B}
|
|
137
|
-
aria-checked=${this.ariaChecked||B}
|
|
138
|
-
aria-expanded=${this.ariaExpanded||B}
|
|
139
|
-
aria-haspopup=${this.ariaHasPopup||B}
|
|
140
|
-
class="list-item ${oe(this.getRenderClasses())}"
|
|
141
|
-
@click=${this.selectOptionController.onClick}
|
|
142
|
-
@keydown=${this.selectOptionController.onKeydown}
|
|
143
|
-
>${e}</li
|
|
144
|
-
>
|
|
145
|
-
`}renderRipple(){return V` <md-ripple
|
|
146
|
-
part="ripple"
|
|
147
|
-
for="item"
|
|
148
|
-
?disabled=${this.disabled}></md-ripple>`}renderFocusRing(){return V` <md-focus-ring
|
|
149
|
-
part="focus-ring"
|
|
150
|
-
for="item"
|
|
151
|
-
inward></md-focus-ring>`}getRenderClasses(){return{disabled:this.disabled,selected:this.selected}}renderBody(){return V`
|
|
152
|
-
<slot></slot>
|
|
153
|
-
<slot name="overline" slot="overline"></slot>
|
|
154
|
-
<slot name="headline" slot="headline"></slot>
|
|
155
|
-
<slot name="supporting-text" slot="supporting-text"></slot>
|
|
156
|
-
<slot
|
|
157
|
-
name="trailing-supporting-text"
|
|
158
|
-
slot="trailing-supporting-text"></slot>
|
|
159
|
-
`}focus(){this.listItemRoot?.focus()}};$.shadowRootOptions={...L.shadowRootOptions,delegatesFocus:!0},U([W({type:Boolean,reflect:!0})],$.prototype,`disabled`,void 0),U([W({type:Boolean,attribute:`md-menu-item`,reflect:!0})],$.prototype,`isMenuItem`,void 0),U([W({type:Boolean})],$.prototype,`selected`,void 0),U([W()],$.prototype,`value`,void 0),U([H(`.list-item`)],$.prototype,`listItemRoot`,void 0),U([xe({slot:`headline`})],$.prototype,`headlineElements`,void 0),U([xe({slot:`supporting-text`})],$.prototype,`supportingTextElements`,void 0),U([Pe({slot:``})],$.prototype,`defaultElements`,void 0),U([W({attribute:`typeahead-text`})],$.prototype,`typeaheadText`,null),U([W({attribute:`display-text`})],$.prototype,`displayText`,null);var Xt=class extends ${};Xt.styles=[Bt],Xt=U([ce(`md-select-option`)],Xt);var Zt=g(`<p class="error svelte-6obkkj" role="alert"> </p>`),Qt=g(`<div><label class="svelte-6obkkj"><span class="box svelte-6obkkj"><input type="checkbox" class="svelte-6obkkj"/> <svg viewBox="0 0 18 18" aria-hidden="true" class="svelte-6obkkj"><path d="M7 14 3 10l1.41-1.41L7 11.17l6.59-6.58L15 6z"></path></svg> <md-ripple></md-ripple></span> <span> </span></label> <p class="help svelte-6obkkj"> </p> <!></div>`,2);function $t(e,t){let n=o();O(t,!0);var r=Qt(),i=s(r),c=s(i),d=s(c);P(d);var f=b(d,4);A(()=>p(f,`for`,`${n}-row`)),p(f,`aria-hidden`,`true`),m(f,1,`svelte-6obkkj`),N(c);var h=b(c,2),g=v(h,!0);N(i);var _=b(i,2),y=v(_,!0),x=b(_,2),S=e=>{var r=Zt(),i=v(r,!0);A(()=>{C(r,`id`,`${n}-error`),l(i,t.error)}),F(e,r)};u(x,e=>{t.error!==``&&e(S)}),N(r),A(()=>{C(i,`id`,`${n}-row`),C(d,`data-setting`,t.path),ne(d,t.checked),C(d,`aria-describedby`,t.error===``?`${n}-help`:`${n}-error ${n}-help`),C(d,`aria-invalid`,t.error!==``||void 0),l(g,t.label),C(_,`id`,`${n}-help`),l(y,t.help)}),a(`change`,d,e=>t.onChange(e.currentTarget.checked)),F(e,r),j()}_([`change`]);var en=g(`<dl class="svelte-rc157l"><dt class="svelte-rc157l"> </dt> <dd class="value svelte-rc157l"> </dd> <dd class="note svelte-rc157l">Set by <code class="svelte-rc157l"> </code>. Change it where the bridge is started.</dd></dl>`),tn=g(`<md-select-option><div slot="headline"> </div></md-select-option>`,2),nn=g(`<md-outlined-select></md-outlined-select>`,2),rn=g(`<md-outlined-text-field></md-outlined-text-field>`,2),an=g(`<div><!></div>`);function on(t,r){O(r,!0);let i=w(()=>r.pendingValue===void 0?r.help:`Restart pending, in use: ${r.pendingValue}. ${r.help}`);var o=n(),c=y(o),d=e=>{var t=en(),n=s(t),i=v(n,!0),a=b(n,2),o=v(a,!0),c=b(a,2),u=b(s(c)),d=v(u,!0);S(),N(c),N(t),A(()=>{l(i,r.setting.label),l(o,r.fixed.value),l(d,r.fixed.by)}),F(e,t)},f=t=>{var n=an();let o;var c=s(n),d=t=>{{let n=w(()=>r.value===`true`);$t(t,{get path(){return r.setting.path},get label(){return r.setting.label},get checked(){return e(n)},get help(){return e(i)},get error(){return r.error},onChange:e=>r.onInput(String(e))})}},f=t=>{var n=nn();A(()=>p(n,`data-setting`,r.setting.path)),A(()=>p(n,`label`,r.setting.label)),A(()=>p(n,`supporting-text`,e(i))),A(()=>p(n,`value`,r.value)),A(()=>p(n,`error`,r.error!==``||void 0)),A(()=>p(n,`error-text`,r.error)),m(n,1,`svelte-rc157l`),E(n,21,()=>Le(r.setting.control.options,r.savedValue),e=>e.value,(t,n)=>{var i=tn();A(()=>p(i,`value`,e(n).value)),A(()=>p(i,`selected`,e(n).value===r.value||void 0));var a=s(i),o=v(a,!0);N(i),A(()=>l(o,e(n).label)),F(t,i)}),N(n),a(`change`,n,e=>r.onInput(e.target.value)),F(t,n)},h=t=>{var n=rn();A(()=>p(n,`data-setting`,r.setting.path)),A(()=>p(n,`label`,r.setting.label)),A(()=>p(n,`inputmode`,r.setting.control.inputmode)),A(()=>p(n,`suffix-text`,r.setting.control.suffix)),p(n,`autocomplete`,`off`),A(()=>p(n,`supporting-text`,e(i))),A(()=>p(n,`value`,r.value)),A(()=>p(n,`error`,r.error!==``||void 0)),A(()=>p(n,`error-text`,r.error)),m(n,1,`svelte-rc157l`),a(`keydown`,n,e=>{e.key===`Enter`&&(e.preventDefault(),r.onSubmit())}),a(`input`,n,e=>r.onInput(e.target.value)),F(t,n)};u(c,e=>{r.setting.control.kind===`checkbox`?e(d):r.setting.control.kind===`select`?e(f,1):e(h,-1)}),N(n),A(()=>o=m(n,1,`svelte-rc157l`,null,o,{pending:r.pendingValue!==void 0})),F(t,n)};u(c,e=>{r.fixed===void 0?e(f,-1):e(d)}),F(t,o),j()}_([`change`,`keydown`,`input`]);var sn=g(`<div class="cell svelte-1yckkzn"></div>`),cn=g(`<div class="actions svelte-1yckkzn"><md-filled-button>Save</md-filled-button> <md-text-button>Revert</md-text-button></div>`,2),ln=g(`<p role="alert" class="failure svelte-1yckkzn"> </p>`),un=g(`<form novalidate="" class="svelte-1yckkzn"><div class="fields svelte-1yckkzn"></div> <!> <p role="status" class="note svelte-1yckkzn"> </p> <!></form>`);function dn(t,n){O(n,!0);let r=M(f({})),i=M(f({})),o=M(``),d=M(!1),m=M(null),h,g=w(()=>n.settings.map(e=>[e].flat())),_=w(()=>e(g).flat().filter(e=>n.overrides[e.path]===void 0)),y=w(()=>Ge(e(_),e(r),n.saved)),S=w(()=>e(y).length===0||e(d)),C=w(()=>e(_).some(e=>Ze(e.path,n.active,n.saved,n.overrides))),T=w(()=>e(m)===null?``:e(m).waited?e(C)?`Saved. Restart the bridge to apply.`:``:`Saved.`);function k(){D(r,{},!0),D(i,{},!0),D(o,``),D(m,null)}async function ee(e){await te(),h.querySelector(`[data-setting="${e}"]`)?.focus()}async function ne(){if(e(d)||e(y).length===0)return;let t=Ke(e(_),e(r),n.saved);if(D(o,``),D(m,null),!t.ok)D(i,t.errors,!0),await ee(e(_).find(e=>t.errors[e.path]!==void 0).path);else{D(i,{},!0),D(d,!0);try{await n.onSave(t.patch),D(r,{},!0),D(m,{waited:e(C)},!0)}catch(t){let n=et(t,e(_));n.field===null?D(o,n.message,!0):(D(i,{[n.field]:n.message},!0),await ee(n.field))}finally{D(d,!1)}}}var P=un(),I=s(P);E(I,21,()=>e(g),e=>e[0].path,(t,a)=>{var o=sn();E(o,21,()=>e(a),e=>e.path,(t,a)=>{let o=w(()=>n.overrides[e(a).path]),s=w(()=>G(n.active,e(a).path));{let c=w(()=>e(r)[e(a).path]??e(a).format(G(n.saved,e(a).path))),l=w(()=>e(a).format(G(n.saved,e(a).path))),u=w(()=>e(a).help(e(s),n.settingContext)),d=w(()=>Ze(e(a).path,n.active,n.saved,n.overrides)?e(a).describe(e(s),n.settingContext):void 0),f=w(()=>e(i)[e(a).path]??``),p=w(()=>e(o)===void 0?void 0:{by:e(o),value:e(a).describe(e(s),n.settingContext)});on(t,{get setting(){return e(a)},get value(){return e(c)},get savedValue(){return e(l)},get help(){return e(u)},get pendingValue(){return e(d)},get error(){return e(f)},get fixed(){return e(p)},onInput:t=>{e(r)[e(a).path]=t,delete e(i)[e(a).path],D(m,null)},onSubmit:()=>void ne()})}}),N(o),F(t,o)}),N(I);var re=b(I,2),ie=t=>{var r=cn(),i=s(r);p(i,`type`,`submit`),A(()=>p(i,`aria-label`,`Save ${n.name??``} settings`)),A(()=>p(i,`soft-disabled`,e(S)?!0:void 0));var o=b(i,2);p(o,`type`,`button`),A(()=>p(o,`aria-label`,`Revert ${n.name??``} settings`)),A(()=>p(o,`soft-disabled`,e(S)?!0:void 0)),N(r),a(`click`,o,k),F(t,r)};u(re,t=>{e(_).length>0&&t(ie)});var ae=b(re,2),L=v(ae,!0),R=b(ae,2),z=t=>{var n=ln(),r=v(n,!0);A(()=>l(r,e(o))),F(t,n)};u(R,t=>{e(o)!==``&&t(z)}),N(P),x(P,e=>h=e,()=>h),A(()=>l(L,e(T))),c(`submit`,P,e=>{e.preventDefault(),ne()}),F(t,P),j()}_([`click`]);var fn=g(`<label class="option svelte-15x0123"><input type="radio" name="color-theme" class="svelte-15x0123"/> <span class="mark svelte-15x0123" aria-hidden="true"></span> <span class="swatch svelte-15x0123" aria-hidden="true"><span class="bar svelte-15x0123"></span> <span class="aa svelte-15x0123">Aa</span> <span class="chip svelte-15x0123"></span></span> <span class="text svelte-15x0123"><span class="label svelte-15x0123"> </span> <span class="description svelte-15x0123"> </span></span> <span class="selected svelte-15x0123" aria-hidden="true"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"></path></svg> Selected</span></label>`),pn=g(`<fieldset class="svelte-15x0123"><legend class="svelte-15x0123">Color theme</legend> <p class="hint svelte-15x0123">Stored in this browser only. Applied immediately.</p> <div class="options svelte-15x0123"></div></fieldset>`);function mn(t,n){O(n,!0);var i=pn(),o=b(s(i),4);E(o,21,()=>ye,e=>e.value,(t,i)=>{var o=fn(),c=s(o);P(c);var u=b(c,4),d=b(u,2),f=s(d),p=v(f,!0),m=b(f,2),h=v(m,!0);N(d),S(2),N(o),A(()=>{r(c,e(i).value),ne(c,n.value===e(i).value),C(c,`aria-describedby`,`theme-${e(i).value??``}-description`),C(u,`data-theme`,e(i).value),l(p,e(i).label),C(m,`id`,`theme-${e(i).value??``}-description`),l(h,e(i).description)}),a(`change`,c,()=>n.onChange(e(i).value)),F(t,o)}),N(o),N(i),F(t,i),j()}_([`change`]);var hn=g(`<!> <section class="part" aria-labelledby="capture-heading"><h2 id="capture-heading">Speech capture</h2> <!></section> <section class="part" aria-labelledby="playwright-heading"><h2 id="playwright-heading">Playwright and MCP</h2> <!></section> <section class="part" aria-labelledby="log-heading"><h2 id="log-heading">Bridge log</h2> <!></section>`,1),gn=g(`<p class="scope" role="alert">The bridge is not reachable, so its settings can't be read. <button type="button">Try again</button></p>`),_n=g(`<p class="scope">Reading the bridge settings…</p>`),vn=g(`<p class="scope intro">Bridge settings apply when the bridge is restarted. Appearance applies at once and is kept in
|
|
160
|
-
this browser.</p> <!> <section class="part" aria-labelledby="appearance-heading"><h2 id="appearance-heading">Appearance</h2> <!></section>`,1);function yn(t,n){O(n,!0);let{config:r,status:o,theme:c}=ge();k(()=>r.seed(n.data.config));let l=w(()=>({runningPlaywright:(o.status??n.data.status)?.playwright.version??null,playwrightOff:r.saved?.playwright.enabled===!1})),f=w(()=>r.active===null||r.saved===null?[]:$e(r.active,r.saved,r.overrides,e(l)));async function p(){await Promise.all([r.refresh(),o.retry()])}d(()=>{n.data.config===null&&r.refresh()}),i(`1i19ct2`,e=>{T(()=>{ee.title=`Settings · Speech Capture`})}),be(t,{heading:`Settings`,children:(t,n)=>{var i=vn(),o=b(y(i),2),d=t=>{var n=hn(),i=y(n);at(i,{get changes(){return e(f)},get reachable(){return r.reachable},onCheck:p});var a=b(i,2),o=b(s(a),2);{let t=w(()=>[Fe,Re,ze]);dn(o,{name:`speech capture`,get settings(){return e(t)},get active(){return r.active},get saved(){return r.saved},get overrides(){return r.overrides},get settingContext(){return e(l)},onSave:e=>r.save(e)})}N(a);var c=b(a,2),u=b(s(c),2);{let t=w(()=>[[He,We],qe]);dn(u,{name:`Playwright and MCP`,get settings(){return e(t)},get active(){return r.active},get saved(){return r.saved},get overrides(){return r.overrides},get settingContext(){return e(l)},onSave:e=>r.save(e)})}N(c);var d=b(c,2),m=b(s(d),2);{let t=w(()=>[Ye]);dn(m,{name:`bridge log`,get settings(){return e(t)},get active(){return r.active},get saved(){return r.saved},get overrides(){return r.overrides},get settingContext(){return e(l)},onSave:e=>r.save(e)})}N(d),F(t,n)},m=e=>{var t=gn(),n=b(s(t));N(t),a(`click`,n,()=>void r.refresh()),F(e,t)},h=e=>{var t=_n();F(e,t)};u(o,e=>{r.active!==null&&r.saved!==null?e(d):r.reachable?e(h,-1):e(m,1)});var g=b(o,2);mn(b(s(g),2),{get value(){return c.current},onChange:e=>c.set(e)}),N(g),F(t,i)},$$slots:{default:!0}}),j()}_([`click`]);export{yn as component};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{$ as e,D as t,G as n,J as r,L as i,M as a,N as o,S as s,U as c,V as l,W as u,X as d,Y as f,Z as p,_t as m,b as h,dt as g,it as _,lt as v,mt as y,n as b,ot as x,pt as S,q as C,s as w,ut as T,vt as E,z as D}from"../chunks/0FroJ-XN.js";import"../chunks/B_ZElYu_.js";import"../chunks/DHsTyp2W.js";import"../chunks/BS7n1gMj.js";import"../chunks/BnU72Mow.js";import{t as O}from"../chunks/CVpgcnu3.js";import{b as k,i as A,o as j,t as M}from"../chunks/tKonUL5Y.js";var N=`/playwright-mcp`,P=l(`<div class="command svelte-1c2bq9d"><pre class="svelte-1c2bq9d"><code class="svelte-1c2bq9d"> </code></pre> <md-text-button><md-icon>content_copy</md-icon> Copy</md-text-button></div> <p role="status" class="svelte-1c2bq9d"> </p>`,3);function F(t,a){y(a,!0);let o=T(null),c=g(()=>e(o)===null||e(o).text!==a.text?``:e(o).ok?`Copied.`:`Copying failed: select the text and copy it.`);async function l(){let e=a.text;v(o,null),v(o,{text:e,ok:await a.onCopy(e)},!0)}var u=P(),h=f(u),_=r(h),b=r(_),C=d(b,!0);E(_);var w=p(_,2);s(w,`type`,`button`),x(()=>s(w,`aria-label`,`Copy ${a.label??``}`));var O=r(w);s(O,`slot`,`icon`),s(O,`aria-hidden`,`true`),m(),E(w),E(h);var k=p(h,2),A=d(k,!0);x(()=>{i(C,a.text),i(A,e(c))}),n(`click`,w,()=>void l()),D(t,u),S()}u([`click`]);var I=`127.0.0.1`,L=`npm install -g text-to-socket-engine
|
|
2
|
-
text-to-socket-engine-register`;function R({host:e,port:t}){let n=[`0.0.0.0`,`::`,`localhost`].includes(e)?I:e,r=`Text To Socket ${n}:${t}`;if(n===I&&t===4449)return{name:r,addVoice:null};let i=`ssc${t}`;return{name:r,addVoice:`text-to-socket-engine-add-voice ${i} "${r}" ${n} ${t} voice=${i}`}}var z=e=>[`localhost`,`::1`,`[::1]`].includes(e)||/^127(\.\d+){3}$/.test(e);function B(e,t){let{hostname:n,origin:r}=e;return(/^\[[0-9a-fA-F:.]+\]$/.test(n)||n!==`*`&&k.test(n))&&!z(n)&&n!==`0.0.0.0`?{url:r,placeholder:!1}:{url:`http://<vm-ip>:${t}`,placeholder:!0}}function V(e){return z(e)}function H(e){return`New-NetFirewallRule -DisplayName "screenreader-speech-capture" \`
|
|
3
|
-
-Direction Inbound -Protocol TCP -LocalPort ${e} -Action Allow -Profile Any`}function U(e){return[`npx @screenreader-speech-capture/client config set url ${e}`,`npx @screenreader-speech-capture/client status`].join(`
|
|
4
|
-
`)}function W(e){return`npm i -D @screenreader-speech-capture/client @playwright/test@${e} @types/node`}function G(e){let t={url:`${e}${N}`};return JSON.stringify({mcpServers:{"screenreader-vm":t}},null,2)}var K=l(`<p class="warning svelte-2oo2iv">The bridge only listens on its own machine, so other machines can't connect. Start it without <code class="svelte-2oo2iv">--http-host</code>, or with an address they reach.</p>`),q=l(`<p class="svelte-2oo2iv">Windows can block the port without asking. On the bridge's machine, in an <strong>administrator</strong> PowerShell (<!>):</p> <!>`,1),J=l(`<p class="svelte-2oo2iv">This machine already reaches the bridge, so the firewall lets it through.</p>`),Y=l(`<p class="svelte-2oo2iv">Replace <code class="svelte-2oo2iv"><vm-ip></code> with the VM's address: one from the <code class="svelte-2oo2iv">HTTP API</code> row of the bridge's start output, or from <code class="svelte-2oo2iv">ipconfig</code> on the VM.</p>`),X=l(`<p class="svelte-2oo2iv">The Playwright server is off. <a class="svelte-2oo2iv">Turn it on in Settings.</a></p>`),Z=l(`<p class="svelte-2oo2iv">The test project needs exactly the bridge's Playwright version:</p> <!>`,1),Q=l(`<p class="svelte-2oo2iv">Playwright MCP is off. <a class="svelte-2oo2iv">Turn it on in Settings.</a></p>`),$=l(`<p class="svelte-2oo2iv">Point the agent's MCP client at the bridge:</p> <!>`,1),ee=l(`<section class="part" aria-labelledby="machine-heading"><h2 id="machine-heading">Test machine</h2> <!> <!> <p class="svelte-2oo2iv">On the test machine (Node 20 or newer), store the bridge's address and check it:</p> <!> <!> <h3 class="svelte-2oo2iv">Playwright tests</h3> <!> <p class="svelte-2oo2iv"><!></p> <h3 class="svelte-2oo2iv">AI agents</h3> <!> <p class="svelte-2oo2iv"><!></p></section>`);function te(t,n){y(n,!0);let i=e=>j(n.version,e);var o=ee(),s=p(r(o),2),l=e=>{var t=K();D(e,t)};a(s,e=>{n.loopbackOnly&&e(l)});var u=p(s,2),d=t=>{var a=q(),o=f(a),s=p(r(o),3);{let t=g(()=>i(`usage/vm-setup.md#firewall`));O(s,{get href(){return e(t)},children:(e,t)=>{m();var n=c(`firewall`);D(e,n)},$$slots:{default:!0}})}m(),E(o);var l=p(o,2);{let t=g(()=>H(n.httpPort));F(l,{label:`the firewall command`,get text(){return e(t)},get onCopy(){return n.onCopy}})}D(t,a)},_=e=>{var t=J();D(e,t)};a(u,e=>{n.local?e(d):e(_,-1)});var v=p(u,4);{let t=g(()=>U(n.address.url));F(v,{label:`the client commands`,get text(){return e(t)},get onCopy(){return n.onCopy}})}var b=p(v,2),C=e=>{var t=Y();D(e,t)};a(b,e=>{n.address.placeholder&&e(C)});var T=p(b,4),k=e=>{var t=X(),n=p(r(t));E(t),x(e=>h(n,`href`,e),[()=>w(`/settings`)]),D(e,t)},A=t=>{var r=Z(),i=p(f(r),2);{let t=g(()=>W(n.playwright.version));F(i,{label:`the test packages command`,get text(){return e(t)},get onCopy(){return n.onCopy}})}D(t,r)};a(T,e=>{n.playwright?.state===`stopped`?e(k):n.playwright!==null&&e(A,1)});var M=p(T,2),N=r(M);{let t=g(()=>i(`usage/client.md`));O(N,{get href(){return e(t)},children:(e,t)=>{m();var n=c(`Set up the tests with the test client`);D(e,n)},$$slots:{default:!0}})}E(M);var P=p(M,4),I=e=>{var t=Q(),n=p(r(t));E(t),x(e=>h(n,`href`,e),[()=>w(`/settings`)]),D(e,t)},L=t=>{var r=$(),i=p(f(r),2);{let t=g(()=>G(n.address.url));F(i,{label:`the MCP configuration`,get text(){return e(t)},get onCopy(){return n.onCopy}})}D(t,r)};a(P,e=>{n.mcp?.state===`stopped`?e(I):e(L,-1)});var R=p(P,2),z=r(R);{let t=g(()=>i(`usage/agents.md`));O(z,{get href(){return e(t)},children:(e,t)=>{m();var n=c(`How agents use the bridge`);D(e,n)},$$slots:{default:!0}})}E(R),E(o),D(t,o),S()}var ne=l(`<p class="svelte-1tbxerf">The default voice doesn't send to where this bridge listens. Add a voice that does, in the
|
|
5
|
-
same prompt:</p> <!>`,1),re=l(`<section class="part" aria-labelledby="voice-heading"><h2 id="voice-heading">Socket voice</h2> <p class="svelte-1tbxerf">On the bridge's machine, in an <strong>administrator</strong> prompt:</p> <!> <!> <ul class="more svelte-1tbxerf"><li class="svelte-1tbxerf"><!></li> <li class="svelte-1tbxerf"><!></li></ul></section> <section class="part"><h2 tabindex="-1">Screen reader</h2> <p class="svelte-1tbxerf">Select the voice <strong> </strong>.</p> <h3 class="svelte-1tbxerf">NVDA</h3> <ol class="svelte-1tbxerf"><li class="svelte-1tbxerf">Open the NVDA menu (NVDA+N) → Preferences → Settings… → Speech.</li> <li class="svelte-1tbxerf">Under Synthesizer, choose Change… → Microsoft Speech API version 5 → OK.</li> <li class="svelte-1tbxerf"> </li></ol> <h3 class="svelte-1tbxerf">JAWS</h3> <ol class="svelte-1tbxerf"><li class="svelte-1tbxerf">Open JAWS → Options → Voices → Voice Adjustment….</li> <li class="svelte-1tbxerf">Create or select a voice profile and set its Synthesizer to SAPI 5 (the label can differ
|
|
6
|
-
between JAWS versions).</li> <li class="svelte-1tbxerf"> </li> <li class="svelte-1tbxerf">In Settings Center (Insert+F2), turn off <em>Detect Language Changes</em> (German: <em lang="de">Sprachwechsel erkennen</em>), or web pages are read by another voice.</li></ol> <ul class="more svelte-1tbxerf"><li class="svelte-1tbxerf"><!></li> <li class="svelte-1tbxerf"><!></li> <li class="svelte-1tbxerf"><!></li></ul></section>`,1);function ie(t,n){y(n,!0);let o=g(()=>R(n.tcp??{host:`127.0.0.1`,port:4449})),s=e=>j(n.version,e);var l=re(),u=f(l),_=p(r(u),4);F(_,{label:`the install commands`,get text(){return L},get onCopy(){return n.onCopy}});var v=p(_,2),b=t=>{var r=ne();F(p(f(r),2),{label:`the add-voice command`,get text(){return e(o).addVoice},get onCopy(){return n.onCopy}}),D(t,r)};a(v,t=>{e(o).addVoice!==null&&t(b)});var C=p(v,2),w=r(C),T=r(w);{let t=g(()=>s(`usage/troubleshooting.md#speech`));O(T,{get href(){return e(t)},children:(e,t)=>{m();var n=c(`The voice is not listed`);D(e,n)},$$slots:{default:!0}})}E(w);var k=p(w,2),M=r(k);{let t=g(()=>s(`usage/vm-setup.md#more-voices--other-ports`));O(M,{get href(){return e(t)},children:(e,t)=>{m();var n=c(`More voices, and removing them`);D(e,n)},$$slots:{default:!0}})}E(k),E(C),E(u);var N=p(u,2),P=r(N),I=p(P,2),z=p(r(I)),B=d(z,!0);m(),E(I);var V=p(I,4),H=p(r(V),4),U=d(H);E(V);var W=p(V,4),G=p(r(W),4),K=d(G);m(2),E(W);var q=p(W,2),J=r(q),Y=r(J);{let t=g(()=>s(`usage/vm-setup.md#a-german-voice`));O(Y,{get href(){return e(t)},children:(e,t)=>{m();var n=c(`JAWS in German or another language doesn't list the voice`);D(e,n)},$$slots:{default:!0}})}E(J);var X=p(J,2),Z=r(X);{let t=g(()=>s(`usage/vm-setup.md#prepare-the-vm`));O(Z,{get href(){return e(t)},children:(e,t)=>{m();var n=c(`Prepare the VM for CI`);D(e,n)},$$slots:{default:!0}})}E(X);var Q=p(X,2),$=r(Q);{let t=g(()=>s(`usage/vm-setup.md#screen-reader-licensing`));O($,{get href(){return e(t)},children:(e,t)=>{m();var n=c(`Screen reader licensing`);D(e,n)},$$slots:{default:!0}})}E(Q),E(q),E(N),x(()=>{h(N,`aria-labelledby`,A),h(P,`id`,A),i(B,e(o).name),i(U,`Under Voice, select ${e(o).name??``}.`),i(K,`Select ${e(o).name??``} as the Voice, apply it to all contexts and save the profile.`)}),D(t,l),S()}var ae=l(`<!> <!>`,1);function oe(n,r){y(r,!0);let{status:i,clipboard:a}=M(),s=g(()=>i.status??r.data.status),c=g(()=>r.data.http?.port??5151),l=e=>a.copy(e);o(()=>void i.retry());var u=ae();t(`149ah0g`,e=>{_(()=>{C.title=`Setup instructions · Speech Capture`})});var d=f(u);{let t=g(()=>e(s)?.tcp??null),n=g(()=>e(s)?.bridge.version??null);ie(d,{get tcp(){return e(t)},get version(){return e(n)},onCopy:l})}var m=p(d,2);{let t=g(()=>B(b.url,e(c))),n=g(()=>r.data.http!==null&&V(r.data.http.host)),i=g(()=>e(s)?.playwright??null),a=g(()=>e(s)?.mcp??null),o=g(()=>e(s)?.bridge.version??null);te(m,{get address(){return e(t)},get local(){return r.data.local},get loopbackOnly(){return e(n)},get httpPort(){return e(c)},get playwright(){return e(i)},get mcp(){return e(a)},get version(){return e(o)},onCopy:l})}D(n,u),S()}export{oe as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { G as t, I as T, K as __decorate, W as i } from "./composition.js";
|
|
2
|
-
import { n as Button, t as styles$2 } from "./text-button.js";
|
|
3
|
-
import { n as styles$3 } from "./redispatch-event.js";
|
|
4
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/outlined-button.js
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2021 Google LLC
|
|
8
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* An outlined button component.
|
|
12
|
-
*/
|
|
13
|
-
var OutlinedButton = class extends Button {
|
|
14
|
-
renderElevationOrOutline() {
|
|
15
|
-
return T`<div class="outline"></div>`;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/outlined-styles.cssresult.js
|
|
19
|
-
/**
|
|
20
|
-
* @license
|
|
21
|
-
* Copyright 2026 Google LLC
|
|
22
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
23
|
-
*/
|
|
24
|
-
var styles$1 = i`:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)}
|
|
25
|
-
`;
|
|
26
|
-
styles$1.styleSheet;
|
|
27
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/outlined-button.js
|
|
28
|
-
/**
|
|
29
|
-
* @license
|
|
30
|
-
* Copyright 2021 Google LLC
|
|
31
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
35
|
-
* document, or liking a comment.
|
|
36
|
-
*
|
|
37
|
-
* @description
|
|
38
|
-
* __Emphasis:__ Medium emphasis – For important actions that don’t distract
|
|
39
|
-
* from other onscreen elements.
|
|
40
|
-
*
|
|
41
|
-
* __Rationale:__ Use an outlined button for actions that need attention but
|
|
42
|
-
* aren’t the primary action, such as “See all” or “Add to cart.” This is also
|
|
43
|
-
* the button to use for giving someone the opportunity to change their mind or
|
|
44
|
-
* escape a flow.
|
|
45
|
-
*
|
|
46
|
-
* __Example usages:__
|
|
47
|
-
* - Reply
|
|
48
|
-
* - View all
|
|
49
|
-
* - Add to cart
|
|
50
|
-
* - Take out of trash
|
|
51
|
-
*
|
|
52
|
-
* @final
|
|
53
|
-
* @suppress {visibility}
|
|
54
|
-
*/
|
|
55
|
-
var MdOutlinedButton = class MdOutlinedButton extends OutlinedButton {};
|
|
56
|
-
MdOutlinedButton.styles = [styles$2, styles$1];
|
|
57
|
-
MdOutlinedButton = __decorate([t("md-outlined-button")], MdOutlinedButton);
|
|
58
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/filled-button.js
|
|
59
|
-
/**
|
|
60
|
-
* @license
|
|
61
|
-
* Copyright 2021 Google LLC
|
|
62
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
63
|
-
*/
|
|
64
|
-
/**
|
|
65
|
-
* A filled button component.
|
|
66
|
-
*/
|
|
67
|
-
var FilledButton = class extends Button {
|
|
68
|
-
renderElevationOrOutline() {
|
|
69
|
-
return T`<md-elevation part="elevation"></md-elevation>`;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/filled-styles.cssresult.js
|
|
73
|
-
/**
|
|
74
|
-
* @license
|
|
75
|
-
* Copyright 2026 Google LLC
|
|
76
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
77
|
-
*/
|
|
78
|
-
var styles = i`:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)}
|
|
79
|
-
`;
|
|
80
|
-
styles.styleSheet;
|
|
81
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/filled-button.js
|
|
82
|
-
/**
|
|
83
|
-
* @license
|
|
84
|
-
* Copyright 2021 Google LLC
|
|
85
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
86
|
-
*/
|
|
87
|
-
/**
|
|
88
|
-
* @summary Buttons help people take action, such as sending an email, sharing a
|
|
89
|
-
* document, or liking a comment.
|
|
90
|
-
*
|
|
91
|
-
* @description
|
|
92
|
-
* __Emphasis:__ High emphasis – For the primary, most important, or most common
|
|
93
|
-
* action on a screen
|
|
94
|
-
*
|
|
95
|
-
* __Rationale:__ The filled button’s contrasting surface color makes it the
|
|
96
|
-
* most prominent button after the FAB. It’s used for final or unblocking
|
|
97
|
-
* actions in a flow.
|
|
98
|
-
*
|
|
99
|
-
* __Example usages:__
|
|
100
|
-
* - Save
|
|
101
|
-
* - Confirm
|
|
102
|
-
* - Done
|
|
103
|
-
*
|
|
104
|
-
* @final
|
|
105
|
-
* @suppress {visibility}
|
|
106
|
-
*/
|
|
107
|
-
var MdFilledButton = class MdFilledButton extends FilledButton {};
|
|
108
|
-
MdFilledButton.styles = [
|
|
109
|
-
styles$2,
|
|
110
|
-
styles$3,
|
|
111
|
-
styles
|
|
112
|
-
];
|
|
113
|
-
MdFilledButton = __decorate([t("md-filled-button")], MdFilledButton);
|
|
114
|
-
export {};
|
|
115
|
-
|
|
116
|
-
//# sourceMappingURL=filled-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filled-button.js","names":["html","styles","css","sharedStyles","outlinedStyles","customElement","html","css","sharedStyles","sharedElevationStyles","filledStyles","customElement"],"sources":["../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/outlined-button.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/outlined-styles.cssresult.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/outlined-button.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/filled-button.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/filled-styles.cssresult.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/filled-button.js"],"sourcesContent":["/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { html } from 'lit';\nimport { Button } from './button.js';\n/**\n * An outlined button component.\n */\nexport class OutlinedButton extends Button {\n renderElevationOrOutline() {\n return html `<div class=\"outline\"></div>`;\n }\n}\n//# sourceMappingURL=outlined-button.js.map","/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./button/internal/outlined-styles.css.\nimport { css } from 'lit';\nexport const styles = css `:host{--_container-height: var(--md-outlined-button-container-height, 40px);--_disabled-label-text-color: var(--md-outlined-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-outlined-button-disabled-label-text-opacity, 0.38);--_disabled-outline-color: var(--md-outlined-button-disabled-outline-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-outline-opacity: var(--md-outlined-button-disabled-outline-opacity, 0.12);--_focus-label-text-color: var(--md-outlined-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-outlined-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-outlined-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-outlined-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-outlined-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-outlined-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-outlined-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-outlined-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-outlined-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_outline-color: var(--md-outlined-button-outline-color, var(--md-sys-color-outline, #79747e));--_outline-width: var(--md-outlined-button-outline-width, 1px);--_pressed-label-text-color: var(--md-outlined-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-outline-color: var(--md-outlined-button-pressed-outline-color, var(--md-sys-color-outline, #79747e));--_pressed-state-layer-color: var(--md-outlined-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-outlined-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-outlined-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-outlined-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-outlined-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-outlined-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-outlined-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-outlined-button-icon-size, 18px);--_pressed-icon-color: var(--md-outlined-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-outlined-button-container-shape-start-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-outlined-button-container-shape-start-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-outlined-button-container-shape-end-end, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-outlined-button-container-shape-end-start, var(--md-outlined-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-outlined-button-leading-space, 24px);--_trailing-space: var(--md-outlined-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-outlined-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-outlined-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-outlined-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-outlined-button-with-trailing-icon-trailing-space, 16px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}.outline{inset:0;border-style:solid;position:absolute;box-sizing:border-box;border-color:var(--_outline-color);border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end)}:host(:active) .outline{border-color:var(--_pressed-outline-color)}:host(:is([disabled],[soft-disabled])) .outline{border-color:var(--_disabled-outline-color);opacity:var(--_disabled-outline-opacity)}@media(forced-colors: active){:host(:is([disabled],[soft-disabled])) .background{border-color:GrayText}:host(:is([disabled],[soft-disabled])) .outline{opacity:1}}.outline,md-ripple{border-width:var(--_outline-width)}md-ripple{inline-size:calc(100% - 2*var(--_outline-width));block-size:calc(100% - 2*var(--_outline-width));border-style:solid;border-color:rgba(0,0,0,0)}\n`;\nexport default styles.styleSheet;\n//# sourceMappingURL=outlined-styles.cssresult.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\nimport { customElement } from 'lit/decorators.js';\nimport { OutlinedButton } from './internal/outlined-button.js';\nimport { styles as outlinedStyles } from './internal/outlined-styles.cssresult.js';\nimport { styles as sharedStyles } from './internal/shared-styles.cssresult.js';\n/**\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * @description\n * __Emphasis:__ Medium emphasis – For important actions that don’t distract\n * from other onscreen elements.\n *\n * __Rationale:__ Use an outlined button for actions that need attention but\n * aren’t the primary action, such as “See all” or “Add to cart.” This is also\n * the button to use for giving someone the opportunity to change their mind or\n * escape a flow.\n *\n * __Example usages:__\n * - Reply\n * - View all\n * - Add to cart\n * - Take out of trash\n *\n * @final\n * @suppress {visibility}\n */\nlet MdOutlinedButton = class MdOutlinedButton extends OutlinedButton {\n};\nMdOutlinedButton.styles = [sharedStyles, outlinedStyles];\nMdOutlinedButton = __decorate([\n customElement('md-outlined-button')\n], MdOutlinedButton);\nexport { MdOutlinedButton };\n//# sourceMappingURL=outlined-button.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport '../../elevation/elevation.js';\nimport { html } from 'lit';\nimport { Button } from './button.js';\n/**\n * A filled button component.\n */\nexport class FilledButton extends Button {\n renderElevationOrOutline() {\n return html `<md-elevation part=\"elevation\"></md-elevation>`;\n }\n}\n//# sourceMappingURL=filled-button.js.map","/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./button/internal/filled-styles.css.\nimport { css } from 'lit';\nexport const styles = css `:host{--_container-color: var(--md-filled-button-container-color, var(--md-sys-color-primary, #6750a4));--_container-elevation: var(--md-filled-button-container-elevation, 0);--_container-height: var(--md-filled-button-container-height, 40px);--_container-shadow-color: var(--md-filled-button-container-shadow-color, var(--md-sys-color-shadow, #000));--_disabled-container-color: var(--md-filled-button-disabled-container-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-container-elevation: var(--md-filled-button-disabled-container-elevation, 0);--_disabled-container-opacity: var(--md-filled-button-disabled-container-opacity, 0.12);--_disabled-label-text-color: var(--md-filled-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-filled-button-disabled-label-text-opacity, 0.38);--_focus-container-elevation: var(--md-filled-button-focus-container-elevation, 0);--_focus-label-text-color: var(--md-filled-button-focus-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-container-elevation: var(--md-filled-button-hover-container-elevation, 1);--_hover-label-text-color: var(--md-filled-button-hover-label-text-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-color: var(--md-filled-button-hover-state-layer-color, var(--md-sys-color-on-primary, #fff));--_hover-state-layer-opacity: var(--md-filled-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-filled-button-label-text-color, var(--md-sys-color-on-primary, #fff));--_label-text-font: var(--md-filled-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-filled-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-filled-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-filled-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-container-elevation: var(--md-filled-button-pressed-container-elevation, 0);--_pressed-label-text-color: var(--md-filled-button-pressed-label-text-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-color: var(--md-filled-button-pressed-state-layer-color, var(--md-sys-color-on-primary, #fff));--_pressed-state-layer-opacity: var(--md-filled-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-filled-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-filled-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-filled-button-focus-icon-color, var(--md-sys-color-on-primary, #fff));--_hover-icon-color: var(--md-filled-button-hover-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-color: var(--md-filled-button-icon-color, var(--md-sys-color-on-primary, #fff));--_icon-size: var(--md-filled-button-icon-size, 18px);--_pressed-icon-color: var(--md-filled-button-pressed-icon-color, var(--md-sys-color-on-primary, #fff));--_container-shape-start-start: var(--md-filled-button-container-shape-start-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-filled-button-container-shape-start-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-filled-button-container-shape-end-end, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-filled-button-container-shape-end-start, var(--md-filled-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-filled-button-leading-space, 24px);--_trailing-space: var(--md-filled-button-trailing-space, 24px);--_with-leading-icon-leading-space: var(--md-filled-button-with-leading-icon-leading-space, 16px);--_with-leading-icon-trailing-space: var(--md-filled-button-with-leading-icon-trailing-space, 24px);--_with-trailing-icon-leading-space: var(--md-filled-button-with-trailing-icon-leading-space, 24px);--_with-trailing-icon-trailing-space: var(--md-filled-button-with-trailing-icon-trailing-space, 16px)}\n`;\nexport default styles.styleSheet;\n//# sourceMappingURL=filled-styles.cssresult.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\nimport { customElement } from 'lit/decorators.js';\nimport { FilledButton } from './internal/filled-button.js';\nimport { styles as filledStyles } from './internal/filled-styles.cssresult.js';\nimport { styles as sharedElevationStyles } from './internal/shared-elevation-styles.cssresult.js';\nimport { styles as sharedStyles } from './internal/shared-styles.cssresult.js';\n/**\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * @description\n * __Emphasis:__ High emphasis – For the primary, most important, or most common\n * action on a screen\n *\n * __Rationale:__ The filled button’s contrasting surface color makes it the\n * most prominent button after the FAB. It’s used for final or unblocking\n * actions in a flow.\n *\n * __Example usages:__\n * - Save\n * - Confirm\n * - Done\n *\n * @final\n * @suppress {visibility}\n */\nlet MdFilledButton = class MdFilledButton extends FilledButton {\n};\nMdFilledButton.styles = [\n sharedStyles,\n sharedElevationStyles,\n filledStyles,\n];\nMdFilledButton = __decorate([\n customElement('md-filled-button')\n], MdFilledButton);\nexport { MdFilledButton };\n//# sourceMappingURL=filled-button.js.map"],"ignoreList":[0,1,2,3,4,5],"mappings":";;;;;;;;;;;;AAUA,IAAa,iBAAb,cAAoC,OAAO;CACvC,2BAA2B;EACvB,OAAOA,CAAK;CAChB;AACJ;;;;;;;ACPA,IAAaC,WAASC,CAAI;;AAEXD,SAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACuBtB,IAAI,mBAAmB,MAAM,yBAAyB,eAAe,CACrE;AACA,iBAAiB,SAAS,CAACE,UAAcC,QAAc;AACvD,mBAAmB,WAAW,CAC1BC,EAAc,oBAAoB,CACtC,GAAG,gBAAgB;;;;;;;;;;AC1BnB,IAAa,eAAb,cAAkC,OAAO;CACrC,2BAA2B;EACvB,OAAOC,CAAK;CAChB;AACJ;;;;;;;ACRA,IAAa,SAASC,CAAI;;AAEX,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;ACsBtB,IAAI,iBAAiB,MAAM,uBAAuB,aAAa,CAC/D;AACA,eAAe,SAAS;CACpBC;CACAC;CACAC;AACJ;AACA,iBAAiB,WAAW,CACxBC,EAAc,kBAAkB,CACpC,GAAG,cAAc"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { G as t, I as T, K as __decorate, M as i, W as i$1 } from "./composition.js";
|
|
2
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/icon/internal/icon.js
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright 2022 Google LLC
|
|
6
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* An icon element.
|
|
10
|
-
*/
|
|
11
|
-
var Icon = class extends i {
|
|
12
|
-
render() {
|
|
13
|
-
return T`<slot></slot>`;
|
|
14
|
-
}
|
|
15
|
-
connectedCallback() {
|
|
16
|
-
super.connectedCallback();
|
|
17
|
-
if (this.getAttribute("aria-hidden") === "false") {
|
|
18
|
-
this.removeAttribute("aria-hidden");
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
this.setAttribute("aria-hidden", "true");
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/icon/internal/icon-styles.cssresult.js
|
|
25
|
-
/**
|
|
26
|
-
* @license
|
|
27
|
-
* Copyright 2026 Google LLC
|
|
28
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
29
|
-
*/
|
|
30
|
-
var styles = i$1`:host{font-size:var(--md-icon-size, 24px);width:var(--md-icon-size, 24px);height:var(--md-icon-size, 24px);color:inherit;font-variation-settings:inherit;font-weight:400;font-family:var(--md-icon-font, Material Symbols Outlined);display:inline-flex;font-style:normal;place-items:center;place-content:center;line-height:1;overflow:hidden;letter-spacing:normal;text-transform:none;user-select:none;white-space:nowrap;word-wrap:normal;flex-shrink:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}::slotted(svg){fill:currentColor}::slotted(*){height:100%;width:100%}
|
|
31
|
-
`;
|
|
32
|
-
styles.styleSheet;
|
|
33
|
-
// ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/icon/icon.js
|
|
34
|
-
/**
|
|
35
|
-
* @license
|
|
36
|
-
* Copyright 2022 Google LLC
|
|
37
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* @final
|
|
41
|
-
* @suppress {visibility}
|
|
42
|
-
*/
|
|
43
|
-
var MdIcon = class MdIcon extends Icon {};
|
|
44
|
-
/** @nocollapse */
|
|
45
|
-
MdIcon.styles = [styles];
|
|
46
|
-
MdIcon = __decorate([t("md-icon")], MdIcon);
|
|
47
|
-
export {};
|
|
48
|
-
|
|
49
|
-
//# sourceMappingURL=icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","names":["LitElement","html","css","customElement"],"sources":["../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/icon/internal/icon.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/icon/internal/icon-styles.cssresult.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/icon/icon.js"],"sourcesContent":["/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { html, LitElement } from 'lit';\n/**\n * An icon element.\n */\nexport class Icon extends LitElement {\n render() {\n return html `<slot></slot>`;\n }\n connectedCallback() {\n super.connectedCallback();\n const ariaHidden = this.getAttribute('aria-hidden');\n if (ariaHidden === 'false') {\n // Allow the user to set `aria-hidden=\"false\"` to create an icon that is\n // announced by screenreaders.\n this.removeAttribute('aria-hidden');\n return;\n }\n // Needed for VoiceOver, which will create a \"group\" if the element is a\n // sibling to other content.\n this.setAttribute('aria-hidden', 'true');\n }\n}\n//# sourceMappingURL=icon.js.map","/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./icon/internal/icon-styles.css.\nimport { css } from 'lit';\nexport const styles = css `:host{font-size:var(--md-icon-size, 24px);width:var(--md-icon-size, 24px);height:var(--md-icon-size, 24px);color:inherit;font-variation-settings:inherit;font-weight:400;font-family:var(--md-icon-font, Material Symbols Outlined);display:inline-flex;font-style:normal;place-items:center;place-content:center;line-height:1;overflow:hidden;letter-spacing:normal;text-transform:none;user-select:none;white-space:nowrap;word-wrap:normal;flex-shrink:0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}::slotted(svg){fill:currentColor}::slotted(*){height:100%;width:100%}\n`;\nexport default styles.styleSheet;\n//# sourceMappingURL=icon-styles.cssresult.js.map","/**\n * @license\n * Copyright 2022 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\nimport { customElement } from 'lit/decorators.js';\nimport { Icon } from './internal/icon.js';\nimport { styles } from './internal/icon-styles.cssresult.js';\n/**\n * @final\n * @suppress {visibility}\n */\nlet MdIcon = class MdIcon extends Icon {\n};\n/** @nocollapse */\nMdIcon.styles = [styles];\nMdIcon = __decorate([\n customElement('md-icon')\n], MdIcon);\nexport { MdIcon };\n//# sourceMappingURL=icon.js.map"],"ignoreList":[0,1,2],"mappings":";;;;;;;;;;AASA,IAAa,OAAb,cAA0BA,EAAW;CACjC,SAAS;EACL,OAAOC,CAAK;CAChB;CACA,oBAAoB;EAChB,MAAM,kBAAkB;EAExB,IADmB,KAAK,aAAa,aACxB,MAAM,SAAS;GAGxB,KAAK,gBAAgB,aAAa;GAClC;EACJ;EAGA,KAAK,aAAa,eAAe,MAAM;CAC3C;AACJ;;;;;;;ACnBA,IAAa,SAASC,GAAI;;AAEX,OAAO;;;;;;;;;;;ACItB,IAAI,SAAS,MAAM,eAAe,KAAK,CACvC;;AAEA,OAAO,SAAS,CAAC,MAAM;AACvB,SAAS,WAAW,CAChBC,EAAc,SAAS,CAC3B,GAAG,MAAM"}
|