tarsk 0.5.74 → 0.5.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled-skills/skill-creator/scripts/__tests__/quick_validate.test.js +79 -0
- package/dist/bundled-skills/skill-creator/scripts/quick_validate.js +78 -65
- package/dist/index.js +21828 -13103
- package/dist/jelly.webp +0 -0
- package/dist/public/assets/account-view-CWtpznW2.js +1 -0
- package/dist/public/assets/alert-dialog-BxMfaLuO.js +7 -0
- package/dist/public/assets/api-DX1ny6q-.js +2 -0
- package/dist/public/assets/async-error-boundary-BX1G17o9.js +1 -0
- package/dist/public/assets/async-loading-fallback-V0EaQ_Kn.js +1 -0
- package/dist/public/assets/browser-tab-D_5MLhxE.js +12 -0
- package/dist/public/assets/button-kWtLAMpB.js +1 -0
- package/dist/public/assets/card-B_EASkic.js +1 -0
- package/dist/public/assets/chat-dock-context-8K8Ikjgy.js +1 -0
- package/dist/public/assets/commit-dialog-CSXPoomw.js +1 -0
- package/dist/public/assets/commit-error-dialog-CdcGI69P.js +1 -0
- package/dist/public/assets/commit-method-fields-BtEHb0_G.js +1 -0
- package/dist/public/assets/context-menu-BcM6I0Sx.js +1 -0
- package/dist/public/assets/conversation-history-view-CuzU9qF6.js +1 -0
- package/dist/public/assets/create-project-dialog-a6Wgq-Z8.js +2 -0
- package/dist/public/assets/create-project-workspace-Dv_lEfZx.js +2 -0
- package/dist/public/assets/create-repo-dialog-BTIQ5Nw4.js +1 -0
- package/dist/public/assets/{delete-confirm-dialog-3DX1u0Dg.js → delete-confirm-dialog-Dl76vaxb.js} +1 -1
- package/dist/public/assets/diff-view-DA1uT9tc.js +4 -0
- package/dist/public/assets/dist-C2G92uPn.js +1 -0
- package/dist/public/assets/dist-CHhgoHp6.js +1 -0
- package/dist/public/assets/dist-CTLFS4dn.js +2 -0
- package/dist/public/assets/dist-D-2G8xGB.js +5 -0
- package/dist/public/assets/dist-DD4GtbiM.js +1 -0
- package/dist/public/assets/{dist-rO95BjzU.js → dist-DoxvnNEY.js} +1 -1
- package/dist/public/assets/dist-DsmF-KJ-.js +1 -0
- package/dist/public/assets/dist-c_QADQ5u.js +1 -0
- package/dist/public/assets/dist-yM5kyz9Q.js +1 -0
- package/dist/public/assets/es2015-BlPKkFZZ.js +41 -0
- package/dist/public/assets/explorer-monaco-editor-BdZ_bBqh.js +1 -0
- package/dist/public/assets/explorer-tab-view-CewTYYOm.js +2 -0
- package/dist/public/assets/explorer-tree-C0VDhihz.js +1 -0
- package/dist/public/assets/explorer-view-RCfDm3p5.js +76 -0
- package/dist/public/assets/git-history-dialog-DL0Trxiz.js +1 -0
- package/dist/public/assets/index-B3-5kIOf.js +3658 -0
- package/dist/public/assets/index-BLNUy5nZ.css +1 -0
- package/dist/public/assets/merged-pr-dialog-BzND8nzx.js +1 -0
- package/dist/public/assets/model-list-controls-I67L2x3H.js +1 -0
- package/dist/public/assets/onboarding-dialog-DY8v11hv.js +1 -0
- package/dist/public/assets/project-coding-view-DxOwsjtt.js +1 -0
- package/dist/public/assets/project-danger-zone-view-CkvKOQrl.js +1 -0
- package/dist/public/assets/project-env-vars-view-DYLWA7s0.js +1 -0
- package/dist/public/assets/project-model-aliases-view-DWu9khLA.js +1 -0
- package/dist/public/assets/project-settings-view-DJfmaWn6.js +1 -0
- package/dist/public/assets/project-tools-view-BEjBkghz.js +1 -0
- package/dist/public/assets/providers-list-view-jMEPJCci.js +1 -0
- package/dist/public/assets/pull-request-dialog-B_JCqT53.js +1 -0
- package/dist/public/assets/pull-with-changes-dialog-V3_km2zQ.js +1 -0
- package/dist/public/assets/push-before-pr-dialog-CarrD3y2.js +1 -0
- package/dist/public/assets/radio-group-Dn_pN-pn.js +1 -0
- package/dist/public/assets/scroll-area-lkVMElz5.js +1 -0
- package/dist/public/assets/settings-general-view-BhrfHGfQ.js +1 -0
- package/dist/public/assets/settings-list-DiiYzOxn.js +1 -0
- package/dist/public/assets/settings-logs-view-DbKM1SNk.js +5 -0
- package/dist/public/assets/settings-mcp-servers-view-4FpPIeYV.js +5 -0
- package/dist/public/assets/settings-models-view-CJVeo9ad.js +1 -0
- package/dist/public/assets/settings-skills-view-DoRPGbHG.js +3 -0
- package/dist/public/assets/settings-slack-view-Cc1NgVkx.js +1 -0
- package/dist/public/assets/settings-slash-commands-view-CmlWqqmi.js +1 -0
- package/dist/public/assets/settings-statistics-view-DRuyEbcN.js +1 -0
- package/dist/public/assets/settings-storage-view-DihbtUYb.js +1 -0
- package/dist/public/assets/settings-subagents-view-B2RvxDZI.js +2 -0
- package/dist/public/assets/settings-system-prompt-view-CvVbgjNN.js +1 -0
- package/dist/public/assets/settings-view-CPUAjTMa.js +2 -0
- package/dist/public/assets/slug-utils-CQ8PMWUL.js +1 -0
- package/dist/public/assets/store-BSzKIu5G.js +9 -0
- package/dist/public/assets/suspense-resource-BFrb_XJX.js +1 -0
- package/dist/public/assets/table-A3cgauiZ.js +1 -0
- package/dist/public/assets/tasks-view-CvFFLPeD.js +1 -0
- package/dist/public/assets/{terminal-panel-DHDoOXAH.js → terminal-panel-DIh6it7K.js} +3 -3
- package/dist/public/assets/toggle-group-Q36wRGKA.js +1 -0
- package/dist/public/assets/tooltip-Db8UeYxm.js +1 -0
- package/dist/public/assets/{use-active-dock-panel-instance-cO_DR87G.js → use-active-dock-panel-instance-DRfRj6MV.js} +1 -1
- package/dist/public/assets/use-installed-ai-files-C8nNWGC7.js +1 -0
- package/dist/public/assets/{use-suspense-resource-Dkz6ddFN.js → use-suspense-resource-Dakt9lfT.js} +1 -1
- package/dist/public/assets/useBaseQuery-34f0-SVd.js +1 -0
- package/dist/public/assets/{web-C7jr0n2X.js → web-Bn9n5e7r.js} +1 -1
- package/dist/public/assets/{web-D0nlJHDu.js → web-C2KGFouM.js} +1 -1
- package/dist/public/assets/{web-jJ1krOD-.js → web-Dk3GAfTy.js} +1 -1
- package/dist/public/assets/{web-DPW3m0cL.js → web-DycfRH4j.js} +1 -1
- package/dist/public/browser-preview-rpc.js +107 -82
- package/dist/public/index.html +26 -33
- package/dist/recommended-models.txt +2 -2
- package/package.json +6 -6
- package/dist/public/assets/Combination-BdvBzSm4.js +0 -41
- package/dist/public/assets/account-view-c-UG0JKH.js +0 -1
- package/dist/public/assets/alert-dialog-DAHkynVZ.js +0 -7
- package/dist/public/assets/api-D1GxdEEp.js +0 -2
- package/dist/public/assets/async-error-boundary-DNJqC4BV.js +0 -1
- package/dist/public/assets/async-loading-fallback-D2X0o4Qa.js +0 -1
- package/dist/public/assets/browser-tab-BKQJKTg8.js +0 -12
- package/dist/public/assets/button-B6HDsfd5.js +0 -1
- package/dist/public/assets/card-DZGd45nw.js +0 -1
- package/dist/public/assets/chat-dock-context-8_5G30KG.js +0 -1
- package/dist/public/assets/commit-dialog-OQFa4W6i.js +0 -1
- package/dist/public/assets/commit-error-dialog-BFByxoUG.js +0 -1
- package/dist/public/assets/commit-method-fields-BihSf23f.js +0 -1
- package/dist/public/assets/context-menu-e5jeH0Jl.js +0 -1
- package/dist/public/assets/conversation-history-view-BUlO9oJ6.js +0 -1
- package/dist/public/assets/create-project-dialog-CY5wIGQV.js +0 -2
- package/dist/public/assets/create-project-workspace-ClILToZd.js +0 -1
- package/dist/public/assets/create-repo-dialog-CKUQoOaX.js +0 -1
- package/dist/public/assets/dialog--0foS3aw.js +0 -1
- package/dist/public/assets/diff-view-DLPu21IR.js +0 -4
- package/dist/public/assets/dist-Bxyh1Ml_.js +0 -1
- package/dist/public/assets/dist-CFXDhuA_.js +0 -5
- package/dist/public/assets/dist-CNOCRPxn.js +0 -1
- package/dist/public/assets/dist-Cda_ffeR.js +0 -1
- package/dist/public/assets/dist-CkQILg8A.js +0 -1
- package/dist/public/assets/dist-CqGsum35.js +0 -1
- package/dist/public/assets/dist-DjiNKpTV.js +0 -2
- package/dist/public/assets/dist-eMdiO0P3.js +0 -1
- package/dist/public/assets/explorer-tab-view-nzl0M0Vm.js +0 -2
- package/dist/public/assets/explorer-tree-Bkb6dzmf.js +0 -1
- package/dist/public/assets/explorer-view-NcArt0_H.js +0 -75
- package/dist/public/assets/git-history-dialog-rWkjoaR5.js +0 -1
- package/dist/public/assets/index-BOB3ZUQs.js +0 -3386
- package/dist/public/assets/index-BdGMz8sL.css +0 -1
- package/dist/public/assets/markdown-renderer-BkKibNMs.js +0 -8
- package/dist/public/assets/mcp-server-card-DFT7uyRh.js +0 -1
- package/dist/public/assets/merged-pr-dialog-BOrFaYk6.js +0 -1
- package/dist/public/assets/model-list-controls-CpQjn6i7.js +0 -1
- package/dist/public/assets/ndjson-stream-DeGpE5o5.js +0 -2
- package/dist/public/assets/onboarding-dialog-HJpyzVWa.js +0 -1
- package/dist/public/assets/project-env-vars-view-C9VTTfTo.js +0 -1
- package/dist/public/assets/project-model-aliases-view-DKRoV7Gc.js +0 -1
- package/dist/public/assets/project-settings-view-BDYqpibk.js +0 -1
- package/dist/public/assets/project-tools-view-9WUc4Yca.js +0 -1
- package/dist/public/assets/providers-list-view-BgvIWP_0.js +0 -1
- package/dist/public/assets/pull-request-dialog-BM1dkFpK.js +0 -1
- package/dist/public/assets/pull-with-changes-dialog-Bjl_esir.js +0 -1
- package/dist/public/assets/push-before-pr-dialog-Cbc_zaI8.js +0 -1
- package/dist/public/assets/query-keys-5QPW6Dv-.js +0 -1
- package/dist/public/assets/radio-group-CMW5ku-w.js +0 -1
- package/dist/public/assets/scenic-chrome-CbN3vum7.js +0 -1
- package/dist/public/assets/scroll-area-BMQFeWmq.js +0 -1
- package/dist/public/assets/settings-general-view-BaMVw6kD.js +0 -1
- package/dist/public/assets/settings-instructions-view-BRE87H2U.js +0 -1
- package/dist/public/assets/settings-list-BpPbGcpS.js +0 -1
- package/dist/public/assets/settings-logs-view-Bbue8ZOn.js +0 -5
- package/dist/public/assets/settings-mcp-servers-view-BiMCy8sH.js +0 -5
- package/dist/public/assets/settings-models-view-BkZtGcUP.js +0 -1
- package/dist/public/assets/settings-rules-view-TK7LEC-0.js +0 -8
- package/dist/public/assets/settings-skills-view-Bv9Kn55r.js +0 -3
- package/dist/public/assets/settings-slack-view-Dy2bFJqU.js +0 -1
- package/dist/public/assets/settings-slash-commands-view-DiR1IyMF.js +0 -1
- package/dist/public/assets/settings-statistics-view-DX1UVeCJ.js +0 -1
- package/dist/public/assets/settings-storage-view-D8tHP8XT.js +0 -1
- package/dist/public/assets/settings-subagents-view-Bz7jBhbB.js +0 -2
- package/dist/public/assets/settings-system-prompt-view-VHGAqfQk.js +0 -1
- package/dist/public/assets/settings-view-QBOhYAyv.js +0 -2
- package/dist/public/assets/skeleton-DvLd14RU.js +0 -1
- package/dist/public/assets/store-CHF6tOp2.js +0 -9
- package/dist/public/assets/suspense-resource-DnYnmTbs.js +0 -1
- package/dist/public/assets/switch-P5m18oUl.js +0 -1
- package/dist/public/assets/table-MUx4ZxvS.js +0 -1
- package/dist/public/assets/tasks-view-l00Nc2fV.js +0 -2
- package/dist/public/assets/toggle-group-DMR7z3pz.js +0 -1
- package/dist/public/assets/tooltip-BtJG5fZl.js +0 -1
- package/dist/public/assets/use-installed-ai-files-CJr_PVcY.js +0 -1
- package/dist/public/assets/use-open-chat-dock-panel-B31lwcQF.js +0 -1
- package/dist/public/assets/useInfiniteQuery-DUeUxDcu.js +0 -1
- package/dist/public/assets/utils-CT-Dw22R.js +0 -1
package/dist/public/assets/{use-suspense-resource-Dkz6ddFN.js → use-suspense-resource-Dakt9lfT.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t}from"./react-vendor-Ee0-5T4I.js";import{r as n}from"./suspense-resource-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t}from"./react-vendor-Ee0-5T4I.js";import{r as n}from"./suspense-resource-BFrb_XJX.js";var r=e(t(),1);function i(e,t){return(0,r.use)(n(e,t))}export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{a as r}from"./chat-dock-context-8K8Ikjgy.js";var i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},a=new class extends i{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},o={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},s=new class{#e=o;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function c(e){setTimeout(e,0)}var l=typeof window>`u`||`Deno`in globalThis;function u(){}function d(e,t){return typeof e==`function`?e(t):e}function f(e){return typeof e==`number`&&e>=0&&e!==1/0}function p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function m(e,t){return typeof e==`function`?e(t):e}function h(e,t){return typeof e==`function`?e(t):e}function g(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==v(o,t.options))return!1}else if(!b(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function _(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(y(t.options.mutationKey)!==y(a))return!1}else if(!b(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function v(e,t){return(t?.queryKeyHashFn||y)(e)}function y(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function b(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>b(e[n],t[n])):!1}var x=Object.prototype.hasOwnProperty;function S(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=w(e)&&w(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:x.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=S(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function ee(e){return new Promise(t=>{s.setTimeout(t,e)})}function D(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:S(e,t)}function te(e){return e}function O(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ne(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function A(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===k?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function j(e,t){return typeof e==`function`?e(...t):!!e}function re(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var M=(()=>{let e=()=>l;return{isServer(){return e()},setIsServer(t){e=t}}})();function N(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ie=c;function ae(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ie,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=ae(),F=new class extends i{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function oe(e){return Math.min(1e3*2**e,3e4)}function I(e){return(e??`online`)===`online`?F.isOnline():!0}var L=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function R(e){let t=!1,n=0,r,i=N(),o=()=>i.status!==`pending`,s=t=>{if(!o()){let n=new L(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>a.isFocused()&&(e.networkMode===`always`||F.isOnline())&&e.canRun(),d=()=>I(e.networkMode)&&e.canRun(),f=e=>{o()||(r?.(),i.resolve(e))},p=e=>{o()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(o()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),h=()=>{if(o())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(o())return;let i=e.retry??(M.isServer()?0:3),a=e.retryDelay??oe,s=typeof a==`function`?a(n,r):a,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),ee(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var z=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),f(this.gcTime)&&(this.#e=s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(M.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(s.clearTimeout(this.#e),this.#e=void 0)}};function se(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{re(e,()=>t.signal,()=>n=!0)},u=A(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?ne:O;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?V:B,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:B(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function B(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function V(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ce(e,t){return t?B(e,t)!=null:!1}function le(e,t){return!t||!e.getPreviousPageParam?!1:V(e,t)!=null}var H=class extends z{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=G(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=G(this.options);e.data!==void 0&&(this.setState(W(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=D(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(u).catch(u):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>h(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===k||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>m(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!p(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=A(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?se(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=R({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof L&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof L){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...U(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...W(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function U(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function W(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function G(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ue=class extends i{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=N(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),K(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return q(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return q(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof h(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&J(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||m(this.options.staleTime,this.#t)!==m(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return fe(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(u)),t}#g(){this.#b();let e=m(this.options.staleTime,this.#t);if(M.isServer()||this.#r.isStale||!f(e))return;let t=p(this.#r.dataUpdatedAt,e)+1;this.#d=s.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(M.isServer()||h(this.options.enabled,this.#t)===!1||!f(this.#p)||this.#p===0)&&(this.#f=s.setInterval(()=>{(this.options.refetchIntervalInBackground||a.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(s.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(s.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&K(e,t),o=i&&J(e,n,t,r);(a||o)&&(l={...l,...U(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let g=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=D(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!g)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=D(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:Y(e,t),refetch:this.refetch,promise:this.#o,isEnabled:h(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#o=S.promise=N())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!C(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){P.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function de(e,t){return h(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&h(t.retryOnMount,e)===!1)}function K(e,t){return de(e,t)||e.state.data!==void 0&&q(e,t,t.refetchOnMount)}function q(e,t,n){if(h(t.enabled,e)!==!1&&m(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Y(e,t)}return!1}function J(e,t,n,r){return(e!==t||h(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Y(e,n)}function Y(e,t){return h(t.enabled,e)!==!1&&e.isStaleByTime(m(t.staleTime,e))}function fe(e,t){return!C(e.getCurrentResult(),t)}n();var X=e(t(),1),Z=X.createContext(!1),Q=()=>X.useContext(Z);Z.Provider;function pe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var me=X.createContext(pe()),he=()=>X.useContext(me),ge=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?j(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},_e=e=>{X.useEffect(()=>{e.clearReset()},[e])},ve=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||j(n,[e.error,r])),ye=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},be=(e,t)=>e.isLoading&&e.isFetching&&!t,xe=(e,t)=>e?.suspense&&t.isPending,$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Se(e,t,n){let i=Q(),a=he(),o=r(n),s=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=o.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=i?`isRestoring`:l?`optimistic`:void 0,ye(s),ge(s,a,c),_e(a);let d=!o.getQueryCache().get(s.queryHash),[f]=X.useState(()=>new t(o,s)),p=f.getOptimisticResult(s),m=!i&&l;if(X.useSyncExternalStore(X.useCallback(e=>{let t=m?f.subscribe(P.batchCalls(e)):u;return f.updateResult(),t},[f,m]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),X.useEffect(()=>{f.setOptions(s)},[s,f]),xe(s,p))throw $(s,f,a);if(ve({result:p,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw p.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(s,p),s.experimental_prefetchInRender&&!M.isServer()&&be(p,i)&&(d?$(s,f,a):c?.promise)?.catch(u).finally(()=>{f.updateResult()}),s.notifyOnChangeProps?p:f.trackResult(p)}export{b as _,le as a,a as b,F as c,y as d,v as f,u as g,g as h,ce as i,P as l,_ as m,ue as n,z as o,te as p,H as r,R as s,Se as t,d as u,m as v,i as x,k as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Cn as e}from"./index-B3-5kIOf.js";var t=class extends e{constructor(){super(),this.handleVisibilityChange=()=>{let e={isActive:document.hidden!==!0};this.notifyListeners(`appStateChange`,e),document.hidden?this.notifyListeners(`pause`,null):this.notifyListeners(`resume`,null)},document.addEventListener(`visibilitychange`,this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented(`Not implemented on web.`)}async getInfo(){throw this.unimplemented(`Not implemented on web.`)}async getLaunchUrl(){return{url:``}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented(`Not implemented on web.`)}async toggleBackButtonHandler(){throw this.unimplemented(`Not implemented on web.`)}async getAppLanguage(){return{value:navigator.language.split(`-`)[0].toLowerCase()}}};export{t as AppWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{B as e,Cn as t,V as n}from"./index-B3-5kIOf.js";var r=class extends t{constructor(){super(...arguments),this.selectionStarted=!1}async impact(e){let t=this.patternForImpact(e?.style);this.vibrateWithPattern(t)}async notification(e){let t=this.patternForNotification(e?.type);this.vibrateWithPattern(t)}async vibrate(e){let t=e?.duration||300;this.vibrateWithPattern([t])}async selectionStart(){this.selectionStarted=!0}async selectionChanged(){this.selectionStarted&&this.vibrateWithPattern([70])}async selectionEnd(){this.selectionStarted=!1}patternForImpact(t=e.Heavy){return t===e.Medium?[43]:t===e.Light?[20]:[61]}patternForNotification(e=n.Success){return e===n.Warning?[30,40,30,50,60]:e===n.Error?[27,45,50]:[35,65,21]}vibrateWithPattern(e){if(navigator.vibrate)navigator.vibrate(e);else throw this.unavailable(`Browser does not support the vibrate API`)}};export{r as HapticsWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Cn as e}from"./index-B3-5kIOf.js";var t=class extends e{constructor(){super(...arguments),this.wakeLock=null,this._isSupported=typeof navigator<`u`&&`wakeLock`in navigator,this.handleVisibilityChange=()=>{document.visibilityState===`visible`&&this.keepAwake()}}async keepAwake(){this._isSupported||this.throwUnsupportedError(),this.wakeLock&&await this.allowSleep(),this.wakeLock=await navigator.wakeLock.request(`screen`),document.addEventListener(`visibilitychange`,this.handleVisibilityChange),document.addEventListener(`fullscreenchange`,this.handleVisibilityChange)}async allowSleep(){var e;this._isSupported||this.throwUnsupportedError(),(e=this.wakeLock)==null||e.release(),this.wakeLock=null,document.removeEventListener(`visibilitychange`,this.handleVisibilityChange),document.removeEventListener(`fullscreenchange`,this.handleVisibilityChange)}async isSupported(){return{isSupported:this._isSupported}}async isKeptAwake(){return this._isSupported||this.throwUnsupportedError(),{isKeptAwake:!!this.wakeLock}}throwUnsupportedError(){throw this.unavailable(`Screen Wake Lock API not available in this browser.`)}};export{t as KeepAwakeWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Cn as e,d as t,f as n,u as r}from"./index-B3-5kIOf.js";var i=class extends e{async stopAndHideScanner(){console.log(window.OSBarcodeWebScanner),window.OSBarcodeWebScanner&&(await window.OSBarcodeWebScanner.stop(),window.OSBarcodeWebScanner=null),document.getElementById(`cap-os-barcode-scanner-container-dialog`).style.display=`none`}buildScannerElement(){if(document.getElementById(`cap-os-barcode-scanner-container`)){document.getElementById(`cap-os-barcode-scanner-container`).className=`scanner-container-display`;return}let e=document.body.appendChild(document.createElement(`div`));e.id=`cap-os-barcode-scanner-container`;let t=document.createElement(`div`);t.id=`cap-os-barcode-scanner-container-dialog`,t.className=`scanner-dialog`;let n=document.createElement(`div`);n.className=`scanner-dialog-inner`;let r=document.createElement(`span`);r.id=`cap-os-barcode-scanner-close-button`,r.className=`close-button`,r.innerHTML=`×`,n.appendChild(r);let i=document.createElement(`p`);i.innerHTML=` `,n.appendChild(i);let a=document.createElement(`div`);a.className=`scanner-container-full-width`,a.id=`cap-os-barcode-scanner-container-scanner`,n.appendChild(a),t.appendChild(n),e.appendChild(t)}async scanBarcode(e){return this.buildScannerElement(),document.getElementById(`cap-os-barcode-scanner-container-dialog`).style.display=`block`,new Promise((i,a)=>{let o={facingMode:e.cameraDirection===1?`environment`:`user`,hasScannerButton:!1,scanButton:e.scanButton===void 0?!1:e.scanButton,showScanLine:!1,scanInstructions:e.scanInstructions?e.scanInstructions:``,orientation:e.scanOrientation?e.scanOrientation:r.PORTRAIT,showCameraSelection:e.web?.showCameraSelection?e.web.showCameraSelection:!1,typeHint:e.hint===17?void 0:e.hint,scannerFPS:e.web?.scannerFPS?e.web.scannerFPS:50},s=!1,c=document.getElementById(`cap-os-barcode-scanner-close-button`);c&&(c.onclick=async()=>{s||(s=!0,await this.stopAndHideScanner(),a(Error(`Couldn’t scan because the process was cancelled.`)))});let l=document.getElementById(`cap-os-barcode-scanner-container-scanner`);if(!l)throw Error(`Scanner Element is required for web`);window.OSBarcodeWebScanner=new n(l.id,{formatsToSupport:o.typeHint===void 0?void 0:[o.typeHint],verbose:void 0});let u={fps:o.scannerFPS,qrbox:l.getBoundingClientRect().width*(9/16)-10,aspectRatio:16/9,videoConstraints:{focusMode:`continuous`,height:{min:576,ideal:1920},deviceId:void 0,facingMode:o.facingMode}};window.OSBarcodeWebScanner.start({facingMode:o.facingMode},u,(e,n)=>{this.stopAndHideScanner(),i({ScanResult:e,format:n.result.format?.format??t.ALL})},e=>{[`NotFoundException`,`No barcode or QR code detected`,`No MultiFormat Readers were able to detect the code`].find(t=>e.indexOf(t)!==-1)||(this.stopAndHideScanner(),console.error(`[Scanner Web Error] ${e}`),a(e))})})}};export{i as CapacitorBarcodeScannerWeb};
|
|
@@ -362,6 +362,103 @@
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
function createPreviewApi() {
|
|
365
|
+
function resolveInspectTarget(previewApi, params) {
|
|
366
|
+
const selector = params?.selector;
|
|
367
|
+
const ref = params?.ref;
|
|
368
|
+
let element = null;
|
|
369
|
+
let matchCount = 0;
|
|
370
|
+
|
|
371
|
+
if (ref) {
|
|
372
|
+
element = previewApi.resolveRef(ref);
|
|
373
|
+
matchCount = element ? 1 : 0;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
if (!element && selector) {
|
|
377
|
+
let matches;
|
|
378
|
+
try {
|
|
379
|
+
matches = document.querySelectorAll(selector);
|
|
380
|
+
} catch {
|
|
381
|
+
throw new Error("Invalid CSS selector: " + selector);
|
|
382
|
+
}
|
|
383
|
+
matchCount = matches.length;
|
|
384
|
+
element = matches[0] || null;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
return { element: element, matchCount: matchCount, selector: selector, ref: ref };
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function truncateInspectText(element) {
|
|
391
|
+
const rawText = (element.innerText || element.textContent || "").trim().replace(/\s+/g, " ");
|
|
392
|
+
return rawText.length > 200 ? rawText.slice(0, 200) + "…" : rawText;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
function collectElementAnimations(element) {
|
|
396
|
+
const animations = [];
|
|
397
|
+
if (typeof element.getAnimations !== "function") {
|
|
398
|
+
return animations;
|
|
399
|
+
}
|
|
400
|
+
const running = element.getAnimations();
|
|
401
|
+
for (let i = 0; i < running.length; i += 1) {
|
|
402
|
+
const anim = running[i];
|
|
403
|
+
const effect = anim.effect;
|
|
404
|
+
let duration = null;
|
|
405
|
+
if (effect && typeof effect.getComputedTiming === "function") {
|
|
406
|
+
duration = effect.getComputedTiming().duration;
|
|
407
|
+
}
|
|
408
|
+
animations.push({
|
|
409
|
+
name: typeof anim.animationName === "string" ? anim.animationName : null,
|
|
410
|
+
playState: anim.playState,
|
|
411
|
+
currentTime: anim.currentTime,
|
|
412
|
+
duration: duration,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
return animations;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function buildInspectBox(rect) {
|
|
419
|
+
return {
|
|
420
|
+
x: Math.round(rect.x),
|
|
421
|
+
y: Math.round(rect.y),
|
|
422
|
+
width: Math.round(rect.width),
|
|
423
|
+
height: Math.round(rect.height),
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
function buildInspectComputed(style) {
|
|
428
|
+
return {
|
|
429
|
+
display: style.display,
|
|
430
|
+
visibility: style.visibility,
|
|
431
|
+
opacity: style.opacity,
|
|
432
|
+
transform: style.transform,
|
|
433
|
+
fontFamily: style.fontFamily,
|
|
434
|
+
fontSize: style.fontSize,
|
|
435
|
+
fontWeight: style.fontWeight,
|
|
436
|
+
color: style.color,
|
|
437
|
+
animationName: style.animationName,
|
|
438
|
+
animationDuration: style.animationDuration,
|
|
439
|
+
animationPlayState: style.animationPlayState,
|
|
440
|
+
transition: style.transition,
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
function buildInspectFoundResult(element, selector, ref, matchCount) {
|
|
445
|
+
const style = window.getComputedStyle(element);
|
|
446
|
+
const rect = element.getBoundingClientRect();
|
|
447
|
+
return {
|
|
448
|
+
found: true,
|
|
449
|
+
selector: selector || null,
|
|
450
|
+
ref: ref || null,
|
|
451
|
+
matchCount: matchCount,
|
|
452
|
+
tag: element.tagName ? element.tagName.toLowerCase() : null,
|
|
453
|
+
id: element.id || null,
|
|
454
|
+
classList: element.classList ? Array.from(element.classList) : [],
|
|
455
|
+
text: truncateInspectText(element),
|
|
456
|
+
box: buildInspectBox(rect),
|
|
457
|
+
computed: buildInspectComputed(style),
|
|
458
|
+
animations: collectElementAnimations(element),
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
|
|
365
462
|
const api = {
|
|
366
463
|
_consoleInstalled: false,
|
|
367
464
|
_consoleLogs: [],
|
|
@@ -558,96 +655,24 @@
|
|
|
558
655
|
},
|
|
559
656
|
|
|
560
657
|
inspectElement: function inspectElement(params) {
|
|
561
|
-
const
|
|
562
|
-
|
|
563
|
-
let element = null;
|
|
564
|
-
let matchCount = 0;
|
|
565
|
-
|
|
566
|
-
if (ref) {
|
|
567
|
-
element = api.resolveRef(ref);
|
|
568
|
-
matchCount = element ? 1 : 0;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
if (!element && selector) {
|
|
572
|
-
let matches;
|
|
573
|
-
try {
|
|
574
|
-
matches = document.querySelectorAll(selector);
|
|
575
|
-
} catch {
|
|
576
|
-
throw new Error("Invalid CSS selector: " + selector);
|
|
577
|
-
}
|
|
578
|
-
matchCount = matches.length;
|
|
579
|
-
element = matches[0] || null;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
if (!element) {
|
|
658
|
+
const resolved = resolveInspectTarget(api, params);
|
|
659
|
+
if (!resolved.element) {
|
|
583
660
|
return {
|
|
584
661
|
found: false,
|
|
585
|
-
selector: selector || null,
|
|
586
|
-
ref: ref || null,
|
|
662
|
+
selector: resolved.selector || null,
|
|
663
|
+
ref: resolved.ref || null,
|
|
587
664
|
matchCount: 0,
|
|
588
665
|
hint:
|
|
589
666
|
"No matching element. Prefer inspect_element over wait_for for short-lived CSS classes. " +
|
|
590
667
|
"Use evaluate_javascript only for custom probes.",
|
|
591
668
|
};
|
|
592
669
|
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
.
|
|
598
|
-
|
|
599
|
-
const text = rawText.length > 200 ? rawText.slice(0, 200) + "…" : rawText;
|
|
600
|
-
const animations = [];
|
|
601
|
-
|
|
602
|
-
if (typeof element.getAnimations === "function") {
|
|
603
|
-
const running = element.getAnimations();
|
|
604
|
-
for (let i = 0; i < running.length; i += 1) {
|
|
605
|
-
const anim = running[i];
|
|
606
|
-
const effect = anim.effect;
|
|
607
|
-
let duration = null;
|
|
608
|
-
if (effect && typeof effect.getComputedTiming === "function") {
|
|
609
|
-
duration = effect.getComputedTiming().duration;
|
|
610
|
-
}
|
|
611
|
-
animations.push({
|
|
612
|
-
name: typeof anim.animationName === "string" ? anim.animationName : null,
|
|
613
|
-
playState: anim.playState,
|
|
614
|
-
currentTime: anim.currentTime,
|
|
615
|
-
duration: duration,
|
|
616
|
-
});
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
return {
|
|
621
|
-
found: true,
|
|
622
|
-
selector: selector || null,
|
|
623
|
-
ref: ref || null,
|
|
624
|
-
matchCount: matchCount,
|
|
625
|
-
tag: element.tagName ? element.tagName.toLowerCase() : null,
|
|
626
|
-
id: element.id || null,
|
|
627
|
-
classList: element.classList ? Array.from(element.classList) : [],
|
|
628
|
-
text: text,
|
|
629
|
-
box: {
|
|
630
|
-
x: Math.round(rect.x),
|
|
631
|
-
y: Math.round(rect.y),
|
|
632
|
-
width: Math.round(rect.width),
|
|
633
|
-
height: Math.round(rect.height),
|
|
634
|
-
},
|
|
635
|
-
computed: {
|
|
636
|
-
display: style.display,
|
|
637
|
-
visibility: style.visibility,
|
|
638
|
-
opacity: style.opacity,
|
|
639
|
-
transform: style.transform,
|
|
640
|
-
fontFamily: style.fontFamily,
|
|
641
|
-
fontSize: style.fontSize,
|
|
642
|
-
fontWeight: style.fontWeight,
|
|
643
|
-
color: style.color,
|
|
644
|
-
animationName: style.animationName,
|
|
645
|
-
animationDuration: style.animationDuration,
|
|
646
|
-
animationPlayState: style.animationPlayState,
|
|
647
|
-
transition: style.transition,
|
|
648
|
-
},
|
|
649
|
-
animations: animations,
|
|
650
|
-
};
|
|
670
|
+
return buildInspectFoundResult(
|
|
671
|
+
resolved.element,
|
|
672
|
+
resolved.selector,
|
|
673
|
+
resolved.ref,
|
|
674
|
+
resolved.matchCount,
|
|
675
|
+
);
|
|
651
676
|
},
|
|
652
677
|
|
|
653
678
|
waitFor: function waitFor(params) {
|
package/dist/public/index.html
CHANGED
|
@@ -22,47 +22,40 @@
|
|
|
22
22
|
<meta name="apple-mobile-web-app-title" content="Tarsk" />
|
|
23
23
|
|
|
24
24
|
<title>Tarsk</title>
|
|
25
|
-
<script type="module" crossorigin src="/assets/index-
|
|
25
|
+
<script type="module" crossorigin src="/assets/index-B3-5kIOf.js"></script>
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-aKtaBQYM.js">
|
|
27
27
|
<link rel="modulepreload" crossorigin href="/assets/react-vendor-Ee0-5T4I.js">
|
|
28
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
29
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
30
|
-
<link rel="modulepreload" crossorigin href="/assets/button-B6HDsfd5.js">
|
|
28
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-CTLFS4dn.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="/assets/button-kWtLAMpB.js">
|
|
31
30
|
<link rel="modulepreload" crossorigin href="/assets/browser-overlay-block-CiDtkfup.js">
|
|
32
31
|
<link rel="modulepreload" crossorigin href="/assets/use-browser-overlay-block-DyprQSIG.js">
|
|
33
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
34
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
35
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/dialog
|
|
37
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
38
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
39
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
32
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-c_QADQ5u.js">
|
|
33
|
+
<link rel="modulepreload" crossorigin href="/assets/es2015-BlPKkFZZ.js">
|
|
34
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-D-2G8xGB.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="/assets/alert-dialog-BxMfaLuO.js">
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/async-loading-fallback-V0EaQ_Kn.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-OixawqbU.js">
|
|
38
|
+
<link rel="modulepreload" crossorigin href="/assets/scroll-area-lkVMElz5.js">
|
|
39
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-DoxvnNEY.js">
|
|
40
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-C2G92uPn.js">
|
|
41
|
+
<link rel="modulepreload" crossorigin href="/assets/tooltip-Db8UeYxm.js">
|
|
40
42
|
<link rel="modulepreload" crossorigin href="/assets/use-toast-xpb5jNtN.js">
|
|
43
|
+
<link rel="modulepreload" crossorigin href="/assets/api-DX1ny6q-.js">
|
|
44
|
+
<link rel="modulepreload" crossorigin href="/assets/store-BSzKIu5G.js">
|
|
45
|
+
<link rel="modulepreload" crossorigin href="/assets/chat-dock-context-8K8Ikjgy.js">
|
|
41
46
|
<link rel="modulepreload" crossorigin href="/assets/explorer-tab-context-BxUVwWQQ.js">
|
|
42
|
-
<link rel="modulepreload" crossorigin href="/assets/api-D1GxdEEp.js">
|
|
43
|
-
<link rel="modulepreload" crossorigin href="/assets/store-CHF6tOp2.js">
|
|
44
|
-
<link rel="modulepreload" crossorigin href="/assets/chat-dock-context-8_5G30KG.js">
|
|
45
47
|
<link rel="modulepreload" crossorigin href="/assets/main-tab-context-Byl1LybL.js">
|
|
46
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
47
|
-
<link rel="modulepreload" crossorigin href="/assets/use-
|
|
48
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
49
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
50
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
51
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
52
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-
|
|
53
|
-
<link rel="modulepreload" crossorigin href="/assets/scroll-area-BMQFeWmq.js">
|
|
54
|
-
<link rel="modulepreload" crossorigin href="/assets/suspense-resource-DnYnmTbs.js">
|
|
55
|
-
<link rel="modulepreload" crossorigin href="/assets/use-suspense-resource-Dkz6ddFN.js">
|
|
56
|
-
<link rel="modulepreload" crossorigin href="/assets/ndjson-stream-DeGpE5o5.js">
|
|
57
|
-
<link rel="modulepreload" crossorigin href="/assets/create-project-workspace-ClILToZd.js">
|
|
58
|
-
<link rel="modulepreload" crossorigin href="/assets/scenic-chrome-CbN3vum7.js">
|
|
59
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-CkQILg8A.js">
|
|
60
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-Bxyh1Ml_.js">
|
|
61
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-CqGsum35.js">
|
|
62
|
-
<link rel="modulepreload" crossorigin href="/assets/dist-eMdiO0P3.js">
|
|
48
|
+
<link rel="modulepreload" crossorigin href="/assets/suspense-resource-BFrb_XJX.js">
|
|
49
|
+
<link rel="modulepreload" crossorigin href="/assets/use-suspense-resource-Dakt9lfT.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="/assets/create-project-workspace-Dv_lEfZx.js">
|
|
51
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-DD4GtbiM.js">
|
|
52
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-CHhgoHp6.js">
|
|
53
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-yM5kyz9Q.js">
|
|
54
|
+
<link rel="modulepreload" crossorigin href="/assets/dist-DsmF-KJ-.js">
|
|
63
55
|
<link rel="modulepreload" crossorigin href="/assets/dist-CSssbxDI.js">
|
|
64
|
-
<link rel="modulepreload" crossorigin href="/assets/
|
|
65
|
-
<link rel="
|
|
56
|
+
<link rel="modulepreload" crossorigin href="/assets/useBaseQuery-34f0-SVd.js">
|
|
57
|
+
<link rel="modulepreload" crossorigin href="/assets/chunk-QFMPRPBF-COsSkB7x.js">
|
|
58
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BLNUy5nZ.css">
|
|
66
59
|
</head>
|
|
67
60
|
<body class="font-sans antialiased">
|
|
68
61
|
<div id="root"></div>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[
|
|
2
2
|
"GLM5.3 Flash",
|
|
3
|
-
"
|
|
3
|
+
"GPT 5.6 Luna",
|
|
4
4
|
"Qwen3.8 27B",
|
|
5
5
|
"Qwen3.8 Flash Next",
|
|
6
6
|
"GPT 5.5",
|
|
7
|
-
"GPT 5.6 Luna",
|
|
8
7
|
"DeepSeek V4 Pro",
|
|
9
8
|
"Kimi K2.7 Code",
|
|
9
|
+
"MiMo V2.5 Pro",
|
|
10
10
|
"Claude Fable 5.1",
|
|
11
11
|
"Claude Opus 5",
|
|
12
12
|
"GPT 5.6 Sol",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tarsk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.76",
|
|
4
4
|
"description": "CLI for Tarsk - Project Threads Manager",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"main": "dist/index.js",
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build:app-assets": "cd ../app && bun run build",
|
|
24
|
-
"build:server": "rm -rf dist && bun scripts/bundle.ts && cp src/scaffold-templates.json dist/ && cp recommended-models.txt dist/ && cp -R bundled-skills dist/bundled-skills",
|
|
24
|
+
"build:server": "rm -rf dist && bun scripts/bundle.ts && cp src/scaffold-templates.json dist/ && cp recommended-models.txt dist/ && cp assets/jelly.webp dist/jelly.webp && cp -R bundled-skills dist/bundled-skills",
|
|
25
25
|
"dev": "bun run build:app-assets && TARSK_ELECTROBUN_DEV=1 electrobun dev",
|
|
26
26
|
"dev:web": "bun run api-serve-462 & cd ../app && bun run dev -- --port 8100 --open; wait",
|
|
27
27
|
"dev:watch": "bun run build:app-assets && TARSK_ELECTROBUN_DEV=1 electrobun dev --watch",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"benchmark:supersession": "bun scripts/benchmark-supersession.ts",
|
|
38
38
|
"dump:conversation": "bun scripts/dump-conversation.ts",
|
|
39
39
|
"get-recommended-models": "bun scripts/get-recommended-models.ts",
|
|
40
|
-
"web": "MODE=development bun
|
|
41
|
-
"api-serve-462": "
|
|
40
|
+
"web": "MODE=development bun src/index.ts",
|
|
41
|
+
"api-serve-462": "MODE=development bun src/index.ts --debug",
|
|
42
42
|
"electrobun:dev:signed": "bunx electrobun dev",
|
|
43
43
|
"electrobun:dev": "bunx electrobun dev",
|
|
44
44
|
"electrobun:build": "bunx electrobun build --env=dev",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"diff": "8.0.4",
|
|
60
60
|
"glob": "^13.0.1",
|
|
61
61
|
"hono": "4.12.25",
|
|
62
|
-
"md-to-pdf": "5.2.
|
|
62
|
+
"md-to-pdf": "5.2.5",
|
|
63
63
|
"open": "^11.0.0",
|
|
64
|
-
"
|
|
64
|
+
"grepts": "workspace:*",
|
|
65
65
|
"typebox": "1.1.38",
|
|
66
66
|
"undici": "^7.0.0",
|
|
67
67
|
"yaml": "^2.9.0"
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{o as t,t as n}from"./react-vendor-Ee0-5T4I.js";import{l as r,u as i}from"./dist-CNOCRPxn.js";import{c as a}from"./utils-CT-Dw22R.js";var o=e(t(),1),s=0;function c(){o.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??l()),document.body.insertAdjacentElement(`beforeend`,e[1]??l()),s++,()=>{s===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),s--}},[])}function l(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var u=n(),d=`focusScope.autoFocusOnMount`,f=`focusScope.autoFocusOnUnmount`,p={bubbles:!1,cancelable:!0},m=`FocusScope`,h=o.forwardRef((e,t)=>{let{loop:n=!1,trapped:s=!1,onMountAutoFocus:c,onUnmountAutoFocus:l,...m}=e,[h,y]=o.useState(null),b=r(c),x=r(l),w=o.useRef(null),T=a(t,e=>y(e)),E=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(s){let e=function(e){if(E.paused||!h)return;let t=e.target;h.contains(t)?w.current=t:S(w.current,{select:!0})},t=function(e){if(E.paused||!h)return;let t=e.relatedTarget;t!==null&&(h.contains(t)||S(w.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&S(h)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return h&&r.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[s,h,E.paused]),o.useEffect(()=>{if(h){C.add(E);let e=document.activeElement;if(!h.contains(e)){let t=new CustomEvent(d,p);h.addEventListener(d,b),h.dispatchEvent(t),t.defaultPrevented||(g(ee(v(h)),{select:!0}),document.activeElement===e&&S(h))}return()=>{h.removeEventListener(d,b),setTimeout(()=>{let t=new CustomEvent(f,p);h.addEventListener(f,x),h.dispatchEvent(t),t.defaultPrevented||S(e??document.body,{select:!0}),h.removeEventListener(f,x),C.remove(E)},0)}}},[h,b,x,E]);let D=o.useCallback(e=>{if(!n&&!s||E.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){let t=e.currentTarget,[i,a]=_(t);i&&a?!e.shiftKey&&r===a?(e.preventDefault(),n&&S(i,{select:!0})):e.shiftKey&&r===i&&(e.preventDefault(),n&&S(a,{select:!0})):r===t&&e.preventDefault()}},[n,s,E.paused]);return(0,u.jsx)(i.div,{tabIndex:-1,...m,ref:T,onKeyDown:D})});h.displayName=m;function g(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(S(r,{select:t}),document.activeElement!==n)return}function _(e){let t=v(e);return[y(t,e),y(t.reverse(),e)]}function v(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function y(e,t){for(let n of e)if(!b(n,{upTo:t}))return n}function b(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function x(e){return e instanceof HTMLInputElement&&`select`in e}function S(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&x(e)&&t&&e.select()}}var C=w();function w(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=T(e,t),e.unshift(t)},remove(t){e=T(e,t),e[0]?.resume()}}}function T(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ee(e){return e.filter(e=>e.tagName!==`A`)}var E=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},D=new WeakMap,O=new WeakMap,k={},A=0,j=function(e){return e&&(e.host||j(e.parentNode))},te=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=j(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},ne=function(e,t,n,r){var i=te(t,Array.isArray(e)?e:[e]);k[n]||(k[n]=new WeakMap);var a=k[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(D.get(e)||0)+1,l=(a.get(e)||0)+1;D.set(e,c),a.set(e,l),o.push(e),c===1&&i&&O.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),A++,function(){o.forEach(function(e){var t=D.get(e)-1,i=a.get(e)-1;D.set(e,t),a.set(e,i),t||(O.has(e)||e.removeAttribute(r),O.delete(e)),i||e.removeAttribute(n)}),A--,A||(D=new WeakMap,D=new WeakMap,O=new WeakMap,k={})}},re=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||E(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),ne(r,i,n,`aria-hidden`)):function(){return null}},M=function(){return M=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},M.apply(this,arguments)};function N(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ie(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var P=`right-scroll-bar-position`,F=`width-before-scroll-bar`,ae=`with-scroll-bars-hidden`,oe=`--removed-body-scroll-bar-size`;function I(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function se(e,t){var n=(0,o.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ce=typeof window<`u`?o.useLayoutEffect:o.useEffect,L=new WeakMap;function le(e,t){var n=se(t||null,function(t){return e.forEach(function(e){return I(e,t)})});return ce(function(){var t=L.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||I(e,null)}),i.forEach(function(e){r.has(e)||I(e,a)})}L.set(n,e)},[e]),n}function ue(e){return e}function de(e,t){t===void 0&&(t=ue);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function fe(e){e===void 0&&(e={});var t=de(null);return t.options=M({async:!0,ssr:!1},e),t}var R=function(e){var t=e.sideCar,n=N(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return o.createElement(r,M({},n))};R.isSideCarExport=!0;function pe(e,t){return e.useMedium(t),R}var z=fe(),B=function(){},V=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:B,onWheelCapture:B,onTouchMoveCapture:B}),i=r[0],a=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=N(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=le([n,t]),w=M(M({},x),i);return o.createElement(o.Fragment,null,d&&o.createElement(S,{sideCar:z,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),s?o.cloneElement(o.Children.only(c),M(M({},w),{ref:C})):o.createElement(y,M({},w,{className:l,ref:C}),c))});V.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},V.classNames={fullWidth:F,zeroRight:P};var H,me=function(){if(H)return H;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function he(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=me();return t&&e.setAttribute(`nonce`,t),e}function ge(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _e(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ve=function(){var e=0,t=null;return{add:function(n){e==0&&(t=he())&&(ge(t,n),_e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ye=function(){var e=ve();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},U=function(){var e=ye();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},be={left:0,top:0,right:0,gap:0},W=function(e){return parseInt(e||``,10)||0},xe=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[W(n),W(r),W(i)]},Se=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return be;var t=xe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ce=U(),G=`data-scroll-locked`,we=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
-
.${ae} {
|
|
3
|
-
overflow: hidden ${r};
|
|
4
|
-
padding-right: ${s}px ${r};
|
|
5
|
-
}
|
|
6
|
-
body[${G}] {
|
|
7
|
-
overflow: hidden ${r};
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
-
padding-left: ${i}px;
|
|
11
|
-
padding-top: ${a}px;
|
|
12
|
-
padding-right: ${o}px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: ${s}px ${r};
|
|
16
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.${P} {
|
|
20
|
-
right: ${s}px ${r};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.${F} {
|
|
24
|
-
margin-right: ${s}px ${r};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${P} .${P} {
|
|
28
|
-
right: 0 ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${F} .${F} {
|
|
32
|
-
margin-right: 0 ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[${G}] {
|
|
36
|
-
${oe}: ${s}px;
|
|
37
|
-
}
|
|
38
|
-
`},K=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Te=function(){o.useEffect(function(){return document.body.setAttribute(G,(K()+1).toString()),function(){var e=K()-1;e<=0?document.body.removeAttribute(G):document.body.setAttribute(G,e.toString())}},[])},Ee=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Te();var a=o.useMemo(function(){return Se(i)},[i]);return o.createElement(Ce,{styles:we(a,!t,i,n?``:`!important`)})},q=!1;if(typeof window<`u`)try{var J=Object.defineProperty({},"passive",{get:function(){return q=!0,!0}});window.addEventListener(`test`,J,J),window.removeEventListener(`test`,J,J)}catch{q=!1}var Y=q?{passive:!1}:!1,De=function(e){return e.tagName===`TEXTAREA`},Oe=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!De(e)&&n[t]===`visible`)},ke=function(e){return Oe(e,`overflowY`)},Ae=function(e){return Oe(e,`overflowX`)},je=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),X(e,r)){var i=Pe(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Me=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Ne=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},X=function(e,t){return e===`v`?ke(t):Ae(t)},Pe=function(e,t){return e===`v`?Me(t):Ne(t)},Fe=function(e,t){return e===`h`&&t===`rtl`?-1:1},Ie=function(e,t,n,r,i){var a=Fe(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Pe(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&X(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Z=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Le=function(e){return[e.deltaX,e.deltaY]},Re=function(e){return e&&`current`in e?e.current:e},ze=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Be=function(e){return`
|
|
39
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
-
`},Ve=0,Q=[];function He(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(Ve++)[0],a=o.useState(U)[0],s=o.useRef(e);o.useEffect(function(){s.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=ie([e.lockRef.current],(e.shards||[]).map(Re),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var i=Z(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=je(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=je(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Ie(h,t,e,h===`h`?o:c,!0)},[]),l=o.useCallback(function(e){var n=e;if(!(!Q.length||Q[Q.length-1]!==a)){var r=`deltaY`in n?Le(n):Z(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ze(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var o=(s.current.shards||[]).map(Re).filter(Boolean).filter(function(e){return e.contains(n.target)});(o.length>0?c(n,o[0]):!s.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=o.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ue(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=o.useCallback(function(e){n.current=Z(e),r.current=void 0},[]),f=o.useCallback(function(t){u(t.type,Le(t),t.target,c(t,e.lockRef.current))},[]),p=o.useCallback(function(t){u(t.type,Z(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return Q.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Y),document.addEventListener(`touchmove`,l,Y),document.addEventListener(`touchstart`,d,Y),function(){Q=Q.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,l,Y),document.removeEventListener(`touchmove`,l,Y),document.removeEventListener(`touchstart`,d,Y)}},[]);var m=e.removeScrollBar,h=e.inert;return o.createElement(o.Fragment,null,h?o.createElement(a,{styles:Be(i)}):null,m?o.createElement(Ee,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ue(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var We=pe(z,He),$=o.forwardRef(function(e,t){return o.createElement(V,M({},e,{ref:t,sideCar:We}))});$.classNames=V.classNames;export{c as i,re as n,h as r,$ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{s as i}from"./chunk-QFMPRPBF-COsSkB7x.js";import{ot as a}from"./dist-DjiNKpTV.js";import{r as o}from"./store-CHF6tOp2.js";import{D as s,E as c,bt as l,gn as u,jn as d}from"./dist-CNOCRPxn.js";import{t as f}from"./utils-CT-Dw22R.js";import{t as p}from"./button-B6HDsfd5.js";import{D as m,Q as h,Xt as g,in as _,zr as v}from"./api-D1GxdEEp.js";import{t as y}from"./use-toast-xpb5jNtN.js";import{Mn as b,bn as x,xn as S}from"./index-BOB3ZUQs.js";import{t as C}from"./skeleton-DvLd14RU.js";import{t as w}from"./delete-confirm-dialog-3DX1u0Dg.js";var T=t(),E=e(n(),1),D=r();function O(e){let t=(0,T.c)(6),{title:n,description:r,children:i}=e,a;t[0]!==r||t[1]!==n?(a=(0,D.jsx)(S,{title:n,description:r,sticky:!1}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=(0,D.jsxs)(b,{children:[a,i]}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function k(){let e=(0,T.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsxs)(`div`,{className:`flex-1 space-y-2 rounded-xl border bg-card p-5`,children:[(0,D.jsx)(C,{className:`h-4 w-20`}),(0,D.jsx)(C,{className:`h-9 w-28`})]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,D.jsxs)(`div`,{className:`flex gap-4 px-6 pb-6 pt-6`,children:[t,(0,D.jsxs)(`div`,{className:`flex-1 space-y-3 rounded-xl border bg-card p-5`,children:[(0,D.jsx)(C,{className:`h-4 w-24`}),(0,D.jsx)(C,{className:`h-6 w-32`}),(0,D.jsx)(C,{className:`h-4 w-full`})]})]}),e[1]=n):n=e[1],n}function A(){let e=(0,T.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-6 py-5`,children:[(0,D.jsxs)(`div`,{className:`flex-1 space-y-1`,children:[(0,D.jsx)(C,{className:`h-5 w-28`}),(0,D.jsx)(C,{className:`h-4 w-64`})]}),(0,D.jsx)(C,{className:`h-9 w-28 shrink-0`})]}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,D.jsxs)(`div`,{className:`divide-y divide-table-border`,children:[t,(0,D.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-6 py-5`,children:[(0,D.jsxs)(`div`,{className:`flex-1 space-y-1`,children:[(0,D.jsx)(C,{className:`h-5 w-36`}),(0,D.jsx)(C,{className:`h-4 w-56`}),(0,D.jsx)(C,{className:`h-4 w-32`})]}),(0,D.jsx)(C,{className:`h-9 w-24 shrink-0`})]})]}),e[1]=n):n=e[1],n}function j(){let[e,t]=(0,E.useState)(null),[n,r]=(0,E.useState)(!0),[b,S]=(0,E.useState)(!1),[C,T]=(0,E.useState)(!1),j=i(),M=o(e=>e.projects),N=(0,E.useMemo)(()=>M.reduce((e,t)=>e+t.threads.length,0),[M]);(0,E.useEffect)(()=>{P();let e=()=>{document.visibilityState===`visible`&&P()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]);async function P(){r(!0);try{t(await h())}catch(e){y({title:`Error`,description:e instanceof Error?e.message:`Failed to load account info`,variant:`destructive`})}finally{r(!1)}}function F(){g(`https://buy.stripe.com/14AcN6feK0Jjbheb2H3Nm03?client_reference_id=${e?.clientReferenceId??``}`)}function I(){g(`https://buy.stripe.com/9B67sMd6CgIh70Y0o33Nm04?client_reference_id=${e?.clientReferenceId??``}`)}async function L(){T(!0);try{if(await m(),v())try{await _()}catch{}window.close()}catch(e){T(!1),S(!1),y({title:`Error`,description:e instanceof Error?e.message:`Failed to delete account`,variant:`destructive`})}}let R=e?.plan===`unlimited-pro`,z=n&&e===null,B=e===null?n:!R;return(0,D.jsxs)(`div`,{className:`frosted-scrollbar flex h-full min-h-0 flex-col overflow-auto`,children:[(0,D.jsxs)(`div`,{className:`divide-y divide-table-border [&>*]:rounded-none`,children:[(0,D.jsx)(O,{title:`Account`,description:`Manage your Tarsk plan and prompt balance.`,children:z?(0,D.jsx)(k,{}):(0,D.jsxs)(`div`,{className:`flex gap-4 px-6 pb-6 pt-6`,children:[(0,D.jsxs)(`div`,{className:`flex-1 space-y-2 rounded-xl border bg-card p-5`,children:[(0,D.jsxs)(`div`,{className:f(a.label,`flex items-center gap-2 text-muted-foreground`),children:[(0,D.jsx)(l,{className:`h-4 w-4`}),`Balance`]}),(0,D.jsx)(`div`,{className:`flex items-end gap-2`,children:R?(0,D.jsx)(`span`,{className:a.stat,children:`Unlimited`}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:a.stat,children:e?.promptsRemaining.toLocaleString()??0}),(0,D.jsx)(`span`,{className:`${a.caption} mb-1`,children:`prompts remaining`})]})})]}),(0,D.jsxs)(`div`,{className:`flex-1 space-y-3 rounded-xl border bg-card p-5`,children:[(0,D.jsxs)(`div`,{className:f(a.label,`flex items-center gap-2 text-muted-foreground`),children:[(0,D.jsx)(u,{className:`h-4 w-4`}),`Current Plan`]}),(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(`span`,{className:a.label,children:R?`Unlimited Pro`:`Pay as you go`}),R&&(0,D.jsx)(`span`,{className:f(a.compact,`rounded-full bg-primary/10 px-2 py-0.5 font-medium text-primary`),children:`Active`})]}),(0,D.jsx)(`p`,{className:a.bodyMuted,children:R?`You have unlimited prompts with no restrictions.`:`Purchase prompts as needed. Upgrade to Pro for unlimited access.`})]})]})}),B?(0,D.jsx)(O,{title:`Add Prompts`,description:`Top up your balance or upgrade to Pro for unlimited access.`,children:z?(0,D.jsx)(A,{}):(0,D.jsxs)(`div`,{className:`divide-y divide-table-border`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-6 py-5`,children:[(0,D.jsxs)(`div`,{className:`space-y-1`,children:[(0,D.jsx)(`span`,{className:a.label,children:`1,000 Prompts`}),(0,D.jsx)(`p`,{className:a.bodyMuted,children:`Top up your balance with 1,000 additional prompts for $5.`})]}),(0,D.jsx)(p,{onClick:F,className:`shrink-0`,children:`Top Up Balance`})]}),(0,D.jsxs)(`div`,{className:`flex items-center justify-between gap-4 px-6 py-5`,children:[(0,D.jsxs)(`div`,{className:`space-y-1`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(u,{className:`h-4 w-4 text-primary`}),(0,D.jsx)(`span`,{className:a.label,children:`Unlimited Pro Plan`})]}),(0,D.jsx)(`p`,{className:a.bodyMuted,children:`Unlimited prompts for $100 and lifetime access to Tarsk.`}),(0,D.jsxs)(`ul`,{className:f(a.bodyMuted,`space-y-0.5`),children:[(0,D.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,D.jsx)(d,{className:`h-3 w-3 text-primary`}),`Unlimited prompts`]}),(0,D.jsxs)(`li`,{className:`flex items-center gap-1.5`,children:[(0,D.jsx)(d,{className:`h-3 w-3 text-primary`}),`Priority access`]})]})]}),(0,D.jsx)(p,{onClick:I,className:`shrink-0`,children:`Purchase`})]})]})}):null,(0,D.jsx)(O,{title:`Delete Account`,description:`Permanently delete the Tarsk database and any logs on this device.`,children:(0,D.jsxs)(`div`,{className:`space-y-4 px-6 pb-6 pt-6`,children:[N>0?(0,D.jsxs)(x,{variant:`error`,children:[(0,D.jsxs)(`span`,{className:`flex items-start gap-2`,children:[(0,D.jsx)(c,{className:`mt-0.5 h-4 w-4 shrink-0`}),(0,D.jsxs)(`span`,{children:[`You have `,N,` workspace`,` `,N===1?`folder`:`folders`,` listed in Storage. Clear`,` `,N===1?`it`:`them`,` first under Storage — deleting your account does not remove those folders.`]})]}),(0,D.jsx)(`div`,{className:`mt-3`,children:(0,D.jsx)(p,{variant:`outline`,size:`sm`,onClick:()=>j(`/settings/storage`),children:`Go to Storage`})})]}):null,(0,D.jsx)(`p`,{className:a.bodyMuted,children:`This removes the Tarsk database and any logs on this machine and cannot be undone.`}),(0,D.jsxs)(p,{variant:`destructive`,onClick:()=>S(!0),children:[(0,D.jsx)(s,{className:`h-4 w-4`}),`Delete Account`]})]})})]}),(0,D.jsx)(w,{open:b,onOpenChange:e=>{!e&&!C&&S(!1)},title:`Delete account?`,description:`This permanently deletes the Tarsk database and any logs on this device. The app will close and you can relaunch it. This action cannot be undone.`,onConfirm:()=>void L(),confirming:C,confirmLabel:`Delete Account`,confirmingLabel:`Deleting...`})]})}export{j as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{n as t,o as n,t as r}from"./react-vendor-Ee0-5T4I.js";import{ot as i}from"./dist-DjiNKpTV.js";import{g as a,h as o,p as s}from"./dist-CNOCRPxn.js";import{c,t as l}from"./utils-CT-Dw22R.js";import{n as u}from"./button-B6HDsfd5.js";import{n as ee}from"./use-browser-overlay-block-DyprQSIG.js";import{a as d,c as te,i as ne,l as re,n as ie,o as ae,r as f,s as oe,t as p,u as m}from"./dist-CFXDhuA_.js";var h=t(),g=e(n(),1),_=r(),v=`AlertDialog`,[se,ce]=o(v,[m]),y=m(),b=e=>{let{__scopeAlertDialog:t,...n}=e,r=y(t);return(0,_.jsx)(ae,{...r,...n,modal:!0})};b.displayName=v;var x=`AlertDialogTrigger`,S=g.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=y(n);return(0,_.jsx)(te,{...i,...r,ref:t})});S.displayName=x;var C=`AlertDialogPortal`,w=e=>{let{__scopeAlertDialog:t,...n}=e,r=y(t);return(0,_.jsx)(d,{...r,...n})};w.displayName=C;var T=`AlertDialogOverlay`,E=g.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=y(n);return(0,_.jsx)(ne,{...i,...r,ref:t})});E.displayName=T;var D=`AlertDialogContent`,[le,ue]=se(D),de=s(`AlertDialogContent`),O=g.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,o=y(n),s=g.useRef(null),l=c(t,s),u=g.useRef(null);return(0,_.jsx)(re,{contentName:D,titleName:k,docsSlug:`alert-dialog`,children:(0,_.jsx)(le,{scope:n,cancelRef:u,children:(0,_.jsxs)(ie,{role:`alertdialog`,...o,...i,ref:l,onOpenAutoFocus:a(i.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,_.jsx)(de,{children:r}),(0,_.jsx)(I,{contentRef:s})]})})})});O.displayName=D;var k=`AlertDialogTitle`,A=g.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=y(n);return(0,_.jsx)(oe,{...i,...r,ref:t})});A.displayName=k;var j=`AlertDialogDescription`,M=g.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=y(n);return(0,_.jsx)(f,{...i,...r,ref:t})});M.displayName=j;var fe=`AlertDialogAction`,N=g.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=y(n);return(0,_.jsx)(p,{...i,...r,ref:t})});N.displayName=fe;var P=`AlertDialogCancel`,F=g.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=ue(P,n),a=y(n),o=c(t,i);return(0,_.jsx)(p,{...a,...r,ref:o})});F.displayName=P;var I=({contentRef:e})=>{let t=`\`${D}\` requires a description for the component to be accessible for screen reader users.
|
|
2
|
-
|
|
3
|
-
You can add a description to the \`${D}\` by passing a \`${j}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
4
|
-
|
|
5
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${D}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
6
|
-
|
|
7
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},L=b,R=w,z=E,B=O,V=N,H=F,U=A,W=M;function pe(e){let t=(0,h.c)(14),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({open:i,defaultOpen:n,onOpenChange:r,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]!==n||t[6]!==r||t[7]!==i?(o={open:i,defaultOpen:n,onOpenChange:r},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8];let s=ee(o),c;return t[9]!==n||t[10]!==s||t[11]!==i||t[12]!==a?(c=(0,_.jsx)(L,{open:i,defaultOpen:n,onOpenChange:s,...a}),t[9]=n,t[10]=s,t[11]=i,t[12]=a,t[13]=c):c=t[13],c}var G=R,K=g.forwardRef((e,t)=>{let n=(0,h.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=l(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,_.jsx)(z,{className:a,...i,ref:t}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});K.displayName=z.displayName;var q=g.forwardRef((e,t)=>{let n=(0,h.c)(10),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,_.jsx)(K,{}),n[3]=a):a=n[3];let o;n[4]===r?o=n[5]:(o=l(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,r),n[4]=r,n[5]=o);let s;return n[6]!==i||n[7]!==t||n[8]!==o?(s=(0,_.jsxs)(G,{children:[a,(0,_.jsx)(B,{ref:t,className:o,...i})]}),n[6]=i,n[7]=t,n[8]=o,n[9]=s):s=n[9],s});q.displayName=B.displayName;var J=e=>{let t=(0,h.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`flex flex-col space-y-2 text-center sm:text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,_.jsx)(`div`,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a};J.displayName=`AlertDialogHeader`;var Y=e=>{let t=(0,h.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=l(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,_.jsx)(`div`,{className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a};Y.displayName=`AlertDialogFooter`;var X=g.forwardRef((e,t)=>{let n=(0,h.c)(9),r,a;n[0]===e?(r=n[1],a=n[2]):({className:r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=l(i.dialogTitle,r),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==t||n[7]!==o?(s=(0,_.jsx)(U,{ref:t,className:o,...a}),n[5]=a,n[6]=t,n[7]=o,n[8]=s):s=n[8],s});X.displayName=U.displayName;var Z=g.forwardRef((e,t)=>{let n=(0,h.c)(9),r,a;n[0]===e?(r=n[1],a=n[2]):({className:r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=l(i.dialogDescription,r),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==t||n[7]!==o?(s=(0,_.jsx)(W,{ref:t,className:o,...a}),n[5]=a,n[6]=t,n[7]=o,n[8]=s):s=n[8],s});Z.displayName=W.displayName;var Q=g.forwardRef((e,t)=>{let n=(0,h.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=l(u(),r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,_.jsx)(V,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});Q.displayName=V.displayName;var $=g.forwardRef((e,t)=>{let n=(0,h.c)(9),r,i;n[0]===e?(r=n[1],i=n[2]):({className:r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let a;n[3]===r?a=n[4]:(a=l(u({variant:`outline`}),`mt-2 sm:mt-0`,r),n[3]=r,n[4]=a);let o;return n[5]!==i||n[6]!==t||n[7]!==a?(o=(0,_.jsx)(H,{ref:t,className:a,...i}),n[5]=i,n[6]=t,n[7]=a,n[8]=o):o=n[8],o});$.displayName=H.displayName;export{Z as a,X as c,q as i,Q as n,Y as o,$ as r,J as s,pe as t};
|