/home/blackyak/www/wordpress/wp-content/plugins/wp-travel-engine/dist/admin/booking-legacy-edit.js
(()=>{"use strict";function e(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function t(t){return t instanceof e(t).Element||t instanceof Element}function n(t){return t instanceof e(t).HTMLElement||t instanceof HTMLElement}function r(t){return"undefined"!=typeof ShadowRoot&&(t instanceof e(t).ShadowRoot||t instanceof ShadowRoot)}var o=Math.max,i=Math.min,a=Math.round;function s(){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 c(){return!/^((?!chrome|android).)*safari/i.test(s())}function u(r,o,i){void 0===o&&(o=!1),void 0===i&&(i=!1);var s=r.getBoundingClientRect(),u=1,p=1;o&&n(r)&&(u=r.offsetWidth>0&&a(s.width)/r.offsetWidth||1,p=r.offsetHeight>0&&a(s.height)/r.offsetHeight||1);var f=(t(r)?e(r):window).visualViewport,d=!c()&&i,l=(s.left+(d&&f?f.offsetLeft:0))/u,m=(s.top+(d&&f?f.offsetTop:0))/p,v=s.width/u,h=s.height/p;return{width:v,height:h,top:m,right:l+v,bottom:m+h,left:l,x:l,y:m}}function p(t){var n=e(t);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function f(e){return e?(e.nodeName||"").toLowerCase():null}function d(e){return((t(e)?e.ownerDocument:e.document)||window.document).documentElement}function l(e){return u(d(e)).left+p(e).scrollLeft}function m(t){return e(t).getComputedStyle(t)}function v(e){var t=m(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function h(t,r,o){void 0===o&&(o=!1);var i,s,c=n(r),m=n(r)&&function(e){var t=e.getBoundingClientRect(),n=a(t.width)/e.offsetWidth||1,r=a(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(r),h=d(r),g=u(t,m,o),y={scrollLeft:0,scrollTop:0},b={x:0,y:0};return(c||!c&&!o)&&(("body"!==f(r)||v(h))&&(y=(i=r)!==e(i)&&n(i)?{scrollLeft:(s=i).scrollLeft,scrollTop:s.scrollTop}:p(i)),n(r)?((b=u(r,!0)).x+=r.clientLeft,b.y+=r.clientTop):h&&(b.x=l(h))),{x:g.left+y.scrollLeft-b.x,y:g.top+y.scrollTop-b.y,width:g.width,height:g.height}}function g(e){var t=u(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 y(e){return"html"===f(e)?e:e.assignedSlot||e.parentNode||(r(e)?e.host:null)||d(e)}function b(e){return["html","body","#document"].indexOf(f(e))>=0?e.ownerDocument.body:n(e)&&v(e)?e:b(y(e))}function w(t,n){var r;void 0===n&&(n=[]);var o=b(t),i=o===(null==(r=t.ownerDocument)?void 0:r.body),a=e(o),s=i?[a].concat(a.visualViewport||[],v(o)?o:[]):o,c=n.concat(s);return i?c:c.concat(w(y(s)))}function x(e){return["table","td","th"].indexOf(f(e))>=0}function O(e){return n(e)&&"fixed"!==m(e).position?e.offsetParent:null}function E(t){for(var o=e(t),i=O(t);i&&x(i)&&"static"===m(i).position;)i=O(i);return i&&("html"===f(i)||"body"===f(i)&&"static"===m(i).position)?o:i||function(e){var t=/firefox/i.test(s());if(/Trident/i.test(s())&&n(e)&&"fixed"===m(e).position)return null;var o=y(e);for(r(o)&&(o=o.host);n(o)&&["html","body"].indexOf(f(o))<0;){var i=m(o);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return o;o=o.parentNode}return null}(t)||o}var A="top",T="bottom",L="right",D="left",j="auto",k=[A,T,L,D],S="start",C="end",M="viewport",q="popper",H=k.reduce((function(e,t){return e.concat([t+"-"+S,t+"-"+C])}),[]),P=[].concat(k,[j]).reduce((function(e,t){return e.concat([t,t+"-"+S,t+"-"+C])}),[]),V=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function R(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var _={placement:"bottom",modifiers:[],strategy:"absolute"};function B(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function I(e){void 0===e&&(e={});var n=e,r=n.defaultModifiers,o=void 0===r?[]:r,i=n.defaultOptions,a=void 0===i?_:i;return function(e,n,r){void 0===r&&(r=a);var i,s,c={placement:"bottom",orderedModifiers:[],options:Object.assign({},_,a),modifiersData:{},elements:{reference:e,popper:n},attributes:{},styles:{}},u=[],p=!1,f={state:c,setOptions:function(r){var i="function"==typeof r?r(c.options):r;d(),c.options=Object.assign({},a,c.options,i),c.scrollParents={reference:t(e)?w(e):e.contextElement?w(e.contextElement):[],popper:w(n)};var s,p,l=function(e){var t=R(e);return V.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((s=[].concat(o,c.options.modifiers),p=s.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(p).map((function(e){return p[e]}))));return c.orderedModifiers=l.filter((function(e){return e.enabled})),c.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var i=o({state:c,name:t,instance:f,options:r});u.push(i||function(){})}})),f.update()},forceUpdate:function(){if(!p){var e=c.elements,t=e.reference,n=e.popper;if(B(t,n)){c.rects={reference:h(t,E(n),"fixed"===c.options.strategy),popper:g(n)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach((function(e){return c.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<c.orderedModifiers.length;r++)if(!0!==c.reset){var o=c.orderedModifiers[r],i=o.fn,a=o.options,s=void 0===a?{}:a,u=o.name;"function"==typeof i&&(c=i({state:c,options:s,name:u,instance:f})||c)}else c.reset=!1,r=-1}}},update:(i=function(){return new Promise((function(e){f.forceUpdate(),e(c)}))},function(){return s||(s=new Promise((function(e){Promise.resolve().then((function(){s=void 0,e(i())}))}))),s}),destroy:function(){d(),p=!0}};if(!B(e,n))return f;function d(){u.forEach((function(e){return e()})),u=[]}return f.setOptions(r).then((function(e){!p&&r.onFirstUpdate&&r.onFirstUpdate(e)})),f}}var W={passive:!0};function N(e){return e.split("-")[0]}function U(e){return e.split("-")[1]}function F(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function $(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?N(o):null,a=o?U(o):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(i){case A:t={x:s,y:n.y-r.height};break;case T:t={x:s,y:n.y+n.height};break;case L:t={x:n.x+n.width,y:c};break;case D:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var u=i?F(i):null;if(null!=u){var p="y"===u?"height":"width";switch(a){case S:t[u]=t[u]-(n[p]/2-r[p]/2);break;case C:t[u]=t[u]+(n[p]/2-r[p]/2)}}return t}var z={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Y(t){var n,r=t.popper,o=t.popperRect,i=t.placement,s=t.variation,c=t.offsets,u=t.position,p=t.gpuAcceleration,f=t.adaptive,l=t.roundOffsets,v=t.isFixed,h=c.x,g=void 0===h?0:h,y=c.y,b=void 0===y?0:y,w="function"==typeof l?l({x:g,y:b}):{x:g,y:b};g=w.x,b=w.y;var x=c.hasOwnProperty("x"),O=c.hasOwnProperty("y"),j=D,k=A,S=window;if(f){var M=E(r),q="clientHeight",H="clientWidth";M===e(r)&&"static"!==m(M=d(r)).position&&"absolute"===u&&(q="scrollHeight",H="scrollWidth"),(i===A||(i===D||i===L)&&s===C)&&(k=T,b-=(v&&M===S&&S.visualViewport?S.visualViewport.height:M[q])-o.height,b*=p?1:-1),i!==D&&(i!==A&&i!==T||s!==C)||(j=L,g-=(v&&M===S&&S.visualViewport?S.visualViewport.width:M[H])-o.width,g*=p?1:-1)}var P,V=Object.assign({position:u},f&&z),R=!0===l?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:a(n*o)/o||0,y:a(r*o)/o||0}}({x:g,y:b},e(r)):{x:g,y:b};return g=R.x,b=R.y,p?Object.assign({},V,((P={})[k]=O?"0":"",P[j]=x?"0":"",P.transform=(S.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",P)):Object.assign({},V,((n={})[k]=O?b+"px":"",n[j]=x?g+"px":"",n.transform="",n))}const J={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},o=t.attributes[e]||{},i=t.elements[e];n(i)&&f(i)&&(Object.assign(i.style,r),Object.keys(o).forEach((function(e){var t=o[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var o=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{});n(o)&&f(o)&&(Object.assign(o.style,a),Object.keys(i).forEach((function(e){o.removeAttribute(e)})))}))}},requires:["computeStyles"]};var X={left:"right",right:"left",bottom:"top",top:"bottom"};function Q(e){return e.replace(/left|right|bottom|top/g,(function(e){return X[e]}))}var G={start:"end",end:"start"};function K(e){return e.replace(/start|end/g,(function(e){return G[e]}))}function Z(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&r(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function ee(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function te(n,r,i){return r===M?ee(function(t,n){var r=e(t),o=d(t),i=r.visualViewport,a=o.clientWidth,s=o.clientHeight,u=0,p=0;if(i){a=i.width,s=i.height;var f=c();(f||!f&&"fixed"===n)&&(u=i.offsetLeft,p=i.offsetTop)}return{width:a,height:s,x:u+l(t),y:p}}(n,i)):t(r)?function(e,t){var n=u(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}(r,i):ee(function(e){var t,n=d(e),r=p(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=o(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=o(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),c=-r.scrollLeft+l(e),u=-r.scrollTop;return"rtl"===m(i||n).direction&&(c+=o(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:s,x:c,y:u}}(d(n)))}function ne(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function re(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function oe(e,r){void 0===r&&(r={});var a=r,s=a.placement,c=void 0===s?e.placement:s,p=a.strategy,l=void 0===p?e.strategy:p,v=a.boundary,h=void 0===v?"clippingParents":v,g=a.rootBoundary,b=void 0===g?M:g,x=a.elementContext,O=void 0===x?q:x,D=a.altBoundary,j=void 0!==D&&D,S=a.padding,C=void 0===S?0:S,H=ne("number"!=typeof C?C:re(C,k)),P=O===q?"reference":q,V=e.rects.popper,R=e.elements[j?P:O],_=function(e,r,a,s){var c="clippingParents"===r?function(e){var r=w(y(e)),o=["absolute","fixed"].indexOf(m(e).position)>=0&&n(e)?E(e):e;return t(o)?r.filter((function(e){return t(e)&&Z(e,o)&&"body"!==f(e)})):[]}(e):[].concat(r),u=[].concat(c,[a]),p=u[0],d=u.reduce((function(t,n){var r=te(e,n,s);return t.top=o(r.top,t.top),t.right=i(r.right,t.right),t.bottom=i(r.bottom,t.bottom),t.left=o(r.left,t.left),t}),te(e,p,s));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}(t(R)?R:R.contextElement||d(e.elements.popper),h,b,l),B=u(e.elements.reference),I=$({reference:B,element:V,strategy:"absolute",placement:c}),W=ee(Object.assign({},V,I)),N=O===q?W:B,U={top:_.top-N.top+H.top,bottom:N.bottom-_.bottom+H.bottom,left:_.left-N.left+H.left,right:N.right-_.right+H.right},F=e.modifiersData.offset;if(O===q&&F){var z=F[c];Object.keys(U).forEach((function(e){var t=[L,T].indexOf(e)>=0?1:-1,n=[A,T].indexOf(e)>=0?"y":"x";U[e]+=z[n]*t}))}return U}function ie(e,t,n){return o(e,i(t,n))}function ae(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 se(e){return[A,L,T,D].some((function(t){return e[t]>=0}))}var ce=I({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,r=t.instance,o=t.options,i=o.scroll,a=void 0===i||i,s=o.resize,c=void 0===s||s,u=e(n.elements.popper),p=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&p.forEach((function(e){e.addEventListener("scroll",r.update,W)})),c&&u.addEventListener("resize",r.update,W),function(){a&&p.forEach((function(e){e.removeEventListener("scroll",r.update,W)})),c&&u.removeEventListener("resize",r.update,W)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=$({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,c=void 0===s||s,u={placement:N(t.placement),variation:U(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Y(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Y(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},J,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=P.reduce((function(e,n){return e[n]=function(e,t,n){var r=N(e),o=[D,A].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[D,L].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}(n,t.rects,i),e}),{}),s=a[t.placement],c=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}},{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 o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,c=n.fallbackPlacements,u=n.padding,p=n.boundary,f=n.rootBoundary,d=n.altBoundary,l=n.flipVariations,m=void 0===l||l,v=n.allowedAutoPlacements,h=t.options.placement,g=N(h),y=c||(g!==h&&m?function(e){if(N(e)===j)return[];var t=Q(e);return[K(e),t,K(t)]}(h):[Q(h)]),b=[h].concat(y).reduce((function(e,n){return e.concat(N(n)===j?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?P:c,p=U(r),f=p?s?H:H.filter((function(e){return U(e)===p})):k,d=f.filter((function(e){return u.indexOf(e)>=0}));0===d.length&&(d=f);var l=d.reduce((function(t,n){return t[n]=oe(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[N(n)],t}),{});return Object.keys(l).sort((function(e,t){return l[e]-l[t]}))}(t,{placement:n,boundary:p,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:v}):n)}),[]),w=t.rects.reference,x=t.rects.popper,O=new Map,E=!0,C=b[0],M=0;M<b.length;M++){var q=b[M],V=N(q),R=U(q)===S,_=[A,T].indexOf(V)>=0,B=_?"width":"height",I=oe(t,{placement:q,boundary:p,rootBoundary:f,altBoundary:d,padding:u}),W=_?R?L:D:R?T:A;w[B]>x[B]&&(W=Q(W));var F=Q(W),$=[];if(i&&$.push(I[V]<=0),s&&$.push(I[W]<=0,I[F]<=0),$.every((function(e){return e}))){C=q,E=!1;break}O.set(q,$)}if(E)for(var z=function(e){var t=b.find((function(t){var n=O.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},Y=m?3:1;Y>0&&"break"!==z(Y);Y--);t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,s=void 0===a||a,c=n.altAxis,u=void 0!==c&&c,p=n.boundary,f=n.rootBoundary,d=n.altBoundary,l=n.padding,m=n.tether,v=void 0===m||m,h=n.tetherOffset,y=void 0===h?0:h,b=oe(t,{boundary:p,rootBoundary:f,padding:l,altBoundary:d}),w=N(t.placement),x=U(t.placement),O=!x,j=F(w),k="x"===j?"y":"x",C=t.modifiersData.popperOffsets,M=t.rects.reference,q=t.rects.popper,H="function"==typeof y?y(Object.assign({},t.rects,{placement:t.placement})):y,P="number"==typeof H?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(C){if(s){var _,B="y"===j?A:D,I="y"===j?T:L,W="y"===j?"height":"width",$=C[j],z=$+b[B],Y=$-b[I],J=v?-q[W]/2:0,X=x===S?M[W]:q[W],Q=x===S?-q[W]:-M[W],G=t.elements.arrow,K=v&&G?g(G):{width:0,height:0},Z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ee=Z[B],te=Z[I],ne=ie(0,M[W],K[W]),re=O?M[W]/2-J-ne-ee-P.mainAxis:X-ne-ee-P.mainAxis,ae=O?-M[W]/2+J+ne+te+P.mainAxis:Q+ne+te+P.mainAxis,se=t.elements.arrow&&E(t.elements.arrow),ce=se?"y"===j?se.clientTop||0:se.clientLeft||0:0,ue=null!=(_=null==V?void 0:V[j])?_:0,pe=$+ae-ue,fe=ie(v?i(z,$+re-ue-ce):z,$,v?o(Y,pe):Y);C[j]=fe,R[j]=fe-$}if(u){var de,le="x"===j?A:D,me="x"===j?T:L,ve=C[k],he="y"===k?"height":"width",ge=ve+b[le],ye=ve-b[me],be=-1!==[A,D].indexOf(w),we=null!=(de=null==V?void 0:V[k])?de:0,xe=be?ge:ve-M[he]-q[he]-we+P.altAxis,Oe=be?ve+M[he]+q[he]-we-P.altAxis:ye,Ee=v&&be?function(e,t,n){var r=ie(e,t,n);return r>n?n:r}(xe,ve,Oe):ie(v?xe:ge,ve,v?Oe:ye);C[k]=Ee,R[k]=Ee-ve}t.modifiersData[r]=R}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=N(n.placement),c=F(s),u=[D,L].indexOf(s)>=0?"height":"width";if(i&&a){var p=function(e,t){return ne("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:re(e,k))}(o.padding,n),f=g(i),d="y"===c?A:D,l="y"===c?T:L,m=n.rects.reference[u]+n.rects.reference[c]-a[c]-n.rects.popper[u],v=a[c]-n.rects.reference[c],h=E(i),y=h?"y"===c?h.clientHeight||0:h.clientWidth||0:0,b=m/2-v/2,w=p[d],x=y-f[u]-p[l],O=y/2-f[u]/2+b,j=ie(w,O,x),S=c;n.modifiersData[r]=((t={})[S]=j,t.centerOffset=j-O,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)))&&Z(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=oe(t,{elementContext:"reference"}),s=oe(t,{altBoundary:!0}),c=ae(a,r),u=ae(s,o,i),p=se(c),f=se(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:p,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":f})}}]}),ue="tippy-content",pe="tippy-arrow",fe="tippy-svg-arrow",de={passive:!0,capture:!0},le=function(){return document.body};function me(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function ve(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function he(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ge(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function ye(e){return[].concat(e)}function be(e,t){-1===e.indexOf(t)&&e.push(t)}function we(e){return[].slice.call(e)}function xe(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Oe(){return document.createElement("div")}function Ee(e){return["Element","Fragment"].some((function(t){return ve(e,t)}))}function Ae(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Te(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Le(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function De(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var je={isTouch:!1},ke=0;function Se(){je.isTouch||(je.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ce))}function Ce(){var e=performance.now();e-ke<20&&(je.isTouch=!1,document.removeEventListener("mousemove",Ce)),ke=e}function Me(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var qe=!("undefined"==typeof window||"undefined"==typeof document||!window.msCrypto),He=Object.assign({appendTo:le,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Pe=Object.keys(He);function Ve(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;return o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=He[o])?r:i),t}),{});return Object.assign({},e,t)}function Re(e,t){var n=Object.assign({},t,{content:he(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Ve(Object.assign({},He,{plugins:t}))):Pe).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},He.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function _e(e,t){e.innerHTML=t}function Be(e){var t=Oe();return!0===e?t.className=pe:(t.className=fe,Ee(e)?t.appendChild(e):_e(t,e)),t}function Ie(e,t){Ee(t.content)?(_e(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?_e(e,t.content):e.textContent=t.content)}function We(e){var t=e.firstElementChild,n=we(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(ue)})),arrow:n.find((function(e){return e.classList.contains(pe)||e.classList.contains(fe)})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function Ne(e){var t=Oe(),n=Oe();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Oe();function o(n,r){var o=We(t),i=o.box,a=o.content,s=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Ie(a,e.props),r.arrow?s?n.arrow!==r.arrow&&(i.removeChild(s),i.appendChild(Be(r.arrow))):i.appendChild(Be(r.arrow)):s&&i.removeChild(s)}return r.className=ue,r.setAttribute("data-state","hidden"),Ie(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}Ne.$$tippy=!0;var Ue=1,Fe=[],$e=[];function ze(e,t){var n,r,o,i,a,s,c,u,p=Re(e,Object.assign({},He,Ve(xe(t)))),f=!1,d=!1,l=!1,m=!1,v=[],h=ge(Y,p.interactiveDebounce),g=Ue++,y=(u=p.plugins).filter((function(e,t){return u.indexOf(e)===t})),b={id:g,reference:e,popper:Oe(),popperInstance:null,props:p,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){if(!b.state.isDestroyed){q("onBeforeUpdate",[b,t]),$();var n=b.props,r=Re(e,Object.assign({},n,xe(t),{ignoreAttributes:!0}));b.props=r,F(),n.interactiveDebounce!==r.interactiveDebounce&&(V(),h=ge(Y,r.interactiveDebounce)),n.triggerTarget&&!r.triggerTarget?ye(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded"),P(),M(),O&&O(n,r),b.popperInstance&&(G(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}))),q("onAfterUpdate",[b,t])}},setContent:function(e){b.setProps({content:e})},show:function(){var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=je.isTouch&&!b.props.touch,o=me(b.props.duration,0,He.duration);if(!(e||t||n||r||j().hasAttribute("disabled")||(q("onShow",[b],!1),!1===b.props.onShow(b)))){if(b.state.isVisible=!0,D()&&(x.style.visibility="visible"),M(),I(),b.state.isMounted||(x.style.transition="none"),D()){var i=S();Ae([i.box,i.content],0)}var a,c,u;s=function(){var e;if(b.state.isVisible&&!m){if(m=!0,x.offsetHeight,x.style.transition=b.props.moveTransition,D()&&b.props.animation){var t=S(),n=t.box,r=t.content;Ae([n,r],o),Te([n,r],"visible")}H(),P(),be($e,b),null==(e=b.popperInstance)||e.forceUpdate(),q("onMount",[b]),b.props.animation&&D()&&function(e){N(e,(function(){b.state.isShown=!0,q("onShown",[b])}))}(o)}},c=b.props.appendTo,u=j(),(a=b.props.interactive&&c===le||"parent"===c?u.parentNode:he(c,[u])).contains(x)||a.appendChild(x),b.state.isMounted=!0,G()}},hide:function(){var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=me(b.props.duration,1,He.duration);if(!(e||t||n)&&(q("onHide",[b],!1),!1!==b.props.onHide(b))){if(b.state.isVisible=!1,b.state.isShown=!1,m=!1,f=!1,D()&&(x.style.visibility="hidden"),V(),W(),M(!0),D()){var o=S(),i=o.box,a=o.content;b.props.animation&&(Ae([i,a],r),Te([i,a],"hidden"))}H(),P(),b.props.animation?D()&&function(e,t){N(e,(function(){!b.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&t()}))}(r,b.unmount):b.unmount()}},hideWithInteractivity:function(e){k().addEventListener("mousemove",h),be(Fe,h),h(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){b.state.isVisible&&b.hide(),b.state.isMounted&&(K(),Z().forEach((function(e){e._tippy.unmount()})),x.parentNode&&x.parentNode.removeChild(x),$e=$e.filter((function(e){return e!==b})),b.state.isMounted=!1,q("onHidden",[b]))},destroy:function(){b.state.isDestroyed||(b.clearDelayTimeouts(),b.unmount(),$(),delete e._tippy,b.state.isDestroyed=!0,q("onDestroy",[b]))}};if(!p.render)return b;var w=p.render(b),x=w.popper,O=w.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+b.id,b.popper=x,e._tippy=b,x._tippy=b;var E=y.map((function(e){return e.fn(b)})),A=e.hasAttribute("aria-expanded");return F(),P(),M(),q("onCreate",[b]),p.showOnCreate&&ee(),x.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),x.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&k().addEventListener("mousemove",h)})),b;function T(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function L(){return"hold"===T()[0]}function D(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function j(){return c||e}function k(){var e,t,n=j().parentNode;return n?null!=(t=ye(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function S(){return We(x)}function C(e){return b.state.isMounted&&!b.state.isVisible||je.isTouch||i&&"focus"===i.type?0:me(b.props.delay,e?0:1,He.delay)}function M(e){void 0===e&&(e=!1),x.style.pointerEvents=b.props.interactive&&!e?"":"none",x.style.zIndex=""+b.props.zIndex}function q(e,t,n){var r;void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n&&(r=b.props)[e].apply(r,t)}function H(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=x.id;ye(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function P(){!A&&b.props.aria.expanded&&ye(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===j()?"true":"false"):e.removeAttribute("aria-expanded")}))}function V(){k().removeEventListener("mousemove",h),Fe=Fe.filter((function(e){return e!==h}))}function R(t){if(!je.isTouch||!l&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!De(x,n)){if(ye(b.props.triggerTarget||e).some((function(e){return De(e,n)}))){if(je.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else q("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout((function(){d=!1})),b.state.isMounted||W())}}}function _(){l=!0}function B(){l=!1}function I(){var e=k();e.addEventListener("mousedown",R,!0),e.addEventListener("touchend",R,de),e.addEventListener("touchstart",B,de),e.addEventListener("touchmove",_,de)}function W(){var e=k();e.removeEventListener("mousedown",R,!0),e.removeEventListener("touchend",R,de),e.removeEventListener("touchstart",B,de),e.removeEventListener("touchmove",_,de)}function N(e,t){var n=S().box;function r(e){e.target===n&&(Le(n,"remove",r),t())}if(0===e)return t();Le(n,"remove",a),Le(n,"add",r),a=r}function U(t,n,r){void 0===r&&(r=!1),ye(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),v.push({node:e,eventType:t,handler:n,options:r})}))}function F(){var e;L()&&(U("touchstart",z,{passive:!0}),U("touchend",J,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(U(e,z),e){case"mouseenter":U("mouseleave",J);break;case"focus":U(qe?"focusout":"blur",X);break;case"focusin":U("focusout",X)}}))}function $(){v.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),v=[]}function z(e){var t,n=!1;if(b.state.isEnabled&&!Q(e)&&!d){var r="focus"===(null==(t=i)?void 0:t.type);i=e,c=e.currentTarget,P(),!b.state.isVisible&&ve(e,"MouseEvent")&&Fe.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||f)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(f=!n),n&&!r&&te(e)}}function Y(e){var t=e.target,n=j().contains(t)||x.contains(t);if("mousemove"!==e.type||!n){var r=Z().concat(x).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:p}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=o.placement.split("-")[0],s=o.modifiersData.offset;if(!s)return!0;var c="bottom"===a?s.top.y:0,u="top"===a?s.bottom.y:0,p="right"===a?s.left.x:0,f="left"===a?s.right.x:0,d=t.top-r+c>i,l=r-t.bottom-u>i,m=t.left-n+p>i,v=n-t.right-f>i;return d||l||m||v}))})(r,e)&&(V(),te(e))}}function J(e){Q(e)||b.props.trigger.indexOf("click")>=0&&f||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function X(e){b.props.trigger.indexOf("focusin")<0&&e.target!==j()||b.props.interactive&&e.relatedTarget&&x.contains(e.relatedTarget)||te(e)}function Q(e){return!!je.isTouch&&L()!==e.type.indexOf("touch")>=0}function G(){K();var t=b.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,c=D()?We(x).arrow:null,u=i?{getBoundingClientRect:i,contextElement:i.contextElement||j()}:e,p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(D()){var n=S().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];D()&&c&&p.push({name:"arrow",options:{element:c,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),b.popperInstance=ce(u,x,Object.assign({},n,{placement:r,onFirstUpdate:s,modifiers:p}))}function K(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Z(){return we(x.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&q("onTrigger",[b,e]),I();var t=C(!0),r=T(),o=r[0],i=r[1];je.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),q("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&f)){var t=C(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else W()}}function Ye(e,t){void 0===t&&(t={});var n=He.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Se,de),window.addEventListener("blur",Me);var r,o=Object.assign({},t,{plugins:n}),i=(r=e,Ee(r)?[r]:function(e){return ve(e,"NodeList")}(r)?we(r):Array.isArray(r)?r:we(document.querySelectorAll(r))).reduce((function(e,t){var n=t&&ze(t,o);return n&&e.push(n),e}),[]);return Ee(e)?i[0]:i}Ye.defaultProps=He,Ye.setDefaultProps=function(e){Object.keys(e).forEach((function(t){He[t]=e[t]}))},Ye.currentInput=je,Object.assign({},J,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),Ye.setDefaultProps({render:Ne});const Je=Ye,Xe=window.wp.i18n;(()=>{document.querySelectorAll(".wpte-date-picker")?.forEach((e=>{const t=e.dataset?.options,n=t?JSON.parse(t):{};flatpickr(e,n)})),document.querySelectorAll(".wpte-tooltip")?.forEach((e=>{Je(e,{content:e.dataset?.content,allowHTML:!0,interactive:!0,placement:"top",theme:"light-border"})})),document.querySelectorAll(".wpte-tab")?.forEach((e=>{""!=e.dataset.target&&e.addEventListener("click",(e=>{const t=e.currentTarget;e.preventDefault(),function(e,t=100){const n=e.getBoundingClientRect().top+window.scrollY-t;window.scrollTo({top:n,behavior:"smooth"})}(document.querySelector(`[data-target-id=${t.dataset.target}]`),150)}))}));var e=document.querySelectorAll(".wpte-form-section"),t={},n=0;Array.prototype.forEach.call(e,(function(e){t[e.dataset?.targetId]=e.offsetTop})),window.onscroll=function(){var e=document.documentElement.scrollTop||document.body.scrollTop;for(n in t)t[n]+50<=e&&(document.querySelector(".is-active").classList.remove("is-active"),document.querySelector(`[data-target=${n}]`).parentElement.classList.add("is-active"))};const r=document.querySelector(".wpte-copy-field"),o=r?.querySelector("input"),i=r?.querySelector("button");i?.addEventListener("click",(e=>{o.select(),o.setSelectionRange(0,99999),navigator.clipboard?navigator.clipboard.writeText(o.value):document.execCommand("copy")}));const a=document.querySelectorAll(".wpte-accordion");a&&a.forEach((e=>{const t=e.querySelector(".wpte-accordion-toggle"),n=e.querySelector(".wpte-accordion-content");t&&"none"!==n.style.display&&t.classList.add("active"),t?.addEventListener("click",(e=>{n.style.opacity=0,n.style.transition="opacity 0.3s","none"===n.style.display?(t.classList.add("active"),n.style.display="block",setTimeout((()=>{n.style.opacity=1}),100)):(t.classList.remove("active"),n.style.opacity=0,setTimeout((()=>{n.style.display="none"}),300))}))}));const s=document.querySelectorAll("[data-type=add]");s&&(s.forEach((e=>{const t=document.querySelector(e.dataset.target);e.addEventListener("click",(function(n){if(n.preventDefault(),t){var r,o,i;const n=null!==(r=null!==(o=parseInt(e.dataset.totalCount))&&void 0!==o?o:parseInt(e.dataset.currentIndex))&&void 0!==r?r:0,a=wp.template(e.dataset.template),s=JSON.parse(null!==(i=e.dataset.args)&&void 0!==i?i:"{}");t.insertAdjacentHTML("beforeend",a({index:Math.random(),...s})),e.dataset.currentIndex=n+1}}))})),document.addEventListener("click",(function(e){if(e.target.classList.contains("wpte-table-delete-row")){const t=e.target.closest("tr");t?.remove()}if(e.target.classList.contains("wpte-delete-section")){const t=e.target.closest('[class*="-wrapper"]'),n=t?.previousElementSibling;"HR"===n?.tagName&&n?.remove()}})));const c=document.getElementById("booking_status");c&&jQuery(c).select2({tags:!0})})();const Qe=document.getElementById("wte-resend-purchase-receipt");Qe&&Qe.addEventListener("click",(async e=>{e.preventDefault(),Qe.disabled=!0;const t=Qe.textContent;Qe.textContent=(0,Xe.__)("Sending...","wp-travel-engine");try{const e=Qe.dataset.bookingId,t=Qe.dataset.nonce;if(!e||!t)throw new Error((0,Xe.__)("Missing required data attributes","wp-travel-engine"));const n=await fetch(wp.ajax.settings.url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"wte_resend_purchase_receipt",booking_id:e,nonce:t,resend_purchase_receipt:!0})}),r=await n.json();r.success?toastr.success(r.data?.message||(0,Xe.__)("Purchase receipt sent successfully!","wp-travel-engine")):toastr.error(r.data?.message||(0,Xe.__)("Failed to send purchase receipt","wp-travel-engine"))}catch(e){toastr.error(e.message||(0,Xe.__)("An error occurred while sending the receipt. Please try again.","wp-travel-engine"))}finally{Qe.disabled=!1,Qe.textContent=t}}))})();