diff --git a/app/assets/bundle/trestle/admin.js b/app/assets/bundle/trestle/admin.js index 1a710cf3..4bb7331e 100644 --- a/app/assets/bundle/trestle/admin.js +++ b/app/assets/bundle/trestle/admin.js @@ -26,7 +26,7 @@ Copyright © 2024 37signals LLC —— Suppress this warning by adding a "data-turbo-suppress-warning" attribute to: %s - `,e.outerHTML);e=e.parentElement}})(),window.Turbo={...hn,StreamActions:yn},nn(),e.FetchEnctype=fe,e.FetchMethod=le,e.FetchRequest=de,e.FetchResponse=re,e.FrameElement=o,e.FrameLoadingStyle=i,e.FrameRenderer=Ke,e.PageRenderer=zt,e.PageSnapshot=ut,e.StreamActions=yn,e.StreamElement=bn,e.StreamSourceElement=wn,e.cache=en,e.clearCache=ln,e.config=z,e.connectStreamSource=sn,e.disconnectStreamSource=an,e.fetch=ae,e.fetchEnctypeFromString=ue,e.fetchMethodFromString=ce,e.isSafe=he,e.navigator=tn,e.registerAdapter=rn,e.renderStreamMessage=cn,e.session=Jt,e.setConfirmMethod=fn,e.setFormMode=dn,e.setProgressBarDelay=un,e.start=nn,e.visit=on,Object.defineProperty(e,"__esModule",{value:!0})}(t)},548:function(e,t){"use strict";function n(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function r(e){return e instanceof n(e).Element||e instanceof Element}function i(e){return e instanceof n(e).HTMLElement||e instanceof HTMLElement}function o(e){return"undefined"!=typeof ShadowRoot&&(e instanceof n(e).ShadowRoot||e instanceof ShadowRoot)}Object.defineProperty(t,"__esModule",{value:!0});var s=Math.max,a=Math.min,c=Math.round;function l(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function u(){return!/^((?!chrome|android).)*safari/i.test(l())}function f(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1);var s=e.getBoundingClientRect(),a=1,l=1;t&&i(e)&&(a=e.offsetWidth>0&&c(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&c(s.height)/e.offsetHeight||1);var f=(r(e)?n(e):window).visualViewport,d=!u()&&o,h=(s.left+(d&&f?f.offsetLeft:0))/a,p=(s.top+(d&&f?f.offsetTop:0))/l,m=s.width/a,g=s.height/l;return{width:m,height:g,top:p,right:h+m,bottom:p+g,left:h,x:h,y:p}}function d(e){var t=n(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function h(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function m(e){return f(p(e)).left+d(e).scrollLeft}function g(e){return n(e).getComputedStyle(e)}function v(e){var t=g(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function y(e,t,r){void 0===r&&(r=!1);var o,s=i(t),a=i(t)&&function(e){var t=e.getBoundingClientRect(),n=c(t.width)/e.offsetWidth||1,r=c(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=p(t),u=f(e,a,r),g={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(s||!s&&!r)&&(("body"!==h(t)||v(l))&&(g=(o=t)!==n(o)&&i(o)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(o):d(o)),i(t)?((y=f(t,!0)).x+=t.clientLeft,y.y+=t.clientTop):l&&(y.x=m(l))),{x:u.left+g.scrollLeft-y.x,y:u.top+g.scrollTop-y.y,width:u.width,height:u.height}}function b(e){var t=f(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function w(e){return"html"===h(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||p(e)}function _(e){return["html","body","#document"].indexOf(h(e))>=0?e.ownerDocument.body:i(e)&&v(e)?e:_(w(e))}function S(e,t){var r;void 0===t&&(t=[]);var i=_(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=n(i),a=o?[s].concat(s.visualViewport||[],v(i)?i:[]):i,c=t.concat(a);return o?c:c.concat(S(w(a)))}function O(e){return["table","td","th"].indexOf(h(e))>=0}function E(e){return i(e)&&"fixed"!==g(e).position?e.offsetParent:null}function x(e){for(var t=n(e),r=E(e);r&&O(r)&&"static"===g(r).position;)r=E(r);return r&&("html"===h(r)||"body"===h(r)&&"static"===g(r).position)?t:r||function(e){var t=/firefox/i.test(l());if(/Trident/i.test(l())&&i(e)&&"fixed"===g(e).position)return null;var n=w(e);for(o(n)&&(n=n.host);i(n)&&["html","body"].indexOf(h(n))<0;){var r=g(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var T="top",A="bottom",C="right",j="left",k="auto",P=[T,A,C,j],D="start",M="end",L="viewport",N="popper",R=P.reduce((function(e,t){return e.concat([t+"-"+D,t+"-"+M])}),[]),I=[].concat(P,[k]).reduce((function(e,t){return e.concat([t,t+"-"+D,t+"-"+M])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function $(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}function H(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function B(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function q(e,t,i){return t===L?B(function(e,t){var r=n(e),i=p(e),o=r.visualViewport,s=i.clientWidth,a=i.clientHeight,c=0,l=0;if(o){s=o.width,a=o.height;var f=u();(f||!f&&"fixed"===t)&&(c=o.offsetLeft,l=o.offsetTop)}return{width:s,height:a,x:c+m(e),y:l}}(e,i)):r(t)?function(e,t){var n=f(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,i):B(function(e){var t,n=p(e),r=d(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=s(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=s(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-r.scrollLeft+m(e),l=-r.scrollTop;return"rtl"===g(i||n).direction&&(c+=s(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:c,y:l}}(p(e)))}function z(e,t,n,o){var c="clippingParents"===t?function(e){var t=S(w(e)),n=["absolute","fixed"].indexOf(g(e).position)>=0&&i(e)?x(e):e;return r(n)?t.filter((function(e){return r(e)&&H(e,n)&&"body"!==h(e)})):[]}(e):[].concat(t),l=[].concat(c,[n]),u=l[0],f=l.reduce((function(t,n){var r=q(e,n,o);return t.top=s(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=s(r.left,t.left),t}),q(e,u,o));return f.width=f.right-f.left,f.height=f.bottom-f.top,f.x=f.left,f.y=f.top,f}function W(e){return e.split("-")[0]}function V(e){return e.split("-")[1]}function U(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?W(i):null,s=i?V(i):null,a=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(o){case T:t={x:a,y:n.y-r.height};break;case A:t={x:a,y:n.y+n.height};break;case C:t={x:n.x+n.width,y:c};break;case j:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var l=o?U(o):null;if(null!=l){var u="y"===l?"height":"width";switch(s){case D:t[l]=t[l]-(n[u]/2-r[u]/2);break;case M:t[l]=t[l]+(n[u]/2-r[u]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Z(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,s=n.strategy,a=void 0===s?e.strategy:s,c=n.boundary,l=void 0===c?"clippingParents":c,u=n.rootBoundary,d=void 0===u?L:u,h=n.elementContext,m=void 0===h?N:h,g=n.altBoundary,v=void 0!==g&&g,y=n.padding,b=void 0===y?0:y,w=Y("number"!=typeof b?b:G(b,P)),_=m===N?"reference":N,S=e.rects.popper,O=e.elements[v?_:m],E=z(r(O)?O:O.contextElement||p(e.elements.popper),l,d,a),x=f(e.elements.reference),j=K({reference:x,element:S,strategy:"absolute",placement:o}),k=B(Object.assign({},S,j)),D=m===N?k:x,M={top:E.top-D.top+w.top,bottom:D.bottom-E.bottom+w.bottom,left:E.left-D.left+w.left,right:D.right-E.right+w.right},R=e.modifiersData.offset;if(m===N&&R){var I=R[o];Object.keys(M).forEach((function(e){var t=[C,A].indexOf(e)>=0?1:-1,n=[T,A].indexOf(e)>=0?"y":"x";M[e]+=I[n]*t}))}return M}var X={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[j,C].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],c=a.x,l=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=s}},ce={left:"right",right:"left",bottom:"top",top:"bottom"};function le(e){return e.replace(/left|right|bottom|top/g,(function(e){return ce[e]}))}var ue={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return ue[e]}))}function de(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?I:c,u=V(r),f=u?a?R:R.filter((function(e){return V(e)===u})):P,d=f.filter((function(e){return l.indexOf(e)>=0}));0===d.length&&(d=f);var h=d.reduce((function(t,n){return t[n]=Z(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[W(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}var he={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,c=n.fallbackPlacements,l=n.padding,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=void 0===h||h,m=n.allowedAutoPlacements,g=t.options.placement,v=W(g),y=c||(v===g||!p?[le(g)]:function(e){if(W(e)===k)return[];var t=le(e);return[fe(e),t,fe(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(W(n)===k?de(t,{placement:n,boundary:u,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,_=t.rects.popper,S=new Map,O=!0,E=b[0],x=0;x=0,R=N?"width":"height",I=Z(t,{placement:P,boundary:u,rootBoundary:f,altBoundary:d,padding:l}),F=N?L?C:j:L?A:T;w[R]>_[R]&&(F=le(F));var $=le(F),H=[];if(o&&H.push(I[M]<=0),a&&H.push(I[F]<=0,I[$]<=0),H.every((function(e){return e}))){E=P,O=!1;break}S.set(P,H)}if(O)for(var B=function(e){var t=b.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},q=p?3:1;q>0;q--){if("break"===B(q))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function pe(e,t,n){return s(e,a(t,n))}var me={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,c=n.altAxis,l=void 0!==c&&c,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.padding,p=n.tether,m=void 0===p||p,g=n.tetherOffset,v=void 0===g?0:g,y=Z(t,{boundary:u,rootBoundary:f,padding:h,altBoundary:d}),w=W(t.placement),_=V(t.placement),S=!_,O=U(w),E="x"===O?"y":"x",k=t.modifiersData.popperOffsets,P=t.rects.reference,M=t.rects.popper,L="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,N="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(k){if(o){var F,$="y"===O?T:j,H="y"===O?A:C,B="y"===O?"height":"width",q=k[O],z=q+y[$],K=q-y[H],Y=m?-M[B]/2:0,G=_===D?P[B]:M[B],X=_===D?-M[B]:-P[B],Q=t.elements.arrow,J=m&&Q?b(Q):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[$],ne=ee[H],re=pe(0,P[B],J[B]),ie=S?P[B]/2-Y-re-te-N.mainAxis:G-re-te-N.mainAxis,oe=S?-P[B]/2+Y+re+ne+N.mainAxis:X+re+ne+N.mainAxis,se=t.elements.arrow&&x(t.elements.arrow),ae=se?"y"===O?se.clientTop||0:se.clientLeft||0:0,ce=null!=(F=null==R?void 0:R[O])?F:0,le=q+oe-ce,ue=pe(m?a(z,q+ie-ce-ae):z,q,m?s(K,le):K);k[O]=ue,I[O]=ue-q}if(l){var fe,de="x"===O?T:j,he="x"===O?A:C,me=k[E],ge="y"===E?"height":"width",ve=me+y[de],ye=me-y[he],be=-1!==[T,j].indexOf(w),we=null!=(fe=null==R?void 0:R[E])?fe:0,_e=be?ve:me-P[ge]-M[ge]-we+N.altAxis,Se=be?me+P[ge]+M[ge]-we-N.altAxis:ye,Oe=m&&be?function(e,t,n){var r=pe(e,t,n);return r>n?n:r}(_e,me,Se):pe(m?_e:ve,me,m?Se:ye);k[E]=Oe,I[E]=Oe-me}t.modifiersData[r]=I}},requiresIfExists:["offset"]};var ge={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=W(n.placement),c=U(a),l=[j,C].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,P))}(i.padding,n),f=b(o),d="y"===c?T:j,h="y"===c?A:C,p=n.rects.reference[l]+n.rects.reference[c]-s[c]-n.rects.popper[l],m=s[c]-n.rects.reference[c],g=x(o),v=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,y=p/2-m/2,w=u[d],_=v-f[l]-u[h],S=v/2-f[l]/2+y,O=pe(w,S,_),E=c;n.modifiersData[r]=((t={})[E]=O,t.centerOffset=O-S,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&H(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[T,C,A,j].some((function(t){return e[t]>=0}))}var be={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Z(t,{elementContext:"reference"}),a=Z(t,{altBoundary:!0}),c=ve(s,r),l=ve(a,i,o),u=ye(c),f=ye(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}},we=J({defaultModifiers:[te,ne,oe,se]}),_e=[te,ne,oe,se,ae,he,me,ge,be],Se=J({defaultModifiers:_e});t.applyStyles=se,t.arrow=ge,t.computeStyles=oe,t.createPopper=Se,t.createPopperLite=we,t.defaultModifiers=_e,t.detectOverflow=Z,t.eventListeners=te,t.flip=he,t.hide=be,t.offset=ae,t.popperGenerator=J,t.popperOffsets=ne,t.preventOverflow=me},9044:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return d}});var r=n(6927),i=n(2233);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function s(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:this.element,r=this.actionsList,i="".concat(e,"->").concat(this.identifier,"#").concat(t);r.includes(i)||r.push(i),n.dataset.action=r.join(" ")}},{key:"fetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.q)(e,t)}},{key:"fetchTurboStream",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.h)(e,t)}},{key:"csrfToken",get:function(){return document.querySelector("[name='csrf-token']").content}},{key:"actionsList",get:function(){return element.dataset.action?element.dataset.action.split(" "):[]}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(r.Controller)},8111:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n=500){e.preventDefault();var n="".concat(t.status," (").concat(t.statusText,")");t.text().then((function(e){return i.A.show({title:n,content:e})}))}}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(r.default)},4761:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return d}});var r=n(9044);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){for(var n=0;n0&&c(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&c(s.height)/e.offsetHeight||1);var f=(r(e)?n(e):window).visualViewport,d=!u()&&o,h=(s.left+(d&&f?f.offsetLeft:0))/a,p=(s.top+(d&&f?f.offsetTop:0))/l,m=s.width/a,g=s.height/l;return{width:m,height:g,top:p,right:h+m,bottom:p+g,left:h,x:h,y:p}}function d(e){var t=n(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function h(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((r(e)?e.ownerDocument:e.document)||window.document).documentElement}function m(e){return f(p(e)).left+d(e).scrollLeft}function g(e){return n(e).getComputedStyle(e)}function v(e){var t=g(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function y(e,t,r){void 0===r&&(r=!1);var o,s=i(t),a=i(t)&&function(e){var t=e.getBoundingClientRect(),n=c(t.width)/e.offsetWidth||1,r=c(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=p(t),u=f(e,a,r),g={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(s||!s&&!r)&&(("body"!==h(t)||v(l))&&(g=(o=t)!==n(o)&&i(o)?function(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}(o):d(o)),i(t)?((y=f(t,!0)).x+=t.clientLeft,y.y+=t.clientTop):l&&(y.x=m(l))),{x:u.left+g.scrollLeft-y.x,y:u.top+g.scrollTop-y.y,width:u.width,height:u.height}}function b(e){var t=f(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function w(e){return"html"===h(e)?e:e.assignedSlot||e.parentNode||(o(e)?e.host:null)||p(e)}function _(e){return["html","body","#document"].indexOf(h(e))>=0?e.ownerDocument.body:i(e)&&v(e)?e:_(w(e))}function S(e,t){var r;void 0===t&&(t=[]);var i=_(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),s=n(i),a=o?[s].concat(s.visualViewport||[],v(i)?i:[]):i,c=t.concat(a);return o?c:c.concat(S(w(a)))}function O(e){return["table","td","th"].indexOf(h(e))>=0}function E(e){return i(e)&&"fixed"!==g(e).position?e.offsetParent:null}function x(e){for(var t=n(e),r=E(e);r&&O(r)&&"static"===g(r).position;)r=E(r);return r&&("html"===h(r)||"body"===h(r)&&"static"===g(r).position)?t:r||function(e){var t=/firefox/i.test(l());if(/Trident/i.test(l())&&i(e)&&"fixed"===g(e).position)return null;var n=w(e);for(o(n)&&(n=n.host);i(n)&&["html","body"].indexOf(h(n))<0;){var r=g(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var T="top",A="bottom",C="right",j="left",k="auto",P=[T,A,C,j],D="start",M="end",L="viewport",N="popper",R=P.reduce((function(e,t){return e.concat([t+"-"+D,t+"-"+M])}),[]),I=[].concat(P,[k]).reduce((function(e,t){return e.concat([t,t+"-"+D,t+"-"+M])}),[]),F=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function $(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}function H(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function B(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function q(e,t,i){return t===L?B(function(e,t){var r=n(e),i=p(e),o=r.visualViewport,s=i.clientWidth,a=i.clientHeight,c=0,l=0;if(o){s=o.width,a=o.height;var f=u();(f||!f&&"fixed"===t)&&(c=o.offsetLeft,l=o.offsetTop)}return{width:s,height:a,x:c+m(e),y:l}}(e,i)):r(t)?function(e,t){var n=f(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,i):B(function(e){var t,n=p(e),r=d(e),i=null==(t=e.ownerDocument)?void 0:t.body,o=s(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=s(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-r.scrollLeft+m(e),l=-r.scrollTop;return"rtl"===g(i||n).direction&&(c+=s(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:c,y:l}}(p(e)))}function z(e,t,n,o){var c="clippingParents"===t?function(e){var t=S(w(e)),n=["absolute","fixed"].indexOf(g(e).position)>=0&&i(e)?x(e):e;return r(n)?t.filter((function(e){return r(e)&&H(e,n)&&"body"!==h(e)})):[]}(e):[].concat(t),l=[].concat(c,[n]),u=l[0],f=l.reduce((function(t,n){var r=q(e,n,o);return t.top=s(r.top,t.top),t.right=a(r.right,t.right),t.bottom=a(r.bottom,t.bottom),t.left=s(r.left,t.left),t}),q(e,u,o));return f.width=f.right-f.left,f.height=f.bottom-f.top,f.x=f.left,f.y=f.top,f}function W(e){return e.split("-")[0]}function V(e){return e.split("-")[1]}function U(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function K(e){var t,n=e.reference,r=e.element,i=e.placement,o=i?W(i):null,s=i?V(i):null,a=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(o){case T:t={x:a,y:n.y-r.height};break;case A:t={x:a,y:n.y+n.height};break;case C:t={x:n.x+n.width,y:c};break;case j:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var l=o?U(o):null;if(null!=l){var u="y"===l?"height":"width";switch(s){case D:t[l]=t[l]-(n[u]/2-r[u]/2);break;case M:t[l]=t[l]+(n[u]/2-r[u]/2)}}return t}function Y(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function G(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Z(e,t){void 0===t&&(t={});var n=t,i=n.placement,o=void 0===i?e.placement:i,s=n.strategy,a=void 0===s?e.strategy:s,c=n.boundary,l=void 0===c?"clippingParents":c,u=n.rootBoundary,d=void 0===u?L:u,h=n.elementContext,m=void 0===h?N:h,g=n.altBoundary,v=void 0!==g&&g,y=n.padding,b=void 0===y?0:y,w=Y("number"!=typeof b?b:G(b,P)),_=m===N?"reference":N,S=e.rects.popper,O=e.elements[v?_:m],E=z(r(O)?O:O.contextElement||p(e.elements.popper),l,d,a),x=f(e.elements.reference),j=K({reference:x,element:S,strategy:"absolute",placement:o}),k=B(Object.assign({},S,j)),D=m===N?k:x,M={top:E.top-D.top+w.top,bottom:D.bottom-E.bottom+w.bottom,left:E.left-D.left+w.left,right:D.right-E.right+w.right},R=e.modifiersData.offset;if(m===N&&R){var I=R[o];Object.keys(M).forEach((function(e){var t=[C,A].indexOf(e)>=0?1:-1,n=[T,A].indexOf(e)>=0?"y":"x";M[e]+=I[n]*t}))}return M}var X={placement:"bottom",modifiers:[],strategy:"absolute"};function Q(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[j,C].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,o),e}),{}),a=s[t.placement],c=a.x,l=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=s}},ce={left:"right",right:"left",bottom:"top",top:"bottom"};function le(e){return e.replace(/left|right|bottom|top/g,(function(e){return ce[e]}))}var ue={start:"end",end:"start"};function fe(e){return e.replace(/start|end/g,(function(e){return ue[e]}))}function de(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?I:c,u=V(r),f=u?a?R:R.filter((function(e){return V(e)===u})):P,d=f.filter((function(e){return l.indexOf(e)>=0}));0===d.length&&(d=f);var h=d.reduce((function(t,n){return t[n]=Z(e,{placement:n,boundary:i,rootBoundary:o,padding:s})[W(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}var he={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,c=n.fallbackPlacements,l=n.padding,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=void 0===h||h,m=n.allowedAutoPlacements,g=t.options.placement,v=W(g),y=c||(v===g||!p?[le(g)]:function(e){if(W(e)===k)return[];var t=le(e);return[fe(e),t,fe(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(W(n)===k?de(t,{placement:n,boundary:u,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,_=t.rects.popper,S=new Map,O=!0,E=b[0],x=0;x=0,R=N?"width":"height",I=Z(t,{placement:P,boundary:u,rootBoundary:f,altBoundary:d,padding:l}),F=N?L?C:j:L?A:T;w[R]>_[R]&&(F=le(F));var $=le(F),H=[];if(o&&H.push(I[M]<=0),a&&H.push(I[F]<=0,I[$]<=0),H.every((function(e){return e}))){E=P,O=!1;break}S.set(P,H)}if(O)for(var B=function(e){var t=b.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},q=p?3:1;q>0;q--){if("break"===B(q))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function pe(e,t,n){return s(e,a(t,n))}var me={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=void 0===i||i,c=n.altAxis,l=void 0!==c&&c,u=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.padding,p=n.tether,m=void 0===p||p,g=n.tetherOffset,v=void 0===g?0:g,y=Z(t,{boundary:u,rootBoundary:f,padding:h,altBoundary:d}),w=W(t.placement),_=V(t.placement),S=!_,O=U(w),E="x"===O?"y":"x",k=t.modifiersData.popperOffsets,P=t.rects.reference,M=t.rects.popper,L="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,N="number"==typeof L?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,I={x:0,y:0};if(k){if(o){var F,$="y"===O?T:j,H="y"===O?A:C,B="y"===O?"height":"width",q=k[O],z=q+y[$],K=q-y[H],Y=m?-M[B]/2:0,G=_===D?P[B]:M[B],X=_===D?-M[B]:-P[B],Q=t.elements.arrow,J=m&&Q?b(Q):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[$],ne=ee[H],re=pe(0,P[B],J[B]),ie=S?P[B]/2-Y-re-te-N.mainAxis:G-re-te-N.mainAxis,oe=S?-P[B]/2+Y+re+ne+N.mainAxis:X+re+ne+N.mainAxis,se=t.elements.arrow&&x(t.elements.arrow),ae=se?"y"===O?se.clientTop||0:se.clientLeft||0:0,ce=null!=(F=null==R?void 0:R[O])?F:0,le=q+oe-ce,ue=pe(m?a(z,q+ie-ce-ae):z,q,m?s(K,le):K);k[O]=ue,I[O]=ue-q}if(l){var fe,de="x"===O?T:j,he="x"===O?A:C,me=k[E],ge="y"===E?"height":"width",ve=me+y[de],ye=me-y[he],be=-1!==[T,j].indexOf(w),we=null!=(fe=null==R?void 0:R[E])?fe:0,_e=be?ve:me-P[ge]-M[ge]-we+N.altAxis,Se=be?me+P[ge]+M[ge]-we-N.altAxis:ye,Oe=m&&be?function(e,t,n){var r=pe(e,t,n);return r>n?n:r}(_e,me,Se):pe(m?_e:ve,me,m?Se:ye);k[E]=Oe,I[E]=Oe-me}t.modifiersData[r]=I}},requiresIfExists:["offset"]};var ge={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=W(n.placement),c=U(a),l=[j,C].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(e,t){return Y("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:G(e,P))}(i.padding,n),f=b(o),d="y"===c?T:j,h="y"===c?A:C,p=n.rects.reference[l]+n.rects.reference[c]-s[c]-n.rects.popper[l],m=s[c]-n.rects.reference[c],g=x(o),v=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,y=p/2-m/2,w=u[d],_=v-f[l]-u[h],S=v/2-f[l]/2+y,O=pe(w,S,_),E=c;n.modifiersData[r]=((t={})[E]=O,t.centerOffset=O-S,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&H(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ve(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ye(e){return[T,C,A,j].some((function(t){return e[t]>=0}))}var be={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Z(t,{elementContext:"reference"}),a=Z(t,{altBoundary:!0}),c=ve(s,r),l=ve(a,i,o),u=ye(c),f=ye(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}},we=J({defaultModifiers:[te,ne,oe,se]}),_e=[te,ne,oe,se,ae,he,me,ge,be],Se=J({defaultModifiers:_e});t.applyStyles=se,t.arrow=ge,t.computeStyles=oe,t.createPopper=Se,t.createPopperLite=we,t.defaultModifiers=_e,t.detectOverflow=Z,t.eventListeners=te,t.flip=he,t.hide=be,t.offset=ae,t.popperGenerator=J,t.popperOffsets=ne,t.preventOverflow=me},9044:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return d}});var r=n(6927),i=n(2233);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function s(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:this.element,r=this.actionsList,i="".concat(e,"->").concat(this.identifier,"#").concat(t);r.includes(i)||r.push(i),n.dataset.action=r.join(" ")}},{key:"removeAction",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.element,r="".concat(e,"->").concat(this.identifier,"#").concat(t),i=this.actionsList.filter((function(e){return e!==r}));n.dataset.action=i.join(" ")}},{key:"fetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.q)(e,t)}},{key:"fetchTurboStream",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.h)(e,t)}},{key:"csrfToken",get:function(){return document.querySelector("[name='csrf-token']").content}},{key:"actionsList",get:function(){return element.dataset.action?element.dataset.action.split(" "):[]}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(r.Controller)},8111:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n=500){e.preventDefault();var n="".concat(t.status," (").concat(t.statusText,")");t.text().then((function(e){return i.A.show({title:n,content:e})}))}}}],r&&s(n.prototype,r),o&&s(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(r.default)},4761:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return d}});var r=n(9044);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){for(var n=0;n${this.identifier}#${method}` + const actions = this.actionsList.filter(action => action !== newAction) + + element.dataset.action = actions.join(' ') + } + fetch (url, options = {}) { return fetchWithErrorHandling(url, options) }