pi-roundtable-web 0.27.0 → 0.27.1
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/CHANGELOG.md +6 -0
- package/dist/chunk-account-83crfbn4.js +1 -0
- package/dist/{chunk-action-menu-zh2n0ahf.js → chunk-action-menu-qw7h03x0.js} +1 -1
- package/dist/{chunk-agent-ynm2tcbx.js → chunk-agent-t1632ktv.js} +1 -1
- package/dist/{chunk-arranged-rooms-qnz8vese.js → chunk-arranged-rooms-sb6tbsxw.js} +1 -1
- package/dist/{chunk-bulk-actions-pr0mw0kc.js → chunk-bulk-actions-v1g2bzk7.js} +1 -1
- package/dist/{chunk-character-creator-caj4pmg4.js → chunk-character-creator-ye69w0kx.js} +1 -1
- package/dist/{chunk-codeeditor-dga6s78p.js → chunk-codeeditor-5j6abj8k.js} +1 -1
- package/dist/chunk-confirm-x8w877bz.js +1 -0
- package/dist/{chunk-connectors-j79ze3j1.js → chunk-connectors-t7qbc6nk.js} +1 -1
- package/dist/{chunk-conversations-2farn72g.js → chunk-conversations-kmt6qzym.js} +1 -1
- package/dist/{chunk-council-sheet-s9sz1bzf.js → chunk-council-sheet-bxvn7vza.js} +1 -1
- package/dist/{chunk-drag-45e8222r.js → chunk-drag-03zgvd66.js} +1 -1
- package/dist/{chunk-entry-q11n47h9.js → chunk-entry-y5vwp5e5.js} +1 -1
- package/dist/{chunk-folder-list-4gcj7g7h.js → chunk-folder-list-h3vnjzpb.js} +1 -1
- package/dist/{chunk-folds-ten4ykfw.js → chunk-folds-a3e22m7x.js} +1 -1
- package/dist/{chunk-gate-kcv1a4t0.js → chunk-gate-qzephvdv.js} +1 -1
- package/dist/chunk-group-scene-w1ycabrm.js +1 -0
- package/dist/{chunk-group-table-t458kdgn.js → chunk-group-table-9nvmja8w.js} +1 -1
- package/dist/chunk-host-icons-fccg3b2d.js +1 -0
- package/dist/chunk-host-picture-jaqz127q.js +1 -0
- package/dist/{chunk-host-state-7mdve7cb.js → chunk-host-state-r01v1ywg.js} +1 -1
- package/dist/{chunk-host-ui-bdgwa6sf.js → chunk-host-ui-n54mh5af.js} +1 -1
- package/dist/{chunk-index-ffbrm6tr.js → chunk-index-0ye10vk3.js} +1 -1
- package/dist/{chunk-index-b8cpvr7y.js → chunk-index-1kwp3spy.js} +1 -1
- package/dist/{chunk-index-kbrg32sx.js → chunk-index-3pnvpppa.js} +1 -1
- package/dist/{chunk-index-f6q0stqx.js → chunk-index-47vq85ye.js} +1 -1
- package/dist/{chunk-index-2t30xwed.js → chunk-index-4z4chg7v.js} +1 -1
- package/dist/{chunk-index-cdctnw71.js → chunk-index-5zmswz4s.js} +1 -1
- package/dist/{chunk-index-6bkcq9ka.js → chunk-index-6vcs0h0m.js} +1 -1
- package/dist/{chunk-index-j4kk1m59.js → chunk-index-6xqz6mg2.js} +1 -1
- package/dist/{chunk-index-02vfshtt.js → chunk-index-83v0c9x6.js} +1 -1
- package/dist/{chunk-index-aamhjg5n.js → chunk-index-8xd6anam.js} +1 -1
- package/dist/{chunk-index-31x6krbs.js → chunk-index-983dmeaa.js} +1 -1
- package/dist/{chunk-index-xxeb2xp0.js → chunk-index-9z13jw6q.js} +2 -2
- package/dist/{chunk-index-q7g62sgm.js → chunk-index-af4ebmkr.js} +1 -1
- package/dist/{chunk-index-8d81qy69.js → chunk-index-afrhnrxj.js} +1 -1
- package/dist/{chunk-index-zyvwhxga.js → chunk-index-ben4gv45.js} +1 -1
- package/dist/{chunk-index-t998yg8y.js → chunk-index-c44p8q87.js} +1 -1
- package/dist/{chunk-index-92zgb7my.js → chunk-index-db8zh8e6.js} +1 -1
- package/dist/{chunk-index-dnjftvtq.js → chunk-index-dvfkb699.js} +1 -1
- package/dist/{chunk-index-g3wrs02w.js → chunk-index-e02ddp46.js} +1 -1
- package/dist/{chunk-index-pefwfm26.js → chunk-index-em7vndrb.js} +1 -1
- package/dist/{chunk-index-tk4se135.js → chunk-index-eq161yvp.js} +1 -1
- package/dist/{chunk-index-xq84gg8w.js → chunk-index-f500nw4w.js} +1 -1
- package/dist/{chunk-index-12zyshae.js → chunk-index-f5x2srr0.js} +1 -1
- package/dist/{chunk-index-2e4am3hw.js → chunk-index-fg42egv9.js} +4 -4
- package/dist/{chunk-index-msqhgvfx.js → chunk-index-h3v1d3nt.js} +1 -1
- package/dist/{chunk-index-2fdns8tn.js → chunk-index-j7pgphx3.js} +1 -1
- package/dist/{chunk-index-ac1ktr56.js → chunk-index-k0z507h3.js} +1 -1
- package/dist/chunk-index-kbgykazq.js +2 -0
- package/dist/{chunk-index-0w4bfjb5.js → chunk-index-n05yw5wd.js} +1 -1
- package/dist/{chunk-index-18pgxxw3.js → chunk-index-n8ghdvxb.js} +1 -1
- package/dist/{chunk-index-rh0x9rzf.js → chunk-index-nsvwbjfe.js} +1 -1
- package/dist/{chunk-index-jgzygbt8.js → chunk-index-p5jcwjx8.js} +1 -1
- package/dist/{chunk-index-kb3w11mn.js → chunk-index-rcwdqn50.js} +2 -2
- package/dist/chunk-index-s72hmse6.js +2 -0
- package/dist/{chunk-index-5bfqek1d.js → chunk-index-xevnf9ew.js} +1 -1
- package/dist/{chunk-index-pyfx77cj.js → chunk-index-xx8jq73q.js} +1 -1
- package/dist/{chunk-index-e2dqjde8.js → chunk-index-y60x5jbh.js} +1 -1
- package/dist/{chunk-index-dj0tbfyb.js → chunk-index-ypkgw7gq.js} +1 -1
- package/dist/{chunk-index-g1awv7rk.js → chunk-index-yrmqcay4.js} +1 -1
- package/dist/chunk-layout-actions-8dzvysym.js +1 -0
- package/dist/{chunk-menu-items-bza16bw6.js → chunk-menu-items-3jhya205.js} +1 -1
- package/dist/chunk-mode-toggle-js49gvpd.js +1 -0
- package/dist/{chunk-note-row-6fmhrdng.js → chunk-note-row-kv061030.js} +2 -2
- package/dist/{chunk-notes-wv0e6ssf.js → chunk-notes-sdkqz5hr.js} +1 -1
- package/dist/{chunk-notice-bell-9z27epd2.js → chunk-notice-bell-r012f2zy.js} +1 -1
- package/dist/{chunk-notices-fte9f196.js → chunk-notices-h4rk1zxc.js} +1 -1
- package/dist/{chunk-onboarding-c5twahc3.js → chunk-onboarding-a18cvkph.js} +1 -1
- package/dist/{chunk-overview-k4ccprax.js → chunk-overview-ynaqn4fp.js} +1 -1
- package/dist/{chunk-palette-9rbp2fab.js → chunk-palette-jm79gb5q.js} +1 -1
- package/dist/chunk-placement-items-mwm9q1zn.js +1 -0
- package/dist/{chunk-profile-s7r7fcvz.js → chunk-profile-ajw6pp4r.js} +1 -1
- package/dist/{chunk-prompt-history-hf296e7v.js → chunk-prompt-history-zcfvr3r8.js} +1 -1
- package/dist/{chunk-prompts-c8s0nhkm.js → chunk-prompts-m5rzdk24.js} +1 -1
- package/dist/chunk-room-confirms-ftsj15ja.js +1 -0
- package/dist/{chunk-room-menu-7h4jym2b.js → chunk-room-menu-b9ktw9pw.js} +1 -1
- package/dist/{chunk-rooms-menu-button-pgtaanb6.js → chunk-rooms-menu-button-qe62t6nx.js} +1 -1
- package/dist/{chunk-schedules-mbnwcxpc.js → chunk-schedules-t8yxnf8q.js} +1 -1
- package/dist/{chunk-seat-menu-r0k0eawr.js → chunk-seat-menu-kwtjnpjj.js} +1 -1
- package/dist/{chunk-sheet-hosts-a5dfevy9.js → chunk-sheet-hosts-yj5wszgj.js} +1 -1
- package/dist/{chunk-shortcut-help-a6pkjcq7.js → chunk-shortcut-help-g5cpqjjj.js} +1 -1
- package/dist/{chunk-shortcuts-cgt87jkz.js → chunk-shortcuts-9ft5sqdw.js} +1 -1
- package/dist/{chunk-skill-editor-67yk4x7t.js → chunk-skill-editor-xdfq2708.js} +1 -1
- package/dist/{chunk-skills-rewemey4.js → chunk-skills-9wa4mwdc.js} +1 -1
- package/dist/{chunk-switcher-list-t8rbay2y.js → chunk-switcher-list-vpg6wvtw.js} +1 -1
- package/dist/{chunk-tab-dot-vr11dfrw.js → chunk-tab-dot-yse6wcfp.js} +1 -1
- package/dist/{chunk-table-52nh0azk.js → chunk-table-1y76m54h.js} +1 -1
- package/dist/{chunk-table3d-rp0w6kt4.js → chunk-table3d-cv6069hy.js} +1 -1
- package/dist/chunk-thread-actions-xjhpdjk7.js +1 -0
- package/dist/{chunk-thread-cards-c2mrp2gj.js → chunk-thread-cards-36rckyg7.js} +1 -1
- package/dist/{chunk-thread-list-0071q455.js → chunk-thread-list-fd6agz77.js} +2 -2
- package/dist/{chunk-transcript-789yqysq.js → chunk-transcript-5nfn3r35.js} +1 -1
- package/dist/chunk-where-ha8pc3cg.js +1 -0
- package/dist/{chunk-workspace-wr1qrtsh.js → chunk-workspace-e85twv32.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-account-1ecx5kt7.js +0 -1
- package/dist/chunk-confirm-g76v5d9r.js +0 -1
- package/dist/chunk-group-scene-12ghcvzd.js +0 -1
- package/dist/chunk-host-icons-h1k9k96a.js +0 -1
- package/dist/chunk-host-picture-3p0wzn3v.js +0 -1
- package/dist/chunk-index-j0m16cj1.js +0 -2
- package/dist/chunk-index-v6smgw77.js +0 -2
- package/dist/chunk-layout-actions-y73mpsh1.js +0 -1
- package/dist/chunk-mode-toggle-nj9gnt3b.js +0 -1
- package/dist/chunk-placement-items-me598wsb.js +0 -1
- package/dist/chunk-room-confirms-ga2sbvhc.js +0 -1
- package/dist/chunk-thread-actions-qcxt1y1g.js +0 -1
- package/dist/chunk-where-hmwmme9e.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p}from"./chunk-index-
|
|
1
|
+
import{p}from"./chunk-index-fg42egv9.js";var de={pushTest:()=>p("push/test",{method:"POST"}),pushPrefs:()=>p("push/prefs"),setPushPrefs:(e)=>p("push/prefs",{method:"PUT",body:JSON.stringify({quiet:e})}),notices:()=>p("notices"),ackNotice:(e)=>p(`notices/${encodeURIComponent(e)}/ack`,{method:"POST"}),onboarding:()=>p("onboarding"),waive:(e)=>p(`onboarding/${encodeURIComponent(e)}/waive`,{method:"POST"}),profile:()=>p("profile"),chooseSource:(e)=>p("profile/source",{method:"PUT",body:JSON.stringify({provider:e})}),links:()=>p("links"),issueLink:(e)=>p(`links/${encodeURIComponent(e)}/issue`,{method:"POST"}),confirmLink:(e,i)=>p(`links/${encodeURIComponent(e)}/confirm`,{method:"POST",body:JSON.stringify({request:i})}),cancelLink:(e)=>p(`links/${encodeURIComponent(e)}/cancel`,{method:"POST"}),unlink:(e)=>p(`links/${encodeURIComponent(e)}`,{method:"DELETE"})};
|
|
2
2
|
export{de};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-index-
|
|
1
|
+
import{e}from"./chunk-index-fg42egv9.js";function qt(a){return e("button",{type:"button",id:a.id,role:"switch","aria-checked":a.checked,"aria-label":a.label,"aria-busy":a.busy||void 0,disabled:a.disabled||a.busy,className:"switch",onClick:()=>a.onChange(!a.checked),children:e("span",{className:"switch-thumb"})})}
|
|
2
2
|
export{qt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Fe,v,y,Qr,Yi}from"./chunk-index-
|
|
1
|
+
import{Fe,v,y,Qr,Yi}from"./chunk-index-fg42egv9.js";import{de}from"./chunk-index-h3v1d3nt.js";var o={notices:[],badge:0,known:!1},r=new Set,s=(e)=>{o=e;for(let t of r)t()};function f(e){let t=navigator;(e>0?t.setAppBadge?.(e):t.clearAppBadge?.())?.catch(()=>{return})}function d(e){if(e.type==="notice"){let t=o.notices.filter((i)=>i.tag!==e.notice.tag),n=o.notices.findIndex((i)=>i.tag===e.notice.tag),c=n>=0?o.notices[n]:void 0,p=c&&c.raisedAt!==e.notice.raisedAt,g=n>=0&&!p?o.notices.map((i)=>i.tag===e.notice.tag?e.notice:i):[e.notice,...t];s({...o,notices:g,known:!0})}else if(e.type==="notice_resolved")s({...o,notices:o.notices.filter((t)=>t.tag!==e.tag),known:!0});else if(e.type==="badge")s({...o,badge:e.count,known:!0}),f(e.count)}var a=y.getState().connects;y.subscribe(()=>{let e=y.getState().connects;if(e===a)return;a=e,s({...o,notices:[],known:!1})});for(let e of Qr.splice(0))d(e);Yi.take=d;function Xi(){return o}function u(e){return r.add(e),()=>r.delete(e)}var Po=u;function ni(){return Fe(u,Xi,Xi)}async function Qo(e){await de.ackNotice(e),s({...o,notices:o.notices.map((t)=>t.tag===e?{...t,acked:!0}:t),badge:Math.max(0,o.badge-(o.notices.some((t)=>t.tag===e&&t.ackable&&!t.acked)?1:0))})}function Mo(e){if(!e)return v("notices");if("room"in e){let c=v("room",e.room);return e.message===void 0?c:`${c}?message=${e.message}`}let t=v("p",e.page),n=new URLSearchParams(e.query??{}).toString();return n?`${t}?${n}`:t}
|
|
2
2
|
export{Xi,Po,ni,Qo,Mo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-index-
|
|
1
|
+
import{t}from"./chunk-index-fg42egv9.js";function En(e){if(e.builtin==="link")return t("Link your {name} account",{name:e.label});if(e.builtin==="push")return t("Turn on notifications");return e.label}function sn(e){if(e.help)return e.help;if(e.builtin==="link")return t("Prove which account is yours, so the app knows who you are there.");if(e.builtin==="push")return t("So that you hear when something needs you, even when the app is closed.");return""}
|
|
2
2
|
export{En,sn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t,c,v,p}from"./chunk-index-
|
|
1
|
+
import{t,c,v,p}from"./chunk-index-fg42egv9.js";import{cr}from"./chunk-index-4z4chg7v.js";var n=encodeURIComponent,a=new Set([c("This action takes no form."),c("The form has no such field."),c("This field is required."),c("Choose from the list."),c("This field takes one value."),c("This field is too long."),c("Give a web address."),c("The action could not be done.")]),Ni=(e)=>a.has(e)?t(e):e;function To(e){let s=e.indexOf(":"),o=e.lastIndexOf(".");if(s<0||o<s+2||o===e.length-1)return;return{kind:e.slice(s+1,o),id:e.slice(o+1)}}var Be={list:(e,s,o)=>{let i=new URLSearchParams;if(s)i.set("filter",s);if(o)i.set("cursor",o);let r=i.toString();return p(`host/${n(e)}${r?`?${r}`:""}`)},open:(e,s)=>p(`host/${n(e)}/${n(s)}`),older:(e,s,o,i)=>p(`host/${n(e)}/${n(s)}/messages?before=${o}&limit=${i}`),act:(e,s,o)=>p(`host/${n(e)}/${n(s)}/act`,{method:"POST",body:JSON.stringify(o)}),page:(e,s)=>{let o=new URLSearchParams(s).toString();return p(`pages/${n(e)}${o?`?${o}`:""}`)},pageAct:(e,s)=>p(`pages/${n(e)}/act`,{method:"POST",body:JSON.stringify(s)})};function g(e){if("room"in e){let o=e.message===void 0?"":`?message=${e.message}`;return`${v("room",e.room)}${o}`}let s=new URLSearchParams(e.query??{}).toString();return`${v("p",e.page)}${s?`?${s}`:""}`}function Li(e){cr(new URL(g(e),document.baseURI))}
|
|
2
2
|
export{Ni,To,Be,Li};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{y}from"./chunk-index-
|
|
1
|
+
import{y}from"./chunk-index-fg42egv9.js";function a(n,o){let i=y.getState(),r=new Map;for(let s of i.order){let e=i.rooms[s]?.view;if(e?.kind!=="thread"||!e.parent)continue;if(n&&!n.has(e.parent))continue;let t=i.rooms[e.parent]?.view;if(!t||t.kind==="thread")continue;if(!o(e.closed===!0))continue;r.set(e.parent,[...r.get(e.parent)??[],s])}return r}var _i=(n)=>a(n&&new Set(n),(o)=>o),ys=(n)=>[...a(new Set(n),()=>!0).values()].flat();function bs(n){let o=y.getState(),i=n&&new Set(n),r=new Map;for(let s of o.order){let e=o.rooms[s]?.view,t=e?.helper?.parent;if(!e||!t||e.helper?.finished!==!0)continue;if(i&&!i.has(t))continue;if(!o.rooms[t]?.view)continue;r.set(t,[...r.get(t)??[],e.name])}return r}
|
|
2
2
|
export{_i,ys,bs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r,t,e,n,d,g}from"./chunk-index-
|
|
1
|
+
import{r,t,e,n,d,g}from"./chunk-index-fg42egv9.js";import{L}from"./chunk-index-afrhnrxj.js";function K(o){let[a,l]=r(!1),[s,i]=r(),c=()=>{if(a)return;i(void 0),o.onClose()};return e(L,{open:o.open,title:o.title,onClose:c,...o.restoreFocus?{restoreFocus:o.restoreFocus}:{},children:n("div",{className:"stack",children:[e("div",{className:"prose",children:o.children}),s?e(g,{message:s}):null,n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",disabled:a,onClick:c,children:o.cancelLabel??t("Cancel")}),e("button",{type:"button",className:o.tone==="danger"?"danger":o.tone==="yolo"?"yolo-action":"",disabled:a,onClick:async()=>{l(!0),i(void 0);try{await o.onConfirm(),o.onClose()}catch(m){i(d(m))}finally{l(!1)}},children:o.confirmLabel})]})]})})}
|
|
2
2
|
export{K};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{h,ve,s,M,a,r,t,c,e,Le,D,u,V,dn,An,et,it,Nn,yn,Ye,Bo,Ge,Ee}from"./chunk-index-
|
|
1
|
+
import{h,ve,s,M,a,r,t,c,e,Le,D,u,V,dn,An,et,it,Nn,yn,Ye,Bo,Ge,Ee}from"./chunk-index-fg42egv9.js";import{Be}from"./chunk-index-n8ghdvxb.js";import{Ae}from"./chunk-index-3pnvpppa.js";import{wn}from"./chunk-index-64rsz6pf.js";var he=8,Re={views:[],attention:{},loaded:!1},de=Re,{emit:be,use:xe}=V(),Mn=()=>xe(()=>de);function ei(){let n=ve(et)?.tier;return n!==void 0&&n!=="owner"}function ke(n,i){return{key:n.key,kind:"agent",name:`${i}.${n.id}`,displayName:n.title,home:!1,readOnly:!1,mode:{yolo:!1,longRunning:!1},typing:!1,stoppable:!1}}var Te=(n)=>n.attention===!0,He=(n,i)=>(i.lastAt??"").localeCompare(n.lastAt??"");async function Ce(n){let i=await Promise.allSettled(n.map((o)=>Be.list(o))),l=[];i.forEach((o,m)=>{let f=n[m];if(o.status!=="fulfilled"||f===void 0)return;for(let g of o.value.rooms)l.push({room:g,kind:f})}),l.sort((o,m)=>He(o.room,m.room));let d={};for(let{room:o}of l)if(Te(o))d[o.key]=!0;return{views:l.map(({room:o,kind:m})=>ke(o,m)),attention:d,loaded:!0}}function wo(n){let i=Ee(),l=u((w)=>w.connects),d=Ae((w)=>w.lists),o=a(0),m=a(0),f=n.join(`
|
|
2
2
|
`),{views:g}=Mn();s(()=>{o.current+=1;let w=o.current,b=!0;return Ce(f===""?[]:f.split(`
|
|
3
3
|
`)).then((k)=>{if(!b||w<m.current)return;m.current=w,de=k,be()}),()=>{b=!1}},[f,l,d]);let S=g.slice(0,he).map((w)=>w.key).join(`
|
|
4
4
|
`);s(()=>{let w=S===""?[]:S.split(`
|
|
5
5
|
`);for(let b of w)i.send({type:"subscribe",room:b});return()=>{for(let b of w)i.send({type:"unsubscribe",room:b})}},[i,S,l])}var Me=["①","②","③","④","⑤","⑥","⑦","⑧"];function ko(n){if(!n)return[];return[...n.spoken.map((i)=>({name:i,place:"spoken"})),...n.current===void 0?[]:[{name:n.current,place:"current"}],...n.next.map((i,l)=>({name:i,place:"next",order:l+1}))]}function fe(n){let i={};if(n?.state!=="running")return i;for(let d of n.spoken)i[d]="✓";let l=new Set;if(n.next.forEach((d,o)=>{let m=Me[o];if(m===void 0||l.has(d))return;l.add(d),i[d]=m}),n.current!==void 0)delete i[n.current];return i}var Ai=(n)=>n?.state==="running"?n.current:void 0;function _o(n){let i=n.current===void 0?n.replies:n.replies+1;return Math.min(Math.max(i,0),n.limit)}var Oe=380,Ve="cubic-bezier(0.7, 0, 0.84, 0)",Ne=2.4,le=0.35,De=260,_e="cubic-bezier(0.2, 0.8, 0.2, 1)",Pe=1.06,$e=700,x;function me(n){if(x?.host===n&&x.phase==="diving")x.abort()}var Ie=(n)=>{if(!n||typeof n.animate!=="function")return;n.animate([{transform:`scale(${Pe})`,opacity:le},{transform:"scale(1)",opacity:1}],{duration:De,easing:_e})};function pe(n,i,l,d){if(x)return;let o=n.closest("main.route")??n;if(Le()||typeof o.animate!=="function"){l();return}d?.();let m=o.getBoundingClientRect(),f=`${i.x-m.left}px ${i.y-m.top}px`,g={overflow:o.style.overflow,events:o.style.pointerEvents};o.style.overflow="hidden",o.style.pointerEvents="none";let S=o.animate([{transformOrigin:f,transform:"scale(1)",opacity:1},{transformOrigin:f,transform:`scale(${Ne})`,opacity:le}],{duration:Oe,easing:Ve,fill:"forwards"}),w=document.documentElement,b,k,P=()=>{o.style.overflow=g.overflow,o.style.pointerEvents=g.events,S.cancel()},I=()=>{window.removeEventListener("popstate",T),window.removeEventListener("hashchange",T)},E={host:n,phase:"diving",abort:T};function T(){if(x!==E||E.phase!=="diving")return;I(),P(),x=void 0}let H=(N)=>{if(x!==E)return;if(k?.disconnect(),clearTimeout(b),w.removeAttribute("data-dive"),P(),x=void 0,N)Ie(document.querySelector("main.route"))};x=E,window.addEventListener("popstate",T),window.addEventListener("hashchange",T),S.finished.then(()=>{if(x!==E||E.phase!=="diving")return;if(E.phase="committing",I(),w.setAttribute("data-dive",""),l(),!n.isConnected){H(!0);return}k=new MutationObserver(()=>{if(!n.isConnected)H(!0)}),k.observe(o.parentElement??document.body,{childList:!0,subtree:!0}),b=setTimeout(()=>H(!n.isConnected),$e)},()=>{return})}var Fe=(n)=>n==="sleepy"?"idle":n;function ge(n,i){let l={};for(let[d,o]of Object.entries(n))l[d]=Fe(o);for(let d of i){let o=d.agent;if(!d.typing||o===void 0||!(o in l))continue;let m=l[o];if(m==="waiting"||m==="error")continue;l[o]="speaking"}return l}function Z(n,i){if(n==="speaking")return"happy";return(i?.STATE_EXPRESSION??Ke)[n]}var Ke={idle:"neutral",thinking:"thinking",working:"determined",waiting:"curious",done:"proud",error:"apologetic",sleepy:"sleepy"};function ee(n,i){return`s${n}${i.toLowerCase().replace(/[^a-z0-9]/g,"")}`.slice(0,16)}var Xe={x:-7,y:-3,w:114,h:100},K=256;function te(n,i,l,d,o,m){let f=n.composeSvg(i,{bare:!0,look:l,expr:Z(d,n),state:"idle",still:!0,size:K,uid:o,skins:m}),{x:g,y:S,w,h:b}=Xe;return f.replace('viewBox="0 0 100 100"',`viewBox="${g} ${S} ${w} ${b}"`).replace(`width="${K}" height="${K}"`,`width="${K}" height="${Math.round(K*b/w)}"`)}function Se(n){let i=n.delayMs??300,l=n.timers??{set:(f,g)=>setTimeout(f,g),clear:(f)=>clearTimeout(f)},d=new Map,o=new Map,m=(f)=>{let g=o.get(f);if(g===void 0)return;l.clear(g),o.delete(f)};return{seed(f,g){m(f),d.set(f,Z(g))},update(f,g){let S=Z(g);if(!d.has(f)){d.set(f,S);return}if(m(f),d.get(f)===S)return;o.set(f,l.set(()=>{o.delete(f),d.set(f,S),n.setAvatar(f,g)},i))},forget(f){m(f),d.delete(f)},dispose(){for(let f of[...o.keys()])m(f);d.clear()}}}var je={idle:c("idle"),thinking:c("thinking"),working:c("working"),waiting:c("waiting"),speaking:c("speaking"),done:c("done"),error:c("error")},qe=()=>({table:t("Round table"),seat:(n,i)=>t("{name} ({state})",{name:n,state:t(je[i])})}),ze=()=>{Ge().catch(()=>{return})};function $i(n){let i=ei(),{views:l}=Mn(),d=u((o)=>{let m=o.order.map((g)=>o.rooms[g]?.view).filter((g)=>g!==void 0&&g.kind==="agent"&&!g.helper);return[...n?n.slice(0,wn).map((g)=>m.find((S)=>S.name===g)).filter((g)=>g!==void 0):m].sort((g,S)=>Number(S.home)-Number(g.home)).slice(0,wn)},n?.join(`
|
|
6
|
-
`)??"");return i?l.slice(0,wn):d}function ti(){return u((n)=>n.order.map((i)=>n.rooms[i]?.view).filter((i)=>i!==void 0&&i.kind==="agent"&&!i.helper),"agents")}function Ue(n){return u((i)=>Object.values(i.rooms).filter((l)=>n?l.key===n:l.view?.kind==="group").map((l)=>{let d=Ai(l.round),o=d??l.agent;return{typing:l.typing||d!==void 0,...o===void 0?{}:{agent:o}}}),n??"")}function We(n){return u((i)=>fe(n?i.rooms[n]?.round:void 0),n??"")}function Vt(n){let{variant:i="full",onHandle:l}=n,d=An(),o=it(),m=Nn(),f=yn(),g=Ye(),S=$i(n.members),w=Bo(S.map((p)=>p.key)),b=Ue(n.groupRoom),k=We(n.groupRoom),P=Mn().attention,I=ei(),E=a(I);E.current=I;let T=i==="full"&&n.list===!0,H=M(()=>ge(Object.fromEntries(S.map((p)=>{let y=w[p.key]??"idle";return[p.name,P[p.key]&&(y==="idle"||y==="sleepy")?"waiting":y]})),b),[S,w,b,P]),N=a(H);N.current=H;let A=M(()=>{if(!d)return[];return S.map((p,y)=>{let v=g[p.name]??p.character??dn(d,p);return{id:p.name,name:p.displayName,color:d.accentOf(v,m.look),avatarSvg:te(d,v,m.look,N.current[p.name]??"idle",ee(y,p.name),f)}})},[d,S,g,m.look,f]),X=a(A);X.current=A;let G=a(S);G.current=S;let U=a({look:o,scheme:m.scheme});U.current={look:o,scheme:m.scheme};let W=a(null),C=a(void 0),[F,ye]=r(0),j=a(void 0),ne=a(()=>{return});ne.current=(p)=>{let y=S.find((v)=>v.name===p);if(!d||!y)return;return g[p]??y.character??dn(d,y)};let oe=a(m);oe.current=m;let re=a(f);re.current=f;let se=a(d);se.current=d;let Y=a(l);Y.current=l;let L=a(n);L.current=n;let ie=d!==void 0&&A.length>0;s(()=>{let p=W.current;if(!ie||!p)return;let y=!0,v,Q=Se({setAvatar:(_,q)=>{let O=ne.current(_),R=se.current,B=G.current.findIndex((z)=>z.name===_);if(!O||!R||B<0)return;v?.setAvatar(_,te(R,O,oe.current.look,q,ee(B,_),re.current))}});return j.current=Q,(async()=>{let{mountRoundTable:_}=await (h("
|
|
6
|
+
`)??"");return i?l.slice(0,wn):d}function ti(){return u((n)=>n.order.map((i)=>n.rooms[i]?.view).filter((i)=>i!==void 0&&i.kind==="agent"&&!i.helper),"agents")}function Ue(n){return u((i)=>Object.values(i.rooms).filter((l)=>n?l.key===n:l.view?.kind==="group").map((l)=>{let d=Ai(l.round),o=d??l.agent;return{typing:l.typing||d!==void 0,...o===void 0?{}:{agent:o}}}),n??"")}function We(n){return u((i)=>fe(n?i.rooms[n]?.round:void 0),n??"")}function Vt(n){let{variant:i="full",onHandle:l}=n,d=An(),o=it(),m=Nn(),f=yn(),g=Ye(),S=$i(n.members),w=Bo(S.map((p)=>p.key)),b=Ue(n.groupRoom),k=We(n.groupRoom),P=Mn().attention,I=ei(),E=a(I);E.current=I;let T=i==="full"&&n.list===!0,H=M(()=>ge(Object.fromEntries(S.map((p)=>{let y=w[p.key]??"idle";return[p.name,P[p.key]&&(y==="idle"||y==="sleepy")?"waiting":y]})),b),[S,w,b,P]),N=a(H);N.current=H;let A=M(()=>{if(!d)return[];return S.map((p,y)=>{let v=g[p.name]??p.character??dn(d,p);return{id:p.name,name:p.displayName,color:d.accentOf(v,m.look),avatarSvg:te(d,v,m.look,N.current[p.name]??"idle",ee(y,p.name),f)}})},[d,S,g,m.look,f]),X=a(A);X.current=A;let G=a(S);G.current=S;let U=a({look:o,scheme:m.scheme});U.current={look:o,scheme:m.scheme};let W=a(null),C=a(void 0),[F,ye]=r(0),j=a(void 0),ne=a(()=>{return});ne.current=(p)=>{let y=S.find((v)=>v.name===p);if(!d||!y)return;return g[p]??y.character??dn(d,y)};let oe=a(m);oe.current=m;let re=a(f);re.current=f;let se=a(d);se.current=d;let Y=a(l);Y.current=l;let L=a(n);L.current=n;let ie=d!==void 0&&A.length>0;s(()=>{let p=W.current;if(!ie||!p)return;let y=!0,v,Q=Se({setAvatar:(_,q)=>{let O=ne.current(_),R=se.current,B=G.current.findIndex((z)=>z.name===_);if(!O||!R||B<0)return;v?.setAvatar(_,te(R,O,oe.current.look,q,ee(B,_),re.current))}});return j.current=Q,(async()=>{let{mountRoundTable:_}=await (h("y5vwp5e5"),import("./chunk-entry-y5vwp5e5.js")),q=X.current.map((R)=>({...R,state:N.current[R.id]??"idle"})),O=await _(p,{theme:U.current.look,scheme:U.current.scheme,seats:q,onSeatClick:({id:R,at:B})=>{let z=L.current.onSeat;if(z){z(R);return}let ae=G.current.find((we)=>we.name===R);if(!ae)return;let ce=()=>D("room",ae.key),ue=W.current;if(B&&ue)pe(ue,B,ce,E.current?ze:void 0);else ce()},...L.current.onSeatMenu?{onSeatMenu:(R)=>L.current.onSeatMenu?.(R)}:{},ownerName:L.current.ownerName??t("You"),focus:L.current.focus??null,onFocus:(R)=>L.current.onFocus?.(R),reducedMotion:"auto",lowPower:"auto",variant:i,listBelow:T,labels:qe()});if(!y){O.dispose();return}v=O,C.current=O;for(let R of q)Q.seed(R.id,R.state??"idle");Y.current?.(O),ye((R)=>R+1)})(),()=>{y=!1,me(p),Q.dispose(),j.current=void 0,C.current=void 0,Y.current?.(void 0),v?.dispose()}},[ie,i,T]);let J=n.focus??null;if(s(()=>{let p=C.current;if(p&&p.focused()!==J)p.focus(J)},[J,F]),s(()=>{let p=C.current;if(!p||A.length===0)return;let y=N.current;p.setSeats(A.map((v)=>({...v,state:y[v.id]??"idle"})));for(let v of A)j.current?.seed(v.id,y[v.id]??"idle")},[A,F]),s(()=>{let p=C.current;if(!p)return;for(let y of X.current)p.setMark(y.id,k[y.id]??null)},[k,A,F]),s(()=>{let p=C.current;if(p)p.setTheme(o,m.scheme)},[o,m.scheme,F]),s(()=>{let p=C.current;if(!p)return;for(let y of X.current){let v=H[y.id]??"idle";p.setState(y.id,v),j.current?.update(y.id,v)}},[H,F]),S.length===0)return e("p",{className:"table-empty",children:t("No knights are seated yet.")});return e("section",{className:"table-host",ref:W,"aria-label":t("Round table")})}
|
|
7
7
|
export{Mn,ei,wo,ko,Ai,_o,$i,ti,Vt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s,r,d,ne}from"./chunk-index-
|
|
1
|
+
import{s,r,d,ne}from"./chunk-index-fg42egv9.js";function be(o,e){let{version:u}=ne(),[t,i]=r({data:void 0,error:void 0,subject:e});return s(()=>{let n=!0;return o().then((a)=>{if(n)i({data:a,error:void 0,subject:e})},(a)=>{if(n)i((f)=>({data:f.subject===e?f.data:void 0,error:d(a),subject:e}))}),()=>{n=!1}},[e,u]),t.subject===e?{data:t.data,error:t.error}:{data:void 0,error:void 0}}
|
|
2
2
|
export{be};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{y,p,d,f}from"./chunk-index-
|
|
1
|
+
import{y,p,d,f}from"./chunk-index-fg42egv9.js";import{Ho}from"./chunk-index-qfgkfq86.js";import{io,_n}from"./chunk-index-kbgykazq.js";import{je,xs,Ss,ws,ks,_s}from"./chunk-index-x4enmj72.js";import{Nt}from"./chunk-index-yrmqcay4.js";var n={createFolder:(e)=>p("folders",{method:"POST",body:JSON.stringify({name:e})}),changeFolder:(e,t)=>p(`folders/${encodeURIComponent(e)}`,{method:"PATCH",body:JSON.stringify(t)}),deleteFolder:(e)=>p(`folders/${encodeURIComponent(e)}`,{method:"DELETE"}),muteFolder:(e,t)=>p(`folders/${encodeURIComponent(e)}/mute`,{method:"PUT",body:JSON.stringify({muted:t})}),placeRoom:(e,t,o)=>p(`rooms/${encodeURIComponent(e)}/folder`,{method:"PUT",body:JSON.stringify({folder:t,before:o})}),pinRoom:(e,t,o)=>p(`rooms/${encodeURIComponent(e)}/pin`,{method:"PUT",body:JSON.stringify({pinned:t,before:o})})};var a=(e)=>f(e,"danger"),l=(e)=>y.dispatch({type:"layout_loaded",pins:e.pins,folders:e.folders});async function i(e,t,o=a){let r=io();try{l(e(r))}catch{}try{let s=await t();return l(s),s}catch(s){l(r),y.dispatch({type:"changed"}),o(d(s));return}}var Wo=(e,t,o=null)=>i((r)=>_s(r,e,t,o),()=>n.pinRoom(e,t,o)),jt=(e,t,o=null)=>i((r)=>ks(r,e,t,o),()=>n.placeRoom(e,t,o));function er(e,t){let o=Nt(_n(),e);if(o.kind==="rest")return;let r=je(o.siblings,e,t);if(!r)return;return o.kind==="pinned"?Wo(e,!0,r.before):jt(e,o.folder,r.before)}async function zr(e,t=a){try{let o=await n.createFolder(e);return l(o),o.folders.at(-1)?.id}catch(o){t(d(o));return}}var Ir=(e,t,o)=>i((r)=>xs(r,e,t),()=>n.changeFolder(e,{name:t}),o),Cs=(e,t)=>i((o)=>Ss(o,e,t),()=>n.changeFolder(e,{before:t}));function $s(e,t){let o=je(io().folders.map((r)=>r.id),e,t);return o?Cs(e,o.before):void 0}var Dr=(e,t)=>i((o)=>ws(o,e),()=>n.deleteFolder(e),t);async function Ns(e,t){try{let o=await n.muteFolder(e,t);for(let r of o.rooms)y.dispatch({type:"room_muted",room:r,muted:o.muted});return!0}catch(o){return a(d(o)),!1}}function Ls(e,t){let o=Ho(Nt(_n(),e),e,t);if(!o)return;if(o.kind==="pin")return Wo(e,!0,o.before);if(o.kind==="folder")return jt(e,o.folder,o.before);return jt(e,null)}
|
|
2
2
|
export{Wo,jt,er,zr,Ir,Cs,$s,Dr,Ns,Ls};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ci}from"./chunk-index-
|
|
1
|
+
import{ci}from"./chunk-index-fg42egv9.js";var o={pin:"M9 4h6l-1 6 3 3H7l3-3-1-6ZM12 13v7",folder:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z",up:"M6 15l6-6 6 6",down:"M6 9l6 6 6-6",edit:"M4 20h4L19 9l-4-4L4 16v4ZM13.5 6.5l4 4"};ci(o);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{V}from"./chunk-index-
|
|
1
|
+
import{V}from"./chunk-index-fg42egv9.js";var o=!1,{emit:e,use:t}=V();function bo(){if(o)return;o=!0,e()}function Kn(){if(!o)return;o=!1,e()}var vo=()=>t(()=>o),xo=()=>o,So=()=>typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform);
|
|
2
2
|
export{bo,Kn,vo,xo,So};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{gi}from"./chunk-index-
|
|
1
|
+
import{gi}from"./chunk-index-fg42egv9.js";function ot(r,i){let s=new Map;for(let e of r.order){let n=r.rooms[e]?.view;if(n)s.set(e,n)}let l=new Set([...s].filter(([,e])=>e.kind!=="thread").map(([e])=>e)),o=(e)=>{let n=s.get(e);return n!==void 0&&n.kind!=="thread"&&!n.home&&!gi(n,l)},p=new Set,f=(e)=>e.filter((n)=>{if(!o(n)||p.has(n))return!1;return p.add(n),!0}),u=f(r.pins),c=r.folders.map((e)=>({id:e.id,name:e.name,rooms:f(e.rooms)})),k=[],t={},d={open:[],closed:[]},a=[],m=0;for(let[e,n]of s)if(m+=1,n.kind==="thread"||gi(n,l)){let h=n.helper?.parent??n.parent,y=d;if(h&&l.has(h))y=t[h]??{open:[],closed:[]},t[h]=y;(n.closed?y.closed:y.open).push(e)}else if(n.home)k.push(e);else if(!p.has(e))a.push({key:e,index:m,at:i(e)});a.sort((e,n)=>e.at===n.at?e.index-n.index:n.at-e.at);let g=a.map((e)=>e.key),w=(e)=>s.get(e)?.kind;return{home:k,pinned:u,folders:c,rest:g,restAgents:g.filter((e)=>w(e)==="agent"),restGroups:g.filter((e)=>w(e)==="group"),threads:t,orphans:d}}function Ts(r,i,s,l=!1){let o=ot(r,i),p=new Map(r.order.map((t,d)=>[t,d])),f=(t)=>[...t].sort((d,a)=>{let m=i(d),g=i(a);return m===g?(p.get(d)??0)-(p.get(a)??0):g-m}),u=f([...o.home,...o.pinned,...o.folders.flatMap((t)=>t.rooms),...o.rest].filter(s)),c=(t)=>t.filter((d)=>!u.includes(d));return[{id:"waiting",keys:u},{id:"home",keys:c(o.home)},{id:"pinned",keys:c(o.pinned)},...o.folders.map((t)=>({id:t.id,title:t.name,keys:c(t.rooms)})),{id:"rest",keys:c(f(o.rest))}].filter((t)=>t.keys.length>0||l&&t.id!=="waiting"&&t.id!=="home")}function Nt(r,i){if(r.pinned.includes(i))return{kind:"pinned",siblings:r.pinned};let s=r.folders.find((l)=>l.rooms.includes(i));return s?{kind:"folder",folder:s.id,siblings:s.rooms}:{kind:"rest"}}function Ti(r,i){let s=r.filter(i).length;if(s===0)return"none";return s===r.length?"all":"some"}
|
|
2
2
|
export{ot,Ts,Nt,Ti};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Wo,jt,er,zr,Ir,Cs,$s,Dr,Ns,Ls}from"./chunk-index-xx8jq73q.js";import"./chunk-index-kbgykazq.js";import"./chunk-index-yrmqcay4.js";export{zr as createFolder,Dr as deleteFolder,Ls as dropRoom,jt as moveRoom,Ns as muteFolder,$s as nudgeFolder,er as nudgeRoom,Wo as pinRoom,Cs as placeFolderBefore,Ir as renameFolderTo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h,t,D,un,y,d,f,No,pe,rt,Et,Re,wt}from"./chunk-index-
|
|
1
|
+
import{h,t,D,un,y,d,f,No,pe,rt,Et,Re,wt}from"./chunk-index-fg42egv9.js";import"./chunk-index-3pnvpppa.js";import"./chunk-index-y60x5jbh.js";import"./chunk-index-64rsz6pf.js";import"./chunk-index-6xqz6mg2.js";import{Br}from"./chunk-index-47vq85ye.js";import{Dn}from"./chunk-index-dvfkb699.js";import{Jt}from"./chunk-index-db8zh8e6.js";import{ee,Te}from"./chunk-index-5zmswz4s.js";import{Yr}from"./chunk-index-1kwp3spy.js";import"./chunk-index-nsvwbjfe.js";import"./chunk-index-kbgykazq.js";import"./chunk-index-yrmqcay4.js";var p=(e)=>e();async function s(e){try{await navigator.clipboard.writeText(e),f(t("Copied"))}catch{f(t("Could not copy."),"danger")}}async function c(e){try{await navigator.share(e)}catch(o){if(o instanceof DOMException&&o.name==="AbortError")return;f(t("Could not share."),"danger")}}var w=()=>(h("v1g2bzk7"),import("./chunk-bulk-actions-v1g2bzk7.js")),g=()=>typeof navigator.share==="function";function K(e,o=p){let i=y.getState().rooms[e],n=i?.view;if(!n||n.kind==="thread")return;let l=i.mode,a=n.home||n.helper?[]:Br(e,o);if(n.kind==="agent"){let r=n.name;a.push({id:"edit",label:t("Edit knight"),icon:"profile",run:()=>o(()=>rt(r))},{id:"look",label:t("Change look"),icon:"sparkle",run:()=>o(()=>rt(r,{look:!0}))})}if(n.kind==="group"){let r=n.name;a.push({id:"edit-group",label:t("Edit group"),icon:"profile",run:()=>o(()=>wt({kind:"group",name:r}))})}if(n.kind==="agent")a.push(...Yr([e]));if(!n.helper)a.push({id:"notifications",label:t("Notifications"),icon:n.muted?"bell-off":"bell",checked:!n.muted,run:async()=>{let r=n.muted!==!0;if(!await Jt(e,r))return;f(r?t("Notifications are off for {name}",{name:n.displayName}):t("Notifications are on for {name}",{name:n.displayName}))}});if(!n.readOnly)a.push({id:"yolo",label:t("Yolo mode"),icon:"bolt",tone:"yolo",checked:l.yolo,run:()=>{if(l.yolo)return Et(e,{yolo:!1});Re({kind:"yolo",room:e,name:n.displayName})}},{id:"long",label:t("Long-running mode"),icon:"timer",tone:"long",checked:l.longRunning,run:()=>Et(e,{longRunning:!l.longRunning})},{id:"start-over",label:t("Start over"),icon:"reset",tone:"danger",run:()=>Re({kind:"start-over",room:e,name:n.displayName})});if(n.helper){let{name:r,displayName:v}=n;a.push({id:"archive-helper",label:t("Archive this temp knight"),icon:"archive",tone:"danger",run:()=>w().then((b)=>b.archiveHelper(r,v))})}else if(!n.readOnly&&!n.coordinator)a.push({id:"archive",label:n.kind==="group"?t("Archive group"):t("Archive knight"),icon:"archive",tone:"danger",run:()=>Re({kind:"archive",room:e,name:n.displayName})});return{title:n.displayName,items:a}}function M(e=p){return{title:t("Add"),items:[{id:"new-agent",label:t("New knight"),icon:"profile",run:()=>e(()=>wt({kind:"new-agent"}))},{id:"new-group",label:t("New group"),icon:"rooms",run:()=>e(()=>wt({kind:"group"}))},{id:"archive-list",label:t("Archived"),icon:"archive",run:()=>e(()=>wt({kind:"archive"}))}]}}function Y(e,o){let i=e.getBoundingClientRect();pe({...M(o),at:{x:i.left,y:i.bottom},via:"key",source:e})}function _(e,o){let{rooms:i}=y.getState(),n=i[e]?.view,l=i[o]?.view;if(n?.kind!=="agent"||l?.kind!=="group")return;return{title:n.displayName,items:[{id:"chat",label:t("Private chat"),icon:"conversations",run:()=>D("room",e)},{id:"leave",label:t("Remove from the council"),icon:"close",run:()=>k(l,n)}]}}async function k(e,o){let i=(e.members??[]).filter((n)=>n!==o.name);if(i.length<Dn){Re({kind:"archive",room:e.key,name:e.displayName});return}try{let n=await ee.group(e.name);await ee.updateGroup(e.name,{members:i,...n.host===o.name?{host:i[0]??""}:{}}),await Te(),f(t("{name} left the council",{name:o.displayName}))}catch(n){f(d(n),"danger")}}function u(e,o){let i=e.querySelector(".bubble > .prose");if(!i)return o;return(i.innerText||i.textContent||o).trim()}function x(e){if(!e)return;let o=window.getSelection();if(!o)return;let i=document.createRange();i.selectNodeContents(e),o.removeAllRanges(),o.addRange(i)}function S(e){let o=window.getSelection();if(!o||o.isCollapsed)return"";return(o.anchorNode&&e.contains(o.anchorNode)?o.toString():"").trim()}function z(e,o,i){let n=[{id:"copy",label:t("Copy"),icon:"copy",run:()=>s(S(o)||u(o,e.text))},{id:"copy-markdown",label:t("Copy as Markdown"),icon:"notes",run:()=>s(e.text)}];if(i)n.push({id:"quote",label:t("Quote reply"),icon:"conversations",run:()=>No(e.room,e.text)});if(n.push({id:"select",label:t("Select text"),icon:"list",run:()=>x(o.querySelector(".bubble"))}),g())n.push({id:"share",label:t("Share"),icon:"send",run:()=>c({text:u(o,e.text)})});return{title:e.author,items:n}}function W(e,o){return{title:o,items:[{id:"profile",label:t("Knight profile"),icon:"profile",run:()=>rt(e)}]}}var m=(e)=>[e.header?`${e.header}: ${e.question}`:e.question,...e.options.map((o)=>o.description?`- ${o.label}: ${o.description}`:`- ${o.label}`)];function N(e){let o=[e.title];switch(e.kind){case"approval":{o.push("",e.message);let{approval:i}=e;if(i){if(o.push("",`${t("Tool")}: ${i.tool}`,`${t("Action")}: ${i.action}`),Object.keys(i.input).length)o.push(JSON.stringify(i.input,null,2));for(let n of i.files??[])o.push(n.path)}break}case"ask":o.push("",...m({question:e.question,options:e.options,multi:e.multi,allowOther:e.allowOther}));break;case"questionnaire":for(let i of e.questions)o.push("",...m(i));break}return o.join(`
|
|
2
2
|
`)}function X(e){return{title:e.title,items:[{id:"copy-details",label:t("Copy details"),icon:"copy",run:()=>s(N(e))}]}}function R(e){let o=document.createElement("a");o.href=un(e),o.download=e.name,o.hidden=!0,document.body.append(o),o.click(),o.remove()}async function C(e){let o=new URL(un(e),window.location.href).href;if(typeof navigator.canShare==="function")try{let i=await fetch(o);if(i.ok){let n=new File([await i.blob()],e.name,{type:e.type});if(navigator.canShare({files:[n]})){await c({files:[n],title:e.name});return}}}catch{}await c({title:e.name,url:o})}function Z(e){let o=[{id:"download",label:t("Download"),icon:"download",run:()=>R(e)}];if(g())o.push({id:"share",label:t("Share"),icon:"send",run:()=>C(e)});return{title:e.name,items:o}}export{M as addMenu,W as avatarMenu,N as cardDetails,X as cardMenu,s as copyText,Z as fileMenu,z as messageMenu,Y as openAddMenu,K as roomMenu,_ as seatMenu};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ur}from"./chunk-index-0ye10vk3.js";export{ur as ModeToggle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h,J,r,t,e,n,o,fi,u,tt,Zt,Ct}from"./chunk-index-
|
|
1
|
+
import{h,J,r,t,e,n,o,fi,u,tt,Zt,Ct}from"./chunk-index-fg42egv9.js";import{at}from"./chunk-index-af4ebmkr.js";var p=!1;function g(){if(p||typeof document>"u")return;if(p=!0,typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype)try{let i=new CSSStyleSheet;i.replaceSync(`
|
|
2
2
|
/* A note is the room's people talking among themselves: a plain, dashed card, never the accent bubble of a message to the agent. */
|
|
3
3
|
.message[data-note] .bubble,
|
|
4
4
|
.message[data-note][data-mine] .bubble {
|
|
@@ -72,4 +72,4 @@ import{h,J,r,t,e,n,o,fi,u,tt,Zt,Ct}from"./chunk-index-2e4am3hw.js";import{at}fro
|
|
|
72
72
|
font-size: var(--text-xs);
|
|
73
73
|
font-weight: var(--weight-medium);
|
|
74
74
|
}
|
|
75
|
-
`,document.head.append(s)}function v(s){if(!s.startsWith(fi))return[];try{let i=JSON.parse(s.slice(fi.length));return Array.isArray(i)?i.flatMap((a)=>typeof a?.name==="string"&&typeof a?.displayName==="string"?[{name:a.name,displayName:a.displayName}]:[]):[]}catch{return[]}}function f(s){let i=v(s.message.text),a=u((m)=>m.rooms[s.message.room]?.view?.displayName??""),[c,d]=r(!1),l={name:a,count:i.length,names:i.map((m)=>m.displayName).join(", ")};return n("li",{className:"line","data-enter":s.enter||void 0,children:[e(o,{name:"archive",size:14}),e("span",{children:i.length===1?t("{name} archived {count} temp knight: {names}",l):t("{name} archived {count} temp knights: {names}",l)}),e("button",{type:"button",className:"secondary compact",disabled:c,onClick:()=>{d(!0),(h("
|
|
75
|
+
`,document.head.append(s)}function v(s){if(!s.startsWith(fi))return[];try{let i=JSON.parse(s.slice(fi.length));return Array.isArray(i)?i.flatMap((a)=>typeof a?.name==="string"&&typeof a?.displayName==="string"?[{name:a.name,displayName:a.displayName}]:[]):[]}catch{return[]}}function f(s){let i=v(s.message.text),a=u((m)=>m.rooms[s.message.room]?.view?.displayName??""),[c,d]=r(!1),l={name:a,count:i.length,names:i.map((m)=>m.displayName).join(", ")};return n("li",{className:"line","data-enter":s.enter||void 0,children:[e(o,{name:"archive",size:14}),e("span",{children:i.length===1?t("{name} archived {count} temp knight: {names}",l):t("{name} archived {count} temp knights: {names}",l)}),e("button",{type:"button",className:"secondary compact",disabled:c,onClick:()=>{d(!0),(h("v1g2bzk7"),import("./chunk-bulk-actions-v1g2bzk7.js")).then((m)=>m.putBackHelpers(i.map((b)=>b.name)))},children:t("Undo")})]})}g();var y=J(function(i){let{message:a}=i,c=u((l)=>l.principal?.id),d=a.principalId!==void 0&&a.principalId===c;return n("li",{className:"message","data-mid":a.id,"data-note":!0,"data-mine":d||void 0,"data-header":!0,"data-enter":i.enter||void 0,children:[d?null:e("span",{className:"message-avatar",children:e(at,{picture:a.principalId===void 0?void 0:{principal:a.principalId},name:a.author})}),n("div",{className:"message-main",children:[n("div",{className:"message-meta",children:[e("strong",{children:a.author}),e("span",{className:"note-chip",children:t("Internal note")}),e("time",{dateTime:a.at,children:Zt(a.at,i.timeZone)})]}),n("div",{className:"bubble",children:[a.text?e(tt,{source:a.text}):null,e(Ct,{files:a.files})]})]})]})});function S(s){return s.message.kind==="system"?e(f,{message:s.message,enter:s.enter}):e(y,{...s})}export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X,s,N,a,r,t,c,e,n,O,d,w,g,_,P,k,Lo,ne}from"./chunk-index-
|
|
1
|
+
import{X,s,N,a,r,t,c,e,n,O,d,w,g,_,P,k,Lo,ne}from"./chunk-index-fg42egv9.js";import{be}from"./chunk-index-xevnf9ew.js";import{qe}from"./chunk-index-983dmeaa.js";import{he}from"./chunk-index-s72hmse6.js";import"./chunk-index-afrhnrxj.js";var F=[{kind:"core",label:c("Core"),hint:c("Carried into every turn.")},{kind:"note",label:c("Note"),hint:c("Searched when a knight needs them.")},{kind:"event",label:c("Events"),hint:c("Carried into every turn until their date.")}],q=300;function ae(){let{timeZone:f}=k(),{version:o}=ne(),[u,l]=r("core"),[v,y]=r(""),[b,S]=r(),[m,L]=r(),[h,C]=r(),[E,x]=r(),[D,T]=r(),V=be(()=>O.principals(),"principals").data,A=a(0),K=X(async(i)=>{let p=++A.current;try{let I=await O.notes(i.trim(),D);if(p!==A.current)return;S(I),L(void 0)}catch(I){if(p===A.current)L(d(I))}},[D]);s(()=>{let i=setTimeout(()=>void K(v),q);return()=>clearTimeout(i)},[v,K,o]);let R=(b??[]).filter((i)=>i.kind===u).sort((i,p)=>u==="event"?(i.eventDate??"").localeCompare(p.eventDate??""):i.id-p.id),W=Lo(f);return n("section",{className:"stack",children:[n("div",{className:"card-head",children:[n("div",{children:[e("h2",{children:t("Notes")}),e("p",{className:"hint",children:t("What a knight remembers. A change applies from the next turn.")})]}),e("button",{type:"button",onClick:()=>C({draft:{kind:u,fact:"",eventDate:""}}),children:t("Add")})]}),V&&V.principals.length>1?e(B,{people:V,shown:D,choose:(i)=>{S(void 0),T(i)}}):null,n("div",{className:"toolbar",children:[e("div",{className:"tabs",role:"tablist",children:F.map((i)=>n("button",{type:"button",role:"tab","aria-selected":u===i.kind,onClick:()=>l(i.kind),children:[t(i.label),b?` ${b.filter((p)=>p.kind===i.kind).length}`:""]},i.kind))}),e("input",{type:"search",placeholder:t("Search (words separated by spaces)"),"aria-label":t("Search notes"),value:v,onChange:(i)=>y(i.target.value)})]}),e("p",{className:"hint",children:t(F.find((i)=>i.kind===u)?.hint??"")}),m?e(g,{message:m}):null,!b?e(w,{}):R.length===0?e(_,{children:v?t("No matching notes."):t("Nothing of this kind yet.")}):R.map((i)=>e("article",{className:"card",children:n("div",{className:"card-head",children:[n("div",{children:[i.eventDate?n("p",{className:"meta",children:[i.eventDate," ",i.eventDate<W?e(P,{children:t("past")}):null]}):null,e("p",{className:"text",children:i.fact})]}),n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:()=>C({note:i,draft:{kind:i.kind,fact:i.fact,eventDate:i.eventDate??""}}),children:t("Edit")}),e("button",{type:"button",className:"danger",onClick:()=>x(i),children:t("Delete")})]})]})},i.id)),e(he,{open:h!==void 0,title:h?.note?t("Edit note"):t("Add note"),onClose:()=>C(void 0),children:h?e(H,{initial:h.draft,save:async(i)=>{if(h.note)await O.updateNote(h.note.id,i,D);else await O.addNote(i,D);C((p)=>p===h?void 0:p),await K(v)},cancel:()=>C(void 0)}):null}),e(he,{open:E!==void 0,title:t("Delete this note?"),onClose:()=>x(void 0),children:E?e(M,{text:E.fact,run:async()=>{await O.deleteNote(E.id,D),x((i)=>i===E?void 0:i),await K(v)},cancel:()=>x(void 0)}):null})]})}function B(f){let{people:o}=f,u=N();return n("label",{className:"inline",htmlFor:u,children:[t("Whose notes")," ",e(qe,{id:u,value:f.shown??o.self,onChange:(l)=>f.choose(l.target.value===o.self?void 0:l.target.value),children:o.principals.map((l)=>e("option",{value:l.id,children:l.id===o.self?t("{name} (you)",{name:l.name}):l.disabled?t("{name} (disabled)",{name:l.name}):l.name},l.id))})]})}function H(f){let[o,u]=r(f.initial),[l,v]=r(!1),[y,b]=r(),S=async()=>{v(!0),b(void 0);try{await f.save({kind:o.kind,fact:o.fact,...o.kind==="event"&&o.eventDate?{eventDate:o.eventDate}:{}})}catch(m){b(d(m)),v(!1)}};return n("form",{className:"stack",onSubmit:(m)=>{m.preventDefault(),S()},children:[n("fieldset",{children:[e("legend",{children:t("Kind")}),e("div",{className:"tabs",children:F.map((m)=>e("button",{type:"button","aria-pressed":o.kind===m.kind,onClick:()=>u({...o,kind:m.kind}),children:t(m.label)},m.kind))})]}),o.kind==="event"?n("label",{children:[t("Date"),e("input",{type:"date",value:o.eventDate,onChange:(m)=>u({...o,eventDate:m.target.value})})]}):null,n("label",{children:[t("Text"),e("textarea",{rows:4,value:o.fact,onChange:(m)=>u({...o,fact:m.target.value})})]}),y?e(g,{message:y}):null,n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:f.cancel,children:t("Cancel")}),e("button",{type:"submit",disabled:l,children:l?t("Saving…"):t("Save")})]})]})}function M(f){let[o,u]=r(!1),[l,v]=r();return n("div",{className:"stack",children:[e("p",{className:"text",children:f.text}),l?e(g,{message:l}):null,n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:f.cancel,children:t("Cancel")}),e("button",{type:"button",className:"danger",disabled:o,onClick:()=>{u(!0),f.run().catch((y)=>{v(d(y)),u(!1)})},children:o?t("Deleting…"):t("Delete")})]})]})}export{ae as NotesPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-index-0q15ysrb.js";import{t,e,n,o,v}from"./chunk-index-
|
|
1
|
+
import"./chunk-index-0q15ysrb.js";import{t,e,n,o,v}from"./chunk-index-fg42egv9.js";import{ni}from"./chunk-index-k0z507h3.js";import"./chunk-index-h3v1d3nt.js";function i({current:r}){let{badge:a}=ni();return n("a",{className:"icon-button bell",href:v("notices"),"aria-current":r?"page":void 0,"aria-label":a>0?t("Notices, {count} waiting",{count:a}):t("Notices"),children:[e(o,{name:"bell"}),a>0?e("span",{className:"bell-count","aria-hidden":"true",children:a>99?"99+":a}):null]})}export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s,r,t,e,n,o,d,g,_,P}from"./chunk-index-
|
|
1
|
+
import{s,r,t,e,n,o,d,g,_,P}from"./chunk-index-fg42egv9.js";import"./chunk-index-0q15ysrb.js";import{ni,Qo,Mo}from"./chunk-index-k0z507h3.js";import"./chunk-index-h3v1d3nt.js";function p(a,u){let i=Math.max(0,Math.round((u-Date.parse(a))/60000));if(i<1)return t("just now");if(i<60)return t("{count} min ago",{count:i});let c=Math.round(i/60);if(c<24)return t("{count} h ago",{count:c});return t("{count} d ago",{count:Math.round(c/24)})}function f({notice:a}){let[u,i]=r(!1),[c,l]=r();return n("li",{className:"card stack notice","data-urgent":a.urgency==="high"||void 0,children:[n("div",{className:"card-head",children:[e("strong",{children:a.title}),a.urgency==="high"?e(P,{tone:"warn",children:t("Urgent")}):null]}),a.body?e("p",{children:a.body}):null,e("p",{className:"meta",children:p(a.raisedAt,Date.now())}),c?e(g,{message:c}):null,n("div",{className:"actions",children:[a.open?e("a",{className:"button",href:Mo(a.open),children:t("Open")}):null,a.ackable?a.acked?n("span",{className:"meta",children:[e(o,{name:"check",size:14})," ",t("Handled")]}):e("button",{type:"button",className:"secondary",disabled:u,onClick:async()=>{i(!0),l(void 0);try{await Qo(a.tag)}catch(m){l(d(m))}finally{i(!1)}},children:t("Handled")}):null]})]})}function E(){let{notices:a,known:u}=ni(),[,i]=r(0);return s(()=>{let c=setInterval(()=>i((l)=>l+1),60000);return()=>clearInterval(c)},[]),n("div",{className:"page",children:[e("header",{className:"page-head",children:e("h1",{children:t("Notices")})}),a.length===0?e(_,{children:u?t("Nothing needs you."):t("Loading…")}):e("ul",{className:"stack notices",children:a.map((c)=>e(f,{notice:c},c.tag))})]})}export{E as NoticesPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X,s,a,r,t,m,e,n,o,v,d,w,g,zn,Hi}from"./chunk-index-
|
|
1
|
+
import{X,s,a,r,t,m,e,n,o,v,d,w,g,zn,Hi}from"./chunk-index-fg42egv9.js";import{K}from"./chunk-index-p5jcwjx8.js";import"./chunk-index-0q15ysrb.js";import{En,sn}from"./chunk-index-n05yw5wd.js";import"./chunk-index-afrhnrxj.js";import{de}from"./chunk-index-h3v1d3nt.js";var _=90000,C=2000,V=()=>typeof matchMedia==="function"&&(matchMedia("(display-mode: standalone)").matches||navigator.standalone===!0),F=()=>/iPhone|iPad/.test(navigator.userAgent);function z({step:i,view:b,refresh:p}){let[c,u]=r(),[l,h]=r(i.done?"arrived":"idle"),[S,y]=r(),[T,N]=r(!1),[I,O]=r(!1),k=a(void 0);s(()=>(zn().then(u,()=>u("unsupported")),()=>clearTimeout(k.current)),[]),s(()=>{if(i.done)h("arrived")},[i.done]);let L=X((f)=>{let A=async()=>{if((await p())?.steps.find((M)=>M.id===i.id)?.done){h("arrived");return}if(Date.now()-f>_){h("late");return}k.current=setTimeout(A,C)};k.current=setTimeout(A,C)},[p,i.id]),D=async()=>{N(!0),y(void 0),h("sending");try{await de.pushTest(),h("waiting"),L(Date.now())}catch(f){h("idle"),y(d(f))}finally{N(!1)}},E=async()=>{N(!0),y(void 0);try{await Hi(),u(await zn()),await p()}catch(f){y(f instanceof Error&&f.message==="permission"?t("Notifications were not allowed. Allow them in the browser's site settings."):d(f)),u(await zn().catch(()=>"unsupported"))}finally{N(!1)}},P=c==="unsupported"&&F()&&!V();return n("section",{className:"card stack","aria-labelledby":`step-${i.id}`,children:[n("div",{className:"card-head",children:[e("h2",{id:`step-${i.id}`,children:En(i)}),i.done?n("span",{className:"meta",children:[e(o,{name:"check",size:14})," ",t("Done")]}):null]}),e("p",{className:"meta",children:sn(i)}),n("ol",{className:"steps",children:[n("li",{"data-done":c==="on"||P===!1||void 0,children:[e("strong",{children:t("Put the app on your phone")}),e("span",{className:"meta",children:P?t("On iPhone and iPad, open this page in Safari, tap Share, then Add to Home Screen, and open the app from there."):V()?t("This page is installed on this device."):t("On a phone, add it to the home screen from the browser's menu so notifications reach you when it is closed.")})]}),n("li",{"data-done":c==="on"||void 0,children:[e("strong",{children:t("Allow notifications")}),c==="blocked"?e("span",{className:"meta",children:t("Notifications are blocked for this site. Allow them in the browser's site settings.")}):c==="unsupported"?e("span",{className:"meta",children:t("This browser cannot get push notifications.")}):c==="on"?e("span",{className:"meta",children:t("Allowed on this device.")}):e("button",{type:"button",disabled:T||c===void 0,onClick:E,children:t("Allow notifications")})]}),n("li",{"data-done":i.done||void 0,children:[e("strong",{children:t("Send a test")}),l==="arrived"?e("span",{className:"meta",children:t("It arrived. Notifications work on this device.")}):n(m,{children:[e("button",{type:"button",className:"secondary",disabled:T||c!=="on"||l==="waiting",onClick:D,children:l==="waiting"?t("Waiting for it…"):t("Send a test notification")}),l==="late"?e("span",{className:"meta",children:t("It has not arrived. Check that notifications are allowed for this app, then send another.")}):null]})]})]}),S?e(g,{message:S}):null,i.waiver&&!i.done&&!i.waived?n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:()=>O(!0),children:t(i.waiver.label)}),e(K,{open:I,title:t(i.waiver.label),confirmLabel:t("Skip"),onClose:()=>O(!1),onConfirm:async()=>{await de.waive(i.id),await p()},children:e("p",{children:t(i.waiver.confirm)})})]}):null,b.push.devices>0&&!i.done?e("p",{className:"meta",children:t("{count} device(s) will get notifications.",{count:b.push.devices})}):null]})}function j(){let[i,b]=r(),[p,c]=r(),u=X(async()=>{try{let l=await de.onboarding();return b(l),l}catch(l){c(d(l));return}},[]);if(s(()=>{u()},[u]),p&&!i)return e(g,{message:p});if(!i)return e(w,{});return n("div",{className:"page",children:[e("header",{className:"page-head",children:e("h1",{children:t("Finish setting up")})}),i.steps.map((l)=>l.builtin==="push"?e(z,{step:l,view:i,refresh:u},l.id):n("section",{className:"card stack",children:[n("div",{className:"card-head",children:[e("strong",{children:En(l)}),l.done||l.waived?n("span",{className:"meta",children:[e(o,{name:"check",size:14})," ",l.done?t("Done"):t("Skipped")]}):e("a",{className:"button-link",href:v(l.open.page),children:t("Open")})]}),e("p",{className:"meta",children:sn(l)})]},l.id)),i.steps.length===0?e("p",{className:"empty",children:t("There is nothing left to set up.")}):null]})}export{j as OnboardingPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,t,c,m,e,n,v,O,d,w,g,_,P,k,_e,re,Me,Ui,fn,pi,ne}from"./chunk-index-
|
|
1
|
+
import{r,t,c,m,e,n,v,O,d,w,g,_,P,k,_e,re,Me,Ui,fn,pi,ne}from"./chunk-index-fg42egv9.js";import{be}from"./chunk-index-xevnf9ew.js";import{he}from"./chunk-index-s72hmse6.js";import"./chunk-index-afrhnrxj.js";function f(a){let{cleanup:i}=k(),[u,p]=r(),[l,o]=r(!1),[h,s]=r();if(!i)return null;let b=()=>{if(!l)p(void 0),s(void 0)};return n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",onClick:()=>p("start-over"),children:t("Start over")}),a.deletable?e("button",{type:"button",className:"danger",onClick:()=>p("delete"),children:t("Delete")}):null,n(he,{open:u!==void 0,title:u==="delete"?t("Permanently delete {name}?",{name:a.title}):t("Start over {name}?",{name:a.title}),onClose:b,children:[e("p",{children:u==="delete"?t("The live conversation and all archives will be permanently deleted. Memory and schedules are preserved."):t("The current conversation will be archived; the next message starts a new one. Long-term memory is preserved. Active turns finish first.")}),h?e(g,{message:h}):null,n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",disabled:l,onClick:b,children:t("Cancel")}),e("button",{type:"button",className:u==="delete"?"danger":"",disabled:l,onClick:async()=>{if(!u)return;o(!0),s(void 0);try{if(u==="delete")await O.deleteConversation(a.channel);else await O.startOver(a.channel);p(void 0),a.refresh()}catch(I){s(d(I))}finally{o(!1)}},children:l?u==="delete"?t("Deleting…"):a.busy?t("Waiting for this turn…"):t("Starting over…"):u==="delete"?t("Delete permanently"):t("Start over")})]})]})]})}function q(){let a=k(),{now:i}=ne(),[u,p]=r(0),l=()=>p((s)=>s+1),{data:o,error:h}=be(()=>O.overview(),`overview:${u}`);if(!o)return h?e(g,{message:h}):e(w,{});return n(m,{children:[h?e(g,{message:h}):null,n("section",{className:"stack",children:[e("h2",{children:t("Bot server")}),e("p",{className:"hint",children:t("Knight and group status; starting over archives the conversation and preserves memory.")}),o.agents.length+o.groups.length===0?e(_,{children:t("No knights.")}):null,o.agents.map((s)=>e(A,{agent:s,groups:o.groups,agents:o.agents,guildId:o.guildId,now:i,refresh:l},s.name)),o.groups.map((s)=>e(C,{group:s,guildId:o.guildId,now:i,timeZone:a.timeZone,refresh:l},s.name))]}),n("section",{className:"stack",children:[e("h2",{children:t("My workspaces")}),e("p",{className:"hint",children:t("Direct messages and channels where you mention a knight. Start over archives; delete removes every archive permanently.")}),o.workspaces?.length?o.workspaces.map((s)=>e(N,{conversation:s,schedules:s.schedules,now:i,refresh:l},s.key)):e(_,{children:t("No workspaces.")})]}),n("section",{className:"stack",children:[e("h2",{children:t("Outside AI client conversations")}),e("p",{className:"hint",children:t("Conversations opened through remote MCP; after deletion the session ID cannot be resumed.")}),o.outside?.length?o.outside.map((s)=>e(N,{conversation:s,now:i,refresh:l},s.key)):e(_,{children:t("No outside AI client conversations.")})]}),n("section",{className:"stack",children:[e("h2",{children:t("Party channels")}),e("p",{className:"hint",children:t("Starting over stops the container and archives role conversations; each speaker's memory is preserved.")}),o.party?.length?o.party.map((s)=>e(x,{party:s,now:i,refresh:l},s.key)):e(_,{children:t("No party channels.")})]})]})}function y({busy:a}){return e(P,{tone:a?"busy":"plain",children:a===0?t("idle"):a===1?t("Working"):t("Working, {count} waiting",{count:a-1})})}function C(a){let{group:i,now:u,timeZone:p}=a;return n("article",{className:"card",children:[n("div",{className:"card-head",children:[i.channelId?e("a",{href:pi(i.channelId,a.guildId),target:"_blank",rel:"noreferrer",children:i.displayName}):e("strong",{children:i.displayName}),e(P,{children:t("Group")}),e(y,{busy:i.busy})]}),e("p",{children:t("Members: {members} | Host: {host}",{members:i.members.join(", "),host:i.host})}),n("p",{className:"hint",children:[t("Last active")," ",_e(i.lastActive,u,p)]}),i.channelId?e(f,{channel:`discord:${i.channelId}`,title:i.displayName,busy:i.busy>0,refresh:a.refresh}):null]})}function A(a){let{agent:i}=a,{timeZone:u,panes:p}=k(),l=a.groups.find((s)=>s.channelId===i.workingIn),o=a.agents.find((s)=>s.channelId===i.workingIn),h=!i.workingIn?void 0:i.workingIn===i.channelId?t("Working in own channel"):l?t("Working in group {name}",{name:l.displayName}):o?t("Replying in {name}'s channel",{name:o.displayName}):t("Replying in another channel");return n("article",{className:"card",children:[n("div",{className:"card-head",children:[e("strong",{children:i.channelId?e("a",{href:pi(i.channelId,a.guildId),target:"_blank",rel:"noreferrer",children:i.displayName}):i.displayName}),e(P,{children:"agent"}),i.workingIn?e(y,{busy:1+i.waiting}):i.waiting>0?e(P,{tone:"busy",children:t("{count} waiting",{count:i.waiting})}):e(P,{children:t("idle")})]}),h?e("p",{children:h}):null,n("dl",{className:"facts",children:[n("div",{children:[e("dt",{children:t("Model")}),n("dd",{children:[i.model," · thinking ",i.thinking]})]}),n("div",{children:[e("dt",{children:t("Context")}),e("dd",{children:i.context?i.context.tokens===null?t("Just compacted (limit {limit})",{limit:Ui(i.context.contextWindow)}):`${Ui(i.context.tokens)} / ${Ui(i.context.contextWindow)} (${Math.round(i.context.tokens/i.context.contextWindow*100)}%)`:"—"})]}),n("div",{children:[e("dt",{children:t("Schedules")}),e("dd",{children:i.schedules})]}),n("div",{children:[e("dt",{children:t("Last active")}),e("dd",{children:_e(i.lastActive,a.now,u)})]})]}),i.channelId?n(m,{children:[e(f,{channel:`discord:${i.channelId}`,title:i.displayName,busy:!!i.workingIn||i.waiting>0,refresh:a.refresh}),p.includes("conversations")?e("a",{href:v("conversations",`discord:${i.channelId}`),children:t("transcript")}):null]}):null]})}function N({conversation:a,schedules:i,now:u,refresh:p}){let{timeZone:l,panes:o}=k(),{title:h,detail:s}=a.kind==="outside"?{title:a.firstMessage||t("(No messages)"),detail:a.id}:fn(a.channel,a.id);return n("article",{className:"card",children:[n("div",{className:"card-head",children:[e("strong",{children:a.channel&&a.channel.kind!=="gone"?e("a",{href:pi(a.id,a.channel.kind==="guild"?a.channel.guildId:void 0),target:"_blank",rel:"noreferrer",children:h}):h}),e(y,{busy:a.busy})]}),s?e("p",{className:"hint",children:s}):null,e("p",{children:a.liveBytes>0?t("Conversation {size} · Archives {count}",{size:Me(a.liveBytes),count:a.archives}):t("No live conversation · Archives {count}",{count:a.archives})}),a.startedAt?n("p",{children:[t("Started")," ",re(a.startedAt,l)]}):null,n("p",{className:"hint",children:[i!==void 0?`${t("Schedules")} ${i} · `:"",t("Last active")," ",_e(a.lastActive,u,l)]}),e(f,{channel:a.key,title:h,busy:a.busy>0,deletable:!0,refresh:p}),o.includes("conversations")?e("a",{href:v("conversations",a.key),children:t("transcript")}):null]})}function x({party:a,now:i,refresh:u}){let{timeZone:p}=k(),{title:l,detail:o}=fn(a.channel,a.channelId),h={running:c("Container running"),stopped:c("Container stopped"),missing:c("No container yet"),unknown:c("Container status unknown")};return n("article",{className:"card",children:[n("div",{className:"card-head",children:[e("strong",{children:a.channel.kind!=="gone"?e("a",{href:pi(a.channelId,a.channel.kind==="guild"?a.channel.guildId:void 0),target:"_blank",rel:"noreferrer",children:l}):l}),e(P,{children:a.profile}),e(P,{children:t(h[a.container])}),e(y,{busy:a.busy})]}),o?e("p",{className:"hint",children:o}):null,e("p",{children:t("Enabled by {name} at {time}",{name:a.enabledBy,time:re(a.enabledAt,p)})}),n("p",{className:"hint",children:[t("Last active")," ",_e(a.lastActive,i,p)]}),e(f,{channel:a.key,title:l,busy:a.busy>0,refresh:u})]})}export{q as OverviewPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s,M,a,r,t,e,n,o,v,D,u,nt,ue}from"./chunk-index-
|
|
1
|
+
import{s,M,a,r,t,e,n,o,v,D,u,nt,ue}from"./chunk-index-fg42egv9.js";import{L}from"./chunk-index-afrhnrxj.js";import{ii}from"./chunk-index-ak6ecqy3.js";function A(m){let[f,g]=r(""),[p,h]=r(0),b=a(null),y=u((l)=>l.order.flatMap((i)=>{let c=l.rooms[i]?.view;return c?[{key:i,name:c.displayName,agent:c.name,character:c.character,kind:c.kind}]:[]})),d=M(()=>[...y.map((i)=>({id:i.key,label:i.name,hint:i.kind==="agent"?t("Knight"):i.kind==="group"?t("Group"):t("Thread"),room:!0,...i.kind==="agent"?{avatar:{name:i.agent,character:i.character}}:{icon:"conversations"},go:()=>D("room",i.key)})),...m.pages.map((i)=>({id:i.pane,label:i.label,hint:t("Page"),icon:i.icon,go:()=>D(i.pane)}))].flatMap((i)=>{let c=ii(f,i.label);return c===void 0?[]:[{target:i,score:c}]}).sort((i,c)=>c.score-i.score).map((i)=>i.target).slice(0,12),[y,m.pages,f]);s(()=>h(0),[f]),s(()=>{if(m.open)g(""),requestAnimationFrame(()=>b.current?.focus())},[m.open]);let k=(l)=>{if(!l)return;m.onClose(),l.go()};return e(L,{open:m.open,title:t("Find a room"),onClose:m.onClose,variant:"palette",children:n("div",{className:"palette-box",children:[n("div",{className:"palette-input",children:[e(o,{name:"search",size:18}),e("input",{ref:b,value:f,placeholder:t("Find a room or page"),"aria-label":t("Find a room or page"),role:"combobox","aria-expanded":"true","aria-controls":"palette-list","aria-activedescendant":d[p]?`palette-${p}`:void 0,onChange:(l)=>g(l.target.value),onKeyDown:(l)=>{if(nt(l.nativeEvent))return;if(l.key==="ArrowDown")l.preventDefault(),h((i)=>Math.min(d.length-1,i+1));else if(l.key==="ArrowUp")l.preventDefault(),h((i)=>Math.max(0,i-1));else if(l.key==="Enter")l.preventDefault(),k(d[p])}}),e("kbd",{children:"Esc"})]}),n("ul",{className:"palette-list",children:[d.length===0?e("li",{className:"palette-empty",children:t("Nothing matches.")}):null,d.map((l,i)=>e("li",{"data-active":i===p||void 0,children:n("a",{href:l.room?v("room",l.id):v(l.id),onClick:(c)=>{c.preventDefault(),k(l)},onMouseMove:()=>h(i),"aria-current":i===p?"true":void 0,children:[l.avatar?e(ue,{spec:l.avatar.character,name:l.avatar.name,size:28,live:!1}):e("span",{className:"palette-icon",children:e(o,{name:l.icon??"list",size:16})}),e("span",{className:"palette-label",children:l.label}),e("span",{className:"meta",children:l.hint})]})},l.id))]})]})})}export{A as Palette};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Br,Xs}from"./chunk-index-47vq85ye.js";import"./chunk-index-6xqz6mg2.js";import"./chunk-index-1kwp3spy.js";import"./chunk-index-nsvwbjfe.js";import"./chunk-index-y60x5jbh.js";import"./chunk-index-3pnvpppa.js";import"./chunk-index-kbgykazq.js";import"./chunk-index-yrmqcay4.js";export{Xs as folderMenu,Br as placementItems};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{X,s,a,r,t,c,m,e,n,o,O,d,w,g,P,ji}from"./chunk-index-
|
|
1
|
+
import{X,s,a,r,t,c,m,e,n,o,O,d,w,g,P,ji}from"./chunk-index-fg42egv9.js";import{K}from"./chunk-index-p5jcwjx8.js";import"./chunk-index-0q15ysrb.js";import"./chunk-index-afrhnrxj.js";import{de}from"./chunk-index-h3v1d3nt.js";var T=3000;function B({profile:i}){return n("div",{className:"who",children:[i.picture?e("img",{className:"who-picture",src:`api/people/${encodeURIComponent(i.principal)}/picture`,alt:""}):e("span",{className:"who-initial","aria-hidden":"true",children:Array.from(i.name)[0]??"?"}),n("div",{className:"stack",children:[e("strong",{children:i.name}),i.tier?n("span",{className:"meta",children:[e(o,{name:"shield",size:14})," ",t(F[i.tier])]}):null]})]})}function R({link:i,labels:C,changed:u}){let[l,p]=r(),[f,k]=r(!1),[L,V]=r(),[y,b]=r(!1),N=i.pending!==void 0||l!==void 0,q=a(void 0);s(()=>{if(!N||i.linked)return;return q.current=setInterval(()=>{de.links().then((v)=>{let I=v.links.find((A)=>A.provider===i.provider);if(I)u(I)},()=>{return})},T),()=>clearInterval(q.current)},[N,i.linked,i.provider,u]);let S=async(v)=>{k(!0),V(void 0);try{await v()}catch(I){V(d(I))}finally{k(!1)}},h=i.blockedBy.length>0;return n("li",{className:"card stack",children:[n("div",{className:"card-head",children:[e("strong",{children:i.label}),i.linked?n("span",{className:"meta",children:[e(o,{name:"check",size:14})," ",t("Linked"),i.linked.displayName?` · ${i.linked.displayName}`:""]}):i.step==="required"?e(P,{tone:"warn",children:t("Required")}):i.step==="nudge"?e(P,{children:t("Recommended")}):null]}),L?e(g,{message:L}):null,i.linked?i.linked.locked?e("p",{className:"meta",children:t("The server's configuration links this account.")}):n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",disabled:f,onClick:()=>b(!0),children:t("Unlink")}),e(K,{open:y,title:t("Unlink {name}?",{name:i.label}),confirmLabel:t("Unlink"),tone:"danger",onClose:()=>b(!1),onConfirm:async()=>{u(await de.unlink(i.provider)),p(void 0)},children:e("p",{children:t("The app will no longer know this account is yours. You can link it again later.")})})]}):N?n("div",{className:"stack",children:[l?n(m,{children:[e("p",{children:l.instructions}),e("p",{className:"meta",children:t("Your code")}),e("code",{className:"link-code",children:l.code}),e("p",{className:"meta",children:t("The code works until {time}.",{time:new Date(l.expiresAt).toLocaleTimeString()})})]}):e("p",{className:"meta",children:t("A code is waiting to be used.")}),i.pending?.redeemedBy?n("p",{children:[e(o,{name:"check",size:14})," ",t("{name} used the code. Confirm that this is you.",{name:i.pending.redeemedBy.displayName})]}):null,n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",disabled:f,onClick:()=>S(async()=>{u(await de.cancelLink(i.provider)),p(void 0)}),children:t("Cancel")}),e("button",{type:"button",disabled:f,onClick:()=>S(async()=>{let v=l?.request??i.pending?.request;if(!v)return;u(await de.confirmLink(i.provider,v)),p(void 0)}),children:t("I did it")})]})]}):n("div",{className:"stack",children:[h?e("p",{className:"meta",children:t("Link {name} first.",{name:i.blockedBy.map((v)=>C[v]??v).join(", ")})}):null,e("div",{className:"actions",children:e("button",{type:"button",disabled:f||h,onClick:()=>S(async()=>{p(await de.issueLink(i.provider)),u((await de.links()).links.find((v)=>v.provider===i.provider)??i)}),children:t("Link")})})]})]})}function E(){let i=Intl.DateTimeFormat().resolvedOptions().timeZone,[C,u]=r(),[l,p]=r({start:"22:00",end:"07:00"}),[f,k]=r(!1),[L,V]=r(!1),[y,b]=r(),[N,q]=r();s(()=>{de.pushPrefs().then((h)=>{if(u(h.quiet),h.quiet)p(h.quiet);k(!0)},()=>k(!0))},[]);let S=async(h)=>{V(!0),q(void 0),b(void 0);try{await h()}catch(v){q(d(v))}finally{V(!1)}};if(!f)return null;return n("section",{className:"card stack",children:[e("h2",{children:t("Notifications")}),e("p",{className:"meta",children:t("In your quiet hours a normal notice waits in the bell instead of ringing your phone. An urgent one still rings.")}),n("div",{className:"quiet-row",children:[n("label",{children:[t("From")," ",e("input",{type:"time",value:l.start,onChange:(h)=>p({...l,start:h.target.value})})]}),n("label",{children:[t("To")," ",e("input",{type:"time",value:l.end,onChange:(h)=>p({...l,end:h.target.value})})]}),e("span",{className:"meta",children:i})]}),N?e(g,{message:N}):null,y?e("p",{className:"meta",children:y}):null,n("div",{className:"actions",children:[C?e("button",{type:"button",className:"secondary",disabled:L,onClick:()=>S(async()=>{await de.setPushPrefs(null),u(void 0)}),children:t("Turn off quiet hours")}):null,e("button",{type:"button",className:"secondary",disabled:L,onClick:()=>S(async()=>{await de.pushTest(),b(t("A test notification is on its way."))}),children:t("Send a test notification")}),e("button",{type:"button",disabled:L||l.start===l.end,onClick:()=>S(async()=>{let h=await de.setPushPrefs({...l,timeZone:i});u(h.quiet)}),children:t("Save")})]})]})}function z({profile:i,changed:C}){let[u,l]=r();if(i.sources.length===0)return null;let p=async(f)=>{l(void 0);try{C(await de.chooseSource(f))}catch(k){l(d(k))}};return n("section",{className:"card stack",children:[e("h2",{children:t("Shown as")}),e("p",{className:"meta",children:t("The name and picture of this account are what others see in the app.")}),n("fieldset",{className:"choice",children:[e("legend",{className:"visually-hidden",children:t("Shown as")}),n("label",{children:[e("input",{type:"radio",name:"shown-as",checked:i.source===void 0,onChange:()=>p(null)}),t("Automatic")]}),i.sources.map((f)=>n("label",{children:[e("input",{type:"radio",name:"shown-as",checked:i.source===f.provider,onChange:()=>p(f.provider)}),t(f.label)]},f.provider))]}),u?e(g,{message:u}):null]})}function W(){let[i,C]=r(),[u,l]=r(),[p,f]=r(),[k,L]=r();s(()=>{O.session().then(C,(y)=>L(d(y))),de.profile().then(l,()=>{return}),de.links().then(f,()=>{return})},[]);let V=X((y)=>{f((b)=>b?{links:b.links.map((N)=>N.provider===y.provider?y:N)}:b),de.profile().then(l,()=>{return})},[]);if(k)return e(g,{message:k});if(!i)return e(w,{});return n("div",{className:"page",children:[e("header",{className:"page-head",children:e("h1",{children:t("Profile")})}),n("section",{className:"card stack",children:[e("h2",{children:t("Account")}),u?e(B,{profile:u}):e("p",{className:"meta",children:t("Signed in as {name}.",{name:i.principal.name})}),e(ji,{auth:i.auth})]}),p&&p.links.length>0?n("section",{className:"stack",children:[e("h2",{children:t("Your accounts")}),e("ul",{className:"stack notices",children:p.links.map((y)=>e(R,{link:y,labels:Object.fromEntries(p.links.map((b)=>[b.provider,b.label])),changed:V},y.provider))})]}):null,u?e(z,{profile:u,changed:l}):null,i.push?e(E,{}):null]})}var F={owner:c("Owner"),admin:c("Admin"),member:c("Member")};export{W as ProfilePage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s,r,t,e,n,d,w,g,_,P,k,re}from"./chunk-index-
|
|
1
|
+
import{s,r,t,e,n,d,w,g,_,P,k,re}from"./chunk-index-fg42egv9.js";import{mt}from"./chunk-index-eq161yvp.js";import{L}from"./chunk-index-afrhnrxj.js";function T(a){let{open:m,load:v}=a,{timeZone:y}=k(),[i,f]=r(),[u,p]=r(),[h,b]=r();s(()=>{if(!m)return;let o=!0;return f(void 0),p(void 0),b(void 0),v().then((c)=>o&&f(c),(c)=>o&&p(d(c))),()=>{o=!1}},[m]);let l=i?.find((o)=>o.id===h);return e(L,{open:m,title:a.title,size:"wide",onClose:a.onClose,children:n("div",{className:"stack history",children:[u?e(g,{message:u}):null,!i&&!u?e(w,{}):null,i?.length===0?e(_,{children:t("No changes have been kept yet.")}):null,i&&i.length>0?e("ul",{className:"menu",children:i.map((o)=>e("li",{children:n("button",{type:"button",className:"menu-item","aria-pressed":o.id===h,onClick:()=>b(o.id),children:[n("span",{className:"menu-text",children:[e("strong",{children:o.by}),e("span",{className:"meta",children:re(o.at,y)})]}),o.revert?e(P,{children:t("Back to the file version")}):null]})},o.id))}):null,l?n("section",{className:"stack","aria-label":t("This change"),children:[e(mt,{label:t("This change"),before:l.previous,after:l.text}),e("p",{className:"meta",children:t("It goes into the editor, where you read it over and save it to put it in force.")}),e("div",{className:"actions",children:e("button",{type:"button",onClick:()=>a.onUse(l.text),children:t("Use this text")})})]}):null]})})}export{T as HistorySheet};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h,Q,S,X,s,N,r,t,c,m,e,n,o,ce,d,f,w,g,_,P,k,re}from"./chunk-index-
|
|
1
|
+
import{h,Q,S,X,s,N,r,t,c,m,e,n,o,ce,d,f,w,g,_,P,k,re}from"./chunk-index-fg42egv9.js";import{Ne,mt}from"./chunk-index-eq161yvp.js";import{L}from"./chunk-index-afrhnrxj.js";var G={"Shared prompt":c("Shared prompt"),"Guest prompt":c("Guest prompt"),"The base every knight's prompt starts with, the main knight's included.":c("The base every knight's prompt starts with, the main knight's included."),"Used instead of the shared prompt when the person speaking is not the owner.":c("Used instead of the shared prompt when the person speaking is not the owner.")},C=(l)=>t(G[l]??l);var M=S(()=>(h("zcfvr3r8"),import("./chunk-prompt-history-zcfvr3r8.js")).then((l)=>({default:l.HistorySheet}))),O=S(()=>(h("x8w877bz"),import("./chunk-confirm-x8w877bz.js")).then((l)=>({default:l.Confirm})));function pe(){let{timeZone:l}=k(),[R,i]=r(),[u,y]=r(),[v,x]=r(),E=X(()=>{Ne.prompts().then((p)=>i(p.documents),(p)=>y(d(p)))},[]);return s(E,[E]),n("div",{className:"page",children:[e("header",{className:"page-head",children:e("h1",{children:t("Main prompts")})}),e("p",{className:"hint",children:t("The texts the main knight and the other knights start from. A text you save here replaces the one from the file from the next turn on, until you go back to the file's.")}),u?e(g,{message:u}):null,!R&&!u?e(w,{}):null,R?.length===0?e(_,{children:t("No prompts to edit.")}):null,R?.map((p)=>n("article",{className:"card stack",children:[n("div",{className:"card-head",children:[e("strong",{children:C(p.label)}),p.differs?e(P,{tone:"warn",children:t("Differs from the file version")}):null,p.broken?e(P,{tone:"warn",children:t("File version cannot be read")}):null]}),p.description?e("p",{children:C(p.description)}):null,p.override?e("p",{className:"hint",children:t("Set by {name}, {time}",{name:p.override.by,time:re(p.override.at,l)})}):null,e("div",{className:"actions",children:e("button",{type:"button",onClick:()=>x(p.id),children:t("Edit")})})]},p.id)),v?e(Z,{id:v,onClose:()=>{x(void 0),E()}}):null]})}function Z({id:l,onClose:R}){let[i,u]=r(),[y,v]=r(""),[x,E]=r(),[p,T]=r(!1),[B,D]=r(!1),[V,H]=r(!1),[F,z]=r(!1),A=N();s(()=>{let a=!0;return Ne.prompt(l).then((b)=>{if(!a)return;u(b),v(b.text)},(b)=>a&&E(d(b))),()=>{a=!1}},[l]);let I=async()=>{if(!i)return;D(!0);try{let a=await Ne.savePrompt(l,{text:y,base:i.text});u(a),v(a.text),T(!1),f(t("Saved."))}catch(a){if(a instanceof ce&&a.status===409){let{current:b}=a.body;u(b),f(a.message,"danger")}else f(d(a),"danger")}finally{D(!1)}},U=i!==void 0&&y!==i.text;return n(L,{open:!0,title:i?C(i.label):t("Main prompts"),size:"full",onClose:R,children:[x?e(g,{message:x}):null,!i&&!x?e(w,{}):null,i?.broken?e(g,{message:t("The file version of this prompt cannot be read, so it cannot be changed here until it can: {reason}",{reason:i.broken})}):null,i&&!i.broken?n("div",{className:"stack",children:[i.differs?e("p",{className:"hint",children:e(P,{tone:"warn",children:t("Differs from the file version")})}):null,p?n("section",{className:"stack review","aria-label":t("Review changes"),children:[e("h3",{children:t("Review changes")}),e(mt,{label:t("Prompt"),before:i.text,after:y}),n("div",{className:"actions",children:[e("button",{type:"button",className:"secondary",disabled:B,onClick:()=>T(!1),children:t("Back to editing")}),e("button",{type:"button",disabled:B,onClick:I,children:B?t("Saving…"):t("Save")})]})]}):n(m,{children:[n("div",{className:"field",children:[n("div",{className:"field-head",children:[e("label",{htmlFor:A,children:t("Prompt")}),e("span",{className:"field-tools",children:n("button",{type:"button",className:"secondary compact","aria-haspopup":"dialog",onClick:()=>H(!0),children:[e(o,{name:"reset",size:16}),t("History")]})})]}),e("textarea",{id:A,className:"prompt-full",value:y,maxLength:i.maxChars,onChange:(a)=>v(a.target.value)})]}),n("div",{className:"actions",children:[i.override?e("button",{type:"button",className:"secondary",onClick:()=>z(!0),children:t("Revert to the file version")}):null,e("button",{type:"button",disabled:!U||!y.trim(),onClick:()=>T(!0),children:t("Review changes")})]})]}),V?e(Q,{fallback:null,children:e(M,{open:V,title:t("History of {name}",{name:C(i.label)}),load:async()=>(await Ne.promptHistory(l)).versions.map((a)=>({id:a.id,text:a.text,previous:a.previous,by:a.by,at:a.at,revert:a.action==="revert"})),onUse:(a)=>{v(a),T(!1),H(!1)},onClose:()=>H(!1)})}):null,F?e(Q,{fallback:null,children:e(O,{open:F,title:t("Revert {name} to the file version?",{name:C(i.label)}),confirmLabel:t("Revert to the file version"),tone:"danger",onConfirm:async()=>{try{let a=await Ne.revertPrompt(l,{base:i.text});u(a),v(a.text),T(!1),f(t("Back to the file version."))}catch(a){if(!(a instanceof ce&&a.status===409))throw a;let{current:b}=a.body;u(b),f(a.message,"danger")}},onClose:()=>z(!1),children:e("p",{children:t("The text you saved is dropped and the text from the file applies from the next turn. It stays in the history, so you can bring it back.")})})}):null]}):null]})}export{pe as PromptsPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{lr}from"./chunk-index-8xd6anam.js";import"./chunk-index-s72hmse6.js";import"./chunk-index-p5jcwjx8.js";import"./chunk-index-afrhnrxj.js";import"./chunk-index-xx8jq73q.js";import"./chunk-index-6xqz6mg2.js";import"./chunk-index-5zmswz4s.js";import"./chunk-index-y60x5jbh.js";import"./chunk-index-kbgykazq.js";import"./chunk-index-yrmqcay4.js";export{lr as RoomConfirmHost};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h,r,t,m,e,n,o,v,u,k,rt,Et,Re,wt}from"./chunk-index-
|
|
1
|
+
import{h,r,t,m,e,n,o,v,u,k,rt,Et,Re,wt}from"./chunk-index-fg42egv9.js";import{Ce}from"./chunk-index-6xqz6mg2.js";import"./chunk-index-y60x5jbh.js";import{qt}from"./chunk-index-j7pgphx3.js";import{L}from"./chunk-index-afrhnrxj.js";import{Jt}from"./chunk-index-db8zh8e6.js";var p="room-menu-yolo",N="room-menu-long",f="room-menu-mute";function T(a){let[i,l]=r(!1),c=k().app?.modes!==!1,b=u((s)=>s.rooms[a.room]?.view?.home===!1,a.room),d=u((s)=>s.pins.includes(a.room),a.room),g=a.mode??{yolo:!1,longRunning:!1},y=async(s)=>{l(!0),await Et(a.room,{longRunning:s}),l(!1)};return e(L,{open:a.open,title:t("Room menu"),onClose:a.onClose,children:n("ul",{className:"menu",children:[a.readOnly?e("li",{children:a.parent?n("a",{className:"menu-item menu-link",href:v("room",a.parent),onClick:a.onClose,children:[e("span",{className:"menu-icon",children:e(o,{name:"rooms"})}),n("span",{className:"menu-text",children:[e("strong",{children:t("Open the parent room")}),e("span",{className:"meta",children:t("Reply to the knight that started this thread.")})]}),e(o,{name:"chevron",size:16})]}):e("p",{className:"meta",children:t("A thread has no settings.")})}):null,a.readOnly?null:e("li",{children:n("label",{className:"menu-item menu-toggle",htmlFor:f,children:[e("span",{className:"menu-icon",children:e(o,{name:a.muted?"bell-off":"bell"})}),n("span",{className:"menu-text",children:[e("strong",{children:t("Notifications")}),e("span",{className:"meta",children:t("Push this room's posts to every owner's devices. A card that waits for you is always pushed.")})]}),e(qt,{id:f,checked:!a.muted,label:t("Notifications"),onChange:async(s)=>{l(!0),await Jt(a.room,!s),l(!1)},busy:i})]})}),a.readOnly||!c?null:e("li",{children:n("label",{className:"menu-item menu-toggle",htmlFor:p,children:[e("span",{className:"menu-icon","data-tone":"yolo",children:e(o,{name:"bolt"})}),n("span",{className:"menu-text",children:[e("strong",{children:t("Yolo mode")}),e("span",{className:"meta",children:t("Approve held actions in this room without asking. Risky ones still ask.")})]}),e(qt,{id:p,checked:g.yolo,label:t("Yolo mode"),onChange:(s)=>{if(s)a.onAskYolo();else l(!0),Et(a.room,{yolo:!1}).then(()=>l(!1))},busy:i})]})}),a.readOnly||!c?null:e("li",{children:n("label",{className:"menu-item menu-toggle",htmlFor:N,children:[e("span",{className:"menu-icon","data-tone":"long",children:e(o,{name:"timer"})}),n("span",{className:"menu-text",children:[e("strong",{children:t("Long-running mode")}),e("span",{className:"meta",children:t("Let turns go on past their time limit, up to the host's cap. Questions still wait for you.")})]}),e(qt,{id:N,checked:g.longRunning,label:t("Long-running mode"),onChange:y,busy:i})]})}),a.agent?e("li",{children:n("button",{type:"button",className:"menu-item menu-link","aria-haspopup":"dialog",onClick:()=>{a.onClose(),rt(a.agent)},children:[e("span",{className:"menu-icon",children:e(o,{name:"profile"})}),n("span",{className:"menu-text",children:[e("strong",{children:t("Edit knight")}),e("span",{className:"meta",children:t("Name, prompt, model and picture")})]}),e(o,{name:"chevron",size:16})]})}):null,a.group?e("li",{children:n("button",{type:"button",className:"menu-item menu-link","aria-haspopup":"dialog",onClick:()=>{a.onClose(),wt({kind:"group",name:a.group})},children:[e("span",{className:"menu-icon",children:e(o,{name:"profile"})}),n("span",{className:"menu-text",children:[e("strong",{children:t("Edit group")}),e("span",{className:"meta",children:t("Name, members and host")})]}),e(o,{name:"chevron",size:16})]})}):null,a.readOnly||!b?null:n(m,{children:[e("li",{children:n("button",{type:"button",className:"menu-item menu-link",onClick:()=>{a.onClose(),(h("8dzvysym"),import("./chunk-layout-actions-8dzvysym.js")).then((s)=>s.pinRoom(a.room,!d))},children:[e("span",{className:"menu-icon",children:e(o,{name:"pin"})}),n("span",{className:"menu-text",children:[e("strong",{children:d?t("Unpin"):t("Pin")}),e("span",{className:"meta",children:t("Keep this room at the top of the list.")})]})]})}),e("li",{children:n("button",{type:"button",className:"menu-item menu-link","aria-haspopup":"dialog",onClick:()=>{a.onClose(),Ce({kind:"move",room:a.room})},children:[e("span",{className:"menu-icon",children:e(o,{name:"folder"})}),n("span",{className:"menu-text",children:[e("strong",{children:t("Move to folder…")}),e("span",{className:"meta",children:t("Put this room in a folder, or take it out.")})]}),e(o,{name:"chevron",size:16})]})})]}),a.readOnly?null:e("li",{children:n("button",{type:"button",className:"menu-item menu-link",onClick:a.onAskStartOver,children:[e("span",{className:"menu-icon","data-tone":"danger",children:e(o,{name:"reset"})}),n("span",{className:"menu-text",children:[e("strong",{children:t("Start over")}),e("span",{className:"meta",children:t("Archive this conversation and begin a new one. Memory stays.")})]})]})}),a.readOnly||a.coordinator?null:e("li",{children:n("button",{type:"button",className:"menu-item menu-link",onClick:()=>{a.onClose(),Re({kind:"archive",room:a.room,name:a.displayName??""})},children:[e("span",{className:"menu-icon","data-tone":"danger",children:e(o,{name:"archive"})}),n("span",{className:"menu-text",children:[e("strong",{children:a.group?t("Archive group"):t("Archive knight")}),e("span",{className:"meta",children:t("It stops answering. The history is kept and it can be restored.")})]})]})})]})})}export{T as RoomMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,e,o,u}from"./chunk-index-
|
|
1
|
+
import{t,e,o,u}from"./chunk-index-fg42egv9.js";import"./chunk-index-y60x5jbh.js";import"./chunk-index-3pnvpppa.js";import"./chunk-index-6xqz6mg2.js";import{Jn}from"./chunk-index-em7vndrb.js";import"./chunk-index-1kwp3spy.js";import"./chunk-index-nsvwbjfe.js";function n(){if(!u((r)=>r.listed))return null;return e("button",{type:"button",className:"header-button icon-button","aria-haspopup":"menu","aria-label":t("Folders and order"),onClick:(r)=>Jn(r.currentTarget),children:e(o,{name:"more",size:18})})}export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,t,c,e,n,o,v,O,f,w,g,_,P,k,re}from"./chunk-index-
|
|
1
|
+
import{r,t,c,e,n,o,v,O,f,w,g,_,P,k,re}from"./chunk-index-fg42egv9.js";import{K}from"./chunk-index-p5jcwjx8.js";import{be}from"./chunk-index-xevnf9ew.js";import"./chunk-index-afrhnrxj.js";var y={mon:c("Mon"),tue:c("Tue"),wed:c("Wed"),thu:c("Thu"),fri:c("Fri"),sat:c("Sat"),sun:c("Sun")};function h(m){if(typeof m!=="object"||m===null)return"";let i=m,s=typeof i.time==="string"?i.time:"";switch(i.kind){case"once":return t("Once on {date} at {time}",{date:String(i.date??""),time:s});case"every":return Number(i.everyDays)===1?t("Every day at {time}",{time:s}):t("Every {count} days at {time}",{count:Number(i.everyDays),time:s});case"weekly":{let l=Array.isArray(i.weekdays)?i.weekdays.map((d)=>t(y[String(d)]??String(d))).join(t(", ")):"";return t("{days} at {time}",{days:l,time:s})}default:return""}}function L(){let{timeZone:m}=k(),[i,s]=r(0),[l,d]=r(),{data:u,error:p}=be(()=>O.schedules(),`schedules:${i}`);return n("div",{className:"page",children:[e("header",{className:"page-head",children:e("h1",{children:t("Schedules")})}),p?e(g,{message:p}):null,!u&&!p?e(w,{}):null,u&&u.schedules.length===0?e(_,{children:t("Nothing is scheduled. Ask a knight to remind you or to run something later.")}):null,e("ul",{className:"schedule-list",children:u?.schedules.map((a)=>n("li",{className:"card schedule",children:[n("div",{className:"schedule-main",children:[n("div",{className:"card-head",children:[e("strong",{children:a.title}),a.lastStatus?e(P,{children:a.lastStatus}):null]}),n("p",{className:"meta",children:[h(a.recurrence)," ·"," ",t("next {when}",{when:re(a.nextRun,m)})]}),e("p",{className:"schedule-prompt",children:a.prompt}),n("p",{className:"meta",children:[a.room?e("a",{href:v("room",a.room),children:a.label}):a.label," ","· ",t("set by {name}",{name:a.createdBy})]})]}),e("button",{type:"button",className:"icon-button danger-icon","aria-label":t("Cancel {title}",{title:a.title}),onClick:()=>d(a),children:e(o,{name:"trash"})})]},a.id))}),e(K,{open:l!==void 0,title:t("Cancel this schedule?"),confirmLabel:t("Cancel schedule"),tone:"danger",onClose:()=>d(void 0),onConfirm:async()=>{if(!l)return;await O.cancelSchedule(l.id),s((a)=>a+1),f(t("Schedule cancelled."))},children:e("p",{children:t("“{title}” will not run again. Runs that already happened stay in the conversation.",{title:l?.title??""})})})]})}export{L as SchedulesPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mn}from"./chunk-index-
|
|
1
|
+
import{mn}from"./chunk-index-fg42egv9.js";function M(t,l,d,g){let r,a=-1,i=!1,f=(e)=>e instanceof Element?e.closest("button, [data-seat]")??t:t,o=()=>{r?.cancel(),r=void 0,a=-1},p=(e)=>{if(i=!1,e.pointerType==="mouse"||!e.isPrimary)return;o();let n=l(e.target,e.clientX,e.clientY);if(!n)return;let u=f(e.target);a=e.pointerId,r=new mn((s)=>{if(i=!0,typeof navigator.vibrate==="function")navigator.vibrate(10);d({...n,at:s,via:"hold",source:u})},g),r.begin(e.clientX,e.clientY)},m=(e)=>{if(e.pointerId===a&&r&&!i){if(!r.move(e.clientX,e.clientY))o()}},c=(e)=>{if(e.pointerId===a)o()},E=(e)=>{let n=l(e.target,e.clientX,e.clientY);if(!n)return;if(e.preventDefault(),i)return;o(),d({...n,at:{x:e.clientX,y:e.clientY},via:"contextmenu",source:f(e.target)})},v=(e)=>{if(i=!1,e.key!=="ContextMenu"&&!(e.key==="F10"&&e.shiftKey))return;let n=l(e.target,-1,-1);if(!n)return;e.preventDefault();let u=f(e.target),s=u.getBoundingClientRect();d({...n,at:{x:s.left+Math.min(s.width/2,48),y:s.top+24},via:"key",source:u})},L=(e)=>{if(!i)return;i=!1,e.preventDefault(),e.stopPropagation()};return t.addEventListener("pointerdown",p),t.addEventListener("pointermove",m),t.addEventListener("pointerup",c),t.addEventListener("pointercancel",c),t.addEventListener("contextmenu",E),t.addEventListener("keydown",v),t.addEventListener("click",L,!0),()=>{o(),t.removeEventListener("pointerdown",p),t.removeEventListener("pointermove",m),t.removeEventListener("pointerup",c),t.removeEventListener("pointercancel",c),t.removeEventListener("contextmenu",E),t.removeEventListener("keydown",v),t.removeEventListener("click",L,!0)}}export{M as attachSeatMenu};
|