@deslop/deploy 0.1.1413 → 0.1.1465
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/client/assets/(home)-BUkZA3Ko.js +64 -0
- package/dist/client/assets/{dropdown-menu-D-58iEXV.js → dropdown-menu-ROEPp4i3.js} +1 -1
- package/dist/client/assets/effect-CctX5eYK.js +17 -0
- package/dist/client/assets/index-XCoju4PZ.css +2 -0
- package/dist/client/assets/index-crHnIFMU.js +2 -0
- package/dist/client/assets/{machine-Nd3cs9fo.js → machine-DhN8aM5V.js} +2 -2
- package/dist/client/assets/{result-error-BsZBILG4.js → result-error-CZELhOVc.js} +1 -1
- package/dist/client/assets/route-BFKMg8pb.js +1 -0
- package/dist/client/index.html +4 -4
- package/package.json +2 -2
- package/dist/client/assets/(home)-CKfei4zA.js +0 -64
- package/dist/client/assets/effect-CnERd-9f.js +0 -17
- package/dist/client/assets/index-OKbHFgi5.js +0 -2
- package/dist/client/assets/index-ZUs2x4F-.css +0 -2
- package/dist/client/assets/route-CpsHrkxp.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{a as t,o as n,r}from"./react-CS2OHYTO.js";import{u as i}from"./index-OKbHFgi5.js";import{d as a,g as o,n as s,nt as c,r as l,st as u,t as d}from"./machine-Nd3cs9fo.js";import{$ as f,$a as p,Ia as m,La as h,Mr as g,Ni as _,Oa as v,P as y,Ur as b,Xa as x,Xi as ee,ba as S,et as C,jt as w,ka as T,pt as E,to as te,wa as ne,xa as D}from"./effect-CnERd-9f.js";import{$t as O,A as k,C as A,D as j,E as M,F as N,H as re,Kt as P,M as F,O as I,Rt as ie,S as L,V as R,Y as z,_ as B,_t as V,a as ae,b as oe,c as se,en as H,h as U,i as ce,j as W,k as G,ln as le,m as ue,mn as de,n as fe,o as pe,ot as me,p as he,r as ge,rt as _e,s as ve,t as ye,ut as be,v as xe,w as Se,x as Ce,y as we,z as Te,zt as Ee}from"./result-error-BsZBILG4.js";import{R as De,_ as Oe,a as ke,g as Ae,h as K,l as je,o as q,p as Me,r as J,t as Y}from"./dist-Cnz9vY_S.js";var X=e(n(),1),Ne=new Map([[`bold`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z`}))],[`duotone`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),X.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`fill`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`light`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z`}))],[`regular`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z`}))],[`thin`,X.createElement(X.Fragment,null,X.createElement(`path`,{d:`M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z`}))]]),Pe=X.forwardRef((e,t)=>X.createElement(De,{ref:t,...e,weights:Ne}));Pe.displayName=`XIcon`;var Fe=X.createContext(void 0);function Z(e){let t=X.useContext(Fe);if(!e&&t===void 0)throw Error(Me(27));return t}var Ie=X.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=Z(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`),d={open:c,transitionStatus:s.useState(`transitionStatus`)};return J(`div`,e,{state:d,ref:[s.context.backdropRef,t],stateAttributesMapping:Ee,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Le=X.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=Z(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=je({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,V(_e,e.nativeEvent))}return J(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Re=X.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Z(),c=we(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),J(`p`,e,{ref:t,props:[{id:c},o]})}),ze=X.createContext(void 0);function Be(){let e=X.useContext(ze);if(e===void 0)throw Error(Me(26));return e}var Ve=`--nested-dialogs`,He=`data-nested-dialog-open`,Ue={...ie,...P,nestedDialogOpen(e){return e?{[He]:``}:null}},Q=r(),We=X.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=Z(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),ee=d.useState(`floatingId`);Be(),N({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let S=o===void 0?M(c.context.popupRef):o,C=g>0,w=c.useStateSetter(`popupElement`),T=J(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:C},props:[f,{id:ee,"aria-labelledby":y,"aria-describedby":l,role:x,...A,hidden:!m,onKeyDown(e){he.has(e.key)&&e.stopPropagation()},style:{[Ve]:g}},s],ref:[t,c.context.popupRef,w],stateAttributesMapping:Ue});return(0,Q.jsx)(re,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:S,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:T})}),Ge=X.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=Z(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,Q.jsx)(ze.Provider,{value:n,children:(0,Q.jsxs)(z,{ref:t,...r,children:[a&&o===!0&&(0,Q.jsx)(U,{ref:i.context.internalBackdropRef,inert:B(!s)}),e.children]})}):null});function Ke({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=X.useState(0),[d,f]=X.useState(0),p=l===0,m=R(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=H(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||O(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return ue(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),K(()=>{!r&&!i&&(u(0),f(0))},[r,i]),K(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),k(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var qe={...Ce,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},Je=class extends Te{constructor(e,t,n){let r=new L,i=Ye(e,r,t,n);super(i,Xe(r),qe)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled||(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(j(this.state,e,t.trigger)))}};function Ye(e,t,n,r=!1){return{...oe(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Xe(e){return{popupRef:X.createRef(),backdropRef:X.createRef(),internalBackdropRef:X.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Ze(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=Z(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=W((e,t)=>new Je({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),ee=b.useState(`mounted`),S=b.useState(`payload`);F(b,x),I(b);let{forceUnmount:C}=G(x,b);X.useImperativeHandle(l,()=>({unmount:C,close:()=>b.setOpen(!1,V(me))}),[C,b]);let w=x||ee||u!=null;return(0,Q.jsxs)(Fe.Provider,{value:b,children:[u&&(0,Q.jsx)(Se,{handle:u,store:b}),w&&(0,Q.jsx)(Ke,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:S}):n]})}var Qe=de(function(e){return Ze(`dialog`,e)}),$e=X.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=Z(),c=we(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),J(`h2`,e,{ref:t,props:[{id:c},o]})}),$=t();function et(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Qe,{"data-slot":`dialog`,...n}),t[2]=n,t[3]=r),r}function tt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Ge,{"data-slot":`dialog-portal`,...n}),t[2]=n,t[3]=r),r}function nt(e){let t=(0,$.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Q.jsx)(Le,{"data-slot":`dialog-close`,...n}),t[2]=n,t[3]=r),r}function rt(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Y(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Ie,{"data-slot":`dialog-overlay`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function it(e){let t=(0,$.c)(15),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,children:n,showCloseButton:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=a===void 0||a,c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,Q.jsx)(rt,{}),t[5]=c):c=t[5];let l;t[6]===r?l=t[7]:(l=Y(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-none bg-popover p-4 text-xs/relaxed text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,r),t[6]=r,t[7]=l);let u;t[8]===s?u=t[9]:(u=s&&(0,Q.jsxs)(Le,{"data-slot":`dialog-close`,render:(0,Q.jsx)(o,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Q.jsx)(Pe,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[8]=s,t[9]=u);let d;return t[10]!==n||t[11]!==i||t[12]!==l||t[13]!==u?(d=(0,Q.jsxs)(tt,{children:[c,(0,Q.jsxs)(We,{"data-slot":`dialog-content`,className:l,...i,children:[n,u]})]}),t[10]=n,t[11]=i,t[12]=l,t[13]=u,t[14]=d):d=t[14],d}function at(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Y(`flex flex-col gap-1 text-left`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(`div`,{"data-slot":`dialog-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ot(e){let t=(0,$.c)(14),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:r,showCloseButton:a,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=a!==void 0&&a,c;t[5]===r?c=t[6]:(c=Y(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,r),t[5]=r,t[6]=c);let l;t[7]===s?l=t[8]:(l=s&&(0,Q.jsx)(Le,{render:(0,Q.jsx)(o,{variant:`outline`}),children:`Close`}),t[7]=s,t[8]=l);let u;return t[9]!==n||t[10]!==i||t[11]!==c||t[12]!==l?(u=(0,Q.jsxs)(`div`,{"data-slot":`dialog-footer`,className:c,...i,children:[n,l]}),t[9]=n,t[10]=i,t[11]=c,t[12]=l,t[13]=u):u=t[13],u}function st(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Y(`font-heading text-sm font-medium`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)($e,{"data-slot":`dialog-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ct(e){let t=(0,$.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=Y(`text-xs/relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(Re,{"data-slot":`dialog-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var lt=`data-valid`,ut=`data-invalid`,dt={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ft={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},pt={valid(e){return e===null?null:e?{[lt]:``}:{[ut]:``}}},mt={invalid:void 0,name:void 0,validityData:{state:dt,errors:[],error:``,value:``,initialValue:null},setValidityData:q,disabled:void 0,setTouched:q,setDirty:q,setFilled:q,setFocused:q,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:ft,registerFieldControl:q,validation:{getValidationProps:(e,t=ke)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:q,getInputControl:()=>null,commit:async()=>{},change:q}},ht=X.createContext(mt);function gt(e=!0){let t=X.useContext(ht);if(t.setValidityData===q&&!e)throw Error(Me(28));return t}var _t=X.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:q,validationMode:`onSubmit`,submitCountRef:{current:0}});function vt(){return X.useContext(_t)}var yt=X.createContext({controlId:void 0,registerControlId:q,resetControlId:q,labelId:void 0,setLabelId:q,messageIds:[],setMessageIds:q,getDescriptionProps:e=>e});function bt(){return X.useContext(yt)}function xt(e,t,n){let{setFocused:r,focusOwnerRef:i}=gt(),a=Ae(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return K(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function St(e,t,n,r,i=!0,a){let{registerFieldControl:o}=gt(),s=Oe(()=>Symbol());K(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),K(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function Ct(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=bt(),o=we(),s=Oe(()=>Symbol()),c=X.useRef(!1),l=X.useRef(!1),u=Ae(()=>{c.current&&i!==q&&(c.current=!1,i(s.current,void 0))});return K(()=>{if(!n||i===q){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),K(()=>u,[u]),(n?r:void 0)??t??o}var wt=X.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=gt(),{clearErrors:ee,elementRef:S,submitCountRef:C}=vt(),w=h||s,T=m??a,E={...p,disabled:w},{labelId:te}=bt(),ne=Ct({id:i}),D=o!==void 0,O=o==null?void 0:String(o),k=Ae(()=>x.inputRef.current?.value);St(x.inputRef,ne,O,k,!w,a),K(()=>{let e=O??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[O,l,x.inputRef,y]),xe(O,()=>{O!==void 0&&(ee(T),_(O!==(v.initialValue??``)),x.change(O))});let A=X.useRef(null),j=xt(w,A),M=le();return J(`input`,e,{ref:[t,A],state:E,props:[{id:ne,disabled:w,name:T,ref:x.inputRef,"aria-labelledby":te,autoFocus:u,...D?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=V(be,e.nativeEvent);c?.(t,n),D||(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(ee(T),x.change(t)))},onFocus(){j(!0)},onBlur(e){if(g(!0),j(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),D&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===S.current&&!e.defaultPrevented){let t=e.currentTarget,n=C.current;M.start(0,()=>{C.current===n&&x.commit(t.value)})}else x.commit(t)}}},f,e=>x.getValidationProps(w,e)],stateAttributesMapping:pt})}),Tt=X.forwardRef(function(e,t){return(0,Q.jsx)(wt,{ref:t,...e})});function Et(e){let t=(0,$.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=Y(`h-8 w-full min-w-0 rounded-none border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,Q.jsx)(Tt,{type:i,"data-slot":`input`,className:a,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}var Dt=E([`tailnet`,`public`]);function Ot(e){let t=(0,$.c)(66),[n,r]=c(d),[i,s]=(0,X.useState)(`tailnet`),[l,u]=(0,X.useState)(``),m;t[0]===e.items?m=t[1]:(m=v(te(e.items,_(At),ne(kt)),p(``)),t[0]=e.items,t[1]=m);let h=m,x;t[2]===n?x=t[3]:(x=f(n),t[2]=n,t[3]=x);let S=x,C;t[4]!==r||t[5]!==l||t[6]!==i||t[7]!==e.portNumber||t[8]!==h?(C=t=>{t.preventDefault(),r({hostname:y(i===`public`,{onFalse:()=>h,onTrue:()=>l}),kind:i,name:a.make(y(i===`public`,{onFalse:()=>`tailnet:${e.portNumber}`,onTrue:()=>`public:${l}`})),port:e.portNumber,publicAccess:i===`public`})},t[4]=r,t[5]=l,t[6]=i,t[7]=e.portNumber,t[8]=h,t[9]=C):C=t[9];let E;if(t[10]!==e.port.name||t[11]!==e.port.process){let n;t[13]===e.port.name?n=t[14]:(n=()=>e.port.name,t[13]=e.port.name,t[14]=n),E=v(e.port.process,n),t[10]=e.port.name,t[11]=e.port.process,t[12]=E}else E=t[12];let D;t[15]===E?D=t[16]:(D=(0,Q.jsx)(st,{children:E}),t[15]=E,t[16]=D);let O;t[17]===e.port.port?O=t[18]:(O=T(e.port.port),t[17]=e.port.port,t[18]=O);let k;t[19]===O?k=t[20]:(k=(0,Q.jsxs)(ct,{children:[`Port `,O]}),t[19]=O,t[20]=k);let A;t[21]!==D||t[22]!==k?(A=(0,Q.jsxs)(at,{children:[D,k]}),t[21]=D,t[22]=k,t[23]=A):A=t[23];let j;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(j=e=>{w(Dt)(e)&&s(e)},t[24]=j):j=t[24];let M;t[25]===S?M=t[26]:(M=ee(Dt.literals,e=>(0,Q.jsx)(se,{value:e,disabled:S,children:g(e)},e)),t[25]=S,t[26]=M);let N;t[27]===M?N=t[28]:(N=(0,Q.jsx)(ve,{className:`w-full`,children:M}),t[27]=M,t[28]=N);let re;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Q.jsx)(ce,{htmlFor:`expose-tailnet`,children:`Address`}),t[29]=re):re=t[29];let P;t[30]!==e.port.port||t[31]!==h?(P=y(h===``,{onFalse:()=>`https://${h}:${T(e.port.port)}`,onTrue:p(``)}),t[30]=e.port.port,t[31]=h,t[32]=P):P=t[32];let F;t[33]===P?F=t[34]:(F=(0,Q.jsx)(pe,{value:`tailnet`,children:(0,Q.jsxs)(fe,{children:[re,(0,Q.jsx)(Et,{id:`expose-tailnet`,readOnly:!0,value:P})]})}),t[33]=P,t[34]=F);let I;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Q.jsx)(ce,{htmlFor:`expose-public`,children:`Hostname`}),t[35]=I):I=t[35];let ie=i===`public`,L;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>u(b(e.target.value)),t[36]=L):L=t[36];let R;t[37]!==l||t[38]!==S||t[39]!==ie?(R=(0,Q.jsx)(pe,{value:`public`,children:(0,Q.jsxs)(fe,{children:[I,(0,Q.jsx)(Et,{id:`expose-public`,required:ie,placeholder:`app.example.com`,autoCapitalize:`none`,spellCheck:!1,value:l,disabled:S,onChange:L})]})}),t[37]=l,t[38]=S,t[39]=ie,t[40]=R):R=t[40];let z;t[41]!==i||t[42]!==N||t[43]!==F||t[44]!==R?(z=(0,Q.jsxs)(ae,{value:i,onValueChange:j,children:[N,F,R]}),t[41]=i,t[42]=N,t[43]=F,t[44]=R,t[45]=z):z=t[45];let B;t[46]===n?B=t[47]:(B=(0,Q.jsx)(ye,{result:n}),t[46]=n,t[47]=B);let V;t[48]===S?V=t[49]:(V=(0,Q.jsx)(nt,{render:(0,Q.jsx)(o,{variant:`outline`,type:`button`,disabled:S}),children:`Cancel`}),t[48]=S,t[49]=V);let oe=S||i===`tailnet`&&h===``||i===`public`&&l===``,H;t[50]===S?H=t[51]:(H=y(S,{onFalse:p(`Expose`),onTrue:p(`Exposing…`)}),t[50]=S,t[51]=H);let U;t[52]!==oe||t[53]!==H?(U=(0,Q.jsx)(o,{type:`submit`,disabled:oe,children:H}),t[52]=oe,t[53]=H,t[54]=U):U=t[54];let W;t[55]!==V||t[56]!==U?(W=(0,Q.jsxs)(ot,{children:[V,U]}),t[55]=V,t[56]=U,t[57]=W):W=t[57];let G;t[58]!==z||t[59]!==B||t[60]!==W||t[61]!==A?(G=(0,Q.jsxs)(ge,{children:[A,z,B,W]}),t[58]=z,t[59]=B,t[60]=W,t[61]=A,t[62]=G):G=t[62];let le;return t[63]!==C||t[64]!==G?(le=(0,Q.jsx)(`form`,{onSubmit:C,children:G}),t[63]=C,t[64]=G,t[65]=le):le=t[65],le}function kt(e){return e.hostname}function At(e){return D(e.self,!0)}function jt(){let e=(0,$.c)(2),[t,n]=c(s),r;return e[0]===n?r=e[1]:(r=e=>(0,Q.jsx)(et,{open:!0,onOpenChange:e=>{e||n(h())},children:(0,Q.jsx)(it,{showCloseButton:!1,children:m(e.port.port,{onNone:x,onSome:t=>(0,Q.jsx)(Ot,{items:e.snapshot.items,port:e.port,portNumber:t},e.port.id)})})}),e[0]=n,e[1]=r),m(S({port:t,snapshot:C(u(l))}),{onNone:x,onSome:r})}function Mt(){let e=(0,$.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(jt,{}),(0,Q.jsx)(i,{})]}),e[0]=t):t=e[0],t}export{Mt as component};
|