@loicngr/kobo 1.11.10 → 1.11.12
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 +8 -0
- package/dist/server/routes/workspaces.js +3 -1
- package/dist/server/services/agent/engines/claude-code/engine.js +15 -8
- package/dist/server/services/agent/engines/codex/engine.js +69 -8
- package/dist/server/services/agent/engines/codex/event-mapper.js +3 -1
- package/dist/server/services/skill-suite-prompts.js +72 -1
- package/dist/shared/skill-suite-prompts.js +12 -1
- package/package.json +1 -1
- package/src/client/dist/pwa/assets/{ActivityFeed-UEAexGjc.js → ActivityFeed-Ds8cAMNc.js} +1 -1
- package/src/client/dist/pwa/assets/{ChangelogPage-XSYwu9XA.js → ChangelogPage-DO6DNO4Q.js} +1 -1
- package/src/client/dist/pwa/assets/{ClosePopup-dpcrW9DC.js → ClosePopup-DuAqn8Pb.js} +1 -1
- package/src/client/dist/pwa/assets/CreatePage-BnMSo_79.js +2 -0
- package/src/client/dist/pwa/assets/CreatePage-CV_RpAuV.css +1 -0
- package/src/client/dist/pwa/assets/{DiffViewer-DnFN6Sc_.js → DiffViewer-CMnFGReI.js} +3 -3
- package/src/client/dist/pwa/assets/{HealthPage-DVrZfMI6.js → HealthPage-BRAxQKSP.js} +1 -1
- package/src/client/dist/pwa/assets/{MainLayout-D_3nFaCG.js → MainLayout-BN1ug95K.js} +2 -2
- package/src/client/dist/pwa/assets/{QBtnToggle-BgfN19l8.js → QBtnToggle-DsCDNQzX.js} +1 -1
- package/src/client/dist/pwa/assets/{QChip-EQGYShN0.js → QChip-DWGDTZnX.js} +1 -1
- package/src/client/dist/pwa/assets/QSelect-8Ip46vhk.js +36 -0
- package/src/client/dist/pwa/assets/{QTooltip-HEIFh5w9.js → QTooltip-Bz4g3bmr.js} +1 -1
- package/src/client/dist/pwa/assets/{SearchPage-1B5HOf90.js → SearchPage-BD53VJEr.js} +1 -1
- package/src/client/dist/pwa/assets/{SettingsPage-v8f4rrCt.js → SettingsPage-3rYdJZga.js} +3 -3
- package/src/client/dist/pwa/assets/SettingsPage-BJZWZYPC.css +1 -0
- package/src/client/dist/pwa/assets/{TouchPan-lynWXY69.js → TouchPan-BKu8V4eN.js} +1 -1
- package/src/client/dist/pwa/assets/{WorkspacePage-Vjzi8YnW.js → WorkspacePage-CbC_t5Rx.js} +3 -3
- package/src/client/dist/pwa/assets/{cssMode-cg8iVI-i.js → cssMode-vaMVESGy.js} +1 -1
- package/src/client/dist/pwa/assets/{documents-Dlx8yiSO.js → documents-CyKQ9lT6.js} +1 -1
- package/src/client/dist/pwa/assets/{editor.api-CfaJRkrX.js → editor.api-CH3dhpKq.js} +1 -1
- package/src/client/dist/pwa/assets/{expand-template-D3LZldj1.js → expand-template-DQQQftsk.js} +1 -1
- package/src/client/dist/pwa/assets/{freemarker2-B_8OIClK.js → freemarker2-deLpERsj.js} +1 -1
- package/src/client/dist/pwa/assets/{handlebars-CaYi_uxU.js → handlebars-DdjS05Tc.js} +1 -1
- package/src/client/dist/pwa/assets/{html-BnCUDUl1.js → html-pK1ZEFvP.js} +1 -1
- package/src/client/dist/pwa/assets/{htmlMode-BZjKGnQF.js → htmlMode-DJFDI9Ru.js} +1 -1
- package/src/client/dist/pwa/assets/i18n-CK38o-IF.js +1 -0
- package/src/client/dist/pwa/assets/{index-CoOsPyyG.js → index-B_OmZ65F.js} +7 -7
- package/src/client/dist/pwa/assets/{javascript-DkSfoeHU.js → javascript-DbuFfxco.js} +1 -1
- package/src/client/dist/pwa/assets/{jsonMode-yKXxfx1V.js → jsonMode-B0Fu8Dcc.js} +1 -1
- package/src/client/dist/pwa/assets/{kobo-commands-vn1IQxLn.js → kobo-commands-rb43ZeWG.js} +1 -1
- package/src/client/dist/pwa/assets/{layout-CiQpugQB.js → layout-tAFrvQ5V.js} +1 -1
- package/src/client/dist/pwa/assets/{liquid-Dlhysv3U.js → liquid-DqDIKOCy.js} +1 -1
- package/src/client/dist/pwa/assets/{lspLanguageFeatures-CeYSQFUz.js → lspLanguageFeatures-CVcEibfJ.js} +1 -1
- package/src/client/dist/pwa/assets/{mdx-B8iME5NA.js → mdx-Bs4CovhI.js} +1 -1
- package/src/client/dist/pwa/assets/{network-auth-j2Drut6q.js → network-auth-DYrrh7Zr.js} +1 -1
- package/src/client/dist/pwa/assets/{pending-diff-open-B4RYz7G_.js → pending-diff-open-D1IYH8Pd.js} +1 -1
- package/src/client/dist/pwa/assets/{project-color-e3OdFi9X.js → project-color-DO6uj29M.js} +1 -1
- package/src/client/dist/pwa/assets/{python-CbFbC0ZR.js → python-BJoP0uN-.js} +1 -1
- package/src/client/dist/pwa/assets/{razor-7c2NCdFI.js → razor-cwD-YBcr.js} +1 -1
- package/src/client/dist/pwa/assets/{render-chat-markdown-Fer8kY38.js → render-chat-markdown-DZnIueUV.js} +1 -1
- package/src/client/dist/pwa/assets/{tsMode-BmShKjbx.js → tsMode-of3oS9sU.js} +1 -1
- package/src/client/dist/pwa/assets/{typescript-Dhu7Upbs.js → typescript-BTWMoUxn.js} +1 -1
- package/src/client/dist/pwa/assets/{use-onboarding-fe4sPCNf.js → use-onboarding-BTFkRBjE.js} +1 -1
- package/src/client/dist/pwa/assets/{use-quasar-CeHlTrGg.js → use-quasar-C1RCDSb6.js} +1 -1
- package/src/client/dist/pwa/assets/{vs-B-xsceNQ.js → vs-DDeaNKsH.js} +3 -3
- package/src/client/dist/pwa/assets/{workers-zVMTXVoC.js → workers-DQnKuGcq.js} +1 -1
- package/src/client/dist/pwa/assets/{xml-D64wpCtR.js → xml-RglGWD_3.js} +1 -1
- package/src/client/dist/pwa/assets/{yaml-CLSRKwfx.js → yaml-CSqGQpai.js} +1 -1
- package/src/client/dist/pwa/index.html +1 -1
- package/src/client/dist/pwa/sw.js +1 -1
- package/src/client/dist/pwa/assets/CreatePage-BK__rjvR.js +0 -2
- package/src/client/dist/pwa/assets/CreatePage-QwtfYunr.css +0 -1
- package/src/client/dist/pwa/assets/QSelect-CtxxliRU.js +0 -36
- package/src/client/dist/pwa/assets/SettingsPage-BXiWr2ba.css +0 -1
- package/src/client/dist/pwa/assets/i18n-B6SDs7Lm.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,ut as t}from"./runtime-dom.esm-bundler-DgevF6KV.js";import{N as n,a as r,s as i}from"./QIcon--SvgE-nS.js";import{d as a,l as o}from"./use-checkbox-SrkgiJho.js";import{G as s,K as c}from"./index-
|
|
1
|
+
import{B as e,ut as t}from"./runtime-dom.esm-bundler-DgevF6KV.js";import{N as n,a as r,s as i}from"./QIcon--SvgE-nS.js";import{d as a,l as o}from"./use-checkbox-SrkgiJho.js";import{G as s,K as c}from"./index-B_OmZ65F.js";var l=n({name:`QBtnGroup`,props:{unelevated:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,square:Boolean,push:Boolean,stretch:Boolean,glossy:Boolean,spread:Boolean},setup(n,{slots:r}){let a=e(()=>{let e=[`unelevated`,`outline`,`flat`,`rounded`,`square`,`push`,`stretch`,`glossy`].filter(e=>n[e]).map(e=>`q-btn-group--${e}`).join(` `);return`q-btn-group row no-wrap${e.length===0?``:` `+e}`+(n.spread?` q-btn-group--spread`:` inline`)});return()=>t(`div`,{class:a.value},i(r.default))}}),u=n({name:`QBtnToggle`,props:{...a,modelValue:{required:!0},options:{type:Array,required:!0,validator:e=>e.every(e=>(`label`in e||`icon`in e||`slot`in e)&&`value`in e)},color:String,textColor:String,toggleColor:{type:String,default:`primary`},toggleTextColor:String,outline:Boolean,flat:Boolean,unelevated:Boolean,rounded:Boolean,push:Boolean,glossy:Boolean,size:String,padding:String,noCaps:Boolean,noWrap:Boolean,dense:Boolean,readonly:Boolean,disable:Boolean,stack:Boolean,stretch:Boolean,spread:Boolean,clearable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:[`update:modelValue`,`clear`,`click`],setup(n,{slots:i,emit:a}){let u=e(()=>n.options.find(e=>e.value===n.modelValue)!==void 0),d=e(()=>({type:`hidden`,name:n.name,value:n.modelValue})),f=o(d),p=e(()=>c(n)),m=e(()=>({rounded:n.rounded,dense:n.dense,...p.value})),h=e(()=>n.options.map((e,t)=>{let{attrs:r,value:i,slot:a,...o}=e;return{slot:a,props:{key:t,"aria-pressed":i===n.modelValue?`true`:`false`,...r,...o,...m.value,disable:n.disable||o.disable===!0,color:i===n.modelValue?_(o,`toggleColor`):_(o,`color`),textColor:i===n.modelValue?_(o,`toggleTextColor`):_(o,`textColor`),noCaps:_(o,`noCaps`)===!0,noWrap:_(o,`noWrap`)===!0,size:_(o,`size`),padding:_(o,`padding`),ripple:_(o,`ripple`),stack:_(o,`stack`)===!0,stretch:_(o,`stretch`)===!0,onClick(t){g(i,e,t)}}}}));function g(e,t,r){n.readonly||(n.modelValue===e?n.clearable&&(a(`update:modelValue`,null,null),a(`clear`)):a(`update:modelValue`,e,t),a(`click`,r))}function _(e,t){return e[t]===void 0?n[t]:e[t]}function v(){let e=h.value.map(e=>t(s,e.props,e.slot===void 0?void 0:i[e.slot]));return n.name!==void 0&&!n.disable&&u.value&&f(e,`push`),r(i.default,e)}return()=>t(l,{class:`q-btn-toggle`,...p.value,rounded:n.rounded,stretch:n.stretch,glossy:n.glossy,spread:n.spread},v)}});export{l as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,st as t,ut as n}from"./runtime-dom.esm-bundler-DgevF6KV.js";import{M as r,N as i,f as a,i as o,n as s,o as c,p as l,r as u,t as d}from"./QIcon--SvgE-nS.js";import{X as f}from"./index-
|
|
1
|
+
import{B as e,st as t,ut as n}from"./runtime-dom.esm-bundler-DgevF6KV.js";import{M as r,N as i,f as a,i as o,n as s,o as c,p as l,r as u,t as d}from"./QIcon--SvgE-nS.js";import{X as f}from"./index-B_OmZ65F.js";function p(e){e.keyCode===32&&r(e)}var m={xs:8,sm:10,md:14,lg:20,xl:24},h=i({name:`QChip`,props:{...u,...l,dense:Boolean,icon:String,iconRight:String,iconRemove:String,iconSelected:String,label:[String,Number],color:String,textColor:String,modelValue:{type:Boolean,default:!0},selected:{type:Boolean,default:null},square:Boolean,outline:Boolean,clickable:Boolean,removable:Boolean,removeAriaLabel:String,tabindex:[String,Number],disable:Boolean,ripple:{type:[Boolean,Object],default:!0}},emits:[`update:modelValue`,`update:selected`,`remove`,`click`],setup(i,{slots:l,emit:u}){let{proxy:{$q:h}}=t(),g=s(i,h),_=a(i,m),v=e(()=>i.selected||i.icon!==void 0),y=e(()=>i.selected?i.iconSelected||h.iconSet.chip.selected:i.icon),b=e(()=>i.iconRemove||h.iconSet.chip.remove),x=e(()=>!i.disable&&(i.clickable||i.selected!==null)),S=e(()=>{let e=i.outline&&i.color||i.textColor;return`q-chip row inline no-wrap items-center`+(!i.outline&&i.color!==void 0?` bg-${i.color}`:``)+(e?` text-${e} q-chip--colored`:``)+(i.disable?` disabled`:``)+(i.dense?` q-chip--dense`:``)+(i.outline?` q-chip--outline`:``)+(i.selected?` q-chip--selected`:``)+(x.value?` q-chip--clickable cursor-pointer non-selectable q-hoverable`:``)+(i.square?` q-chip--square`:``)+(g.value?` q-chip--dark q-dark`:``)}),C=e(()=>{let e=i.disable?{tabindex:-1,"aria-disabled":`true`}:{tabindex:i.tabindex||0,role:`button`,"aria-pressed":i.selected?`true`:`false`};return{chip:e,remove:{...e,role:`button`,"aria-hidden":`false`,"aria-label":i.removeAriaLabel||h.lang.label.remove}}});function w(e){[13,32].includes(e.keyCode)&&(T(e),r(e))}function T(e){i.disable||(u(`update:selected`,!i.selected),u(`click`,e))}function E(e){(e.keyCode===void 0||[13,32].includes(e.keyCode))&&(r(e),i.disable||(u(`update:modelValue`,!1),u(`remove`)))}function D(){let e=[];x.value&&e.push(n(`div`,{class:`q-focus-helper`})),v.value&&e.push(n(d,{class:`q-chip__icon q-chip__icon--left`,name:y.value}));let t=i.label===void 0?void 0:[n(`div`,{class:`ellipsis`},[i.label])];return e.push(n(`div`,{class:`q-chip__content col row no-wrap items-center q-anchor--skip`},c(l.default,t))),i.iconRight&&e.push(n(d,{class:`q-chip__icon q-chip__icon--right`,name:i.iconRight})),i.removable&&e.push(n(d,{class:`q-chip__icon q-chip__icon--remove cursor-pointer`,name:b.value,...C.value.remove,onClick:E,onKeydown:p,onKeyup:E})),e}return()=>{if(!i.modelValue)return;let e={class:S.value,style:_.value};return x.value&&Object.assign(e,C.value.chip,{onClick:T,onKeydown:p,onKeyup:w}),o(`div`,e,D(),`ripple`,i.ripple!==!1&&!i.disable,()=>[[f,i.ripple]])}}});export{h as t};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import{C as e,T as t}from"./reactivity.esm-bundler-DtSZKRQB.js";import{At as n,B as r,Dt as i,Et as a,Lt as o,Ot as s,S as c,Tt as l,fn as u,kt as d,st as ee,t as f,ut as p,yn as m}from"./runtime-dom.esm-bundler-DgevF6KV.js";import{D as h,M as g,N as _,O as v,S as y,a as b,b as x,j as S,k as C,n as w,r as T,s as E,t as D}from"./QIcon--SvgE-nS.js";import{n as O,o as k,r as A,t as j,u as te}from"./QSeparator-BdyRE-AM.js";import{d as M,f as N,g as P,h as F,m as I,p as L,s as ne,u as R}from"./use-checkbox-SrkgiJho.js";import{$ as z,At as B,Ct as V,Q as re,St as H,Y as ie,bt as ae,et as oe,ft as se,lt as U,mt as ce,nt as le,ot as ue,pt as de,rt as fe,tt as pe,vt as me,wt as W,xt as G,yt as he}from"./index-B_OmZ65F.js";import{n as ge,r as _e}from"./use-quasar-C1RCDSb6.js";import{a as K,c as ve,d as ye,h as be,i as q,l as xe,n as Se,o as Ce,p as we,r as Te,s as Ee,u as J}from"./QTooltip-Bz4g3bmr.js";import{t as De}from"./QChip-DWGDTZnX.js";var Oe=_({name:`QItemLabel`,props:{overline:Boolean,caption:Boolean,header:Boolean,lines:[Number,String]},setup(e,{slots:t}){let n=r(()=>Number.parseInt(e.lines,10)),i=r(()=>`q-item__label`+(e.overline?` q-item__label--overline text-overline`:``)+(e.caption?` q-item__label--caption text-caption`:``)+(e.header?` q-item__label--header`:``)+(n.value===1?` ellipsis`:``)),a=r(()=>e.lines!==void 0&&n.value>1?{overflow:`hidden`,display:`-webkit-box`,"-webkit-box-orient":`vertical`,"-webkit-line-clamp":n.value}:null);return()=>p(`div`,{style:a.value,class:i.value},E(t.default))}}),Y=t({});function ke(e){e.keyCode===32&&g(e)}var Ae=Object.keys(ie),je=_({name:`QExpansionItem`,props:{...ie,...H,...T,icon:String,label:String,labelLines:[Number,String],caption:String,captionLines:[Number,String],dense:Boolean,toggleAriaLabel:String,expandIcon:String,expandedIcon:String,expandIconClass:[Array,String,Object],duration:{},headerInsetLevel:Number,contentInsetLevel:Number,expandSeparator:Boolean,defaultOpened:Boolean,hideExpandIcon:Boolean,expandIconToggle:Boolean,switchToggleSide:Boolean,denseToggle:Boolean,group:String,popup:Boolean,headerStyle:[Array,String,Object],headerClass:[Array,String,Object]},emits:[...G,`click`,`afterShow`,`afterHide`],setup(t,{slots:n,emit:i}){let{proxy:{$q:a}}=ee(),o=w(t,a),l=e(t.modelValue===null?t.defaultOpened:t.modelValue),d=e(null),f=O(),{show:h,hide:_,toggle:v}=ae({showing:l}),y,b,x=r(()=>`q-expansion-item q-item-type q-expansion-item--${l.value?`expanded`:`collapsed`} q-expansion-item--${t.popup?`popup`:`standard`}`),S=r(()=>t.contentInsetLevel===void 0?null:{[`padding`+(a.lang.rtl?`Right`:`Left`)]:t.contentInsetLevel*56+`px`}),C=r(()=>!t.disable&&(t.href!==void 0||t.to!==void 0&&t.to!==null&&t.to!==``)),T=r(()=>{let e={};return Ae.forEach(n=>{e[n]=t[n]}),e}),k=r(()=>C.value||!t.expandIconToggle),te=r(()=>t.expandedIcon!==void 0&&l.value?t.expandedIcon:t.expandIcon||a.iconSet.expansionItem[t.denseToggle?`denseIcon`:`icon`]),M=r(()=>!t.disable&&(C.value||t.expandIconToggle)),N=r(()=>({expanded:l.value,detailsId:f.value,toggle:v,show:h,hide:_})),P=r(()=>{let e=t.toggleAriaLabel===void 0?a.lang.label[l.value?`collapse`:`expand`](t.label):t.toggleAriaLabel;return{role:`button`,"aria-expanded":l.value?`true`:`false`,"aria-controls":f.value,"aria-label":e}});u(()=>t.group,e=>{b?.(),e!==void 0&&z()});function F(e){C.value||v(e),i(`click`,e)}function I(e){[13,32].includes(e.keyCode)&&L(e,!0)}function L(e,t){!t&&!e.qAvoidFocus&&d.value?.focus({preventScroll:!0}),v(e),g(e)}function ne(){i(`afterShow`)}function R(){i(`afterHide`)}function z(){y===void 0&&(y=A()),l.value&&(Y[t.group]=y);let e=u(l,e=>{e?Y[t.group]=y:Y[t.group]===y&&delete Y[t.group]}),n=u(()=>Y[t.group],(e,t)=>{t===y&&e!==void 0&&e!==y&&_()});b=()=>{e(),n(),Y[t.group]===y&&delete Y[t.group],b=void 0}}function B(){let e={class:[`q-focusable relative-position cursor-pointer${t.denseToggle&&t.switchToggleSide?` items-end`:``}`,t.expandIconClass],side:!t.switchToggleSide,avatar:t.switchToggleSide},n=[p(D,{class:`q-expansion-item__toggle-icon`+(t.expandedIcon===void 0&&l.value?` q-expansion-item__toggle-icon--rotated`:``),name:te.value})];return M.value&&(Object.assign(e,{tabindex:0,...P.value,onClick:L,onKeydown:ke,onKeyup:I}),n.unshift(p(`div`,{ref:d,class:`q-expansion-item__toggle-focus q-icon q-focus-helper q-focus-helper--rounded`,tabindex:-1}))),p(ge,e,()=>n)}function V(){let e;return n.header===void 0?(e=[p(ge,()=>[p(Oe,{lines:t.labelLines},()=>t.label||``),t.caption?p(Oe,{lines:t.captionLines,caption:!0},()=>t.caption):null])],t.icon&&e[t.switchToggleSide?`push`:`unshift`](p(ge,{side:t.switchToggleSide,avatar:!t.switchToggleSide},()=>p(D,{name:t.icon})))):e=[n.header(N.value)].flat(),!t.disable&&!t.hideExpandIcon&&e[t.switchToggleSide?`unshift`:`push`](B()),e}function re(){let e={ref:`item`,style:t.headerStyle,class:t.headerClass,dark:o.value,disable:t.disable,dense:t.dense,insetLevel:t.headerInsetLevel};return k.value&&(e.clickable=!0,e.onClick=F,Object.assign(e,C.value?T.value:P.value)),p(_e,e,V)}function H(){return m(p(`div`,{key:`e-content`,class:`q-expansion-item__content relative-position`,style:S.value,id:f.value},E(n.default)),[[c,l.value]])}function ie(){let e=[re(),p(be,{duration:t.duration,onShow:ne,onHide:R},H)];return t.expandSeparator&&e.push(p(j,{class:`q-expansion-item__border q-expansion-item__border--top absolute-top`,dark:o.value}),p(j,{class:`q-expansion-item__border q-expansion-item__border--bottom absolute-bottom`,dark:o.value})),e}return t.group!==void 0&&z(),s(()=>{b?.()}),()=>p(`div`,{class:x.value},[p(`div`,{class:`q-expansion-item__container relative-position`},ie())])}}),Me=_({name:`QMenu`,inheritAttrs:!1,props:{...J,...H,...T,...he,persistent:Boolean,autoClose:Boolean,separateClosePopup:Boolean,noEscDismiss:Boolean,noRouteDismiss:Boolean,noRefocus:Boolean,noFocus:Boolean,fit:Boolean,cover:Boolean,square:Boolean,anchor:{type:String,validator:K},self:{type:String,validator:K},offset:{type:Array,validator:q},scrollTarget:U,touchPosition:Boolean,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null}},emits:[...G,`click`,`escapeKey`],setup(t,{slots:n,emit:i,attrs:a}){let o=null,c,l,d,m=ee(),{proxy:h}=m,{$q:_}=h,y=e(null),b=e(!1),x=r(()=>!t.persistent&&!t.noRouteDismiss),S=w(t,_),{registerTick:C,removeTick:T}=V(),{registerTimeout:D}=W(),{transitionProps:O,transitionStyle:A}=me(t),{localScrollTarget:j,changeScrollEvent:te,unconfigureScrollTarget:M}=ve(t,ye),{anchorEl:N,canShow:P}=xe({showing:b}),{hide:F}=ae({showing:b,canShow:P,handleShow:he,handleHide:ge,handleRouteChange:_e,hideOnRouteChange:x,processOnMount:!0}),{showPortal:I,hidePortal:L,renderPortal:ne}=de(m,y,De,`menu`),R={anchorEl:N,innerRef:y,onClickOutside(e){if(!t.persistent&&b.value)return F(e),(e.type===`touchstart`||e.target.classList.contains(`q-dialog__backdrop`))&&g(e),!0}},B=r(()=>Se(t.anchor||(t.cover?`center middle`:`bottom start`),_.lang.rtl)),re=r(()=>t.cover?B.value:Se(t.self||`top start`,_.lang.rtl)),H=r(()=>(t.square?` q-menu--square`:``)+(S.value?` q-menu--dark q-dark`:``)),ie=r(()=>t.autoClose?{onClick:be}:{}),U=r(()=>b.value&&!t.persistent);u(U,e=>{e?(le(we),Ce(R)):(fe(we),Ee(R))});function G(){k(()=>{let e=y.value;e&&!e.contains(document.activeElement)&&(e=e.querySelector(`[autofocus][tabindex], [data-autofocus][tabindex]`)||e.querySelector(`[autofocus] [tabindex], [data-autofocus] [tabindex]`)||e.querySelector(`[autofocus], [data-autofocus]`)||e,e.focus({preventScroll:!0}))})}function he(e){if(o=t.noRefocus?null:document.activeElement,oe(q),I(),ye(),c=void 0,e!==void 0&&(t.touchPosition||t.contextMenu)){let t=v(e);if(t.left!==void 0){let{top:e,left:n}=N.value.getBoundingClientRect();c={left:t.left-n,top:t.top-e}}}l===void 0&&(l=u(()=>_.screen.width+`|`+_.screen.height+`|`+t.self+`|`+t.anchor+`|`+_.lang.rtl,J)),t.noFocus||document.activeElement.blur(),C(()=>{J(),t.noFocus||G()}),D(()=>{_.platform.is.ios&&(d=t.autoClose,y.value.click()),J(),I(!0),i(`show`,e)},t.transitionDuration)}function ge(e){if(T(),L(),K(!0),o!==null&&(e===void 0||!e.qClickOutside)){let t=(e?.type.indexOf(`key`)===0?o.closest(`[tabindex]:not([tabindex^="-"])`):void 0)||o;o=null,k(()=>{t.isConnected&&t.focus({preventScroll:!0})})}D(()=>{L(!0),i(`hide`,e)},t.transitionDuration)}function _e(){o=null}function K(e){c=void 0,l!==void 0&&(l(),l=void 0),(e||b.value)&&(pe(q),M(),Ee(R),fe(we)),e||(o=null)}function ye(){(N.value!==null||t.scrollTarget!==void 0)&&(j.value=ue(N.value,t.scrollTarget),te(j.value,J))}function be(e){d?d=!1:(ce(h,e),i(`click`,e))}function q(e){U.value&&!t.noFocus&&!se(y.value,e.target)&&!z(y.value,e.target)&&G()}function we(e){t.noEscDismiss||(i(`escapeKey`),F(e))}function J(){Te({targetEl:y.value,offset:t.offset,anchorEl:N.value,anchorOrigin:B.value,selfOrigin:re.value,absoluteOffset:c,fit:t.fit,cover:t.cover,maxHeight:t.maxHeight,maxWidth:t.maxWidth})}function De(){return p(f,O.value,()=>b.value?p(`div`,{role:`menu`,...a,ref:y,tabindex:-1,class:[`q-menu q-position-engine scroll`+H.value,a.class],style:[a.style,A.value],...ie.value},E(n.default)):null)}return s(()=>{K()}),Object.assign(h,{focus:G,updatePosition:J}),ne}}),Ne=`You are reviewing code changes on workspace "{{workspace_name}}" in project {{project_name}}.
|
|
2
|
+
|
|
3
|
+
Branch: {{branch_name}} (base: {{source_branch}})
|
|
4
|
+
Base commit: {{base_commit}}
|
|
5
|
+
|
|
6
|
+
If a code-review skill is available in this environment, invoke it to drive this audit. Otherwise follow the manual checklist below.
|
|
7
|
+
|
|
8
|
+
## Scope
|
|
9
|
+
|
|
10
|
+
Review ALL changes — both committed and uncommitted in the working tree:
|
|
11
|
+
- \`git diff {{base_commit}}..HEAD\` — committed changes on this branch
|
|
12
|
+
- \`git status\` and \`git diff\` — uncommitted changes (staged + unstaged)
|
|
13
|
+
|
|
14
|
+
## Diff summary
|
|
15
|
+
{{diff_stats}}
|
|
16
|
+
|
|
17
|
+
## Commits
|
|
18
|
+
{{commits}}
|
|
19
|
+
|
|
20
|
+
## Additional instructions
|
|
21
|
+
{{additional_instructions}}
|
|
22
|
+
|
|
23
|
+
## Output
|
|
24
|
+
|
|
25
|
+
If no review skill is available, structure your reply as:
|
|
26
|
+
1. Summary — what changed and why
|
|
27
|
+
2. Issues — bugs, regressions, security or perf concerns (with file:line)
|
|
28
|
+
3. Suggestions — refactor / improvement opportunities
|
|
29
|
+
4. Tests — coverage gaps
|
|
30
|
+
5. Verdict — ship / fix-then-ship / blocked
|
|
31
|
+
`,Pe="Code review gate — BEFORE marking the task done, run whichever code-review skill is configured in this environment. Brief it with: what you just implemented, the task title, and the commit SHA (via `git rev-parse HEAD`). Ask specifically whether the change matches the task scope, whether edge cases are handled, and whether the commit is clean. If no review skill is available, do a manual self-review against the same criteria.",X=`You are preparing this workspace for Kōbō auto-loop mode. This is a GROOMING session only — DO NOT implement anything, DO NOT write or edit code, DO NOT run tests or builds, DO NOT invoke any implementation, planning, or release skill (your environment may have several). Your ONLY job is to curate the Kōbō task list via MCP tools.`,Z=`QA pass for workspace "{{workspace_name}}" in project {{project_name}}.
|
|
32
|
+
|
|
33
|
+
Branch: {{branch_name}}
|
|
34
|
+
Staging URL: {{staging_url}}
|
|
35
|
+
|
|
36
|
+
If a QA skill is configured in this environment, invoke it on {{staging_url}}. Otherwise, manually exercise the staging URL against the workspace's acceptance criteria and report findings.`,Fe=`Brainstorm the implementation approach. Explore the codebase to understand the existing structure. Ask clarifying questions if needed. When you have a clear, user-approved plan, save it as a plan file in the project.`,Ie="You are preparing this workspace for Kōbō auto-loop mode. This is a GROOMING session only — DO NOT implement anything, DO NOT write or edit code, DO NOT run tests or builds, DO NOT invoke `superpowers:executing-plans` or any implementation skill. Your ONLY job is to curate the Kōbō task list via MCP tools.",Le="You are preparing this workspace for Kōbō auto-loop mode. This is a GROOMING session only — DO NOT implement anything, DO NOT write or edit code, DO NOT run tests or builds, DO NOT invoke `/ship`, `/autoplan`, `/land-and-deploy`, or any implementation skill. Your ONLY job is to curate the Kōbō task list via MCP tools.",Re="You are preparing this workspace for Kōbō auto-loop mode. This is a GROOMING session only — DO NOT implement anything, DO NOT write or edit code, DO NOT run tests or builds, DO NOT invoke `superpowers:executing-plans`, `/ship`, `/autoplan`, `/land-and-deploy`, or any other implementation, planning, or release skill. Your ONLY job is to curate the Kōbō task list via MCP tools.",ze="You are preparing this workspace for Kōbō auto-loop mode. This is a GROOMING session only — DO NOT implement anything, DO NOT write or edit code, DO NOT run tests or builds, DO NOT invoke `ecc:feature-dev`, `ecc:tdd-workflow`, `ecc:plan`, or any other implementation, planning, or release skill. Your ONLY job is to curate the Kōbō task list via MCP tools.",Be="You are preparing this workspace for Kōbō auto-loop mode. This is a GROOMING session only — DO NOT implement anything, DO NOT write or edit code, DO NOT run tests or builds, DO NOT invoke `superpowers:executing-plans`, `/ship`, `/autoplan`, `/land-and-deploy`, `ecc:feature-dev`, `ecc:tdd-workflow`, `ecc:plan`, or any other implementation, planning, or release skill. Your ONLY job is to curate the Kōbō task list via MCP tools.";function Ve(e,t){return e===`custom`?(t??``).trim()||`You are preparing this workspace for Kōbō auto-loop mode. This is a GROOMING session only — DO NOT implement anything, DO NOT write or edit code, DO NOT run tests or builds, DO NOT invoke any implementation, planning, or release skill (your environment may have several). Your ONLY job is to curate the Kōbō task list via MCP tools.`:e===`superpowers+gstack+ecc`?Be:e===`superpowers+gstack`?Re:e===`ecc`?ze:e===`gstack`?Le:Ie}var He=_({name:`QField`,inheritAttrs:!1,props:{...F,tag:{type:String,default:`label`}},emits:I,setup(){return L(P({tagProp:!0}))}}),Q=1e3,Ue=[`start`,`center`,`end`,`start-force`,`center-force`,`end-force`],We=Array.prototype.filter,Ge=window.getComputedStyle(document.body).overflowAnchor===void 0?h:function(e,t){e!==null&&(e._qOverflowAnimationFrame!==void 0&&cancelAnimationFrame(e._qOverflowAnimationFrame),e._qOverflowAnimationFrame=requestAnimationFrame(()=>{if(e===null)return;e._qOverflowAnimationFrame=void 0;let n=e.children||[];We.call(n,e=>e.dataset&&e.dataset.qVsAnchor!==void 0).forEach(e=>{delete e.dataset.qVsAnchor});let r=n[t];r?.dataset&&(r.dataset.qVsAnchor=``)}))};function $(e,t){return e+t}function Ke(e,t,n,r,i,a,o,s){let c=e===window?document.scrollingElement||document.documentElement:e,l=i?`offsetWidth`:`offsetHeight`,u={scrollStart:0,scrollViewSize:-o-s,scrollMaxSize:0,offsetStart:-o,offsetEnd:-s};if(i?(e===window?(u.scrollStart=window.pageXOffset||window.scrollX||document.body.scrollLeft||0,u.scrollViewSize+=document.documentElement.clientWidth):(u.scrollStart=c.scrollLeft,u.scrollViewSize+=c.clientWidth),u.scrollMaxSize=c.scrollWidth,a&&(u.scrollStart=(ye?u.scrollMaxSize-u.scrollViewSize:0)-u.scrollStart)):(e===window?(u.scrollStart=window.pageYOffset||window.scrollY||document.body.scrollTop||0,u.scrollViewSize+=document.documentElement.clientHeight):(u.scrollStart=c.scrollTop,u.scrollViewSize+=c.clientHeight),u.scrollMaxSize=c.scrollHeight),n!==null)for(let e=n.previousElementSibling;e!==null;e=e.previousElementSibling)e.classList.contains(`q-virtual-scroll--skip`)||(u.offsetStart+=e[l]);if(r!==null)for(let e=r.nextElementSibling;e!==null;e=e.nextElementSibling)e.classList.contains(`q-virtual-scroll--skip`)||(u.offsetEnd+=e[l]);if(t!==e){let n=c.getBoundingClientRect(),r=t.getBoundingClientRect();i?(u.offsetStart+=r.left-n.left,u.offsetEnd-=r.width):(u.offsetStart+=r.top-n.top,u.offsetEnd-=r.height),e!==window&&(u.offsetStart+=u.scrollStart),u.offsetEnd+=u.scrollMaxSize-u.offsetStart}return u}function qe(e,t,n,r){t===`end`&&(t=(e===window?document.body:e)[n?`scrollWidth`:`scrollHeight`]),e===window?n?(r&&(t=(ye?document.body.scrollWidth-document.documentElement.clientWidth:0)-t),window.scrollTo(t,window.pageYOffset||window.scrollY||document.body.scrollTop||0)):window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,t):n?(r&&(t=(ye?e.scrollWidth-e.offsetWidth:0)-t),e.scrollLeft=t):e.scrollTop=t}function Je(e,t,n,r){if(n>=r)return 0;let i=t.length,a=Math.floor(n/Q),o=Math.floor((r-1)/Q)+1,s=e.slice(a,o).reduce($,0);return n%Q!==0&&(s-=t.slice(a*Q,n).reduce($,0)),r%Q!==0&&r!==i&&(s-=t.slice(r,o*Q).reduce($,0)),s}var Ye={virtualScrollSliceSize:{type:[Number,String],default:10},virtualScrollSliceRatioBefore:{type:[Number,String],default:1},virtualScrollSliceRatioAfter:{type:[Number,String],default:1},virtualScrollItemSize:{type:[Number,String],default:24},virtualScrollStickySizeStart:{type:[Number,String],default:0},virtualScrollStickySizeEnd:{type:[Number,String],default:0},tableColspan:[Number,String]};Object.keys(Ye);var Xe={virtualScrollHorizontal:Boolean,onVirtualScroll:Function,...Ye};function Ze({virtualScrollLength:t,getVirtualScrollTarget:o,getVirtualScrollEl:c,virtualScrollItemSizeComputed:d}){let{props:f,emit:m,proxy:h}=ee(),{$q:g}=h,_,v,y,b=[],x,S=e(0),C=e(0),w=e({}),T=e(null),E=e(null),D=e(null),O=e({from:0,to:0}),k=r(()=>f.tableColspan===void 0?100:f.tableColspan);d===void 0&&(d=r(()=>f.virtualScrollItemSize));let A=r(()=>d.value+`;`+f.virtualScrollHorizontal),j=r(()=>A.value+`;`+f.virtualScrollSliceRatioBefore+`;`+f.virtualScrollSliceRatioAfter);u(j,()=>{z()}),u(A,M);function M(){R(v,!0)}function N(e){R(e===void 0?v:e)}function P(e,n){let r=o();if(r==null||r.nodeType===8)return;let i=Ke(r,c(),T.value,E.value,f.virtualScrollHorizontal,g.lang.rtl,f.virtualScrollStickySizeStart,f.virtualScrollStickySizeEnd);y!==i.scrollViewSize&&z(i.scrollViewSize),I(r,i,Math.min(t.value-1,Math.max(0,Number.parseInt(e,10)||0)),0,Ue.includes(n)?n:v!==-1&&e>v?`end`:`start`)}function F(){let e=o();if(e==null||e.nodeType===8)return;let n=Ke(e,c(),T.value,E.value,f.virtualScrollHorizontal,g.lang.rtl,f.virtualScrollStickySizeStart,f.virtualScrollStickySizeEnd),r=t.value-1,i=n.scrollMaxSize-n.offsetStart-n.offsetEnd-C.value;if(_===n.scrollStart)return;if(n.scrollMaxSize<=0){I(e,n,0,0);return}y!==n.scrollViewSize&&z(n.scrollViewSize),L(O.value.from);let a=Math.floor(n.scrollMaxSize-Math.max(n.scrollViewSize,n.offsetEnd)-Math.min(x[r],n.scrollViewSize/2));if(a>0&&Math.ceil(n.scrollStart)>=a){I(e,n,r,n.scrollMaxSize-n.offsetEnd-b.reduce($,0));return}let s=0,l=n.scrollStart-n.offsetStart,u=l;if(l<=i&&l+n.scrollViewSize>=S.value)l-=S.value,s=O.value.from,u=l;else for(let e=0;l>=b[e]&&s<r;e++)l-=b[e],s+=Q;for(;l>0&&s<r;)l-=x[s],l>-n.scrollViewSize?(s++,u=l):u=x[s]+l;I(e,n,s,u)}function I(e,n,r,i,a){let o=typeof a==`string`&&a.includes(`-force`),s=o?a.replace(`-force`,``):a,c=s===void 0?`start`:s,l=Math.max(0,r-w.value[c]),u=l+w.value.total;u>t.value&&(u=t.value,l=Math.max(0,u-w.value.total)),_=n.scrollStart;let d=l!==O.value.from||u!==O.value.to;if(!d&&s===void 0){V(r);return}let{activeElement:ee}=document,p=D.value;d&&p!==null&&p!==ee&&p.contains(ee)&&(p.addEventListener(`focusout`,ne),setTimeout(()=>{p?.removeEventListener(`focusout`,ne)},0)),Ge(p,r-l);let m=s===void 0?0:x.slice(l,r).reduce($,0);if(d){let e=u>=O.value.from&&l<=O.value.to?O.value.to:u;O.value={from:l,to:e},S.value=Je(b,x,0,l),C.value=Je(b,x,u,t.value),requestAnimationFrame(()=>{O.value.to!==u&&_===n.scrollStart&&(O.value={from:O.value.from,to:u},C.value=Je(b,x,u,t.value))})}requestAnimationFrame(()=>{if(_!==n.scrollStart)return;d&&L(l);let t=x.slice(l,r).reduce($,0),a=t+n.offsetStart+S.value,c=a+x[r],u=a+i;if(s!==void 0){let e=t-m,i=n.scrollStart+e;u=!o&&i<a&&c<i+n.scrollViewSize?i:s===`end`?c-n.scrollViewSize:a-(s===`start`?0:Math.round((n.scrollViewSize-x[r])/2))}_=u,qe(e,u,f.virtualScrollHorizontal,g.lang.rtl),V(r)})}function L(e){let t=D.value;if(t){let n=We.call(t.children,e=>e.classList&&!e.classList.contains(`q-virtual-scroll--skip`)),r=n.length,i=f.virtualScrollHorizontal?e=>e.getBoundingClientRect().width:e=>e.offsetHeight,a=e,o,s;for(let e=0;e<r;){for(o=i(n[e]),e++;e<r&&n[e].classList.contains(`q-virtual-scroll--with-prev`);)o+=i(n[e]),e++;s=o-x[a],s!==0&&(x[a]+=s,b[Math.floor(a/Q)]+=s),a++}}}function ne(){D.value?.focus({preventScroll:!0})}function R(e,n){let r=Number(d.value);(n||!Array.isArray(x))&&(x=[]);let i=x.length;x.length=t.value;for(let e=t.value-1;e>=i;e--)x[e]=r;let a=Math.floor((t.value-1)/Q);b=[];for(let e=0;e<=a;e++){let n=0,r=Math.min((e+1)*Q,t.value);for(let t=e*Q;t<r;t++)n+=x[t];b.push(n)}v=-1,_=void 0,S.value=Je(b,x,0,O.value.from),C.value=Je(b,x,O.value.to,t.value),e>=0?(L(O.value.from),l(()=>{P(e)})):re()}function z(e){if(e===void 0&&typeof window<`u`){let t=o();t!=null&&t.nodeType!==8&&(e=Ke(t,c(),T.value,E.value,f.virtualScrollHorizontal,g.lang.rtl,f.virtualScrollStickySizeStart,f.virtualScrollStickySizeEnd).scrollViewSize)}y=e;let t=Number.parseFloat(f.virtualScrollSliceRatioBefore)||0,n=Number.parseFloat(f.virtualScrollSliceRatioAfter)||0,r=1+t+n,i=e===void 0||e<=0?1:Math.ceil(e/d.value),a=Math.max(1,i,Math.ceil((f.virtualScrollSliceSize>0?f.virtualScrollSliceSize:10)/r));w.value={total:Math.ceil(a*r),start:Math.ceil(a*t),center:Math.ceil(a*(.5+t)),end:Math.ceil(a*(1+t)),view:i}}function B(e,t){let n=f.virtualScrollHorizontal?`width`:`height`,r={[`--q-virtual-scroll-item-`+n]:d.value+`px`};return[e===`tbody`?p(e,{class:`q-virtual-scroll__padding`,key:`before`,ref:T},[p(`tr`,[p(`td`,{style:{[n]:`${S.value}px`,...r},colspan:k.value})])]):p(e,{class:`q-virtual-scroll__padding`,key:`before`,ref:T,style:{[n]:`${S.value}px`,...r}}),p(e,{class:`q-virtual-scroll__content`,key:`content`,ref:D,tabindex:-1},t.flat()),e===`tbody`?p(e,{class:`q-virtual-scroll__padding`,key:`after`,ref:E},[p(`tr`,[p(`td`,{style:{[n]:`${C.value}px`,...r},colspan:k.value})])]):p(e,{class:`q-virtual-scroll__padding`,key:`after`,ref:E,style:{[n]:`${C.value}px`,...r}})]}function V(e){v!==e&&(f.onVirtualScroll!==void 0&&m(`virtualScroll`,{index:e,from:O.value.from,to:O.value.to-1,direction:e<v?`decrease`:`increase`,ref:h}),v=e)}z();let re=te(F,g.platform.is.ios?120:35);i(()=>{z()});let H=!1;return n(()=>{H=!0}),a(()=>{if(!H)return;let e=o();_!==void 0&&e!=null&&e.nodeType!==8?qe(e,_,f.virtualScrollHorizontal,g.lang.rtl):P(v)}),s(()=>{re.cancel()}),Object.assign(h,{scrollTo:P,reset:M,refresh:N}),{virtualScrollSliceRange:O,virtualScrollSliceSizeComputed:w,setVirtualScrollSize:z,onVirtualScrollEvt:re,localResetVirtualScroll:R,padVirtualScroll:B,scrollTo:P,reset:M,refresh:N}}var Qe=e=>[`add`,`add-unique`,`toggle`].includes(e),$e=".*+?^${}()|[]\\",et=Object.keys(F);function tt(e,t){if(typeof e==`function`)return e;let n=e===void 0?t:e;return e=>typeof e==`object`&&e&&n in e?e[n]:e}var nt=_({name:`QSelect`,inheritAttrs:!1,props:{...Xe,...M,...F,modelValue:{required:!0},multiple:Boolean,displayValue:[String,Number],displayValueHtml:Boolean,dropdownIcon:String,options:{type:Array,default:()=>[]},optionValue:[Function,String],optionLabel:[Function,String],optionDisable:[Function,String],hideSelected:Boolean,hideDropdownIcon:Boolean,fillInput:Boolean,maxValues:[Number,String],optionsDense:Boolean,optionsDark:{type:Boolean,default:null},optionsSelectedClass:String,optionsHtml:Boolean,optionsCover:Boolean,menuShrink:Boolean,menuAnchor:String,menuSelf:String,menuOffset:Array,popupContentClass:String,popupContentStyle:[String,Array,Object],popupNoRouteDismiss:Boolean,useInput:Boolean,useChips:Boolean,newValueMode:{type:String,validator:Qe},mapOptions:Boolean,emitValue:Boolean,disableTabSelection:Boolean,inputDebounce:{type:[Number,String],default:500},inputClass:[Array,String,Object],inputStyle:[Array,String,Object],tabindex:{type:[String,Number],default:0},autocomplete:String,transitionShow:{},transitionHide:{},transitionDuration:{},behavior:{type:String,validator:e=>[`default`,`menu`,`dialog`].includes(e),default:`default`},virtualScrollItemSize:Xe.virtualScrollItemSize.type,onNewValue:Function,onFilter:Function},emits:[...I,`add`,`remove`,`inputValue`,`keyup`,`keypress`,`keydown`,`popupShow`,`popupHide`,`filterAbort`],setup(t,{slots:n,emit:i}){let{proxy:a}=ee(),{$q:c}=a,f=e(!1),m=e(!1),h=e(-1),_=e(``),v=e(!1),w=e(!1),T=null,E=null,O,k,A,j=null,te,M,F,I,z=e(null),V=e(null),H=e(null),ie=e(null),ae=e(null),oe=R(t),se=ne(st),U=r(()=>Array.isArray(t.options)?t.options.length:0),{virtualScrollSliceRange:ce,virtualScrollSliceSizeComputed:le,localResetVirtualScroll:ue,padVirtualScroll:de,onVirtualScrollEvt:fe,scrollTo:pe,setVirtualScrollSize:me}=Ze({virtualScrollLength:U,getVirtualScrollTarget:rt,getVirtualScrollEl:nt,virtualScrollItemSizeComputed:r(()=>t.virtualScrollItemSize===void 0?t.optionsDense?24:48:t.virtualScrollItemSize)}),W=P(),G=r(()=>{let e=t.mapOptions&&!t.multiple,n=t.modelValue!==void 0&&(t.modelValue!==null||e)?t.multiple&&Array.isArray(t.modelValue)?t.modelValue:[t.modelValue]:[];if(t.mapOptions&&Array.isArray(t.options)){let r=t.mapOptions&&O!==void 0?O:[],i=n.map(e=>Ge(e,r));return t.modelValue===null&&e?i.filter(e=>e!==null):i}return n}),he=r(()=>{let e={};return et.forEach(n=>{let r=t[n];r!==void 0&&(e[n]=r)}),e}),K=r(()=>t.optionsDark===null?W.isDark.value:t.optionsDark),ve=r(()=>N(G.value)),ye=r(()=>{let e=`q-field__input q-placeholder col`;return t.hideSelected||G.value.length===0?[e,t.inputClass]:(e+=` q-field__input--padding`,t.inputClass===void 0?e:[e,t.inputClass])}),be=r(()=>(t.virtualScrollHorizontal?`q-virtual-scroll--horizontal`:``)+(t.popupContentClass?` `+t.popupContentClass:``)),q=r(()=>U.value===0),xe=r(()=>G.value.map(e=>Z.value(e)).join(`, `)),Se=r(()=>t.displayValue===void 0?xe.value:t.displayValue),Ce=r(()=>t.optionsHtml?()=>!0:e=>e?.html===!0),Te=r(()=>t.displayValueHtml||t.displayValue===void 0&&(t.optionsHtml||G.value.some(Ce.value))),Ee=r(()=>W.focused.value?t.tabindex:-1),J=r(()=>{let e={tabindex:t.tabindex,role:`combobox`,"aria-label":t.label,"aria-readonly":t.readonly?`true`:`false`,"aria-autocomplete":t.useInput?`list`:`none`,"aria-expanded":f.value?`true`:`false`,"aria-controls":`${W.targetUid.value}_lb`};return h.value>=0&&(e[`aria-activedescendant`]=`${W.targetUid.value}_${h.value}`),e}),Y=r(()=>({id:`${W.targetUid.value}_lb`,role:`listbox`,"aria-multiselectable":t.multiple?`true`:`false`})),ke=r(()=>G.value.map((e,t)=>({index:t,opt:e,html:Ce.value(e),selected:!0,removeAtIndex:Be,toggleOption:Q,tabindex:Ee.value}))),Ae=r(()=>{if(U.value===0)return[];let{from:e,to:n}=ce.value;return t.options.slice(e,n).map((n,r)=>{let i=Fe.value(n)===!0,a=$(n),o=e+r,s={clickable:!0,active:a,activeClass:Pe.value,manualFocus:!0,focused:!1,disable:i,tabindex:-1,dense:t.optionsDense,dark:K.value,role:`option`,"aria-selected":a?`true`:`false`,id:`${W.targetUid.value}_${o}`,onClick:()=>{Q(n)}};return i||(h.value===o&&(s.focused=!0),c.platform.is.desktop&&(s.onMousemove=()=>{f.value&&Ue(o)})),{index:o,opt:n,html:Ce.value(n),label:Z.value(n),selected:s.active,focused:s.focused,toggleOption:Q,setOptionIndex:Ue,itemProps:s}})}),je=r(()=>t.dropdownIcon===void 0?c.iconSet.arrow.dropdown:t.dropdownIcon),Ne=r(()=>!t.optionsCover&&!t.outlined&&!t.standout&&!t.borderless&&!t.rounded),Pe=r(()=>t.optionsSelectedClass===void 0?t.color===void 0?``:`text-${t.color}`:t.optionsSelectedClass),X=r(()=>tt(t.optionValue,`value`)),Z=r(()=>tt(t.optionLabel,`label`)),Fe=r(()=>tt(t.optionDisable,`disable`)),Ie=r(()=>G.value.map(X.value)),Le=r(()=>{let e={onInput:st,onChange:se,onKeydown:Xe,onKeyup:Je,onKeypress:Ye,onFocus:Ke,onClick(e){k&&S(e)}};return e.onCompositionstart=e.onCompositionupdate=e.onCompositionend=se,e});u(G,e=>{O=e,t.useInput&&t.fillInput&&!t.multiple&&!W.innerLoading.value&&(!m.value&&!f.value||!ve.value)&&(A||Ct(),(m.value||f.value)&&ut(``))},{immediate:!0}),u(()=>t.fillInput,Ct),u(f,wt),u(U,Tt);function Re(e){return t.emitValue?X.value(e):e}function ze(e){if(e!==-1&&e<G.value.length){if(t.multiple){let n=[...t.modelValue];i(`remove`,{index:e,value:n.splice(e,1)[0]}),i(`update:modelValue`,n)}else i(`update:modelValue`,null)}}function Be(e){ze(e),W.focus()}function Ve(e,n){let r=Re(e);if(!t.multiple){t.fillInput&<(Z.value(e),!0,!0),i(`update:modelValue`,r);return}if(G.value.length===0){i(`add`,{index:0,value:r}),i(`update:modelValue`,t.multiple?[r]:r);return}if(n&&$(e)||t.maxValues!==void 0&&t.modelValue.length>=t.maxValues)return;let a=[...t.modelValue];i(`add`,{index:a.length,value:r}),a.push(r),i(`update:modelValue`,a)}function Q(e,n){if(!W.editable.value||e===void 0||Fe.value(e)===!0)return;let r=X.value(e);if(!t.multiple){n||(lt(t.fillInput?Z.value(e):``,!0,!0),St()),V.value?.focus(),(G.value.length===0||!B(X.value(G.value[0]),r))&&i(`update:modelValue`,t.emitValue?r:e);return}if((!k||v.value)&&W.focus(),Ke(),G.value.length===0){let n=t.emitValue?r:e;i(`add`,{index:0,value:n}),i(`update:modelValue`,t.multiple?[n]:n);return}let a=[...t.modelValue],o=Ie.value.findIndex(e=>B(e,r));if(o!==-1)i(`remove`,{index:o,value:a.splice(o,1)[0]});else{if(t.maxValues!==void 0&&a.length>=t.maxValues)return;let n=t.emitValue?r:e;i(`add`,{index:a.length,value:n}),a.push(n)}i(`update:modelValue`,a)}function Ue(e){if(!c.platform.is.desktop)return;let t=e!==-1&&e<U.value?e:-1;h.value!==t&&(h.value=t)}function We(e=1,n){if(f.value){let r=h.value;do r=we(r+e,-1,U.value-1);while(r!==-1&&r!==h.value&&Fe.value(t.options[r])===!0);h.value!==r&&(Ue(r),pe(r),!n&&t.useInput&&t.fillInput&&ct(r>=0?Z.value(t.options[r]):te,!0))}}function Ge(e,n){let r=t=>B(X.value(t),e);return t.options.find(r)||n.find(r)||e}function $(e){let t=X.value(e);return Ie.value.find(e=>B(e,t))!==void 0}function Ke(e){t.useInput&&V.value!==null&&(e===void 0||V.value===e.target&&e.target.value===xe.value)&&V.value.select()}function qe(e){x(e,27)&&f.value&&(S(e),St(),Ct()),i(`keyup`,e)}function Je(e){let{value:n}=e.target;if(e.keyCode!==void 0){qe(e);return}if(e.target.value=``,T!==null&&(clearTimeout(T),T=null),E!==null&&(clearTimeout(E),E=null),Ct(),typeof n==`string`&&n.length!==0){let e=n.toLocaleLowerCase(),r=n=>{let r=t.options.find(t=>String(n.value(t)).toLocaleLowerCase()===e);return r!==void 0&&(G.value.includes(r)?St():Q(r),!0)},i=e=>{!r(X)&&!e&&!r(Z)&&ut(n,!0,()=>i(!0))};i()}else W.clearValue(e)}function Ye(e){i(`keypress`,e)}function Xe(e){if(i(`keydown`,e),y(e))return;let n=_.value.length!==0&&(t.newValueMode!==void 0||t.onNewValue!==void 0),r=!e.shiftKey&&!t.disableTabSelection&&!t.multiple&&(h.value!==-1||n);if(e.keyCode===27){C(e);return}if(e.keyCode===9&&!r){bt();return}if(e.target===void 0||e.target.id!==W.targetUid.value||!W.editable.value)return;if(e.keyCode===40&&!W.innerLoading.value&&!f.value){g(e),xt();return}if(e.keyCode===8&&(t.useChips||t.clearable)&&!t.hideSelected&&_.value.length===0){t.multiple&&Array.isArray(t.modelValue)?ze(t.modelValue.length-1):!t.multiple&&t.modelValue!==null&&i(`update:modelValue`,null);return}(e.keyCode===35||e.keyCode===36)&&(typeof _.value!=`string`||_.value.length===0)&&(g(e),h.value=-1,We(e.keyCode===36?1:-1,t.multiple)),(e.keyCode===33||e.keyCode===34)&&le.value!==void 0&&(g(e),h.value=Math.max(-1,Math.min(U.value,h.value+(e.keyCode===33?-1:1)*le.value.view)),We(e.keyCode===33?1:-1,t.multiple)),(e.keyCode===38||e.keyCode===40)&&(g(e),We(e.keyCode===38?-1:1,t.multiple));let a=U.value;if((F===void 0||I<Date.now())&&(F=``),a>0&&!t.useInput&&e.key!==void 0&&e.key.length===1&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&(e.keyCode!==32||F.length!==0)){f.value||xt(e);let n=e.key.toLocaleLowerCase(),r=F.length===1&&F[0]===n;I=Date.now()+1500,r||(g(e),F+=n);let i=RegExp(`^`+[...F].map(e=>$e.includes(e)?`\\`+e:e).join(`.*`),`i`),o=h.value;if(r||o<0||!i.test(Z.value(t.options[o])))do o=we(o+1,-1,a-1);while(o!==h.value&&(Fe.value(t.options[o])===!0||!i.test(Z.value(t.options[o]))));h.value!==o&&l(()=>{Ue(o),pe(o),o>=0&&t.useInput&&t.fillInput&&ct(Z.value(t.options[o]),!0)});return}if(!(e.keyCode!==13&&(e.keyCode!==32||t.useInput||F!==``)&&(e.keyCode!==9||!r))){if(e.keyCode!==9&&g(e),h.value!==-1&&h.value<a){Q(t.options[h.value]);return}if(n){let e=(e,n)=>{if(n){if(!Qe(n))return}else n=t.newValueMode;lt(``,!t.multiple,!0),e!=null&&((n===`toggle`?Q:Ve)(e,n===`add-unique`),t.multiple||(V.value?.focus(),St()))};if(t.onNewValue===void 0?e(_.value):i(`newValue`,_.value,e),!t.multiple)return}f.value?bt():W.innerLoading.value||xt()}}function nt(){return k?ae.value:H.value!==null&&H.value.contentEl!==null?H.value.contentEl:void 0}function rt(){return nt()}function it(){return t.hideSelected?[]:n[`selected-item`]===void 0?n.selected===void 0?t.useChips?ke.value.map((e,n)=>p(De,{key:`option-`+n,removable:W.editable.value&&Fe.value(e.opt)!==!0,dense:!0,textColor:t.color,tabindex:Ee.value,onRemove(){e.removeAtIndex(n)}},()=>p(`span`,{class:`ellipsis`,[e.html?`innerHTML`:`textContent`]:Z.value(e.opt)}))):[p(`span`,{class:`ellipsis`,[Te.value?`innerHTML`:`textContent`]:Se.value})]:[n.selected()].flat():ke.value.map(e=>n[`selected-item`](e))}function at(){if(q.value)return n[`no-option`]===void 0?void 0:n[`no-option`]({inputValue:_.value});let e=n.option===void 0?e=>p(_e,{key:e.index,...e.itemProps},()=>p(ge,()=>p(Oe,()=>p(`span`,{[e.html?`innerHTML`:`textContent`]:e.label})))):n.option,t=de(`div`,Ae.value.map(e));return n[`before-options`]!==void 0&&(t=[n[`before-options`](),...t].flat()),b(n[`after-options`],t)}function ot(e,n){let r=n?{...J.value,...W.splitAttrs.attributes.value}:void 0,i={ref:n?V:void 0,key:`i_t`,class:ye.value,style:t.inputStyle,value:_.value===void 0?``:_.value,type:`search`,...r,id:n?W.targetUid.value:void 0,maxlength:t.maxlength,autocomplete:t.autocomplete,"data-autofocus":e===!0||t.autofocus||void 0,disabled:t.disable,readonly:t.readonly,...Le.value};return!e&&k&&(Array.isArray(i.class)?i.class=[...i.class,`no-pointer-events`]:i.class+=` no-pointer-events`),p(`input`,i)}function st(e){T!==null&&(clearTimeout(T),T=null),E!==null&&(clearTimeout(E),E=null),!e?.target?.qComposing&&(ct(e.target.value||``),A=!0,te=_.value,!W.focused.value&&(!k||v.value)&&W.focus(),t.onFilter!==void 0&&(T=setTimeout(()=>{T=null,ut(_.value)},t.inputDebounce)))}function ct(e,n){_.value!==e&&(E!==null&&(clearTimeout(E),E=null),_.value=e,n||t.inputDebounce===0||t.inputDebounce===`0`?i(`inputValue`,e):E=setTimeout(()=>{E=null,i(`inputValue`,e)},t.inputDebounce))}function lt(e,n,r){A=r!==!0,t.useInput&&(ct(e,!0),(n||A)&&(te=e),n||ut(e))}function ut(e,n,r){if(t.onFilter===void 0||!n&&!W.focused.value)return;W.innerLoading.value?i(`filterAbort`):(W.innerLoading.value=!0,w.value=!0),e!==``&&!t.multiple&&G.value.length!==0&&!A&&e===Z.value(G.value[0])&&(e=``);let o=setTimeout(()=>{f.value&&=!1},10);j!==null&&clearTimeout(j),j=o,i(`filter`,e,(e,t)=>{(n||W.focused.value)&&j===o&&(clearTimeout(j),typeof e==`function`&&e(),w.value=!1,l(()=>{W.innerLoading.value=!1,W.editable.value&&(n?f.value&&St():f.value?wt(!0):f.value=!0),typeof t==`function`&&l(()=>{t(a)}),typeof r==`function`&&l(()=>{r(a)})}))},()=>{W.focused.value&&j===o&&(clearTimeout(j),W.innerLoading.value=!1,w.value=!1),f.value&&=!1})}function dt(){return p(Me,{ref:H,class:be.value,style:t.popupContentStyle,modelValue:f.value,fit:!t.menuShrink,cover:t.optionsCover&&!q.value&&!t.useInput,anchor:t.menuAnchor,self:t.menuSelf,offset:t.menuOffset,dark:K.value,noParentEvent:!0,noRefocus:!0,noFocus:!0,noRouteDismiss:t.popupNoRouteDismiss,square:Ne.value,transitionShow:t.transitionShow,transitionHide:t.transitionHide,transitionDuration:t.transitionDuration,separateClosePopup:!0,...Y.value,onScrollPassive:fe,onBeforeShow:Dt,onBeforeHide:ft,onShow:pt},at)}function ft(e){Ot(e),bt()}function pt(){me()}function mt(e){S(e),V.value?.focus(),v.value=!0,window.scrollTo(window.pageXOffset||window.scrollX||document.body.scrollLeft||0,0)}function ht(e){S(e),l(()=>{v.value=!1})}function gt(){let e=[p(He,{class:`col-auto ${W.fieldClass.value}`,...he.value,for:W.targetUid.value,dark:K.value,square:!0,loading:w.value,itemAligned:!1,filled:!0,stackLabel:_.value.length!==0,...W.splitAttrs.listeners.value,onFocus:mt,onBlur:ht},{...n,rawControl:()=>W.getControl(!0),before:void 0,after:void 0})];return f.value&&e.push(p(`div`,{ref:ae,class:be.value+` scroll`,style:t.popupContentStyle,...Y.value,onClick:C,onScrollPassive:fe},at())),p(re,{ref:ie,modelValue:m.value,position:t.useInput?`top`:void 0,transitionShow:M,transitionHide:t.transitionHide,transitionDuration:t.transitionDuration,noRouteDismiss:t.popupNoRouteDismiss,onBeforeShow:Dt,onBeforeHide:_t,onHide:vt,onShow:yt},()=>p(`div`,{class:`q-select__dialog`+(K.value?` q-select__dialog--dark q-dark`:``)+(v.value?` q-select__dialog--focused`:``)},e))}function _t(e){Ot(e),ie.value!==null&&ie.value.__updateRefocusTarget(W.rootRef.value.querySelector(`.q-field__native > [tabindex]:last-child`)),W.focused.value=!1}function vt(e){St(),W.focused.value||i(`blur`,e),Ct()}function yt(){let e=document.activeElement;(e===null||e.id!==W.targetUid.value)&&V.value!==null&&V.value!==e&&V.value.focus(),me()}function bt(){m.value||(h.value=-1,f.value&&=!1,W.focused.value||(j!==null&&(clearTimeout(j),j=null),W.innerLoading.value&&(i(`filterAbort`),W.innerLoading.value=!1,w.value=!1)))}function xt(e){W.editable.value&&(k?(W.onControlFocusin(e),m.value=!0,l(()=>{W.focus()})):W.focus(),t.onFilter===void 0?(!q.value||n[`no-option`]!==void 0)&&(f.value=!0):ut(_.value))}function St(){m.value=!1,bt()}function Ct(){t.useInput&<(!t.multiple&&t.fillInput&&G.value.length!==0&&Z.value(G.value[0])||``,!0,!0)}function wt(e){let n=-1;if(e){if(G.value.length!==0){let e=X.value(G.value[0]);n=t.options.findIndex(t=>B(X.value(t),e))}ue(n)}Ue(n)}function Tt(e,t){f.value&&!W.innerLoading.value&&(ue(-1,!0),l(()=>{f.value&&!W.innerLoading.value&&(e>t?ue():wt(!0))}))}function Et(){m.value||H.value?.updatePosition()}function Dt(e){e!==void 0&&S(e),i(`popupShow`,e),W.hasPopupOpen=!0,W.onControlFocusin(e)}function Ot(e){e!==void 0&&S(e),i(`popupHide`,e),W.hasPopupOpen=!1,W.onControlFocusout(e)}function kt(){k=!c.platform.is.mobile&&t.behavior!==`dialog`?!1:t.behavior!==`menu`&&(!t.useInput||n[`no-option`]!==void 0||t.onFilter!==void 0||!q.value),M=c.platform.is.ios&&k&&t.useInput?`fade`:t.transitionShow}return d(kt),o(Et),kt(),s(()=>{T!==null&&clearTimeout(T),E!==null&&clearTimeout(E)}),Object.assign(a,{showPopup:xt,hidePopup:St,removeAtIndex:ze,add:Ve,toggleOption:Q,getOptionIndex:()=>h.value,setOptionIndex:Ue,moveOptionSelection:We,filter:ut,updateMenuPosition:Et,updateInputValue:lt,isOptionSelected:$,getEmittingOptionValue:Re,isOptionDisabled:(...e)=>Fe.value(...e)===!0,getOptionValue:(...e)=>X.value(...e),getOptionLabel:(...e)=>Z.value(...e)}),Object.assign(W,{innerValue:G,fieldClass:r(()=>`q-select q-field--auto-height q-select--with${t.useInput?``:`out`}-input q-select--with${t.useChips?``:`out`}-chips q-select--${t.multiple?`multiple`:`single`}`),inputRef:z,targetRef:V,hasValue:ve,showPopup:xt,floatingLabel:r(()=>!t.hideSelected&&ve.value||typeof _.value==`number`||_.value.length!==0||N(t.displayValue)),getControlChild:()=>{if(W.editable.value&&(m.value||!q.value||n[`no-option`]!==void 0))return k?gt():dt();W.hasPopupOpen&&=!1},controlEvents:{onFocusin(e){W.onControlFocusin(e)},onFocusout(e){W.onControlFocusout(e,()=>{Ct(),bt()})},onClick(e){if(C(e),!k&&f.value){bt(),V.value?.focus();return}xt(e)}},getControl:e=>{let n=it(),r=e===!0||!m.value||!k;if(t.useInput)n.push(ot(e,r));else if(W.editable.value){let i=r?J.value:void 0;n.push(p(`input`,{ref:r?V:void 0,key:`d_t`,class:`q-select__focus-target`,id:r?W.targetUid.value:void 0,value:Se.value,readonly:!0,"data-autofocus":e===!0||t.autofocus||void 0,...i,onKeydown:Xe,onKeyup:qe,onKeypress:Ye})),r&&typeof t.autocomplete==`string`&&t.autocomplete.length!==0&&n.push(p(`input`,{class:`q-select__autocomplete-input`,autocomplete:t.autocomplete,tabindex:-1,onKeyup:Je}))}if(oe.value!==void 0&&!t.disable&&Ie.value.length!==0){let e=Ie.value.map(e=>p(`option`,{value:e,selected:!0}));n.push(p(`select`,{class:`hidden`,name:oe.value,multiple:t.multiple},e))}let i=t.useInput||!r?void 0:W.splitAttrs.attributes.value;return p(`div`,{class:`q-field__native row items-center`,...i,...W.splitAttrs.listeners.value},n)},getInnerAppend:()=>!t.loading&&!w.value&&!t.hideDropdownIcon?[p(D,{class:`q-select__dropdown-icon`+(f.value?` rotate-180`:``),name:je.value})]:null}),L(W)}});export{Fe as a,Ve as c,Oe as d,Pe as i,Me as l,He as n,Z as o,X as r,Ne as s,nt as t,je as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e}from"./reactivity.esm-bundler-DtSZKRQB.js";import{B as t,Mt as n,Ot as r,Tt as i,fn as a,st as o,t as s,ut as c}from"./runtime-dom.esm-bundler-DgevF6KV.js";import{C as l,E as u,M as d,N as f,b as p,k as m,s as h,w as g}from"./QIcon--SvgE-nS.js";import{d as _,f as v,n as y}from"./QSeparator-BdyRE-AM.js";import{Ct as b,St as x,_t as S,bt as ee,lt as C,nt as te,ot as ne,pt as re,rt as ie,st as w,vt as ae,wt as oe,xt as T,yt as E}from"./index-CoOsPyyG.js";var D=f({name:`QSlideTransition`,props:{appear:Boolean,duration:{type:Number,default:300}},emits:[`show`,`hide`],setup(e,{slots:t,emit:n}){let i=!1,a,o,l=null,u=null,d,f;function p(){a?.(),a=null,i=!1,l!==null&&(clearTimeout(l),l=null),u!==null&&(clearTimeout(u),u=null),o?.removeEventListener(`transitionend`,d),d=null}function m(t,n,r){n!==void 0&&(t.style.height=`${n}px`),t.style.transition=`height ${e.duration}ms cubic-bezier(.25, .8, .50, 1)`,i=!0,a=r}function h(e,t){e.style.overflowY=null,e.style.height=null,e.style.transition=null,p(),t!==f&&n(t)}function g(t,n){let r=0;o=t,i?(p(),r=t.offsetHeight===t.scrollHeight?0:void 0):(f=`hide`,t.style.overflowY=`hidden`),m(t,r,n),l=setTimeout(()=>{l=null,t.style.height=`${t.scrollHeight}px`,d=e=>{(Object(e)!==e||e.target===t)&&h(t,`show`)},t.addEventListener(`transitionend`,d),u=setTimeout(d,e.duration*1.1)},100)}function _(t,n){let r;o=t,i?p():(f=`show`,t.style.overflowY=`hidden`,r=t.scrollHeight),m(t,r,n),l=setTimeout(()=>{l=null,t.style.height=0,d=e=>{(Object(e)!==e||e.target===t)&&h(t,`hide`)},t.addEventListener(`transitionend`,d),u=setTimeout(d,e.duration*1.1)},100)}return r(()=>{i&&p()}),()=>c(s,{css:!1,appear:e.appear,onEnter:g,onLeave:_},t.default)}});function O(){if(window.getSelection!==void 0){let e=window.getSelection();e.empty===void 0?e.removeAllRanges!==void 0&&(e.removeAllRanges(),_.is.mobile||e.addRange(document.createRange())):e.empty()}else document.selection!==void 0&&document.selection.empty()}function se(e,t,n){return n<=t?t:Math.min(n,Math.max(t,e))}function ce(e,t,n){if(n<=t)return t;let r=n-t+1,i=t+(e-t)%r;return i<t&&(i=r+i),i===0?0:i}var k=!1;{let e=document.createElement(`div`);e.setAttribute(`dir`,`rtl`),Object.assign(e.style,{width:`1px`,height:`1px`,overflow:`auto`});let t=document.createElement(`div`);Object.assign(t.style,{width:`1000px`,height:`1px`}),document.body.append(e),e.append(t),e.scrollLeft=-1e3,k=e.scrollLeft>=0,e.remove()}var A={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},j={...A,contextMenu:Boolean};function M({showing:t,avoidEmit:s,configureAnchorEl:c}){let{props:u,proxy:d,emit:f}=o(),h=e(null),_=null;function v(e){return h.value===null?!1:e===void 0||e.touches===void 0||e.touches.length<=1}let y={};c===void 0&&(Object.assign(y,{hide(e){d.hide(e)},toggle(e){d.toggle(e),e.qAnchorHandled=!0},toggleKey(e){p(e,13)&&y.toggle(e)},contextClick(e){d.hide(e),m(e),i(()=>{d.show(e),e.qAnchorHandled=!0})},prevent:m,mobileTouch(e){if(y.mobileCleanup(e),!v(e))return;d.hide(e),h.value.classList.add(`non-selectable`);let t=e.target;l(y,`anchor`,[[t,`touchmove`,`mobileCleanup`,`passive`],[t,`touchend`,`mobileCleanup`,`passive`],[t,`touchcancel`,`mobileCleanup`,`passive`],[h.value,`contextmenu`,`prevent`,`notPassive`]]),_=setTimeout(()=>{_=null,d.show(e),e.qAnchorHandled=!0},300)},mobileCleanup(e){h.value.classList.remove(`non-selectable`),_!==null&&(clearTimeout(_),_=null),t.value&&e!==void 0&&O()}}),c=function(e=u.contextMenu){if(u.noParentEvent||h.value===null)return;let t=e?d.$q.platform.is.mobile?[[h.value,`touchstart`,`mobileTouch`,`passive`]]:[[h.value,`mousedown`,`hide`,`passive`],[h.value,`contextmenu`,`contextClick`,`notPassive`]]:[[h.value,`click`,`toggle`,`passive`],[h.value,`keyup`,`toggleKey`,`passive`]];l(y,`anchor`,t)});function b(){g(y,`anchor`)}function x(e){for(h.value=e;h.value.classList.contains(`q-anchor--skip`);)h.value=h.value.parentNode;c()}function S(){if(u.target===!1||u.target===``||d.$el.parentNode===null)h.value=null;else if(u.target===!0)x(d.$el.parentNode);else{let e=u.target;if(typeof u.target==`string`)try{e=document.querySelector(u.target)}catch{e=void 0}e==null?(h.value=null,console.error(`Anchor: target "${u.target}" not found`)):(h.value=e.$el||e,c())}}return a(()=>u.contextMenu,e=>{h.value!==null&&(b(),c(e))}),a(()=>u.target,()=>{h.value!==null&&b(),S()}),a(()=>u.noParentEvent,e=>{h.value!==null&&(e?b():c())}),n(()=>{S(),!s&&u.modelValue&&h.value===null&&f(`update:modelValue`,!1)}),r(()=>{_!==null&&clearTimeout(_),b()}),{anchorEl:h,canShow:v,anchorEvents:y}}function le(t,n){let i=e(null),o;function s(e,t){let n=`${t===void 0?`remove`:`add`}EventListener`,r=t===void 0?o:t;e!==window&&e[n](`scroll`,r,u.passive),window[n](`scroll`,r,u.passive),o=t}function c(){i.value!==null&&(s(i.value),i.value=null)}let l=a(()=>t.noParentEvent,()=>{i.value!==null&&(c(),n())});return r(l),{localScrollTarget:i,unconfigureScrollTarget:c,changeScrollEvent:s}}var N=null,{notPassiveCapture:P}=u,F=[];function I(e){N!==null&&(clearTimeout(N),N=null);let t=e.target;if(t===void 0||t.nodeType===8||t.classList.contains(`no-pointer-events`))return;let n=null,r=!1;for(let e=S.length-1;e>=0;e--){let t=S[e].$,i=t.type.name;if(i!==`QTooltip`){if(i===`QDialog`){if(t.props.seamless!==!0){if(r===!1)return;n=new Set(S.slice(e+1).map(e=>e.contentEl));break}continue}r=!0}}for(let r=F.length-1;r>=0;r--){let i=F[r];if(n!==null&&!n.has(i.innerRef.value))return;if((i.anchorEl.value===null||!i.anchorEl.value.contains(t))&&(t===document.body||i.innerRef.value!==null&&!i.innerRef.value.contains(t)))e.qClickOutside=!0,i.onClickOutside(e);else return}}function ue(e){F.push(e),F.length===1&&(document.addEventListener(`mousedown`,I,P),document.addEventListener(`touchstart`,I,P))}function L(e){let t=F.indexOf(e);t!==-1&&(F.splice(t,1),F.length===0&&(N!==null&&(clearTimeout(N),N=null),document.removeEventListener(`mousedown`,I,P),document.removeEventListener(`touchstart`,I,P)))}var R,z,B=[`top`,`center`,`bottom`],V=[`left`,`middle`,`right`,`start`,`end`];function H(e){let t=e.split(` `);return t.length===2?B.includes(t[0])?V.includes(t[1])?!0:(console.error(`Anchor/Self position must end with one of left/middle/right/start/end`),!1):(console.error(`Anchor/Self position must start with one of top/center/bottom`),!1):!1}function U(e){return!e||e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}var W={"start#ltr":`left`,"start#rtl":`right`,"end#ltr":`right`,"end#rtl":`left`};[`left`,`middle`,`right`].forEach(e=>{W[`${e}#ltr`]=e,W[`${e}#rtl`]=e});function G(e,t){let n=e.split(` `);return{vertical:n[0],horizontal:W[`${n[1]}#${t?`rtl`:`ltr`}`]}}function K(e,t){let{top:n,left:r,right:i,bottom:a,width:o,height:s}=e.getBoundingClientRect();return t!==void 0&&(n-=t[1],r-=t[0],a+=t[1],i+=t[0],o+=t[0],s+=t[1]),{top:n,bottom:a,height:s,left:r,right:i,width:o,middle:r+(i-r)/2,center:n+(a-n)/2}}function q(e,t,n){let{top:r,left:i}=e.getBoundingClientRect();return r+=t.top,i+=t.left,n!==void 0&&(r+=n[1],i+=n[0]),{top:r,bottom:r+1,height:1,left:i,right:i+1,width:1,middle:i,center:r}}function de(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function J(e,t,n,r){return{top:e[n.vertical]-t[r.vertical],left:e[n.horizontal]-t[r.horizontal]}}function Y(e,t=0){if(e.targetEl===null||e.anchorEl===null||t>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{Y(e,t+1)},10);return}let{targetEl:n,offset:r,anchorEl:i,anchorOrigin:a,selfOrigin:o,absoluteOffset:s,fit:c,cover:l,maxHeight:u,maxWidth:d}=e;if(v.is.ios&&window.visualViewport!==void 0){let e=document.body.style,{offsetLeft:t,offsetTop:n}=window.visualViewport;t!==R&&(e.setProperty(`--q-pe-left`,t+`px`),R=t),n!==z&&(e.setProperty(`--q-pe-top`,n+`px`),z=n)}let{scrollLeft:f,scrollTop:p}=n,m=s===void 0?K(i,l?[0,0]:r):q(i,s,r);Object.assign(n.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:d,maxHeight:u,visibility:`visible`});let{offsetWidth:h,offsetHeight:g}=n,{elWidth:_,elHeight:y}=c||l?{elWidth:Math.max(m.width,h),elHeight:l?Math.max(m.height,g):g}:{elWidth:h,elHeight:g},b={maxWidth:d,maxHeight:u};(c||l)&&(b.minWidth=m.width+`px`,l&&(b.minHeight=m.height+`px`)),Object.assign(n.style,b);let x=de(_,y),S=J(m,x,a,o);if(s===void 0||r===void 0)X(S,m,x,a,o);else{let{top:e,left:t}=S;X(S,m,x,a,o);let n=!1;if(S.top!==e){n=!0;let e=2*r[1];m.center=m.top-=e,m.bottom-=e+2}if(S.left!==t){n=!0;let e=2*r[0];m.middle=m.left-=e,m.right-=e+2}n&&(S=J(m,x,a,o),X(S,m,x,a,o))}b={top:S.top+`px`,left:S.left+`px`},S.maxHeight!==void 0&&(b.maxHeight=S.maxHeight+`px`,m.height>S.maxHeight&&(b.minHeight=b.maxHeight)),S.maxWidth!==void 0&&(b.maxWidth=S.maxWidth+`px`,m.width>S.maxWidth&&(b.minWidth=b.maxWidth)),Object.assign(n.style,b),n.scrollTop!==p&&(n.scrollTop=p),n.scrollLeft!==f&&(n.scrollLeft=f)}function X(e,t,n,r,i){let a=n.bottom,o=n.right,s=w(),c=window.innerHeight-s,l=document.body.clientWidth;if(e.top<0||e.top+a>c){if(i.vertical===`center`)e.top=t[r.vertical]>c/2?Math.max(0,c-a):0,e.maxHeight=Math.min(a,c);else if(t[r.vertical]>c/2){let n=Math.min(c,r.vertical===`center`?t.center:r.vertical===i.vertical?t.bottom:t.top);e.maxHeight=Math.min(a,n),e.top=Math.max(0,n-a)}else e.top=Math.max(0,r.vertical===`center`?t.center:r.vertical===i.vertical?t.top:t.bottom),e.maxHeight=Math.min(a,c-e.top)}if(e.left<0||e.left+o>l){if(e.maxWidth=Math.min(o,l),i.horizontal===`middle`)e.left=t[r.horizontal]>l/2?Math.max(0,l-o):0;else if(t[r.horizontal]>l/2){let n=Math.min(l,r.horizontal===`middle`?t.middle:r.horizontal===i.horizontal?t.right:t.left);e.maxWidth=Math.min(o,n),e.left=Math.max(0,n-e.maxWidth)}else e.left=Math.max(0,r.horizontal===`middle`?t.middle:r.horizontal===i.horizontal?t.left:t.right),e.maxWidth=Math.min(o,l-e.left)}}var fe=0,Z=f({name:`QTooltip`,inheritAttrs:!1,props:{...A,...x,...E,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{...E.transitionShow,default:`jump-down`},transitionHide:{...E.transitionHide,default:`jump-up`},anchor:{type:String,default:`bottom middle`,validator:H},self:{type:String,default:`top middle`,validator:H},offset:{type:Array,default:()=>[14,14],validator:U},scrollTarget:C,delay:{type:Number,default:0},hideDelay:{type:Number,default:0},persistent:Boolean},emits:[...T],setup(n,{slots:i,emit:u,attrs:f}){let p,m,_,v=!1,x,S=o(),{proxy:{$q:C}}=S,w=e(null),T=e(!1),E=y(),D=t(()=>f.id||E.value),se=t(()=>G(n.anchor,C.lang.rtl)),ce=t(()=>G(n.self,C.lang.rtl)),k=t(()=>!n.persistent),{registerTick:A,removeTick:j}=b(),{registerTimeout:N}=oe(),{transitionProps:P,transitionStyle:F}=ae(n),{localScrollTarget:I,changeScrollEvent:R,unconfigureScrollTarget:z}=le(n,be),{anchorEl:B,canShow:V,anchorEvents:H}=M({showing:T,configureAnchorEl:_e}),{show:U,hide:W}=ee({showing:T,canShow:V,handleShow:J,handleHide:X,hideOnRouteChange:k,processOnMount:!0});Object.assign(H,{delayShow:pe,delayHide:me,onFocusin:he});let{showPortal:K,hidePortal:q,renderPortal:de}=re(S,w,Se,`tooltip`);if(C.platform.is.mobile){let e={anchorEl:B,innerRef:w,onClickOutside(e){return W(e),e.target.classList.contains(`q-dialog__backdrop`)&&d(e),!0}},i=t(()=>n.modelValue===null&&!n.persistent&&T.value);a(i,t=>{(t?ue:L)(e)}),r(()=>{L(e)})}else a(()=>(n.modelValue===null||n[`onUpdate:modelValue`])&&T.value===!0&&n.persistent!==!0,e=>{(e===!0?te:ie)(ge)});function J(e){K(),ve(),A(()=>{if(m?.disconnect(),w.value===null){m=void 0;return}m=new MutationObserver(()=>Q()),m.observe(w.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),Q(),be()}),p===void 0&&(p=a(()=>C.screen.width+`|`+C.screen.height+`|`+n.self+`|`+n.anchor+`|`+C.lang.rtl,Q)),N(()=>{K(!0),u(`show`,e)},n.transitionDuration)}function X(e){j(),q(),Z(),N(()=>{q(!0),u(`hide`,e)},n.transitionDuration)}function Z(){m!==void 0&&(m.disconnect(),m=void 0),p!==void 0&&(p(),p=void 0),z(),ie(ge),g(H,`tooltipTemp`),ye(),$(!1)}function Q(){Y({targetEl:w.value,offset:n.offset,anchorEl:B.value,anchorOrigin:se.value,selfOrigin:ce.value,maxHeight:n.maxHeight,maxWidth:n.maxWidth})}function pe(e){if(C.platform.is.mobile){_!==void 0&&(clearTimeout(_),_=void 0),O(),$(!0);let e=B.value,t=[`touchmove`,`touchcancel`,`touchend`,`click`].map(t=>[e,t,`delayHide`,`passiveCapture`]);l(H,`tooltipTemp`,t)}N(()=>{U(e)},n.delay)}function me(e){C.platform.is.mobile&&(g(H,`tooltipTemp`),O(),_=setTimeout(()=>{_=void 0,$(!1)},10)),N(()=>{W(e)},n.hideDelay)}function he(e){let t=e.target;if(t){try{if(t.matches(`:focus-visible`)===!1)return}catch{}pe(e)}}function ge(e){W(e)}function _e(){if(n.noParentEvent||B.value===null)return;let e=C.platform.is.mobile?[[B.value,`touchstart`,`delayShow`,`passive`]]:[[B.value,`mouseenter`,`delayShow`,`passive`],[B.value,`mouseleave`,`delayHide`,`passive`],[B.value,`focusin`,`onFocusin`,`passive`],[B.value,`focusout`,`delayHide`,`passive`]];l(H,`anchor`,e)}function $(e){v!==e&&(v=e,fe+=e?1:-1,document.body.classList.toggle(`non-selectable`,fe>0),!e&&_!==void 0&&(clearTimeout(_),_=void 0))}function ve(){let e=B.value,t=D.value;if(e===null||t===void 0)return;let n=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean);x={el:e,id:t,added:!n.includes(t)},x.added&&(n.push(t),e.setAttribute(`aria-describedby`,n.join(` `)))}function ye(){if(x?.added===!0){let{el:e,id:t}=x,n=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e!==``&&e!==t);n.length===0?e.removeAttribute(`aria-describedby`):e.setAttribute(`aria-describedby`,n.join(` `))}x=void 0}function be(){if(B.value!==null||n.scrollTarget!==void 0){I.value=ne(B.value,n.scrollTarget);let e=n.noParentEvent?Q:W;R(I.value,e)}}function xe(){return T.value?c(`div`,{...f,id:D.value,ref:w,class:[`q-tooltip q-tooltip--style q-position-engine no-pointer-events`,f.class],style:[f.style,F.value],role:`tooltip`},h(i.default)):null}function Se(){return c(s,P.value,xe)}return r(Z),Object.assign(S.proxy,{updatePosition:Q}),de}});export{H as a,le as c,k as d,se as f,D as h,U as i,M as l,O as m,G as n,ue as o,ce as p,Y as r,L as s,Z as t,j as u};
|
|
1
|
+
import{C as e}from"./reactivity.esm-bundler-DtSZKRQB.js";import{B as t,Mt as n,Ot as r,Tt as i,fn as a,st as o,t as s,ut as c}from"./runtime-dom.esm-bundler-DgevF6KV.js";import{C as l,E as u,M as d,N as f,b as p,k as m,s as h,w as g}from"./QIcon--SvgE-nS.js";import{d as _,f as v,n as y}from"./QSeparator-BdyRE-AM.js";import{Ct as b,St as x,_t as S,bt as ee,lt as C,nt as te,ot as ne,pt as re,rt as ie,st as w,vt as ae,wt as oe,xt as T,yt as E}from"./index-B_OmZ65F.js";var D=f({name:`QSlideTransition`,props:{appear:Boolean,duration:{type:Number,default:300}},emits:[`show`,`hide`],setup(e,{slots:t,emit:n}){let i=!1,a,o,l=null,u=null,d,f;function p(){a?.(),a=null,i=!1,l!==null&&(clearTimeout(l),l=null),u!==null&&(clearTimeout(u),u=null),o?.removeEventListener(`transitionend`,d),d=null}function m(t,n,r){n!==void 0&&(t.style.height=`${n}px`),t.style.transition=`height ${e.duration}ms cubic-bezier(.25, .8, .50, 1)`,i=!0,a=r}function h(e,t){e.style.overflowY=null,e.style.height=null,e.style.transition=null,p(),t!==f&&n(t)}function g(t,n){let r=0;o=t,i?(p(),r=t.offsetHeight===t.scrollHeight?0:void 0):(f=`hide`,t.style.overflowY=`hidden`),m(t,r,n),l=setTimeout(()=>{l=null,t.style.height=`${t.scrollHeight}px`,d=e=>{(Object(e)!==e||e.target===t)&&h(t,`show`)},t.addEventListener(`transitionend`,d),u=setTimeout(d,e.duration*1.1)},100)}function _(t,n){let r;o=t,i?p():(f=`show`,t.style.overflowY=`hidden`,r=t.scrollHeight),m(t,r,n),l=setTimeout(()=>{l=null,t.style.height=0,d=e=>{(Object(e)!==e||e.target===t)&&h(t,`hide`)},t.addEventListener(`transitionend`,d),u=setTimeout(d,e.duration*1.1)},100)}return r(()=>{i&&p()}),()=>c(s,{css:!1,appear:e.appear,onEnter:g,onLeave:_},t.default)}});function O(){if(window.getSelection!==void 0){let e=window.getSelection();e.empty===void 0?e.removeAllRanges!==void 0&&(e.removeAllRanges(),_.is.mobile||e.addRange(document.createRange())):e.empty()}else document.selection!==void 0&&document.selection.empty()}function se(e,t,n){return n<=t?t:Math.min(n,Math.max(t,e))}function ce(e,t,n){if(n<=t)return t;let r=n-t+1,i=t+(e-t)%r;return i<t&&(i=r+i),i===0?0:i}var k=!1;{let e=document.createElement(`div`);e.setAttribute(`dir`,`rtl`),Object.assign(e.style,{width:`1px`,height:`1px`,overflow:`auto`});let t=document.createElement(`div`);Object.assign(t.style,{width:`1000px`,height:`1px`}),document.body.append(e),e.append(t),e.scrollLeft=-1e3,k=e.scrollLeft>=0,e.remove()}var A={target:{type:[Boolean,String,Element],default:!0},noParentEvent:Boolean},j={...A,contextMenu:Boolean};function M({showing:t,avoidEmit:s,configureAnchorEl:c}){let{props:u,proxy:d,emit:f}=o(),h=e(null),_=null;function v(e){return h.value===null?!1:e===void 0||e.touches===void 0||e.touches.length<=1}let y={};c===void 0&&(Object.assign(y,{hide(e){d.hide(e)},toggle(e){d.toggle(e),e.qAnchorHandled=!0},toggleKey(e){p(e,13)&&y.toggle(e)},contextClick(e){d.hide(e),m(e),i(()=>{d.show(e),e.qAnchorHandled=!0})},prevent:m,mobileTouch(e){if(y.mobileCleanup(e),!v(e))return;d.hide(e),h.value.classList.add(`non-selectable`);let t=e.target;l(y,`anchor`,[[t,`touchmove`,`mobileCleanup`,`passive`],[t,`touchend`,`mobileCleanup`,`passive`],[t,`touchcancel`,`mobileCleanup`,`passive`],[h.value,`contextmenu`,`prevent`,`notPassive`]]),_=setTimeout(()=>{_=null,d.show(e),e.qAnchorHandled=!0},300)},mobileCleanup(e){h.value.classList.remove(`non-selectable`),_!==null&&(clearTimeout(_),_=null),t.value&&e!==void 0&&O()}}),c=function(e=u.contextMenu){if(u.noParentEvent||h.value===null)return;let t=e?d.$q.platform.is.mobile?[[h.value,`touchstart`,`mobileTouch`,`passive`]]:[[h.value,`mousedown`,`hide`,`passive`],[h.value,`contextmenu`,`contextClick`,`notPassive`]]:[[h.value,`click`,`toggle`,`passive`],[h.value,`keyup`,`toggleKey`,`passive`]];l(y,`anchor`,t)});function b(){g(y,`anchor`)}function x(e){for(h.value=e;h.value.classList.contains(`q-anchor--skip`);)h.value=h.value.parentNode;c()}function S(){if(u.target===!1||u.target===``||d.$el.parentNode===null)h.value=null;else if(u.target===!0)x(d.$el.parentNode);else{let e=u.target;if(typeof u.target==`string`)try{e=document.querySelector(u.target)}catch{e=void 0}e==null?(h.value=null,console.error(`Anchor: target "${u.target}" not found`)):(h.value=e.$el||e,c())}}return a(()=>u.contextMenu,e=>{h.value!==null&&(b(),c(e))}),a(()=>u.target,()=>{h.value!==null&&b(),S()}),a(()=>u.noParentEvent,e=>{h.value!==null&&(e?b():c())}),n(()=>{S(),!s&&u.modelValue&&h.value===null&&f(`update:modelValue`,!1)}),r(()=>{_!==null&&clearTimeout(_),b()}),{anchorEl:h,canShow:v,anchorEvents:y}}function le(t,n){let i=e(null),o;function s(e,t){let n=`${t===void 0?`remove`:`add`}EventListener`,r=t===void 0?o:t;e!==window&&e[n](`scroll`,r,u.passive),window[n](`scroll`,r,u.passive),o=t}function c(){i.value!==null&&(s(i.value),i.value=null)}let l=a(()=>t.noParentEvent,()=>{i.value!==null&&(c(),n())});return r(l),{localScrollTarget:i,unconfigureScrollTarget:c,changeScrollEvent:s}}var N=null,{notPassiveCapture:P}=u,F=[];function I(e){N!==null&&(clearTimeout(N),N=null);let t=e.target;if(t===void 0||t.nodeType===8||t.classList.contains(`no-pointer-events`))return;let n=null,r=!1;for(let e=S.length-1;e>=0;e--){let t=S[e].$,i=t.type.name;if(i!==`QTooltip`){if(i===`QDialog`){if(t.props.seamless!==!0){if(r===!1)return;n=new Set(S.slice(e+1).map(e=>e.contentEl));break}continue}r=!0}}for(let r=F.length-1;r>=0;r--){let i=F[r];if(n!==null&&!n.has(i.innerRef.value))return;if((i.anchorEl.value===null||!i.anchorEl.value.contains(t))&&(t===document.body||i.innerRef.value!==null&&!i.innerRef.value.contains(t)))e.qClickOutside=!0,i.onClickOutside(e);else return}}function ue(e){F.push(e),F.length===1&&(document.addEventListener(`mousedown`,I,P),document.addEventListener(`touchstart`,I,P))}function L(e){let t=F.indexOf(e);t!==-1&&(F.splice(t,1),F.length===0&&(N!==null&&(clearTimeout(N),N=null),document.removeEventListener(`mousedown`,I,P),document.removeEventListener(`touchstart`,I,P)))}var R,z,B=[`top`,`center`,`bottom`],V=[`left`,`middle`,`right`,`start`,`end`];function H(e){let t=e.split(` `);return t.length===2?B.includes(t[0])?V.includes(t[1])?!0:(console.error(`Anchor/Self position must end with one of left/middle/right/start/end`),!1):(console.error(`Anchor/Self position must start with one of top/center/bottom`),!1):!1}function U(e){return!e||e.length===2&&typeof e[0]==`number`&&typeof e[1]==`number`}var W={"start#ltr":`left`,"start#rtl":`right`,"end#ltr":`right`,"end#rtl":`left`};[`left`,`middle`,`right`].forEach(e=>{W[`${e}#ltr`]=e,W[`${e}#rtl`]=e});function G(e,t){let n=e.split(` `);return{vertical:n[0],horizontal:W[`${n[1]}#${t?`rtl`:`ltr`}`]}}function K(e,t){let{top:n,left:r,right:i,bottom:a,width:o,height:s}=e.getBoundingClientRect();return t!==void 0&&(n-=t[1],r-=t[0],a+=t[1],i+=t[0],o+=t[0],s+=t[1]),{top:n,bottom:a,height:s,left:r,right:i,width:o,middle:r+(i-r)/2,center:n+(a-n)/2}}function q(e,t,n){let{top:r,left:i}=e.getBoundingClientRect();return r+=t.top,i+=t.left,n!==void 0&&(r+=n[1],i+=n[0]),{top:r,bottom:r+1,height:1,left:i,right:i+1,width:1,middle:i,center:r}}function de(e,t){return{top:0,center:t/2,bottom:t,left:0,middle:e/2,right:e}}function J(e,t,n,r){return{top:e[n.vertical]-t[r.vertical],left:e[n.horizontal]-t[r.horizontal]}}function Y(e,t=0){if(e.targetEl===null||e.anchorEl===null||t>5)return;if(e.targetEl.offsetHeight===0||e.targetEl.offsetWidth===0){setTimeout(()=>{Y(e,t+1)},10);return}let{targetEl:n,offset:r,anchorEl:i,anchorOrigin:a,selfOrigin:o,absoluteOffset:s,fit:c,cover:l,maxHeight:u,maxWidth:d}=e;if(v.is.ios&&window.visualViewport!==void 0){let e=document.body.style,{offsetLeft:t,offsetTop:n}=window.visualViewport;t!==R&&(e.setProperty(`--q-pe-left`,t+`px`),R=t),n!==z&&(e.setProperty(`--q-pe-top`,n+`px`),z=n)}let{scrollLeft:f,scrollTop:p}=n,m=s===void 0?K(i,l?[0,0]:r):q(i,s,r);Object.assign(n.style,{top:0,left:0,minWidth:null,minHeight:null,maxWidth:d,maxHeight:u,visibility:`visible`});let{offsetWidth:h,offsetHeight:g}=n,{elWidth:_,elHeight:y}=c||l?{elWidth:Math.max(m.width,h),elHeight:l?Math.max(m.height,g):g}:{elWidth:h,elHeight:g},b={maxWidth:d,maxHeight:u};(c||l)&&(b.minWidth=m.width+`px`,l&&(b.minHeight=m.height+`px`)),Object.assign(n.style,b);let x=de(_,y),S=J(m,x,a,o);if(s===void 0||r===void 0)X(S,m,x,a,o);else{let{top:e,left:t}=S;X(S,m,x,a,o);let n=!1;if(S.top!==e){n=!0;let e=2*r[1];m.center=m.top-=e,m.bottom-=e+2}if(S.left!==t){n=!0;let e=2*r[0];m.middle=m.left-=e,m.right-=e+2}n&&(S=J(m,x,a,o),X(S,m,x,a,o))}b={top:S.top+`px`,left:S.left+`px`},S.maxHeight!==void 0&&(b.maxHeight=S.maxHeight+`px`,m.height>S.maxHeight&&(b.minHeight=b.maxHeight)),S.maxWidth!==void 0&&(b.maxWidth=S.maxWidth+`px`,m.width>S.maxWidth&&(b.minWidth=b.maxWidth)),Object.assign(n.style,b),n.scrollTop!==p&&(n.scrollTop=p),n.scrollLeft!==f&&(n.scrollLeft=f)}function X(e,t,n,r,i){let a=n.bottom,o=n.right,s=w(),c=window.innerHeight-s,l=document.body.clientWidth;if(e.top<0||e.top+a>c){if(i.vertical===`center`)e.top=t[r.vertical]>c/2?Math.max(0,c-a):0,e.maxHeight=Math.min(a,c);else if(t[r.vertical]>c/2){let n=Math.min(c,r.vertical===`center`?t.center:r.vertical===i.vertical?t.bottom:t.top);e.maxHeight=Math.min(a,n),e.top=Math.max(0,n-a)}else e.top=Math.max(0,r.vertical===`center`?t.center:r.vertical===i.vertical?t.top:t.bottom),e.maxHeight=Math.min(a,c-e.top)}if(e.left<0||e.left+o>l){if(e.maxWidth=Math.min(o,l),i.horizontal===`middle`)e.left=t[r.horizontal]>l/2?Math.max(0,l-o):0;else if(t[r.horizontal]>l/2){let n=Math.min(l,r.horizontal===`middle`?t.middle:r.horizontal===i.horizontal?t.right:t.left);e.maxWidth=Math.min(o,n),e.left=Math.max(0,n-e.maxWidth)}else e.left=Math.max(0,r.horizontal===`middle`?t.middle:r.horizontal===i.horizontal?t.left:t.right),e.maxWidth=Math.min(o,l-e.left)}}var fe=0,Z=f({name:`QTooltip`,inheritAttrs:!1,props:{...A,...x,...E,maxHeight:{type:String,default:null},maxWidth:{type:String,default:null},transitionShow:{...E.transitionShow,default:`jump-down`},transitionHide:{...E.transitionHide,default:`jump-up`},anchor:{type:String,default:`bottom middle`,validator:H},self:{type:String,default:`top middle`,validator:H},offset:{type:Array,default:()=>[14,14],validator:U},scrollTarget:C,delay:{type:Number,default:0},hideDelay:{type:Number,default:0},persistent:Boolean},emits:[...T],setup(n,{slots:i,emit:u,attrs:f}){let p,m,_,v=!1,x,S=o(),{proxy:{$q:C}}=S,w=e(null),T=e(!1),E=y(),D=t(()=>f.id||E.value),se=t(()=>G(n.anchor,C.lang.rtl)),ce=t(()=>G(n.self,C.lang.rtl)),k=t(()=>!n.persistent),{registerTick:A,removeTick:j}=b(),{registerTimeout:N}=oe(),{transitionProps:P,transitionStyle:F}=ae(n),{localScrollTarget:I,changeScrollEvent:R,unconfigureScrollTarget:z}=le(n,be),{anchorEl:B,canShow:V,anchorEvents:H}=M({showing:T,configureAnchorEl:_e}),{show:U,hide:W}=ee({showing:T,canShow:V,handleShow:J,handleHide:X,hideOnRouteChange:k,processOnMount:!0});Object.assign(H,{delayShow:pe,delayHide:me,onFocusin:he});let{showPortal:K,hidePortal:q,renderPortal:de}=re(S,w,Se,`tooltip`);if(C.platform.is.mobile){let e={anchorEl:B,innerRef:w,onClickOutside(e){return W(e),e.target.classList.contains(`q-dialog__backdrop`)&&d(e),!0}},i=t(()=>n.modelValue===null&&!n.persistent&&T.value);a(i,t=>{(t?ue:L)(e)}),r(()=>{L(e)})}else a(()=>(n.modelValue===null||n[`onUpdate:modelValue`])&&T.value===!0&&n.persistent!==!0,e=>{(e===!0?te:ie)(ge)});function J(e){K(),ve(),A(()=>{if(m?.disconnect(),w.value===null){m=void 0;return}m=new MutationObserver(()=>Q()),m.observe(w.value,{attributes:!1,childList:!0,characterData:!0,subtree:!0}),Q(),be()}),p===void 0&&(p=a(()=>C.screen.width+`|`+C.screen.height+`|`+n.self+`|`+n.anchor+`|`+C.lang.rtl,Q)),N(()=>{K(!0),u(`show`,e)},n.transitionDuration)}function X(e){j(),q(),Z(),N(()=>{q(!0),u(`hide`,e)},n.transitionDuration)}function Z(){m!==void 0&&(m.disconnect(),m=void 0),p!==void 0&&(p(),p=void 0),z(),ie(ge),g(H,`tooltipTemp`),ye(),$(!1)}function Q(){Y({targetEl:w.value,offset:n.offset,anchorEl:B.value,anchorOrigin:se.value,selfOrigin:ce.value,maxHeight:n.maxHeight,maxWidth:n.maxWidth})}function pe(e){if(C.platform.is.mobile){_!==void 0&&(clearTimeout(_),_=void 0),O(),$(!0);let e=B.value,t=[`touchmove`,`touchcancel`,`touchend`,`click`].map(t=>[e,t,`delayHide`,`passiveCapture`]);l(H,`tooltipTemp`,t)}N(()=>{U(e)},n.delay)}function me(e){C.platform.is.mobile&&(g(H,`tooltipTemp`),O(),_=setTimeout(()=>{_=void 0,$(!1)},10)),N(()=>{W(e)},n.hideDelay)}function he(e){let t=e.target;if(t){try{if(t.matches(`:focus-visible`)===!1)return}catch{}pe(e)}}function ge(e){W(e)}function _e(){if(n.noParentEvent||B.value===null)return;let e=C.platform.is.mobile?[[B.value,`touchstart`,`delayShow`,`passive`]]:[[B.value,`mouseenter`,`delayShow`,`passive`],[B.value,`mouseleave`,`delayHide`,`passive`],[B.value,`focusin`,`onFocusin`,`passive`],[B.value,`focusout`,`delayHide`,`passive`]];l(H,`anchor`,e)}function $(e){v!==e&&(v=e,fe+=e?1:-1,document.body.classList.toggle(`non-selectable`,fe>0),!e&&_!==void 0&&(clearTimeout(_),_=void 0))}function ve(){let e=B.value,t=D.value;if(e===null||t===void 0)return;let n=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean);x={el:e,id:t,added:!n.includes(t)},x.added&&(n.push(t),e.setAttribute(`aria-describedby`,n.join(` `)))}function ye(){if(x?.added===!0){let{el:e,id:t}=x,n=(e.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(e=>e!==``&&e!==t);n.length===0?e.removeAttribute(`aria-describedby`):e.setAttribute(`aria-describedby`,n.join(` `))}x=void 0}function be(){if(B.value!==null||n.scrollTarget!==void 0){I.value=ne(B.value,n.scrollTarget);let e=n.noParentEvent?Q:W;R(I.value,e)}}function xe(){return T.value?c(`div`,{...f,id:D.value,ref:w,class:[`q-tooltip q-tooltip--style q-position-engine no-pointer-events`,f.class],style:[f.style,F.value],role:`tooltip`},h(i.default)):null}function Se(){return c(s,P.value,xe)}return r(Z),Object.assign(S.proxy,{updatePosition:Q}),de}});export{H as a,le as c,k as d,se as f,D as h,U as i,M as l,O as m,G as n,ue as o,ce as p,Y as r,L as s,Z as t,j as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./vue-i18n-C3W5i7h6.js";import{B as t,C as n,wt as r}from"./reactivity.esm-bundler-DtSZKRQB.js";import{$ as i,A as a,H as o,Rt as s,U as c,V as l,W as u,Wt as d,Z as f,_n as p,fn as m}from"./runtime-dom.esm-bundler-DgevF6KV.js";import{t as h}from"./QIcon--SvgE-nS.js";import{a as g,t as _}from"./QSeparator-BdyRE-AM.js";import{o as v}from"./use-checkbox-SrkgiJho.js";import{n as y,s as b}from"./index-
|
|
1
|
+
import{n as e}from"./vue-i18n-C3W5i7h6.js";import{B as t,C as n,wt as r}from"./reactivity.esm-bundler-DtSZKRQB.js";import{$ as i,A as a,H as o,Rt as s,U as c,V as l,W as u,Wt as d,Z as f,_n as p,fn as m}from"./runtime-dom.esm-bundler-DgevF6KV.js";import{t as h}from"./QIcon--SvgE-nS.js";import{a as g,t as _}from"./QSeparator-BdyRE-AM.js";import{o as v}from"./use-checkbox-SrkgiJho.js";import{n as y,s as b}from"./index-B_OmZ65F.js";import{t as x}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as S}from"./QBadge-sMJZ_eZm.js";import{t as C}from"./QSpace-D9UEvM99.js";import{t as w}from"./formatters-D0dU6VcA.js";import{t as T}from"./QPage-DuIsRmYu.js";var E=g(`search`,{state:()=>({query:``,includeArchived:!1,results:[],loading:!1,error:``,_requestToken:0}),actions:{async search(){let e=this.query.trim();if(!e){this._requestToken++,this.results=[],this.error=``,this.loading=!1;return}let t=++this._requestToken;this.loading=!0,this.error=``;try{let n=new URLSearchParams({q:e});this.includeArchived&&n.set(`includeArchived`,`true`);let r=await fetch(`/api/search?${n.toString()}`);if(!r.ok){let e=`HTTP ${r.status}`;try{let t=await r.json();t?.error&&(e=t.error)}catch{}throw Error(e)}let i=await r.json();if(t!==this._requestToken)return;this.results=i}catch(e){if(t!==this._requestToken)return;this.error=e instanceof Error?e.message:String(e),this.results=[]}finally{t===this._requestToken&&(this.loading=!1)}},clear(){this._requestToken++,this.query=``,this.results=[],this.error=``,this.loading=!1}}}),D={class:`search-header`},O={class:`text-h5 q-mb-md`},k={class:`row items-center q-mt-sm q-gutter-sm`},A={key:0,class:`text-caption text-grey-6`},j={key:0,class:`text-grey-6 text-caption`},M={key:1,class:`text-negative text-caption`},N={key:2,class:`text-grey-6 text-caption`},P={key:3,class:`search-results`},F=[`onClick`],I={class:`row items-center q-mb-xs text-caption`},L={class:`text-grey-5 text-weight-medium`},R={class:`text-grey-6`},z={class:`search-snippet text-body2 text-grey-4`},B=x(i({__name:`SearchPage`,setup(i){let g=E(),x=b(),{t:B}=e(),{timeAgo:V}=w(),H=n(null),U=null;function W(){U&&clearTimeout(U),U=setTimeout(()=>{g.search()},250)}m(()=>g.includeArchived,()=>{g.query.trim().length>0&&g.search()});function G(e){x.push({name:`workspace`,params:{id:e.workspaceId},query:{eventId:e.eventId,...e.sessionId?{session:e.sessionId}:{}}})}function K(e){return e===`user:message`?B(`search.eventType.userMessage`):e===`agent:output`?B(`search.eventType.agentOutput`):e}return(e,n)=>(s(),o(T,{class:`q-pa-md search-page`},{default:p(()=>[l(`div`,D,[l(`h2`,O,r(e.$t(`search.title`)),1),f(v,{ref_key:`inputEl`,ref:H,modelValue:t(g).query,"onUpdate:modelValue":[n[0]||=e=>t(g).query=e,W],dense:``,dark:``,outlined:``,clearable:``,autofocus:``,placeholder:e.$t(`search.placeholder`),onClear:n[1]||=e=>t(g).clear()},{prepend:p(()=>[f(h,{name:`search`})]),_:1},8,[`modelValue`,`placeholder`]),l(`div`,k,[f(y,{modelValue:t(g).includeArchived,"onUpdate:modelValue":n[2]||=e=>t(g).includeArchived=e,label:e.$t(`search.includeArchived`),dense:``,dark:``,color:`indigo-4`,size:`sm`},null,8,[`modelValue`,`label`]),f(C),t(g).results.length>0?(s(),u(`span`,A,r(e.$t(`search.resultCount`,{n:t(g).results.length})),1)):c(``,!0)])]),f(_,{dark:``,class:`q-my-md`}),t(g).loading?(s(),u(`div`,j,r(e.$t(`search.loading`)),1)):t(g).error?(s(),u(`div`,M,r(e.$t(`search.error`,{message:t(g).error})),1)):t(g).query.trim().length>0&&t(g).results.length===0?(s(),u(`div`,N,r(e.$t(`search.noResults`)),1)):t(g).results.length>0?(s(),u(`div`,P,[(s(!0),u(a,null,d(t(g).results,(n,i)=>(s(),u(`div`,{key:`${n.workspaceId}-${n.timestamp}-${i}`,class:`search-result q-pa-sm q-mb-sm cursor-pointer`,onClick:e=>G(n)},[l(`div`,I,[l(`span`,L,r(n.workspaceName),1),n.archived?(s(),o(S,{key:0,color:`grey-7`,class:`q-ml-xs`,label:e.$t(`common.archive`)},null,8,[`label`])):c(``,!0),f(C),f(S,{color:n.type===`user:message`?`blue-grey-7`:`indigo-7`,class:`q-mr-sm`,label:K(n.type)},null,8,[`color`,`label`]),l(`span`,R,r(t(V)(n.timestamp)),1)]),l(`div`,z,r(n.snippet),1)],8,F))),128))])):c(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-26b9b868`]]);export{B as default};
|