efficient-shell 8.12.0 → 8.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Browser-6DD4J6S5.js → Browser-OOJUPENB.js} +14 -14
- package/dist/Calculator-PPH3FLQG.js +29 -0
- package/dist/{CurrencyConverter-USQIKK7H.js → CurrencyConverter-GTICX6V3.js} +9 -9
- package/dist/{Documents-V5EJRADW.js → Documents-RXNGM2OY.js} +1 -1
- package/dist/{Files-TDTCVNSE.js → Files-G2FQ5Z3R.js} +87 -87
- package/dist/{Notepad-UV4F6LGY.js → Notepad-7777T6ES.js} +10 -10
- package/dist/PdfViewer-Q7IS273H.js +1 -0
- package/dist/{PomodoroTimer-ZGJLP5LL.js → PomodoroTimer-VPRRRXVE.js} +19 -19
- package/dist/{Preview-ZMZ7CXAS.js → Preview-QBWSY7W7.js} +22 -22
- package/dist/Sidebar-NONBFVWE.js +43 -0
- package/dist/{Spreadsheet-62H5XUHC.js → Spreadsheet-JIOTLCIK.js} +13 -13
- package/dist/{Stock-Y3UQ22RS.js → Stock-OIDTOA6E.js} +3 -3
- package/dist/{Weather-H3CYKPAG.js → Weather-XT3S2O4X.js} +18 -18
- package/dist/{WorldClock-SHLNS6IU.js → WorldClock-QFPWQDD2.js} +6 -6
- package/dist/ai/index.js +13 -13
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-WNJLY7CM.js → chunk-2KOXALIK.js} +11 -11
- package/dist/{chunk-VH3IMIS2.js → chunk-2LTB2DSA.js} +6 -6
- package/dist/chunk-2MBDZMZM.js +2 -0
- package/dist/{chunk-7PCV65OU.js → chunk-37S3WLBL.js} +6 -6
- package/dist/chunk-3UHHKER7.js +2 -0
- package/dist/{chunk-HEVNCBNZ.js → chunk-4GEAEYKA.js} +46 -46
- package/dist/chunk-4LQDWN6L.js +4 -0
- package/dist/chunk-4MHTK3LH.js +4 -0
- package/dist/{chunk-IQDIWKES.js → chunk-55IY2ZJY.js} +1 -1
- package/dist/{chunk-4A2X6KLQ.js → chunk-5GHLKEJQ.js} +1 -1
- package/dist/{chunk-WWEZQ7CF.js → chunk-6AB42T2W.js} +1 -1
- package/dist/chunk-6NLKMHX6.js +2 -0
- package/dist/{chunk-2QI3QFX6.js → chunk-76YDO3KA.js} +1 -1
- package/dist/chunk-7F65BNHY.js +2 -0
- package/dist/{chunk-SFNLRK5J.js → chunk-7HPOALEV.js} +5 -5
- package/dist/{chunk-RAHIWTPJ.js → chunk-7IF3RZF3.js} +12 -12
- package/dist/{chunk-KXTR2RPB.js → chunk-7IHH5CDD.js} +3 -3
- package/dist/{chunk-PPROO6JU.js → chunk-7JKFXRAR.js} +5 -5
- package/dist/{chunk-SBHLTCGU.js → chunk-7QLI3HAO.js} +1 -1
- package/dist/{chunk-KFMRV3MK.js → chunk-BKWLFZHI.js} +1 -1
- package/dist/chunk-BXDYFSP4.js +2 -0
- package/dist/{chunk-UHW2CFLV.js → chunk-C4YTKSXY.js} +1 -1
- package/dist/{chunk-EPHQ7UQV.js → chunk-CQXV3SJA.js} +1 -1
- package/dist/chunk-D5EXIRJF.js +2 -0
- package/dist/{chunk-US5YOYS3.js → chunk-DKY6X24V.js} +1 -1
- package/dist/{chunk-3OKD2ZZV.js → chunk-DXQCNU5I.js} +9 -9
- package/dist/chunk-EEG3KMP7.js +2 -0
- package/dist/{chunk-TAGZV46K.js → chunk-EK3JM3J2.js} +1 -1
- package/dist/{chunk-AP67GBSX.js → chunk-EXU3ZXKB.js} +8 -8
- package/dist/chunk-F6RM7RLQ.js +1 -0
- package/dist/{chunk-332V47ID.js → chunk-FDIJEOGV.js} +2 -2
- package/dist/{chunk-MTD66C5F.js → chunk-FEAOJLGA.js} +2 -2
- package/dist/{chunk-JK3QY266.js → chunk-G34KXE2L.js} +5 -5
- package/dist/{chunk-US5B4QYS.js → chunk-GLVEL6AQ.js} +15 -15
- package/dist/{chunk-7RDFRWF3.js → chunk-H3XEO4LR.js} +6 -6
- package/dist/{chunk-VUYWYMZZ.js → chunk-H62JMI7C.js} +2 -2
- package/dist/{chunk-7FNZUIXO.js → chunk-HHXP34PV.js} +4 -4
- package/dist/chunk-HJUK5AAM.js +2 -0
- package/dist/chunk-HMMNAJJQ.js +4 -0
- package/dist/{chunk-B772UFJ5.js → chunk-HTOZWATN.js} +1 -1
- package/dist/{chunk-IC2YI7WC.js → chunk-HXXUMKTV.js} +1 -1
- package/dist/chunk-I7GWKMYO.js +2 -0
- package/dist/{chunk-CMEN5O67.js → chunk-J6QU5JTZ.js} +1 -1
- package/dist/{chunk-6L7V25YL.js → chunk-J77ZVPF5.js} +5 -5
- package/dist/{chunk-CJUN2VOD.js → chunk-JF45HC5H.js} +1 -1
- package/dist/chunk-JTPBPEYK.js +2 -0
- package/dist/chunk-JXOBORLD.js +3 -0
- package/dist/{chunk-7MX6CMMN.js → chunk-JZ7NBWGB.js} +1 -1
- package/dist/chunk-KIYTUOVN.js +2 -0
- package/dist/chunk-KO5PBMCF.js +2 -0
- package/dist/chunk-KRWKHI7S.js +2 -0
- package/dist/chunk-KV5VLPII.js +1 -0
- package/dist/chunk-L3VD25XR.js +8 -0
- package/dist/{chunk-3RWLCKSR.js → chunk-L6CG37L3.js} +1 -1
- package/dist/{chunk-3XLVARRX.js → chunk-LKSHI57C.js} +6 -6
- package/dist/{chunk-BXRWPGAT.js → chunk-LR2X6MKB.js} +1 -1
- package/dist/{chunk-S2Q6BOAX.js → chunk-MSCILVJB.js} +6 -6
- package/dist/{chunk-EY74CLGD.js → chunk-NRWIULLI.js} +12 -12
- package/dist/{chunk-O4NTKMC5.js → chunk-O3WSAR62.js} +2 -2
- package/dist/chunk-OJ3RN3BG.js +20 -0
- package/dist/{chunk-XVPTBX4R.js → chunk-OS6GGLQQ.js} +3 -3
- package/dist/{chunk-3GMHX3WX.js → chunk-OSRLZZDO.js} +4 -4
- package/dist/chunk-P5SVBGLG.js +2 -0
- package/dist/{chunk-OIVLPNOR.js → chunk-PDPBIDHF.js} +1 -1
- package/dist/{chunk-GVTWQBRU.js → chunk-PG665FWX.js} +9 -9
- package/dist/chunk-PM2N2ZGV.js +2 -0
- package/dist/chunk-PWONLQFF.js +2 -0
- package/dist/chunk-Q7OGTJET.js +3 -0
- package/dist/chunk-QM5DFN7Z.js +2 -0
- package/dist/chunk-R362N2RJ.js +1 -0
- package/dist/chunk-RA5GR626.js +2 -0
- package/dist/chunk-RNBMWJYM.js +4 -0
- package/dist/{chunk-CP6FITHO.js → chunk-RP4ZLTXA.js} +16 -16
- package/dist/{chunk-XW7KN6HW.js → chunk-SNDYD76W.js} +12 -12
- package/dist/chunk-SXPBOX32.js +1 -0
- package/dist/{chunk-C7PQJOGD.js → chunk-TUT6SGH2.js} +1 -1
- package/dist/{chunk-MXDW5IFQ.js → chunk-U6FORQTI.js} +1 -1
- package/dist/chunk-UAXP4A2A.js +4 -0
- package/dist/{chunk-JWMQEWCV.js → chunk-UONWIAII.js} +15 -15
- package/dist/{chunk-M3DZDBS6.js → chunk-UOOHE3FX.js} +6 -6
- package/dist/chunk-USYTN7PE.js +2 -0
- package/dist/{chunk-TTE3GZWH.js → chunk-UWNL4FO2.js} +1 -1
- package/dist/{chunk-4OYSTWMQ.js → chunk-VANXHWGP.js} +1 -1
- package/dist/chunk-VGX7ODMS.js +4 -0
- package/dist/{chunk-C2HHGLLR.js → chunk-VJPJNCB4.js} +24 -4
- package/dist/{chunk-5J6IC25E.js → chunk-VX4OBI4U.js} +1 -1
- package/dist/{chunk-7A7HRAC6.js → chunk-WAMBQNDN.js} +11 -11
- package/dist/{chunk-QKIVMRK5.js → chunk-WCAQWHFD.js} +5 -5
- package/dist/{chunk-XYA7NPSZ.js → chunk-XF2NZVXW.js} +5 -5
- package/dist/{chunk-BKV6PH3R.js → chunk-XTPDXB4X.js} +1 -1
- package/dist/{chunk-BHGMJBJ2.js → chunk-XZLBPVRH.js} +1 -1
- package/dist/{chunk-VJ56YZY6.js → chunk-Y5W6POQE.js} +5 -5
- package/dist/{chunk-B6FBDJUL.js → chunk-YL44UDNT.js} +6 -6
- package/dist/chunk-Z5UVBCEE.js +9 -0
- package/dist/{chunk-BJKXFEZN.js → chunk-ZEDYXP2J.js} +1 -1
- package/dist/{chunk-N7LV32EQ.js → chunk-ZKRWJILC.js} +1 -1
- package/dist/{chunk-2K76HRXS.js → chunk-ZSTBFMQE.js} +1 -1
- package/dist/chunk-ZZIJFMZG.js +4 -0
- package/dist/data/ListLoadError.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/PositionInput.d.ts +25 -0
- package/dist/forms/PositionInput.js +2 -0
- package/dist/forms/Select.d.ts +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.d.ts +10 -2
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/icons/efficient-glyphs.d.ts +8 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +16 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +9 -1
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +8 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/CropBottomIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropBottomIcon.js +1 -0
- package/dist/icons/glyphs/CropLeftIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropLeftIcon.js +1 -0
- package/dist/icons/glyphs/CropLeftRightIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropLeftRightIcon.js +1 -0
- package/dist/icons/glyphs/CropRightIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropRightIcon.js +1 -0
- package/dist/icons/glyphs/CropTopIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropTopIcon.js +1 -0
- package/dist/icons/glyphs/CropYIcon.d.ts +8 -0
- package/dist/icons/glyphs/CropYIcon.js +1 -0
- package/dist/icons/glyphs/NudgeXIcon.d.ts +8 -0
- package/dist/icons/glyphs/NudgeXIcon.js +1 -0
- package/dist/icons/glyphs/NudgeYIcon.d.ts +8 -0
- package/dist/icons/glyphs/NudgeYIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/CropBottomMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropBottomMiniIcon.js +1 -0
- package/dist/icons/looks/CropBottomSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropBottomSolidIcon.js +1 -0
- package/dist/icons/looks/CropLeftMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropLeftMiniIcon.js +1 -0
- package/dist/icons/looks/CropLeftRightMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropLeftRightMiniIcon.js +1 -0
- package/dist/icons/looks/CropLeftRightSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropLeftRightSolidIcon.js +1 -0
- package/dist/icons/looks/CropLeftSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropLeftSolidIcon.js +1 -0
- package/dist/icons/looks/CropRightMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropRightMiniIcon.js +1 -0
- package/dist/icons/looks/CropRightSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropRightSolidIcon.js +1 -0
- package/dist/icons/looks/CropTopMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropTopMiniIcon.js +1 -0
- package/dist/icons/looks/CropTopSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropTopSolidIcon.js +1 -0
- package/dist/icons/looks/CropYMiniIcon.d.ts +8 -0
- package/dist/icons/looks/CropYMiniIcon.js +1 -0
- package/dist/icons/looks/CropYSolidIcon.d.ts +8 -0
- package/dist/icons/looks/CropYSolidIcon.js +1 -0
- package/dist/icons/looks/NudgeXMiniIcon.d.ts +8 -0
- package/dist/icons/looks/NudgeXMiniIcon.js +1 -0
- package/dist/icons/looks/NudgeXSolidIcon.d.ts +8 -0
- package/dist/icons/looks/NudgeXSolidIcon.js +1 -0
- package/dist/icons/looks/NudgeYMiniIcon.d.ts +8 -0
- package/dist/icons/looks/NudgeYMiniIcon.js +1 -0
- package/dist/icons/looks/NudgeYSolidIcon.d.ts +8 -0
- package/dist/icons/looks/NudgeYSolidIcon.js +1 -0
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +694 -694
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/names-DcR-HlYV.d.ts +21 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-7WH3RUWW.js +0 -29
- package/dist/PdfViewer-IQQM7DOH.js +0 -1
- package/dist/Sidebar-EIGME7VA.js +0 -43
- package/dist/chunk-2355YEWO.js +0 -1
- package/dist/chunk-BEWEQ6BP.js +0 -3
- package/dist/chunk-MXMBQS75.js +0 -20
- package/dist/chunk-OZ2ALRKX.js +0 -3
- package/dist/chunk-SXE6KZBU.js +0 -1
- package/dist/chunk-TKLH7V2R.js +0 -9
- package/dist/chunk-VIJ5BZ5U.js +0 -1
- package/dist/chunk-VLOJ4XJC.js +0 -8
- package/dist/chunk-XHILMSCK.js +0 -1
- package/dist/chunk-YVOGWINT.js +0 -4
- package/dist/names-CwL-QSC9.d.ts +0 -21
- /package/dist/{chunk-2CGVDBNO.js → chunk-4MNNVSHD.js} +0 -0
- /package/dist/{chunk-WHTINFQU.js → chunk-A6L6FYG4.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-XHILMSCK.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},x=class{p;l;h(e){this.p?.(e)}},j=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,H=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,O=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,W=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,D=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,V=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,X=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,Q=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(X,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=Q.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&H.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(X,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=t.getAccessToken();i&&n(t.endpoint??"/api/client-telemetry/web-batches/",{method:"POST",keepalive:!0,credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&O.test(e.app),n="string"==typeof e.release&&O.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const d=n.fetch??window.fetch.bind(window),l=new q({app:n.app,release:n.release,shell_version:O.test(t)?t:""}),u=ne(n.routeKey()),f=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let v=!1;const m=()=>{for(const e of l.drain())oe(e,n,d)},C=e=>{v||(l.addError(e),l.size>=50&&m())},L=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(K,"[redacted]").replace(J,"[redacted]").replace(W,"[url]").replace(D,"[id]").replace(V,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a},k=e=>{v||(l.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,u,()=>ne(n.routeKey()),f)),l.size>=50&&m())},S=n.vitalsSampleRate??1;S>0&&(S>=1||(n.random??Math.random)()<S)&&(((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,x),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,j,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,j,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,j,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(k),R(k),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(k),P(k),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(k));const z=e=>{const{error:t,message:n,filename:i,lineno:a,colno:r}=e;if(null!=t)return void C(L(t,"onerror"));const o=i?ee(`at ${i}:${a??0}:${r??0}`):[];C({...L(n??"","onerror"),frames:o})},M=e=>C(L(e.reason,"unhandledrejection")),$=()=>{"hidden"===document.visibilityState&&m()};window.addEventListener("error",z),window.addEventListener("unhandledrejection",M),document.addEventListener("visibilitychange",$),window.addEventListener("pagehide",m);const _=window.setInterval(m,n.flushIntervalMs??6e4),F=e(e=>C(L(e,"boundary"))),U={flush:m,reportError:e=>C(L(e,"boundary")),stop(){v||(m(),v=!0,window.removeEventListener("error",z),window.removeEventListener("unhandledrejection",M),document.removeEventListener("visibilitychange",$),window.removeEventListener("pagehide",m),window.clearInterval(_),F(),ae===U&&(ae=null))}};return ae=U,U}export{se as startClientTelemetry};
|
|
1
|
+
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-KV5VLPII.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},I=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,w=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=I(t);C(()=>{const s=p(t,E),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&w(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},Z=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{Z(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];I(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},x=class{p;l;h(e){this.p?.(e)}},j=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?C(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var U=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&U.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=t.getAccessToken();i&&n(t.endpoint??"/api/client-telemetry/web-batches/",{method:"POST",keepalive:!0,credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i}`},body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const d=n.fetch??window.fetch.bind(window),l=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),u=ne(n.routeKey()),f=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let v=!1;const m=()=>{for(const e of l.drain())oe(e,n,d)},E=e=>{v||(l.addError(e),l.size>=50&&m())},L=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(K,"[redacted]").replace(J,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a},k=e=>{v||(l.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,u,()=>ne(n.routeKey()),f)),l.size>=50&&m())},S=n.vitalsSampleRate??1;S>0&&(S>=1||(n.random??Math.random)()<S)&&(((e,t={})=>{let n=!1;const s=I(t);C(()=>{let d,l=h(),u=g("LCP");const f=p(t,x),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,j,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&w(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},I=["largest-contentful-paint"];s&&I.push("interaction-contentful-paint","soft-navigation");const b=T(I,y);if(b){d=r(e,u,j,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;Z(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,j,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(k),R(k),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];I(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(k),P(k),((e,t={})=>{const n=I(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(k));const z=e=>{const{error:t,message:n,filename:i,lineno:a,colno:r}=e;if(null!=t)return void E(L(t,"onerror"));const o=i?ee(`at ${i}:${a??0}:${r??0}`):[];E({...L(n??"","onerror"),frames:o})},M=e=>E(L(e.reason,"unhandledrejection")),$=()=>{"hidden"===document.visibilityState&&m()};window.addEventListener("error",z),window.addEventListener("unhandledrejection",M),document.addEventListener("visibilitychange",$),window.addEventListener("pagehide",m);const _=window.setInterval(m,n.flushIntervalMs??6e4),F=e(e=>E(L(e,"boundary"))),U={flush:m,reportError:e=>E(L(e,"boundary")),stop(){v||(m(),v=!0,window.removeEventListener("error",z),window.removeEventListener("unhandledrejection",M),document.removeEventListener("visibilitychange",$),window.removeEventListener("pagehide",m),window.clearInterval(_),F(),ae===U&&(ae=null))}};return ae=U,U}export{se as startClientTelemetry};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-VJPJNCB4.js";import{jsx as t,jsxs as r}from"react/jsx-runtime";var a=()=>/* @__PURE__ */t(e,{name:"check",className:"h-3.5 w-3.5","aria-hidden":"true"});function i({items:e,value:i,onChange:n,"aria-label":l,className:s=""}){const c=Math.max(0,e.findIndex(e=>e.id===i));/* @__PURE__ */
|
|
2
2
|
return t("ol",{"aria-label":l,className:`grid items-start ${s}`.trim(),style:{gridTemplateColumns:`repeat(${Math.max(e.length,1)}, minmax(0, 1fr))`},children:e.map((i,l)=>{const s=l<c?"complete":l===c?"current":"upcoming",o="complete"===s&&!!n,m=/* @__PURE__ */t("span",{"aria-hidden":"true",className:["flex h-7 w-7 shrink-0 items-center justify-center rounded-full text-xs font-semibold transition-colors","complete"===s?"bg-blue-600 text-white":"","current"===s?"border-2 border-blue-600 bg-white text-blue-600":"","upcoming"===s?"border-2 border-gray-300 bg-white text-gray-400":""].filter(Boolean).join(" "),children:"complete"===s?/* @__PURE__ */t(a,{}):l+1}),d=/* @__PURE__ */r("span",{className:"min-w-0 text-center",children:[
|
|
3
3
|
/* @__PURE__ */t("span",{className:"block text-sm font-medium "+("upcoming"===s?"text-gray-400":"text-gray-900"),children:i.label}),i.description&&/* @__PURE__ */t("span",{className:"block text-xs text-gray-500",children:i.description})]});/* @__PURE__ */
|
|
4
4
|
return r("li",{"aria-current":"current"===s?"step":void 0,className:"relative flex min-w-0 justify-center",children:[l<e.length-1&&/* @__PURE__ */t("span",{"aria-hidden":"true",className:"absolute top-3.5 h-0.5 rounded "+(l<c?"bg-blue-600":"bg-gray-200"),style:{left:"calc(50% + 0.875rem)",right:"calc(-50% + 0.875rem)"}}),o?/* @__PURE__ */r("button",{type:"button",onClick:()=>n?.(i.id),className:"relative z-10 flex min-w-0 flex-col items-center gap-2 rounded px-2 text-center rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[m,d]}):/* @__PURE__ */r("span",{className:"relative z-10 flex min-w-0 flex-col items-center gap-2 px-2 text-center",children:[m,d]})]},i.id)})})}export{i as Stepper};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{InputNumber_default as a}from"./chunk-FDIJEOGV.js";import{Icon as e}from"./chunk-VJPJNCB4.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
|
|
2
|
+
return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-4GEAEYKA.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CloseGlyph as e}from"./chunk-
|
|
1
|
+
import{CloseGlyph as e}from"./chunk-CQXV3SJA.js";import{humanSize as t,useFileIntake as n,FileIntakeAlert as r}from"./chunk-VAACOJ2H.js";import{IconButton_default as a}from"./chunk-JHDWTYZ4.js";import{Button_default as s}from"./chunk-FSP63GKK.js";import{Icon as i}from"./chunk-VJPJNCB4.js";import{useShellStrings as c}from"./chunk-OVNRVFWS.js";import{useRef as o,useEffect as l}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
2
2
|
return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
3
3
|
return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
|
|
4
4
|
return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
|
|
@@ -6,8 +6,8 @@ return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,childre
|
|
|
6
6
|
return u("li",{className:"flex max-w-full items-center gap-2 rounded-md border border-gray-200 bg-gray-50 py-1 pl-2 pr-1 text-xs text-gray-700",children:[c?/* @__PURE__ */d("img",{src:c,alt:"",className:"h-6 w-6 shrink-0 rounded object-cover"}):/* @__PURE__ */d("span",{className:"text-gray-400",children:/* @__PURE__ */d(p,{})}),
|
|
7
7
|
/* @__PURE__ */d("span",{className:"min-w-0 truncate",title:n.name,children:n.name}),
|
|
8
8
|
/* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:t(n.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(n.name),className:"shrink-0 rounded p-0.5 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:cursor-not-allowed",children:/* @__PURE__ */d(e,{className:"h-3.5 w-3.5"})})]},`${n.name}-${n.size}-${s}`)})})}function f({onClick:e,count:t=0,variant:n="button",label:r,disabled:i=!1}){const o=c().files,l=r??o.attach,p=t>0?`${l} (${t})`:l;return"icon"===n?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
|
|
9
|
-
/* @__PURE__ */d(a,{"aria-label":p,onClick:e,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),t>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-blue-600 px-1 text-center text-2xs font-semibold leading-4 text-white",children:t})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:e,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function g({files:e,onChange:t,accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:g,trigger:x="button",actions:j,onReject:k,className:N="",children:v}){const
|
|
10
|
-
/* @__PURE__ */d(b,{files:e,disabled:m,onRemove:n=>{
|
|
9
|
+
/* @__PURE__ */d(a,{"aria-label":p,onClick:e,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),t>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-blue-600 px-1 text-center text-2xs font-semibold leading-4 text-white",children:t})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:e,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function g({files:e,onChange:t,accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:g,trigger:x="button",actions:j,onReject:k,className:N="",children:v}){const y=n({accept:a,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),L=o([]);return l(()=>{k&&y.rejections.length>0&&y.rejections!==L.current&&(L.current=y.rejections,k(y.rejections))},[y.rejections,k]),/* @__PURE__ */u(h,{intake:y,dropLabel:p,className:N,children:[v,
|
|
10
|
+
/* @__PURE__ */d(b,{files:e,disabled:m,onRemove:n=>{y.clearRejections(),t(e.filter((e,t)=>t!==n))},className:"mt-2"}),
|
|
11
11
|
/* @__PURE__ */u("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[
|
|
12
|
-
/* @__PURE__ */d(f,{onClick:
|
|
13
|
-
/* @__PURE__ */d(r,{rejections:
|
|
12
|
+
/* @__PURE__ */d(f,{onClick:y.open,count:e.length,variant:x,label:g,disabled:m}),j]}),
|
|
13
|
+
/* @__PURE__ */d(r,{rejections:y.rejections})]})}export{f as AttachButton,h as AttachmentDropZone,b as AttachmentList,g as ComposerAttachments,m as PaperclipGlyph};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-BOGBLZKS.js";import{OneLineLabel as i}from"./chunk-QMQVOUIV.js";import{Icon as r}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-BOGBLZKS.js";import{OneLineLabel as i}from"./chunk-QMQVOUIV.js";import{Icon as r}from"./chunk-VJPJNCB4.js";import{useShellStrings as s}from"./chunk-OVNRVFWS.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
|
|
2
2
|
return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
|
|
3
3
|
/* @__PURE__ */n(i,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(r,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function L({size:L=18,...M}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:L,height:L,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...M,children:/* @__PURE__ */A("path",{d:"M3.125 3.75L3.9583 3.75A0.625 0.625 0 0 1 3.9583 2.5L3.125 2.5A0.625 0.625 0 0 1 3.125 3.75ZM7.2917 3.75L8.125 3.75A0.625 0.625 0 0 1 8.125 2.5L7.2917 2.5A0.625 0.625 0 0 1 7.2917 3.75ZM11.875 3.75L12.7083 3.75A0.625 0.625 0 0 1 12.7083 2.5L11.875 2.5A0.625 0.625 0 0 1 11.875 3.75ZM16.0417 3.75L16.875 3.75A0.625 0.625 0 0 1 16.875 2.5L16.0417 2.5A0.625 0.625 0 0 1 16.0417 3.75ZM16.25 3.125L16.25 3.9583A0.625 0.625 0 0 1 17.5 3.9583L17.5 3.125A0.625 0.625 0 0 1 16.25 3.125ZM16.25 7.2917L16.25 8.125A0.625 0.625 0 0 1 17.5 8.125L17.5 7.2917A0.625 0.625 0 0 1 16.25 7.2917ZM16.25 11.875L16.25 12.7083A0.625 0.625 0 0 1 17.5 12.7083L17.5 11.875A0.625 0.625 0 0 1 16.25 11.875ZM16.25 16.0417L16.25 16.875A0.625 0.625 0 0 1 17.5 16.875L17.5 16.0417A0.625 0.625 0 0 1 16.25 16.0417ZM3.125 17.5L3.9583 17.5A0.625 0.625 0 0 1 3.9583 16.25L3.125 16.25A0.625 0.625 0 0 1 3.125 17.5ZM7.2917 17.5L8.125 17.5A0.625 0.625 0 0 1 8.125 16.25L7.2917 16.25A0.625 0.625 0 0 1 7.2917 17.5ZM11.875 17.5L12.7083 17.5A0.625 0.625 0 0 1 12.7083 16.25L11.875 16.25A0.625 0.625 0 0 1 11.875 17.5ZM16.0417 17.5L16.875 17.5A0.625 0.625 0 0 1 16.875 16.25L16.0417 16.25A0.625 0.625 0 0 1 16.0417 17.5ZM2.5 3.125L2.5 3.9583A0.625 0.625 0 0 1 3.75 3.9583L3.75 3.125A0.625 0.625 0 0 1 2.5 3.125ZM2.5 7.2917L2.5 8.125A0.625 0.625 0 0 1 3.75 8.125L3.75 7.2917A0.625 0.625 0 0 1 2.5 7.2917ZM2.5 11.875L2.5 12.7083A0.625 0.625 0 0 1 3.75 12.7083L3.75 11.875A0.625 0.625 0 0 1 2.5 11.875ZM2.5 16.0417L2.5 16.875A0.625 0.625 0 0 1 3.75 16.875L3.75 16.0417A0.625 0.625 0 0 1 2.5 16.0417ZM5.625 1.25L5.625 18.75A1.25 1.25 0 0 1 8.125 18.75L8.125 1.25A1.25 1.25 0 0 1 5.625 1.25ZM11.875 1.25L11.875 18.75A1.25 1.25 0 0 1 14.375 18.75L14.375 1.25A1.25 1.25 0 0 1 11.875 1.25Z"})})}export{L as CropLeftRightMiniIcon};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{DropdownMenu as e}from"./chunk-H3XEO4LR.js";import{Button_default as i}from"./chunk-FSP63GKK.js";import{iconButtonClasses as n}from"./chunk-K7U4RWXJ.js";import{Icon as r}from"./chunk-VJPJNCB4.js";import{Tooltip as a}from"./chunk-Z3WKHMVB.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:g=!1,disabledReason:N,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:W,align:R="end",side:z="bottom",menuMinWidth:K,linkAs:L,block:B=!1,className:F=""},J){const M=g&&(null!=N&&""!==N&&!1!==N)&&!v,O=x&&null!=j&&""!==j&&!1!==j,$=o(),A=/* @__PURE__ */t(i,{ref:J,type:b,variant:f,size:p,loading:v,leftIcon:k,block:B,disabled:g&&!M,"aria-disabled":!!M||void 0,disabledReason:M?N:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),D=B?"relative flex min-w-0 flex-1":"relative inline-flex",H=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
|
|
2
|
+
return s("div",{className:[B?"flex w-full":"inline-flex","items-stretch",F].filter(Boolean).join(" "),children:[null==w||""===w||M?A:/* @__PURE__ */t(a,{content:w,className:D,children:A}),
|
|
3
|
+
/* @__PURE__ */t(a,{content:O?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":O?$:void 0,items:h,align:R,side:z,minWidth:K,linkAs:L,disabled:x&&!O,"aria-disabled":O,onOpenChange:y,footer:C,footerLabel:W,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:H,strokeWidth:2,"aria-hidden":"true"})})}),O&&/* @__PURE__ */t("span",{id:$,className:"sr-only",children:j})]})});export{c as SplitButton_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Button_default as e}from"./chunk-FSP63GKK.js";import{Icon as r}from"./chunk-
|
|
1
|
+
import{Button_default as e}from"./chunk-FSP63GKK.js";import{Icon as r}from"./chunk-VJPJNCB4.js";import{useShellStrings as t}from"./chunk-OVNRVFWS.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
|
|
3
3
|
/* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
|
|
4
4
|
/* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function L({size:L=18,...M}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:L,height:L,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...M,children:/* @__PURE__ */A("path",{d:"M3.125 3.75L3.9583 3.75A0.625 0.625 0 0 1 3.9583 2.5L3.125 2.5A0.625 0.625 0 0 1 3.125 3.75ZM7.2917 3.75L8.125 3.75A0.625 0.625 0 0 1 8.125 2.5L7.2917 2.5A0.625 0.625 0 0 1 7.2917 3.75ZM11.875 3.75L12.7083 3.75A0.625 0.625 0 0 1 12.7083 2.5L11.875 2.5A0.625 0.625 0 0 1 11.875 3.75ZM16.0417 3.75L16.875 3.75A0.625 0.625 0 0 1 16.875 2.5L16.0417 2.5A0.625 0.625 0 0 1 16.0417 3.75ZM16.25 3.125L16.25 3.9583A0.625 0.625 0 0 1 17.5 3.9583L17.5 3.125A0.625 0.625 0 0 1 16.25 3.125ZM16.25 7.2917L16.25 8.125A0.625 0.625 0 0 1 17.5 8.125L17.5 7.2917A0.625 0.625 0 0 1 16.25 7.2917ZM16.25 11.875L16.25 12.7083A0.625 0.625 0 0 1 17.5 12.7083L17.5 11.875A0.625 0.625 0 0 1 16.25 11.875ZM16.25 16.0417L16.25 16.875A0.625 0.625 0 0 1 17.5 16.875L17.5 16.0417A0.625 0.625 0 0 1 16.25 16.0417ZM3.125 17.5L3.9583 17.5A0.625 0.625 0 0 1 3.9583 16.25L3.125 16.25A0.625 0.625 0 0 1 3.125 17.5ZM7.2917 17.5L8.125 17.5A0.625 0.625 0 0 1 8.125 16.25L7.2917 16.25A0.625 0.625 0 0 1 7.2917 17.5ZM11.875 17.5L12.7083 17.5A0.625 0.625 0 0 1 12.7083 16.25L11.875 16.25A0.625 0.625 0 0 1 11.875 17.5ZM16.0417 17.5L16.875 17.5A0.625 0.625 0 0 1 16.875 16.25L16.0417 16.25A0.625 0.625 0 0 1 16.0417 17.5ZM2.5 3.125L2.5 3.9583A0.625 0.625 0 0 1 3.75 3.9583L3.75 3.125A0.625 0.625 0 0 1 2.5 3.125ZM2.5 7.2917L2.5 8.125A0.625 0.625 0 0 1 3.75 8.125L3.75 7.2917A0.625 0.625 0 0 1 2.5 7.2917ZM2.5 11.875L2.5 12.7083A0.625 0.625 0 0 1 3.75 12.7083L3.75 11.875A0.625 0.625 0 0 1 2.5 11.875ZM2.5 16.0417L2.5 16.875A0.625 0.625 0 0 1 3.75 16.875L3.75 16.0417A0.625 0.625 0 0 1 2.5 16.0417ZM11.875 1.25L11.875 18.75A1.25 1.25 0 0 1 14.375 18.75L14.375 1.25A1.25 1.25 0 0 1 11.875 1.25Z"})})}export{L as CropRightMiniIcon};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function L({size:L=18,...M}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:L,height:L,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...M,children:/* @__PURE__ */A("path",{d:"M3.125 3.75L3.9583 3.75A0.625 0.625 0 0 1 3.9583 2.5L3.125 2.5A0.625 0.625 0 0 1 3.125 3.75ZM7.2917 3.75L8.125 3.75A0.625 0.625 0 0 1 8.125 2.5L7.2917 2.5A0.625 0.625 0 0 1 7.2917 3.75ZM11.875 3.75L12.7083 3.75A0.625 0.625 0 0 1 12.7083 2.5L11.875 2.5A0.625 0.625 0 0 1 11.875 3.75ZM16.0417 3.75L16.875 3.75A0.625 0.625 0 0 1 16.875 2.5L16.0417 2.5A0.625 0.625 0 0 1 16.0417 3.75ZM16.25 3.125L16.25 3.9583A0.625 0.625 0 0 1 17.5 3.9583L17.5 3.125A0.625 0.625 0 0 1 16.25 3.125ZM16.25 7.2917L16.25 8.125A0.625 0.625 0 0 1 17.5 8.125L17.5 7.2917A0.625 0.625 0 0 1 16.25 7.2917ZM16.25 11.875L16.25 12.7083A0.625 0.625 0 0 1 17.5 12.7083L17.5 11.875A0.625 0.625 0 0 1 16.25 11.875ZM16.25 16.0417L16.25 16.875A0.625 0.625 0 0 1 17.5 16.875L17.5 16.0417A0.625 0.625 0 0 1 16.25 16.0417ZM3.125 17.5L3.9583 17.5A0.625 0.625 0 0 1 3.9583 16.25L3.125 16.25A0.625 0.625 0 0 1 3.125 17.5ZM7.2917 17.5L8.125 17.5A0.625 0.625 0 0 1 8.125 16.25L7.2917 16.25A0.625 0.625 0 0 1 7.2917 17.5ZM11.875 17.5L12.7083 17.5A0.625 0.625 0 0 1 12.7083 16.25L11.875 16.25A0.625 0.625 0 0 1 11.875 17.5ZM16.0417 17.5L16.875 17.5A0.625 0.625 0 0 1 16.875 16.25L16.0417 16.25A0.625 0.625 0 0 1 16.0417 17.5ZM2.5 3.125L2.5 3.9583A0.625 0.625 0 0 1 3.75 3.9583L3.75 3.125A0.625 0.625 0 0 1 2.5 3.125ZM2.5 7.2917L2.5 8.125A0.625 0.625 0 0 1 3.75 8.125L3.75 7.2917A0.625 0.625 0 0 1 2.5 7.2917ZM2.5 11.875L2.5 12.7083A0.625 0.625 0 0 1 3.75 12.7083L3.75 11.875A0.625 0.625 0 0 1 2.5 11.875ZM2.5 16.0417L2.5 16.875A0.625 0.625 0 0 1 3.75 16.875L3.75 16.0417A0.625 0.625 0 0 1 2.5 16.0417ZM1.25 8.125L18.75 8.125A1.25 1.25 0 0 1 18.75 5.625L1.25 5.625A1.25 1.25 0 0 1 1.25 8.125Z"})})}export{L as CropTopMiniIcon};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function r({size:r=18,...L}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...L,children:/* @__PURE__ */A("path",{d:"M10.5 12A1.5 1.5 0 1 1 13.5 12A1.5 1.5 0 1 1 10.5 12ZM9 11.25L3.75 11.25A0.75 0.75 0 0 1 3.75 12.75L9 12.75A0.75 0.75 0 0 1 9 11.25ZM5.4697 9.2197L3.2197 11.4697A0.75 0.75 0 0 1 4.2803 12.5303L6.5303 10.2803A0.75 0.75 0 0 1 5.4697 9.2197ZM3.2197 12.5303L5.4697 14.7803A0.75 0.75 0 0 1 6.5303 13.7197L4.2803 11.4697A0.75 0.75 0 0 1 3.2197 12.5303ZM15 12.75L20.25 12.75A0.75 0.75 0 0 1 20.25 11.25L15 11.25A0.75 0.75 0 0 1 15 12.75ZM17.4697 10.2803L19.7197 12.5303A0.75 0.75 0 0 1 20.7803 11.4697L18.5303 9.2197A0.75 0.75 0 0 1 17.4697 10.2803ZM19.7197 11.4697L17.4697 13.7197A0.75 0.75 0 0 1 18.5303 14.7803L20.7803 12.5303A0.75 0.75 0 0 1 19.7197 11.4697Z"})})}export{r as NudgeXSolidIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="8.13.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{optionMatches as e,OptionSublabel as t}from"./chunk-TUT6SGH2.js";import{inputClasses as n}from"./chunk-JFSYWEHD.js";import{GROUP_COLORS as r}from"./chunk-BOGBLZKS.js";import{Tooltip as o}from"./chunk-Z3WKHMVB.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as a,POPUP_MAX_WIDTH as s,MENU_MAX_HEIGHT as c}from"./chunk-T53TXXOC.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as d}from"./chunk-OVNRVFWS.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as g}from"react-dom";import{jsxs as v,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-blue-50 px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${r.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:r,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:W,id:D,className:L="",tone:T,tooltip:E,split:S}){const[B,F]=m(!1),[H,M]=m(""),$=d(),G=h(null),I=h(null),J=h(null),K=a(G,B),O=e=>k.find(t=>t.value===e)?.label??e,R=p(()=>{const t=new Set(r),n=[],o=H.trim().toLowerCase();for(const r of k)t.has(r.value)||(t.add(r.value),o&&!e(r,o)||n.push(r));return n},[k,r,H]),V=e=>{const t=[...r];for(const n of e){const e=n.trim();if(!e)continue;const r=e.toLowerCase(),o=k.find(t=>t.value===e||t.label.toLowerCase()===r)?.value,l=o??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==r.length&&y(t)},X=e=>{e&&!r.includes(e)?(y([...r,e]),M("")):M("")},Z=e=>y(r.filter(t=>t!==e)),z=()=>{const e=H.trim();if(S&&e)return V(e.split(S)),void M("");j&&e?X(e):M("")},P=h(()=>{});P.current=()=>{z(),F(!1)},f(()=>{if(!B)return;const e=e=>{const t=e.target;G.current?.contains(t)||J.current?.contains(t)||(z(),F(!1))};document.addEventListener("mousedown",e);const t=l(()=>P.current());return()=>{document.removeEventListener("mousedown",e),t()}});const U=k.length>0;/* @__PURE__ */
|
|
2
|
+
return v("div",{ref:G,className:"relative",children:[
|
|
3
|
+
/* @__PURE__ */v("div",{onMouseDown:e=>{W||e.target.closest("button")||(e.preventDefault(),I.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${W?"bg-gray-50 cursor-not-allowed":""} ${L}`}),children:[r.map(e=>{const t=T?.(e),n=w[t??"accent"],r=/* @__PURE__ */v("span",{"data-tone":t,className:n.chip,children:[
|
|
4
|
+
/* @__PURE__ */x("span",{className:"truncate",children:O(e)}),!W&&/* @__PURE__ */x("button",{type:"button","aria-label":$.select.removeItem?.(O(e))??`${$.select.remove} ${O(e)}`,onClick:()=>Z(e),className:n.remove,children:"×"})]},e),l=E?.(e);return null==l?r:/* @__PURE__ */x(o,{content:l,className:"relative inline-flex max-w-full",children:r},e)}),
|
|
5
|
+
/* @__PURE__ */x("input",{id:D,ref:I,type:"text",autoComplete:"off",role:"combobox","aria-expanded":B&&U,"aria-invalid":C||void 0,disabled:W,value:H,placeholder:0===r.length?N:void 0,onChange:e=>{(e=>{if(S){const t=e.split(S);if(t.length>1)return V(t.slice(0,-1)),void M(t[t.length-1])}M(e)})(e.target.value),F(!0)},onFocus:()=>{!W&&U&&F(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=H.trim(),r=n?R.filter(t=>e(t,n.toLowerCase())):[];1===r.length?X(r[0].value):z()}else"Backspace"===t.key&&""===H&&r.length>0?Z(r[r.length-1]):"Escape"===t.key?(F(!1),M(""),I.current?.blur()):"Tab"===t.key&&(z(),F(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-gray-800 placeholder:text-gray-400 rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),B&&U&&g(
|
|
6
|
+
/* @__PURE__ */x("div",{ref:J,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:K?.left,right:K?.right,top:K?.top,bottom:K?.bottom,minWidth:K?.minWidth,maxWidth:K?.maxWidth??s,width:"max-content",visibility:K?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:K?.maxHeight??c},children:0===R.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&r.length>=k.length?$.select.allSelected:$.select.noMatches}):R.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),X(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap",children:e.sublabel?/* @__PURE__ */v(b,{children:[
|
|
7
|
+
/* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
|
+
/* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-
|
|
1
|
+
import{DropdownMenu as e}from"./chunk-H3XEO4LR.js";import{jsxs as t,jsx as a,Fragment as i}from"react/jsx-runtime";var r="relative inline-flex items-center gap-2 px-3 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40",n="text-blue-600",s="text-gray-600 hover:text-gray-900";function l({item:e,active:r,caret:n}){/* @__PURE__ */
|
|
2
2
|
return t(i,{children:[e.icon&&/* @__PURE__ */a("span",{className:"h-4 w-4 shrink-0",children:e.icon}),
|
|
3
3
|
/* @__PURE__ */a("span",{className:"whitespace-nowrap",children:e.label}),null!=e.badge&&/* @__PURE__ */a("span",{className:"ml-0.5 inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-gray-100 px-2 text-2xs font-semibold leading-5 text-gray-600",children:e.badge}),n&&/* @__PURE__ */a("span",{className:"-ml-1 text-xs","aria-hidden":!0,children:"▾"}),r&&/* @__PURE__ */a("span",{className:"absolute inset-x-2 -bottom-px h-0.5 rounded-full bg-blue-600","aria-hidden":!0})]})}function c({items:i,activeKey:c,onSelect:m,brand:d,actions:o,linkAs:u,className:b}){/* @__PURE__ */
|
|
4
4
|
return t("div",{className:`flex h-12 shrink-0 items-stretch gap-1 border-b border-gray-200 bg-white px-3 ${b??""}`,children:[d&&/* @__PURE__ */a("div",{className:"mr-1 flex items-center gap-2 pr-3 font-semibold text-gray-900",children:d}),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{MediaUploadField as e}from"./chunk-
|
|
2
|
-
return n("section",{"aria-label":
|
|
1
|
+
import{MediaUploadField as e}from"./chunk-Z5UVBCEE.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-FSP63GKK.js";import{useShellStrings as t}from"./chunk-OVNRVFWS.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,R]=l(null),[U,C]=l(""),[F,E]=l(""),[H,I]=l(!1),[O,S]=l(!1),A=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),B=t().brandAsset,G=U||d||g||"",P=L?null:d?o:h,V=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const $=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
|
|
2
|
+
return n("section",{"aria-label":B.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
|
|
3
3
|
/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[
|
|
4
|
-
/* @__PURE__ */c(e,{value:
|
|
4
|
+
/* @__PURE__ */c(e,{value:G,onChange:()=>{},onFile:e=>{if(k)return;$();const r=URL.createObjectURL(e);j.current=r,R(e),C(r),E("")},label:p,hint:F||B.usedFor(b),error:F||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:H||O,disabled:k}),
|
|
5
5
|
/* @__PURE__ */n("div",{className:"mt-3 flex flex-wrap gap-2",children:[
|
|
6
|
-
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!
|
|
7
|
-
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:
|
|
8
|
-
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:
|
|
6
|
+
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!H){I(!0),E("");try{await x(L),$(),R(null),C("")}catch(e){E(e instanceof Error?e.message:B.saveFailed(A,p))}finally{I(!1)}}},disabled:!L||k,loading:H,children:B.save(A,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!O){if(L)return $(),R(null),C(""),void E("");if(d){S(!0),E("");try{await f()}catch(e){E(e instanceof Error?e.message:B.removeFailed(A,p))}finally{S(!1)}}}},disabled:k,loading:O,children:L?B.discard:B.remove(A,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":B.previews(p),children:[
|
|
7
|
+
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:B.preview}),
|
|
8
|
+
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:G,alt:B.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:P,isLight:V,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
|
|
9
9
|
return n("div",{"data-brand-preview":!0,className:"dark"===e.surface?"text-white":"text-gray-900",children:[
|
|
10
10
|
/* @__PURE__ */c("div",{className:"mb-2 text-xs font-medium text-gray-500",children:e.label}),"browser-tab"===e.kind?/* @__PURE__ */n("div",{className:"flex items-end gap-1 border-b border-gray-200",children:[
|
|
11
11
|
/* @__PURE__ */n("div",{className:"flex max-w-[220px] items-center gap-2 rounded-t-lg border border-b-0 border-gray-200 bg-white px-3 py-2",children:[a,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-VJPJNCB4.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check",...t});case"error":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"error",...t});default:/* @__PURE__ */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-MVQBVPWP.js";import{zoneFocusClass as r,mediaPromptLine as t,UploadGlyph as a,dropzoneClass as o,BusyOverlay as n,isVideoUrl as l,mediaFileName as i,FilenameBadge as s}from"./chunk-
|
|
1
|
+
import{FormField as e}from"./chunk-MVQBVPWP.js";import{zoneFocusClass as r,mediaPromptLine as t,UploadGlyph as a,dropzoneClass as o,BusyOverlay as n,isVideoUrl as l,mediaFileName as i,FilenameBadge as s}from"./chunk-CQXV3SJA.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-VAACOJ2H.js";import{Icon as u}from"./chunk-VJPJNCB4.js";import{useShellStrings as p}from"./chunk-OVNRVFWS.js";import{useId as m,useState as g,useRef as f}from"react";import{jsxs as h,jsx as b}from"react/jsx-runtime";var v=/* @__PURE__ */b(u,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function y({items:u,onPick:y,onFiles:x,onRemove:D,onReorder:k,dragType:N,dropType:w,onDropData:j,label:A,hint:P,error:T,required:C,className:S,accept:F="image/*",maxSizeBytes:L,maxFiles:O,fit:V="cover",thumbSize:$=96,placeholder:z,cta:H,acceptHint:B,showCover:E=!1,coverLabel:I,busy:J=!1,busyLabel:R,progress:M,disabled:W=!1,readOnly:q=!1}){const Q=p().media,K=H??Q.cta,U=I??Q.cover,X=R??Q.uploading,G=m(),[Y,Z]=g(null),_=W||J,ee=!(!y&&!x||_||q),re=!!D&&!_&&!q,te=!!k&&!_&&!q,ae=!!N&&!W&&!te,oe=!(!w||!j||_||q),ne=r(_),le=z??t(F,Q),ie=d({accept:F,maxSizeBytes:L,maxFiles:O,acceptHint:B,multiple:!0,disabled:!ee,currentCount:u.length,onAccept:e=>{if(x)x(e);else for(const r of e)y(r)}}),[se,de]=g(!1),ce=f(0),ue=e=>oe&&Array.from(e.dataTransfer?.types??[]).includes(w),pe=ie.zoneProps,me={onDragEnter:e=>{if(!ue(e))return pe.onDragEnter?.(e);e.preventDefault(),ce.current+=1,de(!0)},onDragOver:e=>{if(!ue(e))return pe.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",se||de(!0)},onDragLeave:e=>{if(!ue(e))return pe.onDragLeave?.(e);ce.current=Math.max(0,ce.current-1),0===ce.current&&de(!1)},onDrop:e=>{if(!ue(e))return pe.onDrop?.(e);e.preventDefault(),ce.current=0,de(!1);const r=e.dataTransfer.getData(w);r&&j(r)}},ge=ie.dragOver||se,fe=()=>{ee&&(y?y():ie.open())},he={width:$,height:$},be=ee&&/* @__PURE__ */h("button",{type:"button",onClick:()=>fe(),"aria-label":Q.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${ne}`,style:he,children:[
|
|
2
2
|
/* @__PURE__ */b(a,{className:"h-5 w-5"}),
|
|
3
|
-
/* @__PURE__ */b("span",{className:"text-xs font-medium text-gray-500",children:
|
|
3
|
+
/* @__PURE__ */b("span",{className:"text-xs font-medium text-gray-500",children:Q.add})]}),ve=ee?/* @__PURE__ */h("button",{type:"button",onClick:()=>fe(),"aria-label":"string"==typeof le?le:Q.upload,className:o(ge,!1,ne),style:{minHeight:$+32},children:[
|
|
4
4
|
/* @__PURE__ */b("span",{className:"text-gray-400",children:/* @__PURE__ */b(a,{})}),
|
|
5
5
|
/* @__PURE__ */b("span",{className:"px-3 text-xs text-gray-500",children:le}),
|
|
6
|
-
/* @__PURE__ */b("span",{className:"text-sm font-medium text-blue-600",children:
|
|
7
|
-
return h(e,{label:A,labelId:A?`${
|
|
8
|
-
/* @__PURE__ */h("div",{id:
|
|
9
|
-
return h("div",{draggable:te||ae&&!!e.dragData||void 0,onDragStart:te?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(r)),Z(r)}:ae&&e.dragData?r=>{r.dataTransfer.effectAllowed="link",r.dataTransfer.setData(
|
|
6
|
+
/* @__PURE__ */b("span",{className:"text-sm font-medium text-blue-600",children:K}),B&&/* @__PURE__ */b("span",{className:"text-xs text-gray-400",children:B})]}):/* @__PURE__ */b("div",{className:"flex w-full items-center justify-center rounded-lg border border-gray-200 bg-gray-50 px-3 text-xs text-gray-400",style:{minHeight:$+32},children:/* @__PURE__ */b("span",{className:J?"invisible":void 0,children:Q.empty})});/* @__PURE__ */
|
|
7
|
+
return h(e,{label:A,labelId:A?`${G}-label`:void 0,htmlFor:G,hint:P,error:T,required:C,className:S,children:[
|
|
8
|
+
/* @__PURE__ */h("div",{id:G,role:"group","aria-labelledby":A?`${G}-label`:void 0,"aria-describedby":T?`${G}-error`:P?`${G}-hint`:void 0,"aria-busy":J||void 0,...ie.zoneProps,...oe?me:{},className:"relative rounded-lg transition-colors",style:{..._?{opacity:.6}:{},...ge?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===u.length?ve:/* @__PURE__ */h("div",{className:"flex flex-wrap gap-2",children:[u.map((e,r)=>{const t=e.kind?"video"===e.kind:l(e.url,F),a=i(e.url),o=E&&(e.cover??0===r);/* @__PURE__ */
|
|
9
|
+
return h("div",{draggable:te||ae&&!!e.dragData||void 0,onDragStart:te?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(r)),Z(r)}:ae&&e.dragData?r=>{r.dataTransfer.effectAllowed="link",r.dataTransfer.setData(N,e.dragData)}:void 0,onDragEnd:te?()=>Z(null):void 0,onDragOver:te?e=>{null!=Y&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:te?e=>{null!=Y&&(e.preventDefault(),e.stopPropagation(),Y!==r&&k(Y,r),Z(null))}:void 0,tabIndex:te?0:void 0,"aria-label":te?Q.reorder(a,r+1,u.length):void 0,onKeyDown:te?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?r>0&&(e.preventDefault(),k(r,r-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||r<u.length-1&&(e.preventDefault(),k(r,r+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-gray-200 bg-gray-100",ne,Y===r?"opacity-50":""].join(" "),style:{...he,cursor:te?"move":void 0},children:[t?/* @__PURE__ */b("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:V}}):/* @__PURE__ */b("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:V}}),o&&/* @__PURE__ */b("span",{className:"absolute left-1 top-1 rounded bg-blue-600 px-2 py-0.5 text-xs font-medium text-white",children:U}),!o&&null!=e.mark&&/* @__PURE__ */b("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-white",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),null!=e.caption&&/* @__PURE__ */b(s,{children:e.caption}),re&&/* @__PURE__ */b("button",{type:"button",onClick:()=>D(e.id),"aria-label":e.removeLabel??Q.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${ne}`,style:{background:"var(--rosh-media-scrim-button)"},children:v})]},e.id)}),be]}),J&&/* @__PURE__ */b(n,{label:X,progress:M})]}),!y&&x&&/* @__PURE__ */b("input",{...ie.inputProps}),
|
|
10
10
|
/* @__PURE__ */b(c,{rejections:ie.rejections})]})}export{y as MediaUploadGrid};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{parseHexColor as e,hexToHsv as r,hsvToHex as a,hexReadout as n,HUE_GRADIENT as o,HEX_MAX_LENGTH as t,svFromPoint as l,hueFromPoint as i}from"./chunk-H245LLX4.js";import{Popover as s}from"./chunk-FND3BDOO.js";import{InputNumber_default as c}from"./chunk-
|
|
2
|
-
return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),I=e=>"string"==typeof e?{value:e}:e;function M(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function P(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var A={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function j(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function
|
|
1
|
+
import{parseHexColor as e,hexToHsv as r,hsvToHex as a,hexReadout as n,HUE_GRADIENT as o,HEX_MAX_LENGTH as t,svFromPoint as l,hueFromPoint as i}from"./chunk-H245LLX4.js";import{Popover as s}from"./chunk-FND3BDOO.js";import{InputNumber_default as c}from"./chunk-FDIJEOGV.js";import{InSettingRowContext as u}from"./chunk-E4Z5OXBI.js";import{inputClasses as d}from"./chunk-JFSYWEHD.js";import{Tooltip as h}from"./chunk-Z3WKHMVB.js";import{useShellStrings as g}from"./chunk-OVNRVFWS.js";import{forwardRef as p,useState as b,useRef as m,useEffect as f,useId as v}from"react";import{jsx as w,jsxs as x}from"react/jsx-runtime";var y={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},k={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function N(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function C(e,r){if(!e)return k;const a=N(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${k.backgroundImage}`,backgroundSize:`auto, ${k.backgroundSize}`}}function $({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",y[e],a].filter(Boolean).join(" ")}var D=p(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
|
|
2
|
+
return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),I=e=>"string"==typeof e?{value:e}:e;function M(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function P(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var A={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function j(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function O({value:t,onChange:s,label:c,presets:d,clearable:p=!1,fallback:v,dragWrites:y="live",disabled:$=!1,opacity:z,onOpacityChange:O,onClose:S,id:K,className:B=""}){const L=g().color,R=N(z),H=e=>{const r=N(e);$||r===R||O?.(r)},U=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:R},W=e(v??""),[F,V]=b(()=>r(t||W||"")),X=m(t);f(()=>{t!==X.current&&(X.current=t,t?V(r(t)):W&&V(r(W)))},[t]);const q=e=>{$||e===t||(X.current=e,s(e))},J=a=>{const n=e(a);n&&(V(r(n)),q(n))},Y=e=>{V(e),q(a(e))},[Z,G]=b(!1),Q=m(F);Q.current=F;const _=e=>({onPointerDown:r=>{if($||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,Q.current);"end"===y?(G(!0),V(a)):Y(a)},onPointerMove:r=>{if($||!(1&r.buttons))return;const a=e(r,Q.current);"end"===y?V(a):Y(a)},onPointerUp:r=>{"end"===y&&Z&&(G(!1),Y(e(r,Q.current)))}}),ee=_((e,r)=>({...r,...l(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),re=_((e,r)=>({...r,h:i(e.clientX,e.currentTarget.getBoundingClientRect())})),ae=Z?a(F):t,ne=e=>`${Math.round(100*e)}%`,oe=(d??[]).map(I),te=e(t),le=ae||W||"";
|
|
3
3
|
/* @__PURE__ */
|
|
4
|
-
return w(u.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:
|
|
5
|
-
return w(h,{content:o,children:/* @__PURE__ */w(D,{color:a??r.value,size:"sm","aria-label":o,selected:null!==a&&a===te,disabled:$,onClick:()=>
|
|
6
|
-
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":
|
|
7
|
-
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":
|
|
4
|
+
return w(u.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:K,className:`flex w-56 flex-col gap-3 ${$?"opacity-60":""} ${B}`.trim(),onKeyDown:e=>{"Escape"===e.key&&S&&(e.preventDefault(),e.stopPropagation(),S())},children:[(oe.length>0||p)&&/* @__PURE__ */x("div",{role:"group","aria-label":L.presets,className:"flex flex-wrap gap-2",children:[p&&/* @__PURE__ */w(h,{content:L.clear,children:/* @__PURE__ */w(D,{color:"",size:"sm","aria-label":L.clear,selected:""===t,disabled:$,onClick:()=>{$||""===t||(X.current="",s(""))}})}),oe.map(r=>{const a=e(r.value),o=r.label?`${r.label} · ${n(a??r.value)}`:n(a??r.value);/* @__PURE__ */
|
|
5
|
+
return w(h,{content:o,children:/* @__PURE__ */w(D,{color:a??r.value,size:"sm","aria-label":o,selected:null!==a&&a===te,disabled:$,onClick:()=>J(r.value)})},`${r.label??""}:${r.value}`)})]}),
|
|
6
|
+
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":L.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*F.v),"aria-valuetext":L.squareValue(Math.round(100*F.s),Math.round(100*F.v)),"aria-disabled":$||void 0,"data-color-square":"",onKeyDown:e=>{if($)return;const r=M(F,e.key,e.shiftKey);r&&(e.preventDefault(),Y(r))},...ee,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:a({h:F.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ne(F.s),top:ne(1-F.v),...A}})}),
|
|
7
|
+
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":L.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(F.h),"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-hue":"",onKeyDown:e=>{if($)return;const r=P(F.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),Y({...F,h:r}))},...re,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:o},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:F.h/360*100+"%",background:a({h:F.h,s:1,v:1}),...A}})}),O&&/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":L.opacity(c),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":R,"aria-valuetext":`${R}%`,"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-opacity":"",onKeyDown:e=>{if($)return;const r=j(R,e.key,e.shiftKey);null!==r&&(e.preventDefault(),H(r))},onPointerDown:e=>{$||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),H(U(e)))},onPointerMove:e=>{!$&&1&e.buttons&&H(U(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${le||"black"}), ${k.backgroundImage}`,backgroundSize:`auto, ${k.backgroundSize}`},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${R}%`,...C(le||"black",R),...A}})}),
|
|
8
8
|
/* @__PURE__ */x("div",{className:"flex items-center gap-2",children:[
|
|
9
|
-
/* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-gray-300",style:C(le,
|
|
10
|
-
/* @__PURE__ */w(T,{value:ae,placeholder:!t&&W?n(W):void 0,onChange:
|
|
11
|
-
return w("input",{id:s,type:"text",value:g??(r?n(r):""),"aria-label":o,placeholder:l,maxLength:t,spellCheck:!1,autoComplete:"off",disabled:i,onChange:n=>{p(n.target.value);const o=e(n.target.value);null!==o&&o!==r&&a(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(null),"data-hex-look":u,className:m})}function
|
|
12
|
-
return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(c,{value:e,onChange:e=>{null!==e&&r(e)},min:0,max:100,precision:0,suffix:"%",size:o,"aria-label":a,disabled:n})})}function
|
|
9
|
+
/* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-gray-300",style:C(le,O?R:null)}),
|
|
10
|
+
/* @__PURE__ */w(T,{value:ae,placeholder:!t&&W?n(W):void 0,onChange:J,label:L.hex(c),disabled:$}),O&&/* @__PURE__ */w(E,{value:R,onChange:H,label:L.opacity(c),disabled:$})]})]})})}var S={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},K={sm:"h-6",md:"h-8",lg:"h-10"},B=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-gray-800 placeholder:text-gray-400 hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function T({value:r,onChange:a,label:o,placeholder:l,disabled:i,id:s,size:c="md",look:u="box",className:h=""}){const[g,p]=b(null),m="text"===u?`${B} ${K[c]} ${h}`.trim():d({size:c,className:`${S[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
|
|
11
|
+
return w("input",{id:s,type:"text",value:g??(r?n(r):""),"aria-label":o,placeholder:l,maxLength:t,spellCheck:!1,autoComplete:"off",disabled:i,onChange:n=>{p(n.target.value);const o=e(n.target.value);null!==o&&o!==r&&a(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(null),"data-hex-look":u,className:m})}function E({value:e,onChange:r,label:a,disabled:n,size:o="md"}){/* @__PURE__ */
|
|
12
|
+
return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(c,{value:e,onChange:e=>{null!==e&&r(e)},min:0,max:100,precision:0,suffix:"%",size:o,"aria-label":a,disabled:n})})}function L({value:r,onChange:a,label:o,presets:t,clearable:l,fallback:i,dragWrites:c,disabled:u,id:d,showHexInput:h=!1,opacity:p,onOpacityChange:b,size:m="md",align:f="start",open:y,onOpenChange:k,className:D=""}){const z=g().color,I=N(p),M=v(),P=e(i??""),A=r||P||"",j=r?n(r):P?n(P):z.none;
|
|
13
13
|
/* @__PURE__ */
|
|
14
14
|
return x("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":h?"gap-1":"gap-2"} ${D}`.trim(),children:[
|
|
15
|
-
/* @__PURE__ */w(s,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(A,b?I:null)}),triggerLabel:z.swatch(o,j),triggerClassName:$({size:m}),"aria-label":z.panel(o),align:f,open:y,onOpenChange:k,disabled:u,children:/* @__PURE__ */w(
|
|
16
|
-
/* @__PURE__ */w(T,{value:r,placeholder:!r&&P?n(P):void 0,onChange:e=>{u||e===r||a(e)},label:z.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */w(
|
|
15
|
+
/* @__PURE__ */w(s,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(A,b?I:null)}),triggerLabel:z.swatch(o,j),triggerClassName:$({size:m}),"aria-label":z.panel(o),align:f,open:y,onOpenChange:k,disabled:u,children:/* @__PURE__ */w(O,{id:M,value:r,onChange:a,label:o,presets:t,clearable:l,fallback:i,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),h&&
|
|
16
|
+
/* @__PURE__ */w(T,{value:r,placeholder:!r&&P?n(P):void 0,onChange:e=>{u||e===r||a(e)},label:z.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */w(E,{value:I,onChange:e=>{u||e===I||b(e)},label:z.opacity(o),disabled:u,size:m})]})}export{L as ColorPicker,O as ColorPickerPanel,D as ColorSwatch,T as HexInput,k as NO_COLOR_FILL,N as clampOpacity,C as colorFill,$ as colorSwatchClasses,P as stepHue,j as stepOpacity,M as stepSquare};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{navIcons as e}from"./chunk-TPDOOCFS.js";import{Icon as t}from"./chunk-
|
|
1
|
+
import{navIcons as e}from"./chunk-TPDOOCFS.js";import{Icon as t}from"./chunk-VJPJNCB4.js";import{isValidElement as r,cloneElement as n}from"react";import{jsx as o,jsxs as i}from"react/jsx-runtime";var l=["from-blue-500 to-blue-700","from-indigo-500 to-purple-600","from-purple-500 to-pink-600","from-pink-500 to-rose-600","from-red-500 to-rose-600","from-orange-500 to-red-600","from-amber-500 to-orange-600","from-yellow-500 to-amber-500","from-lime-500 to-green-600","from-green-500 to-emerald-600","from-emerald-500 to-teal-600","from-teal-500 to-cyan-600","from-cyan-500 to-sky-600","from-sky-500 to-blue-600","from-violet-500 to-fuchsia-600"];function a(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r);return l[Math.abs(t)%l.length]}var d={order:"text-blue-600",purchase_order:"text-purple-600",invoice:"text-green-600",client:"text-indigo-600",manufacturer:"text-orange-600",shipment:"text-teal-600",part_number:"text-gray-600",project:"text-pink-600",mould:"text-red-600",design:"text-cyan-600",brand:"text-amber-600",price_sheet:"text-emerald-600",folder:"text-yellow-600",page:"text-blue-500"},s={order:"SO",purchase_order:"PO",invoice:"INV",client:"CLI",manufacturer:"MFR",shipment:"DN",part_number:"PN",project:"PRJ",mould:"MLD",design:"DSN",brand:"BRD",price_sheet:"PS",vendor_invoice:"VI",vendor_payment:"VP",warranty_claim:"WC",qc_report:"QC",vendor_shipment:"GRN",bank_account:"BA",wheel_finish:"WF",weight_log:"WL",production_progress:"PP",vendor_price_sheet:"VPS",proposal:"PR",folder:"FLD"},c={pdf:"PDF",dxf:"DXF","3d":"STP",image:"IMG",csv:"CSV"},f={pdf:"text-red-600",dxf:"text-blue-600","3d":"text-purple-600",image:"text-emerald-600",csv:"text-green-600"};function p({className:e}){/* @__PURE__ */
|
|
2
2
|
return o(t,{name:"folder",look:"solid",className:e})}function u(t,r){return r&&e[r]||(t?e[t]:void 0)}var m=/* @__PURE__ */o("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */o("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6z"})});function h({entityType:e,isSelected:t,entityId:l,label:h,fileKind:w}){const g="preview-file"===e&&w,y=g?f[w]:null,x=g?c[w]:null;if("folder"===e)/* @__PURE__ */
|
|
3
3
|
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o(p,{className:"h-12 w-12 text-amber-500 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]"})});if("page"===e){const e=u(l,h),i=a(l||h||"page");/* @__PURE__ */
|
|
4
4
|
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o("span",{className:`h-11 w-11 rounded-xl bg-gradient-to-br ${i} flex items-center justify-center text-white border border-white/30 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]`,children:e&&r(e)?n(e,{className:"h-7 w-7 text-white"}):m})})}/* @__PURE__ */
|
|
@@ -10,4 +10,4 @@ return i("div",{className:"w-12 h-12 relative flex items-center justify-center "
|
|
|
10
10
|
/* @__PURE__ */o("span",{className:`absolute inset-0 flex items-center justify-center text-3xs font-bold pt-2 ${y??d[e]??"text-gray-600"}`,children:x??s[e]??e.slice(0,3).toUpperCase()})]})}function w({item:e}){if("folder"===e.entityType)/* @__PURE__ */
|
|
11
11
|
return o(p,{className:"h-4 w-4 shrink-0 text-amber-500"});if("page"===e.entityType){const t=u(e.entityId,e.label);/* @__PURE__ */
|
|
12
12
|
return o("span",{className:`h-4 w-4 rounded bg-gradient-to-br ${a(e.entityId||e.label||"page")} flex items-center justify-center text-white shrink-0`,children:t&&r(t)?n(t,{className:"h-3 w-3 text-white"}):/* @__PURE__ */o("span",{className:"h-1.5 w-1.5 rounded-[2px] border border-white/80"})})}const i=("preview-file"===e.entityType&&e.fileKind?f[e.fileKind]:d[e.entityType])??"text-gray-400";/* @__PURE__ */
|
|
13
|
-
return o(t,{name:"page",className:`h-4 w-4 shrink-0 ${i}`,strokeWidth:1.5})}function g(e){return"preview-file"===e.entityType&&e.fileKind?c[e.fileKind]:"page"===e.entityType?"App":"folder"===e.entityType?"Folder":s[e.entityType]??e.entityType.slice(0,3).toUpperCase()}var y=null,x=/* @__PURE__ */new Set;function b(e){y=e,x.forEach(e=>e())}function v(e){return x.add(e),()=>{x.delete(e)}}function _(){return y}var k="__REACT_OS_SHELL_FILES_VIEW__",N="react-os-shell:files-show-trash",C="react-os-shell:files-open-desktop-folder";function j(){"undefined"!=typeof window&&(window[k]="trash",window.dispatchEvent(new CustomEvent(N)))}function
|
|
13
|
+
return o(t,{name:"page",className:`h-4 w-4 shrink-0 ${i}`,strokeWidth:1.5})}function g(e){return"preview-file"===e.entityType&&e.fileKind?c[e.fileKind]:"page"===e.entityType?"App":"folder"===e.entityType?"Folder":s[e.entityType]??e.entityType.slice(0,3).toUpperCase()}var y=null,x=/* @__PURE__ */new Set;function b(e){y=e,x.forEach(e=>e())}function v(e){return x.add(e),()=>{x.delete(e)}}function _(){return y}var k="__REACT_OS_SHELL_FILES_VIEW__",N="react-os-shell:files-show-trash",C="react-os-shell:files-open-desktop-folder";function j(){"undefined"!=typeof window&&(window[k]="trash",window.dispatchEvent(new CustomEvent(N)))}function P(e){"undefined"!=typeof window&&(window[k]={view:"desktop-folder",folderId:e},window.dispatchEvent(new CustomEvent(C,{detail:{folderId:e}})))}function T(){if("undefined"==typeof window)return null;const e=window[k];return"trash"===e?"trash":e&&"object"==typeof e&&"desktop-folder"===e.view&&"string"==typeof e.folderId?e:null}function I(){const e=T();return"undefined"!=typeof window&&(window[k]=null),e}export{w as DesktopItemMiniIcon,C as FILES_OPEN_DESKTOP_FOLDER_EVENT,N as FILES_SHOW_TRASH_EVENT,h as FileIconTile,p as FolderGlyph,I as consumeFilesViewRequest,g as desktopItemTypeLabel,_ as getDesktopFoldersSnapshot,T as peekFilesViewRequest,b as publishDesktopFolders,P as requestFilesDesktopFolderView,j as requestFilesTrashView,v as subscribeDesktopFolders};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as n}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as i,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-TUT6SGH2.js";import{useSettingAuto as d}from"./chunk-E4Z5OXBI.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-JFSYWEHD.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-QR4RM7PO.js";import{Icon as m}from"./chunk-VJPJNCB4.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-T53TXXOC.js";import{solidSurfaceStyle as g}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-OVNRVFWS.js";import{forwardRef as w,useId as k,useState as N,useRef as $,useMemo as D,useCallback as T,useEffect as j,useLayoutEffect as O}from"react";import{createPortal as E}from"react-dom";import{jsxs as S,jsx as C,Fragment as H}from"react/jsx-runtime";var I=w(function({value:e,onChange:t,options:r,placeholder:n,invalid:i,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},w){const N=t,$=x(),D=d(),T=f??D,j=k(),O=/* @__PURE__ */S("select",{ref:w,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":i||void 0,"aria-describedby":[g,T?j:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:i,size:l,auto:T,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==n&&!b&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:n}),
|
|
2
|
+
/* @__PURE__ */C(R,{items:r})]});return T?/* @__PURE__ */S(H,{children:[O,
|
|
3
|
+
/* @__PURE__ */C("span",{id:j,hidden:!0,children:$.settingView.auto})]}):O});function R({items:e}){const t=e=>/* @__PURE__ */C("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return C(H,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */C("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var z=w(function({value:l,onChange:u,options:w,placeholder:I,invalid:z,className:V="",id:B,disabled:W,size:A,touchSize:F,title:K,multiple:P,renderOption:U,renderValue:J,valueText:M,readOnly:L=!1,footer:X,changed:G=!1,auto:q,"aria-describedby":Q,"aria-label":Y,"aria-labelledby":Z,..._},ee){const[te,re]=N(!1),[ne,ie]=N(-1),ae=$(null),le=$(null),oe=$(null),de=$(null),se=$([]),ce=()=>de.current??oe.current,ue=!!X?.length,pe="sm"===A,me=pe?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",ve=p(pe),[he,fe]=N(null),be=x(),ge=$(te);ge.current=te;const ye=$({buffer:"",timer:null}),xe=k(),we=`${xe}-listbox`,ke=B??`${xe}-trigger`,Ne=e=>`${xe}-opt-${e}`,$e=`${xe}-changed`,De=d(),Te=q??De,je=`${xe}-auto`,Oe=[Q,G?$e:void 0,Te?je:void 0].filter(Boolean).join(" ")||void 0,Ee=D(()=>i(w),[w]),Se=P?l:[],Ce=u,He=f(le,te,{matchTriggerWidth:!0,...X?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),Ie="undefined"==typeof window?j:O,Re=`${te}|${He?.top}|${He?.bottom}|${He?.maxHeight}|${w.length}`;Ie(()=>{fe(null)},[Re]),Ie(()=>{const e=oe.current;if(!te||!e||null!==he)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const n=e.getBoundingClientRect().top;let i=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-n+e.scrollTop;if(!(r<=e.clientHeight+.5))break;i=r}i>r&&fe(Math.floor(i))},[te,he,Re]);const ze=P?Ee.findIndex(e=>Se.includes(e.value)):Ee.findIndex(e=>e.value===l),Ve=P?Ee.filter(e=>Se.includes(e.value)).map(e=>e.label).join(", ")||void 0:ze>=0?Ee[ze].label:void 0,Be=!P&&ze>=0?Ee[ze].lang:void 0,We=P?Ee.filter(e=>Se.includes(e.value)):ze>=0?[Ee[ze]]:[],Ae=J&&We.length?J(We):void 0,Fe=void 0!==Ae&&M?M(We):void 0,Ke=T((e=!0)=>{re(!1),ie(-1),e&&le.current?.focus()},[]),Pe=T(()=>{W||L||(ie(ze>=0?ze:e(Ee)),re(!0))},[W,L,Ee,ze]),Ue=T(e=>{const t=Ee[e];if(t&&!t.disabled){if(P){const r=l;return Ce(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ie(e)}Ce(t.value),Ke()}},[Ee,P,l,Ce,Ke]);j(()=>{if(!te)return;return y(e=>!("Escape"!==e.key||!ge.current)&&(Ke(),!0),ce)},[te,Ke]),j(()=>{if(!te)return;const e=e=>{const t=e.target;ae.current?.contains(t)||ce()?.contains(t)||Ke(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ke(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[te,Ke]),j(()=>{!te||ne<0||oe.current?.querySelector(`#${CSS.escape(Ne(ne))}`)?.scrollIntoView({block:"nearest"})},[te,ne]);const Je=T(e=>{const r=ye.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const n=te?ne:ze,i=t(Ee,r.buffer,n);i<0||(te?ie(i):P?(ie(i),re(!0)):Ue(i))},[te,ne,ze,Ee,Ue,P]),Me=te?a(w,(e,t)=>{const r=(n=e.value,P?Se.includes(n):l===n);var n;const i=t===ne;/* @__PURE__ */
|
|
5
|
+
return S("div",{id:Ne(t),role:"option",lang:e.description||U?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ie(t)},onClick:()=>Ue(t),className:`mx-1 cursor-pointer truncate rounded-lg ${me}${P?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":i?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[P&&/* @__PURE__ */C(o,{selected:r}),U?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1 truncate",children:U(e,{selected:r,active:i})}):P?/* @__PURE__ */S("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",children:e.label}),e.description&&/* @__PURE__ */C("span",{className:ve,children:e.description})]}):e.description?
|
|
7
|
+
/* @__PURE__ */S(H,{children:[
|
|
8
|
+
/* @__PURE__ */C("span",{lang:e.lang,className:"block truncate",children:e.label}),
|
|
9
|
+
/* @__PURE__ */C("span",{className:ve,children:e.description})]}):e.label]},e.value)},xe,"mx-1"):null,Le=void 0!==Ae?
|
|
10
|
+
/* @__PURE__ */S("span",{className:"relative block min-w-0 truncate",children:[
|
|
11
|
+
/* @__PURE__ */C("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Ae}),
|
|
12
|
+
/* @__PURE__ */C("span",{lang:void 0===Fe?Be:void 0,className:"sr-only",children:Fe??Ve})]}):/* @__PURE__ */C("span",{lang:Be,className:"block truncate "+(void 0===Ve?"text-gray-400":""),children:Ve??I??" "}),Xe={zIndex:h.popup,left:He?.left,top:He?.top,bottom:He?.bottom,width:He?.width,maxHeight:He?.maxHeight??b,visibility:He?void 0:"hidden",...g()},Ge=/* @__PURE__ */C("div",{ref:oe,id:we,role:"listbox","aria-labelledby":Z??(Y?void 0:ke),"aria-label":Z?void 0:Y,"aria-multiselectable":P||void 0,className:ue?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:ue?null!==he?{maxHeight:he}:void 0:null!==he?{...Xe,maxHeight:he}:Xe,children:Me}),qe=ue?/* @__PURE__ */S("div",{ref:de,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Xe,children:[Ge,
|
|
13
|
+
/* @__PURE__ */C("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:X.map((e,t)=>/* @__PURE__ */S("button",{ref:e=>{se.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ke(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(X?.length??0)-1,n=t=>{e.preventDefault(),se.current[t]?.focus()},i=()=>{e.preventDefault(),le.current?.focus()};switch(e.key){case"ArrowDown":return void n(Math.min(t+1,r));case"ArrowUp":return void(0===t?i():n(t-1));case"Home":return void n(0);case"End":return void n(r);case"Tab":return e.shiftKey?void(0===t?i():n(t-1)):t<r?void n(t+1):(e.preventDefault(),void Ke());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ke()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${me} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-gray-400":"cursor-pointer text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */C(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
14
|
+
/* @__PURE__ */C("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Ge;/* @__PURE__ */
|
|
15
|
+
return S("div",{ref:ae,className:"relative",children:[
|
|
16
|
+
/* @__PURE__ */C("button",{ref:le,id:ke,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":te,"aria-controls":te?we:void 0,"aria-activedescendant":te&&ne>=0?Ne(ne):void 0,"aria-invalid":z||void 0,"aria-describedby":Oe,"aria-label":Y,"aria-labelledby":Z,title:K,disabled:W,"aria-readonly":L||void 0,onClick:()=>te?Ke():Pe(),onKeyDown:t=>{if(!W&&!L)switch(t.key){case"ArrowDown":return t.preventDefault(),void(te?ie(e=>n(Ee,e,1)):Pe());case"ArrowUp":return t.preventDefault(),void(te?ie(e=>n(Ee,e,-1)):Pe());case"Home":return void(te&&(t.preventDefault(),ie(e(Ee))));case"End":return void(te&&(t.preventDefault(),ie(r(Ee))));case"Enter":return void(te&&(t.preventDefault(),Ue(ne)));case" ":return t.preventDefault(),void(te?Ue(ne):Pe());case"Escape":return void(te&&(t.preventDefault(),t.stopPropagation(),Ke()));case"Tab":return te&&ue&&!t.shiftKey?(t.preventDefault(),void se.current[0]?.focus()):void(te&&Ke(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Je(t.key))}},className:s({invalid:z,size:A,readOnly:L,auto:Te,className:`${L?"":"pr-8 "}text-left ${V}`.trim()}),children:G?
|
|
17
|
+
/* @__PURE__ */S("span",{className:"flex min-w-0 items-center gap-1",children:[Le,
|
|
18
|
+
/* @__PURE__ */C("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Le}),G&&/* @__PURE__ */C("span",{id:$e,hidden:!0,children:be.select.changed}),Te&&/* @__PURE__ */C("span",{id:je,hidden:!0,children:be.settingView.auto}),!L&&/* @__PURE__ */C(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
19
|
+
/* @__PURE__ */S("select",{ref:ee,value:l,multiple:P||void 0,onChange:e=>Ce(P?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:W,"aria-hidden":"true",tabIndex:-1,className:"sr-only",..._,children:[void 0!==I&&!P&&/* @__PURE__ */C("option",{value:"",disabled:!0,children:I}),
|
|
20
|
+
/* @__PURE__ */C(R,{items:w})]}),te&&E(qe,document.body)]})}),V=w(function({touchSize:e="touch",...t},r){const n=u();return!n||void 0===t.footer&&void 0===t.changed||t.readOnly?n&&!t.readOnly?/* @__PURE__ */C(I,{ref:r,...t,size:e}):/* @__PURE__ */C(z,{ref:r,...t}):/* @__PURE__ */C(z,{ref:r,...t,size:e})});export{I as NativeSelect,V as Select_default};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-
|
|
2
|
-
return p(t,{open:!0,onClose:()=>
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-4GEAEYKA.js";import{navIcons as r}from"./chunk-TPDOOCFS.js";import{VERSION as s}from"./chunk-KV5VLPII.js";import{Icon as o}from"./chunk-VJPJNCB4.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-OVNRVFWS.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=i().aboutApp,b=g.title(n.name);if(e(b,N,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,V]=a(g.partOf);/* @__PURE__ */
|
|
2
|
+
return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:k}),
|
|
4
4
|
/* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:n.name}),
|
|
5
5
|
/* @__PURE__ */p("p",{className:"text-2xs font-mono text-gray-400",children:g.version(n.version)}),
|
|
6
6
|
/* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:g[o]}),
|
|
7
7
|
/* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
|
|
8
8
|
/* @__PURE__ */h("p",{className:"text-2xs text-gray-500",children:[j,
|
|
9
|
-
/* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),
|
|
9
|
+
/* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),V]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-gray-400",children:g.shellVersion(s)})]})]})})}export{w as AboutApp,f as BUILTIN_APP_INFO};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
2
|
-
return t("div",{id:
|
|
3
|
-
/* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:
|
|
4
|
-
/* @__PURE__ */s("div",{ref:
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-FDIJEOGV.js";import{IconButton_default as r}from"./chunk-JHDWTYZ4.js";import{Icon as a}from"./chunk-VJPJNCB4.js";import{Tooltip as i}from"./chunk-Z3WKHMVB.js";import{useShellStrings as n}from"./chunk-OVNRVFWS.js";import{useState as l,useRef as o}from"react";import{jsxs as t,jsx as s}from"react/jsx-runtime";var d={tl:"",tr:"rotate-90",br:"rotate-180",bl:"-rotate-90"},c=["tl","tr","bl","br"];function u({label:u,value:m,corners:f,onChange:p,radius:h=null,onRadiusChange:v,radiusLabel:b,radiusMin:k=0,radiusMax:g,radiusStep:x=1,radiusPlaceholder:w,disabled:y=!1,disabledReason:j,id:N,className:A=""}){const C=n(),D=function(e){const r=c.map(r=>e.find(e=>e.value===r));for(const a of e){if(c.includes(a.value))continue;const e=r.findIndex(e=>void 0===e);-1===e?r.push(a):r[e]=a}return r.filter(e=>void 0!==e)}(f),[K,M]=l(0),R=o(null);/* @__PURE__ */
|
|
2
|
+
return t("div",{id:N,role:"group","aria-label":u,className:`flex min-w-0 flex-wrap items-center gap-2 ${A}`.trim(),children:[v&&
|
|
3
|
+
/* @__PURE__ */s("div",{className:"w-30 shrink-0",children:/* @__PURE__ */s(e,{value:h,onChange:v,min:k,max:g,step:x,precision:0,placeholder:w,prefix:/* @__PURE__ */s("span",{"data-radius-mark":"","aria-hidden":"true",children:C.corners.radiusMark}),suffix:C.corners.unit,steppers:"compact",disabled:y,"aria-label":b??C.corners.radius})}),
|
|
4
|
+
/* @__PURE__ */s("div",{ref:R,"data-corners-grid":"",className:"grid shrink-0 grid-cols-2 gap-1",onKeyDown:e=>{if(e.altKey||e.ctrlKey||e.metaKey)return;const r=Array.from(R.current?.querySelectorAll("button[data-corner]")??[]),a=r.indexOf(document.activeElement);if(-1===a)return;const i=a%2,n=Math.floor(a/2),l="ArrowRight"===e.key?2*n+1:"ArrowLeft"===e.key?2*n:"ArrowDown"===e.key?2+i:"ArrowUp"===e.key?i:null;null!==l&&(e.preventDefault(),l<r.length&&r[l].focus())},children:D.map((e,n)=>{const l=m.includes(e.value),o=y||!0===e.disabled,t=o&&(!0===e.disabled&&e.title||(y?j:void 0))||void 0,c=/* @__PURE__ */s(r,{"aria-pressed":l,"aria-label":e.label,"aria-disabled":o||void 0,disabledReason:t,"data-corner":e.value,size:"sm",tabIndex:n===K?0:-1,onFocus:()=>M(n),onClick:()=>{o||p(l?m.filter(r=>r!==e.value):[...m,e.value])},children:/* @__PURE__ */s(a,{name:"corner",strokeWidth:2,className:["h-4 w-4",d[e.value]??""].filter(Boolean).join(" ")})},e.value);return t?c:/* @__PURE__ */s(i,{content:e.title??e.label,children:c},e.value)})})]})}export{u as CornersInput};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as A}from"react/jsx-runtime";function r({size:r=18,...L}){/* @__PURE__ */
|
|
2
|
+
return A("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",...L,children:/* @__PURE__ */A("path",{d:"M10.5 12A1.5 1.5 0 1 1 13.5 12A1.5 1.5 0 1 1 10.5 12ZM12.75 9L12.75 3.75A0.75 0.75 0 0 1 11.25 3.75L11.25 9A0.75 0.75 0 0 1 12.75 9ZM10.2803 6.5303L12.5303 4.2803A0.75 0.75 0 0 1 11.4697 3.2197L9.2197 5.4697A0.75 0.75 0 0 1 10.2803 6.5303ZM11.4697 4.2803L13.7197 6.5303A0.75 0.75 0 0 1 14.7803 5.4697L12.5303 3.2197A0.75 0.75 0 0 1 11.4697 4.2803ZM11.25 15L11.25 20.25A0.75 0.75 0 0 1 12.75 20.25L12.75 15A0.75 0.75 0 0 1 11.25 15ZM9.2197 18.5303L11.4697 20.7803A0.75 0.75 0 0 1 12.5303 19.7197L10.2803 17.4697A0.75 0.75 0 0 1 9.2197 18.5303ZM12.5303 20.7803L14.7803 18.5303A0.75 0.75 0 0 1 13.7197 17.4697L11.4697 19.7197A0.75 0.75 0 0 1 12.5303 20.7803Z"})})}export{r as NudgeYSolidIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{requestFilesTrashView as n}from"./chunk-
|
|
1
|
+
import{requestFilesTrashView as n}from"./chunk-O3WSAR62.js";var o=null;function r(n){o=n}function t(){return o}function u(){n()}export{t as getFilesDemoTree,u as openFilesInTrashMode,r as setFilesDemoTree};
|