update packages

This commit is contained in:
Meghdad committed 2026-11-25 21:50:39 +03:30
1 parent 8d5446f466
commit 8cfce7b922
51 files changed
+1983 -1681

No files matched your search

@@ -1 +1 @@
function a({name:r,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{t(()=>{this.$nextTick(()=>{if(this.isLoading||e.component.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let i=this.getServerState();i===void 0||Alpine.raw(this.state)===i||(this.state=i)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||Alpine.raw(this.state)===e)return;this.isLoading=!0;let t=await this.$wire.updateTableColumnState(r,s,this.state);this.error=t?.error??void 0,!this.error&&this.$refs.serverState&&(this.$refs.serverState.value=this.state?"1":"0"),this.isLoading=!1})},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)},destroy(){this.unsubscribeLivewireHook?.()}}}export{a as default};
function h({name:s,recordKey:u,state:f,messages:r}){let l=e=>e.method==="updateTableColumnState"&&e.params[0]===s&&String(e.params[1])===String(u);return{error:void 0,isLoading:!1,isDestroyed:!1,isRefreshing:!1,hasRenderedState:!1,state:f,status:void 0,unsubscribeLivewireHook:null,unsubscribeRequestHook:null,initEditableColumn(){this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{if(e.component.id!==this.$wire.$id)return;let a=e.calls.some(l),i=this.isRefreshing;t(({payload:n,onMorphed:o})=>o(()=>{let d=n.effects,c=!!d.html||this.isRenderedByPartial(d.partials);(a||i)&&(this.hasRenderedState=c),i&&(this.isRefreshing=!1),c&&this.$nextTick(()=>{!this.isDestroyed&&!this.isLoading&&this.syncServerState()})}))}),this.$watch("state",async()=>{let e=this.getServerState();if(!(this.isDestroyed||this.isLoading||e===void 0||this.getNormalizedState()===e)){this.clearError(),this.isLoading=!0,this.hasRenderedState=!1,this.status=r?.saving,this.unsubscribeRequestHook=Livewire.interceptRequest(({request:t,onResponse:a})=>{t.payload.components.some(i=>JSON.parse(i.snapshot).memo.id===this.$wire.$id&&(this.isRefreshing||i.calls.some(l)))&&a(({response:i})=>{let n=i.text.bind(i);i.text=async()=>{try{return await n()}catch(o){throw t.cancel(),this.handleSaveFailure(),o}}})});try{let t=await this.$wire.updateTableColumnState(s,u,this.state);if(await this.$nextTick(),!this.isDestroyed&&!this.hasRenderedState&&(this.isRefreshing=!0,await this.$wire.$refresh(),await this.$nextTick(),!this.hasRenderedState)){this.handleSaveFailure();return}if(this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,this.isDestroyed)return;this.error=t?.error??void 0,this.status=this.error??r?.saved,this.isLoading=!1,this.syncServerState()}catch{this.handleSaveFailure()}}})},isRenderedByPartial(e){if(!e)return!1;let t=this.$el.closest("[wire\\:partial]");for(;t;){if(Object.hasOwn(e,t.getAttribute("wire:partial")))return!0;t=t.parentElement?.closest("[wire\\:partial]")}return!1},syncServerState(){let e=this.getServerState();e!==void 0&&(this.state=e)},getNormalizedState(){return Alpine.raw(this.state)??""},clearError(){this.isLoading||(this.error=void 0,this.status=void 0)},handleSaveFailure(){this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,!this.isDestroyed&&(this.error=r?.failure??"The save could not be confirmed. Refresh the page before trying again.",this.status=this.error,this.isRefreshing=!1,this.isLoading=!1)},preventEdit(e){!this.isLoading||e.type==="keydown"&&["Tab","Escape"].includes(e.key)||(e.preventDefault(),e.stopImmediatePropagation())},getAccessibilityAttributes(e={}){return{...e,"aria-invalid":this.error?"true":e["aria-invalid"]??null,"aria-busy":this.isLoading?"true":e["aria-busy"]??null,"aria-describedby":[e["aria-describedby"],this.error&&r?this.$id("table-column-error"):null].filter(Boolean).join(" ")||null}},destroy(){this.isDestroyed=!0,this.unsubscribeLivewireHook?.(),this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null}}}function b(s){return{...h(s),init(){this.initEditableColumn()},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)}}}export{b as default};
@@ -1,4 +1,4 @@
var Ht=Math.min,vt=Math.max,Wt=Math.round;var st=i=>({x:i,y:i}),Ji={left:"right",right:"left",bottom:"top",top:"bottom"};function Ce(i,t,e){return vt(i,Ht(t,e))}function Vt(i,t){return typeof i=="function"?i(t):i}function wt(i){return i.split("-")[0]}function zt(i){return i.split("-")[1]}function Le(i){return i==="x"?"y":"x"}function Ie(i){return i==="y"?"height":"width"}function ut(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function Te(i){return Le(ut(i))}function Ze(i,t,e){e===void 0&&(e=!1);let n=zt(i),o=Te(i),s=Ie(o),r=o==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Ft(r)),[r,Ft(r)]}function ti(i){let t=Ft(i);return[oe(i),t,oe(t)]}function oe(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var Je=["left","right"],Qe=["right","left"],Qi=["top","bottom"],Zi=["bottom","top"];function tn(i,t,e){switch(i){case"top":case"bottom":return e?t?Qe:Je:t?Je:Qe;case"left":case"right":return t?Qi:Zi;default:return[]}}function ei(i,t,e,n){let o=zt(i),s=tn(wt(i),e==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(oe)))),s}function Ft(i){let t=wt(i);return Ji[t]+i.slice(t.length)}function en(i){return{top:0,right:0,bottom:0,left:0,...i}}function ii(i){return typeof i!="number"?en(i):{top:i,right:i,bottom:i,left:i}}function Et(i){let{x:t,y:e,width:n,height:o}=i;return{width:n,height:o,top:e,left:t,right:t+n,bottom:e+o,x:t,y:e}}function ni(i,t,e){let{reference:n,floating:o}=i,s=ut(t),r=Te(t),a=Ie(r),l=wt(t),c=s==="y",h=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2,p;switch(l){case"top":p={x:h,y:n.y-o.height};break;case"bottom":p={x:h,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(zt(t)){case"start":p[r]-=f*(e&&c?-1:1);break;case"end":p[r]+=f*(e&&c?-1:1);break}return p}async function oi(i,t){var e;t===void 0&&(t={});let{x:n,y:o,platform:s,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Vt(t,i),g=ii(p),x=a[f?d==="floating"?"reference":"floating":d],D=Et(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(x)))==null||e?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),y=d==="floating"?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),O=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},P=Et(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:A,strategy:l}):y);return{top:(D.top-P.top+g.top)/O.y,bottom:(P.bottom-D.bottom+g.bottom)/O.y,left:(D.left-P.left+g.left)/O.x,right:(P.right-D.right+g.right)/O.x}}var nn=50,si=async(i,t,e)=>{let{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:oi},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:o}),{x:h,y:d}=ni(c,n,l),f=n,p=0,g={};for(let m=0;m<s.length;m++){let x=s[m];if(!x)continue;let{name:D,fn:y}=x,{x:A,y:O,data:P,reset:C}=await y({x:h,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:g,rects:c,platform:a,elements:{reference:i,floating:t}});h=A??h,d=O??d,g[D]={...g[D],...P},C&&p<nn&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:o}):C.rects),{x:h,y:d}=ni(c,f,l)),m=-1)}return{x:h,y:d,placement:f,strategy:o,middlewareData:g}};var ri=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...x}=Vt(i,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let D=wt(o),y=ut(a),A=wt(a)===a,O=await(l.isRTL==null?void 0:l.isRTL(c.floating)),P=f||(A||!m?[Ft(a)]:ti(a)),C=g!=="none";!f&&C&&P.push(...ei(a,m,g,O));let q=[a,...P],J=await l.detectOverflow(t,x),M=[],V=((n=s.flip)==null?void 0:n.overflows)||[];if(h&&M.push(J[D]),d){let T=Ze(o,r,O);M.push(J[T[0]],J[T[1]])}if(V=[...V,{placement:o,overflows:M}],!M.every(T=>T<=0)){var K,N;let T=(((K=s.flip)==null?void 0:K.index)||0)+1,ot=q[T];if(ot&&(!(d==="alignment"?y!==ut(ot):!1)||V.every(H=>ut(H.placement)===y?H.overflows[0]>0:!0)))return{data:{index:T,overflows:V},reset:{placement:ot}};let z=(N=V.filter(X=>X.overflows[0]<=0).sort((X,H)=>X.overflows[1]-H.overflows[1])[0])==null?void 0:N.placement;if(!z)switch(p){case"bestFit":{var k;let X=(k=V.filter(H=>{if(C){let tt=ut(H.placement);return tt===y||tt==="y"}return!0}).map(H=>[H.placeLine truncated
var $t=Math.min,vt=Math.max,Vt=Math.round;var ot=i=>({x:i,y:i}),on={left:"right",right:"left",bottom:"top",top:"bottom"};function Le(i,t,e){return vt(i,$t(t,e))}function Wt(i,t){return typeof i=="function"?i(t):i}function yt(i){return i.split("-")[0]}function zt(i){return i.split("-")[1]}function Re(i){return i==="x"?"y":"x"}function Te(i){return i==="y"?"height":"width"}function ft(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function Ie(i){return Re(ft(i))}function ei(i,t,e){e===void 0&&(e=!1);let n=zt(i),s=Ie(i),o=Te(s),r=s==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=Ht(r)),[r,Ht(r)]}function ii(i){let t=Ht(i);return[oe(i),t,oe(t)]}function oe(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var Ze=["left","right"],ti=["right","left"],rn=["top","bottom"],an=["bottom","top"];function ln(i,t,e){switch(i){case"top":case"bottom":return e?t?ti:Ze:t?Ze:ti;case"left":case"right":return t?rn:an;default:return[]}}function ni(i,t,e,n){let s=zt(i),o=ln(yt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(oe)))),o}function Ht(i){let t=yt(i);return on[t]+i.slice(t.length)}function cn(i){return{top:0,right:0,bottom:0,left:0,...i}}function si(i){return typeof i!="number"?cn(i):{top:i,right:i,bottom:i,left:i}}function Ot(i){let{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function oi(i,t,e){let{reference:n,floating:s}=i,o=ft(t),r=Ie(t),a=Te(r),l=yt(t),c=o==="y",h=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,p;switch(l){case"top":p={x:h,y:n.y-s.height};break;case"bottom":p={x:h,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:u};break;case"left":p={x:n.x-s.width,y:u};break;default:p={x:n.x,y:n.y}}switch(zt(t)){case"start":p[r]-=f*(e&&c?-1:1);break;case"end":p[r]+=f*(e&&c?-1:1);break}return p}async function ri(i,t){var e;t===void 0&&(t={});let{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=Wt(t,i),m=si(p),w=a[f?u==="floating"?"reference":"floating":u],x=Ot(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(w)))==null||e?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),S=u==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),D=await(o.isElement==null?void 0:o.isElement(A))?await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1}:{x:1,y:1},_=Ot(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:A,strategy:l}):S);return{top:(x.top-_.top+m.top)/D.y,bottom:(_.bottom-x.bottom+m.bottom)/D.y,left:(x.left-_.left+m.left)/D.x,right:(_.right-x.right+m.right)/D.x}}var hn=50,ai=async(i,t,e)=>{let{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ri},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:s}),{x:h,y:u}=oi(c,n,l),f=n,p=0,m={};for(let g=0;g<o.length;g++){let w=o[g];if(!w)continue;let{name:x,fn:S}=w,{x:A,y:D,data:_,reset:C}=await S({x:h,y:u,initialPlacement:n,placement:f,strategy:s,middlewareData:m,rects:c,platform:a,elements:{reference:i,floating:t}});h=A??h,u=D??u,m[x]={...m[x],..._},C&&p<hn&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:s}):C.rects),{x:h,y:u}=oi(c,f,l)),g=-1)}return{x:h,y:u,placement:f,strategy:s,middlewareData:m}};var li=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...w}=Wt(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let x=yt(s),S=ft(a),A=yt(a)===a,D=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=f||(A||!g?[Ht(a)]:ii(a)),C=m!=="none";!f&&C&&_.push(...ni(a,g,m,D));let V=[a,..._],J=await l.detectOverflow(t,w),I=[],W=((n=o.flip)==null?void 0:n.overflows)||[];if(h&&I.push(J[x]),u){let P=ei(s,r,D);I.push(J[P[0]],J[P[1]])}if(W=[...W,{placement:s,overflows:I}],!I.every(P=>P<=0)){var j,tt;let P=(((j=o.flip)==null?void 0:j.index)||0)+1,N=V[P];if(N&&(!(u==="alignment"?S!==ft(N):!1)||W.every(F=>ft(F.placement)===S?F.overflows[0]>0:!0)))return{data:{index:P,overflows:W},reset:{placement:N}};let L=(tt=W.filter(q=>q.overflows[0]<=0).sort((q,F)=>q.overflows[1]-F.overflows[1])[0])==null?void 0:tt.placement;if(!L)switch(p){case"bestFit":{var z;let q=(z=W.filter(F=>{if(C){let et=ft(F.placement);return et===S||et==="y"}return!0}).map(F=>[F.placemLine truncated
/*! Bundled license information:
sortablejs/modular/sortable.esm.js:
@@ -1 +1 @@
function a({name:i,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{t(()=>{this.$nextTick(()=>{if(this.isLoading||e.component.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let r=this.getServerState();r===void 0||this.getNormalizedState()===r||(this.state=r)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||this.getNormalizedState()===e)return;this.isLoading=!0;let t=await this.$wire.updateTableColumnState(i,s,this.state);this.error=t?.error??void 0,!this.error&&this.$refs.serverState&&(this.$refs.serverState.value=this.getNormalizedState()),this.isLoading=!1})},getServerState(){if(this.$refs.serverState)return[null,void 0].includes(this.$refs.serverState.value)?"":this.$refs.serverState.value.replaceAll('\\"','"')},getNormalizedState(){let e=Alpine.raw(this.state);return[null,void 0].includes(e)?"":e},destroy(){this.unsubscribeLivewireHook?.()}}}export{a as default};
function u({name:s,recordKey:h,state:c,messages:r}){let l=e=>e.method==="updateTableColumnState"&&e.params[0]===s&&String(e.params[1])===String(h);return{error:void 0,isLoading:!1,isDestroyed:!1,isRefreshing:!1,hasRenderedState:!1,state:c,status:void 0,unsubscribeLivewireHook:null,unsubscribeRequestHook:null,initEditableColumn(){this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{if(e.component.id!==this.$wire.$id)return;let a=e.calls.some(l),i=this.isRefreshing;t(({payload:n,onMorphed:o})=>o(()=>{let d=n.effects,f=!!d.html||this.isRenderedByPartial(d.partials);(a||i)&&(this.hasRenderedState=f),i&&(this.isRefreshing=!1),f&&this.$nextTick(()=>{!this.isDestroyed&&!this.isLoading&&this.syncServerState()})}))}),this.$watch("state",async()=>{let e=this.getServerState();if(!(this.isDestroyed||this.isLoading||e===void 0||this.getNormalizedState()===e)){this.clearError(),this.isLoading=!0,this.hasRenderedState=!1,this.status=r?.saving,this.unsubscribeRequestHook=Livewire.interceptRequest(({request:t,onResponse:a})=>{t.payload.components.some(i=>JSON.parse(i.snapshot).memo.id===this.$wire.$id&&(this.isRefreshing||i.calls.some(l)))&&a(({response:i})=>{let n=i.text.bind(i);i.text=async()=>{try{return await n()}catch(o){throw t.cancel(),this.handleSaveFailure(),o}}})});try{let t=await this.$wire.updateTableColumnState(s,h,this.state);if(await this.$nextTick(),!this.isDestroyed&&!this.hasRenderedState&&(this.isRefreshing=!0,await this.$wire.$refresh(),await this.$nextTick(),!this.hasRenderedState)){this.handleSaveFailure();return}if(this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,this.isDestroyed)return;this.error=t?.error??void 0,this.status=this.error??r?.saved,this.isLoading=!1,this.syncServerState()}catch{this.handleSaveFailure()}}})},isRenderedByPartial(e){if(!e)return!1;let t=this.$el.closest("[wire\\:partial]");for(;t;){if(Object.hasOwn(e,t.getAttribute("wire:partial")))return!0;t=t.parentElement?.closest("[wire\\:partial]")}return!1},syncServerState(){let e=this.getServerState();e!==void 0&&(this.state=e)},getNormalizedState(){return Alpine.raw(this.state)??""},clearError(){this.isLoading||(this.error=void 0,this.status=void 0)},handleSaveFailure(){this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,!this.isDestroyed&&(this.error=r?.failure??"The save could not be confirmed. Refresh the page before trying again.",this.status=this.error,this.isRefreshing=!1,this.isLoading=!1)},preventEdit(e){!this.isLoading||e.type==="keydown"&&["Tab","Escape"].includes(e.key)||(e.preventDefault(),e.stopImmediatePropagation())},getAccessibilityAttributes(e={}){return{...e,"aria-invalid":this.error?"true":e["aria-invalid"]??null,"aria-busy":this.isLoading?"true":e["aria-busy"]??null,"aria-describedby":[e["aria-describedby"],this.error&&r?this.$id("table-column-error"):null].filter(Boolean).join(" ")||null}},destroy(){this.isDestroyed=!0,this.unsubscribeLivewireHook?.(),this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null}}}function b(s){return{...u(s),init(){this.initEditableColumn()},getServerState(){if(this.$refs.serverState)return[null,void 0].includes(this.$refs.serverState.value)?"":this.$refs.serverState.value.replaceAll('\\"','"')}}}export{b as default};
@@ -1 +1 @@
function a({name:r,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{t(()=>{this.$nextTick(()=>{if(this.isLoading||e.component.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let i=this.getServerState();i===void 0||Alpine.raw(this.state)===i||(this.state=i)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||Alpine.raw(this.state)===e)return;this.isLoading=!0;let t=await this.$wire.updateTableColumnState(r,s,this.state);this.error=t?.error??void 0,!this.error&&this.$refs.serverState&&(this.$refs.serverState.value=this.state?"1":"0"),this.isLoading=!1})},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)},destroy(){this.unsubscribeLivewireHook?.()}}}export{a as default};
function u({name:s,recordKey:r,state:c,messages:a}){let l=e=>e.method==="updateTableColumnState"&&e.params[0]===s&&String(e.params[1])===String(r);return{error:void 0,isLoading:!1,isDestroyed:!1,isRefreshing:!1,hasRenderedState:!1,state:c,status:void 0,unsubscribeLivewireHook:null,unsubscribeRequestHook:null,initEditableColumn(){this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{if(e.component.id!==this.$wire.$id)return;let n=e.calls.some(l),i=this.isRefreshing;t(({payload:o,onMorphed:h})=>h(()=>{let d=o.effects,f=!!d.html||this.isRenderedByPartial(d.partials);(n||i)&&(this.hasRenderedState=f),i&&(this.isRefreshing=!1),f&&this.$nextTick(()=>{!this.isDestroyed&&!this.isLoading&&this.syncServerState()})}))}),this.$watch("state",async()=>{let e=this.getServerState();if(!(this.isDestroyed||this.isLoading||e===void 0||this.getNormalizedState()===e)){this.clearError(),this.isLoading=!0,this.hasRenderedState=!1,this.status=a?.saving,this.unsubscribeRequestHook=Livewire.interceptRequest(({request:t,onResponse:n})=>{t.payload.components.some(i=>JSON.parse(i.snapshot).memo.id===this.$wire.$id&&(this.isRefreshing||i.calls.some(l)))&&n(({response:i})=>{let o=i.text.bind(i);i.text=async()=>{try{return await o()}catch(h){throw t.cancel(),this.handleSaveFailure(),h}}})});try{let t=await this.$wire.updateTableColumnState(s,r,this.state);if(await this.$nextTick(),!this.isDestroyed&&!this.hasRenderedState&&(this.isRefreshing=!0,await this.$wire.$refresh(),await this.$nextTick(),!this.hasRenderedState)){this.handleSaveFailure();return}if(this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,this.isDestroyed)return;this.error=t?.error??void 0,this.status=this.error??a?.saved,this.isLoading=!1,this.syncServerState()}catch{this.handleSaveFailure()}}})},isRenderedByPartial(e){if(!e)return!1;let t=this.$el.closest("[wire\\:partial]");for(;t;){if(Object.hasOwn(e,t.getAttribute("wire:partial")))return!0;t=t.parentElement?.closest("[wire\\:partial]")}return!1},syncServerState(){let e=this.getServerState();e!==void 0&&(this.state=e)},getNormalizedState(){return Alpine.raw(this.state)??""},clearError(){this.isLoading||(this.error=void 0,this.status=void 0)},handleSaveFailure(){this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null,!this.isDestroyed&&(this.error=a?.failure??"The save could not be confirmed. Refresh the page before trying again.",this.status=this.error,this.isRefreshing=!1,this.isLoading=!1)},preventEdit(e){!this.isLoading||e.type==="keydown"&&["Tab","Escape"].includes(e.key)||(e.preventDefault(),e.stopImmediatePropagation())},getAccessibilityAttributes(e={}){return{...e,"aria-invalid":this.error?"true":e["aria-invalid"]??null,"aria-busy":this.isLoading?"true":e["aria-busy"]??null,"aria-describedby":[e["aria-describedby"],this.error&&a?this.$id("table-column-error"):null].filter(Boolean).join(" ")||null}},destroy(){this.isDestroyed=!0,this.unsubscribeLivewireHook?.(),this.unsubscribeRequestHook?.(),this.unsubscribeRequestHook=null}}}function b(s){return{...u(s),init(){this.initEditableColumn()},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)},toggleState(r){r.hasAttribute("disabled")||(this.clearError(),this.state=!this.state)}}}export{b as default};
+1 -1
View File
@@ -1 +1 @@
(()=>{var N=Math.min,k=Math.max,H=Math.round,_=Math.floor,O=e=>({x:e,y:e});function Z(e,t,o){return k(e,N(t,o))}function j(e,t){return typeof e=="function"?e(t):e}function Y(e){return e.split("-")[0]}function ee(e){return e.split("-")[1]}function te(e){return e==="x"?"y":"x"}function re(e){return e==="y"?"height":"width"}function z(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function le(e){return te(z(e))}function Fe(e){return{top:0,right:0,bottom:0,left:0,...e}}function ce(e){return typeof e!="number"?Fe(e):{top:e,right:e,bottom:e,left:e}}function P(e){let{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function ae(e,t,o){let{reference:n,floating:r}=e,l=z(t),i=le(t),s=re(i),c=Y(t),a=l==="y",d=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2,h=n[s]/2-r[s]/2,f;switch(c){case"top":f={x:d,y:n.y-r.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:u};break;case"left":f={x:n.x-r.width,y:u};break;default:f={x:n.x,y:n.y}}switch(ee(t)){case"start":f[i]-=h*(o&&a?-1:1);break;case"end":f[i]+=h*(o&&a?-1:1);break}return f}async function fe(e,t){var o;t===void 0&&(t={});let{x:n,y:r,platform:l,rects:i,elements:s,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:f=0}=j(t,e),m=ce(f),w=s[h?u==="floating"?"reference":"floating":u],g=P(await l.getClippingRect({element:(o=await(l.isElement==null?void 0:l.isElement(w)))==null||o?w:w.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(s.floating)),boundary:a,rootBoundary:d,strategy:c})),x=u==="floating"?{x:n,y:r,width:i.floating.width,height:i.floating.height}:i.reference,y=await(l.getOffsetParent==null?void 0:l.getOffsetParent(s.floating)),b=await(l.isElement==null?void 0:l.isElement(y))?await(l.getScale==null?void 0:l.getScale(y))||{x:1,y:1}:{x:1,y:1},L=P(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:y,strategy:c}):x);return{top:(g.top-L.top+m.top)/b.y,bottom:(L.bottom-g.bottom+m.bottom)/b.y,left:(g.left-L.left+m.left)/b.x,right:(L.right-g.right+m.right)/b.x}}var Me=50,de=async(e,t,o)=>{let{placement:n="bottom",strategy:r="absolute",middleware:l=[],platform:i}=o,s=i.detectOverflow?i:{...i,detectOverflow:fe},c=await(i.isRTL==null?void 0:i.isRTL(t)),a=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=ae(a,n,c),h=n,f=0,m={};for(let p=0;p<l.length;p++){let w=l[p];if(!w)continue;let{name:g,fn:x}=w,{x:y,y:b,data:L,reset:S}=await x({x:d,y:u,initialPlacement:n,placement:h,strategy:r,middlewareData:m,rects:a,platform:s,elements:{reference:e,floating:t}});d=y??d,u=b??u,m[g]={...m[g],...L},S&&f<Me&&(f++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(a=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:d,y:u}=ae(a,h,c)),p=-1)}return{x:d,y:u,placement:h,strategy:r,middlewareData:m}};var $e=new Set(["left","top"]);async function Ne(e,t){let{placement:o,platform:n,elements:r}=e,l=await(n.isRTL==null?void 0:n.isRTL(r.floating)),i=Y(o),s=ee(o),c=z(o)==="y",a=$e.has(i)?-1:1,d=l&&c?-1:1,u=j(t,e),{mainAxis:h,crossAxis:f,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof m=="number"&&(f=s==="end"?m*-1:m),c?{x:f*d,y:h*a}:{x:h*a,y:f*d}}var ue=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;let{x:r,y:l,placement:i,middlewareData:s}=t,c=await Ne(t,e);return i===((o=s.offset)==null?void 0:o.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:r+c.x,y:l+c.y,data:{...c,placement:i}}}}},he=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:n,placement:r,platform:l}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:g=>{let{x,y}=g;return{x,y}}},...a}=j(e,t),d={x:o,y:n},u=await l.detectOverflow(t,a),h=z(Y(r)),f=te(h),m=d[f],p=d[h];if(i){let g=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=m+u[g],b=m-u[x];m=Z(y,m,b)}if(s){let g=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=p+u[g],b=p-u[x];p=Z(y,p,b)}let w=c.fn({...t,[f]:m,[h]:p});return{...w,data:{x:w.x-o,y:w.y-n,enabled:{[f]:i,[h]:s}}}}}};function G(){return typeof window<"u"}function F(e){return ge(e)?(e.nodeName||"").toLowerCase():"#document"}function v(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function A(e){var t;return(t=(ge(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ge(e){return G()?e instanceof Node||e instanceof v(e).Node:!1}function R(e){return G()?e instanceof Element||e instanceof v(e).Element:!1}function T(e){return G()?e instanceof HTMLElement||e instanceof v(e).HTMLElement:!1}function me(e){return!G()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof v(e).ShadowRoot}function B(e){let{overflow:t,overfLine truncated
(()=>{var V=Math.min,F=Math.max,N=Math.round,I=Math.floor,A=e=>({x:e,y:e});function Z(e,n,i){return F(e,V(n,i))}function U(e,n){return typeof e=="function"?e(n):e}function j(e){return e.split("-")[0]}function ee(e){return e.split("-")[1]}function te(e){return e==="x"?"y":"x"}function le(e){return e==="y"?"height":"width"}function z(e){let n=e[0];return n==="t"||n==="b"?"y":"x"}function ce(e){return te(z(e))}function He(e){return{top:0,right:0,bottom:0,left:0,...e}}function ae(e){return typeof e!="number"?He(e):{top:e,right:e,bottom:e,left:e}}function k(e){let{x:n,y:i,width:o,height:s}=e;return{width:o,height:s,top:i,left:n,right:n+o,bottom:i+s,x:n,y:i}}function de(e,n,i){let{reference:o,floating:s}=e,c=z(n),l=ce(n),t=le(l),r=j(n),a=c==="y",u=o.x+o.width/2-s.width/2,f=o.y+o.height/2-s.height/2,h=o[t]/2-s[t]/2,d;switch(r){case"top":d={x:u,y:o.y-s.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:f};break;case"left":d={x:o.x-s.width,y:f};break;default:d={x:o.x,y:o.y}}switch(ee(n)){case"start":d[l]-=h*(i&&a?-1:1);break;case"end":d[l]+=h*(i&&a?-1:1);break}return d}async function fe(e,n){var i;n===void 0&&(n={});let{x:o,y:s,platform:c,rects:l,elements:t,strategy:r}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:d=0}=U(n,e),m=ae(d),w=t[h?f==="floating"?"reference":"floating":f],g=k(await c.getClippingRect({element:(i=await(c.isElement==null?void 0:c.isElement(w)))==null||i?w:w.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(t.floating)),boundary:a,rootBoundary:u,strategy:r})),b=f==="floating"?{x:o,y:s,width:l.floating.width,height:l.floating.height}:l.reference,R=await(c.getOffsetParent==null?void 0:c.getOffsetParent(t.floating)),y=await(c.isElement==null?void 0:c.isElement(R))?await(c.getScale==null?void 0:c.getScale(R))||{x:1,y:1}:{x:1,y:1},L=k(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:t,rect:b,offsetParent:R,strategy:r}):b);return{top:(g.top-L.top+m.top)/y.y,bottom:(L.bottom-g.bottom+m.bottom)/y.y,left:(g.left-L.left+m.left)/y.x,right:(L.right-g.right+m.right)/y.x}}var We=50,ue=async(e,n,i)=>{let{placement:o="bottom",strategy:s="absolute",middleware:c=[],platform:l}=i,t=l.detectOverflow?l:{...l,detectOverflow:fe},r=await(l.isRTL==null?void 0:l.isRTL(n)),a=await l.getElementRects({reference:e,floating:n,strategy:s}),{x:u,y:f}=de(a,o,r),h=o,d=0,m={};for(let p=0;p<c.length;p++){let w=c[p];if(!w)continue;let{name:g,fn:b}=w,{x:R,y,data:L,reset:S}=await b({x:u,y:f,initialPlacement:o,placement:h,strategy:s,middlewareData:m,rects:a,platform:t,elements:{reference:e,floating:n}});u=R??u,f=y??f,m[g]={...m[g],...L},S&&d<We&&(d++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(a=S.rects===!0?await l.getElementRects({reference:e,floating:n,strategy:s}):S.rects),{x:u,y:f}=de(a,h,r)),p=-1)}return{x:u,y:f,placement:h,strategy:s,middlewareData:m}};var Be=new Set(["left","top"]);async function Ne(e,n){let{placement:i,platform:o,elements:s}=e,c=await(o.isRTL==null?void 0:o.isRTL(s.floating)),l=j(i),t=ee(i),r=z(i)==="y",a=Be.has(l)?-1:1,u=c&&r?-1:1,f=U(n,e),{mainAxis:h,crossAxis:d,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return t&&typeof m=="number"&&(d=t==="end"?m*-1:m),r?{x:d*u,y:h*a}:{x:h*a,y:d*u}}var he=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var i,o;let{x:s,y:c,placement:l,middlewareData:t}=n,r=await Ne(n,e);return l===((i=t.offset)==null?void 0:i.placement)&&(o=t.arrow)!=null&&o.alignmentOffset?{}:{x:s+r.x,y:c+r.y,data:{...r,placement:l}}}}},me=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){let{x:i,y:o,placement:s,platform:c}=n,{mainAxis:l=!0,crossAxis:t=!1,limiter:r={fn:g=>{let{x:b,y:R}=g;return{x:b,y:R}}},...a}=U(e,n),u={x:i,y:o},f=await c.detectOverflow(n,a),h=z(j(s)),d=te(h),m=u[d],p=u[h];if(l){let g=d==="y"?"top":"left",b=d==="y"?"bottom":"right",R=m+f[g],y=m-f[b];m=Z(R,m,y)}if(t){let g=h==="y"?"top":"left",b=h==="y"?"bottom":"right",R=p+f[g],y=p-f[b];p=Z(R,p,y)}let w=r.fn({...n,[d]:m,[h]:p});return{...w,data:{x:w.x-i,y:w.y-o,enabled:{[d]:l,[h]:t}}}}}};function K(){return typeof window<"u"}function D(e){return pe(e)?(e.nodeName||"").toLowerCase():"#document"}function x(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function O(e){var n;return(n=(pe(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function pe(e){return K()?e instanceof Node||e instanceof x(e).Node:!1}function v(e){return K()?e instanceof Element||e instanceof x(e).Element:!1}function T(e){return K()?e instanceof HTMLElement||e instanceof x(e).HTMLElement:!1}function ge(e){return!K()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof x(e).ShadowRoot}function W(e){let{overflow:nLine truncated