1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dm0VWLor.js","assets/application-CYYBk1Nm.js","assets/stimulus-Beq9IL9f.js","assets/index-CSwQd_E2.js","assets/index-Czn-tG1U.js","assets/index-C2Jg1E2O.js","assets/index-vMpkyDuY.js","assets/stimulus-clipboard-t3tjpE-I.js","assets/choices_controller-DFzfDQvx.js","assets/index-DyKl4ymx.js","assets/search_bundle-DeX0LBRv.js","assets/trial_controller-CphW7RxW.js","assets/index-BQ0u-y-U.js","assets/introjs-BqXMzjFi.css","assets/swiper-bundle-v2Sj8WLY.css"])))=>i.map(i=>d[i]); 2var RC=Object.defineProperty;var NC=(i,e,t)=>e in i?RC(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var $=(i,e,t)=>NC(i,typeof e!="symbol"?e+"":e,t);import{a as rt,r as pg,_ as Lt,c as ee,g as BC,b as Go,S as FC,v as zC}from"./application-CYYBk1Nm.js";import{D as VC,C as HC}from"./stimulus-clipboard-t3tjpE-I.js";import{r as sv,C as Ii,S as Qu,l as ov,a as Zf,M as av,p as jC,v as sh,b as $C,c as qC,_ as UC}from"./choices_controller-DFzfDQvx.js";import{C as U,f as ye,i as lv,a as uv,g as cv}from"./stimulus-Beq9IL9f.js";function dv(i,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const r in n)if(r!=="default"&&!(r in i)){const s=Object.getOwnPropertyDescriptor(n,r);s&&Object.defineProperty(i,r,s.get?s:{enumerable:!0,get:()=>n[r]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}const WC=Object.assign({});sv(rt,WC);var GC=function(){function i(e,t){t===void 0&&(t=[]),this._eventType=e,this._eventFunctions=t}return i.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(t){typeof window<"u"&&window.addEventListener(e._eventType,t)})},i}(),KC=function(){function i(){this._instances={Accordion:{},Carousel:{},Collapse:{},Dial:{},Dismiss:{},Drawer:{},Dropdown:{},Modal:{},Popover:{},Tabs:{},Tooltip:{},InputCounter:{},CopyClipboard:{},Datepicker:{}}}return i.prototype.addInstance=function(e,t,n,r){if(r===void 0&&(r=!1),!this._instances[e])return console.warn("Flowbite: Component ".concat(e," does not exist.")),!1;if(this._instances[e][n]&&!r){console.warn("Flowbite: Instance with ID ".concat(n," already exists."));return}r&&this._instances[e][n]&&this._instances[e][n].destroyAndRemoveInstance(),this._instances[e][n||this._generateRandomId()]=t},i.prototype.getAllInstances=function(){return this._instances},i.prototype.getInstances=function(e){return this._instances[e]?this._instances[e]:(console.warn("Flowbite: Component ".concat(e," does not exist.")),!1)},i.prototype.getInstance=function(e,t){if(this._componentAndInstanceCheck(e,t)){if(!this._instances[e][t]){console.warn("Flowbite: Instance with ID ".concat(t," does not exist."));return}return this._instances[e][t]}},i.prototype.destroyAndRemoveInstance=function(e,t){this._componentAndInstanceCheck(e,t)&&(this.destroyInstanceObject(e,t),this.removeInstance(e,t))},i.prototype.removeInstance=function(e,t){this._componentAndInstanceCheck(e,t)&&delete this._instances[e][t]},i.prototype.destroyInstanceObject=function(e,t){this._componentAndInstanceCheck(e,t)&&this._instances[e][t].destroy()},i.prototype.instanceExists=function(e,t){return!(!this._instances[e]||!this._instances[e][t])},i.prototype._generateRandomId=function(){return Math.random().toString(36).substr(2,9)},i.prototype._componentAndInstanceCheck=function(e,t){return this._instances[e]?this._instances[e][t]?!0:(console.warn("Flowbite: Instance with ID ".concat(t," does not exist.")),!1):(console.warn("Flowbite: Component ".concat(e," does not exist.")),!1)},i}(),he=new KC;typeof window<"u"&&(window.FlowbiteInstances=he);var El=function(){return El=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},El.apply(this,arguments)},Tl={alwaysOpen:!1,activeClasses:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white",inactiveClasses:"text-gray-500 dark:text-gray-400",onOpen:function(){},onClose:function(){},onToggle:function(){}},YC={id:null,override:!0},hv=function(){function i(e,t,n,r){e===void 0&&(e=null),t===void 0&&(t=[]),n===void 0&&(n=Tl),r===void 0&&(r=YC),this._instanceId=r.id?r.id:e.id,this._accordionEl=e,this._items=t,this._options=El(El({},Tl),n),this._initialized=!1,this.init(),he.addInstance("Accordion",this,this._instanceId,r.override)}return i.prototype.init=function(){var e=this;
2this._items.length&&!this._initialized&&(this._items.forEach(function(t){t.active&&e.open(t.id);var n=function(){e.toggle(t.id)};t.triggerEl.addEventListener("click",n),t.clickHandler=n}),this._initialized=!0)},i.prototype.destroy=function(){this._items.length&&this._initialized&&(this._items.forEach(function(e){e.triggerEl.removeEventListener("click",e.clickHandler),delete e.clickHandler}),this._initialized=!1)},i.prototype.removeInstance=function(){he.removeInstance("Accordion",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.getItem=function(e){return this._items.filter(function(t){return t.id===e})[0]},i.prototype.open=function(e){var t,n,r=this,s=this.getItem(e);this._options.alwaysOpen||this._items.map(function(o){var l,a;o!==s&&((l=o.triggerEl.classList).remove.apply(l,r._options.activeClasses.split(" ")),(a=o.triggerEl.classList).add.apply(a,r._options.inactiveClasses.split(" ")),o.targetEl.classList.add("hidden"),o.triggerEl.setAttribute("aria-expanded","false"),o.active=!1,o.iconEl&&o.iconEl.classList.add("rotate-180"))}),(t=s.triggerEl.classList).add.apply(t,this._options.activeClasses.split(" ")),(n=s.triggerEl.classList).remove.apply(n,this._options.inactiveClasses.split(" ")),s.triggerEl.setAttribute("aria-expanded","true"),s.targetEl.classList.remove("hidden"),s.active=!0,s.iconEl&&s.iconEl.classList.remove("rotate-180"),this._options.onOpen(this,s)},i.prototype.toggle=function(e){var t=this.getItem(e);t.active?this.close(e):this.open(e),this._options.onToggle(this,t)},i.prototype.close=function(e){var t,n,r=this.getItem(e);(t=r.triggerEl.classList).remove.apply(t,this._options.activeClasses.split(" ")),(n=r.triggerEl.classList).add.apply(n,this._options.inactiveClasses.split(" ")),r.targetEl.classList.add("hidden"),r.triggerEl.setAttribute("aria-expanded","false"),r.active=!1,r.iconEl&&r.iconEl.classList.add("rotate-180"),this._options.onClose(this,r)},i.prototype.updateOnOpen=function(e){this._options.onOpen=e},i.prototype.updateOnClose=function(e){this._options.onClose=e},i.prototype.updateOnToggle=function(e){this._options.onToggle=e},i}();function ep(){document.querySelectorAll("[data-accordion]").forEach(function(i){var e=i.getAttribute("data-accordion"),t=i.getAttribute("data-active-classes"),n=i.getAttribute("data-inactive-classes"),r=[];i.querySelectorAll("[data-accordion-target]").forEach(function(s){if(s.closest("[data-accordion]")===i){var o={id:s.getAttribute("data-accordion-target"),triggerEl:s,targetEl:document.querySelector(s.getAttribute("data-accordion-target")),iconEl:s.querySelector("[data-accordion-icon]"),active:s.getAttribute("aria-expanded")==="true"};r.push(o)}}),new hv(i,r,{alwaysOpen:e==="open",activeClasses:t||Tl.activeClasses,inactiveClasses:n||Tl.inactiveClasses})})}typeof window<"u"&&(window.Accordion=hv,window.initAccordions=ep);var Sl=function(){return Sl=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},Sl.apply(this,arguments)},mg={onCollapse:function(){},onExpand:function(){},onToggle:function(){}},XC={id:null,override:!0},oh=function(){function i(e,t,n,r){e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=mg),r===void 0&&(r=XC),this._instanceId=r.id?r.id:e.id,this._targetEl=e,this._triggerEl=t,this._options=Sl(Sl({},mg),n),this._visible=!1,this._initialized=!1,this.init(),he.addInstance("Collapse",this,this._instanceId,r.override)}return i.prototype.init=function(){var e=this;this._triggerEl&&this._targetEl&&!this._initialized&&(this._triggerEl.hasAttribute("aria-expanded")?this._visible=this._triggerEl.getAttribute("aria-expanded")==="true":this._visible=!this._targetEl.classList.contains("hidden"),this._clickHandler=function(){e.toggle()},this._triggerEl.addEventListener("click",this._clickHandler),this._initialized=!0)},i.prototype.destroy=function(){this._triggerEl&&this._initialized&&(this._triggerEl.removeEventListener("click",this._clickHandler),this._initialized=!1)},i.prototype.removeInstance=function(){he.removeInstance("Collapse",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.collapse=function(){this._targetEl.classList.add("hidden"),this._triggerEl&&this._triggerEl.setAttribute("aria-expanded","fal
2se"),this._visible=!1,this._options.onCollapse(this)},i.prototype.expand=function(){this._targetEl.classList.remove("hidden"),this._triggerEl&&this._triggerEl.setAttribute("aria-expanded","true"),this._visible=!0,this._options.onExpand(this)},i.prototype.toggle=function(){this._visible?this.collapse():this.expand(),this._options.onToggle(this)},i.prototype.updateOnCollapse=function(e){this._options.onCollapse=e},i.prototype.updateOnExpand=function(e){this._options.onExpand=e},i.prototype.updateOnToggle=function(e){this._options.onToggle=e},i}();function tp(){document.querySelectorAll("[data-collapse-toggle]").forEach(function(i){var e=i.getAttribute("data-collapse-toggle"),t=document.getElementById(e);t?he.instanceExists("Collapse",t.getAttribute("id"))?new oh(t,i,{},{id:t.getAttribute("id")+"_"+he._generateRandomId()}):new oh(t,i):console.error('The target element with id "'.concat(e,'" does not exist. Please check the data-collapse-toggle attribute.'))})}typeof window<"u"&&(window.Collapse=oh,window.initCollapses=tp);var Ui=function(){return Ui=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},Ui.apply(this,arguments)},tl={defaultPosition:0,indicators:{items:[],activeClasses:"bg-white dark:bg-gray-800",inactiveClasses:"bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800"},interval:3e3,onNext:function(){},onPrev:function(){},onChange:function(){}},JC={id:null,override:!0},fv=function(){function i(e,t,n,r){e===void 0&&(e=null),t===void 0&&(t=[]),n===void 0&&(n=tl),r===void 0&&(r=JC),this._instanceId=r.id?r.id:e.id,this._carouselEl=e,this._items=t,this._options=Ui(Ui(Ui({},tl),n),{indicators:Ui(Ui({},tl.indicators),n.indicators)}),this._activeItem=this.getItem(this._options.defaultPosition),this._indicators=this._options.indicators.items,this._intervalDuration=this._options.interval,this._intervalInstance=null,this._initialized=!1,this.init(),he.addInstance("Carousel",this,this._instanceId,r.override)}return i.prototype.init=function(){var e=this;this._items.length&&!this._initialized&&(this._items.map(function(t){t.el.classList.add("absolute","
2inset-0","transition-transform","transform")}),this.getActiveItem()?this.slideTo(this.getActiveItem().position):this.slideTo(0),this._indicators.map(function(t,n){t.el.addEventListener("click",function(){e.slideTo(n)})}),this._initialized=!0)},i.prototype.destroy=function(){this._initialized&&(this._initialized=!1)},i.prototype.removeInstance=function(){he.removeInstance("Carousel",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.getItem=function(e){return this._items[e]},i.prototype.slideTo=function(e){var t=this._items[e],n={left:t.position===0?this._items[this._items.length-1]:this._items[t.position-1],middle:t,right:t.position===this._items.length-1?this._items[0]:this._items[t.position+1]};this._rotate(n),this._setActiveItem(t),this._intervalInstance&&(this.pause(),this.cycle()),this._options.onChange(this)},i.prototype.next=function(){var e=this.getActiveItem(),t=null;e.position===this._items.length-1?t=this._items[0]:t=this._items[e.position+1],this.slideTo(t.position),this._options.onNext(this)},i.prototype.prev=function(){var e=this.getActiveItem(),t=null;e.position===0?t=this._items[this._items.length-1]:t=this._items[e.position-1],this.slideTo(t.position),this._options.onPrev(this)},i.prototype._rotate=function(e){if(this._items.map(function(t){t.el.classList.add("hidden")}),this._items.length===1){e.middle.el.classList.remove("-translate-x-full","translate-x-full","translate-x-0","hidden","z-10"),e.middle.el.classList.add("translate-x-0","z-20");return}e.left.el.classList.remove("-translate-x-full","translate-x-full","translate-x-0","hidden","z-20"),e.left.el.classList.add("-translate-x-full","z-10"),e.middle.el.classList.remove("-translate-x-full","translate-x-full","translate-x-0","hidden","z-10"),e.middle.el.classList.add("translate-x-0","z-30"),e.right.el.classList.remove("-translate-x-full","translate-x-full","translate-x-0","hidden","z-30"),e.right.el.classList.add("translate-x-full","z-20")},i.prototype.cycle=function(){var e=this;typeof window<"u"&&(this._intervalInstance=window.setInterval(function(){e.next()},this._intervalDuration))},i.prototype.pause=function(){clearInterval(this._intervalInstance)},i.prototype.getActiveItem=function(){return this._activeItem},i.prototype._setActiveItem=function(e){var t,n,r=this;this._activeItem=e;var s=e.position;this._indicators.length&&(this._indicators.map(function(o){var l,a;o.el.setAttribute("aria-current","false"),(l=o.el.classList).remove.apply(l,r._options.indicators.activeClasses.split(" ")),(a=o.el.classList).add.apply(a,r._options.indicators.inactiveClasses.split(" "))}),(t=this._indicators[s].el.classList).add.apply(t,this._options.indicators.activeClasses.split(" ")),(n=this._indicators[s].el.classList).remove.apply(n,this._options.indicators.inactiveClasses.split(" ")),this._indicators[s].el.setAttribute("aria-current","true"))},i.prototype.updateOnNext=function(e){this._options.onNext=e},i.prototype.updateOnPrev=function(e){this._options.onPrev=e},i.prototype.updateOnChange=function(e){this._options.onChange=e},i}();function np(){document.querySelectorAll("[data-carousel]").forEach(function(i){var e=i.getAttribute("data-carousel-interval"),t=i.getAttribute("data-carousel")==="slide",n=[],r=0;i.querySelectorAll("[data-carousel-item]").length&&Array.from(i.querySelectorAll("[data-carousel-item]")).map(function(u,c){n.push({position:c,el:u}),u.getAttribute("data-carousel-item")==="active"&&(r=c)});var s=[];i.querySelectorAll("[data-carousel-slide-to]").length&&Array.from(i.querySelectorAll("[data-carousel-slide-to]")).map(function(u){s.push({position:parseInt(u.getAttribute("data-carousel-slide-to")),el:u})});var o=new fv(i,n,{defaultPosition:r,indicators:{items:s},interval:e||tl.interval});t&&o.cycle();var l=i.querySelector("[data-carousel-next]"),a=i.querySelector("[data-carousel-prev]");l&&l.addEventListener("click",function(){o.next()}),a&&a.addEventListener("click",function(){o.prev()})})}typeof window<"u"&&(window.Carousel=fv,window.initCarousels=np);var Cl=function(){return Cl=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},Cl.apply(this,arguments)},gg={transition:"transition-opacity",duration:300,timing:"ease-out",onHide:function(){}},QC={id:null,override:!0},pv=function(){function i(e,t,n,r){e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=gg),r===void 0&&(r=QC),this._instanceId=r.id?r.id:e.id,this._targetEl=e,this._triggerEl=t,this._options=Cl(Cl({},gg),n),this._initialized=!1,this.init(),he.addInstance("Dismiss",this,this._instanceId,r.override)}return i.prototype.init=function(){var e=this;this._triggerEl&&this._targetEl&&!this._initialized&&(this._clickHandler=function(){e.hide()},this._triggerEl.addEventListener("click",this._clickHandler),this._initialized=!0)},i.prototype.destroy=function(){this._triggerEl&&this._initialized&&(this._triggerEl.removeEventListener("click",this._clickHandler),this._initialized=!1)},i.prototype.removeInstance=function(){he.removeInstance("Dismiss",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.hide=function(){var e=this;this._targetEl.classList.add(this._options.transition,"duration-".concat(this._options.duration),this._options.timing,"opacity-0"),setTimeout(function(){e._targetEl.classList.add("hidden")},this._options.duration),this._options.onHide(this,this._targetEl)},i.prototype.updateOnHide=function(e){this._options.onHide=e},i}();function ip(){document.querySelectorAll("[data-dismiss-target]").forEach(function(i){var e=i.getAttribute("data-dismiss-target"),t=document.querySelector(e);t?new pv(t,i):console.error('The dismiss element with id "'.concat(e,'" does not exist. Please check the data-dismiss-target attribute.'))})}
vendor: 19,189 bytes, line 2
2typeof window<"u"&&(window.Dismiss=pv,window.initDismisses=ip);var xt="top",Kt="bottom",Yt="right",Et="left",rp="auto",Ko=[xt,Kt,Yt,Et],Yr="start",go="end",ZC="clippingParents",mv="viewport",Cs="popper",ek="reference",bg=Ko.reduce(function(i,e){return i.concat([e+"-"+Yr,e+"-"+go])},[]),gv=[].concat(Ko,[rp]).reduce(function(i,e){return i.concat([e,e+"-"+Yr,e+"-"+go])},[]),tk="beforeRead",nk="read",ik="afterRead",rk="beforeMain",sk="main",ok="afterMain",ak="beforeWrite",lk="write",uk="afterWrite",ck=[tk,nk,ik,rk,sk,ok,ak,lk,uk];function Cn(i){return i?(i.nodeName||"").toLowerCase():null}function Nt(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function ar(i){var e=Nt(i).Element;return i instanceof e||i instanceof Element}function Ut(i){var e=Nt(i).HTMLElement;return i instanceof e||i instanceof HTMLElement}function sp(i){if(typeof ShadowRoot>"u")return!1;var e=Nt(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function dk(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},s=e.elements[t];!Ut(s)||!Cn(s)||(Object.assign(s.style,n),Object.keys(r).forEach(function(o){var l=r[o];l===!1?s.removeAttribute(o):s.setAttribute(o,l===!0?"":l)}))})}function hk(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var r=e.elements[n],s=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),l=o.reduce(function(a,u){return a[u]="",a},{});!Ut(r)||!Cn(r)||(Object.assign(r.style,l),Object.keys(s).forEach(function(a){r.removeAttribute(a)}))})}}const bv={name:"applyStyles",enabled:!0,phase:"write",fn:dk,effect:hk,requires:["computeStyles"]};function En(i){return i.split("-")[0]}var er=Math.max,kl=Math.min,Xr=Math.round;function ah(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function yv(){return!/^((?!chrome|android).)*safari/i.test(ah())}function Jr(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=i.getBoundingClientRect(),r=1,s=1;e&&Ut(i)&&(r=i.offsetWidth>0&&Xr(n.width)/i.offsetWidth||1,s=i.offsetHeight>0&&Xr(n.height)/i.offsetHeight||1);var o=ar(i)?Nt(i):window,l=o.visualViewport,a=!yv()&&t,u=(n.left+(a&&l?l.offsetLeft:0))/r,c=(n.top+(a&&l?l.offsetTop:0))/s,h=n.width/r,d=n.height/s;return{width:h,height:d,top:c,right:u+h,bottom:c+d,left:u,x:u,y:c}}function op(i){var e=Jr(i),t=i.offsetWidth,n=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:n}}function vv(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&sp(t)){var n=e;do{if(n&&i.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Wn(i){return Nt(i).getComputedStyle(i)}function fk(i){return["table","td","th"].indexOf(Cn(i))>=0}function Oi(i){return((ar(i)?i.ownerDocument:i.document)||window.document).documentElement}function Zu(i){return Cn(i)==="html"?i:i.assignedSlot||i.parentNode||(sp(i)?i.host:null)||Oi(i)}function yg(i){return!Ut(i)||Wn(i).position==="fixed"?null:i.offsetParent}function pk(i){var e=/firefox/i.test(ah()),t=/Trident/i.test(ah());if(t&&Ut(i)){var n=Wn(i);if(n.position==="fixed")return null}var r=Zu(i);for(sp(r)&&(r=r.host);Ut(r)&&["html","body"].indexOf(Cn(r))<0;){var s=Wn(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function Yo(i){for(var e=Nt(i),t=yg(i);t&&fk(t)&&Wn(t).position==="static";)t=yg(t);return t&&(Cn(t)==="html"||Cn(t)==="body"&&Wn(t).position==="static")?e:t||pk(i)||e}function ap(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function Gs(i,e,t){return er(i,kl(e,t))}function mk(i,e,t){var n=Gs(i,e,t);return n>t?t:n}function wv(){return{top:0,right:0,bottom:0,left:0}}function xv(i){return Object.assign({},wv(),i)}function Ev(i,e){return e.reduce(function(t,n){return t[n]=i,t},{})}var gk=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,xv(typeof e!="number"?e:Ev(e,Ko))};function bk(i){var e,t=i.state,n=i.name,r=i.options,s=t.elements.arrow,o=t.modifiersData.popperOffsets,l=En(t.placement),a=ap(l),u=[Et,Yt].indexOf(l)>=0,c=u?"height":"width";if(!(!s||!o)){var h=gk(r.padding,t),d=op(s),f=a==="y"?xt:Et,p=a==="y"?Kt:Yt,b=t.rects.reference[c]+t.rects.reference[a]-o[a]-t.rects.popper[c],m=o[a]-t.rects.reference[a],v=Yo(s),g=v?a==="y"?v.clientHeight||0:v.clientWidth||0:0,y=b/2-m/2,w=h[f],E=g-d[c]-h[p],x=g/2-d[c]/2+y,S=Gs(w,x,E),_=a;t.modifiersData[n]=(e={},e[_]=S,e.centerOffset=S-x,e)}}function yk(i){var e=i.state,t=i.options,n=t.element,r=n===void 0?"[data-popper-arrow]":n;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||vv(e.elements.popper,r)&&(e.elements.arrow=r))}const vk={name:"arrow",enabled:!0,phase:"main",fn:bk,effect:yk,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Qr(i){return i.split("-")[1]}var wk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xk(i,e){var t=i.x,n=i.y,r=e.devicePixelRatio||1;return{x:Xr(t*r)/r||0,y:Xr(n*r)/r||0}}function vg(i){var e,t=i.popper,n=i.popperRect,r=i.placement,s=i.variation,o=i.offsets,l=i.position,a=i.gpuAcceleration,u=i.adaptive,c=i.roundOffsets,h=i.isFixed,d=o.x,f=d===void 0?0:d,p=o.y,b=p===void 0?0:p,m=typeof c=="function"?c({x:f,y:b}):{x:f,y:b};f=m.x,b=m.y;var v=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),y=Et,w=xt,E=window;if(u){var x=Yo(t),S="clientHeight",_="clientWidth";if(x===Nt(t)&&(x=Oi(t),Wn(x).position!=="static"&&l==="absolute"&&(S="scrollHeight",_="scrollWidth")),x=x,r===xt||(r===Et||r===Yt)&&s===go){w=Kt;var M=h&&x===E&&E.visualViewport?E.visualViewport.height:x[S];b-=M-n.height,b*=a?1:-1}if(r===Et||(r===xt||r===Kt)&&s===go){y=Yt;var O=h&&x===E&&E.visualViewport?E.visualViewport.width:x[_];f-=O-n.width,f*=a?1:-1}}var D=Object.assign({position:l},u&&wk),k=c===!0?xk({x:f,y:b},Nt(t)):{x:f,y:b};if(f=k.x,b=k.y,a){var A;return Object.assign({},D,(A={},A[w]=g?"0":"",A[y]=v?"0":"",A.transform=(E.devicePixelRatio||1)<=1?"translate("+f+"px, "+b+"px)":"translate3d("+f+"px, "+b+"px, 0)",A))}return Object.assign({},D,(e={},e[w]=g?b+"px":"",e[y]=v?f+"px":"",e.transform="",e))}function Ek(i){var e=i.state,t=i.options,n=t.gpuAcceleration,r=n===void 0?!0:n,s=t.adaptive,o=s===void 0?!0:s,l=t.roundOffsets,a=l===void 0?!0:l,u={placement:En(e.placement),variation:Qr(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,vg(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,vg(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Tk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ek,data:{}};var ga={passive:!0};function Sk(i){var e=i.state,t=i.instance,n=i.options,r=n.scroll,s=r===void 0?!0:r,o=n.resize,l=o===void 0?!0:o,a=Nt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&u.forEach(function(c){c.addEventListener("scroll",t.update,ga)}),l&&a.addEventListener("resize",t.update,ga),function(){s&&u.forEach(function(c){c.removeEventListener("scroll",t.update,ga)}),l&&a.removeEventListener("resize",t.update,ga)}}const Ck={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Sk,data:{}};var kk={left:"right",right:"left",bottom:"top",top:"bottom"};function nl(i){return i.replace(/left|right|bottom|top/g,function(e){return kk[e]})}var _k={start:"end",end:"start"};function wg(i){return i.replace(/start|end/g,function(e){return _k[e]})}function lp(i){var e=Nt(i),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function up(i){return Jr(Oi(i)).left+lp(i).scrollLeft}function Ak(i,e){var t=Nt(i),n=Oi(i),r=t.visualViewport,s=n.clientWidth,o=n.clientHeight,l=0,a=0;if(r){s=r.width,o=r.height;var u=yv();(u||!u&&e==="fixed")&&(l=r.offsetLeft,a=r.offsetTop)}return{width:s,height:o,x:l+up(i),y:a}}function Lk(i){var e,t=Oi(i),n=lp(i),r=(e=i.ownerDocument)==null?void 0:e.body,s=er(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=er(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-n.scrollLeft+up(i),a=-n.scrollTop;return Wn(r||t).direction==="rtl"&&(l+=er(t.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:l,y:a}}function cp(i){var e=Wn(i),t=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+r+n)}function Tv(i){return["html","body","#document"].indexOf(Cn(i))>=0?i.ownerDocument.body:Ut(i)&&cp(i)?i:Tv(Zu(i))}function Ks(i,e){var t;e===void 0&&(e=[]);var n=Tv(i),r=n===((t=i.ownerDocument)==null?void 0:t.body),s=Nt(n),o=r?[s].concat(s.visualViewport||[],cp(n)?n:[]):n,l=e.concat(o);return r?l:l.concat(Ks(Zu(o)))}function lh(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function Mk(i,e){var t=Jr(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function xg(i,e,t){return e===mv?lh(Ak(i,t)):ar(e)?Mk(e,t):lh(Lk(Oi(i)))}function Ik(i){var e=Ks(Zu(i)),t=["absolute","fixed"].indexOf(Wn(i).position)>=0,n=t&&Ut(i)?Yo(i):i;return ar(n)?e.filter(function(r){return ar(r)&&vv(r,n)&&Cn(r)!=="body"}):[]}function Ok(i,e,t,n){var r=e==="clippingParents"?Ik(i):[].concat(e),s=[].concat(r,[t]),o=s[0],l=s.reduce(function(a,u){var c=xg(i,u,n);return a.top=er(c.top,a.top),a.right=kl(c.right,a.right),a.bottom=kl(c.bottom,a.bottom),a.left=er(c.left,a.left),a},xg(i,o,n));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Sv(i){var e=i.reference,t=i.element,n=i.placement,r=n?En(n):null,s=n?Qr(n):null,o=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,a;switch(r){case xt:a={x:o,y:e.y-t.height};break;case Kt:a={x:o,y:e.y+e.height};break;case Yt:a={x:e.x+e.width,y:l};break;case Et:a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}var u=r?ap(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(s){case Yr:a[u]=a[u]-(e[c]/2-t[c]/2);break;case go:a[u]=a[u]+(e[c]/2-t[c]/2);break}}return a}function bo(i,e){e===void 0&&(e={});var t=e,n=t.placement,r=n===void 0?i.placement:n,s=t.strategy,o=s===void 0?i.strategy:s,l=t.boundary,a=l===void 0?ZC:l,u=t.rootBoundary,c=u===void 0?mv:u,h=t.elementContext,d=h===void 0?Cs:h,f=t.altBoundary,p=f===void 0?!1:f,b=t.padding,m=b===void 0?0:b,v=xv(typeof m!="number"?m:Ev(m,Ko)),g=d===Cs?ek:Cs,y=i.rects.popper,w=i.elements[p?g:d],E=Ok(ar(w)?w:w.contextElement||Oi(i.elements.popper),a,c,o),x=Jr(i.elements.reference),S=Sv({reference:x,element:y,strategy:"absolute",placement:r}),_=lh(Object.assign({},y,S)),M=d===Cs?_:x,O={top:E.top-M.top+v.top,bottom:M.bottom-E.bottom+v.bottom,left:E.left-M.left+v.left,right:M.right-E.right+v.right},D=i.modifiersData.offset;if(d===Cs&&D){var k=D[r];Object.keys(O).forEach(function(A){var C=[Yt,Kt].indexOf(A)>=0?1:-1,T=[xt,Kt].indexOf(A)>=0?"y":"x";O[A]+=k[T]*C})}return O}function Dk(i,e){e===void 0&&(e={});var t=e,n=t.placement,r=t.boundary,s=t.rootBoundary,o=t.padding,l=t.flipVariations,a=t.allowedAutoPlacements,u=a===void 0?gv:a,c=Qr(n),h=c?l?bg:bg.filter(function(p){return Qr(p)===c}):Ko,d=h.filter(function(p){return u.indexOf(p)>=0});d.length===0&&(d=h);var f=d.reduce(function(p,b){return p[b]=bo(i,{placement:b,boundary:r,rootBoundary:s,padding:o})[En(b)],p},{});return Object.keys(f).sort(function(p,b){return f[p]-f[b]})}function Pk(i){if(En(i)===rp)return[];var e=nl(i);return[wg(i),e,wg(e)]}function Rk(i){var e=i.state,t=i.options,n=i.name;if(!e.modifiersData[n]._skip){for(var r=t.mainAxis,s=r===void 0?!0:r,o=t.altAxis,l=o===void 0?!0:o,a=t.fallbackPlacements,u=t.padding,c=t.boundary,h=t.rootBoundary,d=t.altBoundary,f=t.flipVariations,p=f===void 0?!0:f,b=t.allowedAutoPlacements,m=e.options.placement,v=En(m),g=v===m,y=a||(g||!p?[nl(m)]:Pk(m)),w=[m].concat(y).reduce(function(Y,V){return Y.concat(En(V)===rp?Dk(e,{placement:V,boundary:c,rootBoundary:h,padding:u,flipVariations:p,allowedAutoPlacements:b}):V)},[]),E=e.rects.reference,x=e.rects.popper,S=new Map,_=!0,M=w[0],O=0;O<w.length;O++){var D=w[O],k=En(D),A=Qr(D)===Yr,C=[xt,Kt].indexOf(k)>=0,T=C?"width":"height",L=bo(e,{placement:D,boundary:c,rootBoundary:h,altBoundary:d,padding:u}),I=C?A?Yt:Et:A?Kt:xt;E[T]>x[T]&&(I=nl(I));var P=nl(I),R=[];if(s&&R.push(L[k]<=0),l&&R.push(L[I]<=0,L[P]<=0),R.every(function(Y){return Y})){M=D,_=!1;break}S.set(D,R)}if(_)for(var z=p?3:1,N=function(V){var Q=w.find(function(le){var be=S.get(le);if(be)return be.slice(0,V).every(function(qe){return qe})});if(Q)return M=Q,"break"},B=z;B>0;B--){var j=N(B);if(j==="break")break}e.placement!==M&&(e.modifiersData[n]._skip=!0,e.placement=M,e.reset=!0)}}const Nk={name:"flip",enabled:!0,phase:"main",fn:Rk,requiresIfExists:["offset"],data:{_skip:!1}};function Eg(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function Tg(i){return[xt,Yt,Kt,Et].some(function(e){return i[e]>=0})}function Bk(i){var e=i.state,t=i.name,n=e.rects.reference,r=e.rects.popper,s=e.modifiersData.preventOverflow,o=bo(e,{elementContext:"reference"}),l=bo(e,{altBoundary:!0}),a=Eg(o,n),u=Eg(l,r,s),c=Tg(a),h=Tg(u);e.modifiersData[t]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":h})}const Fk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Bk};function zk(i,e,t){var n=En(i),r=[Et,xt].indexOf(n)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,o=s[0],l=s[1];return o=o||0,l=(l||0)*r,[Et,Yt].indexOf(n)>=0?{x:l,y:o}:{x:o,y:l}}function Vk(i){var e=i.state,t=i.options,n=i.name,r=t.offset,s=r===void 0?[0,0]:r,o=gv.reduce(function(c,h){return c[h]=zk(h,e.rects,s),c},{}),l=o[e.placement],a=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=u),e.modifiersData[n]=o}const Hk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vk};function jk(i){var e=i.state,t=i.name;e.modifiersData[t]=Sv({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const $k={name:"popperOffsets",enabled:!0,phase:"read",fn:jk,data:{}};function qk(i){return i==="x"?"y":"x"}function Uk(i){var e=i.state,t=i.options,n=i.name,r=t.mainAxis,s=r===void 0?!0:r,o=t.altAxis,l=o===void 0?!1:o,a=t.boundary,u=t.rootBoundary,c=t.altBoundary,h=t.padding,d=t.tether,f=d===void 0?!0:d,p=t.tetherOffset,b=p===void 0?0:p,m=bo(e,{boundary:a,rootBoundary:u,padding:h,altBoundary:c}),v=En(e.placement),g=Qr(e.placement),y=!g,w=ap(v),E=qk(w),x=e.modifiersData.popperOffsets,S=e.rects.reference,_=e.rects.popper,M=typeof b=="function"?b(Object.assign({},e.rects,{placement:e.placement})):b,O=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(x){if(s){var A,C=w==="y"?xt:Et,T=w==="y"?Kt:Yt,L=w==="y"?"height":"width",I=x[w],P=I+m[C],R=I-m[T],z=f?-_[L]/2:0,N=g===Yr?S[L]:_[L],B=g===Yr?-_[L]:-S[L],j=e.elements.arrow,Y=f&&j?op(j):{width:0,height:0},V=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:wv(),Q=V[C],le=V[T],be=Gs(0,S[L],Y[L]),qe=y?S[L]/2-z-be-Q-O.mainAxis:N-be-Q-O.mainAxis,Pe=y?-S[L]/2+z+be+le+O.mainAxis:B+be+le+O.mainAxis,Xe=e.elements.arrow&&Yo(e.elements.arrow),on=Xe?w==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,Xt=(A=D==null?void 0:D[w])!=null?A:0,zi=I+qe-Xt-on,Vi=I+Pe-Xt,an=Gs(f?kl(P,zi):P,I,f?er(R,Vi):R);x[w]=an,k[w]=an-I}if(l){var ln,Zn=w==="x"?xt:Et,ei=w==="x"?Kt:Yt,kt=x[E],Bt=E==="y"?"height":"width",Jt=kt+m[Zn],un=kt-m[ei],Qt=[xt,Et].indexOf(v)!==-1,ca=(ln=D==null?void 0:D[E])!=null?ln:0,da=Qt?Jt:kt-S[Bt]-_[Bt]-ca+O.altAxis,ha=Qt?kt+S[Bt]+_[Bt]-ca-O.altAxis:un,fa=f&&Qt?mk(da,kt,ha):Gs(f?da:Jt,kt,f?ha:un);x[E]=fa,k[E]=fa-kt}e.modifiersData[n]=k}}const Wk={name:"preventOverflow",enabled:!0,phase:"main",fn:Uk,requiresIfExists:["offset"]};function Gk(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function Kk(i){return i===Nt(i)||!Ut(i)?lp(i):Gk(i)}function Yk(i){var e=i.getBoundingClientRect(),t=Xr(e.width)/i.offsetWidth||1,n=Xr(e.height)/i.offsetHeight||1;return t!==1||n!==1}function Xk(i,e,t){t===void 0&&(t=!1);var n=Ut(e),r=Ut(e)&&Yk(e),s=Oi(e),o=Jr(i,r,t),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(n||!n&&!t)&&((Cn(e)!=="body"||cp(s))&&(l=Kk(e)),Ut(e)?(a=Jr(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):s&&(a.x=up(s))),{x:o.left+l.scrollLeft-a.x,y:o.top+l.scrollTop-a.y,width:o.width,height:o.height}}function Jk(i){var e=new Map,t=new Set,n=[];i.forEach(function(s){e.set(s.name,s)});function r(s){t.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(l){if(!t.has(l)){var a=e.get(l);a&&r(a)}}),n.push(s)}return i.forEach(function(s){t.has(s.name)||r(s)}),n}function Qk(i){var e=Jk(i);return ck.reduce(function(t,n){return t.concat(e.filter(function(r){return r.phase===n}))},[])}function Zk(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function e_(i){var e=i.reduce(function(t,n){var r=t[n.name];return t[n.name]=r?Object.assign({},r,n,{options:Object.assign({},r.options,n.options),data:Object.assign({},r.data,n.data)}):n,t},{});return Object.keys(e).map(function(t){return e[t]})}var Sg={placement:"bottom",modifiers:[],strategy:"absolute"};function Cg(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function t_(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,n=t===void 0?[]:t,r=e.defaultOptions,s=r===void 0?Sg:r;return function(l,a,u){u===void 0&&(u=s);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Sg,s),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},h=[],d=!1,f={state:c,setOptions:function(v){var g=typeof v=="function"?v(c.options):v;b(),c.options=Object.assign({},s,c.options,g),c.scrollParents={reference:ar(l)?Ks(l):l.contextElement?Ks(l.contextElement):[],popper:Ks(a)};var y=Qk(e_([].concat(n,c.options.modifiers)));return c.orderedModifiers=y.filter(function(w){return w.enabled}
2),p(),f.update()},forceUpdate:function(){if(!d){var v=c.elements,g=v.reference,y=v.popper;if(Cg(g,y)){c.rects={reference:Xk(g,Yo(y),c.options.strategy==="fixed"),popper:op(y)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(O){return c.modifiersData[O.name]=Object.assign({},O.data)});for(var w=0;w<c.orderedModifiers.length;w++){if(c.reset===!0){c.reset=!1,w=-1;continue}var E=c.orderedModifiers[w],x=E.fn,S=E.options,_=S===void 0?{}:S,M=E.name;typeof x=="function"&&(c=x({state:c,options:_,name:M,instance:f})||c)}}}},update:Zk(function(){return new Promise(function(m){f.forceUpdate(),m(c)})}),destroy:function(){b(),d=!0}};if(!Cg(l,a))return f;f.setOptions(u).then(function(m){!d&&u.onFirstUpdate&&u.onFirstUpdate(m)});function p(){c.orderedModifiers.forEach(function(m){var v=m.name,g=m.options,y=g===void 0?{}:g,w=m.effect;if(typeof w=="function"){var E=w({state:c,name:v,instance:f,options:y}),x=function(){};h.push(E||x)}})}function b(){h.forEach(function(m){return m()}),h=[]}return f}}var n_=[Ck,$k,Tk,bv,Hk,Nk,Wk,vk,Fk],ec=t_({defaultModifiers:n_}),si=function(){return si=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},si.apply(this,arguments)},ba=function(i,e,t){if(t||arguments.length===2)for(var n=0,r=e.length,s;n<r;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return i.concat(s||Array.prototype.slice.call(e))},oi={placement:"bottom",triggerType:"click",offsetSkidding:0,offsetDistance:10,delay:300,ignoreClickOutsideClass:!1,onShow:function(){},onHide:function(){},onToggle:function(){}},i_={id:null,override:!0},Cv=function(){function i(e,t,n,r){e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=oi),r===void 0&&(r=i_),this._instanceId=r.id?r.id:e.id,this._targetEl=e,this._triggerEl=t,this._options=si(si({},oi),n),this._popperInstance=null,this._visible=!1,this._initialized=!1,this.init(),he.addInstance("Dropdown",this,this._instanceId,r.override)}return i.prototype.init=function(){this._triggerEl&&this._targetEl&&!this._initialized&&(this._popperInstance=this._createPopperInstance(),this._setupEventListeners(),this._initialized=!0)},i.prototype.destroy=function(){var e=this,t=this._getTriggerEvents();this._options.triggerType==="click"&&t.showEvents.forEach(function(n){e._triggerEl.removeEventListener(n,e._clickHandler)}),this._options.triggerType==="hover"&&(t.showEvents.forEach(function(n){e._triggerEl.removeEventListener(n,e._hoverShowTriggerElHandler),e._targetEl.removeEventListener(n,e._hoverShowTargetElHandler)}),t.hideEvents.forEach(function(n){e._triggerEl.removeEventListener(n,e._hoverHideHandler),e._targetEl.removeEventListener(n,e._hoverHideHandler)})),this._popperInstance.destroy(),this._initialized=!1},i.prototype.removeInstance=function(){he.removeInstance("Dropdown",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype._setupEventListeners=function(){var e=this,t=this._getTriggerEvents();this._clickHandler=function(){e.toggle()},this._options.triggerType==="click"&&t.showEvents.forEach(function(n){e._triggerEl.addEventListener(n,e._clickHandler)}),this._hoverShowTriggerElHandler=function(n){n.type==="click"?e.toggle():setTimeout(function(){e.show()},e._options.delay)},this._hoverShowTargetElHandler=function(){e.show()},this._hoverHideHandler=function(){setTimeout(function(){e._targetEl.matches(":hover")||e.hide()},e._options.delay)},this._options.triggerType==="hover"&&(t.showEvents.forEach(function(n){e._triggerEl.addEventListener(n,e._hoverShowTriggerElHandler),e._targetEl.addEventListener(n,e._hoverShowTargetElHandler)}),t.hideEvents.forEach(function(n){e._triggerEl.addEventListener(n,e._hoverHideHandler),e._targetEl.addEventListener(n,e._hoverHideHandler)}))},i.prototype._createPopperInstance=function(){return ec(this._triggerEl,this._targetEl,{placement:this._options.placement,modifiers:[{name:"offset",options:{offset:[this._options.offsetSkidding,this._options.offsetDistance]}}]})},i.prototype._setupClickOutsideListener=function(){var e=this;this._clickOutsideEventListener=function(t){e._handleClickOutside(t,e._targetEl)},document.body.addEventListener("click",this._clickOutsideEventListener,!0)},i.prototype._removeClickOutsideListener=function(){document.body.removeEventListener("click",this._clickOutsideEventListener,!0)},i.prototype._handleClickOutside=function(e,t){var n=e.target,r=this._options.ignoreClickOutsideClass,s=!1;if(r){var o=document.querySelectorAll(".".concat(r));o.forEach(function(l){if(l.contains(n)){s=!0;return}})}n!==t&&!t.contains(n)&&!this._triggerEl.contains(n)&&!s&&this.isVisible()&&this.hide()},i.prototype._getTriggerEvents=function(){switch(this._options.triggerType){case"hover":return{showEvents:["mouseenter","click"],hideEvents:["mouseleave"]};case"click":return{showEvents:["click"],hideEvents:[]};case"none":return{showEvents:[],hideEvents:[]};default:return{showEvents:["click"],hideEvents:[]}}},i.prototype.toggle=function(){this.isVisible()?this.hide():this.show(),this._options.onToggle(this)},i.prototype.isVisible=function(){return this._visible},i.prototype.show=function(){this._targetEl.classList.remove("hidden"),this._targetEl.classList.add("block"),this._popperInstance.setOptions(function(e){return si(si({},e),{modifiers:ba(ba([],e.modifiers,!0),[{name:"eventListeners",enabled:!0}],!1)})}),this._setupClickOutsideListener(),this._popperInstance.update(
2),this._visible=!0,this._options.onShow(this)},i.prototype.hide=function(){this._targetEl.classList.remove("block"),this._targetEl.classList.add("hidden"),this._popperInstance.setOptions(function(e){return si(si({},e),{modifiers:ba(ba([],e.modifiers,!0),[{name:"eventListeners",enabled:!1}],!1)})}),this._visible=!1,this._removeClickOutsideListener(),this._options.onHide(this)},i.prototype.updateOnShow=function(e){this._options.onShow=e},i.prototype.updateOnHide=function(e){this._options.onHide=e},i.prototype.updateOnToggle=function(e){this._options.onToggle=e},i}();function dp(){document.querySelectorAll("[data-dropdown-toggle]").forEach(function(i){var e=i.getAttribute("data-dropdown-toggle"),t=document.getElementById(e);if(t){var n=i.getAttribute("data-dropdown-placement"),r=i.getAttribute("data-dropdown-offset-skidding"),s=i.getAttribute("data-dropdown-offset-distance"),o=i.getAttribute("data-dropdown-trigger"),l=i.getAttribute("data-dropdown-delay"),a=i.getAttribute("data-dropdown-ignore-click-outside-class");new Cv(t,i,{placement:n||oi.placement,triggerType:o||oi.triggerType,offsetSkidding:r?parseInt(r):oi.offsetSkidding,offsetDistance:s?parseInt(s):oi.offsetDistance,delay:l?parseInt(l):oi.delay,ignoreClickOutsideClass:a||oi.ignoreClickOutsideClass})}else console.error('The dropdown element with id "'.concat(e,'" does not exist. Please check the data-dropdown-toggle attribute.'))})}typeof window<"u"&&(window.Dropdown=Cv,window.initDropdowns=dp);var _l=function(){return _l=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},_l.apply(this,arguments)},Al={placement:"center",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",backdrop:"dynamic",closable:!0,onHide:function(){},onShow:function(){},onToggle:function(){}},r_={id:null,override:!0},jr=function(){function i(e,t,n){e===void 0&&(e=null),t===void 0&&(t=Al),n===void 0&&(n=r_),this._eventListenerInstances=[],this._instanceId=n.id?n.id:e.id,this._targetEl=e,this._options=_l(_l({},Al),t),this._isHidden=!0,this._backdropEl=null,this._initialized=!1,this.init(),he.addInstance("Modal",this,this._instanceId,n.override)}return i.prototype.init=function(){var e=this;this._targetEl&&!this._initialized&&(this._getPlacementClasses().map(function(t){e._targetEl.classList.add(t)}),this._initialized=!0)},i.prototype.destroy=function(){this._initialized&&(this.removeAllEventListenerInstances(),this._destroyBackdropEl(),this._initialized=!1)},i.prototype.removeInstance=function(){he.removeInstance("Modal",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype._createBackdrop=function(){var e;if(this._isHidden){var t=document.createElement("div");(e=t.classList).add.apply(e,this._options.backdropClasses.split(" ")),document.querySelector("body").append(t),this._backdropEl=t}},i.prototype._destroyBackdropEl=function(){!this._isHidden&&this._backdropEl&&(this._backdropEl.remove(),this._backdropEl=null)},i.prototype._setupModalCloseEventListeners=function(){var e=this;this._options.backdrop==="dynamic"&&(this._clickOutsideEventListener=function(t){e._handleOutsideClick(t.target)},this._targetEl.addEventListener("click",this._clickOutsideEventListener,!0)),this._keydownEventListener=function(t){t.key==="Escape"&&e.hide()},document.body.addEventListener("keydown",this._keydownEventListener,!0)},i.prototype._removeModalCloseEventListeners=function(){this._options.backdrop==="dynamic"&&this._targetEl.removeEventListener("click",this._clickOutsideEventListener,!0),document.body.removeEventListener("keydown",this._keydownEventListener,!0)},i.prototype._handleOutsideClick=function(e){(e===this._targetEl||e===this._backdropEl&&this.isVisible())&&this.hide()},i.prototype._getPlacementClasses=function(){switch(this._options.placement){case"top-left":return["justify-start","items-start"];case"top-center":return["justify-center","items-start"];case"top-right":return["justify-end","items-start"];case"center-left":return["justify-start","items-center"];case"center":return["justify-center","items-center"];case"center-right":return["justify-end","items-center"];case"bottom-left":return["justify-start","items-end"];case"bottom-center":return["justify-center","items-end"];case"bottom-right":return["justify-end","items-end"];default:return["justify-center","items-center"]}},i.prototype.toggle=function(){this._isHidden?this.show():this.hide(),this._options.onToggle(this)},i.prototype.show=function(){this.isHidden&&(this._targetEl.classList.add("flex"),this._targetEl.classList.remove("hidden"),this._targetEl.setAttribute("aria-modal","true"),this._targetEl.setAttribute("role","dialog"),this._targetEl.removeAttribute("aria-hidden"),this._createBackdrop(),this._isHidden=!1,this._options.closable&&this._setupModalCloseEventListeners(),document.body.classList.add("overflow-hidden"),this._options.onShow(this))},i.prototype.hide=function(){this.isVisible&&(this._targetEl.classList.add("hidden"),this._targetEl.classList.remove("flex"),this._targetEl.setAttribute("aria-hidden","true"),this._targetEl.removeAttribute("aria-modal"),this._targetEl.removeAttribute("role"),this._destroyBackdropEl(),this._isHidden=!0,document.body.classList.remove("overflow-hidden"),this._options.closable&&this._removeModalCloseEventListeners(),this._options.onHide(this))},i.prototype.isVisible=function(){return!this._isHidden},i.prototype.isHidden=function(){return this._isHidden},i.prototype.addEventListenerInstance=function(e,t,n){this._eventListenerInstances.push({element:e,type:t,handler:n})},i.prototype.removeAllEventListenerInstances=function(){this._eventListenerInstances.map(function(e){e.element.removeEventListener(e.type,e.handler)}),this._eventListenerInstances=[]},i.prototype.getAllEventListenerInstances=function(){return this._eventListenerInstances},i.prototype.updateOnShow=function(e){this._options.onShow=e},i.prototype.updateOnHide=function(e){this._options.onHide=e},i.prototype.updateOnToggle=function(e){this._options.onToggle=e},i}();function hp(){document.querySelectorAll("[data-modal-target]").forEach(function(i){var e=i.getAttribute("data-modal-target"),t=document.getElementById(e);if(t){var n=t.getAttribute("data-modal-placement"),r=t.getAttribute("data-modal-backdrop");new jr(t,{placement:n||Al.placement,backdrop:r||Al.backdrop})}
2else console.error("Modal with id ".concat(e," does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?."))}),document.querySelectorAll("[data-modal-toggle]").forEach(function(i){var e=i.getAttribute("data-modal-toggle"),t=document.getElementById(e);if(t){var n=he.getInstance("Modal",e);if(n){var r=function(){n.toggle()};i.addEventListener("click",r),n.addEventListenerInstance(i,"click",r)}else console.error("Modal with id ".concat(e," has not been initialized. Please initialize it using the data-modal-target attribute."))}else console.error("Modal with id ".concat(e," does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?"))}),document.querySelectorAll("[data-modal-show]").forEach(function(i){var e=i.getAttribute("data-modal-show"),t=document.getElementById(e);if(t){var n=he.getInstance("Modal",e);if(n){var r=function(){n.show()};i.addEventListener("click",r),n.addEventListenerInstance(i,"click",r)}else console.error("Modal with id ".concat(e," has not been initialized. Please initialize it using the data-modal-target attribute."))}
2else console.error("Modal with id ".concat(e," does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?"))}),document.querySelectorAll("[data-modal-hide]").forEach(function(i){var e=i.getAttribute("data-modal-hide"),t=document.getElementById(e);if(t){var n=he.getInstance("Modal",e);if(n){var r=function(){n.hide()};i.addEventListener("click",r),n.addEventListenerInstance(i,"click",r)}else console.error("Modal with id ".concat(e," has not been initialized. Please initialize it using the data-modal-target attribute."))}else console.error("Modal with id ".concat(e," does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?"))})}typeof window<"u"&&(window.Modal=jr,window.initModals=hp);var Ll=function(){return Ll=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},Ll.apply(this,arguments)},Wi={placement:"left",bodyScrolling:!1,backdrop:!0,edge:!1,edgeOffset:"bottom-[60px]",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30",onShow:function(){},onHide:function(){},onToggle:function(){}},s_={id:null,override:!0},fp=function(){function i(e,t,n){e===void 0&&(e=null),t===void 0&&(t=Wi),n===void 0&&(n=s_),this._eventListenerInstances=[],this._instanceId=n.id?n.id:e.id,this._targetEl=e,this._options=Ll(Ll({},Wi),t),this._visible=!1,this._initialized=!1,this.init(),he.addInstance("Drawer",this,this._instanceId,n.override)}return i.prototype.init=function(){var e=this;this._targetEl&&!this._initialized&&(this._targetEl.setAttribute("aria-hidden","true"),this._targetEl.classList.add("transition-transform"),this._getPlacementClasses(this._options.placement).base.map(function(t){e._targetEl.classList.add(t)}),this._handleEscapeKey=function(t){t.key==="Escape"&&e.isVisible()&&e.hide()},document.addEventListener("keydown",this._handleEscapeKey),this._initialized=!0)},i.prototype.destroy=function(){this._initialized&&(this.removeAllEventListenerInstances(),this._destroyBackdropEl(),document.removeEventListener("keydown",this._handleEscapeKey),this._initialized=!1)},i.prototype.removeInstance=function(){he.removeInstance("Drawer",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.hide=function(){var e=this;this._options.edge?(this._getPlacementClasses(this._options.placement+"-edge").active.map(function(t){e._targetEl.classList.remove(t)}),this._getPlacementClasses(this._options.placement+"-edge").inactive.map(function(t){e._targetEl.classList.add(t)})):(this._getPlacementClasses(this._options.placement).active.map(function(t){e._targetEl.classList.remove(t)}),this._getPlacementClasses(this._options.placement).inactive.map(function(t){e._targetEl.classList.add(t)})),this._targetEl.setAttribute("aria-hidden","true"),this._targetEl.removeAttribute("aria-modal"),this._targetEl.removeAttribute("role"),this._options.bodyScrolling||document.body.classList.remove("overflow-hidden"),this._options.backdrop&&this._destroyBackdropEl(),this._visible=!1,this._options.onHide(this)},i.prototype.show=function(){var e=this;this._options.edge?(this._getPlacementClasses(this._options.placement+"-edge").active.map(function(t){e._targetEl.classList.add(t)}),this._getPlacementClasses(this._options.placement+"-edge").inactive.map(function(t){e._targetEl.classList.remove(t)})):(this._getPlacementClasses(this._options.placement).active.map(function(t){e._targetEl.classList.add(t)}),this._getPlacementClasses(this._options.placement).inactive.map(function(t){e._targetEl.classList.remove(t)})),this._targetEl.setAttribute("aria-modal","true"),this._targetEl.setAttribute("role","dialog"),this._targetEl.removeAttribute("aria-hidden"),this._options.bodyScrolling||document.body.classList.add("overflow-hidden"),this._options.backdrop&&this._createBackdrop(),this._visible=!0,this._options.onShow(this)},i.prototype.toggle=function(){this.isVisible()?this.hide():this.show()},i.prototype._createBackdrop=function(){var e,t=this;if(!this._visible){var n=document.createElement("div");n.setAttribute("drawer-backdrop",""),(e=n.classList).add.apply(e,this._options.backdropClasses.split(" ")),document.querySelector("body").append(n),n.addEventListener("click",function(){t.hide()})}},i.prototype._destroyBackdropEl=function(){this._visible&&document.querySelector("[drawer-backdrop]")!==null&&document.querySelector("[drawer-backdrop]").remove()},i.prototype._getPlacementClasses=function(e){switch(e){case"top":return{base:["top-0","left-0","right-0"],active:["transform-none"],inactive:["-translate-y-full"]};case"right":return{base:["right-0","top-0"],active:["transform-none"],inactive:["translate-x-full"]};case"bottom":return{base:["bottom-0","left-0","right-0"],active:["transform-none"],inactive:["translate-y-full"]};case"left":return{base:["left-0","top-0"],active:["transform-none"],inactive:["-translate-x-full"]};case"bottom-edge":return{base:["left-0","top-0"],active:["transform-none"],inactive:["translate-y-full",this._options.edgeOffset]};default:return{base:["left-0","top-0"],active:["transform-none"],inactive:["-translate-x-full"]}}},i.prototype.isHidden=function(){return!this._visible},i.prototype.isVisible=function(){return this._visible},i.prototype.addEventListenerInstance=function(e,t,n){this._eventListenerInstances.push({element:e,type:t,handler:n})},i.prototype.removeAllEventListenerInstances=function(){this._eventListenerInstances.map(function(e){e.element.removeEventListener(e.type,e.handler)}),this._eventListenerInstances=[]},i.prototype.getAllEventListenerInstances=function(){return this._eventListenerInstances},i.prototype.updateOnShow=function(e){this._options.onShow=e},i.prototype.updateOnHide=function(e){this._options.onHide=e},i.prototype.updateOnToggle=function(e){this._options.onToggle=e},i}();function pp(){document.querySelectorAll("[data-drawer-target]").forEach(function(i){var e=i.getAttribute("data-drawer-target"),t=document.getElementById(e);if(t){var n=i.getAttribute("data-drawer-placement"),r=i.getAttribute("data-drawer-body-scrolling"),s=i.getAttribute("data-drawer-backdrop"),o=i.getAttribute("data-drawer-edge"),l=i.getAttribute("data-drawer-edge-offset");new fp(t,{placement:n||Wi.placement,bodyScrolling:r?r==="true":Wi.bodyScrolling,backdrop:s?s==="true":Wi.backdrop,edge:o?o==="true":Wi.edge,edgeOffset:l||Wi.edgeOffset})}
2else console.error("Drawer with id ".concat(e," not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?"))}),document.querySelectorAll("[data-drawer-toggle]").forEach(function(i){var e=i.getAttribute("data-drawer-toggle"),t=document.getElementById(e);if(t){var n=he.getInstance("Drawer",e);if(n){var r=function(){n.toggle()};i.addEventListener("click",r),n.addEventListenerInstance(i,"click",r)}else console.error("Drawer with id ".concat(e," has not been initialized. Please initialize it using the data-drawer-target attribute."))}else console.error("Drawer with id ".concat(e," not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?"))}),document.querySelectorAll("[data-drawer-dismiss], [data-drawer-hide]").forEach(function(i){var e=i.getAttribute("data-drawer-dismiss")?i.getAttribute("data-drawer-dismiss"):i.getAttribute("data-drawer-hide"),t=document.getElementById(e);if(t){var n=he.getInstance("Drawer",e);if(n){var r=function(){n.hide()};i.addEventListener("click",r),n.addEventListenerInstance(i,"click",r)}else console.error("Drawer with id ".concat(e," has not been initialized. Please initialize it using the data-drawer-target attribute."))}else console.error("Drawer with id ".concat(e," not found. Are you sure that the data-drawer-target attribute points to the correct drawer id"))}),document.querySelectorAll("[data-drawer-show]").forEach(function(i){var e=i.getAttribute("data-drawer-show"),t=document.getElementById(e);if(t){var n=he.getInstance("Drawer",e);if(n){var r=function(){n.show()};i.addEventListener("click",r),n.addEventListenerInstance(i,"click",r)}else console.error("Drawer with id ".concat(e," has not been initialized. Please initialize it using the data-drawer-target attribute."))}else console.error("Drawer with id ".concat(e," not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?"))})}typeof window<"u"&&(window.Drawer=fp,window.initDrawers=pp);var Ml=function(){return Ml=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},Ml.apply(this,arguments)},Il={defaultTabId:null,activeClasses:"text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500",inactiveClasses:"dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300",onShow:function(){}},o_={id:null,override:!0},kv=function(){function i(e,t,n,r){e===void 0&&(e=null),t===void 0&&(t=[]),n===void 0&&(n=Il),r===void 0&&(r=o_),this._instanceId=r.id?r.id:e.id,this._tabsEl=e,this._items=t,this._activeTab=n?this.getTab(n.defaultTabId):null,this._options=Ml(Ml({},Il),n),this._initialized=!1,this.init(),he.addInstance("Tabs",this,this._instanceId,r.override)}return i.prototype.init=function(){var e=this;this._items.length&&!this._initialized&&(this._activeTab||this.setActiveTab(this._items[0]),this.show(this._activeTab.id,!0),this._items.map(function(t){t.triggerEl.addEventListener("click",function(n){n.preventDefault(),e.show(t.id)})}))},i.prototype.destroy=function(){this._initialized&&(this._initialized=!1)},i.prototype.removeInstance=function(){this.destroy(),he.removeInstance("Tabs",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.getActiveTab=function(){return this._activeTab},i.prototype.setActiveTab=function(e){this._activeTab=e},i.prototype.getTab=function(e){return this._items.filter(function(t){return t.id===e})[0]},i.prototype.show=function(e,t){var n,r,s=this;t===void 0&&(t=!1);var o=this.getTab(e);o===this._activeTab&&!t||(this._items.map(function(l){var a,u;l!==o&&((a=l.triggerEl.classList).remove.apply(a,s._options.activeClasses.split(" ")),(u=l.triggerEl.classList).add.apply(u,s._options.inactiveClasses.split(" ")),l.targetEl.classList.add("hidden"),l.triggerEl.setAttribute("aria-selected","false"))}),(n=o.triggerEl.classList).add.apply(n,this._options.activeClasses.split(" ")),(r=o.triggerEl.classList).remove.apply(r,this._options.inactiveClasses.split(" ")),o.triggerEl.setAttribute("aria-selected","true"),o.targetEl.classList.remove("hidden"),this.setActiveTab(o),this._options.onShow(this,o))},i.prototype.updateOnShow=function(e){this._options.onShow=e},i}();function mp(){document.querySelectorAll("[data-tabs-toggle]").forEach(function(i){var e=[],t=i.getAttribute("data-tabs-active-classes"),n=i.getAttribute("data-tabs-inactive-classes"),r=null;i.querySelectorAll('[role="tab"]').forEach(function(s){var o=s.getAttribute("aria-selected")==="true",l={id:s.getAttribute("data-tabs-target"),triggerEl:s,targetEl:document.querySelector(s.getAttribute("data-tabs-target"))};e.push(l),o&&(r=l.id)}),new kv(i,e,{defaultTabId:r,activeClasses:t||Il.activeClasses,inactiveClasses:n||Il.inactiveClasses})})}typeof window<"u"&&(window.Tabs=kv,window.initTabs=mp);var ai=function(){return ai=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},ai.apply(this,arguments)},ya=function(i,e,t){if(t||arguments.length===2)for(var n=0,r=e.length,s;n<r;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return i.concat(s||Array.prototype.slice.call(e))},Ol={placement:"top",triggerType:"hover",onShow:function(){},onHide:function(){},onToggle:function(){}},a_={id:null,override:!0},gp=function(){function i(e,t,n,r){e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=Ol),r===void 0&&(r=a_),this._instanceId=r.id?r.id:e.id,this._targetEl=e,this._triggerEl=t,this._options=ai(ai({},Ol),n),this._popperInstance=null,this._visible=!1,this._initialized=!1,this.init(),he.addInstance("Tooltip",this,this._instanceId,r.override)}return i.prototype.init=function(){this._triggerEl&&this._targetEl&&!this._initialized&&(this._setupEventListeners(),this._popperInstance=this._createPopperInstance(),this._initialized=!0)},i.prototype.destroy=function(){var e=this;if(this._initialized){var t=this._getTriggerEvents();
2t.showEvents.forEach(function(n){e._triggerEl.removeEventListener(n,e._showHandler)}),t.hideEvents.forEach(function(n){e._triggerEl.removeEventListener(n,e._hideHandler)}),this._removeKeydownListener(),this._removeClickOutsideListener(),this._popperInstance&&this._popperInstance.destroy(),this._initialized=!1}},i.prototype.removeInstance=function(){he.removeInstance("Tooltip",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype._setupEventListeners=function(){var e=this,t=this._getTriggerEvents();this._showHandler=function(){e.show()},this._hideHandler=function(){e.hide()},t.showEvents.forEach(function(n){e._triggerEl.addEventListener(n,e._showHandler)}),t.hideEvents.forEach(function(n){e._triggerEl.addEventListener(n,e._hideHandler)})},i.prototype._createPopperInstance=function(){return ec(this._triggerEl,this._targetEl,{placement:this._options.placement,modifiers:[{name:"offset",options:{offset:[0,8]}}]})},i.prototype._getTriggerEvents=function(){switch(this._options.triggerType){case"hover":return{showEvents:["mouseenter","focus"],hideEvents:["mouseleave","blur"]};case"click":return{showEvents:["click","focus"],hideEvents:["focusout","blur"]};case"none":return{showEvents:[],hideEvents:[]};default:return{showEvents:["mouseenter","focus"],hideEvents:["mouseleave","blur"]}}},i.prototype._setupKeydownListener=function(){var e=this;this._keydownEventListener=function(t){t.key==="Escape"&&e.hide()},document.body.addEventListener("keydown",this._keydownEventListener,!0)},i.prototype._removeKeydownListener=function(){document.body.removeEventListener("keydown",this._keydownEventListener,!0)},i.prototype._setupClickOutsideListener=function(){var e=this;this._clickOutsideEventListener=function(t){e._handleClickOutside(t,e._targetEl)},document.body.addEventListener("click",this._clickOutsideEventListener,!0)},i.prototype._removeClickOutsideListener=function(){document.body.removeEventListener("click",this._clickOutsideEventListener,!0)},i.prototype._handleClickOutside=function(e,t){var n=e.target;n!==t&&!t.contains(n)&&!this._triggerEl.contains(n)&&this.isVisible()&&this.hide()},i.prototype.isVisible=function(){return this._visible},i.prototype.toggle=function(){this.isVisible()?this.hide():this.show()},i.prototype.show=function(){this._targetEl.classList.remove("opacity-0","invisible"),this._targetEl.classList.add("opacity-100","visible"),this._popperInstance.setOptions(function(e){return ai(ai({},e),{modifiers:ya(ya([],e.modifiers,!0),[{name:"eventListeners",enabled:!0}],!1)})}),this._setupClickOutsideListener(),this._setupKeydownListener(),this._popperInstance.update(),this._visible=!0,this._options.onShow(this)},i.prototype.hide=function(){this._targetEl.classList.remove("opacity-100","visible"),this._targetEl.classList.add("opacity-0","invisible"),this._popperInstance.setOptions(function(e){return ai(ai({},e),{modifiers:ya(ya([],e.modifiers,!0),[{name:"eventListeners",enabled:!1}],!1)})}),this._removeClickOutsideListener(),this._removeKeydownListener(),this._visible=!1,this._options.onHide(this)},i.prototype.updateOnShow=function(e){this._options.onShow=e},i.prototype.updateOnHide=function(e){this._options.onHide=e},i.prototype.updateOnToggle=function(e){this._options.onToggle=e},i}();function bp(){document.querySelectorAll("[data-tooltip-target]").forEach(function(i){var e=i.getAttribute("data-tooltip-target"),t=document.getElementById(e);if(t){var n=i.getAttribute("data-tooltip-trigger"),r=i.getAttribute("data-tooltip-placement");new gp(t,i,{placement:r||Ol.placement,triggerType:n||Ol.triggerType})}else console.error('The tooltip element with id "'.concat(e,'" does not exist. Please check the data-tooltip-target attribute.'))})}typeof window<"u"&&(window.Tooltip=gp,window.initTooltips=bp);var li=function(){return li=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},li.apply(this,arguments)},va=function(i,e,t){if(t||arguments.length===2)for(var n=0,r=e.length,s;n<r;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return i.concat(s||Array.prototype.slice.call(e))},Ys={placement:"top",offset:10,triggerType:"hover",onShow:function(){},onHide:function(){},onToggle:function(){}},l_={id:null,override:!0},_v=function(){function i(e,t,n,r){e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=Ys),r===void 0&&(r=l_),this._instanceId=r.id?r.id:e.id,this._targetEl=e,this._triggerEl=t,this._options=li(li({},Ys),n),this._popperInstance=null,this._visible=!1,this._initialized=!1,this.init(),he.addInstance("Popover",this,r.id?r.id:this._targetEl.id,r.override)}return i.prototype.init=function(){this._triggerEl&&this._targetEl&&!this._initialized&&(this._setupEventListeners(),this._popperInstance=this._createPopperInstance(),this._initialized=!0)},i.prototype.destroy=function(){var e=this;if(this._initialized){var t=this._getTriggerEvents();
2t.showEvents.forEach(function(n){e._triggerEl.removeEventListener(n,e._showHandler),e._targetEl.removeEventListener(n,e._showHandler)}),t.hideEvents.forEach(function(n){e._triggerEl.removeEventListener(n,e._hideHandler),e._targetEl.removeEventListener(n,e._hideHandler)}),this._removeKeydownListener(),this._removeClickOutsideListener(),this._popperInstance&&this._popperInstance.destroy(),this._initialized=!1}},i.prototype.removeInstance=function(){he.removeInstance("Popover",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype._setupEventListeners=function(){var e=this,t=this._getTriggerEvents();this._showHandler=function(){e.show()},this._hideHandler=function(){setTimeout(function(){e._targetEl.matches(":hover")||e.hide()},100)},t.showEvents.forEach(function(n){e._triggerEl.addEventListener(n,e._showHandler),e._targetEl.addEventListener(n,e._showHandler)}),t.hideEvents.forEach(function(n){e._triggerEl.addEventListener(n,e._hideHandler),e._targetEl.addEventListener(n,e._hideHandler)})},i.prototype._createPopperInstance=function(){return ec(this._triggerEl,this._targetEl,{placement:this._options.placement,modifiers:[{name:"offset",options:{offset:[0,this._options.offset]}}]})},i.prototype._getTriggerEvents=function(){switch(this._options.triggerType){case"hover":return{showEvents:["mouseenter","focus"],hideEvents:["mouseleave","blur"]};case"click":return{showEvents:["click","focus"],hideEvents:["focusout","blur"]};case"none":return{showEvents:[],hideEvents:[]};default:return{showEvents:["mouseenter","focus"],hideEvents:["mouseleave","blur"]}}},i.prototype._setupKeydownListener=function(){var e=this;this._keydownEventListener=function(t){t.key==="Escape"&&e.hide()},document.body.addEventListener("keydown",this._keydownEventListener,!0)},i.prototype._removeKeydownListener=function(){document.body.removeEventListener("keydown",this._keydownEventListener,!0)},i.prototype._setupClickOutsideListener=function(){var e=this;this._clickOutsideEventListener=function(t){e._handleClickOutside(t,e._targetEl)},document.body.addEventListener("click",this._clickOutsideEventListener,!0)},i.prototype._removeClickOutsideListener=function(){document.body.removeEventListener("click",this._clickOutsideEventListener,!0)},i.prototype._handleClickOutside=function(e,t){var n=e.target;n!==t&&!t.contains(n)&&!this._triggerEl.contains(n)&&this.isVisible()&&this.hide()},i.prototype.isVisible=function(){return this._visible},i.prototype.toggle=function(){this.isVisible()?this.hide():this.show(),this._options.onToggle(this)},i.prototype.show=function(){this._targetEl.classList.remove("opacity-0","invisible"),this._targetEl.classList.add("opacity-100","visible"),this._popperInstance.setOptions(function(e){return li(li({},e),{modifiers:va(va([],e.modifiers,!0),[{name:"eventListeners",enabled:!0}],!1)})}),this._setupClickOutsideListener(),this._setupKeydownListener(),this._popperInstance.update(),this._visible=!0,this._options.onShow(this)},i.prototype.hide=function(){this._targetEl.classList.remove("opacity-100","visible"),this._targetEl.classList.add("opacity-0","invisible"),this._popperInstance.setOptions(function(e){return li(li({},e),{modifiers:va(va([],e.modifiers,!0),[{name:"eventListeners",enabled:!1}],!1)})}),this._removeClickOutsideListener(),this._removeKeydownListener(),this._visible=!1,this._options.onHide(this)},i.prototype.updateOnShow=function(e){this._options.onShow=e},i.prototype.updateOnHide=function(e){this._options.onHide=e},i.prototype.updateOnToggle=function(e){this._options.onToggle=e},i}();function yp(){document.querySelectorAll("[data-popover-target]").forEach(function(i){var e=i.getAttribute("data-popover-target"),t=document.getElementById(e);if(t){var n=i.getAttribute("data-popover-trigger"),r=i.getAttribute("data-popover-placement"),s=i.getAttribute("data-popover-offset");new _v(t,i,{placement:r||Ys.placement,offset:s?parseInt(s):Ys.offset,triggerType:n||Ys.triggerType})}else console.error('The popover element with id "'.concat(e,'" does not exist. Please check the data-popover-target attribute.'))})}typeof window<"u"&&(window.Popover=_v,window.initPopovers=yp);var Dl=function(){return Dl=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},Dl.apply(this,arguments)},uh={triggerType:"hover",onShow:function(){},onHide:function(){},onToggle:function(){}},u_={id:null,override:!0}
2,Av=function(){function i(e,t,n,r,s){e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=null),r===void 0&&(r=uh),s===void 0&&(s=u_),this._instanceId=s.id?s.id:n.id,this._parentEl=e,this._triggerEl=t,this._targetEl=n,this._options=Dl(Dl({},uh),r),this._visible=!1,this._initialized=!1,this.init(),he.addInstance("Dial",this,this._instanceId,s.override)}return i.prototype.init=function(){var e=this;if(this._triggerEl&&this._targetEl&&!this._initialized){var t=this._getTriggerEventTypes(this._options.triggerType);this._showEventHandler=function(){e.show()},t.showEvents.forEach(function(n){e._triggerEl.addEventListener(n,e._showEventHandler),e._targetEl.addEventListener(n,e._showEventHandler)}),this._hideEventHandler=function(){e._parentEl.matches(":hover")||e.hide()},t.hideEvents.forEach(function(n){e._parentEl.addEventListener(n,e._hideEventHandler)}),this._initialized=!0}},i.prototype.destroy=function(){var e=this;if(this._initialized){var t=this._getTriggerEventTypes(this._options.triggerType);t.showEvents.forEach(function(n){e._triggerEl.removeEventListener(n,e._showEventHandler),e._targetEl.removeEventListener(n,e._showEventHandler)}),t.hideEvents.forEach(function(n){e._parentEl.removeEventListener(n,e._hideEventHandler)}),this._initialized=!1}},i.prototype.removeInstance=function(){he.removeInstance("Dial",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.hide=function(){this._targetEl.classList.add("hidden"),this._triggerEl&&this._triggerEl.setAttribute("aria-expanded","false"),this._visible=!1,this._options.onHide(this)},i.prototype.show=function(){this._targetEl.classList.remove("hidden"),this._triggerEl&&this._triggerEl.setAttribute("aria-expanded","true"),this._visible=!0,this._options.onShow(this)},i.prototype.toggle=function(){this._visible?this.hide():this.show()},i.prototype.isHidden=function(){return!this._visible},i.prototype.isVisible=function(){return this._visible},i.prototype._getTriggerEventTypes=function(e){switch(e){case"hover":return{showEvents:["mouseenter","focus"],hideEvents:["mouseleave","blur"]};case"click":return{showEvents:["click","focus"],hideEvents:["focusout","blur"]};case"none":return{showEvents:[],hideEvents:[]};default:return{showEvents:["mouseenter","focus"],hideEvents:["mouseleave","blur"]}}},i.prototype.updateOnShow=function(e){this._options.onShow=e},i.prototype.updateOnHide=function(e){this._options.onHide=e},i.prototype.updateOnToggle=function(e){this._options.onToggle=e},i}();function vp(){document.querySelectorAll("[data-dial-init]").forEach(function(i){var e=i.querySelector("[data-dial-toggle]");if(e){var t=e.getAttribute("data-dial-toggle"),n=document.getElementById(t);if(n){var r=e.getAttribute("data-dial-trigger");new Av(i,e,n,{triggerType:r||uh.triggerType})}else console.error("Dial with id ".concat(t," does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?"))}else console.error("Dial with id ".concat(i.id," does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?"))})}typeof window<"u"&&(window.Dial=Av,window.initDials=vp);var Pl=function(){return Pl=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},Pl.apply(this,arguments)},kg={minValue:null,maxValue:null,onIncrement:function(){},onDecrement:function(){}},c_={id:null,override:!0},Lv=function(){function i(e,t,n,r,s){e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=null),r===void 0&&(r=kg),s===void 0&&(s=c_),this._instanceId=s.id?s.id:e.id,this._targetEl=e,this._incrementEl=t,this._decrementEl=n,this._options=Pl(Pl({},kg),r),this._initialized=!1,this.init(),he.addInstance("InputCounter",this,this._instanceId,s.override)}return i.prototype.init=function(){var e=this;this._targetEl&&!this._initialized&&(this._inputHandler=function(t){{var n=t.target;/^\d*$/.test(n.value)||(n.value=n.value.replace(/[^\d]/g,"")),e._options.maxValue!==null&&parseInt(n.value)>e._options.maxValue&&(n.value=e._options.maxValue.toString()),e._options.minValue!==null&&parseInt(n.value)<e._options.minValue&&(n.value=e._options.minValue.toString())}},this._incrementClickHandler=function(){e.increment()}
2,this._decrementClickHandler=function(){e.decrement()},this._targetEl.addEventListener("input",this._inputHandler),this._incrementEl&&this._incrementEl.addEventListener("click",this._incrementClickHandler),this._decrementEl&&this._decrementEl.addEventListener("click",this._decrementClickHandler),this._initialized=!0)},i.prototype.destroy=function(){this._targetEl&&this._initialized&&(this._targetEl.removeEventListener("input",this._inputHandler),this._incrementEl&&this._incrementEl.removeEventListener("click",this._incrementClickHandler),this._decrementEl&&this._decrementEl.removeEventListener("click",this._decrementClickHandler),this._initialized=!1)},i.prototype.removeInstance=function(){he.removeInstance("InputCounter",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.getCurrentValue=function(){return parseInt(this._targetEl.value)||0},i.prototype.increment=function(){this._options.maxValue!==null&&this.getCurrentValue()>=this._options.maxValue||(this._targetEl.value=(this.getCurrentValue()+1).toString(),this._options.onIncrement(this))},i.prototype.decrement=function(){this._options.minValue!==null&&this.getCurrentValue()<=this._options.minValue||(this._targetEl.value=(this.getCurrentValue()-1).toString(),this._options.onDecrement(this))},i.prototype.updateOnIncrement=function(e){this._options.onIncrement=e},i.prototype.updateOnDecrement=function(e){this._options.onDecrement=e},i}();function wp(){document.querySelectorAll("[data-input-counter]").forEach(function(i){var e=i.id,t=document.querySelector('[data-input-counter-increment="'+e+'"]'),n=document.querySelector('[data-input-counter-decrement="'+e+'"]'),r=i.getAttribute("data-input-counter-min"),s=i.getAttribute("data-input-counter-max");i?he.instanceExists("InputCounter",i.getAttribute("id"))||new Lv(i,t||null,n||null,{minValue:r?parseInt(r):null,maxValue:s?parseInt(s):null}):console.error('The target element with id "'.concat(e,'" does not exist. Please check the data-input-counter attribute.'))})}typeof window<"u"&&(window.InputCounter=Lv,window.initInputCounters=wp);var Rl=function(){return Rl=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},Rl.apply(this,arguments)},Nl={htmlEntities:!1,contentType:"input",onCopy:function(){}},d_={id:null,override:!0},xp=function(){function i(e,t,n,r){e===void 0&&(e=null),t===void 0&&(t=null),n===void 0&&(n=Nl),r===void 0&&(r=d_),this._instanceId=r.id?r.id:t.id,this._triggerEl=e,this._targetEl=t,this._options=Rl(Rl({},Nl),n),this._initialized=!1,this.init(),he.addInstance("CopyClipboard",this,this._instanceId,r.override)}return i.prototype.init=function(){var e=this;this._targetEl&&this._triggerEl&&!this._initialized&&(this._triggerElClickHandler=function(){e.copy()},this._triggerEl&&this._triggerEl.addEventListener("click",this._triggerElClickHandler),this._initialized=!0)},i.prototype.destroy=function(){this._triggerEl&&this._targetEl&&this._initialized&&(this._triggerEl&&this._triggerEl.removeEventListener("click",this._triggerElClickHandler),this._initialized=!1)},i.prototype.removeInstance=function(){he.removeInstance("CopyClipboard",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.getTargetValue=function(){if(this._options.contentType==="input")return this._targetEl.value;if(this._options.contentType==="innerHTML")return this._targetEl.innerHTML;if(this._options.contentType==="textContent")return this._targetEl.textContent.replace(/\s+/g," ").trim()},i.prototype.copy=function(){var e=this.getTargetValue();this._options.htmlEntities&&(e=this.decodeHTML(e));var t=document.createElement("textarea");return t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),this._options.onCopy(this),e},i.prototype.decodeHTML=function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.textContent},i.prototype.updateOnCopyCallback=function(e){this._options.onCopy=e},i}();
2function Ep(){document.querySelectorAll("[data-copy-to-clipboard-target]").forEach(function(i){var e=i.getAttribute("data-copy-to-clipboard-target"),t=document.getElementById(e),n=i.getAttribute("data-copy-to-clipboard-content-type"),r=i.getAttribute("data-copy-to-clipboard-html-entities");t?he.instanceExists("CopyClipboard",t.getAttribute("id"))||new xp(i,t,{htmlEntities:r&&r==="true"?!0:Nl.htmlEntities,contentType:n||Nl.contentType}):console.error('The target element with id "'.concat(e,'" does not exist. Please check the data-copy-to-clipboard-target attribute.'))})}typeof window<"u"&&(window.CopyClipboard=xp,window.initClipboards=Ep);function ch(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,n=Array(e);t<e;t++)n[t]=i[t];return n}function h_(i){if(Array.isArray(i))return i}function f_(i){if(Array.isArray(i))return ch(i)}function p_(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function Tp(i,e,t){return e=Ai(e),v_(i,Mv()?Reflect.construct(e,t||[],Ai(i).constructor):e.apply(i,t))}function xr(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function _g(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,E_(n.key),n)}}function Er(i,e,t){return e&&_g(i.prototype,e),t&&_g(i,t),Object.defineProperty(i,"prototype",{writable:!1}),i}function yo(){return yo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(i,e,t){var n=w_(i,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(arguments.length<3?i:t):r.value}},yo.apply(null,arguments)}function Ai(i){return Ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ai(i)}function Sp(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&dh(i,e)}function Mv(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mv=function(){return!!i})()}function m_(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function g_(i,e){var t=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(t!=null){var n,r,s,o,l=[],a=!0,u=!1;try{if(s=(t=t.call(i)).next,e===0){if(Object(t)!==t)return;a=!1}else for(;!(a=(n=s.call(t)).done)&&(l.push(n.value),l.length!==e);a=!0);}catch(c){u=!0,r=c}finally{try{if(!a&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(u)throw r}}return l}}function b_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y_(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 4In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v_(i,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p_(i)}function dh(i,e){return dh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},dh(i,e)}function Rt(i,e){return h_(i)||g_(i,e)||Iv(i,e)||b_()}function w_(i,e){for(;!{}.hasOwnProperty.call(i,e)&&(i=Ai(i))!==null;);return i}function Xo(i){return f_(i)||m_(i)||Iv(i)||y_()}function x_(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var n=t.call(i,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(i)}function E_(i){var e=x_(i,"string");return typeof e=="symbol"?e:e+""}function Bl(i){"@babel/helpers - typeof";return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bl(i)}function Iv(i,e){if(i){if(typeof i=="string")return ch(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ch(i,e):void 0}}function Gn(i,e){return Object.prototype.hasOwnProperty.call(i,e)}function Cp(i){return i[i.length-1]}function lr(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return t.forEach(function(r){i.includes(r)||i.push(r)}),i}function Gc(i,e){return i?i.split(e):[]}function kp(i,e,t){var n=e===void 0||i>=e,r=t===void 0||i<=t;return n&&r}function Ov(i,e,t){return i<e?e:i>t?t:i}function Zr(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"",s=Object.keys(t).reduce(function(l,a){var u=t[a];return typeof u=="function"&&(u=u(n)),"".concat(l," ").concat(a,'="').concat(u,'"')},i);r+="<".concat(s,"></").concat(i,">");var o=n+1;return o<e?Zr(i,e,t,o,r):r}function _p(i){return i.replace(/>\s+/g,">").replace(/\s+</,"<")}function hh(i){return new Date(i).setHours(0,0,0,0)}function Tr(){return new Date().setHours(0,0,0,0)}function xi(){switch(arguments.length){case 0:return Tr();case 1:return hh(arguments.length<=0?void 0:arguments[0])}var i=new Date(0);return i.setFullYear.apply(i,arguments),i.setHours(0,0,0,0)}function $r(i,e){var t=new Date(i);return t.setDate(t.getDate()+e)}function T_(i,e){return $r(i,e*7)}function Fl(i,e){var t=new Date(i),n=t.getMonth()+e,r=n%12;r<0&&(r+=12);var s=t.setMonth(n);return t.getMonth()!==r?t.setDate(0):s}function qr(i,e){var t=new Date(i),n=t.getMonth(),r=t.setFullYear(t.getFullYear()+e);return n===1&&t.getMonth()===2?t.setDate(0):r}function Ag(i,e){return(i-e+7)%7}function zl(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=new Date(i).getDay();return $r(i,Ag(e,t)-Ag(n,t))}function S_(i){var e=zl(i,4,1),t=zl(new Date(e).setMonth(0,4),4,1);return Math.round((e-t)/6048e5)+1}function $i(i,e){var t=new Date(i).getFullYear();return Math.floor(t/e)*e}var fh=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,C_=/[\s!-/:-@[-`{-~å¹´ææ¥]+/,Kc={},Lg={y:function(e,t){return new Date(e).setFullYear(parseInt(t,10))},m:function(e,t,n){var r=new Date(e),s=parseInt(t,10)-1;if(isNaN(s)){if(!t)return NaN;var o=t.toLowerCase(),l=function(u){return u.toLowerCase().startsWith(o)};if(s=n.monthsShort.findIndex(l),s<0&&(s=n.months.findIndex(l)),s<0)return NaN}return r.setMonth(s),r.getMonth()!==Dv(s)?r.setDate(0):r.getTime()},d:function(e,t){return new Date(e).setDate(parseInt(t,10))}},k_={d:function(e){return e.getDate()},dd:function(e){return wa(e.getDate(),2)},D:function(e,t){return t.daysShort[e.getDay()]},DD:function(e,t){return t.days[e.getDay()]},m:function(e){return e.getMonth()+1},mm:function(e){return wa(e.getMonth()+1,2)},M:function(e,t){return t.monthsShort[e.getMonth()]},MM:function(e,t){return t.months[e.getMonth()]},y:function(e){return e.getFullYear()},yy:function(e){return wa(e.getFullYear(),2).slice(-2)},yyyy:function(e){return wa(e.getFullYear(),4)}};function Dv(i){return i>-1?i%12:Dv(i+12)}function wa(i,e){return i.toString().padStart(e,"0")}
4function Pv(i){if(typeof i!="string")throw new Error("Invalid date format.");if(i in Kc)return Kc[i];var e=i.split(fh),t=i.match(new RegExp(fh,"g"));if(e.length===0||!t)throw new Error("Invalid date format.");var n=t.map(function(s){return k_[s]}),r=Object.keys(Lg).reduce(function(s,o){var l=t.find(function(a){return a[0]!=="D"&&a[0].toLowerCase()===o});return l&&s.push(o),s},[]);return Kc[i]={parser:function(o,l){var a=o.split(C_).reduce(function(u,c,h){if(c.length>0&&t[h]){var d=t[h][0];d==="M"?u.m=c:d!=="D"&&(u[d]=c)}return u},{});return r.reduce(function(u,c){var h=Lg[c](u,a[c],l);return isNaN(h)?u:h},Tr())},formatter:function(o,l){var a=n.reduce(function(u,c,h){return u+="".concat(e[h]).concat(c(o,l))},"");return a+=Cp(e)}}}function vo(i,e,t){if(i instanceof Date||typeof i=="number"){var n=hh(i);return isNaN(n)?void 0:n}if(i){if(i==="today")return Tr();if(e&&e.toValue){var r=e.toValue(i,e,t);return isNaN(r)?void 0:hh(r)}return Pv(e).parser(i,t)}}function wo(i,e,t){if(isNaN(i)||!i&&i!==0)return"";var n=typeof i=="number"?new Date(i):i;return e.toDisplay?e.toDisplay(n,e,t):Pv(e).formatter(n,t)}var Vl=new WeakMap,Rv=EventTarget.prototype,Mg=Rv.addEventListener,Ig=Rv.removeEventListener;function Ap(i,e){var t=Vl.get(i);t||(t=[],Vl.set(i,t)),e.forEach(function(n){Mg.call.apply(Mg,Xo(n)),t.push(n)})}function Nv(i){var e=Vl.get(i);e&&(e.forEach(function(t){Ig.call.apply(Ig,Xo(t))}),Vl.delete(i))}if(!Event.prototype.composedPath){var __=function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];t.push(e);var n;return e.parentNode?n=e.parentNode:e.host?n=e.host:e.defaultView&&(n=e.defaultView),n?i(n,t):t};Event.prototype.composedPath=function(){return __(this.target)}}function Bv(i,e,t){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=i[n];return e(r)?r:r===t||!r.parentElement?void 0:Bv(i,e,t,n+1)}function Fv(i,e){var t=typeof e=="function"?e:function(n){return n.matches(e)};return Bv(i.composedPath(),t,i.currentTarget)}var ks={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM y"}},Jo={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:'<svg class="w-4 h-4 rtl:rotate-180 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 5h12m0 0L9 1m4 4L9 9"/></svg>',orientation:"auto",pickLevel:0,prevArrow:'<svg class="w-4 h-4 rtl:rotate-180 text-gray-800 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 10"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5H1m0 0 4 4M1 5l4-4"/></svg>',showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},A_=document.createRange();function Kn(i){return A_.createContextualFragment(i)}function Xs(i){i.style.display!=="none"&&(i.style.display&&(i.dataset.styleDisplay=i.style.display),i.style.display="none")}function Js(i){i.style.display==="none"&&(i.dataset.styleDisplay?(i.style.display=i.dataset.styleDisplay,delete i.dataset.styleDisplay):i.style.display="")}function Hl(i){i.firstChild&&(i.removeChild(i.firstChild),Hl(i))}function L_(i,e){Hl(i),e instanceof DocumentFragment?i.appendChild(e):typeof e=="string"?i.appendChild(Kn(e)):typeof e.forEach=="function"&&e.forEach(function(t){i.appendChild(t)})}var Yc=Jo.language,M_=Jo.format,I_=Jo.weekStart;function Og(i,e){return i.length<6&&e>=0&&e<7?lr(i,e):i}function Dg(i){return(i+6)%7}function Pg(i,e,t,n){var r=vo(i,e,t);return r!==void 0?r:n}function Xc(i,e){var t=arguments.length>
42&&arguments[2]!==void 0?arguments[2]:3,n=parseInt(i,10);return n>=0&&n<=t?n:e}function Jc(i,e){var t=Object.assign({},i),n={},r=e.constructor.locales,s=e.config||{},o=s.format,l=s.language,a=s.locale,u=s.maxDate,c=s.maxView,h=s.minDate,d=s.pickLevel,f=s.startView,p=s.weekStart;if(t.language){var b;if(t.language!==l&&(r[t.language]?b=t.language:(b=t.language.split("-")[0],r[b]===void 0&&(b=!1))),delete t.language,b){l=n.language=b;var m=a||r[Yc];a=Object.assign({format:M_,weekStart:I_},r[Yc]),l!==Yc&&Object.assign(a,r[l]),n.locale=a,o===m.format&&(o=n.format=a.format),p===m.weekStart&&(p=n.weekStart=a.weekStart,n.weekEnd=Dg(a.weekStart))}}if(t.format){var v=typeof t.format.toDisplay=="function",g=typeof t.format.toValue=="function",y=fh.test(t.format);(v&&g||y)&&(o=n.format=t.format),delete t.format}var w=h,E=u;if(t.minDate!==void 0&&(w=t.minDate===null?xi(0,0,1):Pg(t.minDate,o,a,w),delete t.minDate),t.maxDate!==void 0&&(E=t.maxDate===null?void 0:Pg(t.maxDate,o,a,E),delete t.maxDate),E<w?(h=n.minDate=E,u=n.maxDate=w):(h!==w&&(h=n.minDate=w),u!==E&&(u=n.maxDate=E)),t.datesDisabled&&(n.datesDisabled=t.datesDisabled.reduce(function(T,L){var I=vo(L,o,a);return I!==void 0?lr(T,I):T},[]),delete t.datesDisabled),t.defaultViewDate!==void 0){var x=vo(t.defaultViewDate,o,a);x!==void 0&&(n.defaultViewDate=x),delete t.defaultViewDate}if(t.weekStart!==void 0){var S=Number(t.weekStart)%7;isNaN(S)||(p=n.weekStart=S,n.weekEnd=Dg(S)),delete t.weekStart}if(t.daysOfWeekDisabled&&(n.daysOfWeekDisabled=t.daysOfWeekDisabled.reduce(Og,[]),delete t.daysOfWeekDisabled),t.daysOfWeekHighlighted&&(n.daysOfWeekHighlighted=t.daysOfWeekHighlighted.reduce(Og,[]),delete t.daysOfWeekHighlighted),t.maxNumberOfDates!==void 0){var _=parseInt(t.maxNumberOfDates,10);_>=0&&(n.maxNumberOfDates=_,n.multidate=_!==1),delete t.maxNumberOfDates}t.dateDelimiter&&(n.dateDelimiter=String(t.dateDelimiter),delete t.dateDelimiter);var M=d;t.pickLevel!==void 0&&(M=Xc(t.pickLevel,2),delete t.pickLevel),M!==d&&(d=n.pickLevel=M);var O=c;t.maxView!==void 0&&(O=Xc(t.maxView,c),delete t.maxView),O=d>O?d:O,O!==c&&(c=n.maxView=O);var D=f;if(t.startView!==void 0&&(D=Xc(t.startView,D),delete t.startView),D<d?D=d:D>c&&(D=c),D!==f&&(n.startView=D),t.prevArrow){var k=Kn(t.prevArrow);k.childNodes.length>0&&(n.prevArrow=k.childNodes),delete t.prevArrow}if(t.nextArrow){var A=Kn(t.nextArrow);A.childNodes.length>0&&(n.nextArrow=A.childNodes),delete t.nextArrow}if(t.disableTouchKeyboard!==void 0&&(n.disableTouchKeyboard="ontouchstart"in document&&!!t.disableTouchKeyboard,delete t.disableTouchKeyboard),t.orientation){var C=t.orientation.toLowerCase().split(/\s+/g);n.orientation={x:C.find(function(T){return T==="left"||T==="right"})||"auto",y:C.find(function(T){return T==="top"||T==="bottom"})||"auto"},delete t.orientation}if(t.todayBtnMode!==void 0){switch(t.todayBtnMode){case 0:case 1:n.todayBtnMode=t.todayBtnMode}delete t.todayBtnMode}return Object.keys(t).forEach(function(T){t[T]!==void 0&&Gn(Jo,T)&&(n[T]=t[T])}),n}var O_=_p(`<div class="datepicker hidden"> 5 <div class="datepicker-picker inline-block rounded-lg bg-white dark:bg-gray-700 shadow-lg p-4"> 6 <div class="datepicker-header"> 7 <div class="datepicker-title bg-white dark:bg-gray-700 dark:text-white px-2 py-3 text-center font-semibold"></div> 8 <div class="datepicker-controls flex justify-between mb-2"> 9 <button type="button" class="bg-white dark:bg-gray-700 rounded-lg text-gray-500 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white text-lg p-2.5 focus:outline-none focus:ring-2 focus:ring-gray-200 prev-btn"></button> 10 <button type="button" class="text-sm rounded-lg text-gray-900 dark:text-white bg-white dark:bg-gray-700 font-semibold py-2.5 px-5 hover:bg-gray-100 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-200 view-switch"></button> 11 <button type="button" class="bg-white dark:bg-gray-700 rounded-lg text-gray-500 dark:text-white hover:bg-gray-100 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white text-lg p-2.5 focus:outline-none focus:ring-2 focus:ring-gray-200 next-btn"></button> 12 </div> 13 </div> 14 <div class="datepicker-main p-1"></div> 15 <div class="datepicker-footer">
16 <div class="datepicker-controls flex space-x-2 rtl:space-x-reverse mt-2"> 17 <button type="button" class="%buttonClass% today-btn text-white bg-blue-700 !bg-primary-700 dark:bg-blue-600 dark:!bg-primary-600 hover:bg-blue-800 hover:!bg-primary-800 dark:hover:bg-blue-700 dark:hover:!bg-primary-700 focus:ring-4 focus:ring-blue-300 focus:!ring-primary-300 font-medium rounded-lg text-sm px-5 py-2 text-center w-1/2"></button> 18 <button type="button" class="%buttonClass% clear-btn text-gray-900 dark:text-white bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600 focus:ring-4 focus:ring-blue-300 focus:!ring-primary-300 font-medium rounded-lg text-sm px-5 py-2 text-center w-1/2"></button> 19 </div> 20 </div> 21 </div> 22</div>`),D_=_p(`<div class="days"> 23 <div class="days-of-week grid grid-cols-7 mb-1">`.concat(Zr("span",7,{class:"dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"}),`</div> 24 <div class="datepicker-grid w-64 grid grid-cols-7">`).concat(Zr("span",42,{class:"block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"}),`</div> 25</div>`)),P_=_p(`<div class="calendar-weeks"> 26 <div class="days-of-week flex"><span class="dow h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"></span></div> 27 <div class="weeks">`.concat(Zr("span",6,{class:"week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm"}),`</div> 28</div>`)),Lp=function(){function i(e,t){xr(this,i),Object.assign(this,t,{picker:e,element:Kn('<div class="datepicker-view flex"></div>').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}return Er(i,[{key:"init",value:function(t){t.pickLevel!==void 0&&(this.isMinView=this.id===t.pickLevel),this.setOptions(t),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function(t,n,r){var s=this.beforeShow(new Date(r));switch(Bl(s)){case"boolean":s={enabled:s};break;case"string":s={classes:s}}if(s){if(s.enabled===!1&&(t.classList.add("disabled"),lr(this.disabled,n)),s.classes){var o,l=s.classes.split(/\s+/);(o=t.classList).add.apply(o,Xo(l)),l.includes("disabled")&&lr(this.disabled,n)}s.content&&L_(t,s.content)}}}])}(),R_=function(i){function e(t){return xr(this,e),Tp(this,e,[t,{id:0,name:"days",cellClass:"day"}])}return Sp(e,i),Er(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(r){var s=Kn(D_).firstChild;this.dow=s.firstChild,this.grid=s.lastChild,this.element.appendChild(s)}yo(Ai(e.prototype),"init",this).call(this,n)}},{key:"setOptions",value:function(n){var r=this,s;if(Gn(n,"minDate")&&(this.minDate=n.minDate),Gn(n,"maxDate")&&(this.maxDate=n.maxDate),n.datesDisabled&&(this.datesDisabled=n.datesDisabled),n.daysOfWeekDisabled&&(this.daysOfWeekDisabled=n.daysOfWeekDisabled,s=!0),n.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=n.daysOfWeekHighlighted),n.todayHighlight!==void 0&&(this.todayHighlight=n.todayHighlight),n.weekStart!==void 0&&(this.weekStart=n.weekStart,this.weekEnd=n.weekEnd,s=!0),n.locale){var o=this.locale=n.locale;this.dayNames=o.daysMin,this.switchLabelFormat=o.titleFormat,s=!0}if(n.beforeShowDay!==void 0&&(this.beforeShow=typeof n.beforeShowDay=="function"?n.beforeShowDay:void 0),n.calendarWeeks!==void 0)if(n.calendarWeeks&&!this.calendarWeeks){var l=Kn(P_).firstChild;this.calendarWeeks={element:l,dow:l.firstChild,weeks:l.lastChild},this.element.insertBefore(l,this.element.firstChild)}else this.calendarWeeks&&!n.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);n.showDaysOfWeek!==void 0&&(n.showDaysOfWeek?(Js(this.dow),this.calendarWeeks&&Js(this.calendarWeeks.dow)):(Xs(this.dow),this.calendarWeeks&&Xs(this.calendarWeeks.dow))),s&&Array.from(this.dow.children).forEach(function(a,u){var c=(r.weekStart+u)%7;a.textContent=r.dayNames[c],a.className=r.daysOfWeekDisabled.includes(c)?"dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed":"dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400"})}},{key:"updateFocus",value:function(){var n=new Date(this.picker.viewDate),r=n.getFullYear(),s=n.getMonth(),o=xi(r,s,1),l=zl(o,this.weekStart,this.weekStart);this.first=o,this.last=xi(r,s+1,0),this.start=l,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function(){var n=this.picker.datepicker,r=n.dates,s=n.rangepicker;this.selected=r,s&&(this.range=s.dates)}},{key:"render",value:function(){var n=this;this.today=this.todayHighlight?Tr():void 0,this.disabled=Xo(this.datesDisabled);var r=wo(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(r),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var s=zl(this.first,1,1);
28Array.from(this.calendarWeeks.weeks.children).forEach(function(o,l){o.textContent=S_(T_(s,l))})}Array.from(this.grid.children).forEach(function(o,l){var a=o.classList,u=$r(n.start,l),c=new Date(u),h=c.getDay();if(o.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(n.cellClass),o.dataset.date=u,o.textContent=c.getDate(),u<n.first?a.add("prev","text-gray-500","dark:text-white"):u>n.last&&a.add("next","text-gray-500","dark:text-white"),n.today===u&&a.add("today","bg-gray-100","dark:bg-gray-600"),(u<n.minDate||u>n.maxDate||n.disabled.includes(u))&&(a.add("disabled","cursor-not-allowed","text-gray-400","dark:text-gray-500"),a.remove("hover:bg-gray-100","dark:hover:bg-gray-600","text-gray-900","dark:text-white","cursor-pointer")),n.daysOfWeekDisabled.includes(h)&&(a.add("disabled","cursor-not-allowed","text-gray-400","dark:text-gray-500"),a.remove("hover:bg-gray-100","dark:hover:bg-gray-600","text-gray-900","dark:text-white","cursor-pointer"),lr(n.disabled,u)),n.daysOfWeekHighlighted.includes(h)&&a.add("highlighted"),n.range){var d=Rt(n.range,2),f=d[0],p=d[1];u>f&&u<p&&(a.add("range","bg-gray-200","dark:bg-gray-600"),a.remove("rounded-lg","rounded-l-lg","rounded-r-lg")),u===f&&(a.add("range-start","bg-gray-100","dark:bg-gray-600","rounded-l-lg"),a.remove("rounded-lg","rounded-r-lg")),u===p&&(a.add("range-end","bg-gray-100","dark:bg-gray-600","rounded-r-lg"),a.remove("rounded-lg","rounded-l-lg"))}n.selected.includes(u)&&(a.add("selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white"),a.remove("text-gray-900","text-gray-500","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600","dark:bg-gray-600","bg-gray-100","bg-gray-200")),u===n.focused&&a.add("focused"),n.beforeShow&&n.performBeforeHook(o,u,u)})}},{key:"refresh",value:function(){var n=this,r=this.range||[],s=Rt(r,2),o=s[0],l=s[1];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(function(a){a.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white","focused"),a.classList.add("text-gray-900","rounded-lg","dark:text-white")}),Array.from(this.grid.children).forEach(function(a){var u=Number(a.dataset.date),c=a.classList;c.remove("bg-gray-200","dark:bg-gray-600","rounded-l-lg","rounded-r-lg"),u>o&&u<l&&(c.add("range","bg-gray-200","dark:bg-gray-600"),c.remove("rounded-lg")),u===o&&(c.add("range-start","bg-gray-200","dark:bg-gray-600","rounded-l-lg"),c.remove("rounded-lg")),u===l&&(c.add("range-end","bg-gray-200","dark:bg-gray-600","rounded-r-lg"),c.remove("rounded-lg")),n.selected.includes(u)&&(c.add("selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white"),c.remove("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600","bg-gray-100","bg-gray-200","dark:bg-gray-600")),u===n.focused&&c.add("focused")})}},{key:"refreshFocus",value:function(){var n=Math.round((this.focused-this.start)/864e5);this.grid.querySelectorAll(".focused").forEach(function(r){r.classList.remove("focused")}),this.grid.children[n].classList.add("focused")}}])}(Lp);function Rg(i,e){if(!(!i||!i[0]||!i[1])){var t=Rt(i,2),n=Rt(t[0],2),r=n[0],s=n[1],o=Rt(t[1],2),l=o[0],a=o[1];if(!(r>e||l<e))return[r===e?s:-1,l===e?a:12]}}var N_=function(i){function e(t){return xr(this,e),Tp(this,e,[t,{id:1,name:"months",cellClass:"month"}])}return Sp(e,i),Er(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(Kn(Zr("span",12,{"data-month":function(o){return o}})))),yo(Ai(e.prototype),"init",this).call(this,n)}},{key:"setOptions",value:function(n){if(n.locale&&(this.monthNames=n.locale.monthsShort),Gn(n,"minDate"))if(n.minDate===void 0)this.minYear=this.minMonth=this.minDate=void 0;else{var r=new Date(n.minDate);this.minYear=r.getFullYear(),this.minMonth=r.getMonth(),this.minDate=r.setDate(1)}if(Gn(n,"maxDate"))if(n.maxDate===void 0)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var s=new Date(n.maxDate);this.maxYear=s.getFullYear(),this.maxMonth=s.getMonth(),this.maxDate=xi(this.maxYear,this.maxMonth+1,0)}n.beforeShowMonth!==void 0&&(this.beforeShow=typeof n.beforeShowMonth=="function"?n.beforeShowMonth:void 0)}},{key:"updateFocus",value:function(){var n=new Date(this.picker.viewDate);this.year=n.getFullYear(),this.focused=n.getMonth()}},{key:"updateSelection",value:function(){var n=this.picker.datepicker,r=n.dates,s=n.rangepicker;this.selected=r.reduce(function(o,l){var a=new Date(l),u=a.getFullYear(),c=a.getMonth();return o[u]===void 0?o[u]=[c]:lr(o[u],c),o},{}),s&&s.dates&&(this.range=s.dates.map(function(o){var l=new Date(o);return isNaN(l)?void 0:[l.getFullYear(),l.getMonth()]}))}},{key:"render",value:function(){var n=this;this.disabled=[],this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var r=this.selected[this.year]||[],s=this.year<this.minYear||this.year>this.maxYear,o=this.year===this.minYear,l=this.year===this.maxYear,a=Rg(this.range,this.year);
28Array.from(this.grid.children).forEach(function(u,c){var h=u.classList,d=xi(n.year,c,1);if(u.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(n.cellClass),n.isMinView&&(u.dataset.date=d),u.textContent=n.monthNames[c],(s||o&&c<n.minMonth||l&&c>n.maxMonth)&&h.add("disabled"),a){var f=Rt(a,2),p=f[0],b=f[1];c>p&&c<b&&h.add("range"),c===p&&h.add("range-start"),c===b&&h.add("range-end")}r.includes(c)&&(h.add("selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white"),h.remove("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")),c===n.focused&&h.add("focused"),n.beforeShow&&n.performBeforeHook(u,c,d)})}},{key:"refresh",value:function(){var n=this,r=this.selected[this.year]||[],s=Rg(this.range,this.year)||[],o=Rt(s,2),l=o[0],a=o[1];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(function(u){u.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","dark:bg-blue-600","dark:!bg-primary-700","dark:text-white","text-white","focused"),u.classList.add("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")}),Array.from(this.grid.children).forEach(function(u,c){var h=u.classList;c>l&&c<a&&h.add("range"),c===l&&h.add("range-start"),c===a&&h.add("range-end"),r.includes(c)&&(h.add("selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white"),h.remove("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")),c===n.focused&&h.add("focused")})}},{key:"refreshFocus",value:function(){this.grid.querySelectorAll(".focused").forEach(function(n){n.classList.remove("focused")}),this.grid.children[this.focused].classList.add("focused")}}])}(Lp);function B_(i){return Xo(i).reduce(function(e,t,n){return e+=n?t:t.toUpperCase()},"")}var Ng=function(i){function e(t,n){return xr(this,e),Tp(this,e,[t,n])}return Sp(e,i),Er(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r&&(this.navStep=this.step*10,this.beforeShowOption="beforeShow".concat(B_(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid","w-64","grid","grid-cols-4"),this.grid.appendChild(Kn(Zr("span",12)))),yo(Ai(e.prototype),"init",this).call(this,n)}},{key:"setOptions",value:function(n){if(Gn(n,"minDate")&&(n.minDate===void 0?this.minYear=this.minDate=void 0:(this.minYear=$i(n.minDate,this.step),this.minDate=xi(this.minYear,0,1))),Gn(n,"maxDate")&&(n.maxDate===void 0?this.maxYear=this.maxDate=void 0:(this.maxYear=$i(n.maxDate,this.step),this.maxDate=xi(this.maxYear,11,31))),n[this.beforeShowOption]!==void 0){var r=n[this.beforeShowOption];this.beforeShow=typeof r=="function"?r:void 0}}},{key:"updateFocus",value:function(){var n=new Date(this.picker.viewDate),r=$i(n,this.navStep),s=r+9*this.step;this.first=r,this.last=s,this.start=r-this.step,this.focused=$i(n,this.step)}},{key:"updateSelection",value:function(){var n=this,r=this.picker.datepicker,s=r.dates,o=r.rangepicker;this.selected=s.reduce(function(l,a){return lr(l,$i(a,n.step))},[]),o&&o.dates&&(this.range=o.dates.map(function(l){if(l!==void 0)return $i(l,n.step)}))}},{key:"render",value:function(){var n=this;this.disabled=[],this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach(function(r,s){var o=r.classList,l=n.start+s*n.step,a=xi(l,0,1);if(r.className="datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm ".concat(n.cellClass),n.isMinView&&(r.dataset.date=a),r.textContent=r.dataset.year=l,s===0?o.add("prev"):s===11&&o.add("next"),(l<n.minYear||l>n.maxYear)&&o.add("disabled"),n.range){var u=Rt(n.range,2),c=u[0],h=u[1];l>c&&l<h&&o.add("range"),l===c&&o.add("range-start"),l===h&&o.add("range-end")}n.selected.includes(l)&&(o.add("selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white"),o.remove("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")),l===n.focused&&o.add("focused"),n.beforeShow&&n.performBeforeHook(r,l,a)})}},{key:"refresh",value:function(){var n=this,r=this.range||[],s=Rt(r,2),o=s[0],l=s[1];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach(function(a){a.classList.remove("range","range-start","range-end","selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark!bg-primary-600","dark:text-white","focused")}
28),Array.from(this.grid.children).forEach(function(a){var u=Number(a.textContent),c=a.classList;u>o&&u<l&&c.add("range"),u===o&&c.add("range-start"),u===l&&c.add("range-end"),n.selected.includes(u)&&(c.add("selected","bg-blue-700","!bg-primary-700","text-white","dark:bg-blue-600","dark:!bg-primary-600","dark:text-white"),c.remove("text-gray-900","hover:bg-gray-100","dark:text-white","dark:hover:bg-gray-600")),u===n.focused&&c.add("focused")})}},{key:"refreshFocus",value:function(){var n=Math.round((this.focused-this.start)/this.step);this.grid.querySelectorAll(".focused").forEach(function(r){r.classList.remove("focused")}),this.grid.children[n].classList.add("focused")}}])}(Lp);function Ur(i,e){var t={date:i.getDate(),viewDate:new Date(i.picker.viewDate),viewId:i.picker.currentView.id,datepicker:i};i.element.dispatchEvent(new CustomEvent(e,{detail:t}))}function jl(i,e){var t=i.config,n=t.minDate,r=t.maxDate,s=i.picker,o=s.currentView,l=s.viewDate,a;switch(o.id){case 0:a=Fl(l,e);break;case 1:a=qr(l,e);break;default:a=qr(l,e*o.navStep)}a=Ov(a,n,r),i.picker.changeFocus(a).render()}function zv(i){var e=i.picker.currentView.id;e!==i.config.maxView&&i.picker.changeView(e+1).render()}function Vv(i){i.config.updateOnBlur?i.update({autohide:!0}):(i.refresh("input"),i.hide())}function Bg(i,e){var t=i.picker,n=new Date(t.viewDate),r=t.currentView.id,s=r===1?Fl(n,e-n.getMonth()):qr(n,e-n.getFullYear());t.changeFocus(s).changeView(r-1).render()}function F_(i){var e=i.picker,t=Tr();if(i.config.todayBtnMode===1){if(i.config.autohide){i.setDate(t);return}i.setDate(t,{render:!1}),e.update()}e.viewDate!==t&&e.changeFocus(t),e.changeView(0).render()}function z_(i){i.setDate({clear:!0})}function V_(i){zv(i)}function H_(i){jl(i,-1)}function j_(i){jl(i,1)}function $_(i,e){var t=Fv(e,".datepicker-cell");if(!(!t||t.classList.contains("disabled"))){var n=i.picker.currentView,r=n.id,s=n.isMinView;s?i.setDate(Number(t.dataset.date)):r===1?Bg(i,Number(t.dataset.month)):Bg(i,Number(t.dataset.year))}}function q_(i){!i.inline&&!i.config.disableTouchKeyboard&&i.inputField.focus()}function Fg(i,e){if(e.title!==void 0&&(e.title?(i.controls.title.textContent=e.title,Js(i.controls.title)):(i.controls.title.textContent="",Xs(i.controls.title))),e.prevArrow){var t=i.controls.prevBtn;Hl(t),e.prevArrow.forEach(function(l){t.appendChild(l.cloneNode(!0))})}if(e.nextArrow){var n=i.controls.nextBtn;Hl(n),e.nextArrow.forEach(function(l){n.appendChild(l.cloneNode(!0))})}if(e.locale&&(i.controls.todayBtn.textContent=e.locale.today,i.controls.clearBtn.textContent=e.locale.clear),e.todayBtn!==void 0&&(e.todayBtn?Js(i.controls.todayBtn):Xs(i.controls.todayBtn)),Gn(e,"minDate")||Gn(e,"maxDate")){var r=i.datepicker.config,s=r.minDate,o=r.maxDate;i.controls.todayBtn.disabled=!kp(Tr(),s,o)}e.clearBtn!==void 0&&(e.clearBtn?Js(i.controls.clearBtn):Xs(i.controls.clearBtn))}function zg(i){var e=i.dates,t=i.config,n=e.length>0?Cp(e):t.defaultViewDate;return Ov(n,t.minDate,t.maxDate)}function Vg(i,e){var t=new Date(i.viewDate),n=new Date(e),r=i.currentView,s=r.id,o=r.year,l=r.first,a=r.last,u=n.getFullYear();switch(i.viewDate=e,u!==t.getFullYear()&&Ur(i.datepicker,"changeYear"),n.getMonth()!==t.getMonth()&&Ur(i.datepicker,"changeMonth"),s){case 0:return e<l||e>a;case 1:return u!==o;default:return u<l||u>a}}function Qc(i){return window.getComputedStyle(i).direction}var U_=function(){function i(e){xr(this,i),this.datepicker=e;var t=O_.replace(/%buttonClass%/g,e.config.buttonClass),n=this.element=Kn(t).firstChild,r=Rt(n.firstChild.children,3),s=r[0],o=r[1],l=r[2],a=s.firstElementChild,u=Rt(s.lastElementChild.children,3),c=u[0],h=u[1],d=u[2],f=Rt(l.firstChild.children,2),p=f[0],b=f[1],m={title:a,prevBtn:c,viewSwitch:h,nextBtn:d,todayBtn:p,clearBtn:b};this.main=o,this.controls=m;var v=e.inline?"inline":"dropdown";n.classList.add("datepicker-".concat(v)),v==="dropdown"&&n.classList.add("dropdown","absolute","top-0","left-0","z-50","pt-2"),Fg(this,e.config),this.viewDate=zg(e),Ap(e,[[n,"click",q_.bind(null,e),{capture:!0}],[o,"click",$_.bind(null,e)],[m.viewSwitch,"click",V_.bind(null,e)],[m.prevBtn,"click",H_.bind(null,e)],[m.nextBtn,"click",j_.bind(null,e)],[m.todayBtn,"click",F_.bind(null,e)],[m.clearBtn,"click",z_.bind(null,e)]]),this.views=[new R_(this),new N_(this),new Ng
28(this,{id:2,name:"years",cellClass:"year",step:1}),new Ng(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[e.config.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),e.config.container.appendChild(this.element)}return Er(i,[{key:"setOptions",value:function(t){Fg(this,t),this.views.forEach(function(n){n.init(t,!1)}),this.currentView.render()}},{key:"detach",value:function(){this.datepicker.config.container.removeChild(this.element)}},{key:"show",value:function(){if(!this.active){this.element.classList.add("active","block"),this.element.classList.remove("hidden"),this.active=!0;var t=this.datepicker;if(!t.inline){var n=Qc(t.inputField);n!==Qc(t.config.container)?this.element.dir=n:this.element.dir&&this.element.removeAttribute("dir"),this.place(),t.config.disableTouchKeyboard&&t.inputField.blur()}Ur(t,"show")}}},{key:"hide",value:function(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active","block"),this.element.classList.add("active","block","hidden"),this.active=!1,Ur(this.datepicker,"hide"))}},{key:"place",value:function(){var t=this.element,n=t.classList,r=t.style,s=this.datepicker,o=s.config,l=s.inputField,a=o.container,u=this.element.getBoundingClientRect(),c=u.width,h=u.height,d=a.getBoundingClientRect(),f=d.left,p=d.top,b=d.width,m=l.getBoundingClientRect(),v=m.left,g=m.top,y=m.width,w=m.height,E=o.orientation,x=E.x,S=E.y,_,M,O;a===document.body?(_=window.scrollY,M=v+window.scrollX,O=g+_):(_=a.scrollTop,M=v-f,O=g-p+_),x==="auto"&&(M<0?(x="left",M=10):M+c>b?x="right":x=Qc(l)==="rtl"?"right":"left"),x==="right"&&(M-=c-y),S==="auto"&&(S=O-h<_?"bottom":"top"),S==="top"?O-=h:O+=w,n.remove("datepicker-orient-top","datepicker-orient-bottom","datepicker-orient-right","datepicker-orient-left"),n.add("datepicker-orient-".concat(S),"datepicker-orient-".concat(x)),r.top=O&&"".concat(O,"px"),r.left=M&&"".concat(M,"px")}},{key:"setViewSwitchLabel",value:function(t){this.controls.viewSwitch.textContent=t}},{key:"setPrevBtnDisabled",value:function(t){this.controls.prevBtn.disabled=t}},{key:"setNextBtnDisabled",value:function(t){this.controls.nextBtn.disabled=t}},{key:"changeView",value:function(t){var n=this.currentView,r=this.views[t];return r.id!==n.id&&(this.currentView=r,this._renderMethod="render",Ur(this.datepicker,"changeView"),this.main.replaceChild(r.element,n.element)),this}},{key:"changeFocus",value:function(t){return this._renderMethod=Vg(this,t)?"render":"refreshFocus",this.views.forEach(function(n){n.updateFocus()}),this}},{key:"update",value:function(){var t=zg(this.datepicker);return this._renderMethod=Vg(this,t)?"render":"refresh",this.views.forEach(function(n){n.updateFocus(),n.updateSelection()}),this}},{key:"render",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,n=t&&this._renderMethod||"render";delete this._renderMethod,this.currentView[n]()}}])}();function Hv(i,e,t,n,r,s){if(kp(i,r,s)){if(n(i)){var o=e(i,t);return Hv(o,e,t,n,r,s)}return i}}function xa(i,e,t,n){var r=i.picker,s=r.currentView,o=s.step||1,l=r.viewDate,a,u;switch(s.id){case 0:n?l=$r(l,t*7):e.ctrlKey||e.metaKey?l=qr(l,t):l=$r(l,t),a=$r,u=function(h){return s.disabled.includes(h)};break;case 1:l=Fl(l,n?t*4:t),a=Fl,u=function(h){var d=new Date(h),f=s.year,p=s.disabled;return d.getFullYear()===f&&p.includes(d.getMonth())};break;default:l=qr(l,t*(n?4:1)*o),a=qr,u=function(h){return s.disabled.includes($i(h,o))}}l=Hv(l,a,t<0?-o:o,u,s.minDate,s.maxDate),l!==void 0&&r.changeFocus(l).render()}function W_(i,e){if(e.key==="Tab"){Vv(i);return}var t=i.picker,n=t.currentView,r=n.id,s=n.isMinView;if(t.active)if(i.editMode)switch(e.key){case"Escape":t.hide();break;case"Enter":i.exitEditMode({update:!0,autohide:i.config.autohide});break;default:return}else switch(e.key){case"Escape":t.hide();break;case"ArrowLeft":if(e.ctrlKey||e.metaKey)jl(i,-1);else if(e.shiftKey){i.enterEditMode();return}else xa(i,e,-1,!1);break;case"ArrowRight":if(e.ctrlKey||e.metaKey)jl(i,1);else if(e.shiftKey){i.enterEditMode();return}else xa(i,e,1,!1);break;case"ArrowUp":if(e.ctrlKey||e.metaKey)zv(i);else if(e.shiftKey){i.enterEditMode();return}else xa(i,e,-1,!0);break;case"ArrowDown":if(e.shiftKey&&!e.ctrlKey&&!e.metaKey){i.enterEditMode();return}xa(i,e,1,!0);break;case"Enter":s?i.setDate(t.viewDate):t.changeView(r-1).render();break;case"Backspace":case"Delete":i.enterEditMode();return;default:e.key.length===1&&!e.ctrlKey&&!e.metaKey&&i.enterEditMode();return}else switch(e.key){case"ArrowDown":case"Escape":t.show();break;case"Enter":i.update();break;default:return}e.preventDefault(),e.stopPropagation()}function G_(i){i.config.showOnFocus&&!i._showing&&i.show()}function K_(i,e){var t=e.target;(i.picker.active||i.config.showOnClick)&&(t._active=t===document.activeElement,t._clicking=setTimeout(function(){delete t._active,delete t._clicking},2e3))}function Y_(i,e){var t=e.target;t._clicking&&(clearTimeout(t._clicking),delete t._clicking,t._active&&i.enterEditMode(),delete t._active,i.config.showOnClick&&i.show())}function X_(i,e){e.clipboardData.types.includes("text/plain")&&i.enterEditMode()}function J_(i,e){var t=i.element;if(t===document.activeElement){var n=i.picker.element;Fv(e,function(r){return r===t||r===n})||Vv(i)}}function jv(i,e){return i.map(function(t){return wo(t,e.format,e.locale)}).join(e.dateDelimiter)}function $v(i,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=i.config,r=i.dates,s=i.rangepicker;if(e.length===0)return t?[]:void 0;var o=s&&i===s.datepickers[1],l=e.reduce(function(a,u){var c=vo(u,n.format,n.locale);if(c===void 0)return a;
28if(n.pickLevel>0){var h=new Date(c);n.pickLevel===1?c=o?h.setMonth(h.getMonth()+1,0):h.setDate(1):c=o?h.setFullYear(h.getFullYear()+1,0,0):h.setMonth(0,1)}return kp(c,n.minDate,n.maxDate)&&!a.includes(c)&&!n.datesDisabled.includes(c)&&!n.daysOfWeekDisabled.includes(new Date(c).getDay())&&a.push(c),a},[]);if(l.length!==0)return n.multidate&&!t&&(l=l.reduce(function(a,u){return r.includes(u)||a.push(u),a},r.filter(function(a){return!l.includes(a)}))),n.maxNumberOfDates&&l.length>n.maxNumberOfDates?l.slice(n.maxNumberOfDates*-1):l}function $l(i){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=i.config,r=i.picker,s=i.inputField;if(e&2){var o=r.active?n.pickLevel:n.startView;r.update().changeView(o).render(t)}e&1&&s&&(s.value=jv(i.dates,n))}function Hg(i,e,t){var n=t.clear,r=t.render,s=t.autohide;r===void 0&&(r=!0),r?s===void 0&&(s=i.config.autohide):s=!1;var o=$v(i,e,n);o&&(o.toString()!==i.dates.toString()?(i.dates=o,$l(i,r?3:1),Ur(i,"changeDate")):$l(i,1),s&&i.hide())}var il=function(){function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;xr(this,i),e.datepicker=this,this.element=e;var r=this.config=Object.assign({buttonClass:t.buttonClass&&String(t.buttonClass)||"button",container:document.body,defaultViewDate:Tr(),maxDate:void 0,minDate:void 0},Jc(Jo,this));this._options=t,Object.assign(r,Jc(t,this));var s=this.inline=e.tagName!=="INPUT",o,l;if(s)r.container=e,l=Gc(e.dataset.date,r.dateDelimiter),delete e.dataset.date;else{var a=t.container?document.querySelector(t.container):null;a&&(r.container=a),o=this.inputField=e,o.classList.add("datepicker-input"),l=Gc(o.value,r.dateDelimiter)}if(n){var u=n.inputs.indexOf(o),c=n.datepickers;if(u<0||u>1||!Array.isArray(c))throw Error("Invalid rangepicker object.");c[u]=this,Object.defineProperty(this,"rangepicker",{get:function(){return n}})}this.dates=[];var h=$v(this,l);h&&h.length>0&&(this.dates=h),o&&(o.value=jv(this.dates,r));var d=this.picker=new U_(this);if(s)this.show();else{var f=J_.bind(null,this),p=[[o,"keydown",W_.bind(null,this)],[o,"focus",G_.bind(null,this)],[o,"mousedown",K_.bind(null,this)],[o,"click",Y_.bind(null,this)],[o,"paste",X_.bind(null,this)],[document,"mousedown",f],[document,"touchstart",f],[window,"resize",d.place.bind(d)]];Ap(this,p)}}return Er(i,[{key:"active",get:function(){return!!(this.picker&&this.picker.active)}},{key:"pickerElement",get:function(){return this.picker?this.picker.element:void 0}},{key:"setOptions",value:function(t){var n=this.picker,r=Jc(t,this);Object.assign(this._options,t),Object.assign(this.config,r),n.setOptions(r),$l(this,3)}},{key:"show",value:function(){if(this.inputField){if(this.inputField.disabled)return;this.inputField!==document.activeElement&&(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function(){return this.hide(),Nv(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,r=n?function(s){return wo(s,n,t.config.locale)}:function(s){return new Date(s)};if(this.config.multidate)return this.dates.map(r);if(this.dates.length>0)return r(this.dates[0])}},{key:"setDate",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var s=[].concat(n),o={},l=Cp(n);Bl(l)==="object"&&!Array.isArray(l)&&!(l instanceof Date)&&l&&Object.assign(o,s.pop());var a=Array.isArray(s[0])?s[0]:s;Hg(this,a,o)}},{key:"update",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;if(!this.inline){var n={clear:!0,autohide:!!(t&&t.autohide)},r=Gc(this.inputField.value,this.config.dateDelimiter);Hg(this,r,n)}}},{key:"refresh",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;t&&typeof t!="string"&&(n=t,t=void 0);var r;t==="picker"?r=2:t==="input"?r=1:r=3,$l(this,r,!n)}},{key:"enterEditMode",value:function(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit","border-blue-700","!border-primary-700"))}},{key:"exitEditMode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0;
28if(!(this.inline||!this.editMode)){var n=Object.assign({update:!1},t);delete this.editMode,this.inputField.classList.remove("in-edit","border-blue-700","!border-primary-700"),n.update&&this.update(n)}}}],[{key:"formatDate",value:function(t,n,r){return wo(t,n,r&&ks[r]||ks.en)}},{key:"parseDate",value:function(t,n,r){return vo(t,n,r&&ks[r]||ks.en)}},{key:"locales",get:function(){return ks}}])}();function jg(i){var e=Object.assign({},i);return delete e.inputs,delete e.allowOneSidedRange,delete e.maxNumberOfDates,e}function $g(i,e,t,n){Ap(i,[[t,"changeDate",e]]),new il(t,n,i)}function _s(i,e){if(!i._updating){i._updating=!0;var t=e.target;if(t.datepicker!==void 0){var n=i.datepickers,r={render:!1},s=i.inputs.indexOf(t),o=s===0?1:0,l=n[s].dates[0],a=n[o].dates[0];l!==void 0&&a!==void 0?s===0&&l>a?(n[0].setDate(a,r),n[1].setDate(l,r)):s===1&&l<a&&(n[0].setDate(l,r),n[1].setDate(a,r)):i.allowOneSidedRange||(l!==void 0||a!==void 0)&&(r.clear=!0,n[o].setDate(n[s].dates,r)),n[0].picker.update().render(),n[1].picker.update().render(),delete i._updating}}}var Zc=function(){function i(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xr(this,i);var n=Array.isArray(t.inputs)?t.inputs:Array.from(e.querySelectorAll("input"));if(!(n.length<2)){e.rangepicker=this,this.element=e,this.inputs=n.slice(0,2),this.allowOneSidedRange=!!t.allowOneSidedRange;var r=_s.bind(null,this),s=jg(t),o=[];Object.defineProperty(this,"datepickers",{get:function(){return o}}),$g(this,r,this.inputs[0],s),$g(this,r,this.inputs[1],s),Object.freeze(o),o[0].dates.length>0?_s(this,{target:this.inputs[0]}):o[1].dates.length>0&&_s(this,{target:this.inputs[1]})}}return Er(i,[{key:"dates",get:function(){return this.datepickers.length===2?[this.datepickers[0].dates[0],this.datepickers[1].dates[0]]:void 0}},{key:"setOptions",value:function(t){this.allowOneSidedRange=!!t.allowOneSidedRange;var n=jg(t);this.datepickers[0].setOptions(n),this.datepickers[1].setOptions(n)}},{key:"destroy",value:function(){this.datepickers[0].destroy(),this.datepickers[1].destroy(),Nv(this),delete this.element.rangepicker}},{key:"getDates",value:function(){var t=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,r=n?function(s){return wo(s,n,t.datepickers[0].config.locale)}:function(s){return new Date(s)};return this.dates.map(function(s){return s===void 0?s:r(s)})}},{key:"setDates",value:function(t,n){var r=Rt(this.datepickers,2),s=r[0],o=r[1],l=this.dates;this._updating=!0,s.setDate(t),o.setDate(n),delete this._updating,o.dates[0]!==l[1]?_s(this,{target:this.inputs[1]}):s.dates[0]!==l[0]&&_s(this,{target:this.inputs[0]})}}])}(),ql=function(){return ql=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},ql.apply(this,arguments)},Vt={defaultDatepickerId:null,autohide:!1,format:"mm/dd/yyyy",maxDate:null,minDate:null,orientation:"bottom",buttons:!1,autoSelectToday:0,title:null,language:"en",rangePicker:!1,onShow:function(){},onHide:function(){}},Q_={id:null,override:!0},qv=function(){function i(e,t,n){e===void 0&&(e=null),t===void 0&&(t=Vt),n===void 0&&(n=Q_),this._instanceId=n.id?n.id:e.id,this._datepickerEl=e,this._datepickerInstance=null,this._options=ql(ql({},Vt),t),this._initialized=!1,this.init(),he.addInstance("Datepicker",this,this._instanceId,n.override)}return i.prototype.init=function(){this._datepickerEl&&!this._initialized&&(this._options.rangePicker?this._datepickerInstance=new Zc(this._datepickerEl,this._getDatepickerOptions(this._options)):this._datepickerInstance=new il(this._datepickerEl,this._getDatepickerOptions(this._options)),this._initialized=!0)},i.prototype.destroy=function(){this._initialized&&(this._initialized=!1,this._datepickerInstance.destroy())},i.prototype.removeInstance=function(){this.destroy(),he.removeInstance("Datepicker",this._instanceId)},i.prototype.destroyAndRemoveInstance=function(){this.destroy(),this.removeInstance()},i.prototype.getDatepickerInstance=function(){return this._datepickerInstance},i.prototype.getDate=function(){if(this._options.rangePicker&&this._datepickerInstance instanceof Zc)return this._datepickerInstance.getDates();if(!this._options.rangePicker&&this._datepickerInstance instanceof il)return this._datepickerInstance.getDate()},i.prototype.setDate=function(e){if(this._options.rangePicker&&this._datepickerInstance instanceof Zc)return this._datepickerInstance.setDates(e);if(!this._options.rangePicker&&this._datepickerInstance instanceof il)return this._datepickerInstance.setDate(e)},i.prototype.show=function(){this._datepickerInstance.show(),this._options.onShow(this)},i.prototype.hide=function(){this._datepickerInstance.hide(),this._options.onHide(this)},i.prototype._getDatepickerOptions=function(e){var t={};return e.buttons&&(t.todayBtn=!0,t.clearBtn=!0,e.autoSelectToday&&(t.todayBtnMode=1)),e.autohide&&(t.autohide=!0),e.format&&(t.format=e.format),e.maxDate&&(t.maxDate=e.maxDate),e.minDate&&(t.minDate=e.minDate),e.orientation&&(t.orientation=e.orientation),e.title&&(t.title=e.title),e.language&&(t.language=e.language),t},i.prototype.updateOnShow=function(e){this._options.onShow=e},i.prototype.updateOnHide=function(e){this._options.onHide=e},i}();function Mp(){document.querySelectorAll("[datepicker], [inline-datepicker], [date-rangepicker]").forEach(function(i){if(i){var e=i.hasAttribute("datepicker-buttons"),t=i.hasAttribute("datepicker-autoselect-today"),n=i.hasAttribute("datepicker-autohide"),r=i.getAttribute("datepicker-format"),s=i.getAttribute("datepicker-max-date"),o=i.getAttribute("datepicker-min-date"),l=i.getAttribute("datepicker-orientation"),a=i.getAttribute("datepicker-title"),u=i.getAttribute("datepicker-language"),c=i.hasAttribute("date-rangepicker");new qv(i,{buttons:e||Vt.buttons,autoSelectToday:t||Vt.autoSelectToday,autohide:n||Vt.autohide,format:r||Vt.format,maxDate:s||Vt.maxDate,minDate:o||Vt.minDate,orientation:l||Vt.orientation,title:a||Vt.title,language:u||Vt.language,rangePicker:c||Vt.rangePicker})}else console.error("The datepicker element does not exist. Please check the datepicker attribute.")})}typeof window<"u"&&(window.Datepicker=qv,window.initDatepickers=Mp);function Uv(){ep(),tp(),np(),ip(),dp(),hp(),pp(),mp(),bp(),yp(),vp(),wp(),Ep(),Mp()}typeof window<"u"&&(window.initFlowbite=Uv);var Z_=new GC("load",[ep,tp,np,ip,dp,hp,pp,mp,bp,yp,vp,wp,Ep,Mp]);Z_.init();class eA extends U{connect(){document.addEventListener("turbo:before-stream-render",e=>{const t=e.detail.render;e.detail.render=function(n){t(n),Uv()}}),this.initCustomDropdowns()}initCustomDropdowns(){const e=document.querySelectorAll("[data-custom-dropdown-toggle]");Array.from(e).forEach(t=>this.initCustomDropdown(t))}initCustomDropdown(e){const t=e.dataset.customDropdownToggle,n=e.getAttribute("id"),r=document.getElementById(t),s=document.getElementById(n),o={placement:e.dataset.dropdownPlacement||"bottom",triggerType:e.dataset.dropdownTrigger||"click",offsetSkidding:0,offsetDistance:10,delay:300,ignoreClickOutsideClass:!1,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},l={id:t,override:!0};return new Dropdown(r,s,o,l)}}const tA=Object.freeze(Object.defineProperty({__proto__:null,default:eA},Symbol.toStringTag,{value:"Module"}));class Wv extends Ii{connect(){this.initComposeModal=this.initComposeModal.bind(this),this.closeCompose=this.closeCompose.b
28ind(this),this.composeModal=this.initComposeModal()}initComposeModal(){const e=document.getElementById("composeModal"),t={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},n={id:"composeModal",override:!0};return new Modal(e,t,n)}compose(e){console.log(e.currentTarget);const t=e.currentTarget.dataset;this.messageTarget.value=this.messageTarget.dataset.body.replace(/__NAME__/i,t.name),this.senderTarget.value=this.signatureTargets.filter(n=>n.checked)[0].value,this.receiverTarget.innerHTML=t.email,this.userTarget.value=t.id,this.composeModal.show()}closeCompose(){this.composeModal.hide()}selectSender(e){e.currentTarget.checked&&(document.getElementById("selectedSender").innerHTML=e.currentTarget.value)}toggle(e){super.toggle(e),this.toggleDisabledButton()}toggleDisabledButton(){const e=this,t=document.getElementById("selectedForm");this.checked.length>0?(this.checked.forEach(n=>this.handleCheckboxChange(n)),e.disabledButtonTarget.disabled=!1,e.disabledButtonTarget.classList.remove(...e.disabledButtonTarget.dataset.inactiveClass.split(" ")),e.disabledButtonTarget.classList.add(...e.disabledButtonTarget.dataset.activeClass.split(" "))):(t.querySelectorAll(".selected_ids").forEach(n=>n.remove()),e.disabledButtonTarget.disabled=!0,e.disabledButtonTarget.classList.remove(...e.disabledButtonTarget.dataset.activeClass.split(" ")),e.disabledButtonTarget.classList.add(...e.disabledButtonTarget.dataset.inactiveClass.split(" ")))}handleCheckboxChange(e){const t=document.getElementById("selectedForm");if(e.checked){const n=document.createElement("input");n.type="hidden",n.name=e.name,n.value=e.value,n.id=e.value+"_hidden",n.classList.add("selected_ids"),t.appendChild(n)}else{const n=document.getElementById(e.value+"_hidden");n&&t.removeChild(n)}}submitted(e){if(e.detail.success){const t=document.getElementById("searchForm");t&&t.requestSubmit()}}}$(Wv,"targets",["checkbox","checkboxAll","signature","receiver","message","sender","user","disabledButton"]);const nA=Object.freeze(Object.defineProperty({__proto__:null,default:Wv},Symbol.toStringTag,{value:"Module"}));class iA extends U{connect(){new Qu(".element",{onMoreLess:(e,t)=>{}})}}const rA=Object.freeze(Object.defineProperty({__proto__:null,default:iA},Symbol.toStringTag,{value:"Module"}));class ph extends U{connect(){var t;console.log("AI Filter Generator Controller connected"),console.log("Targets:",this.targets),this.modalElement=this.hasModalTarget?this.modalTarget:document.getElementById("aiGenerateModal"),this.promptElement=this.hasPromptTarget?this.promptTarget:document.getElementById("aiFilterPrompt"),this.generateButtonElement=this.hasGenerateButtonTarget?this.generateButtonTarget:document.querySelector('[data-ai--filter-generator-target="generateButton"]'),console.log("Modal element:",this.modalElement),console.log("Prompt element:",this.promptElement),console.log("Generate button element:",this.generateButtonElement);const e=(t=this.generateButtonElement)==null?void 0:t.querySelector('[data-ai--filter-generator-target="loadingIcon"]');console.log("Loading icon found:",!!e),this.previousActiveElement=null,this.handleKeydown=this.handleKeydown.bind(this)}disconnect(){document.removeEventListener("keydown",this.handleKeydown)}toggle(){console.log("Toggle method called"),console.log("Modal element:",this.modalElement),console.log("Modal has hidden class:",this.modalElement.classList.contains("hidden")),this.modalElement.classList.contains("hidden")?(console.log("Opening modal..."),this.openModal()):(console.log("Closing modal..."),this.closeModal())}openModal(){console.log("openModal called");try{this.previousActiveElement=document.activeElement,console.log("Previous active element:",this.previousActiveElement),console.log("Modal element before:",this.modalElement),this.modalElement.classList.remove("hidden"),console.log("Modal element after:",this.modalElement),this.makeBackgroundInert(!0),setTimeout(()=>{this.promptElement.focus()},100),document.addEventListener("keydown",this.handleKeydown)}
28catch(e){console.error("Error in openModal method:",e)}}close(){this.closeModal()}closeModal(){try{this.modalElement.classList.add("hidden"),this.makeBackgroundInert(!1),this.promptElement.value="",this.resetButtonState(),this.previousActiveElement&&this.previousActiveElement.focus(),document.removeEventListener("keydown",this.handleKeydown)}catch(e){console.error("Error in closeModal method:",e)}}makeBackgroundInert(e){try{const t=document.body,n=this.modalElement;t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])').forEach(s=>{if(!n.contains(s))if(e)s.hasAttribute("data-original-tabindex")||s.setAttribute("data-original-tabindex",s.getAttribute("tabindex")||"0"),s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true");else{const o=s.getAttribute("data-original-tabindex");o?(s.setAttribute("tabindex",o),s.removeAttribute("data-original-tabindex")):s.removeAttribute("tabindex"),s.removeAttribute("aria-hidden")}})}catch(t){console.error("Error in makeBackgroundInert method:",t)}}handleKeydown(e){e.key==="Escape"&&this.closeModal(),!(e.key==="Enter"&&e.target===this.promptElement)&&e.key==="Enter"&&(e.target===this.generateButtonElement||e.target.closest('[data-action*="closeModal"]'))&&(e.preventDefault(),e.target===this.generateButtonElement?this.generateFilters():this.closeModal())}resetButtonState(){var e;try{console.log("resetButtonState called"),this.generateButtonElement&&(console.log("Button before reset:",this.generateButtonElement.textContent,this.generateButtonElement.disabled),this.generateButtonElement.disabled=!1,this.generateButtonElement.textContent="Generate",console.log("Button after reset:",this.generateButtonElement.textContent,this.generateButtonElement.disabled));const t=(e=this.generateButtonElement)==null?void 0:e.querySelector('[data-ai--filter-generator-target="loadingIcon"]');t?(t.classList.add("hidden"),console.log("Loading icon hidden")):console.log("Loading icon target not found")}catch(t){console.error("Error resetting button state:",t)}}async generateFilters(){try{const e=this.promptElement.value.trim();if(!e){this.showErrorMessage("Please enter a description of the filters you want to generate.");return}console.log("Starting generateFilters..."),console.log("Button before loading state:",this.generateButtonElement.textContent,this.generateButtonElement.disabled);const t=this.generateButtonElement.querySelector('[data-ai--filter-generator-target="loadingIcon"]');t&&t.classList.remove("hidden"),this.generateButtonElement.disabled=!0,this.generateButtonElement.textContent="Generating...",console.log("Button after loading state:",this.generateButtonElement.textContent,this.generateButtonElement.disabled);const n=await ye("/ai/generate_filters",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({prompt:e})});if(!n.ok)throw new Error("Failed to generate filters");const r=await n.json();if(r.list_params&&this.createNewList(r.list_params),r.filters)this.applyFiltersToSearchForm(r.filters),this.closeModal(),this.showSuccessMessage("Filters generated and applied successfully!");else throw r.error?new Error(r.error):new Error("No filters returned from AI")}catch(e){console.error("Error generating AI filters:",e),this.showErrorMessage("Failed to generate filters. Please try again.")}finally{console.log("Finally block - resetting button state...");const e=this.generateButtonElement.querySelector('[data-ai--filter-generator-target="loadingIcon"]');e&&e.classList.add("hidden"),this.generateButtonElement.disabled=!1,this.generateButtonElement.textContent="Generate",console.log("Button after reset:",this.generateButtonElement.textContent,this.generateButtonElement.disabled)}}applyFiltersToSearchForm(e){try{const t=document.getElementById("searchForm");if(!t)return;t.reset(),Object.entries(e).forEach(([r,s])=>{const o=Array.isArray(s),l=o?s:[s];let a=t.querySelectorAll(`[name="s[${r}][]"], [name="s[${r}]"]`);a.length!==0&&a.forEach(u=>{var h;if(u.type==="checkbox"){const d=u.closest('[data-controller="search--checkboxes"]');o?u.checked=l.includes(u.value):u.checked=u.value===String(s)||s===!0,d&&u.dispatchEvent(new Event("change",{bubbles:!0}))}else if(u.hasAttribute("data-search--choices-target")){const d=u.closest('[data-controller="search--choices"]'),f=(h=d==null?void 0:d.choices)==null?void 0:h.choices;f&&(f.clearStore(),l.length>0&&f.setValue(l))}else u.value=o?l[0]:s;u.dispatchEvent(new Event("change",{bubbles:!0}))})});const n=t.closest('[data-controller="search--form"]');n!=null&&n.updateActiveSearch&&n.updateActiveSearch(),setTimeout(()=>{var r;
28(r=document.getElementById("searchAction"))==null||r.click()},300)}catch(t){console.error("Error applying filters:",t)}}async createNewList(e){var t,n;try{const r=(t=e==null?void 0:e.name)==null?void 0:t.trim();if(!r)return;const s=new URLSearchParams({"list[name]":r,"list[list_type]":"Prospect"}),o=await ye("/searches/lists",{method:"POST",headers:{Accept:"text/vnd.turbo-stream.html","X-CSRF-Token":((n=document.querySelector('meta[name="csrf-token"]'))==null?void 0:n.content)||"","Content-Type":"application/x-www-form-urlencoded"},body:s});if(!o.ok)throw new Error(`Request failed with status ${o.status}`);const l=await o.text();l!=null&&l.trim()&&Turbo.renderStreamMessage(l)}catch(r){console.error("Error creating list:",r)}}showSuccessMessage(e){const t=document.createElement("div");t.className="fixed top-4 right-4 z-50 bg-green-500 text-white px-4 py-2 rounded-md shadow-lg",t.textContent=e,document.body.appendChild(t),setTimeout(()=>{t.remove()},3e3)}showErrorMessage(e){const t=document.createElement("div");t.className="fixed top-4 right-4 z-50 bg-red-500 text-white px-4 py-2 rounded-md shadow-lg",t.textContent=e,document.body.appendChild(t),setTimeout(()=>{t.remove()},5e3)}}$(ph,"targets",["modal","prompt","generateButton"]),$(ph,"values",{hasLoadingIcon:Boolean});const sA=Object.freeze(Object.defineProperty({__proto__:null,default:ph},Symbol.toStringTag,{value:"Module"}));var Gv="basil",oA=function(e){return e===3?"v3":e},Kv="https://js.stripe.com",aA="".concat(Kv,"/").concat(Gv,"/stripe.js"),lA=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,uA=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,qg="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",cA=function(e){return lA.test(e)||uA.test(e)},dA=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Kv,'"]')),t=0;t<e.length;t++){var n=e[t];if(cA(n.src))return n}return null},Ug=function(e){var t="",n=document.createElement("script");n.src="".concat(aA).concat(t);var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n},hA=function(e,t){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"7.5.0",startTime:t})},As=null,Ea=null,Ta=null,fA=function(e){return function(t){e(new Error("Failed to load Stripe.js",{cause:t}))}},pA=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}},mA=function(e){return As!==null?As:(As=new Promise(function(t,n){if(typeof window>"u"||typeof document>"u"){t(null);return}if(window.Stripe&&e&&console.warn(qg),window.Stripe){t(window.Stripe);return}try{var r=dA();if(r&&e)console.warn(qg);else if(!r)r=Ug(e);else if(r&&Ta!==null&&Ea!==null){var s;r.removeEventListener("load",Ta),r.removeEventListener("error",Ea),(s=r.parentNode)===null||s===void 0||s.removeChild(r),r=Ug(e)}Ta=pA(t,n),Ea=fA(n),r.addEventListener("load",Ta),r.addEventListener("error",Ea)}catch(o){n(o);return}}),As.catch(function(t){return As=null,Promise.reject(t)}))},gA=function(e,t,n){if(e===null)return null;var r=t[0],s=r.match(/^pk_test/),o=oA(e.version),l=Gv;s&&o!==l&&console.warn("Stripe.js@".concat(o," was loaded on the page, but @stripe/stripe-js@").concat("7.5.0"," expected Stripe.js@").concat(l,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var a=e.apply(void 0,t);return hA(a,n),a},Ls,Yv=!1,Xv=function(){return Ls||(Ls=mA(null).catch(function(e){return Ls=null,Promise.reject(e)}),Ls)};Promise.resolve().then(function(){return Xv()}).catch(function(i){Yv||console.warn(i)});var Wg=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Yv=!0;var r=Date.now();return Xv().then(function(s){return gA(s,t,r)})};class mh extends U{async connect(){this.billingDetails={},this.hasStripeSectionTarget&&this.initializeStripeValue=="yes"&&(this.stripe=await Wg(this.stripeKeyValue),await this.initializeStripeElements()),this.hasPaypalSectionTarget&&await this.loadPayPalScript().then(()=>{this.initializePayPal(),this.paypalInitialized=!0})}showLoading(e="Processing your payment..."){this.loadingOverlayTarget.classList.remove("hidden");const t=this.loadingOverlayTarget.querySelector("p:first-of-type");t&&(t.textContent=e)}hideLoading(){this.loadingOverlayTarget.classList.add("hidden")}afterPayementSuccess(e={}){this.dispatch("done",{detail:e}
28),this.hideLoading(),this.resetPaymentForm()}resetPaymentForm(){this.paymentElement&&this.paymentElement.clear(),this.billingDetails={},["payment-element-errors","card-errors","payment-errors","paypal-errors"].forEach(t=>{const n=document.getElementById(t);n&&(n.textContent="",n.style.display="none")}),this.setSubmitButtonState(!1,"Secure Checkout")}afterPayementError(e={}){this.dispatch("error",{detail:e}),this.hideLoading()}async initializeStripeElements(e=null){var o,l,a,u;const t={theme:"flat",variables:{fontFamily:' "SF Pro Display", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol',fontLineHeight:"1.5",borderRadius:"5px",fontSize:"14px",accessibleColorOnColorPrimary:"#262626"},rules:{".Block":{backgroundColor:"var(--colorBackground)",boxShadow:"none",padding:"12px"},".Input":{padding:"12px",fontSize:"14px"},".Input:disabled, .Input--invalid:disabled":{color:"lightgray"},".Input":{backgroundColor:"#f9fafb",border:"1px solid #d1d5db",color:"#111827",fontSize:"0.875rem",lineHeight:"1.25rem",borderRadius:"0.5rem",display:"block",width:"100%",padding:"0.5rem"},".Input:focus":{outline:"none",borderColor:"#3b82f6",boxShadow:"0 0 0 1px #3b82f6"},".Tab":{padding:"10px 12px 8px 12px",border:"none"},".Tab:hover":{border:"none",boxShadow:"0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 7px rgba(18, 42, 66, 0.04)"},".Tab--selected, .Tab--selected:focus, .Tab--selected:hover":{border:"none",backgroundColor:"#fff",boxShadow:"0 0 0 1.5px var(--colorPrimaryText), 0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 7px rgba(18, 42, 66, 0.04)"},".Label":{fontWeight:"500",fontSize:"13px",marginBottom:"3px"}}},n=e||((o=document.getElementById("ai-stripe-modal-hero-amount"))==null?void 0:o.value)||.5,r=typeof Storage<"u"&&sessionStorage.getItem("currentDownloadId")||null;console.log("Creating payment intent for amount:",n,"and country:",this.countryValue||"US");try{const c=await ye("/ai/stripe/create",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content},body:JSON.stringify({amount:n,price_id:this.stripePriceIdValue,customer_id:this.stripeCustomerIdValue,plan_id:this.planIdValue,customer:{address:{country:this.countryValue||"US"}},country:this.countryValue||"US",download_id:r})}),h=await c.json();if(!c.ok){console.error("Failed to create payment intent:",h.error);const d=document.getElementById("payment-element-errors");d&&(d.textContent=h.error||"Failed to initialize payment");return}if(this.clientSecret=h.client_secret,this.paymentCurrency=h.currency||"usd",this.paymentCurrencySymbol=h.currency_symbol||"$",h.currency&&h.amount){const d=((u=(a=(l=document.querySelector('[data-ai--payment-target="stripeSection"]'))==null?void 0:l.closest('[id*="modal"]'))==null?void 0:a.id)==null?void 0:u.replace("-main",""))||"ai-stripe-modal",f=document.getElementById(`${d}-hero-price`);if(f){const p=(h.amount/100).toFixed(2);f.textContent=`${h.currency_symbol}${p}`,console.log(`Updated price display: ${h.currency_symbol}${p} (${h.currency.toUpperCase()})`)}}this.elements=this.stripe.elements({clientSecret:this.clientSecret,appearance:t}),this.paymentElement=this.elements.create("payment",{layout:{type:"tabs",defaultCollapsed:!1},paymentMethodOrder:["card"],fields:{billingDetails:"auto"},wallets:{applePay:"never",googlePay:"never",link:"never"}}),this.paymentElement.mount("#payment-element"),this.currentAmount=parseFloat(n);var s=this;this.paymentElement.on("change",d=>{var p,b,m,v;const f=document.getElementById("payment-element-errors");if(d.error?f.textContent=d.error.message:f.textContent="",d.value){const g=((p=d.value.billingDetails)==null?void 0:p.address)||{};s.billingDetails={name:((b=d.value.billingDetails)==null?void 0:b.name)||this.fullNameValue||"",email:((m=d.value.billingDetails)==null?void 0:m.email)||this.emailValue||"",phone:((v=d.value.billingDetails)==null?void 0:v.phone)||"",address:{line1:g.line1||"",line2:g.line2||"",city:g.city||"",state:g.state||"",postal_code:g.postalCode||"",country:g.country||this.countryValue||"US"}},console.log("Billing details captured:",s.billingDetails)}})}catch(c){console.error("Error initializing payment elements:",c);const h=document.getElementById("payment-element-errors");h&&(h.textContent=c.message||"Failed to initialize payment")}}async refreshPaymentElement(){var s,o,l,a,u,c;const e=parseFloat(((s=document.getElementById("ai-stripe-modal-hero-amount"))==null?void 0:s.value)||.5),t=typeof Storage<"u"&&sessionStorage.getItem("currentDownloadId")||null;if(!this.stripe){console.log("Stripe not initialized, initializing now with amount:",e),this.stripe=await Wg(this.stripeKeyValue),await this.initializeStripeElements(e);return}const n=this.currentAmount||.5;if(Math.abs(e-n)<.01&&this.paymentElement){console.log("Amount unchanged and element exists, skipping refresh:",e);return}console.log("Refreshing payment intent - amount changed from",n,"to",e),this.showLoading("Updating payment amount..."),this.setSubmitButtonState(!0,"Updating...");try{const h=await ye("/ai/stripe/create",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content},body:JSON.stringify({amount:e,price_id:this.stripePriceIdValue,customer_id:this.stripeCustomerIdValue,plan_id:this.planIdValue,customer:{address:{country:this.countryValue||"US"}},country:this.countryValue||"US",download_id:t})}),d=await h.json();if(!h.ok){console.error("Failed to refresh payment intent:",d.error);const p=document.getElementById("payment-element-errors");p&&(p.textContent=d.error||"Failed to update payment"),this.hideLoading(),this.setSubmitButtonState(!1,"Secure Checkout");return}if(this.paymentElement&&this.paymentElement.unmount(),this.clientSecret=d.client_secret,this.paymentCurrency=d.currency||"usd",this.paymentCurrencySymbol=d.currency_symbol||"$",d.currency&&d.amount){const p=((a=(l=(o=document.querySelector('[data-ai--payment-target="stripeSection"]'))==null?void 0:o.closest('[id*="modal"]'))==null?void 0:l.id)==null?void 0:a.replace("-main",""))||"ai-stripe-modal",b=document.getElementById(`${p}-hero-price`);if(b){const m=(d.amount/100).toFixed(2);b.textContent=`${d.currency_symbol}${m}`,console.log(`Updated price display: ${d.currency_symbol}${m} (${d.currency.toUpperCase()})`)}}
28const f=((c=(u=this.elements)==null?void 0:u.update())==null?void 0:c._appearnce)||{};this.elements=this.stripe.elements({clientSecret:this.clientSecret,appearance:f}),this.paymentElement=this.elements.create("payment",{layout:{type:"tabs",defaultCollapsed:!1},paymentMethodOrder:["card"],fields:{billingDetails:"auto"},wallets:{applePay:"never",googlePay:"never",link:"never"}}),this.paymentElement.mount("#payment-element");var r=this;this.paymentElement.on("change",p=>{var m,v,g,y;const b=document.getElementById("payment-element-errors");if(p.error?b.textContent=p.error.message:b.textContent="",p.value){const w=((m=p.value.billingDetails)==null?void 0:m.address)||{};r.billingDetails={name:((v=p.value.billingDetails)==null?void 0:v.name)||this.fullNameValue||"",email:((g=p.value.billingDetails)==null?void 0:g.email)||this.emailValue||"",phone:((y=p.value.billingDetails)==null?void 0:y.phone)||"",address:{line1:w.line1||"",line2:w.line2||"",city:w.city||"",state:w.state||"",postal_code:w.postalCode||"",country:w.country||this.countryValue||"US"}},console.log("Billing details captured:",r.billingDetails)}}),console.log("Payment element refreshed successfully with new amount:",e),this.currentAmount=e,this.hideLoading(),this.setSubmitButtonState(!1,"Secure Checkout")}catch(h){console.error("Error refreshing payment elements:",h);const d=document.getElementById("payment-element-errors");d&&(d.textContent=h.message||"Failed to update payment"),this.hideLoading(),this.setSubmitButtonState(!1,"Secure Checkout")}}async loadPayPalScript(){return new Promise(e=>{if(typeof paypal>"u"){const t=document.createElement("script"),n=this.paymentTypeValue==="subscription"?"&intent=subscription":"",r=(this.currencyValue||"USD").toUpperCase();t.src=`https://www.paypal.com/sdk/js?client-id=${encodeURIComponent(this.paypalClientIdValue)}¤cy=${r}&components=buttons&enable-funding=card&vault=true${n}`,t.addEventListener("load",e),document.head.appendChild(t)}else e()})}selectPaymentMethod(e){var n,r;const t=e.target.dataset.value;this.paymentMethodTarget.value=t,(n=this.stripeSectionTarget)==null||n.classList.toggle("hidden",t!=="card"),(r=this.paypalSectionTarget)==null||r.classList.toggle("hidden",t!=="paypal"),t==="paypal"&&!this.paypalInitialized&&this.hasPaypalSectionTarget&&(this.initializePayPal(),this.paypalInitialized=!0)}initializePayPal(){this.paymentTypeValue==="subscription"?this.initializePayPalSubscription():this.initializePayPalInstant()}initializePayPalSubscription(){paypal.Buttons({createSubscription:(e,t)=>(this.showLoading("Creating PayPal subscription..."),ye("/subscriptions/paypal/create",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content},body:JSON.stringify({plan_id:this.stripePriceIdValue})}).then(n=>n.ok?n.json():(this.hideLoading(),n.json().then(r=>{throw new Error(r.error||"Failed to create subscription")}))).then(n=>{if(!n.subscriptionID)throw this.hideLoading(),new Error("No subscription ID received");return n.subscriptionID})),onApprove:(e,t)=>(this.showLoading("Finalizing your subscription..."),fetch(`/subscriptions/paypal/approve?subscription_id=${e.subscriptionID}`,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content}}).then(n=>n.ok?n.json():(this.hideLoading(),n.json().then(r=>{throw new Error(r.error||"Subscription approval failed")}))).then(n=>{this.afterPayementSuccess(n),console.log("Payment done")})),onCancel:e=>{this.hideLoading(),console.log("PayPal payment cancelled:",e);let t="Payment was cancelled";return e&&e.details&&e.details.reason==="PAYER_ACTION_REQUIRED_TIMEOUT"&&(t="Payment session expired - please try again"),this.showError(t),this.afterPayementError({message:t,type:"cancelled",data:e}),typeof gtag<"u"&>ag("event","paypal_cancelled",{event_category:"Payment",event_label:"PayPal Popup Closed"}),this.cancelPayPalCheckout()},onError:e=>{this.hideLoading(),console.error("PayPal error:",e);const t=e.message||"PayPal payment failed";return this.showError(t),this.afterPayementError({message:t,type:"error",error:e}),this.cancelPayPalCheckout()},onClick:()=>
28{this.showLoading("Connecting to PayPal...")}}).render("#paypal-button-container")}cancelPayPalCheckout(){var t;const e=(t=document.querySelector("[name='csrf-token']"))==null?void 0:t.content;return e?fetch("/subscriptions/paypal/cancel",{method:"POST",credentials:"same-origin",keepalive:!0,headers:{Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":e}}).catch(n=>{console.warn("Unable to close the PayPal checkout attempt:",n)}):Promise.resolve()}initializePayPalInstant(){paypal.Buttons({createOrder:(e,t)=>{var n;return this.showLoading("Creating PayPal order..."),ye("/payments/paypal/create",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content},body:JSON.stringify({amount:parseFloat(((n=document.getElementById("ai-stripe-modal-hero-amount"))==null?void 0:n.value)||0)*100,currency:this.currencyValue||"usd"})}).then(r=>r.ok?r.json():(this.hideLoading(),r.json().then(s=>{throw new Error(s.error||"Failed to create order")}))).then(r=>{if(!r.id)throw this.hideLoading(),new Error("No order ID received");return r.id})},onApprove:(e,t)=>{if(this.showLoading("Processing your payment..."),!e.orderID)throw this.hideLoading(),new Error("No order ID available for capture");return fetch(`/payments/paypal/${e.orderID}/capture`,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content}}).then(n=>n.ok?n.json():(this.hideLoading(),n.json().then(r=>{throw new Error(r.error||"Capture failed")}))).then(n=>{this.afterPayementSuccess(n),console.log("Payment done")})},onCancel:e=>{this.hideLoading(),console.log("PayPal payment cancelled:",e);let t="Payment was cancelled";e&&e.details&&e.details.reason==="PAYER_ACTION_REQUIRED_TIMEOUT"&&(t="Payment session expired - please try again"),this.showError(t),this.afterPayementError({message:t,type:"cancelled",data:e}),typeof gtag<"u"&>ag("event","paypal_cancelled",{event_category:"Payment",event_label:"PayPal Popup Closed"})},onError:e=>{this.hideLoading(),console.error("PayPal error:",e);const t=document.getElementById("paypal-errors");t&&(t.textContent=e.message||"PayPal payment failed",t.style.display="block")},onClick:()=>{this.showLoading("Connecting to PayPal...")}}).render("#paypal-button-container")}showPopupClosedError(){const e=document.getElementById("paypal-errors");e&&(e.textContent="PayPal window was closed before completing payment",e.style.display="block")}validatePostalCode(e,t){const n={US:/^\d{5}(-\d{4})?$/,CA:/^[A-Za-z]\d[A-Za-z][ -]?\d[A-Za-z]\d$/,UK:/^[A-Z]{1,2}\d[A-Z\d]? ?\d[A-Z]{2}$/,AU:/^\d{4}$/,DE:/^\d{5}$/,FR:/^\d{5}$/,IN:/^\d{6}$/};return n[t]?n[t].test(e):e.trim().length>0}validateAddress(e){return e.trim().length>=5&&/\d/.test(e)}showValidationError(e,t){const n=document.getElementById(e);if(!n)return;let r=n.nextElementSibling;r&&r.classList.contains("validation-error")&&r.remove(),r=document.createElement("p"),r.className="validation-error mt-1 text-sm text-red-600",r.textContent=t,n.classList.add("border-red-500"),n.classList.remove("border-gray-300","dark:border-gray-600"),n.parentNode.insertBefore(r,n.nextSibling)}clearValidationError(e){const t=document.getElementById(e);if(!t)return;t.classList.remove("border-red-500"),t.classList.add("border-gray-300","dark:border-gray-600");const n=t.nextElementSibling;n&&n.classList.contains("validation-error")&&n.remove()}stripeFormTargetConnected(e){e.addEventListener("submit",()=>{this.showLoading()})}stripeFormTargetDisconnected(e){e.removeEventListener("submit",()=>{this.showLoading()})}async submit(e){e.preventDefault(),this.showLoading(),this.setSubmitButtonState(!0,"Processing...");try{this.paymentTypeValue==="subscription"?(console.log("Handling subscription"),await this.handleStripeSubscription(e.target)):(console.log("Handling one-time payment"),await this.handleStripePayment(e.target))}catch(t){this.handlePaymentError(t),this.hideLoading()}}async handleStripeSubscription(e){try{const t=this.billingDetails,{error:n}=await this.elements.submit();if(n){this.handlePaymentError(n);return}const r=await ye("/subscriptions/stripe/setup_intent",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content},body:JSON.stringify({price_id:this.stripePriceIdValue,customer_id:this.stripeCustomerIdValue,plan_id:this.planIdValue,customer:t})}),s=await r.json();if(!r.ok)throw new Error(s.error||"Setup intent creation failed");const{error:o,setupIntent:l}=await this.stripe.confirmSetup({elements:this.elements,clientSecret:s.client_secret,confirmParams:{return_url:window.location.origin+this.successUrlValue,payment_method_data:{billing_details:{name:t.name,email:t.email}}},redirect:"if_required"});if(o)throw o;const a=await ye("/subscriptions/stripe/create",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content},body:JSON.stringify({setup_intent_id:l.id,price_id:this.stripePriceIdValue,customer_id:this.stripeCustomerIdValue,plan_id:this.planIdValue,customer:t})});if(!a.ok){const c=await a.json();throw new Error(c.message||"Subscription creation failed")}const u=await a.json();if(u.requires_action){this.showLoading("Authenticating payment...");const{error:c,paymentIntent:h}=await this.stripe.confirmPayment({elements:this.elements,clientSecret:u.client_secret,confirmParams:{return_url:window.location.origin+this.successUrlValue,payment_method_data:{billing_details:{name:t.name,email:t.email}}},redirect:"if_required"});if(c)throw c;this.showLoading("Finalizing subscription...");const d=await ye("/subscriptions/stripe/confirm",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content},body:JSON.stringify({subscription_id:u.subscription_id,payment_intent_id:h.id})});if(!d.ok){const f=await d.json();throw new Error(f.message||f.error||"Subscription confirmation failed")}}this.afterPayementSuccess(a),console.log("Subscription created successfully")}catch(t){this.handlePaymentError(t),this.hideLoading()}}async handleStripePayment(e){var t;try{console.log("Handling Stripe one-time payment");const{error:n}=await this.elements.submit();if(n){this.handlePaymentError(n);return}this.showLoading("Processing payment...");const{error:r,paymentIntent:s}=await this.stripe.confirmPayment({elements:this.elements,clientSecret:this.clientSecret,confirmParams:{return_url:window.location.origin+this.successUrlValue,payment_method_data:{billing_details:this.billingDetails}},redirect:"if_required"});if(r)throw r.type==="card_action_required"||r.type==="invalid_request_error",r;if((s==null?void 0:s.status)==="succeeded")this.showLoading("Finalizing payment..."),await this.handleSuccessfulPayment(s);else if((s==null?void 0:s.status)==="requires_processing")this.showLoading("Payment is being processed..."),await this.handleSuccessfulPayment(s);else{if(((t=s==null?void 0:s.next_action)==null?void 0:t.type)==="redirect_to_url")return;throw new Error(`Unexpected payment status: ${s==null?void 0:s.status}`)}}catch(n){this.handlePaymentError(n),this.hideLoading()}}async handleSuccessfulPayment(e){try{const t=typeof Storage<"u"&&sessionStorage.getItem("currentDownloadId")||null,
28n=await ye("/ai/stripe/confirm",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content},body:JSON.stringify({payment_intent_id:e.id,plan_id:this.planIdValue,download_id:t})});if(!n.ok){const s=await n.json();throw new Error(s.error||"Payment confirmation failed")}const r=await n.json();if(r.success)this.afterPayementSuccess(),console.log("Payment done");else throw new Error(r.error||"Payment confirmation failed")}catch(t){throw console.error("Payment confirmation error:",t),t}}showError(e){this.hideLoading();const t=document.getElementById("paypal-errors");t&&(t.innerHTML=` 29 <div class="bg-red-50 border-l-4 border-red-400 p-4"> 30 <div class="flex"> 31 <div class="flex-shrink-0"> 32 <svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor"> 33 <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd" /> 34 </svg> 35 </div> 36 <div class="ml-3"> 37 <p class="text-sm text-red-700">${e}</p> 38 </div> 39 </div> 40 </div> 41 `,t.style.display="block")}getBillingDetails(e){return this.address.value}handlePaymentError(e){console.log("Payment error:",e);const t=document.getElementById("payment-errors")||document.getElementById("card-errors"),n=e.message||e.error||"Payment failed. Please try again.";t&&(t.innerHTML=` 42 <div class="bg-red-50 border-l-4 border-red-400 p-4"> 43 <div class="flex"> 44 <div class="flex-shrink-0"> 45 <svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor"> 46 <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd" /> 47 </svg> 48 </div> 49 <div class="ml-3"> 50 <p class="text-sm text-red-700">${n}</p> 51 </div> 52 </div> 53 </div> 54 `,t.style.display="block"),this.setSubmitButtonState(!1,"Secure Checkout"),this.afterPayementError({message:n,type:"payment_error",error:e})}setSubmitButtonState(e,t){this.hasSubmitButtonTarget&&(this.submitButtonTarget.disabled=e,this.submitButtonTarget.innerHTML=t)}toggleSubmitButton(e){this.hasSubmitButtonTarget&&(this.submitButtonTarget.disabled=!e)}disconnect(){var e;(e=this.paymentElement)==null||e.unmount()}}$(mh,"values",{stripeKey:String,stripePriceId:String,stripeCustomerId:String,paypalClientId:String,paymentType:String,successUrl:String,cancelUrl:String,country:String,currency:String,fullName:String,email:String,initializeStripe:String}),$(mh,"targets",["stripeSection","paypalSection","paymentMethod","submitButton","loadingOverlay","stripeForm"]);const bA=Object.freeze(Object.defineProperty({__proto__:null,default:mh},Symbol.toStringTag,{value:"Module"}));class Jv extends U{connect(){this.abortController=null,this.defaultSubmitLabel=this.submitLabelTarget.textContent.trim()}disconnect(){var e;(e=this.abortController)==null||e.abort()}useExample(e){this.promptTarget.value=e.currentTarget.dataset.query||"",this.promptTarget.focus(),this.hideError()}async search(e){var r,s;e.preventDefault();const t=this.promptTarget.value.trim();if(!t){this.showError("Describe the prospects you want to find."),this.promptTarget.focus();return}(r=this.abortController)==null||r.abort(),this.abortController=new AbortController;const n=window.setTimeout(()=>this.abortController.abort(),12e3);this.setLoading(!0),this.hideError();try{const o=await ye("/ai/profile_search",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-Token":((s=document.querySelector('meta[name="csrf-token"]'))==null?void 0:s.content)||""},body:JSON.stringify({prompt:t}),signal:this.abortController.signal}),l=await o.json().catch(()=>({}));if(!o.ok){const a=new Error(l.error||"We couldn't generate filters right now. You can still search manually.");throw a.userFacing=!0,a}if(typeof l.search_url!="string"||!l.search_url.startsWith("/searches/profiles"))throw new Error("Invalid AI search destination");
54window.location.assign(l.search_url)}catch(o){const l=o.userFacing?o.message:"We couldn't generate filters right now. You can still search manually.";this.showError(l),this.setLoading(!1)}finally{window.clearTimeout(n)}}setLoading(e){this.submitTarget.disabled=e,this.submitTarget.setAttribute("aria-busy",e?"true":"false"),this.submitLabelTarget.textContent=e?"Understanding searchâ¦":this.defaultSubmitLabel,this.spinnerTarget.classList.toggle("hidden",!e)}showError(e){this.errorTarget.textContent=e,this.errorTarget.classList.remove("hidden")}hideError(){this.errorTarget.textContent="",this.errorTarget.classList.add("hidden")}}$(Jv,"targets",["prompt","submit","submitLabel","spinner","error"]);const yA=Object.freeze(Object.defineProperty({__proto__:null,default:Jv},Symbol.toStringTag,{value:"Module"}));class gh extends U{connect(){this.abortController=null,this.defaultSubmitLabel=this.submitLabelTarget.textContent.trim(),this.resultsObserver=new MutationObserver(()=>this.syncPreviewState()),this.resultsObserver.observe(this.resultsTarget,{childList:!0,subtree:!0}),this.syncPreviewState()}disconnect(){var e,t;(e=this.abortController)==null||e.abort(),(t=this.resultsObserver)==null||t.disconnect()}syncPreviewState(){const e=!!this.resultsTarget.querySelector('[data-testid="home2026-preview-results"]');this.element.dataset.previewState=e?"results":"initial",this.defaultSubmitLabel=e?"Update search":"Find prospects",this.submitTarget.disabled||(this.submitLabelTarget.textContent=this.defaultSubmitLabel)}useExample(e){this.promptTarget.value=e.currentTarget.dataset.query||"",this.promptTarget.focus(),this.hideFeedback()}async search(e){var n;e.preventDefault();const t=this.promptTarget.value.trim();if(!t){this.showError("Describe the prospects you want to find."),this.promptTarget.focus();return}(n=this.abortController)==null||n.abort(),this.setLoading(!0),this.hideFeedback();try{const r=await this.interpret(t);this.validateResponse(r),this.formTarget.innerHTML=r.form_html,this.renderChips(r.chips),await this.loadPreview(r.preview_url),this.showAppliedStatus(r.chips,r.ignored)}catch(r){const s=r.userFacing?r.message:"We couldn't generate filters right now. You can still search manually.";this.showError(s)}finally{this.setLoading(!1)}}async interpret(e){var n;this.abortController=new AbortController;const t=window.setTimeout(()=>this.abortController.abort(),12e3);try{const r=await ye(this.endpointValue,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-Token":((n=document.querySelector('meta[name="csrf-token"]'))==null?void 0:n.content)||""},body:JSON.stringify({prompt:e}),signal:this.abortController.signal}),s=await r.json().catch(()=>({}));if(!r.ok){const o=new Error(s.error||"We couldn't generate filters right now. You can still search manually.");throw o.userFacing=!0,o}return s}finally{window.clearTimeout(t)}}async loadPreview(e){this.abortController=new AbortController;const t=window.setTimeout(()=>this.abortController.abort(),12e3);try{const n=await ye(e,{method:"GET",headers:{Accept:"text/vnd.turbo-stream.html"},signal:this.abortController.signal}),r=await n.text(),s=r.includes("<turbo-stream");if(s&&pg(r),!n.ok||!s){const o=new Error(n.headers.get("X-Public-Preview-Message")||"Your filters were applied, but the sample preview could not load. Use Submit to try the manual preview.");throw o.userFacing=!0,o}}finally{window.clearTimeout(t)}}async handleManualPreviewResponse(e){var t;if(!(!(e!=null&&e.detail)||e.detail.success))try{const n=await((t=e.detail.fetchResponse)==null?void 0:t.responseHTML);typeof n=="string"&&n.includes("<turbo-stream")&&pg(n)}catch{this.showError("The sample preview could not load. Please try again.")}}validateResponse(e){if(typeof e.form_html!="string"||!e.form_html.includes('id="searchForm"'))throw new Error("Invalid public AI search form");if(typeof e.preview_url!="string"||!e.preview_url.startsWith("/searches/profiles/demo"))throw new Error("Invalid public AI preview destination");if(!Array.isArray(e.chips)||!Array.isArray(e.ignored))throw new Error("Invalid public AI interpretation")}renderChips(e){this.chipsTarget.replaceChildren(),e.forEach(t=>{const n=document.createElement("span");n.className="inline-flex items-center rounded-full bg-indigo-50 px-2.5 py-1 text-xs font-medium text-indigo-800 dark:bg-indigo-950/50 dark:text-indigo-200";const r=document.createElement("span");r.className="text-indigo-500 dark:text-indigo-400",r.textContent=`${t.label}:`,n.append(r,document.createTextNode(` ${t.value}`)),this.chipsTarget.append(n)})}showAppliedStatus(e,t){const n=`${e.length} ${e.length===1?"filter":"filters"} applied to the editable preview.`,r=t.length>0?` Unsupported criteria skipped: ${t.join("; ")}.`:"";this.statusTarget.textContent=`${n}${r}`,this.statusTarget.classList.remove("hidden")}setLoading(e){this.submitTarget.disabled=e,this.submitTarget.setAttribute("aria-busy",e?"true":"false"),this.submitLabelTarget.textContent=e?"Understanding searchâ¦":this.defaultSubmitLabel,this.spinnerTarget.classList.toggle("hidden",!e)}showError(e){this.errorTarget.textContent=e,this.errorTarget.classList.remove("hidden"),this.statusTarget.classList.add("hidden")}hideFeedback(){this.errorTarget.textContent="",this.errorTarget.classList.add("hidden"),this.statusTarget.textContent="",this.statusTarget.classList.add("hidden")}}$(gh,"targets",["prompt","submit","submitLabel","spinner","error","status","chips","form","results"]),$(gh,"values",{endpoint:String});const vA=Object.freeze(Object.defineProperty({__proto__:null,default:gh},Symbol.toStringTag,{value:"Module"}));class Qv extends U{connect(){}toggleChat(){this.popupTarget.classList.toggle("hidden")}async sendMessage(){const e=this.inputTarget.value.trim();if(e){this.addMessage(e,"user"),this.inputTarget.value="",this.showLoading();try{const t=await this.requestAgent(e);this.hideLoading(),this.addMessage(t,"assistant")}catch{this.hideLoading(),this.addMessage("Sorry, I encountered an error. Please try again.","assistant")}}}addMessage(e,t){const n=document.createElement("div");n.className=`flex ${t==="user"?"justify-end":"justify-start"}`;const r=document.createElement("div");r.className=`max-w-[80%] rounded-lg p-3 ${t==="user"?"bg-primary-500 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white"}`,r.textContent=e,n.appendChild(r),this.messagesTarget.appendChild(n),this.messagesTarget.scrollTop=this.messagesTarget.scrollHeight}async requestAgent(e){try{const t=await ye("/ai/generate_filters",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({prompt:e})});if(!t.ok)throw new Error("Failed to generate filters");const n=await t.json();return n.filters&&wA(n.filters),n.action=="create-list"&&xA(),n.response?n.response:n.error?`AI error: ${n.error}`:"AI did not return a valid response."}catch{return"Sorry, I encountered an error. Please try again."}}showLoading(){const e=document.createElement("div");e.id="ai-loading",e.className="flex justify-start",e.innerHTML=`<div class="max-w-[80%] rounded-lg p-3 bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white flex items-center">
55 <span class="animate-spin mr-2 border-2 border-gray-300 border-t-primary-500 rounded-full w-4 h-4 inline-block"></span> 56 Processing... 57 </div>`,this.messagesTarget.appendChild(e),this.messagesTarget.scrollTop=this.messagesTarget.scrollHeight}hideLoading(){const e=document.getElementById("ai-loading");e&&e.remove()}}$(Qv,"targets",["popup","messages","input"]);function wA(i){const e=document.getElementById("searchForm");if(!e)return;e.reset(),Object.entries(i).forEach(([n,r])=>{let s=e.querySelectorAll(`[name="s[${n}][]"]`);s.length==0&&(s=e.querySelectorAll(`[name="s[${n}]"]`)),s.length>0&&s.forEach(o=>{if(o.type==="checkbox"){const l=o.closest('[data-controller="search--checkboxes"]'),a=Array.isArray(r)?r.includes(o.value):r==o.value;o.checked=a,l&&o.dispatchEvent(new Event("change",{bubbles:!0}))}else if(o.hasAttribute("data-search--choices-target")){const l=o.closest('[data-controller="search--choices"]');if(l&&l.choices&&l.choices.choices){l.choices.choices.clearStore();const a=Array.isArray(r)?r:[r];a.length>0&&l.choices.choices.setValue(a)}}else{const l=Array.isArray(r)?r[0]:r;o.value=l}o.dispatchEvent(new Event("change",{bubbles:!0}))})});const t=document.getElementById("searchAction");t&&t.click()}function xA(){const i=new Date,e=r=>r.toString().padStart(2,"0"),t=`${i.getFullYear()}-${e(i.getMonth()+1)}-${e(i.getDate())} ${e(i.getHours())}:${e(i.getMinutes())}:${e(i.getSeconds())}`,n=new URLSearchParams;n.append("list[name]",t),n.append("list[list_type]","Prospect"),ye("/searches/lists",{method:"POST",headers:{Accept:"text/vnd.turbo-stream.html","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content,"Content-Type":"application/x-www-form-urlencoded"},body:n}).then(r=>r.text()).then(r=>{Turbo.renderStreamMessage(r),setTimeout(()=>{const s=document.querySelector('button[data-action="click->search--modal#add"]');s?s.click():console.warn("Add button not found after creating list")},100)}).catch(r=>{console.error("Error creating list:",r)})}const EA=Object.freeze(Object.defineProperty({__proto__:null,default:Qv},Symbol.toStringTag,{value:"Module"}));class bh extends U{connect(){this.history=[],this.handleListPopulation=this.handleListPopulation.bind(this),this.handlePaymentDone=this.handlePaymentDone.bind(this),this.handlePaymentError=this.handlePaymentError.bind(this),this.handleOnline=this.handleOnline.bind(this),this.handleOffline=this.handleOffline.bind(this),window.addEventListener("ai-list-population",this.handleListPopulation),document.addEventListener("ai--payment:done",this.handlePaymentDone),document.addEventListener("ai--payment:error",this.handlePaymentError),window.addEventListener("online",this.handleOnline),window.addEventListener("offline",this.handleOffline),navigator.onLine||this.handleOffline(),this.appendMessage({role:"assistant",content:"Hi! I'm your AI prospecting assistant. Describe the leads you need and I'll do the rest."})}disconnect(){window.removeEventListener("ai-list-population",this.handleListPopulation),document.removeEventListener("ai--payment:done",this.handlePaymentDone),document.removeEventListener("ai--payment:error",this.handlePaymentError),window.removeEventListener("online",this.handleOnline),window.removeEventListener("offline",this.handleOffline)}handlePaymentDone(){this.appendMessage({role:"assistant",content:"Payment completed successfully! Your credits have been added to your account. You can now continue generating leads."})}handlePaymentError(e){const t=e.detail||{};let n="There was an issue with your payment. Please try again.";t.type==="cancelled"?n="Payment was cancelled. You can try again whenever you're ready.":t.type==="payment_error"?n=t.message||"Payment failed. Please check your payment details and try again.":t.message&&(n=t.message),this.appendMessage({role:"assistant",content:n})}handleOnline(){this.wasOffline&&(this.appendMessage({role:"assistant",content:"Great! Your internet connection is restored. You can continue generating leads."}),this.wasOffline=!1)}handleOffline(){this.wasOffline=!0,this.appendMessage({role:"assistant",content:"It looks like you've lost your internet connection. Please check your connection and try again. Your work will be saved locally."})}submit(e){e.preventDefault(),this.sendCurrentInput()}useExample(e){e.preventDefault();const t=e.currentTarget.dataset.prompt;t&&(this.inputTarget.value=t,this.sendCurrentInput())}applySuggestion(e){const t=e.currentTarget.dataset.prompt;t&&(this.inputTarget.value=t,this.sendCurrentInput())}async sendCurrentInput(){const e=this.inputTarget.value.trim();e&&(this.inputTarget.value="",this.appendMessage({role:"user",content:e}),this.history.push({role:"user",content:e}),this.toggleLoading(!0),await this.fetchResponse(e),this.toggleLoading(!1))}async fetchResponse(e){try{const t=this.endpointValue||"/ai/conversations",n=await ye(t,{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({prompt:e,messages:this.history.slice(-8),include_preview:!0})}),r=await n.json();if(!n.ok)throw new Error(r.error||"Unable to process your request right now.");const s=r.message||r.response||"Here's what I found.";this.appendMessage({role:"assistant",content:s,preview:r.preview,cta:r.cta}),this.history.push({role:"assistant",content:s}),this.renderSuggestions(r.follow_ups)}catch(t){this.appendMessage({role:"assistant",content:t.message||"I ran into a problem. Please try again."})}}appendMessage({role:e,content:t,preview:n,cta:r}){const s=document.createElement("div");s.className=`flex ${e==="user"?"justify-end":"justify-start"}`;const o=e==="assistant"&&this.isCreditWarningText(t),l=document.createElement("div");l.className=["relative max-w-[85%] rounded-2xl px-4 py-3 text-sm sm:text-base leading-relaxed","shadow-lg",e==="user"?"bg-primary-600 text-white":o?"bg-red-50 text-red-900 border border-red-200":"bg-white/90 dark:bg-gray-800/90 text-gray-900 dark:text-gray-100 border border-gray-100 dark:border-gray-700"].join(" "),l.innerHTML=this.escapeHtml(t).replace(/\n/g,"<br />"),e==="assistant"&&n&&Array.isArray(n.sample)&&n.sample.length>0&&l.appendChild(this.renderPreview(n)),e==="assistant"&&r&&r.url&&l.appendChild(this.renderCta(r)),s.appendChild(l),this.messagesTarget.appendChild(s),this.messagesTarget.scrollTop=this.messagesTarget.scrollHeight}renderPreview(e){const t=document.createElement("div");t.className="mt-4 space-y-3";const n=document.createElement("p");return n.className="text-xs font-semibold uppercase tracking-wide text-primary-600 dark:text-primary-300",n.textContent=`Sample leads (${e.total} total)`,t.appendChild(n),e.sample.forEach(r=>{const s=document.createElement("div");s.className="flex items-start gap-3 rounded-xl border border-gray-100 dark:border-gray-700 bg-gray-50/80 dark:bg-gray-900/30 px-3 py-3";const o=document.createElement("div");o.className="flex-shrink-0";const l=document.createElement("img");l.src=r.avatar_url||this.defaultAvatar(),l.alt=r.name||"Lead avatar",l.loading="lazy",l.className="w-10 h-10 rounded-full object-cover border border-white shadow",l.onerror=()=>{l.onerror=null,l.src=this.defaultAvatar()},o.appendChild(l),s.appendChild(o);const a=document.createElement("div");a.className="flex-1 space-y-1";const u=document.createElement("p");u.className="text-sm font-semibold text-gray-900 dark:text-gray-100",u.textContent=r.name||"Lead",a.appendChild(u);const c=document.createElement("p");c.className="text-xs text-gray-600 dark:text-gray-300";
57const h=[r.title,r.company].filter(Boolean).join(" ⢠");if(c.textContent=h||"Title unavailable",a.appendChild(c),r.location){const f=document.createElement("p");f.className="text-xs text-gray-500 dark:text-gray-400",f.textContent=r.location,a.appendChild(f)}const d=this.linkedinPath(r.linkedin_url);if(d){const f=document.createElement("a");f.href=d,f.target="_blank",f.rel="noopener",f.className="inline-flex items-center gap-1 text-xs font-medium text-primary-600 dark:text-primary-300",f.innerHTML=` 58 <svg class="w-3.5 h-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"> 59 <path d="M8 11V17" /> 60 <path d="M8 7V7.01" /> 61 <path d="M12 17V11" /> 62 <path d="M16 17V13C16 11.3431 14.6569 10 13 10C11.3431 10 10 11.3431 10 13" /> 63 </svg> 64 View profile 65 `,a.appendChild(f)}s.appendChild(a),t.appendChild(s)}),t}defaultAvatar(){return this.hasAvatarFallbackValue&&this.avatarFallbackValue?this.avatarFallbackValue:"/images/themes/default/no_avatar.svg"}linkedinPath(e){if(!e)return null;let t=e.trim();return t=t.replace(/^https?:\/\/(www\.)?linkedin\.com/i,""),t=t.replace(/^linkedin\.com/i,""),t=t.replace(/[#?].*$/,""),t.startsWith("/")||(t=`/${t}`),t.startsWith("/in/")||(t=`/in/${t.replace(/^\/+/,"").replace(/^in\//i,"")}`),t}renderCta(e){const t=document.createElement("div");if(t.className="mt-4 rounded-2xl border border-primary-100 bg-primary-50/80 dark:border-primary-900/60 dark:bg-primary-900/20 p-3 text-sm text-gray-800 dark:text-gray-100",e.description){const s=document.createElement("p");s.className="mb-2",s.textContent=e.description,t.appendChild(s)}const n=e.price_text?`${e.label||"Download"} (${e.price_text})`:e.label||"Download",r=(e.method||"").toUpperCase();if(r==="POST"){const s=document.createElement("button");s.type="button",s.dataset.action="click->ai-conversation#submitCta",s.dataset.ctaPayload=JSON.stringify({url:e.url,method:r,payload:e.payload||{}}),s.className="inline-flex items-center justify-center rounded-xl bg-primary-600 px-4 py-2 text-sm font-semibold text-white shadow-md hover:bg-primary-700",s.textContent=n,t.appendChild(s)}else{const s=document.createElement("a");s.href=e.url,s.target="_blank",s.rel="noopener",s.className="inline-flex items-center justify-center rounded-xl bg-primary-600 px-4 py-2 text-sm font-semibold text-white shadow-md hover:bg-primary-700",s.textContent=n,t.appendChild(s)}return t}renderSuggestions(e){this.hasSuggestionsTarget&&(this.suggestionsTarget.innerHTML="",!(!e||e.length===0)&&e.forEach(t=>{const n=document.createElement("button");n.type="button",n.className="px-4 py-2 rounded-full border border-gray-200 dark:border-gray-700 text-sm text-gray-700 dark:text-gray-200 hover:border-primary-400 hover:text-primary-600 mr-2 mb-2",n.dataset.action="click->ai-conversation#applySuggestion",n.dataset.prompt=t.prompt,n.textContent=t.label,this.suggestionsTarget.appendChild(n)}))}toggleLoading(e){this.hasSubmitTarget&&(this.submitTarget.disabled=e,this.submitTarget.innerHTML=e?'<span class="inline-flex items-center gap-2"><span class="w-4 h-4 border-2 border-white/40 border-t-white rounded-full animate-spin"></span>Thinking...</span>':"<span>Send</span>")}escapeHtml(e){const t=document.createElement("div");return t.innerText=e,t.innerHTML}async submitCta(e){e.preventDefault();const t=e.currentTarget.dataset.ctaPayload;if(!t)return;let n;try{n=JSON.parse(t)}catch(l){console.error("Invalid CTA payload",l);return}const{url:r,method:s,payload:o}=n;if(!(!r||!s)){this.toggleLoading(!0);try{const l=await ye(r,{method:s,headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify(o||{})}),a=await l.json().catch(()=>({}));if(!l.ok)throw new Error(a.error||a.message||"Unable to process your request right now.");const u=a.message||"Great! Your download is being prepared.";this.appendMessage({role:"assistant",content:u}),this.history.push({role:"assistant",content:u})}catch(l){this.appendMessage({role:"assistant",content:l.message||"I couldn't start that download. Please try again."})}finally{this.toggleLoading(!1)}}}handleListPopulation(e){const t=(e==null?void 0:e.detail)||{};t.message&&this.appendMessage({role:"assistant",content:t.message})}isCreditWarningText(e){if(!e)return!1;const t=e.toLowerCase();return t.includes("you're on a free account")||t.includes("you have exhausted all the credits")}}$(bh,"targets",["messages","input","suggestions","form","submit"]),$(bh,"values",{endpoint:String,avatarFallback:String});const TA=Object.freeze(Object.defineProperty({__proto__:null,default:bh},Symbol.toStringTag,{value:"Module"}));class Zv extends U{search(e){const t=e.currentTarget.dataset.text;this.textareaTarget.value=t,this.textareaTarget.dispatchEvent(new Event("input")),setTimeout(()=>{this.buttonTarget.click()},300)}toggleSubmitButton(e){try{e||(e=this.buttonTarget);const t=e.innerHTML,n=e.getAttribute("data-disable-with");e.setAttribute("data-disable-with",t),e.innerHTML=n,e.disabled=!e.disabled}catch(t){console.log("Error in toggleSubmitButton method:",t)}}async submit(e){e.preventDefault();const t=this.textareaTarget.value,n=document.getElementById("ai-hero-search-error");
65if(n&&(n.textContent="",n.classList.add("hidden")),!t.length){n.textContent="Promt cannot be blank!",n.classList.remove("hidden");return}this.toggleSubmitButton();try{const r=await ye("/ai/generate_filters",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({prompt:t})});let s;try{s=await r.json()}catch{s={}}if(!r.ok){const o=s.error||"AI search failed";throw new Error(o)}if(s&&s.filters){const o=new URLSearchParams;Object.entries(s.filters).forEach(([a,u])=>{!ov.isEmpty(u)&&u!==""&&(Array.isArray(u)?u.forEach(c=>o.append(`s[${a}][]`,c)):o.append(`s[${a}][]`,u))});const l=o.toString()||`s[q]=${encodeURIComponent(t)}`;window.location.href=`/searches/profiles?${l}`}else n&&(n.textContent="No filters returned from AI.",n.classList.remove("hidden"))}catch(r){n&&(lv(r)||uv(r)?n.textContent=cv(r):n.textContent="Error: "+(r.message||"An unexpected error occurred. Please try again."),n.classList.remove("hidden"))}finally{this.toggleSubmitButton()}}}$(Zv,"targets",["button","textarea"]);const SA=Object.freeze(Object.defineProperty({__proto__:null,default:Zv},Symbol.toStringTag,{value:"Module"}));class e1 extends U{connect(){console.log("AI Generate Modal Controller connected"),console.log("Targets:",this.targets),console.log("Modal target:",this.modalTarget),this.previousActiveElement=null,this.handleKeydown=this.handleKeydown.bind(this)}disconnect(){document.removeEventListener("keydown",this.handleKeydown)}openModal(){console.log("openModal called");try{this.previousActiveElement=document.activeElement,console.log("Previous active element:",this.previousActiveElement),console.log("Modal target before:",this.modalTarget),this.modalTarget.classList.remove("hidden"),console.log("Modal target after:",this.modalTarget),this.makeBackgroundInert(!0),setTimeout(()=>{this.promptTarget.focus()},100),document.addEventListener("keydown",this.handleKeydown)}catch(e){console.error("Error in openModal method:",e)}}closeModal(){try{this.modalTarget.classList.add("hidden"),this.makeBackgroundInert(!1),this.promptTarget.value="",this.previousActiveElement&&this.previousActiveElement.focus(),document.removeEventListener("keydown",this.handleKeydown)}catch(e){console.error("Error in closeModal method:",e)}}makeBackgroundInert(e){try{const t=document.body,n=this.modalTarget;t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])').forEach(s=>{if(!n.contains(s))if(e)s.hasAttribute("data-original-tabindex")||s.setAttribute("data-original-tabindex",s.getAttribute("tabindex")||"0"),s.setAttribute("tabindex","-1"),s.setAttribute("aria-hidden","true");else{const o=s.getAttribute("data-original-tabindex");o?(s.setAttribute("tabindex",o),s.removeAttribute("data-original-tabindex")):s.removeAttribute("tabindex"),s.removeAttribute("aria-hidden")}})}catch(t){console.error("Error in makeBackgroundInert method:",t)}}handleKeydown(e){e.key==="Escape"&&this.closeModal(),!(e.key==="Enter"&&e.target===this.promptTarget)&&e.key==="Enter"&&(e.target===this.generateButtonTarget||e.target.closest('[data-action*="closeModal"]'))&&(e.preventDefault(),e.target===this.generateButtonTarget?this.generateFilters():this.closeModal())}async generateFilters(){try{const e=this.promptTarget.value.trim();if(!e){alert("Please enter a description of the filters you want to generate.");return}this.loadingIconTarget.classList.remove("hidden"),this.generateButtonTarget.disabled=!0,this.generateButtonTarget.textContent="Generating...";const t=await ye("/ai/generate_filters",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({prompt:e})});if(!t.ok)throw new Error("Failed to generate filters");const n=await t.json();if(n.filters)this.applyFiltersToSearchForm(n.filters),this.closeModal(),this.showSuccessMessage("Filters generated and applied successfully!");else throw n.error?new Error(n.error):new Error("No filters returned from AI")}catch(e){console.error("Error generating AI filters:",e),lv(e)||uv(e)?this.showErrorMessage(cv(e)):this.showErrorMessage("Failed to generate filters. Please try again.")}finally{this.loadingIconTarget.classList.add("hidden"),this.generateButtonTarget.disabled=!1,this.generateButtonTarget.textContent="Generate Filters"}}applyFiltersToSearchForm(e){try{const t=document.getElementById("searchForm");if(!t)return;t.reset(),Object.entries(e).forEach(([r,s])=>{const o=t.querySelectorAll(`[name="s[${r}][]"]`);o.length>0&&o.forEach(l=>{if(l.type==="checkbox"){const a=l.closest('[data-controller="search--checkboxes"]'),u=Array.isArray(s)?s.includes(l.value):s===l.value;l.checked=u,a&&l.dispatchEvent(new Event("change",{bubbles:!0}))}else if(l.hasAttribute("data-search--choices-target")){const a=l.closest('[data-controller="search--choices"]');if(a&&a.choices&&a.choices.choices){a.choices.choices.clearStore();const u=Array.isArray(s)?s:[s];u.length>0&&a.choices.choices.setValue(u)}}else{const a=Array.isArray(s)?s[0]:s;l.value=a}l.dispatchEvent(new Event("change",{bubbles:!0}))})});const n=t.closest('[data-controller="search--form"]');n&&n.updateActiveSearch&&n.updateActiveSearch(),setTimeout(()=>{const r=document.getElementById("searchAction");r&&r.click()},500)}catch(t){console.error("Error applying filters:",t)}}showSuccessMessage(e){const t=document.createElement("div");t.className="fixed top-4 right-4 z-50 bg-green-500 text-white px-4 py-2 rounded-md shadow-lg",t.textContent=e,document.body.appendChild(t),setTimeout(()=>{t.remove()},3e3)}showErrorMessage(e){const t=document.createElement("div");t.className="fixed top-4 right-4 z-50 bg-red-500 text-white px-4 py-2 rounded-md shadow-lg",t.textContent=e,document.body.appendChild(t),setTimeout(()=>{t.remove()},5e3)}}$(e1,"targets",["modal","prompt","generateButton","loadingIcon"]);const CA=Object.freeze(Object.defineProperty({__proto__:null,default:e1},Symbol.toStringTag,{value:"Module"}));class t1 extends U{initialize(){if(this.dismissed()){this.hideElement();return}this.timeValue&&this.timer()}close(){this.persistDismissed(),this.hideElement()}timer(){setTimeout(()=>{this.close()},this.timeValue)}resended(e){if(e.detail.success){const t=e.target.closest(".message");t&&(t.innerHTML="A message with a confirmation link has been sent to your email address. Please follow the link to activate your account.")}}hideElement(){this.hiddenClassValue===""?this.element.remove():this.element.classList.add(this.hiddenClassValue)}dismissed(){if(!this.hasStorageKeyValue||typeof localStorage>"u")return!1;try{return localStorage.getItem(this.storageKeyValue)==="1"}catch{return!1}}persistDismissed(){if(!(!this.hasStorageKeyValue||typeof localStorage>"u"))try{localStorage.setItem(this.storageKeyValue,"1")}catch{}}}
65$(t1,"values",{hiddenClass:String,time:Number,storageKey:String});const kA=Object.freeze(Object.defineProperty({__proto__:null,default:t1},Symbol.toStringTag,{value:"Module"}));function rl(i,e={}){if(i){try{window.dataLayer&&typeof window.dataLayer.push=="function"&&window.dataLayer.push({event:i,...e})}catch(t){console.warn("Analytics dataLayer push failed",t)}try{typeof window.gtag=="function"&&window.gtag("event",i,e)}catch(t){console.warn("Analytics gtag event failed",t)}}}class n1 extends U{track(){const e=this.eventValue,t=this.paramsValue||{};rl(e,t)}}$(n1,"values",{event:String,params:Object});const _A=Object.freeze(Object.defineProperty({__proto__:null,default:n1},Symbol.toStringTag,{value:"Module"})),Di=typeof window<"u",i1=Di&&!("onscroll"in window)||typeof navigator<"u"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),r1=Di&&window.devicePixelRatio>1,AA={elements_selector:".lazy",container:i1||Di?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},s1=i=>Object.assign({},AA,i),Gg=function(i,e){let t;const n="LazyLoad::Initialized",r=new i(e);try{t=new CustomEvent(n,{detail:{instance:r}})}catch{t=document.createEvent("CustomEvent"),t.initCustomEvent(n,!1,!1,{instance:r})}window.dispatchEvent(t)},LA=(i,e)=>{if(e)if(e.length)for(let t,n=0;t=e[n];n+=1)Gg(i,t);else Gg(i,e)},Yn="src",Ip="srcset",Op="sizes",o1="poster",Qo="llOriginalAttrs",a1="data",Dp="loading",l1="loaded",u1="applied",MA="entered",Pp="error",c1="native",d1="data-",h1="ll-status",Tt=(i,e)=>i.getAttribute(d1+e),IA=(i,e,t)=>{const n=d1+e;t!==null?i.setAttribute(n,t):i.removeAttribute(n)},Zo=i=>Tt(i,h1),Sr=(i,e)=>IA(i,h1,e),tc=i=>Sr(i,null),Rp=i=>Zo(i)===null,OA=i=>Zo(i)===Dp,DA=i=>Zo(i)===Pp,Np=i=>Zo(i)===c1,PA=[Dp,l1,u1,Pp],RA=i=>PA.indexOf(Zo(i))>=0,Pi=(i,e,t,n)=>{i&&typeof i=="function"&&(n===void 0?t===void 0?i(e):i(e,t):i(e,t,n))},gs=(i,e)=>{Di&&e!==""&&i.classList.add(e)},mn=(i,e)=>{Di&&e!==""&&i.classList.remove(e)},NA=i=>{i.llTempImage=document.createElement("IMG")},BA=i=>{delete i.llTempImage},f1=i=>i.llTempImage,nc=(i,e)=>{if(!e)return;const t=e._observer;t&&t.unobserve(i)},FA=i=>{i.disconnect()},zA=(i,e,t)=>{e.unobserve_entered&&nc(i,t)},Bp=(i,e)=>{i&&(i.loadingCount+=e)},VA=i=>{i&&(i.toLoadCount-=1)},p1=(i,e)=>{i&&(i.toLoadCount=e)},HA=i=>i.loadingCount>0,jA=i=>i.toLoadCount>0,m1=i=>{let e=[];for(let t,n=0;t=i.children[n];n+=1)t.tagName==="SOURCE"&&e.push(t);return e},Fp=(i,e)=>{const t=i.parentNode;t&&t.tagName==="PICTURE"&&m1(t).forEach(e)},g1=(i,e)=>{m1(i).forEach(e)},ic=[Yn],b1=[Yn,o1],xo=[Yn,Ip,Op],y1=[a1],rc=i=>!!i[Qo],v1=i=>i[Qo],w1=i=>delete i[Qo],es=(i,e)=>{if(rc(i))return;const t={};e.forEach(n=>{t[n]=i.getAttribute(n)}),i[Qo]=t},$A=i=>{rc(i)||(i[Qo]={backgroundImage:i.style.backgroundImage})},ur=(i,e)=>{if(!rc(i))return;const t=v1(i);e.forEach(n=>{((r,s,o)=>{o?r.setAttribute(s,o):r.removeAttribute(s)})(i,n,t[n])})},qA=i=>{if(!rc(i))return;const e=v1(i);i.style.backgroundImage=e.backgroundImage},x1=(i,e,t)=>{gs(i,e.class_applied),Sr(i,u1),t&&(e.unobserve_completed&&nc(i,e),Pi(e.callback_applied,i,t))},E1=(i,e,t)=>{gs(i,e.class_loading),Sr(i,Dp),t&&(Bp(t,1),Pi(e.callback_loading,i,t))},Ei=(i,e,t)=>{t&&i.setAttribute(e,t)},Kg=(i,e)=>{Ei(i,Op,Tt(i,e.data_sizes)),Ei(i,Ip,Tt(i,e.data_srcset)),Ei(i,Yn,Tt(i,e.data_src))},UA=(i,e)=>{Fp(i,t=>{es(t,xo),Kg(t,e)}),es(i,xo),Kg(i,e)},WA=(i,e)=>{es(i,ic),Ei(i,Yn,Tt(i,e.data_src))},GA=(i,e)=>{g1(i,t=>{es(t,ic),Ei(t,Yn,Tt(t,e.data_src))}),es(i,b1),Ei(i,o1,Tt(i,e.data_poster)),Ei(i,Yn,Tt(i,e.data_src)),i.load()},KA=(i,e)=>{es(i,y1),Ei(i,a1,Tt(i,e.data_src))},YA=(i,e,t)=>{const n=Tt(i,e.data_bg),r=Tt(i,e.data_bg_hidpi),s=r1&&r?r:n;s&&(i.style.backgroundImage=`url("${s}")`,f1(i).setAttribute(Yn,s),E1(i,e,t))},XA=(i,e,t)=>{const n=Tt(i,e.data_bg_multi),r=Tt(i,e.data_bg_multi_hidpi),s=r1&&r?r:n;s&&(i.style.backgroundImage=s,x1(i,e,t))},JA=(i,e,t)=>{const n=Tt(i,e.data_bg_set);if(!n)return;let r=n.split("|").map(s=>`image-set(${s})`);i.style.backgroundImage=r.join(),x1(i,e,t)},T1={IMG:UA,IFRAME:WA,VIDEO:GA,OBJECT:KA},QA=(i,e)=>{const t=T1[i.tagName];t&&t(i,e)},ZA=(i,e,t)=>{const n=T1[i.tagName];n&&(n(i,e),E1(i,e,t))},e2=["IMG","IFRAME","VIDEO","OBJECT"],t2=i=>e2.indexOf(i.tagName)>-1,S1=(i,e)=>{!e||HA(e)||jA(e)||Pi(i.callback_finish,e)},Yg=(i,e,t)=>{i.addEventListener(e,t),i.llEvLisnrs[e]=t},n2=(i,e,t)=>{i.removeEventListener(e,t)},zp=i=>!!i.llEvLisnrs,i2=(i,e,t)=>{zp(i)||(i.llEvLisnrs={});const n=i.tagName==="VIDEO"?"loadeddata":"load";Yg(i,n,e),Yg(i,"error",t)},yh=i=>{if(!zp(i))return;const e=i.llEvLisnrs;for(let t in e){const n=e[t];n2(i,t,n)}delete i.llEvLisnrs},C1=(i,e,t)=>{BA(i),Bp(t,-1),VA(t),mn(i,e.class_loading),e.unobserve_completed&&nc(i,t)},r2=(i,e,t,n)=>{const r=Np(e);C1(e,t,n),gs(e,t.class_loaded),Sr(e,l1),Pi(t.callback_loaded,e,n),r||S1(t,n)},s2=(i,e,t,n)=>{const r=Np(e);C1(e,t,n),gs(e,t.class_error),Sr(e,Pp),Pi(t.callback_error,e,n),t.restore_on_error&&ur(e,xo),r||S1(t,n)},vh=(i,e,t)=>{const n=f1(i)||i;
65zp(n)||i2(n,r=>{r2(0,i,e,t),yh(n)},r=>{s2(0,i,e,t),yh(n)})},wh=(i,e,t)=>{t2(i)?((n,r,s)=>{vh(n,r,s),ZA(n,r,s)})(i,e,t):((n,r,s)=>{NA(n),vh(n,r,s),$A(n),YA(n,r,s),XA(n,r,s),JA(n,r,s)})(i,e,t)},o2=(i,e,t)=>{i.setAttribute("loading","lazy"),vh(i,e,t),QA(i,e),Sr(i,c1)},Xg=i=>{i.removeAttribute(Yn),i.removeAttribute(Ip),i.removeAttribute(Op)},a2=i=>{Fp(i,e=>{Xg(e)}),Xg(i)},k1=i=>{Fp(i,e=>{ur(e,xo)}),ur(i,xo)},l2=i=>{g1(i,e=>{ur(e,ic)}),ur(i,b1),i.load()},u2=i=>{ur(i,ic)},c2=i=>{ur(i,y1)},d2={IMG:k1,IFRAME:u2,VIDEO:l2,OBJECT:c2},h2=(i,e)=>{(t=>{const n=d2[t.tagName];n?n(t):qA(t)})(i),((t,n)=>{Rp(t)||Np(t)||(mn(t,n.class_entered),mn(t,n.class_exited),mn(t,n.class_applied),mn(t,n.class_loading),mn(t,n.class_loaded),mn(t,n.class_error))})(i,e),tc(i),w1(i)},f2=(i,e,t,n)=>{t.cancel_on_exit&&OA(i)&&i.tagName==="IMG"&&(yh(i),a2(i),k1(i),mn(i,t.class_loading),Bp(n,-1),tc(i),Pi(t.callback_cancel,i,e,n))},p2=(i,e,t,n)=>{const r=RA(i);Sr(i,MA),gs(i,t.class_entered),mn(i,t.class_exited),zA(i,t,n),Pi(t.callback_enter,i,e,n),r||wh(i,t,n)},m2=(i,e,t,n)=>{Rp(i)||(gs(i,t.class_exited),f2(i,e,t,n),Pi(t.callback_exit,i,e,n))},g2=["IMG","IFRAME","VIDEO"],_1=i=>i.use_native&&"loading"in HTMLImageElement.prototype,b2=(i,e,t)=>{i.forEach(n=>{g2.indexOf(n.tagName)!==-1&&o2(n,e,t)}),p1(t,0)},y2=i=>i.isIntersecting||i.intersectionRatio>0,v2=(i,e)=>{e.forEach(t=>{i.observe(t)})},w2=(i,e)=>{FA(i),v2(i,e)},x2=(i,e)=>{_1(i)||(e._observer=new IntersectionObserver(t=>{((n,r,s)=>{n.forEach(o=>y2(o)?p2(o.target,o,r,s):m2(o.target,o,r,s))})(t,i,e)},(t=>({root:t.container===document?null:t.container,rootMargin:t.thresholds||t.threshold+"px"}))(i)))},A1=i=>Array.prototype.slice.call(i),Ul=i=>i.container.querySelectorAll(i.elements_selector),E2=i=>A1(i).filter(Rp),T2=i=>DA(i),S2=i=>A1(i).filter(T2),Jg=(i,e)=>E2(i||Ul(e)),C2=(i,e)=>{S2(Ul(i)).forEach(t=>{mn(t,i.class_error),tc(t)}),e.update()},k2=(i,e)=>{Di&&(e._onlineHandler=()=>{C2(i,e)},window.addEventListener("online",e._onlineHandler))},_2=i=>{Di&&window.removeEventListener("online",i._onlineHandler)},Fs=function(i,e){const t=s1(i);this._settings=t,this.loadingCount=0,x2(t,this),k2(t,this),this.update(e)};Fs.prototype={update:function(i){const e=this._settings,t=Jg(i,e);p1(this,t.length),i1?this.loadAll(t):_1(e)?b2(t,e,this):w2(this._observer,t)},destroy:function(){this._observer&&this._observer.disconnect(),_2(this),Ul(this._settings).forEach(i=>{w1(i)}),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(i){const e=this._settings;Jg(i,e).forEach(t=>{nc(t,this),wh(t,e,this)})},restoreAll:function(){const i=this._settings;Ul(i).forEach(e=>{h2(e,i)})}},Fs.load=(i,e)=>{const t=s1(e);wh(i,t)},Fs.resetStatus=i=>{tc(i)},Di&&LA(Fs,window.lazyLoadOptions);class L1 extends U{connect(){console.log("Lazyload connected"),this.lazyLoadInstance=new Fs({...this.defaultOptions(),...this.optionsValue}),this.observeMutations()}disconnect(){this.lazyLoadInstance&&this.lazyLoadInstance.destroy(),this.mutationObserver&&this.mutationObserver.disconnect()}defaultOptions(){return{elements_selector:".lazy",threshold:300,callback_error:e=>this.handleImageError(e)}}handleImageError(e){if(this.fallbackImageValue){const t=e.dataset.fallbackImageValue||this.fallbackImageValue;e.src=t}}observeMutations(){this.mutationObserver=new MutationObserver(e=>{if(this.lazyLoadInstance.update(),e){const t=document.getElementById("no_data");t&&t.remove()}}),this.mutationObserver.observe(this.element,{childList:!0,subtree:!0})}}$(L1,"values",{options:Object,fallbackImage:String});const A2=Object.freeze(Object.defineProperty({__proto__:null,default:L1},Symbol.toStringTag,{value:"Module"}));class M1 extends U{connect(){try{console.log("Connect recent"),this.recentClasses=this.recentClassValue||"animate-pulse bg-green-100/80",this.addRecentItem=this.addRecentItem.bind(this),this.recentClasses&&this.addRecentItem(this.element)}catch(e){console.error("Error in connect:",e)}}addRecentItem(e){try{const t=this;e.classList.add(...t.recentClasses.split(" ")),setTimeout(()=>{e.classList.remove(...t.recentClasses.split(" "))},t.durationValue||3e3)}catch(t){console.error("Error in connect:",t)}}}$(M1,"values",{duration:Number,recentClass:String});const L2=Object.freeze(Object.defineProperty({__proto__:null,default:M1},Symbol.toStringTag,{value:"Module"}));class xh extends U{connect(){this.remainingTime=this.timeValue,this.updateTimerDis
65play(),this.startCountdown()}startCountdown(){this.interval=setInterval(()=>{this.remainingTime>0?(this.remainingTime-=1,this.updateTimerDisplay()):this.redirectToLink()},1e3)}updateTimerDisplay(){this.hasTimerTarget&&(this.timerTarget.textContent=this.remainingTime)}redirectToLink(){var t;clearInterval(this.interval);const e=this.urlValue||((t=this.linkTarget)==null?void 0:t.href);e&&(window.location.href=e)}}$(xh,"targets",["timer","link"]),$(xh,"values",{time:Number,url:String});const M2=Object.freeze(Object.defineProperty({__proto__:null,default:xh},Symbol.toStringTag,{value:"Module"}));class I1 extends U{connect(){this.sloganArray=JSON.parse(this.element.dataset.content)||["Get the LinkedIn B2B data to grow your business","Start your sales by reaching the right decision makers","Search database of 500 Million Business Emails","Search 120M Personal Emails and 20M Phone Numbers"],this.sloganIndex=0,this.lastIntervalTimestamp=0,this.textTarget.innerHTML=this.sloganArray[this.sloganIndex],this.fadeIn(),requestAnimationFrame(this.render.bind(this))}render(e){(!this.lastIntervalTimestamp||e-this.lastIntervalTimestamp>=5*1e3)&&(this.lastIntervalTimestamp=e,this.fadeOut(),setTimeout(()=>{this.updateText(),this.fadeIn()},1e3)),requestAnimationFrame(this.render.bind(this))}updateText(){this.sloganIndex++,this.sloganIndex>=this.sloganArray.length&&(this.sloganIndex=0),this.textTarget.innerHTML=this.sloganArray[this.sloganIndex]}fadeIn(){this.textTarget.style.opacity=1}fadeOut(){this.textTarget.style.opacity=0}}$(I1,"targets",["text"]);const I2=Object.freeze(Object.defineProperty({__proto__:null,default:I1},Symbol.toStringTag,{value:"Module"}));var O1={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},Vp={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},O2=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Wl={CSS:{},springs:{}};function yn(i,e,t){return Math.min(Math.max(i,e),t)}function Qs(i,e){return i.indexOf(e)>-1}function ed(i,e){return i.apply(null,e)}var te={arr:function(i){return Array.isArray(i)},obj:function(i){return Qs(Object.prototype.toString.call(i),"Object")},pth:function(i){return te.obj(i)&&i.hasOwnProperty("totalLength")},svg:function(i){return i instanceof SVGElement},inp:function(i){return i instanceof HTMLInputElement},dom:function(i){return i.nodeType||te.svg(i)},str:function(i){return typeof i=="string"},fnc:function(i){return typeof i=="function"},und:function(i){return typeof i>"u"},nil:function(i){return te.und(i)||i===null},hex:function(i){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(i)},rgb:function(i){return/^rgb/.test(i)},hsl:function(i){return/^hsl/.test(i)},col:function(i){return te.hex(i)||te.rgb(i)||te.hsl(i)},key:function(i){return!O1.hasOwnProperty(i)&&!Vp.hasOwnProperty(i)&&i!=="targets"&&i!=="keyframes"}};function D1(i){var e=/\(([^)]+)\)/.exec(i);return e?e[1].split(",").map(function(t){return parseFloat(t)}):[]}function P1(i,e){var t=D1(i),n=yn(te.und(t[0])?1:t[0],.1,100),r=yn(te.und(t[1])?100:t[1],.1,100),s=yn(te.und(t[2])?10:t[2],.1,100),o=yn(te.und(t[3])?0:t[3],.1,100),l=Math.sqrt(r/n),a=s/(2*Math.sqrt(r*n)),u=a<1?l*Math.sqrt(1-a*a):0,c=1,h=a<1?(a*l+-o)/u:-o+l;function d(p){var b=e?e*p/1e3:p;return a<1?b=Math.exp(-b*a*l)*(c*Math.cos(u*b)+h*Math.sin(u*b)):b=(c+h*b)*Math.exp(-b*l),p===0||p===1?p:1-b}function f(){var p=Wl.springs[i];if(p)return p;for(var b=1/6,m=0,v=0;;)if(m+=b,d(m)===1){if(v++,v>=16)break}else v=0;var g=m*b*1e3;return Wl.springs[i]=g,g}return e?d:f}function D2(i){return i===void 0&&(i=10),function(e){return Math.ceil(yn(e,1e-6,1)*i)*(1/i)}}var P2=function(){var i=11,e=1/(i-1);function t(c,h){return 1-3*h+3*c}function n(c,h){return 3*h-6*c}function r(c){return 3*c}function s(c,h,d){return((t(h,d)*c+n(h,d))*c+r(h))*c}function o(c,h,d){return 3*t(h,d)*c*c+2*n(h,d)*c+r(h)}function l(c,h,d,f,p){var b,m,v=0;
vendor: 15,176 bytes, line 65
65do m=h+(d-h)/2,b=s(m,f,p)-c,b>0?d=m:h=m;while(Math.abs(b)>1e-7&&++v<10);return m}function a(c,h,d,f){for(var p=0;p<4;++p){var b=o(h,d,f);if(b===0)return h;var m=s(h,d,f)-c;h-=m/b}return h}function u(c,h,d,f){if(!(0<=c&&c<=1&&0<=d&&d<=1))return;var p=new Float32Array(i);if(c!==h||d!==f)for(var b=0;b<i;++b)p[b]=s(b*e,c,d);function m(v){for(var g=0,y=1,w=i-1;y!==w&&p[y]<=v;++y)g+=e;--y;var E=(v-p[y])/(p[y+1]-p[y]),x=g+E*e,S=o(x,c,d);return S>=.001?a(v,x,c,d):S===0?x:l(v,g,g+e,c,d)}return function(v){return c===h&&d===f||v===0||v===1?v:s(m(v),h,f)}}return u}(),R1=function(){var i={linear:function(){return function(n){return n}}},e={Sine:function(){return function(n){return 1-Math.cos(n*Math.PI/2)}},Expo:function(){return function(n){return n?Math.pow(2,10*n-10):0}},Circ:function(){return function(n){return 1-Math.sqrt(1-n*n)}},Back:function(){return function(n){return n*n*(3*n-2)}},Bounce:function(){return function(n){for(var r,s=4;n<((r=Math.pow(2,--s))-1)/11;);return 1/Math.pow(4,3-s)-7.5625*Math.pow((r*3-2)/22-n,2)}},Elastic:function(n,r){n===void 0&&(n=1),r===void 0&&(r=.5);var s=yn(n,1,10),o=yn(r,.1,2);return function(l){return l===0||l===1?l:-s*Math.pow(2,10*(l-1))*Math.sin((l-1-o/(Math.PI*2)*Math.asin(1/s))*(Math.PI*2)/o)}}},t=["Quad","Cubic","Quart","Quint"];return t.forEach(function(n,r){e[n]=function(){return function(s){return Math.pow(s,r+2)}}}),Object.keys(e).forEach(function(n){var r=e[n];i["easeIn"+n]=r,i["easeOut"+n]=function(s,o){return function(l){return 1-r(s,o)(1-l)}},i["easeInOut"+n]=function(s,o){return function(l){return l<.5?r(s,o)(l*2)/2:1-r(s,o)(l*-2+2)/2}},i["easeOutIn"+n]=function(s,o){return function(l){return l<.5?(1-r(s,o)(1-l*2))/2:(r(s,o)(l*2-1)+1)/2}}}),i}();function Hp(i,e){if(te.fnc(i))return i;var t=i.split("(")[0],n=R1[t],r=D1(i);switch(t){case"spring":return P1(i,e);case"cubicBezier":return ed(P2,r);case"steps":return ed(D2,r);default:return ed(n,r)}}function N1(i){try{var e=document.querySelectorAll(i);return e}catch{return}}function sc(i,e){for(var t=i.length,n=arguments.length>=2?arguments[1]:void 0,r=[],s=0;s<t;s++)if(s in i){var o=i[s];e.call(n,o,s,i)&&r.push(o)}return r}function oc(i){return i.reduce(function(e,t){return e.concat(te.arr(t)?oc(t):t)},[])}function Qg(i){return te.arr(i)?i:(te.str(i)&&(i=N1(i)||i),i instanceof NodeList||i instanceof HTMLCollection?[].slice.call(i):[i])}function jp(i,e){return i.some(function(t){return t===e})}function $p(i){var e={};for(var t in i)e[t]=i[t];return e}function Eh(i,e){var t=$p(i);for(var n in i)t[n]=e.hasOwnProperty(n)?e[n]:i[n];return t}function ac(i,e){var t=$p(i);for(var n in e)t[n]=te.und(i[n])?e[n]:i[n];return t}function R2(i){var e=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(i);return e?"rgba("+e[1]+",1)":i}function N2(i){var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,t=i.replace(e,function(l,a,u,c){return a+a+u+u+c+c}),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t),r=parseInt(n[1],16),s=parseInt(n[2],16),o=parseInt(n[3],16);return"rgba("+r+","+s+","+o+",1)"}function B2(i){var e=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(i)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(i),t=parseInt(e[1],10)/360,n=parseInt(e[2],10)/100,r=parseInt(e[3],10)/100,s=e[4]||1;function o(d,f,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?d+(f-d)*6*p:p<1/2?f:p<2/3?d+(f-d)*(2/3-p)*6:d}var l,a,u;if(n==0)l=a=u=r;else{var c=r<.5?r*(1+n):r+n-r*n,h=2*r-c;l=o(h,c,t+1/3),a=o(h,c,t),u=o(h,c,t-1/3)}return"rgba("+l*255+","+a*255+","+u*255+","+s+")"}function F2(i){if(te.rgb(i))return R2(i);if(te.hex(i))return N2(i);if(te.hsl(i))return B2(i)}function qn(i){var e=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(i);if(e)return e[1]}function z2(i){if(Qs(i,"translate")||i==="perspective")return"px";if(Qs(i,"rotate")||Qs(i,"skew"))return"deg"}function Th(i,e){return te.fnc(i)?i(e.target,e.id,e.total):i}function vn(i,e){return i.getAttribute(e)}function qp(i,e,t){var n=qn(e);if(jp([t,"deg","rad","turn"],n))return e;var r=Wl.CSS[e+t];if(!te.und(r))return r;var s=100,o=document.createElement(i.tagName),l=i.parentNode&&i.parentNode!==document?i.parentNode:document.body;l.appendChild(o),o.style.position="absolute",o.style.width=s+t;var a=s/o.offsetWidth;l.removeChild(o);var u=a*parseFloat(e);return Wl.CSS[e+t]=u,u}function B1(i,e,t){if(e in i.style){var n=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=i.style[e]||getComputedStyle(i).getPropertyValue(n)||"0";return t?qp(i,r,t):r}}function Up(i,e){if(te.dom(i)&&!te.inp(i)&&(!te.nil(vn(i,e))||te.svg(i)&&i[e]))return"attribute";if(te.dom(i)&&jp(O2,e))return"transform";if(te.dom(i)&&e!=="transform"&&B1(i,e))return"css";if(i[e]!=null)return"object"}function F1(i){if(te.dom(i)){for(var e=i.style.transform||"",t=/(\w+)\(([^)]*)\)/g,n=new Map,r;r=t.exec(e);)n.set(r[1],r[2]);return n}}function V2(i,e,t,n){var r=Qs(e,"scale")?1:0+z2(e),s=F1(i).get(e)||r;return t&&(t.transforms.list.set(e,s),t.transforms.last=e),n?qp(i,s,n):s}function Wp(i,e,t,n){switch(Up(i,e)){case"transform":return V2(i,e,n,t);case"css":return B1(i,e,t);case"attribute":return vn(i,e);default:return i[e]||0}}function Gp(i,e){var t=/^(\*=|\+=|-=)/.exec(i);if(!t)return i;var n=qn(i)||0,r=parseFloat(e),s=parseFloat(i.replace(t[0],""));switch(t[0][0]){case"+":return r+s+n;case"-":return r-s+n;case"*":return r*s+n}}function z1(i,e){if(te.col(i))return F2(i);if(/\s/g.test(i))return i;var t=qn(i),n=t?i.substr(0,i.length-t.length):i;return e?n+e:n}function Kp(i,e){return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))}function H2(i){return Math.PI*2*vn(i,"r")}function j2(i){return vn(i,"width")*2+vn(i,"height")*2}function $2(i){return Kp({x:vn(i,"x1"),y:vn(i,"y1")},{x:vn(i,"x2"),y:vn(i,"y2")})}function V1(i){for(var e=i.points,t=0,n,r=0;r<e.numberOfItems;r++){var s=e.getItem(r);r>0&&(t+=Kp(n,s)),n=s}return t}function q2(i){var e=i.points;return V1(i)+Kp(e.getItem(e.numberOfItems-1),e.getItem(0))}function H1(i){if(i.getTotalLength)return i.getTotalLength();switch(i.tagName.toLowerCase()){case"circle":return H2(i);case"rect":return j2(i);case"line":return $2(i);case"polyline":return V1(i);case"polygon":return q2(i)}}function U2(i){var e=H1(i);return i.setAttribute("stroke-dasharray",e),e}function W2(i){for(var e=i.parentNode;te.svg(e)&&te.svg(e.parentNode);)e=e.parentNode;return e}function j1(i,e){var t=e||{},n=t.el||W2(i),r=n.getBoundingClientRect(),s=vn(n,"viewBox"),o=r.width,l=r.height,a=t.viewBox||(s?s.split(" "):[0,0,o,l]);return{el:n,viewBox:a,x:a[0]/1,y:a[1]/1,w:o,h:l,vW:a[2],vH:a[3]}}function G2(i,e){var t=te.str(i)?N1(i)[0]:i,n=e||100;return function(r){return{property:r,el:t,svg:j1(t),totalLength:H1(t)*(n/100)}}}function K2(i,e,t){function n(c){c===void 0&&(c=0);var h=e+c>=1?e+c:0;return i.el.getPointAtLength(h)}var r=j1(i.el,i.svg),s=n(),o=n(-1),l=n(1),a=t?1:r.w/r.vW,u=t?1:r.h/r.vH;switch(i.property){case"x":return(s.x-r.x)*a;case"y":return(s.y-r.y)*u;case"angle":return Math.atan2(l.y-o.y,l.x-o.x)*180/Math.PI}}function Zg(i,e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=z1(te.pth(i)?i.totalLength:i,e)+"";return{original:n,numbers:n.match(t)?n.match(t).map(Number):[0],strings:te.str(i)||e?n.split(t):[]}}function Yp(i){var e=i?oc(te.arr(i)?i.map(Qg):Qg(i)):[];return sc(e,function(t,n,r){return r.indexOf(t)===n})}function $1(i){var e=Yp(i);return e.map(function(t,n){return{target:t,id:n,total:e.length,transforms:{list:F1(t)}}})}function Y2(i,e){var t=$p(e);if(/^spring/.test(t.easing)&&(t.duration=P1(t.easing)),te.arr(i)){var n=i.length,r=n===2&&!te.obj(i[0]);r?i={value:i}:te.fnc(e.duration)||(t.duration=e.duration/n)}var s=te.arr(i)?i:[i];return s.map(function(o,l){var a=te.obj(o)&&!te.pth(o)?o:{value:o};return te.und(a.delay)&&(a.delay=l?0:e.delay),te.und(a.endDelay)&&(a.endDelay=l===s.length-1?e.endDelay:0),a}).map(function(o){return ac(o,t)})}function X2(i){for(var e=sc(oc(i.map(function(s){return Object.keys(s)})),function(s){return te.key(s)}).reduce(function(s,o){return s.indexOf(o)<0&&s.push(o),s},[]),t={},n=function(s){var o=e[s];t[o]=i.map(function(l){var a={};for(var u in l)te.key(u)?u==o&&(a.value=l[u]):a[u]=l[u];return a})},r=0;r<e.length;r++)n(r);return t}function J2(i,e){var t=[],n=e.keyframes;n&&(e=ac(X2(n),e));for(var r in e)te.key(r)&&t.push({name:r,tweens:Y2(e[r],i)});return t}function Q2(i,e){var t={};for(var n in i){var r=Th(i[n],e);te.arr(r)&&(r=r.map(function(s){return Th(s,e)}),r.length===1&&(r=r[0])),t[n]=r}return t.duration=parseFloat(t.duration),t.delay=parseFloat(t.delay),t}function Z2(i,e){var t;return i.tweens.map(function(n){var r=Q2(n,e),s=r.value,o=te.arr(s)?s[1]:s,l=qn(o),a=Wp(e.target,i.name,l,e),u=t?t.to.original:a,c=te.arr(s)?s[0]:u,h=qn(c)||qn(a),d=l||h;return te.und(o)&&(o=u),r.from=Zg(c,d),r.to=Zg(Gp(o,c),d),r.start=t?t.end:0,r.end=r.start+r.delay+r.duration+r.endDelay,r.easing=Hp(r.easing,r.duration),r.isPath=te.pth(s),r.isPathTargetInsideSVG=r.isPath&&te.svg(e.target),r.isColor=te.col(r.from.original),r.isColor&&(r.round=1),t=r,r})}var q1={css:function(i,e,t){return i.style[e]=t},attribute:function(i,e,t){return i.setAttribute(e,t)},object:function(i,e,t){return i[e]=t},transform:function(i,e,t,n,r){if(n.list.set(e,t),e===n.last||r){var s="";n.list.forEach(function(o,l){s+=l+"("+o+") "}),i.style.transform=s}}};function U1(i,e){var t=$1(i);t.forEach(function(n){for(var r in e){var s=Th(e[r],n),o=n.target,l=qn(s),a=Wp(o,r,l,n),u=l||qn(a),c=Gp(z1(s,u),a),h=Up(o,r);q1[h](o,r,c,n.transforms,!0)}})}function eL(i,e){var t=Up(i.target,e.name);if(t){var n=Z2(e,i),r=n[n.length-1];return{type:t,property:e.name,animatable:i,tweens:n,duration:r.end,delay:n[0].delay,endDelay:r.endDelay}}}function tL(i,e){return sc(oc(i.map(function(t){return e.map(function(n){return eL(t,n)})})),function(t){return!te.und(t)})}function W1(i,e){var t=i.length,n=function(s){return s.timelineOffset?s.timelineOffset:0},r={};return r.duration=t?Math.max.apply(Math,i.map(function(s){return n(s)+s.duration})):e.duration,r.delay=t?Math.min.apply(Math,i.map(function(s){return n(s)+s.delay})):e.delay,r.endDelay=t?r.duration-Math.max.apply(Math,i.map(function(s){return n(s)+s.duration-s.endDelay})):e.endDelay,r}var e0=0;function nL(i){var e=Eh(O1,i),t=Eh(Vp,i),n=J2(t,i),r=$1(i.targets),s=tL(r,n),o=W1(s,t),l=e0;return e0++,ac(e,{id:l,children:[],animatables:r,animations:s,duration:o.duration,delay:o.delay,endDelay:o.endDelay})}var Zt=[],G1=function(){var i;function e(){!i&&(!t0()||!ze.suspendWhenDocumentHidden)&&Zt.length>0&&(i=requestAnimationFrame(t))}function t(r){for(var s=Zt.length,o=0;o<s;){var l=Zt[o];l.paused?(Zt.splice(o,1),s--):(l.tick(r),o++)}i=o>0?requestAnimationFrame(t):void 0}function n(){ze.suspendWhenDocumentHidden&&(t0()?i=cancelAnimationFrame(i):(Zt.forEach(function(r){return r._onDocumentVisibility()}),G1()))}return typeof document<"u"&&document.addEventListener("visibilitychange",n),e}();function t0(){return!!document&&document.hidden}function ze(i){i===void 0&&(i={});var e=0,t=0,n=0,r,s=0,o=null;function l(g){var y=window.Promise&&new Promise(function(w){return o=w});return g.finished=y,y}var a=nL(i);l(a);function u(){var g=a.direction;g!=="alternate"&&(a.direction=g!=="normal"?"normal":"reverse"),a.reversed=!a.reversed,r.forEach(function(y){return y.reversed=a.reversed})}function c(g){return a.reversed?a.duration-g:g}function h(){e=0,t=c(a.currentTime)*(1/ze.speed)}function d(g,y){y&&y.seek(g-y.timelineOffset)}function f(g){if(a.reversePlayback)for(var w=s;w--;)d(g,r[w]);else for(var y=0;y<s;y++)d(g,r[y])}function p(g){for(var y=0,w=a.animations,E=w.length;y<E;){var x=w[y],S=x.animatable,_=x.tweens,M=_.length-1,O=_[M];M&&(O=sc(_,function(Q){return g<Q.end})[0]||O);for(var D=yn(g-O.start-O.delay,0,O.duration)/O.duration,k=isNaN(D)?1:O.easing(D),A=O.to.strings,C=O.round,T=[],L=O.to.numbers.length,I=void 0,P=0;P<L;P++){var R=void 0,z=O.to.numbers[P],N=O.from.numbers[P]||0;O.isPath?R=K2(O.value,k*z,O.isPathTargetInsideSVG):R=N+k*(z-N),C&&(O.isColor&&P>2||(R=Math.round(R*C)/C)),T.push(R)}var B=A.length;if(!B)I=T[0];else{I=A[0];for(var j=0;j<B;j++){A[j];var Y=A[j+1],V=T[j];isNaN(V)||(Y?I+=V+Y:I+=V+" ")}}q1[x.type](S.target,x.property,I,S.transforms),x.currentValue=I,y++}}function b(g){a[g]&&!a.passThrough&&a[g](a)}function m(){a.remaining&&a.remaining!==!0&&a.remaining--}function v(g){var y=a.duration,w=a.delay,E=y-a.endDelay,x=c(g);a.progress=yn(x/y*100,0,100),a.reversePlayback=x<a.currentTime,r&&f(x),!a.began&&a.currentTime>0&&(a.began=!0,b("begin")),!a.loopBegan&&a.currentTime>0&&(a.loopBegan=!0,b("loopBegin")),x<=w&&a.currentTime!==0&&p(0),(x>=E&&a.currentTime!==y||!y)&&p(y),x>w&&x<E?(a.changeBegan||(a.changeBegan=!0,a.changeCompleted=!1,b("changeBegin")),b("change"),p(x)):a.changeBegan&&(a.changeCompleted=!0,a.changeBegan=!1,b("changeComplete")),a.currentTime=yn(x,0,y),a.began&&b("update"),g>=y&&(t=0,m(),a.remaining?(e=n,b("loopComplete"),a.loopBegan=!1,a.direction==="alternate"&&u()):(a.paused=!0,a.completed||(a.completed=!0,b("loopComplete"),b("complete"),!a.passThrough&&"Promise"in window&&(o(),l(a)))))}return a.reset=function(){var g=a.direction;a.passThrough=!1,a.currentTime=0,a.progress=0,a.paused=!0,a.began=!1,a.loopBegan=!1,a.changeBegan=!1,a.completed=!1,a.changeCompleted=!1,a.reversePlayback=!1,a.reversed=g==="reverse",a.remaining=a.loop,r=a.children,s=r.length;for(var y=s;y--;)a.children[y].reset();(a.reversed&&a.loop!==!0||g==="alternate"&&a.loop===1)&&a.remaining++,p(a.reversed?a.duration:0)},a._onDocumentVisibility=h,a.set=function(g,y){return U1(g,y),a},a.tick=function(g){n=g,e||(e=n),v((n+(t-e))*ze.speed)},a.seek=function(g){v(c(g))},a.pause=function(){a.paused=!0,h()},a.play=function(){a.paused&&(a.completed&&a.reset(),a.paused=!1,Zt.push(a),h(),G1())},a.reverse=function(){u(),a.completed=!a.reversed,h()},a.restart=function(){a.reset(),a.play()},a.remove=function(g){var y=Yp(g);K1(y,a)},a.reset(),a.autoplay&&a.play(),a}function n0(i,e){for(var t=e.length;t--;)jp(i,e[t].animatable.target)&&e.splice(t,1)}function K1(i,e){var t=e.animations,n=e.children;n0(i,t);for(var r=n.length;r--;){var s=n[r],o=s.animations;n0(i,o),!o.length&&!s.children.length&&n.splice(r,1)}!t.length&&!n.length&&e.pause()}function iL(i){for(var e=Yp(i),t=Zt.length;t--;){var n=Zt[t];K1(e,n)}}function rL(i,e){e===void 0&&(e={});var t=e.direction||"normal",n=e.easing?Hp(e.easing):null,r=e.grid,s=e.axis,o=e.from||0,l=o==="first",a=o==="center",u=o==="last",c=te.arr(i),h=parseFloat(c?i[0]:i),d=c?parseFloat(i[1]):0,f=qn(c?i[1]:i)||0,p=e.start||0+(c?h:0),b=[],m=0;return function(v,g,y){if(l&&(o=0),a&&(o=(y-1)/2),u&&(o=y-1),!b.length){for(var w=0;w<y;w++){if(!r)b.push(Math.abs(o-w));else{var E=a?(r[0]-1)/2:o%r[0],x=a?(r[1]-1)/2:Math.floor(o/r[0]),S=w%r[0],_=Math.floor(w/r[0]),M=E-S,O=x-_,D=Math.sqrt(M*M+O*O);s==="x"&&(D=-M),s==="y"&&(D=-O),b.push(D)}m=Math.max.apply(Math,b)}n&&(b=b.map(function(A){return n(A/m)*m})),t==="reverse"&&(b=b.map(function(A){return s?A<0?A*-1:-A:Math.abs(m-A)}))}var k=c?(d-h)/m:h;return p+k*(Math.round(b[g]*100)/100)+f}}function sL(i){i===void 0&&(i={});var e=ze(i);return e.duration=0,e.add=function(t,n){var r=Zt.indexOf(e),s=e.children;r>-1&&Zt.splice(r,1);function o(d){d.passThrough=!0}for(var l=0;l<s.length;l++)o(s[l]);
65var a=ac(t,Eh(Vp,i));a.targets=a.targets||i.targets;var u=e.duration;a.autoplay=!1,a.direction=e.direction,a.timelineOffset=te.und(n)?u:Gp(n,u),o(e),e.seek(a.timelineOffset);var c=ze(a);o(c),s.push(c);var h=W1(s,i);return e.delay=h.delay,e.endDelay=h.endDelay,e.duration=h.duration,e.seek(0),e.reset(),e.autoplay&&e.play(),e},e}ze.version="3.2.1";ze.speed=1;ze.suspendWhenDocumentHidden=!0;ze.running=Zt;ze.remove=iL;ze.get=Wp;ze.set=U1;ze.convertPx=qp;ze.path=G2;ze.setDashoffset=U2;ze.stagger=rL;ze.timeline=sL;ze.easing=Hp;ze.penner=R1;ze.random=function(i,e){return Math.floor(Math.random()*(e-i+1))+i};class oL extends U{initialize(){this.content=JSON.parse(this.element.dataset.content),this.initOptions=this.initOptions.bind(this)}connect(){var e=document.querySelectorAll(".hero-animation .letters");e.forEach((r,s)=>{r.textContent&&(r.innerHTML=r.textContent.replace(/([^\x00-\x80]|\w)/g,`<span class='el-${s}-letter'>$&</span>`))});const t=ze.timeline({loop:!0});this.content.forEach(function(r,s){t.add({targets:`.hero-animation .el-${s}-letter`,opacity:[0,1],easing:"easeOutExpo",duration:600,delay:(o,l)=>34*(l+1)}).add({targets:`.hero-animation .el-${s}`,opacity:0,duration:500,easing:"easeOutExpo",delay:500})});var n=document.querySelector(".hero-animation .text-wrapper");n&&n.classList.add("opacity-100")}initOptions(){this.connect.map(function(e,t){})}}const aL=Object.freeze(Object.defineProperty({__proto__:null,default:oL},Symbol.toStringTag,{value:"Module"}));class Xp extends U{responseTargetConnected(e){e.dataset.redirectUrl&&(window.location=e.dataset.redirectUrl,e.remove()),e.dataset.openUrl&&turboFetch(e.dataset.openUrl)}disableWithTargetConnected(e){var t;if(((t=e==null?void 0:e.form)==null?void 0:t.dataset.turbo)==="false"){const n=()=>{e.disabled=!0,e.innerHTML=e.dataset.disableWith};e._submitHandler=n,e.form.addEventListener("submit",n)}}disableWithTargetDisconnected(e){var t;((t=e==null?void 0:e.form)==null?void 0:t.dataset.turbo)==="false"&&e._submitHandler&&(e.form.removeEventListener("submit",e._submitHandler),delete e._submitHandler)}fetchTargetConnected(e){e.addEventListener("click",this.fetchData.bind(this))}fetchTargetDisconnected(e){e.removeEventListener("click",this.fetchData.bind(this))}fetchData(e){const t=(e.currentTarget||e.target).dataset;this.fetchTargets.forEach(n=>n.classList.remove("active")),t.url&&turboFetch(t.url,function(){element.classList.add("active")})}turboTargetConnected(e){e.addEventListener("click",this.fetchTurboData.bind(this))}turboTargetDisconnected(e){e.removeEventListener("click",this.fetchTurboData.bind(this))}recommendedModalTargetConnected(e){const t="recommended-modal-dismissed-v1",n=()=>{try{return localStorage.getItem(t)==="1"}catch{return!1}},r=()=>{try{localStorage.setItem(t,"1")}catch{}};if(n()){this.dispatch("recommended-closed",{detail:{target:e,skipped:!0}});return}const s={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-50",closable:!0,onHide:()=>{r(),this.dispatch("recommended-closed",{detail:{target:e}})},onShow:()=>{},onToggle:()=>{}},o={id:"recommended-modal",override:!0},l=new Modal(e,s,o);l.show();const a=e.querySelector("[data-dismiss-modal]");a&&a.addEventListener("click",()=>{l.hide()})}fetchTurboData(e){const t=e.currentTarget||e.target,n=t.dataset;this.toggleSubmitButton(t),n.url&&turboFetch(n.url,function(){console.log("Turbo fetch done!"),this.toggleSubmitButton(t)})}afterLogout(e){e.detail.success&&window.location.reload()}toggleSubmitButton(e){try{const t=e.innerHTML,n=e.getAttribute("data-turbo-submits-with");e.setAttribute("data-turbo-submits-with",t),e.innerHTML=n,e.disabled=!e.disabled}catch(t){console.error("Error in toggleSubmitButton method:",t)}}connect(){this.switchThemeMode=this.switchThemeMode.bind(this),this.setThemeMode=this.setThemeMode.bind(this),this.howToModal=this.initHowToModal(),this.hasLinkTarget&&this.setActiveLink(),document.addEventListener("turbo:before-fetch-response",function(e){}),document.addEventListener("turbo:before-stream-render",e=>{e.target.tagName.toLowerCase();const n=e.detail.render;e.detail.render=function(r){n(r)}}),document.addEventListener("turbo:frame-load",e=>{}),this.setThemeMode(),this.initCustomDropdowns(),document.addEventListener("intro:onboard",this.showHowTo.bind(this)),document.addEventListener("DOMContentLoaded",this.handleDisableWith.bind(this))}disconnect(){document.removeEventListener("intro:onboard",this.showHowTo.bind(this)),this.disconnectDisableWith()}disconnectDisableWith(){const e=document.querySelectorAll("[data-disable-with]");Array.from(e).forEach(t=>{var n;((n=t==null?void 0:t.form)==null?void 0:n.dataset.turbo)==="false"&&t._submitHandler&&(t.form.removeEventListener("submit",t._submitHandler),delete t._submitHandler)}),document.removeEventListener("DOMContentLoaded",this.handleDisableWith.bind(this))}handleDisableWith(){const e=document.querySelectorAll("[data-disable-with]");Array.from(e).forEach(t=>{var n;if(((n=t==null?void 0:t.form)==null?void 0:n.dataset.turbo)==="false"){const r=()=>{t.disabled=!0,t.innerHTML=t.dataset.disableWith};t._submitHandler=r,t.form.addEventListener("submit",r)}})}switchThemeMode(){let e=localStorage.getItem("color-theme");this.setThemeMode(e=="light"?"dark":"light")}setThemeMode(e){const t=document.body,n=document.documentElement,r=t.dataset.forceLightTheme==="true";switch(e=r?"light":e||localStorage.getItem("color-theme"),this.setBsThemeMode(e),e){case"dark":n.classList.remove("light"),n.classList.add("dark"),n.dataset.theme="dark",n.dataset.bsTheme="dark",t.dataset.colorScheme="dark",t.dataset.bsTheme="dark",r||localStorage.setItem("color-theme","dark");break;default:n.classList.remove("dark"),n.classList.add("light"),n.dataset.theme="light",n.dataset.bsTheme="light",t.dataset.colorScheme="light",t.dataset.bsTheme="light",r||localStorage.setItem("color-theme","light");break}}setBsThemeMode(e){const t=document.getElementById("cssDark");if(t)switch(e){case"dark":t.removeAttribute("disabled");break;default:t.setAttribute("disabled",!0);break}}initCustomDropdowns(){const e=document.querySelectorAll("[data-custom-dropdown-toggle]");Array.from(e).forEach(t=>this.initCustomDropdown(t))}initCustomDropdown(e){const t=e.dataset.customDropdownToggle,n=e.getAttribute("id"),r=document.getElementById(t),s=document.getElementById(n),o={placement:e.dataset.dropdownPlacement||"bottom",triggerType:e.dataset.dropdownTrigger||"click",offsetSkidding:0,offsetDistance:10,delay:300,ignoreClickOutsideClass:!1,onHide:()=>{s.classList.remove("is-active-dropdown"),r.classList.add("scale-y-0"),r.classList.remove("scale-y-100");const a=s.closest("header"),u=window.scrollY;a&&(a.classList.remove("is-dropdown-show"),a.dataset.activeClass&&u===0&&a.classList.remove(...a.dataset.activeClass.split(" ")),a.dataset.inactiveClass&&u>0&&a.classList.add(...a.dataset.inactiveClass.split(" ")))},onShow:()=>{s.classList.add("is-active-dropdown"),r.classList.remove("scale-y-0"),r.classList.add("scale-y-100");const a=s.closest("header");window.innerWidth<1280&&(a==null?void 0:a.id)==="header"&&!s.closest("#mega-menu-full")&&this.closeMainNavMenu(),a&&(a.classList.add("is-dropdown-show"),a.dataset.activeClass&&a.classList.add(...a.dataset.activeClass.split(" ")),a.dataset.inactiveClass&&a.classList.remove(...a.dataset.inactiveClass.split(" ")))},onToggle:()=>{}},l={id:t,override:!0};return new Dropdown(r,s,o,l)}toggleMainNav(e){var s;const t=(s=e.currentTarget)==null?void 0:s.getAttribute("aria-controls");if(!t)return;const n=document.getElementById(t);if(!n)return;n.classList.contains("hidden")&&this.closeHeaderDropdowns()}closeMainNavMenu(){const e=document.getElementById("mega-menu-full");if(!e||e.classList.contains("hidden"))return;e.classList.add("hidden");const t=document.getElementById("main-nav-toggle");
65t&&t.setAttribute("aria-expanded","false")}closeHeaderDropdowns(){[{menuId:"user-dropdown",buttonId:"user-menu-button"},{menuId:"help-dropdown-menu",buttonId:"help-dropdown-button"}].forEach(({menuId:t,buttonId:n})=>{const r=document.getElementById(t),s=document.getElementById(n);!r||!s||(r.classList.add("hidden","scale-y-0"),r.classList.remove("scale-y-100"),s.classList.remove("is-active-dropdown"))})}initHowToModal(){return this.modalTarget=document.getElementById("howto-modal"),this.options={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"howto-modal-backdrop bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-[100]",closable:!0,onHide:()=>{document.querySelectorAll(".howto-backdrop").forEach(e=>{e.remove()})},onShow:()=>{},onToggle:()=>{}},this.instanceOptions={id:"howto-modal",override:!0},new Modal(this.modalTarget,this.options,this.instanceOptions)}showHowTo(){this.howToModal.show()}closeHowTo(){this.howToModal.hide()}setActiveLink(){const e=window.location.pathname;let t=null,n=-1;this.linkTargets.forEach(r=>{const s=r.getAttribute("href");let o=0;e===s?o=100:e.startsWith(s)&&(o=50-(e.length-s.length)),o>n&&(n=o,t=r)}),this.linkTargets.forEach(r=>{const s=r.closest(".group");s&&s.classList.remove("active")}),t&&t.closest(".group")&&t.closest(".group").classList.add("active")}}$(Xp,"targets",["response","fetch","link","turbo","disableWith","recommendedModal"]);const lL=Object.freeze(Object.defineProperty({__proto__:null,default:Xp},Symbol.toStringTag,{value:"Module"}));class Sh extends U{connect(){this.publicId=null,this.lastUserMessage=null,this.recoveryTimer=null,this.restoreAbortController=null,this.restorePromise=null,this.boundStreamHandler=this.handleStream.bind(this),document.addEventListener("turbo:before-stream-render",this.boundStreamHandler);const e=this.restoreConversation();this.restorePromise=e,e.finally(()=>{this.restorePromise===e&&(this.restorePromise=null)})}disconnect(){var e;document.removeEventListener("turbo:before-stream-render",this.boundStreamHandler),window.clearTimeout(this.recoveryTimer),(e=this.restoreAbortController)==null||e.abort()}statusTargetConnected(e){e.dataset.state==="idle"&&(window.clearTimeout(this.recoveryTimer),this.setProcessing(!1))}async restoreConversation(){const e=window.localStorage.getItem(this.storageKey);if(!e){this.setProcessing(!1),this.setLocalStatus("idle");return}this.setProcessing(!0),this.setLocalStatus("starting","Restoring your conversationâ¦");const t=new AbortController;this.restoreAbortController=t;let n=!1;try{const r=await this.request(`${this.conversationsUrlValue}/${encodeURIComponent(e)}`,{signal:t.signal});if(t.signal.aborted)return;if(r.ok){const s=await r.json();if(t.signal.aborted)return;this.applyConversation(s);return}n=[401,403,404,410,422].includes(r.status)}catch(r){if(r.name==="AbortError")return}finally{this.restoreAbortController===t&&(this.restoreAbortController=null)}n&&window.localStorage.removeItem(this.storageKey),this.setProcessing(!1),this.setLocalStatus("idle")}async createConversation(){this.setProcessing(!0),this.setLocalStatus("starting","Starting a new conversationâ¦");try{const e=await this.request(this.conversationsUrlValue,{method:"POST",body:"{}"});if(!e.ok)throw new Error("conversation_create_failed");return this.applyConversation(await e.json()),!0}catch{return this.addLocalMessage("assistant","The assistant could not start a conversation. Please refresh and try again.","error"),this.setProcessing(!1),this.setLocalStatus("idle"),!1}}async newConversation(){var e;(e=this.restoreAbortController)==null||e.abort(),this.restorePromise=null,window.localStorage.removeItem(this.storageKey),this.publicId=null,this.messagesTarget.replaceChildren(),this.streamSourceTarget.replaceChildren(),this.emptyStateTarget.classList.remove("hidden"),this.setProcessing(!1),this.setLocalStatus("idle"),this.inputTarget.focus()}async send(e){var n;e==null||e.preventDefault();const t=this.inputTarget.value.trim();if(t&&(this.restorePromise&&await this.restorePromise,!this.inputTarget.disabled&&!(!this.publicId&&!await this.createConversation()))){this.lastUserMessage=t,this.inputTarget.value="",this.resize(),this.addLocalMessage("user",t),this.setProcessing(!0),this.setLocalStatus("thinking","Understanding your requestâ¦");try{const r=await this.request(`${this.conversationsUrlValue}/${encodeURIComponent(this.publicId)}/messages`,{method:"POST",body:JSON.stringify({message:t,client_request_id:this.requestId()})}),s=await r.json().catch(()=>({}));if(!r.ok)throw new Error(((n=s==null?void 0:s.error)==null?void 0:n.message)||"The message could not be sent.");this.scheduleRecovery()}catch(r){this.addLocalMessage("assistant",r.message||"The message could not be sent. Please retry.","error",!0),this.setProcessing(!1),this.setLocalStatus("idle")}}}useStarter(e){this.inputTarget.value=e.currentTarget.dataset.prompt||"",this.resize(),this.inputTarget.focu
65s()}retryLast(){!this.lastUserMessage||this.inputTarget.disabled||(this.inputTarget.value=this.lastUserMessage,this.send(new Event("submit")))}handleKeydown(e){e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),this.send(e))}resize(){this.hasInputTarget&&(this.inputTarget.style.height="auto",this.inputTarget.style.height=`${Math.min(this.inputTarget.scrollHeight,144)}px`)}handleStream(e){var n,r;const t=(r=(n=e.target)==null?void 0:n.getAttribute)==null?void 0:r.call(n,"target");["ask-status","ask-messages","ask-audience-panel"].includes(t)&&window.setTimeout(()=>{var s;if(t==="ask-status"){const o=this.element.querySelector("#ask-status");((s=o==null?void 0:o.dataset)==null?void 0:s.state)==="idle"&&(window.clearTimeout(this.recoveryTimer),this.setProcessing(!1))}t==="ask-messages"&&this.emptyStateTarget.classList.add("hidden"),this.scrollToBottom()},0)}applyConversation(e){this.publicId=e.public_id,window.localStorage.setItem(this.storageKey,this.publicId),this.installStream(e.stream_html),this.renderHistory(e.messages||[]),e.audience_html&&this.hasAudiencePanelTarget&&(this.audiencePanelTarget.outerHTML=e.audience_html);const t=e.status==="running";this.setProcessing(t),this.setLocalStatus(t?"thinking":"idle",t?"Working on your requestâ¦":null),t&&this.scheduleRecovery()}renderHistory(e){this.messagesTarget.replaceChildren(),e.forEach(n=>{this.addLocalMessage(n.role,n.content,n.kind,!1,n.support_handoff)}),this.emptyStateTarget.classList.toggle("hidden",e.length>0);const t=[...e].reverse().find(n=>n.role==="user");this.lastUserMessage=(t==null?void 0:t.content)||null,this.scrollToBottom()}installStream(e){this.streamSourceTarget.innerHTML=e||""}addLocalMessage(e,t,n="message",r=!1,s=!1){const o=document.createElement("div");o.className=`flex ${e==="user"?"justify-end":"justify-start"}`;const l=document.createElement("div"),a=n==="error"?"border border-red-200 bg-red-50 text-red-900 dark:border-red-900/60 dark:bg-red-950/40 dark:text-red-100":"border border-slate-200 bg-white text-slate-800 dark:border-slate-700 dark:bg-slate-800 dark:text-slate-100";if(l.className=`max-w-[88%] rounded-2xl px-4 py-3 shadow-sm ${e==="user"?"bg-indigo-600 text-white":a}`,e!=="user"){const h=document.createElement("div");h.className=`mb-1 text-xs font-semibold uppercase tracking-wide ${n==="error"?"text-red-600 dark:text-red-300":"text-indigo-600 dark:text-indigo-300"}`,h.textContent="AeroLeads AI",l.appendChild(h)}const u=document.createElement("div");if(u.className="whitespace-pre-wrap break-words text-sm leading-6 sm:text-[15px]",u.textContent=t,l.appendChild(u),r){const h=document.createElement("button");h.type="button",h.className="mt-3 rounded-lg border border-red-300 bg-white px-3 py-1.5 text-xs font-semibold text-red-700",h.textContent="Retry last message",h.addEventListener("click",()=>this.retryLast()),l.appendChild(h)}e!=="user"&&(s||n==="error")&&this.appendSupportHandoff(l),o.appendChild(l),this.messagesTarget.appendChild(o),this.emptyStateTarget.classList.add("hidden"),this.scrollToBottom()}appendSupportHandoff(e){const t=document.createElement("div");t.className="mt-3 border-t border-current/15 pt-3";const n=document.createElement("p");n.className="text-xs font-semibold",n.textContent="Still need help? Talk to our team.",t.appendChild(n);const r=document.createElement("div");r.className="mt-2 flex flex-wrap gap-2",[["Live chat",this.supportChatUrlValue],["WhatsApp",this.supportWhatsappUrlValue],["Email us",this.supportEmailUrlValue]].forEach(([o,l])=>{if(!l)return;const a=document.createElement("a");a.href=l,a.textContent=o,a.className="rounded-lg border border-current/20 bg-white px-3 py-1.5 text-xs font-semibold text-slate-700 hover:bg-slate-50 dark:bg-slate-900 dark:text-slate-100 dark:hover:bg-slate-800",l.startsWith("mailto:")||(a.target="_blank",a.rel="noopener noreferrer"),r.appendChild(a)}),t.appendChild(r),e.appendChild(t)}setProcessing(e){this.hasInputTarget&&(this.inputTarget.disabled=e,this.sendButtonTarget.disabled=e)}setLocalStatus(e,t=null){if(!this.hasStatusTarget||(this.statusTarget.dataset.state=e,this.statusTarget.replaceChildren(),e==="idle"))return;const n=document.createElement("span");n.className="inline-flex items-center gap-2";const r=document.createElement("span");r.className="h-2 w-2 animate-pulse rounded-full bg-indigo-500",n.appendChild(r),n.appendChild(document.createTextNode(t||"Workingâ¦")),this.statusTarget.appendChild(n)}scheduleRecovery(){window.clearTimeout(this.recoveryTimer),this.recoveryTimer=window.setTimeout(()=>this.refreshConversation(),5e4)}async refreshConversation(){if(this.publicId)try{const e=await this.request(`${this.conversationsUrlValue}/${encodeURIComponent(this.publicId)}`);e.ok&&this.applyConversation(await e.json())}catch{this.setProcessing(!1),this.setLocalStatus("idle")}}
65request(e,t={}){var n;return fetch(e,{credentials:"same-origin",...t,headers:{Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":((n=document.querySelector('meta[name="csrf-token"]'))==null?void 0:n.content)||"",...t.headers||{}}})}requestId(){var e;return(e=window.crypto)!=null&&e.randomUUID?window.crypto.randomUUID():`ask-${Date.now()}-${Math.random().toString(16).slice(2)}`}scrollToBottom(){this.hasMessagesTarget&&(this.messagesTarget.scrollTop=this.messagesTarget.scrollHeight)}get storageKey(){return"aeroleads.ask.conversation"}}$(Sh,"targets",["messages","emptyState","input","sendButton","status","audiencePanel","streamSource"]),$(Sh,"values",{conversationsUrl:String,supportChatUrl:String,supportWhatsappUrl:String,supportEmailUrl:String});const uL=Object.freeze(Object.defineProperty({__proto__:null,default:Sh},Symbol.toStringTag,{value:"Module"}));var i0=Y1;function Y1(){var i=[].slice.call(arguments),e=!1;typeof i[0]=="boolean"&&(e=i.shift());var t=i[0];if(r0(t))throw new Error("extendee must be an object");for(var n=i.slice(1),r=n.length,s=0;s<r;s++){var o=n[s];for(var l in o)if(Object.prototype.hasOwnProperty.call(o,l)){var a=o[l];if(e&&cL(a)){var u=Array.isArray(a)?[]:{};t[l]=Y1(!0,Object.prototype.hasOwnProperty.call(t,l)&&!r0(t[l])?t[l]:u,a)}else t[l]=a}}return t}function cL(i){return Array.isArray(i)||{}.toString.call(i)=="[object Object]"}function r0(i){return!i||typeof i!="object"&&typeof i!="function"}function dL(i){return i&&i.__esModule?i.default:i}class s0{on(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this}emit(e,...t){this._callbacks=this._callbacks||{};let n=this._callbacks[e];if(n)for(let r of n)r.apply(this,t);return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+e,{args:t})),this}makeEvent(e,t){let n={bubbles:!0,cancelable:!0,detail:t};if(typeof window.CustomEvent=="function")return new CustomEvent(e,n);var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r}off(e,t){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;let n=this._callbacks[e];if(!n)return this;if(arguments.length===1)return delete this._callbacks[e],this;for(let r=0;r<n.length;r++)if(n[r]===t){n.splice(r,1);break}return this}}var X1={};X1=`<div class="dz-preview dz-file-preview"> 66 <div class="dz-image"><img data-dz-thumbnail=""></div> 67 <div class="dz-details"> 68 <div class="dz-size"><span data-dz-size=""></span></div> 69 <div class="dz-filename"><span data-dz-name=""></span></div> 70 </div> 71 <div class="dz-progress"> 72 <span class="dz-upload" data-dz-uploadprogress=""></span> 73 </div> 74 <div class="dz-error-message"><span data-dz-errormessage=""></span></div> 75 <div class="dz-success-mark"> 76 <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg"> 77 <path d="M10.2071 29.7929L14.2929 25.7071C14.6834 25.3166 15.3166 25.3166 15.7071 25.7071L21.2929 31.2929C21.6834 31.6834 22.3166 31.6834 22.7071 31.2929L38.2929 15.7071C38.6834 15.3166 39.3166 15.3166 39.7071 15.7071L43.7929 19.7929C44.1834 20.1834 44.1834 20.8166 43.7929 21.2071L22.7071 42.2929C22.3166 42.6834 21.6834 42.6834 21.2929 42.2929L10.2071 31.2071C9.81658 30.8166 9.81658 30.1834 10.2071 29.7929Z"></path> 78 </svg> 79 </div> 80 <div class="dz-error-mark"> 81 <svg width="54" height="54" viewBox="0 0 54 54" fill="white" xmlns="http://www.w3.org/2000/svg"> 82 <path d="M26.2929 20.2929L19.2071 13.2071C18.8166 12.8166 18.1834 12.8166 17.7929 13.2071L13.2071 17.7929C12.8166 18.1834 12.8166 18.8166 13.2071 19.2071L20.2929 26.2929C20.6834 26.6834 20.6834 27.3166 20.2929 27.7071L13.2071 34.7929C12.8166 35.1834 12.8166 35.8166 13.2071 36.2071L17.7929 40.7929C18.1834 41.1834 18.8166 41.1834 19.2071 40.7929L26.2929 33.7071C26.6834 33.3166 27.3166 33.3166 27.7071 33.7071L34.7929 40.7929C35.1834 41.1834 35.8166 41.1834 36.2071 40.7929L40.7929 36.2071C41.1834 35.8166 41.1834 35.1834 40.7929 34.7929L33.7071 27.7071C33.3166 27.3166 33.3166 26.6834 33.7071 26.2929L40.7929 19.2071C41.1834 18.8166 41.1834 18.1834 40.7929 17.7929L36.2071 13.2071C35.8166 12.8166 35.1834 12.8166 34.7929 13.2071L27.7071 20.2929C27.3166 20.6834 26.6834 20.6834 26.2929 20.2929Z"></path> 83 </svg> 84 </div> 85</div> 86`;let hL={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,
vendor: 5,733 bytes, line 86
86chunkSize:2097152,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,defaultHeaders:!0,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init(){},params(i,e,t){if(t)return{dzuuid:t.file.upload.uuid,dzchunkindex:t.index,dztotalfilesize:t.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:t.file.upload.totalChunkCount,dzchunkbyteoffset:t.index*this.options.chunkSize}},accept(i,e){return e()},chunksUploaded:function(i,e){e()},binaryBody:!1,fallback(){let i;this.element.className=`${this.element.className} dz-browser-not-supported`;for(let t of this.element.getElementsByTagName("div"))if(/(^| )dz-message($| )/.test(t.className)){i=t,t.className="dz-message";break}i||(i=G.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(i));let e=i.getElementsByTagName("span")[0];return e&&(e.textContent!=null?e.textContent=this.options.dictFallbackMessage:e.innerText!=null&&(e.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize(i,e,t,n){let r={srcX:0,srcY:0,srcWidth:i.width,srcHeight:i.height},s=i.width/i.height;e==null&&t==null?(e=r.srcWidth,t=r.srcHeight):e==null?e=t*s:t==null&&(t=e/s),e=Math.min(e,r.srcWidth),t=Math.min(t,r.srcHeight);let o=e/t;if(r.srcWidth>e||r.srcHeight>t)if(n==="crop")s>o?(r.srcHeight=i.height,r.srcWidth=r.srcHeight*o):(r.srcWidth=i.width,r.srcHeight=r.srcWidth/o);else if(n==="contain")s>o?t=e/s:e=t*s;else throw new Error(`Unknown resizeMethod '${n}'`);return r.srcX=(i.width-r.srcWidth)/2,r.srcY=(i.height-r.srcHeight)/2,r.trgWidth=e,r.trgHeight=t,r},transformFile(i,e){return(this.options.resizeWidth||this.options.resizeHeight)&&i.type.match(/image.*/)?this.resizeImage(i,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,e):e(i)},previewTemplate:dL(X1),drop(i){return this.element.classList.remove("dz-drag-hover")},dragstart(i){},dragend(i){return this.element.classList.remove("dz-drag-hover")},dragenter(i){return this.element.classList.add("dz-drag-hover")},dragover(i){return this.element.classList.add("dz-drag-hover")},dragleave(i){return this.element.classList.remove("dz-drag-hover")},paste(i){},reset(){return this.element.classList.remove("dz-started")},addedfile(i){if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){i.previewElement=G.createElement(this.options.previewTemplate.trim()),i.previewTemplate=i.previewElement,this.previewsContainer.appendChild(i.previewElement);for(var e of i.previewElement.querySelectorAll("[data-dz-name]"))e.textContent=i.name;for(e of i.previewElement.querySelectorAll("[data-dz-size]"))e.innerHTML=this.filesize(i.size);this.options.addRemoveLinks&&(i._removeLink=G.createElement(`<a class="dz-remove" href="javascript:undefined;" data-dz-remove>${this.options.dictRemoveFile}</a>`),i.previewElement.appendChild(i._removeLink));let t=n=>(n.preventDefault(),n.stopPropagation(),i.status===G.UPLOADING?G.confirm(this.options.dictCancelUploadConfirmation,()=>this.removeFile(i)):this.options.dictRemoveFileConfirmation?G.confirm(this.options.dictRemoveFileConfirmation,()=>this.removeFile(i)):this.removeFile(i));for(let n of i.previewElement.querySelectorAll("[data-dz-remove]"))n.addEventListener("click",t)}},removedfile(i){return i.previewElement!=null&&i.previewElement.parentNode!=null&&i.previewElement.parentNode.removeChild(i.previewElement),this._updateMaxFilesReachedClass()},thumbnail(i,e){if(i.previewElement){i.previewElement.classList.remove("dz-file-preview");for(let t of i.previewElement.querySelectorAll("[data-dz-thumbnail]"))t.alt=i.name,t.src=e;return setTimeout(()=>i.previewElement.classList.add("dz-image-preview"),1)}},error(i,e){if(i.previewElement){i.previewElement.classList.add("dz-error"),typeof e!="string"&&e.error&&(e=e.error);for(let t of i.previewElement.querySelectorAll("[data-dz-errormessage]"))t.textContent=e}},errormultiple(){},processing(i){if(i.previewElement&&(i.previewElement.classList.add("dz-processing"),i._removeLink))return i._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple(){},uploadprogress(i,e,t){if(i.previewElement)for(let n of i.previewElement.querySelectorAll("[data-dz-uploadprogress]"))n.nodeName==="PROGRESS"?n.value=e:n.style.width=`${e}%`},totaluploadprogress(){},sending(){},sendingmultiple(){},success(i){if(i.previewElement)return i.previewElement.classList.add("dz-success")},successmultiple(){}
86,canceled(i){return this.emit("error",i,this.options.dictUploadCanceled)},canceledmultiple(){},complete(i){if(i._removeLink&&(i._removeLink.innerHTML=this.options.dictRemoveFile),i.previewElement)return i.previewElement.classList.add("dz-complete")},completemultiple(){},maxfilesexceeded(){},maxfilesreached(){},queuecomplete(){},addedfiles(){}};var fL=hL;class G extends s0{static initClass(){this.prototype.Emitter=s0,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}getAcceptedFiles(){return this.files.filter(e=>e.accepted).map(e=>e)}getRejectedFiles(){return this.files.filter(e=>!e.accepted).map(e=>e)}getFilesWithStatus(e){return this.files.filter(t=>t.status===e).map(t=>t)}getQueuedFiles(){return this.getFilesWithStatus(G.QUEUED)}getUploadingFiles(){return this.getFilesWithStatus(G.UPLOADING)}getAddedFiles(){return this.getFilesWithStatus(G.ADDED)}getActiveFiles(){return this.files.filter(e=>e.status===G.UPLOADING||e.status===G.QUEUED).map(e=>e)}init(){if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(G.createElement(`<div class="dz-default dz-message"><button class="dz-button" type="button">${this.options.dictDefaultMessage}</button></div>`)),this.clickableElements.length){let n=()=>{this.hiddenFileInput&&this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=document.createElement("input"),this.hiddenFileInput.setAttribute("type","file"),(this.options.maxFiles===null||this.options.maxFiles>1)&&this.hiddenFileInput.setAttribute("multiple","multiple"),this.hiddenFileInput.className="dz-hidden-input",this.options.acceptedFiles!==null&&this.hiddenFileInput.setAttribute("accept",this.options.acceptedFiles),this.options.capture!==null&&this.hiddenFileInput.setAttribute("capture",this.options.capture),this.hiddenFileInput.setAttribute("tabindex","-1"),this.hiddenFileInput.style.visibility="hidden",this.hiddenFileInput.style.position="absolute",this.hiddenFileInput.style.top="0",this.hiddenFileInput.style.left="0",this.hiddenFileInput.style.height="0",this.hiddenFileInput.style.width="0",G.getElement(this.options.hiddenInputContainer,"hiddenInputContainer").appendChild(this.hiddenFileInput),this.hiddenFileInput.addEventListener("change",()=>{let{files:r}=this.hiddenFileInput;if(r.length)for(let s of r)this.addFile(s);this.emit("addedfiles",r),n()})};n()}this.URL=window.URL!==null?window.URL:window.webkitURL;for(let n of this.events)this.on(n,this.options[n]);this.on("uploadprogress",()=>this.updateTotalUploadProgress()),this.on("removedfile",()=>this.updateTotalUploadProgress()),this.on("canceled",n=>
86this.emit("complete",n)),this.on("complete",n=>{if(this.getAddedFiles().length===0&&this.getUploadingFiles().length===0&&this.getQueuedFiles().length===0)return setTimeout(()=>this.emit("queuecomplete"),0)});const e=function(n){if(n.dataTransfer.types){for(var r=0;r<n.dataTransfer.types.length;r++)if(n.dataTransfer.types[r]==="Files")return!0}return!1};let t=function(n){if(e(n))return n.stopPropagation(),n.preventDefault?n.preventDefault():n.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:n=>this.emit("dragstart",n),dragenter:n=>(t(n),this.emit("dragenter",n)),dragover:n=>{let r;try{r=n.dataTransfer.effectAllowed}catch{}return n.dataTransfer.dropEffect=r==="move"||r==="linkMove"?"move":"copy",t(n),this.emit("dragover",n)},dragleave:n=>this.emit("dragleave",n),drop:n=>(t(n),this.drop(n)),dragend:n=>this.emit("dragend",n)}}],this.clickableElements.forEach(n=>this.listeners.push({element:n,events:{click:r=>((n!==this.element||r.target===this.element||G.elementInside(r.target,this.element.querySelector(".dz-message")))&&this.hiddenFileInput.click(),!0)}})),this.enable(),this.options.init.call(this)}destroy(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,G.instances.splice(G.instances.indexOf(this),1)}updateTotalUploadProgress(){let e,t=0,n=0;if(this.getActiveFiles().length){for(let s of this.getActiveFiles())t+=s.upload.bytesSent,n+=s.upload.total;e=100*t/n}else e=100;return this.emit("totaluploadprogress",e,n,t)}_getParamName(e){return typeof this.options.paramName=="function"?this.options.paramName(e):`${this.options.paramName}${this.options.uploadMultiple?`[${e}]`:""}`}_renameFile(e){return typeof this.options.renameFile!="function"?e.name:this.options.renameFile(e)}getFallbackForm(){let e,t;if(e=this.getExistingFallback())return e;let n='<div class="dz-fallback">';this.options.dictFallbackText&&(n+=`<p>${this.options.dictFallbackText}</p>`),n+=`<input type="file" name="${this._getParamName(0)}" ${this.options.uploadMultiple?'multiple="multiple"':void 0} /><input type="submit" value="Upload!"></div>`;let r=G.createElement(n);return this.element.tagName!=="FORM"?(t=G.createElement(`<form action="${this.options.url}" enctype="multipart/form-data" method="${this.options.method}"></form>`),t.appendChild(r)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),t??r}getExistingFallback(){let e=function(n){for(let r of n)if(/(^| )fallback($| )/.test(r.className))return r};for(let n of["div","form"]){var t;if(t=e(this.element.getElementsByTagName(n)))return t}}setupEventListeners(){return this.listeners.map(e=>(()=>{let t=[];for(let n in e.events){let r=e.events[n];t.push(e.element.addEventListener(n,r,!1))}return t})())}removeEventListeners(){return this.listeners.map(e=>(()=>{let t=[];for(let n in e.events){let r=e.events[n];t.push(e.element.removeEventListener(n,r,!1))}return t})())}disable(){return this.clickableElements.forEach(e=>e.classList.remove("dz-clickable")),this.removeEventListeners(),this.disabled=!0,this.files.map(e=>this.cancelUpload(e))}enable(){return delete this.disabled,this.clickableElements.forEach(e=>e.classList.add("dz-clickable")),this.setupEventListeners()}filesize(e){let t=0,n="b";if(e>0){let r=["tb","gb","mb","kb","b"];for(let s=0;s<r.length;s++){let o=r[s],l=Math.pow(this.options.filesizeBase,4-s)/10;if(e>=l){t=e/Math.pow(this.options.filesizeBase,4-s),n=o;break}}t=Math.round(10*t)/10}return`<strong>${t}</strong> ${this.options.dictFileSizeUnits[n]}`}_updateMaxFilesReachedClass(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}drop(e){if(!e.dataTransfer)return;this.emit("drop",e);let t=[];for(let n=0;n<e.dataTransfer.files.length;n++)t[n]=e.dataTransfer.files[n];if(t.length){let{items:n}=e.dataTransfer;n&&n.length&&n[0].webkitGetAsEntry!=null?this._addFilesFromItems(n):this.handleFiles(t)}
86this.emit("addedfiles",t)}paste(e){if(yL(e!=null?e.clipboardData:void 0,n=>n.items)==null)return;this.emit("paste",e);let{items:t}=e.clipboardData;if(t.length)return this._addFilesFromItems(t)}handleFiles(e){for(let t of e)this.addFile(t)}_addFilesFromItems(e){return(()=>{let t=[];for(let r of e){var n;r.webkitGetAsEntry!=null&&(n=r.webkitGetAsEntry())?n.isFile?t.push(this.addFile(r.getAsFile())):n.isDirectory?t.push(this._addFilesFromDirectory(n,n.name)):t.push(void 0):r.getAsFile!=null&&(r.kind==null||r.kind==="file")?t.push(this.addFile(r.getAsFile())):t.push(void 0)}return t})()}_addFilesFromDirectory(e,t){let n=e.createReader(),r=o=>vL(console,"log",l=>l.log(o));var s=()=>n.readEntries(o=>{if(o.length>0){for(let l of o)l.isFile?l.file(a=>{if(!(this.options.ignoreHiddenFiles&&a.name.substring(0,1)==="."))return a.fullPath=`${t}/${a.name}`,this.addFile(a)}):l.isDirectory&&this._addFilesFromDirectory(l,`${t}/${l.name}`);s()}return null},r);return s()}accept(e,t){this.options.maxFilesize&&e.size>this.options.maxFilesize*1048576?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):G.isValidFile(e,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)}addFile(e){e.upload={uuid:G.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e)},this.files.push(e),e.status=G.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,t=>{t?(e.accepted=!1,this._errorProcessing([e],t)):(e.accepted=!0,this.options.autoQueue&&this.enqueueFile(e)),this._updateMaxFilesReachedClass()})}enqueueFiles(e){for(let t of e)this.enqueueFile(t);return null}enqueueFile(e){if(e.status===G.ADDED&&e.accepted===!0){if(e.status=G.QUEUED,this.options.autoProcessQueue)return setTimeout(()=>this.processQueue(),0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}_enqueueThumbnail(e){if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=this.options.maxThumbnailFilesize*1048576)return this._thumbnailQueue.push(e),setTimeout(()=>this._processThumbnailQueue(),0)}_processThumbnailQueue(){if(this._processingThumbnail||this._thumbnailQueue.length===0)return;this._processingThumbnail=!0;let e=this._thumbnailQueue.shift();return this.createThumbnail(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,t=>(this.emit("thumbnail",e,t),this._processingThumbnail=!1,this._processThumbnailQueue()))}removeFile(e){if(e.status===G.UPLOADING&&this.cancelUpload(e),this.files=pL(this.files,e),this.emit("removedfile",e),this.files.length===0)return this.emit("reset")}removeAllFiles(e){e==null&&(e=!1);for(let t of this.files.slice())(t.status!==G.UPLOADING||e)&&this.removeFile(t);return null}resizeImage(e,t,n,r,s){return this.createThumbnail(e,t,n,r,!0,(o,l)=>{if(l==null)return s(e);{let{resizeMimeType:a}=this.options;a==null&&(a=e.type);let u=l.toDataURL(a,this.options.resizeQuality);return(a==="image/jpeg"||a==="image/jpg")&&(u=J1.restore(e.dataURL,u)),s(G.dataURItoBlob(u))}})}createThumbnail(e,t,n,r,s,o){let l=new FileReader;l.onload=()=>{if(e.dataURL=l.result,e.type==="image/svg+xml"){o!=null&&o(l.result);return}this.createThumbnailFromUrl(e,t,n,r,s,o)},l.readAsDataURL(e)}displayExistingFile(e,t,n,r,s=!0){if(this.emit("addedfile",e),this.emit("complete",e),!s)this.emit("thumbnail",e,t),n&&n();else{let o=l=>{this.emit("thumbnail",e,l),n&&n()};e.dataURL=t,this.createThumbnailFromUrl(e,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,o,r)}}createThumbnailFromUrl(e,t,n,r,s,o,l){let a=document.createElement("img");return l&&(a.crossOrigin=l),s=getComputedStyle(document.body).imageOrientation=="from-image"?!1:s,a.onload=()=>{let u=c=>c(1);return typeof EXIF<"u"&&EXIF!==null&&s&&(u=c=>EXIF.getData(a,function(){return c(EXIF.getTag(this,"Orientation"))})),u(c=>{e.width=a.width,e.height=a.height;let h=this.options.resize.call(this,e,t,n,r),d=document.createElement("canvas"),f=d.getContext("2d");switch(d.width=h.trgWidth,d.height=h.trgHeight,c>4&&(d.width=h.trgHeight,d.height=h.trgWidth),c){case 2:f.translate(d.width,0),f.scale(-1,1);break;case 3:f.translate(d.width,d.height),f.rotate(Math.PI);break;case 4:f.translate(0,d.height),f.scale(1,-1);break;case 5:f.rotate(.5*Math.PI),f.scale(1,-1);break;case 6:f.rotate(.5*Math.PI),f.translate(0,-d.width);break;case 7:f.rotate(.5*Math.PI),f.translate(d.height,-d.width),f.scale(-1,1);break;case 8:f.rotate(-.5*Math.PI),f.translate(-d.height,0);break}bL(f,a,h.srcX!=null?h.srcX:0,h.srcY!=null?h.srcY:0,h.srcWidth,h.srcHeight,h.trgX!=null?h.trgX:0,h.trgY!=null?h.trgY:0,h.trgWidth,h.trgHeight);let p=d.toDataURL("image/png");if(o!=null)return o(p,d)})},o!=null&&(a.onerror=o),a.src=e.dataURL}processQueue(){let{parallelUploads:e}=this.options,t=this.getUploadingFiles().length,n=t;if(t>=e)return;let r=this.getQueuedFiles();if(r.length>0){if(this.options.uploadMultiple)return this.processFiles(r.slice(0,e-t));for(;n<e;){if(!r.length)return;this.processFile(r.shift()),n++}}}processFile(e){return this.processFiles([e])}processFiles(e){for(let t of e)t.processing=!0,t.status=G.UPLOADING,this.emit
vendor: 6,628 bytes, line 86
86("processing",t);return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}_getFilesWithXhr(e){return this.files.filter(t=>t.xhr===e).map(t=>t)}cancelUpload(e){if(e.status===G.UPLOADING){let t=this._getFilesWithXhr(e.xhr);for(let n of t)n.status=G.CANCELED;typeof e.xhr<"u"&&e.xhr.abort();for(let n of t)this.emit("canceled",n);this.options.uploadMultiple&&this.emit("canceledmultiple",t)}else(e.status===G.ADDED||e.status===G.QUEUED)&&(e.status=G.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}resolveOption(e,...t){return typeof e=="function"?e.apply(this,t):e}uploadFile(e){return this.uploadFiles([e])}uploadFiles(e){this._transformFiles(e,t=>{if(this.options.chunking){let n=t[0];e[0].upload.chunked=this.options.chunking&&(this.options.forceChunking||n.size>this.options.chunkSize),e[0].upload.totalChunkCount=Math.ceil(n.size/this.options.chunkSize)}if(e[0].upload.chunked){let n=e[0],r=t[0];n.upload.chunks=[];let s=()=>{let o=0;for(;n.upload.chunks[o]!==void 0;)o++;if(o>=n.upload.totalChunkCount)return;let l=o*this.options.chunkSize,a=Math.min(l+this.options.chunkSize,r.size),u={name:this._getParamName(0),data:r.webkitSlice?r.webkitSlice(l,a):r.slice(l,a),filename:n.upload.filename,chunkIndex:o};n.upload.chunks[o]={file:n,index:o,dataBlock:u,status:G.UPLOADING,progress:0,retries:0},this._uploadData(e,[u])};if(n.upload.finishedChunkUpload=(o,l)=>{let a=!0;o.status=G.SUCCESS,o.dataBlock=null,o.response=o.xhr.responseText,o.responseHeaders=o.xhr.getAllResponseHeaders(),o.xhr=null;for(let u=0;u<n.upload.totalChunkCount;u++){if(n.upload.chunks[u]===void 0)return s();n.upload.chunks[u].status!==G.SUCCESS&&(a=!1)}a&&this.options.chunksUploaded(n,()=>{this._finished(e,l,null)})},this.options.parallelChunkUploads)for(let o=0;o<n.upload.totalChunkCount;o++)s();else s()}else{let n=[];for(let r=0;r<e.length;r++)n[r]={name:this._getParamName(r),data:t[r],filename:e[r].upload.filename};this._uploadData(e,n)}})}_getChunk(e,t){for(let n=0;n<e.upload.totalChunkCount;n++)if(e.upload.chunks[n]!==void 0&&e.upload.chunks[n].xhr===t)return e.upload.chunks[n]}_uploadData(e,t){let n=new XMLHttpRequest;for(let u of e)u.xhr=n;e[0].upload.chunked&&(e[0].upload.chunks[t[0].chunkIndex].xhr=n);let r=this.resolveOption(this.options.method,e,t),s=this.resolveOption(this.options.url,e,t);n.open(r,s,!0),this.resolveOption(this.options.timeout,e)&&(n.timeout=this.resolveOption(this.options.timeout,e)),n.withCredentials=!!this.options.withCredentials,n.onload=u=>{this._finishedUploading(e,n,u)},n.ontimeout=()=>{this._handleUploadError(e,n,`Request timedout after ${this.options.timeout/1e3} seconds`)},n.onerror=()=>{this._handleUploadError(e,n)};let l=n.upload!=null?n.upload:n;l.onprogress=u=>this._updateFilesUploadProgress(e,n,u);let a=this.options.defaultHeaders?{Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"}:{};this.options.binaryBody&&(a["Content-Type"]=e[0].type),this.options.headers&&i0(a,this.options.headers);for(let u in a){let c=a[u];c&&n.setRequestHeader(u,c)}if(this.options.binaryBody){for(let u of e)this.emit("sending",u,n);this.options.uploadMultiple&&this.emit("sendingmultiple",e,n),this.submitRequest(n,null,e)}else{let u=new FormData;if(this.options.params){let c=this.options.params;typeof c=="function"&&(c=c.call(this,e,n,e[0].upload.chunked?this._getChunk(e[0],n):null));for(let h in c){let d=c[h];if(Array.isArray(d))for(let f=0;f<d.length;f++)u.append(h,d[f]);else u.append(h,d)}}for(let c of e)this.emit("sending",c,n,u);this.options.uploadMultiple&&this.emit("sendingmultiple",e,n,u),this._addFormElementData(u);for(let c=0;c<t.length;c++){let h=t[c];u.append(h.name,h.data,h.filename)}this.submitRequest(n,u,e)}}_transformFiles(e,t){let n=[],r=0;for(let s=0;s<e.length;s++)this.options.transformFile.call(this,e[s],o=>{n[s]=o,++r===e.length&&t(n)})}_addFormElementData(e){if(this.element.tagName==="FORM")for(let t of this.element.querySelectorAll("input, textarea, select, button")){let n=t.getAttribute("name"),r=t.getAttribute("type");if(r&&(r=r.toLowerCase()),!(typeof n>"u"||n===null))if(t.tagName==="SELECT"&&t.hasAttribute("multiple"))for(let s of t.options)s.selected&&e.append(n,s.value);else(!r||r!=="checkbox"&&r!=="radio"||t.checked)&&e.append(n,t.value)}}_updateFilesUploadProgress(e,t,n){if(e[0].upload.chunked){let r=e[0],s=this._getChunk(r,t);n?(s.progress=100*n.loaded/n.total,s.total=n.total,s.bytesSent=n.loaded):(s.progress=100,s.bytesSent=s.total),r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(let o=0;o<r.upload.totalChunkCount;o++)r.upload.chunks[o]&&typeof r.upload.chunks[o].progress<"u"&&(r.upload.progress+=r.upload.chunks[o].progress,r.upload.total+=r.upload.chunks[o].total,r.upload.bytesSent+=r.upload.chunks[o].bytesSent);r.upload.progress=r.upload.progress/r.upload.totalChunkCount,this.emit("uploadprogress",r,r.upload.progress,r.upload.bytesSent)}else for(let r of e)r.upload.total&&r.upload.bytesSent&&r.upload.bytesSent==r.upload.total||(n?(r.upload.progress=100*n.loaded/n.total,r.upload.total=n.total,r.upload.bytesSent=n.loaded):(r.upload.progress=100,r.upload.bytesSent=r.upload.total),this.emit("uploadprogress",r,r.upload.progress,r.upload.bytesSent))}_finishedUploading(e,t,n){let r;if(e[0].status!==G.CANCELED&&t.readyState===4){if(t.responseType!=="arraybuffer"&&t.responseType!=="blob"&&(r=t.responseText,t.getResponseHeader("content-type")&&~t.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(s){n=s,r="Invalid JSON response from server."}this._updateFilesUploadProgress(e,t),200<=t.status&&t.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],t),r):this._finished(e,r,n):this._handleUploadError(e,t,r)}}_handleUploadError(e,t,n){if(e[0].status!==G.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){let r=this._getChunk(e[0],t);if(r.retries++<this.options.retryChunksLimit){this._uploadData(e,[r.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(e,n||this.options.dictResponseError.replace("{{statusCode}}",t.status),t)}}submitRequest(e,t,n){if(e.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}if(this.options.binaryBody)if(n[0].upload.chunked){const r=this._getChunk(n[0],e);e.send(r.dataBlock.data)}else e.send(n[0]);else e.send(t)}_finished(e,t,n){for(let r of e)r.status=G.SUCCESS,this.emit("success",r,t,n),this.emit("complete",r);
86if(this.options.uploadMultiple&&(this.emit("successmultiple",e,t,n),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}_errorProcessing(e,t,n){for(let r of e)r.status=G.ERROR,this.emit("error",r,t,n),this.emit("complete",r);if(this.options.uploadMultiple&&(this.emit("errormultiple",e,t,n),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}static uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}constructor(e,t){super();let n,r;if(this.element=e,this.clickableElements=[],this.listeners=[],this.files=[],typeof this.element=="string"&&(this.element=document.querySelector(this.element)),!this.element||this.element.nodeType==null)throw new Error("Invalid dropzone element.");if(this.element.dropzone)throw new Error("Dropzone already attached.");G.instances.push(this),this.element.dropzone=this;let s=(r=G.optionsForElement(this.element))!=null?r:{};if(this.options=i0(!0,{},fL,s,t??{}),this.options.previewTemplate=this.options.previewTemplate.replace(/\n*/g,""),this.options.forceFallback||!G.isBrowserSupported())return this.options.fallback.call(this);if(this.options.url==null&&(this.options.url=this.element.getAttribute("action")),!this.options.url)throw new Error("No URL provided.");if(this.options.acceptedFiles&&this.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(this.options.uploadMultiple&&this.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");if(this.options.binaryBody&&this.options.uploadMultiple)throw new Error("You cannot set both: binaryBody and uploadMultiple.");this.options.acceptedMimeTypes&&(this.options.acceptedFiles=this.options.acceptedMimeTypes,delete this.options.acceptedMimeTypes),this.options.renameFilename!=null&&(this.options.renameFile=o=>this.options.renameFilename.call(this,o.name,o)),typeof this.options.method=="string"&&(this.options.method=this.options.method.toUpperCase()),(n=this.getExistingFallback())&&n.parentNode&&n.parentNode.removeChild(n),this.options.previewsContainer!==!1&&(this.options.previewsContainer?this.previewsContainer=G.getElement(this.options.previewsContainer,"previewsContainer"):this.previewsContainer=this.element),this.options.clickable&&(this.options.clickable===!0?this.clickableElements=[this.element]:this.clickableElements=G.getElements(this.options.clickable,"clickable")),this.init()}}G.initClass();G.options={};G.optionsForElement=function(i){if(i.getAttribute("id"))return G.options[mL(i.getAttribute("id"))]};G.instances=[];G.forElement=function(i){if(typeof i=="string"&&(i=document.querySelector(i)),(i!=null?i.dropzone:void 0)==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return i.dropzone};G.discover=function(){let i;if(document.querySelectorAll)i=document.querySelectorAll(".dropzone");else{i=[];let e=t=>(()=>{let n=[];for(let r of t)/(^| )dropzone($| )/.test(r.className)?n.push(i.push(r)):n.push(void 0);return n})();e(document.getElementsByTagName("div")),e(document.getElementsByTagName("form"))}return(()=>{let e=[];for(let t of i)G.optionsForElement(t)!==!1?e.push(new G(t)):e.push(void 0);return e})()};G.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i];G.isBrowserSupported=function(){let i=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))i=!1;else{G.blacklistedBrowsers!==void 0&&(G.blockedBrowsers=G.blacklistedBrowsers);for(let e of G.blockedBrowsers)if(e.test(navigator.userAgent)){i=!1;continue}}else i=!1;return i};G.dataURItoBlob=function(i){let e=atob(i.split(",")[1]),t=i.split(",")[0].split(":")[1].split(";
86")[0],n=new ArrayBuffer(e.length),r=new Uint8Array(n);for(let s=0,o=e.length,l=0<=o;l?s<=o:s>=o;l?s++:s--)r[s]=e.charCodeAt(s);return new Blob([n],{type:t})};const pL=(i,e)=>i.filter(t=>t!==e).map(t=>t),mL=i=>i.replace(/[\-_](\w)/g,e=>e.charAt(1).toUpperCase());G.createElement=function(i){let e=document.createElement("div");return e.innerHTML=i,e.childNodes[0]};G.elementInside=function(i,e){if(i===e)return!0;for(;i=i.parentNode;)if(i===e)return!0;return!1};G.getElement=function(i,e){let t;if(typeof i=="string"?t=document.querySelector(i):i.nodeType!=null&&(t=i),t==null)throw new Error(`Invalid \`${e}\` option provided. Please provide a CSS selector or a plain HTML element.`);return t};G.getElements=function(i,e){let t,n;if(i instanceof Array){n=[];try{for(t of i)n.push(this.getElement(t,e))}catch{n=null}}else if(typeof i=="string"){n=[];for(t of document.querySelectorAll(i))n.push(t)}else i.nodeType!=null&&(n=[i]);if(n==null||!n.length)throw new Error(`Invalid \`${e}\` option provided. Please provide a CSS selector, a plain HTML element or a list of those.`);return n};G.confirm=function(i,e,t){if(window.confirm(i))return e();if(t!=null)return t()};G.isValidFile=function(i,e){if(!e)return!0;e=e.split(",");let t=i.type,n=t.replace(/\/.*$/,"");for(let r of e)if(r=r.trim(),r.charAt(0)==="."){if(i.name.toLowerCase().indexOf(r.toLowerCase(),i.name.length-r.length)!==-1)return!0}else if(/\/\*$/.test(r)){if(n===r.replace(/\/.*$/,""))return!0}else if(t===r)return!0;return!1};typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(i){return this.each(function(){return new G(this,i)})});G.ADDED="added";G.QUEUED="queued";G.ACCEPTED=G.QUEUED;G.UPLOADING="uploading";G.PROCESSING=G.UPLOADING;G.CANCELED="canceled";G.ERROR="error";G.SUCCESS="success";let gL=function(i){i.naturalWidth;let e=i.naturalHeight,t=document.createElement("canvas");t.width=1,t.height=e;let n=t.getContext("2d");n.drawImage(i,0,0);let{data:r}=n.getImageData(1,0,1,e),s=0,o=e,l=e;for(;l>s;)r[(l-1)*4+3]===0?o=l:s=l,l=o+s>>1;let a=l/e;return a===0?1:a};var bL=function(i,e,t,n,r,s,o,l,a,u){let c=gL(e);return i.drawImage(e,t,n,r,s,o,l,a,u/c)};class J1{static initClass(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}static encode64(e){let t="",n,r,s="",o,l,a,u="",c=0;for(;n=e[c++],r=e[c++],s=e[c++],o=n>>2,l=(n&3)<<4|r>>4,a=(r&15)<<2|s>>6,u=s&63,isNaN(r)?a=u=64:isNaN(s)&&(u=64),t=t+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(l)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(u),n=r=s="",o=l=a=u="",c<e.length;);return t}static restore(e,t){if(!e.match("data:image/jpeg;base64,"))return t;let n=this.decode64(e.replace("data:image/jpeg;base64,","")),r=this.slice2Segments(n),s=this.exifManipulation(t,r);return`data:image/jpeg;base64,${this.encode64(s)}`}static exifManipulation(e,t){let n=this.getExifArray(t),r=this.insertExif(e,n);return new Uint8Array(r)}static getExifArray(e){let t,n=0;for(;n<e.length;){if(t=e[n],t[0]===255&t[1]===225)return t;n++}return[]}static insertExif(e,t){let n=e.replace("data:image/jpeg;base64,",""),r=this.decode64(n),s=r.indexOf(255,3),o=r.slice(0,s),l=r.slice(s),a=o;return a=a.concat(t),a=a.concat(l),a}static slice2Segments(e){let t=0,n=[];for(;;){var r;if(e[t]===255&e[t+1]===218)break;if(e[t]===255&e[t+1]===216)t+=2;else{r=e[t+2]*256+e[t+3];let s=t+r+2,o=e.slice(t,s);n.push(o),t=s}if(t>e.length)break}return n}static decode64(e){let t,n,r="",s,o,l,a="",u=0,c=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e)&&console.warn(`There were invalid base64 characters in the input text. 87Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '=' 88Expect errors in decoding.`),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");s=this.KEY_STR.indexOf(e.charAt(u++)),o=this.KEY_STR.indexOf(e.charAt(u++)),l=this.KEY_STR.indexOf(e.charAt(u++)),a=this.KEY_STR.indexOf(e.charAt(u++)),t=s<<2|o>>4,n=(o&15)<<4|l>>2,r=(l&3)<<6|a,c.push(t),l!==64&&c.push(n),a!==64&&c.push(r),t=n=r="",s=o=l=a="",u<e.length;);return c}}J1.initClass();function yL(i,e){return typeof i<"u"&&i!==null?e(i):void 0}function vL(i,e,t){if(typeof i<"u"&&i!==null&&typeof i[e]=="function")return t(i,e)}const wL=500;class Q1 extends Ii{clearFilter(e){Array.from(document.querySelectorAll("[data-close-filter]")).forEac
88h(t=>t.click()),e.target.closest("form").requestSubmit()}resetTable(){this.tableBodyTarget.innerHTML="",this.totalRows=0,this.inputTarget.value="",this.urlTarget.value="",this.previewTarget.classList.add("hidden")}connect(){this.initUploadModal(),this.initListModal()}dropzoneTargetConnected(){this.initializeDropzone()}flashTargetConnected(){this.uploadModal.hide(),this.hasSearchFormTarget&&this.searchFormTarget.requestSubmit()}initializeDropzone(){try{const e=this;this.dropzone=new G(this.dropzoneTarget,{url:"/",autoProcessQueue:!1,acceptedFiles:".csv",maxFiles:1,previewTemplate:document.getElementById("file-preview-template").innerHTML,clickable:!0,dictDefaultMessage:"",init:function(){const t=e.dropzoneTarget.querySelector(".dz-message");t&&(t.querySelector("button").textContent="Drag & drop a CSV file here or click to upload"),this.on("addedfile",n=>e.handleFileAdded(n)),this.on("removedfile",()=>{e.resetTable()})}})}catch(e){console.error("Error in initializeDropzone:",e)}}simulateProcessing(e){return new Promise(t=>setTimeout(t,e))}async handleFileAdded(e){if(e.type!=="text/csv"&&!e.name.endsWith(".csv")){alert("Only CSV files are allowed."),this.dropzone.removeFile(e);return}const t=e.previewElement.querySelector("[data-dz-uploadprogress]"),n=e.previewElement.querySelector("[data-dz-uploadprogresspercent]");t.style.width="0%",n.textContent="0%";const r=new FileReader;r.onload=async s=>{const o=s.target.result,l=o.trim().split(` 89`).slice(1).map(c=>c.split(",")),a=l.length;this.inputTarget.value=o.trim().split(` 90`).slice(1).join(` 91`);const u=l.length;for(let c=1;c<=u;c++){await this.simulateProcessing(10);const h=c/u*100;t.style.width=`${h}%`,n.textContent=`${h.toFixed(2)}%`}if(a>wL)this.dropzone.removeFile(e);else{const c=l.map(h=>this.parseRow(h));this.renderTable(c)}},r.readAsText(e)}resetTable(){this.tableBodyTarget.innerHTML="",this.totalRows=0,this.inputTarget.value="",this.previewTarget.classList.add("hidden")}parseRow(e){try{const[t="",n="",r="",s=""]=e.map(o=>o.trim());return{Email:t,FirstName:n,LastName:r,Company:s}}catch(t){console.error("Error in parseRow:",t)}}renderTable(e){try{this.totalRows=e.length,e.length>0?this.previewTarget.classList.remove("hidden"):this.previewTarget.classList.add("hidden"),this.tableBodyTarget.innerHTML="",e.forEach(({Email:t,FirstName:n,LastName:r,Company:s})=>{const o=document.createElement("tr");o.innerHTML=` 92 <td class="p-2 border-b text-gray-600">${t}</td> 93 <td class="p-2 border-b text-gray-600">${n}</td> 94 <td class="p-2 border-b text-gray-600">${r}</td> 95 <td class="p-2 border-b text-gray-600">${s}</td> 96 `,this.tableBodyTarget.appendChild(o)})}catch(t){console.error("Error in renderTable:",t)}}initListModal(){try{const e=this,t=document.getElementById("addListModal"),n={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"add-list-modal-backdrop bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{document.querySelectorAll(".add-list-modal-backdrop").forEach(r=>{r.remove()}),this.modalTarget&&(this.modalTarget.classList.add("z-50"),this.modalTarget.classList.remove("z-30"))},onShow:()=>{this.modalTarget&&(this.modalTarget.classList.remove("z-50"),this.modalTarget.classList.add("z-30"))}};this.listModal=new Modal(t,n,{id:"addListModal",override:!0})}catch(e){console.error("Error in initModal:",e)}}openList(){try{this.listModal.show()}catch(e){console.error("Error in select:",e)}}closeList(e){try{this.listModal.hide()}catch(t){console.error("Error in select:",t)}}initUploadModal(){const e="upload-modal",t=document.getElementById(e),n={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},r={id:e,override:!0};this.uploadModal=new Modal(t,n,r)}openUploadModal(){this.uploadModal.show()}closeUploadModal(){this.uploadModal.hide()}uploadEnd(e){}toggle(e){super.toggle(e),this.updateInputHidden(),this.updateStateButtonAction()}refresh(){super.refresh(),this.updateInputHidden(),this.updateStateButtonAction()}updateStateButtonAction(){this.hasButtonActionTarget&&this.buttonActionTargets.forEac
96h(e=>{e.disabled=this.checked.length==0,e.value=="remove_campaign_emails"&&(e.dataset.turboConfirm=`Are you sure you want to delete ${this.checked.length} recipient ${this.checked.length===1?"address":"addresses"}?`)})}updateInputHidden(){const e=document.getElementById("selectedForm");e&&(this.checked.length>0?this.checked.forEach(t=>this.handleCheckboxChange(t)):e.querySelectorAll(".selected_ids").forEach(t=>t.remove()))}verifyHandle(e){this.checked.length>0?this.checked.forEach(t=>this.addLoadingIcon(t)):this.checkboxTargets.forEach(t=>this.addLoadingIcon(t))}addLoadingIcon(e){const t=document.getElementById(`campaign_email_status_${e.value}`);t&&(t.innerHTML=`<svg aria-hidden="true" role="status" class="inline w-4 h-4 animate-spin text-gray-200 dark:text-gray-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"> 97 <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/> 98 <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="#1C64F2"/> 99 </svg>`)}handleCheckboxChange(e){const t=document.getElementById("selectedForm");if(e.checked){const n=document.createElement("input");n.type="hidden",n.name=e.name,n.value=e.value,n.id=e.value+"_hidden",n.classList.add("selected_ids"),t.appendChild(n)}else{const n=document.getElementById(e.value+"_hidden");n&&t.removeChild(n)}}endAction(){this.searchFormTarget&&this.searchFormTarget.requestSubmit()}}$(Q1,"targets",["modal","input","dropzone","tableHeader","tableBody","preview","flash","searchForm","buttonAction"]);const xL=Object.freeze(Object.defineProperty({__proto__:null,default:Q1},Symbol.toStringTag,{value:"Module"}));class Z1 extends Ii{connect(){console.log("Connected Campaign Dashboard"),super.connect(),this.toggleCheckedHidenInput=this.toggleCheckedHidenInput.bind(this)}showLoading(e){this.loadingOverlayTarget.classList.remove("hidden")}hideLoading(){this.loadingOverlayTarget.classList.add("hidden")}toggle(e){super.toggle(e),e.target==this.checkboxAllTarget&&(this.checked.forEach(t=>this.toggleCheckedHidenInput(t)),this.unchecked.forEach(t=>this.toggleCheckedHidenInput(t)),this.toggleCheckedHidenInput(e.target))}refresh(e){super.refresh(),e&&this.toggleCheckedHidenInput(e.currentTarget)}toggleButton(e){e&&(this.checked.length>0?(e.classList.remove("opacity-65","cursor-not-allowed"),e.disabled=!1):(e.classList.add("opacity-65","cursor-not-allowed"),e.disabled=!0))}toggleCheckedHidenInput(e){const t=document.querySelector(e.dataset.formTarget),n=document.querySelector(e.dataset.toggleTarget);if(t){const r=e.value,s=t.querySelector('[type="submit"]');if(this.toggleButton(s),e.checked){if(r){const o=document.createElement("input");o.setAttribute("type","hidden"),o.setAttribute("name",e.name),o.setAttribute("value",r),o.setAttribute("data-selected-id",r),t.appendChild(o)}}else{const o=t.querySelectorAll(`input[type="hidden"][data-selected-id="${r}"]`);o&&o.forEach(l=>l.remove())}}if(n){const r=this;setTimeout(function(){r.checked.length>0?n.classList.remove("hidden"):n.classList.add("hidden")},100)}}}$(Z1,"targets",["checkbox","checkboxAll","deleteButton","drawer","form","modal","loadingOverlay"]);const EL=Object.freeze(Object.defineProperty({__proto__:null,default:Z1},Symbol.toStringTag,{value:"Module"}));class ew extends Ii{connect(){this.initModal(),document.addEventListener("turbo:submit-end",e=>{const t=e.detail.formSubmission.submitter;t?t.value=="save_to_campagin":console.log("Form submitted without a button (e.g., via Enter key).")})}resultTargetConnected(e){e.dataset.redirectUrl&&(Turbo.visit(e.dataset.redirectUrl),e.remove())}drawerTargetConnected(e){this.initDrawer(e)}formTargetConnected(e){e.addEventListener("submit",this.submitAction.bind(this))}formTargetDisconnected(e){e.removeEventListener("submit",this.submitAction.bind(this))}historyTargetConnected(e){e.addEventListener("click",this.fetchHistoryData.bind(this))}historyTargetDisconnected(e){e.removeEventListener("click",this.fetchHistoryData.bind(this))}fetchHistoryData(e){const t=e.currentTarget||e.target,n=t.dataset;n.url&&turboFetch(n.url,function(){t.classList.add("active"),t.disabled=!0})}submitAction(e){const t=e.detail;if(console.log(t,e.target,e.currentTarget),this.checked.length==0)return e.preventDefault(),this.showNotice("Ap
99ply a filter or select at least one recipient you'd like to add to a campaign."),!1}initDrawer(e){const t={placement:"right",backdrop:!0,bodyScrolling:!1,edge:!1,edgeOffset:"",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30",onHide:()=>{},onShow:()=>{},onToggle:()=>{}},n={id:e.id,override:!0};this.drawer=new fp(e,t,n)}openDrawer(e){const t=e.currentTarget.dataset.openUrl;t&&turboFetch(t),this.drawer.show()}closeDrawer(){this.drawer.hide()}initModal(){const e="engagement-modal",t=document.getElementById(e),n={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},r={id:e,override:!0};this.modal=new Modal(t,n,r)}openModal(e){const t=e.currentTarget||e.target;if(this.checked.length===0){this.showNotice("Apply a filter or select at least one recipient you'd like to add to a campaign.");return}const n={save_to_campaign:[".save_to_campaign",".create_new_campaign"],create_new_campaign:[".create_new_campaign",".save_to_campaign"]};n[t.value]&&(this.toggleVisibility(...n[t.value]),this.modal.show())}showNotice(e){const t=this.noticeTemplate(e),n=document.createElement("div");n.innerHTML=t;const r=n.firstChild;document.body.appendChild(r)}toggleVisibility(e,t){this.removeClasses(e,"hidden"),this.addClasses(t,"hidden")}addClasses(e,t){document.querySelectorAll(e).forEach(n=>n.classList.add(t))}removeClasses(e,t){document.querySelectorAll(e).forEach(n=>n.classList.remove(t))}closeModal(){this.modal.hide()}noticeTemplate(e){return`<div 100 data-controller="notification" 101 data-notification-delay-value="5000" 102 data-transition-enter-from="opacity-0 translate-x-6" 103 data-transition-enter-to="opacity-100 translate-x-0" 104 data-transition-leave-from="opacity-100 translate-x-0" 105 data-transition-leave-to="opacity-0 translate-x-6" 106 class="fixed mx-auto w-1/2 bottom-5 left-5 right-5 transition transform duration-1000 flex items-center p-4 text-blue-800 rounded-lg bg-blue-50 dark:bg-gray-800 dark:text-blue-400" 107 > 108 <div class="text-base font-normal">${e}</div> 109 <button data-action="notification#hide" type="button" class="ms-auto -mx-1.5 -my-1.5 bg-blue-50 text-blue-500 rounded-lg focus:ring-2 focus:ring-blue-400 p-1.5 hover:bg-blue-200 inline-flex items-center justify-center h-8 w-8 dark:bg-gray-800 dark:text-blue-400 dark:hover:bg-gray-700" data-dismiss-target="#alert-1" aria-label="Close"> 110 <span class="sr-only">Close</span> 111 <svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"> 112 <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"></path> 113 </svg> 114 </button> 115 </div>`}}$(ew,"targets",["drawer","form","modal","result","history"]);const TL=Object.freeze(Object.defineProperty({__proto__:null,default:ew},Symbol.toStringTag,{value:"Module"}));class tw extends U{followTargetConnected(e){e.addEventListener("click",this.followClickHandle.bind(this))}followTargetDisconnected(e){e.removeEventListener("click",this.followClickHandle.bind(this))}followClickHandle(e){const t=e.target.dataset.url;t&&turboFetch(t,function(){console.log("Load",e)})}}$(tw,"targets",["toggle","follow"]);const SL=Object.freeze(Object.defineProperty({__proto__:null,default:tw},Symbol.toStringTag,{value:"Module"}));class nw extends U{toggleTargetConnected(e){e.addEventListener("change",this.toggleChange.bind(this)),this.toggleChange({target:e})}toggleTargetDisconnected(e){e.removeEventListener("change",this.toggleChange.bind(this))}async connect(){const e={};this.timezoneConnection=e;const t=document.getElementById("timezones"),n=t==null?void 0:t.value;try{const{default:r}=await Lt(async()=>{const{default:s}=await import("./index-Dm0VWLor.js").then(o=>o.i);return{default:s}},__vite__mapDeps([0,1,2]));if(this.timezoneConnection!==e||!this.element.isConnected)return;t!=null&&t.isConnected&&t.value===n&&(t.value=r.tz.guess())}catch(r){console.warn("Unable to initialize campaign timezone",r)}}disconnect(){this.timezoneConnection=null}toggleChange(e){const t=e.target.dataset.groupName||e.target.value;e.target.checked?this.element.classList.add(t):this.element.classList.remove(t)}timeChange(e){const t=e.target.dataset.groupName;
115t=="starttime"&&this.starttimeTargets.forEach(n=>n.value=e.target.value),t=="endtime"&&this.endtimeTargets.forEach(n=>n.value=e.target.value)}}$(nw,"targets",["toggle","starttime","endtime"]);const CL=Object.freeze(Object.defineProperty({__proto__:null,default:nw},Symbol.toStringTag,{value:"Module"}));class iw extends U{connect(){this.hasAccordionTarget&&this.initAccordion(),this.hasAccountModalTarget&&this.initAccountModal()}initAccordion(){const e=[{id:"accordion-schedule-heading",triggerEl:document.querySelector("#accordion-schedule-heading"),targetEl:document.querySelector("#accordion-schedule-body"),active:!1},{id:"accordion-account-heading",triggerEl:document.querySelector("#accordion-account-heading"),targetEl:document.querySelector("#accordion-account-body"),active:!1},{id:"accordion-unsubscribe-heading",triggerEl:document.querySelector("#accordion-unsubscribe-heading"),targetEl:document.querySelector("#accordion-unsubscribe-body"),active:!1}],t={alwaysOpen:!1,activeClasses:"group active bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white",inactiveClasses:"text-gray-500 dark:text-gray-400",onOpen:r=>{const s=this.element.querySelector(".active");history.pushState(null,null,`#${s.dataset.id}`)},onClose:r=>{},onToggle:r=>{}},n={id:"accordion-collapse",override:!0};this.accordion=new Accordion(this.accordionTarget,e,t,n),this.activateAccordionFromHash()}activateAccordionFromHash(){let e=window.location.hash.replace("#","");e?this.accordion.open(`accordion-${e}-heading`):this.accordion.open("accordion-schedule-heading")}initAccountModal(){const e={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},t={id:"account-modal",override:!0};this.accountModal=new Modal(this.accountModalTarget,e,t)}openAccountModal(e){const t=e.target.dataset.metadata;t&&(this.accountModalTarget.querySelector("#daily_emails_limit").value=t.daily_emails_limit,this.accountModalTarget.querySelector("#sender_name").value=t.sender_name,this.accountModalTarget.querySelector("#send_emails_from").value=t.send_emails_from),this.accountModal.show()}closeAccountModal(){this.accountModal.hide()}}$(iw,"targets",["accordion","accountModal"]);const kL=Object.freeze(Object.defineProperty({__proto__:null,default:iw},Symbol.toStringTag,{value:"Module"}));var rw={},Eo={},Jp={},To={},Qp={};Object.defineProperty(Qp,"__esModule",{value:!0});Qp.default
vendor: 8,319 bytes, line 115
115=new Uint16Array('áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\0\0\0\0\0\0á«áá¦á°á·á½¾â â°âââ»ââ ¤â¤â´â¹â¿ããºã¹ã¬ã£¾ã¨¨ã©±ã« 㬮à EMabcfglmnoprstu\\bfms�¦³¹ÃÃligè»ÃäPè»&ä¦cuteè»Ãäreve;äÄiyx}rcè»Ãä;är;ìðraveè»Ãäpha;äacr;äd;æ©Ägp¡on;äf;ìð¸plyFunction;æ¡ingè»Ã
ä
Äcs¾Ãr;ìðign;æildeè»Ãämlè»ÃäÐaceforsuåûþÄÄĢħĪÄcrêòkslash;æÅ¶Ã¶Ã¸;æ«§ed;æy;äÆcrtÄ
ÄÄause;æµnoullis;æ¬a;är;ìð
pf;ìð¹eve;äcòÄmpeq;æÜHOacdefhilorsuÅÅÅÆÆÆ¢ÆµÆ·ÆºÇÈɳɸɾcy;ä§PYè»Â©ä©ÆcpyÅŢźute;äÄ;iŧŨætalDifferentialD;æ
leys;æÈaeioÆÆÆÆron;ädilè»Ãärc;änint;æ°ot;äÄdnƧÆilla;ä¸terDot;ä·Ã²Å¿i;ä§rcleÈDMPTÇÇÇÇot;æinus;ælus;æimes;æoÄcsǢǸkwiseContourIntegral;æ²eCurlyÄDQÈÈoubleQuote;æuote;æÈlnpuÈȨÉÉonÄ;eȥȦæ·;æ©´ÆgitȯȶȺruent;æ¡nt;æ¯ourIntegral;æ®ÄfrÉÉ;æoduct;ænterClockwiseContourIntegral;æ³oss;樯cr;ìðpÄ;CÊÊ
æap;æÖDJSZacefiosÊ Ê¬Ê°Ê´Ê¸ËËˡ˦̳ÒÄ;oŹʥtrahd;æ¤cy;äcy;ä
cy;äÆgrsÊ¿ËËger;æ¡r;æ¡hv;櫤ÄayËËron;ä;älÄ;tËËæa;är;ìðÄaf˫̧Äcm˰̢riticalÈADGTÌÌÌÌcute;ä´oÅ´ÌÌ;äbleAcute;ärave;ä ilde;äond;æferentialD;æ
Ѱ̽\0\0\0ÍÍ\0Ð
f;ìð»Æ;DEÍÍÍä¨ot;æqual;æbleÌCDLRUVͣͲÎÏϢϸontourIntegraìȹoɴ͹\0\0ͻ»ÍnArrow;æÄeoÎΤftÆARTÎÎΡrrow;æightArrow;æeÃ¥ËngÄLRΫÏeftÄARγιrrow;æ¸ightArrow;æºightArrow;æ¹ightÄATÏÏrrow;æee;æ¨pÉÏ©\0\0ϯrrow;æownArrow;æerticalBar;æ¥nÌABLRTaÐЪаÑѿͼrrowÆ;BUÐÐТæar;æ¤pArrow;æµreve;äeftËк\0Ñ\0ÑightVector;æ¥eeVector;æ¥ectorÄ;BÑÑæ½ar;æ¥ightÇѧ\0ѱeeVector;æ¥ectorÄ;BѺѻæar;æ¥eeÄ;AÒÒæ¤rrow;æ§ÄctÒÒr;ìðrok;äà NTacdfglmopqstuxÒ½ÓÓÓÓÓ¢Ó§Ó®ÓµÔ¡Ô¯Ô¶ÕÕÕ Õ¥G;ä
Hè»Ãäcuteè»ÃäÆaiyÓÓÓron;ärcè»Ãä;äot;är;ìðraveè»Ãäement;æÄapÓºÓ¾cr;ätyÉÔ\0\0ÔmallSquare;æ»erySmallSquare;æ«ÄgpÔ¦Ôªon;äf;ìð¼silon;äuÄaiÔ¼ÕlÄ;TÕÕæ©µilde;ælibrium;æÄciÕÕr;æ°m;橳a;ämlè»ÃäÄipÕªÕ¯sts;æonentialE;æ
ÊcfiosÖ
ÖÖÖ²×y;ä¤r;ìðlledÉÖ\0\0Ö£mallSquare;æ¼erySmallSquare;æªÍ°Öº\0Ö¿\0\0×f;ìð½All;æriertrf;æ±cÃ²×ØJTabcdfgorst×¨×¬×¯×ºØØØØØØ£Ù¬Ù²cy;äè»>ä¾mmaÄ;d׷׸ä;äreve;äÆeiyØØØdil;ä¢rc;ä;äot;ä r;ìð;æpf;ìð¾eaterÌEFGLSTصÙÙÙÙÙ¦qualÄ;Lؾؿæ¥ess;æullEqual;æ§reater;檢ess;æ·lantEqual;橾ilde;æ³cr;ìð¢;æ«ÐAacfiosuÚ
ÚÚÚÚÚªÚ¾ÛRDcy;äªÄctÚÚek;ä;äirc;ä¤r;ælbertSpace;æÇ°Ú¯\0Ú²f;æizontalLine;æÄctÛÛ
òکrok;ä¦mpÅÛÛownHumðįqual;æÜEJOacdfgmnostuÛºÛ¾ÜÜÜÜÜܡܨÝݸÞÞÞcy;älig;ä²cy;äcuteè»ÃäÄiyÜÜrcè»Ãä;äot;ä°r;æraveè»ÃäÆ;apÜ Ü¯Ü¿ÄcgÜ´Ü·r;äªinaryI;æ
lieóÏÇ´Ý\0Ý¢Ä;eÝÝæ¬ÄgrÝÝral;æ«section;æisibleÄCTݬݲomma;æ£imes;æ¢ÆgptÝ¿ÞÞon;ä®f;ìða;äcr;æilde;ä¨Ç«Þ\0Þcy;älè»ÃäÊcfosuÞ¬Þ·Þ¼ßßÄiyÞ±Þµrc;ä´;är;ìðpf;ìðÇ£ß\0ßr;ìð¥rcy;äkcy;äÎHJacfosߤߨ߽߬߱à à cy;ä¥cy;äppa;äÄeyß¶ß»dil;ä¶;är;ìðpf;ìðcr;ìð¦ÖJTaceflmostà ¥à ©à ¬à¡à¡£à¦³à¦¸à§à§à¨·à©cy;äè»<ä¼Êcmnprà ·à ¼à¡à¡à¡ute;ä¹bda;äg;æªlacetrf;ær;æÆaeyà¡à¡à¡¡ron;ä½dil;ä»;äÄfsࡨ॰tÔACDFRTUVarࡾࢩࢱࣦ࣠ࣼयà¥Î४Änrà¢à¢gleBracket;æ¨rowÆ;BRà¢à¢à¢æar;æ¤ightArrow;æeiling;æoǵࢷ\0à£bleBracket;æ¦nÇà£\0à£eeVector;楡ectorÄ;Bà£à£æar;æ¥loor;æightÄAV࣯ࣵrrow;æector;æ¥Äerà¤à¤eÆ;AVà¤à¤à¤æ£rrow;æ¤ector;æ¥iangleÆ;BEतथऩæ²ar;æ§qual;æ´pÆDTVषà¥à¥ownVector;æ¥eeVector;æ¥ ectorÄ;Bà¥à¥æ¿ar;æ¥ectorÄ;B॥०æ¼ar;æ¥ightáÎsÌEFGLSTॾà¦à¦à¦à¦¢à¦qualGreater;æullEqual;æ¦reater;æ¶ess;檡lantEqual;橽ilde;æ²r;ìðÄ;eঽাæftarrow;æidot;ä¿Ænpwà§à¨à¨gÈLRlrà§à§·à¨à¨eftÄAR০৬rrow;æµightArrow;æ·ightArrow;æ¶eftÄarγà¨ightáοightáÏf;ìðerÄLRਢਬeftArrow;æightArrow;æÆchtਾà©à©Ã²à¡;æ°rok;ä
;æªÐacefiosuà©à©à© ੷੼àª
àªàªp;æ¤
y;äÄdl੥੯iumSpace;ælintrf;æ³r;ìðnusPlus;æpf;ìðcò੶;äÒJacefostuણધàªà«à¬à¬à¶à¶à¶cy;äcute;ä
Æaey઴હાron;ä
dil;ä
;äÆgswà«à«°à¬ativeÆMTVà«à«à«¨ediumSpace;æhiÄcn૦à«Ã«à«eryThiîà«tedÄGL૸à¬reaterGreateòٳessLesóà©Line;är;ìðÈBnptଢନଷ଺reak;æ BreakingSpace;ä f;æÚ;CDEGHLNPRSTVàààªà¼à®¡à¯«à°à±à²à²¦à³àµ¡à¶
櫬Äouàà¤ngruent;æ¢pCap;æoubleVerticalBar;æ¦Ælqxà®à®à®ement;æualÄ;Tà®à®æ ilde;ìâ̸ists;æreaterÎ;EFGLSTஶஷ஽à¯à¯à¯à¯¥æ¯qual;æ±ullEqual;ìâ§Ì¸reater;ìâ«Ì¸ess;æ¹lantEqual;ì⩾̸ilde;æµumpÅ௲௽ownHump;ìâ̸qual;ìâ̸eÄfsà°à°§tTriangleÆ;BEà°à°à°¡æªar;ìâ§Ì¸qual;æ¬sÌ;EGLSTవశ఼à±à±à±æ®qual;æ°reater;æ¸ess;ìâªÌ¸lantEqual;ì⩽̸ilde;æ´estedÄGL౨౹reaterGreater;ì⪢̸essLess;ì⪡̸recedesÆ;ESà²à²à²æqual;ì⪯̸lantEqual;æ ÄeiಫಹverseElement;æghtTriangleÆ;BEà³à³à³æ«ar;ìâ§Ì¸qual;æÄquà³à´uareSuÄbp೨೹setÄ;Eà³°à³³ìâ̸qual;æ¢ersetÄ;Eà´à´ìâ̸qual;æ£Æbcpà´à´¤àµsetÄ;Eà´à´ìââqual;æceedsÈ;ESTà´²à´³à´»àµæqual;ì⪰̸lantEqual;æ¡ilde;ìâ¿Ì¸ersetÄ;Eàµàµìââqual;æildeÈ;EFT൮൯൵ൿæqual;æullEqual;æilde;æerticalBar;æ¤cr;ìð©ildeè»Ãä;äÜEacdfgmoprstuvà¶½à·à·à·à·à· à·§à·¼à¸à¸ ยา฿à¹lig;ä
cuteè»ÃäÄiyà·à·rcè»Ãä;äblac;ä
r;ìðraveè»ÃäÆaei෮ෲ෶cr;ä
ga;ä©cron;äpf;ìðenCurlyÄDQà¸à¸oubleQuote;æuote;æ;æ©Äclวฬr;ìðªashè»ÃäiŬื฼deè»Ãäes;樷mlè»ÃäerÄBPà¹à¹ Äarà¹à¹r;æ¾acÄekà¹à¹;æet;æ´arenthesis;æÒacfhilors๿àºàºàºàºàºàºàº°à»¼rtialD;æy;är;ìði;ä¦;ä usMinus;ä±ÄipຢàºncareplanÃ¥Úf;æÈ;eio຺ູ໠໤檻cedesÈ;ESTà»à»à»à»æºqual;檯lantEqual;æ¼ilde;æ¾me;æ³Ädp໩໮uct;æortionÄ;aȥ໹l;æÄcià¼à¼r;ìð«;ä¨ÈUfosà¼à¼à¼à¼OTè»"ä¢r;ìðpf;æcr;ìð¬ØBEacefhiorsu༾à½à½à½ ཱིྦྷྪà¾áá©á´á¾arr;æ¤Gè»Â®ä®Æcnrà½à½à½ute;ä
g;æ«rÄ;tà½à½æ l;æ¤Æaeyཧཬཱron;ä
dil;ä
;ä Ä;vླྀཹæerseÄEUà¾à¾Älqà¾à¾ement;æuilibrium;æpEquilibrium;楯r»ཹo;ä¡ghtÐACDFTUVaà¿à¿«à¿³á¢á¨ááÏÄnrà¿à¿gleBracket;æ©rowÆ;BLà¿à¿à¿¡æar;æ¥eftArrow;æeiling;æoǵ࿹\0á
bleBracket;æ§nÇá\0áeeVector;æ¥ectorÄ;Bááæar;æ¥loor;æÄerááeÆ;AVáµá¶á¼æ¢rrow;æ¦ector;æ¥iangleÆ;BEáááæ³ar;æ§qual;æµpÆDTVá£á®á¸ownVector;æ¥eeVector;æ¥ectorÄ;Bááæ¾ar;æ¥ectorÄ;Bááæar;æ¥Äpuááf;ændImplies;楰ightarrow;æÄchá¹á¼r;æ;æ±leDelayed;æ§´ÚHOacfhimoqstuá¤á±á·á½ááá
á
á
¡á
§áµá»á¿ÄCcá©á®Hcy;ä©y;ä¨FTcy;ä¬cute;ä
Ê;aeiyáááááæª¼ron;ä
dil;ä
rc;ä
;ä¡r;ìðortÈDLRUáªá´á¾á
ownArrow»ÐeftArrow»à¢ightArrow»à¿pArrow;ægma;ä£allCircle;æpf;ìðɲá
\0\0á
°t;æareÈ;ISUá
ȇ
¼áá¯æ¡ntersection;æuÄbpáásetÄ;Eááæqual;æersetÄ;Eá¨á©æqual;ænion;æcr;ìð®ar;æÈbcmpááááÄ;sááæetÄ;Eááqual;æÄchá á
eedsÈ;ESTáá®á´á¿æ»qual;檰lantEqual;æ½ilde;æ¿Tháà¾;æÆ;esááá£ærsetÄ;Eááæqual;æet»áÖHRSacfhiorsá¾ááááá±á¶ááááORNè»ÃäADE;æ¢ÄHcáácy;äy;ä¦Äbuáá;ä;䤯aeyá¥áªá¯ron;ä
¤dil;ä
¢;ä¢r;ìðÄeiá»áDzá\0áefore;æ´a;äÄcnáákSpace;ìââSpace;ældeÈ;EFTá«á¬á²á¼æ¼qual;æullEqual;æ
ilde;æpf;ìðipleDot;æÄctáár;ìð¯rok;ä
¦à«¡á·ááá¦\0á¬á±\0\0\0\0\0á¸á½á·á
\0á¿áááÄcrá»áuteè»ÃärÄ;oááæcir;æ¥rÇ£á\0áy;äve;ä
¬Äiyáá£rcè»Ãä;ä£blac;ä
°r;ìðraveè»Ãäacr;ä
ªÄdiáá©erÄBPááÄaráár;äacÄekáá;æet;æµarenthesis;æonÄ;Pá°á±ælus;æÄgpá»á¿on;ä
²f;ìðÐADETadpsáá®á¸áϨááá³rrowÆ;BDá
á á¤ar;æ¤ownArrow;æ
ownArrow;æquilibrium;楮eeÄ;Aááæ¥rrow;æ¥ownáϳerÄLRáá¨eftArrow;æightArrow;æiÄ;lá¹áºäon;ä¥ing;ä
®cr;ìð°ilde;ä
¨mlè»ÃäÒDbcdefosvá§á¬á°á³á¾á
áááash;æ«ar;æ««y;äashÄ;lá»á¼æ©;櫦Äeráá
;æÆbtyáááºar;æÄ;iáácalÈBLSTá¡á¥áªá´ar;æ£ine;ä¼eparator;æilde;æThinSpace;ær;ìðpf;ìðcr;ìð±dash;æªÊcefosá§á¬á±á¶á¼irc;ä
´dge;ær;
vendor: 7,828 bytes, line 115
115ìðpf;ìðcr;ìð²Èfiosáááár;ìð;äpf;ìðcr;ìð³ÒAIUacfosuá±áµá¹á½ááááá cy;ä¯cy;äcy;ä®cuteè»ÃäÄiyáárc;ä
¶;ä«r;ìðpf;ìðcr;ìð´ml;ä
¸ÐHacdefosáµá¹á¿áááá á¤cy;äcute;ä
¹Äayááron;ä
½;äot;ä
»Ç²á\0áoWidtèà«a;är;æ¨pf;æ¤cr;ìðµà¯¡ááá\0á°á¶á¿\0\0\0\0ááá«áá\0ááá²á¹\0á¾cuteè»Ã¡ä¡reve;äÌ;Ediuyááá¡á£á¨áæ¾;ìâ¾Ì³;æ¿rcè»Ã¢ä¢teè»Â´Ì;ä°ligè»Ã¦ä¦Ä;r²áº;ìðraveè»Ã ä ÄepááÄfpáásym;æµÃ¨áha;ä±ÄapácÄclá¤á§r;äg;樿ɤá°\0\0áÊ;adsváºá»á¿ááæ§nd;æ©;æ©lope;æ©;æ©Î;elmrszááááá¿ááæ ;榤e»ásdÄ;aá¥á¦æ¡Ñ¡á°á²á´á¶á¸áºá¼á¾;榨;榩;榪;榫;榬;æ¦;榮;榯tÄ;vá
áæbÄ;dááæ¾;æ¦Äptááh;æ¢Â»Â¹arr;æ¼Ägpá£á§on;ä
f;ìðÎ;Eaeiopáá»á½áááá;æ©°cir;橯;æd;æs;ä§roxÄ;eááñáingè»Ã¥ä¥Æctyá¡á¦á¨r;ìð¶;äªmpÄ;eáá¯Ã±Êildeè»Ã£ä£mlè»Ã¤ä¤Äciááoninôɲnt;æ¨à Nabcdefiklnoprsuáá±á°á¼ááá¸á½á á¦á ¹á¡á᤽á¥á¥°ot;æ«Äcrá¶ákÈcepsáá
ááong;æpsilon;ä¶rime;æµimÄ;eááæ½q;æÅ¶á¢á¦ee;æ½edÄ;gá¬áæ
e»árkÄ;táá·brk;æ¶Äoyáá;ä±quo;æÊcmprtááá¡á¤á¨ausÄ;eÄÄptyv;榰séánoÃµÄÆahwá¯á±á³;ä²;æ¶een;æ¬r;ìðgÎcostuvwááá³ááááÆaiuáááÃ°Ý rc;æ¯pÂ»á±Ædptá¤á¨áot;æ¨lus;æ¨imes;æ¨É±á¹\0\0á¾cup;æ¨ar;æ
riangleÄduááown;æ½p;æ³plus;æ¨eÃ¥áÃ¥áarow;æ¤Æakoáá ¦á µÄcná²á £kÆlstáºÖ«á ozenge;æ§«riangleÈ;dlrá á á á æ´own;æ¾eft;æight;æ¸k;æ£Æ±á «\0á ³Æ²á ¯\0á ±;æ;æ4;æck;æÄeoá ¾á¡Ä;qá¡á¡ì=â¥uiv;ìâ¡â¥t;æÈptwxá¡á¡á¡§á¡¬f;ìðÄ;táá¡£om»átie;æØDHUVbdhmptuvá¢
á¢á¢ªá¢»á£á£á£¬á£¿á¤
á¤á¤á¤¡ÈLRlrá¢á¢á¢á¢;æ;æ;æ;æÊ;DUduᢡᢢᢤᢦᢨæ;æ¦;æ©;æ¤;æ§ÈLRlrᢳᢵᢷᢹ;æ;æ;æ;æÎ;HLRhlrá£á£á£á£á£á£á£æ;æ¬;æ£;æ ;æ«;æ¢;æox;æ§ÈLRlrᣤᣦᣨᣪ;æ;æ;æ;æÊ;DUduڽ᣷᣹᣻᣽;æ¥;æ¨;æ¬;æ´inus;ælus;æimes;æ ÈLRlrá¤á¤á¤á¤;æ;æ;æ;æÎ;HLRhlrᤰᤱᤳᤵᤷ᤻᤹æ;æª;æ¡;æ;æ¼;æ¤;æÄevÄ£á¥barè»Â¦ä¦Èceioá¥á¥á¥á¥ r;ìð·mi;æmÄ;eáálÆ;bhᥨᥩᥫä;æ§
sub;æÅ¬á¥´á¥¾lÄ;e᥹᥺æ¢t»᥺pÆ;Eeįá¦
á¦;檮Ä;qÛÛೡᦧ\0᧨á¨á¨á¨²\0ᨷá©\0\0᪴\0\0á«\0\0ᬡᬮáá\0᯽\0á°Æcprá¦á¦²á§ute;äÌ;abcdsᦿá§á§á§á§á§æ©nd;æ©rcup;æ©Äauá§á§p;æ©p;æ©ot;æ©;ìâ©ï¸Äeo᧢᧥t;æÃ®ÚÈaeiuá§°á§»á¨á¨
ǰ᧵\0᧸s;æ©on;ädilè»Ã§ä§rc;äpsÄ;sá¨á¨æ©m;æ©ot;äÆdmná¨á¨ ᨦilè»Â¸Æptyv;榲tè¢;eá¨á¨®ä¢räƲr;ìð Æceiᨽá©á©y;äckÄ;má©á©æark»á©;ärÎ;Ecefmsá©á© ᩢᩫ᪤᪪᪮æ;æ§Æ;elᩩᩪá©äq;æeɡᩴ\0\0áªrrowÄlr᩼áªeft;æºight;æ»ÊRSacdáªáªáªáªáªÂ»à½;æst;æirc;æash;ænint;æ¨id;櫯cir;æ§ubsÄ;u᪻᪼æ£it»᪼ˬá«á«á«º\0á¬onÄ;eá«á«äºÄ;qÃÃÉá«\0\0á«¢aÄ;tá«á«ä¬;äÆ;fl᫨᫩᫫æÃ®á
eÄmx᫱᫶ent»᫩eóÉǧ᫾\0á¬Ä;dá»á¬ot;æ©nÃ´ÉÆfryá¬á¬á¬;ìðoäÉè©;sÅá¬r;æÄaoᬥᬩrr;æµss;æÄcuᬲᬷr;ìð¸ÄbpᬼáÄ;eááæ«;æ«Ä;eááæ«;æ«dot;æ¯Îdelprvwá á¬á·á®á®¬á¯á¯¹arrÄlrá¨áª;椸;椵ɰá²\0\0áµr;æc;æarrÄ;pá¿á®æ¶;椽Ì;bcdosá®á®á®á®¡á®¥á®¨æªrcap;æ©Äauá®á®p;æ©p;æ©ot;ær;æ©
;ìâªï¸Èalrv᮵ᮿá¯á¯£rrÄ;mᮼᮽæ·;椼yÆevwá¯á¯á¯qɰá¯\0\0á¯reãá³uãáµee;æedge;æenè»Â¤ä¤earrowÄlrᯮ᯳eft»á®ight»ᮽeäá¯Äciá°á°oninôǷnt;æ±lcty;æà¦AHabcdefhijlorstuwz᰸᰻᰿á±á±©á±µá²á²á²¬á²·á³»á³¿á´áµ»á¶á¶«á¶»á·á·ròÎar;楥Èglrsá±á±á±á±ger;æ eth;æ¸Ã²á³hÄ;vá±á±æÂ»à¤Å«á±¡á±§arow;æ¤aãÌÄayᱮᱳron;ä;ä´Æ;ao̲ᱼá²ÄgrÊ¿á²r;ætseq;æ©·Æglmá²á²á²è»Â°ä°ta;ä´ptyv;榱ÄirᲣᲨsht;楿;ìð¡arÄlrᲳᲵ»à£Â»áÊaegsvá³Í¸á³á³á³ mÆ;oșá³á³ndÄ;șá³uit;æ¦amma;äin;æ²Æ;io᳧᳨᳸ä·deè÷;oá³§á³°ntimes;ænø᳷cy;äcɯá´\0\0á´rn;æop;æÊlptuwá´á´á´¢áµáµlar;ä¤f;ìðÊ;empsÌá´á´·á´½áµqÄ;dÍá´³ot;æinus;æ¸lus;æquare;æ¡blebarwedgåúnÆadhá®áµáµ§ownarrowóá²arpoonÄlrᵲᵶefôᲴighôᲶŢᵿá¶
karo÷à½É¯á¶\0\0á¶rn;æop;æÆcotá¶á¶£á¶¦Äryá¶á¶¡;ìð¹;äl;æ§¶rok;äÄdrá¶°á¶´ot;æ±iÄ;fá¶ºá æ¿Äahá·á·ròЩaòྦangle;榦Äciá·á·y;ägrarr;æ¿à¤Dacdefglmnopqrstuxá¸á¸á¸á¸¸Õ¸á¸¼á¹á¹¡á¹¾áº¥áº¯áº½á»¡á¼ªá¼·á½á½á½ÄDoá¸á´´oôá²Äcsá¸á¸uteè»Ã©ä©ter;æ©®ÈaioyḢḧḱḶron;ärÄ;cá¸á¸®æè»Ãªäªlon;æ;äot;äÄDrá¹á¹
ot;æ;ìð¢Æ;rsá¹á¹á¹æªaveè»Ã¨ä¨Ä;dá¹á¹æªot;æªÈ;ilsṪṫṲṴæªnters;æ§;æÄ;dṹṺæªot;æªÆapsáº
áºáºcr;ätyÆ;sváºáºáºæ
et»áºpÄ1;áºáº¤Ä³áº¡áº£;æ;æ
æÄgsẪẬ;ä
p;æÄgpẴẸon;äf;ìðÆalsá»á»á»rÄ;sá»á»æl;æ§£us;橱iÆ;lvá»á»á»äµon»á»;äµÈcsuvỪỳá¼á¼£Äioữḱrc»Ḯɩỹ\0\0á»»ÃÕantÄglá¼á¼tr»á¹ess»ṺÆaeiá¼á¼á¼ls;ä½st;ævÄ;DȵἠD;橸parsl;æ§¥ÄDaἯἳot;ærr;楱Æcdiá¼¾á½á»¸r;æ¯oôÍÄahá½á½;ä·è»Ã°ä°Ämrá½á½lè»Ã«ä«o;æ¬Æcipὡὤὧl;ä¡sôծÄeoὬὴctatioîÕnentialåչৡá¾\0á¾\0ᾡᾧ\0\0á¿á¿\0á¿\0ῦῪâ\0ââllingdotseñá¹y;ämale;æÆilrá¾á¾³á¿lig;èï¬É©á¾¹\0\0á¾½g;èï¬ig;èï¬;ìð£lig;èï¬lig;ìfjÆaltá¿á¿á¿¡t;æig;èï¬ns;æ±of;äǰ΅\0ῳf;ìðÄakÖ¿á¿·Ä;vῼ´æ;æ«artint;æ¨ÄaoââÄcsââαââ°â¸â
â\0âβâ¢â¥â§âªâ¬\0â®è»Â½ä½;æ
è»Â¼ä¼;æ
;æ
;æ
Ƴâ´\0â¶;æ
;æ
Ê´â¾â\0\0âè»Â¾ä¾;æ
;æ
5;æ
ƶâ\0â;æ
;æ
8;æ
l;æwn;æ¢cr;ìð»à¢Eabcdefgijlnorstvââââ¥â°â´â°âµâºâ¿âââ¸Ìâ¾â
âÄ;lÙâ;æªÆcmpâââute;äµmaÄ;dâá³ä³;æªreve;äÄiyâªâ®rc;ä;ä³ot;ä¡È;lqsؾÙâ½âÆ;qsؾÙâlanô٥È;cdlÙ¥âââ¥c;檩otÄ;oââæªÄ;lâ¢â£æª;æªÄ;eâªâìâï¸s;æªr;ìð¤Ä;gÙ³Ømel;æ·cy;äÈ;EajÙâââ;æª;檥;檤ÈEaesâââ©â´;æ©pÄ;pâ£â¤æªrox»â¤Ä;qâ®â¯æªÄ;qâ®âim;æ§pf;ìðÄciâ
â
r;æmÆ;elÙ«â
â
;æª;æªè>;cdlqr×®â
â
ªâ
®â
³â
¹Äciâ
¥â
§;檧r;橺ot;æPar;æ¦uest;橼Êadelsââ
ªâÙâǰâ\0âproøâr;楸qÄlqØ¿âlesóâiÃÙ«Äenâ£ârtneqq;ìâ©ï¸Ã
âªÔAabcefkosyâââ±âµâºâââ¯â¨â½ròΠÈilmrâââârsðáf»â¤ilôکÄdrâ â¤cy;äÆ;cwࣴâ«â¯ir;æ¥;æar;æirc;䥯alrââârtsÄ;uââæ¥it»âlip;æ¦con;æ¹r;ìð¥sÄewâ£â©arow;椥arow;椦Êamoprâºâ¾âââ£rr;æ¿tht;æ»kÄlrââeftarrow;æ©ightarrow;æªf;ìðbar;æÆcltâ¯â´â¸r;ìð½asèâ´rok;ä§Äbpââull;æhen»á±à«¡â£\0âª\0â¸â
â\0ââ³\0\0â¸â¢â§â¢â¿\0ââªâ´cuteè»ÃäÆ;iyݱâ°âµrcè»Ã®ä®;ä¸Äcxâ¼â¿y;äµclè»Â¡ä¡ÄfrÎâ;ìð¦raveè»Ã¬ä¬È;inoܾââ©â®Äinâ¢â¦nt;æ¨t;æfin;æ§ta;æ©lig;䳯aopâ¾ââÆcgtâ
ââr;䫯elpÜââinÃ¥ÞarÃ´Ü h;ä±f;æ·ed;äµÊ;cfotÓ´â¬â±â½âare;æ
inÄ;tâ¸â¹æie;æ§doôâÊ;celpÝââââ¡al;æºÄgrââeróá£Ã£âarhk;æ¨rod;樼Ècgptâ¯â²â¶â»y;äon;ä¯f;ìða;ä¹uestè»Â¿ä¿Äciââr;ìð¾nÊ;EdsvÓ´âââ¡Ó³;æ¹ot;æµÄ;vâ¦â§æ´;æ³Ä;iÝ·â®lde;ä©Ç«â¸\0â¼cy;älè»Ã¯ä¯Ìcfmosuââââ¡â§âµÄiyâârc;äµ;ä¹r;ìð§ath;ä·pf;ìðÇ£â¬\0â±r;ìð¿rcy;äkcy;äÐacfghjosâââ¢â§ââ±âµâ»ppaÄ;vââäº;ä°Äeyââ dil;ä·;äºr;ìð¨reen;ä¸cy;ä
cy;äpf;ìðcr;ìðà®ABEHabcdefghjlmnoprstuvâ°ââââââ½âââââ¥â¹â½ââ²âââ¨âââ â Æartâ·âºâ¼ròà§Ã²Îail;æ¤arr;æ¤Ä;gà¦â;æªar;楢ॣâ¥\0âª\0â±\0\0\0\0\0âµâº\0âââ\0â¹ute;äºmptyv;榴raîà¡bda;ä»gÆ;dlà¢ââ;æ¦Ã¥à¢;æª
uoè»Â«ä«rÐ;bfhlpstà¢ââ¦â©â«â®â±âµÄ;fà¢â£s;æ¤s;æ¤Ã«âp;æ«l;椹im;楳l;æ¢Æ;aeâ¿ââæª«il;æ¤Ä;sââæª;ìâªï¸Æabrââârr;æ¤rk;æ²Äakâ¢â¬cÄekâ¨âª;ä»;äÄesâ±â³;æ¦lÄduâ¹â»;æ¦;æ¦Èaeuyââââron;ä¾Ädiââil;ä¼Ã¬à¢°Ã¢â©;
vendor: 4,294 bytes, line 115
115ä»Ècqrsâ£â¦ââ½a;椶uoÄ;rà¸áÄduâ²â·har;楧shar;æ¥h;æ²Ê;fgqsââà¦â³â¿æ¤tÊahlrtââ¤â·ââ¨rrowÄ;tà¢â¡aéâ¶arpoonÄduâ¯â´own»Ñp»०eftarrows;æightÆahsââârrowÄ;sࣴࢧarpoonóà¾quigarro÷â°hreetimes;æÆ;qsâà¦âºlanôবÊ;cdgsবââââ¨c;檨otÄ;oââæ©¿Ä;rââæª;æªÄ;eâ¢â¥ìâï¸s;æªÊadegsâ³â¹â½ââpproøâot;æqÄgqââ
ôà¦gtòâôà¦iÃলÆilrâ࣡âsht;楼;ìð©Ä;Eà¦â£;æªÅ¡â©â¶rÄduâ²â®Ä;l॥â³;楪lk;æcy;äÊ;achtà©ââââròâorneòá´ard;楫ri;æºÄioââ¤dot;ä
ustÄ;aâ¬âæ°che»âÈEaesâ»â½ââ;æ¨pÄ;pââæªrox»âÄ;qââæªÄ;qââ»im;æ¦Ðabnoptwzâ©â´â·ââ¯âââÄnrâ®â±g;æ¬r;æ½rëà£gÆlmrâ¿ââeftÄar০âightá৲apsto;æ¼ightá৽parrowÄlrâ¥â©efôâight;æ¬Æaflâ¶â¹â½r;æ¦
;ìðus;æ¨imes;樴šââst;æÃ¡áÆ;efââá ænge»âarÄ;lâ¤â¥ä¨t;æ¦Êachmtâ³â¶â¼â
âròࢨorneòá¶arÄ;dà¾â;æ¥;æri;æ¿Ìachiqtââà©â¢â®â»quo;æ¹r;ìðmÆ;egলâªâ¬;æª;æªÄbuâªâ³oÄ;rà¸â¹;ærok;ä
è<;cdhilqrà «ââ¹ââ â¥âªâ°Äciââ;檦r;橹reÃ¥â²mes;æarr;楶uest;æ©»ÄPiâµâ¹ar;æ¦Æ;efâ à¤á ærÄduâ â shar;æ¥har;楦Äenâ â ¡rtneqq;ìâ¨ï¸Ã
â ÜDacdefhilnopsuâ¡â¡
â¢â¢â¢â¢ ⢥⢨â£â£¢â£¤àªâ£³â¤Dot;æºÈclprâ¡â¡â¡£â¡½rè»Â¯ä¯Äetâ¡â¡;æÄ;eâ¡â¡æ se»â¡Ä;sá»â¡¨toÈ;dluá»â¡³â¡·â¡»owîÒefôà¤Ã°áker;æ®Äoyâ¢â¢mma;権;ä¼ash;æasuredangle»á¦r;ìðªo;æ§Æcdn⢯⢴â£roè»ÂµäµÈ;acdá¤â¢½â£â£sôá§ir;æ«°otè»Â·ÆµusÆ;bdâ£á¤â£æÄ;uá´¼â£;横ţâ£â£¡p;æ«Ã²âðàªÄdp⣩⣮els;æ§f;ìðÄct⣸⣽r;ìðpos»áÆ;lmâ¤â¤â¤ä¼timap;æ¸à°GLRVabcdefghijlmoprstuvwâ¥â¥â¥¾â¦â¦â§â§©â¨â¨â©â©âªâªâª¤âª¨â¬â¬ââ¿â®®â°´â±§â±¼â³©Ägtâ¥â¥;ìâ̸Ä;vâ¥à¯ìâ«âÆeltâ¥â¥²â¥¶ftÄar⥡⥧rrow;æightarrow;æ;ìâ̸Ä;v⥻à±ìâªâightarrow;æÄDdâ¦â¦ash;æ¯ash;æ®Êbcnpt⦣⦧⦬⦱â§la»Ëute;ä
g;ìâ âÊ;Eiopà¶â¦¼â§â§
â§;ì⩰̸d;ìâ̸s;ä
roøà¶urÄ;aâ§â§æ®lÄ;sâ§à¬¸Ç³â§\0â§£pè»Â ଷmpÄ;e௹à°Êaeouyâ§´â§¾â¨â¨â¨Ç°â§¹\0â§»;æ©on;ä
dil;ä
ngÄ;dൾâ¨ot;ìâ©Ì¸p;æ©;ä½ash;æÎ;Aadqsxà®â¨©â¨â¨»â©â©
â©rr;ærÄhr⨳⨶k;椤Ä;oá²á°ot;ìâ̸uiöà£Äeiâ©â©ar;椨Ãà®istÄ;sà® à®r;ìð«ÈEestà¯
⩦⩹⩼Æ;qs஼â©à¯¡Æ;qs஼à¯
â©´lanô௢iÃ௪Ä;rà®¶âªÂ»à®·ÆAapâªâªâªrò⥱rr;æ®ar;櫲Æ;svà¾âªà¾Ä;d⪡⪢æ¼;æºcy;äÎAEadest⪷⪺⪾â«â«
⫶⫹rò⥦;ìâ¦Ì¸rr;ær;æ¥È;fqsà°»â«â«£â«¯tÄarâ«â«rro÷â«ightarroÃ·âªÆ;qs఻⪺⫪lanôà±Ä;sà±â«´Â»à°¶iÃà±Ä;rవ⫾iÄ;eà°à°¥iäà¶Äptâ¬â¬f;ìðè¬;inâ¬â¬â¬¶ä¬nÈ;Edvà®â¬¤â¬¨â¬®;ìâ¹Ì¸ot;ìâµÌ¸Ç¡à®â¬³â¬µ;æ·;æ¶iÄ;vಸ⬼ǡಸââ;æ¾;æ½Æaorââ£â©rÈ;astà»âââlleìà»l;ì⫽â¥;ìâ̸lint;æ¨Æ;ceà²â°â³uåಥÄ;cà²â¸Ä;eà²â½Ã±à²ÈAaitâ®â®â®â®§ròâ¦rrÆ;cwâ®â®â®æ;ì⤳̸;ìâ̸ghtarrow»â®riÄ;eà³à³Îchimpqu⮽â¯â¯â¬à¸â¯¤â¯¯È;cerà´²â¯à´·â¯uÃ¥àµ
;ìðortÉâ¬
\0\0â¯aráâmÄ;e൮â¯Ä;q൴൳suÄbp⯫â¯Ã¥à³¸Ã¥à´Æbcp⯶â°â°È;Ees⯿â°à´¢â°æ;ìâ«
̸etÄ;eà´â°qÄ;qà´£â°cÄ;eà´²â°Ã±à´¸È;EesⰢⰣàµâ°§æ
;ìâ«Ì¸etÄ;eàµâ°®qÄ;qൠⰣÈgilrⰽⰿâ±
â±Ã¬à¯ldeè»Ã±ä±Ã§à±iangleÄlrâ±â±eftÄ;eà°â±Ã±à°¦ightÄ;eà³â±¥Ã±à³Ä;mⱬâ±ä½Æ;esⱴⱵⱹä£ro;æp;æÒDHadgilrsâ²â²â²â²â²£â²°â²¶â³â³£ash;æarr;æ¤p;ìââash;æ¬ÄetⲨⲬ;ìâ¥â;ì>ânfin;æ§ÆAetâ²½â³â³
rr;æ¤;ìâ¤âÄ;râ³â³ì<âie;ìâ´âÄAtâ³â³rr;æ¤rie;ìâµâim;ìâ¼âÆAanâ³°â³´â´rr;ærÄhr⳺⳽k;椣Ä;oá§á¥ear;椧ááª\0\0\0\0\0\0\0\0\0\0\0\0\0â´\0â´¸âµâµ ⵥ⵲â¶á¬\0\0â¶â¶«\0â·â·\0â·â¸â¸«â¸¾â¹Äcsâ´±áªuteè»Ã³ä³Äiyâ´¼âµ
rÄ;cáªâµè»Ã´ä´;ä¾Êabios᪠âµâµÇâµlac;ä
v;樸old;榼lig;ä
Äcr⵩âµir;榿;ìð¬Í¯âµ¹\0\0âµ¼\0â¶n;äaveè»Ã²ä²;æ§Äbmâ¶à·´ar;榵Èacitâ¶â¶â¶¥â¶¨ròáªÄirâ¶â¶ r;榾oss;榻nÃ¥à¹;æ§Æaeiⶱⶵⶹcr;ä
ga;äÆcdnâ·â·
Çron;ä¿;榶pf;ìð Æaelâ·â·Çr;榷rp;榹Î;adiosvⷪⷫⷮâ¸â¸â¸â¸æ¨ròáªÈ;efmâ··â·¸â¸â¸
æ©rÄ;oⷾⷿæ´f»ⷿè»Âªäªè»Âºäºgof;æ¶r;æ©lope;æ©;æ©Æcloâ¸â¸¡â¸§Ã²â¸ashè»Ã¸ä¸l;æiŬⸯ⸴deè»ÃµäµesÄ;aÇ⸺s;樶mlè»Ã¶ä¶bar;æ½à«¡â¹\0â¹½\0âºâº\0⺢⺹\0\0â»àº\0â¼\0\0⼫⾼\0â¿rÈ;
vendor: 6,210 bytes, line 115
115astÐâ¹§â¹²àº
è¶;lâ¹â¹®ä¶leìÐɩ⹸\0\0â¹»m;櫳;櫽y;ä¿rÊcimptâºâºâºá¡¥âºnt;ä¥od;ä®il;æ°enk;æ±r;ìðÆimo⺨⺰⺴Ä;vâºâº®ä;ämaô੶ne;æÆ;tv⺿â»â»ächfork»´;äÄauâ»â»nÄckâ»â»kÄ;hâ´â»;æÃ¶â´sÒ;abcdemst⻳⻴á¤â»¹â»½â¼â¼â¼â¼ä«cir;樣ir;樢Äouáµâ¼;樥;橲nè»Â±àºim;樦wo;樧Æipuâ¼â¼ â¼¥ntint;æ¨f;ìð¡ndè»Â£ä£Ô;Eaceinosuà»â¼¿â½â½â½â¾â¾â¾â½¾â¾¶;檳p;檷uÃ¥à»Ä;cà»â½Ì;acensà»â½â½â½¦â½¨â½¾pproøâ½urlyeñà»Ã±à»Æaes⽯⽶⽺pprox;檹qq;檵im;æ¨iÃà»meÄ;sâ¾àº®æ²ÆEas⽸â¾â½ºÃ°â½µÆdfp໬â¾â¾¯Æals⾠⾥⾪lar;æ®ine;æurf;æÄ;t໻⾴ï໻rel;æ°Äciâ¿â¿
r;ìð
;äncsp;æÌfiopsuâ¿â¢â¿â¿¥â¿«â¿±r;ìð®pf;ìð¢rime;æcr;ìðÆaeo⿸ããtÄei⿾ã
rnionóڰnt;æ¨stÄ;eããä¿Ã±á¼Ã´à¼àªABHabcdefhilmnoprstuxããããã ãã«ã
ã
¢ã
²ãããã¤ã©ãã®ã²ãã°ã·Æartãããròá³Ã²Ïail;æ¤aròᱥar;楤Îcdenqrtã¨ãµã¸ã¿ãããÄeuãã±;ìâ½Ì±te;ä
iãá
®mptyv;榳gÈ;delà¿ããã;æ¦;榥åà¿uoè»Â»ä»rÖ;abcfhlpstwà¿ã¬ã¯ã·ã¹ã¼ã¾ããããp;極Ä;fà¿ ã´s;æ¤ ;椳s;æ¤Ã«âðâ®l;æ¥
im;楴l;æ£;æÄaiããil;æ¤oÄ;nããæ¶alÃ³à¼Æabrã§ãªã®ròá¥rk;æ³Äakã³ã½cÄekã¹ã»;ä½;äÄesãã;æ¦lÄduãã;æ¦;æ¦Èaeuyããã§ã©ron;ä
Ädiã¡ã¥il;ä
ì࿲âãº;äÈclqsã´ã·ã½ã
a;椷dhar;楩uoÄ;rÈÈh;æ³Æacgã
ã
à½lÈ;ipsླྀã
ã
ánÃ¥á»arôྩt;æÆilrã
©á£ã
®sht;楽;ìð¯Äaoã
·ãrÄduã
½ã
¿Â»Ñ»Ä;láã;楬Ä;vããä;䱯gnsãã¹ã¼htÌahlrstã¤ã°ããã¤ã®rrowÄ;tà¿ãaéãarpoonÄduã»ã¿owîã
¾p»áeftÄahããrrowó࿪arpoonóÕightarrows;æquigarro÷ãhreetimes;æg;äingdotseñἲÆahmãããrò࿪aòÕ;æoustÄ;aããæ±che»ãmid;æ«®Èabptã²ã½ããÄnrã·ãºg;ær;æ¾rëáÆaflãããr;æ¦;ìð£us;樮imes;樵Äapãã§rÄ;gã£ã¤ä©t;æ¦olint;æ¨aròã£Èachqã»ãá¼ã
quo;æºr;ìðÄbuã»ãoÄ;rÈÈÆhirããã reÃ¥ã¸mes;æiÈ;eflãªáá ¡ã«æ¹tri;æ§luhar;楨;æàµ¡ãããã¬ã¸ã±\0ãºã¤\0\0ã¬ã°\0ã¨ãããã±ãã±\0ã\0\0ã³cute;ä
quïâºÔ;Eaceinpsyáã³ãµã¿ããããã¦ã©;檴ǰãº\0ã¼;檸on;ä
¡uÃ¥á¾Ä;dá³ãil;ä
rc;ä
ÆEasããã;檶p;檺im;æ©olint;æ¨iÃá;äotÆ;beã´áµãµæ
;橦ÎAacmstxãããããã£ãrr;ærÄhrããëâ¨Ä;oਸ਼਴tè»Â§ä§i;ä»war;椩mÄinã©Ã°nuóñt;æ¶rÄ;oã¶âìð°Èacoyãããã rp;æ¯Ähyããcy;ä;ärtÉã\0\0ãiäá¤araì⹯è»ÂäÄgmã¨ã´maÆ;fvã±ã²ã²ä;äÐ;deglnprá«ã
ããããã¡ã¦ot;橪Ä;qá±á°Ä;Eããæª;æª Ä;Eããæª;æªe;ælus;樤arr;楲aròá½Èaeitã¸ãããÄlsã½ãlsetméãªhp;樳parsl;槤Ädlá£ãe;æ£Ä;eããæªªÄ;sã¢ã£æª¬;ìâª¬ï¸Æflpã®ã³ãtcy;äÄ;bã¸ã¹ä¯Ä;aã¾ã¿æ§r;æ¿f;ìð¤aÄdrãÐesÄ;uããæ it»ãÆcsuã ã¹ãÄauã¥ã¯pÄ;sáã«;ìâï¸pÄ;sá´ãµ;ìâï¸uÄbpã¿ãÆ;esááãetÄ;eáãñáÆ;esá¨áãetÄ;eá¨ãÃ±á®Æ;afá
»ã¦Ö°rÅ¥ã«Ö±Â»á
¼aròá
Ècemtã¹ã¾ãã
r;ìðtmîñiìãaræá¾ÄarããrÄ;fãá¿æÄanããightÄepã£ãªpsiloîỠhé⺯s»â¡Êbcmnpã»ãáããÒ;Edemnprsãããããã£ã¬ã±ã¶æ;æ«
ot;檽Ä;dáãot;æ«ult;æ«ÄEeã¨ãª;æ«;ælus;檿arr;楹Æeiuã½ããtÆ;enãã
ãqÄ;qáãeqÄ;qã«ã¨m;æ«Äbpãã;æ«;æ«cÌ;acensáã¬ã²ã¹ã»ã¦pproøãºurlyeñá¾Ã±á³Æaesãããpproøãqñãg;æªÚ123;Edehlmnpsã©ã¬ã¯áã²ã´ãããããã¨ãè»Â¹ä¹è»Â²ä²è»Â³ä³;æ«Äosã¹ã¼t;檾ub;æ«Ä;dá¢ã
ot;æ«sÄouããl;æb;æ«arr;楻ult;æ«ÄEeã¤ã¦;æ«;ælus;æ«Æeiuã´ããtÆ;enáã¼ãqÄ;qá¢ã²eqÄ;qã§ã¤m;æ«Äbpãã;æ«;æ«ÆAanãã ãrr;ærÄhrã¦ã¨Ã«â®Ä;oਫ਩war;椪ligè»Ãä௡ããã áã³ã¹\0ã¾ã\0\0\0\0\0ãã\0ãã¬\0\0\0ãɲã\0\0ãget;æ;ärÃ«à¹Æaeyã¦ã«ã°ron;ä
¥dil;ä
£;älrec;ær;ìð±Èeikoãããµã¼Ç²ã\0ãeÄ4fááaÆ;svãããä¸ym;äÄcnã¢ã²kÄasã¨ã®pproøáim»á¬sðáÄasãºã®Ã°árnè»Ã¾ä¾Ç¬Ìãâ§esèÃ;bdãããäÄ;aá¤ãr;樱;樰Æepsã¡ã£ãáâ©È;bcfÒã¬ã°ã´ot;æ¶ir;櫱Ä;oã¹ã¼ìð¥rk;æ«Ã¡ã¢rime;æ´Æaipããã¤dÃ¥áÎadempstã¡ããããããngleÊ;dlqrã°ã±ã¶ããæµown»ᶻeftÄ;eâ ã¾Ã±à¤®;æightÄ;eãªãñáot;æ¬inus;樺lus;樹b;æ§ime;樻ezium;æ¢Æchtã²ã½ãÄryã·ã»;ìð;äcy;ärok;ä
§Äioããxôá·headÄlrãã eftarro÷à¡ightarrow»à½à¤AHabcdfghlmoprstuwãããã¤ã°ã¼ã ã 㠣㠴ã¡ã¡ã¡«ã¢©ã£ã£ã£ªã£¶ròÏar;楣Äcrãã¢uteè»ÃºäºÃ²á
rÇ£ãª\0ãy;äve;ä
Äiyãµãºrcè»Ã»ä»;äÆabhã ã ã ròálac;ä
±aòáÄirã ã sht;楾;ìð²raveè»Ã¹ä¹Å¡ã §ã ±rÄlr㠬㠮»à¥Â»álk;æÄctã ¹ã¡É¯ã ¿\0\0ã¡rnÄ;eã¡
ã¡ær»ã¡op;æri;æ¸Äalã¡ã¡cr;ä
«è»Â¨ÍÄgp㡢㡦on;ä
³f;ìð¦Ìadhlsuá
㡸㡽á²ã¢ã¢ ownáá³arpoonÄlrã¢ã¢efôã ighô㠯iÆ;hlã¢ã¢ã¢ä
»áºon»ã¢parrows;æÆcit㢰ã£ã£É¯ã¢¶\0\0ã£rnÄ;e㢼㢽ær»㢽op;æng;ä
¯ri;æ¹cr;ìðÆdirã£ã£ã£¢ot;æ°lde;ä
©iÄ;fã°ã£¨Â»á Äam㣯㣲rò㢨lè»Ã¼ä¼angle;榧ÞABDacdeflnoprszã¤ã¤ã¤©ã¤ã¦µã¦¸ã¦½ã§ã§¤ã§¨ã§³ã§¹ã§½ã¨ã¨ ròϷarÄ;v㤦㤧櫨;æ«©asèϡÄnr㤲㤷grt;æ¦Îeknprstã£ã¥ã¥ã¥ã¥ã¥¤ã¦appáâothinÃ§áºÆhirã«â»ã¥opô⾵Ä;há·ã¥¢Ã¯ãÄiu㥩ã¥gmáã³Äbp㥲ã¦setneqÄ;q㥽ã¦ìâï¸;ìâ«ï¸setneqÄ;qã¦ã¦ìâï¸;ìâ«ï¸Ährã¦ã¦etáãiangleÄlr㦪㦯eft»थight»áy;ä²ashÂ»á¶Æelrã§ã§ã§Æ;beâ·ªã§ã§ar;æ»q;ælip;æ®Äbtã§á¨aòá©r;ìð³tré㦮suÄbp㧯㧱»à´Â»àµpf;ìð§roð໻tré㦴Äcuã¨ã¨r;ìðÄbpã¨ã¨nÄEeã¦ã¨Â»ã¥¾nÄEeã¦ã¨Â»ã¦igzag;æ¦Îcefoprs㨶㨻ã©ã©ã©ã©¡ã©ªirc;ä
µÄdiã©ã©Äbgã©
ã©ar;æ©eÄ;qáºã©;æerp;ær;ìð´pf;ìð¨Ä;eá¹ã©¦atèá¹cr;ìðà«£áãª\0ãª\0ãªãª\0\0ãªãª¨ãª«ãª¯\0\0ã«ã«\0ã«áátréár;ìðµÄAaãªãªròÏrò৶;ä¾ÄAa㪡㪤ròθrò৫aðâis;æ»Ædptá¤ãªµãª¾Äfl㪺á©;ìð©imÃ¥á²ÄAaã«ã«ròÏròà¨Äcqã«á¸r;ìðÄptáã«réáÐacefiosu㫰㫽ã¬ã¬ã¬ã¬ã¬ã¬¡cÄuyã«¶ã«»teè»Ã½ä½;äÄiyã¬ã¬rc;ä
·;änè»Â¥ä¥r;ìð¶cy;äpf;ìðªcr;ìðÄcm㬦㬩y;älè»Ã¿ä¿Ôacdefhioswããããã¤ã©ãã´ãºã®cute;ä
ºÄayããron;ä
¾;ä·ot;ä
¼Äetãã¡træáa;ä¶r;ìð·cy;ä¶grarr;æpf;ìð«cr;ìðÄjnã®
ã®;æj;æ
115'.split("").map(function(i){return i.charCodeAt(0)}));var Zp={};Object.defineProperty(Zp,"__esModule",{value:!0});Zp.default=new Uint16Array("Èaglq ��\x1BÉ�\0\0�p;ä¦os;ä§t;ä¾t;ä¼uot;ä¢".split("").map(function(i){return i.charCodeAt(0)}));var Ch={};(function(i){var e;Object.defineProperty(i,"__esModule",{value:!0}),i.replaceCodePoint=i.fromCodePoint=void 0;var t=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);i.fromCodePoint=(e=String.fromCodePoint)!==null&&e!==void 0?e:function(s){var o="";return s>65535&&(s-=65536,o+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),o+=String.fromCharCode(s),o};function n(s){var o;return s>=55296&&s<=57343||s>1114111?65533:(o=t.get(s))!==null&&o!==void 0?o:s}i.replaceCodePoint=n;function r(s){return(0,i.fromCodePoint)(n(s))}i.default=r})(Ch);(function(i){var e=ee&&ee.__createBinding||(Object.create?function(D,k,A,C){C===void 0&&(C=A);var T=Object.getOwnPropertyDescriptor(k,A);(!T||("get"in T?!k.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return k[A]}}),Object.defineProperty(D,C,T)}:function(D,k,A,C){C===void 0&&(C=A),D[C]=k[A]}),t=ee&&ee.__setModuleDefault||(Object.create?function(D,k){Object.defineProperty(D,"default",{enumerable:!0,value:k})}:function(D,k){D.default=k}),n=ee&&ee.__importStar||function(D){if(D&&D.__esModule)return D;var k={};if(D!=null)for(var A in D)A!=="default"&&Object.prototype.hasOwnProperty.call(D,A)&&e(k,D,A);return t(k,D),k},r=ee&&ee.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(i,"__esModule",{value:!0}),i.decodeXML=i.decodeHTMLStrict=i.decodeHTMLAttribute=i.decodeHTML=i.determineBranch=i.EntityDecoder=i.DecodingMode=i.BinTrieFlags=i.fromCodePoint=i.replaceCodePoint=i.decodeCodePoint=i.xmlDecodeTree=i.htmlDecodeTree=void 0;var s=r(Qp);i.htmlDecodeTree=s.default;var o=r(Zp);i.xmlDecodeTree=o.default;var l=n(Ch);i.decodeCodePoint=l.default;var a=Ch;Object.defineProperty(i,"replaceCodePoint",{enumerable:!0,get:function(){return a.replaceCodePoint}}),Object.defineProperty(i,"fromCodePoint",{enumerable:!0,get:function(){return a.fromCodePoint}});var u;(function(D){D[D.NUM=35]="NUM",D[D.SEMI=59]="SEMI",D[D.EQUALS=61]="EQUALS",D[D.ZERO=48]="ZERO",D[D.NINE=57]="NINE",D[D.LOWER_A=97]="LOWER_A",D[D.LOWER_F=102]="LOWER_F",D[D.LOWER_X=120]="LOWER_X",D[D.LOWER_Z=122]="LOWER_Z",D[D.UPPER_A=65]="UPPER_A",D[D.UPPER_F=70]="UPPER_F",D[D.UPPER_Z=90]="UPPER_Z"})(u||(u={}));var c=32,h;
vendor: 4,653 bytes, line 115
115(function(D){D[D.VALUE_LENGTH=49152]="VALUE_LENGTH",D[D.BRANCH_LENGTH=16256]="BRANCH_LENGTH",D[D.JUMP_TABLE=127]="JUMP_TABLE"})(h=i.BinTrieFlags||(i.BinTrieFlags={}));function d(D){return D>=u.ZERO&&D<=u.NINE}function f(D){return D>=u.UPPER_A&&D<=u.UPPER_F||D>=u.LOWER_A&&D<=u.LOWER_F}function p(D){return D>=u.UPPER_A&&D<=u.UPPER_Z||D>=u.LOWER_A&&D<=u.LOWER_Z||d(D)}function b(D){return D===u.EQUALS||p(D)}var m;(function(D){D[D.EntityStart=0]="EntityStart",D[D.NumericStart=1]="NumericStart",D[D.NumericDecimal=2]="NumericDecimal",D[D.NumericHex=3]="NumericHex",D[D.NamedEntity=4]="NamedEntity"})(m||(m={}));var v;(function(D){D[D.Legacy=0]="Legacy",D[D.Strict=1]="Strict",D[D.Attribute=2]="Attribute"})(v=i.DecodingMode||(i.DecodingMode={}));var g=function(){function D(k,A,C){this.decodeTree=k,this.emitCodePoint=A,this.errors=C,this.state=m.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=v.Strict}return D.prototype.startEntity=function(k){this.decodeMode=k,this.state=m.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},D.prototype.write=function(k,A){switch(this.state){case m.EntityStart:return k.charCodeAt(A)===u.NUM?(this.state=m.NumericStart,this.consumed+=1,this.stateNumericStart(k,A+1)):(this.state=m.NamedEntity,this.stateNamedEntity(k,A));case m.NumericStart:return this.stateNumericStart(k,A);case m.NumericDecimal:return this.stateNumericDecimal(k,A);case m.NumericHex:return this.stateNumericHex(k,A);case m.NamedEntity:return this.stateNamedEntity(k,A)}},D.prototype.stateNumericStart=function(k,A){return A>=k.length?-1:(k.charCodeAt(A)|c)===u.LOWER_X?(this.state=m.NumericHex,this.consumed+=1,this.stateNumericHex(k,A+1)):(this.state=m.NumericDecimal,this.stateNumericDecimal(k,A))},D.prototype.addToNumericResult=function(k,A,C,T){if(A!==C){var L=C-A;this.result=this.result*Math.pow(T,L)+parseInt(k.substr(A,L),T),this.consumed+=L}},D.prototype.stateNumericHex=function(k,A){for(var C=A;A<k.length;){var T=k.charCodeAt(A);if(d(T)||f(T))A+=1;else return this.addToNumericResult(k,C,A,16),this.emitNumericEntity(T,3)}return this.addToNumericResult(k,C,A,16),-1},D.prototype.stateNumericDecimal=function(k,A){for(var C=A;A<k.length;){var T=k.charCodeAt(A);if(d(T))A+=1;else return this.addToNumericResult(k,C,A,10),this.emitNumericEntity(T,2)}return this.addToNumericResult(k,C,A,10),-1},D.prototype.emitNumericEntity=function(k,A){var C;if(this.consumed<=A)return(C=this.errors)===null||C===void 0||C.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(k===u.SEMI)this.consumed+=1;else if(this.decodeMode===v.Strict)return 0;return this.emitCodePoint((0,l.replaceCodePoint)(this.result),this.consumed),this.errors&&(k!==u.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},D.prototype.stateNamedEntity=function(k,A){for(var C=this.decodeTree,T=C[this.treeIndex],L=(T&h.VALUE_LENGTH)>>14;A<k.length;A++,this.excess++){var I=k.charCodeAt(A);if(this.treeIndex=w(C,T,this.treeIndex+Math.max(1,L),I),this.treeIndex<0)return this.result===0||this.decodeMode===v.Attribute&&(L===0||b(I))?0:this.emitNotTerminatedNamedEntity();if(T=C[this.treeIndex],L=(T&h.VALUE_LENGTH)>>14,L!==0){if(I===u.SEMI)return this.emitNamedEntityData(this.treeIndex,L,this.consumed+this.excess);this.decodeMode!==v.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},D.prototype.emitNotTerminatedNamedEntity=function(){var k,A=this,C=A.result,T=A.decodeTree,L=(T[C]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(C,L,this.consumed),(k=this.errors)===null||k===void 0||k.missingSemicolonAfterCharacterReference(),this.consumed},D.prototype.emitNamedEntityData=function(k,A,C){var T=this.decodeTree;return this.emitCodePoint(A===1?T[k]&~h.VALUE_LENGTH:T[k+1],C),A===3&&this.emitCodePoint(T[k+2],C),C},D.prototype.end=function(){var k;switch(this.state){case m.NamedEntity:return this.result!==0&&(this.decodeMode!==v.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case m.NumericDecimal:return this.emitNumericEntity(0,2);case m.NumericHex:return this.emitNumericEntity(0,3);case m.NumericStart:return(k=this.errors)===null||k===void 0||k.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case m.EntityStart:return 0}},D}();i.EntityDecoder=g;function y(D){var k="",A=new g(D,function(C){return k+=(0,l.fromCodePoint)(C)});return function(T,L){for(var I=0,P=0;(P=T.indexOf("&",P))>=0;){k+=T.slice(I,P),A.startEntity(L);var R=A.write(T,P+1);if(R<0){I=P+A.end();break}I=P+R,P=R===0?I+1:I}var z=k+T.slice(I);return k="",z}}
115function w(D,k,A,C){var T=(k&h.BRANCH_LENGTH)>>7,L=k&h.JUMP_TABLE;if(T===0)return L!==0&&C===L?A:-1;if(L){var I=C-L;return I<0||I>=T?-1:D[A+I]-1}for(var P=A,R=P+T-1;P<=R;){var z=P+R>>>1,N=D[z];if(N<C)P=z+1;else if(N>C)R=z-1;else return D[z+T]}return-1}i.determineBranch=w;var E=y(s.default),x=y(o.default);function S(D,k){return k===void 0&&(k=v.Legacy),E(D,k)}i.decodeHTML=S;function _(D){return E(D,v.Attribute)}i.decodeHTMLAttribute=_;function M(D){return E(D,v.Strict)}i.decodeHTMLStrict=M;function O(D){return x(D,v.Strict)}i.decodeXML=O})(To);(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.QuoteType=void 0;var e=To,t;(function(d){d[d.Tab=9]="Tab",d[d.NewLine=10]="NewLine",d[d.FormFeed=12]="FormFeed",d[d.CarriageReturn=13]="CarriageReturn",d[d.Space=32]="Space",d[d.ExclamationMark=33]="ExclamationMark",d[d.Number=35]="Number",d[d.Amp=38]="Amp",d[d.SingleQuote=39]="SingleQuote",d[d.DoubleQuote=34]="DoubleQuote",d[d.Dash=45]="Dash",d[d.Slash=47]="Slash",d[d.Zero=48]="Zero",d[d.Nine=57]="Nine",d[d.Semi=59]="Semi",d[d.Lt=60]="Lt",d[d.Eq=61]="Eq",d[d.Gt=62]="Gt",d[d.Questionmark=63]="Questionmark",d[d.UpperA=65]="UpperA",d[d.LowerA=97]="LowerA",d[d.UpperF=70]="UpperF",d[d.LowerF=102]="LowerF",d[d.UpperZ=90]="UpperZ",d[d.LowerZ=122]="LowerZ",d[d.LowerX=120]="LowerX",d[d.OpeningSquareBracket=91]="OpeningSquareBracket"})(t||(t={}));var n;(function(d){d[d.Text=1]="Text",d[d.BeforeTagName=2]="BeforeTagName",d[d.InTagName=3]="InTagName",d[d.InSelfClosingTag=4]="InSelfClosingTag",d[d.BeforeClosingTagName=5]="BeforeClosingTagName",d[d.InClosingTagName=6]="InClosingTagName",d[d.AfterClosingTagName=7]="AfterClosingTagName",d[d.BeforeAttributeName=8]="BeforeAttributeName",d[d.InAttributeName=9]="InAttributeName",d[d.AfterAttributeName=10]="AfterAttributeName",d[d.BeforeAttributeValue=11]="BeforeAttributeValue",d[d.InAttributeValueDq=12]="InAttributeValueDq",d[d.InAttributeValueSq=13]="InAttributeValueSq",d[d.InAttributeValueNq=14]="InAttributeValueNq",d[d.BeforeDeclaration=15]="BeforeDeclaration",d[d.InDeclaration=16]="InDeclaration",d[d.InProcessingInstruction=17]="InProcessingInstruction",d[d.BeforeComment=18]="BeforeComment",d[d.CDATASequence=19]="CDATASequence",d[d.InSpecialComment=20]="InSpecialComment",d[d.InCommentLike=21]="InCommentLike",d[d.BeforeSpecialS=22]="BeforeSpecialS",d[d.SpecialStartSequence=23]="SpecialStartSequence",d[d.InSpecialTag=24]="InSpecialTag",d[d.BeforeEntity=25]="BeforeEntity",d[d.BeforeNumericEntity=26]="BeforeNumericEntity",d[d.InNamedEntity=27]="InNamedEntity",d[d.InNumericEntity=28]="InNumericEntity",d[d.InHexEntity=29]="InHexEntity"})(n||(n={}));function r(d){return d===t.Space||d===t.NewLine||d===t.Tab||d===t.FormFeed||d===t.CarriageReturn}function s(d){return d===t.Slash||d===t.Gt||r(d)}function o(d){return d>=t.Zero&&d<=t.Nine}function l(d){return d>=t.LowerA&&d<=t.LowerZ||d>=t.UpperA&&d<=t.UpperZ}function a(d){return d>=t.UpperA&&d<=t.UpperF||d>=t.LowerA&&d<=t.LowerF}var u;(function(d){d[d.NoValue=0]="NoValue",d[d.Unquoted=1]="Unquoted",d[d.Single=2]="Single",d[d.Double=3]="Double"})(u=i.QuoteType||(i.QuoteType={}));var c={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},h=function(){function d(f,p){var b=f.xmlMode,m=b===void 0?!1:b,v=f.decodeEntities,g=v===void 0?!0:v;this.cbs=p,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=m,this.decodeEntities=g,this.entityTrie=m?e.xmlDecodeTree:e.htmlDecodeTree}return d.prototype.reset=function(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},d.prototype.write=function(f){this.offset+=this.buffer.length,this.buffer=f,this.parse()},d.prototype.end=function(){this.running&&this.finish()},d.prototype.pause=function(){this.running=!1},d.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},d.prototype.getIndex=function(){return this.index},d.prototype.getSectionStart=function(){return this.sectionStart},d.prototype.stateText=function(f){f===t.Lt||!this.decodeEntities&&this.fastForwardTo(t.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&f===t.Amp&&(this.state=n.BeforeEntity)},d.prototype.stateSpecialStartSequence=function(f){var p=this.sequenceIndex===this.currentSequence.length,b=p?s(f):(f|32)===this.currentSequence[this.sequenceIndex];if(!b)this.isSpecial=!1;else if(!p){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(f)},d.prototype.stateInSpecialTag=function(f){if(this.sequenceIndex===this.currentSequence.length){if(f===t.Gt||r(f)){var p=this.index-this.currentSequence.length;if(this.sectionStart<p){var b=this.index;this.index=p,this.cbs.ontext(this.sectionStart,p),this.index=b}this.isSpecial=!1,this.sectionStart=p+2,this.stateInClosingTagName(f);return}this.sequenceIndex=0}(f|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===c.TitleEnd?this.decodeEntities&&f===t.Amp&&(this.state=n.BeforeEntity):this.fastForwardTo(t.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=+(f===t.Lt)},d.prototype.stateCDATASequence=function(f){f===c.Cdata[this.sequenceIndex]?++this.sequenceIndex===c.Cdata.length&&(this.state=n.InCommentLike,this.currentSequence=c.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=n.InDeclaration,this.stateInDeclaration(f))},d.prototype.fastForwardTo=function(f){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===f)return!0;return this.index=this.buffer.length+this.offset-1,!1},d.prototype.stateInCommentLike=function(f){f===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===c.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=n.Text):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):f!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},d.prototype.isTagStartChar=function(f){return this.xmlMode?!s(f):l(f)},d.prototype.startSpecial=function(f,p){this.isSpecial=!0,this.currentSequence=f,this.sequenceIndex=p,this.state=n.SpecialStartSequence},d.prototype.stateBeforeTagName=function(f){if(f===t.ExclamationMark)this.state=n.BeforeDeclaration,this.sectionStart=this.index+1;else if(f===t.Questionmark)this.state=n.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(f)){var p=f|32;this.sectionStart=this.index,!this.xmlMode&&p===c.TitleEnd[2]?this.startSpecial(c.TitleEnd,3):this.state=!this.xmlMode&&p===c.ScriptEnd[2]?n.BeforeSpecialS:n.InTagName}else f===t.Slash?this.state=n.BeforeClosingTagName:(this.state=n.Text,this.stateText(f))},d.prototype.stateInTagName=function(f){s(f)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f))},d.prototype.stateBeforeClosingTagName=function(f){r(f)||(f===t.Gt?this.state=n.Text:(this.state=this.isTagStartChar(f)?n.InClosingTagName:n.InSpecialComment,this.sectionStart=this.index))},d.prototype.stateInClosingTagName=function(f){(f===t.Gt||r(f))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.AfterClosingTagName,this.stateAfterClosingTagName(f))},d.prototype.stateAfterClosingTagName=function(f){(f===t.Gt||this.fastForwardTo(t.Gt))&&(this.state=n.Text,this.baseState=n.Text,this.sectionStart=this.index+1)},d.prototype.stateBeforeAttributeName=function(f){f===t.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=n.InSpecialTag,this.sequenceIndex=0):this.state=n.Text,this.baseState=this.state,this.sectionStart=this.index+1):f===t.Slash?this.state=n.InSelfClosingTag:r(f)||(this.state=n.InAttributeName,this.sectionStart=this.index)},d.prototype.stateInSelfClosingTag=function(f){f===t.Gt?(this.cbs.onselfclosingtag(this.index),this.state=n.Text,this.baseState=n.Text,this.sectionStart=this.index+1,this.isSpecial=!1):r(f)||(this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f))}
vendor: 15,813 bytes, line 115
115,d.prototype.stateInAttributeName=function(f){(f===t.Eq||s(f))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=n.AfterAttributeName,this.stateAfterAttributeName(f))},d.prototype.stateAfterAttributeName=function(f){f===t.Eq?this.state=n.BeforeAttributeValue:f===t.Slash||f===t.Gt?(this.cbs.onattribend(u.NoValue,this.index),this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f)):r(f)||(this.cbs.onattribend(u.NoValue,this.index),this.state=n.InAttributeName,this.sectionStart=this.index)},d.prototype.stateBeforeAttributeValue=function(f){f===t.DoubleQuote?(this.state=n.InAttributeValueDq,this.sectionStart=this.index+1):f===t.SingleQuote?(this.state=n.InAttributeValueSq,this.sectionStart=this.index+1):r(f)||(this.sectionStart=this.index,this.state=n.InAttributeValueNq,this.stateInAttributeValueNoQuotes(f))},d.prototype.handleInAttributeValue=function(f,p){f===p||!this.decodeEntities&&this.fastForwardTo(p)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(p===t.DoubleQuote?u.Double:u.Single,this.index),this.state=n.BeforeAttributeName):this.decodeEntities&&f===t.Amp&&(this.baseState=this.state,this.state=n.BeforeEntity)},d.prototype.stateInAttributeValueDoubleQuotes=function(f){this.handleInAttributeValue(f,t.DoubleQuote)},d.prototype.stateInAttributeValueSingleQuotes=function(f){this.handleInAttributeValue(f,t.SingleQuote)},d.prototype.stateInAttributeValueNoQuotes=function(f){r(f)||f===t.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(u.Unquoted,this.index),this.state=n.BeforeAttributeName,this.stateBeforeAttributeName(f)):this.decodeEntities&&f===t.Amp&&(this.baseState=this.state,this.state=n.BeforeEntity)},d.prototype.stateBeforeDeclaration=function(f){f===t.OpeningSquareBracket?(this.state=n.CDATASequence,this.sequenceIndex=0):this.state=f===t.Dash?n.BeforeComment:n.InDeclaration},d.prototype.stateInDeclaration=function(f){(f===t.Gt||this.fastForwardTo(t.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=n.Text,this.sectionStart=this.index+1)},d.prototype.stateInProcessingInstruction=function(f){(f===t.Gt||this.fastForwardTo(t.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=n.Text,this.sectionStart=this.index+1)},d.prototype.stateBeforeComment=function(f){f===t.Dash?(this.state=n.InCommentLike,this.currentSequence=c.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=n.InDeclaration},d.prototype.stateInSpecialComment=function(f){(f===t.Gt||this.fastForwardTo(t.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=n.Text,this.sectionStart=this.index+1)},d.prototype.stateBeforeSpecialS=function(f){var p=f|32;p===c.ScriptEnd[3]?this.startSpecial(c.ScriptEnd,4):p===c.StyleEnd[3]?this.startSpecial(c.StyleEnd,4):(this.state=n.InTagName,this.stateInTagName(f))},d.prototype.stateBeforeEntity=function(f){this.entityExcess=1,this.entityResult=0,f===t.Number?this.state=n.BeforeNumericEntity:f===t.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=n.InNamedEntity,this.stateInNamedEntity(f))},d.prototype.stateInNamedEntity=function(f){if(this.entityExcess+=1,this.trieIndex=(0,e.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,f),this.trieIndex<0){this.emitNamedEntity(),this.index--;return}this.trieCurrent=this.entityTrie[this.trieIndex];var p=this.trieCurrent&e.BinTrieFlags.VALUE_LENGTH;if(p){var b=(p>>14)-1;if(!this.allowLegacyEntity()&&f!==t.Semi)this.trieIndex+=b;else{var m=this.index-this.entityExcess+1;m>this.sectionStart&&this.emitPartial(this.sectionStart,m),this.entityResult=this.trieIndex,this.trieIndex+=b,this.entityExcess=0,this.sectionStart=this.index+1,b===0&&this.emitNamedEntity()}}},d.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var f=(this.entityTrie[this.entityResult]&e.BinTrieFlags.VALUE_LENGTH)>>14;switch(f){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~e.BinTrieFlags.VALUE_LENGTH);break}case 2:{this.emitCodePoint(this.entityTrie[this.entityResult+1]);break}case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}}},d.prototype.stateBeforeNumericEntity=function(f){(f|32)===t.LowerX?(this.entityExcess++,this.state=n.InHexEntity):(this.state=n.InNumericEntity,this.stateInNumericEntity(f))},d.prototype.emitNumericEntity=function(f){var p=this.index-this.entityExcess-1,b=p+2+ +(this.state===n.InHexEntity);b!==this.index&&(p>this.sectionStart&&this.emitPartial(this.sectionStart,p),this.sectionStart=this.index+Number(f),this.emitCodePoint((0,e.replaceCodePoint)(this.entityResult))),this.state=this.baseState},d.prototype.stateInNumericEntity=function(f){f===t.Semi?this.emitNumericEntity(!0):o(f)?(this.entityResult=this.entityResult*10+(f-t.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.stateInHexEntity=function(f){f===t.Semi?this.emitNumericEntity(!0):o(f)?(this.entityResult=this.entityResult*16+(f-t.Zero),this.entityExcess++):a(f)?(this.entityResult=this.entityResult*16+((f|32)-t.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},d.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===n.Text||this.baseState===n.InSpecialTag)},d.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},d.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},d.prototype.parse=function(){for(;this.shouldContinue();){var f=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case n.Text:{this.stateText(f);break}case n.SpecialStartSequence:{this.stateSpecialStartSequence(f);break}case n.InSpecialTag:{this.stateInSpecialTag(f);break}case n.CDATASequence:{this.stateCDATASequence(f);break}case n.InAttributeValueDq:{this.stateInAttributeValueDoubleQuotes(f);break}case n.InAttributeName:{this.stateInAttributeName(f);break}case n.InCommentLike:{this.stateInCommentLike(f);break}case n.InSpecialComment:{this.stateInSpecialComment(f);break}case n.BeforeAttributeName:{this.stateBeforeAttributeName(f);break}case n.InTagName:{this.stateInTagName(f);break}case n.InClosingTagName:{this.stateInClosingTagName(f);break}case n.BeforeTagName:{this.stateBeforeTagName(f);break}case n.AfterAttributeName:{this.stateAfterAttributeName(f);break}case n.InAttributeValueSq:{this.stateInAttributeValueSingleQuotes(f);break}case n.BeforeAttributeValue:{this.stateBeforeAttributeValue(f);break}case n.BeforeClosingTagName:{this.stateBeforeClosingTagName(f);break}case n.AfterClosingTagName:{this.stateAfterClosingTagName(f);break}case n.BeforeSpecialS:{this.stateBeforeSpecialS(f);break}case n.InAttributeValueNq:{this.stateInAttributeValueNoQuotes(f);break}case n.InSelfClosingTag:{this.stateInSelfClosingTag(f);break}case n.InDeclaration:{this.stateInDeclaration(f);break}case n.BeforeDeclaration:{this.stateBeforeDeclaration(f);break}case n.BeforeComment:{this.stateBeforeComment(f);break}case n.InProcessingInstruction:{this.stateInProcessingInstruction(f);break}case n.InNamedEntity:{this.stateInNamedEntity(f);break}case n.BeforeEntity:{this.stateBeforeEntity(f);break}case n.InHexEntity:{this.stateInHexEntity(f);break}case n.InNumericEntity:{this.stateInNumericEntity(f);break}default:this.stateBeforeNumericEntity(f)}this.index++}this.cleanup()},d.prototype.finish=function(){this.state===n.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},d.prototype.handleTrailingData=function(){var f=this.buffer.length+this.offset;this.state===n.InCommentLike?this.currentSequence===c.CdataEnd?this.cbs.oncdata(this.sectionStart,f,0):this.cbs.oncomment(this.sectionStart,f,0):this.state===n.InNumericEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===n.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===n.InTagName||this.state===n.BeforeAttributeName||this.state===n.BeforeAttributeValue||this.state===n.AfterAttributeName||this.state===n.InAttributeName||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueDq||this.state===n.InAttributeValueNq||this.state===n.InClosingTagName||this.cbs.ontext(this.sectionStart,f)},d.prototype.emitPartial=function(f,p){this.baseState!==n.Text&&this.baseState!==n.InSpecialTag?this.cbs.onattribdata(f,p):this.cbs.ontext(f,p)},d.prototype.emitCodePoint=function(f){this.baseState!==n.Text&&this.baseState!==n.InSpecialTag?this.cbs.onattribentity(f):this.cbs.ontextentity(f)},d}();i.default=h})(Jp);var _L=ee&&ee.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),AL=ee&&ee.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),LL=ee&&ee.__importStar||function(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&_L(e,i,t);return AL(e,i),e};Object.defineProperty(Eo,"__esModule",{value:!0});Eo.Parser=void 0;var Sa=LL(Jp),o0=To,Ir=new Set(["input","option","optgroup","select","button","datalist","textarea"]),Te=new Set(["p"]),a0=new Set(["thead","tbody"]),l0=new Set(["dd","dt"]),u0=new Set(["rt","rp"]),ML=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",Te],["h1",Te],["h2",Te],["h3",Te],["h4",Te],["h5",Te],["h6",Te],["select",Ir],["input",Ir],["output",Ir],["button",Ir],["datalist",Ir],["textarea",Ir],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",l0],["dt",l0],["address",Te],["article",Te],["aside",Te],["blockquote",Te],["details",Te],["div",Te],["dl",Te],["fieldset",Te],["figcaption",Te],["figure",Te],["footer",Te],["form",Te],["header",Te],["hr",Te],["main",Te],["nav",Te],["ol",Te],["pre",Te],["section",Te],["table",Te],["ul",Te],["rt",u0],["rp",u0],["tbody",a0],["tfoot",a0]]),IL=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c0=new Set(["math","svg"]),d0=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),OL=/\s|\//,DL=function(){function i(e,t){t===void 0&&(t={});var n,r,s,o,l;this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=e??{},this.lowerCaseTagNames=(n=t.lowerCaseTags)!==null&&n!==void 0?n:!t.xmlMode,this.lowerCaseAttributeNames=(r=t.lowerCaseAttributeNames)!==null&&r!==void 0?r:!t.xmlMode,this.tokenizer=new((s=t.Tokenizer)!==null&&s!==void 0?s:Sa.default)(this.options,this),(l=(o=this.cbs).onparserinit)===null||l===void 0||l.call(o,this)}return i.prototype.ontext=function(e,t){var n,r,s=this.getSlice(e,t);this.endIndex=t-1,(r=(n=this.cbs).ontext)===null||r===void 0||r.call(n,s),this.startIndex=t},i.prototype.ontextentity=function(e){var t,n,r=this.tokenizer.getSectionStart();this.endIndex=r-1,(n=(t=this.cbs).ontext)===null||n===void 0||n.call(t,(0,o0.fromCodePoint)(e)),this.startIndex=r},i.prototype.isVoidElement=function(e){return!this.options.xmlMode&&IL.has(e)},i.prototype.onopentagname=function(e,t){this.endIndex=t;var n=this.getSlice(e,t);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)},i.prototype.emitOpenTag=function(e){var t,n,r,s;this.openTagStart=this.startIndex,this.tagname=e;var o=!this.options.xmlMode&&ML.get(e);if(o)for(;this.stack.length>0&&o.has(this.stack[this.stack.length-1]);){var l=this.stack.pop();(n=(t=this.cbs).onclosetag)===null||n===void 0||n.call(t,l,!0)}this.isVoidElement(e)||(this.stack.push(e),c0.has(e)?this.foreignContext.push(!0):d0.has(e)&&this.foreignContext.push(!1)),(s=(r=this.cbs).onopentagname)===null||s===void 0||s.call(r,e),this.cbs.onopentag&&(this.attribs={})},i.prototype.endOpenTag=function(e){var t,n;this.startIndex=this.openTagStart,this.attribs&&((n=(t=this.cbs).onopentag)===null||n===void 0||n.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},i.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},i.prototype.onclosetag=function(e,t){var n,r,s,o,l,a;this.endIndex=t;var u=this.getSlice(e,t);if(this.lowerCaseTagNames&&(u=u.toLowerCase()),(c0.has(u)||d0.has(u))&&this.foreignContext.pop(),this.isVoidElement(u))!this.options.xmlMode&&u==="br"&&((r=(n=this.cbs).onopentagname)===null||r===void 0||r.call(n,"br"),(o=(s=this.cbs).onopentag)===null||o===void 0||o.call(s,"br",{},!0),(a=(l=this.cbs).onclosetag)===null||a===void 0||a.call(l,"br",!1));else{var c=this.stack.lastIndexOf(u);if(c!==-1)if(this.cbs.onclosetag)for(var h=this.stack.length-c;h--;)this.cbs.onclosetag(this.stack.pop(),h!==0);else this.stack.length=c;else!this.options.xmlMode&&u==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},i.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},i.prototype.closeCurrentTag=function(e){var t,n,r=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===r&&((n=(t=this.cbs).onclosetag)===null||n===void 0||n.call(t,r,!e),this.stack.pop())},i.prototype.onattribname=function(e,t){this.startIndex=e;var n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},i.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},i.prototype.onattribentity=function(e){this.attribvalue+=(0,o0.fromCodePoint)(e)},i.prototype.onattribend=function(e,t){var n,r;this.endIndex=t,(r=(n=this.cbs).onattribute)===null||r===void 0||r.call(n,this.attribname,this.attribvalue,e===Sa.QuoteType.Double?'"':e===Sa.QuoteType.Single?"'":e===Sa.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},i.prototype.getInstructionName=function(e){var t=e.search(OL),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},i.prototype.ondeclaration=function(e,t){this.endIndex=t;var n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(r),"!".concat(n))}this.startIndex=t+1},i.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(r),"?".concat(n))}this.startIndex=t+1},i.prototype.oncomment=function(e,t,n){var r,s,o,l;this.endIndex=t,(s=(r=this.cbs).oncomment)===null||s===void 0||s.call(r,this.get
115Slice(e,t-n)),(l=(o=this.cbs).oncommentend)===null||l===void 0||l.call(o),this.startIndex=t+1},i.prototype.oncdata=function(e,t,n){var r,s,o,l,a,u,c,h,d,f;this.endIndex=t;var p=this.getSlice(e,t-n);this.options.xmlMode||this.options.recognizeCDATA?((s=(r=this.cbs).oncdatastart)===null||s===void 0||s.call(r),(l=(o=this.cbs).ontext)===null||l===void 0||l.call(o,p),(u=(a=this.cbs).oncdataend)===null||u===void 0||u.call(a)):((h=(c=this.cbs).oncomment)===null||h===void 0||h.call(c,"[CDATA[".concat(p,"]]")),(f=(d=this.cbs).oncommentend)===null||f===void 0||f.call(d)),this.startIndex=t+1},i.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(t=(e=this.cbs).onend)===null||t===void 0||t.call(e)},i.prototype.reset=function(){var e,t,n,r;(t=(e=this.cbs).onreset)===null||t===void 0||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(r=(n=this.cbs).onparserinit)===null||r===void 0||r.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},i.prototype.parseComplete=function(e){this.reset(),this.end(e)},i.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n},i.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},i.prototype.write=function(e){var t,n;if(this.ended){(n=(t=this.cbs).onerror)===null||n===void 0||n.call(t,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)},i.prototype.end=function(e){var t,n;if(this.ended){(n=(t=this.cbs).onerror)===null||n===void 0||n.call(t,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()},i.prototype.pause=function(){this.tokenizer.pause()},i.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},i.prototype.parseChunk=function(e){this.write(e)},i.prototype.done=function(e){this.end(e)},i}();Eo.Parser=DL;var Xn={},bs={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.Doctype=i.CDATA=i.Tag=i.Style=i.Script=i.Comment=i.Directive=i.Text=i.Root=i.isTag=i.ElementType=void 0;var e;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(e=i.ElementType||(i.ElementType={}));function t(n){return n.type===e.Tag||n.type===e.Script||n.type===e.Style}i.isTag=t,i.Root=e.Root,i.Text=e.Text,i.Directive=e.Directive,i.Comment=e.Comment,i.Script=e.Script,i.Style=e.Style,i.Tag=e.Tag,i.CDATA=e.CDATA,i.Doctype=e.Doctype})(bs);var pe={},Ri=ee&&ee.__extends||function(){var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&
vendor: 4,346 bytes, line 115
115(n[s]=r[s])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Zs=ee&&ee.__assign||function(){return Zs=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},Zs.apply(this,arguments)};Object.defineProperty(pe,"__esModule",{value:!0});pe.cloneNode=pe.hasChildren=pe.isDocument=pe.isDirective=pe.isComment=pe.isText=pe.isCDATA=pe.isTag=pe.Element=pe.Document=pe.CDATA=pe.NodeWithChildren=pe.ProcessingInstruction=pe.Comment=pe.Text=pe.DataNode=pe.Node=void 0;var St=bs,em=function(){function i(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(i.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),i.prototype.cloneNode=function(e){return e===void 0&&(e=!1),tm(this,e)},i}();pe.Node=em;var lc=function(i){Ri(e,i);function e(t){var n=i.call(this)||this;return n.data=t,n}return Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!1,configurable:!0}),e}(em);pe.DataNode=lc;var sw=function(i){Ri(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=St.ElementType.Text,t}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),e}(lc);pe.Text=sw;var ow=function(i){Ri(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=St.ElementType.Comment,t}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),e}(lc);pe.Comment=ow;var aw=function(i){Ri(e,i);function e(t,n){var r=i.call(this,n)||this;return r.name=t,r.type=St.ElementType.Directive,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),e}(lc);pe.ProcessingInstruction=aw;var uc=function(i){Ri(e,i);function e(t){var n=i.call(this)||this;return n.children=t,n}return Object.defineProperty(e.prototype,"firstChild",{get:function(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(t){this.children=t},enumerable:!1,configurable:!0}),e}(em);pe.NodeWithChildren=uc;var lw=function(i){Ri(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=St.ElementType.CDATA,t}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(uc);pe.CDATA=lw;var uw=function(i){Ri(e,i);function e(){var t=i!==null&&i.apply(this,arguments)||this;return t.type=St.ElementType.Root,t}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(uc);pe.Document=uw;var cw=function(i){Ri(e,i);function e(t,n,r,s){r===void 0&&(r=[]),s===void 0&&(s=t==="script"?St.ElementType.Script:t==="style"?St.ElementType.Style:St.ElementType.Tag);var o=i.call(this,r)||this;return o.name=t,o.attribs=n,o.type=s,o}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(t){this.name=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var t=this;return Object.keys(this.attribs).map(function(n){var r,s;return{name:n,value:t.attribs[n],namespace:(r=t["x-attribsNamespace"])===null||r===void 0?void 0:r[n],prefix:(s=t["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})}
vendor: 4,504 bytes, line 115
115,enumerable:!1,configurable:!0}),e}(uc);pe.Element=cw;function dw(i){return(0,St.isTag)(i)}pe.isTag=dw;function hw(i){return i.type===St.ElementType.CDATA}pe.isCDATA=hw;function fw(i){return i.type===St.ElementType.Text}pe.isText=fw;function pw(i){return i.type===St.ElementType.Comment}pe.isComment=pw;function mw(i){return i.type===St.ElementType.Directive}pe.isDirective=mw;function gw(i){return i.type===St.ElementType.Root}pe.isDocument=gw;function PL(i){return Object.prototype.hasOwnProperty.call(i,"children")}pe.hasChildren=PL;function tm(i,e){e===void 0&&(e=!1);var t;if(fw(i))t=new sw(i.data);else if(pw(i))t=new ow(i.data);else if(dw(i)){var n=e?td(i.children):[],r=new cw(i.name,Zs({},i.attribs),n);n.forEach(function(a){return a.parent=r}),i.namespace!=null&&(r.namespace=i.namespace),i["x-attribsNamespace"]&&(r["x-attribsNamespace"]=Zs({},i["x-attribsNamespace"])),i["x-attribsPrefix"]&&(r["x-attribsPrefix"]=Zs({},i["x-attribsPrefix"])),t=r}else if(hw(i)){var n=e?td(i.children):[],s=new lw(n);n.forEach(function(u){return u.parent=s}),t=s}else if(gw(i)){var n=e?td(i.children):[],o=new uw(n);n.forEach(function(u){return u.parent=o}),i["x-mode"]&&(o["x-mode"]=i["x-mode"]),t=o}else if(mw(i)){var l=new aw(i.name,i.data);i["x-name"]!=null&&(l["x-name"]=i["x-name"],l["x-publicId"]=i["x-publicId"],l["x-systemId"]=i["x-systemId"]),t=l}else throw new Error("Not implemented yet: ".concat(i.type));return t.startIndex=i.startIndex,t.endIndex=i.endIndex,i.sourceCodeLocation!=null&&(t.sourceCodeLocation=i.sourceCodeLocation),t}pe.cloneNode=tm;function td(i){for(var e=i.map(function(n){return tm(n,!0)}),t=1;t<e.length;t++)e[t].prev=e[t-1],e[t-1].next=e[t];return e}(function(i){var e=ee&&ee.__createBinding||(Object.create?function(l,a,u,c){c===void 0&&(c=u);var h=Object.getOwnPropertyDescriptor(a,u);(!h||("get"in h?!a.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return a[u]}}),Object.defineProperty(l,c,h)}:function(l,a,u,c){c===void 0&&(c=u),l[c]=a[u]}),t=ee&&ee.__exportStar||function(l,a){for(var u in l)u!=="default"&&!Object.prototype.hasOwnProperty.call(a,u)&&e(a,l,u)};Object.defineProperty(i,"__esModule",{value:!0}),i.DomHandler=void 0;var n=bs,r=pe;t(pe,i);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},o=function(){function l(a,u,c){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof u=="function"&&(c=u,u=s),typeof a=="object"&&(u=a,a=void 0),this.callback=a??null,this.options=u??s,this.elementCB=c??null}return l.prototype.onparserinit=function(a){this.parser=a},l.prototype.onreset=function(){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},l.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},l.prototype.onerror=function(a){this.handleCallback(a)},l.prototype.onclosetag=function(){this.lastNode=null;var a=this.tagStack.pop();this.options.withEndIndices&&(a.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(a)},l.prototype.onopentag=function(a,u){var c=this.options.xmlMode?n.ElementType.Tag:void 0,h=new r.Element(a,u,void 0,c);this.addNode(h),this.tagStack.push(h)},l.prototype.ontext=function(a){var u=this.lastNode;if(u&&u.type===n.ElementType.Text)u.data+=a,this.options.withEndIndices&&(u.endIndex=this.parser.endIndex);else{var c=new r.Text(a);this.addNode(c),this.lastNode=c}},l.prototype.oncomment=function(a){if(this.lastNode&&this.lastNode.type===n.ElementType.Comment){this.lastNode.data+=a;return}var u=new r.Comment(a);this.addNode(u),this.lastNode=u},l.prototype.oncommentend=function(){this.lastNode=null},l.prototype.oncdatastart=function(){var a=new r.Text(""),u=new r.CDATA([a]);this.addNode(u),a.parent=u,this.lastNode=a},l.prototype.oncdataend=function(){this.lastNode=null},l.prototype.onprocessinginstruction=function(a,u){var c=new r.ProcessingInstruction(a,u);this.addNode(c)},l.prototype.handleCallback=function(a){if(typeof this.callback=="function")this.callback(a,this.dom);else if(a)throw a},l.prototype.addNode=function(a){var u=this.tagStack[this.tagStack.length-1],c=u.children[u.children.length-1];this.options.withStartIndices&&(a.startIndex=this.parser.startIndex),this.options.withEndIndices&&(a.endIndex=this.parser.endIndex),u.children.push(a),c&&(a.prev=c,c.next=a),a.parent=u,this.lastNode=null},l}();i.DomHandler=o,i.default=o})(Xn);var sl={},Mt={},ea={},bw={},cr={},nm={};
115Object.defineProperty(nm,"__esModule",{value:!0});function Ca(i){for(var e=1;e<i.length;e++)i[e][0]+=i[e-1][0]+1;return i}nm.default=new Map(Ca
vendor: 10,610 bytes, line 115
115([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(
115Ca([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(Ca([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨
115"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(Ca([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]]));var Gl={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.escapeText=i.escapeAttribute=i.escapeUTF8=i.escape=i.encodeXML=i.getCodePoint=i.xmlReplacer=void 0,i.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var e=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);i.getCodePoint=String.prototype.codePointAt!=null?function(r,s){return r.codePointAt(s)}:function(r,s){return(r.charCodeAt(s)&64512)===55296?(r.charCodeAt(s)-55296)*1024+r.charCodeAt(s+1)-56320+65536:r.charCodeAt(s)};function t(r){for(var s="",o=0,l;(l=i.xmlReplacer.exec(r))!==null;){var a=l.index,u=r.charCodeAt(a),c=e.get(u);c!==void 0?(s+=r.substring(o,a)+c,o=a+1):(s+="".concat(r.substring(o,a),"&#x").concat((0,i.getCodePoint)(r,a).toString(16),";"),o=i.xmlReplacer.lastIndex+=+((u&64512)===55296))}return s+r.substr(o)}i.encodeXML=t,i.escape=t;function n(r,s){return function(l){for(var a,u=0,c="";a=r.exec(l);
vendor: 2,621 bytes, line 115
115)u!==a.index&&(c+=l.substring(u,a.index)),c+=s.get(a[0].charCodeAt(0)),u=a.index+1;return c+l.substring(u)}}i.escapeUTF8=n(/[&<>'"]/g,e),i.escapeAttribute=n(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),i.escapeText=n(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(Gl);var RL=ee&&ee.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(cr,"__esModule",{value:!0});cr.encodeNonAsciiHTML=cr.encodeHTML=void 0;var NL=RL(nm),yw=Gl,BL=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function FL(i){return vw(BL,i)}cr.encodeHTML=FL;function zL(i){return vw(yw.xmlReplacer,i)}cr.encodeNonAsciiHTML=zL;function vw(i,e){for(var t="",n=0,r;(r=i.exec(e))!==null;){var s=r.index;t+=e.substring(n,s);var o=e.charCodeAt(s),l=NL.default.get(o);if(typeof l=="object"){if(s+1<e.length){var a=e.charCodeAt(s+1),u=typeof l.n=="number"?l.n===a?l.o:void 0:l.n.get(a);if(u!==void 0){t+=u,n=i.lastIndex+=1;continue}}l=l.v}if(l!==void 0)t+=l,n=s+1;else{var c=(0,yw.getCodePoint)(e,s);t+="&#x".concat(c.toString(16),";"),n=i.lastIndex+=+(c!==o)}}return t+e.substr(n)}(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.decodeXMLStrict=i.decodeHTML5Strict=i.decodeHTML4Strict=i.decodeHTML5=i.decodeHTML4=i.decodeHTMLAttribute=i.decodeHTMLStrict=i.decodeHTML=i.decodeXML=i.DecodingMode=i.EntityDecoder=i.encodeHTML5=i.encodeHTML4=i.encodeNonAsciiHTML=i.encodeHTML=i.escapeText=i.escapeAttribute=i.escapeUTF8=i.escape=i.encodeXML=i.encode=i.decodeStrict=i.decode=i.EncodingMode=i.EntityLevel=void 0;var e=To,t=cr,n=Gl,r;(function(d){d[d.XML=0]="XML",d[d.HTML=1]="HTML"})(r=i.EntityLevel||(i.EntityLevel={}));var s;(function(d){d[d.UTF8=0]="UTF8",d[d.ASCII=1]="ASCII",d[d.Extensive=2]="Extensive",d[d.Attribute=3]="Attribute",d[d.Text=4]="Text"})(s=i.EncodingMode||(i.EncodingMode={}));function o(d,f){f===void 0&&(f=r.XML);var p=typeof f=="number"?f:f.level;if(p===r.HTML){var b=typeof f=="object"?f.mode:void 0;return(0,e.decodeHTML)(d,b)}return(0,e.decodeXML)(d)}i.decode=o;function l(d,f){var p;f===void 0&&(f=r.XML);var b=typeof f=="number"?{level:f}:f;return(p=b.mode)!==null&&p!==void 0||(b.mode=e.DecodingMode.Strict),o(d,b)}i.decodeStrict=l;function a(d,f){f===void 0&&(f=r.XML);var p=typeof f=="number"?{level:f}:f;return p.mode===s.UTF8?(0,n.escapeUTF8)(d):p.mode===s.Attribute?(0,n.escapeAttribute)(d):p.mode===s.Text?(0,n.escapeText)(d):p.level===r.HTML?p.mode===s.ASCII?(0,t.encodeNonAsciiHTML)(d):(0,t.encodeHTML)(d):(0,n.encodeXML)(d)}i.encode=a;var u=Gl;Object.defineProperty(i,"encodeXML",{enumerable:!0,get:function(){return u.encodeXML}
115}),Object.defineProperty(i,"escape",{enumerable:!0,get:function(){return u.escape}}),Object.defineProperty(i,"escapeUTF8",{enumerable:!0,get:function(){return u.escapeUTF8}}),Object.defineProperty(i,"escapeAttribute",{enumerable:!0,get:function(){return u.escapeAttribute}}),Object.defineProperty(i,"escapeText",{enumerable:!0,get:function(){return u.escapeText}});var c=cr;Object.defineProperty(i,"encodeHTML",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(i,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return c.encodeNonAsciiHTML}}),Object.defineProperty(i,"encodeHTML4",{enumerable:!0,get:function(){return c.encodeHTML}}),Object.defineProperty(i,"encodeHTML5",{enumerable:!0,get:function(){return c.encodeHTML}});var h=To;Object.defineProperty(i,"EntityDecoder",{enumerable:!0,get:function(){return h.EntityDecoder}}),Object.defineProperty(i,"DecodingMode",{enumerable:!0,get:function(){return h.DecodingMode}}),Object.defineProperty(i,"decodeXML",{enumerable:!0,get:function(){return h.decodeXML}}),Object.defineProperty(i,"decodeHTML",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(i,"decodeHTMLStrict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(i,"decodeHTMLAttribute",{enumerable:!0,get:function(){return h.decodeHTMLAttribute}}),Object.defineProperty(i,"decodeHTML4",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(i,"decodeHTML5",{enumerable:!0,get:function(){return h.decodeHTML}}),Object.defineProperty(i,"decodeHTML4Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(i,"decodeHTML5Strict",{enumerable:!0,get:function(){return h.decodeHTMLStrict}}),Object.defineProperty(i,"decodeXMLStrict",{enumerable:!0,get:function(){return h.decodeXML}})})(bw);var ts={};Object.defineProperty(ts,"__esModule",{value:!0});ts.attributeNames=ts.elementNames=void 0;ts.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(function(i){return[i.toLowerCase(),i]}));ts.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(function(i){return[i.toLowerCase(),i]}));var zr=ee&&ee.__assign||function(){return zr=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r])}return i},zr.apply(this,arguments)},VL=ee&&ee.__createBinding||(Object.create?function(i,e,t,n){n===void 0&&(n=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(i,n,r)}:function(i,e,t,n){n===void 0&&(n=t),i[n]=e[t]}),HL=ee&&ee.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),jL=ee&&ee.__importStar||function(i){if(i&&i.__esModule)return i;var e={};
vendor: 4,365 bytes, lines 115-116
115if(i!=null)for(var t in i)t!=="default"&&Object.prototype.hasOwnProperty.call(i,t)&&VL(e,i,t);return HL(e,i),e};Object.defineProperty(ea,"__esModule",{value:!0});ea.render=void 0;var Mn=jL(bs),Kl=bw,ww=ts,$L=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function qL(i){return i.replace(/"/g,""")}function UL(i,e){var t;if(i){var n=((t=e.encodeEntities)!==null&&t!==void 0?t:e.decodeEntities)===!1?qL:e.xmlMode||e.encodeEntities!=="utf8"?Kl.encodeXML:Kl.escapeAttribute;return Object.keys(i).map(function(r){var s,o,l=(s=i[r])!==null&&s!==void 0?s:"";return e.xmlMode==="foreign"&&(r=(o=ww.attributeNames.get(r))!==null&&o!==void 0?o:r),!e.emptyAttrs&&!e.xmlMode&&l===""?r:"".concat(r,'="').concat(n(l),'"')}).join(" ")}}var h0=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function cc(i,e){e===void 0&&(e={});for(var t=("length"in i)?i:[i],n="",r=0;r<t.length;r++)n+=WL(t[r],e);return n}ea.render=cc;ea.default=cc;function WL(i,e){switch(i.type){case Mn.Root:return cc(i.children,e);case Mn.Doctype:case Mn.Directive:return XL(i);case Mn.Comment:return ZL(i);case Mn.CDATA:return QL(i);case Mn.Script:case Mn.Style:case Mn.Tag:return YL(i,e);case Mn.Text:return JL(i,e)}}var GL=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),KL=new Set(["svg","math"]);function YL(i,e){var t;e.xmlMode==="foreign"&&(i.name=(t=ww.elementNames.get(i.name))!==null&&t!==void 0?t:i.name,i.parent&&GL.has(i.parent.name)&&(e=zr(zr({},e),{xmlMode:!1}))),!e.xmlMode&&KL.has(i.name)&&(e=zr(zr({},e),{xmlMode:"foreign"}));var n="<".concat(i.name),r=UL(i.attribs,e);return r&&(n+=" ".concat(r)),i.children.length===0&&(e.xmlMode?e.selfClosingTags!==!1:e.selfClosingTags&&h0.has(i.name))?(e.xmlMode||(n+=" "),n+="/>"):(n+=">",i.children.length>0&&(n+=cc(i.children,e)),(e.xmlMode||!h0.has(i.name))&&(n+="</".concat(i.name,">"))),n}function XL(i){return"<".concat(i.data,">")}function JL(i,e){var t,n=i.data||"";return((t=e.encodeEntities)!==null&&t!==void 0?t:e.decodeEntities)!==!1&&!(!e.xmlMode&&i.parent&&$L.has(i.parent.name))&&(n=e.xmlMode||e.encodeEntities!=="utf8"?(0,Kl.encodeXML)(n):(0,Kl.escapeText)(n)),n}function QL(i){return"<![CDATA[".concat(i.children[0].data,"]]>")}function ZL(i){return"<!--".concat(i.data,"-->")}var eM=ee&&ee.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.innerText=Mt.textContent=Mt.getText=Mt.getInnerHTML=Mt.getOuterHTML=void 0;var Tn=Xn,tM=eM(ea),nM=bs;function xw(i,e){return(0,tM.default)(i,e)}Mt.getOuterHTML=xw;function iM(i,e){return(0,Tn.hasChildren)(i)?i.children.map(function(t){return xw(t,e)}).join(""):""}Mt.getInnerHTML=iM;function ol(i){return Array.isArray(i)?i.map(ol).join(""):(0,Tn.isTag)(i)?i.name==="br"?` 116`:ol(i.children):(0,Tn.isCDATA)(i)?ol(i.children):(0,Tn.isText)(i)?i.data:""}Mt.getText=ol;function kh(i){return Array.isArray(i)?i.map(kh).join(""):(0,Tn.hasChildren)(i)&&!(0,Tn.isComment)(i)?kh(i.children):(0,Tn.isText)(i)?i.data:""}Mt.textContent=kh;function _h(i){return Array.isArray(i)?i.map(_h).join(""):(0,Tn.hasChildren)(i)&&(i.type===nM.ElementType.Tag||(0,Tn.isCDATA)(i))?_h(i.children):(0,Tn.isText)(i)?i.data:""}Mt.innerText=_h;var Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.prevElementSibling=Ue.nextElementSibling=Ue.getName=Ue.hasAttrib=Ue.getAttributeValue=Ue.getSiblings=Ue.getParent=Ue.getChildren=void 0;var im=Xn;function Ew(i){return(0,im.hasChildren)(i)?i.children:[]}Ue.getChildren=Ew;function Tw(i){return i.parent||null}Ue.getParent=Tw;function rM(i){var e,t,n=Tw(i);if(n!=null)return Ew(n);for(var r=[i],s=i.prev,o=i.next;s!=null;)r.unshift(s),e=s,s=e.prev;for(;o!=null;)r.push(o),t=o,o=t.next;return r}Ue.getSiblings=rM;function sM(i,e){var t;return(t=i.attribs)===null||t===void 0?void 0:t[e]}Ue.getAttributeValue=sM;function oM(i,e){return i.attribs!=null&&Object.prototype.hasOwnProperty.call(i.attribs,e)&&i.attribs[e]!=null}Ue.hasAttrib=oM;function aM(i){return i.name}Ue.getName=aM;function lM(i){for(var e,t=i.next;t!==null&&!(0,im.isTag)(t);)e=t,t=e.next;return t}Ue.nextElementSibling=lM;function uM(i){for(var e,t=i.prev;t!==null&&!(0,im.isTag)(t);)e=t,t=e.prev;return t}Ue.prevElementSibling=uM;var vt={};
116Object.defineProperty(vt,"__esModule",{value:!0});vt.prepend=vt.prependChild=vt.append=vt.appendChild=vt.replaceElement=vt.removeElement=void 0;function ta(i){if(i.prev&&(i.prev.next=i.next),i.next&&(i.next.prev=i.prev),i.parent){var e=i.parent.children,t=e.lastIndexOf(i);t>=0&&e.splice(t,1)}i.next=null,i.prev=null,i.parent=null}vt.removeElement=ta;function cM(i,e){var t=e.prev=i.prev;t&&(t.next=e);var n=e.next=i.next;n&&(n.prev=e);var r=e.parent=i.parent;if(r){var s=r.children;s[s.lastIndexOf(i)]=e,i.parent=null}}vt.replaceElement=cM;function dM(i,e){if(ta(e),e.next=null,e.parent=i,i.children.push(e)>1){var t=i.children[i.children.length-2];t.next=e,e.prev=t}else e.prev=null}vt.appendChild=dM;function hM(i,e){ta(e);var t=i.parent,n=i.next;if(e.next=n,e.prev=i,i.next=e,e.parent=t,n){if(n.prev=e,t){var r=t.children;r.splice(r.lastIndexOf(n),0,e)}}else t&&t.children.push(e)}vt.append=hM;function fM(i,e){if(ta(e),e.parent=i,e.prev=null,i.children.unshift(e)!==1){var t=i.children[1];t.prev=e,e.next=t}else e.next=null}vt.prependChild=fM;function pM(i,e){ta(e);var t=i.parent;if(t){var n=t.children;n.splice(n.indexOf(i),0,e)}i.prev&&(i.prev.next=e),e.parent=t,e.prev=i.prev,e.next=i,i.prev=e}vt.prepend=pM;var pt={};Object.defineProperty(pt,"__esModule",{value:!0});pt.findAll=pt.existsOne=pt.findOne=pt.findOneChild=pt.find=pt.filter=void 0;var dc=Xn;function mM(i,e,t,n){return t===void 0&&(t=!0),n===void 0&&(n=1/0),Sw(i,Array.isArray(e)?e:[e],t,n)}pt.filter=mM;function Sw(i,e,t,n){for(var r=[],s=[e],o=[0];;){if(o[0]>=s[0].length){if(o.length===1)return r;s.shift(),o.shift();continue}var l=s[0][o[0]++];if(i(l)&&(r.push(l),--n<=0))return r;t&&(0,dc.hasChildren)(l)&&l.children.length>0&&(o.unshift(0),s.unshift(l.children))}}pt.find=Sw;function gM(i,e){return e.find(i)}pt.findOneChild=gM;function Cw(i,e,t){t===void 0&&(t=!0);for(var n=null,r=0;r<e.length&&!n;r++){var s=e[r];if((0,dc.isTag)(s))i(s)?n=s:t&&s.children.length>0&&(n=Cw(i,s.children,!0));else continue}return n}pt.findOne=Cw;function kw(i,e){return e.some(function(t){return(0,dc.isTag)(t)&&(i(t)||kw(i,t.children))})}pt.existsOne=kw;function bM(i,e){for(var t=[],n=[e],r=[0];;){if(r[0]>=n[0].length){if(n.length===1)return t;n.shift(),r.shift();continue}var s=n[0][r[0]++];(0,dc.isTag)(s)&&(i(s)&&t.push(s),s.children.length>0&&(r.unshift(0),n.unshift(s.children)))}}pt.findAll=bM;var It={};Object.defineProperty(It,"__esModule",{value:!0});It.getElementsByTagType=It.getElementsByTagName=It.getElementById=It.getElements=It.testElement=void 0;var Gi=Xn,hc=pt,Yl={tag_name:function(i){return typeof i=="function"?function(e){return(0,Gi.isTag)(e)&&i(e.name)}:i==="*"?Gi.isTag:function(e){return(0,Gi.isTag)(e)&&e.name===i}},tag_type:function(i){return typeof i=="function"?function(e){return i(e.type)}:function(e){return e.type===i}},tag_contains:function(i){return typeof i=="function"?function(e){return(0,Gi.isText)(e)&&i(e.data)}:function(e){return(0,Gi.isText)(e)&&e.data===i}}};function _w(i,e){return typeof e=="function"?function(t){return(0,Gi.isTag)(t)&&e(t.attribs[i])}:function(t){return(0,Gi.isTag)(t)&&t.attribs[i]===e}}function yM(i,e){return function(t){return i(t)||e(t)}}function Aw(i){var e=Object.keys(i).map(function(t){var n=i[t];return Object.prototype.hasOwnProperty.call(Yl,t)?Yl[t](n):_w(t,n)});return e.length===0?null:e.reduce(yM)}function vM(i,e){var t=Aw(i);return t?t(e):!0}It.testElement=vM;function wM(i,e,t,n){n===void 0&&(n=1/0);var r=Aw(i);return r?(0,hc.filter)(r,e,t,n):[]}It.getElements=wM;function xM(i,e,t){return t===void 0&&(t=!0),Array.isArray(e)||(e=[e]),(0,hc.findOne)(_w("id",i),e,t)}It.getElementById=xM;function EM(i,e,t,n){return t===void 0&&(t=!0),n===void 0&&(n=1/0),(0,hc.filter)(Yl.tag_name(i),e,t,n)}It.getElementsByTagName=EM;function TM(i,e,t,n){return t===void 0&&(t=!0),n===void 0&&(n=1/0),(0,hc.filter)(Yl.tag_type(i),e,t,n)}It.getElementsByTagType=TM;var Lw={};(function(i){Object.defineProperty(i,"__esModule",{value:!0}),i.uniqueSort=i.compareDocumentPosition=i.DocumentPosition=i.removeSubsets=void 0;var e=Xn;function t(o){for(var l=o.length;--l>=0;){var a=o[l];if(l>0&&o.lastIndexOf(a,l-1)>=0){o.splice(l,1);continue}for(var u=a.parent;u;u=u.parent)if(o.includes(u)){o.splice(l,1);break}}return o}i.removeSubsets=t;var n;(function(o){o[o.DISCONNECTED=1]="DISCONNECTED",o[o.PRECEDING=2]="PRECEDING",o[o.FOLLOWING=4]="FOLLOWING",o[o.CONTAINS=8]="CONTAINS",o[o.CONTAINED_BY=16]="CONTAINED_BY"})(n=i.DocumentPosition||(i.DocumentPosition={}));function r(o,l){var a=[],u=[];
vendor: 4,075 bytes, line 116
116if(o===l)return 0;for(var c=(0,e.hasChildren)(o)?o:o.parent;c;)a.unshift(c),c=c.parent;for(c=(0,e.hasChildren)(l)?l:l.parent;c;)u.unshift(c),c=c.parent;for(var h=Math.min(a.length,u.length),d=0;d<h&&a[d]===u[d];)d++;if(d===0)return n.DISCONNECTED;var f=a[d-1],p=f.children,b=a[d],m=u[d];return p.indexOf(b)>p.indexOf(m)?f===l?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:f===o?n.PRECEDING|n.CONTAINS:n.PRECEDING}i.compareDocumentPosition=r;function s(o){return o=o.filter(function(l,a,u){return!u.includes(l,a+1)}),o.sort(function(l,a){var u=r(l,a);return u&n.PRECEDING?-1:u&n.FOLLOWING?1:0}),o}i.uniqueSort=s})(Lw);var fc={};Object.defineProperty(fc,"__esModule",{value:!0});fc.getFeed=void 0;var SM=Mt,na=It;function CM(i){var e=Xl(MM,i);return e?e.name==="feed"?kM(e):_M(e):null}fc.getFeed=CM;function kM(i){var e,t=i.children,n={type:"atom",items:(0,na.getElementsByTagName)("entry",t).map(function(o){var l,a=o.children,u={media:Mw(a)};yt(u,"id","id",a),yt(u,"title","title",a);var c=(l=Xl("link",a))===null||l===void 0?void 0:l.attribs.href;c&&(u.link=c);var h=gi("summary",a)||gi("content",a);h&&(u.description=h);var d=gi("updated",a);return d&&(u.pubDate=new Date(d)),u})};yt(n,"id","id",t),yt(n,"title","title",t);var r=(e=Xl("link",t))===null||e===void 0?void 0:e.attribs.href;r&&(n.link=r),yt(n,"description","subtitle",t);var s=gi("updated",t);return s&&(n.updated=new Date(s)),yt(n,"author","email",t,!0),n}function _M(i){var e,t,n=(t=(e=Xl("channel",i.children))===null||e===void 0?void 0:e.children)!==null&&t!==void 0?t:[],r={type:i.name.substr(0,3),id:"",items:(0,na.getElementsByTagName)("item",i.children).map(function(o){var l=o.children,a={media:Mw(l)};yt(a,"id","guid",l),yt(a,"title","title",l),yt(a,"link","link",l),yt(a,"description","description",l);var u=gi("pubDate",l)||gi("dc:date",l);return u&&(a.pubDate=new Date(u)),a})};yt(r,"title","title",n),yt(r,"link","link",n),yt(r,"description","description",n);var s=gi("lastBuildDate",n);return s&&(r.updated=new Date(s)),yt(r,"author","managingEditor",n,!0),r}var AM=["url","type","lang"],LM=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Mw(i){return(0,na.getElementsByTagName)("media:content",i).map(function(e){for(var t=e.attribs,n={medium:t.medium,isDefault:!!t.isDefault},r=0,s=AM;r<s.length;r++){var o=s[r];t[o]&&(n[o]=t[o])}for(var l=0,a=LM;l<a.length;l++){var o=a[l];t[o]&&(n[o]=parseInt(t[o],10))}return t.expression&&(n.expression=t.expression),n})}function Xl(i,e){return(0,na.getElementsByTagName)(i,e,!0,1)[0]}function gi(i,e,t){return t===void 0&&(t=!1),(0,SM.textContent)((0,na.getElementsByTagName)(i,e,t,1)).trim()}function yt(i,e,t,n,r){r===void 0&&(r=!1);var s=gi(t,n,r);s&&(i[e]=s)}function MM(i){return i==="rss"||i==="feed"||i==="rdf:RDF"}(function(i){var e=ee&&ee.__createBinding||(Object.create?function(r,s,o,l){l===void 0&&(l=o);var a=Object.getOwnPropertyDescriptor(s,o);(!a||("get"in a?!s.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(r,l,a)}:function(r,s,o,l){l===void 0&&(l=o),r[l]=s[o]}),t=ee&&ee.__exportStar||function(r,s){for(var o in r)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&e(s,r,o)};Object.defineProperty(i,"__esModule",{value:!0}),i.hasChildren=i.isDocument=i.isComment=i.isText=i.isCDATA=i.isTag=void 0,t(Mt,i),t(Ue,i),t(vt,i),t(pt,i),t(It,i),t(Lw,i),t(fc,i);var n=Xn;Object.defineProperty(i,"isTag",{enumerable:!0,get:function(){return n.isTag}}),Object.defineProperty(i,"isCDATA",{enumerable:!0,get:function(){return n.isCDATA}}),Object.defineProperty(i,"isText",{enumerable:!0,get:function(){return n.isText}}),Object.defineProperty(i,"isComment",{enumerable:!0,get:function(){return n.isComment}}),Object.defineProperty(i,"isDocument",{enumerable:!0,get:function(){return n.isDocument}}),Object.defineProperty(i,"hasChildren",{enumerable:!0,get:function(){return n.hasChildren}})})(sl);(function(i){var e=ee&&ee.__createBinding||(Object.create?function(v,g,y,w){w===void 0&&(w=y);var E=Object.getOwnPropertyDescriptor(g,y);
116(!E||("get"in E?!g.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return g[y]}}),Object.defineProperty(v,w,E)}:function(v,g,y,w){w===void 0&&(w=y),v[w]=g[y]}),t=ee&&ee.__setModuleDefault||(Object.create?function(v,g){Object.defineProperty(v,"default",{enumerable:!0,value:g})}:function(v,g){v.default=g}),n=ee&&ee.__importStar||function(v){if(v&&v.__esModule)return v;var g={};if(v!=null)for(var y in v)y!=="default"&&Object.prototype.hasOwnProperty.call(v,y)&&e(g,v,y);return t(g,v),g},r=ee&&ee.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(i,"__esModule",{value:!0}),i.DomUtils=i.parseFeed=i.getFeed=i.ElementType=i.Tokenizer=i.createDomStream=i.parseDOM=i.parseDocument=i.DefaultHandler=i.DomHandler=i.Parser=void 0;var s=Eo,o=Eo;Object.defineProperty(i,"Parser",{enumerable:!0,get:function(){return o.Parser}});var l=Xn,a=Xn;Object.defineProperty(i,"DomHandler",{enumerable:!0,get:function(){return a.DomHandler}}),Object.defineProperty(i,"DefaultHandler",{enumerable:!0,get:function(){return a.DomHandler}});function u(v,g){var y=new l.DomHandler(void 0,g);return new s.Parser(y,g).end(v),y.root}i.parseDocument=u;function c(v,g){return u(v,g).children}i.parseDOM=c;function h(v,g,y){var w=new l.DomHandler(v,g,y);return new s.Parser(w,g)}i.createDomStream=h;var d=Jp;Object.defineProperty(i,"Tokenizer",{enumerable:!0,get:function(){return r(d).default}}),i.ElementType=n(bs);var f=sl,p=sl;Object.defineProperty(i,"getFeed",{enumerable:!0,get:function(){return p.getFeed}});var b={xmlMode:!0};function m(v,g){return g===void 0&&(g=b),(0,f.getFeed)(c(v,g))}i.parseFeed=m,i.DomUtils=n(sl)})(rw);var IM=i=>{if(typeof i!="string")throw new TypeError("Expected a string");return i.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},rm={};Object.defineProperty(rm,"__esModule",{value:!0});/*! 117 * is-plain-object <https://github.com/jonschlinkert/is-plain-object> 118 * 119 * Copyright (c) 2014-2017, Jon Schlinkert. 120 * Released under the MIT License. 121 */function f0(i){return Object.prototype.toString.call(i)==="[object Object]"}function OM(i){var e,t;return f0(i)===!1?!1:(e=i.constructor,e===void 0?!0:(t=e.prototype,!(f0(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)))}rm.isPlainObject=OM;var DM=function(e){return PM(e)&&!RM(e)};function PM(i){return!!i&&typeof i=="object"}function RM(i){var e=Object.prototype.toString.call(i);return e==="[object RegExp]"||e==="[object Date]"||FM(i)}var NM=typeof Symbol=="function"&&Symbol.for,BM=NM?Symbol.for("react.element"):60103;function FM(i){return i.$$typeof===BM}function zM(i){return Array.isArray(i)?[]:{}}function So(i,e){return e.clone!==!1&&e.isMergeableObject(i)?ns(zM(i),i,e):i}function VM(i,e,t){return i.concat(e).map(function(n){return So(n,t)})}function HM(i,e){if(!e.customMerge)return ns;var t=e.customMerge(i);return typeof t=="function"?t:ns}function jM(i){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(i).filter(function(e){return Object.propertyIsEnumerable.call(i,e)}):[]}function p0(i){return Object.keys(i).concat(jM(i))}function Iw(i,e){try{return e in i}catch{return!1}}function $M(i,e){return Iw(i,e)&&!(Object.hasOwnProperty.call(i,e)&&Object.propertyIsEnumerable.call(i,e))}function qM(i,e,t){var n={};
vendor: 9,323 bytes, lines 121-138
121return t.isMergeableObject(i)&&p0(i).forEach(function(r){n[r]=So(i[r],t)}),p0(e).forEach(function(r){$M(i,r)||(Iw(i,r)&&t.isMergeableObject(e[r])?n[r]=HM(r,t)(i[r],e[r],t):n[r]=So(e[r],t))}),n}function ns(i,e,t){t=t||{},t.arrayMerge=t.arrayMerge||VM,t.isMergeableObject=t.isMergeableObject||DM,t.cloneUnlessOtherwiseSpecified=So;var n=Array.isArray(e),r=Array.isArray(i),s=n===r;return s?n?t.arrayMerge(i,e,t):qM(i,e,t):So(e,t)}ns.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return ns(n,r,t)},{})};var UM=ns,WM=UM,Ow={exports:{}};(function(i){(function(e,t){i.exports?i.exports=t():e.parseSrcset=t()})(ee,function(){return function(e){function t(w){return w===" "||w===" "||w===` 122`||w==="\f"||w==="\r"}function n(w){var E,x=w.exec(e.substring(m));if(x)return E=x[0],m+=E.length,E}for(var r=e.length,s=/^[ \t\n\r\u000c]+/,o=/^[, \t\n\r\u000c]+/,l=/^[^ \t\n\r\u000c]+/,a=/[,]+$/,u=/^\d+$/,c=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,h,d,f,p,b,m=0,v=[];;){if(n(o),m>=r)return v;h=n(l),d=[],h.slice(-1)===","?(h=h.replace(a,""),y()):g()}function g(){for(n(s),f="",p="in descriptor";;){if(b=e.charAt(m),p==="in descriptor")if(t(b))f&&(d.push(f),f="",p="after descriptor");else if(b===","){m+=1,f&&d.push(f),y();return}else if(b==="(")f=f+b,p="in parens";else if(b===""){f&&d.push(f),y();return}else f=f+b;else if(p==="in parens")if(b===")")f=f+b,p="in descriptor";else if(b===""){d.push(f),y();return}else f=f+b;else if(p==="after descriptor"&&!t(b))if(b===""){y();return}else p="in descriptor",m-=1;m+=1}}function y(){var w=!1,E,x,S,_,M={},O,D,k,A,C;for(_=0;_<d.length;_++)O=d[_],D=O[O.length-1],k=O.substring(0,O.length-1),A=parseInt(k,10),C=parseFloat(k),u.test(k)&&D==="w"?((E||x)&&(w=!0),A===0?w=!0:E=A):c.test(k)&&D==="x"?((E||x||S)&&(w=!0),C<0?w=!0:x=C):u.test(k)&&D==="h"?((S||x)&&(w=!0),A===0?w=!0:S=A):w=!0;w?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+O+"'."):(M.url=h,E&&(M.w=E),x&&(M.d=x),S&&(M.h=S),v.push(M))}}})})(Ow);var GM=Ow.exports,sm={exports:{}},ke=String,Dw=function(){return{isColorSupported:!1,reset:ke,bold:ke,dim:ke,italic:ke,underline:ke,inverse:ke,hidden:ke,strikethrough:ke,black:ke,red:ke,green:ke,yellow:ke,blue:ke,magenta:ke,cyan:ke,white:ke,gray:ke,bgBlack:ke,bgRed:ke,bgGreen:ke,bgYellow:ke,bgBlue:ke,bgMagenta:ke,bgCyan:ke,bgWhite:ke}};sm.exports=Dw();sm.exports.createColors=Dw;var KM=sm.exports;const YM={},XM=Object.freeze(Object.defineProperty({__proto__:null,default:YM},Symbol.toStringTag,{value:"Module"})),rn=BC(XM);let m0=KM,g0=rn,Ah=class Pw extends Error{constructor(e,t,n,r,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),r&&(this.source=r),o&&(this.plugin=o),typeof t<"u"&&typeof n<"u"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Pw)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=m0.isColorSupported),g0&&e&&(t=g0(t));let n=t.split(/\r?\n/),r=Math.max(this.line-3,0),s=Math.min(this.line+2,n.length),o=String(s).length,l,a;if(e){let{bold:u,gray:c,red:h}=m0.createColors(!0);l=d=>u(h(d)),a=d=>c(d)}else l=a=u=>u;return n.slice(r,s).map((u,c)=>{let h=r+1+c,d=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let f=a(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+u+` 123 `+f+l("^")}return" "+a(d)+u}).join(` 124`)}toString(){let e=this.showSourceCode();return e&&(e=` 125 126`+e+` 127`),this.name+": "+this.message+e}};var om=Ah;Ah.default=Ah;var ia={};ia.isClean=Symbol("isClean");ia.my=Symbol("my");const b0={after:` 128`,beforeClose:` 129`,beforeComment:` 130`,beforeDecl:` 131`,beforeOpen:" ",beforeRule:` 132`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function JM(i){return i[0].toUpperCase()+i.slice(1)}let Lh=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let s=(e.raws.between||"")+(t?";":"");this.builder(n+r+s,e)}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let r=e.parent,s=0;for(;r&&r.type!=="root";)s+=1,r=r.parent;if(n.includes(` 133`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<s;l++)n+=o}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let s=e.nodes[r],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,t!==r||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){let r;if(n||(n=t),t&&(r=e.raws[t],typeof r<"u"))return r;let s=e.parent;if(n==="before"&&(!s||s.type==="root"&&s.first===e||s&&s.type==="document"))return"";if(!s)return b0[n];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[n]<"u")return o.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let l="raw"+JM(n);this[l]?r=this[l](o,e):o.walk(a=>{if(r=a.raws[t],typeof r<"u")return!1})}return typeof r>"u"&&(r=b0[n]),o.rawCache[n]=r,r}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return t=n.raws.after,t.includes(` 134`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(` 135`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(r=>{if(typeof r.raws.before<"u")return n=r.raws.before,n.includes(` 136`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return t=n.raws.before,t.includes(` 137`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return t=n.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof n.raws.before<"u"){let s=n.raws.before.split(` 138`);return t=s[s.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Rw=Lh;Lh.default=Lh;let QM=Rw;function Mh(i,e){new QM(e).stringify(i)}var pc=Mh;Mh.default=Mh;let{isClean:ka,my:ZM}=ia,eI=om,tI=Rw,nI=pc;function Ih(i,e){let t=new i.constructor;for(let n in i){if(!Object.prototype.hasOwnProperty.call(i,n)||n==="proxyCache")continue;let r=i[n],s=typeof r;n==="parent"&&s==="object"?e&&(t[n]=e):n==="source"?t[n]=r:Array.isArray(r)?t[n]=r.map(o=>Ih(o,t)):(s==="object"&&r!==null&&(r=Ih(r)),t[n]=r)}return t}let Oh=class{constructor(e={}){this.raws={},this[ka]=!1,this[ZM]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Ih(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}
vendor: 5,348 bytes, lines 138-139
138error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new eI(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[ka]){this[ka]=!1;let e=this;for(;e=e.parent;)e[ka]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,s=this.source.start.line;for(let o=0;o<e;o++)n[o]===` 139`?(r=1,s+=1):r+=1;return{column:r,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),s=r.indexOf(e.word);s!==-1&&(t=this.positionInside(s,r),n=this.positionInside(s+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new tI().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},r=t==null;t=t||new Map;let s=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))n[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)n[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=s,t.set(l.input,s),s++),n[o]={end:l.end,inputId:a,start:l.start}}else n[o]=l}return r&&(n.inputs=[...t.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=nI){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n}),t}warn(e,t,n){let r={node:this};for(let s in n)r[s]=n[s];return e.warn(t,r)}get proxyOf(){return this}};var mc=Oh;Oh.default=Oh;let iI=mc,Dh=class extends iI{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var gc=Dh;Dh.default=Dh;let rI="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",sI=(i,e=21)=>(t=e)=>{let n="",r=t;for(;r--;)n+=i[Math.random()*i.length|0];return n},oI=(i=21)=>{let e="",t=i;for(;t--;)e+=rI[Math.random()*64|0];return e};var aI={nanoid:oI,customAlphabet:sI};let{SourceMapConsumer:y0,SourceMapGenerator:v0}=rn,{existsSync:lI,readFileSync:uI}=rn,{dirname:nd,join:cI}=rn;function dI(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let Ph=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=nd(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new y0(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,s=/^data:application\/json,/,o=e.match(r)||e.match(s);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(n);if(l)return dI(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=nd(e),lI(e))return this.mapFile=e,uI(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(t instanceof y0)return v0.fromSourceMap(t).toString();if(t instanceof v0)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}
vendor: 36,818 bytes, lines 139-147
139else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=cI(nd(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Nw=Ph;Ph.default=Ph;let{SourceMapConsumer:hI,SourceMapGenerator:fI}=rn,{fileURLToPath:w0,pathToFileURL:_a}=rn,{isAbsolute:Rh,resolve:Nh}=rn,{nanoid:pI}=aI,id=rn,x0=om,mI=Nw,rd=Symbol("fromOffsetCache"),gI=!!(hI&&fI),E0=!!(Nh&&Rh),Jl=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!E0||/^\w+:\/\//.test(t.from)||Rh(t.from)?this.file=t.from:this.file=Nh(t.from)),E0&&gI){let n=new mI(this.css,t);if(n.text){this.map=n;let r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+pI(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let s,o,l;if(t&&typeof t=="object"){let u=t,c=n;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,n=h.col}else t=u.line,n=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!n){let u=this.fromOffset(t);t=u.line,n=u.col}let a=this.origin(t,n,o,l);return a?s=new x0(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):s=new x0(e,o===void 0?t:{column:n,line:t},o===void 0?n:{column:l,line:o},this.css,this.file,r.plugin),s.input={column:n,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(_a&&(s.input.url=_a(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,n;if(this[rd])n=this[rd];else{let s=this.css.split(` 140`);n=new Array(s.length);let o=0;for(let l=0,a=s.length;l<a;l++)n[l]=o,o+=s[l].length+1;this[rd]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let s=n.length-2,o;for(;r<s;)if(o=r+(s-r>>1),e<n[o])s=o-1;else if(e>=n[o+1])r=o+1;else{r=o;break}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Nh(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let s=this.map.consumer(),o=s.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof n=="number"&&(l=s.originalPositionFor({column:r,line:n}));let a;Rh(o.source)?a=_a(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||_a(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(w0)u.file=w0(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=s.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var bc=Jl;Jl.default=Jl;id&&id.registerInput&&id.registerInput(Jl);let{SourceMapConsumer:Bw,SourceMapGenerator:al}=rn,{dirname:ll,relative:Fw,resolve:zw,sep:Vw}=rn,{pathToFileURL:T0}=rn,bI=bc,yI=!!(Bw&&al),vI=!!(ll&&zw&&Fw&&Vw),wI=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=` 141`;this.css.includes(`\r 142`)&&(t=`\r 143`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||ll(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Bw(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),vI&&yI&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=al.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new al({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new al({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,n="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},s,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(r.generated.line=e,r.generated.column=t-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,this.map.addMapping(r))),s=l.match(/\n/g),s?(e+=s.length,o=l.lastIndexOf(` 144`),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=n,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?ll(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=ll(zw(n,this.mapOpts.annotation)));let r=Fw(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new bI(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(T0){let n=T0(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Vw==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};var Hw=wI;let xI=mc,Bh=class extends xI{constructor(e){super(e),this.type="comment"}};var yc=Bh;Bh.default=Bh;let{isClean:jw,my:$w}=ia,qw=gc,Uw=yc,EI=mc,Ww,am,lm,Gw;function Kw(i){return i.map(e=>(e.nodes&&(e.nodes=Kw(e.nodes)),delete e.source,e))}function Yw(i){if(i[jw]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Yw(e)}let Jn=class Xw extends EI{append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let r of n)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],r=e(this.proxyOf.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(r=>typeof r=="function"?(s,o)=>r(s.toProxy(),o):r)):t==="every"||t==="some"?n=>e[t]((r,...s)=>n(r.toProxy(),...s)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),r=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let o of r)this.proxyOf.nodes.splice(n+1,0,o);let s;for(let o in this.indexes)s=this.indexes[o],n<s&&(this.indexes[o]=s+r.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),r=n===0?"prepend":!1,s=this.normalize(t,this.proxyOf.nodes[n],r).reverse();n=this.index(e);for(let l of s)this.proxyOf.nodes.splice(n,0,l);let o;for(let l in this.indexes)o=this.indexes[l],n<=o&&(this.indexes[l]=o+s.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Kw(Ww(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new qw(e)]}else if(e.selector||e.selectors)e=[new am(e)];else if(e.name)e=[new lm(e)];else if(e.text)e=[new Uw(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[$w]||Xw.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[jw]&&Yw(r),typeof r.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let r of n)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(s){throw t.addToError(s)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if(n.type==="atrule"&&n.name===e)return t(n,r)}):(t=e,this.walk((n,r)=>{if(n.type==="atrule")return t(n,r)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if(n.type==="decl"&&n.prop===e)return t(n,r)}):(t=e,this.walk((n,r)=>{if(n.type==="decl")return t(n,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if(n.type==="rule"&&n.selector===e)return t(n,r)}):(t=e,this.walk((n,r)=>{if(n.type==="rule")return t(n,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Jn.registerParse=i=>{Ww=i};Jn.registerRule=i=>{am=i};Jn.registerAtRule=i=>{lm=i};Jn.registerRoot=i=>{Gw=i};var Cr=Jn;Jn.default=Jn;Jn.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,lm.prototype):i.type==="rule"?Object.setPrototypeOf(i,am.prototype):i.type==="decl"?Object.setPrototypeOf(i,qw.prototype):i.type==="comment"?Object.setPrototypeOf(i,Uw.prototype):i.type==="root"&&Object.setPrototypeOf(i,Gw.prototype),i[$w]=!0,i.nodes&&i.nodes.forEach(e=>{Jn.rebuild(e)})};let TI=Cr,Jw,Qw,Co=class extends TI{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Jw(new Qw,this,e).stringify()}};Co.registerLazyResult=i=>{Jw=i};Co.registerProcessor=i=>{Qw=i};var um=Co;Co.default=Co;let Fh=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Zw=Fh;Fh.default=Fh;let SI=Zw,zh=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new SI(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var cm=zh;zh.default=zh;const sd=39,S0=34,Aa=92,C0=47,La=10,Ms=32,Ma=12,Ia=9,Oa=13,CI=91,kI=93,_I=40,AI=41,LI=123,MI=125,II=59,OI=42,DI=58,PI=64,Da=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pa=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,RI=/.[\r\n"'(/\\]/,k0=/[\da-f]/i;var NI=function(e,t={}){let n=e.css.valueOf(),r=t.ignoreErrors,s,o,l,a,u,c,h,d,f,p,b=n.length,m=0,v=[],g=[];function y(){return m}function w(_){throw e.error("Unclosed "+_,m)}function E(){return g.length===0&&m>=b}function x(_){if(g.length)return g.pop();if(m>=b)return;let M=_?_.ignoreUnclosed:!1;switch(s=n.charCodeAt(m),s){case La:case Ms:case Ia:case Oa:case Ma:{o=m;do o+=1,s=n.charCodeAt(o);while(s===Ms||s===La||s===Ia||s===Oa||s===Ma);p=["space",n.slice(m,o)],m=o-1;break}case CI:case kI:case LI:case MI:case DI:case II:case AI:{let O=String.fromCharCode(s);p=[O,O,m];break}case _I:{if(d=v.length?v.pop()[1]:"",f=n.charCodeAt(m+1),d==="url"&&f!==sd&&f!==S0&&f!==Ms&&f!==La&&f!==Ia&&f!==Ma&&f!==Oa){o=m;do{if(c=!1,o=n.indexOf(")",o+1),o===-1)if(r||M){o=m;break}else w("bracket");for(h=o;n.charCodeAt(h-1)===Aa;)h-=1,c=!c}while(c);p=["brackets",n.slice(m,o+1),m,o],m=o}else o=n.indexOf(")",m+1),a=n.slice(m,o+1),o===-1||RI.test(a)?p=["(","(",m]:(p=["brackets",a,m,o],m=o);break}case sd:case S0:{l=s===sd?"'":'"',o=m;do{if(c=!1,o=n.indexOf(l,o+1),o===-1)if(r||M){o=m+1;break}else w("string");for(h=o;n.charCodeAt(h-1)===Aa;)h-=1,c=!c}while(c);p=["string",n.slice(m,o+1),m,o],m=o;break}case PI:{Da.lastIndex=m+1,Da.test(n),Da.lastIndex===0?o=n.length-1:o=Da.lastIndex-2,p=["at-word",n.slice(m,o+1),m,o],m=o;break}case Aa:{for(o=m,u=!0;n.charCodeAt(o+1)===Aa;)o+=1,u=!u;if(s=n.charCodeAt(o+1),u&&s!==C0&&s!==Ms&&s!==La&&s!==Ia&&s!==Oa&&s!==Ma&&(o+=1,k0.test(n.charAt(o)))){for(;k0.test(n.charAt(o+1));)o+=1;n.charCodeAt(o+1)===Ms&&(o+=1)}p=["word",n.slice(m,o+1),m,o],m=o;break}default:{s===C0&&n.charCodeAt(m+1)===OI?(o=n.indexOf("*/",m+2)+1,o===0&&(r||M?o=n.length:w("comment")),p=["comment",n.slice(m,o+1),m,o],m=o):(Pa.lastIndex=m+1,Pa.test(n),Pa.lastIndex===0?o=n.length-1:o=Pa.lastIndex-2,p=["word",n.slice(m,o+1),m,o],v.push(p),m=o);break}}return m++,p}function S(_){g.push(_)}return{back:S,endOfFile:E,nextToken:x,position:y}};let ex=Cr,Ql=class extends ex{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var dm=Ql;Ql.default=Ql;ex.registerAtRule(Ql);let tx=Cr,nx,ix,is=class extends tx{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let r=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of r)s.raws.before=t.raws.before}return r}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new nx(new ix,this,e).stringify()}};is.registerLazyResult=i=>{nx=i};is.registerProcessor=i=>{ix=i};var ra=is;is.default=is;tx.registerRoot(is);let ko={comma(i){return ko.split(i,[","],!0)},space(i){let e=[" ",` 145`," "];return ko.split(i,e)},split(i,e,t){let n=[],r="",s=!1,o=0,l=!1,a="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(s=!0),s?(r!==""&&n.push(r.trim()),r="",s=!1):r+=c;return(t||r!=="")&&n.push(r.trim()),n}};var rx=ko;ko.default=ko;let sx=Cr,BI=rx,Zl=class extends sx{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return BI.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var hm=Zl;Zl.default=Zl;sx.registerRule(Zl);let FI=gc,zI=NI,VI=yc,HI=dm,jI=ra,_0=hm;const A0={empty:!0,space:!0};function $I(i){for(let e=i.length-1;e>=0;e--){let t=i[e],n=t[3]||t[2];if(n)return n}}let qI=class{constructor(e){this.input=e,this.root=new jI,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new HI;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,r,s,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?u.push(n==="("?")":"]"):n==="{"&&u.length>0?u.push("}"):n===u[u.length-1]&&u.pop(),u.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){l=!0;break}else if(n==="}"){if(a.length>0){for(s=a.length-1,r=a[s];r&&r[0]==="space";)r=a[--s];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,r;for(let s=t-1;s>=0&&(r=e[s],!(r[0]!=="space"&&(n+=1,n===2)));s--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,n,r,s;for(let[o,l]of e.entries()){if(n=l,r=n[0],r==="("&&(t+=1),r===")"&&(t-=1),t===0&&r===":")if(!s)this.doubleColon(n);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=n}return!1}comment(e){let t=new VI;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=zI(this.input)}decl(e,t){let n=new FI;this.init(n,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(r[3]||r[2]||$I(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let s;for(;e.length;)if(s=e.shift(),s[0]===":"){n.raws.between+=s[1];break}else s[0]==="word"&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(s=e[u],s[1].toLowerCase()==="!important"){n.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(n.raws.important=c);break}else if(s[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let d=u;d>0;d--){let f=c[d][0];if(h.trim().indexOf("!")===0&&f!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=h,e=c)}if(s[0]!=="space"&&s[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(n.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(n,"value",o.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new _0;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,s=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(n=u[0],a.push(u),n==="("||n==="[")s||(s=u),o.push(n==="("?")":"]");else if(l&&r&&n==="{")s||(s=u),o.push("}");else if(o.length===0)if(n===";")if(r){this.decl(a,l);return}else break;else if(n==="{"){this.rule(a);return}else if(n==="}"){this.tokenizer.back(a.pop()),t=!0;break}else n===":"&&(r=!0);else n===o[o.length-1]&&(o.pop(),o.length===0&&(s=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&r){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let s,o,l=n.length,a="",u=!0,c,h;for(let d=0;d<l;d+=1)s=n[d],o=s[0],o==="space"&&d===l-1&&!r?u=!1:o==="comment"?(h=n[d-1]?n[d-1][0]:"empty",c=n[d+1]?n[d+1][0]:"empty",!A0[h]&&!A0[c]?a.slice(-1)===","?u=!1:a+=s[1]:u=!1):a+=s[1];if(!u){let d=n.reduce((f,p)=>f+p[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new _0;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var UI=qI;let WI=Cr,GI=UI,KI=bc;function eu(i,e){let t=new KI(i,e),n=new GI(t);try{n.parse()}catch(r){throw r}return n.root}var fm=eu;eu.default=eu;WI.registerParse(eu);let{isClean:dn,my:YI}=ia,XI=Hw,JI=pc,QI=Cr,ZI=um,L0=cm,eO=fm,tO=ra;const nO={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},iO={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},rO={Once:!0,postcssPlugin:!0,prepare:!0},rs=0;function Is(i){return typeof i=="object"&&typeof i.then=="function"}function ox(i){let e=!1,t=nO[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,rs,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,rs,t+"Exit"]:[t,t+"Exit"]}function M0(i){let e;return i.type==="document"?e=["Document",rs,"DocumentExit"]:i.type==="root"?e=["Root",rs,"RootExit"]:e=ox(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function Vh(i){return i[dn]=!1,i.nodes&&i.nodes.forEach(e=>Vh(e)),i}let Hh={},ss=class ax{constructor(e,t,n){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=Vh(t);else if(t instanceof ax||t instanceof L0)r=Vh(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let s=eO;n.syntax&&(s=n.syntax.parse),n.parser&&(s=n.parser),s.parse&&(s=s.parse);try{r=s(t,n)}catch(o){this.processed=!0,this.error=o}r&&!r[YI]&&QI.rebuild(r)}this.result=new L0(e,r,n),this.helpers={...Hh,postcss:Hh,result:this.result},this.plugins=this.processor.plugins.map(s=>typeof s=="object"&&s.prepare?{...s,...s.prepare(this.result)}:s)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,n,r)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!iO[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!rO[n])if(typeof t[n]=="object")for(let r in t[n])r==="*"?e(t,n,t[n][r]):e(t,n+"-"+r.toLowerCase(),t[n][r]);else typeof t[n]=="function"&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(Is(n))try{await n}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[dn];){e[dn]=!0;let t=[M0(e)];for(;t.length>0;){let n=this.visitTick(t);if(Is(n))try{await n}catch(r){let s=t[t.length-1].node;throw this.handleError(r,s)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(s=>n(s,this.helpers));await Promise.all(r)}else await n(e,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return Is(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=JI;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new XI(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Is(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[dn];)e[dn]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){this.result.lastPlugin=n;let s;try{s=r(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Is(s))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[o,l]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(n.toProxy(),this.helpers)}catch(a){throw this.handleError(a,n)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!l[dn]){l[dn]=!0,e.push(M0(l));return}t.iterator=0,delete n.indexes[o]}let s=t.events;for(;t.eventIndex<s.length;){let o=s[t.eventIndex];if(t.eventIndex+=1,o===rs){n.nodes&&n.nodes.length&&(n[dn]=!0,t.iterator=n.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[dn]=!0;let t=ox(e);for(let n of t)if(n===rs)e.nodes&&e.each(r=>{r[dn]||this.walkSync(r)});else{let r=this.listeners[n];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ss.registerPostcss=i=>{Hh=i};var lx=ss;ss.default=ss;tO.registerLazyResult(ss);ZI.registerLazyResult(ss);let sO=Hw,oO=pc,aO=fm;const lO=cm;let jh=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let r,s=oO;this.result=new lO(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new sO(s,r,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=aO;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var uO=jh;jh.default=jh;let cO=uO,dO=lx,hO=um,fO=ra,_o=class{constructor(e=[]){this.version="8.4.41",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new cO(this,e,t):new dO(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var pO=_o;_o.default=_o;fO.registerProcessor(_o);hO.registerProcessor(_o);let mO=gc,gO=Nw,bO=yc,yO=dm,vO=bc,wO=ra,xO=hm;function Ao(i,e){if(Array.isArray(i))return i.map(r=>Ao(r));let{inputs:t,...n}=i;if(t){e=[];for(let r of t){let s={...r,__proto__:vO.prototype};s.map&&(s.map={...s.map,__proto__:gO.prototype}),e.push(s)}}if(n.nodes&&(n.nodes=i.nodes.map(r=>Ao(r,e))),n.source){let{inputId:r,...s}=n.source;n.source=s,r!=null&&(n.source.input=e[r])}if(n.type==="root")return new wO(n);if(n.type==="decl")return new mO(n);if(n.type==="rule")return new xO(n);if(n.type==="comment")return new bO(n);if(n.type==="atrule")return new yO(n);throw new Error("Unknown node type: "+i.type)}var EO=Ao;Ao.default=Ao;var I0={};let TO=om,ux=gc,SO=lx,CO=Cr,pm=pO,kO=pc,_O=EO,cx=um,AO=Zw,dx=yc,hx=dm,LO=cm,MO=bc,IO=fm,OO=rx,fx=hm,px=ra,DO=mc;function Ee(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new pm(i)}Ee.plugin=function(e,t){let n=!1;function r(...o){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: 146https://evilmartians.com/chronicles/postcss-8-plugin-migration`),I0.LANG&&I0.LANG.startsWith("cn")&&console.warn(e+`: éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå: 147https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new pm().version,l}let s;return Object.defineProperty(r,"postcss",{get(){return s||(s=r()),s}}),r.process=function(o,l,a){return Ee([r(a)]).process(o,l)},r};Ee.stringify=kO;Ee.parse=IO;Ee.fromJSON=_O;Ee.list=OO;Ee.comment=i=>new dx(i);Ee.atRule=i=>new hx(i);Ee.decl=i=>new ux(i);Ee.rule=i=>new fx(i);Ee.root=i=>new px(i);Ee.document=i=>new cx(i);Ee.CssSyntaxError=TO;Ee.Declaration=ux;Ee.Container=CO;Ee.Processor=pm;Ee.Document=cx;Ee.Comment=dx;Ee.Warning=AO;Ee.AtRule=hx;Ee.Result=LO;Ee.Input=MO;Ee.Rule=fx;Ee.Root=px;Ee.Node=DO;SO.registerPostcss(Ee);var PO=Ee;Ee.default=Ee;const RO=rw,O0=IM,{isPlainObject:NO}=rm,D0=WM,BO=GM,{parse:FO}=PO,zO=["img","audio","video","picture","svg","object","map","iframe","embed"],VO=["script","style"];
147function zs(i,e){i&&Object.keys(i).forEach(function(t){e(i[t],t)})}function Pn(i,e){return{}.hasOwnProperty.call(i,e)}function P0(i,e){const t=[];return zs(i,function(n){e(n)&&t.push(n)}),t}function HO(i){for(const e in i)if(Pn(i,e))return!1;return!0}function jO(i){return i.map(function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")}).join(", ")}var $O=Lo;const qO=/^[^\0\t\n\f\r /<=>]+$/;function Lo(i,e,t){if(i==null)return"";typeof i=="number"&&(i=i.toString());let n="",r="";function s(T,L){const I=this;this.tag=T,this.attribs=L||{},this.tagPosition=n.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(m.length){const P=m[m.length-1];P.text+=I.text}},this.updateParentNodeMediaChildren=function(){m.length&&zO.includes(this.tag)&&m[m.length-1].mediaChildren.push(this.tag)}}e=Object.assign({},Lo.defaults,e),e.parser=Object.assign({},UO,e.parser);const o=function(T){return e.allowedTags===!1||(e.allowedTags||[]).indexOf(T)>-1};VO.forEach(function(T){o(T)&&!e.allowVulnerableTags&&console.warn(` 148 149â ï¸ Your \`allowedTags\` option includes, \`${T}\`, which is inherently 150vulnerable to XSS attacks. Please remove it from \`allowedTags\`. 151Or, to disable this warning, add the \`allowVulnerableTags\` option 152and ensure you are accounting for this risk. 153 154`)});const l=e.nonTextTags||["script","style","textarea","option"];let a,u;e.allowedAttributes&&(a={},u={},zs(e.allowedAttributes,function(T,L){a[L]=[];const I=[];T.forEach(function(P){typeof P=="string"&&P.indexOf("*")>=0?I.push(O0(P).replace(/\\\*/g,".*")):a[L].push(P)}),I.length&&(u[L]=new RegExp("^("+I.join("|")+")$"))}));const c={},h={},d={};
154zs(e.allowedClasses,function(T,L){if(a&&(Pn(a,L)||(a[L]=[]),a[L].push("class")),c[L]=T,Array.isArray(T)){const I=[];c[L]=[],d[L]=[],T.forEach(function(P){typeof P=="string"&&P.indexOf("*")>=0?I.push(O0(P).replace(/\\\*/g,".*")):P instanceof RegExp?d[L].push(P):c[L].push(P)}),I.length&&(h[L]=new RegExp("^("+I.join("|")+")$"))}});const f={};let p;zs(e.transformTags,function(T,L){let I;typeof T=="function"?I=T:typeof T=="string"&&(I=Lo.simpleTransform(T)),L==="*"?p=I:f[L]=I});let b,m,v,g,y,w,E=!1;S();const x=new RO.Parser({onopentag:function(T,L){if(e.enforceHtmlBoundary&&T==="html"&&S(),y){w++;return}const I=new s(T,L);m.push(I);let P=!1;const R=!!I.text;let z;if(Pn(f,T)&&(z=f[T](T,L),I.attribs=L=z.attribs,z.text!==void 0&&(I.innerText=z.text),T!==z.tagName&&(I.name=T=z.tagName,g[b]=z.tagName)),p&&(z=p(T,L),I.attribs=L=z.attribs,T!==z.tagName&&(I.name=T=z.tagName,g[b]=z.tagName)),(!o(T)||e.disallowedTagsMode==="recursiveEscape"&&!HO(v)||e.nestingLimit!=null&&b>=e.nestingLimit)&&(P=!0,v[b]=!0,(e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")&&l.indexOf(T)!==-1&&(y=!0,w=1),v[b]=!0),b++,P){if(e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")return;r=n,n=""}n+="<"+T,T==="script"&&(e.allowedScriptHostnames||e.allowedScriptDomains)&&(I.innerText=""),(!a||Pn(a,T)||a["*"])&&zs(L,function(N,B){if(!qO.test(B)){delete I.attribs[B];return}if(N===""&&!e.allowedEmptyAttributes.includes(B)&&(e.nonBooleanAttributes.includes(B)||e.nonBooleanAttributes.includes("*"))){delete I.attribs[B];return}let j=!1;if(!a||Pn(a,T)&&a[T].indexOf(B)!==-1||a["*"]&&a["*"].indexOf(B)!==-1||Pn(u,T)&&u[T].test(B)||u["*"]&&u["*"].test(B))j=!0;else if(a&&a[T]){for(const Y of a[T])if(NO(Y)&&Y.name&&Y.name===B){j=!0;let V="";if(Y.multiple===!0){const Q=N.split(" ");for(const le of Q)Y.values.indexOf(le)!==-1&&(V===""?V=le:V+=" "+le)}else Y.values.indexOf(N)>=0&&(V=N);N=V}}if(j){if(e.allowedSchemesAppliedToAttributes.indexOf(B)!==-1&&M(T,N)){delete I.attribs[B];return}if(T==="script"&&B==="src"){let Y=!0;try{const V=O(N);if(e.allowedScriptHostnames||e.allowedScriptDomains){const Q=(e.allowedScriptHostnames||[]).find(function(be){return be===V.url.hostname}),le=(e.allowedScriptDomains||[]).find(function(be){return V.url.hostname===be||V.url.hostname.endsWith(`.${be}`)});Y=Q||le}}catch{Y=!1}if(!Y){delete I.attribs[B];return}}if(T==="iframe"&&B==="src"){let Y=!0;try{const V=O(N);if(V.isRelativeUrl)Y=Pn(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){const Q=(e.allowedIframeHostnames||[]).find(function(be){return be===V.url.hostname}),le=(e.allowedIframeDomains||[]).find(function(be){return V.url.hostname===be||V.url.hostname.endsWith(`.${be}`)});Y=Q||le}}catch{Y=!1}if(!Y){delete I.attribs[B];return}}if(B==="srcset")try{let Y=BO(N);if(Y.forEach(function(V){M("srcset",V.url)&&(V.evil=!0)}),Y=P0(Y,function(V){return!V.evil}),Y.length)N=jO(P0(Y,function(V){return!V.evil})),I.attribs[B]=N;else{delete I.attribs[B];return}}catch{delete I.attribs[B];return}if(B==="class"){const Y=c[T],V=c["*"],Q=h[T],le=d[T],be=h["*"],qe=[Q,be].concat(le).filter(function(Pe){return Pe});if(Y&&V?N=C(N,D0(Y,V),qe):N=C(N,Y||V,qe),!N.length){delete I.attribs[B];return}}if(B==="style"){if(e.parseStyleAttributes)try{const Y=FO(T+" {"+N+"}",{map:!1}),V=D(Y,e.allowedStyles);if(N=k(V),N.length===0){delete I.attribs[B];return}}catch{typeof window<"u"&&console.warn('Failed to parse "'+T+" {"+N+`}", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547`),delete I.attribs[B];return}else if(e.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.")}n+=" "+B,N&&N.length?n+='="'+_(N,!0)+'"':e.allowedEmptyAttributes.includes(B)&&(n+='=""')}else delete I.attribs[B]}),e.selfClosing.indexOf(T)!==-1?n+=" />":(n+=">",I.innerText&&!R&&!e.textFilter&&(n+=_(I.innerText),E=!0)),P&&(n=r+_(n),r="")},ontext:function(T){if(y)return;const L=m[m.length-1];let I;if(L&&(I=L.tag,T=L.innerText!==void 0?L.innerText:T),e.disallowedTagsMode==="completelyDiscard"&&!o(I))T="";else if((e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard")&&(I==="script"||I==="style"))n+=T;else{const P=_(T,!1);e.textFilter&&!E?n+=e.textFilter(P,I):E||(n+=P)}if(m.length){const P=m[m.length-1];P.text+=T}},onclosetag:function(T,L){if(y)if(w--,!w)y=!1;else return;const I=m.pop();if(!I)return;if(I.tag!==T){m.push(I);return}y=e.enforceHtmlBoundary?T==="html":!1,b--;const P=v[b];if(P){if(delete v[b],e.disallowedTagsMode==="discard"||e.disallowedTagsMode==="completelyDiscard"){I.updateParentNodeText();return}r=n,n=""}if(g[b]&&(T=g[b],delete g[b]),e.exclusiveFilter&&e.exclusiveFilter(I)){n=n.substr(0,I.tagPosition);return}if(I.updateParentNodeMediaChildren(),I.updateParentNodeText(),e.selfClosing.indexOf(T)!==-1||L&&!o(T)&&["escape","recursiveEscape"].indexOf(e.disallowedTagsMode)>=0){P&&(n=r,r="");return}n+="</"+T+">",P&&(n=r+_(n),r=""),E=!1}},e.parser);return x.write(i),x.end(),n;function S(){n="",b=0,m=[],v={},g={},y=!1,w=0}function _(T,L){return typeof T!="string"&&(T=T+""),e.parser.decodeEntities&&(T=T.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),L&&(T=T.replace(/"/g,"""))),T=T.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),L&&(T=T.replace(/"/g,""")),T}
154function M(T,L){for(L=L.replace(/[\x00-\x20]+/g,"");;){const R=L.indexOf("<!--");if(R===-1)break;const z=L.indexOf("-->",R+4);if(z===-1)break;L=L.substring(0,R)+L.substring(z+3)}const I=L.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!I)return L.match(/^[/\\]{2}/)?!e.allowProtocolRelative:!1;const P=I[1].toLowerCase();return Pn(e.allowedSchemesByTag,T)?e.allowedSchemesByTag[T].indexOf(P)===-1:!e.allowedSchemes||e.allowedSchemes.indexOf(P)===-1}function O(T){if(T=T.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//"),T.startsWith("relative:"))throw new Error("relative: exploit attempt");let L="relative://relative-site";for(let R=0;R<100;R++)L+=`/${R}`;const I=new URL(T,L);return{isRelativeUrl:I&&I.hostname==="relative-site"&&I.protocol==="relative:",url:I}}function D(T,L){if(!L)return T;const I=T.nodes[0];let P;return L[I.selector]&&L["*"]?P=D0(L[I.selector],L["*"]):P=L[I.selector]||L["*"],P&&(T.nodes[0].nodes=I.nodes.reduce(A(P),[])),T}function k(T){return T.nodes[0].nodes.reduce(function(L,I){return L.push(`${I.prop}:${I.value}${I.important?" !important":""}`),L},[]).join(";")}function A(T){return function(L,I){return Pn(T,I.prop)&&T[I.prop].some(function(R){return R.test(I.value)})&&L.push(I),L}}function C(T,L,I){return L?(T=T.split(/\s+/),T.filter(function(P){return L.indexOf(P)!==-1||I.some(function(R){return R.test(P)})}).join(" ")):T}}const UO={decodeEntities:!0};Lo.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0};Lo.simpleTransform=function(i,e,t){return t=t===void 0?!0:t,e=e||{},function(n,r){let s;if(t)for(s in e)r[s]=e[s];else r=e;return{tagName:i,attribs:r}}};const mm=Go($O);class mx extends U{connect(){const e=this;this.lastCursorPosition=null,this.addTrixToolbar=this.addTrixToolbar.bind(this),this.addTrixToolbars=this.addTrixToolbars.bind(this),this.selectUnit=this.selectUnit.bind(this),this.filterUser=this.filterUser.bind(this),this.trixEditor=this.trixEditorTarget.querySelector("trix-editor"),this.trixInput=document.getElementById("email_body_trix_input_email"),this.plainTextInput=document.getElementById("email_body_input"),this.disablePlainTextEditor(),document.addEventListener("trix-initialize",function(t){const n=t.target;n.addEventListener("paste",function(r){const s=r.clipboardData||window.clipboardData;if(!s)return;const o=s.getData("text/html"),l=s.getData("text/plain");o?(r.preventDefault(),r.stopPropagation(),n.editor.undo(),n.editor.insertHTML(o)):l&&(r.preventDefault(),r.stopPropagation(),n.editor.undo(),n.editor.insertHTML(mm(l)))})}),document.addEventListener("trix-initialize",this.addTrixToolbars,{once:!0}),this.templateTarget.addEventListener("change",function(){turboFetch(e.templateTarget.dataset.templateUrl.replace("__ID__",this.value),function(){})})}addTrixToolbars(e){const t=this,n=e.target.editor;let r=document.querySelector(".trix-button-group-spacer");r.classList.add("ms-4"),Array.from(["first_name","last_name","company","phone","unsub"]).forEac
154h(s=>this.addTrixToolbar(r,s)),n.element.addEventListener("trix-selection-change",function(s){t.lastCursorPosition=n.getSelectedRange()}),r.addEventListener("click",function(s){if(s.target.getAttribute("data-trix-attribute")==="keytext"){const o=s.target.getAttribute("data-trix-value");if(t.lastCursorPosition!==null)n.setSelectedRange(t.lastCursorPosition),n.insertString(o);else{const l=n.getSelectedRange();n.insertString(o,l[0])}}})}addTrixToolbar(e,t){e.insertAdjacentHTML("beforeend",`<span class="trix-button-group-button text-gray-900 dark:text-gray-400 mx-1.5 text-sm hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 rounded py-1 px-2 inline-flex items-center justify-center bg-white border-gray-200 border" data-trix-attribute="keytext" data-trix-value="[${t}]" title="${t}">[${t}]</span>`)}disablePlainTextEditor(){this.plainTextTarget.setAttribute("disabled",!0),this.plainTextTarget.classList.add("disabled"),this.plainTextInput.style.disabled=!0}enablePlainTextEditor(){this.plainTextTarget.removeAttribute("disabled"),this.plainTextTarget.classList.remove("disabled"),this.plainTextInput.style.disabled=!1}disableTrixEditor(){this.trixEditor.setAttribute("contenteditable","false"),this.trixEditor.classList.add("disabled"),this.trixInput.style.disabled=!0}enableTrixEditor(){this.trixEditor.setAttribute("contenteditable","true"),this.trixEditor.classList.remove("disabled"),this.trixInput.style.disabled=!1}showPlainText(){console.log("showPlainText",this.plainTextInput,this.trixInput.value),this.plainTextInput.innerHTML=this.trixInput.value,this.enablePlainTextEditor(),this.disableTrixEditor()}showTrix(){console.log("showTrix",this.plainTextInput.value),this.trixInput.value=this.plainTextInput.value,this.trixEditor.editor.loadHTML(this.plainTextInput.value),this.enableTrixEditor(),this.disablePlainTextEditor()}}$(mx,"targets",["body","template","form","plainText","trixEditor"]);const WO=Object.freeze(Object.defineProperty({__proto__:null,default:mx},Symbol.toStringTag,{value:"Module"}));/*! 155 * Intro.js v7.2.0 156 * https://introjs.com 157 * 158 * Copyright (C) 2012-2023 Afshin Mehrabani (@afshinmeh). 159 * https://introjs.com 160 * 161 * Date: Mon, 14 Aug 2023 19:47:14 GMT 162 */function tu(i){return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tu(i)}function we(i,e,t,n){return new(t||(t=Promise))(function(r,s){function o(u){try{a(n.next(u))}catch(c){s(c)}}function l(u){try{a(n.throw(u))}catch(c){s(c)}}function a(u){var c;u.done?r(u.value):(c=u.value,c instanceof t?c:new t(function(h){h(c)})).then(o,l)}a((n=n.apply(i,[])).next())})}function xe(i,e){var t,n,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(a){return function(u){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;s&&(s=0,c[0]&&(o=0)),o;)try{if(t=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(r=o.trys,!((r=r.length>0&&r[r.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(c[0]===6&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=e.call(i,o)}catch(h){c=[6,h],n=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([a,u])}}}function R0(i,e,t){var n,r=((n={})[i]=e,n.path="/",n.expires=void 0,n);if(t){var s=new Date;s.setTime(s.getTime()+24*t*60*60*1e3),r.expires=s.toUTCString()}var o=[];for(var l in r)o.push("".concat(l,"=").concat(r[l]));return document.cookie=o.join("; "),gx(i)}function gx(i){return(e={},document.cookie.split(";").forEach(function(t){var n=t.split("="),r=n[0],s=n[1];e[r.trim()]=s}),e)[i];var e}function GO(i,e){e?R0(i._options.dontShowAgainCookie,"true",i._options.dontShowAgainCookieDays):R0(i._options.dontShowAgainCookie,"",-1)}var Ra,$h=(Ra={},function(i,e){return e===void 0&&(e="introjs-stamp"),Ra[e]=Ra[e]||0,i[e]===void 0&&(i[e]=Ra[e]++),i[e]}),Sn=new(function(){function i(){this.events_key="introjs_event"}return i.prototype._id=function(e,t,n){return e+$h(t)+(n?"_".concat($h(n)):"")}
162,i.prototype.on=function(e,t,n,r,s){var o=this._id(t,n,r),l=function(a){return n(r||e,a||window.event)};"addEventListener"in e?e.addEventListener(t,l,s):"attachEvent"in e&&e.attachEvent("on".concat(t),l),e[this.events_key]=e[this.events_key]||{},e[this.events_key][o]=l},i.prototype.off=function(e,t,n,r,s){var o=this._id(t,n,r),l=e[this.events_key]&&e[this.events_key][o];l&&("removeEventListener"in e?e.removeEventListener(t,l,s):"detachEvent"in e&&e.detachEvent("on".concat(t),l),e[this.events_key][o]=null)},i}()),Le=function(i){return typeof i=="function"};function bn(i,e){if(i instanceof SVGElement){var t=i.getAttribute("class")||"";t.match(e)||i.setAttribute("class","".concat(t," ").concat(e))}else if(i.classList!==void 0)for(var n=0,r=e.split(" ");n<r.length;n++){var s=r[n];i.classList.add(s)}else i.className.match(e)||(i.className+=" ".concat(e))}function gm(i,e){var t="";return"currentStyle"in i?t=i.currentStyle[e]:document.defaultView&&document.defaultView.getComputedStyle&&(t=document.defaultView.getComputedStyle(i,null).getPropertyValue(e)),t&&t.toLowerCase?t.toLowerCase():t}function N0(i,e){if(i){var t=function(n){var r=window.getComputedStyle(n),s=r.position==="absolute",o=/(auto|scroll)/;if(r.position==="fixed")return document.body;for(var l=n;l=l.parentElement;)if(r=window.getComputedStyle(l),(!s||r.position!=="static")&&o.test(r.overflow+r.overflowY+r.overflowX))return l;return document.body}(e);t!==document.body&&(t.scrollTop=e.offsetTop-t.offsetTop)}}function bm(){if(window.innerWidth!==void 0)return{width:window.innerWidth,height:window.innerHeight};var i=document.documentElement;return{width:i.clientWidth,height:i.clientHeight}}function B0(i,e,t,n,r){var s;if(e!=="off"&&i&&(s=e==="tooltip"?r.getBoundingClientRect():n.getBoundingClientRect(),!function(l){var a=l.getBoundingClientRect();return a.top>=0&&a.left>=0&&a.bottom+80<=window.innerHeight&&a.right<=window.innerWidth}(n))){var o=bm().height;s.bottom-(s.bottom-s.top)<0||n.clientHeight>o?window.scrollBy(0,s.top-(o/2-s.height/2)-t):window.scrollBy(0,s.top-(o/2-s.height/2)+t)}}function eo(i){i.setAttribute("role","button"),i.tabIndex=0}function vc(i){var e=i.parentElement;return!(!e||e.nodeName==="HTML")&&(gm(i,"position")==="fixed"||vc(e))}function as(i,e){var t=document.body,n=document.documentElement,r=window.pageYOffset||n.scrollTop||t.scrollTop,s=window.pageXOffset||n.scrollLeft||t.scrollLeft;e=e||t;var o=i.getBoundingClientRect(),l=e.getBoundingClientRect(),a=gm(e,"position"),u={width:o.width,height:o.height};return e.tagName.toLowerCase()!=="body"&&a==="relative"||a==="sticky"?Object.assign(u,{top:o.top-l.top,left:o.left-l.left}):vc(i)?Object.assign(u,{top:o.top,left:o.left}):Object.assign(u,{top:o.top+r,left:o.left+s})}function ym(i,e){if(i instanceof SVGElement){var t=i.getAttribute("class")||"";i.setAttribute("class",t.replace(e,"").replace(/^\s+|\s+$/g,""))}else i.className=i.className.replace(e,"").replace(/^\s+|\s+$/g,"")}function Li(i,e){var t="";if(i.style.cssText&&(t+=i.style.cssText),typeof e=="string")t+=e;else for(var n in e)t+="".concat(n,":").concat(e[n],";");i.style.cssText=t}function Fn(i,e,t){if(t&&e){var n=as(e.element,i._targetElement),r=i._options.helperElementPadding;e.element instanceof Element&&vc(e.element)?bn(t,"introjs-fixedTooltip"):ym(t,"introjs-fixedTooltip"),e.position==="floating"&&(r=0),Li(t,{width:"".concat(n.width+r,"px"),height:"".concat(n.height+r,"px"),top:"".concat(n.top-r/2,"px"),left:"".concat(n.left-r/2,"px")})}}function Na(i,e,t,n,r){return i.left+e+t.width>n.width?(r.style.left="".concat(n.width-t.width-i.left,"px"),!1):(r.style.left="".concat(e,"px"),!0)}function Ba(i,e,t,n){return i.left+i.width-e-t.width<0?(n.style.left="".concat(-i.left,"px"),!1):(n.style.right="".concat(e,"px"),!0)}function cn(i,e){i.includes(e)&&i.splice(i.indexOf(e),1)}function KO(i,e,t,n){var r=i.slice(),s=bm(),o=as(t).height+10,l=as(t).width+20,a=e.getBoundingClientRect(),u="floating";if(a.bottom+o>s.height&&cn(r,"bottom"),a.top-o<0&&cn(r,"top"),a.right+l>s.width&&cn(r,"right"),a.left-l<0&&cn(r,"left"),n&&(n=n.split("-")[0]),r.length&&(u=r[0],r.includes(n)&&(u=n)),u==="top"||u==="bottom"){var c=void 0,h=[];u==="top"?(c="top-middle-aligned",h=["top-left-aligned","top-middle-aligned","top-right-aligned"]):(c="bottom-middle-aligned",h=["bottom-left-aligned","bottom-middle-aligned","bottom-right-aligned"]),u=function(d,f,p,b){var m=f/2,v=Math.min(p,window.screen.width);return v-d<f&&(cn(b,"top-left-aligned"),cn(b,"bottom-left-aligned")),(d<m||v-d<m)&&(cn(b,"top-middle-aligned"),cn(b,"bottom-middle-aligned")),d<f&&(cn(b,"top-right-aligned"),cn(b,"bottom-right-aligned")),b.length?b[0]:null}(a.left,l,s.width,h)||c}return u}function nu(i,e,t,n,r){if(r===void 0&&(r=!1),e){var s,o,l,a,u="";t.style.top="",t.style.right="",t.style.bottom="",t.style.left="",t.style.marginLeft="",t.style.marginTop="",n.style.display="inherit",u=typeof e.tooltipClass=="string"?e.tooltipClass:i._options.tooltipClass,t.className=["introjs-tooltip",u].filter(
162Boolean).join(" "),t.setAttribute("role","dialog"),(a=e.position)!=="floating"&&i._options.autoPosition&&(a=KO(i._options.positionPrecedence,e.element,t,a)),o=as(e.element),s=as(t),l=bm(),bn(t,"introjs-".concat(a));var c=o.width/2-s.width/2;switch(a){case"top-right-aligned":n.className="introjs-arrow bottom-right";var h=0;Ba(o,h,s,t),t.style.bottom="".concat(o.height+20,"px");break;case"top-middle-aligned":n.className="introjs-arrow bottom-middle",r&&(c+=5),Ba(o,c,s,t)&&(t.style.right="",Na(o,c,s,l,t)),t.style.bottom="".concat(o.height+20,"px");break;case"top-left-aligned":case"top":n.className="introjs-arrow bottom",Na(o,r?0:15,s,l,t),t.style.bottom="".concat(o.height+20,"px");break;case"right":t.style.left="".concat(o.width+20,"px"),o.top+s.height>l.height?(n.className="introjs-arrow left-bottom",t.style.top="-".concat(s.height-o.height-20,"px")):n.className="introjs-arrow left";break;case"left":r||i._options.showStepNumbers!==!0||(t.style.top="15px"),o.top+s.height>l.height?(t.style.top="-".concat(s.height-o.height-20,"px"),n.className="introjs-arrow right-bottom"):n.className="introjs-arrow right",t.style.right="".concat(o.width+20,"px");break;case"floating":n.style.display="none",t.style.left="50%",t.style.top="50%",t.style.marginLeft="-".concat(s.width/2,"px"),t.style.marginTop="-".concat(s.height/2,"px");break;case"bottom-right-aligned":n.className="introjs-arrow top-right",Ba(o,h=0,s,t),t.style.top="".concat(o.height+20,"px");break;case"bottom-middle-aligned":n.className="introjs-arrow top-middle",r&&(c+=5),Ba(o,c,s,t)&&(t.style.right="",Na(o,c,s,l,t)),t.style.top="".concat(o.height+20,"px");break;default:n.className="introjs-arrow top",Na(o,0,s,l,t),t.style.top="".concat(o.height+20,"px")}}}function bx(){for(var i=0,e=Array.from(document.querySelectorAll(".introjs-showElement"));i<e.length;i++)ym(e[i],/introjs-[a-zA-Z]+/g)}function me(i,e){var t=document.createElement(i);e=e||{};var n=/^(?:role|data-|aria-)/;for(var r in e){var s=e[r];r==="style"&&typeof s!="function"?Li(t,s):typeof s=="string"&&r.match(n)?t.setAttribute(r,s):t[r]=s}return t}function F0(i,e,t){if(t===void 0&&(t=!1),t){var n=e.style.opacity||"1";Li(e,{opacity:"0"}),window.setTimeout(function(){Li(e,{opacity:n})},10)}i.appendChild(e)}function yx(i,e){return(i+1)/e*100}function vx(i,e){var t=me("div",{className:"introjs-bullets"});i._options.showBullets===!1&&(t.style.display="none");var n=me("ul");n.setAttribute("role","tablist");for(var r=function(){var u=this.getAttribute("data-step-number");u!=null&&i.goToStep(parseInt(u,10))},s=0;s<i._introItems.length;s++){var o=i._introItems[s].step,l=me("li"),a=me("a");l.setAttribute("role","presentation"),a.setAttribute("role","tab"),a.onclick=r,s===e.step-1&&(a.className="active"),eo(a),a.innerHTML=" ",a.setAttribute("data-step-number",o.toString()),l.appendChild(a),n.appendChild(l)}return t.appendChild(n),t}function wx(i,e,t){var n=i.querySelector(".introjs-progress .introjs-progressbar");if(n){var r=yx(e,t);n.style.cssText="width:".concat(r,"%;"),n.setAttribute("aria-valuenow",r.toString())}}function xx(i,e){return we(this,void 0,void 0,function(){var t,n,r,s,o,l,a,u,c,h,d,f,p,b,m,v,g,y,w,E,x,S,_,M,O=this;return xe(this,function(D){switch(D.label){case 0:return Le(i._introChangeCallback)?[4,i._introChangeCallback.call(i,e.element)]:[3,2];case 1:D.sent(),D.label=2;case 2:return t=document.querySelector(".introjs-helperLayer"),n=document.querySelector(".introjs-tooltipReferenceLayer"),r="introjs-helperLayer",typeof e.highlightClass=="string"&&(r+=" ".concat(e.highlightClass)),typeof i._options.highlightClass=="string"&&(r+=" ".concat(i._options.highlightClass)),t!==null&&n!==null?(a=n.querySelector(".introjs-helperNumberLayer"),u=n.querySelector(".introjs-tooltiptext"),c=n.querySelector(".introjs-tooltip-title"),h=n.querySelector(".introjs-arrow"),d=n.querySelector(".introjs-tooltip"),l=n.querySelector(".introjs-skipbutton"),o=n.querySelector(".introjs-prevbutton"),s=n.querySelector(".introjs-nextbutton"),t.className=r,d.style.opacity="0",d.style.display="none",N0(i._options.scrollToElement,e.element),Fn(i,e,t),Fn(i,e,n),bx(),i._lastShowElementTimer&&window.clearTimeout(i._lastShowElementTimer),i._lastShowElementTimer=window.setTimeout(function(){a!==null&&(a.innerHTML="".concat(e.step," ").concat(i._options.stepNumbersOfLabel," ").concat(i._introItems.length)),u.innerHTML=e.intro||"",c.innerHTML=e.title||"",d.style.display="block",nu(i,e,d,h),function(k,A,C){if
162(k){var T=A.querySelector(".introjs-bullets li > a.active"),L=A.querySelector('.introjs-bullets li > a[data-step-number="'.concat(C.step,'"]'));T&&L&&(T.className="",L.className="active")}}(i._options.showBullets,n,e),wx(n,i._currentStep,i._introItems.length),d.style.opacity="1",(s!=null&&/introjs-donebutton/gi.test(s.className)||s!=null)&&s.focus(),B0(i._options.scrollToElement,e.scrollTo,i._options.scrollPadding,e.element,u)},350)):(f=me("div",{className:r}),p=me("div",{className:"introjs-tooltipReferenceLayer"}),b=me("div",{className:"introjs-arrow"}),m=me("div",{className:"introjs-tooltip"}),v=me("div",{className:"introjs-tooltiptext"}),g=me("div",{className:"introjs-tooltip-header"}),y=me("h1",{className:"introjs-tooltip-title"}),w=me("div"),Li(f,{"box-shadow":"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, ".concat(i._options.overlayOpacity.toString(),") 0 0 0 5000px")}),N0(i._options.scrollToElement,e.element),Fn(i,e,f),Fn(i,e,p),F0(i._targetElement,f,!0),F0(i._targetElement,p),v.innerHTML=e.intro,y.innerHTML=e.title,w.className="introjs-tooltipbuttons",i._options.showButtons===!1&&(w.style.display="none"),g.appendChild(y),m.appendChild(g),m.appendChild(v),i._options.dontShowAgain&&(E=me("div",{className:"introjs-dontShowAgain"}),(x=me("input",{type:"checkbox",id:"introjs-dontShowAgain",name:"introjs-dontShowAgain"})).onchange=function(k){i.setDontShowAgain(k.target.checked)},(S=me("label",{htmlFor:"introjs-dontShowAgain"})).innerText=i._options.dontShowAgainLabel,E.appendChild(x),E.appendChild(S),m.appendChild(E)),m.appendChild(vx(i,e)),m.appendChild(function(k){var A=me("div");A.className="introjs-progress",k._options.showProgress===!1&&(A.style.display="none");var C=me("div",{className:"introjs-progressbar"});k._options.progressBarAdditionalClass&&(C.className+=" "+k._options.progressBarAdditionalClass);var T=yx(k._currentStep,k._introItems.length);return C.setAttribute("role","progress"),C.setAttribute("aria-valuemin","0"),C.setAttribute("aria-valuemax","100"),C.setAttribute("aria-valuenow",T.toString()),C.style.cssText="width:".concat(T,"%;"),A.appendChild(C),A}(i)),_=me("div"),i._options.showStepNumbers===!0&&(_.className="introjs-helperNumberLayer",_.innerHTML="".concat(e.step," ").concat(i._options.stepNumbersOfLabel," ").concat(i._introItems.length),m.appendChild(_)),m.appendChild(b),p.appendChild(m),(s=me("a")).onclick=function(){return we(O,void 0,void 0,function(){return xe(this,function(k){switch(k.label){case 0:return i._introItems.length-1===i._currentStep?[3,2]:[4,dr(i)];case 1:return k.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(s.className)?Le(i._introCompleteCallback)?[4,i._introCompleteCallback.call(i,i._currentStep,"done")]:[3,4]:[3,6];case 3:k.sent(),k.label=4;case 4:return[4,hr(i,i._targetElement)];case 5:k.sent(),k.label=6;case 6:return[2]}})})},eo(s),s.innerHTML=i._options.nextLabel,(o=me("a")).onclick=function(){return we(O,void 0,void 0,function(){return xe(this,function(k){switch(k.label){case 0:return i._currentStep>0?[4,iu(i)]:[3,2];case 1:k.sent(),k.label=2;case 2:return[2]}})})},eo(o),o.innerHTML=i._options.prevLabel,eo(l=me("a",{className:"introjs-skipbutton"})),l.innerHTML=i._options.skipLabel,l.onclick=function(){return we(O,void 0,void 0,function(){return xe(this,function(k){switch(k.label){case 0:return i._introItems.length-1===i._currentStep&&Le(i._introCompleteCallback)?[4,i._introCompleteCallback.call(i,i._currentStep,"skip")]:[3,2];case 1:k.sent(),k.label=2;case 2:return Le(i._introSkipCallback)?[4,i._introSkipCallback.call(i,i._currentStep)]:[3,4];case 3:k.sent(),k.label=4;case 4:return[4,hr(i,i._targetElement)];case 5:return k.sent(),[2]}})})},g.appendChild(l),i._introItems.length>1&&w.appendChild(o),w.appendChild(s),m.appendChild(w),nu(i,e,m,b),B0(i._options.scrollToElement,e.scrollTo,i._options.scrollPadding,e.element,m)),(M=i._targetElement.querySelector(".introjs-disableInteraction"))&&M.parentNode&&M.parentNode.removeChild(M),e.disableInteraction&&function(k,A){var C=document.querySelector(".introjs-disableInteraction");C===null&&(C=me("div",{className:"introjs-disableInteraction"}),k._targetElement.appendChild(C)),Fn(k,A,C)}(i,e),i._currentStep===0&&i._introItems.length>1?(s!=null&&(s.className="".concat(i._options.buttonClass," introjs-nextbutton"),s.innerHTML=i._options.nextLabel),i._options.hidePrev===!0?(o!=null&&(o.className="".concat(i._options.buttonClass," introjs-prevbutton introjs-hidden")),s!=null&&bn(s,"introjs-fullbutton")):o!=null&&(o.className="".concat(i._options.buttonClass," introjs-prevbutton introjs-disabled"))):i._introItems.length-1===i._currentStep||i._introItems.length===1?(o!=null&&(o.className="".concat(i._options.buttonClass," introjs-prevbutton")),i._options.hideNext===!0?(s!=null&&(s.className="".concat(i._options.buttonClass," introjs-nextbutton introjs-hidden")),o!=null&&bn(o,"introjs-fullbutton")):s!=null&&(i._options.nextToDone===!0?(s.innerHTML=i._options.doneLabel,bn(s,"".concat(i._options.buttonClass," introjs-nextbutton introjs-donebutton"))):s.className="".concat(i._options.buttonClass," introjs-nextbutton introjs-disabled"))):(o!=null&&(o.className="".concat(i._options.buttonClass," introjs-prevbutton")),s!=null&&(s.className="".concat(i._options.buttonClass," introjs-nextbutton"),s.innerHTML=i._options.nextLabel)),o!=null&&o.setAttribute("role","button"),s!=null&&s.setAttribute("role","button"),l!=null&&l.setAttribute("role","button"),s!=null&&s.focus(),function(k){bn(k,"introjs-showElement");var A=gm(k,"position");A!=="absolute"&&A!=="relative"&&A!=="sticky"&&A!=="fixed"&&bn(k,"introjs-relativePosition")}(e.element),Le(i._introAfterChangeCallback)?[4,i._introAfterChangeCallback.call(i,e.element)]:[3,4];case 3:D.sent(),D.label=4;case 4:return[2]}})})}function YO(i,e){return we(this,void 0,void 0,function(){return xe(this,function(t){switch(t.label){case 0:return i._currentStep=e-2,i._introItems===void 0?[3,2]:[4,dr(i)];case 1:t.sent(),t.label=2;case 2:return[2]}})})}function XO(i,e){return we(this,void 0,void 0,function(){return xe(this,function(t){switch(t.label){case 0:return i._currentStepNumber=e,i._introItems===void 0?[3,2]:[4,dr(i)];case 1:t.sent(),t.label=2;case 2:return[2]}})})}function dr(i){return we(this,void 0,void 0,function(){var e,t,n;return xe(this,function(r){switch(r.label){case 0:if(i._direction="forward",i._currentStepNumber!==void 0)for(e=0;e<i._introItems.length;e++)i._introItems[e].step===i._currentStepNumber&&(i._currentStep=e-1,i._currentStepNumber=void 0);return i._currentStep===-1?i._currentStep=0:++i._currentStep,t=i._introItems[i._currentStep],n=!0,Le(i._introBeforeChangeCallback)?[4,i._introBeforeChangeCallback.call(i,t&&t.element,i._currentStep,i._direction)]:[3,2];case 1:n=r.sent(),r.label=2;case 2:return n===!1?(--i._currentStep,[2,!1]):i._introItems.length<=i._currentStep?Le(i._introCompleteCallback)?[4,i._introCompleteCallback.call(i,i._currentStep,"end")]:[3,4]:[3,6];case 3:r.sent(),r.label=4;case 4:return[4,hr(i,i._targetElement)];case 5:return r.sent(),[2,!1];case 6:return[4,xx(i,t)];case 7:return r.sent(),[2,!0]}})})}function iu(i){return we(this,void 0,void 0,function(){var e,t;return xe(this,function(n){switch(n.label){case 0:return i._direction="backward",i._currentStep<=0?[2,!1]:(--i._currentStep,e=i._introItems[i._currentStep],t=!0,Le(i._introBeforeChangeCallback)?[4,i._introBeforeChangeCallback.call(i,e&&e.element,i._currentStep,i._direction)]:[3,2]);case 1:t=n.sent(),n.label=2;case 2:return t===!1?(++i._currentStep,[2,!1]):[4,xx(i,e)];case 3:return n.sent(),[2,!0]}})})}function Ex(i,e){return we(this,void 0,void 0,function(){var t,n;return xe(this,function(r){switch(r.label){case 0:return(t=e.code===void 0?e.which:e.code)===null&&(t=e.charCode===null?e.keyCode:e.charCode),t!=="Escape"&&t!==27||i._options.exitOnEsc!==!0?[3,2]:[4,hr(i,i._targetElement)];case 1:return r.sent(),[3,16];case 2:return t!=="ArrowLeft"&&t!==37?[3,4]:[4,iu(i)];case 3:return r.sent(),[3,16];case 4:return t!=="ArrowRight"&&t!==39?[3,6]:[4,dr(i)];case 5:return r.sent(),[3,16];case 6:return t!=="Enter"&&t!=="NumpadEnter"&&t!==13?[3,16]:(n=e.target||e.srcElement)&&n.className.match("introjs-prevbutton")?[4,iu(i)]:[3,8];case 7:return r.sent(),[3,15];case 8:return n&&n.className.match("introjs-skipbutton")?i._introItems.length-1===i._currentStep&&Le(i._introCompleteCallback)?[4,i._introCompleteCallback.call(i,i._currentStep,"skip")]:[3,10]:[3,12];case 9:r.sent(),r.label=10;case 10:return[4,hr(i,i._targetElement)];case 11:return r.sent(),[3,15];case 12:return n&&n.getAttribute("data-step-number")?(n.click(),[3,15]):[3,13];case 13:return[4,dr(i)];case 14:r.sent(),r.label=15;case 15:e.preventDefault?e.preventDefault():e.returnValue=!1,r.label=16;case 16:return[2]}})})}function vm(i){if(i===null||tu(i)!=="object"||"nodeType"in i)return i;var e={};
162for(var t in i)"jQuery"in window&&i[t]instanceof window.jQuery?e[t]=i[t]:e[t]=vm(i[t]);return e}function ys(i){var e=document.querySelector(".introjs-hints");return e?Array.from(e.querySelectorAll(i)):[]}function wm(i,e){return we(this,void 0,void 0,function(){var t;return xe(this,function(n){switch(n.label){case 0:return t=ys('.introjs-hint[data-step="'.concat(e,'"]'))[0],wc(),t&&bn(t,"introjs-hidehint"),Le(i._hintCloseCallback)?[4,i._hintCloseCallback.call(i,e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})}function JO(i){return we(this,void 0,void 0,function(){var e,t,n,r,s;return xe(this,function(o){switch(o.label){case 0:e=ys(".introjs-hint"),t=0,n=e,o.label=1;case 1:return t<n.length?(r=n[t],(s=r.getAttribute("data-step"))?[4,wm(i,parseInt(s,10))]:[3,3]):[3,4];case 2:o.sent(),o.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}function QO(i){return we(this,void 0,void 0,function(){var e,t,n,r,s;return xe(this,function(o){switch(o.label){case 0:if(!(e=ys(".introjs-hint"))||!e.length)return[3,1];for(t=0,n=e;t<n.length;t++)r=n[t],(s=r.getAttribute("data-step"))&&Tx(parseInt(s,10));return[3,3];case 1:return[4,kx(i,i._targetElement)];case 2:o.sent(),o.label=3;case 3:return[2]}})})}function Tx(i){var e=ys('.introjs-hint[data-step="'.concat(i,'"]'))[0];e&&ym(e,/introjs-hidehint/g)}function z0(i){var e=ys('.introjs-hint[data-step="'.concat(i,'"]'))[0];e&&e.parentNode&&e.parentNode.removeChild(e)}function ZO(i){return we(this,void 0,void 0,function(){var e,t,n,r,s,o,l;return xe(this,function(a){switch(a.label){case 0:for((e=document.querySelector(".introjs-hints"))===null&&(e=me("div",{className:"introjs-hints"})),t=function(d){return function(f){var p=f||window.event;p&&p.stopPropagation&&p.stopPropagation(),p&&p.cancelBubble!==null&&(p.cancelBubble=!0),Cx(i,d)}},n=0;n<i._hintItems.length;n++){if(r=i._hintItems[n],document.querySelector('.introjs-hint[data-step="'.concat(n,'"]')))return[2];eo(s=me("a",{className:"introjs-hint"})),s.onclick=t(n),r.hintAnimation||bn(s,"introjs-hint-no-anim"),vc(r.element)&&bn(s,"introjs-fixedhint"),o=me("div",{className:"introjs-hint-dot"}),l=me("div",{className:"introjs-hint-pulse"}),s.appendChild(o),s.appendChild(l),s.setAttribute("data-step",n.toString()),r.hintTargetElement=r.element,r.element=s,Sx(r.hintPosition,s,r.hintTargetElement),e.appendChild(s)}return document.body.appendChild(e),Le(i._hintsAddedCallback)?[4,i._hintsAddedCallback.call(i)]:[3,2];case 1:a.sent(),a.label=2;case 2:return i._options.hintAutoRefreshInterval>=0&&(i._hintsAutoRefreshFunction=(u=function(){return xc(i)},c=i._options.hintAutoRefreshInterval,function(){for(var d=[],f=0;f<arguments.length;f++)d[f]=arguments[f];window.clearTimeout(h),h=window.setTimeout(function(){u(d)},c)}),Sn.on(window,"scroll",i._hintsAutoRefreshFunction,i,!0)),[2]}var u,c,h})})}function Sx(i,e,t){if(t!==void 0){var n=as(t),r=20,s=20;switch(i){default:case"top-left":e.style.left="".concat(n.left,"px"),e.style.top="".concat(n.top,"px");break;case"top-right":e.style.left="".concat(n.left+n.width-r,"px"),e.style.top="".concat(n.top,"px");break;case"bottom-left":e.style.left="".concat(n.left,"px"),e.style.top="".concat(n.top+n.height-s,"px");break;case"bottom-right":e.style.left="".concat(n.left+n.width-r,"px"),e.style.top="".concat(n.top+n.height-s,"px");break;case"middle-left":e.style.left="".concat(n.left,"px"),e.style.top="".concat(n.top+(n.height-s)/2,"px");break;case"middle-right":e.style.left="".concat(n.left+n.width-r,"px"),e.style.top="".concat(n.top+(n.height-s)/2,"px");break;case"middle-middle":e.style.left="".concat(n.left+(n.width-r)/2,"px"),e.style.top="".concat(n.top+(n.height-s)/2,"px");break;case"bottom-middle":e.style.left="".concat(n.left+(n.width-r)/2,"px"),e.style.top="".concat(n.top+n.height-s,"px");break;case"top-middle":e.style.left="".concat(n.left+(n.width-r)/2,"px"),e.style.top="".concat(n.top,"px")}}}function Cx(i,e){return we(this,void 0,void 0,function(){var t,n,r,s,o,l,a,u,c,h,d;return xe(this,function(f){switch(f.label){case 0:return t=document.querySelector('.introjs-hint[data-step="'.concat(e,'"]')),n=i._hintItems[e],Le(i._hintClickCallback)?[4,i._hintClickCallback.call(i,t,n,e)]:[3,2];case 1:f.sent(),f.label=2;case 2:return(r=wc())!==void 0&&parseInt(r,10)===e||(s=me("div",{className:"introjs-tooltip"}),o=me("div"),l=me("div"),a=me("div"),s.onclick=function(p){p.stopPropagation?p.stopPropagation():p.cancelBubble=!0},o.className="introjs-tooltiptext",(u=me("p")).innerHTML=n.hint||"",o.appendChild(u),i._options.hintShowButton&&((c=me("a")).className=i._options.buttonClass,c.setAttribute("role","button"),c.innerHTML=i._options.hintButtonLabel,c.onclick=function(){return wm(i,e)},o.appendChild(c)),l.className="introjs-arrow",s.appendChild(l),s.appendChild(o),h=t.getAttribute("data-step")||"",i._currentStep=parseInt(h,10),d=i._hintItems[i._currentStep],a.className="introjs-tooltipReferenceLayer introjs-hintReference",a.setAttribute("data-step",h),Fn(i,d,a),a.appendChild(s),document.body.appendChild(a),nu(i,d,s,l,!0)),[2]}})})}function wc(){var i=document.querySelector(".introjs-hintReference");if(i&&i.parentNode){var e=i.getAttribute("data-step");return e?(i.parentNode.removeChild(i),e):void 0}}function kx(i,e){return we(this,void 0,void 0,function(){var t,n,r,s,o,l,a,u,c,h;return xe(this,function(d){switch(d.label){case 0:if(i._hintItems=[],i._options.hints&&i._options.hints.length>0)for(t=0,n=i._options.hints;t<n.length;t++)r=n[t],typeof(s=vm(r)).element=="string"&&(s.element=document.querySelector(s.element)),s.hintPosition=s.hintPosition||i._options.hintPosition,s.hintAnimation=s.hintAnimation||i._options.hintAnimation,s.element!==null&&i._hintItems.push(s);else{if(!(o=Array.from(e.querySelectorAll("*[data-hint]")))||!o.length)return[2,!1];for(l=0,a=o;l<a.length;l++)u=a[l],c=u.getAttribute("data-hint-animation"),h=i._options.hintAnimation,c&&(h=c==="true"),i._hintItems.push({element:u,hint:u.getAttribute("data-hint")||"",hintPosition:u.getAttribute("data-hint-position")||i._options.hintPosition,hintAnimation:h,tooltipClass:u.getAttribute("data-tooltip-class")||void 0,position:u.getAttribute("data-position")||i._options.tooltipPosition})}return[4,ZO(i)];case 1:return d.sent(),Sn.on(document,"click",wc,i,!1),Sn.on(window,"resize",xc,i,!0),[2,!0]}})})}function xc(i){for(var e=0,t=i._hintItems;e<t.length;e++){var n=t[e],r=n.hintTargetElement;Sx(n.hintPosition,n.element,r)}}function _x(i,e){var t=Array.from(e.querySelectorAll("*[data-intro]")),n=[];if(i._options.steps&&i._options.steps.length)for(var r=0,s=i._options.steps;r<s.length;r++){var o=vm(d=s[r]);if(o.step=n.length+1,o.title=o.title||"",typeof o.element=="string"&&(o.element=document.querySelector(o.element)||void 0),o.element===void 0||o.element===null){var l=document.querySelector(".introjsFloatingElement");l===null&&(l=me("div",{className:"introjsFloatingElement"}),document.body.appendChild(l)),o.element=l,o.position="floating"}o.position=o.position||i._options.tooltipPosition,o.scrollTo=o.scrollTo||i._options.scrollTo,o.disableInteraction===void 0&&(o.disableInteraction=i._options.disableInteraction),o.element!==null&&n.push(o)}else{var a=void 0;if(t.length<1)return[];for(var u=0,c=t;u<c.length;u++){var h=c[u];if((!i._options.group||h.getAttribute("data-intro-group")===i._options.group)&&h.style.display!=="none"){var d=parseInt(h.getAttribute("data-step")||"",10);a=i._options.disableInteraction,h.hasAttribute("data-disable-interaction")&&(a=!!h.getAttribute("data-disable-interaction")),d>0&&(n[d-1]={step:d,element:h,title:h.getAttribute("data-title")||"",intro:h.getAttribute("data-intro")||"",tooltipClass:h.getAttribute("data-tooltip-class")||void 0,highlightClass:h.getAttribute("data-highlight-class")||void 0,position:h.getAttribute("data-position")||i._options.tooltipPosition,scrollTo:h.getAttribute("data-scroll-to")||i._options.scrollTo,disableInteraction:a})}}for(var f=0,p=0,b=t;p<b.length;p++)if(h=b[p],(!i._options.group||h.getAttribute("data-intro-group")===i._options.group)&&h.getAttribute("data-step")===null){for(;n[f]!==void 0;)f++;a=h.hasAttribute("data-disable-interaction")?!!h.getAttribute("data-disable-interaction"):i._options.disableInteraction,n[f]={element:h,title:h.getAttribute("data-title")||"",intro:h.getAttribute("data-intro")||"",step:f+1,tooltipClass:h.getAttribute("data-tooltip-class")||void 0,highlightClass:h.getAttribute("data-highlight-class")||void 0,position:h.getAttribute("data-position")||i._options.tooltipPosition,scrollTo:h.getAttribute("data-scroll-to")||i._options.scrollTo,disableInteraction:a}}}for(var m=[],v=0;v<n.length;v++)n[v]&&m.push(n[v]);return(n=m).sort(function(g,y){return g.step-y.step}),n}function Ax(i,e){var t=i._currentStep;if(t!=null&&t!=-1){var n=i._introItems[t],r=document.querySelector(".introjs-tooltipReferenceLayer"),s=document.querySelector(".introjs-helperLayer"),o=document.querySelector(".introjs-disableInteraction");Fn(i,n,s),Fn(i,n,r),Fn(i,n,o),e&&(i._introItems=_x(i,i._targetElement),function(u,c){if
162(u._options.showBullets){var h=document.querySelector(".introjs-bullets");h&&h.parentNode&&h.parentNode.replaceChild(vx(u,c),h)}}(i,n),wx(r,t,i._introItems.length));var l=document.querySelector(".introjs-arrow"),a=document.querySelector(".introjs-tooltip");return a&&l&&nu(i,i._introItems[t],a,l),xc(i),i}}function Lx(i){Ax(i)}function Os(i,e){if(e===void 0&&(e=!1),i&&i.parentElement){var t=i.parentElement;e?(Li(i,{opacity:"0"}),window.setTimeout(function(){try{t.removeChild(i)}catch{}},500)):t.removeChild(i)}}function hr(i,e,t){return t===void 0&&(t=!1),we(this,void 0,void 0,function(){var n,r,s,o;return xe(this,function(l){switch(l.label){case 0:return n=!0,i._introBeforeExitCallback===void 0?[3,2]:[4,i._introBeforeExitCallback.call(i,e)];case 1:n=l.sent(),l.label=2;case 2:if(!t&&n===!1)return[2];if((r=Array.from(e.querySelectorAll(".introjs-overlay")))&&r.length)for(s=0,o=r;s<o.length;s++)Os(o[s]);return Os(e.querySelector(".introjs-helperLayer"),!0),Os(e.querySelector(".introjs-tooltipReferenceLayer")),Os(e.querySelector(".introjs-disableInteraction")),Os(document.querySelector(".introjsFloatingElement")),bx(),Sn.off(window,"keydown",Ex,i,!0),Sn.off(window,"resize",Lx,i,!0),Le(i._introExitCallback)?[4,i._introExitCallback.call(i)]:[3,4];case 3:l.sent(),l.label=4;case 4:return i._currentStep=-1,[2]}})})}function e3(i,e){return we(this,void 0,void 0,function(){var t;return xe(this,function(n){switch(n.label){case 0:return i.isActive()?Le(i._introStartCallback)?[4,i._introStartCallback.call(i,e)]:[3,2]:[2,!1];case 1:n.sent(),n.label=2;case 2:return(t=_x(i,e)).length===0?[2,!1]:(i._introItems=t,function(r,s){var o=this,l=me("div",{className:"introjs-overlay"});Li(l,{top:0,bottom:0,left:0,right:0,position:"fixed"}),s.appendChild(l),r._options.exitOnOverlayClick===!0&&(Li(l,{cursor:"pointer"}),l.onclick=function(){return we(o,void 0,void 0,function(){return xe(this,function(a){switch(a.label){case 0:return[4,hr(r,s)];case 1:return a.sent(),[2]}})})})}(i,e),[4,dr(i)]);case 3:n.sent(),e.addEventListener,i._options.keyboardNavigation&&Sn.on(window,"keydown",Ex,i,!0),Sn.on(window,"resize",Lx,i,!0),n.label=4;case 4:return[2,!1]}})})}function V0(i,e,t){return i[e]=t,i}var od=function(){function i(e){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=e,this._options={steps:[],hints:[],isActive:!0,nextLabel:"Next",prevLabel:"Back",skipLabel:"Ã",doneLabel:"Done",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:"bottom",tooltipClass:"",group:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:"of",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:"Don't show this again",dontShowAgainCookie:"introjs-dontShowAgain",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:"introjs-button",progressBarAdditionalClass:!1}}return i.prototype.isActive=function(){return(!this._options.dontShowAgain||(e=gx(this._options.dontShowAgainCookie))===""||e!=="true")&&this._options.isActive;var e},i.prototype.clone=function(){return new i(this._targetElement)},i.prototype.setOption=function(e,t){return this._options=V0(this._options,e,t),this},i.prototype.setOptions=function(e){return this._options=function(t,n){for(var r=0,s=Object.entries(n);r<s.length;r++){var o=s[r];t=V0(t,o[0],o[1])}return t}(this._options,e),this},i.prototype.start=function(){return we(this,void 0,void 0,function(){return xe(this,function(e){switch(e.label){case 0:return[4,e3(this,this._targetElement)];case 1:return e.sent(),[2,this]}})})},i.prototype.goToStep=function(e){return we(this,void 0,void 0,function(){return xe(this,function(t){switch(t.label){case 0:return[4,YO(this,e)];case 1:return t.sent(),[2,this]}})})},i.prototype.addStep=function(e){return this._options.steps||(this._options.steps=[]),this._options.steps.push(e),this},i.prototype.addSteps=function(e){if(!e.length)return this;for(var t=0;t<e.length;t++)this.addStep(e[t]);return this},i.prototype.goToStepNumber=function(e){return we(this,void 0,void 0,function(){return xe(this,function(t){switch(t.label){case 0:return[4,XO(this,e)];case 1:return t.sent(),[2,this]}})})},i.prototype.nextStep=function(){return we(this,void 0,void 0,function(){return xe(this,function(e){switch(e.label){case 0:return[4,dr(this)];case 1:return e.sent(),[2,this]}})})},i.prototype.previousStep=function(){return we(this,void 0,void 0,function(){return xe(this,function(e){switch(e.label){case 0:return[4,iu(this)];case 1:return e.sent(),[2,this]}})})},i.prototype.currentStep=function(){return this._currentStep},i.prototype.exit=function(e){return we(this,void 0,void 0,function(){return xe(this,function(t){switch(t.label){case 0:return[4,hr(this,this._targetElement,e)];case 1:return t.sent(),[2,this]}})})},i.prototype.refresh=function(e){return Ax(this,e),this},i.prototype.setDontShowAgain=function(e){return GO(this,e),this},i.prototype.onbeforechange=function(e){if(!Le(e))throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=e,this},i.prototype.onchange=function(e){if(!Le(e))throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=e,this},i.prototype.onafterchange=function(e){if(!Le(e))throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=e,this},i.prototype.oncomplete=function(e){if(!Le(e))throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=e,this},i.prototype.onhintsadded=function(e){if(!Le(e))throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=e,this},i.prototype.onhintclick=function(e){if(!Le(e))throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=e,this},i.prototype.onhintclose=function(e){if(!Le(e))throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=e,this},i.prototype.onstart=function(e){if(!Le(e))throw new Error("Provided callback for onstart was not a function.");return this._introStartCallback=e,this},i.prototype.onexit=function(e){if(!Le(e))throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=e,this},i.prototype.onskip=function(e){if(!Le(e))throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=e,this},i.prototype.onbeforeexit=function(e){if(!Le(e))throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=e,this},i.prototype.addHints=function(){return we(this,void 0,void 0,function(){return xe(this,function(e){switch(e.label){case 0:return[4,kx(this,this._targetElement)];case 1:return e.sent(),[2,this]}})})},i.prototype.hideHint=function(e){return we(this,void 0,void 0,function(){return xe(this,function(t){switch(t.label){case 0:return[4,wm(this,e)];case 1:return t.sent(),[2,this]}})})},i.prototype.hideHints=function(){return we(this,void 0,void 0,function(){return xe(this,function(e){switch(e.label){case 0:return[4,JO(this)];case 1:return e.sent(),[2,this]}})})},i.prototype.showHint=function(e){return Tx(e),this},i.prototype.showHints=function(){return we(this,void 0,void 0,function(){return xe(this,function(e){switch(e.label){case 0:return[4,QO(this)];case 1:return e.sent(),[2,this]}})})},i.prototype.removeHints=function(){return function(e){for(var t=0,n=ys(".introjs-hint");t<n.length;t++){var r=n[t].getAttribute("data-step");r&&z0(parseInt(r,10))}Sn.off(document,"click",wc,e,!1),Sn.off(window,"resize",xc,e,!0),e._hintsAutoRefreshFunction&&Sn.off(window,"scroll",e._hintsAutoRefreshFunction,e,!0)}(this),this},i.prototype.removeHint=function(e){return z0(e),this},i.prototype.showHintDialog=function(e){return we(this,void 0,void 0,function(){return xe(this,function(t){switch(t.label){case 0:return[4,Cx(this,e)];case 1:return t.sent(),[2,this]}})})},i}(),ru=function i(e){var t;if(tu(e)==="object")t=new od(e);else if(typeof e=="string"){var n=document.querySelector(e);
162if(!n)throw new Error("There is no element with given selector.");t=new od(n)}else t=new od(document.body);return i.instances[$h(t,"introjs-instance")]=t,t};ru.version="7.2.0",ru.instances={};class qh extends U{connect(){this.steps.length&&(this.initializeTour(),this.registerStartButton(),this.autoStartValue&&!this.isCompleted()&&this.startTour())}disconnect(){this.hasStartButtonTarget&&this.startHandler&&this.startButtonTarget.removeEventListener("click",this.startHandler)}initializeTour(){this.intro=ru(),this.intro.setOptions({steps:this.steps,nextLabel:"Next",prevLabel:"Back",doneLabel:"Done",showSkipButton:!0,showBullets:!0,disableInteraction:!0,scrollToElement:!0}),this.intro.onexit(()=>this.markCompleted()),this.intro.oncomplete(()=>this.markCompleted())}registerStartButton(){this.hasStartButtonTarget&&(this.startHandler=()=>this.startTour(),this.startButtonTarget.addEventListener("click",this.startHandler))}startTour(){this.intro&&this.intro.start()}get steps(){try{return JSON.parse(this.stepsValue||"[]")}catch(e){return console.error("Unable to parse campaign tour steps",e),[]}}storageKey(){const e=this.hasUserIdValue&&this.userIdValue?this.userIdValue:"guest",t=this.hasPageValue&&this.pageValue?this.pageValue:"default";return`campaignTourCompleted_${e}_${t}`}isCompleted(){const e=this.storageKey();return localStorage.getItem(e)==="true"}markCompleted(){const e=this.storageKey();localStorage.setItem(e,"true")}}$(qh,"targets",["startButton"]),$(qh,"values",{steps:String,autoStart:{type:Boolean,default:!0},userId:String,page:String});const t3=Object.freeze(Object.defineProperty({__proto__:null,default:qh},Symbol.toStringTag,{value:"Module"}));class Mx extends U{connect(){this.saveCount=0,this.nextURL=null,this.savedForm=this.savedForm.bind(this),this.hasSenderTarget&&this.changeSender({target:this.senderTarget}),this.initUploadModal(),this.initModal()}resultTargetConnected(e){e.dataset.redirectUrl&&(this.hasLaunchTarget&&(this.toggleSubmitButton(this.launchTarget),document.body.insertAdjacentHTML("beforeend",` 163 <div class="fixed inset-x-0 inset-y-0 w-full h-full place-content-center flex items-center justify-center bg-white/50 dark:bg-gray-800 dark:border-gray-700"> 164 <div class="text-center" role="status"> 165 <svg aria-hidden="true" class="w-8 h-8 mx-auto text-gray-200 animate-spin dark:text-gray-600 fill-blue-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"> 166 <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/> 167 <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/> 168 </svg> 169 <span class="sr-only">Loading...</span> 170 </div> 171 </div> 172 `)),window.location=e.dataset.redirectUrl,e.remove())}actionTargetConnected(e){e.dataset.url&&(e.closest("form").action=e.dataset.url)}followTargetConnected(e){}followTargetDisconnected(e){}senderTargetConnected(e){e.addEventListener("change",this.changeSender.bind(this))}senderTargetDisconnected(e){e.removeEventListener("change",this.changeSender.bind(this))}templateTargetConnected(e){e.addEventListener("change",this.changeTemplate.bind(this))}templateTargetDisconnected(e){e.removeEventListener("change",this.changeTemplate.bind(this))}changeSender(e){const t=e.target.options[e.target.selectedIndex||0];t&&Array.from(document.getElementsByClassName("sender-value")).forEac
172h(n=>{n.value=t.getAttribute("email")})}changeTemplate(e){const t=e.target.closest("form");ye(`/campaigns/templates/${e.target.value}.json`).then(n=>n.json()).then(n=>{t&&(t.querySelector(".subject").value=n.subject,t.querySelector(".content").value=n.content)})}removeFollowUp(e){const t=e.target.dataset.id;t?e.target.closest(`#campaign_${t}`).remove():e.target.closest("form").remove()}initUploadModal(){const e="upload-modal",t=document.getElementById(e),n={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},r={id:e,override:!0};this.uploadModal=new Modal(t,n,r)}openUploadModal(){this.uploadModal.show()}closeUploadModal(){this.uploadModal.hide()}initModal(){const e="crub-modal",t=document.getElementById(e),n={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},r={id:e,overri
172de:!0};this.modal=new Modal(t,n,r)}openModal(){this.modal.show()}closeModal(){this.modal.hide()}next(e){this.saveCount=0,this.nextURL=e.target.dataset.url;const t=this.formTargets.length||0;if(this.toggleSubmitButton(e.target),!this.hasFormTarget||t===0){console.warn("No forms found to submit."),Turbo.visit(e.target.dataset.url);return}this.formTargets.forEach((n,r)=>{setTimeout(()=>{n.checkValidity()?n.requestSubmit():(n.reportValidity(),this.toggleSubmitButton(e.target))},r*300)})}savedForm(e){this.nextURL&&(this.saveCount=this.saveCount+1,this.saveCount===this.formTargets.length&&Turbo.visit(this.nextURL))}lauched(){Turbo.visit("/campaigns")}toggleSubmitButton(e){try{const t=e.innerHTML,n=e.getAttribute("data-turbo-submits-with");e.setAttribute("data-turbo-submits-with",t),e.innerHTML=n,e.disabled=!e.disabled}catch(t){console.error("Error in toggleSubmitButton method:",t)}}}$(Mx,"targets",["template","follow","sender","form","result","action","launch"]);const n3=Object.freeze(Object.defineProperty({__proto__:null,default:Mx},Symbol.toStringTag,{value:"Module"})),i3={containerOuter:["choices"],containerInner:["choices__inner"],input:["choices__input"],inputCloned:["choices__input--cloned"],list:["choices__list"],listItems:["choices__list--multiple"],listSingle:["choices__list--single"],listDropdown:["choices__list--dropdown"],item:["choices__item"],itemSelectable:["choices__item--selectable"],itemDisabled:["choices__item--disabled"],itemChoice:["choices__item--choice"],description:["choices__description"],placeholder:["choices__placeholder"],group:["choices__group"],groupHeading:["choices__heading"],button:["choices__button"],activeState:["is-active"],focusState:["is-focused"],openState:["is-open"],disabledState:["is-disabled"],highlightedState:["is-highlighted"],selectedState:["is-selected"],flippedState:["is-flipped"],loadingState:["is-loading"],notice:["choices__notice"],addChoice:["choices__item--selectable","add-choice"],noResults:["has-no-results"],noChoices:["has-no-choices"]};class Ix extends U{initialize(){this.element.choices=this,this.bindMethods(),this.searchPath=this.element.dataset.searchPath,this.forceOption=this.element.dataset.forceOption||!0}connect(){try{setTimeout(()=>this.setup(),5)}catch(e){console.error("Error during setup:",e)}}disconnect(){var e;try{this.searchPath?(this.input.removeEventListener("input",this.search),this.selectTarget.removeEventListener("change",this.refresh),this.selectTarget.removeEventListener("addItem",this.add),this.selectTarget.removeEventListener("removeItem",this.remove)):this.selectTarget.removeEventListener("change",this.callback),(e=this.choices)==null||e.destroy(),this.choices=void 0}catch(t){console.error("Error during disconnect:",t)}}setup(){try{const e={...this.options(),removeItemButton:!0,addItemFilter:t=>(this.addItemOnCustomKeyPress(t),!0)};this.choices=new Zf(this.selectTarget,e),this.input=this.element.querySelector("input"),this.refresh(),this.searchPath?(this.input.addEventListener("input",this.search),this.selectTarget.addEventListener("change",this.refresh),this.selectTarget.addEventListener("addItem",this.add),this.selectTarget.addEventListener("removeItem",this.remove)):(this.selectTarget.addEventListener("change",this.callback.bind(this)),this.choices.input.element.addEventListener("keydown",t=>{t.key==="Enter"&&this.setChoicesValue(this.choices.input.value)})),this.callCallbackIfValueExists()}catch(e){console.error("Error during setup:",e)}}refresh(){try{this.choices.setChoices([],"value","label",!0),this.hasOptionsTarget&&Array.from(this.optionsTarget.children).forEach(this.append.bind(this))}catch(e){console.error("Error during refresh:",e)}}callCallbackIfValueExists(){const e=this.selectTarget.querySelector("option[selected]"),t=this.selectTarget.value;(e||t)&&(console.log("Pre-selected value found:",t),this.callback({target:this.selectTarget}))}callback(e){try{const t=e.target.value,n=e.target.options[e.target.selectedIndex].text;e.target.name=="list_id"&&!ov.isEmpty(t)&&this.updateURLParam("list_id",t),Array.from(document.getElementsByClassName(`${e.target.name}
172-value`)).forEach(r=>{r.value=t}),Array.from(document.getElementsByClassName(`${e.target.name}-text`)).forEach(r=>{r.innerHTML=n})}catch(t){console.error("Error in callback:",t)}}updateURLParam(e,t){const n=new URL(window.location.href),r=n.searchParams;r.set(e,t),history.replaceState({},"",`${n.pathname}?${r.toString()}`)}append(e){try{Array.from(this.selectTarget.options).some(n=>n.value===e.value)||this.choices.setChoices([e],"value","label",!1)}catch(t){console.error("Error during append:",t)}}add(e){try{if(this.hasOptionsTarget){const t=Array.from(this.optionsTarget.children).find(n=>n.label===e.detail.label);if(t)t.setAttribute("selected","");else{const n=document.createElement("option");n.setAttribute("label",e.detail.label),n.setAttribute("value",e.detail.value),n.setAttribute("selected",""),this.optionsTarget.appendChild(n)}}}catch(t){console.error("Error during add:",t)}}remove(e){try{if(this.hasOptionsTarget){const t=Array.from(this.optionsTarget.children).find(n=>n.label===e.detail.label);t&&(this.searchPath?t.remove():t.removeAttribute("selected"))}this.forceOption&&!this.selectTarget.options.length&&this.selectTarget.add(document.createElement("option"))}catch(t){console.error("Error during remove:",t)}}search(e){try{e.target.value?ye(this.searchPath+e.target.value,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(t=>t.json()).then(this.update).catch(t=>console.error("Error fetching search results:",t)):this.refresh()}catch(t){console.error("Error during search:",t)}}update(e){try{this.choices.setChoices(e.filter(this.filter),"value","label",!0)}catch(t){console.error("Error during update:",t)}}filter(e){try{return!Array.from(this.selectTarget.options).some(t=>t.label===e.label)}catch(t){return console.error("Error during filter:",t),!1}}options(){return"silent renderChoiceLimit maxItemCount addItems removeItems removeItemButton editItems duplicateItemsAllowed delimiter paste searchEnabled searchChoices searchFloor searchResultLimit position resetScrollPosition addItemFilter shouldSort shouldSortItems placeholder placeholderValue prependValue appendValue renderSelectedChoices loadingText noResultsText noChoicesText itemSelectText addItemText maxItemText".split(" ").reduce(this.optionsReducer,{classNames:i3})}optionsReducer(e,t){try{if(t in this.element.dataset){let n=this.element.dataset[t];e[t]=["true","false"].includes(n)?JSON.parse(n):n}}catch(n){console.error(`Error in optionsReducer for ${t}:`,n)}return e}setChoicesValue(e){try{e&&(this.choices.setValue([e]),this.choices.clearInput(),this.choices.hideDropdown(!0))}catch(t){console.error("Error in setChoicesValue:",t)}}addItemOnCustomKeyPress(e){try{this.choices&&e&&",; ".includes(e.slice(-1))&&this.setChoicesValue(e.slice(0,-1))}catch(t){console.error("Error in addItemOnCustomKeyPress:",t)}}bindMethods(){["refresh","add","remove","search","update","filter","options","setChoicesValue","addItemOnCustomKeyPress","optionsReducer","callback","append"].forEach(t=>{try{typeof this[t]=="function"?this[t]=this[t].bind(this):console.warn(`Method "${t}" is not defined or not a function.`)}catch(n){console.error(`Error binding method ${t}:`,n)}})}}$(Ix,"targets",["select","options"]);const r3=Object.freeze(Object.defineProperty({__proto__:null,default:Ix},Symbol.toStringTag,{value:"Module"})),s3={containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"};class Ox extends U{initialize(){this.element.choices=this,this.refresh=this.refresh.bind(this),this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.search=this.search.bind(this),this.update=this.update.bind(this),this.filter=this.filter.bind(this),this.options=this.options.bind(this),this.setChoicesValue=this.setChoicesValue.bind(this),this.addItemOnCustomKeyPress=this.addItemOnCustomKeyPress.bind(this),this.optionsReducer=this.optionsReducer.bind(this),this.searchPath=this.element.dataset.searchPath,this.forceOption=this.element.dataset.forceOption||!0}connect(){setTimeout(this.setup.bind(this),5)}setup(){const e=this;let t={...this.options(),removeItemButton:!0,valueComparer:(n,r)=>((n==null?void 0:n.toString().trim())||"")===((r==null?void 0:r.toString().trim())||""),fuseOptions:{threshold:.1},addItemFilter:n=>(e.addItemOnCustomKeyPress(n),!0),noResultsText:()=>`Press Enter to add <b>"${e.choices.input.value}"</b>`};this.choices=new Zf(this.selectTarget,t),this.input=this.element.querySelector("input"),this.refresh(),this.searchPath?(this.refresh(),this.input.addEventListener("input",this.search),this.selectTarget.addEventListener("change",this.refresh),this.selectTarget.addEventListener("addItem",this.add),this.selectTarget.addEventListener("removeItem",this.remove)):this.choices.input.element.addEventListener("keydown",function(n){n.key==="Enter"&&e.setChoicesValue(e.choices.input.value)})}disconnect(){this.searchPath&&(this.input.removeEventListener("input",this.search),this.selectTarget.removeEventListener("change",this.refresh),this.selectTarget.removeEventListener("addItem",this.add),this.selectTarget.removeEventListener("removeItem",this.remove));try{this.choices.destroy()}catch{}this.choices=void 0}refresh(){this.choices.setChoices([],"value","label",!0),this.hasOptionsTarget&&[...this.optionsTarget.children].forEac
172h(this.append.bind(this))}append(e){[...this.selectTarget.options].some(t=>t.label===e.label)||this.choices.setChoices([e],"value","label",!1)}add(e){if(this.hasOptionsTarget){const t=[...this.optionsTarget.children].find(n=>n.label===e.detail.label);if(t)t.setAttribute("selected","");else{const n=document.createElement("option");n.setAttribute("label",e.detail.label),n.setAttribute("value",e.detail.value),n.setAttribute("selected",""),this.optionsTarget.appendChild(n)}}}remove(e){if(this.hasOptionsTarget){const t=[...this.optionsTarget.children].find(n=>n.label===e.detail.label);t&&(this.searchPath?t.remove():t.removeAttribute("selected"))}this.forceOption&&!this.selectTarget.options.length&&this.selectTarget.add(document.createElement("option"))}search(e){e.target.value?ye(this.searchPath+e.target.value,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(t=>t.json()).then(this.update):this.refresh()}update(e){this.choices.setChoices(e.filter(this.filter),"value","label",!0)}filter(e){return![...this.selectTarget.options].some(t=>t.label===e.label)}options(){return"silent renderChoiceLimit maxItemCount addItems removeItems removeItemButton editItems duplicateItemsAllowed delimiter paste searchEnabled searchChoices searchFloor searchResultLimit position resetScrollPosition addItemFilter shouldSort shouldSortItems placeholder placeholderValue prependValue appendValue renderSelectedChoices loadingText noResultsText noChoicesText itemSelectText addItemText maxItemText".split(" ").reduce(this.optionsReducer,{classNames:s3})}optionsReducer(e,t){if(t in this.element.dataset||this.element.dataset.hasOwnProperty(t)){let n=this.element.dataset[t];e[t]=["true","false"].includes(n)?JSON.parse(n):n}return e}setChoicesValue(e){e&&(this.choices.setValue([e]),this.choices.clearInput(),this.choices.hideDropdown(!0))}addItemOnCustomKeyPress(e){this.choices&&e&&",; ".includes(e.slice(-1))&&this.setChoicesValue(e.slice(0,-1))}}$(Ox,"targets",["select","options"]);const o3=Object.freeze(Object.defineProperty({__proto__:null,default:Ox},Symbol.toStringTag,{value:"Module"}));function H0(i){return i!==null&&typeof i=="object"&&"constructor"in i&&i.constructor===Object}function xm(i,e){i===void 0&&(i={}),e===void 0&&(e={}),Object.keys(e).forEach(t=>{typeof i[t]>"u"?i[t]=e[t]:H0(e[t])&&H0(i[t])&&Object.keys(e[t]).length>0&&xm(i[t],e[t])})}const Dx={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function it(){const i=typeof document<"u"?document:{};return xm(i,Dx),i}const a3={document:Dx,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(i){return typeof setTimeout>"u"?(i(),null):setTimeout(i,0)},cancelAnimationFrame(i){typeof setTimeout>"u"||clearTimeout(i)}};function Fe(){const i=typeof window<"u"?window:{};return xm(i,a3),i}function ii(i){return i===void 0&&(i=""),i.trim().split(" ").filter(e=>!!e.trim())}function l3(i){const e=i;Object.keys(e).forEach(t=>{try{e[t]=null}catch{}try{delete e[t]}catch{}})}function fr(i,e){return e===void 0&&(e=0),setTimeout(i,e)}function $t(){return Date.now()}function u3(i){const e=Fe();let t;return e.getComputedStyle&&(t=e.getComputedStyle(i,null)),!t&&i.currentStyle&&(t=i.currentStyle),t||(t=i.style),t}function Uh(i,e){e===void 0&&(e="x");const t=Fe();let n,r,s;const o=u3(i);return t.WebKitCSSMatrix?(r=o.transform||o.webkitTransform,r.split(",").length>6&&(r=r.split(", ").map(l=>l.replace(",",".")).join(", ")),s=new t.WebKitCSSMatrix(r==="none"?"":r)):(s=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=s.toString().split(",")),e==="x"&&(t.WebKitCSSMatrix?r=s.m41:n.length===16?r=parseFloat(n[12]):r=parseFloat(n[4])),e==="y"&&(t.WebKitCSSMatrix?r=s.m42:n.length===16?r=parseFloat(n[13]):r=parseFloat(n[5])),r||0}function Vs(i){return typeof i=="object"&&i!==null&&i.constructor&&Object.prototype.toString.call(i).slice(8,-1)==="Object"}function c3(i){return typeof window<"u"&&typeof window.HTMLElement<"u"?i instanceof HTMLElement:i&&(i.nodeType===1||i.nodeType===11)}function _t(){const i=Object(arguments.length<=0?void 0:arguments[0]),e=["__proto__","constructor","prototype"];for(let t=1;t<arguments.length;t+=1){const n=t<0||arguments.length<=t?void 0:arguments[t];if(n!=null&&!c3(n)){const r=Object.keys(Object(n)).filter(s=>e.indexOf(s)<0);for(let s=0,o=r.length;s<o;s+=1){const l=r[s],a=Object.getOwnPropertyDescriptor(n,l);a!==void 0&&a.enumerable&&(Vs(i[l])&&Vs(n[l])?n[l].__swiper__?i[l]=n[l]:_t(i[l],n[l]):!Vs(i[l])&&Vs(n[l])?(i[l]={},n[l].__swiper__?i[l]=n[l]:_t(i[l],n[l])):i[l]=n[l])}}}return i}function Hs(i,e,t){i.style.setProperty(e,t)}function Px(i){let{swiper:e,targetPosition:t,side:n}=i;const r=Fe(),s=-e.translate;let o=null,l;const a=e.params.speed;e.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(e.cssModeFrameID);const u=t>s?"next":"prev",c=(d,f)=>u==="next"&&d>=f||u==="prev"&&d<=f,h=()=>{l=new Date().getTime(),o===null&&(o=l);const d=Math.max(Math.min((l-o)/a,1),0),f=.5-Math.cos(d*Math.PI)/2;let p=s+f*(t-s);if(c(p,t)&&(p=t),e.wrapperEl.scrollTo({[n]:p}),c(p,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:p})}),r.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=r.requestAnimationFrame(h)};h()}function kr(i){return i.querySelector(".swiper-slide-transform")||i.shadowRoot&&i.shadowRoot.querySelector(".swiper-slide-transform")||i}function tt(i,e){return e===void 0&&(e=""),[...i.children].filter(t=>t.matches(e))}function su(i){try{console.warn(i);return}catch{}}function Pt(i,e){e===void 0&&(e=[]);const t=document.createElement(i);return t.classList.add(...Array.isArray(e)?e:ii(e)),t}function ou(i){const e=Fe(),t=it(),n=i.getBoundingClientRect(),r=t.body,s=i.clientTop||r.clientTop||0,o=i.clientLeft||r.clientLeft||0,l=i===e?e.scrollY:i.scrollTop,a=i===e?e.scrollX:i.scrollLeft;return{top:n.top+l-s,left:n.left+a-o}}function d3(i,e){const t=[];for(;i.previousElementSibling;){const n=i.previousElementSibling;e?n.matches(e)&&t.push(n):t.push(n),i=n}return t}function h3(i,e){const t=[];for(;i.nextElementSibling;){const n=i.nextElementSibling;e?n.matches(e)&&t.push(n):t.push(n),i=n}return t}function bi(i,e){return Fe().getComputedStyle(i,null).getPropertyValue(e)}function Mo(i){let e=i,t;if(e){for(t=0;(e=e.previousSibling)!==null;)e.nodeType===1&&(t+=1);return t}}function tr(i,e){const t=[];let n=i.parentElement;for(;n;)e?n.matches(e)&&t.push(n):t.push(n),n=n.parentElement;return t}function to(i,e){function t(n){n.target===i&&(e.call(i,n),i.removeEventListener("transitionend",t))}e&&i.addEventListener("transitionend",t)}function Wh(i,e,t){const n=Fe();return i[e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(i,null).getPropertyValue(e==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(i,null).getPropertyValue(e==="width"?"margin-left":"margin-bottom"))}function fe(i){return(Array.isArray(i)?i:[i]).filter(e=>!!e)}let ad;function f3(){const i=Fe(),e=it();return{smoothScroll:e.documentElement&&e.documentElement.style&&"scrollBehavior"in e.documentElement.style,touch:!!("ontouchstart"in i||i.DocumentTouch&&e instanceof i.DocumentTouch)}}function Rx(){return ad||(ad=f3()),ad}let ld;function p3(i){let{userAgent:e}=i===void 0?{}:i;const t=Rx(),n=Fe(),r=n.navigator.platform,s=e||n.navigator.userAgent,o={ios:!1,android:!1},l=n.screen.width,a=n.screen.height,u=s.match(/(Android);?[\s\/]+([\d.]+)?/);let c=s.match(/(iPad).*OS\s([\d_]+)/);const h=s.match(/(iPod)(.*OS\s([\d_]+))?/),d=!c&&s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),f=r==="Win32";let p=r==="MacIntel";const b=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!c&&p&&t.touch&&b.indexOf(`${l}x${a}`)>
vendor: 4,158 bytes, line 172
172=0&&(c=s.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),p=!1),u&&!f&&(o.os="android",o.android=!0),(c||d||h)&&(o.os="ios",o.ios=!0),o}function Nx(i){return i===void 0&&(i={}),ld||(ld=p3(i)),ld}let ud;function m3(){const i=Fe(),e=Nx();let t=!1;function n(){const l=i.navigator.userAgent.toLowerCase();return l.indexOf("safari")>=0&&l.indexOf("chrome")<0&&l.indexOf("android")<0}if(n()){const l=String(i.navigator.userAgent);if(l.includes("Version/")){const[a,u]=l.split("Version/")[1].split(" ")[0].split(".").map(c=>Number(c));t=a<16||a===16&&u<2}}const r=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(i.navigator.userAgent),s=n(),o=s||r&&e.ios;return{isSafari:t||s,needPerspectiveFix:t,need3dFix:o,isWebView:r}}function g3(){return ud||(ud=m3()),ud}function b3(i){let{swiper:e,on:t,emit:n}=i;const r=Fe();let s=null,o=null;const l=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},a=()=>{!e||e.destroyed||!e.initialized||(s=new ResizeObserver(h=>{o=r.requestAnimationFrame(()=>{const{width:d,height:f}=e;let p=d,b=f;h.forEach(m=>{let{contentBoxSize:v,contentRect:g,target:y}=m;y&&y!==e.el||(p=g?g.width:(v[0]||v).inlineSize,b=g?g.height:(v[0]||v).blockSize)}),(p!==d||b!==f)&&l()})}),s.observe(e.el))},u=()=>{o&&r.cancelAnimationFrame(o),s&&s.unobserve&&e.el&&(s.unobserve(e.el),s=null)},c=()=>{!e||e.destroyed||!e.initialized||n("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof r.ResizeObserver<"u"){a();return}r.addEventListener("resize",l),r.addEventListener("orientationchange",c)}),t("destroy",()=>{u(),r.removeEventListener("resize",l),r.removeEventListener("orientationchange",c)})}function y3(i){let{swiper:e,extendParams:t,on:n,emit:r}=i;const s=[],o=Fe(),l=function(c,h){h===void 0&&(h={});const d=o.MutationObserver||o.WebkitMutationObserver,f=new d(p=>{if(e.__preventObserver__)return;if(p.length===1){r("observerUpdate",p[0]);return}const b=function(){r("observerUpdate",p[0])};o.requestAnimationFrame?o.requestAnimationFrame(b):o.setTimeout(b,0)});f.observe(c,{attributes:typeof h.attributes>"u"?!0:h.attributes,childList:typeof h.childList>"u"?!0:h.childList,characterData:typeof h.characterData>"u"?!0:h.characterData}),s.push(f)},a=()=>{if(e.params.observer){if(e.params.observeParents){const c=tr(e.hostEl);for(let h=0;h<c.length;h+=1)l(c[h])}l(e.hostEl,{childList:e.params.observeSlideChildren}),l(e.wrapperEl,{attributes:!1})}},u=()=>{s.forEach(c=>{c.disconnect()}),s.splice(0,s.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",a),n("destroy",u)}var v3={on(i,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const r=t?"unshift":"push";return i.split(" ").forEach(s=>{n.eventsListeners[s]||(n.eventsListeners[s]=[]),n.eventsListeners[s][r](e)}),n},once(i,e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;function r(){n.off(i,r),r.__emitterProxy&&delete r.__emitterProxy;for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];e.apply(n,o)}return r.__emitterProxy=e,n.on(i,r,t)},onAny(i,e){const t=this;if(!t.eventsListeners||t.destroyed||typeof i!="function")return t;const n=e?"unshift":"push";return t.eventsAnyListeners.indexOf(i)<0&&t.eventsAnyListeners[n](i),t},offAny(i){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsAnyListeners)return e;const t=e.eventsAnyListeners.indexOf(i);return t>=0&&e.eventsAnyListeners.splice(t,1),e},off(i,e){const t=this;return!t.eventsListeners||t.destroyed||!t.eventsListeners||i.split(" ").forEach(n=>{typeof e>"u"?t.eventsListeners[n]=[]:t.eventsListeners[n]&&t.eventsListeners[n].forEach((r,s)=>{(r===e||r.__emitterProxy&&r.__emitterProxy===e)&&t.eventsListeners[n].splice(s,1)})}),t},emit(){const i=this;if(!i.eventsListeners||i.destroyed||!i.eventsListeners)return i;let e,t,n;for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return typeof s[0]=="string"||Array.isArray(s[0])?(e=s[0],t=s.slice(1,s.length),n=i):(e=s[0].events,t=s[0].data,n=s[0].context||i),t.unshift(n),(Array.isArray(e)?e:e.split(" ")).forEach(a=>{i.eventsAnyListeners&&i.eventsAnyListeners.length&&i.eventsAnyListeners.forEac
vendor: 12,024 bytes, line 172
172h(u=>{u.apply(n,[a,...t])}),i.eventsListeners&&i.eventsListeners[a]&&i.eventsListeners[a].forEach(u=>{u.apply(n,t)})}),i}};function w3(){const i=this;let e,t;const n=i.el;typeof i.params.width<"u"&&i.params.width!==null?e=i.params.width:e=n.clientWidth,typeof i.params.height<"u"&&i.params.height!==null?t=i.params.height:t=n.clientHeight,!(e===0&&i.isHorizontal()||t===0&&i.isVertical())&&(e=e-parseInt(bi(n,"padding-left")||0,10)-parseInt(bi(n,"padding-right")||0,10),t=t-parseInt(bi(n,"padding-top")||0,10)-parseInt(bi(n,"padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),Object.assign(i,{width:e,height:t,size:i.isHorizontal()?e:t}))}function x3(){const i=this;function e(O,D){return parseFloat(O.getPropertyValue(i.getDirectionLabel(D))||0)}const t=i.params,{wrapperEl:n,slidesEl:r,size:s,rtlTranslate:o,wrongRTL:l}=i,a=i.virtual&&t.virtual.enabled,u=a?i.virtual.slides.length:i.slides.length,c=tt(r,`.${i.params.slideClass}, swiper-slide`),h=a?i.virtual.slides.length:c.length;let d=[];const f=[],p=[];let b=t.slidesOffsetBefore;typeof b=="function"&&(b=t.slidesOffsetBefore.call(i));let m=t.slidesOffsetAfter;typeof m=="function"&&(m=t.slidesOffsetAfter.call(i));const v=i.snapGrid.length,g=i.slidesGrid.length;let y=t.spaceBetween,w=-b,E=0,x=0;if(typeof s>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*s:typeof y=="string"&&(y=parseFloat(y)),i.virtualSize=-y,c.forEach(O=>{o?O.style.marginLeft="":O.style.marginRight="",O.style.marginBottom="",O.style.marginTop=""}),t.centeredSlides&&t.cssMode&&(Hs(n,"--swiper-centered-offset-before",""),Hs(n,"--swiper-centered-offset-after",""));const S=t.grid&&t.grid.rows>1&&i.grid;S?i.grid.initSlides(c):i.grid&&i.grid.unsetSlides();let _;const M=t.slidesPerView==="auto"&&t.breakpoints&&Object.keys(t.breakpoints).filter(O=>typeof t.breakpoints[O].slidesPerView<"u").length>0;for(let O=0;O<h;O+=1){_=0;let D;if(c[O]&&(D=c[O]),S&&i.grid.updateSlide(O,D,c),!(c[O]&&bi(D,"display")==="none")){if(t.slidesPerView==="auto"){M&&(c[O].style[i.getDirectionLabel("width")]="");const k=getComputedStyle(D),A=D.style.transform,C=D.style.webkitTransform;if(A&&(D.style.transform="none"),C&&(D.style.webkitTransform="none"),t.roundLengths)_=i.isHorizontal()?Wh(D,"width"):Wh(D,"height");else{const T=e(k,"width"),L=e(k,"padding-left"),I=e(k,"padding-right"),P=e(k,"margin-left"),R=e(k,"margin-right"),z=k.getPropertyValue("box-sizing");if(z&&z==="border-box")_=T+P+R;else{const{clientWidth:N,offsetWidth:B}=D;_=T+L+I+P+R+(B-N)}}A&&(D.style.transform=A),C&&(D.style.webkitTransform=C),t.roundLengths&&(_=Math.floor(_))}else _=(s-(t.slidesPerView-1)*y)/t.slidesPerView,t.roundLengths&&(_=Math.floor(_)),c[O]&&(c[O].style[i.getDirectionLabel("width")]=`${_}px`);c[O]&&(c[O].swiperSlideSize=_),p.push(_),t.centeredSlides?(w=w+_/2+E/2+y,E===0&&O!==0&&(w=w-s/2-y),O===0&&(w=w-s/2-y),Math.abs(w)<1/1e3&&(w=0),t.roundLengths&&(w=Math.floor(w)),x%t.slidesPerGroup===0&&d.push(w),f.push(w)):(t.roundLengths&&(w=Math.floor(w)),(x-Math.min(i.params.slidesPerGroupSkip,x))%i.params.slidesPerGroup===0&&d.push(w),f.push(w),w=w+_+y),i.virtualSize+=_+y,E=_,x+=1}}if(i.virtualSize=Math.max(i.virtualSize,s)+m,o&&l&&(t.effect==="slide"||t.effect==="coverflow")&&(n.style.width=`${i.virtualSize+y}px`),t.setWrapperSize&&(n.style[i.getDirectionLabel("width")]=`${i.virtualSize+y}px`),S&&i.grid.updateWrapperSize(_,d),!t.centeredSlides){const O=[];for(let D=0;D<d.length;D+=1){let k=d[D];t.roundLengths&&(k=Math.floor(k)),d[D]<=i.virtualSize-s&&O.push(k)}d=O,Math.floor(i.virtualSize-s)-Math.floor(d[d.length-1])>1&&d.push(i.virtualSize-s)}if(a&&t.loop){const O=p[0]+y;if(t.slidesPerGroup>1){const D=Math.ceil((i.virtual.slidesBefore+i.virtual.slidesAfter)/t.slidesPerGroup),k=O*t.slidesPerGroup;for(let A=0;A<D;A+=1)d.push(d[d.length-1]+k)}for(let D=0;D<i.virtual.slidesBefore+i.virtual.slidesAfter;D+=1)t.slidesPerGroup===1&&d.push(d[d.length-1]+O),f.push(f[f.length-1]+O),i.virtualSize+=O}if(d.length===0&&(d=[0]),y!==0){const O=i.isHorizontal()&&o?"marginLeft":i.getDirectionLabel("marginRight");c.filter((D,k)=>!t.cssMode||t.loop?!0:k!==c.length-1).forEach(D=>{D.style[O]=`${y}px`})}if(t.centeredSlides&&t.centeredSlidesBounds){let O=0;p.forEach(k=>{O+=k+(y||0)}),O-=y;const D=O-s;d=d.map(k=>k<=0?-b:k>D?D+m:k)}if(t.centerInsufficientSlides){let O=0;p.forEach(k=>{O+=k+(y||0)}),O-=y;const D=(t.slidesOffsetBefore||0)+(t.slidesOffsetAfter||0);if(O+D<s){const k=(s-O-D)/2;d.forEach((A,C)=>{d[C]=A-k}),f.forEach((A,C)=>{f[C]=A+k})}}if(Object.assign(i,{slides:c,snapGrid:d,slidesGrid:f,slidesSizesGrid:p}),t.centeredSlides&&t.cssMode&&!t.centeredSlidesBounds){Hs(n,"--swiper-centered-offset-before",`${-d[0]}px`),Hs(n,"--swiper-centered-offset-after",`${i.size/2-p[p.length-1]/2}px`);const O=-i.snapGrid[0],D=-i.slidesGrid[0];i.snapGrid=i.snapGrid.map(k=>k+O),i.slidesGrid=i.slidesGrid.map(k=>k+D)}if(h!==u&&i.emit("slidesLengthChange"),d.length!==v&&(i.params.watchOverflow&&i.checkOverflow(),i.emit("snapGridLengthChange")),f.length!==g&&i.emit("slidesGridLengthChange"),t.watchSlidesProgress&&i.updateSlidesOffset(),i.emit("slidesUpdated"),!a&&!t.cssMode&&(t.effect==="slide"||t.effect==="fade")){const O=`${t.containerModifierClass}backface-hidden`,D=i.el.classList.contains(O);h<=t.maxBackfaceHiddenSlides?D||i.el.classList.add(O):D&&i.el.classList.remove(O)}}function E3(i){const e=this,t=[],n=e.virtual&&e.params.virtual.enabled;let r=0,s;typeof i=="number"?e.setTransition(i):i===!0&&e.setTransition(e.params.speed);const o=l=>n?e.slides[e.getSlideIndexByData(l)]:e.slides[l];if(e.params.slidesPerView!=="auto"&&e.params.slidesPerView>1)if(e.params.centeredSlides)(e.visibleSlides||[]).forEach(l=>{t.push(l)});else for(s=0;s<Math.ceil(e.params.slidesPerView);s+=1){const l=e.activeIndex+s;if(l>e.slides.length&&!n)break;t.push(o(l))}else t.push(o(e.activeIndex));for(s=0;s<t.length;s+=1)if(typeof t[s]<"u"){const l=t[s].offsetHeight;r=l>r?l:r}(r||r===0)&&(e.wrapperEl.style.height=`${r}px`)}function T3(){const i=this,e=i.slides,t=i.isElement?i.isHorizontal()?i.wrapperEl.offsetLeft:i.wrapperEl.offsetTop:0;for(let n=0;n<e.length;n+=1)e[n].swiperSlideOffset=(i.isHorizontal()?e[n].offsetLeft:e[n].offsetTop)-t-i.cssOverflowAdjustment()}const j0=(i,e,t)=>{e&&!i.classList.contains(t)?i.classList.add(t):!e&&i.classList.contains(t)&&i.classList.remove(t)};function S3(i){i===void 0&&(i=this&&this.translate||0);const e=this,t=e.params,{slides:n,rtlTranslate:r,snapGrid:s}=e;if(n.length===0)return;typeof n[0].swiperSlideOffset>"u"&&e.updateSlidesOffset();let o=-i;r&&(o=i),e.visibleSlidesIndexes=[],e.visibleSlides=[];let l=t.spaceBetween;typeof l=="string"&&l.indexOf("%")>=0?l=parseFloat(l.replace("%",""))/100*e.size:typeof l=="string"&&(l=parseFloat(l));for(let a=0;a<n.length;a+=1){const u=n[a];let c=u.swiperSlideOffset;t.cssMode&&t.centeredSlides&&(c-=n[0].swiperSlideOffset);const h=(o+(t.centeredSlides?e.minTranslate():0)-c)/(u.swiperSlideSize+l),d=(o-s[0]+(t.centeredSlides?e.minTranslate():0)-c)/(u.swiperSlideSize+l),f=-(o-c),p=f+e.slidesSizesGrid[a],b=f>=0&&f<=e.size-e.slidesSizesGrid[a],m=f>=0&&f<e.size-1||p>1&&p<=e.size||f<=0&&p>=e.size;m&&(e.visibleSlides.push(u),e.visibleSlidesIndexes.push(a)),j0(u,m,t.slideVisibleClass),j0(u,b,t.slideFullyVisibleClass),u.progress=r?-h:h,u.originalProgress=r?-d:d}}function C3(i){const e=this;if(typeof i>"u"){const c=e.rtlTranslate?-1:1;i=e&&e.translate&&e.translate*c||0}const t=e.params,n=e.maxTranslate()-e.minTranslate();let{progress:r,isBeginning:s,isEnd:o,progressLoop:l}=e;const a=s,u=o;if(n===0)r=0,s=!0,o=!0;else{r=(i-e.minTranslate())/n;const c=Math.abs(i-e.minTranslate())<1,h=Math.abs(i-e.maxTranslate())<1;s=c||r<=0,o=h||r>=1,c&&(r=0),h&&(r=1)}if(t.loop){const c=e.getSlideIndexByData(0),h=e.getSlideIndexByData(e.slides.length-1),d=e.slidesGrid[c],f=e.slidesGrid[h],p=e.slidesGrid[e.slidesGrid.length-1],b=Math.abs(i);b>=d?l=(b-d)/p:l=(b+p-f)/p,l>1&&(l-=1)}Object.assign(e,{progress:r,progressLoop:l,isBeginning:s,isEnd:o}),(t.watchSlidesProgress||t.centeredSlides&&t.autoHeight)&&e.updateSlidesProgress(i),s&&!a&&e.emit("reachBeginning toEdge"),o&&!u&&e.emit("reachEnd toEdge"),(a&&!s||u&&!o)&&e.emit("fromEdge"),e.emit("progress",r)}const cd=(i,e,t)=>{e&&!i.classList.contains(t)?i.classList.add(t):!e&&i.classList.contains(t)&&i.classList.remove(t)};function k3(){const i=this,{slides:e,params:t,slidesEl:n,activeIndex:r}=i,s=i.virtual&&t.virtual.enabled,o=i.grid&&t.grid&&t.grid.rows>1,l=h=>tt(n,`.${t.slideClass}${h}, swiper-slide${h}`)[0];let a,u,c;if(s)if(t.loop){let h=r-i.virtual.slidesBefore;h<0&&(h=i.virtual.slides.length+h),h>=i.virtual.slides.length&&(h-=i.virtual.slides.length),a=l(`[data-swiper-slide-index="${h}"]`)}else a=l(`[data-swiper-slide-index="${r}"]`);else o?(a=e.filter(h=>h.column===r)[0],c=e.filter(h=>h.column===r+1)[0],u=e.filter(h=>h.column===r-1)[0]):a=e[r];a&&(o||(c=h3(a,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!c&&(c=e[0]),u=d3(a,`.${t.slideClass}, swiper-slide`)[0],t.loop&&!u===0&&(u=e[e.length-1]))),e.forEach(h=>{cd(h,h===a,t.slideActiveClass),cd(h,h===c,t.slideNextClass),cd(h,h===u,t.slidePrevClass)}),i.emitSlidesClasses()}const ul=(i,e)=>{if(!i||i.destroyed||!i.params)return;const t=()=>i.isElement?"swiper-slide":`.${i.params.slideClass}`,n=e.closest(t());if(n){let r=n.querySelector(`.${i.params.lazyPreloaderClass}`);!r&&i.isElement&&(n.shadowRoot?r=n.shadowRoot.querySelector(`.${i.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(r=n.shadowRoot.querySelector(`.${i.params.lazyPreloaderClass}`),r&&r.remove())})),r&&r.remove()}},dd=(i,e)=>{if(!i.slides[e])return;const t=i.slides[e].querySelector('[loading="lazy"]');t&&t.removeAttribute("loading")},Gh=i=>{if(!i||i.destroyed||!i.params)return;let e=i.params.lazyPreloadPrevNext;const t=i.slides.length;if(!t||!e||e<0)return;e=Math.min(e,t);const n=i.params.slidesPerView==="auto"?i.slidesPerViewDynamic():Math.ceil(i.params.slidesPerView),r=i.activeIndex;if(i.params.grid&&i.params.grid.rows>1){const o=r,l=[o-e];l.push(...Array.from({length:e}).map((a,u)=>o+n+u)),i.slides.forEach((a,u)=>{l.includes(a.column)&&dd(i,u)});return}const s=r+n-1;if(i.params.rewind||i.params.loop)for(let o=r-e;o<=s+e;o+=1){const l=(o%t+t)%t;(l<r||l>s)&&dd(i,l)}else for(let o=Math.max(r-e,0);o<=Math.min(s+e,t-1);o+=1)o!==r&&(o>s||o<r)&&dd(i,o)};function _3(i){const{slidesGrid:e,params:t}=i,n=i.rtlTranslate?i.translate:-i.translate;let r;for(let s=0;s<e.length;s+=1)typeof e[s+1]<"u"?n>=e[s]&&n<e[s+1]-(e[s+1]-e[s])/2?r=s:n>=e[s]&&n<e[s+1]&&(r=s+1):n>=e[s]&&(r=s);return t.normalizeSlideIndex&&(r<0||typeof r>"u")&&(r=0),r}function A3(i){const e=this,t=e.rtlTranslate?e.translate:-e.translate,{snapGrid:n,params:r,activeIndex:s,realIndex:o,snapIndex:l}=e;let a=i,u;const c=f=>{let p=f-e.virtual.slidesBefore;return p<0&&(p=e.virtual.slides.length+p),p>=e.virtual.slides.length&&(p-=e.virtual.slides.length),p};if(typeof a>"u"&&(a=_3(e)),n.indexOf(t)>=0)u=n.indexOf(t);else{const f=Math.min(r.slidesPerGroupSkip,a);u=f+Math.floor((a-f)/r.slidesPerGroup)}if(u>=n.length&&(u=n.length-1),a===s&&!e.params.loop){u!==l&&(e.snapIndex=u,e.emit("snapIndexChange"));return}if(a===s&&e.params.loop&&e.virtual&&e.params.virtual.enabled){e.realIndex=c(a);return}const h=e.grid&&r.grid&&r.grid.rows>1;let d;if(e.virtual&&r.virtual.enabled&&r.loop)d=c(a);else if(h){const f=e.slides.filter(b=>b.column===a)[0];let p=parseInt(f.getAttribute("data-swiper-slide-index"),10);Number.isNaN(p)&&(p=Math.max(e.slides.indexOf(f),0)),d=Math.floor(p/r.grid.rows)}else if(e.slides[a]){const f=e.slides[a].getAttribute("data-swiper-slide-index");f?d=parseInt(f,10):d=a}else d=a;Object.assign(e,{previousSnapIndex:l,snapIndex:u,previousRealIndex:o,realIndex:d,previousIndex:s,activeIndex:a}),e.initialized&&Gh(e),e.emit("activeIndexChange"),e.emit("snapIndexChange"),(e.initialized||e.params.runCallbacksOnInit)&&(o!==d&&e.emit("realIndexChange"),e.emit("slideChange"))}function L3(i,e){const t=this,n=t.params;let r=i.closest(`.${n.slideClass}, swiper-slide`);!r&&t.isElement&&e&&e.length>
vendor: 8,769 bytes, line 172
1721&&e.includes(i)&&[...e.slice(e.indexOf(i)+1,e.length)].forEach(l=>{!r&&l.matches&&l.matches(`.${n.slideClass}, swiper-slide`)&&(r=l)});let s=!1,o;if(r){for(let l=0;l<t.slides.length;l+=1)if(t.slides[l]===r){s=!0,o=l;break}}if(r&&s)t.clickedSlide=r,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(r.getAttribute("data-swiper-slide-index"),10):t.clickedIndex=o;else{t.clickedSlide=void 0,t.clickedIndex=void 0;return}n.slideToClickedSlide&&t.clickedIndex!==void 0&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}var M3={updateSize:w3,updateSlides:x3,updateAutoHeight:E3,updateSlidesOffset:T3,updateSlidesProgress:S3,updateProgress:C3,updateSlidesClasses:k3,updateActiveIndex:A3,updateClickedSlide:L3};function I3(i){i===void 0&&(i=this.isHorizontal()?"x":"y");const e=this,{params:t,rtlTranslate:n,translate:r,wrapperEl:s}=e;if(t.virtualTranslate)return n?-r:r;if(t.cssMode)return r;let o=Uh(s,i);return o+=e.cssOverflowAdjustment(),n&&(o=-o),o||0}function O3(i,e){const t=this,{rtlTranslate:n,params:r,wrapperEl:s,progress:o}=t;let l=0,a=0;const u=0;t.isHorizontal()?l=n?-i:i:a=i,r.roundLengths&&(l=Math.floor(l),a=Math.floor(a)),t.previousTranslate=t.translate,t.translate=t.isHorizontal()?l:a,r.cssMode?s[t.isHorizontal()?"scrollLeft":"scrollTop"]=t.isHorizontal()?-l:-a:r.virtualTranslate||(t.isHorizontal()?l-=t.cssOverflowAdjustment():a-=t.cssOverflowAdjustment(),s.style.transform=`translate3d(${l}px, ${a}px, ${u}px)`);let c;const h=t.maxTranslate()-t.minTranslate();h===0?c=0:c=(i-t.minTranslate())/h,c!==o&&t.updateProgress(i),t.emit("setTranslate",t.translate,e)}function D3(){return-this.snapGrid[0]}function P3(){return-this.snapGrid[this.snapGrid.length-1]}function R3(i,e,t,n,r){i===void 0&&(i=0),e===void 0&&(e=this.params.speed),t===void 0&&(t=!0),n===void 0&&(n=!0);const s=this,{params:o,wrapperEl:l}=s;if(s.animating&&o.preventInteractionOnTransition)return!1;const a=s.minTranslate(),u=s.maxTranslate();let c;if(n&&i>a?c=a:n&&i<u?c=u:c=i,s.updateProgress(c),o.cssMode){const h=s.isHorizontal();if(e===0)l[h?"scrollLeft":"scrollTop"]=-c;else{if(!s.support.smoothScroll)return Px({swiper:s,targetPosition:-c,side:h?"left":"top"}),!0;l.scrollTo({[h?"left":"top"]:-c,behavior:"smooth"})}return!0}return e===0?(s.setTransition(0),s.setTranslate(c),t&&(s.emit("beforeTransitionStart",e,r),s.emit("transitionEnd"))):(s.setTransition(e),s.setTranslate(c),t&&(s.emit("beforeTransitionStart",e,r),s.emit("transitionStart")),s.animating||(s.animating=!0,s.onTranslateToWrapperTransitionEnd||(s.onTranslateToWrapperTransitionEnd=function(d){!s||s.destroyed||d.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onTranslateToWrapperTransitionEnd),s.onTranslateToWrapperTransitionEnd=null,delete s.onTranslateToWrapperTransitionEnd,s.animating=!1,t&&s.emit("transitionEnd"))}),s.wrapperEl.addEventListener("transitionend",s.onTranslateToWrapperTransitionEnd))),!0}var N3={getTranslate:I3,setTranslate:O3,minTranslate:D3,maxTranslate:P3,translateTo:R3};function B3(i,e){const t=this;t.params.cssMode||(t.wrapperEl.style.transitionDuration=`${i}ms`,t.wrapperEl.style.transitionDelay=i===0?"0ms":""),t.emit("setTransition",i,e)}function Bx(i){let{swiper:e,runCallbacks:t,direction:n,step:r}=i;const{activeIndex:s,previousIndex:o}=e;let l=n;if(l||(s>o?l="next":s<o?l="prev":l="reset"),e.emit(`transition${r}`),t&&s!==o){if(l==="reset"){e.emit(`slideResetTransition${r}`);return}e.emit(`slideChangeTransition${r}`),l==="next"?e.emit(`slideNextTransition${r}`):e.emit(`slidePrevTransition${r}`)}}function F3(i,e){i===void 0&&(i=!0);const t=this,{params:n}=t;n.cssMode||(n.autoHeight&&t.updateAutoHeight(),Bx({swiper:t,runCallbacks:i,direction:e,step:"Start"}))}function z3(i,e){i===void 0&&(i=!0);const t=this,{params:n}=t;t.animating=!1,!n.cssMode&&(t.setTransition(0),Bx({swiper:t,runCallbacks:i,direction:e,step:"End"}))}var V3={setTransition:B3,transitionStart:F3,transitionEnd:z3};function H3(i,e,t,n,r){i===void 0&&(i=0),t===void 0&&(t=!0),typeof i=="string"&&(i=parseInt(i,10));const s=this;let o=i;o<0&&(o=0);const{params:l,snapGrid:a,slidesGrid:u,previousIndex:c,activeIndex:h,rtlTranslate:d,wrapperEl:f,enabled:p}=s;if(!p&&!n&&!r||s.destroyed||s.animating&&l.preventInteractionOnTransition)return!1;typeof e>"u"&&(e=s.params.speed);const b=Math.min(s.params.slidesPerGroupSkip,o);let m=b+Math.floor((o-b)/s.params.slidesPerGroup);m>=a.length&&(m=a.length-1);const v=-a[m];if(l.normalizeSlideIndex)for(let y=0;y<u.length;y+=1){const w=-Math.floor(v*100),E=Math.floor(u[y]*100),x=Math.floor(u[y+1]*100);typeof u[y+1]<"u"?w>=E&&w<x-(x-E)/2?o=y:w>=E&&w<x&&(o=y+1):w>=E&&(o=y)}if(s.initialized&&o!==h&&(!s.allowSlideNext&&(d?v>s.translate&&v>s.minTranslate():v<s.translate&&v<s.minTranslate())||!s.allowSlidePrev&&v>s.translate&&v>s.maxTranslate()&&(h||0)!==o))return!1;o!==(c||0)&&t&&s.emit("beforeSlideChangeStart"),s.updateProgress(v);let g;if(o>h?g="next":o<h?g="prev":g="reset",d&&-v===s.translate||!d&&v===s.translate)return s.updateActiveIndex(o),l.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),l.effect!=="slide"&&s.setTranslate(v),g!=="reset"&&(s.transitionStart(t,g),s.transitionEnd(t,g)),!1;if(l.cssMode){const y=s.isHorizontal(),w=d?v:-v;if(e===0){const E=s.virtual&&s.params.virtual.enabled;E&&(s.wrapperEl.style.scrollSnapType="none",s._immediateVirtual=!0),E&&!s._cssModeVirtualInitialSet&&s.params.initialSlide>0?(s._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{f[y?"scrollLeft":"scrollTop"]=w})):f[y?"scrollLeft":"scrollTop"]=w,E&&requestAnimationFrame(()=>{s.wrapperEl.style.scrollSnapType="",s._immediateVirtual=!1})}else{if(!s.support.smoothScroll)return Px({swiper:s,targetPosition:w,side:y?"left":"top"}),!0;f.scrollTo({[y?"left":"top"]:w,behavior:"smooth"})}return!0}return s.setTransition(e),s.setTranslate(v),s.updateActiveIndex(o),s.updateSlidesClasses(),s.emit("beforeTransitionStart",e,n),s.transitionStart(t,g),e===0?s.transitionEnd(t,g):s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(w){!s||s.destroyed||w.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(t,g))}),s.wrapperEl.addEventListener("transitionend",s.onSlideToWrapperTransitionEnd)),!0}function j3(i,e,t,n){i===void 0&&(i=0),t===void 0&&(t=!0),typeof i=="string"&&(i=parseInt(i,10));const r=this;if(r.destroyed)return;typeof e>"u"&&(e=r.params.speed);const s=r.grid&&r.params.grid&&r.params.grid.rows>1;let o=i;if(r.params.loop)if(r.virtual&&r.params.virtual.enabled)o=o+r.virtual.slidesBefore;else{let l;if(s){const d=o*r.params.grid.rows;l=r.slides.filter(f=>f.getAttribute("data-swiper-slide-index")*1===d)[0].column}else l=r.getSlideIndexByData(o);const a=s?Math.ceil(r.slides.length/r.params.grid.rows):r.slides.length,{centeredSlides:u}=r.params;let c=r.params.slidesPerView;c==="auto"?c=r.slidesPerViewDynamic():(c=Math.ceil(parseFloat(r.params.slidesPerView,10)),u&&c%2===0&&(c=c+1));let h=a-l<c;if(u&&(h=h||l<Math.ceil(c/2)),n&&u&&r.params.slidesPerView!=="auto"&&!s&&(h=!1),h){const d=u?l<r.activeIndex?"prev":"next":l-r.activeIndex-1<r.params.slidesPerView?"next":"prev";r.loopFix({direction:d,slideTo:!0,activeSlideIndex:d==="next"?l+1:l-a+1,slideRealIndex:d==="next"?r.realIndex:void 0})}if(s){const d=o*r.params.grid.rows;o=r.slides.filter(f=>f.getAttribute("data-swiper-slide-index")*1===d)[0].column}else o=r.getSlideIndexByData(o)}return requestAnimationFrame(()=>{r.slideTo(o,e,t,n)}),r}function $3(i,e,t){e===void 0&&(e=!0);const n=this,{enabled:r,params:s,animating:o}=n;if(!r||n.destroyed)return n;typeof i>"u"&&(i=n.params.speed);let l=s.slidesPerGroup;s.slidesPerView==="auto"&&s.slidesPerGroup===1&&s.slidesPerGroupAuto&&(l=Math.max(n.slidesPerViewDynamic("current",!0),1));const a=n.activeIndex<s.slidesPerGroupSkip?1:l,u=n.virtual&&s.virtual.enabled;if(s.loop){if(o&&!u&&s.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&s.cssMode)return requestAnimationFrame(()=>{n.slideTo(n.activeIndex+a,i,e,t)}),!0}return s.rewind&&n.isEnd?n.slideTo(0,i,e,t):n.slideTo(n.activeIndex+a,i,e,t)}function q3(i,e,t){e===void 0&&(e=!0);const n=this,{params:r,snapGrid:s,slidesGrid:o,rtlTranslate:l,enabled:a,animating:u}=n;if(!a||n.destroyed)return n;typeof i>"u"&&(i=n.params.speed);const c=n.virtual&&r.virtual.enabled;if(r.loop){if(u&&!c&&r.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}const h=l?n.translate:-n.translate;function d(v){return v<0?-Math.floor(Math.abs(v)):Math.floor(v)}const f=d(h),p=s.map(v=>d(v));let b=s[p.indexOf(f)-1];if(typeof b>"u"&&r.cssMode){let v;
vendor: 5,227 bytes, line 172
172s.forEach((g,y)=>{f>=g&&(v=y)}),typeof v<"u"&&(b=s[v>0?v-1:v])}let m=0;if(typeof b<"u"&&(m=o.indexOf(b),m<0&&(m=n.activeIndex-1),r.slidesPerView==="auto"&&r.slidesPerGroup===1&&r.slidesPerGroupAuto&&(m=m-n.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),r.rewind&&n.isBeginning){const v=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(v,i,e,t)}else if(r.loop&&n.activeIndex===0&&r.cssMode)return requestAnimationFrame(()=>{n.slideTo(m,i,e,t)}),!0;return n.slideTo(m,i,e,t)}function U3(i,e,t){e===void 0&&(e=!0);const n=this;if(!n.destroyed)return typeof i>"u"&&(i=n.params.speed),n.slideTo(n.activeIndex,i,e,t)}function W3(i,e,t,n){e===void 0&&(e=!0),n===void 0&&(n=.5);const r=this;if(r.destroyed)return;typeof i>"u"&&(i=r.params.speed);let s=r.activeIndex;const o=Math.min(r.params.slidesPerGroupSkip,s),l=o+Math.floor((s-o)/r.params.slidesPerGroup),a=r.rtlTranslate?r.translate:-r.translate;if(a>=r.snapGrid[l]){const u=r.snapGrid[l],c=r.snapGrid[l+1];a-u>(c-u)*n&&(s+=r.params.slidesPerGroup)}else{const u=r.snapGrid[l-1],c=r.snapGrid[l];a-u<=(c-u)*n&&(s-=r.params.slidesPerGroup)}return s=Math.max(s,0),s=Math.min(s,r.slidesGrid.length-1),r.slideTo(s,i,e,t)}function G3(){const i=this;if(i.destroyed)return;const{params:e,slidesEl:t}=i,n=e.slidesPerView==="auto"?i.slidesPerViewDynamic():e.slidesPerView;let r=i.clickedIndex,s;const o=i.isElement?"swiper-slide":`.${e.slideClass}`;if(e.loop){if(i.animating)return;s=parseInt(i.clickedSlide.getAttribute("data-swiper-slide-index"),10),e.centeredSlides?r<i.loopedSlides-n/2||r>i.slides.length-i.loopedSlides+n/2?(i.loopFix(),r=i.getSlideIndex(tt(t,`${o}[data-swiper-slide-index="${s}"]`)[0]),fr(()=>{i.slideTo(r)})):i.slideTo(r):r>i.slides.length-n?(i.loopFix(),r=i.getSlideIndex(tt(t,`${o}[data-swiper-slide-index="${s}"]`)[0]),fr(()=>{i.slideTo(r)})):i.slideTo(r)}else i.slideTo(r)}var K3={slideTo:H3,slideToLoop:j3,slideNext:$3,slidePrev:q3,slideReset:U3,slideToClosest:W3,slideToClickedSlide:G3};function Y3(i){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;const r=()=>{tt(n,`.${t.slideClass}, swiper-slide`).forEach((h,d)=>{h.setAttribute("data-swiper-slide-index",d)})},s=e.grid&&t.grid&&t.grid.rows>1,o=t.slidesPerGroup*(s?t.grid.rows:1),l=e.slides.length%o!==0,a=s&&e.slides.length%t.grid.rows!==0,u=c=>{for(let h=0;h<c;h+=1){const d=e.isElement?Pt("swiper-slide",[t.slideBlankClass]):Pt("div",[t.slideClass,t.slideBlankClass]);e.slidesEl.append(d)}};if(l){if(t.loopAddBlankSlides){const c=o-e.slides.length%o;u(c),e.recalcSlides(),e.updateSlides()}else su("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else if(a){if(t.loopAddBlankSlides){const c=t.grid.rows-e.slides.length%t.grid.rows;u(c),e.recalcSlides(),e.updateSlides()}else su("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else r();e.loopFix({slideRealIndex:i,direction:t.centeredSlides?void 0:"next"})}function X3(i){let{slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:r,activeSlideIndex:s,byController:o,byMousewheel:l}=i===void 0?{}:i;const a=this;if(!a.params.loop)return;a.emit("beforeLoopFix");const{slides:u,allowSlidePrev:c,allowSlideNext:h,slidesEl:d,params:f}=a,{centeredSlides:p}=f;if(a.allowSlidePrev=!0,a.allowSlideNext=!0,a.virtual&&f.virtual.enabled){t&&(!f.centeredSlides&&a.snapIndex===0?a.slideTo(a.virtual.slides.length,0,!1,!0):f.centeredSlides&&a.snapIndex<f.slidesPerView?a.slideTo(a.virtual.slides.length+a.snapIndex,0,!1,!0):a.snapIndex===a.snapGrid.length-1&&a.slideTo(a.virtual.slidesBefore,0,!1,!0)),a.allowSlidePrev=c,a.allowSlideNext=h,a.emit("loopFix");return}let b=f.slidesPerView;b==="auto"?b=a.slidesPerViewDynamic():(b=Math.ceil(parseFloat(f.slidesPerView,10)),p&&b%2===0&&(b=b+1));const m=f.slidesPerGroupAuto?b:f.slidesPerGroup;let v=m;v%m!==0&&(v+=m-v%m),v+=f.loopAdditionalSlides,a.loopedSlides=v;const g=a.grid&&f.grid&&f.grid.rows>1;u.length<b+v?su("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled and not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):g&&f.grid.fill==="row"&&su("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const y=[],w=[];let E=a.activeIndex;typeof s>"u"?s=a.getSlideIndex(u.filter(A=>A.classList.contains(f.slideActiveClass))[0]):E=s;const x=n==="next"||!n,S=n==="prev"||!n;let _=0,M=0;const O=g?Math.ceil(u.length/f.grid.rows):u.length,k=(g?u[s].column:s)+(p&&typeof r>"u"?-b/2+.5:0);if(k<v){_=Math.max(v-k,m);for(let A=0;A<v-k;A+=1){const C=A-Math.floor(A/O)*O;if(g){const T=O-C-1;for(let L=u.length-1;L>=0;L-=1)u[L].column===T&&y.push(L)}else y.push(O-C-1)}}else if(k+b>O-v){M=Math.max(k-(O-v*2),m);for(let A=0;A<M;A+=1){const C=A-Math.floor(A/O)*O;g?u.forEach((T,L)=>{T.column===C&&w.push(L)}):w.push(C)}}if(a.__preventObserver__=!0,requestAnimationFrame(()=>{a.__preventObserver__=!1}
vendor: 18,120 bytes, line 172
172),S&&y.forEach(A=>{u[A].swiperLoopMoveDOM=!0,d.prepend(u[A]),u[A].swiperLoopMoveDOM=!1}),x&&w.forEach(A=>{u[A].swiperLoopMoveDOM=!0,d.append(u[A]),u[A].swiperLoopMoveDOM=!1}),a.recalcSlides(),f.slidesPerView==="auto"?a.updateSlides():g&&(y.length>0&&S||w.length>0&&x)&&a.slides.forEach((A,C)=>{a.grid.updateSlide(C,A,a.slides)}),f.watchSlidesProgress&&a.updateSlidesOffset(),t){if(y.length>0&&S){if(typeof e>"u"){const A=a.slidesGrid[E],T=a.slidesGrid[E+_]-A;l?a.setTranslate(a.translate-T):(a.slideTo(E+Math.ceil(_),0,!1,!0),r&&(a.touchEventsData.startTranslate=a.touchEventsData.startTranslate-T,a.touchEventsData.currentTranslate=a.touchEventsData.currentTranslate-T))}else if(r){const A=g?y.length/f.grid.rows:y.length;a.slideTo(a.activeIndex+A,0,!1,!0),a.touchEventsData.currentTranslate=a.translate}}else if(w.length>0&&x)if(typeof e>"u"){const A=a.slidesGrid[E],T=a.slidesGrid[E-M]-A;l?a.setTranslate(a.translate-T):(a.slideTo(E-M,0,!1,!0),r&&(a.touchEventsData.startTranslate=a.touchEventsData.startTranslate-T,a.touchEventsData.currentTranslate=a.touchEventsData.currentTranslate-T))}else{const A=g?w.length/f.grid.rows:w.length;a.slideTo(a.activeIndex-A,0,!1,!0)}}if(a.allowSlidePrev=c,a.allowSlideNext=h,a.controller&&a.controller.control&&!o){const A={slideRealIndex:e,direction:n,setTranslate:r,activeSlideIndex:s,byController:!0};Array.isArray(a.controller.control)?a.controller.control.forEach(C=>{!C.destroyed&&C.params.loop&&C.loopFix({...A,slideTo:C.params.slidesPerView===f.slidesPerView?t:!1})}):a.controller.control instanceof a.constructor&&a.controller.control.params.loop&&a.controller.control.loopFix({...A,slideTo:a.controller.control.params.slidesPerView===f.slidesPerView?t:!1})}a.emit("loopFix")}function J3(){const i=this,{params:e,slidesEl:t}=i;if(!e.loop||i.virtual&&i.params.virtual.enabled)return;i.recalcSlides();const n=[];i.slides.forEach(r=>{const s=typeof r.swiperSlideIndex>"u"?r.getAttribute("data-swiper-slide-index")*1:r.swiperSlideIndex;n[s]=r}),i.slides.forEach(r=>{r.removeAttribute("data-swiper-slide-index")}),n.forEach(r=>{t.append(r)}),i.recalcSlides(),i.slideTo(i.realIndex,0)}var Q3={loopCreate:Y3,loopFix:X3,loopDestroy:J3};function Z3(i){const e=this;if(!e.params.simulateTouch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)return;const t=e.params.touchEventsTarget==="container"?e.el:e.wrapperEl;e.isElement&&(e.__preventObserver__=!0),t.style.cursor="move",t.style.cursor=i?"grabbing":"grab",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1})}function eD(){const i=this;i.params.watchOverflow&&i.isLocked||i.params.cssMode||(i.isElement&&(i.__preventObserver__=!0),i[i.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",i.isElement&&requestAnimationFrame(()=>{i.__preventObserver__=!1}))}var tD={setGrabCursor:Z3,unsetGrabCursor:eD};function nD(i,e){e===void 0&&(e=this);function t(n){if(!n||n===it()||n===Fe())return null;n.assignedSlot&&(n=n.assignedSlot);const r=n.closest(i);return!r&&!n.getRootNode?null:r||t(n.getRootNode().host)}return t(e)}function $0(i,e,t){const n=Fe(),{params:r}=i,s=r.edgeSwipeDetection,o=r.edgeSwipeThreshold;return s&&(t<=o||t>=n.innerWidth-o)?s==="prevent"?(e.preventDefault(),!0):!1:!0}function iD(i){const e=this,t=it();let n=i;n.originalEvent&&(n=n.originalEvent);const r=e.touchEventsData;if(n.type==="pointerdown"){if(r.pointerId!==null&&r.pointerId!==n.pointerId)return;r.pointerId=n.pointerId}else n.type==="touchstart"&&n.targetTouches.length===1&&(r.touchId=n.targetTouches[0].identifier);if(n.type==="touchstart"){$0(e,n,n.targetTouches[0].pageX);return}const{params:s,touches:o,enabled:l}=e;if(!l||!s.simulateTouch&&n.pointerType==="mouse"||e.animating&&s.preventInteractionOnTransition)return;!e.animating&&s.cssMode&&s.loop&&e.loopFix();let a=n.target;if(s.touchEventsTarget==="wrapper"&&!e.wrapperEl.contains(a)||"which"in n&&n.which===3||"button"in n&&n.button>0||r.isTouched&&r.isMoved)return;const u=!!s.noSwipingClass&&s.noSwipingClass!=="",c=n.composedPath?n.composedPath():n.path;u&&n.target&&n.target.shadowRoot&&c&&(a=c[0]);const h=s.noSwipingSelector?s.noSwipingSelector:`.${s.noSwipingClass}`,d=!!(n.target&&n.target.shadowRoot);if(s.noSwiping&&(d?nD(h,a):a.closest(h))){e.allowClick=!0;return}if(s.swipeHandler&&!a.closest(s.swipeHandler))return;o.currentX=n.pageX,o.currentY=n.pageY;const f=o.currentX,p=o.currentY;if(!$0(e,n,f))return;Object.assign(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=f,o.startY=p,r.touchStartTime=$t(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,s.threshold>0&&(r.allowThresholdMove=!1);let b=!0;a.matches(r.focusableElements)&&(b=!1,a.nodeName==="SELECT"&&(r.isTouched=!1)),t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==a&&t.activeElement.blur();const m=b&&e.allowTouchMove&&s.touchStartPreventDefault;(s.touchStartForcePreventDefault||m)&&!a.isContentEditable&&n.preventDefault(),s.freeMode&&s.freeMode.enabled&&e.freeMode&&e.animating&&!s.cssMode&&e.freeMode.onTouchStart(),e.emit("touchStart",n)}function rD(i){const e=it(),t=this,n=t.touchEventsData,{params:r,touches:s,rtlTranslate:o,enabled:l}=t;if(!l||!r.simulateTouch&&i.pointerType==="mouse")return;let a=i;if(a.originalEvent&&(a=a.originalEvent),a.type==="pointermove"&&(n.touchId!==null||a.pointerId!==n.pointerId))return;let u;if(a.type==="touchmove"){if(u=[...a.changedTouches].filter(x=>x.identifier===n.touchId)[0],!u||u.identifier!==n.touchId)return}else u=a;if(!n.isTouched){n.startMoving&&n.isScrolling&&t.emit("touchMoveOpposite",a);return}const c=u.pageX,h=u.pageY;if(a.preventedByNestedSwiper){s.startX=c,s.startY=h;return}if(!t.allowTouchMove){a.target.matches(n.focusableElements)||(t.allowClick=!1),n.isTouched&&(Object.assign(s,{startX:c,startY:h,currentX:c,currentY:h}),n.touchStartTime=$t());return}if(r.touchReleaseOnEdges&&!r.loop){if(t.isVertical()){if(h<s.startY&&t.translate<=t.maxTranslate()||h>s.startY&&t.translate>=t.minTranslate()){n.isTouched=!1,n.isMoved=!1;return}}else if(c<s.startX&&t.translate<=t.maxTranslate()||c>s.startX&&t.translate>=t.minTranslate())return}if(e.activeElement&&a.target===e.activeElement&&a.target.matches(n.focusableElements)){n.isMoved=!0,t.allowClick=!1;return}n.allowTouchCallbacks&&t.emit("touchMove",a),s.previousX=s.currentX,s.previousY=s.currentY,s.currentX=c,s.currentY=h;const d=s.currentX-s.startX,f=s.currentY-s.startY;if(t.params.threshold&&Math.sqrt(d**2+f**2)<t.params.threshold)return;if(typeof n.isScrolling>"u"){let x;t.isHorizontal()&&s.currentY===s.startY||t.isVertical()&&s.currentX===s.startX?n.isScrolling=!1:d*d+f*f>=25&&(x=Math.atan2(Math.abs(f),Math.abs(d))*180/Math.PI,n.isScrolling=t.isHorizontal()?x>r.touchAngle:90-x>r.touchAngle)}if(n.isScrolling&&t.emit("touchMoveOpposite",a),typeof n.startMoving>"u"&&(s.currentX!==s.startX||s.currentY!==s.startY)&&(n.startMoving=!0),n.isScrolling||a.type==="touchmove"&&n.preventTouchMoveFromPointerMove){n.isTouched=!1;return}if(!n.startMoving)return;t.allowClick=!1,!r.cssMode&&a.cancelable&&a.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&a.stopPropagation();let p=t.isHorizontal()?d:f,b=t.isHorizontal()?s.currentX-s.previousX:s.currentY-s.previousY;r.oneWayMovement&&(p=Math.abs(p)*(o?1:-1),b=Math.abs(b)*(o?1:-1)),s.diff=p,p*=r.touchRatio,o&&(p=-p,b=-b);const m=t.touchesDirection;t.swipeDirection=p>0?"prev":"next",t.touchesDirection=b>0?"prev":"next";const v=t.params.loop&&!r.cssMode,g=t.touchesDirection==="next"&&t.allowSlideNext||t.touchesDirection==="prev"&&t.allowSlidePrev;if(!n.isMoved){if(v&&g&&t.loopFix({direction:t.swipeDirection}),n.startTranslate=t.getTranslate(),t.setTransition(0),t.animating){const x=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});t.wrapperEl.dispatchEvent(x)}n.allowMomentumBounce=!1,r.grabCursor&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!0),t.emit("sliderFirstMove",a)}let y;if(new Date().getTime(),n.isMoved&&n.allowThresholdMove&&m!==t.touchesDirection&&v&&g&&Math.abs(p)>=1){Object.assign(s,{startX:c,startY:h,currentX:c,currentY:h,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,n.startTranslate=n.currentTranslate;return}t.emit("sliderMove",a),n.isMoved=!0,n.currentTranslate=p+n.startTranslate;let w=!0,E=r.resistanceRatio;if(r.touchReleaseOnEdges&&(E=0),p>0?(v&&g&&!y&&n.allowThresholdMove&&n.currentTranslate>(r.centeredSlides?t.minTranslate()-t.slidesSizesGrid[t.activeIndex+1]:t.minTranslate())&&t.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>t.minTranslate()&&(w=!1,r.resistance&&(n.currentTranslate=t.minTranslate()-1+(-t.minTranslate()+n.startTranslate+p)**E))):p<0&&(v&&g&&!y&&n.allowThresholdMove&&n.currentTranslate<(r.centeredSlides?t.maxTranslate()+t.slidesSizesGrid[t.slidesSizesGrid.length-1]:t.maxTranslate())&&t.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:t.slides.length-(r.slidesPerView==="auto"?t.slidesPerViewDynamic():Math.ceil(parseFloat(r.slidesPerView,10)))}),n.currentTranslate<t.maxTranslate()&&(w=!1,r.resistance&&(n.currentTranslate=t.maxTranslate()+1-(t.maxTranslate()-n.startTranslate-p)**E))),w&&(a.preventedByNestedSwiper=!0),!t.allowSlideNext&&t.swipeDirection==="next"&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!t.allowSlidePrev&&t.swipeDirection==="prev"&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),!t.allowSlidePrev&&!t.allowSlideNext&&(n.currentTranslate=n.startTranslate),r.threshold>0)if(Math.abs(p)>r.threshold||n.allowThresholdMove){if(!n.allowThresholdMove){n.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,n.currentTranslate=n.startTranslate,s.diff=t.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY;return}}else{n.currentTranslate=n.startTranslate;return}!r.followFinger||r.cssMode||((r.freeMode&&r.freeMode.enabled&&t.freeMode||r.watchSlidesProgress)&&(t.updateActiveIndex(),t.updateSlidesClasses()),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.freeMode.onTouchMove(),t.updateProgress(n.currentTranslate),t.setTranslate(n.currentTranslate))}function sD(i){const e=this,t=e.touchEventsData;let n=i;n.originalEvent&&(n=n.originalEvent);let r;if(n.type==="touchend"||n.type==="touchcancel"){if(r=[...n.changedTouches].filter(E=>E.identifier===t.touchId)[0],!r||r.identifier!==t.touchId)return}else{if(t.touchId!==null||n.pointerId!==t.pointerId)return;r=n}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(n.type)&&!(["pointercancel","contextmenu"].includes(n.type)&&(e.browser.isSafari||e.browser.isWebView)))return;t.pointerId=null,t.touchId=null;const{params:o,touches:l,rtlTranslate:a,slidesGrid:u,enabled:c}=e;if(!c||!o.simulateTouch&&n.pointerType==="mouse")return;if(t.allowTouchCallbacks&&e.emit("touchEnd",n),t.allowTouchCallbacks=!1,!t.isTouched){t.isMoved&&o.grabCursor&&e.setGrabCursor(!1),t.isMoved=!1,t.startMoving=!1;return}o.grabCursor&&t.isMoved&&t.isTouched&&(e.allowSlideNext===!0||e.allowSlidePrev===!0)&&e.setGrabCursor(!1);const h=$t(),d=h-t.touchStartTime;if(e.allowClick){const E=n.path||n.composedPath&&n.composedPath();e.updateClickedSlide(E&&E[0]||n.target,E),e.emit("tap click",n),d<300&&h-t.lastClickTime<300&&e.emit("doubleTap doubleClick",n)}if(t.lastClickTime=$t(),fr(()=>{e.destroyed||(e.allowClick=!0)}),!t.isTouched||!t.isMoved||!e.swipeDirection||l.diff===0&&!t.loopSwapReset||t.currentTranslate===t.startTranslate&&!t.loopSwapReset){t.isTouched=!1,t.isMoved=!1,t.startMoving=!1;return}t.isTouched=!1,t.isMoved=!1,t.startMoving=!1;let f;if(o.followFinger?f=a?e.translate:-e.translate:f=-t.currentTranslate,o.cssMode)return;if(o.freeMode&&o.freeMode.enabled){e.freeMode.onTouchEnd({currentPos:f});return}const p=f>=-e.maxTranslate()&&!e.params.loop;let b=0,m=e.slidesSizesGrid[0];for(let E=0;E<u.length;E+=E<o.slidesPerGroupSkip?1:o.slidesPerGroup){const x=E<o.slidesPerGroupSkip-1?1:o.slidesPerGroup;typeof u[E+x]<"u"?(p||f>=u[E]&&f<u[E+x])&&(b=E,m=u[E+x]-u[E]):(p||f>=u[E])&&(b=E,m=u[u.length-1]-u[u.length-2])}let v=null,g=null;o.rewind&&(e.isBeginning?g=o.virtual&&o.virtual.enabled&&e.virtual?e.virtual.slides.length-1:e.slides.length-1:e.isEnd&&(v=0));const y=(f-u[b])/m,w=b<o.slidesPerGroupSkip-1?1:o.slidesPerGroup;if(d>o.longSwipesMs){if(!o.longSwipes){e.slideTo(e.activeIndex);return}e.swipeDirection==="next"&&(y>=o.longSwipesRatio?e.slideTo(o.rewind&&e.isEnd?v:b+w):e.slideTo(b)),e.swipeDirection==="prev"&&(y>1-o.longSwipesRatio?e.slideTo(b+w):g!==null&&y<0&&Math.abs(y)>o.longSwipesRatio?e.slideTo(g):e.slideTo(b))}else{if(!o.shortSwipes){e.slideTo(e.activeIndex);return}e.navigation&&(n.target===e.navigation.nextEl||n.target===e.navigation.prevEl)?n.target===e.navigation.nextEl?e.slideTo(b+w):e.slideTo(b):(e.swipeDirection==="next"&&e.slideTo(v!==null?v:b+w),e.swipeDirection==="prev"&&e.slideTo(g!==null?g:b))}}function q0(){const i=this,{params:e,el:t}=i;if(t&&t.offsetWidth===0)return;e.breakpoints&&i.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:r,snapGrid:s}=i,o=i.virtual&&i.params.virtual.enabled;i.allowSlideNext=!0,i.allowSlidePrev=!0,i.updateSize(),i.updateSlides(),i.updateSlidesClasses();const l=o&&e.loop;(e.slidesPerView==="auto"||e.slidesPerView>1)&&i.isEnd&&!i.isBeginning&&!i.params.centeredSlides&&!l?i.slideTo(i.slides.length-1,0,!1,!0):i.params.loop&&!o?i.slideToLoop(i.realIndex,0,!1,!0):i.slideTo(i.activeIndex,0,!1,!0),i.autoplay&&i.autoplay.running&&i.autoplay.paused&&(clearTimeout(i.autoplay.resizeTimeout),i.autoplay.resizeTimeout=setTimeout(()=>{i.autoplay&&i.autoplay.running&&i.autoplay.paused&&i.autoplay.resume()},500)),i.allowSlidePrev=r,i.allowSlideNext=n,i.params.watchOverflow&&s!==i.snapGrid&&i.checkOverflow()}function oD(i){const e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&i.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(i.stopPropagation(),i.stopImmediatePropagation())))}function aD(){const i=this,{wrapperEl:e,rtlTranslate:t,enabled:n}=i;if(!n)return;i.previousTranslate=i.translate,i.isHorizontal()?i.translate=-e.scrollLeft:i.translate=-e.scrollTop,i.translate===0&&(i.translate=0),i.updateActiveIndex(),i.updateSlidesClasses();let r;const s=i.maxTranslate()-i.minTranslate();s===0?r=0:r=(i.translate-i.minTranslate())/s,r!==i.progress&&i.updateProgress(t?-i.translate:i.translate),i.emit("setTranslate",i.translate,!1)}function lD(i){const e=this;ul(e,i.target),!(e.params.cssMode||e.params.slidesPerView!=="auto"&&!e.params.autoHeight)&&e.update()}function uD(){const i=this;i.documentTouchHandlerProceeded||(i.documentTouchHandlerProceeded=!0,i.params.touchReleaseOnEdges&&(i.el.style.touchAction="auto"))}const Fx=(i,e)=>{const t=it(),{params:n,el:r,wrapperEl:s,device:o}=i,l=!!n.nested,a=e==="on"?"addEventListener":"removeEventListener",u=e;!r||typeof r=="string"||(t[a]("touchstart",i.onDocumentTouchStart,{passive:!1,capture:l}),r[a]("touchstart",i.onTouchStart,{passive:!1}),r[a]("pointerdown",i.onTouchStart,{passive:!1}),t[a]("touchmove",i.onTouchMove,{passive:!1,capture:l}),t[a]("pointermove",i.onTouchMove,{passive:!1,capture:l}),t[a]("touchend",i.onTouchEnd,{passive:!0}),t[a]("pointerup",i.onTouchEnd,{passive:!0}),t[a]("pointercancel",i.onTouchEnd,{passive:!0}),t[a]("touchcancel",i.onTouchEnd,{passive:!0}),t[a]("pointerout",i.onTouchEnd,{passive:!0}),t[a]("pointerleave",i.onTouchEnd,{passive:!0}),t[a]("contextmenu",i.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&r[a]("click",i.onClick,!0),n.cssMode&&s[a]("scroll",i.onScroll),n.updateOnWindowResize?i[u](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",q0,!0):i[u]("observerUpdate",q0,!0),r[a]("load",i.onLoad,{capture:!0}))};function cD(){const i=this,{params:e}=i;i.onTouchStart=iD.bind(i),i.onTouchMove=rD.bind(i),i.onTouchEnd=sD.bind(i),i.onDocumentTouchStart=uD.bind(i),e.cssMode&&(i.onScroll=aD.bind(i)),i.onClick=oD.bind(i),i.onLoad=lD.bind(i),Fx(i,"on")}function dD(){Fx(this,"off")}var hD={attachEvents:cD,detachEvents:dD};const U0=(i,e)=>i.grid&&e.grid&&e.grid.rows>1;function fD(){const i=this,{realIndex:e,initialized:t,params:n,el:r}=i,s=n.breakpoints;if(!s||s&&Object.keys(s).length===0)return;const o=i.getBreakpoint(s,i.params.breakpointsBase,i.el);if(!o||i.currentBreakpoint===o)return;const a=(o in s?s[o]:void 0)||i.originalParams,u=U0(i,n),c=U0(i,a),h=i.params.grabCursor,d=a.grabCursor,f=n.enabled;u&&!c?(r.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),i.emitContainerClasses()):!u&&c&&(r.classList.add(`${n.containerModifierClass}grid`),(a.grid.fill&&a.grid.fill==="column"||!a.grid.fill&&n.grid.fill==="column")&&r.classList.add(`${n.containerModifierClass}grid-column`),i.emitContainerClasses()),h&&!d?i.unsetGrabCursor():!h&&d&&i.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(y=>{if(typeof a[y]>"u")return;const w=n[y]&&n[y].enabled,E=a[y]&&a[y].enabled;w&&!E&&i[y].disable(),!w&&E&&i[y].enable()});const p=a.direction&&a.direction!==n.direction,b=n.loop&&(a.slidesPerView!==n.slidesPerView||p),m=n.loop;p&&t&&i.changeDirection(),_t(i.params,a);const v=i.params.enabled,g=i.params.loop;Object.assign(i,{allowTouchMove:i.params.allowTouchMove,allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev}),f&&!v?i.disable():!f&&v&&i.enable(),i.currentBreakpoint=o,i.emit("_beforeBreakpoint",a),t&&(b?(i.loopDestroy(),i.loopCreate(e),i.updateSlides()):!m&&g?(i.loopCreate(e),i.updateSlides()):m&&!g&&i.loopDestroy()),i.emit("breakpoint",a)}function pD(i,e,t){if(e===void 0&&(e="window"),!i||e==="container"&&!t)return;let n=!1;const r=Fe(),s=e==="window"?r.innerHeight:t.clientHeight,o=Object.keys(i).map(l=>{if(typeof l=="string"&&l.indexOf("@")===0){const a=parseFloat(l.substr(1));return{value:s*a,point:l}}return{value:l,point:l}});o.sort((l,a)=>parseInt(l.value,10)-parseInt(a.value,10));for(let l=0;l<o.length;l+=1){const{point:a,value:u}=o[l];e==="window"?r.matchMedia(`(min-width: ${u}px)`).matches&&(n=a):u<=t.clientWidth&&(n=a)}return n||"max"}var mD={setBreakpoint:fD,getBreakpoint:pD};function gD(i,e){const t=[];
vendor: 4,473 bytes, line 172
172return i.forEach(n=>{typeof n=="object"?Object.keys(n).forEach(r=>{n[r]&&t.push(e+r)}):typeof n=="string"&&t.push(e+n)}),t}function bD(){const i=this,{classNames:e,params:t,rtl:n,el:r,device:s}=i,o=gD(["initialized",t.direction,{"free-mode":i.params.freeMode&&t.freeMode.enabled},{autoheight:t.autoHeight},{rtl:n},{grid:t.grid&&t.grid.rows>1},{"grid-column":t.grid&&t.grid.rows>1&&t.grid.fill==="column"},{android:s.android},{ios:s.ios},{"css-mode":t.cssMode},{centered:t.cssMode&&t.centeredSlides},{"watch-progress":t.watchSlidesProgress}],t.containerModifierClass);e.push(...o),r.classList.add(...e),i.emitContainerClasses()}function yD(){const i=this,{el:e,classNames:t}=i;!e||typeof e=="string"||(e.classList.remove(...t),i.emitContainerClasses())}var vD={addClasses:bD,removeClasses:yD};function wD(){const i=this,{isLocked:e,params:t}=i,{slidesOffsetBefore:n}=t;if(n){const r=i.slides.length-1,s=i.slidesGrid[r]+i.slidesSizesGrid[r]+n*2;i.isLocked=i.size>s}else i.isLocked=i.snapGrid.length===1;t.allowSlideNext===!0&&(i.allowSlideNext=!i.isLocked),t.allowSlidePrev===!0&&(i.allowSlidePrev=!i.isLocked),e&&e!==i.isLocked&&(i.isEnd=!1),e!==i.isLocked&&i.emit(i.isLocked?"lock":"unlock")}var xD={checkOverflow:wD},W0={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function ED(i,e){return function(n){n===void 0&&(n={});const r=Object.keys(n)[0],s=n[r];if(typeof s!="object"||s===null){_t(e,n);return}if(i[r]===!0&&(i[r]={enabled:!0}),r==="navigation"&&i[r]&&i[r].enabled&&!i[r].prevEl&&!i[r].nextEl&&(i[r].auto=!0),["pagination","scrollbar"].indexOf(r)>=0&&i[r]&&i[r].enabled&&!i[r].el&&(i[r].auto=!0),!(r in i&&"enabled"in s)){_t(e,n);return}typeof i[r]=="object"&&!("enabled"in i[r])&&(i[r].enabled=!0),i[r]||(i[r]={enabled:!1}),_t(e,n)}}const hd={eventsEmitter:v3,update:M3,translate:N3,transition:V3,slide:K3,loop:Q3,grabCursor:tD,events:hD,breakpoints:mD,checkOverflow:xD,classes:vD},fd={};class at{constructor(){let e,t;for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];r.length===1&&r[0].constructor&&Object.prototype.toString.call(r[0]).slice(8,-1)==="Object"?t=r[0]:[e,t]=r,t||(t={}),t=_t({},t),e&&!t.el&&(t.el=e);const o=it();if(t.el&&typeof t.el=="string"&&o.querySelectorAll(t.el).length>1){const c=[];return o.querySelectorAll(t.el).forEach(h=>{const d=_t({},t,{el:h});c.push(new at(d))}),c}const l=this;l.__swiper__=!0,l.support=Rx(),l.device=Nx({userAgent:t.userAgent}),l.browser=g3(),l.eventsListeners={},l.eventsAnyListeners=[],l.modules=[...l.__modules__],t.modules&&Array.isArray(t.modules)&&l.modules.push(...t.modules);const a={};
vendor: 4,865 bytes, line 172
172l.modules.forEach(c=>{c({params:t,swiper:l,extendParams:ED(t,a),on:l.on.bind(l),once:l.once.bind(l),off:l.off.bind(l),emit:l.emit.bind(l)})});const u=_t({},W0,a);return l.params=_t({},u,fd,t),l.originalParams=_t({},l.params),l.passedParams=_t({},t),l.params&&l.params.on&&Object.keys(l.params.on).forEach(c=>{l.on(c,l.params.on[c])}),l.params&&l.params.onAny&&l.onAny(l.params.onAny),Object.assign(l,{enabled:l.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return l.params.direction==="horizontal"},isVertical(){return l.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:l.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.emit("_swiper"),l.params.init&&l.init(),l}getDirectionLabel(e){return this.isHorizontal()?e:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[e]}getSlideIndex(e){const{slidesEl:t,params:n}=this,r=tt(t,`.${n.slideClass}, swiper-slide`),s=Mo(r[0]);return Mo(e)-s}getSlideIndexByData(e){return this.getSlideIndex(this.slides.filter(t=>t.getAttribute("data-swiper-slide-index")*1===e)[0])}recalcSlides(){const e=this,{slidesEl:t,params:n}=e;e.slides=tt(t,`.${n.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const n=this;e=Math.min(Math.max(e,0),1);const r=n.minTranslate(),o=(n.maxTranslate()-r)*e+r;n.translateTo(o,typeof t>"u"?0:t),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(n=>n.indexOf("swiper")===0||n.indexOf(e.params.containerModifierClass)===0);e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(n=>n.indexOf("swiper-slide")===0||n.indexOf(t.params.slideClass)===0).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach(n=>{const r=e.getSlideClasses(n);t.push({slideEl:n,classNames:r}),e.emit("_slideClass",n,r)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){e===void 0&&(e="current"),t===void 0&&(t=!1);const n=this,{params:r,slides:s,slidesGrid:o,slidesSizesGrid:l,size:a,activeIndex:u}=n;let c=1;if(typeof r.slidesPerView=="number")return r.slidesPerView;if(r.centeredSlides){let h=s[u]?Math.ceil(s[u].swiperSlideSize):0,d;for(let f=u+1;f<s.length;f+=1)s[f]&&!d&&(h+=Math.ceil(s[f].swiperSlideSize),c+=1,h>a&&(d=!0));for(let f=u-1;f>=0;f-=1)s[f]&&!d&&(h+=s[f].swiperSlideSize,c+=1,h>a&&(d=!0))}else if(e==="current")for(let h=u+1;h<s.length;h+=1)(t?o[h]+l[h]-o[u]<a:o[h]-o[u]<a)&&(c+=1);else for(let h=u-1;h>=0;h-=1)o[u]-o[h]<a&&(c+=1);return c}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:n}=e;n.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(o=>{o.complete&&ul(e,o)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses();function r(){const o=e.rtlTranslate?e.translate*-1:e.translate,l=Math.min(Math.max(o,e.maxTranslate()),e.minTranslate());e.setTranslate(l),e.updateActiveIndex(),e.updateSlidesClasses()}let s;if(n.freeMode&&n.freeMode.enabled&&!n.cssMode)r(),n.autoHeight&&e.updateAutoHeight();else{if((n.slidesPerView==="auto"||n.slidesPerView>1)&&e.isEnd&&!n.centeredSlides){const o=e.virtual&&n.virtual.enabled?e.virtual.slides:e.slides;s=e.slideTo(o.length-1,0,!1,!0)}else s=e.slideTo(e.activeIndex,0,!1,!0);s||r()}n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){t===void 0&&(t=!0);const n=this,r=n.params.direction;return e||(e=r==="horizontal"?"vertical":"horizontal"),e===r||e!=="horizontal"&&e!=="vertical"||(n.el.classList.remove(`${n.params.containerModifierClass}${r}`),n.el.classList.add(`${n.params.containerModifierClass}${e}`),n.emitContainerClasses(),n.params.direction=e,n.slides.forEac
172h(s=>{e==="vertical"?s.style.width="":s.style.height=""}),n.emit("changeDirection"),t&&n.update()),n}changeLanguageDirection(e){const t=this;t.rtl&&e==="rtl"||!t.rtl&&e==="ltr"||(t.rtl=e==="rtl",t.rtlTranslate=t.params.direction==="horizontal"&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let n=e||t.params.el;if(typeof n=="string"&&(n=document.querySelector(n)),!n)return!1;n.swiper=t,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const r=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let o=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(r()):tt(n,r())[0];return!o&&t.params.createElements&&(o=Pt("div",t.params.wrapperClass),n.append(o),tt(n,`.${t.params.slideClass}`).forEach(l=>{o.append(l)})),Object.assign(t,{el:n,wrapperEl:o,slidesEl:t.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:o,hostEl:t.isElement?n.parentNode.host:n,mounted:!0,rtl:n.dir.toLowerCase()==="rtl"||bi(n,"direction")==="rtl",rtlTranslate:t.params.direction==="horizontal"&&(n.dir.toLowerCase()==="rtl"||bi(n,"direction")==="rtl"),wrongRTL:bi(o,"display")==="-webkit-box"}),!0}init(e){const t=this;if(t.initialized||t.mount(e)===!1)return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(),t.attachEvents();const r=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&r.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),r.forEach(s=>{s.complete?ul(t,s):s.addEventListener("load",o=>{ul(t,o.target)})}),Gh(t),t.initialized=!0,Gh(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){e===void 0&&(e=!0),t===void 0&&(t=!0);const n=this,{params:r,el:s,wrapperEl:o,slides:l}=n;return typeof n.params>"u"||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),r.loop&&n.loopDestroy(),t&&(n.removeClasses(),s&&typeof s!="string"&&s.removeAttribute("style"),o&&o.removeAttribute("style"),l&&l.length&&l.forEach(a=>{a.classList.remove(r.slideVisibleClass,r.slideFullyVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass),a.removeAttribute("style"),a.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(a=>{n.off(a)}),e!==!1&&(n.el&&typeof n.el!="string"&&(n.el.swiper=null),l3(n)),n.destroyed=!0),null}static extendDefaults(e){_t(fd,e)}static get extendedDefaults(){return fd}static get defaults(){return W0}static installModule(e){at.prototype.__modules__||(at.prototype.__modules__=[]);const t=at.prototype.__modules__;typeof e=="function"&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach(t=>at.installModule(t)),at):(at.installModule(e),at)}}Object.keys(hd).forEach(i=>{Object.keys(hd[i]).forEach(e=>{at.prototype[e]=hd[i][e]})});at.use([b3,y3]);class zx extends U{connect(){this.swiper=new at(".animeslide",{autoplay:{delay:5e3},effect:"fade",slidesPerView:1,spaceBetween:10,pagination:{el:null}})}}$(zx,"targets",["slider"]);const TD=Object.freeze(Object.defineProperty({__proto__:null,default:zx},Symbol.toStringTag,{value:"Module"}));class Vx extends U{async connect(){const e={};if(this.codeMirrorConnection=e,this.destroyEditors(),!this.hasEditorLeftTarget||!this.hasEditorRightTarget)return;const t=this.editorLeftTarget,n=this.editorRightTarget;try{const[{EditorState:r},{EditorView:s,keymap:o,lineNumbers:l,highlightActiveLine:a},{yaml:u},{defaultKeymap:c}]=await Promise.all([Lt(()=>import("./index-Czn-tG1U.js"),[]),Lt(()=>import("./index-CSwQd_E2.js").then(h=>h.i),__vite__mapDeps([3,4])),Lt(()=>import("./index-C2Jg1E2O.js"),__vite__mapDeps([5,6,4,3,1,2,7,8])),Lt(()=>import("./index-DyKl4ymx.js"),__vite__mapDeps([9,4,3,6,1,2,7,8]))]);
172if(this.codeMirrorConnection!==e||!this.element.isConnected||!this.hasEditorLeftTarget||!this.hasEditorRightTarget||this.editorLeftTarget!==t||this.editorRightTarget!==n)return;this.initializeEditors({EditorState:r,EditorView:s,keymap:o,lineNumbers:l,highlightActiveLine:a,yaml:u,defaultKeymap:c})}catch(r){if(this.codeMirrorConnection!==e)return;this.destroyEditors(),console.warn("Unable to initialize schema panels",r)}}disconnect(){this.codeMirrorConnection=null,this.destroyEditors()}destroyEditors(){var e,t;(e=this.viewLeft)==null||e.destroy(),(t=this.viewRight)==null||t.destroy(),this.viewLeft=null,this.viewRight=null}initializeEditors({EditorState:e,EditorView:t,keymap:n,lineNumbers:r,highlightActiveLine:s,yaml:o,defaultKeymap:l}){const a=`full_name 173first_name 174last_name 175personal email address 176businss email address 177personal phone numbers 178business phone numbers 179gender 180linkedin url 181address 182city 183country 184job title 185job summary 186job title role 187job title level 188job company_name 189job company_website 190job description 191 |-- job company linkedin url 192 |-- education 193 | | |-- date 194 | | |-- degree 195 | | |-- major 196 | | |-- school 197 | | | |-- domain 198 | | | |-- lnkdedin url 199 | | | |-- name 200 | | |-- summary`,u=` |-- experience 201 | | |-- company 202 | | | |-- domain 203 | | | |-- lnkdedin url 204 | | | |-- name 205 | | |-- date1 206 | | |-- department 207 | | |-- description 208 | | |-- location 209 | | |-- seniority 210 | | |-- title 211 interests 212 skills 213 languages spoken 214 region 215 profile picture url 216 job company size 217 industry 218 job title detailed role 219 organization founded year 220 organization facebook url 221 organization twitter url 222 organization current technologies 223 state 224 person location postal code 225 organization hq location city 226 organization hq location state 227 organization hq location country 228 organization hq location postal code`,c=e.create({doc:a,extensions:[o(),r({value:d=>`${d+1}`}),s(),t.editable.of(!1),n.of(l)]}),h=e.create({doc:u,extensions:[o(),r({formatNumber:function(d,f){return`${d+29}`}}),s(),t.editable.of(!1),n.of(l)]});this.viewLeft=new t({state:c,parent:this.editorLeftTarget}),this.viewRight=new t({state:h,parent:this.editorRightTarget})}}$(Vx,"targets",["editorLeft","editorRight"]);const SD=Object.freeze(Object.defineProperty({__proto__:null,default:Vx},Symbol.toStringTag,{value:"Module"}));function _r(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function CD(i,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(i,n.key,n)}}function vs(i,e,t){return e&&CD(i.prototype,e),i}function Ds(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function Hx(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),e&&Oo(i,e)}function Io(i){return Io=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(i)}function Oo(i,e){return Oo=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Oo(i,e)}function jx(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function cl(i,e,t){return jx()?cl=Reflect.construct:cl=function(r,s,o){var l=[null];l.push.apply(l,s);var a=Function.bind.apply(r,l),u=new a;return o&&Oo(u,o.prototype),u},cl.apply(null,arguments)}function kD(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function Kh(i){var e=typeof Map=="function"?new Map:void 0;return Kh=function(n){if(n===null||!kD(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,r)}function r(){return cl(n,arguments,Io(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Oo(r,n)},Kh(i)}function Pr(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function _D(i,e){return e&&(typeof e=="object"||typeof e=="function")?e:Pr(i)}function $x(i){var e=jx();return function(){var n=Io(i),r;if(e){var s=Io(this).constructor;r=Reflect.construct(n,arguments,s)}else r=n.apply(this,arguments);return _D(this,r)}}const qx={},Ux={debounceMs:175,focusOnError:!0,disableSubmitButtons:!1,containerSelector:"[data-field-container]",errorMessageClass:"error-message",errorMessagePosition:"end",containerErrorClass:"container-error",fieldErrorClass:"field-error"},Wx={},G0={badInput:"invalid",patternMismatch:"pattern",rangeOverflow:"max",rangeUnderflow:"min",stepMismatch:"step",tooLong:"maxLength",tooShort:"minLength",typeMismatch:"typeMismatch",valueMissing:"required"},Ec=(i={})=>{Object.assign(Ux,i)},Yh=(i,e)=>{qx[i]=e},AD=(i,e)=>{const t={};
228Object.keys(G0).forEach(n=>{const r=G0[n];t[n]=e[r]}),Wx[i]=t};let LD=function(){function i(e){_r(this,i),this.locals=Object.assign({},Wx),this.validators=Object.assign({},qx),this.configurations=Object.assign({},Ux),Object.keys(this.configurations).forEach(t=>{e.has(t)&&(this.configurations[t]=e.get(t)),this.configurations.debounceMs=parseInt(this.configurations.debounceMs),this.configurations.focusOnError=this.configurations.focusOnError===!0||this.configurations.focusOnError==="true"})}return vs(i,[{key:"currentLocal",get:function(){return this.locals.en}}]),i}();const MD={invalid:"is invalid",pattern:"value doesn't match %{pattern}",max:"value must be less than %{max}",min:"value must be greater than %{min}",step:"number is not divisible by %{step}",maxLength:"too long (maximum is %{maxLength} characters)",minLength:"too short (minimum is %{minLength} characters)",typeMismatch:"not a valid %{type}",required:"can't be blank"};AD("en",MD);let ID=function(){function i(e){_r(this,i),this.config=e}return vs(i,[{key:"displayError",value:function(t,n){this._insertErrorMessageElement(t),this.errorElement(t).textContent=n,this.container(t).classList.add(this.config.containerErrorClass),t.classList.add(this.config.fieldErrorClass),t.dataset.errorDisplayed=!0}},{key:"reset",value:function(t){this.container(t).classList.remove(this.config.containerErrorClass),t.classList.remove(this.config.fieldErrorClass);const n=this.errorElement(t);n&&n.remove()}},{key:"displaySuccess",value:function(t){this.reset(t)}},{key:"_insertErrorMessageElement",value:function(t){this.errorElement(t)||this.container(t).insertAdjacentHTML(this.errorMessagePosition,`<div class="${this.config.errorMessageClass}"></div>`)}},{key:"errorElement",value:function(t){return this.container(t).querySelector("."+this.config.errorMessageClass)}},{key:"container",value:function(t){const n=t.closest(this.config.containerSelector);if(!n)throw new Error(`We couldn't find the container for ${t} with selector ${this.config.containerErrorClass}`);return n}},{key:"errorMessagePosition",get:function(){switch(this.config.errorMessagePosition){case"end":return"beforeend";case"start":return"afterbegin";default:return"beforeend"}}}]),i}();const OD={badInput:"is invalid",patternMismatch:"patternMessage",rangeOverflow:"maxMessage",rangeUnderflow:"minMessage",stepMismatch:"stepMessage",tooLong:"maxLengthMessage",tooShort:"minLengthMessage",typeMismatch:"typeMessage",valueMissing:"requiredMessage"};let pr=function(i){Hx(t,i);var e=$x(t);function t(n){var r;return _r(this,t),r=e.call(this,n),r.name=r.constructor.name,r}return t}(Kh(Error)),DD=function(){function i(e,t){_r(this,i),this.el=e,this.errorType=this.errorType(),this.config=t}return vs(i,[{key:"message",value:function(){return new Promise(async(t,n)=>{if(!this.el.validity.valid){n(new pr(this.customMessage()||this.defaultMessage()));return}try{t(await this.customValidationMessage())}catch(s){if(typeof s=="string")n(new pr(s));else throw s}})}},{key:"customMessage",value:function(){const t=OD[this.errorType];return this.el.dataset[t]}},{key:"errorType",value:function(){const t=["badInput","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort","typeMismatch","valueMissing"];for(let n=0;n<t.length;n++)if(this.el.validity[t[n]])return t[n]}},{key:"customValidationMessage",value:function(){const t=this.el.dataset.validates;if(t)return Promise.all(t.split(/\s+/).map(n=>{const r=this.config.validators[n];if(!r)throw new Error(`Custom validation ${n} is not defined`);return r(this.el)}))}},{key:"defaultMessage",value:function(){const t=this.config.currentLocal[this.errorType];return t&&t.replace(/\%\{(.*)}/,(n,r)=>this.el[r])}}]),i}();const PD=["checkbox","color","date","datetime-local","email","file","month","number","password","radio","range","search","tel","text","time","url","week"];let js=function(){function i(e,t){_r(this,i),this.raw=e,this.config=t}return vs(i,[{key:"isInvalid",value:function(){return this.hasCacheErrorMessage()}},{key:"isValid",value:function(){return!this.isInvalid()}},{key:"validate",value:function(){return new Promise(async(t,n)=>{try{await this._errorMessage(),this.removeCachedErrorMessage(),t()}catch(r){if(r instanceof pr)this.cacheErrorMessage(r.message),n(r);else throw r}})}},{key:"cacheErrorMessage",value:function(t){this.raw.dataset.validationMessageCache=t}},{key:"removeCachedErrorMessage",value:function(){this.raw.removeAttribute("data-validation-message-cache")}},{key:"hasCacheErrorMessage",value:function(){return this.raw.hasAttribute("data-validation-message-cache")}},{key:"_errorMessage",value:function(){return new DD(this.raw,this.config).message()}},{key:"visited",set:function(e){this.raw.dataset.visited=e},get:function(){if(this.raw.dataset.visited)return!0;const e=this.raw.nodeName.toLowerCase();return e==="input"?!["text","email","password","search","tel","url"].includes(this.raw.type):e!=="textarea"}},{key:"willValidate",get:function(){if(this.raw.dataset.validationOn)return!0;
228if(this.raw.dataset.validationOff)return!1;const e=this.raw.nodeName.toLowerCase();return!!(e==="input"&&PD.includes(this.raw.type)||["select","textarea"].includes(e))}},{key:"cachedErrorMessage",get:function(){return this.raw.dataset.validationMessageCache}}]),i}(),RD=function(){function i(e,t){_r(this,i),this.raw=e,this.config=t}return vs(i,[{key:"isInvalid",value:function(){return this.elements.some(t=>t.isInvalid())}},{key:"isValid",value:function(){return!this.isInvalid()}},{key:"markAllAsVisited",value:function(){this.elements.forEach(t=>t.visited=!0)}},{key:"validate",value:function(){let t=!0;return new Promise((n,r)=>{const s=this.elements;s.length||n(),s.forEach(async(o,l)=>{try{await o.validate()}catch(a){if(a instanceof pr)t=!1;else throw a}l+1===s.length&&(t?n():r(new pr("form invalid")))})})}},{key:"elements",get:function(){return this._allElements.map(e=>new js(e,this.config)).filter(e=>e.willValidate)}},{key:"submitButtons",get:function(){return this._allElements.filter(e=>e.type==="submit")}},{key:"elementsWithError",get:function(){return this.elements.filter(e=>e.isInvalid())}},{key:"_allElements",get:function(){return Array.from(this.raw.elements)}}]),i}();const ND=(i,e)=>{let t,n;return r=>{if(clearTimeout(t),r.target!==n)return i(r);t=setTimeout(()=>{t=null,i(r)},e)}};let sa=function(i){Hx(t,i);var e=$x(t);function t(...n){var r;
228return _r(this,t),r=e.call(this,...n),Ds(Pr(r),"connect",()=>r._setup()),Ds(Pr(r),"disconnect",()=>r._removeEventListeners()),Ds(Pr(r),"recordVisit",s=>{const o=new js(s.target,r.config);o.willValidate&&(o.visited=!0,r._validate(s))}),Ds(Pr(r),"_preventInvalidSubmission",s=>{if(r._configurations.disableSubmitButtons){if(r._form.isValid())return;s.stopImmediatePropagation(),s.stopPropagation(),s.preventDefault(),r._displayFormErrors()}const{submitter:o}=s;if(o.hasAttribute("data-validation-submitter")){o.remove();return}s.stopPropagation(),s.stopImmediatePropagation(),s.preventDefault(),!r.validationInProgress&&(r.validationInProgress=!0,r._form.validate().then(()=>{r.validationInProgress=!1,r._submitWithCustomSubmitter(o)}).catch(l=>{if(l instanceof pr)r.validationInProgress=!1,r._displayFormErrors();else throw console.log(l),l}))}),Ds(Pr(r),"_validate",async s=>{s.preventDefault();let o;const{target:l}=s,a=new js(l,r.config),u=a.cachedErrorMessage;if(a.willValidate){try{await a.validate(),l.type==="radio"&&await r._form.validate().catch(()=>{})}catch(c){if(c instanceof pr)o=c.message;else throw c}r._toggleSubmitButtons(r._form.isValid()),r.display({target:l,errorMessage:o,previousMessage:u,visited:a.visited})}}),r}return vs(t,[{key:"display",value:function({target:r,errorMessage:s,previousMessage:o,visited:l}){s===o&&r.dataset.errorDisplayed||(s?l&&this._view.displayError(r,s):this._view.reset(r))}},{key:"_setup",value:function(){this.form.noValidate=!0,this.config=new LD(this.data),this._form=new RD(this.form,this.config),this._view=new ID(this._configurations),this.validate=ND(this._validate,this._configurations.debounceMs),this._configurations.disableSubmitButtons&&(this._setupMutiationObserver(),this.data.has("validated")||this._initialCheck()),this.form.addEventListener("submit",this._preventInvalidSubmission,!0),this.form.addEventListener("input",this.validate,!0),this.form.addEventListener("valueUpdated",this.validate,!0),this.form.addEventListener("blur",this.recordVisit,!0)}},{key:"_removeEventListeners",value:function(){this.mutationObserver&&this.mutationObserver.disconnect(),this.form.removeEventListener("submit",this._preventInvalidSubmission,!0),this.form.removeEventListener("valueUpdated",this.validate,!0),this.form.removeEventListener("input",this.validate,!0),this.form.removeEventListener("blur",this.recordVisit,!0)}},{key:"_setupMutiationObserver",value:function(){this.mutationObserver=new MutationObserver(r=>{const s=this._nodesNeedsValidation(r);s.length&&(this._toggleSubmitButtons(this._form.isValid()),s.forEach(o=>{o.validate().catch(()=>this._toggleSubmitButtons(!1))}))}),this.mutationObserver.observe(this.form,{childList:!0,subtree:!0})}},{key:"_nodesNeedsValidation",value:function(r){const s=[];return r.forEach(({addedNodes:o})=>{o&&o.forEach(l=>{if(["select","input","textarea"].includes(l.nodeName.toLowerCase())){const a=new js(l,this.config);a.willValidate&&s.push(a)}else l.querySelector&&l.querySelector("input, select")&&l.querySelectorAll("input, select","textarea").forEach(a=>{const u=new js(a,this.config);u.willValidate&&s.push(u)})})}),s}},{key:"_initialCheck",value:async function(){this._form.validate().then(()=>this._toggleSubmitButtons(!0)).catch(()=>this._toggleSubmitButtons(!1))}},{key:"_toggleSubmitButtons",value:function(r){this._configurations.disableSubmitButtons&&this._form.submitButtons.forEach(s=>{s.disabled=!r})}},{key:"_focusFirstElement",value:function(){if(!this._configurations.focusOnError)return;const r=this._form.elementsWithError[0];r&&r.raw.focus()}},{key:"_submitWithCustomSubmitter",value:function(r){const s=document.createElement("template");s.innerHTML=` 229 <input type="submit" 230 style="display: none;" 231 data-validation-submitter 232 name="${r.name}" 233 value="${r.value}" 234 /> 235 `,this._form.raw.appendChild(s.content),setTimeout(()=>{this._form.raw.querySelector("[data-validation-submitter]").click()})}},{key:"_displayFormErrors",value:function(){this._form.elements.forEach(r=>{r.isInvalid()&&(r.visited=!0,this.display({target:r.raw,errorMessage:r.cachedErrorMessage,visited:!0}))}),this._focusFirstElement()}},{key:"form",get:function(){return this.element.nodeName==="FORM"?this.element:this.element.querySelector("form")}},{key:"_configurations",get:function(){return this.config.configurations}}]),t}(U);
235Ec({focusOnError:!0});class Gx extends sa{initialize(){this.display=this.display.bind(this)}showLoading(){this.loaderTarget.classList.remove("hidden"),this.toggleSubmitButton(this.submitTarget)}hideLoading(){this.loaderTarget.classList.add("hidden"),this.toggleSubmitButton(this.submitTarget)}toggleSubmitButton(e){try{const t=e.innerHTML,n=e.getAttribute("data-turbo-submits-with");e.setAttribute("data-turbo-submits-with",t),e.innerHTML=n,e.disabled=!e.disabled}catch(t){console.error("Error in toggleSubmitButton method:",t)}}toggleProfileUrl(e){const t=e.target.value,n=this.profileUrlFieldTarget,r=this.profileUrlTarget;t==="data_removal_request"?(n.classList.remove("hidden"),r.setAttribute("required","required")):(n.classList.add("hidden"),r.removeAttribute("required"),r.value="")}display(e){const t=e.target.closest("[data-field-container]").querySelector(".container-error");if(t){e.errorMessage?(t.innerHTML=`${e.target.dataset.title} ${e.errorMessage}`,t.style.display="block"):(t.innerHTML="",t.style.display="none");const n=this;n._form.validate().then(function(){n.submitTarget.disabled=!1}).catch(function(r){n.submitTarget.disabled=!0})}}}$(Gx,"targets",["name","email","message","submit","loader","profileUrlField","profileUrl"]);const BD=Object.freeze(Object.defineProperty({__proto__:null,default:Gx},Symbol.toStringTag,{value:"Module"}));class Kx extends U{connect(){this.initCopyClipboardEvents=this.initCopyClipboardEvents.bind(this),this.showSuccess=this.showSuccess.bind(this),this.resetToDefault=this.resetToDefault.bind(this),this.initCopyClipboardEvents()}initCopyClipboard(){const e=this.buttonTarget,t=this.sourceTarget,n={contentType:"textContent",htmlEntities:!1,onCopy:()=>{}},r={id:this.element.dataset.id,override:!0};return new xp(e,t,n,r)}initTooltip(){const e=this.tooltipTarget,t=this.buttonTarget,n={placement:"top",triggerType:"hover",onHide:()=>{},onShow:()=>{},onToggle:()=>{}},r={id:this.element.dataset.tooltipId,override:!0};return new gp(e,t,n,r)}initCopyClipboardEvents(){this.clipboard=this.initCopyClipboard(),this.tooltip=this.initTooltip(),this.clipboard.updateOnCopyCallback(()=>{this.showSuccess(),setTimeout(()=>{this.resetToDefault()},2e3)})}showSuccess(){this.defaultIconTarget.classList.add("hidden"),this.successIconTarget.classList.remove("hidden"),this.defaultTooltipMessageTarget.classList.add("hidden"),this.successTooltipMessageTarget.classList.remove("hidden"),this.tooltip.show()}resetToDefault(){this.defaultIconTarget.classList.remove("hidden"),this.successIconTarget.classList.add("hidden"),this.defaultTooltipMessageTarget.classList.remove("hidden"),this.successTooltipMessageTarget.classList.add("hidden"),this.tooltip.hide()}}$(Kx,"targets",["defaultIcon","successIcon","defaultTooltipMessage","successTooltipMessage","source","button","tooltip"]);const FD=Object.freeze(Object.defineProperty({__proto__:null,default:Kx},Symbol.toStringTag,{value:"Module"}));var Xh={exports:{}};/** 236 * @name creditcard.js 3.0.32 237 * @license MIT 238 * @author ContaAzul (contaazul.com) 239 */(function(i,e){(function(t,n){n(e)})(ee,function(t){var n=[{name:"Banescard",bins:/^(603182)[0-9]{10,12}/,codeLength:3},{name:"Maxxvan",bins:/^(603182)[0-9]{10,12}/,codeLength:3},{name:"Cabal",bins:/^(604324|604330|604337|604203|604338)[0-9]{10,12}/,codeLength:3},{name:"GoodCard",bins:/^(606387|605680|605674|603574)[0-9]{10,12}/,codeLength:3},{name:"Elo",bins:/^(401178|401179|431274|438935|451416|457393|457631|457632|504175|627780|636297|636368|(506699|5067[0-6]\d|50677[0-8])|(50900\d|5090[1-9]\d|509[1-9]\d{2})|65003[1-3]|(65003[5-9]|65004\d|65005[0-1])|(65040[5-9]|6504[1-3]\d)|(65048[5-9]|65049\d|6505[0-2]\d|65053[0-8])|(65054[1-9]|6505[5-8]\d|65059[0-8])|(65070\d|65071[0-8])|65072[0-7]|(6509[0-9])|(65165[2-9]|6516[6-7]\d)|(65500\d|65501\d)|(65502[1-9]|6550[3-4]\d|65505[0-8]))[0-9]{10,12}/,codeLength:3},{name:"Diners",bins:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,codeLength:3},{name:"Discover",bins:/^6(?:011|5[0-9]{2}|4[4-9][0-9]{1}|(22(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[01][0-9]|92[0-5]$)[0-9]{10}$))[0-9]{12}$/,codeLength:4},{name:"Amex",bins:/^3[47][0-9]{13}$/,codeLength:4},{name:"Aura",bins:/^50[0-9]{14,17}$/,codeLength:3},{name:"Mastercard",bins:/^(603136|603689|608619|606200|603326|605919|608783|607998|603690|604891|603600|603134|608718|603680|608710|604998)|(5[1-5][0-9]{14}|2221[0-9]{12}|222[2-9][0-9]{12}|22[3-9][0-9]{13}|2[3-6][0-9]{14}
239|27[01][0-9]{13}|2720[0-9]{12})$/,codeLength:3},{name:"Visa",bins:/^4[0-9]{12}(?:[0-9]{3})?$/,codeLength:3},{name:"Hipercard",bins:/^(38[0-9]{17}|60[0-9]{14})$/,codeLength:3},{name:"JCB",bins:/^(?:2131|1800|35\d{3})\d{11}$/,codeLength:3}],r=1e3,s=3,o=function(D){return v(D).name||"Credit card is invalid!"},l=function(D,k){var A=g(D);return new RegExp("^[0-9]{".concat(A,"}$")).test(k)},a=function(D,k){return y(D)&&w(k)&&_(D,k)},u=function(D){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=k.cards,C=f(D);if(p(D)||!d(C))return!1;var T=M(C);return b(T)&&c(D,A)};function c(O,D){return!D||!D.length||h(O,D)}function h(O,D){return m(D)&&D.map(function(k){return k.toLowerCase()}).includes(o(O).toLowerCase())}function d(O){return O&&O.length<=19}function f(O){return O.replace(/\D/g,"")}function p(O){var D=new RegExp("[^0-9- ]");return D.test(O)}function b(O){return O>0&&O%10===0}function m(O){var D=n.map(function(k){return k.name.toLowerCase()});return O.every(function(k){return D.includes(k.toLowerCase())})}function v(O){if(!O)return{};var D=O.replace(/[^\d]/g,"");return n.find(function(k){return k.bins.test(D)&&k})||{}}function g(O){return v(O).codeLength||s}function y(O){return!isNaN(O)&&O>=1&&O<=12}function w(O){return!isNaN(O)&&S(E(O))}function E(O){return O.length===2?x(O):O.length===4?O:0}function x(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,D=parseInt(O),k=new Date;return Math.floor(k.getFullYear()/r)*r+D}function S(O){return O>=x()&&O<=x(r)}function _(O,D){var k=E(D),A=new Date,C=new Date;return A.setFullYear(A.getFullYear(),A.getMonth(),1),C.setFullYear(k,O-1,1),A<=C}function M(O){for(var D=[0,2,4,6,8,1,3,5,7,9],k=0,A=0,C=O.length,T=!0;C--;)A=Number(O[C]),k+=(T=!T)?D[A]:A;return k}t.getCreditCardNameByNumber=o,t.isExpirationDateValid=a,t.isSecurityCodeValid=l,t.isValid=u,Object.defineProperty(t,"__esModule",{value:!0})})})(Xh,Xh.exports);var pd=Xh.exports;function Ti(i){return typeof i=="string"||i instanceof String}function K0(i){var e;return typeof i=="object"&&i!=null&&(i==null||(e=i.constructor)==null?void 0:e.name)==="Object"}function Yx(i,e){return Array.isArray(e)?Yx(i,(t,n)=>e.includes(n)):Object.entries(i).reduce((t,n)=>{let[r,s]=n;return e(s,r)&&(t[r]=s),t},{})}const Z={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function zD(i){switch(i){case Z.LEFT:return Z.FORCE_LEFT;case Z.RIGHT:return Z.FORCE_RIGHT;default:return i}}function md(i){return i.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function au(i,e){if(e===i)return!0;const t=Array.isArray(e),n=Array.isArray(i);let r;if(t&&n){if(e.length!=i.length)return!1;for(r=0;r<e.length;r++)if(!au(e[r],i[r]))return!1;return!0}if(t!=n)return!1;if(e&&i&&typeof e=="object"&&typeof i=="object"){const s=e instanceof Date,o=i instanceof Date;if(s&&o)return e.getTime()==i.getTime();if(s!=o)return!1;const l=e instanceof RegExp,a=i instanceof RegExp;if(l&&a)return e.toString()==i.toString();if(l!=a)return!1;const u=Object.keys(e);for(r=0;r<u.length;r++)if(!Object.prototype.hasOwnProperty.call(i,u[r]))return!1;for(r=0;r<u.length;r++)if(!au(i[u[r]],e[u[r]]))return!1;return!0}else if(e&&i&&typeof e=="function"&&typeof i=="function")return e.toString()===i.toString();return!1}class VD{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Z.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?Z.RIGHT:Z.LEFT}}function ae(i,e){return new ae.InputMask(i,e)}function Xx(i){if(i==null)throw new Error("mask property should be defined");return i instanceof RegExp?ae.MaskedRegExp:Ti(i)?ae.MaskedPattern:i===Date?ae.MaskedDate:i===Number?ae.MaskedNumber:Array.isArray(i)||i===Array?ae.MaskedDynamic:ae.Masked&&i.prototype instanceof ae.Masked?i:ae.Masked&&i instanceof ae.Masked?i.constructor:i instanceof Function?ae.MaskedFunction:(console.warn("Mask not found for mask",i),ae.Masked)}
239function Do(i){if(!i)throw new Error("Options in not defined");if(ae.Masked){if(i.prototype instanceof ae.Masked)return{mask:i};const{mask:e=void 0,...t}=i instanceof ae.Masked?{mask:i}:K0(i)&&i.mask instanceof ae.Masked?i:{};if(e){const n=e.mask;return{...Yx(e,(r,s)=>!s.startsWith("_")),mask:e.constructor,_mask:n,...t}}}return K0(i)?{...i}:{mask:i}}function Qn(i){if(ae.Masked&&i instanceof ae.Masked)return i;const e=Do(i),t=Xx(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}ae.createMask=Qn;class Em{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}ae.MaskElement=Em;const Y0=90,HD=89;class Tc extends Em{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,n;return(e=(t=(n=this.input).getRootNode)==null?void 0:t.call(n))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Y0&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===HD&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Y0&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}ae.HTMLMaskElement=Tc;class jD extends Tc{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}ae.HTMLMaskElement=Tc;class Jx extends Tc{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return r==null||n==null||n<r?n:r}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,r=t&&t.focusOffset;return r==null||n==null||n>r?n:r}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const n=this.rootElement.createRange();n.setStart(this.input.firstChild||this.input,e),n.setEnd(this.input.lastChild||this.input,t);const r=this.rootElement,s=r.getSelection&&r.getSelection();s&&(s.removeAllRanges(),s.addRange(n))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}ae.HTMLContenteditableMaskElement=Jx;class Sc{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Sc.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Sc.MAX_LENGTH=100;class $D{constructor(e,t){this.el=e instanceof Em?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Jx(e):new jD(e),this.masked=Qn(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Sc,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateV
239alue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof ae.Masked)&&this.masked.constructor===Xx(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof ae.Masked?e:Qn({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const n=this._listeners[e];n&&n.forEach(r=>r(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,n=this.masked.value,r=this.masked.rawInputValue,s=this.displayValue,o=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==r;this._unmaskedValue=t,this._value=n,this._rawInputValue=r,this.el.value!==s&&(this.el.value=s),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),o&&this._fireChangeEvents(),!this._historyChanging&&(o||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...n}=e,r=!this.maskEquals(t),s=this.masked.optionsIsChanged(n);r&&(this.mask=t),s&&this.masked.updateOptions(n),(r||s)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Z.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const n=this._listeners[e].indexOf(t);return n>=0&&this._listeners[e].splice(n,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new VD({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,r=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,s=n===this.masked.rawInputValue?t.removeDirection:Z.NONE;let o=this.masked.nearestInputPos(t.startChangePos+r,s);s!==Z.NONE&&(o=this.masked.nearestInputPos(o,Z.NONE)),this.updateControl(o),delete this._inputEvent}
239_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}ae.InputMask=$D;class de{static normalize(e){return Array.isArray(e)?e:[e,new de]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}ae.ChangeDetails=de;class wn{constructor(e,t,n){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class ut{constructor(e){this._value="",this._update({...ut.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new wn(this.extractInput(e,t),e)}appendTail(e){return Ti(e)&&(e=new wn(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new de({inserted:e,rawInserted:e})):new de}_appendChar(e,t,n){t===void 0&&(t={});const r=this.state;let s;if([e,s]=this.doPrepareChar(e,t),e&&(s=s.aggregate(this._appendCharRaw(e,t)),!s.rawInserted&&this.autofix==="pad")){const o=this.state;this.state=r;let l=this.pad(t);const a=this._appendCharRaw(e,t);l=l.aggregate(a),a.rawInserted||l.equals(s)?s=l:this.state=o}if(s.inserted){let o,l=this.doValidate(t)!==!1;if(l&&n!=null){const a=this.state;if(this.overwrite===!0){o=n.state;for(let c=0;c<s.rawInserted.length;++c)n.unshift(this.displayValue.length-s.tailShift)}let u=this.appendTail(n);if(l=u.rawInserted.length===n.toString().length,!(l&&u.inserted)&&this.overwrite==="shift"){this.state=a,o=n.state;for(let c=0;c<s.rawInserted.length;++c)n.shift();u=this.appendTail(n),l=u.rawInserted.length===n.toString().length}l&&u.inserted&&(this.state=a)}l||(s=new de,this.state=r,n&&o&&(n.state=o))}return s}_appendPlaceholder(){return new de}_appendEager(){return new de}append(e,t,n){if(!Ti(e))throw new Error("value should be string");const r=Ti(n)?new wn(String(n)):n;t!=null&&t.tail&&(t._beforeTailState=this.state);let s;[e,s]=this.doPrepare(e,t);for(let o=0;o<e.length;++o){const l=this._appendChar(e[o],t,r);if(!l.rawInserted&&!this.doSkipInvalid(e[o],t,r))break;s.aggregate(l)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&s.aggregate(this._appendEager()),r!=null&&(s.tailShift+=this.appendTail(r).tailShift),s}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new de}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,n=this.value,r=e();return this.rawInputValue=t,this.value&&this.value!==n&&n.indexOf(this.value)===0&&(this.append(n.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,n=e(this);return this.state=t,delete this._isolated,n}doSkipInvalid(e,t,n){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),de.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),de.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}
239splice(e,t,n,r,s){n===void 0&&(n=""),r===void 0&&(r=Z.NONE),s===void 0&&(s={input:!0});const o=e+t,l=this.extractTail(o),a=this.eager===!0||this.eager==="remove";let u;a&&(r=zD(r),u=this.extractInput(0,o,{raw:!0}));let c=e;const h=new de;if(r!==Z.NONE&&(c=this.nearestInputPos(e,t>1&&e!==0&&!a?Z.NONE:r),h.tailShift=c-e),h.aggregate(this.remove(c)),a&&r!==Z.NONE&&u===this.rawInputValue)if(r===Z.FORCE_LEFT){let d;for(;u===this.rawInputValue&&(d=this.displayValue.length);)h.aggregate(new de({tailShift:-1})).aggregate(this.remove(d-1))}else r===Z.FORCE_RIGHT&&l.unshift();return h.aggregate(this.append(n,s,l))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!au(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||ut.EMPTY_VALUES.includes(e)&&ut.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new de}}ut.DEFAULTS={skipInvalid:!0};ut.EMPTY_VALUES=[void 0,null,""];ae.Masked=ut;class Xi{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Ti(e)?new wn(String(e)):e;const t=this.chunks[this.chunks.length-1],n=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof wn)n?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof Xi){if(e.stop==null){let r;for(;e.chunks.length&&e.chunks[0].stop==null;)r=e.chunks.shift(),r.from+=e.from,this.extend(r)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof ae.MaskedPattern))return new wn(this.toString()).appendTo(e);const t=new de;for(let n=0;n<this.chunks.length;++n){const r=this.chunks[n],s=e._mapPosToBlock(e.displayValue.length),o=r.stop;let l;if(o!=null&&(!s||s.index<=o)&&((r instanceof Xi||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),l=r instanceof Xi&&e._blocks[o]),l){const a=l.appendTail(r);t.aggregate(a);const u=r.toString().slice(a.rawInserted.length);u&&t.aggregate(e.append(u,{tail:!0}))}else t.aggregate(e.append(r.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...n}=e;Object.assign(this,n),this.chunks=t.map(r=>{const s="chunks"in r?new Xi:new wn;return s.state=r,s})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let n=0;for(;n<this.chunks.length;){const r=this.chunks[n],s=r.unshift(t);if(r.toString()){if(!s)break;++n}else this.chunks.splice(n,1);if(s)return s}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],n=t.shift();if(t.toString()){if(!n)break;--e}else this.chunks.splice(e,1);if(n)return n}return""}}class qD{constructor(e,t){this.masked=e,this._log=[];const{offset:n,index:r}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=n,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Z.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Z.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Z.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,Z.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Z.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Z.NONE),!0})}}class Qx{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new de}nearestInputPos(e,t){t===void 0&&(t=Z.NONE);const n=0,r=this._value.length;switch(t){case Z.LEFT:case Z.FORCE_LEFT:return n;case Z.NONE:case Z.RIGHT:case Z.FORCE_RIGHT:default:return r}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),n===void 0&&(n={}),n.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new de;const n=this.eager===!0||this.eager==="append",s=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&
239!t.tail,o=new de({inserted:this.char,rawInserted:s?this.char:""});return this._value=this.char,this._isRawInput=s&&(t.raw||t.input),o}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new de;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new wn("")}appendTail(e){return Ti(e)&&(e=new wn(String(e))),e.appendTo(this)}append(e,t,n){const r=this._appendChar(e[0],t);return n!=null&&(r.tailShift+=this.appendTail(n).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class lu{constructor(e){const{parent:t,isOptional:n,placeholderChar:r,displayChar:s,lazy:o,eager:l,...a}=e;this.masked=Qn(a),Object.assign(this,{parent:t,isOptional:n,placeholderChar:r,displayChar:s,lazy:o,eager:l})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new de}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new de;const n=this.masked.state;let r=this.masked._appendChar(e,this.currentMaskFlags(t));return r.inserted&&this.doValidate(t)===!1&&(r=new de,this.masked.state=n),!r.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=!!r.inserted,r}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new de:(this.isFilled=!0,new de({inserted:this.placeholderChar}))}_appendEager(){return new de}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,n)}nearestInputPos(e,t){t===void 0&&(t=Z.NONE);const n=0,r=this.value.length,s=Math.min(Math.max(e,n),r);switch(t){case Z.LEFT:case Z.FORCE_LEFT:return this.isComplete?s:n;case Z.RIGHT:case Z.FORCE_RIGHT:return this.isComplete?s:r;case Z.NONE:default:return s}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new de}}lu.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u
2390EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class UD extends ut{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=n=>n.search(t)>=0),super._update(e)}}ae.MaskedRegExp=UD;class ct extends ut{constructor(e){super({...ct.DEFAULTS,...e,definitions:Object.assign({},lu.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let n=!1,r=!1;for(let s=0;s<t.length;++s){if(this.blocks){const u=t.slice(s),c=Object.keys(this.blocks).filter(d=>u.indexOf(d)===0);c.sort((d,f)=>f.length-d.length);const h=c[0];if(h){const{expose:d,repeat:f,...p}=Do(this.blocks[h]),b={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...p,repeat:f,parent:this},m=f!=null?new ae.RepeatBlock(b):Qn(b);m&&(this._blocks.push(m),d&&(this.exposeBlock=m),this._maskedBlocks[h]||(this._maskedBlocks[h]=[]),this._maskedBlocks[h].push(this._blocks.length-1)),s+=h.length-1;continue}}let o=t[s],l=o in e;if(o===ct.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){n=!n;continue}if(o==="["||o==="]"){r=!r;continue}if(o===ct.ESCAPE_CHAR){if(++s,o=t[s],!o)break;l=!1}const a=l?new lu({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Do(e[o]),parent:this}):new Qx({char:o,eager:this.eager,isUnmasking:n});this._blocks.push(a)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...n}=e;this._blocks.forEach((r,s)=>r.state=t[s]),super.state=n}
239reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new de;let n=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(n==null)return t;this._blocks[n].isFilled&&++n;for(let r=n;r<this._blocks.length;++r){const s=this._blocks[r]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const n=this._mapPosToBlock(this.displayValue.length),r=new de;if(!n)return r;for(let o=n.index,l;l=this._blocks[o];++o){var s;const a=l._appendChar(e,{...t,_beforeTailState:(s=t._beforeTailState)==null||(s=s._blocks)==null?void 0:s[o]});if(r.aggregate(a),a.consumed)break}return r}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const n=new Xi;return e===t||this._forEachBlocksInRange(e,t,(r,s,o,l)=>{const a=r.extractTail(o,l);a.stop=this._findStopBefore(s),a.from=this._blockStartPos(s),a instanceof Xi&&(a.blockIndex=s),n.extend(a)}),n}extractInput(e,t,n){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),n===void 0&&(n={}),e===t)return"";let r="";return this._forEachBlocksInRange(e,t,(s,o,l,a)=>{r+=s.extractInput(l,a,n)}),r}_findStopBefore(e){let t;for(let n=0;n<this._stops.length;++n){const r=this._stops[n];if(r<=e)t=r;else break}return t}_appendPlaceholder(e){const t=new de;if(this.lazy&&e==null)return t;const n=this._mapPosToBlock(this.displayValue.length);if(!n)return t;const r=n.index,s=e??this._blocks.length;return this._blocks.slice(r,s).forEach(o=>{if(!o.lazy||e!=null){var l;t.aggregate(o._appendPlaceholder((l=o._blocks)==null?void 0:l.length))}}),t}_mapPosToBlock(e){let t="";for(let n=0;n<this._blocks.length;++n){const r=this._blocks[n],s=t.length;if(t+=r.displayValue,e<=t.length)return{index:n,offset:e-s}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,n)=>t+=n.displayValue.length,0)}_forEachBlocksInRange(e,t,n){t===void 0&&(t=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const s=this._mapPosToBlock(t),o=s&&r.index===s.index,l=r.offset,a=s&&o?s.offset:this._blocks[r.index].displayValue.length;if(n(this._blocks[r.index],r.index,l,a),s&&!o){for(let u=r.index+1;u<s.index;++u)n(this._blocks[u],u,0,this._blocks[u].displayValue.length);n(this._blocks[s.index],s.index,0,s.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const n=super.remove(e,t);return this._forEachBlocksInRange(e,t,(r,s,o,l)=>{n.aggregate(r.remove(o,l))}),n}nearestInputPos(e,t){if(t===void 0&&(t=Z.NONE),!this._blocks.length)return 0;const n=new qD(this,e);if(t===Z.NONE)return n.pushRightBeforeInput()||(n.popState(),n.pushLeftBeforeInput())?n.pos:this.displayValue.length;if(t===Z.LEFT||t===Z.FORCE_LEFT){if(t===Z.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===Z.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e||(n.popState(),n.ok&&n.pos<=e))return n.pos;n.popState()}return n.ok?n.pos:t===Z.FORCE_LEFT?0:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:0)}return t===Z.RIGHT||t===Z.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===Z.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok||(n.popState(),n.ok)?n.pos:this.nearestInputPos(e,Z.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let n=0;
239return this._forEachBlocksInRange(e,t,(r,s,o,l)=>{n+=r.totalInputPositions(o,l)}),n}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(n=>this._blocks[n]):[]}pad(e){const t=new de;return this._forEachBlocksInRange(0,this.displayValue.length,n=>t.aggregate(n.pad(e))),t}}ct.DEFAULTS={...ut.DEFAULTS,lazy:!0,placeholderChar:"_"};ct.STOP_CHAR="`";ct.ESCAPE_CHAR="\\";ct.InputDefinition=lu;ct.FixedDefinition=Qx;ae.MaskedPattern=ct;class dl extends ct{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:n=this.from||0,maxLength:r=this.maxLength||0,autofix:s=this.autofix,...o}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,r),this.autofix=s;const l=String(this.from).padStart(this.maxLength,"0"),a=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<a.length&&a[u]===l[u];)++u;o.mask=a.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",n="";const[,r,s]=e.match(/^(\D*)(\d*)(\D*)/)||[];return s&&(t="0".repeat(r.length)+s,n="9".repeat(r.length)+s),t=t.padEnd(this.maxLength,"0"),n=n.padEnd(this.maxLength,"9"),[t,n]}doPrepareChar(e,t){t===void 0&&(t={});let n;return[e,n]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(n.skip=!this.isComplete),[e,n]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const n=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[s,o]=this.boundaries(this.value+e);return Number(o)<this.from?super._appendCharRaw(n[this.value.length],t):Number(s)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(n[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(r[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[r,s]=this.boundaries(t);return this.from<=Number(s)&&Number(r)<=this.to&&super.doValidate(e)}pad(e){const t=new de;if(this.value.length===this.maxLength)return t;const n=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let s=0;s<r;++s)t.aggregate(super._appendCharRaw("0",e));n.split("").forEach(s=>this._appendCharRaw(s))}return t}}ae.MaskedRange=dl;const WD="d{.}`m{.}`Y";class zn extends ct{static extractPatternOptions(e){const{mask:t,pattern:n,...r}=e;return{...r,mask:Ti(t)?t:n}}constructor(e){super(zn.extractPatternOptions({...zn.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:n,blocks:r,...s}={...zn.DEFAULTS,...e},o=Object.assign({},zn.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,r),super._update({...s,mask:Ti(t)?t:n,blocks:o})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(zn.extractPatternOptions(e))}}zn.GET_DEFAULT_BLOCKS=()=>({d:{mask:dl,from:1,to:31,maxLength:2},m:{mask:dl,from:1,to:12,maxLength:2},Y:{mask:dl,from:1900,to:9999}});zn.DEFAULTS={...ct.DEFAULTS,mask:Date,pattern:WD,format:(i,e)=>{if(!i)return"";const t=String(i.getDate()).padStart(2,"0"),n=String(i.getMonth()+1).padStart(2,"0"),r=i.getFullYear();return[t,n,r].join(".")},parse:(i,e)=>{const[t,n,r]=i.split(".").map(Number);return new Date(r,n-1,t)}};ae.MaskedDate=zn;class Cc extends ut{constructor(e){super({...Cc.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:n,...r}=Do(t),s=Qn({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return n&&(this.exposeMask=s),s}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const n=this._applyDispatch(e,t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}
239_applyDispatch(e,t,n){e===void 0&&(e=""),t===void 0&&(t={}),n===void 0&&(n="");const r=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,s=this.rawInputValue,o=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:s,l=s.slice(o.length),a=this.currentMask,u=new de,c=a==null?void 0:a.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask!==a?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),u.tailShift=this.currentMask.value.length-r.length),l&&(u.tailShift+=this.currentMask.append(l,{raw:!0,tail:!0}).tailShift)):c&&(this.currentMask.state=c)),u}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new de;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,n;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((n=e._beforeTailState)==null?void 0:n.currentMask)||e._beforeTailState}}doDispatch(e,t,n){return t===void 0&&(t={}),n===void 0&&(n=""),this.dispatch(e,this,t,n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[n,r]=super.doPrepare(e,t);if(this.currentMask){let s;[n,s]=super.doPrepare(n,this.currentMaskFlags(t)),r=r.aggregate(s)}return[n,r]}doPrepareChar(e,t){t===void 0&&(t={});let[n,r]=super.doPrepareChar(e,t);if(this.currentMask){let s;[n,s]=super.doPrepareChar(n,this.currentMaskFlags(t)),r=r.aggregate(s)}return[n,r]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const n=new de;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:n,currentMask:r,...s}=e;t&&this.compiledMasks.forEach((o,l)=>o.state=t[l]),n!=null&&(this.currentMask=n,this.currentMask.state=r),super.state=s}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,n)=>{if(!e[n])return;const{mask:r,...s}=e[n];return au(t,s)&&t.maskEquals(r)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}Cc.DEFAULTS={...ut.DEFAULTS,dispatch:(i,e,t,n)=>{if(!e.compiledMasks.length)return;const r=e.rawInputValue,s=e.compiledMasks.map((o,l)=>{const a=e.currentMask===o,u=a?o.displayValue.length:o.nearestInputPos(o.displayValue.length,Z.FORCE_LEFT);return o.rawInputValue!==r?(o.reset(),o.append(r,{raw:!0})):a||o.remove(u),o.append(i,e.currentMaskFlags(t)),o.appendTail(n),{index:l,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(u,o.nearestInputPos(o.displayValue.length,Z.FORCE_LEFT)))}});return s.sort((o,l)=>l.weight-o.weight||l.totalInputPositions-o.totalInputPositions),e.compiledMasks[s[0].index]}};ae.MaskedDynamic=Cc;class kc extends ct{constructor(e){super({...kc.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...n}=e;if(t){const r=t.map(l=>l.length),s=Math.min(...r),o=Math.max(...r)-s;n.mask="*".repeat(s),o&&(n.mask+="["+"*".repeat(o)+"]"),this.enum=t}super._update(n)}_appendCharRaw(e,t){t===void 0&&(t={});const n=Math.min(this.nearestInputPos(0,Z.FORCE_RIGHT),this.value.length),r=this.enum.filter(s=>this.matchValue(s,this.unmaskedValue+e,n));
239if(r.length){r.length===1&&this._forEachBlocksInRange(0,this.value.length,(o,l)=>{const a=r[0][l];l>=this.value.length||a===o.value||(o.reset(),o._appendChar(a,t))});const s=super._appendCharRaw(r[0][this.value.length],t);return r.length===1&&r[0].slice(this.unmaskedValue.length).split("").forEach(o=>s.aggregate(super._appendCharRaw(o))),s}return new de({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new wn("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new de;const n=Math.min(super.nearestInputPos(0,Z.FORCE_RIGHT),this.value.length);let r;for(r=e;r>=0&&!(this.enum.filter(l=>this.matchValue(l,this.value.slice(n,r),n)).length>1);--r);const s=super.remove(r,t);return s.tailShift+=r-e,s}get isComplete(){return this.enum.indexOf(this.value)>=0}}kc.DEFAULTS={...ct.DEFAULTS,matchValue:(i,e,t)=>i.indexOf(e,t)===t};ae.MaskedEnum=kc;class GD extends ut{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}ae.MaskedFunction=GD;var Zx;class At extends ut{constructor(e){super({...At.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",n=(this.scale?"("+md(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+n),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(md).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(md(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[n,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(r.skip=!0),n&&!this.allowPositive&&!this.value&&n!=="-"&&r.aggregate(this._appendChar("-")),[n,r]}_separatorsCount(e,t){t===void 0&&(t=!1);let n=0;for(let r=0;r<e;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++n,t&&(e+=this.thousandsSeparator.length));return n}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,n){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,n))}_appendCharRaw(e,t){t===void 0&&(t={});const n=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);const s=this._value;this._value+=e;const o=this.number;let l=!isNaN(o),a=!1;if(l){let d;this.min!=null&&this.min<0&&this.number<this.min&&(d=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(d=this.max),d!=null&&(this.autofix?(this._value=this.format(d,this).replace(At.UNMASKED_RADIX,this.radix),a||(a=s===this._value&&!t.tail)):l=!1),l&&(l=!!this._value.match(this._numberRegExp))}let u;l?u=new de({inserted:this._value.slice(s.length),rawInserted:a?"":e,skip:a}):(this._value=s,u=new de),this._value=this._insertThousandsSeparators(this._value);const c=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,h=this._separatorsCountFromSlice(c);return u.tailShift+=(h-r)*this.thousandsSeparator.length,u}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,n=this.value.indexOf(this.thousandsSeparator,t);if(n<=e)return n}return-1}_adjustRangeWithSeparators(e,t){const n=this._findSeparatorAround(e);n>=0&&(e=n);const r=this._findSeparatorAround(t);return r>=0&&(t=r+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const n=this.value.slice(0,e),r=this.value.slice(t),s=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+r));const o=this._separatorsCountFromSlice(n);return new de({tailShift:(o-s)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case Z.NONE:case Z.LEFT:case Z.FORCE_LEFT:{const n=this._findSeparatorAround(e-1);if(n>=0){const r=n+this.thousandsSeparator.length;if(e<r||this.value.length<=r||t===Z.FORCE_LEFT)return n}break}case Z.RIGHT:case Z.FORCE_RIGHT:{const n=this._findSeparatorAround(e);if(n>=0)return n+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let n=this.value;this.normalizeZeros&&(n=this._normalizeZeros(n)),this.padFractionalZeros&&this.scale>0&&(n=this._padFractionalZeros(n)),this._value=n}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(n,r,s,o)=>r+o),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,n){t===void 0&&(t={});const r=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===At.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,n)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,At.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(At.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||At.EMPTY_VALUES.includes(e)&&At.EMPTY_VALUES.includes(this.typedValue))&&!(e
239===0&&this.value==="")}}Zx=At;At.UNMASKED_RADIX=".";At.EMPTY_VALUES=[...ut.EMPTY_VALUES,0];At.DEFAULTS={...ut.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Zx.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:i=>i.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};ae.MaskedNumber=At;const Jh={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function eE(i,e,t){e===void 0&&(e=Jh.MASKED),t===void 0&&(t=Jh.MASKED);const n=Qn(i);return r=>n.runIsolated(s=>(s[e]=r,s[t]))}function KD(i,e,t,n){return eE(e,t,n)(i)}ae.PIPE_TYPE=Jh;ae.createPipe=eE;ae.pipe=KD;class YD extends ct{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,n,r;const{repeat:s,...o}=Do(e);this._blockOpts=Object.assign({},this._blockOpts,o);const l=Qn(this._blockOpts);this.repeat=(t=(n=s??l.repeat)!=null?n:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((r=this._blocks)==null?void 0:r.length)||0,this.repeatFrom)),blocks:{m:l},eager:l.eager,overwrite:l.overwrite,skipInvalid:l.skipInvalid,lazy:l.lazy,placeholderChar:l.placeholderChar,displayChar:l.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(Qn(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const n=new de;for(let a=(r=(s=this._mapPosToBlock(this.displayValue.length))==null?void 0:s.index)!=null?r:Math.max(this._blocks.length-1,0),u,c;u=(o=this._blocks[a])!=null?o:c=!c&&this._allocateBlock(a);++a){var r,s,o,l;const h=u._appendChar(e,{...t,_beforeTailState:(l=t._beforeTailState)==null||(l=l._blocks)==null?void 0:l[a]});if(h.skip&&c){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(n.aggregate(h),h.consumed)break}return n}_trimEmptyTail(e,t){var n,r;e===void 0&&(e=0);const s=Math.max(((n=this._mapPosToBlock(e))==null?void 0:n.index)||0,this.repeatFrom,0);let o;t!=null&&(o=(r=this._mapPosToBlock(t))==null?void 0:r.index),o==null&&(o=this._blocks.length-1);let l=0;for(let a=o;s<=a&&!this._blocks[a].unmaskedValue;--a,++l);l&&(this._blocks.splice(o-l+1,l),this.mask=this.mask.slice(l))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const n=super.remove(e,t);return this._trimEmptyTail(e,t),n}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}ae.RepeatBlock=YD;try{globalThis.IMask=ae}catch{}Ec({focusOnError:!0});class tE extends sa{initialize(){this.creditCard=this.creditCard.bind(this),this.expiryCard=this.expiryCard.bind(this),Yh("creditCard",this.creditCard),Yh("expiryCard",this.expiryCard),ae(this.monthTarget,{mask:"00",max:12,min:1}),ae(this.yearTarget,{mask:"0000",min:new Date().getFullYear()}),ae(this.inputTarget,{mask:"0000 0000 0000 0000"})}creditCard(e){const t=this,{value:n}=e;if(pd.isValid(n)){const r=pd.getCreditCardNameByNumber(n);return new Promise(async(s,o)=>{r=="Credit card is invalid!"?o(r):(t.typeTarget.innerHTML=`${r} Card`,t.nameTarget.value=r,s())})}else return new Promise(async(r,s)=>{s("Credit card number is in invalid format")})}expiryCard(e){const t=this.monthTarget.value,n=this.yearTarget.value;return pd.isExpirationDateValid(t,n)?new Promise(async(r,s)=>{r()}):new Promise(async(r,s)=>{s("Expiration date is in invalid")})}cancel(){this._removeEventListeners()}}$(tE,"targets",["input","name","type","month","year"]);const XD=Object.freeze(Object.defineProperty({__proto__:null,default:tE},Symbol.toStringTag,{value:"Module"}));class nE extends U{open(){if(this.opening)return;const e=window.$crisp;if(!e||typeof e.push!="function"){this.showStatus("Chat is unavailable right now. Please try again shortly.");return}this.opening=!0,this.showStatus("Opening chatâ¦"),this.timeout=window.setTimeout(()=>{this.opening=!1,this.showStatus("Chat is taking longer to load. Please try again shortly.")},8e3);try{e.push(["do","chat:open",[()=>{this.clearPending(),this.element.isConnected&&this.showStatus("")}]])}catch{this.clearPending(),this.showStatus("Chat is unavailable right now. Please try again shortly.")}}disconnect(){this.clearPending()}clearPending(){window.clearTimeout(this.timeout),this.opening=!1}showStatus(e){this.hasStatusTarget&&(this.statusTarget.textContent=e,this.statusTarget.classList.toggle("hidden",!e))}}$(nE,"targets",["status"]);const JD=Object.freeze(Object.defineProperty({__proto__:null,default:nE},Symbol.toStringTag,{value:"Module"}));var iE={exports:{}};(function(i,e){(function(n,r){i.exports=r()})(window,function(){return function(t){var n={};function r(s){if(n[s])return n[s].exports;var o=n[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=n,r.d=function(s,o,l){r.o(s,o)||Object.defineProperty(s,o,{enumerable:!0,get:l})},r.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},r.t=function(s,o){if(o&1&&(s=r(s)),o&8||o&4&&typeof s=="object"&&s&&s.__esModule)return s;var l=Object.create(null);if(r.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:s}
239),o&2&&typeof s!="string")for(var a in s)r.d(l,a,(function(u){return s[u]}).bind(null,a));return l},r.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return r.d(o,"a",o),o},r.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},r.p="",r(r.s=2)}([function(t,n){/*! 240 * object-extend 241 * A well-tested function to deep extend (or merge) JavaScript objects without further dependencies. 242 * 243 * http://github.com/bernhardw 244 * 245 * Copyright 2013, Bernhard Wanger <[email protected]> 246 * Released under the MIT license. 247 * 248 * Date: 2013-04-10 249 */t.exports=function r(s,o){return s==null||o==null||Object.keys(o).forEach(function(l){Object.prototype.toString.call(o[l])=="[object Object]"?Object.prototype.toString.call(s[l])!="[object Object]"?s[l]=o[l]:s[l]=r(s[l],o[l]):s[l]=o[l]}),s}},function(t,n){Array.prototype.each=function(r){for(var s=this.length,o=0;o<s;o++){var l=this[o];l&&r(l,o)}},NodeList.prototype.each=Array.prototype.each,NodeList.prototype.filter=Array.prototype.filter},function(t,n,r){r.r(n);var s=function(){this.trigger={once:!1,offset:{viewport:{x:0,y:0},element:{x:0,y:0}},toggle:{class:{in:"visible",out:"invisible"},callback:{in:null,visible:null,out:null}}},this.scroll={sustain:300,element:window,callback:function(){},start:function(){},stop:function(){},directionChange:function(){}}},o=r(0),l=r.n(o);r(1);function a(A,C){if(!(A instanceof C))throw new TypeError("Cannot call a class as a function")}function u(A,C){for(var T=0;T<C.length;T++){var L=C[T];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(A,L.key,L)}}function c(A,C,T){return C&&u(A.prototype,C),A}function h(A){return Number(A)===A&&A%1===0}function d(A){return Number(A)===A&&A%1!==0}var f=function(){function A(C,T){a(this,A),this.element=C,T=l()(new s().trigger,T),this.offset=T.offset,this.toggle=T.toggle,this.once=T.once,this.visible=null,this.active=!0}return c(A,[{key:"checkVisibility",value:function(T,L){if(!this.active)return this.visible;var I=T.offsetWidth||T.innerWidth||0,P=T.offsetHeight||T.innerHe
249ight||0,R={w:I,h:P},z=this.getBounds(),N=this._checkVisibility(z,R,L);if(N!==this.visible){this.visible=N;var B=this._toggleCallback();B instanceof Promise?B.then(this._toggleClass.bind(this)).catch(function(j){console.error("Trigger promise failed"),console.error(j)}):this._toggleClass(),this.visible&&this.once&&(this.active=!1)}else if(N&&typeof this.toggle.callback.visible=="function")return this.toggle.callback.visible.call(this.element,this);return N}},{key:"getBounds",value:function(){return this.element.getBoundingClientRect()}},{key:"_getElementOffset",value:function(T,L){var I={x:0,y:0};return typeof this.offset.element.x=="function"?I.x=T.width*this.offset.element.x(this,T,L):d(this.offset.element.x)?I.x=T.width*this.offset.element.x:h(this.offset.element.x)&&(I.x=this.offset.element.x),typeof this.offset.element.y=="function"?I.y=T.height*this.offset.element.y(this,T,L):d(this.offset.element.y)?I.y=T.height*this.offset.element.y:h(this.offset.element.y)&&(I.y=this.offset.element.y),I}},{key:"_getViewportOffset",value:function(T,L){var I={x:0,y:0};return typeof this.offset.viewport.x=="function"?I.x=T.w*this.offset.viewport.x(this,T,L):d(this.offset.viewport.x)?I.x=T.w*this.offset.viewport.x:h(this.offset.viewport.x)&&(I.x=this.offset.viewport.x),typeof this.offset.viewport.y=="function"?I.y=T.h*this.offset.viewport.y(this,T,L):d(this.offset.viewport.y)?I.y=T.h*this.offset.viewport.y:h(this.offset.viewport.y)&&(I.y=this.offset.viewport.y),I}},{key:"_checkVisibility",value:function(T,L,I){var P=this._getElementOffset(T,I),R=this._getViewportOffset(L,I),z=!0;return T.left-R.x<-(T.width-P.x)&&(z=!1),T.left+R.x>L.w-P.x&&(z=!1),T.top-R.y<-(T.height-P.y)&&(z=!1),T.top+R.y>L.h-P.y&&(z=!1),z}},{key:"_toggleClass",value:function(){var T=this;if(this.visible){Array.isArray(this.toggle.class.in)?this.toggle.class.in.each(function(L){T.element.classList.add(L)}):this.element.classList.add(this.toggle.class.in),Array.isArray(this.toggle.class.out)?this.toggle.class.out.each(function(L){T.element.classList.remove(L)}):this.element.classList.remove(this.toggle.class.out);return}Array.isArray(this.toggle.class.in)?this.toggle.class.in.each(function(L){T.element.classList.remove(L)}):this.element.classList.remove(this.toggle.class.in),Array.isArray(this.toggle.class.out)?this.toggle.class.out.each(function(L){T.element.classList.add(L)}):this.element.classList.add(this.toggle.class.out)}},{key:"_toggleCallback",value:function(){if(this.visible){if(typeof this.toggle.callback.in=="function")return this.toggle.callback.in.call(this.element,this)}else if(typeof this.toggle.callback.out=="function")return this.toggle.callback.out.call(this.element,this)}}]),A}();function p(A,C){if(!(A instanceof C))throw new TypeError("Cannot call a class as a function")}function b(A,C){for(var T=0;T<C.length;T++){var L=C[T];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(A,L.key,L)}}function m(A,C,T){return C&&b(A.prototype,C),A}var v=function(){function A(C){p(this,A),this.triggers=C instanceof Array?C:[]}return m(A,[{key:"add",value:function(T){var L=this;if(T instanceof f)return this.triggers.push(T);T.each(function(I){I instanceof f?L.triggers.push(I):console.error("Object added to TriggerCollection is not a Trigger. Object: ",I)})}},{key:"remove",value:function(T){T instanceof f&&(T=[T]),this.triggers=this.triggers.filter(function(L){var I=!1;return T.each(function(P){P==L&&(I=!0)}),!I})}},{key:"query",value:function(T){return this.triggers.filter(function(L){var I=L.element,P=I.parentNode,R=[].slice.call(P.querySelectorAll(T));return R.indexOf(I)>-1})}},{key:"search",value:function(T){var L=this.triggers.filter(function(I){if(T instanceof NodeList||Array.isArray(T)){var P=!1;return T.each(function(R){I.element==R&&(P=!0)}),P}return I.element==T});return L.length==0?null:L.length>1?L:L[0]}},{key:"call",value:function(T){this.triggers.each(T)}}]),A}();function g(A,C){if(!(A instanceof C))throw new TypeError("Cannot call a class as a function")}function y(A,C){for(var T=0;T<C.length;T++){var L=C[T];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(A,L.key,L)}}function w(A,C,T){return C&&y(A.prototype,C),A}var E=function(){function A(C,T){g(this,A),this._parseOptions(C),typeof T=="function"&&(this.callback=T),this.direction="none",this.position=this.getPosition(),this.lastAction=this._getTimestamp(),this._startRun(),this._boundListener=this._didScroll.bind(this),this.element.addEventListener("scroll",this._boundListener)}return w(A,[{key:"_parseOptions",value:function(T){var L=new s().scroll;typeof T!="function"?(L.callback=function(){},L=l()(L,T)):L.callback=T,this.element=L.element,this.sustain=L.sustain,this.callback=L.callback,this.startCallback=L.start,this.stopCallback=L.stop,this.directionChange=L.directionChange}},{key:"_didScroll",value:function(){var T=this.getPosition();if(this.position!==T){var L=this.direction;T.x!==this.position.x?L=T.x>this.position.x?"right":"left":T.y!==this.position.y?L=T.y>this.position.y?"bottom":"top":L="none",L!==this.direction&&(this.direction=L,typeof this.directionChange=="function"&&this.directionChange(this.direction)),this.position=T,this.lastAction=this._getTimestamp()}else this.direction="none";this.running||this._startRun()}},{key:"_startRun",value:function(){this.running=!0,typeof this.startCallback=="function"&&this.startCallback(),this._loop()}},{key:"_stopRun",value:function(){this.running=!1,typeof this.stopCallback=="function"&&this.stopCallback()}},{key:"getPosition",value:function(){var T=this.element.pageXOffset||this.element.scrollLeft||document.documentElement.scrollLeft||0,L=this.element.pageYOffset||this.element.scrollTop||document.documentElement.scrollTop||0;return{x:T,y:L}}},{key:"_getTimestamp",value:function(){return Number(Date.now())}},{key:"_tick",value:function(){this.callback(this.position,this.direction);var T=this._getTimestamp();T-this.lastAction>this.sustain&&this._stopRun(),this.running&&this._loop()}},{key:"_loop",value:function(){var T=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(L){setTimeout(L,16.666666666666668)};T(this._tick.bind(this))}},{key:"kill",value:function(){this.running=!1,this.element.removeEventListener("scroll",this._boundListener)}}]),A}();r.d(n,"Trigger",function(){return M}),r.d(n,"TriggerCollection",function(){return O}),r.d(n,"ScrollAnimationLoop",function(){return D}),r.d(n,"default",function(){return k});function x(A,C){if(!(A instanceof C))throw new TypeError("Cannot call a class as a function")}function S(A,C){for(var T=0;T<C.length;T++){var L=C[T];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(A,L.key,L)}}function _(A,C,T){return C&&S(A.prototype,C),A}/*! 250 * ScrollTrigger 251 * 252 * 253 * http://github.com/terwanerik 254 * 255 * Copyright 2017, Erik Terwan <[email protected]> 256 * Released under the MIT license. 257 * 258 * Date: 2017-07-09 259 */var M=f,O=v,D=E,k=function(){function A(C){x(this,A),this._parseOptions(C),this._initCollection(),this._initLoop()}return _(A,[{key:"_parseOptions",value:function(T){T=l()(new s,T),this.defaultTr
259igger=T.trigger,this.scrollOptions=T.scroll}},{key:"_initCollection",value:function(){var T=document.querySelectorAll("[data-scroll]"),L=[];T.length>0&&(L=this.createTriggers(T)),this.collection=new O(L)}},{key:"_initLoop",value:function(){var T=this;this.loop=new D({sustain:this.scrollOptions.sustain,element:this.scrollOptions.element,callback:function(I,P){T._scrollCallback(I,P)},start:function(){T._scrollStart()},stop:function(){T._scrollStop()},directionChange:function(I){T._scrollDirectionChange(I)}})}},{key:"_scrollCallback",value:function(T,L){var I=this;this.collection.call(function(P){P.checkVisibility(I.scrollOptions.element,L)}),this.scrollOptions.callback(T,L)}},{key:"_scrollStart",value:function(){this.scrollOptions.start()}},{key:"_scrollStop",value:function(){this.scrollOptions.stop()}},{key:"_scrollDirectionChange",value:function(T){this.scrollOptions.directionChange(T)}},{key:"createTrigger",value:function(T,L){return new M(T,l()(this.defaultTrigger,L))}},{key:"createTriggers",value:function(T,L){var I=this,P=[];return T.each(function(R){P.push(I.createTrigger(R,L))}),P}},{key:"add",value:function(T,L){return T instanceof HTMLElement?(this.collection.add(this.createTrigger(T,L)),this):T instanceof M?(this.collection.add(T),this):T instanceof NodeList?(this.collection.add(this.createTriggers(T,L)),this):Array.isArray(T)&&T.length&&T[0]instanceof M?(this.collection.add(T),this):Array.isArray(T)&&T.length&&T[0]instanceof HTMLElement?(this.collection.add(this.createTriggers(T,L)),this):(this.collection.add(this.createTriggers(document.querySelectorAll(T),L)),this)}},{key:"remove",value:function(T){return T instanceof M?(this.collection.remove(T),this):Array.isArray(T)&&T.length&&T[0]instanceof M?(this.collection.remove(T),this):T instanceof HTMLElement?(this.collection.remove(this.search(T)),this):Array.isArray(T)&&T.length&&T[0]instanceof HTMLElement?(this.collection.remove(this.search(T)),this):T instanceof NodeList?(this.collection.remove(this.search(T)),this):Array.isArray(T)&&T.length&&T[0]instanceof M?(this.collection.remove(T),this):(this.collection.remove(this.query(T.toString())),this)}},{key:"query",value:function(T){return this.collection.query(T)}},{key:"search",value:function(T){return this.collection.search(T)}},{key:"listen",value:function(){this.loop||this._initLoop()}},{key:"kill",value:function(){this.loop.kill(),this.loop=null}}]),A}()}])})})(iE);var QD=iE.exports;const ZD=Go(QD);var rE={exports:{}};(function(i,e){function t(o,l){if(!(o instanceof l))throw new TypeError("Cannot call a class as a function")}function n(o,l){for(var a=0;a<l.length;a++){var u=l[a];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(o,u.key,u)}}function r(o,l,a){return l&&n(o.prototype,l),o}/** 260 * Sticky.js 261 * Library for sticky elements written in vanilla javascript. With this library you can easily set sticky elements on your website. It's also responsive. 262 * 263 * @version 1.3.0 264 * @author Rafal Galus <[email protected]> 265 * @website https://rgalus.github.io/sticky-js/ 266 * @repo https://github.com/rgalus/sticky-js 267 * @license https://github.com/rgalus/sticky-js/blob/master/LICENSE 268 */var s=function(){function o(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};t(this,o),this.selector=l,this.elements=[],this.version="1.3.0",this.vp=this.getViewportSize(),this.body=document.querySelector("body"),this.options={wrap:a.wrap||!1,wrapWith:a.wrapWith||"<span></span>",marginTop:a.marginTop||0,marginBottom:a.marginBottom||0,stickyFor:a.stickyFor||0,stickyClass:a.stickyClass||null,stickyContainer:a.stickyContainer||"body"},this.updateScrollTopPosition=this.updateScrollTopPosition.bind(this),this.updateScrollTopPosition(),window.addEventListener("load",this.updateScrollTopPosition),window.addEventListener("scroll",this.updateScrollTopPosition),this.run()}return r(o,[{key:"run",value:function(){var a=this,u=setInterval(function(){if(document.readyState==="complete"){clearInterval(u);var c=document.querySelectorAll(a.selector);a.forEach(c,function(h){return a.renderElement(h)})}},10)}},{key:"renderElement",value:function(a){var u=this;a.sticky={},a.sticky.active=!1,a.sticky.marginTop=parseInt(a.getAttribute("data-margin-top"))||this.options.marginTop,a.sticky.marginBottom=parseInt(a.getAttribute("data-margin-bottom"))||this.options.marginBottom,a.sticky.stickyFor=parseInt(a.getAttribute("data-sticky-for"))||this.options.stickyFor,a.sticky.stickyClass=a.getAttribute("data-sticky-class")||this.options.stickyClass,a.sticky.wrap=a.hasAttribute("data-sticky-wrap")?!0:this.options.wrap,a.sticky.stickyContainer=this.options.stickyContainer,a.sticky.container=this.getStickyContainer(a),a.sticky.container.rect=this.getRectangle(a.sticky.container),a.sticky.rect=this.getRectangle(a),a.tagName.toLowerCase()==="img"&&(a.onload=function(){return a.sticky.rect=u.getRectangle(a)}),a.sticky.wrap&&this.wrapElement(a),this.activate(a)}},{key:"wrapElement",value:function(a){a.insertAdjacentHTML("beforebegin",a.getAttribute("data-sticky-wrapWith")||this.options.wrapWith),a.previousSibling.a
vendor: 4,315 bytes, line 268
268ppendChild(a)}},{key:"activate",value:function(a){a.sticky.rect.top+a.sticky.rect.height<a.sticky.container.rect.top+a.sticky.container.rect.height&&a.sticky.stickyFor<this.vp.width&&!a.sticky.active&&(a.sticky.active=!0),this.elements.indexOf(a)<0&&this.elements.push(a),a.sticky.resizeEvent||(this.initResizeEvents(a),a.sticky.resizeEvent=!0),a.sticky.scrollEvent||(this.initScrollEvents(a),a.sticky.scrollEvent=!0),this.setPosition(a)}},{key:"initResizeEvents",value:function(a){var u=this;a.sticky.resizeListener=function(){return u.onResizeEvents(a)},window.addEventListener("resize",a.sticky.resizeListener)}},{key:"destroyResizeEvents",value:function(a){window.removeEventListener("resize",a.sticky.resizeListener)}},{key:"onResizeEvents",value:function(a){this.vp=this.getViewportSize(),a.sticky.rect=this.getRectangle(a),a.sticky.container.rect=this.getRectangle(a.sticky.container),a.sticky.rect.top+a.sticky.rect.height<a.sticky.container.rect.top+a.sticky.container.rect.height&&a.sticky.stickyFor<this.vp.width&&!a.sticky.active?a.sticky.active=!0:(a.sticky.rect.top+a.sticky.rect.height>=a.sticky.container.rect.top+a.sticky.container.rect.height||a.sticky.stickyFor>=this.vp.width&&a.sticky.active)&&(a.sticky.active=!1),this.setPosition(a)}},{key:"initScrollEvents",value:function(a){var u=this;a.sticky.scrollListener=function(){return u.onScrollEvents(a)},window.addEventListener("scroll",a.sticky.scrollListener)}},{key:"destroyScrollEvents",value:function(a){window.removeEventListener("scroll",a.sticky.scrollListener)}},{key:"onScrollEvents",value:function(a){a.sticky&&a.sticky.active&&this.setPosition(a)}},{key:"setPosition",value:function(a){this.css(a,{position:"",width:"",top:"",left:""}),!(this.vp.height<a.sticky.rect.height||!a.sticky.active)&&(a.sticky.rect.width||(a.sticky.rect=this.getRectangle(a)),a.sticky.wrap&&this.css(a.parentNode,{display:"block",width:a.sticky.rect.width+"px",height:a.sticky.rect.height+"px"}),a.sticky.rect.top===0&&a.sticky.container===this.body?(this.css(a,{position:"fixed",top:a.sticky.rect.top+"px",left:a.sticky.rect.left+"px",width:a.sticky.rect.width+"px"}),a.sticky.stickyClass&&a.classList.add(a.sticky.stickyClass)):this.scrollTop>a.sticky.rect.top-a.sticky.marginTop?(this.css(a,{position:"fixed",width:a.sticky.rect.width+"px",left:a.sticky.rect.left+"px"}),this.scrollTop+a.sticky.rect.height+a.sticky.marginTop>a.sticky.container.rect.top+a.sticky.container.offsetHeight-a.sticky.marginBottom?(a.sticky.stickyClass&&a.classList.remove(a.sticky.stickyClass),this.css(a,{top:a.sticky.container.rect.top+a.sticky.container.offsetHeight-(this.scrollTop+a.sticky.rect.height+a.sticky.marginBottom)+"px"})):(a.sticky.stickyClass&&a.classList.add(a.sticky.stickyClass),this.css(a,{top:a.sticky.marginTop+"px"}))):(a.sticky.stickyClass&&a.classList.remove(a.sticky.stickyClass),this.css(a,{position:"",width:"",top:"",left:""}),a.sticky.wrap&&this.css(a.parentNode,{display:"",width:"",height:""})))}},{key:"update",value:function(){var a=this;this.forEach(this.elements,function(u){u.sticky.rect=a.getRectangle(u),u.sticky.container.rect=a.getRectangle(u.sticky.container),a.activate(u),a.setPosition(u)})}},{key:"destroy",value:function(){var a=this;window.removeEventListener("load",this.updateScrollTopPosition),window.removeEventListener("scroll",this.updateScrollTopPosition),this.forEach(this.elements,function(u){a.destroyResizeEvents(u),a.destroyScrollEvents(u),delete u.sticky})}},{key:"getStickyContainer",value:function(a){for(var u=a.parentNode;!u.hasAttribute("data-sticky-container")&&!u.parentNode.querySelector(a.sticky.stickyContainer)&&u!==this.body;)u=u.parentNode;return u}},{key:"getRectangle",value:function(a){this.css(a,{position:"",width:"",top:"",left:""});var u=Math.max(a.offsetWidth,a.clientWidth,a.scrollWidth),c=Math.max(a.offsetHeight,a.clientHeight,a.scrollHeight),h=0,d=0;do h+=a.offsetTop||0,d+=a.offsetLeft||0,a=a.offsetParent;while(a);return{top:h,left:d,width:u,height:c}}},{key:"getViewportSize",value:function(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}},{key:"updateScrollTopPosition",value:function(){this.scrollTop=(window.pageYOffset||document.scrollTop)-(document.clientTop||0)||0}}
268,{key:"forEach",value:function(a,u){for(var c=0,h=a.length;c<h;c++)u(a[c])}},{key:"css",value:function(a,u){for(var c in u)u.hasOwnProperty(c)&&(a.style[c]=u[c])}}]),o}();(function(o,l){i.exports=l})(ee,s)})(rE);var eP=rE.exports,tP=eP,sE=tP;const oE=Go(sE),nP=dv({__proto__:null,default:oE},[sE]);class iP extends U{connect(){const e=this;this.navHighlighter=this.navHighlighter.bind(this);var t=new oE(".default-sidebar");t.update(),new ZD({scroll:{callback:function(){e.navHighlighter()}}}).createTrigger(this.element,{})}navHighlighter(){const e=document.querySelectorAll("[data-document-target]");let t=window.scrollY||document.documentElement.scrollTop;e.forEach(n=>{const r=n.offsetHeight,s=n.offsetTop-50;let o=n.getAttribute("id");if(t>s&&t<=s+r){let l=document.querySelector(`aside a[href='#${o}']`);if(l){const a=window.location.toString().split("#")[0];history.replaceState(null,null,a+"#"+o),l.classList.add("bg-gray-100","dark:bg-gray-700","text-semibold","text-primary-600")}}else{let l=document.querySelector(`aside a[href='#${o}']`);l&&l.classList.remove("bg-gray-100","dark:bg-gray-700","text-semibold","text-primary-600")}})}}const rP=Object.freeze(Object.defineProperty({__proto__:null,default:iP},Symbol.toStringTag,{value:"Module"}));class aE extends U{connect(){this.countdownTime=10,this.downloadUrl=this.data.get("url"),this.startCountdown()}startCountdown(){this.updateCountdownDisplay(),this.interval=setInterval(()=>{this.countdownTime--,this.updateCountdownDisplay(),this.countdownTime<=0&&(clearInterval(this.interval),this.showDownloadLink(),this.redirectToDownload(),this.downloadMessageTarget.style.display="none")},1e3)}updateCountdownDisplay(){this.countdownTarget.textContent=this.countdownTime}showDownloadLink(){this.downloadLinkTarget.style.display="block"}redirectToDownload(){window.location.href=this.downloadUrl,this.showThankYouMessage()}showThankYouMessage(){this.thankYouMessageTarget.style.display="block"}}$(aE,"targets",["countdown","downloadMessage","downloadLink","thankYouMessage"]);const sP=Object.freeze(Object.defineProperty({__proto__:null,default:aE},Symbol.toStringTag,{value:"Module"}));class oP extends U{}oP.debounces=[];class aP extends U{}aP.throttles=[];const lP={enterFromClass:"enter",enterActiveClass:"enterStart",enterToClass:"enterEnd",leaveFromClass:"leave",leaveActiveClass:"leaveStart",leaveToClass:"leaveEnd"},uP={transitioned:!1,hiddenClass:"hidden",preserveOriginalClass:!0,removeToClasses:!0},lE=(i,e={})=>{var t,n,r;const s=i,o=s.element.dataset.transitionTarget;let l;o&&(l=s[`${o}Target`]);const a=(e==null?void 0:e.element)||l||s.element;if(!(a instanceof HTMLElement||a instanceof SVGElement))return;const u=a.dataset,c=parseInt(u.leaveAfter||"")||e.leaveAfter||0,{transitioned:h,hiddenClass:d,preserveOriginalClass:f,removeToClasses:p}=Object.assign({},uP,e),b=(t=s.enter)===null||t===void 0?void 0:t.bind(s),m=(n=s.leave)===null||n===void 0?void 0:n.bind(s),v=(r=s.toggleTransition)===null||r===void 0?void 0:r.bind(s);async function g(M){if(s.transitioned)return;s.transitioned=!0,b&&b(M);const O=ti("enterFrom",e,u),D=ti("enterActive",e,u),k=ti("enterTo",e,u),A=ti("leaveTo",e,u);d&&a.classList.remove(d),p||_(a,A),await E(a,O,D,k,d,f,p),c>0&&setTimeout(()=>{y(M)},c)}async function y(M){if(!s.transitioned)return;s.transitioned=!1,m&&m(M);const O=ti("leaveFrom",e,u),D=ti("leaveActive",e,u),k=ti("leaveTo",e,u),A=ti("enterTo",e,u);p||_(a,A),await E(a,O,D,k,d,f,p),d&&a.classList.add(d)}function w(M){v&&v(M),s.transitioned?y():g()}async function E(M,O,D,k,A,C,T){const L=[];C&&(O.forEach(I=>M.classList.contains(I)&&I!==A&&L.push(I)),D.forEach(I=>M.classList.contains(I)&&I!==A&&L.push(I)),k.forEach(I=>M.classList.contains(I)&&I!==A&&L.push(I))),S(M,O),_(M,L),S(M,D),await dP(),_(M,O),S(M,k),await cP(M),_(M,D),T&&_(M,k),S(M,L)}function x(){s.transitioned=h,h?(d&&a.classList.remove(d),g()):(d&&a.classList.add(d),y())}function S(M,O){O.length>0&&M.classList.add(...O)}function _(M,O){O.length>0&&M.classList.remove(...O)}return x(),Object.assign(s,{enter:g,leave:y,toggleTransition:w}),[g,y,w]};function ti(i,e,t){const n=`transition${i[0].toUpperCase()}${i.substr(1)}`,r=lP[i],s=e[i]||t[n]||t[r]||" ";return hP(s)?[]:s.split(" ")}async function cP(i){return new Promise(e=>{const t=Number(getComputedStyle(i).transitionDuration.split(",")[0].replace("s",""))*1e3;setTimeout(()=>{e(t)},t)})}async function dP(){return new Promise(i=>{requestAnimationFrame(()=>{requestAnimationFrame(i)})})}function hP(i){return i.length===0||!i.trim()}const uE=class extends U{connect(){lE(this,{element:this.menuTarget})}toggle(){this.toggleTransition()}hide(e){!this.element.contains(e.target)&&!this.menuTarget.classList.contains("hidden")&&this.leave()}};uE.targets=["menu"];
268let fP=uE;var Ps,Vn,uu=0;function Fa(i){return i>=48&&i<=57}function no(i,e){for(var t=(i+="").length,n=(e+="").length,r=0,s=0;r<t&&s<n;){var o=i.charCodeAt(r),l=e.charCodeAt(s);if(Fa(o)){if(!Fa(l))return o-l;for(var a=r,u=s;o===48&&++a<t;)o=i.charCodeAt(a);for(;l===48&&++u<n;)l=e.charCodeAt(u);for(var c=a,h=u;c<t&&Fa(i.charCodeAt(c));)++c;for(;h<n&&Fa(e.charCodeAt(h));)++h;var d=c-a-h+u;if(d)return d;for(;a<c;)if(d=i.charCodeAt(a++)-e.charCodeAt(u++),d)return d;r=c,s=h;continue}if(o!==l)return o<uu&&l<uu&&Vn[o]!==-1&&Vn[l]!==-1?Vn[o]-Vn[l]:o-l;++r,++s}return r>=t&&s<n&&t>=n?-1:s>=n&&r<t&&n>=t?1:t-n}no.caseInsensitive=no.i=function(i,e){return no((""+i).toLowerCase(),(""+e).toLowerCase())};Object.defineProperties(no,{alphabet:{get:function(){return Ps},set:function(i){Ps=i,Vn=[];var e=0;if(Ps)for(;e<Ps.length;e++)Vn[Ps.charCodeAt(e)]=e;for(uu=Vn.length,e=0;e<uu;e++)Vn[e]===void 0&&(Vn[e]=-1)}}});var pP=no,mP=function(i,e,t){return t?i.getElementsByClassName(e)[0]:i.getElementsByClassName(e)},gP=function(i,e,t){return e="."+e,t?i.querySelector(e):i.querySelectorAll(e)},bP=function(i,e,t){for(var n=[],r="*",s=i.getElementsByTagName(r),o=s.length,l=new RegExp("(^|\\s)"+e+"(\\s|$)"),a=0,u=0;a<o;a++)if(l.test(s[a].className)){if(t)return s[a];n[u]=s[a],u++}return n},cE=function(){return function(i,e,t,n){return n=n||{},n.test&&n.getElementsByClassName||!n.test&&document.getElementsByClassName?mP(i,e,t):n.test&&n.querySelector||!n.test&&document.querySelector?gP(i,e,t):bP(i,e,t)}}(),dE=function(e){for(var t=Array.prototype.slice.call(arguments,1),n=0,r;r=t[n];n++)if(r)for(var s in r)e[s]=r[s];return e},yP=[].indexOf,hE=function(i,e){if(yP)return i.indexOf(e);for(var t=0,n=i.length;t<n;++t)if(i[t]===e)return t;return-1},ws={},fE=function(e){if(typeof e>"u")return[];if(e===null)return[null];if(e===window)return[window];if(typeof e=="string")return[e];if(vP(e))return e;if(typeof e.length!="number")return[e];if(typeof e=="function"&&e instanceof Function)return[e];for(var t=[],n=0,r=e.length;n<r;n++)(Object.prototype.hasOwnProperty.call(e,n)||n in e)&&t.push(e[n]);return t.length?t:[]};function vP(i){return Object.prototype.toString.call(i)==="[object Array]"}var pE=window.addEventListener?"addEventListener":"attachEvent",wP=window.removeEventListener?"removeEventListener":"detachEvent",mE=pE!=="addEventListener"?"on":"",gE=fE;ws.bind=function(i,e,t,n){i=gE(i);for(var r=0,s=i.length;r<s;r++)i[r][pE](mE+e,t,n||!1)};ws.unbind=function(i,e,t,n){i=gE(i);for(var r=0,s=i.length;r<s;r++)i[r][wP](mE+e,t,n||!1)};ws.debounce=function(i,e,t){var n;return e?function(){var r=this,s=arguments,o=function(){n=null,t||i.apply(r,s)},l=t&&!n;clearTimeout(n),n=setTimeout(o,e),l&&i.apply(r,s)}:i};var bE=function(i){return i=i===void 0?"":i,i=i===null?"":i,i=i.toString(),i},Tm=hE,xP=/\s+/,yE=function(i){return new mr(i)};function mr(i){if(!i||!i.nodeType)throw new Error("A DOM element reference is required");this.el=i,this.list=i.classList}mr.prototype.add=function(i){if(this.list)return this.list.add(i),this;var e=this.array(),t=Tm(e,i);return~t||e.push(i),this.el.className=e.join(" "),this};mr.prototype.remove=function(i){if(this.list)return this.list.remove(i),this;var e=this.array(),t=Tm(e,i);return~t&&e.splice(t,1),this.el.className=e.join(" "),this};mr.prototype.toggle=function(i,e){return this.list?(typeof e<"u"?e!==this.list.toggle(i,e)&&this.list.toggle(i):this.list.toggle(i),this):(typeof e<"u"?e?this.add(i):this.remove(i):this.has(i)?this.remove(i):this.add(i),this)};mr.prototype.array=function(){var i=this.el.getAttribute("class")||"",e=i.replace(/^\s+|\s+$/g,""),t=e.split(xP);return t[0]===""&&t.shift(),t};mr.prototype.has=mr.prototype.contains=function(i){return this.list?this.list.contains(i):!!~Tm(this.array(),i)};var EP=function(i,e){var t=i.getAttribute&&i.getAttribute(e)||null;if(!t)for(var n=i.attributes,r=n.length,s=0;s<r;s++)n[s]!==void 0&&n[s].nodeName===e&&(t=n[s].nodeValue);return t},gd,X0;function vE(){return X0||(X0=1,gd=function(i){return function(e,t,n){var r=this;this._values={},this.found=!1,this.filtered=!1;var s=function(o,l,a){if(l===void 0)a?r.values(o,a):r.values(o);else{r.elm=l;var u=i.templater.get(r,o);r.values(u)}};this.values=function(o,l){if(o!==void 0){for(var a in o)r._values[a]=o[a];l!==!0&&i.templater.set(r,r.values())}else return r._values},this.show=function(){i.templater.show(r)},this.hide=function(){i.templater.hide(r)},this.matching=function(){return i.filtered&&i.searched&&r.found&&r.filtered||i.filtered&&!i.searched&&r.filtered||!i.filtered&&i.searched&&r.found||!i.filtered&&!i.searched},this.visible=function(){return!!(r.elm&&r.elm.parentNode==i.list)}
268,s(e,t,n)}}),gd}var bd,J0;function TP(){return J0||(J0=1,bd=function(i){var e=function(t,n,r){var s=t.splice(0,50);r=r||[],r=r.concat(i.add(s)),t.length>0?setTimeout(function(){e(t,n,r)},1):(i.update(),n(r))};return e}),bd}var yd,Q0;function SP(){if(Q0)return yd;Q0=1;var i=yE,e=ws,t=wE();return yd=function(n){var r=!1,s=function(l,a){if(n.page<1){n.listContainer.style.display="none",r=!0;return}else r&&(n.listContainer.style.display="block");var u,c=n.matchingItems.length,h=n.i,d=n.page,f=Math.ceil(c/d),p=Math.ceil(h/d),b=a.innerWindow||2,m=a.left||a.outerWindow||0,v=a.right||a.outerWindow||0;v=f-v,l.clear();for(var g=1;g<=f;g++){var y=p===g?"active":"";o.number(g,m,v,p,b)?(u=l.add({page:g,dotted:!1})[0],y&&i(u.elm).add(y),u.elm.firstChild.setAttribute("data-i",g),u.elm.firstChild.setAttribute("data-page",d)):o.dotted(l,g,m,v,p,b,l.size())&&(u=l.add({page:"...",dotted:!0})[0],i(u.elm).add("disabled"))}},o={number:function(l,a,u,c,h){return this.left(l,a)||this.right(l,u)||this.innerWindow(l,c,h)},left:function(l,a){return l<=a},right:function(l,a){return l>a},innerWindow:function(l,a,u){return l>=a-u&&l<=a+u},dotted:function(l,a,u,c,h,d,f){return this.dottedLeft(l,a,u,c,h,d)||this.dottedRight(l,a,u,c,h,d,f)},dottedLeft:function(l,a,u,c,h,d){return a==u+1&&!this.innerWindow(a,h,d)&&!this.right(a,c)},dottedRight:function(l,a,u,c,h,d,f){return l.items[f-1].values().dotted?!1:a==c&&!this.innerWindow(a,h,d)&&!this.right(a,c)}};return function(l){var a=new t(n.listContainer.id,{listClass:l.paginationClass||"pagination",item:l.item||"<li><a class='page' href='#'></a></li>",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});e.bind(a.listContainer,"click",function(u){var c=u.target||u.srcElement,h=n.utils.getAttribute(c,"data-page"),d=n.utils.getAttribute(c,"data-i");d&&n.show((d-1)*h+1,h)}),n.on("updated",function(){s(a,l)}),s(a,l)}},yd}var vd,Z0;function CP(){return Z0||(Z0=1,vd=function(i){var e=vE()(i),t=function(s){for(var o=s.childNodes,l=[],a=0,u=o.length;a<u;a++)o[a].data===void 0&&l.push(o[a]);return l},n=function(s,o){for(var l=0,a=s.length;l<a;l++)i.items.push(new e(o,s[l]))},r=function(s,o){var l=s.splice(0,50);n(l,o),s.length>0?setTimeout(function(){r(s,o)},1):(i.update(),i.trigger("parseComplete"))};return i.handlers.parseComplete=i.handlers.parseComplete||[],function(){var s=t(i.list),o=i.valueNames;i.indexAsync?r(s,o):n(s,o)}}),vd}var wd,eb;function kP(){if(eb)return wd;eb=1;var i=function(e){var t,n=this,r=function(){var c;if(typeof e.item=="function"){t=function(h){var d=e.item(h);return l(d)};return}if(typeof e.item=="string"?e.item.indexOf("<")===-1?c=document.getElementById(e.item):c=l(e.item):c=o(),!c)throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.");c=s(c,e.valueNames),t=function(){return c.cloneNode(!0)}},s=function(c,h){var d=c.cloneNode(!0);d.removeAttribute("id");for(var f=0,p=h.length;f<p;f++){var b=void 0,m=h[f];if(m.data)for(var v=0,g=m.data.length;v<g;v++)d.setAttribute("data-"+m.data[v],"");else m.attr&&m.name?(b=e.utils.getByClass(d,m.name,!0),b&&b.setAttribute(m.attr,"")):(b=e.utils.getByClass(d,m,!0),b&&(b.innerHTML=""))}return d},o=function(){for(var c=e.list.childNodes,h=0,d=c.length;h<d;h++)if(c[h].data===void 0)return c[h].cloneNode(!0)},l=function(c){if(typeof c=="string"){if(/<tr[\s>]/g.exec(c)){var h=document.createElement("tbody");return h.innerHTML=c,h.firstElementChild}else if(c.indexOf("<")!==-1){var d=document.createElement("div");return d.innerHTML=c,d.firstElementChild}}},a=function(c){for(var h=0,d=e.valueNames.length;h<d;h++){var f=e.valueNames[h];if(f.data){for(var p=f.data,b=0,m=p.length;b<m;b++)if(p[b]===c)return{data:c}}else{if(f.attr&&f.name&&f.name==c)return f;if(f===c)return c}}},u=function(c,h,d){var f=void 0,p=a(h);p&&(p.data?c.elm.setAttribute("data-"+p.data,d):p.attr&&p.name?(f=e.utils.getByClass(c.elm,p.name,!0),f&&f.setAttribute(p.attr,d)):(f=e.utils.getByClass(c.elm,p,!0),f&&(f.innerHTML=d)))};this.get=function(c,h){n.create(c);for(var d={},f=0,p=h.length;f<p;f++){var b=void 0,m=h[f];if(m.data)for(var v=0,g=m.data.length;v<g;v++)d[m.data[v]]=e.utils.getAttribute(c.elm,"data-"+m.data[v]);else m.attr&&m.name?(b=e.utils.getByClass(c.elm,m.name,!0),d[m.name]=b?e.utils.getAttribute(b,m.attr):""):(b=e.utils.getByClass(c.elm,m,!0),d[m]=b?b.innerHTML:"")}return d},this.set=function(c,h){if(!n.create(c))for(var d in h)h.hasOwnProperty(d)&&u(c,d,h[d]
268)},this.create=function(c){return c.elm!==void 0?!1:(c.elm=t(c.values()),n.set(c,c.values()),!0)},this.remove=function(c){c.elm.parentNode===e.list&&e.list.removeChild(c.elm)},this.show=function(c){n.create(c),e.list.appendChild(c.elm)},this.hide=function(c){c.elm!==void 0&&c.elm.parentNode===e.list&&e.list.removeChild(c.elm)},this.clear=function(){if(e.list.hasChildNodes())for(;e.list.childNodes.length>=1;)e.list.removeChild(e.list.firstChild)},r()};return wd=function(e){return new i(e)},wd}var xd,tb;function _P(){return tb||(tb=1,xd=function(i){var e,t,n,r={resetList:function(){i.i=1,i.templater.clear(),n=void 0},setOptions:function(l){l.length==2&&l[1]instanceof Array?e=l[1]:l.length==2&&typeof l[1]=="function"?(e=void 0,n=l[1]):l.length==3?(e=l[1],n=l[2]):e=void 0},setColumns:function(){i.items.length!==0&&e===void 0&&(e=i.searchColumns===void 0?r.toArray(i.items[0].values()):i.searchColumns)},setSearchString:function(l){l=i.utils.toString(l).toLowerCase(),l=l.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),t=l},toArray:function(l){var a=[];for(var u in l)a.push(u);return a}},s={list:function(){for(var l=[],a,u=t;(a=u.match(/"([^"]+)"/))!==null;)l.push(a[1]),u=u.substring(0,a.index)+u.substring(a.index+a[0].length);u=u.trim(),u.length&&(l=l.concat(u.split(/\s+/)));for(var c=0,h=i.items.length;c<h;c++){var d=i.items[c];if(d.found=!1,!!l.length){for(var f=0,p=l.length;f<p;f++){for(var b=!1,m=0,v=e.length;m<v;m++){var g=d.values(),y=e[m];if(g.hasOwnProperty(y)&&g[y]!==void 0&&g[y]!==null){var w=typeof g[y]!="string"?g[y].toString():g[y];if(w.toLowerCase().indexOf(l[f])!==-1){b=!0;break}}}if(!b)break}d.found=b}}},reset:function(){i.reset.search(),i.searched=!1}},o=function(l){return i.trigger("searchStart"),r.resetList(),r.setSearchString(l),r.setOptions(arguments),r.setColumns(),t===""?s.reset():(i.searched=!0,n?n(t,e):s.list()),i.update(),i.trigger("searchComplete"),i.visibleItems};return i.handlers.searchStart=i.handlers.searchStart||[],i.handlers.searchComplete=i.handlers.searchComplete||[],i.utils.events.bind(i.utils.getByClass(i.listContainer,i.searchClass),"keyup",i.utils.events.debounce(function(l){var a=l.target||l.srcElement,u=a.value===""&&!i.searched;u||o(a.value)},i.searchDelay)),i.utils.events.bind(i.utils.getByClass(i.listContainer,i.searchClass),"input",function(l){var a=l.target||l.srcElement;a.value===""&&o("")}),o}),xd}var Ed,nb;function AP(){return nb||(nb=1,Ed=function(i){return i.handlers.filterStart=i.handlers.filterStart||[],i.handlers.filterComplete=i.handlers.filterComplete||[],function(e){if(i.trigger("filterStart"),i.i=1,i.reset.filter(),e===void 0)i.filtered=!1;else{i.filtered=!0;for(var t=i.items,n=0,r=t.length;n<r;n++){var s=t[n];e(s)?s.filtered=!0:s.filtered=!1}}return i.update(),i.trigger("filterComplete"),i.visibleItems}}),Ed}var Td,ib;function LP(){return ib||(ib=1,Td=function(i){var e={els:void 0,clear:function(){for(var n=0,r=e.els.length;n<r;n++)i.utils.classes(e.els[n]).remove("asc"),i.utils.classes(e.els[n]).remove("desc")},getOrder:function(n){var r=i.utils.getAttribute(n,"data-order");return r=="asc"||r=="desc"?r:i.utils.classes(n).has("desc")?"asc":i.utils.classes(n).has("asc")?"desc":"asc"},getInSensitive:function(n,r){var s=i.utils.getAttribute(n,"data-insensitive");s==="false"?r.insensitive=!1:r.insensitive=!0},setOrder:function(n){for(var r=0,s=e.els.length;r<s;r++){var o=e.els[r];if(i.utils.getAttribute(o,"data-sort")===n.valueName){var l=i.utils.getAttribute(o,"data-order");l=="asc"||l=="desc"?l==n.order&&i.utils.classes(o).add(n.order):i.utils.classes(o).add(n.order)}}}},t=function(){i.trigger("sortStart");var n={},r=arguments[0].currentTarget||arguments[0].srcElement||void 0;r?(n.valueName=i.utils.getAttribute(r,"data-sort"),e.getInSensitive(r,n),n.order=e.getOrder(r)):(n=arguments[1]||n,n.valueName=arguments[0],n.order=n.order||"asc",n.insensitive=typeof n.insensitive>"u"?!0:n.insensitive),e.clear(),e.setOrder(n);var s=n.sortFunction||i.sortFunction||null,o=n.order==="desc"?-1:1,l;s?l=function(a,u){return s(a,u,n)*o}:l=function(a,u){var c=i.utils.naturalSort;return c.alphabet=i.alphabet||n.alphabet||void 0,!c.alphabet&&n.insensitive&&(c=i.utils.naturalSort.caseInsensitive),c(a.values()[n.valueName],u.values()[n.valueName])*o},i.items.sort(l),i.update(),i.trigger("sortComplete")};return i.handlers.sortStart=i.handlers.sortStart||[],i.handlers.sortComplete=i.handlers.sortComplete||[],e.els=i.utils.getByClass(i.listContainer,i.sortClass),i.utils.events.bind(e.els,"click",t),i.on("searchStart",e.clear),i.on("filterStart",e.clear),t}),Td}var Sd,rb;function MP(){return rb||(rb=1,Sd=function(i,e,t){var n=t.location||0,r=t.distance||100,s=t.threshold||.4;if(e===i)return!0;
268if(e.length>32)return!1;var o=n,l=function(){var S={},_;for(_=0;_<e.length;_++)S[e.charAt(_)]=0;for(_=0;_<e.length;_++)S[e.charAt(_)]|=1<<e.length-_-1;return S}();function a(S,_){var M=S/e.length,O=Math.abs(o-_);return r?M+O/r:O?1:M}var u=s,c=i.indexOf(e,o);c!=-1&&(u=Math.min(a(0,c),u),c=i.lastIndexOf(e,o+e.length),c!=-1&&(u=Math.min(a(0,c),u)));var h=1<<e.length-1;c=-1;for(var d,f,p=e.length+i.length,b,m=0;m<e.length;m++){for(d=0,f=p;d<f;)a(m,o+f)<=u?d=f:p=f,f=Math.floor((p-d)/2+d);p=f;var v=Math.max(1,o-f+1),g=Math.min(o+f,i.length)+e.length,y=Array(g+2);y[g+1]=(1<<m)-1;for(var w=g;w>=v;w--){var E=l[i.charAt(w-1)];if(m===0?y[w]=(y[w+1]<<1|1)&E:y[w]=(y[w+1]<<1|1)&E|((b[w+1]|b[w])<<1|1)|b[w+1],y[w]&h){var x=a(m,w-1);if(x<=u)if(u=x,c=w-1,c>o)v=Math.max(1,2*o-c);else break}}if(a(m+1,o)>u)break;b=y}return!(c<0)}),Sd}var Cd,sb;function IP(){if(sb)return Cd;sb=1;var i=ws,e=dE,t=bE,n=cE,r=MP();return Cd=function(s,o){o=o||{},o=e({location:0,distance:100,threshold:.4,multiSearch:!0,searchClass:"fuzzy-search"},o);var l={search:function(a,u){for(var c=o.multiSearch?a.replace(/ +$/,"").split(/ +/):[a],h=0,d=s.items.length;h<d;h++)l.item(s.items[h],u,c)},item:function(a,u,c){for(var h=!0,d=0;d<c.length;d++){for(var f=!1,p=0,b=u.length;p<b;p++)l.values(a.values(),u[p],c[d])&&(f=!0);f||(h=!1)}a.found=h},values:function(a,u,c){if(a.hasOwnProperty(u)){var h=t(a[u]).toLowerCase();if(r(h,c,o))return!0}return!1}};return i.bind(n(s.listContainer,o.searchClass),"keyup",s.utils.events.debounce(function(a){var u=a.target||a.srcElement;s.search(u.value,l.search)},s.searchDelay)),function(a,u){s.search(a,u,l.search)}},Cd}var kd,ob;function wE(){if(ob)return kd;ob=1;var i=pP,e=cE,t=dE,n=hE,r=ws,s=bE,o=yE,l=EP,a=fE;return kd=function(u,c,h){var d=this,f,p=vE()(d),b=TP()(d),m=SP()(d);f={start:function(){d.listClass="list",d.searchClass="search",d.sortClass="sort",d.page=1e4,d.i=1,d.items=[],d.visibleItems=[],d.matchingItems=[],d.searched=!1,d.filtered=!1,d.searchColumns=void 0,d.searchDelay=0,d.handlers={updated:[]},d.valueNames=[],d.utils={getByClass:e,extend:t,indexOf:n,events:r,toString:s,naturalSort:i,classes:o,getAttribute:l,toArray:a},d.utils.extend(d,c),d.listContainer=typeof u=="string"?document.getElementById(u):u,d.listContainer&&(d.list=e(d.listContainer,d.listClass,!0),d.parse=CP()(d),d.templater=kP()(d),d.search=_P()(d),d.filter=AP()(d),d.sort=LP()(d),d.fuzzySearch=IP()(d,c.fuzzySearch),this.handlers(),this.items(),this.pagination(),d.update())},handlers:function(){for(var v in d.handlers)d[v]&&d.handlers.hasOwnProperty(v)&&d.on(v,d[v])},items:function(){d.parse(d.list),h!==void 0&&d.add(h)},pagination:function(){if(c.pagination!==void 0){c.pagination===!0&&(c.pagination=[{}]),c.pagination[0]===void 0&&(c.pagination=[c.pagination]);for(var v=0,g=c.pagination.length;v<g;v++)m(c.pagination[v])}}},this.reIndex=function(){d.items=[],d.visibleItems=[],d.matchingItems=[],d.searched=!1,d.filtered=!1,d.parse(d.list)},this.toJSON=function(){for(var v=[],g=0,y=d.items.length;g<y;g++)v.push(d.items[g].values());return v},this.add=function(v,g){if(v.length!==0){if(g){b(v.slice(0),g);return}var y=[],w=!1;v[0]===void 0&&(v=[v]);for(var E=0,x=v.length;E<x;E++){var S=null;w=d.items.length>d.page,S=new p(v[E],void 0,w),d.items.push(S),y.push(S)}return d.update(),y}},this.show=function(v,g){return this.i=v,this.page=g,d.update(),d},this.remove=function(v,g,y){for(var w=0,E=0,x=d.items.length;E<x;E++)d.items[E].values()[v]==g&&(d.templater.remove(d.items[E],y),d.items.splice(E,1),x--,E--,w++);return d.update(),w},this.get=function(v,g){for(var y=[],w=0,E=d.items.length;w<E;w++){var x=d.items[w];x.values()[v]==g&&y.push(x)}return y},this.size=function(){return d.items.length},this.clear=function(){return d.templater.clear(),d.items=[],d},this.on=function(v,g){return d.handlers[v].push(g),d},this.off=function(v,g){var y=d.handlers[v],w=n(y,g);return w>-1&&y.splice(w,1),d},this.trigger=function(v){for(var g=d.handlers[v].length;g--;)d.handlers[v][g](d);return d},this.reset={filter:function(){for(var v=d.items,g=v.length;g--;)v[g].filtered=!1;return d},search:function(){for(var v=d.items,g=v.length;g--;)v[g].found=!1;return d}},this.update=function(){var v=d.items,g=v.length;d.visibleItems=[],d.matchingItems=[],d.templater.clear();for(var y=0;y<g;y++)v[y].matching()&&d.matchingItems.length+1>=d.i&&d.visibleItems.length<d.page?(v[y].show(),d.visibleItems.push(v[y]),d.matchingItems.push(v[y])):(v[y].matching()&&d.matchingItems.push(v[y]),v[y].hide());return d.trigger("updated"),d},f.start()},kd}var OP=wE();const DP=Go(OP);class xE extends fP{checkboxTargetConnected(e){e.addEventListener("change",this.toggleActiveClass.bind(this)),this.toggleCheckbox({target:e})}checkboxTargetDisconnected(e){e.removeEventListener("change",this.toggleActiveClass.bind(this))}closeTargetConnected(e){e.addEventListener("click",this.clear.bind(this))}closeTargetDisconnected(e){e.removeEventListener("click",this.clear.bind(this))}applyTargetConnected(e){e.addEventListener("click",this.updateDropdownDisplay.bind(this))}applyTargetDisconnected(e){e.removeEventListener("click",this.updateDropdownDisplay.bind(this))}
268toggleActiveClass(){this.checkboxTargets.forEach(e=>this.toggleCheckbox({target:e}))}toggleCheckbox(e){const t=e.target.closest("li");if(t&&(e.target.checked?t.classList.add("active"):t.classList.remove("active"),e.target.dataset.targetInput)){const n=t.querySelector(`${e.target.dataset.targetInput}`);n&&(n.disabled=!e.target.checked)}}updateDropdownDisplay(){const e=this.checked().length;e==0?(this.displayTarget.classList.remove("inline-flex"),this.displayTarget.classList.add("hidden"),this.groupTarget.classList.remove("active")):(e>1?this.resultTarget.innerHTML=`${e} options`:this.resultTarget.innerHTML=this.checked()[0].title,this.groupTarget.classList.add("active"),this.displayTarget.classList.add("inline-flex"),this.displayTarget.classList.remove("hidden"))}clear(){this.checkboxTargets.forEach(e=>{e.checked=!1}),this.updateDropdownDisplay(),this.applyTarget.click()}connect(){super.connect();try{this.hasSearchTarget&&(this.listInstance=new DP(this.element,{valueNames:["item"],listClass:this.listTarget.classList[0]}),this.searchTarget.addEventListener("input",e=>this.updateSearch(e))),this.updateDropdownDisplay()}catch{}}updateSearch(e){try{const t=e.target.value.trim();this.listInstance.search(t),this.updateCounter()}catch(t){console.error("Error searching:",t)}}updateCounter(){const e=this.listInstance.visibleItems.length,t=this.listInstance.size();e==t?this.countTarget.innerHTML=`${t} elements`:this.searchTarget&&e==0?this.countTarget.innerHTML="No results":this.countTarget.innerHTML=`${e} results`}clearSearch(){this.searchTarget.value="",this.listInstance.search(),this.updateCounter()}checked(){return this.checkboxTargets.filter(e=>e.checked)}unchecked(){return this.checkboxTargets.filter(e=>!e.checked)}}$(xE,"targets",["search","list","count","group","checkbox","display","result","close","apply"]);const PP=Object.freeze(Object.defineProperty({__proto__:null,default:xE},Symbol.toStringTag,{value:"Module"}));class Qh extends U{connect(){this.update()}update(){const e=Math.max(0,Number(this.emailsTarget.value)||0),t=Math.max(0,Number(this.phonesTarget.value)||0),n=e*this.emailCostValue+t*this.phoneCostValue;this.emailsOutTarget.textContent=this.format(e),this.phonesOutTarget.textContent=this.format(t),this.creditsTarget.textContent=this.format(n);const r=this.recommend(n);this.nameTarget.textContent=r.name,this.detailTarget.textContent=r.detail,this.buyTarget.classList.toggle("hidden",!r.packKey),this.buyTarget.dataset.pack=r.packKey||"",this.buyTarget.textContent=r.packKey?`Buy ${r.name}`:"",this.salesTarget.classList.toggle("hidden",!r.sales)}buy(){const e=document.querySelector(`form[data-payg-pack="${CSS.escape(this.buyTarget.dataset.pack)}"]`);e&&e.requestSubmit()}recommend(e){if(e<=this.freeCreditsValue)return{name:"Free account",detail:`${this.format(this.freeCreditsValue)} credits, no credit card`};const n=[...this.packsValue].sort((r,s)=>r.credits-s.credits).find(r=>r.credits>=e);return n?{name:n.name,detail:`${this.format(n.credits)} credits · ${n.price} one-time`,packKey:n.key}:{name:"Talk to us",detail:`Volume pricing for ${this.format(e)} credits`,sales:!0}}format(e){return Number(e).toLocaleString("en-US")}}$(Qh,"targets",["emails","phones","emailsOut","phonesOut","credits","name","detail","buy","sales"]),$(Qh,"values",{packs:Array,emailCost:Number,phoneCost:Number,freeCredits:Number});const RP=Object.freeze(Object.defineProperty({__proto__:null,default:Qh},Symbol.toStringTag,{value:"Module"}));class EE extends U{submit(e){e.preventDefault(),this.search(this.inputTarget.value)}useExample(e){const t=e.currentTarget.dataset.query||"";this.inputTarget.value=t,this.search(t)}search(e){const t=e.trim();if(!t){this.inputTarget.focus();return}const n=document.querySelector('[data-ai--public-prospect-search-target="prompt"]');if(!n||!n.form){window.location.href="/searches/profiles/demo?home2026_preview=1";return}n.value=t,n.dispatchEvent(new Event("input",{bubbles:!0})),(document.getElementById("home-live-preview")||n).scrollIntoView({behavior:this.prefersReducedMotion?"auto":"smooth",block:"start"}),n.form.requestSubmit()}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}}$(EE,"targets",["input"]);const NP=Object.freeze(Object.defineProperty({__proto__:null,default:EE},Symbol.toStringTag,{value:"Module"}));class TE extends U{connect(){this.onDocumentClick=this.onDocumentClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}disconnect(){this.removeDocumentListeners()}toggle(){this.isOpen?this.close():this.open()}open(){this.panelTarget.classList.remove("hidden"),this.buttonTarget.setAttribute("aria-expanded","true"),document.addEventListener("click",this.onDocumentClick),document.addEventListener("keydown",this.onKeydown)}close({restoreFocus:e=!1}={}){this.removeDocumentListeners(),!(!this.hasPanelTarget||!this.hasButtonTarget)&&(this.panelTarget.classList.add("hidden"),this.buttonTarget.setAttribute("aria-expanded","fal
268se"),e===!0&&this.buttonTarget.focus())}removeDocumentListeners(){document.removeEventListener("click",this.onDocumentClick),document.removeEventListener("keydown",this.onKeydown)}get isOpen(){return this.hasButtonTarget&&this.buttonTarget.getAttribute("aria-expanded")==="true"}onDocumentClick(e){this.element.contains(e.target)||this.close()}onKeydown(e){e.key==="Escape"&&this.close({restoreFocus:!0})}}$(TE,"targets",["button","panel"]);const BP=Object.freeze(Object.defineProperty({__proto__:null,default:TE},Symbol.toStringTag,{value:"Module"}));class SE extends U{initialize(){this.resultTarget=document.getElementById("results"),this.domainAndUrlRegEx=/^(((http|https):\/\/|)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}(:[0-9]{1,5})?(\/.*)?)$/,this.inputTargets.forEach(e=>{e.addEventListener("focus",this.focus.bind(this)),e.addEventListener("blur",this.blur.bind(this))}),new Qu(".element",{onMoreLess:(e,t)=>{}})}focus(){this.element.classList.add("active")}blur(){this.inputTargets.every(e=>e!==document.activeElement)&&this.element.classList.remove("active")}refreshRecaptcha(){typeof grecaptcha<"u"&&this.element.querySelector(".g-recaptcha")&&grecaptcha.reset()}}$(SE,"targets",["input","alert","domain"]);const FP=Object.freeze(Object.defineProperty({__proto__:null,default:SE},Symbol.toStringTag,{value:"Module"}));class CE extends U{initialize(){this.resultTarget=document.getElementById("results"),this.domainAndUrlRegEx=/^(((http|https):\/\/|)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}(:[0-9]{1,5})?(\/.*)?)$/,this.inputTargets.forEach(e=>{e.addEventListener("focus",this.focus.bind(this)),e.addEventListener("blur",this.blur.bind(this))}),new Qu(".element",{onMoreLess:(e,t)=>{}})}focus(){this.element.classList.add("active")}blur(){this.inputTargets.every(e=>e!==document.activeElement)&&this.element.classList.remove("active")}refreshRecaptcha(){typeof grecaptcha<"u"&&this.element.querySelector(".g-recaptcha")&&grecaptcha.reset()}}$(CE,"targets",["input","alert","domain"]);const zP=Object.freeze(Object.defineProperty({__proto__:null,default:CE},Symbol.toStringTag,{value:"Module"}));class kE extends U{connect(){this.loadGoogleOneTap()}loadGoogleOneTap(){if(!this.clientIdValue){console.error("Google Client ID is required.");return}const e=document.createElement("script");e.src="https://accounts.google.com/gsi/client",e.async=!0,e.defer=!0,e.onload=()=>{google.accounts.id.initialize({client_id:this.clientIdValue,callback:this.handleCredentialResponse.bind(this),ux_mode:"popup",auto_select:!1,cancel_on_tap_outside:!0,context:"signin"}),google.accounts.id.prompt()},document.head.appendChild(e)}async handleCredentialResponse(e){console.log("Google Credential Response:",e);const t=e.credential;try{const n=await ye(this.endpointValue,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({idToken:t})}),r=await n.json();n.ok?(console.log("User authenticated successfully:",r),window.location.reload()):console.error("Authentication failed:",r)}catch(n){console.error("Error authenticating user:",n)}}}$(kE,"values",{clientId:String,endpoint:String});const VP=Object.freeze(Object.defineProperty({__proto__:null,default:kE},Symbol.toStringTag,{value:"Module"}));var cu=function(){return cu=Object.assign||function(i){for(var e,t=1,n=arguments.length;t<n;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},cu.apply(this,arguments)},ab=function(){function i(e,t,n){var r=this;this.endVal=t,this.options=n,this.version="2.8.0",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(s){r.startTime||(r.startTime=s);var o=s-r.startTime;r.remaining=r.duration-o,r.useEasing?r.countDown?r.frameVal=r.startVal-r.easingFn(o,0,r.startVal-r.endVal,r.duration):r.frameVal=r.easingFn(o,r.startVal,r.endVal-r.startVal,r.duration):r.frameVal=r.startVal+(r.endVal-r.startVal)*(o/r.duration);var l=r.countDown?r.frameVal<r.endVal:r.frameVal>r.endVal;r.frameVal=l?r.endVal:r.frameVal,r.frameVal=Number(r.frameVal.toFixed(r.options.decimalPlaces)),r.printValue(r.frameVal),o<r.duration?r.rAF=requestAnimationFrame(r.count):r.finalEndVal!==null?r.update(r.finalEndVal):r.options.onCompleteCallback&&r.options.onCompleteCallback()},this.formatNumber=function(s){var o,l,a,u,c=s<0?"-":"";o=Math.abs(s).toFixed(r.options.decimalPlaces);var h=(o+="").split(".");if(l=h[0],a=h.length>1?r.options.decimal+h[1]:"",r.options.useGrouping){u="";for(var d=3,f=0,p=0,b=l.length;p<b;++p)r.options.useIndianSeparators&&p===4&&(d=2,f=1),p!==0&&f%d==0&&(u=r.options.separator+u),f++,u=l[b-p-1]+u;l=u}return r.options.numerals&&r.options.numerals.length&&(l=l.replace(/[0-9]/g,function(m){return r.options.numerals[+m]}),a=a.replace(/[0-9]/g,function(m){return r.options.numerals[+m]})),c+r.options.prefix+l+a+r.options.suffix},this.easeOutExpo=function(s,o,l,a){return l*(1-Math.pow(2,-10*s/a))*1024/1023+o},this.options=cu(cu({},this.defaults),n),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(t),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,this.options.separator===""&&(this.options.useGrouping=!1),this.el=typeof e=="string"?document.getElementById(e):e,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined",typeof window<"u"&&this.options.enableScrollSpy&&(this.error?console.error(this.error,e):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push(function(){return r.handleScroll(r)}),window.onscroll=function(){window.onScrollFns.forEach(function(s){return s()})},this.handleScroll(this)))}return i.prototype.handleScroll=function(e){if(e&&window&&!e.once){var t=window.innerHeight+window.scrollY,n=e.el.getBoundingClientRect(),r=n.top+window.pageYOffset,s=n.top+n.height+window.pageYOffset;s<t&&s>window.scrollY&&e.paused?(e.paused=!1,setTimeout(function(){return e.start()},e.options.scrollSpyDelay),e.options.scrollSpyOnce&&(e.once=!0)):(window.scrollY>s||r>t)&&!e.paused&&e.reset()}},i.prototype.determineDirectionAndSmartEasing=function(){var e=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>e;var t=e-this.startVal;if(Math.abs(t)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=e;var n=this.countDown?1:-1;
268this.endVal=e+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=e,this.finalEndVal=null;this.finalEndVal!==null?this.useEasing=!1:this.useEasing=this.options.useEasing},i.prototype.start=function(e){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),e&&(this.options.onCompleteCallback=e),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},i.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},i.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},i.prototype.update=function(e){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(e),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,this.finalEndVal==null&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},i.prototype.printValue=function(e){var t;if(this.el){var n=this.formattingFn(e);!((t=this.options.plugin)===null||t===void 0)&&t.render?this.options.plugin.render(this.el,n):this.el.tagName==="INPUT"?this.el.value=n:this.el.tagName==="text"||this.el.tagName==="tspan"?this.el.textContent=n:this.el.innerHTML=n}},i.prototype.ensureNumber=function(e){return typeof e=="number"&&!isNaN(e)},i.prototype.validateValue=function(e){var t=Number(e);return this.ensureNumber(t)?t:(this.error="[CountUp] invalid start or end value: ".concat(e),null)},i.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},i}();class _E extends U{connect(){this.startCounters(),document.querySelector('[data-home-target="tabSlide"]')&&(this.tabSlideTarget&&(this.swiper=new at(this.tabSlideTarget,{autoplay:{delay:5e3,disableOnInteraction:!1},slidesPerView:1,spaceBetween:10,pagination:{el:null},on:{slideChange:()=>this.updatePagination()}})),this.updatePagination=this.updatePagination.bind(this),this.updatePagination()),this.hasCustomerSlideTarget&&(this.customer=new at(this.customerSlideTarget,{autoplay:{delay:5e3,disableOnInteraction:!1},slidesPerView:7,spaceBetween:10,pagination:{el:null}})),document.addEventListener("scroll",this.stickyHeader.bind(this))}demoSectionTargetConnected(e){!e.dataset.loaded&&e.dataset.demoUrl&&setTimeout(()=>{turboFetch(e.dataset.demoUrl,function(){e.dataset.loaded=!0})},0)}disconnect(){document.removeEventListener("scroll",this.stickyHeader.bind(this))}goToSlide(e){const t=e.target.dataset.slideIndex;this.swiper.slideToLoop(t),this.updatePagination()}updatePagination(){const e=this.swiper.realIndex;this.paginationTarget.querySelectorAll("li").forEach((t,n)=>{t.classList.toggle("active",n==e),t.classList.toggle("flex-1",n==e)})}stickyHeader(){const e=document.getElementById("header");if(e){const t=window.scrollY,n=(e.dataset.activeClass||"").split(" ").filter(Boolean),r=(e.dataset.inactiveClass||"").split(" ").filter(Boolean);t>0?(n.length&&e.classList.add(...n),r.length&&e.classList.remove(...r)):(n.length&&e.classList.remove(...n),r.length&&e.classList.add(...r))}}changedTab(e){e.detail.success&&(this.tabSearchTarget.classList.toggle("is-company"),this.tabSearchTarget.classList.toggle("is-people"))}openLearnMore(e){var r,s;if(e&&e.preventDefault(),!this.hasLearnMoreTarget)return;const t=this.learnMoreTarget,n=(s=(r=e==null?void 0:e.currentTarget)==null?void 0:r.dataset)==null?void 0:s.text;t.classList.contains("hidden")?(t.classList.remove("hidden"),t.setAttribute("aria-hidden","false"),this.hasLearnMoreTextTarget&&(this.learnMoreTextTarget.textContent="Close"),this.hasLearnMoreIconTarget&&this.learnMoreIconTarget.classList.add("hidden"),this.hasLearnMoreCloseIconTarget&&this.learnMoreCloseIconTarget.classList.remove("hidden"),n&&this.setLearnMorePrompt(n),this.startCounters(),t.scrollIntoView({behavior:"smooth",block:"start"})):(t.classList.add("hidden"),t.setAttribute("aria-hidden","true"),this.hasLearnMoreTextTarget&&(this.learnMoreTextTarget.textContent="Learn more"),this.hasLearnMoreIconTarget&&this.learnMoreIconTarget.classList.remove("hidden"),this.hasLearnMoreCloseIconTarget&&this.learnMoreCloseIconTarget.classList.add("hidden"))}setLearnMorePrompt(e){if(!e)return;const t=document.querySelector('[data-controller~="ai-hero-search"]');if(!t)return;const n=this.application.getControllerForElementAndIdentifier(t,"ai-hero-search");n!=null&&n.hasTextareaTarget&&(n.textareaTarget.value=e,n.textareaTarget.dispatchEvent(new Event("input")),n.textareaTarget.focu
268s({preventScroll:!0}))}startCounters(){const e=!this.hasLearnMoreTarget||!this.learnMoreTarget.classList.contains("hidden");this.hasProspectCounterTarget&&!this.prospectCounterInstance&&(this.prospectCounterInstance=new ab("prospectCounter",this.prospectCounterTarget.dataset.counter)),e&&this.prospectCounterInstance&&!this.prospectCounterInstance.error&&this.prospectCounterInstance.start(),this.hasUserCounterTarget&&!this.userCounterInstance&&(this.userCounterInstance=new ab("userCounter",this.userCounterTarget.dataset.counter)),e&&this.userCounterInstance&&!this.userCounterInstance.error&&this.userCounterInstance.start()}toggleLearnMore(e){if(e&&e.preventDefault(),!this.hasLearnMoreContentTarget)return;const t=this.learnMoreContentTarget,n=(e==null?void 0:e.currentTarget)||document.getElementById("learn-more-toggle"),r=n==null?void 0:n.querySelector("#learn-more-icon");if(t.classList.contains("hidden")){if(t.classList.remove("hidden"),t.style.maxHeight="none",n){const o=n.querySelector("span");o&&(o.textContent="Show less"),r&&r.classList.add("rotate-180"),n.setAttribute("aria-expanded","true")}t.setAttribute("aria-hidden","false"),setTimeout(()=>{t.scrollIntoView({behavior:"smooth",block:"start"})},100),this.startCounters()}else{if(t.classList.add("hidden"),n){const o=n.querySelector("span");o&&(o.textContent="Learn more about AeroLeads"),r&&r.classList.remove("rotate-180"),n.setAttribute("aria-expanded","false")}t.setAttribute("aria-hidden","true"),setTimeout(()=>{n==null||n.scrollIntoView({behavior:"smooth",block:"center"})},100)}}}$(_E,"targets",["prospectCounter","userCounter","tabSlide","customerSlide","pagination","tabSearch","demoSection","learnMore","learnMoreToggle","learnMoreText","learnMoreIcon","learnMoreCloseIcon","learnMoreContent"]);const HP=Object.freeze(Object.defineProperty({__proto__:null,default:_E},Symbol.toStringTag,{value:"Module"}));class AE extends U{connect(){this.paginationsTarget.addEventListener("scroll",this.handleScroll.bind(this))}handleScroll(){this.paginationsTarget.scrollTop+this.paginationsTarget.clientHeight>=this.paginationsTarget.scrollHeight-100&&this.loadMore()}loadMore(){const e=document.getElementById("pagination");e&&(e.removeAttribute("complete"),e.removeAttribute("loading"),e.reload())}}$(AE,"targets",["paginations","pagination"]);const jP=Object.freeze(Object.defineProperty({__proto__:null,default:AE},Symbol.toStringTag,{value:"Module"}));class LE extends U{connect(){this.model=this.data.get("model")||"model",this.name=this.data.get("name")||"name",this.method=this.data.get("method")||"post",this.input_class=this.data.get("input-class")||"input",this.url=this.data.get("url")||window.location.pathname,this.hasEditTarget||this.hasDisplayTarget||(this.sourceTarget.innerHTML=this.display())}toggle(){this.data.get("toggled")!=1&&(console.log("Toggle"),this.render())}close(e){this.element.contains(e.target)===!1&&this.data.get("toggled")==1&&this.render()}submit(){this.formTarget.requestSubmit()}render(){this.data.get("toggled")==1?(this.hasDisplayTarget?(this.displayTarget.classList.remove("hidden"),this.formTarget.classList.add("hidden")):this.sourceTarget.innerHTML=this.sourceTarget.dataset.displayHTML,this.data.set("toggled",0)):(this.hasDisplayTarget?(this.displayTarget.classList.add("hidden"),this.hasFormTarget?this.formTarget.classList.remove("hidden"):this.sourceTarget.insertAdjacentHTML("beforeend",this.form())):(this.sourceTarget.dataset.displayHTML=this.sourceTarget.innerHTML,this.sourceTarget.innerHTML=this.form()),this.data.set("toggled",1))}cancel(){this.render()}display(){return` 269 <div class="flex items-center space-x-2"> 270 <div data-target="inline-edit.source"> 271 ${this.sourceTarget.innerHTML} 272 </div> 273 <button data-action="click->inline-edit#toggle" data-target="inline-edit.edit"> 274 <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M19.045 7.401c.378-.378.586-.88.586-1.414s-.208-1.036-.586-1.414l-1.586-1.586c-.378-.378-.88-.586-1.414-.586s-1.036.208-1.413.585L4 13.585V18h4.413L19.045 7.401zm-3-3 1.587 1.585-1.59 1.584-1.586-1.585 1.589-1.584zM6 16v-1.585l7.04-7.018 1.586 1.586L7.587 16H6zm-2 4h16v2H4z"></path></svg> 275 </button> 276 </div> 277 `}form(){return` 278 <form class="px-4" action="${this.post_url}" accept-charset="UTF-8" data-turbo-stream="true" data-turbo="true" data-action="turbo:submit-end->inline-edit#cancel" data-target="inline-edit.form" method="${this.method}"> 279 <input name="utf8" type="hidden" value="â"> 280 <input type="hidden" name="_method" value="patch"> 281 <input type="hidden" name="format" value="turbo_stream"> 282 <input type="hidden" name="authenticity_token" value="${this.authenticity_token}"> 283 <div class="min-w-md flex items-center space-x-4"> 284 <input type="hidden" name="commit" value="${this.name}"/> 285 <input type="text" value="${this.input_value}" name="${this.model}[${this.name}]" class="${this.input_class}" id="${this.model}_${this.name}" data-target="inline-edit.input"/> 286 <div class="flex items-center space-x-2 rtl:space-x-reverse"> 287 <button data-action="click->
287inline-edit#submit" type="button" data-target="inline-edit.submit" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Save</button> 288 <button type="button" data-action="click->inline-edit#cancel" data-target="inline-edit.cancel" class="py-2.5 px-5 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">Cancel</button> 289 </div> 290 </div> 291 </form> 292 `}get input_value(){return this.textTarget.textContent.trim()}get post_url(){return this.url}get authenticity_token(){return document.querySelector("meta[name='csrf-token']").getAttribute("content")}}$(LE,"targets",["source","form","input","submit","cancel","edit","display","text"]);const $P=Object.freeze(Object.defineProperty({__proto__:null,default:LE},Symbol.toStringTag,{value:"Module"}));class Zh extends U{connect(){try{this.initIntro(),this.bindStartButton();let e=!0;const t=document.getElementById("searchForm");t&&(e=t.dataset.demoMode!="true"),e&&this.firstLoginValue&&this.shouldAutoStart()&&this.openOnboardModal(),document.addEventListener("application:recommended-closed",()=>{this.startTour()})}catch(e){console.error("Error in connect:",e)}}disconnected(){document.removeEventListener("application:recommended-closed",()=>{this.startTour()})}initIntro(){const e=this;this.intro=ru();const t=this.stepsValue.length?this.stepsValue:this.defaultSteps();this.intro.setOptions({steps:t,nextLabel:this.nextLabelValue||"Next",prevLabel:this.prevLabelValue||"Previous",doneLabel:this.doneLabelValue||"Done",showProgress:!1,showBullets:!0,disableInteraction:!0,showTitlebar:!1,showSkipButton:!0}),this.intro.onbeforechange(n=>{console.log("onbeforechange",n),e.highlightStep(),e.beforeNextStep(n)}),this.intro.oncomplete(()=>{e.endTour();const n=document.querySelector(".search_step_11");n&&(n.style.display="")}),this.intro.onexit(()=>{e.endTour();const n=document.querySelector(".search_step_11");n&&(n.style.display="")})}beforeNextStep(e){try{const t=this.intro._currentStep;if(t===1&&(console.log("Performing specific action at step 2"),this.isMobile())){const n=document.getElementById("toggleDrawerSearchFilter");n&&n.click()}if(t===2&&this.scrollToElement(e),t===9){const n=document.querySelector(".search_step_11");n&&(n.style.display="inline-flex")}}catch(t){console.error("Error in beforeNextStep:",t)}}openOnboardModal(){this.dispatch("intro:onboard",{detail:{}})}isMobile(){const e=new av(window.navigator.userAgent);return window.innerWidth<=768||e.mobile()}scrollToElement(e){try{const t=document.getElementById("listScroll"),n=document.querySelector(".search_step_4");if(t){const r=n.offsetLeft,s=t.offsetLeft;t.scrollTo({left:r-s-20,behavior:"smooth"})}}catch(t){console.error("Error in scrollToElement:",t)}}getScrollableParent(e){let t=e.parentElement;if(e.closest(".absolute.overflow-auto"))return e.closest(".absolute.overflow-auto");for(;t;){const n=window.getComputedStyle(t).overflowX;if(n==="auto"||n==="scroll")return t;t=t.parentElement}return null}bindStartButton(){this.hasStartButtonTarget&&this.startButtonTarget.addEventListener("click",()=>this.startTour())}startTour(){try{this.intro.start()}catch(e){console.error("Error in startTour:",e)}}highlightStep(){var e;try{const t=(e=this.intro._introItems[this.intro._currentStep])==null?void 0:e.element}catch(t){console.error("Error in highlightStep:",t)}}endTour(){try{console.log("Tour ended"),localStorage.setItem("introCompleted_"+this.userIdValue,"true")}catch(e){console.error("Error in endTour:",e)}}shouldAutoStart(){return localStorage.getItem("introCompleted_"+this.userIdValue)!=="true"}defaultSteps(){return[{position:"right",intro:"Welcome to Aeroleads Search. You can find contacts of several leads using different filters here. Enter a value and then hit enter to filter for more than one values of a field.",element:".search_step_1"},{intro:"Submit applied filter.",element:".search_step_2"},{intro:"Choose which list to save your contacts to.",element:".search_step_3"},{intro:"Add prospect to your list",element:".search_step_4"},{intro:"Go to the list",element:".search_step_5"},{intro:"Check this to select all results",element:".search_step_6"},{intro:"Save all of the selected results at once in your prospects lists.",element:".search_step_7"},{intro:"Save all the results at once to your list.",element:".search_step_8"},{intro:"Save your filter using this button",element:".search_step_9"},{intro:"View your saved filters here",element:".search_step_10"},{intro:"Reset applied filter.",element:".search_step_11"}]}}$(Zh,"targets",["startButton"]),$(Zh,"values",{steps:Array,startLabel:String,nextLabel:String,prevLabel:String,doneLabel:String,autoStart:Boolean,firstLogin:Bo
292olean,userId:String});const qP=Object.freeze(Object.defineProperty({__proto__:null,default:Zh},Symbol.toStringTag,{value:"Module"}));function lb(i,e,t){const r={value:e,expiry:new Date().getTime()+t};localStorage.setItem(i,JSON.stringify(r))}function UP(i){const e=localStorage.getItem(i);if(!e)return null;const t=JSON.parse(e);return new Date().getTime()>t.expiry?(localStorage.removeItem(i),null):t.value}class ef extends U{constructor(){super(...arguments);$(this,"handleCalendlyEvent",t=>{t.origin==="https://calendly.com"&&t.data.event&&(t.data.event==="calendly.event_scheduled"?(this.titleTarget.innerHTML="Who rocks?! You rock.",this.summaryTarget.innerHTML="We will be in touch soon.",this.contactTarget.classList.add("hidden"),setTimeout(()=>{this.calendarModal.hide(),this.formModal.show(),setTimeout(()=>{this.formModal.hide()},5e3)},3e3)):t.data.event==="calendly.event_type_viewed"&&(this.calendarLoadingTarget.classList.add("hidden"),this.calendarTarget.classList.remove("hidden"),this.calendarCloseTarget.classList.remove("hidden"),this.formModal.hide()))})}async connect(){UP("letsTalkDismissed")||(this.userScrolled=!1,this.timer=null,this._handleScroll=this._handleScroll.bind(this),this._handleVisibilityChange=this._handleVisibilityChange.bind(this),window.addEventListener("message",this.handleCalendlyEvent),window.addEventListener("scroll",this._handleScroll),document.addEventListener("visibilitychange",this._handleVisibilityChange))}disconnect(){window.removeEventListener("message",this.handleCalendlyEvent),window.removeEventListener("scroll",this._handleScroll),document.removeEventListener("visibilitychange",this._handleVisibilityChange),this.timer&&clearTimeout(this.timer)}contactTargetConnected(t){this._submitHandler=n=>{if(n.preventDefault(),t.checkValidity())return this.checkboxTarget.checked=!0,!1;t.reportValidity()},t.addEventListener("submit",this._submitHandler)}contactTargetDisconnected(t){this._submitHandler&&t.removeEventListener("submit",this._submitHandler)}_handleScroll(){this.userScrolled||(this.userScrolled=!0,this.timer=setTimeout(()=>{this.open()},this.delayValue))}_handleVisibilityChange(){document.hidden&&this.timer&&clearTimeout(this.timer)}async loadCalendlyWidget(){return new Promise(t=>{if(typeof Calendly>"u"){const n=document.createElement("script");n.src="https://assets.calendly.com/assets/external/widget.js",n.async=!0,n.addEventListener("load",t),document.head.appendChild(n)}else t()})}async setCalendlyWidget(){const t="https://calendly.com/vinodh-aeroleads/30min",n=`${this.firstNameTarget.value} ${this.lastNameTarget.value}`.trim(),r=this.emailTarget.value,s=`${t}?email=${encodeURIComponent(r)}&full_name=${encodeURIComponent(n)}`;Calendly.initInlineWidget({url:s,parentElement:this.calendarTarget,prefill:{email:r,full_name:n}})}nextStep(t){t.preventDefault(),this.contactTarget.checkValidity()?this.checkboxTarget.checked=!0:this.contactTarget.reportValidity()}async getStarted(t){t.preventDefault(),this.contactTarget.checkValidity()?(this.calendarCloseTarget.classList.add("hidden"),this.calendarTarget.innerHTML="",await this.setCalendlyWidget(),this.openCalendar()):this.contactTarget.reportValidity()}close(){this.formModal.hide()}open(){if(!this.element)return;const t={placement:"center-center",backdrop:"dynamic",backdropClasses:"let-talk-modal bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-50",closable:!1,onHide:()=>{lb("letsTalkDismissed",!0,this.dismissTtlValue)},onShow:()=>{},onToggle:()=>{}},n={id:"let-talk-modal",override:!0};this.formModal=new Modal(this.formModalTarget,t,n),this.formModal.show()}openCalendar(){if(!this.element)return;const t={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-50",closable:!0,onHide:()=>{lb("letsTalkDismissed",!0,this.dismissTtlValue)},onShow:()=>{},onToggle:()=>{}},n={id:"calendar-modal",override:!0};this.calendarModal=new Modal(this.calendarModalTarget,t,n),this.calendarModal.show()}closeCalendar(){this.calendarModal.hide()}}$(ef,"values",{delay:{type:Number,default:3e4},dismissTtl:{type:Number,default:864e5}}),$(ef,"targets",["formModal","calendarModal","title","summary","calendar","contact","book","checkbox","started","email","firstName","lastName","calendarLoading","calendarClose"]);const WP=Object.freeze(Object.defineProperty({__proto__:null,default:ef},Symbol.toStringTag,{value:"Module"}));class ME extends Ii{connect(){super.connect(),this.updateSelectIds=this.updateSelectIds.bind(this),this.toggleDeleteButton=this.toggleDeleteButton.bind(this),this.toggleDeleteButton()}toggleDeleteButton(){this.updateSelectIds()}toggle(e){super.toggle(e),this.updateSelectIds()}updateSelectIds(){const e=document.getElementById("deleteButton"),t=document.getElementById("deleteButton").closest("form");if(this.checked.length>0){const n=this.checked.map(r=>r.value).join(",");t.setAttribute("action",`/lists/${n}?format=js`),e.classList.remove("d-none")}else t.setAttribute("action","/lists/0?format=js"),e.classList.add("d-none")}}$(ME,"targets",["checkbox","checkboxAll"]);const GP=Object.freeze(Object.defineProperty({__proto__:null,default:ME},Symbol.toStringTag,{value:"Module"}));
292Ec({focusOnError:!0});class IE extends sa{initialize(){this.signIn=this.signIn.bind(this)}signIn(){const e=this;this._form.validate().then(function(){e.loadTargets[1].setAttribute("hidden",!0),e.loadTargets[0].removeAttribute("hidden"),e.formTarget.submit()}).catch(function(t){const n=e._form.elementsWithError[0];n&&(n.raw.focus(),e._displayFormErrors())})}}$(IE,"targets",["load","form","button","email","password"]);const KP=Object.freeze(Object.defineProperty({__proto__:null,default:IE},Symbol.toStringTag,{value:"Module"}));var OE={exports:{}};(function(i){(function(){}).call(ee),(function(){window.Set==null&&(window.Set=function(){function e(){this.clear()}return e.prototype.clear=function(){return this.values=[]},e.prototype.has=function(t){return this.values.indexOf(t)!==-1},e.prototype.add=function(t){return this.has(t)||this.values.push(t),this},e.prototype.delete=function(t){var n;return(n=this.values.indexOf(t))===-1?!1:(this.values.splice(n,1),!0)},e.prototype.forEach=function(){var t;return(t=this.values).forEach.apply(t,arguments)},e}())}).call(ee),function(e){function t(){}function n(p,b){return function(){p.apply(b,arguments)}}function r(p){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof p!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(p,this)}function s(p,b){for(;p._state===3;)p=p._value;return p._state===0?void p._deferreds.push(b):(p._handled=!0,void d(function(){var m=p._state===1?b.onFulfilled:b.onRejected;if(m===null)return void(p._state===1?o:l)(b.promise,p._value);var v;try{v=m(p._value)}catch(g){return void l(b.promise,g)}o(b.promise,v)}))}function o(p,b){try{if(b===p)throw new TypeError("A promise cannot be resolved with itself.");if(b&&(typeof b=="object"||typeof b=="function")){var m=b.then;if(b instanceof r)return p._state=3,p._value=b,void a(p);if(typeof m=="function")return void c(n(m,b),p)}p._state=1,p._value=b,a(p)}catch(v){l(p,v)}}function l(p,b){p._state=2,p._value=b,a(p)}function a(p){p._state===2&&p._deferreds.length===0&&setTimeout(function(){p._handled||f(p._value)},1);for(var b=0,m=p._deferreds.length;m>b;b++)s(p,p._deferreds[b]);p._deferreds=null}function u(p,b,m){this.onFulfilled=typeof p=="function"?p:null,this.onRejected=typeof b=="function"?b:null,this.promise=m}function c(p,b){var m=!1;try{p(function(v){m||(m=!0,o(b,v))},function(v){m||(m=!0,l(b,v))})}catch(v){if(m)return;m=!0,l(b,v)}}var h=setTimeout,d=typeof setImmediate=="function"&&setImmediate||function(p){h(p,1)},f=function(p){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",p)};r.prototype.catch=function(p){return this.then(null,p)},r.prototype.then=function(p,b){var m=new r(t);return s(this,new u(p,b,m)),m},r.all=function(p){var b=Array.prototype.slice.call(p);return new r(function(m,v){function g(E,x){try{if(x&&(typeof x=="object"||typeof x=="function")){var S=x.then;if(typeof S=="function")return void S.call(x,function(_){g(E,_)},v)}b[E]=x,--y===0&&m(b)}catch(_){v(_)}}if(b.length===0)return m([]);for(var y=b.length,w=0;w<b.length;w++)g(w,b[w])})},r.resolve=function(p){return p&&typeof p=="object"&&p.constructor===r?p:new r(function(b){b(p)})},r.reject=function(p){return new r(function(b,m){m(p)})},r.race=function(p){return new r(function(b,m){for(var v=0,g=p.length;g>v;v++)p[v].then(b,m)})},r._setImmediateFn=function(p){d=p},r._setUnhandledRejectionFn=function(p){f=p},i.exports?i.exports=r:e.Promise||(e.Promise=r)}(ee),(function(){var e=typeof window.customElements=="object",t=typeof document.registerElement=="function",n=e||t;n||(typeof WeakMap>"u"&&function(){var r=Object.defineProperty,s=Date.now()%1e9,o=function(){this.name="__st"+(1e9*Math.random()>>>0)+(s+++"__")};o.prototype={set:function(l,a){var u=l[this.name];return u&&u[0]===l?u[1]=a:r(l,this.name,{value:[l,a],writable:!0}),this},get:function(l){var a;return(a=l[this.name])&&a[0]===l?a[1]:void 0},delete:function(l){var a=l[this.name];return a&&a[0]===l?(a[0]=a[1]=void 0,!0):!1},has:function(l){var a=l[this.name];return a?a[0]===l:!1}},window.WeakMap=o}(),function(r){function s(k){_.push(k),S||(S=!0,y(l))}function o(k){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(k)||k}function l(){S=!1;var k=_;_=[],k.sort(function(C,T){return C.uid_-T.uid_});var A=!1;
292k.forEach(function(C){var T=C.takeRecords();a(C),T.length&&(C.callback_(T,C),A=!0)}),A&&l()}function a(k){k.nodes_.forEach(function(A){var C=w.get(A);C&&C.forEach(function(T){T.observer===k&&T.removeTransientObservers()})})}function u(k,A){for(var C=k;C;C=C.parentNode){var T=w.get(C);if(T)for(var L=0;L<T.length;L++){var I=T[L],P=I.options;if(C===k||P.subtree){var R=A(P);R&&I.enqueue(R)}}}}function c(k){this.callback_=k,this.nodes_=[],this.records_=[],this.uid_=++M}function h(k,A){this.type=k,this.target=A,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function d(k){var A=new h(k.type,k.target);return A.addedNodes=k.addedNodes.slice(),A.removedNodes=k.removedNodes.slice(),A.previousSibling=k.previousSibling,A.nextSibling=k.nextSibling,A.attributeName=k.attributeName,A.attributeNamespace=k.attributeNamespace,A.oldValue=k.oldValue,A}function f(k,A){return O=new h(k,A)}function p(k){return D||(D=d(O),D.oldValue=k,D)}function b(){O=D=void 0}function m(k){return k===D||k===O}function v(k,A){return k===A?k:D&&m(k)?D:null}function g(k,A,C){this.observer=k,this.target=A,this.options=C,this.transientObservedNodes=[]}if(!r.JsMutationObserver){var y,w=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))y=setTimeout;else if(window.setImmediate)y=window.setImmediate;else{var E=[],x=String(Math.random());window.addEventListener("message",function(k){if(k.data===x){var A=E;E=[],A.forEach(function(C){C()})}}),y=function(k){E.push(k),window.postMessage(x,"*")}}var S=!1,_=[],M=0;c.prototype={observe:function(k,A){if(k=o(k),!A.childList&&!A.attributes&&!A.characterData||A.attributeOldValue&&!A.attributes||A.attributeFilter&&A.attributeFilter.length&&!A.attributes||A.characterDataOldValue&&!A.characterData)throw new SyntaxError;var C=w.get(k);C||w.set(k,C=[]);for(var T,L=0;L<C.length;L++)if(C[L].observer===this){T=C[L],T.removeListeners(),T.options=A;break}T||(T=new g(this,k,A),C.push(T),this.nodes_.push(k)),T.addListeners()},disconnect:function(){this.nodes_.forEach(function(k){for(var A=w.get(k),C=0;C<A.length;C++){var T=A[C];if(T.observer===this){T.removeListeners(),A.splice(C,1);break}}},this),this.records_=[]},takeRecords:function(){var k=this.records_;return this.records_=[],k}};var O,D;g.prototype={enqueue:function(k){var A=this.observer.records_,C=A.length;if(A.length>0){var T=A[C-1],L=v(T,k);if(L)return void(A[C-1]=L)}else s(this.observer);A[C]=k},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(k){var A=this.options;A.attributes&&k.addEventListener("DOMAttrModified",this,!0),A.characterData&&k.addEventListener("DOMCharacterDataModified",this,!0),A.childList&&k.addEventListener("DOMNodeInserted",this,!0),(A.childList||A.subtree)&&k.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(k){var A=this.options;A.attributes&&k.removeEventListener("DOMAttrModified",this,!0),A.characterData&&k.removeEventListener("DOMCharacterDataModified",this,!0),A.childList&&k.removeEventListener("DOMNodeInserted",this,!0),(A.childList||A.subtree)&&k.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(k){if(k!==this.target){this.addListeners_(k),this.transientObservedNodes.push(k);var A=w.get(k);A||w.set(k,A=[]),A.push(this)}},removeTransientObservers:function(){var k=this.transientObservedNodes;this.transientObservedNodes=[],k.forEach(function(A){this.removeListeners_(A);for(var C=w.get(A),T=0;T<C.length;T++)if(C[T]===this){C.splice(T,1);break}},this)},handleEvent:function(k){switch(k.stopImmediatePropagation(),k.type){case"DOMAttrModified":var A=k.attrName,C=k.relatedNode.namespaceURI,T=k.target,B=new f("attributes",T);B.attributeName=A,B.attributeNamespace=C;var L=k.attrChange===MutationEvent.ADDITION?null:k.prevValue;u(T,function(j){return!j.attributes||j.attributeFilter&&j.attributeFilter.length&&j.attributeFilter.indexOf(A)===-1&&j.attributeFilter.indexOf(C)===-1?void 0:j.attributeOldValue?p(L):B});break;case"DOMCharacterDataModified":var T=k.target,B=f("characterData",T),L=k.prevValue;u(T,function(j){return j.characterData?j.characterDataOldValue?p(L):B:void 0});break;case"DOMNodeRemoved":this.addTransientObserver(k.target);case"DOMNodeInserted":var I,P,R=k.target;k.type==="DOMNodeInserted"?(I=[R],P=[]):(I=[],P=[R]);var z=R.previousSibling,N=R.nextSibling,B=f("childList",k.target.parentNode);B.addedNodes=I,B.removedNodes=P,B.previousSibling=z,B.nextSibling=N,u(k.relatedNode,function(j){return j.childList?B:void 0})}b()}},r.JsMutationObserver=c,r.MutationObserver||(r.MutationObserver=c,c._isPolyfilled=!0)}}(self),function(){if(!window.performance||!window.performance.now){var r=Date.now();window.performance={now:function(){return Date.now()-r}}}window.requestAnimationFrame||(window.requestAnimationFrame=function(){var u=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return u?function(c){return u(function(){c(performance.now())})}:function(c){return window.setTimeout(c,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(u){clearTimeout(u)}}());var s=function(){var u=document.createEvent("Event");return u.initEvent("foo",!0,!0),u.preventDefault(),u.defaultPrevented}();if(!s){var o=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(o.call(this),Ob
vendor: 5,665 bytes, line 292
292ject.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var l=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||l&&typeof window.CustomEvent!="function")&&(window.CustomEvent=function(u,c){c=c||{};var h=document.createEvent("CustomEvent");return h.initCustomEvent(u,!!c.bubbles,!!c.cancelable,c.detail),h},window.CustomEvent.prototype=window.Event.prototype),!window.Event||l&&typeof window.Event!="function"){var a=window.Event;window.Event=function(u,c){c=c||{};var h=document.createEvent("Event");return h.initEvent(u,!!c.bubbles,!!c.cancelable),h},window.Event.prototype=a.prototype}}(),window.CustomElements=window.CustomElements||{flags:{}},function(r){var s=r.flags,o=[],l=function(u){o.push(u)},a=function(){o.forEach(function(u){u(r)})};r.addModule=l,r.initializeModules=a,r.hasNative=!!document.registerElement,r.isIE=/Trident/.test(navigator.userAgent),r.useNative=!s.register&&r.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(r){function s(h,d){o(h,function(f){return d(f)?!0:void l(f,d)}),l(h,d)}function o(h,d,f){var p=h.firstElementChild;if(!p)for(p=h.firstChild;p&&p.nodeType!==Node.ELEMENT_NODE;)p=p.nextSibling;for(;p;)d(p,f)!==!0&&o(p,d,f),p=p.nextElementSibling;return null}function l(h,d){for(var f=h.shadowRoot;f;)s(f,d),f=f.olderShadowRoot}function a(h,d){u(h,d,[])}function u(h,d,f){if(h=window.wrap(h),!(f.indexOf(h)>=0)){f.push(h);for(var p,b=h.querySelectorAll("link[rel="+c+"]"),m=0,v=b.length;v>m&&(p=b[m]);m++)p.import&&u(p.import,d,f);d(h)}}var c=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";r.forDocumentTree=a,r.forSubtree=s}),window.CustomElements.addModule(function(r){function s(C,T){return o(C,T)||l(C,T)}function o(C,T){return r.upgrade(C,T)?!0:void(T&&c(C))}function l(C,T){S(C,function(L){return o(L,T)?!0:void 0})}function a(C){D.push(C),O||(O=!0,setTimeout(u))}function u(){O=!1;for(var C,T=D,L=0,I=T.length;I>L&&(C=T[L]);L++)C();D=[]}function c(C){M?a(function(){h(C)}):h(C)}function h(C){C.__upgraded__&&!C.__attached&&(C.__attached=!0,C.attachedCallback&&C.attachedCallback())}function d(C){f(C),S(C,function(T){f(T)})}function f(C){M?a(function(){p(C)}):p(C)}function p(C){C.__upgraded__&&C.__attached&&(C.__attached=!1,C.detachedCallback&&C.detachedCallback())}function b(C){for(var T=C,L=window.wrap(document);T;){if(T==L)return!0;T=T.parentNode||T.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&T.host}}function m(C){if(C.shadowRoot&&!C.shadowRoot.__watched){x.dom&&console.log("watching shadow-root for: ",C.localName);for(var T=C.shadowRoot;T;)y(T),T=T.olderShadowRoot}}function v(C,T){if(x.dom){var L=T[0];if(L&&L.type==="childList"&&L.addedNodes&&L.addedNodes){for(var I=L.addedNodes[0];I&&I!==document&&!I.host;)I=I.parentNode;var P=I&&(I.URL||I._URL||I.host&&I.host.localName)||"";P=P.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",T.length,P||"")}var R=b(C);T.forEach(function(z){z.type==="childList"&&(k(z.addedNodes,function(N){N.localName&&s(N,R)}),k(z.removedNodes,function(N){N.localName&&d(N)}))}),x.dom&&console.groupEnd()}function g(C){for(C=window.wrap(C),C||(C=window.wrap(document));C.parentNode;)C=C.parentNode;var T=C.__observer;T&&(v(C,T.takeRecords()),u())}function y(C){if(!C.__observer){var T=new MutationObserver(v.bind(this,C));T.observe(C,{childList:!0,subtree:!0}),C.__observer=T}}function w(C){C=window.wrap(C),x.dom&&console.group("upgradeDocument: ",C.baseURI.split("/").pop());var T=C===window.wrap(document);s(C,T),y(C),x.dom&&console.groupEnd()}function E(C){_(C,w)}var x=r.flags,S=r.forSubtree,_=r.forDocumentTree,M=window.MutationObserver._isPolyfilled&&x["throttle-attached"];r.hasPolyfillMutations=M,r.hasThrottledAttached=M;var O=!1,D=[],k=Array.prototype.forEach.call.bind(Array.prototype.forEach),A=Element.prototype.createShadowRoot;A&&(Element.prototype.createShadowRoot=function(){var C=A.call(this);return window.CustomElements.watchShadow(this),C}),r.watchShadow=m,r.upgradeDocumentTree=E,r.upgradeDocument=w,r.upgradeSubtree=l,r.upgradeAll=s,r.attached=c,r.takeRecords=g}),window.CustomElements.addModule(function(r){function s(h,d){if(h.localName==="template"&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(h),!h.__upgraded__&&h.nodeType===Node.ELEMENT_NODE){var f=h.getAttribute("is"),p=r.getRegisteredDefinition(h.localName)||r.getRegisteredDefinition(f);if(p&&(f&&p.tag==h.localName||!f&&!p.extends))return o(h,p,d)}}function o(h,d,f){return c.upgrade&&console.group("upgrade:",h.localName),d.is&&h.setAttribute("is",d.is),l(h,d),h.__upgraded__=!0,u(h),f&&r.attached(h),r.upgradeSubtree(h,f),c.upgrade&&console.groupEnd(),h}function l(h,d){Object.__proto__||a(h,d.prototype,d.native),h.__proto__=d.prototype}function a(h,d,f){for(var p={},b=d;b!==f&&b!==HTMLElement.prototype;){for(var m,v=Object.getOwnPropertyNames(b),g=0;m=v[g];g++)p[m]||(Object.defineProperty(h,m,Object.getOwnPropertyDescriptor(b,m)),p[m]=1);b=Object.getPrototypeOf(b)}}function u(h){h.createdCallback&&h.createdCallback()}var c=r.flags;r.upgrade=s,r.upgradeWithDefinition=o,r.implementPrototype=l}),window.CustomElements.addModule(function(r){function s(C,T){var L=T||{};if(!C)throw new Error("document.registerElement: first argument `name` must not be empty");if(C.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(C)+"'.");if(a(C))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(C)+"'. The type name is invali
292d.");if(f(C))throw new Error("DuplicateDefinitionError: a type with name '"+String(C)+"' is already registered");return L.prototype||(L.prototype=Object.create(HTMLElement.prototype)),L.__name=C.toLowerCase(),L.extends&&(L.extends=L.extends.toLowerCase()),L.lifecycle=L.lifecycle||{},L.ancestry=u(L.extends),c(L),h(L),o(L.prototype),p(L.__name,L),L.ctor=b(L),L.ctor.prototype=L.prototype,L.prototype.constructor=L.ctor,r.ready&&w(document),L.ctor}function o(C){if(!C.setAttribute._polyfilled){var T=C.setAttribute;C.setAttribute=function(I,P){l.call(this,I,P,T)};var L=C.removeAttribute;C.removeAttribute=function(I){l.call(this,I,null,L)},C.setAttribute._polyfilled=!0}}function l(C,T,L){C=C.toLowerCase();var I=this.getAttribute(C);L.apply(this,arguments);var P=this.getAttribute(C);this.attributeChangedCallback&&P!==I&&this.attributeChangedCallback(C,I,P)}function a(C){for(var T=0;T<M.length;T++)if(C===M[T])return!0}function u(C){var T=f(C);return T?u(T.extends).concat([T]):[]}function c(C){for(var T,L=C.extends,I=0;T=C.ancestry[I];I++)L=T.is&&T.tag;C.tag=L||C.__name,L&&(C.is=C.__name)}function h(C){if(!Object.__proto__){var T=HTMLElement.prototype;if(C.is){var L=document.createElement(C.tag);T=Object.getPrototypeOf(L)}for(var I,P=C.prototype,R=!1;P;)P==T&&(R=!0),I=Object.getPrototypeOf(P),I&&(P.__proto__=I),P=I;R||console.warn(C.tag+" prototype not found in prototype chain for "+C.is),C.native=T}}function d(C){return x(k(C.tag),C)}function f(C){return C?O[C.toLowerCase()]:void 0}function p(C,T){O[C]=T}function b(C){return function(){return d(C)}}function m(C,T,L){return C===D?v(T,L):A(C,T)}function v(C,T){C&&(C=C.toLowerCase()),T&&(T=T.toLowerCase());var L=f(T||C);if(L){if(C==L.tag&&T==L.is)return new L.ctor;if(!T&&!L.is)return new L.ctor}var I;return T?(I=v(C),I.setAttribute("is",T),I):(I=k(C),C.indexOf("-")>=0&&S(I,HTMLElement),I)}function g(C,T){var L=C[T];C[T]=function(){var I=L.apply(this,arguments);return E(I),I}}var y,w=(r.isIE,r.upgradeDocumentTree),E=r.upgradeAll,x=r.upgradeWithDefinition,S=r.implementPrototype,_=r.useNative,M=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],O={},D="http://www.w3.org/1999/xhtml",k=document.createElement.bind(document),A=document.createElementNS.bind(document);y=Object.__proto__||_?function(C,T){return C instanceof T}:function(C,T){if(C instanceof T)return!0;for(var L=C;L;){if(L===T.prototype)return!0;L=L.__proto__}return!1},g(Node.prototype,"cloneNode"),g(document,"importNode"),document.registerElement=s,document.createElement=v,document.createElementNS=m,r.registry=O,r.instanceof=y,r.reservedTagList=M,r.getRegisteredDefinition=f,document.register=document.registerElement}),function(r){function s(){u(window.wrap(document)),window.CustomElements.ready=!0;var d=window.requestAnimationFrame||function(f){setTimeout(f,16)};d(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var o=r.useNative,l=r.initializeModules;if(r.isIE,o){var a=function(){};r.watchShadow=a,r.upgrade=a,r.upgradeAll=a,r.upgradeDocumentTree=a,r.upgradeSubtree=a,r.takeRecords=a,r.instanceof=function(d,f){return d instanceof f}}else l();var u=r.upgradeDocumentTree,c=r.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(d){return d}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(d){d.import&&c(wrap(d.import))}),document.readyState==="complete"||r.flags.eager)s();else if(document.readyState!=="interactive"||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var h=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(h,s)}else s()}(window.CustomElements))}).call(ee),(function(){}).call(ee),(function(){var e=this;(function(){(function(){this.Trix={VERSION:"1.3.2",ZERO_WIDTH_SPACE:"\uFEFF",NON_BREAKING_SPACE:" ",OBJECT_REPLACEMENT_CHARACTER:"",browser:{composesExistingText:/Android.*Chrome/.test(navigator.userAgent),forcesObjectResizing:/Trident.*rv:11/.test(navigator.userAgent),supportsInputEvents:function(){var n,r,s,o;if(typeof InputEvent>"u")return!1;for(o=["data","getTargetRanges","inputType"],n=0,r=o.length;r>n;n++)if(s=o[n],!(s in InputEvent.prototype))return!1;return!0}()},config:{}}}).call(this)}).call(e);var t=e.Trix;(function(){(function(){t.BasicObject=function(){function n(){}var r,s,o;return n.proxyMethod=function(l){var a,u,c,h,d;return c=s(l),a=c.name,h=c.toMethod,d=c.toProperty,u=c.optional,this.prototype[a]=function(){var f,p;return f=h!=null?u?typeof this[h]=="function"?this[h]():void 0:this[h]():d!=null?this[d]:void 0,u?(p=f!=null?f[a]:void 0,p!=null?r.call(p,f,arguments):void 0):(p=f[a],r.call(p,f,arguments))}},s=function(l){var a,u;
292if(!(u=l.match(o)))throw new Error("can't parse @proxyMethod expression: "+l);return a={name:u[4]},u[2]!=null?a.toMethod=u[1]:a.toProperty=u[1],u[3]!=null&&(a.optional=!0),a},r=Function.prototype.apply,o=/^(.+?)(\(\))?(\?)?\.(.+?)$/,n}()}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.Object=function(s){function o(){this.id=++l}var l;return n(o,s),l=0,o.fromJSONString=function(a){return this.fromJSON(JSON.parse(a))},o.prototype.hasSameConstructorAs=function(a){return this.constructor===(a!=null?a.constructor:void 0)},o.prototype.isEqualTo=function(a){return this===a},o.prototype.inspect=function(){var a,u,c;return a=(function(){var h,d,f;d=(h=this.contentsForInspection())!=null?h:{},f=[];for(u in d)c=d[u],f.push(u+"="+c);return f}).call(this),"#<"+this.constructor.name+":"+this.id+(a.length?" "+a.join(", "):"")+">"},o.prototype.contentsForInspection=function(){},o.prototype.toJSONString=function(){return JSON.stringify(this)},o.prototype.toUTF16String=function(){return t.UTF16String.box(this)},o.prototype.getCacheKey=function(){return this.id.toString()},o}(t.BasicObject)}).call(this),(function(){t.extend=function(n){var r,s;for(r in n)s=n[r],this[r]=s;return this}}).call(this),(function(){t.extend({defer:function(n){return setTimeout(n,1)}})}).call(this),(function(){var n,r;t.extend({normalizeSpaces:function(s){return s.replace(RegExp(""+t.ZERO_WIDTH_SPACE,"g"),"").replace(RegExp(""+t.NON_BREAKING_SPACE,"g")," ")},normalizeNewlines:function(s){return s.replace(/\r\n/g,` 293`)},breakableWhitespacePattern:RegExp("[^\\S"+t.NON_BREAKING_SPACE+"]"),squishBreakableWhitespace:function(s){return s.replace(RegExp(""+t.breakableWhitespacePattern.source,"g")," ").replace(/\ {2,}/g," ")},summarizeStringChange:function(s,o){var l,a,u,c;return s=t.UTF16String.box(s),o=t.UTF16String.box(o),o.length<s.length?(a=r(s,o),c=a[0],l=a[1]):(u=r(o,s),l=u[0],c=u[1]),{added:l,removed:c}}}),r=function(s,o){var l,a,u,c,h;return s.isEqualTo(o)?["",""]:(a=n(s,o),c=a.utf16String.length,u=c?(h=a.offset,l=s.codepoints.slice(0,h).concat(s.codepoints.slice(h+c)),n(o,t.UTF16String.fromCodepoints(l))):n(o,s),[a.utf16String.toString(),u.utf16String.toString()])},n=function(s,o){var l,a,u;for(l=0,a=s.length,u=o.length;a>l&&s.charAt(l).isEqualTo(o.charAt(l));)l++;for(;a>l+1&&s.charAt(a-1).isEqualTo(o.charAt(u-1));)a--,u--;return{utf16String:s.slice(l,a),offset:l}}}).call(this),(function(){t.extend({copyObject:function(n){var r,s,o;n==null&&(n={}),s={};for(r in n)o=n[r],s[r]=o;return s},objectsAreEqual:function(n,r){var s,o;if(n==null&&(n={}),r==null&&(r={}),Object.keys(n).length!==Object.keys(r).length)return!1;for(s in n)if(o=n[s],o!==r[s])return!1;return!0}})}).call(this),(function(){var n=[].slice;t.extend({arraysAreEqual:function(r,s){var o,l,a,u;if(r==null&&(r=[]),s==null&&(s=[]),r.length!==s.length)return!1;for(l=o=0,a=r.length;a>o;l=++o)if(u=r[l],u!==s[l])return!1;return!0},arrayStartsWith:function(r,s){return r==null&&(r=[]),s==null&&(s=[]),t.arraysAreEqual(r.slice(0,s.length),s)},spliceArray:function(){var r,s,o;return s=arguments[0],r=2<=arguments.length?n.call(arguments,1):[],o=s.slice(0),o.splice.apply(o,r),o},summarizeArrayChange:function(r,s){var o,l,a,u,c,h,d,f,p,b,m;for(r==null&&(r=[]),s==null&&(s=[]),o=[],b=[],a=new Set,u=0,d=r.length;d>u;u++)m=r[u],a.add(m);for(l=new Set,c=0,f=s.length;f>c;c++)m=s[c],l.add(m),a.has(m)||o.push(m);for(h=0,p=r.length;p>h;h++)m=r[h],l.has(m)||b.push(m);return{added:o,removed:b}}})}).call(this),(function(){var n,r,s,o;n=null,r=null,o=null,s=null,t.extend({getAllAttributeNames:function(){return n??(n=t.getTextAttributeNames().concat(t.getBlockAttributeNames()))},getBlockConfig:function(l){return t.config.blockAttributes[l]},getBlockAttributeNames:function(){return r??(r=Object.keys(t.config.blockAttributes))},getTextConfig:function(l){return t.config.textAttributes[l]},getTextAttributeNames:function(){return o??(o=Object.keys(t.config.textAttributes))},getListAttributeNames:function(){var l,a;return s??(s=function(){var u,c;u=t.config.blockAttributes,c=[];for(l in u)a=u[l].listAttribute,a!=null&&c.push(a);return c}())}})}).call(this),(function(){var n,r,s,o,l,a=[].indexOf||function(u){for(var c=0,h=this.length;h>c;c++)if(c in this&&this[c]===u)return c;return-1};n=document.documentElement,r=(s=(o=(l=n.matchesSelector)!=null?l:n.webkitMatchesSelector)!=null?o:n.msMatchesSelector)!=null?s:n.mozMatchesSelector,t.extend({handleEvent:function(u,c){var h,d,f,p,b,m,v,g,y,w,E;return v=c??{},b=v.onElement,p=v.matchingSelector,E=v.withCallback,f=v.inPhase,m=v.preventDefault,y=v.times,h=b??n,g=p,w=f==="capturing",d=function(x){var S;return y!=null&&--y===0&&d.destroy(),S=t.findClosestElementFromNode(x.target,{matchingSelector:g}),S!=null&&(E!=null&&E.call(S,x,S),m)?x.preventDefault():void 0},d.destroy=function(){return h.removeEventListener(u,d,w)},h.addEventListener(u,d,w),d},handleEventOnce:function(u,c){return c==null&&(c={}),c.times=1,t.handleEvent(u,c)},triggerEvent:function(u,c){var h,d,f,p,b,m,v;return v=c??{},m=v.onElement,d=v.bubbles,f=v.cancelable,h=v.attributes,p=m??n,d=d!==!1,f=f!==!1,b=document.createEvent("Events"),b.initEvent(u,d,f),h!=null&&t.extend.call(b,h),p.dispatchEvent(b)},elementMatchesSelector:function(u,c){return(u!=null?u.nodeType:void 0)===1?r.call(u,c):void 0},findClosestElementFromNode:function(u,c){var h,d,f;for(d=c??{},h=d.matchingSelector,f=d.untilNode;u!=null&&u.nodeType!==Node.ELEMENT_NODE;)u=u.parentNode;if(u!=null){if(h==null)return u;if(u.closest&&f==null)return u.closest(h);for(;u&&u!==f;){if(t.elementMatchesSelector(u,h))return u;u=u.parentNode}}},findInnerElement:function(u){for(;u!=null&&u.firstElementChild;)u=u.firstElementChild;return u},innerElementIsActive:function(u){return document.activeElement!==u&&t.elementContainsNode(u,document.activeElement)}
293,elementContainsNode:function(u,c){if(u&&c)for(;c;){if(c===u)return!0;c=c.parentNode}},findNodeFromContainerAndOffset:function(u,c){var h;if(u)return u.nodeType===Node.TEXT_NODE?u:c===0?(h=u.firstChild)!=null?h:u:u.childNodes.item(c-1)},findElementFromContainerAndOffset:function(u,c){var h;return h=t.findNodeFromContainerAndOffset(u,c),t.findClosestElementFromNode(h)},findChildIndexOfNode:function(u){var c;if(u!=null&&u.parentNode){for(c=0;u=u.previousSibling;)c++;return c}},removeNode:function(u){var c;return u!=null&&(c=u.parentNode)!=null?c.removeChild(u):void 0},walkTree:function(u,c){var h,d,f,p,b;return f=c??{},d=f.onlyNodesOfType,p=f.usingFilter,h=f.expandEntityReferences,b=function(){switch(d){case"element":return NodeFilter.SHOW_ELEMENT;case"text":return NodeFilter.SHOW_TEXT;case"comment":return NodeFilter.SHOW_COMMENT;default:return NodeFilter.SHOW_ALL}}(),document.createTreeWalker(u,b,p??null,h===!0)},tagName:function(u){var c;return u!=null&&(c=u.tagName)!=null?c.toLowerCase():void 0},makeElement:function(u,c){var h,d,f,p,b,m,v,g,y,w,E,x,S,_;if(c==null&&(c={}),typeof u=="object"?(c=u,u=c.tagName):c={attributes:c},f=document.createElement(u),c.editable!=null&&(c.attributes==null&&(c.attributes={}),c.attributes.contenteditable=c.editable),c.attributes){y=c.attributes;for(m in y)_=y[m],f.setAttribute(m,_)}if(c.style){w=c.style;for(m in w)_=w[m],f.style[m]=_}if(c.data){E=c.data;for(m in E)_=E[m],f.dataset[m]=_}if(c.className)for(x=c.className.split(" "),p=0,v=x.length;v>p;p++)d=x[p],f.classList.add(d);if(c.textContent&&(f.textContent=c.textContent),c.childNodes)for(S=[].concat(c.childNodes),b=0,g=S.length;g>b;b++)h=S[b],f.appendChild(h);return f},getBlockTagNames:function(){var u,c;return t.blockTagNames!=null?t.blockTagNames:t.blockTagNames=function(){var h,d;h=t.config.blockAttributes,d=[];for(u in h)c=h[u].tagName,c&&d.push(c);return d}()},nodeIsBlockContainer:function(u){return t.nodeIsBlockStartComment(u!=null?u.firstChild:void 0)},nodeProbablyIsBlockContainer:function(u){var c,h;return c=t.tagName(u),a.call(t.getBlockTagNames(),c)>=0&&(h=t.tagName(u.firstChild),a.call(t.getBlockTagNames(),h)<0)},nodeIsBlockStart:function(u,c){var h;return h=(c??{strict:!0}).strict,h?t.nodeIsBlockStartComment(u):t.nodeIsBlockStartComment(u)||!t.nodeIsBlockStartComment(u.firstChild)&&t.nodeProbablyIsBlockContainer(u)},nodeIsBlockStartComment:function(u){return t.nodeIsCommentNode(u)&&(u!=null?u.data:void 0)==="block"},nodeIsCommentNode:function(u){return(u!=null?u.nodeType:void 0)===Node.COMMENT_NODE},nodeIsCursorTarget:function(u,c){var h;return h=(c??{}).name,u?t.nodeIsTextNode(u)?u.data===t.ZERO_WIDTH_SPACE?h?u.parentNode.dataset.trixCursorTarget===h:!0:void 0:t.nodeIsCursorTarget(u.firstChild):void 0},nodeIsAttachmentElement:function(u){return t.elementMatchesSelector(u,t.AttachmentView.attachmentSelector)},nodeIsEmptyTextNode:function(u){return t.nodeIsTextNode(u)&&(u!=null?u.data:void 0)===""},nodeIsTextNode:function(u){return(u!=null?u.nodeType:void 0)===Node.TEXT_NODE}})}).call(this),(function(){var n,r,s,o,l;n=t.copyObject,o=t.objectsAreEqual,t.extend({normalizeRange:s=function(a){var u;if(a!=null)return Array.isArray(a)||(a=[a,a]),[r(a[0]),r((u=a[1])!=null?u:a[0])]},rangeIsCollapsed:function(a){var u,c,h;if(a!=null)return c=s(a),h=c[0],u=c[1],l(h,u)},rangesAreEqual:function(a,u){var c,h,d,f,p,b;if(a!=null&&u!=null)return d=s(a),h=d[0],c=d[1],f=s(u),b=f[0],p=f[1],l(h,b)&&l(c,p)}}),r=function(a){return typeof a=="number"?a:n(a)},l=function(a,u){return typeof a=="number"?a===u:o(a,u)}}).call(this),(function(){var n,r,s,o,l,a,u;t.registerElement=function(c,h){var d,f;return h==null&&(h={}),c=c.toLowerCase(),h=u(h),f=a(h),(d=f.defaultCSS)&&(delete f.defaultCSS,o(d,c)),l(c,f)},o=function(c,h){var d;return d=s(h),d.textContent=c.replace(/%t/g,h)},s=function(c){var h,d;return h=document.createElement("style"),h.setAttribute("type","text/css"),h.setAttribute("data-tag-name",c.toLowerCase()),(d=n())&&h.setAttribute("nonce",d),document.head.insertBefore(h,document.head.firstChild),h},n=function(){var c;return(c=r("trix-csp-nonce")||r("csp-nonce"))?c.getAttribute("content"):void 0},r=function(c){return document.head.querySelector("meta[name="+c+"]")},a=function(c){var h,d,f;d={};for(h in c)f=c[h],d[h]=typeof f=="function"?{value:f}:f;return d},u=function(){var c;return c=function(h){var d,f,p,b,m;for(d={},m=["initialize","connect","disconnect"],f=0,b=m.length;b>f;f++)p=m[f],d[p]=h[p],delete h[p];return d},window.customElements?function(h){var d,f,p,b,m;return m=c(h),p=m.initialize,d=m.connect,f=m.disconnect,p&&(b=d,d=function(){return this.initialized||(this.initialized=!0,p.call(this)),b!=null?b.call(this):void 0}),d&&(h.connectedCallback=d),f&&(h.disconnectedCallback=f),h}:function(h){var d,f,p,b;return b=c(h),p=b.initialize,d=b.connect,f=b.disconnect,p&&(h.createdCallback=p),d&&(h.attachedCallback=d),f&&(h.detachedCallback=f),h}}(),l=function(){return window.customElements?function(c,h){var d;return d=function(){return typeof Reflect=="object"?Reflect.construct(HTMLElement,[],d):HTMLElement.apply(this)},Object.setPrototypeOf(d.prototype,HTMLElement.prototype),Object.setPrototypeOf(d,HTMLElement),Object.defineProperties(d.prototype,h),window.customElements.define(c,d),d}:function(c,h){var d,f;return f=Object.create(HTMLElement.prototype,h),d=document.registerElement(c,{prototype:f}
293),Object.defineProperty(f,"constructor",{value:d}),d}}()}).call(this),(function(){var n,r;t.extend({getDOMSelection:function(){var s;return s=window.getSelection(),s.rangeCount>0?s:void 0},getDOMRange:function(){var s,o;return(s=(o=t.getDOMSelection())!=null?o.getRangeAt(0):void 0)&&!n(s)?s:void 0},setDOMRange:function(s){var o;return o=window.getSelection(),o.removeAllRanges(),o.addRange(s),t.selectionChangeObserver.update()}}),n=function(s){return r(s.startContainer)||r(s.endContainer)},r=function(s){return!Object.getPrototypeOf(s)}}).call(this),(function(){var n;n={"application/x-trix-feature-detection":"test"},t.extend({dataTransferIsPlainText:function(r){var s,o,l;return l=r.getData("text/plain"),o=r.getData("text/html"),l&&o?(s=new DOMParser().parseFromString(o,"text/html").body,s.textContent===l?!s.querySelector("*"):void 0):l!=null?l.length:void 0},dataTransferIsWritable:function(r){var s,o;if((r!=null?r.setData:void 0)!=null){for(s in n)if(o=n[s],!function(){try{return r.setData(s,o),r.getData(s)===o}catch{}}())return;return!0}},keyEventIsKeyboardCommand:function(){return/Mac|^iP/.test(navigator.platform)?function(r){return r.metaKey}:function(r){return r.ctrlKey}}()})}).call(this),(function(){t.extend({RTL_PATTERN:/[\u05BE\u05C0\u05C3\u05D0-\u05EA\u05F0-\u05F4\u061B\u061F\u0621-\u063A\u0640-\u064A\u066D\u0671-\u06B7\u06BA-\u06BE\u06C0-\u06CE\u06D0-\u06D5\u06E5\u06E6\u200F\u202B\u202E\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE72\uFE74\uFE76-\uFEFC]/,getDirection:function(){var n,r,s,o;return r=t.makeElement("input",{dir:"auto",name:"x",dirName:"x.dir"}),n=t.makeElement("form"),n.appendChild(r),s=function(){try{return new FormData(n).has(r.dirName)}catch{}}(),o=function(){try{return r.matches(":dir(ltr),:dir(rtl)")}catch{}}(),s?function(l){return r.value=l,new FormData(n).get(r.dirName)}:o?function(l){return r.value=l,r.matches(":dir(rtl)")?"rtl":"ltr"}:function(l){var a;return a=l.trim().charAt(0),t.RTL_PATTERN.test(a)?"rtl":"ltr"}}()})}).call(this),(function(){}).call(this),(function(){var n,r=function(o,l){function a(){this.constructor=o}for(var u in l)s.call(l,u)&&(o[u]=l[u]);return a.prototype=l.prototype,o.prototype=new a,o.__super__=l.prototype,o},s={}.hasOwnProperty;n=t.arraysAreEqual,t.Hash=function(o){function l(f){f==null&&(f={}),this.values=u(f),l.__super__.constructor.apply(this,arguments)}var a,u,c,h,d;return r(l,o),l.fromCommonAttributesOfObjects=function(f){var p,b,m,v,g,y;if(f==null&&(f=[]),!f.length)return new this;for(p=a(f[0]),m=p.getKeys(),y=f.slice(1),b=0,v=y.length;v>b;b++)g=y[b],m=p.getKeysCommonToHash(a(g)),p=p.slice(m);return p},l.box=function(f){return a(f)},l.prototype.add=function(f,p){return this.merge(h(f,p))},l.prototype.remove=function(f){return new t.Hash(u(this.values,f))},l.prototype.get=function(f){return this.values[f]},l.prototype.has=function(f){return f in this.values},l.prototype.merge=function(f){return new t.Hash(c(this.values,d(f)))},l.prototype.slice=function(f){var p,b,m,v;for(v={},p=0,m=f.length;m>p;p++)b=f[p],this.has(b)&&(v[b]=this.values[b]);return new t.Hash(v)},l.prototype.getKeys=function(){return Object.keys(this.values)},l.prototype.getKeysCommonToHash=function(f){var p,b,m,v,g;for(f=a(f),v=this.getKeys(),g=[],p=0,m=v.length;m>p;p++)b=v[p],this.values[b]===f.values[b]&&g.push(b);return g},l.prototype.isEqualTo=function(f){return n(this.toArray(),a(f).toArray())},l.prototype.isEmpty=function(){return this.getKeys().length===0},l.prototype.toArray=function(){var f,p,b;return(this.array!=null?this.array:this.array=(function(){var m;p=[],m=this.values;for(f in m)b=m[f],p.push(f,b);return p}).call(this)).slice(0)},l.prototype.toObject=function(){return u(this.values)},l.prototype.toJSON=function(){return this.toObject()},l.prototype.contentsForInspection=function(){return{values:JSON.stringify(this.values)}},h=function(f,p){var b;return b={},b[f]=p,b},c=function(f,p){var b,m,v;m=u(f);for(b in p)v=p[b],m[b]=v;return m},u=function(f,p){var b,m,v,g,y;for(g={},y=Object.keys(f).sort(),b=0,v=y.length;v>b;b++)m=y[b],m!==p&&(g[m]=f[m]);return g},a=function(f){return f instanceof t.Hash?f:new t.Hash(f)},d=function(f){return f instanceof t.Hash?f.values:f},l}(t.Object)}).call(this),(function(){t.ObjectGroup=function(){function n(r,s){var o,l;this.objects=r??[],l=s.depth,o=s.asTree,o&&(this.depth=l,this.objects=this.constructor.groupObjects(this.objects,{asTree:o,depth:this.depth+1}))}return n.groupObjects=function(r,s){var o,l,a,u,c,h,d,f,p;for(r==null&&(r=[]),p=s??{},a=p.depth,o=p.asTree,o&&a==null&&(a=0),f=[],c=0,h=r.length;h>c;c++){if(d=r[c],u){if(typeof d.canBeGrouped=="function"&&d.canBeGrouped(a)&&(typeof(l=u[u.length-1]).canBeGroupedWith=="function"&&l.canBeGroupedWith(d,a))){u.push(d);continue}f.push(new this(u,{depth:a,asTree:o})),u=null}typeof d.canBeGrouped=="function"&&d.canBeGrouped(a)?u=[d]:f.push(d)}return u&&f.push(new this(u,{depth:a,asTree:o})),f},n.prototype.getObjects=function(){return this.objects},n.prototype.getDepth=function(){return this.depth},n.prototype.getCacheKey=function(){var r,s,o,l,a;for(s=["objectGroup"],a=this.getObjects(),r=0,o=a.length;o>r;r++)l=a[r],s.push(l.getCacheKey());return s.join("/")},n}()}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.ObjectMap=function(s){function o(l){var a,u,c,h,d;for(l==null&&(l=[]),this.objects={},c=0,h=l.length;h>c;c++)d=l[c],u=JSON.stringify(d),(a=this.objects)[u]==null&&(a[u]=d)}return n(o,s),o.prototype.find=function(l){var a;return a=JSON.stringify(l),this.objects[a]},o}(t.BasicObject)}).call(this),(function(){t.ElementStore=function(){function n(s){this.reset(s)}var r;return n.prototype.add=function(s){var o;return o=r(s),this.elements[o]=s},n.prototype.remove=function(s){var o,l;return o=r(s),(l=this.elements[o])?(delete this.elements[o],l):void 0},n.prototype.reset=function(s){var o,l,a;for(s==null&&(s=[]),this.elements={},l=0,a=s.length;a>l;l++)o=s[l],this.add(o);return s},r=function(s){return s.dataset.trixStoreKey},n}()}).call(this),(function(){}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.Operation=function(s){function o(){return o.__super__.constructor.apply(this,arguments)}return n(o,s),o.prototype.isPerforming=function(){return this.performing===!0},o.prototype.hasPerformed=function(){return this.performed===!0},o.prototype.hasSucceeded=function(){return this.performed&&this.succeeded},o.prototype.hasFailed=function(){return this.performed&&!this.succeeded},o.prototype.getPromise=function(){return this.promise!=null?this.promise:this.promise=new Promise(function(l){return function(a,u){return l.performing=!0,l.perform(function(c,h){return l.succeeded=c,l.performing=!1,l.performed=!0,l.succeeded?a(h):u(h)})}}(this))},o.prototype.perform=function(l){return l(!1)},o.prototype.release=function(){var l;return(l=this.promise)!=null&&typeof l.cancel=="function"&&l.cancel(),this.promise=null,this.performing=null,this.performed=null,this.succeeded=null},o.proxyMethod("getPromise().then"),o.proxyMethod("getPromise().catch"),o}(t.BasicObject)}).call(this),(function(){var n,r,s,o,l,a=function(c,h){function d(){this.constructor=c}for(var f in h)u.call(h,f)&&(c[f]=h[f]);return d.prototype=h.prototype,c.prototype=new d,c.__super__=h.prototype,c},u={}.hasOwnProperty;t.UTF16String=function(c){function h(d,f){this.ucs2String=d,this.codepoints=f,this.length=this.codepoints.length,this.ucs2Length=this.ucs2String.length}return a(h,c),h.box=function(d){return d==null&&(d=""),d instanceof this?d:this.fromUCS2String(d!=null?d.toString():void 0)},h.fromUCS2String=function(d){return new this(d,o(d))},h.fromCodepoints=function(d){return new this(l(d),d)},h.prototype.offsetToUCS2Offset=function(d){return l(this.codepoints.slice(0,Math.max(0,d))).length},h.prototype.offsetFromUCS2Offset=function(d){return o(this.ucs2String.slice(0,Math.max(0,d))).length},h.prototype.slice=function(){var d;return this.constructor.fromCodepoints((d=this.codepoints).slice.apply(d,arguments))},h.prototype.charAt=function(d){return this.slice(d,d+1)},h.prototype.isEqualTo=function(d){return this.constructor.box(d).ucs2String===this.ucs2String},h.prototype.toJSON=function(){return this.ucs2String},h.prototype.getCacheKey=function(){return this.ucs2String},h.prototype.toString=function(){return this.ucs2String},h}(t.BasicObject),n=(typeof Array.from=="function"?Array.from("ð¼").length:void 0)===1,r=(typeof" ".codePointAt=="function"?" ".codePointAt(0):void 0)!=null,s=(typeof String.fromCodePoint=="function"?String.fromCodePoint(32,128124):void 0)===" ð¼",o=n&&r?function(c){return Array.from(c).map(function(h){return h.codePointAt(0)})}:function(c){var h,d,f,p,b;for(p=[],h=0,f=c.length;f>h;)b=c.charCodeAt(h++),b>=55296&&56319>=b&&f>h&&(d=c.charCodeAt(h++),(64512&d)===56320?b=((1023&b)<<10)+(1023&d)+65536:h--),p.push(b);return p},l=s?function(c){return String.fromCodePoint.apply(String,c)}:function(c){var h,d,f;return h=function(){var p,b,m;for(m=[],p=0,b=c.length;b>p;p++)f=c[p],d="",f>65535&&(f-=65536,d+=String.fromCharCode(f>>>10&1023|55296),f=56320|1023&f),m.push(d+String.fromCharCode(f));return m}(),h.join("")}}).call(this),(function(){}).call(this),(function(){}).call(this),(function(){t.config.lang={attachFiles:"Attach Files",bold:"Bold",bullets:"Bullets",byte:"Byte",bytes:"Bytes",captionPlaceholder:"Add a captionâ¦",code:"Code",heading1:"Heading",indent:"Increase Level",italic:"Italic",link:"Link",numbers:"Numbers",outdent:"Decrease Level",quote:"Quote",redo:"Redo",remove:"Remove",strike:"Strikethrough",undo:"Undo",unlink:"Unlink",url:"URL",urlPlaceholder:"Enter a URLâ¦",GB:"GB",KB:"KB",MB:"MB",PB:"PB",TB:"TB"}}).call(this),(function(){t.config.css={attachment:"attachment",attachmentCaption:"attachment__caption",attachmentCaptionEditor:"attachment__caption-editor",attachmentMetadata:"attachment__metadata",attachmentMetadataContainer:"attachment__metadata-container",attachmentName:"attachment__name",attachmentProgress:"attachment__progress",attachmentSize:"attachment__size",attachmentToolbar:"attachment__toolbar",attachmentGallery:"attachment-gallery"}}).call(this),(function(){var n;t.config.blockAttributes=n={default:{tagName:"div",parse:!1},quote:{tagName:"blockquote",nestable:!0},heading1:{tagName:"h1",terminal:!0,breakOnReturn:!0,group:!1},code:{tagName:"pre",terminal:!0,text:{plaintext:!0}},bulletList:{tagName:"ul",parse:!1},bullet:{tagName:"li",listAttribute:"bulletList",group:!1,nestable:!0,test:function(r){return t.tagName(r.parentNode)===n[this.listAttribute].tagName}},numberList:{tagName:"ol",parse:!1},number:{tagName:"li",listAttribute:"numberList",group:!1,nestable:!0,test:function(r){return t.tagName(r.parentNode)===n[this.listAttribute].tagName}},attachmentGallery:{tagName:"div",exclusive:!0,terminal:!0,parse:!1,group:!1}}}).call(this),(function(){var n,r;n=t.config.lang,r=[n.bytes,n.KB,n.MB,n.GB,n.TB,n.PB],t.config.fileSize={prefix:"IEC",precision:2,formatter:function(s){var o,l,a,u,c;switch(s){case 0:return"0 "+n.bytes;case 1:return"1 "+n.byte;default:return o=(function(){switch(this.prefix){case"SI":return 1e3;case"IEC":return 1024}}).call(this),l=Math.floor(Math.log(s)/Math.log(o)),a=s/Math.pow(o,l),u=a.toFixed(this.precision),c=u.replace(/0*$/,"").replace(/\.$/,""),c+" "+r[l]}}}}).call(this),(function(){t.config.textAttributes={bold:{tagName:"strong",inheritable:!0,parser:function(n){var r;return r=window.getComputedStyle(n),r.fontWeight==="bold"||r.fontWeight>=600}},italic:{tagName:"em",inheritable:!0,parser:function(n){var r;return r=window.getComputedStyle(n),r.fontStyle==="italic"}},href:{groupTagName:"a",parser:function(n){var r,s,o;return r=t.AttachmentView.attachmentSelector,o="a:not("+r+")",(s=t.findClosestElementFromNode(n,{matchingSelector:o}))?s.getAttribute("href"):void 0}},strike:{tagName:"del",inheritable:!0},frozen:{style:{backgroundColor:"highlight"}}}}).call(this),(function(){var n,r,s,o,l;l="[data-trix-serialize=false]",o=["contenteditable","data-trix-id","data-trix-store-key","data-trix-mutable","data-trix-placeholder","tabindex"],r="data-trix-serialized-attributes",s="["+r+"]",n=new RegExp("<!--block-->","g"),t.extend({serializers:{"application/json":function(a){var u;if(a instanceof t.Document)u=a;else{if(!(a instanceof HTMLElement))throw new Error("unserializable object");u=t.Document.fromHTML(a.innerHTML)}return u.toSerializableDocument().toJSONString()},"text/html":function(a){var u,c,h,d,f,p,b,m,v,g,y,w,E,x,S,_,M;if(a instanceof t.Document)d=t.DocumentView.render(a);else{if(!(a instanceof HTMLElement))throw new Error("unserializable object");d=a.cloneNode(!0)}for(x=d.querySelectorAll(l),f=0,v=x.length;v>f;f++)h=x[f],t.removeNode(h);for(p=0,g=o.length;g>p;p++)for(u=o[p],S=d.querySelectorAll("["+u+"]"),b=0,y=S.length;y>b;b++)h=S[b],h.removeAttribute(u);for(_=d.querySelectorAll(s),m=0,w=_.length;w>m;m++){h=_[m];try{c=JSON.parse(h.getAttribute(r)),h.removeAttribute(r);for(E in c)M=c[E],h.setAttribute(E,M)}catch{}}return d.innerHTML.replace(n,"")}},deserializers:{"application/json":function(a){return t.Document.fromJSONString(a)},"text/html":function(a){return t.Document.fromHTML(a)}},serializeToContentType:function(a,u){var c;if(c=t.serializers[u])return c(a);throw new Error("unknown content type: "+u)},deserializeFromContentType:function(a,u){var c;if(c=t.deserializers[u])return c(a);throw new Error("unknown content type: "+u)}})}).call(this),(function(){var n;n=t.config.lang,t.config.toolbar={getDefaultHTML:function(){return`<div class="trix-button-row"> 294 <span class="trix-button-group trix-button-group--text-tools" data-trix-button-group="text-tools"> 295 <button type="button" class="trix-button trix-button--icon trix-button--icon-bold" data-trix-attribute="bold" data-trix-key="b" title="`+n.bold+'" tabindex="-1">'+n.bold+`</button> 296 <button type="button" class="trix-button trix-button--icon trix-button--icon-italic" data-trix-attribute="italic" data-trix-key="i" title="`+n.italic+'" tabindex="-1">'+n.italic+`</button> 297 <button type="button" class="trix-button trix-button--icon trix-button--icon-strike" data-trix-attribute="strike" title="`+n.strike+'" tabindex="-1">'+n.strike+`</button> 298 <button type="button" class="trix-button trix-button--icon trix-button--icon-link" data-trix-attribute="href" data-trix-action="link" data-trix-key="k" title="`+n.link+'" tabindex="-1">'+n.link+`</button> 299 </span> 300 301 <span class="trix-button-group trix-button-group--block-tools" data-trix-button-group="block-tools"> 302 <button type="button" class="trix-button trix-button--icon trix-button--icon-heading-1" data-trix-attribute="heading1" title="`+n.heading1+'" tabindex="-1">'+n.heading1+`</button> 303 <button type="button" class="trix-button trix-button--icon trix-button--icon-quote" data-trix-attribute="quote" title="`+n.quote+'" tabindex="-1">'+n.quote+`</button> 304 <button type="button" class="trix-button trix-button--icon trix-button--icon-code" data-trix-attribute="code" title="`+n.code+'" tabindex="-1">'+n.code+`</button> 305 <button type="button" class="trix-button trix-button--icon trix-button--icon-bullet-list" data-trix-attribute="bullet" title="`+n.bullets+'" tabindex="-1">'+n.bullets+`</button> 306 <button type="button" class="trix-button trix-button--icon trix-button--icon-number-list" data-trix-attribute="number" title="`+n.numbers+'" tabindex="-1">'+n.numbers+`</button> 307 <button type="button" class="trix-button trix-button--icon trix-button--icon-decrease-nesting-level" data-trix-action="decreaseNestingLevel" title="`+n.outdent+'" tabindex="-1">'+n.outdent+`</button> 308 <button type="button" class="trix-button trix-button--icon trix-button--icon-increase-nesting-level" data-trix-action="increaseNestingLevel" title="`+n.indent+'" tabindex="-1">'+n.indent+`</button> 309 </span> 310 311 <span class="trix-button-group trix-button-group--file-tools" data-trix-button-group="file-tools"> 312 <button type="button" class="trix-button trix-button--icon trix-button--icon-attach" data-trix-action="attachFiles"
312 title="`+n.attachFiles+'" tabindex="-1">'+n.attachFiles+`</button> 313 </span> 314 315 <span class="trix-button-group-spacer"></span> 316 317 <span class="trix-button-group trix-button-group--history-tools" data-trix-button-group="history-tools"> 318 <button type="button" class="trix-button trix-button--icon trix-button--icon-undo" data-trix-action="undo" data-trix-key="z" title="`+n.undo+'" tabindex="-1">'+n.undo+`</button> 319 <button type="button" class="trix-button trix-button--icon trix-button--icon-redo" data-trix-action="redo" data-trix-key="shift+z" title="`+n.redo+'" tabindex="-1">'+n.redo+`</button> 320 </span> 321</div> 322 323<div class="trix-dialogs" data-trix-dialogs> 324 <div class="trix-dialog trix-dialog--link" data-trix-dialog="href" data-trix-dialog-attribute="href"> 325 <div class="trix-dialog__link-fields"> 326 <input type="url" name="href" class="trix-input trix-input--dialog" placeholder="`+n.urlPlaceholder+'" aria-label="'+n.url+`" required data-trix-input> 327 <div class="trix-button-group"> 328 <input type="button" class="trix-button trix-button--dialog" value="`+n.link+`" data-trix-method="setAttribute"> 329 <input type="button" class="trix-button trix-button--dialog" value="`+n.unlink+`" data-trix-method="removeAttribute"> 330 </div> 331 </div> 332 </div> 333</div>`}}}).call(this),(function(){t.config.undoInterval=5e3}).call(this),(function(){t.config.attachments={preview:{presentation:"gallery",caption:{name:!0,size:!0}},file:{caption:{size:!0}}}}).call(this),(function(){t.config.keyNames={8:"backspace",9:"tab",13:"return",27:"escape",37:"left",39:"right",46:"delete",68:"d",72:"h",79:"o"}}).call(this),(function(){t.config.input={level2Enabled:!0,getLevel:function(){return this.level2Enabled&&t.browser.supportsInputEvents?2:0},pickFiles:function(n){var r;return r=t.makeElement("input",{type:"file",multiple:!0,hidden:!0,id:this.fileInputId}),r.addEventListener("change",function(){return n(r.files),t.removeNode(r)}),t.removeNode(document.getElementById(this.fileInputId)),document.body.appendChild(r),r.click()},fileInputId:"trix-file-input-"+Date.now().toString(16)}}).call(this),(function(){}).call(this),(function(){t.registerElement("trix-toolbar",{defaultCSS:`%t { 334 display: block; 335} 336 337%t { 338 white-space: nowrap; 339} 340 341%t [data-trix-dialog] { 342 display: none; 343} 344 345%t [data-trix-dialog][data-trix-active] { 346 display: block; 347} 348 349%t [data-trix-dialog] [data-trix-validate]:invalid { 350 background-color: #ffdddd; 351}`,initialize:function(){return this.innerHTML===""?this.innerHTML=t.config.toolbar.getDefaultHTML():void 0}})}).call(this),(function(){var n=function(o,l){function a(){this.constructor=o}for(var u in l)r.call(l,u)&&(o[u]=l[u]);return a.prototype=l.prototype,o.prototype=new a,o.__super__=l.prototype,o},r={}.hasOwnProperty,s=[].indexOf||function(o){for(var l=0,a=this.length;a>l;l++)if(l in this&&this[l]===o)return l;return-1};t.ObjectView=function(o){function l(a,u){this.object=a,this.options=u??{},this.childViews=[],this.rootView=this}return n(l,o),l.prototype.getNodes=function(){var a,u,c,h,d;for(this.nodes==null&&(this.nodes=this.createNodes()),h=this.nodes,d=[],a=0,u=h.length;u>a;a++)c=h[a],d.push(c.cloneNode(!0));return d},l.prototype.invalidate=function(){var a;return this.nodes=null,this.childViews=[],(a=this.parentView)!=null?a.invalidate():void 0},l.prototype.invalidateViewForObject=function(a){var u;return(u=this.findViewForObject(a))!=null?u.invalidate():void 0},l.prototype.findOrCreateCachedChildView=function(a,u){var c;return(c=this.getCachedViewForObject(u))?this.recordChildView(c):(c=this.createChildView.apply(this,arguments),this.cacheViewForObject(c,u)),c},l.prototype.createChildView=function(a,u,c){var h;return c==null&&(c={}),u instanceof t.ObjectGroup&&(c.viewClass=a,a=t.ObjectGroupView),h=new a(u,c),this.recordChildView(h)},l.prototype.recordChildView=function(a){return a.parentView=this,a.rootView=this.rootView,this.childViews.push(a),a},l.prototype.getAllChildViews=function(){var a,u,c,h,d;for(d=[],h=this.childViews,u=0,c=h.length;c>u;u++)a=h[u],d.push(a),d=d.concat(a.getAllChildViews());return d},l.prototype.findElement=function(){return this.findElementForOb
351ject(this.object)},l.prototype.findElementForObject=function(a){var u;return(u=a!=null?a.id:void 0)?this.rootView.element.querySelector("[data-trix-id='"+u+"']"):void 0},l.prototype.findViewForObject=function(a){var u,c,h,d;for(h=this.getAllChildViews(),u=0,c=h.length;c>u;u++)if(d=h[u],d.object===a)return d},l.prototype.getViewCache=function(){return this.rootView!==this?this.rootView.getViewCache():this.isViewCachingEnabled()?this.viewCache!=null?this.viewCache:this.viewCache={}:void 0},l.prototype.isViewCachingEnabled=function(){return this.shouldCacheViews!==!1},l.prototype.enableViewCaching=function(){return this.shouldCacheViews=!0},l.prototype.disableViewCaching=function(){return this.shouldCacheViews=!1},l.prototype.getCachedViewForObject=function(a){var u;return(u=this.getViewCache())!=null?u[a.getCacheKey()]:void 0},l.prototype.cacheViewForObject=function(a,u){var c;return(c=this.getViewCache())!=null?c[u.getCacheKey()]=a:void 0},l.prototype.garbageCollectCachedViews=function(){var a,u,c,h,d,f;if(a=this.getViewCache()){f=this.getAllChildViews().concat(this),c=function(){var p,b,m;for(m=[],p=0,b=f.length;b>p;p++)d=f[p],m.push(d.object.getCacheKey());return m}(),h=[];for(u in a)s.call(c,u)<0&&h.push(delete a[u]);return h}},l}(t.BasicObject)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.ObjectGroupView=function(s){function o(){o.__super__.constructor.apply(this,arguments),this.objectGroup=this.object,this.viewClass=this.options.viewClass,delete this.options.viewClass}return n(o,s),o.prototype.getChildViews=function(){var l,a,u,c;if(!this.childViews.length)for(c=this.objectGroup.getObjects(),l=0,a=c.length;a>l;l++)u=c[l],this.findOrCreateCachedChildView(this.viewClass,u,this.options);return this.childViews},o.prototype.createNodes=function(){var l,a,u,c,h,d,f,p,b;for(l=this.createContainerElement(),f=this.getChildViews(),a=0,c=f.length;c>a;a++)for(b=f[a],p=b.getNodes(),u=0,h=p.length;h>u;u++)d=p[u],l.appendChild(d);return[l]},o.prototype.createContainerElement=function(l){return l==null&&(l=this.objectGroup.getDepth()),this.getChildViews()[0].createContainerElement(l)},o}(t.ObjectView)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.Controller=function(s){function o(){return o.__super__.constructor.apply(this,arguments)}return n(o,s),o}(t.BasicObject)}).call(this),(function(){var n,r,s,o,l,a,u=function(f,p){return function(){return f.apply(p,arguments)}},c=function(f,p){function b(){this.constructor=f}for(var m in p)h.call(p,m)&&(f[m]=p[m]);return b.prototype=p.prototype,f.prototype=new b,f.__super__=p.prototype,f},h={}.hasOwnProperty,d=[].indexOf||function(f){for(var p=0,b=this.length;b>p;p++)if(p in this&&this[p]===f)return p;return-1};n=t.findClosestElementFromNode,s=t.nodeIsEmptyTextNode,r=t.nodeIsBlockStartComment,o=t.normalizeSpaces,l=t.summarizeStringChange,a=t.tagName,t.MutationObserver=function(f){function p(y){this.element=y,this.didMutate=u(this.didMutate,this),this.observer=new window.MutationObserver(this.didMutate),this.start()}var b,m,v,g;return c(p,f),m="data-trix-mutable",v="["+m+"]",g={attributes:!0,childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},p.prototype.start=function(){return this.reset(),this.observer.observe(this.element,g)},p.prototype.stop=function(){return this.observer.disconnect()},p.prototype.didMutate=function(y){var w,E;return(w=this.mutations).push.apply(w,this.findSignificantMutations(y)),this.mutations.length?((E=this.delegate)!=null&&typeof E.elementDidMutate=="function"&&E.elementDidMutate(this.getMutationSummary()),this.reset()):void 0},p.prototype.reset=function(){return this.mutations=[]},p.prototype.findSignificantMutations=function(y){var w,E,x,S;for(S=[],w=0,E=y.length;E>w;w++)x=y[w],this.mutationIsSignificant(x)&&S.push(x);return S},p.prototype.mutationIsSignificant=function(y){var w,E,x,S;if(this.nodeIsMutable(y.target))return!1;for(S=this.nodesModifiedByMutation(y),w=0,E=S.length;E>w;w++)if(x=S[w],this.nodeIsSignificant(x))return!0;return!1},p.prototype.nodeIsSignificant=function(y){return y!==this.element&&!this.nodeIsMutable(y)&&!s(y)},p.prototype.nodeIsMutable=function(y){return n(y,{matchingSelector:v})},p.prototype.nodesModifiedByMutation=function(y){var w;switch(w=[],y.type){case"attributes":y.attributeName!==m&&w.push(y.target);break;case"characterData":w.push(y.target.parentNode),w.push(y.target);break;case"childList":w.push.apply(w,y.addedNodes),w.push.apply(w,y.removedNodes
351)}return w},p.prototype.getMutationSummary=function(){return this.getTextMutationSummary()},p.prototype.getTextMutationSummary=function(){var y,w,E,x,S,_,M,O,D,k,A;for(O=this.getTextChangesFromCharacterData(),E=O.additions,S=O.deletions,A=this.getTextChangesFromChildList(),D=A.additions,_=0,M=D.length;M>_;_++)w=D[_],d.call(E,w)<0&&E.push(w);return S.push.apply(S,A.deletions),k={},(y=E.join(""))&&(k.textAdded=y),(x=S.join(""))&&(k.textDeleted=x),k},p.prototype.getMutationsByType=function(y){var w,E,x,S,_;for(S=this.mutations,_=[],w=0,E=S.length;E>w;w++)x=S[w],x.type===y&&_.push(x);return _},p.prototype.getTextChangesFromChildList=function(){var y,w,E,x,S,_,M,O,D,k,A;for(y=[],M=[],_=this.getMutationsByType("childList"),w=0,x=_.length;x>w;w++)S=_[w],y.push.apply(y,S.addedNodes),M.push.apply(M,S.removedNodes);return O=y.length===0&&M.length===1&&r(M[0]),O?(k=[],A=[` 352`]):(k=b(y),A=b(M)),{additions:function(){var C,T,L;for(L=[],E=C=0,T=k.length;T>C;E=++C)D=k[E],D!==A[E]&&L.push(o(D));return L}(),deletions:function(){var C,T,L;for(L=[],E=C=0,T=A.length;T>C;E=++C)D=A[E],D!==k[E]&&L.push(o(D));return L}()}},p.prototype.getTextChangesFromCharacterData=function(){var y,w,E,x,S,_,M,O;return w=this.getMutationsByType("characterData"),w.length&&(O=w[0],E=w[w.length-1],S=o(O.oldValue),x=o(E.target.data),_=l(S,x),y=_.added,M=_.removed),{additions:y?[y]:[],deletions:M?[M]:[]}},b=function(y){var w,E,x,S;for(y==null&&(y=[]),S=[],w=0,E=y.length;E>w;w++)switch(x=y[w],x.nodeType){case Node.TEXT_NODE:S.push(x.data);break;case Node.ELEMENT_NODE:a(x)==="br"?S.push(` 353`):S.push.apply(S,b(x.childNodes))}return S},p}(t.BasicObject)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.FileVerificationOperation=function(s){function o(l){this.file=l}return n(o,s),o.prototype.perform=function(l){var a;return a=new FileReader,a.onerror=function(){return l(!1)},a.onload=function(u){return function(){a.onerror=null;try{a.abort()}catch{}return l(!0,u.file)}}(this),a.readAsArrayBuffer(this.file)},o}(t.Operation)}).call(this),(function(){var n,r,s=function(l,a){function u(){this.constructor=l}for(var c in a)o.call(a,c)&&(l[c]=a[c]);return u.prototype=a.prototype,l.prototype=new u,l.__super__=a.prototype,l},o={}.hasOwnProperty;n=t.handleEvent,r=t.innerElementIsActive,t.InputController=function(l){function a(u){var c;this.element=u,this.mutationObserver=new t.MutationObserver(this.element),this.mutationObserver.delegate=this;for(c in this.events)n(c,{onElement:this.element,withCallback:this.handlerFor(c)})}return s(a,l),a.prototype.events={},a.prototype.elementDidMutate=function(){},a.prototype.editorWillSyncDocumentView=function(){return this.mutationObserver.stop()},a.prototype.editorDidSyncDocumentView=function(){return this.mutationObserver.start()},a.prototype.requestRender=function(){var u;return(u=this.delegate)!=null&&typeof u.inputControllerDidRequestRender=="function"?u.inputControllerDidRequestRender():void 0},a.prototype.requestReparse=function(){var u;return(u=this.delegate)!=null&&typeof u.inputControllerDidRequestReparse=="function"&&u.inputControllerDidRequestReparse(),this.requestRender()},a.prototype.attachFiles=function(u){var c,h;return h=function(){var d,f,p;for(p=[],d=0,f=u.length;f>d;d++)c=u[d],p.push(new t.FileVerificationOperation(c));return p}(),Promise.all(h).then(function(d){return function(f){return d.handleInput(function(){var p,b;return(p=this.delegate)!=null&&p.inputControllerWillAttachFiles(),(b=this.responder)!=null&&b.insertFiles(f),this.requestRender()})}}(this))},a.prototype.handlerFor=function(u){return function(c){return function(h){return h.defaultPrevented?void 0:c.handleInput(function(){return r(this.element)?void 0:(this.eventName=u,this.events[u].call(this,h))})}}(this)},a.prototype.handleInput=function(u){var c,h;try{return(c=this.delegate)!=null&&c.inputControllerWillHandleInput(),u.call(this)}finally{(h=this.delegate)!=null&&h.inputControllerDidHandleInput()}},a.prototype.createLinkHTML=function(u,c){var h;return h=document.createElement("a"),h.href=u,h.textContent=c??u,h.outerHTML},a}(t.BasicObject)}).call(this),(function(){var n,r,s,o,l,a,u,c,h,d,f,p,b=function(g,y){function w(){this.constructor=g}for(var E in y)m.call(y,E)&&(g[E]=y[E]);return w.prototype=y.prototype,g.prototype=new w,g.__super__=y.prototype,g},m={}.hasOwnProperty,v=[].indexOf||function(g){for(var y=0,w=this.length;w>y;y++)if(y in this&&this[y]===g)return y;return-1};h=t.makeElement,d=t.objectsAreEqual,t.tagName,r=t.browser,u=t.keyEventIsKeyboardCommand,o=t.dataTransferIsWritable,s=t.dataTransferIsPlainText,c=t.config.keyNames,t.Level0InputController=function(g){function y(){y.__super__.constructor.apply(this,arguments),this.resetInputSummary()}var w;return b(y,g),w=0,y.prototype.setInputSummary=function(E){var x,S;E==null&&(E={}),this.inputSummary.eventName=this.eventName;for(x in E)S=E[x],this.inputSummary[x]=S;return this.inputSummary},y.prototype.resetInputSummary=function(){return this.inputSummary={}},y.prototype.reset=function(){return this.resetInputSummary(),t.selectionChangeObserver.reset()},y.prototype.elementDidMutate=function(E){var x;return this.isComposing()?(x=this.delegate)!=null&&typeof x.inputControllerDidAllowUnhandledInput=="function"?x.inputControllerDidAllowUnhandledInput():void 0:this.handleInput(function(){return this.mutationIsSignificant(E)&&(this.mutationIsExpected(E)?this.requestRender():this.requestReparse()),this.reset()})},y.prototype.mutationIsExpected=function(E){var x,S,_,M,O,D,k,A,C,T;return k=E.textAdded,A=E.textDeleted,this.inputSummary.preferDocument?!0:(x=k!=null?k===this.inputSummary.textAdded:!this.inputSummary.textAdded,S=A!=null?this.inputSummary.didDelete:!this.inputSummary.didDelete,C=(k===` 354`||k===` 355`)&&!x,T=A===` 356`&&!S,D=C&&!T||T&&!C,D&&(M=this.getSelectedRange())&&(_=C?k.replace(/\n$/,"").length||-1:(k!=null?k.length:void 0)||1,(O=this.responder)!=null?O.positionIsBlockBreak(M[1]+_):void 0)?!0:x&&S)},y.prototype.mutationIsSignificant=function(E){var x,S,_;return _=Object.keys(E).length>0,x=((S=this.compositionInput)!=null?S.getEndData():void 0)==="",_||!x},y.prototype.events={keydown:function(E){var x,S,_,M,O,D,k,A,C;if(this.isComposing()||this.resetInputSummary(),this.inputSummary.didInput=!0,M=c[E.keyCode]){for(S=this.keys,A=["ctrl","alt","shift","meta"],_=0,D=A.length;D>_;_++)k=A[_],E[k+"Key"]&&(k==="ctrl"&&(k="control"),S=S!=null?S[k]:void 0);(S!=null?S[M]:void 0)!=null&&(this.setInputSummary({keyName:M}),t.selectionChangeObserver.reset(),S[M].call(this,E))}return u(E)&&(x=String.fromCharCode(E.keyCode).toLowerCase())&&(O=function(){var T,L,I,P;for(I=["alt","shift"],P=[],T=0,L=I.length;L>T;
356T++)k=I[T],E[k+"Key"]&&P.push(k);return P}(),O.push(x),(C=this.delegate)!=null?C.inputControllerDidReceiveKeyboardCommand(O):void 0)?E.preventDefault():void 0},keypress:function(E){var x,S,_;if(this.inputSummary.eventName==null&&!E.metaKey&&(!E.ctrlKey||E.altKey))return(_=p(E))?((x=this.delegate)!=null&&x.inputControllerWillPerformTyping(),(S=this.responder)!=null&&S.insertString(_),this.setInputSummary({textAdded:_,didDelete:this.selectionIsExpanded()})):void 0},textInput:function(E){var x,S,_,M;return x=E.data,M=this.inputSummary.textAdded,M&&M!==x&&M.toUpperCase()===x?(S=this.getSelectedRange(),this.setSelectedRange([S[0],S[1]+M.length]),(_=this.responder)!=null&&_.insertString(x),this.setInputSummary({textAdded:x}),this.setSelectedRange(S)):void 0},dragenter:function(E){return E.preventDefault()},dragstart:function(E){var x;return E.target,this.serializeSelectionToDataTransfer(E.dataTransfer),this.draggedRange=this.getSelectedRange(),(x=this.delegate)!=null&&typeof x.inputControllerDidStartDrag=="function"?x.inputControllerDidStartDrag():void 0},dragover:function(E){var x,S;return!this.draggedRange&&!this.canAcceptDataTransfer(E.dataTransfer)||(E.preventDefault(),x={x:E.clientX,y:E.clientY},d(x,this.draggingPoint))?void 0:(this.draggingPoint=x,(S=this.delegate)!=null&&typeof S.inputControllerDidReceiveDragOverPoint=="function"?S.inputControllerDidReceiveDragOverPoint(this.draggingPoint):void 0)},dragend:function(){var E;return(E=this.delegate)!=null&&typeof E.inputControllerDidCancelDrag=="function"&&E.inputControllerDidCancelDrag(),this.draggedRange=null,this.draggingPoint=null},drop:function(E){var x,S,_,M,O,D,k,A,C;return E.preventDefault(),_=(O=E.dataTransfer)!=null?O.files:void 0,M={x:E.clientX,y:E.clientY},(D=this.responder)!=null&&D.setLocationRangeFromPointRange(M),_!=null&&_.length?this.attachFiles(_):this.draggedRange?((k=this.delegate)!=null&&k.inputControllerWillMoveText(),(A=this.responder)!=null&&A.moveTextFromRange(this.draggedRange),this.draggedRange=null,this.requestRender()):(S=E.dataTransfer.getData("application/x-trix-document"))&&(x=t.Document.fromJSONString(S),(C=this.responder)!=null&&C.insertDocument(x),this.requestRender()),this.draggedRange=null,this.draggingPoint=null},cut:function(E){var x,S;return(x=this.responder)!=null&&x.selectionIsExpanded()&&(this.serializeSelectionToDataTransfer(E.clipboardData)&&E.preventDefault(),(S=this.delegate)!=null&&S.inputControllerWillCutText(),this.deleteInDirection("backward"),E.defaultPrevented)?this.requestRender():void 0},copy:function(E){var x;return(x=this.responder)!=null&&x.selectionIsExpanded()&&this.serializeSelectionToDataTransfer(E.clipboardData)?E.preventDefault():void 0},paste:function(E){var x,S,_,M,O,D,k,A,C,T,L,I,P,R,z,N,B,j,Y,V,Q,le,be;return x=(A=E.clipboardData)!=null?A:E.testClipboardData,k={clipboard:x},x==null||f(E)?void this.getPastedHTMLUsingHiddenElement(function(qe){return function(Pe){var Xe,on,Xt;return k.type="text/html",k.html=Pe,(Xe=qe.delegate)!=null&&Xe.inputControllerWillPaste(k),(on=qe.responder)!=null&&on.insertHTML(k.html),qe.requestRender(),(Xt=qe.delegate)!=null?Xt.inputControllerDidPaste(k):void 0}}(this)):((M=x.getData("URL"))?(k.type="text/html",be=(D=x.getData("public.url-name"))?t.squishBreakableWhitespace(D).trim():M,k.html=this.createLinkHTML(M,be),(C=this.delegate)!=null&&C.inputControllerWillPaste(k),this.setInputSummary({textAdded:be,didDelete:this.selectionIsExpanded()}),(z=this.responder)!=null&&z.insertHTML(k.html),this.requestRender(),(N=this.delegate)!=null&&N.inputControllerDidPaste(k)):s(x)?(k.type="text/plain",k.string=x.getData("text/plain"),(B=this.delegate)!=null&&B.inputControllerWillPaste(k),this.setInputSummary({textAdded:k.string,didDelete:this.selectionIsExpanded()}),(j=this.responder)!=null&&j.insertString(k.string),this.requestRender(),(Y=this.delegate)!=null&&Y.inputControllerDidPaste(k)):(O=x.getData("text/html"))?(k.type="text/html",k.html=O,(V=this.delegate)!=null&&V.inputControllerWillPaste(k),(Q=this.responder)!=null&&Q.insertHTML(k.html),this.requestRender(),(le=this.delegate)!=null&&le.inputControllerDidPaste(k)):v.call(x.types,"Files")>=0&&(_=(T=x.items)!=null&&(L=T[0])!=null&&typeof L.getAsFile=="function"?L.getAsFile():void 0)&&(!_.name&&(S=l(_))&&(_.name="pasted-file-"+ ++w+"."+S),k.type="File",k.file=_,(I=this.delegate)!=null&&I.inputControllerWillAttachFiles(),(P=this.responder)!=null&&P.insertFile(k.file),this.requestRender(),(R=this.delegate)!=null&&R.inputControllerDidPaste(k)),E.preventDefault())},compositionstart:function(E){return this.getCompositionInput().start(E.data)},compositionupdate:function(E){return this.getCompositionInput().update(E.data)},compositionend:function(E){return this.getCompositionInput().end(E.data)}
356,beforeinput:function(){return this.inputSummary.didInput=!0},input:function(E){return this.inputSummary.didInput=!0,E.stopPropagation()}},y.prototype.keys={backspace:function(E){var x;return(x=this.delegate)!=null&&x.inputControllerWillPerformTyping(),this.deleteInDirection("backward",E)},delete:function(E){var x;return(x=this.delegate)!=null&&x.inputControllerWillPerformTyping(),this.deleteInDirection("forward",E)},return:function(){var E,x;return this.setInputSummary({preferDocument:!0}),(E=this.delegate)!=null&&E.inputControllerWillPerformTyping(),(x=this.responder)!=null?x.insertLineBreak():void 0},tab:function(E){var x,S;return(x=this.responder)!=null&&x.canIncreaseNestingLevel()?((S=this.responder)!=null&&S.increaseNestingLevel(),this.requestRender(),E.preventDefault()):void 0},left:function(E){var x;return this.selectionIsInCursorTarget()?(E.preventDefault(),(x=this.responder)!=null?x.moveCursorInDirection("backward"):void 0):void 0},right:function(E){var x;return this.selectionIsInCursorTarget()?(E.preventDefault(),(x=this.responder)!=null?x.moveCursorInDirection("forward"):void 0):void 0},control:{d:function(E){var x;return(x=this.delegate)!=null&&x.inputControllerWillPerformTyping(),this.deleteInDirection("forward",E)},h:function(E){var x;return(x=this.delegate)!=null&&x.inputControllerWillPerformTyping(),this.deleteInDirection("backward",E)},o:function(E){var x,S;return E.preventDefault(),(x=this.delegate)!=null&&x.inputControllerWillPerformTyping(),(S=this.responder)!=null&&S.insertString(` 357`,{updatePosition:!1}),this.requestRender()}},shift:{return:function(E){var x,S;return(x=this.delegate)!=null&&x.inputControllerWillPerformTyping(),(S=this.responder)!=null&&S.insertString(` 358`),this.requestRender(),E.preventDefault()},tab:function(E){var x,S;return(x=this.responder)!=null&&x.canDecreaseNestingLevel()?((S=this.responder)!=null&&S.decreaseNestingLevel(),this.requestRender(),E.preventDefault()):void 0},left:function(E){return this.selectionIsInCursorTarget()?(E.preventDefault(),this.expandSelectionInDirection("backward")):void 0},right:function(E){return this.selectionIsInCursorTarget()?(E.preventDefault(),this.expandSelectionInDirection("forward")):void 0}},alt:{backspace:function(){var E;return this.setInputSummary({preferDocument:!1}),(E=this.delegate)!=null?E.inputControllerWillPerformTyping():void 0}},meta:{backspace:function(){var E;return this.setInputSummary({preferDocument:!1}),(E=this.delegate)!=null?E.inputControllerWillPerformTyping():void 0}}},y.prototype.getCompositionInput=function(){return this.isComposing()?this.compositionInput:this.compositionInput=new n(this)},y.prototype.isComposing=function(){return this.compositionInput!=null&&!this.compositionInput.isEnded()},y.prototype.deleteInDirection=function(E,x){var S;return((S=this.responder)!=null?S.deleteInDirection(E):void 0)!==!1?this.setInputSummary({didDelete:!0}):x?(x.preventDefault(),this.requestRender()):void 0},y.prototype.serializeSelectionToDataTransfer=function(E){var x,S;if(o(E))return x=(S=this.responder)!=null?S.getSelectedDocument().toSerializableDocument():void 0,E.setData("application/x-trix-document",JSON.stringify(x)),E.setData("text/html",t.DocumentView.render(x).innerHTML),E.setData("text/plain",x.toString().replace(/\n$/,"")),!0},y.prototype.canAcceptDataTransfer=function(E){var x,S,_,M,O,D;for(D={},M=(_=E!=null?E.types:void 0)!=null?_:[],x=0,S=M.length;S>x;x++)O=M[x],D[O]=!0;return D.Files||D["application/x-trix-document"]||D["text/html"]||D["text/plain"]},y.prototype.getPastedHTMLUsingHiddenElement=function(E){var x,S,_;return S=this.getSelectedRange(),_={position:"absolute",left:window.pageXOffset+"px",top:window.pageYOffset+"px",opacity:0},x=h({style:_,tagName:"div",editable:!0}),document.body.appendChild(x),x.focus(),requestAnimationFrame(function(M){return function(){var O;return O=x.innerHTML,t.removeNode(x),M.setSelectedRange(S),E(O)}}(this))},y.proxyMethod("responder?.getSelectedRange"),y.proxyMethod("responder?.setSelectedRange"),y.proxyMethod("responder?.expandSelectionInDirection"),y.proxyMethod("responder?.selectionIsInCursorTarget"),y.proxyMethod("responder?.selectionIsExpanded"),y}(t.InputController),l=function(g){var y,w;return(y=g.type)!=null&&(w=y.match(/\/(\w+)$/))!=null?w[1]:void 0},a=(typeof" ".codePointAt=="function"?" ".codePointAt(0):void 0)!=null,p=function(g){var y;return g.key&&a&&g.key.codePointAt(0)===g.keyCode?g.key:(g.which===null?y=g.keyCode:g.which!==0&&g.charCode!==0&&(y=g.charCode),y!=null&&c[y]!=="escape"?t.UTF16String.fromCodepoints([y]).toString():void 0)},f=function(g){var y,w,E,x,S,_,M,O,D;if(M=g.clipboardData){if(v.call(M.types,"text/html")>=0){for(O=M.types,E=0,_=O.length;_>E;E++)if(D=O[E],y=/^CorePasteboardFlavorType/.test(D),w=/^dyn\./.test(D)&&M.getData(D),y||w)return!0;return!1}return x=v.call(M.types,"com.apple.webarchive")>=0,S=v.call(M.types,"com.apple.flat-rtfd")>=0,x||S}},n=function(g){function y(w){var E;this.inputController=w,E=this.inputController,this.responder=E.responder,this.delegate=E.delegate,this.inputSummary=E.inputSummary,this.data={}}return b(y,g),y.prototype.start=function(w){var E,x;return this.data.start=w,this.isSignificant()?(this.inputSummary.eventName==="keypress"&&this.inputSummary.textAdded&&(E=this.responder)!=null&&E.deleteInDirection("left"),this.selectionIsExpanded()||(this.insertPlaceholder(),this.requestRender()),this.range=(x=this.responder)!=null?x.getSelectedRange():void 0):void 0},y.prototype.update=function(w){var E;return this.data.update=w,this.isSignificant()&&(E=this.selectPlaceholder())?(this.forgetPlaceholder(),this.range=E):void 0},y.prototype.end=function(w){var E,x,S,_;return this.data.end=w,this.isSignificant()?(this.forgetPlaceholder(),this.canApplyToDocument()?(this.setInputSummary({preferDocument:!0,didInput:!1}),(E=this.delegate)!=null&&E.inputControllerWillPerformTyping(),(x=this.responder)!=null&&x.setSelectedRange(this.range),(S=this.responder)!=null&&S.insertString(this.data.end),(_=this.responder)!=null?_.setSelectedRange(this.range[0]+this.data.end.length):void 0):this.data.start!=null||this.data.update!=null?(this.requestReparse(),this.inputController.reset()):void 0):this.inputController.reset()},y.prototype.getEndData=function(){return this.data.end},y.prototype.isEnded=function(){return this.getEndData()!=null},y.prototype.isSignificant=function(){return r.composesExistingText?this.inputSummary.didInput:!0},y.prototype.canApplyToDocument=function(){var w,E;return((w=this.data.start)!=null?w.length:void 0)===0&&((E=this.data.end)!=null?E.length:void 0)>0&&this.range!=null},y.proxyMethod("inputController.setInputSummary"),y.proxyMethod("inputController.requestRender"),y.proxyMethod("inputController.requestReparse"),y.proxyMethod("responder?.selectionIsExpanded"),y.proxyMethod("responder?.insertPlaceholder"),y.proxyMethod("responder?.selectPlaceholder"),y.proxyMethod("responder?.forgetPlaceholder"),y}(t.BasicObject)}).call(this),(function(){var n,r,s,o=function(c,h){return function(){return c.apply(h,arguments)}},l=function(c,h){function d(){this.constructor=c}for(var f in h)a.call(h,f)&&(c[f]=h[f]);return d.prototype=h.prototype,c.prototype=new d,c.__super__=h.prototype,c},a={}.hasOwnProperty,u=[].indexOf||function(c){for(var h=0,d=this.length;d>h;h++)if(h in this&&this[h]===c)return h;return-1};n=t.dataTransferIsPlainText,r=t.keyEventIsKeyboardCommand,s=t.objectsAreEqual,t.Level2InputController=function(c){function h(){return this.render=o(this.render,this),h.__super__.constructor.apply(this,arguments)}var d,f,p,b,m,v;return l(h,c),h.prototype.elementDidMutate=function(){var g;return this.scheduledRender?this.composing&&(g=this.delegate)!=null&&typeof g.inputControllerDidAllowUnhandledInput=="function"?g.inputControllerDidAllowUnhandledInput():void 0:this.reparse()},h.prototype.scheduleRender=function(){return this.scheduledRender!=null?this.scheduledRender:this.scheduledRender=requestAnimationFrame(this.render)},h.prototype.render=function(){var g;return cancelAnimationFrame(this.scheduledRender),this.scheduledRender=null,this.composing||(g=this.delegate)!=null&&g.render(),typeof this.afterRender=="function"&&this.afterRender(),this.afterRender=null},h.prototype.reparse=function(){var g;return(g=this.delegate)!=null?g.reparse():void 0},h.prototype.events={keydown:function(g){var y,w,E,x;if(r(g)){if(y=f(g),(x=this.delegate)!=null?x.inputControllerDidReceiveKeyboardCommand(y):void 0)return g.preventDefault()}
358else if(E=g.key,g.altKey&&(E+="+Alt"),g.shiftKey&&(E+="+Shift"),w=this.keys[E])return this.withEvent(g,w)},paste:function(g){var y,w,E,x,S,_,M,O,D;return p(g)?(g.preventDefault(),this.attachFiles(g.clipboardData.files)):b(g)?(g.preventDefault(),w={type:"text/plain",string:g.clipboardData.getData("text/plain")},(E=this.delegate)!=null&&E.inputControllerWillPaste(w),(x=this.responder)!=null&&x.insertString(w.string),this.render(),(S=this.delegate)!=null?S.inputControllerDidPaste(w):void 0):(y=(_=g.clipboardData)!=null?_.getData("URL"):void 0)?(g.preventDefault(),w={type:"text/html",html:this.createLinkHTML(y)},(M=this.delegate)!=null&&M.inputControllerWillPaste(w),(O=this.responder)!=null&&O.insertHTML(w.html),this.render(),(D=this.delegate)!=null?D.inputControllerDidPaste(w):void 0):void 0},beforeinput:function(g){var y;return(y=this.inputTypes[g.inputType])?(this.withEvent(g,y),this.scheduleRender()):void 0},input:function(){return t.selectionChangeObserver.reset()},dragstart:function(g){var y,w;return(y=this.responder)!=null&&y.selectionContainsAttachments()?(g.dataTransfer.setData("application/x-trix-dragging",!0),this.dragging={range:(w=this.responder)!=null?w.getSelectedRange():void 0,point:m(g)}):void 0},dragenter:function(g){return d(g)?g.preventDefault():void 0},dragover:function(g){var y,w;if(this.dragging){if(g.preventDefault(),y=m(g),!s(y,this.dragging.point))return this.dragging.point=y,(w=this.responder)!=null?w.setLocationRangeFromPointRange(y):void 0}else if(d(g))return g.preventDefault()},drop:function(g){var y,w,E,x;return this.dragging?(g.preventDefault(),(w=this.delegate)!=null&&w.inputControllerWillMoveText(),(E=this.responder)!=null&&E.moveTextFromRange(this.dragging.range),this.dragging=null,this.scheduleRender()):d(g)?(g.preventDefault(),y=m(g),(x=this.responder)!=null&&x.setLocationRangeFromPointRange(y),this.attachFiles(g.dataTransfer.files)):void 0},dragend:function(){var g;return this.dragging?((g=this.responder)!=null&&g.setSelectedRange(this.dragging.range),this.dragging=null):void 0},compositionend:function(){return this.composing?(this.composing=!1,this.scheduleRender()):void 0}},h.prototype.keys={ArrowLeft:function(){var g,y;return(g=this.responder)!=null&&g.shouldManageMovingCursorInDirection("backward")?(this.event.preventDefault(),(y=this.responder)!=null?y.moveCursorInDirection("backward"):void 0):void 0},ArrowRight:function(){var g,y;return(g=this.responder)!=null&&g.shouldManageMovingCursorInDirection("forward")?(this.event.preventDefault(),(y=this.responder)!=null?y.moveCursorInDirection("forward"):void 0):void 0},Backspace:function(){var g,y,w;return(g=this.responder)!=null&&g.shouldManageDeletingInDirection("backward")?(this.event.preventDefault(),(y=this.delegate)!=null&&y.inputControllerWillPerformTyping(),(w=this.responder)!=null&&w.deleteInDirection("backward"),this.render()):void 0},Tab:function(){var g,y;return(g=this.responder)!=null&&g.canIncreaseNestingLevel()?(this.event.preventDefault(),(y=this.responder)!=null&&y.increaseNestingLevel(),this.render()):void 0},"Tab+Shift":function(){var g,y;return(g=this.responder)!=null&&g.canDecreaseNestingLevel()?(this.event.preventDefault(),(y=this.responder)!=null&&y.decreaseNestingLevel(),this.render()):void 0}},h.prototype.inputTypes={deleteByComposition:function(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteByCut:function(){return this.deleteInDirection("backward")},deleteByDrag:function(){return this.event.preventDefault(),this.withTargetDOMRange(function(){var g;return this.deleteByDragRange=(g=this.responder)!=null?g.getSelectedRange():void 0})},deleteCompositionText:function(){return this.deleteInDirection("backward",{recordUndoEntry:!1})},deleteContent:function(){return this.deleteInDirection("backward")},deleteContentBackward:function(){return this.deleteInDirection("backward")},deleteContentForward:function(){return this.deleteInDirection("forward")},deleteEntireSoftLine:function(){return this.deleteInDirection("forward")},deleteHardLineBackward:function(){return this.deleteInDirection("backward")},deleteHardLineForward:function(){return this.deleteInDirection("forward")},deleteSoftLineBackward:function(){return this.deleteInDirection("backward")},deleteSoftLineForward:function(){return this.deleteInDirection("forward")},deleteWordBackward:function(){return this.deleteInDirection("backward")}
358,deleteWordForward:function(){return this.deleteInDirection("forward")},formatBackColor:function(){return this.activateAttributeIfSupported("backgroundColor",this.event.data)},formatBold:function(){return this.toggleAttributeIfSupported("bold")},formatFontColor:function(){return this.activateAttributeIfSupported("color",this.event.data)},formatFontName:function(){return this.activateAttributeIfSupported("font",this.event.data)},formatIndent:function(){var g;return(g=this.responder)!=null&&g.canIncreaseNestingLevel()?this.withTargetDOMRange(function(){var y;return(y=this.responder)!=null?y.increaseNestingLevel():void 0}):void 0},formatItalic:function(){return this.toggleAttributeIfSupported("italic")},formatJustifyCenter:function(){return this.toggleAttributeIfSupported("justifyCenter")},formatJustifyFull:function(){return this.toggleAttributeIfSupported("justifyFull")},formatJustifyLeft:function(){return this.toggleAttributeIfSupported("justifyLeft")},formatJustifyRight:function(){return this.toggleAttributeIfSupported("justifyRight")},formatOutdent:function(){var g;return(g=this.responder)!=null&&g.canDecreaseNestingLevel()?this.withTargetDOMRange(function(){var y;return(y=this.responder)!=null?y.decreaseNestingLevel():void 0}):void 0},formatRemove:function(){return this.withTargetDOMRange(function(){var g,y,w,E;E=[];for(g in(y=this.responder)!=null?y.getCurrentAttributes():void 0)E.push((w=this.responder)!=null?w.removeCurrentAttribute(g):void 0);return E})},formatSetBlockTextDirection:function(){return this.activateAttributeIfSupported("blockDir",this.event.data)},formatSetInlineTextDirection:function(){return this.activateAttributeIfSupported("textDir",this.event.data)},formatStrikeThrough:function(){return this.toggleAttributeIfSupported("strike")},formatSubscript:function(){return this.toggleAttributeIfSupported("sub")},formatSuperscript:function(){return this.toggleAttributeIfSupported("sup")},formatUnderline:function(){return this.toggleAttributeIfSupported("underline")},historyRedo:function(){var g;return(g=this.delegate)!=null?g.inputControllerWillPerformRedo():void 0},historyUndo:function(){var g;return(g=this.delegate)!=null?g.inputControllerWillPerformUndo():void 0},insertCompositionText:function(){return this.composing=!0,this.insertString(this.event.data)},insertFromComposition:function(){return this.composing=!1,this.insertString(this.event.data)},insertFromDrop:function(){var g,y;return(g=this.deleteByDragRange)?(this.deleteByDragRange=null,(y=this.delegate)!=null&&y.inputControllerWillMoveText(),this.withTargetDOMRange(function(){var w;return(w=this.responder)!=null?w.moveTextFromRange(g):void 0})):void 0},insertFromPaste:function(){var g,y,w,E,x,S,_,M,O,D,k;return g=this.event.dataTransfer,x={dataTransfer:g},(y=g.getData("URL"))?(this.event.preventDefault(),x.type="text/html",k=(E=g.getData("public.url-name"))?t.squishBreakableWhitespace(E).trim():y,x.html=this.createLinkHTML(y,k),(S=this.delegate)!=null&&S.inputControllerWillPaste(x),this.withTargetDOMRange(function(){var A;return(A=this.responder)!=null?A.insertHTML(x.html):void 0}),this.afterRender=function(A){return function(){var C;return(C=A.delegate)!=null?C.inputControllerDidPaste(x):void 0}}(this)):n(g)?(x.type="text/plain",x.string=g.getData("text/plain"),(_=this.delegate)!=null&&_.inputControllerWillPaste(x),this.withTargetDOMRange(function(){var A;return(A=this.responder)!=null?A.insertString(x.string):void 0}),this.afterRender=function(A){return function(){var C;return(C=A.delegate)!=null?C.inputControllerDidPaste(x):void 0}}(this)):(w=g.getData("text/html"))?(this.event.preventDefault(),x.type="text/html",x.html=w,(M=this.delegate)!=null&&M.inputControllerWillPaste(x),this.withTargetDOMRange(function(){var A;return(A=this.responder)!=null?A.insertHTML(x.html):void 0}),this.afterRender=function(A){return function(){var C;return(C=A.delegate)!=null?C.inputControllerDidPaste(x):void 0}}(this)):(O=g.files)!=null&&O.length?(x.type="File",x.file=g.files[0],(D=this.delegate)!=null&&D.inputControllerWillPaste(x),this.withTargetDOMRange(function(){var A;return(A=this.responder)!=null?A.insertFile(x.file):void 0}),this.afterRender=function(A){return function(){var C;return(C=A.delegate)!=null?C.inputControllerDidPaste(x):void 0}}(this)):void 0},insertFromYank:function(){return this.insertString(this.event.data)},insertLineBreak:function(){return this.insertString(` 359`)},insertLink:function(){return this.activateAttributeIfSupported("href",this.event.data)},insertOrderedList:function(){return this.toggleAttributeIfSupported("number")},insertParagraph:function(){var g;return(g=this.delegate)!=null&&g.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var y;return(y=this.responder)!=null?y.insertLineBreak():void 0})},insertReplacementText:function(){return this.insertString(this.event.dataTransfer.getData("text/plain"),{updatePosition:!1})},insertText:function(){var g,y;return this.insertString((g=this.event.data)!=null?g:(y=this.event.dataTransfer)!=null?y.getData("text/plain"):void 0)},insertTranspose:function(){return this.insertString(this.event.data)},insertUnorderedList:function(){return this.toggleAttributeIfSupported("bullet")}},h.prototype.insertString=function(g,y){var w;return g==null&&(g=""),(w=this.delegate)!=null&&w.inputControllerWillPerformTyping(),this.withTargetDOMRange(function(){var E;return(E=this.responder)!=null?E.insertString(g,y):void 0})},h.prototype.toggleAttributeIfSupported=function(g){var y;return u.call(t.getAllAttributeNames(),g)>=0?((y=this.delegate)!=null&&y.inputControllerWillPerformFormatting(g),this.withTargetDOMRange(function(){var w;return(w=this.responder)!=null?w.toggleCurrentAttribute(g):void 0})):void 0},h.prototype.activateAttributeIfSupported=function(g,y){var w;return u.call(t.getAllAttributeNames(),g)>=0?((w=this.delegate)!=null&&w.inputControllerWillPerformFormatting(g),this.withTargetDOMRange(function(){var E;return(E=this.responder)!=null?E.setCurrentAttribute(g,y):void 0})):void 0},h.prototype.deleteInDirection=function(g,y){var w,E,x,S;return x=(y??{recordUndoEntry:!0}).recordUndoEntry,x&&(S=this.delegate)!=null&&S.inputControllerWillPerformTyping(),E=function(_){return function(){var M;return(M=_.responder)!=null?M.deleteInDirection(g):void 0}}(this),(w=this.getTargetDOMRange({minLength:2}))?this.withTargetDOMRange(w,E):E()},h.prototype.withTargetDOMRange=function(g,y){var w;return typeof g=="function"&&(y=g,g=this.getTargetDOMRange()),g?(w=this.responder)!=null?w.withTargetDOMRange(g,y.bind(this)):void 0:(t.selectionChangeObserver.reset(),y.call(this))},h.prototype.getTargetDOMRange=function(g){var y,w,E,x;return E=(g??{minLength:0}).minLength,(x=typeof(y=this.event).getTargetRanges=="function"?y.getTargetRanges():void 0)&&x.length&&(w=v(x[0]),E===0||w.toString().length>=E)?w:void 0},v=function(g){var y;return y=document.createRange(),y.setStart(g.startContainer,g.startOffset),y.setEnd(g.endContainer,g.endOffset),y},h.prototype.withEvent=function(g,y){var w;this.event=g;try{w=y.call(this)}finally{this.event=null}return w},d=function(g){var y,w;return u.call((y=(w=g.dataTransfer)!=null?w.types:void 0)!=null?y:[],"Files")>=0},p=function(g){var y;return(y=g.clipboardData)?u.call(y.types,"Files")>=0&&y.types.length===1&&y.files.length>=1:void 0},b=function(g){var y;return(y=g.clipboardData)?u.call(y.types,"text/plain")>=0&&y.types.length===1:void 0},f=function(g){var y;return y=[],g.altKey&&y.push("alt"),g.shiftKey&&y.push("shift"),y.push(g.key),y},m=function(g){return{x:g.clientX,y:g.clientY}},h}(t.InputController)}).call(this),(function(){var n,r,s,o,l,a,u,c,h=function(p,b){return function(){return p.apply(b,arguments)}},d=function(p,b){function m(){this.constructor=p}for(var v in b)f.call(b,v)&&(p[v]=b[v]);return m.prototype=b.prototype,p.prototype=new m,p.__super__=b.prototype,p},f={}.hasOwnProperty;r=t.defer,s=t.handleEvent,a=t.makeElement,c=t.tagName,u=t.config,l=u.lang,n=u.css,o=u.keyNames,t.AttachmentEditorController=function(p){function b(v,g,y,w){this.attachmentPiece=v,this.element=g,this.container=y,this.options=w??{},this.didBlurCaption=h(this.didBlurCaption,this),this.didChangeCaption=h(this.didChangeCaption,this),this.didInputCaption=h(this.didInputCaption,this),this.didKeyDownCaption=h(this.didKeyDownCaption,this),this.didClickActionButton=h(this.didClickActionButton,this),this.didClickToolbar=h(this.didClickToolbar,this),this.attachment=this.attachmentPiece.attachment,c(this.element)==="a"&&(this.element=this.element.firstChild),this.install()}var m;return d(b,p),m=function(v){return function(){var g;return g=v.apply(this,arguments),g.do(),this.undos==null&&(this.undos=[]),this.undos.push(g.undo)}},b.prototype.install=function(){return this.makeElementMutable(),this.addToolbar(),this.attachment.isPreviewable()?this.installCaptionEditor():void 0},b.prototype.uninstall=function(){var v,g;for(this.savePendingCaption();g=this.undos.pop();)g();return(v=this.delegate)!=null?v.didUninstallAttachmentEditor(this):void 0},b.prototype.savePendingCaption=function(){var v,g,y;return this.pendingCaption!=null?(v=this.pendingCaption,this.pendingCaption=null,v?(g=this.delegate)!=null&&typeof g.attachmentEditorDidRequestUpdatingAttributesForAttachment=="function"?g.attachmentEditorDidRequestUpdatingAttributesForAttachment({caption:v},this.attachment):void 0:(y=this.delegate)!=null&&typeof y.attachmentEditorDidRequestRemovingAttributeForAttachment=="function"?y.attachmentEditorDidRequestRemovingAttributeForAttachment("caption",this.attachment):void 0):void 0},b.prototype.makeElementMutable=m(function(){return{do:function(v){return function(){return v.element.dataset.trixMutable=!0}}(this),undo:function(v){return function(){return delete v.element.dataset.trixMutable}}(this)}}),b.prototype.addToolbar=m(function(){var v;return v=a({tagName:"div",className:n.attachmentToolbar,data:{trixMutable:!0},childNodes:a({tagName:"div",className:"trix-button-row",childNodes:a({tagName:"span",className:"trix-button-group trix-button-group--actions",childNodes:a({tagName:"button",className:"trix-button trix-button--remove",textContent:l.remove,attributes:{title:l.remove},data:{trixAction:"remove"}})})})}),this.attachment.isPreviewable()&&v.appendChild(a({tagName:"div",className:n.attachmentMetadataContainer,childNodes:a({tagName:"span",className:n.attachmentMetadata,childNodes:[a({tagName:"span",className:n.attachmentName,textContent:this.attachment.getFilename(),attributes:{title:this.attachment.getFilename()}}),a({tagName:"span",className:n.attachmentSize,textContent:this.attachment.getFormattedFilesize()})]})})),s("click",{onElement:v,withCallback:this.didClickToolbar}),s("click",{onElement:v,matchingSelector:"[data-trix-action]",withCallback:this.didClickActionButton}),{do:function(g){return function(){return g.element.appendChild(v)}}(this),undo:function(){return function(){return t.removeNode(v)}}()}}),b.prototype.installCaptionEditor=m(function(){var v,g,y,w,E;return w=a({tagName:"textarea",className:n.attachmentCaptionEditor,attributes:{placeholder:l.captionPlaceholder},data:{trixMutable:!0}}),w.value=this.attachmentPiece.getCaption(),E=w.cloneNode(),E.classList.add("trix-autoresize-clone"),E.tabIndex=-1,v=function(){return E.value=w.value,w.style.height=E.scrollHeight+"px"},s("input",{onElement:w,withCallback:v}),s("input",{onElement:w,withCallback:this.didInputCaption}),s("keydown",{onElement:w,withCallback:this.didKeyDownCaption}),s("change",{onElement:w,withCallback:this.didChangeCaption}),s("blur",{onElement:w,withCallback:this.didBlurCaption}),y=this.element.querySelector("figcaption"),g=y.cloneNode(),{do:function(x){return function(){return y.style.display="none",g.appendChild(w),g.appendChild(E),g.classList.add(n.attachmentCaption+"--editing"),y.parentElement.insertBefore(g,y),v(),x.options.editCaption?r(function(){return w.focus()}):void 0}}(this),undo:function(){return t.removeNode(g),y.style.display=null}}}),b.prototype.didClickToolbar=function(v){return v.preventDefault(),v.stopPropagation()},b.prototype.didClickActionButton=function(v){var g;switch(v.target.getAttribute("data-trix-action")){case"remove":return(g=this.delegate)!=null?g.attachmentEditorDidRequestRemovalOfAttachment(this.attachment):void 0}},b.prototype.didKeyDownCaption=function(v){var g;return o[v.keyCode]==="return"?(v.preventDefault(),this.savePendingCaption(),(g=this.delegate)!=null&&typeof g.attachmentEditorDidRequestDeselectingAttachment=="function"?g.attachmentEditorDidRequestDeselectingAttachment(this.attachment):void 0):void 0},b.prototype.didInputCaption=function(v){return this.pendingCaption=v.target.value.replace(/\s/g," ").trim()},b.prototype.didChangeCaption=function(){return this.savePendingCaption()},b.prototype.didBlurCaption=function(){return this.savePendingCaption()},b}(t.BasicObject)}).call(this),(function(){var n,r,s,o=function(a,u){function c(){this.constructor=a}for(var h in u)l.call(u,h)&&(a[h]=u[h]);return c.prototype=u.prototype,a.prototype=new c,a.__super__=u.prototype,a},l={}.hasOwnProperty;s=t.makeElement,n=t.config.css,t.AttachmentView=function(a){function u(){u.__super__.constructor.apply(this,arguments),this.attachment=this.object,this.attachment.uploadProgressDelegate=this,this.attachmentPiece=this.options.piece}var c;return o(u,a),u.attachmentSelector="[data-trix-attachment]",u.prototype.createContentNodes=function(){return[]},u.prototype.createNodes=function(){var h,d,f,p,b,m,v;if(h=p=s({tagName:"figure",className:this.getClassName(),data:this.getData(),editable:!1}),(d=this.getHref())&&(p=s({tagName:"a",editable:!1,attributes:{href:d,tabindex:-1}}),h.appendChild(p)),this.attachment.hasContent())p.innerHTML=this.attachment.getContent();else for(v=this.createContentNodes(),f=0,b=v.length;b>f;f++)m=v[f],p.appendChild(m);return p.appendChild(this.createCaptionElement()),this.attachment.isPending()&&(this.progressElement=s({tagName:"progress",attributes:{class:n.attachmentProgress,value:this.attachment.getUploadProgress(),max:100},data:{trixMutable:!0,trixStoreKey:["progressElement",this.attachment.id].join("/")}}),h.appendChild(this.progressElement)),[c("left"),h,c("right")]},u.prototype.createCaptionElement=function(){var h,d,f,p,b,m,v;return f=s({tagName:"figcaption",className:n.attachmentCaption}),(h=this.attachmentPiece.getCaption())?(f.classList.add(n.attachmentCaption+"--edited"),f.textContent=h):(d=this.getCaptionConfig(),d.name&&(p=this.attachment.getFilename()),d.size&&(m=this.attachment.getFormattedFilesize()),p&&(b=s({tagName:"span",className:n.attachmentName,textContent:p}),f.appendChild(b)),m&&(p&&f.appendChild(document.createTextNode(" ")),v=s({tagName:"span",className:n.attachmentSize,textContent:m}),f.appendChild(v))),f},u.prototype.getClassName=function(){var h,d;return d=[n.attachment,n.attachment+"--"+this.attachment.getType()],(h=this.attachment.getExtension())&&d.push(n.attachment+"--"+h),d.join(" ")},u.prototype.getData=function(){var h,d;return d={trixAttachment:JSON.stringify(this.attachment),trixContentType:this.attachment.getContentType(),trixId:this.attachment.id},h=this.attachmentPiece.attributes,h.isEmpty()||(d.trixAttributes=JSON.stringify(h)),this.attachment.isPending()&&(d.trixSerialize=!1),d},u.prototype.getHref=function(){return r(this.attachment.getContent(),"a")?void 0:this.attachment.getHref()},u.prototype.getCaptionConfig=function(){var h,d,f;return f=this.attachment.getType(),h=t.copyObject((d=t.config.attachments[f])!=null?d.caption:void 0),f==="file"&&(h.name=!0),h},u.prototype.findProgressElement=function(){var h;
359return(h=this.findElement())!=null?h.querySelector("progress"):void 0},c=function(h){return s({tagName:"span",textContent:t.ZERO_WIDTH_SPACE,data:{trixCursorTarget:h,trixSerialize:!1}})},u.prototype.attachmentDidChangeUploadProgress=function(){var h,d;return d=this.attachment.getUploadProgress(),(h=this.findProgressElement())!=null?h.value=d:void 0},u}(t.ObjectView),r=function(a,u){var c;return c=s("div"),c.innerHTML=a??"",c.querySelector(u)}}).call(this),(function(){var n,r=function(o,l){function a(){this.constructor=o}for(var u in l)s.call(l,u)&&(o[u]=l[u]);return a.prototype=l.prototype,o.prototype=new a,o.__super__=l.prototype,o},s={}.hasOwnProperty;n=t.makeElement,t.PreviewableAttachmentView=function(o){function l(){l.__super__.constructor.apply(this,arguments),this.attachment.previewDelegate=this}return r(l,o),l.prototype.createContentNodes=function(){return this.image=n({tagName:"img",attributes:{src:""},data:{trixMutable:!0}}),this.refresh(this.image),[this.image]},l.prototype.createCaptionElement=function(){var a;return a=l.__super__.createCaptionElement.apply(this,arguments),a.textContent||a.setAttribute("data-trix-placeholder",t.config.lang.captionPlaceholder),a},l.prototype.refresh=function(a){var u;return a==null&&(a=(u=this.findElement())!=null?u.querySelector("img"):void 0),a?this.updateAttributesForImage(a):void 0},l.prototype.updateAttributesForImage=function(a){var u,c,h,d,f,p;return f=this.attachment.getURL(),c=this.attachment.getPreviewURL(),a.src=c||f,c===f?a.removeAttribute("data-trix-serialized-attributes"):(h=JSON.stringify({src:f}),a.setAttribute("data-trix-serialized-attributes",h)),p=this.attachment.getWidth(),u=this.attachment.getHeight(),p!=null&&(a.width=p),u!=null&&(a.height=u),d=["imageElement",this.attachment.id,a.src,a.width,a.height].join("/"),a.dataset.trixStoreKey=d},l.prototype.attachmentDidChangeAttributes=function(){return this.refresh(this.image),this.refresh()},l}(t.AttachmentView)}).call(this),(function(){var n,r,s,o=function(a,u){function c(){this.constructor=a}for(var h in u)l.call(u,h)&&(a[h]=u[h]);return c.prototype=u.prototype,a.prototype=new c,a.__super__=u.prototype,a},l={}.hasOwnProperty;s=t.makeElement,n=t.findInnerElement,r=t.getTextConfig,t.PieceView=function(a){function u(){var h;u.__super__.constructor.apply(this,arguments),this.piece=this.object,this.attributes=this.piece.getAttributes(),h=this.options,this.textConfig=h.textConfig,this.context=h.context,this.piece.attachment?this.attachment=this.piece.attachment:this.string=this.piece.toString()}var c;return o(u,a),u.prototype.createNodes=function(){var h,d,f,p,b,m;if(m=this.attachment?this.createAttachmentNodes():this.createStringNodes(),h=this.createElement()){for(f=n(h),d=0,p=m.length;p>d;d++)b=m[d],f.appendChild(b);m=[h]}return m},u.prototype.createAttachmentNodes=function(){var h,d;return h=this.attachment.isPreviewable()?t.PreviewableAttachmentView:t.AttachmentView,d=this.createChildView(h,this.piece.attachment,{piece:this.piece}),d.getNodes()},u.prototype.createStringNodes=function(){var h,d,f,p,b,m,v,g,y;if((v=this.textConfig)!=null&&v.plaintext)return[document.createTextNode(this.string)];for(m=[],g=this.string.split(` 360`),f=d=0,p=g.length;p>d;f=++d)y=g[f],f>0&&(h=s("br"),m.push(h)),y.length&&(b=document.createTextNode(this.preserveSpaces(y)),m.push(b));return m},u.prototype.createElement=function(){var h,d,f,p,b,m,v,g,y;g={},m=this.attributes;for(p in m)if(y=m[p],(h=r(p))&&(h.tagName&&(b=s(h.tagName),f?(f.appendChild(b),f=b):d=f=b),h.styleProperty&&(g[h.styleProperty]=y),h.style)){v=h.style;for(p in v)y=v[p],g[p]=y}if(Object.keys(g).length){d==null&&(d=s("span"));for(p in g)y=g[p],d.style[p]=y}return d},u.prototype.createContainerElement=function(){var h,d,f,p,b;p=this.attributes;for(f in p)if(b=p[f],(d=r(f))&&d.groupTagName)return h={},h[f]=b,s(d.groupTagName,h)},c=t.NON_BREAKING_SPACE,u.prototype.preserveSpaces=function(h){return this.context.isLast&&(h=h.replace(/\ $/,c)),h=h.replace(/(\S)\ {3}(\S)/g,"$1 "+c+" $2").replace(/\ {2}/g,c+" ").replace(/\ {2}/g," "+c),(this.context.isFirst||this.context.followsWhitespace)&&(h=h.replace(/^\ /,c)),h},u}(t.ObjectView)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.TextView=function(s){function o(){o.__super__.constructor.apply(this,arguments),this.text=this.object,this.textConfig=this.options.textConfig}var l;return n(o,s),o.prototype.createNodes=function(){var a,u,c,h,d,f,p,b,m,v;for(f=[],b=t.ObjectGroup.groupObjects(this.getPieces()),h=b.length-1,c=u=0,d=b.length;d>u;c=++u)p=b[c],a={},c===0&&(a.isFirst=!0),c===h&&(a.isLast=!0),l(m)&&(a.followsWhitespace=!0),v=this.findOrCreateCachedChildView(t.PieceView,p,{textConfig:this.textConfig,context:a}),f.push.apply(f,v.getNodes()),m=p;return f},o.prototype.getPieces=function(){var a,u,c,h,d;for(h=this.text.getPieces(),d=[],a=0,u=h.length;u>a;a++)c=h[a],c.hasAttribute("blockBreak")||d.push(c);return d},l=function(a){return/\s$/.test(a!=null?a.toString():void 0)},o}(t.ObjectView)}).call(this),(function(){var n,r,s,o=function(a,u){function c(){this.constructor=a}for(var h in u)l.call(u,h)&&(a[h]=u[h]);return c.prototype=u.prototype,a.prototype=new c,a.__super__=u.prototype,a},l={}.hasOwnProperty;s=t.makeElement,r=t.getBlockConfig,n=t.config.css,t.BlockView=function(a){function u(){u.__super__.constructor.apply(this,arguments),this.block=this.object,this.attributes=this.block.getAttributes()}return o(u,a),u.prototype.createNodes=function(){var c,h,d,f,p,b,m,v,g,y,w;if(h=document.createComment("block"),m=[h],this.block.isEmpty()?m.push(s("br")):(y=(v=r(this.block.getLastAttribute()))!=null?v.text:void 0,w=this.findOrCreateCachedChildView(t.TextView,this.block.text,{textConfig:y}),m.push.apply(m,w.getNodes()),this.shouldAddExtraNewlineElement()&&m.push(s("br"))),this.attributes.length)return m;for(g=t.config.blockAttributes.default.tagName,this.block.isRTL()&&(c={dir:"rtl"}),d=s({tagName:g,attributes:c}),f=0,p=m.length;p>f;f++)b=m[f],d.appendChild(b);return[d]},u.prototype.createContainerElement=function(c){var h,d,f,p,b;return h=this.attributes[c],b=r(h).tagName,c===0&&this.block.isRTL()&&(d={dir:"rtl"}),h==="attachmentGallery"&&(p=this.block.getBlockBreakPosition(),f=n.attachmentGallery+" "+n.attachmentGallery+"--"+p),s({tagName:b,className:f,attributes:d})},u.prototype.shouldAddExtraNewlineElement=function(){return/\n\n$/.test(this.block.toString())},u}(t.ObjectView)}).call(this),(function(){var n,r,s=function(l,a){function u(){this.constructor=l}for(var c in a)o.call(a,c)&&(l[c]=a[c]);return u.prototype=a.prototype,l.prototype=new u,l.__super__=a.prototype,l},o={}.hasOwnProperty;n=t.defer,r=t.makeElement,t.DocumentView=function(l){function a(){a.__super__.constructor.apply(this,arguments),this.element=this.options.element,this.elementStore=new t.ElementStore,this.setDocument(this.object)}var u,c,h;return s(a,l),a.render=function(d){var f,p;return f=r("div"),p=new this(d,{element:f}),p.render(),p.sync(),f},a.prototype.setDocument=function(d){return d.isEqualTo(this.document)?void 0:this.document=this.object=d},a.prototype.render=function(){var d,f,p,b,m,v,g;
360if(this.childViews=[],this.shadowElement=r("div"),!this.document.isEmpty()){for(m=t.ObjectGroup.groupObjects(this.document.getBlocks(),{asTree:!0}),v=[],d=0,f=m.length;f>d;d++)b=m[d],g=this.findOrCreateCachedChildView(t.BlockView,b),v.push((function(){var y,w,E,x;for(E=g.getNodes(),x=[],y=0,w=E.length;w>y;y++)p=E[y],x.push(this.shadowElement.appendChild(p));return x}).call(this));return v}},a.prototype.isSynced=function(){return u(this.shadowElement,this.element)},a.prototype.sync=function(){var d;for(d=this.createDocumentFragmentForSync();this.element.lastChild;)this.element.removeChild(this.element.lastChild);return this.element.appendChild(d),this.didSync()},a.prototype.didSync=function(){return this.elementStore.reset(c(this.element)),n(function(d){return function(){return d.garbageCollectCachedViews()}}(this))},a.prototype.createDocumentFragmentForSync=function(){var d,f,p,b,m,v,g,y,w,E;for(f=document.createDocumentFragment(),y=this.shadowElement.childNodes,p=0,m=y.length;m>p;p++)g=y[p],f.appendChild(g.cloneNode(!0));for(w=c(f),b=0,v=w.length;v>b;b++)d=w[b],(E=this.elementStore.remove(d))&&d.parentNode.replaceChild(E,d);return f},c=function(d){return d.querySelectorAll("[data-trix-store-key]")},u=function(d,f){return h(d.innerHTML)===h(f.innerHTML)},h=function(d){return d.replace(/ /g," ")},a}(t.ObjectView)}).call(this),(function(){var n,r,s,o,l,a=function(h,d){return function(){return h.apply(d,arguments)}},u=function(h,d){function f(){this.constructor=h}for(var p in d)c.call(d,p)&&(h[p]=d[p]);return f.prototype=d.prototype,h.prototype=new f,h.__super__=d.prototype,h},c={}.hasOwnProperty;s=t.findClosestElementFromNode,o=t.handleEvent,l=t.innerElementIsActive,r=t.defer,n=t.AttachmentView.attachmentSelector,t.CompositionController=function(h){function d(f,p){this.element=f,this.composition=p,this.didClickAttachment=a(this.didClickAttachment,this),this.didBlur=a(this.didBlur,this),this.didFocus=a(this.didFocus,this),this.documentView=new t.DocumentView(this.composition.document,{element:this.element}),o("focus",{onElement:this.element,withCallback:this.didFocus}),o("blur",{onElement:this.element,withCallback:this.didBlur}),o("click",{onElement:this.element,matchingSelector:"a[contenteditable=false]",preventDefault:!0}),o("mousedown",{onElement:this.element,matchingSelector:n,withCallback:this.didClickAttachment}),o("click",{onElement:this.element,matchingSelector:"a"+n,preventDefault:!0})}return u(d,h),d.prototype.didFocus=function(){var f,p,b;return f=function(m){return function(){var v;return m.focused?void 0:(m.focused=!0,(v=m.delegate)!=null&&typeof v.compositionControllerDidFocus=="function"?v.compositionControllerDidFocus():void 0)}}(this),(p=(b=this.blurPromise)!=null?b.then(f):void 0)!=null?p:f()},d.prototype.didBlur=function(){return this.blurPromise=new Promise(function(f){return function(p){return r(function(){var b;return l(f.element)||(f.focused=null,(b=f.delegate)!=null&&typeof b.compositionControllerDidBlur=="function"&&b.compositionControllerDidBlur()),f.blurPromise=null,p()})}}(this))},d.prototype.didClickAttachment=function(f,p){var b,m,v;return b=this.findAttachmentForElement(p),m=s(f.target,{matchingSelector:"figcaption"})!=null,(v=this.delegate)!=null&&typeof v.compositionControllerDidSelectAttachment=="function"?v.compositionControllerDidSelectAttachment(b,{editCaption:m}):void 0},d.prototype.getSerializableElement=function(){return this.isEditingAttachment()?this.documentView.shadowElement:this.element},d.prototype.render=function(){var f,p,b;return this.revision!==this.composition.revision&&(this.documentView.setDocument(this.composition.document),this.documentView.render(),this.revision=this.composition.revision),this.canSyncDocumentView()&&!this.documentView.isSynced()&&((f=this.delegate)!=null&&typeof f.compositionControllerWillSyncDocumentView=="function"&&f.compositionControllerWillSyncDocumentView(),this.documentView.sync(),(p=this.delegate)!=null&&typeof p.compositionControllerDidSyncDocumentView=="function"&&p.compositionControllerDidSyncDocumentView()),(b=this.delegate)!=null&&typeof b.compositionControllerDidRender=="function"?b.compositionControllerDidRender():void 0},d.prototype.rerenderViewForObject=function(f){return this.invalidateViewForObject(f),this.render()},d.prototype.invalidateViewForObject=function(f){return this.documentView.invalidateViewForObject(f)},d.prototype.isViewCachingEnabled=function(){return this.documentView.isViewCachingEnabled()},d.prototype.enableViewCaching=function(){return this.documentView.enableViewCaching()},d.prototype.disableViewCaching=function(){return this.documentView.disableViewCaching()},d.prototype.refreshViewCache=function(){return this.documentView.garbageCollectCachedViews()},d.prototype.isEditingAttachment=function(){return this.attachmentEditor!=null},d.prototype.installAttachmentEditorForAttachment=function(f,p){var b,m,v;if(((v=this.attachmentEditor)!=null?v.attachment:void 0)!==f&&(m=this.documentView.findElementForOb
360ject(f)))return this.uninstallAttachmentEditor(),b=this.composition.document.getAttachmentPieceForAttachment(f),this.attachmentEditor=new t.AttachmentEditorController(b,m,this.element,p),this.attachmentEditor.delegate=this},d.prototype.uninstallAttachmentEditor=function(){var f;return(f=this.attachmentEditor)!=null?f.uninstall():void 0},d.prototype.didUninstallAttachmentEditor=function(){return this.attachmentEditor=null,this.render()},d.prototype.attachmentEditorDidRequestUpdatingAttributesForAttachment=function(f,p){var b;return(b=this.delegate)!=null&&typeof b.compositionControllerWillUpdateAttachment=="function"&&b.compositionControllerWillUpdateAttachment(p),this.composition.updateAttributesForAttachment(f,p)},d.prototype.attachmentEditorDidRequestRemovingAttributeForAttachment=function(f,p){var b;return(b=this.delegate)!=null&&typeof b.compositionControllerWillUpdateAttachment=="function"&&b.compositionControllerWillUpdateAttachment(p),this.composition.removeAttributeForAttachment(f,p)},d.prototype.attachmentEditorDidRequestRemovalOfAttachment=function(f){var p;return(p=this.delegate)!=null&&typeof p.compositionControllerDidRequestRemovalOfAttachment=="function"?p.compositionControllerDidRequestRemovalOfAttachment(f):void 0},d.prototype.attachmentEditorDidRequestDeselectingAttachment=function(f){var p;return(p=this.delegate)!=null&&typeof p.compositionControllerDidRequestDeselectingAttachment=="function"?p.compositionControllerDidRequestDeselectingAttachment(f):void 0},d.prototype.canSyncDocumentView=function(){return!this.isEditingAttachment()},d.prototype.findAttachmentForElement=function(f){return this.composition.document.getAttachmentById(parseInt(f.dataset.trixId,10))},d}(t.BasicObject)}).call(this),(function(){var n,r,s,o=function(u,c){return function(){return u.apply(c,arguments)}},l=function(u,c){function h(){this.constructor=u}for(var d in c)a.call(c,d)&&(u[d]=c[d]);return h.prototype=c.prototype,u.prototype=new h,u.__super__=c.prototype,u},a={}.hasOwnProperty;r=t.handleEvent,s=t.triggerEvent,n=t.findClosestElementFromNode,t.ToolbarController=function(u){function c(x){this.element=x,this.didKeyDownDialogInput=o(this.didKeyDownDialogInput,this),this.didClickDialogButton=o(this.didClickDialogButton,this),this.didClickAttributeButton=o(this.didClickAttributeButton,this),this.didClickActionButton=o(this.didClickActionButton,this),this.attributes={},this.actions={},this.resetDialogInputs(),r("mousedown",{onElement:this.element,matchingSelector:h,withCallback:this.didClickActionButton}),r("mousedown",{onElement:this.element,matchingSelector:f,withCallback:this.didClickAttributeButton}),r("click",{onElement:this.element,matchingSelector:E,preventDefault:!0}),r("click",{onElement:this.element,matchingSelector:p,withCallback:this.didClickDialogButton}),r("keydown",{onElement:this.element,matchingSelector:b,withCallback:this.didKeyDownDialogInput})}var h,d,f,p,b,m,v,g,y,w,E;return l(c,u),f="[data-trix-attribute]",h="[data-trix-action]",E=f+", "+h,m="[data-trix-dialog]",d=m+"[data-trix-active]",p=m+" [data-trix-method]",b=m+" [data-trix-input]",c.prototype.didClickActionButton=function(x,S){var _,M,O;return(M=this.delegate)!=null&&M.toolbarDidClickButton(),x.preventDefault(),_=v(S),this.getDialog(_)?this.toggleDialog(_):(O=this.delegate)!=null?O.toolbarDidInvokeAction(_):void 0},c.prototype.didClickAttributeButton=function(x,S){var _,M,O;return(M=this.delegate)!=null&&M.toolbarDidClickButton(),x.preventDefault(),_=g(S),this.getDialog(_)?this.toggleDialog(_):(O=this.delegate)!=null&&O.toolbarDidToggleAttribute(_),this.refreshAttributeButtons()},c.prototype.didClickDialogButton=function(x,S){var _,M;return _=n(S,{matchingSelector:m}),M=S.getAttribute("data-trix-method"),this[M].call(this,_)},c.prototype.didKeyDownDialogInput=function(x,S){var _,M;return x.keyCode===13&&(x.preventDefault(),_=S.getAttribute("name"),M=this.getDialog(_),this.setAttribute(M)),x.keyCode===27?(x.preventDefault(),this.hideDialog()):void 0},c.prototype.updateActions=function(x){return this.actions=x,this.refreshActionButtons()},c.prototype.refreshActionButtons=function(){return this.eachActionButton(function(x){return function(S,_){return S.disabled=x.actions[_]===!1}}(this))},c.prototype.eachActionButton=function(x){var S,_,M,O,D;for(O=this.element.querySelectorAll(h),D=[],_=0,M=O.length;M>_;_++)S=O[_],D.push(x(S,v(S)));return D},c.prototype.updateAttributes=function(x){return this.attributes=x,this.refreshAttributeButtons()},c.prototype.refreshAttributeButtons=function(){return this.eachAttributeButton(function(x){return function(S,_){return S.disabled=x.attributes[_]===!1,x.attributes[_]||x.dialogIsVisible(_)?(S.setAttribute("data-trix-active",""),S.classList.add("trix-active")):(S.removeAttribute("data-trix-active"),S.classList.remove("trix-active"))}}(this))},c.prototype.eachAttributeButton=function(x){var S,_,M,O,D;for(O=this.element.querySelectorAll(f),D=[],_=0,M=O.length;M>_;_++)S=O[_],D.push(x(S,g(S)));return D},c.prototype.applyKeyboardCommand=function(x){var S,_,M,O,D,k,A;for(D=JSON.stringify(x.sort()),A=this.element.querySelectorAll("[data-trix-key]"),O=0,k=A.length;k>O;O++)if(S=A[O],M=S.getAttribute("data-trix-key").split("+"),_=JSON.stringify(M.sort()),_===D)return s("mousedown",{onElement:S}),!0;return!1},c.prototype.dialogIsVisible=function(x){var S;return(S=this.getDialog(x))?S.hasAttribute("data-trix-active"):void 0},c.prototype.toggleDialog=function(x){return this.dialogIsVisible(x)?this.hideDialog():this.showDialog(x)},c.prototype.showDialog=function(x){var S,_,M,O,D,k,A,C,T,L;for(this.hideDialog(),(A=this.delegate)!=null&&A.toolbarWillShowDialog(),M=this.getDialog(x),M.setAttribute("data-trix-active",""),M.classList.add("trix-active"),C=M.querySelectorAll("input[disabled]"),O=0,k=C.length;k>O;O++)_=C[O],_.removeAttribute("disabled");return(S=g(M))&&(D=w(M,x))&&(D.value=(T=this.attributes[S])!=null?T:"",D.select()),(L=this.delegate)!=null?L.toolbarDidShowDialog(x):void 0},c.prototype.setAttribute=function(x){var S,_,M;return S=g(x),_=w(x,S),_.willValidate&&!_.checkValidity()?(_.setAttribute("data-trix-validate",""),_.classList.add("trix-validate"),_.focus()):((M=this.delegate)!=null&&M.toolbarDidUpdateAttribute(S,_.value),this.hideDialog())},c.prototype.removeAttribute=function(x){var S,_;return S=g(x),(_=this.delegate)!=null&&_.toolbarDidRemoveAttribute(S),this.hideDialog()},c.prototype.hideDialog=function(){var x,S;return(x=this.element.querySelector(d))?(x.removeAttribute("data-trix-active"),x.classList.remove("trix-active"),this.resetDialogInputs(),(S=this.delegate)!=null?S.toolbarDidHideDialog(y(x)):void 0):void 0},c.prototype.resetDialogInputs=function(){var x,S,_,M,O;for(M=this.element.querySelectorAll(b),O=[],x=0,_=M.length;_>x;x++)S=M[x],S.setAttribute("disabled","disabled"),S.removeAttribute("data-trix-validate"),O.push(S.classList.remove("trix-validate"));return O},c.prototype.getDialog=function(x){return this.element.querySelector("[data-trix-dialog="+x+"]")},w=function(x,S){return S==null&&(S=g(x)),x.querySelector("[data-trix-input][name='"+S+"']")},v=function(x){return x.getAttribute("data-trix-action")},g=function(x){var S;return(S=x.getAttribute("data-trix-attribute"))!=null?S:x.getAttribute("data-trix-dialog-attribute")},y=function(x){return x.getAttribute("data-trix-dialog")},c}(t.BasicObject)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.ImagePreloadOperation=function(s){function o(l){this.url=l}return n(o,s),o.prototype.perform=function(l){var a;return a=new Image,a.onload=function(u){return function(){return a.width=u.width=a.naturalWi
360dth,a.height=u.height=a.naturalHeight,l(!0,a)}}(this),a.onerror=function(){return l(!1)},a.src=this.url},o}(t.Operation)}).call(this),(function(){var n=function(o,l){return function(){return o.apply(l,arguments)}},r=function(o,l){function a(){this.constructor=o}for(var u in l)s.call(l,u)&&(o[u]=l[u]);return a.prototype=l.prototype,o.prototype=new a,o.__super__=l.prototype,o},s={}.hasOwnProperty;t.Attachment=function(o){function l(a){a==null&&(a={}),this.releaseFile=n(this.releaseFile,this),l.__super__.constructor.apply(this,arguments),this.attributes=t.Hash.box(a),this.didChangeAttributes()}return r(l,o),l.previewablePattern=/^image(\/(gif|png|jpe?g)|$)/,l.attachmentForFile=function(a){var u,c;return c=this.attributesForFile(a),u=new this(c),u.setFile(a),u},l.attributesForFile=function(a){return new t.Hash({filename:a.name,filesize:a.size,contentType:a.type})},l.fromJSON=function(a){return new this(a)},l.prototype.getAttribute=function(a){return this.attributes.get(a)},l.prototype.hasAttribute=function(a){return this.attributes.has(a)},l.prototype.getAttributes=function(){return this.attributes.toObject()},l.prototype.setAttributes=function(a){var u,c,h;return a==null&&(a={}),u=this.attributes.merge(a),this.attributes.isEqualTo(u)?void 0:(this.attributes=u,this.didChangeAttributes(),(c=this.previewDelegate)!=null&&typeof c.attachmentDidChangeAttributes=="function"&&c.attachmentDidChangeAttributes(this),(h=this.delegate)!=null&&typeof h.attachmentDidChangeAttributes=="function"?h.attachmentDidChangeAttributes(this):void 0)},l.prototype.didChangeAttributes=function(){return this.isPreviewable()?this.preloadURL():void 0},l.prototype.isPending=function(){return this.file!=null&&!(this.getURL()||this.getHref())},l.prototype.isPreviewable=function(){return this.attributes.has("previewable")?this.attributes.get("previewable"):this.constructor.previewablePattern.test(this.getContentType())},l.prototype.getType=function(){return this.hasContent()?"content":this.isPreviewable()?"preview":"file"},l.prototype.getURL=function(){return this.attributes.get("url")},l.prototype.getHref=function(){return this.attributes.get("href")},l.prototype.getFilename=function(){var a;return(a=this.attributes.get("filename"))!=null?a:""},l.prototype.getFilesize=function(){return this.attributes.get("filesize")},l.prototype.getFormattedFilesize=function(){var a;return a=this.attributes.get("filesize"),typeof a=="number"?t.config.fileSize.formatter(a):""},l.prototype.getExtension=function(){var a;return(a=this.getFilename().match(/\.(\w+)$/))!=null?a[1].toLowerCase():void 0},l.prototype.getContentType=function(){return this.attributes.get("contentType")},l.prototype.hasContent=function(){return this.attributes.has("content")},l.prototype.getContent=function(){return this.attributes.get("content")},l.prototype.getWidth=function(){return this.attributes.get("width")},l.prototype.getHeight=function(){return this.attributes.get("height")},l.prototype.getFile=function(){return this.file},l.prototype.setFile=function(a){return this.file=a,this.isPreviewable()?this.preloadFile():void 0},l.prototype.releaseFile=function(){return this.releasePreloadedFile(),this.file=null},l.prototype.getUploadProgress=function(){var a;return(a=this.uploadProgress)!=null?a:0},l.prototype.setUploadProgress=function(a){var u;return this.uploadProgress!==a?(this.uploadProgress=a,(u=this.uploadProgressDelegate)!=null&&typeof u.attachmentDidChangeUploadProgress=="function"?u.attachmentDidChangeUploadProgress(this):void 0):void 0},l.prototype.toJSON=function(){return this.getAttributes()},l.prototype.getCacheKey=function(){return[l.__super__.getCacheKey.apply(this,arguments),this.attributes.getCacheKey(),this.getPreviewURL()].join("/")},l.prototype.getPreviewURL=function(){return this.previewURL||this.preloadingURL},l.prototype.setPreviewURL=function(a){var u,c;return a!==this.getPreviewURL()?(this.previewURL=a,(u=this.previewDelegate)!=null&&typeof u.attachmentDidChangeAttributes=="function"&&u.attachmentDidChangeAttributes(this),(c=this.delegate)!=null&&typeof c.attachmentDidChangePreviewURL=="function"?c.attachmentDidChangePreviewURL(this):void 0):void 0},l.prototype.preloadURL=function(){return this.preload(this.getURL(),this.releaseFile)},l.prototype.preloadFile=function(){return this.file?(this.fileObjectURL=URL.createObjectURL(this.file),this.preload(this.fileObjectURL)):void 0},l.prototype.releasePreloadedFile=function(){return this.fileObjectURL?(URL.revokeObjectURL(this.fileObjectURL),this.fileObjectURL=null):void 0},l.prototype.preload=function(a,u){var c;return a&&a!==this.getPreviewURL()?(this.preloadingURL=a,c=new t.ImagePreloadOperation(a),c.then(function(h){return function(d){var f,p;return p=d.width,f=d.height,h.getWidth()&&h.getHeight()||h.setAttributes({width:p,height:f}),h.preloadingURL=null,h.setPreviewURL(a),typeof u=="function"?u():void 0}}(this)).catch(function(h){return function(){return h.preloadingURL=null,typeof u=="function"?u():void 0}}(this))):void 0},l}(t.Object)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.Piece=function(s){function o(l,a){a==null&&(a={}),o.__super__.constructor.apply(this,arguments),this.attributes=t.Hash.box(a)}return n(o,s),o.types={},o.registerType=function(l,a){return a.type=l,this.types[l]=a},o.fromJSON=function(l){var a;return(a=this.types[l.type])?a.fromJSON(l):void 0},o.prototype.copyWithAttributes=function(l){return new this.constructor(this.getValue(),l)},o.prototype.copyWithAdditionalAttributes=function(l){return this.copyWithAttributes(this.attributes.merge(l))},o.prototype.copyWithoutAttribute=function(l){return this.copyWithAttributes(this.attributes.remove(l))},o.prototype.copy=function(){return this.copyWithAttributes(this.attributes)},o.prototype.getAttribute=function(l){return this.attributes.get(l)},o.prototype.getAttributesHash=function(){return this.attributes},o.prototype.getAttributes=function(){return this.attributes.toObject()},o.prototype.getCommonAttributes=function(){var l,a,u;return(u=pieceList.getPieceAtIndex(0))?(l=u.attributes,a=l.getKeys(),pieceList.eachPiece(function(c){return a=l.getKeysCommonToHash(c.attributes),l=l.slice(a)}),l.toObject()):{}},o.prototype.hasAttribute=function(l){return this.attributes.has(l)},o.prototype.hasSameStringValueAsPiece=function(l){return l!=null&&this.toString()===l.toString()},o.prototype.hasSameAttributesAsPiece=function(l){return l!=null&&(this.attributes===l.attributes||this.attributes.isEqualTo(l.attributes))},o.prototype.isBlockBreak=function(){return!1},o.prototype.isEqualTo=function(l){return o.__super__.isEqualTo.apply(this,arguments)||this.hasSameConstructorAs(l)&&this.hasSameStringValueAsPiece(l)&&this.hasSameAttributesAsPiece(l)},o.prototype.isEmpty=function(){return this.length===0},o.prototype.isSerializable=function(){return!0},o.prototype.toJSON=function(){return{type:this.constructor.type,attributes:this.getAttributes()}},o.prototype.contentsForInspection=function(){return{type:this.constructor.type,attributes:this.attributes.inspect()}},o.prototype.canBeGrouped=function(){return this.hasAttribute("href")},o.prototype.canBeGroupedWith=function(l){return this.getAttribute("href")===l.getAttribute("href")},o.prototype.getLength=function(){return this.length},o.prototype.canBeConsolidatedWith=function(){return!1},o}(t.Object)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.Piece.registerType("attachment",t.AttachmentPiece=function(s){function o(l){this.attachment=l,o.__super__.constructor.apply(this,arguments),this.length=1,this.ensureAttachmentExclusivelyHasAttribute("href"),this.attachment.hasContent()||this.removeProhibitedAttributes()}return n(o,s),o.fromJSON=function(l){return new this(t.Attachment.fromJSON(l.attachment),l.attributes)},o.permittedAttributes=["caption","presentation"],o.prototype.ensureAttachmentExclusivelyHasAttribute=function(l){return this.hasAttribute(l)?(this.attachment.hasAttribute(l)||this.attachment.setAttributes(this.attributes.slice(l)),this.attributes=this.attributes.remove(l)):void 0},o.prototype.removeProhibitedAttributes=function(){var l;return l=this.attributes.slice(this.constructor.permittedAttributes),l.isEqualTo(this.attributes)?void 0:this.attributes=l},o.prototype.getValue=function(){return this.attachment},o.prototype.isSerializable=function(){return!this.attachment.isPending()},o.prototype.getCaption=function(){var l;return(l=this.attributes.get("caption"))!=null?l:""},o.prototype.isEqualTo=function(l){var a;return o.__super__.isEqualTo.apply(this,arguments)&&this.attachment.id===(l!=null&&(a=l.attachment)!=null?a.id:void 0)},o.prototype.toString=function(){return t.OBJECT_REPLACEMENT_CHARACTER},o.prototype.toJSON=function(){var l;return l=o.__super__.toJSON.apply(this,arguments),l.attachment=this.attachment,l},o.prototype.getCacheKey=function(){return[o.__super__.getCacheKey.apply(this,arguments),this.attachment.getCacheKey()].join("/")},o.prototype.toConsole=function(){return JSON.stringify(this.toString())},o}(t.Piece))}).call(this),(function(){var n,r=function(o,l){function a(){this.constructor=o}for(var u in l)s.call(l,u)&&(o[u]=l[u]);return a.prototype=l.prototype,o.prototype=new a,o.__super__=l.prototype,o},s={}.hasOwnProperty;
360n=t.normalizeNewlines,t.Piece.registerType("string",t.StringPiece=function(o){function l(a){l.__super__.constructor.apply(this,arguments),this.string=n(a),this.length=this.string.length}return r(l,o),l.fromJSON=function(a){return new this(a.string,a.attributes)},l.prototype.getValue=function(){return this.string},l.prototype.toString=function(){return this.string.toString()},l.prototype.isBlockBreak=function(){return this.toString()===` 361`&&this.getAttribute("blockBreak")===!0},l.prototype.toJSON=function(){var a;return a=l.__super__.toJSON.apply(this,arguments),a.string=this.string,a},l.prototype.canBeConsolidatedWith=function(a){return a!=null&&this.hasSameConstructorAs(a)&&this.hasSameAttributesAsPiece(a)},l.prototype.consolidateWith=function(a){return new this.constructor(this.toString()+a.toString(),this.attributes)},l.prototype.splitAtOffset=function(a){var u,c;return a===0?(u=null,c=this):a===this.length?(u=this,c=null):(u=new this.constructor(this.string.slice(0,a),this.attributes),c=new this.constructor(this.string.slice(a),this.attributes)),[u,c]},l.prototype.toConsole=function(){var a;return a=this.string,a.length>15&&(a=a.slice(0,14)+"â¦"),JSON.stringify(a.toString())},l}(t.Piece))}).call(this),(function(){var n,r=function(l,a){function u(){this.constructor=l}for(var c in a)s.call(a,c)&&(l[c]=a[c]);return u.prototype=a.prototype,l.prototype=new u,l.__super__=a.prototype,l},s={}.hasOwnProperty,o=[].slice;n=t.spliceArray,t.SplittableList=function(l){function a(d){d==null&&(d=[]),a.__super__.constructor.apply(this,arguments),this.objects=d.slice(0),this.length=this.objects.length}var u,c,h;return r(a,l),a.box=function(d){return d instanceof this?d:new this(d)},a.prototype.indexOf=function(d){return this.objects.indexOf(d)},a.prototype.splice=function(){var d;return d=1<=arguments.length?o.call(arguments,0):[],new this.constructor(n.apply(null,[this.objects].concat(o.call(d))))},a.prototype.eachObject=function(d){var f,p,b,m,v,g;for(v=this.objects,g=[],p=f=0,b=v.length;b>f;p=++f)m=v[p],g.push(d(m,p));return g},a.prototype.insertObjectAtIndex=function(d,f){return this.splice(f,0,d)},a.prototype.insertSplittableListAtIndex=function(d,f){return this.splice.apply(this,[f,0].concat(o.call(d.objects)))},a.prototype.insertSplittableListAtPosition=function(d,f){var p,b,m;return m=this.splitObjectAtPosition(f),b=m[0],p=m[1],new this.constructor(b).insertSplittableListAtIndex(d,p)},a.prototype.editObjectAtIndex=function(d,f){return this.replaceObjectAtIndex(f(this.objects[d]),d)},a.prototype.replaceObjectAtIndex=function(d,f){return this.splice(f,1,d)},a.prototype.removeObjectAtIndex=function(d){return this.splice(d,1)},a.prototype.getObjectAtIndex=function(d){return this.objects[d]},a.prototype.getSplittableListInRange=function(d){var f,p,b,m;return b=this.splitObjectsAtRange(d),p=b[0],f=b[1],m=b[2],new this.constructor(p.slice(f,m+1))},a.prototype.selectSplittableList=function(d){var f,p;return p=(function(){var b,m,v,g;for(v=this.objects,g=[],b=0,m=v.length;m>b;b++)f=v[b],d(f)&&g.push(f);return g}).call(this),new this.constructor(p)},a.prototype.removeObjectsInRange=function(d){var f,p,b,m;return b=this.splitObjectsAtRange(d),p=b[0],f=b[1],m=b[2],new this.constructor(p).splice(f,m-f+1)},a.prototype.transformObjectsInRange=function(d,f){var p,b,m,v,g,y,w;return g=this.splitObjectsAtRange(d),v=g[0],b=g[1],y=g[2],w=function(){var E,x,S;for(S=[],p=E=0,x=v.length;x>E;p=++E)m=v[p],S.push(p>=b&&y>=p?f(m):m);return S}(),new this.constructor(w)},a.prototype.splitObjectsAtRange=function(d){var f,p,b,m,v,g;return m=this.splitObjectAtPosition(h(d)),p=m[0],f=m[1],b=m[2],v=new this.constructor(p).splitObjectAtPosition(u(d)+b),p=v[0],g=v[1],[p,f,g-1]},a.prototype.getObjectAtPosition=function(d){var f,p;return p=this.findIndexAndOffsetAtPosition(d),f=p.index,p.offset,this.objects[f]},a.prototype.splitObjectAtPosition=function(d){var f,p,b,m,v,g,y,w,E,x;return g=this.findIndexAndOffsetAtPosition(d),f=g.index,v=g.offset,m=this.objects.slice(0),f!=null?v===0?(E=f,x=0):(b=this.getObjectAtIndex(f),y=b.splitAtOffset(v),p=y[0],w=y[1],m.splice(f,1,p,w),E=f+1,x=p.getLength()-v):(E=m.length,x=0),[m,E,x]},a.prototype.consolidate=function(){var d,f,p,b,m,v;for(b=[],m=this.objects[0],v=this.objects.slice(1),d=0,f=v.length;f>d;d++)p=v[d],typeof m.canBeConsolidatedWith=="function"&&m.canBeConsolidatedWith(p)?m=m.consolidateWith(p):(b.push(m),m=p);
361return m!=null&&b.push(m),new this.constructor(b)},a.prototype.consolidateFromIndexToIndex=function(d,f){var p,b,m;return b=this.objects.slice(0),m=b.slice(d,f+1),p=new this.constructor(m).consolidate().toArray(),this.splice.apply(this,[d,m.length].concat(o.call(p)))},a.prototype.findIndexAndOffsetAtPosition=function(d){var f,p,b,m,v,g,y;for(f=0,y=this.objects,b=p=0,m=y.length;m>p;b=++p){if(g=y[b],v=f+g.getLength(),d>=f&&v>d)return{index:b,offset:d-f};f=v}return{index:null,offset:null}},a.prototype.findPositionAtIndexAndOffset=function(d,f){var p,b,m,v,g,y;for(g=0,y=this.objects,p=b=0,m=y.length;m>b;p=++b)if(v=y[p],d>p)g+=v.getLength();else if(p===d){g+=f;break}return g},a.prototype.getEndPosition=function(){var d,f;return this.endPosition!=null?this.endPosition:this.endPosition=(function(){var p,b,m;for(f=0,m=this.objects,p=0,b=m.length;b>p;p++)d=m[p],f+=d.getLength();return f}).call(this)},a.prototype.toString=function(){return this.objects.join("")},a.prototype.toArray=function(){return this.objects.slice(0)},a.prototype.toJSON=function(){return this.toArray()},a.prototype.isEqualTo=function(d){return a.__super__.isEqualTo.apply(this,arguments)||c(this.objects,d!=null?d.objects:void 0)},c=function(d,f){var p,b,m,v,g;if(f==null&&(f=[]),d.length!==f.length)return!1;for(g=!0,b=p=0,m=d.length;m>p;b=++p)v=d[b],g&&!v.isEqualTo(f[b])&&(g=!1);return g},a.prototype.contentsForInspection=function(){var d;return{objects:"["+(function(){var f,p,b,m;for(b=this.objects,m=[],f=0,p=b.length;p>f;f++)d=b[f],m.push(d.inspect());return m}).call(this).join(", ")+"]"}},h=function(d){return d[0]},u=function(d){return d[1]},a}(t.Object)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.Text=function(s){function o(l){var a;l==null&&(l=[]),o.__super__.constructor.apply(this,arguments),this.pieceList=new t.SplittableList(function(){var u,c,h;for(h=[],u=0,c=l.length;c>u;u++)a=l[u],a.isEmpty()||h.push(a);return h}())}return n(o,s),o.textForAttachmentWithAttributes=function(l,a){var u;return u=new t.AttachmentPiece(l,a),new this([u])},o.textForStringWithAttributes=function(l,a){var u;return u=new t.StringPiece(l,a),new this([u])},o.fromJSON=function(l){var a,u;return u=function(){var c,h,d;for(d=[],c=0,h=l.length;h>c;c++)a=l[c],d.push(t.Piece.fromJSON(a));return d}(),new this(u)},o.prototype.copy=function(){return this.copyWithPieceList(this.pieceList)},o.prototype.copyWithPieceList=function(l){return new this.constructor(l.consolidate().toArray())},o.prototype.copyUsingObjectMap=function(l){var a,u;return u=(function(){var c,h,d,f,p;for(d=this.getPieces(),p=[],c=0,h=d.length;h>c;c++)a=d[c],p.push((f=l.find(a))!=null?f:a);return p}).call(this),new this.constructor(u)},o.prototype.appendText=function(l){return this.insertTextAtPosition(l,this.getLength())},o.prototype.insertTextAtPosition=function(l,a){return this.copyWithPieceList(this.pieceList.insertSplittableListAtPosition(l.pieceList,a))},o.prototype.removeTextAtRange=function(l){return this.copyWithPieceList(this.pieceList.removeObjectsInRange(l))},o.prototype.replaceTextAtRange=function(l,a){return this.removeTextAtRange(a).insertTextAtPosition(l,a[0])},o.prototype.moveTextFromRangeToPosition=function(l,a){var u,c;if(!(l[0]<=a&&a<=l[1]))return c=this.getTextAtRange(l),u=c.getLength(),l[0]<a&&(a-=u),this.removeTextAtRange(l).insertTextAtPosition(c,a)},o.prototype.addAttributeAtRange=function(l,a,u){var c;return c={},c[l]=a,this.addAttributesAtRange(c,u)},o.prototype.addAttributesAtRange=function(l,a){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(a,function(u){return u.copyWithAdditionalAttributes(l)}))},o.prototype.removeAttributeAtRange=function(l,a){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(a,function(u){return u.copyWithoutAttribute(l)}))},o.prototype.setAttributesAtRange=function(l,a){return this.copyWithPieceList(this.pieceList.transformObjectsInRange(a,function(u){return u.copyWithAttributes(l)}))},o.prototype.getAttributesAtPosition=function(l){var a,u;return(a=(u=this.pieceList.getObjectAtPosition(l))!=null?u.getAttributes():void 0)!=null?a:{}},o.prototype.getCommonAttributes=function(){var l,a;return l=(function(){var u,c,h,d;for(h=this.pieceList.toArray(),d=[],u=0,c=h.length;c>u;u++)a=h[u],d.push(a.getAttributes());return d}).call(this),t.Hash.fromCommonAttributesOfObjects(l).toObject()},o.prototype.getCommonAttributesAtRange=function(l){var a;return(a=this.getTextAtRange(l).getCommonAttributes())!=null?a:{}},o.prototype.getExpandedRangeForAttributeAtOffset=function(l,a){var u,c,h;for(u=h=a,c=this.getLength();u>0&&this.getCommonAttributesAtRange([u-1,h])[l];)u--;for(;c>h&&this.getCommonAttributesAtRange([a,h+1])[l];)h++;return[u,h]},o.prototype.getTextAtRange=function(l){return this.copyWithPieceList(this.pieceList.getSplittableListInRange(l))},o.prototype.getStringAtRange=function(l){return this.pieceList.getSplittableListInRange(l).toString()}
361,o.prototype.getStringAtPosition=function(l){return this.getStringAtRange([l,l+1])},o.prototype.startsWithString=function(l){return this.getStringAtRange([0,l.length])===l},o.prototype.endsWithString=function(l){var a;return a=this.getLength(),this.getStringAtRange([a-l.length,a])===l},o.prototype.getAttachmentPieces=function(){var l,a,u,c,h;for(c=this.pieceList.toArray(),h=[],l=0,a=c.length;a>l;l++)u=c[l],u.attachment!=null&&h.push(u);return h},o.prototype.getAttachments=function(){var l,a,u,c,h;for(c=this.getAttachmentPieces(),h=[],l=0,a=c.length;a>l;l++)u=c[l],h.push(u.attachment);return h},o.prototype.getAttachmentAndPositionById=function(l){var a,u,c,h,d,f;for(h=0,d=this.pieceList.toArray(),a=0,u=d.length;u>a;a++){if(c=d[a],((f=c.attachment)!=null?f.id:void 0)===l)return{attachment:c.attachment,position:h};h+=c.length}return{attachment:null,position:null}},o.prototype.getAttachmentById=function(l){var a,u;return u=this.getAttachmentAndPositionById(l),a=u.attachment,u.position,a},o.prototype.getRangeOfAttachment=function(l){var a,u;return u=this.getAttachmentAndPositionById(l.id),l=u.attachment,a=u.position,l!=null?[a,a+1]:void 0},o.prototype.updateAttributesForAttachment=function(l,a){var u;return(u=this.getRangeOfAttachment(a))?this.addAttributesAtRange(l,u):this},o.prototype.getLength=function(){return this.pieceList.getEndPosition()},o.prototype.isEmpty=function(){return this.getLength()===0},o.prototype.isEqualTo=function(l){var a;return o.__super__.isEqualTo.apply(this,arguments)||(l!=null&&(a=l.pieceList)!=null?a.isEqualTo(this.pieceList):void 0)},o.prototype.isBlockBreak=function(){return this.getLength()===1&&this.pieceList.getObjectAtIndex(0).isBlockBreak()},o.prototype.eachPiece=function(l){return this.pieceList.eachObject(l)},o.prototype.getPieces=function(){return this.pieceList.toArray()},o.prototype.getPieceAtPosition=function(l){return this.pieceList.getObjectAtPosition(l)},o.prototype.contentsForInspection=function(){return{pieceList:this.pieceList.inspect()}},o.prototype.toSerializableText=function(){var l;return l=this.pieceList.selectSplittableList(function(a){return a.isSerializable()}),this.copyWithPieceList(l)},o.prototype.toString=function(){return this.pieceList.toString()},o.prototype.toJSON=function(){return this.pieceList.toJSON()},o.prototype.toConsole=function(){var l;return JSON.stringify((function(){var a,u,c,h;for(c=this.pieceList.toArray(),h=[],a=0,u=c.length;u>a;a++)l=c[a],h.push(JSON.parse(l.toConsole()));return h}).call(this))},o.prototype.getDirection=function(){return t.getDirection(this.toString())},o.prototype.isRTL=function(){return this.getDirection()==="rtl"},o}(t.Object)}).call(this),(function(){var n,r,s,o,l=function(h,d){function f(){this.constructor=h}for(var p in d)a.call(d,p)&&(h[p]=d[p]);return f.prototype=d.prototype,h.prototype=new f,h.__super__=d.prototype,h},a={}.hasOwnProperty,u=[].indexOf||function(h){for(var d=0,f=this.length;f>d;d++)if(d in this&&this[d]===h)return d;return-1},c=[].slice;n=t.arraysAreEqual,o=t.spliceArray,r=t.getBlockConfig,t.getBlockAttributeNames,s=t.getListAttributeNames,t.Block=function(h){function d(x,S){x==null&&(x=new t.Text),S==null&&(S=[]),d.__super__.constructor.apply(this,arguments),this.text=p(x),this.attributes=S}var f,p,b,m,v,g,y,w,E;return l(d,h),d.fromJSON=function(x){var S;return S=t.Text.fromJSON(x.text),new this(S,x.attributes)},d.prototype.isEmpty=function(){return this.text.isBlockBreak()},d.prototype.isEqualTo=function(x){return d.__super__.isEqualTo.apply(this,arguments)||this.text.isEqualTo(x!=null?x.text:void 0)&&n(this.attributes,x!=null?x.attributes:void 0)},d.prototype.copyWithText=function(x){return new this.constructor(x,this.attributes)},d.prototype.copyWithoutText=function(){return this.copyWithText(null)},d.prototype.copyWithAttributes=function(x){return new this.constructor(this.text,x)},d.prototype.copyWithoutAttributes=function(){return this.copyWithAttributes(null)},d.prototype.copyUsingObjectMap=function(x){var S;return this.copyWithText((S=x.find(this.text))?S:this.text.copyUsingObjectMap(x))},d.prototype.addAttribute=function(x){var S;return S=this.attributes.concat(m(x)),this.copyWithAttributes(S)},d.prototype.removeAttribute=function(x){var S,_;return _=r(x).listAttribute,S=g(g(this.attributes,x),_),this.copyWithAttributes(S)},d.prototype.removeLastAttribute=function(){return this.removeAttribute(this.getLastAttribute())},d.prototype.getLastAttribute=function(){return v(this.attributes)},d.prototype.getAttributes=function(){return this.attributes.slice(0)},d.prototype.getAttributeLevel=function(){return this.attributes.length},d.prototype.getAttributeAtLevel=function(x){return this.attributes[x-1]},d.prototype.hasAttribute=function(x){return u.call(this.attributes,x)>=0},d.prototype.hasAttributes=function(){return this.getAttributeLevel()>0},d.prototype.getLastNestableAttribute=function(){return v(this.getNestableAttributes())},d.prototype.getNestableAttributes=function(){var x,S,_,M,O;
361for(M=this.attributes,O=[],S=0,_=M.length;_>S;S++)x=M[S],r(x).nestable&&O.push(x);return O},d.prototype.getNestingLevel=function(){return this.getNestableAttributes().length},d.prototype.decreaseNestingLevel=function(){var x;return(x=this.getLastNestableAttribute())?this.removeAttribute(x):this},d.prototype.increaseNestingLevel=function(){var x,S,_;return(x=this.getLastNestableAttribute())?(_=this.attributes.lastIndexOf(x),S=o.apply(null,[this.attributes,_+1,0].concat(c.call(m(x)))),this.copyWithAttributes(S)):this},d.prototype.getListItemAttributes=function(){var x,S,_,M,O;for(M=this.attributes,O=[],S=0,_=M.length;_>S;S++)x=M[S],r(x).listAttribute&&O.push(x);return O},d.prototype.isListItem=function(){var x;return(x=r(this.getLastAttribute()))!=null?x.listAttribute:void 0},d.prototype.isTerminalBlock=function(){var x;return(x=r(this.getLastAttribute()))!=null?x.terminal:void 0},d.prototype.breaksOnReturn=function(){var x;return(x=r(this.getLastAttribute()))!=null?x.breakOnReturn:void 0},d.prototype.findLineBreakInDirectionFromPosition=function(x,S){var _,M;return M=this.toString(),_=function(){switch(x){case"forward":return M.indexOf(` 362`,S);case"backward":return M.slice(0,S).lastIndexOf(` 363`)}}(),_!==-1?_:void 0},d.prototype.contentsForInspection=function(){return{text:this.text.inspect(),attributes:this.attributes}},d.prototype.toString=function(){return this.text.toString()},d.prototype.toJSON=function(){return{text:this.text,attributes:this.attributes}},d.prototype.getDirection=function(){return this.text.getDirection()},d.prototype.isRTL=function(){return this.text.isRTL()},d.prototype.getLength=function(){return this.text.getLength()},d.prototype.canBeConsolidatedWith=function(x){return!this.hasAttributes()&&!x.hasAttributes()&&this.getDirection()===x.getDirection()},d.prototype.consolidateWith=function(x){var S,_;return S=t.Text.textForStringWithAttributes(` 364`),_=this.getTextWithoutBlockBreak().appendText(S),this.copyWithText(_.appendText(x.text))},d.prototype.splitAtOffset=function(x){var S,_;return x===0?(S=null,_=this):x===this.getLength()?(S=this,_=null):(S=this.copyWithText(this.text.getTextAtRange([0,x])),_=this.copyWithText(this.text.getTextAtRange([x,this.getLength()]))),[S,_]},d.prototype.getBlockBreakPosition=function(){return this.text.getLength()-1},d.prototype.getTextWithoutBlockBreak=function(){return y(this.text)?this.text.getTextAtRange([0,this.getBlockBreakPosition()]):this.text.copy()},d.prototype.canBeGrouped=function(x){return this.attributes[x]},d.prototype.canBeGroupedWith=function(x,S){var _,M,O,D;return O=x.getAttributes(),M=O[S],_=this.attributes[S],!(_!==M||r(_).group===!1&&(D=O[S+1],u.call(s(),D)<0)||this.getDirection()!==x.getDirection()&&!x.isEmpty())},p=function(x){return x=E(x),x=f(x)},E=function(x){var S,_,M,O,D,k;return O=!1,k=x.getPieces(),_=2<=k.length?c.call(k,0,S=k.length-1):(S=0,[]),M=k[S++],M==null?x:(_=function(){var A,C,T;for(T=[],A=0,C=_.length;C>A;A++)D=_[A],D.isBlockBreak()?(O=!0,T.push(w(D))):T.push(D);return T}(),O?new t.Text(c.call(_).concat([M])):x)},b=t.Text.textForStringWithAttributes(` 365`,{blockBreak:!0}),f=function(x){return y(x)?x:x.appendText(b)},y=function(x){var S,_;return _=x.getLength(),_===0?!1:(S=x.getTextAtRange([_-1,_]),S.isBlockBreak())},w=function(x){return x.copyWithoutAttribute("blockBreak")},m=function(x){var S;return S=r(x).listAttribute,S!=null?[S,x]:[x]},v=function(x){return x.slice(-1)[0]},g=function(x,S){var _;return _=x.lastIndexOf(S),_===-1?x:o(x,_,1)},d}(t.Object)}).call(this),(function(){var n,r,s,o=function(c,h){function d(){this.constructor=c}for(var f in h)l.call(h,f)&&(c[f]=h[f]);return d.prototype=h.prototype,c.prototype=new d,c.__super__=h.prototype,c},l={}.hasOwnProperty,a=[].indexOf||function(c){for(var h=0,d=this.length;d>h;h++)if(h in this&&this[h]===c)return h;return-1},u=[].slice;r=t.tagName,s=t.walkTree,n=t.nodeIsAttachmentElement,t.HTMLSanitizer=function(c){function h(m,v){var g;g=v??{},this.allowedAttributes=g.allowedAttributes,this.forbiddenProtocols=g.forbiddenProtocols,this.forbiddenElements=g.forbiddenElements,this.allowedAttributes==null&&(this.allowedAttributes=d),this.forbiddenProtocols==null&&(this.forbiddenProtocols=p),this.forbiddenElements==null&&(this.forbiddenElements=f),this.body=b(m)}var d,f,p,b;return o(h,c),d="style href src width height class".split(" "),p="javascript:".split(" "),f="script iframe noscript".split(" "),h.sanitize=function(m,v){var g;return g=new this(m,v),g.sanitize(),g},h.prototype.sanitize=function(){return this.sanitizeElements(),this.normalizeListElementNesting()},h.prototype.getHTML=function(){return this.body.innerHTML},h.prototype.getBody=function(){return this.body},h.prototype.sanitizeElements=function(){var m,v,g,y,w;for(w=s(this.body),y=[];w.nextNode();)switch(g=w.currentNode,g.nodeType){case Node.ELEMENT_NODE:this.elementIsRemovable(g)?y.push(g):this.sanitizeElement(g);break;case Node.COMMENT_NODE:y.push(g)}for(m=0,v=y.length;v>m;m++)g=y[m],t.removeNode(g);return this.body},h.prototype.sanitizeElement=function(m){var v,g,y,w,E;for(m.hasAttribute("href")&&(w=m.protocol,a.call(this.forbiddenProtocols,w)>=0&&m.removeAttribute("href")),E=u.call(m.attributes),v=0,g=E.length;g>v;v++)y=E[v].name,a.call(this.allowedAttributes,y)>=0||y.indexOf("data-trix")===0||m.removeAttribute(y);return m},h.prototype.normalizeListElementNesting=function(){var m,v,g,y,w;for(w=u.call(this.body.querySelectorAll("ul,ol")),m=0,v=w.length;v>m;m++)g=w[m],(y=g.previousElementSibling)&&r(y)==="li"&&y.appendChild(g);return this.body},h.prototype.elementIsRemovable=function(m){return(m!=null?m.nodeType:void 0)===Node.ELEMENT_NODE?this.elementIsForbidden(m)||this.elementIsntSerializable(m):void 0},h.prototype.elementIsForbidden=function(m){var v;return v=r(m),a.call(this.forbiddenElements,v)>=0},h.prototype.elementIsntSerializable=function(m){return m.getAttribute("data-trix-serialize")==="false"&&!n(m)},b=function(m){var v,g,y,w,E;for(m==null&&(m=""),m=m.replace(/<\/html[^>]*>[^]*$/i,"</html>
365"),v=document.implementation.createHTMLDocument(""),v.documentElement.innerHTML=m,E=v.head.querySelectorAll("style"),y=0,w=E.length;w>y;y++)g=E[y],v.body.appendChild(g);return v.body},h}(t.BasicObject)}).call(this),(function(){var n,r,s,o,l,a,u,c,h,d,f,p=function(v,g){function y(){this.constructor=v}for(var w in g)b.call(g,w)&&(v[w]=g[w]);return y.prototype=g.prototype,v.prototype=new y,v.__super__=g.prototype,v},b={}.hasOwnProperty,m=[].indexOf||function(v){for(var g=0,y=this.length;y>g;g++)if(g in this&&this[g]===v)return g;return-1};n=t.arraysAreEqual,a=t.makeElement,d=t.tagName,l=t.getBlockTagNames,f=t.walkTree,o=t.findClosestElementFromNode,s=t.elementContainsNode,u=t.nodeIsAttachmentElement,c=t.normalizeSpaces,r=t.breakableWhitespacePattern,h=t.squishBreakableWhitespace,t.HTMLParser=function(v){function g(T,L){this.html=T,this.referenceElement=(L??{}).referenceElement,this.blocks=[],this.blockElements=[],this.processedElements=[]}var y,w,E,x,S,_,M,O,D,k,A,C;return p(g,v),g.parse=function(T,L){var I;return I=new this(T,L),I.parse(),I},g.prototype.getDocument=function(){return t.Document.fromJSON(this.blocks)},g.prototype.parse=function(){var T,L;try{for(this.createHiddenContainer(),T=t.HTMLSanitizer.sanitize(this.html).getHTML(),this.containerElement.innerHTML=T,L=f(this.containerElement,{usingFilter:M});L.nextNode();)this.processNode(L.currentNode);return this.translateBlockElementMarginsToNewlines()}finally{this.removeHiddenContainer()}},g.prototype.createHiddenContainer=function(){return this.referenceElement?(this.containerElement=this.referenceElement.cloneNode(!1),this.containerElement.removeAttribute("id"),this.containerElement.setAttribute("data-trix-internal",""),this.containerElement.style.display="none",this.referenceElement.parentNode.insertBefore(this.containerElement,this.referenceElement.nextSibling)):(this.containerElement=a({tagName:"div",style:{display:"none"}}),document.body.appendChild(this.containerElement))},g.prototype.removeHiddenContainer=function(){return t.removeNode(this.containerElement)},M=function(T){return d(T)==="style"?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},g.prototype.processNode=function(T){switch(T.nodeType){case Node.TEXT_NODE:if(!this.isInsignificantTextNode(T))return this.appendBlockForTextNode(T),this.processTextNode(T);break;case Node.ELEMENT_NODE:return this.appendBlockForElement(T),this.processElement(T)}},g.prototype.appendBlockForTextNode=function(T){var L,I,P;return I=T.parentNode,I===this.currentBlockElement&&this.isBlockElement(T.previousSibling)?this.appendStringWithAttributes(` 366`):I!==this.containerElement&&!this.isBlockElement(I)||(L=this.getBlockAttributes(I),n(L,(P=this.currentBlock)!=null?P.attributes:void 0))?void 0:(this.currentBlock=this.appendBlockForAttributesWithElement(L,I),this.currentBlockElement=I)},g.prototype.appendBlockForElement=function(T){var L,I,P,R;if(P=this.isBlockElement(T),I=s(this.currentBlockElement,T),P&&!this.isBlockElement(T.firstChild)){if((!this.isInsignificantTextNode(T.firstChild)||!this.isBlockElement(T.firstElementChild))&&(L=this.getBlockAttributes(T),T.firstChild))return I&&n(L,this.currentBlock.attributes)?this.appendStringWithAttributes(` 367`):(this.currentBlock=this.appendBlockForAttributesWithElement(L,T),this.currentBlockElement=T)}else if(this.currentBlockElement&&!I&&!P)return(R=this.findParentBlockElement(T))?this.appendBlockForElement(R):(this.currentBlock=this.appendEmptyBlock(),this.currentBlockElement=null)},g.prototype.findParentBlockElement=function(T){var L;for(L=T.parentElement;L&&L!==this.containerElement;){if(this.isBlockElement(L)&&m.call(this.blockElements,L)>=0)return L;L=L.parentElement}return null},g.prototype.processTextNode=function(T){var L,I;return I=T.data,w(T.parentNode)||(I=h(I),A((L=T.previousSibling)!=null?L.textContent:void 0)&&(I=S(I))),this.appendStringWithAttributes(I,this.getTextAttributes(T.parentNode))},g.prototype.processElement=function(T){var L,I,P,R,z;if(u(T))return L=O(T,"attachment"),Object.keys(L).length&&(R=this.getTextAttributes(T),this.appendAttachmentWithAttributes(L,R),T.innerHTML=""),this.processedElements.push(T);switch(d(T)){case"br":return this.isExtraBR(T)||this.isBlockElement(T.nextSibling)||this.appendStringWithAttributes(` 368`,this.getTextAttributes(T)),this.processedElements.push(T);case"img":L={url:T.getAttribute("src"),contentType:"image"},P=x(T);for(I in P)z=P[I],L[I]=z;return this.appendAttachmentWithAttributes(L,this.getTextAttributes(T)),this.processedElements.push(T);case"tr":if(T.parentNode.firstChild!==T)return this.appendStringWithAttributes(` 369`);break;case"td":if(T.parentNode.firstChild!==T)return this.appendStringWithAttributes(" | ")}},g.prototype.appendBlockForAttributesWithElement=function(T,L){var I;return this.blockElements.push(L),I=y(T),this.blocks.push(I),I},g.prototype.appendEmptyBlock=function(){return this.appendBlockForAttributesWithElement([],null)},g.prototype.appendStringWithAttributes=function(T,L){return this.appendPiece(k(T,L))},g.prototype.appendAttachmentWithAttributes=function(T,L){return this.appendPiece(D(T,L))},g.prototype.appendPiece=function(T){return this.blocks.length===0&&this.appendEmptyBlock(),this.blocks[this.blocks.length-1].text.push(T)},g.prototype.appendStringToTextAtIndex=function(T,L){var I,P;return P=this.blocks[L].text,I=P[P.length-1],(I!=null?I.type:void 0)==="str
369ing"?I.string+=T:P.push(k(T))},g.prototype.prependStringToTextAtIndex=function(T,L){var I,P;return P=this.blocks[L].text,I=P[0],(I!=null?I.type:void 0)==="string"?I.string=T+I.string:P.unshift(k(T))},k=function(T,L){var I;return L==null&&(L={}),I="string",T=c(T),{string:T,attributes:L,type:I}},D=function(T,L){var I;return L==null&&(L={}),I="attachment",{attachment:T,attributes:L,type:I}},y=function(T){var L;return T==null&&(T={}),L=[],{text:L,attributes:T}},g.prototype.getTextAttributes=function(T){var L,I,P,R,z,N,B,j,Y,V,Q,le;P={},Y=t.config.textAttributes;for(L in Y)if(z=Y[L],z.tagName&&o(T,{matchingSelector:z.tagName,untilNode:this.containerElement}))P[L]=!0;else if(z.parser){if(le=z.parser(T)){for(I=!1,V=this.findBlockElementAncestors(T),N=0,j=V.length;j>N;N++)if(R=V[N],z.parser(R)===le){I=!0;break}I||(P[L]=le)}}else z.styleProperty&&(le=T.style[z.styleProperty])&&(P[L]=le);if(u(T)){Q=O(T,"attributes");for(B in Q)le=Q[B],P[B]=le}return P},g.prototype.getBlockAttributes=function(T){var L,I,P,R;for(I=[];T&&T!==this.containerElement;){R=t.config.blockAttributes;for(L in R)P=R[L],P.parse!==!1&&d(T)===P.tagName&&(typeof P.test=="function"&&P.test(T)||!P.test)&&(I.push(L),P.listAttribute&&I.push(P.listAttribute));T=T.parentNode}return I.reverse()},g.prototype.findBlockElementAncestors=function(T){var L,I;for(L=[];T&&T!==this.containerElement;)I=d(T),m.call(l(),I)>=0&&L.push(T),T=T.parentNode;return L},O=function(T,L){var I;try{return I=JSON.parse(T.getAttribute("data-trix-"+L)),I.contentType==="text/html"&&I.content&&(I.content=HTMLSanitizer.sanitize(I.content).getHTML()),I}catch{return{}}},x=function(T){var L,I,P;return P=T.getAttribute("width"),I=T.getAttribute("height"),L={},P&&(L.width=parseInt(P,10)),I&&(L.height=parseInt(I,10)),L},g.prototype.isBlockElement=function(T){var L;if((T!=null?T.nodeType:void 0)===Node.ELEMENT_NODE&&!u(T)&&!o(T,{matchingSelector:"td",untilNode:this.containerElement}))return L=d(T),m.call(l(),L)>=0||window.getComputedStyle(T).display==="block"},g.prototype.isInsignificantTextNode=function(T){var L,I,P;if((T!=null?T.nodeType:void 0)===Node.TEXT_NODE&&C(T.data)&&(I=T.parentNode,P=T.previousSibling,L=T.nextSibling,(!_(I.previousSibling)||this.isBlockElement(I.previousSibling))&&!w(I)))return!P||this.isBlockElement(P)||!L||this.isBlockElement(L)},g.prototype.isExtraBR=function(T){return d(T)==="br"&&this.isBlockElement(T.parentNode)&&T.parentNode.lastChild===T},w=function(T){var L;return L=window.getComputedStyle(T).whiteSpace,L==="pre"||L==="pre-wrap"||L==="pre-line"},_=function(T){return T&&!A(T.textContent)},g.prototype.translateBlockElementMarginsToNewlines=function(){var T,L,I,P,R,z,N;for(T=this.getMarginOfDefaultBlockElement(),z=this.blocks,N=[],I=L=0,P=z.length;P>L;I=++L)z[I],(R=this.getMarginOfBlockElementAtIndex(I))&&(R.top>2*T.top&&this.prependStringToTextAtIndex(` 370`,I),N.push(R.bottom>2*T.bottom?this.appendStringToTextAtIndex(` 371`,I):void 0));return N},g.prototype.getMarginOfBlockElementAtIndex=function(T){var L,I;return!(L=this.blockElements[T])||!L.textContent||(I=d(L),m.call(l(),I)>=0||m.call(this.processedElements,L)>=0)?void 0:E(L)},g.prototype.getMarginOfDefaultBlockElement=function(){var T;return T=a(t.config.blockAttributes.default.tagName),this.containerElement.appendChild(T),E(T)},E=function(T){var L;return L=window.getComputedStyle(T),L.display==="block"?{top:parseInt(L.marginTop),bottom:parseInt(L.marginBottom)}:void 0},S=function(T){return T.replace(RegExp("^"+r.source+"+"),"")},C=function(T){return RegExp("^"+r.source+"*$").test(T)},A=function(T){return/\s$/.test(T)},g}(t.BasicObject)}).call(this),(function(){var n,r,s,o,l=function(h,d){function f(){this.constructor=h}for(var p in d)a.call(d,p)&&(h[p]=d[p]);return f.prototype=d.prototype,h.prototype=new f,h.__super__=d.prototype,h},a={}.hasOwnProperty,u=[].slice,c=[].indexOf||function(h){for(var d=0,f=this.length;f>d;d++)if(d in this&&this[d]===h)return d;return-1};n=t.arraysAreEqual,s=t.normalizeRange,o=t.rangeIsCollapsed,r=t.getBlockConfig,t.Document=function(h){function d(p){p==null&&(p=[]),d.__super__.constructor.apply(this,arguments),p.length===0&&(p=[new t.Block]),this.blockList=t.SplittableList.box(p)}var f;return l(d,h),d.fromJSON=function(p){var b,m;return m=function(){var v,g,y;for(y=[],v=0,g=p.length;g>v;v++)b=p[v],y.push(t.Block.fromJSON(b));return y}(),new this(m)},d.fromHTML=function(p,b){return t.HTMLParser.parse(p,b).getDocument()},d.fromString=function(p,b){var m;return m=t.Text.textForStringWithAttributes(p,b),new this([new t.Block(m)])},d.prototype.isEmpty=function(){var p;return this.blockList.length===1&&(p=this.getBlockAtIndex(0),p.isEmpty()&&!p.hasAttributes())},d.prototype.copy=function(p){var b;return p==null&&(p={}),b=p.consolidateBlocks?this.blockList.consolidate().toArray():this.blockList.toArray(),new this.constructor(b)},d.prototype.copyUsingObjectsFromDocument=function(p){var b;return b=new t.ObjectMap(p.getObjects()),this.copyUsingObjectMap(b)},d.prototype.copyUsingObjectMap=function(p){var b,m,v;return m=(function(){var g,y,w,E;for(w=this.getBlocks(),E=[],g=0,y=w.length;y>g;g++)b=w[g],E.push((v=p.find(b))?v:b.copyUsingObjectMap(p));return E}).call(this),new this.constructor(m)},d.prototype.copyWithBaseBlockAttributes=function(p){var b,m,v;return p==null&&(p=[]),v=(function(){var g,y,w,E;for(w=this.getBlocks(),E=[],g=0,y=w.length;y>g;
371g++)m=w[g],b=p.concat(m.getAttributes()),E.push(m.copyWithAttributes(b));return E}).call(this),new this.constructor(v)},d.prototype.replaceBlock=function(p,b){var m;return m=this.blockList.indexOf(p),m===-1?this:new this.constructor(this.blockList.replaceObjectAtIndex(b,m))},d.prototype.insertDocumentAtRange=function(p,b){var m,v,g,y,w,E,x;return v=p.blockList,w=(b=s(b))[0],E=this.locationFromPosition(w),g=E.index,y=E.offset,x=this,m=this.getBlockAtPosition(w),o(b)&&m.isEmpty()&&!m.hasAttributes()?x=new this.constructor(x.blockList.removeObjectAtIndex(g)):m.getBlockBreakPosition()===y&&w++,x=x.removeTextAtRange(b),new this.constructor(x.blockList.insertSplittableListAtPosition(v,w))},d.prototype.mergeDocumentAtRange=function(p,b){var m,v,g,y,w,E,x,S,_,M,O,D;return O=(b=s(b))[0],M=this.locationFromPosition(O),v=this.getBlockAtIndex(M.index).getAttributes(),m=p.getBaseBlockAttributes(),D=v.slice(-m.length),n(m,D)?(x=v.slice(0,-m.length),E=p.copyWithBaseBlockAttributes(x)):E=p.copy({consolidateBlocks:!0}).copyWithBaseBlockAttributes(v),g=E.getBlockCount(),y=E.getBlockAtIndex(0),n(v,y.getAttributes())?(w=y.getTextWithoutBlockBreak(),_=this.insertTextAtRange(w,b),g>1&&(E=new this.constructor(E.getBlocks().slice(1)),S=O+w.getLength(),_=_.insertDocumentAtRange(E,S))):_=this.insertDocumentAtRange(E,b),_},d.prototype.insertTextAtRange=function(p,b){var m,v,g,y,w;return w=(b=s(b))[0],y=this.locationFromPosition(w),v=y.index,g=y.offset,m=this.removeTextAtRange(b),new this.constructor(m.blockList.editObjectAtIndex(v,function(E){return E.copyWithText(E.text.insertTextAtPosition(p,g))}))},d.prototype.removeTextAtRange=function(p){var b,m,v,g,y,w,E,x,S,_,M,O,D,k,A,C,T,L,I,P,R;return _=p=s(p),x=_[0],L=_[1],o(p)?this:(M=this.locationRangeFromRange(p),w=M[0],C=M[1],y=w.index,E=w.offset,g=this.getBlockAtIndex(y),A=C.index,T=C.offset,k=this.getBlockAtIndex(A),O=L-x===1&&g.getBlockBreakPosition()===E&&k.getBlockBreakPosition()!==T&&k.text.getStringAtPosition(T)===` 372`,O?v=this.blockList.editObjectAtIndex(A,function(z){return z.copyWithText(z.text.removeTextAtRange([T,T+1]))}):(S=g.text.getTextAtRange([0,E]),I=k.text.getTextAtRange([T,k.getLength()]),P=S.appendText(I),D=y!==A&&E===0,R=D&&g.getAttributeLevel()>=k.getAttributeLevel(),m=R?k.copyWithText(P):g.copyWithText(P),b=A+1-y,v=this.blockList.splice(y,b,m)),new this.constructor(v))},d.prototype.moveTextFromRangeToPosition=function(p,b){var m,v,g,y,w,E,x,S,_,M;return E=p=s(p),_=E[0],g=E[1],b>=_&&g>=b?this:(v=this.getDocumentAtRange(p),S=this.removeTextAtRange(p),w=b>_,w&&(b-=v.getLength()),x=v.getBlocks(),y=x[0],m=2<=x.length?u.call(x,1):[],m.length===0?(M=y.getTextWithoutBlockBreak(),w&&(b+=1)):M=y.text,S=S.insertTextAtRange(M,b),m.length===0?S:(v=new this.constructor(m),b+=M.getLength(),S.insertDocumentAtRange(v,b)))},d.prototype.addAttributeAtRange=function(p,b,m){var v;return v=this.blockList,this.eachBlockAtRange(m,function(g,y,w){return v=v.editObjectAtIndex(w,function(){return r(p)?g.addAttribute(p,b):y[0]===y[1]?g:g.copyWithText(g.text.addAttributeAtRange(p,b,y))})}),new this.constructor(v)},d.prototype.addAttribute=function(p,b){var m;return m=this.blockList,this.eachBlock(function(v,g){return m=m.editObjectAtIndex(g,function(){return v.addAttribute(p,b)})}),new this.constructor(m)},d.prototype.removeAttributeAtRange=function(p,b){var m;return m=this.blockList,this.eachBlockAtRange(b,function(v,g,y){return r(p)?m=m.editObjectAtIndex(y,function(){return v.removeAttribute(p)}):g[0]!==g[1]?m=m.editObjectAtIndex(y,function(){return v.copyWithText(v.text.removeAttributeAtRange(p,g))}):void 0}),new this.constructor(m)},d.prototype.updateAttributesForAttachment=function(p,b){var m,v,g;return v=this.getRangeOfAttachment(b)[0],m=this.locationFromPosition(v).index,g=this.getTextAtIndex(m),new this.constructor(this.blockList.editObjectAtIndex(m,function(y){return y.copyWithText(g.updateAttributesForAttachment(p,b))}))},d.prototype.removeAttributeForAttachment=function(p,b){var m;return m=this.getRangeOfAttachment(b),this.removeAttributeAtRange(p,m)},d.prototype.insertBlockBreakAtRange=function(p){var b,m,v,g;return g=(p=s(p))[0],v=this.locationFromPosition(g).offset,m=this.removeTextAtRange(p),v===0&&(b=[new t.Block]),new this.constructor(m.blockList.insertSplittableListAtPosition(new t.SplittableList(b),g))},d.prototype.applyBlockAttributeAtRange=function(p,b,m){var v,g,y,w;return y=this.expandRangeToLineBreaksAndSplitBlocks(m),g=y.document,m=y.range,v=r(p),v.listAttribute?(g=g.removeLastListAttributeAtRange(m,{exceptAttributeName:p}),w=g.convertLineBreaksToBlockBreaksInRange(m),g=w.document,m=w.range):g=v.exclusive?g.removeBlockAttributesAtRange(m):v.terminal?g.removeLastTerminalAttributeAtRange(m):g.consolidateBlocksAtRange(m),g.addAttributeAtRange(p,b,m)},d.prototype.removeLastListAttributeAtRange=function(p,b){var m;return b==null&&(b={}),m=this.blockList,this.eachBlockAtRange(p,function(v,g,y){var w;if((w=v.getLastAttribute())&&r(w).listAttribute&&w!==b.exceptAttributeName)return m=m.editObjectAtIndex(y,function(){return v.removeAttribute(w)})}),new this.constructor(m)},d.prototype.removeLastTerminalAttributeAtRange=function(p){var b;return b=this.blockList,this.eachBlockAtRange(p,function(m,v,g){var y;if((y=m.getLastAttribute())&&r(y).terminal)return b=b.editObjectAtIndex(g,function(){return m.removeAttribute(y)})}),new this.constructor(b)},d.prototype.removeBlockAttributesAtRange=function(p){var b;return b=this.blockList,this.eachBlockAtRange(p,function(m,v,g){return m.hasAttributes()?b=b.editObjectAtIndex(g,function(){return m.copyWithoutAttributes()}):void 0}),new this.constructor(b)},d.prototype.expandRangeToLineBreaksAndSplitBlocks=function(p){var b,m,v,g,y,w,E,x,S;return w=p=s(p),S=w[0],g=w[1],x=this.locationFromPosition(S),v=this.locationFromPosition(g),b=this,E=b.getBlockAtIndex(x.index),(x.offset=E.findLineBreakInDirectionFromPosition("backward",x.offset))!=null&&(y=b.positionFromLocation(x),b=b.insertBlockBreakAtRange([y,y+1]),v.
372index+=1,v.offset-=b.getBlockAtIndex(x.index).getLength(),x.index+=1),x.offset=0,v.offset===0&&v.index>x.index?(v.index-=1,v.offset=b.getBlockAtIndex(v.index).getBlockBreakPosition()):(m=b.getBlockAtIndex(v.index),m.text.getStringAtRange([v.offset-1,v.offset])===` 373`?v.offset-=1:v.offset=m.findLineBreakInDirectionFromPosition("forward",v.offset),v.offset!==m.getBlockBreakPosition()&&(y=b.positionFromLocation(v),b=b.insertBlockBreakAtRange([y,y+1]))),S=b.positionFromLocation(x),g=b.positionFromLocation(v),p=s([S,g]),{document:b,range:p}},d.prototype.convertLineBreaksToBlockBreaksInRange=function(p){var b,m,v;return m=(p=s(p))[0],v=this.getStringAtRange(p).slice(0,-1),b=this,v.replace(/.*?\n/g,function(g){return m+=g.length,b=b.insertBlockBreakAtRange([m-1,m])}),{document:b,range:p}},d.prototype.consolidateBlocksAtRange=function(p){var b,m,v,g,y;return v=p=s(p),y=v[0],m=v[1],g=this.locationFromPosition(y).index,b=this.locationFromPosition(m).index,new this.constructor(this.blockList.consolidateFromIndexToIndex(g,b))},d.prototype.getDocumentAtRange=function(p){var b;return p=s(p),b=this.blockList.getSplittableListInRange(p).toArray(),new this.constructor(b)},d.prototype.getStringAtRange=function(p){var b,m,v;return v=p=s(p),m=v[v.length-1],m!==this.getLength()&&(b=-1),this.getDocumentAtRange(p).toString().slice(0,b)},d.prototype.getBlockAtIndex=function(p){return this.blockList.getObjectAtIndex(p)},d.prototype.getBlockAtPosition=function(p){var b;return b=this.locationFromPosition(p).index,this.getBlockAtIndex(b)},d.prototype.getTextAtIndex=function(p){var b;return(b=this.getBlockAtIndex(p))!=null?b.text:void 0},d.prototype.getTextAtPosition=function(p){var b;return b=this.locationFromPosition(p).index,this.getTextAtIndex(b)},d.prototype.getPieceAtPosition=function(p){var b,m,v;return v=this.locationFromPosition(p),b=v.index,m=v.offset,this.getTextAtIndex(b).getPieceAtPosition(m)},d.prototype.getCharacterAtPosition=function(p){var b,m,v;return v=this.locationFromPosition(p),b=v.index,m=v.offset,this.getTextAtIndex(b).getStringAtRange([m,m+1])},d.prototype.getLength=function(){return this.blockList.getEndPosition()},d.prototype.getBlocks=function(){return this.blockList.toArray()},d.prototype.getBlockCount=function(){return this.blockList.length},d.prototype.getEditCount=function(){return this.editCount},d.prototype.eachBlock=function(p){return this.blockList.eachObject(p)},d.prototype.eachBlockAtRange=function(p,b){var m,v,g,y,w,E,x,S,_,M,O,D;if(E=p=s(p),O=E[0],g=E[1],M=this.locationFromPosition(O),v=this.locationFromPosition(g),M.index===v.index)return m=this.getBlockAtIndex(M.index),D=[M.offset,v.offset],b(m,D,M.index);for(_=[],w=y=x=M.index,S=v.index;S>=x?S>=y:y>=S;w=S>=x?++y:--y)(m=this.getBlockAtIndex(w))?(D=function(){switch(w){case M.index:return[M.offset,m.text.getLength()];case v.index:return[0,v.offset];default:return[0,m.text.getLength()]}}(),_.push(b(m,D,w))):_.push(void 0);return _},d.prototype.getCommonAttributesAtRange=function(p){var b,m,v;return m=(p=s(p))[0],o(p)?this.getCommonAttributesAtPosition(m):(v=[],b=[],this.eachBlockAtRange(p,function(g,y){return y[0]!==y[1]?(v.push(g.text.getCommonAttributesAtRange(y)),b.push(f(g))):void 0}
373),t.Hash.fromCommonAttributesOfObjects(v).merge(t.Hash.fromCommonAttributesOfObjects(b)).toObject())},d.prototype.getCommonAttributesAtPosition=function(p){var b,m,v,g,y,w,E,x,S,_;if(S=this.locationFromPosition(p),y=S.index,x=S.offset,v=this.getBlockAtIndex(y),!v)return{};g=f(v),b=v.text.getAttributesAtPosition(x),m=v.text.getAttributesAtPosition(x-1),w=function(){var M,O;M=t.config.textAttributes,O=[];for(E in M)_=M[E],_.inheritable&&O.push(E);return O}();for(E in m)_=m[E],(_===b[E]||c.call(w,E)>=0)&&(g[E]=_);return g},d.prototype.getRangeOfCommonAttributeAtPosition=function(p,b){var m,v,g,y,w,E,x,S,_;return w=this.locationFromPosition(b),g=w.index,y=w.offset,_=this.getTextAtIndex(g),E=_.getExpandedRangeForAttributeAtOffset(p,y),S=E[0],v=E[1],x=this.positionFromLocation({index:g,offset:S}),m=this.positionFromLocation({index:g,offset:v}),s([x,m])},d.prototype.getBaseBlockAttributes=function(){var p,b,m,v,g,y,w;for(p=this.getBlockAtIndex(0).getAttributes(),m=v=1,w=this.getBlockCount();w>=1?w>v:v>w;m=w>=1?++v:--v)b=this.getBlockAtIndex(m).getAttributes(),y=Math.min(p.length,b.length),p=function(){var E,x,S;for(S=[],g=E=0,x=y;(x>=0?x>E:E>x)&&b[g]===p[g];g=x>=0?++E:--E)S.push(b[g]);return S}();return p},f=function(p){var b,m;return m={},(b=p.getLastAttribute())&&(m[b]=!0),m},d.prototype.getAttachmentById=function(p){var b,m,v,g;for(g=this.getAttachments(),m=0,v=g.length;v>m;m++)if(b=g[m],b.id===p)return b},d.prototype.getAttachmentPieces=function(){var p;return p=[],this.blockList.eachObject(function(b){var m;return m=b.text,p=p.concat(m.getAttachmentPieces())}),p},d.prototype.getAttachments=function(){var p,b,m,v,g;for(v=this.getAttachmentPieces(),g=[],p=0,b=v.length;b>p;p++)m=v[p],g.push(m.attachment);return g},d.prototype.getRangeOfAttachment=function(p){var b,m,v,g,y,w,E;for(g=0,y=this.blockList.toArray(),m=b=0,v=y.length;v>b;m=++b){if(w=y[m].text,E=w.getRangeOfAttachment(p))return s([g+E[0],g+E[1]]);g+=w.getLength()}},d.prototype.getLocationRangeOfAttachment=function(p){var b;return b=this.getRangeOfAttachment(p),this.locationRangeFromRange(b)},d.prototype.getAttachmentPieceForAttachment=function(p){var b,m,v,g;for(g=this.getAttachmentPieces(),b=0,m=g.length;m>b;b++)if(v=g[b],v.attachment===p)return v},d.prototype.findRangesForBlockAttribute=function(p){var b,m,v,g,y,w,E;for(y=0,w=[],E=this.getBlocks(),m=0,v=E.length;v>m;m++)b=E[m],g=b.getLength(),b.hasAttribute(p)&&w.push([y,y+g]),y+=g;return w},d.prototype.findRangesForTextAttribute=function(p,b){var m,v,g,y,w,E,x,S,_,M;for(M=(b??{}).withValue,E=0,x=[],S=[],y=function(O){return M!=null?O.getAttribute(p)===M:O.hasAttribute(p)},_=this.getPieces(),m=0,v=_.length;v>m;m++)w=_[m],g=w.getLength(),y(w)&&(x[1]===E?x[1]=E+g:S.push(x=[E,E+g])),E+=g;return S},d.prototype.locationFromPosition=function(p){var b,m;return m=this.blockList.findIndexAndOffsetAtPosition(Math.max(0,p)),m.index!=null?m:(b=this.getBlocks(),{index:b.length-1,offset:b[b.length-1].getLength()})},d.prototype.positionFromLocation=function(p){return this.blockList.findPositionAtIndexAndOffset(p.index,p.offset)},d.prototype.locationRangeFromPosition=function(p){return s(this.locationFromPosition(p))},d.prototype.locationRangeFromRange=function(p){var b,m,v,g;if(p=s(p))return g=p[0],m=p[1],v=this.locationFromPosition(g),b=this.locationFromPosition(m),s([v,b])},d.prototype.rangeFromLocationRange=function(p){var b,m;return p=s(p),b=this.positionFromLocation(p[0]),o(p)||(m=this.positionFromLocation(p[1])),s([b,m])},d.prototype.isEqualTo=function(p){return this.blockList.isEqualTo(p!=null?p.blockList:void 0)},d.prototype.getTexts=function(){var p,b,m,v,g;for(v=this.getBlocks(),g=[],b=0,m=v.length;m>b;b++)p=v[b],g.push(p.text);return g},d.prototype.getPieces=function(){var p,b,m,v,g;for(m=[],v=this.getTexts(),p=0,b=v.length;b>p;p++)g=v[p],m.push.apply(m,g.getPieces());return m},d.prototype.getObjects=function(){return this.getBlocks().concat(this.getTexts()).concat(this.getPieces())},d.prototype.toSerializableDocument=function(){var p;return p=[],this.blockList.eachObject(function(b){return p.push(b.copyWithText(b.text.toSerializableText()))}),new this.constructor(p)},d.prototype.toString=function(){return this.blockList.toString()},d.prototype.toJSON=function(){return this.blockList.toJSON()},d.prototype.toConsole=function(){var p;return JSON.stringify((function(){var b,m,v,g;for(v=this.blockList.toArray(),g=[],b=0,m=v.length;m>b;b++)p=v[b],g.push(JSON.parse(p.text.toConsole()));return g}).call(this))},d}(t.Object)}).call(this),(function(){t.LineBreakInsertion=function(){function n(r){var s;this.composition=r,this.document=this.composition.document,s=this.composition.getSelectedRange(),this.startPosition=s[0],this.endPosition=s[1],this.startLocation=this.document.locationFromPosition(this.startPosition),this.endLocation=this.document.locationFromPosition(this.endPosition),this.block=this.document.getBlockAtIndex(this.endLocation.index),this.breaksOnReturn=this.block.breaksOnReturn(),this.previousCharacter=this.block.text.getStringAtPosition(this.endLocation.offset-1),this.nextCharacter=this.block.text.getStringAtPosition(this.endLocation.offset)}return n.prototype.shouldInsertBlockBreak=function(){return this.block.hasAttributes()&&this.block.isListItem()&&!this.block.isEmpty()?this.startLocation.offset!==0:this.breaksOnReturn&&this.nextCharacter!==` 374`},n.prototype.shouldBreakFormattedBlock=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&(this.breaksOnReturn&&this.nextCharacter===` 375`||this.previousCharacter===` 376`)},n.prototype.shouldDecreaseListLevel=function(){return this.block.hasAttributes()&&this.block.isListItem()&&this.block.isEmpty()},n.prototype.shouldPrependListItem=function(){return this.block.isListItem()&&this.startLocation.offset===0&&!this.block.isEmpty()},n.prototype.shouldRemoveLastBlockAttribute=function(){return this.block.hasAttributes()&&!this.block.isListItem()&&this.block.isEmpty()},n}()}).call(this),(function(){var n,r,s,o,l,a,u,c,h,d,f=function(b,m){function v(){this.constructor=b}for(var g in m)p.call(m,g)&&(b[g]=m[g]);return v.prototype=m.prototype,b.prototype=new v,b.__super__=m.prototype,b},p={}.hasOwnProperty;a=t.normalizeRange,h=t.rangesAreEqual,c=t.rangeIsCollapsed,u=t.objectsAreEqual,n=t.arrayStartsWith,d=t.summarizeArrayChange,s=t.getAllAttributeNames,o=t.getBlockConfig,l=t.getTextConfig,r=t.extend,t.Composition=function(b){function m(){this.document=new t.Document,this.attachments=[],this.currentAttributes={},this.revision=0}var v;return f(m,b),m.prototype.setDocument=function(g){var y;return g.isEqualTo(this.document)?void 0:(this.document=g,this.refreshAttachments(),this.revision++,(y=this.delegate)!=null&&typeof y.compositionDidChangeDocument=="function"?y.compositionDidChangeDocument(g):void 0)},m.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.getSelectedRange()}}
376,m.prototype.loadSnapshot=function(g){var y,w,E,x;return y=g.document,x=g.selectedRange,(w=this.delegate)!=null&&typeof w.compositionWillLoadSnapshot=="function"&&w.compositionWillLoadSnapshot(),this.setDocument(y??new t.Document),this.setSelection(x??[0,0]),(E=this.delegate)!=null&&typeof E.compositionDidLoadSnapshot=="function"?E.compositionDidLoadSnapshot():void 0},m.prototype.insertText=function(g,y){var w,E,x,S;return S=(y??{updatePosition:!0}).updatePosition,E=this.getSelectedRange(),this.setDocument(this.document.insertTextAtRange(g,E)),x=E[0],w=x+g.getLength(),S&&this.setSelection(w),this.notifyDelegateOfInsertionAtRange([x,w])},m.prototype.insertBlock=function(g){var y;return g==null&&(g=new t.Block),y=new t.Document([g]),this.insertDocument(y)},m.prototype.insertDocument=function(g){var y,w,E;return g==null&&(g=new t.Document),w=this.getSelectedRange(),this.setDocument(this.document.insertDocumentAtRange(g,w)),E=w[0],y=E+g.getLength(),this.setSelection(y),this.notifyDelegateOfInsertionAtRange([E,y])},m.prototype.insertString=function(g,y){var w,E;return w=this.getCurrentTextAttributes(),E=t.Text.textForStringWithAttributes(g,w),this.insertText(E,y)},m.prototype.insertBlockBreak=function(){var g,y,w;return y=this.getSelectedRange(),this.setDocument(this.document.insertBlockBreakAtRange(y)),w=y[0],g=w+1,this.setSelection(g),this.notifyDelegateOfInsertionAtRange([w,g])},m.prototype.insertLineBreak=function(){var g,y;return y=new t.LineBreakInsertion(this),y.shouldDecreaseListLevel()?(this.decreaseListLevel(),this.setSelection(y.startPosition)):y.shouldPrependListItem()?(g=new t.Document([y.block.copyWithoutText()]),this.insertDocument(g)):y.shouldInsertBlockBreak()?this.insertBlockBreak():y.shouldRemoveLastBlockAttribute()?this.removeLastBlockAttribute():y.shouldBreakFormattedBlock()?this.breakFormattedBlock(y):this.insertString(` 377`)},m.prototype.insertHTML=function(g){var y,w,E,x;return y=t.Document.fromHTML(g),E=this.getSelectedRange(),this.setDocument(this.document.mergeDocumentAtRange(y,E)),x=E[0],w=x+y.getLength()-1,this.setSelection(w),this.notifyDelegateOfInsertionAtRange([x,w])},m.prototype.replaceHTML=function(g){var y,w,E;return y=t.Document.fromHTML(g).copyUsingObjectsFromDocument(this.document),w=this.getLocationRange({strict:!1}),E=this.document.rangeFromLocationRange(w),this.setDocument(y),this.setSelection(E)},m.prototype.insertFile=function(g){return this.insertFiles([g])},m.prototype.insertFiles=function(g){var y,w,E,x,S,_;for(w=[],x=0,S=g.length;S>x;x++)E=g[x],(_=this.delegate)!=null&&_.compositionShouldAcceptFile(E)&&(y=t.Attachment.attachmentForFile(E),w.push(y));return this.insertAttachments(w)},m.prototype.insertAttachment=function(g){return this.insertAttachments([g])},m.prototype.insertAttachments=function(g){var y,w,E,x,S,_,M,O,D;for(O=new t.Text,x=0,S=g.length;S>x;x++)y=g[x],D=y.getType(),_=(M=t.config.attachments[D])!=null?M.presentation:void 0,E=this.getCurrentTextAttributes(),_&&(E.presentation=_),w=t.Text.textForAttachmentWithAttributes(y,E),O=O.appendText(w);return this.insertText(O)},m.prototype.shouldManageDeletingInDirection=function(g){var y;if(y=this.getLocationRange(),c(y)){if(g==="backward"&&y[0].offset===0||this.shouldManageMovingCursorInDirection(g))return!0}else if(y[0].index!==y[1].index)return!0;return!1},m.prototype.deleteInDirection=function(g,y){var w,E,x,S,_,M,O,D;return S=(y??{}).length,_=this.getLocationRange(),M=this.getSelectedRange(),O=c(M),O?x=g==="backward"&&_[0].offset===0:D=_[0].index!==_[1].index,x&&this.canDecreaseBlockAttributeLevel()&&(E=this.getBlock(),E.isListItem()?this.decreaseListLevel():this.decreaseBlockAttributeLevel(),this.setSelection(M[0]),E.isEmpty())?!1:(O&&(M=this.getExpandedRangeInDirection(g,{length:S}),g==="backward"&&(w=this.getAttachmentAtRange(M))),w?(this.editAttachment(w),!1):(this.setDocument(this.document.removeTextAtRange(M)),this.setSelection(M[0]),x||D?!1:void 0))},m.prototype.moveTextFromRange=function(g){var y;return y=this.getSelectedRange()[0],this.setDocument(this.document.moveTextFromRangeToPosition(g,y)),this.setSelection(y)},m.prototype.removeAttachment=function(g){var y;return(y=this.document.getRangeOfAttachment(g))?(this.stopEditingAttachment(),this.setDocument(this.document.removeTextAtRange(y)),this.setSelection(y[0])):void 0},m.prototype.removeLastBlockAttribute=function(){var g,y,w,E;return w=this.getSelectedRange(),E=w[0],y=w[1],g=this.document.getBlockAtPosition(y),this.removeCurrentAttribute(g.getLastAttribute()),this.setSelection(E)},v=" ",m.prototype.insertPlaceholder=function(){return this.placeholderPosition=this.getPosition(),this.insertString(v)},m.prototype.selectPlaceholder=function(){return this.placeholderPosition!=null?(this.setSelectedRange([this.placeholderPosition,this.placeholderPosition+v.length]),this.get
377SelectedRange()):void 0},m.prototype.forgetPlaceholder=function(){return this.placeholderPosition=null},m.prototype.hasCurrentAttribute=function(g){var y;return y=this.currentAttributes[g],y!=null&&y!==!1},m.prototype.toggleCurrentAttribute=function(g){var y;return(y=!this.currentAttributes[g])?this.setCurrentAttribute(g,y):this.removeCurrentAttribute(g)},m.prototype.canSetCurrentAttribute=function(g){return o(g)?this.canSetCurrentBlockAttribute(g):this.canSetCurrentTextAttribute(g)},m.prototype.canSetCurrentTextAttribute=function(){var g,y,w,E,x;if(y=this.getSelectedDocument()){for(x=y.getAttachments(),w=0,E=x.length;E>w;w++)if(g=x[w],!g.hasContent())return!1;return!0}},m.prototype.canSetCurrentBlockAttribute=function(){var g;if(g=this.getBlock())return!g.isTerminalBlock()},m.prototype.setCurrentAttribute=function(g,y){return o(g)?this.setBlockAttribute(g,y):(this.setTextAttribute(g,y),this.currentAttributes[g]=y,this.notifyDelegateOfCurrentAttributesChange())},m.prototype.setTextAttribute=function(g,y){var w,E,x,S;if(E=this.getSelectedRange())return x=E[0],w=E[1],x!==w?this.setDocument(this.document.addAttributeAtRange(g,y,E)):g==="href"?(S=t.Text.textForStringWithAttributes(y,{href:y}),this.insertText(S)):void 0},m.prototype.setBlockAttribute=function(g,y){var w;if(w=this.getSelectedRange())return this.canSetCurrentAttribute(g)?(this.getBlock(),this.setDocument(this.document.applyBlockAttributeAtRange(g,y,w)),this.setSelection(w)):void 0},m.prototype.removeCurrentAttribute=function(g){return o(g)?(this.removeBlockAttribute(g),this.updateCurrentAttributes()):(this.removeTextAttribute(g),delete this.currentAttributes[g],this.notifyDelegateOfCurrentAttributesChange())},m.prototype.removeTextAttribute=function(g){var y;if(y=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(g,y))},m.prototype.removeBlockAttribute=function(g){var y;if(y=this.getSelectedRange())return this.setDocument(this.document.removeAttributeAtRange(g,y))},m.prototype.canDecreaseNestingLevel=function(){var g;return((g=this.getBlock())!=null?g.getNestingLevel():void 0)>0},m.prototype.canIncreaseNestingLevel=function(){var g,y,w;if(g=this.getBlock())return(w=o(g.getLastNestableAttribute()))!=null&&w.listAttribute?(y=this.getPreviousBlock())?n(y.getListItemAttributes(),g.getListItemAttributes()):void 0:g.getNestingLevel()>0},m.prototype.decreaseNestingLevel=function(){var g;if(g=this.getBlock())return this.setDocument(this.document.replaceBlock(g,g.decreaseNestingLevel()))},m.prototype.increaseNestingLevel=function(){var g;if(g=this.getBlock())return this.setDocument(this.document.replaceBlock(g,g.increaseNestingLevel()))},m.prototype.canDecreaseBlockAttributeLevel=function(){var g;return((g=this.getBlock())!=null?g.getAttributeLevel():void 0)>0},m.prototype.decreaseBlockAttributeLevel=function(){var g,y;return(g=(y=this.getBlock())!=null?y.getLastAttribute():void 0)?this.removeCurrentAttribute(g):void 0},m.prototype.decreaseListLevel=function(){var g,y,w,E,x,S;for(S=this.getSelectedRange()[0],x=this.document.locationFromPosition(S).index,w=x,g=this.getBlock().getAttributeLevel();(y=this.document.getBlockAtIndex(w+1))&&y.isListItem()&&y.getAttributeLevel()>g;)w++;return S=this.document.positionFromLocation({index:x,offset:0}),E=this.document.positionFromLocation({index:w,offset:0}),this.setDocument(this.document.removeLastListAttributeAtRange([S,E]))},m.prototype.updateCurrentAttributes=function(){var g,y,w,E,x,S;if(S=this.getSelectedRange({ignoreLock:!0})){for(y=this.document.getCommonAttributesAtRange(S),x=s(),w=0,E=x.length;E>w;w++)g=x[w],y[g]||this.canSetCurrentAttribute(g)||(y[g]=!1);if(!u(y,this.currentAttributes))return this.currentAttributes=y,this.notifyDelegateOfCurrentAttributesChange()}},m.prototype.getCurrentAttributes=function(){return r.call({},this.currentAttributes)},m.prototype.getCurrentTextAttributes=function(){var g,y,w,E;g={},w=this.currentAttributes;for(y in w)E=w[y],E!==!1&&l(y)&&(g[y]=E);return g},m.prototype.freezeSelection=function(){return this.setCurrentAttribute("frozen",!0)},m.prototype.thawSelection=function(){return this.removeCurrentAttribute("frozen")},m.prototype.hasFrozenSelection=function(){return this.hasCurrentAttribute("frozen")},m.proxyMethod("getSelectionManager().getPointRange"),m.proxyMethod("getSelectionManager().setLocationRangeFromPointRange"),m.proxyMethod("getSelectionManager().createLocationRangeFromDOMRange"),m.proxyMethod("getSelectionManager().locationIsCursorTarget"),m.proxyMethod("getSelectionManager().selectionIsExpanded"),m.proxyMethod("delegate?.getSelectionManager"),m.prototype.setSelection=function(g){var y,w;return y=this.document.locationRangeFromRange(g),(w=this.delegate)!=null?w.compositionDidRequestChangingSelectionToLocationRange(y):void 0},m.prototype.getSelectedRange=function(){var g;return(g=this.getLocationRange())?this.document.rangeFromLocationRange(g):void 0},m.prototype.setSelectedRange=function(g){var y;
377return y=this.document.locationRangeFromRange(g),this.getSelectionManager().setLocationRange(y)},m.prototype.getPosition=function(){var g;return(g=this.getLocationRange())?this.document.positionFromLocation(g[0]):void 0},m.prototype.getLocationRange=function(g){var y,w;return(y=(w=this.targetLocationRange)!=null?w:this.getSelectionManager().getLocationRange(g))!=null?y:a({index:0,offset:0})},m.prototype.withTargetLocationRange=function(g,y){var w;this.targetLocationRange=g;try{w=y()}finally{this.targetLocationRange=null}return w},m.prototype.withTargetRange=function(g,y){var w;return w=this.document.locationRangeFromRange(g),this.withTargetLocationRange(w,y)},m.prototype.withTargetDOMRange=function(g,y){var w;return w=this.createLocationRangeFromDOMRange(g,{strict:!1}),this.withTargetLocationRange(w,y)},m.prototype.getExpandedRangeInDirection=function(g,y){var w,E,x,S;return E=(y??{}).length,x=this.getSelectedRange(),S=x[0],w=x[1],g==="backward"?E?S-=E:S=this.translateUTF16PositionFromOffset(S,-1):E?w+=E:w=this.translateUTF16PositionFromOffset(w,1),a([S,w])},m.prototype.shouldManageMovingCursorInDirection=function(g){var y;return this.editingAttachment?!0:(y=this.getExpandedRangeInDirection(g),this.getAttachmentAtRange(y)!=null)},m.prototype.moveCursorInDirection=function(g){var y,w,E,x;return this.editingAttachment?E=this.document.getRangeOfAttachment(this.editingAttachment):(x=this.getSelectedRange(),E=this.getExpandedRangeInDirection(g),w=!h(x,E)),this.setSelectedRange(g==="backward"?E[0]:E[1]),w&&(y=this.getAttachmentAtRange(E))?this.editAttachment(y):void 0},m.prototype.expandSelectionInDirection=function(g,y){var w,E;return w=(y??{}).length,E=this.getExpandedRangeInDirection(g,{length:w}),this.setSelectedRange(E)},m.prototype.expandSelectionForEditing=function(){return this.hasCurrentAttribute("href")?this.expandSelectionAroundCommonAttribute("href"):void 0},m.prototype.expandSelectionAroundCommonAttribute=function(g){var y,w;return y=this.getPosition(),w=this.document.getRangeOfCommonAttributeAtPosition(g,y),this.setSelectedRange(w)},m.prototype.selectionContainsAttachments=function(){var g;return((g=this.getSelectedAttachments())!=null?g.length:void 0)>0},m.prototype.selectionIsInCursorTarget=function(){return this.editingAttachment||this.positionIsCursorTarget(this.getPosition())},m.prototype.positionIsCursorTarget=function(g){var y;return(y=this.document.locationFromPosition(g))?this.locationIsCursorTarget(y):void 0},m.prototype.positionIsBlockBreak=function(g){var y;return(y=this.document.getPieceAtPosition(g))!=null?y.isBlockBreak():void 0},m.prototype.getSelectedDocument=function(){var g;return(g=this.getSelectedRange())?this.document.getDocumentAtRange(g):void 0},m.prototype.getSelectedAttachments=function(){var g;return(g=this.getSelectedDocument())!=null?g.getAttachments():void 0},m.prototype.getAttachments=function(){return this.attachments.slice(0)},m.prototype.refreshAttachments=function(){var g,y,w,E,x,S,_,M,O,D,k,A;for(w=this.document.getAttachments(),M=d(this.attachments,w),g=M.added,k=M.removed,this.attachments=w,E=0,S=k.length;S>E;E++)y=k[E],y.delegate=null,(O=this.delegate)!=null&&typeof O.compositionDidRemoveAttachment=="function"&&O.compositionDidRemoveAttachment(y);for(A=[],x=0,_=g.length;_>x;x++)y=g[x],y.delegate=this,A.push((D=this.delegate)!=null&&typeof D.compositionDidAddAttachment=="function"?D.compositionDidAddAttachment(y):void 0);return A},m.prototype.attachmentDidChangeAttributes=function(g){var y;return this.revision++,(y=this.delegate)!=null&&typeof y.compositionDidEditAttachment=="function"?y.compositionDidEditAttachment(g):void 0},m.prototype.attachmentDidChangePreviewURL=function(g){var y;return this.revision++,(y=this.delegate)!=null&&typeof y.compositionDidChangeAttachmentPreviewURL=="function"?y.compositionDidChangeAttachmentPreviewURL(g):void 0},m.prototype.editAttachment=function(g,y){var w;if(g!==this.editingAttachment)return this.stopEditingAttachment(),this.editingAttachment=g,(w=this.delegate)!=null&&typeof w.compositionDidStartEditingAttachment=="function"?w.compositionDidStartEditingAttachment(this.editingAttachment,y):void 0},m.prototype.stopEditingAttachment=function(){var g;if(this.editingAttachment)return(g=this.delegate)!=null&&typeof g.compositionDidStopEditingAttachment=="function"&&g.compositionDidStopEditingAttachment(this.editingAttachment),this.editingAttachment=null},m.prototype.updateAttributesForAttachment=function(g,y){return this.setDocument(this.document.updateAttributesForAttachment(g,y))},m.prototype.removeAttributeForAttachment=function(g,y){return this.setDocument(this.document.removeAttributeForAttachment(g,y))},m.prototype.breakFormattedBlock=function(g){var y,w,E,x,S;return w=g.document,y=g.block,x=g.startPosition,S=[x-1,x],y.getBlockBreakPosition()===g.startLocation.offset?(y.breaksOnReturn()&&g.nextCharacter===` 378`?x+=1:w=w.removeTextAtRange(S),S=[x,x]):g.nextCharacter===` 379`?g.previousCharacter===` 380`?S=[x-1,x+1]:(S=[x,x+1],x+=1):g.startLocation.offset-1!==0&&(x+=1),E=new t.Document([y.removeLastAttribute().copyWithoutText()]),this.setDocument(w.insertDocumentAtRange(E,S)),this.setSelection(x)},m.prototype.getPreviousBlock=function(){var g,y;return(y=this.getLocationRange())&&(g=y[0].index,g>0)?this.document.getBlockAtIndex(g-1):void 0},m.prototype.getBlock=function(){var g;return(g=this.getLocationRange())?this.document.getBlockAtIndex(g[0].index):void 0},m.prototype.getAttachmentAtRange=function(g){var y;return y=this.document.getDocumentAtRange(g),y.toString()===t.OBJECT_REPLACEMENT_CHARACTER+` 381`?y.getAttachments()[0]:void 0},m.prototype.notifyDelegateOfCurrentAttributesChange=function(){var g;return(g=this.delegate)!=null&&typeof g.compositionDidChangeCurrentAttributes=="function"?g.compositionDidChangeCurrentAttributes(this.currentAttributes):void 0},m.prototype.notifyDelegateOfInsertionAtRange=function(g){var y;return(y=this.delegate)!=null&&typeof y.compositionDidPerformInsertionAtRange=="function"?y.compositionDidPerformInsertionAtRange(g):void 0},m.prototype.translateUTF16PositionFromOffset=function(g,y){var w,E;return E=this.document.toUTF16String(),w=E.offsetFromUCS2Offset(g),E.offsetToUCS2Offset(w+y)},m}(t.BasicObject)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.UndoManager=function(s){function o(a){this.composition=a,this.undoEntries=[],this.redoEntries=[]}var l;return n(o,s),o.prototype.recordUndoEntry=function(a,u){var c,h,d,f,p;return f=u??{},h=f.context,c=f.consolidatable,d=this.undoEntries.slice(-1)[0],c&&l(d,a,h)?void 0:(p=this.createEntry({description:a,context:h}),this.undoEntries.push(p),this.redoEntries=[])},o.prototype.undo=function(){var a,u;return(u=this.undoEntries.pop())?(a=this.createEntry(u),this.redoEntries.push(a),this.composition.loadSnapsh
381ot(u.snapshot)):void 0},o.prototype.redo=function(){var a,u;return(a=this.redoEntries.pop())?(u=this.createEntry(a),this.undoEntries.push(u),this.composition.loadSnapshot(a.snapshot)):void 0},o.prototype.canUndo=function(){return this.undoEntries.length>0},o.prototype.canRedo=function(){return this.redoEntries.length>0},o.prototype.createEntry=function(a){var u,c,h;return h=a??{},c=h.description,u=h.context,{description:c!=null?c.toString():void 0,context:JSON.stringify(u),snapshot:this.composition.getSnapshot()}},l=function(a,u,c){return(a!=null?a.description:void 0)===(u!=null?u.toString():void 0)&&(a!=null?a.context:void 0)===JSON.stringify(c)},o}(t.BasicObject)}).call(this),(function(){var n;t.attachmentGalleryFilter=function(r){var s;return s=new n(r),s.perform(),s.getSnapshot()},n=function(){function r(a){this.document=a.document,this.selectedRange=a.selectedRange}var s,o,l;return s="attachmentGallery",o="presentation",l="gallery",r.prototype.perform=function(){return this.removeBlockAttribute(),this.applyBlockAttribute()},r.prototype.getSnapshot=function(){return{document:this.document,selectedRange:this.selectedRange}},r.prototype.removeBlockAttribute=function(){var a,u,c,h,d;for(h=this.findRangesOfBlocks(),d=[],a=0,u=h.length;u>a;a++)c=h[a],d.push(this.document=this.document.removeAttributeAtRange(s,c));return d},r.prototype.applyBlockAttribute=function(){var a,u,c,h,d,f;for(c=0,d=this.findRangesOfPieces(),f=[],a=0,u=d.length;u>a;a++)h=d[a],h[1]-h[0]>1&&(h[0]+=c,h[1]+=c,this.document.getCharacterAtPosition(h[1])!==` 382`&&(this.document=this.document.insertBlockBreakAtRange(h[1]),h[1]<this.selectedRange[1]&&this.moveSelectedRangeForward(),h[1]++,c++),h[0]!==0&&this.document.getCharacterAtPosition(h[0]-1)!==` 383`&&(this.document=this.document.insertBlockBreakAtRange(h[0]),h[0]<this.selectedRange[0]&&this.moveSelectedRangeForward(),h[0]++,c++),f.push(this.document=this.document.applyBlockAttributeAtRange(s,!0,h)));return f},r.prototype.findRangesOfBlocks=function(){return this.document.findRangesForBlockAttribute(s)},r.prototype.findRangesOfPieces=function(){return this.document.findRangesForTextAttribute(o,{withValue:l})},r.prototype.moveSelectedRangeForward=function(){return this.selectedRange[0]+=1,this.selectedRange[1]+=1},r}()}).call(this),(function(){var n=function(r,s){return function(){return r.apply(s,arguments)}};t.Editor=function(){function r(o,l,a){this.composition=o,this.selectionManager=l,this.element=a,this.insertFiles=n(this.insertFiles,this),this.undoManager=new t.UndoManager(this.composition),this.filters=s.slice(0)}var s;return s=[t.attachmentGalleryFilter],r.prototype.loadDocument=function(o){return this.loadSnapshot({document:o,selectedRange:[0,0]})},r.prototype.loadHTML=function(o){return o==null&&(o=""),this.loadDocument(t.Document.fromHTML(o,{referenceElement:this.element}))},r.prototype.loadJSON=function(o){var l,a;return l=o.document,a=o.selectedRange,l=t.Document.fromJSON(l),this.loadSnapshot({document:l,selectedRange:a})},r.prototype.loadSnapshot=function(o){return this.undoManager=new t.UndoManager(this.composition),this.composition.loadSnapshot(o)},r.prototype.getDocument=function(){return this.composition.document},r.prototype.getSelectedDocument=function(){return this.composition.getSelectedDocument()},r.prototype.getSnapshot=function(){return this.composition.getSnapshot()},r.prototype.toJSON=function(){return this.getSnapshot()},r.prototype.deleteInDirection=function(o){return this.composition.deleteInDirection(o)},r.prototype.insertAttachment=function(o){return this.composition.insertAttachment(o)},r.prototype.insertAttachments=function(o){return this.composition.insertAttachments(o)},r.prototype.insertDocument=function(o){return this.composition.insertDocument(o)},r.prototype.insertFile=function(o){return this.composition.insertFile(o)},r.prototype.insertFiles=function(o){return this.composition.insertFiles(o)},r.prototype.insertHTML=function(o){return this.composition.insertHTML(o)},r.prototype.insertString=function(o){return this.composition.insertString(o)},r.prototype.insertText=function(o){return this.composition.insertText(o)},r.prototype.insertLineBreak=function(){return this.composition.insertLineBreak()},r.prototype.getSelectedRange=function(){return this.composition.getSelectedRange()},r.prototype.getPosition=function(){return this.composition.getPosition()},r.prototype.getClientRectAtPosition=function(o){var l;return l=this.getDocument().locationRangeFromRange([o,o+1]),this.selectionManager.getClientRectAtLocationRange(l)},r.prototype.expandSelectionInDirection=function(o){return this.composition.expandSelectionInDirection(o)},r.prototype.moveCursorInDirection=function(o){return this.composition.moveCursorInDirection(o)},r.prototype.setSelectedRange=function(o){return this.composition.setSelectedRange(o)},r.prototype.activateAttribute=function(o,l){return l==null&&(l=!0),this.composition.setCurrentAttribute(o,l)},r.prototype.attributeIsActive=function(o){return this.composition.hasCurrentAttribute(o)},r.prototype.canActivateAttribute=function(o){return this.composition.canSetCurrentAttribute(o)},r.prototype.deactivateAttribute=function(o){return this.composition.removeCurrentAttribute(o)},r.prototype.canDecreaseNestingLevel=function(){return this.composition.canDecreaseNestingLevel()},r.prototype.canIncreaseNestingLevel=function(){return this.composition.canIncreaseNestingLevel()},r.prototype.decreaseNestingLevel=function(){return this.canDecreaseNestingLevel()?this.composition.decreaseNestingLevel():void 0},r.prototype.increaseNestingLevel=function(){return this.canIncreaseNestingLevel()?this.composition.increaseNestingLevel():void 0},r.prototype.canRedo=function(){return this.undoManager.canRedo()},r.prototype.canUndo=function(){return this.undoManager.canUndo()},r.prototype.recordUndoEntry=function(o,l){var a,u,c;return c=l??{},u=c.context,a=c.consolidatable,this.undoManager.recordUndoEntry(o,{context:u,consolidatable:a})},r.prototype.redo=function(){return this.canRedo()?this.undoManager.redo():void 0},r.prototype.undo=function(){return this.canUndo()?this.undoManager.undo():void 0},r}()}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.ManagedAttachment=function(s){function o(l,a){var u;this.attachmentManager=l,this.attachment=a,u=this.attachment,this.id=u.id,this.file=u.file}return n(o,s),o.prototype.remove=function(){return this.attachmentManager.requestRemovalOfAttachment(this.attachment)},o.proxyMethod("attachment.getAttribute"),o.proxyMethod("attachment.hasAttribute"),o.proxyMethod("attachment.setAttribute"),o.proxyMethod("attachment.getAttributes"),o.proxyMethod("attachment.setAttributes"),o.proxyMethod("attachment.isPending"),o.proxyMethod("attachment.isPreviewable"),o.proxyMethod("attachment.getURL"),o.proxyMethod("attachment.getHref"),o.proxyMethod("attachment.getFilename"),o.proxyMethod("attachment.getFilesize"),o.proxyMethod("attachment.getFormattedFilesize"),o.proxyMethod("attachment.getExtension"),o.proxyMethod("attachment.getContentType"),o.proxyMethod("attachment.getFile"),o.proxyMethod("attachment.setFile"),o.proxyMethod("attachment.releaseFile"),o.proxyMethod("attachment.getUploadProgress"),o.proxyMethod("attachment.setUploadProgress"),o}(t.BasicObject)}).call(this),(function(){var n=function(s,o){function l(){this.constructor=s}for(var a in o)r.call(o,a)&&(s[a]=o[a]);return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},r={}.hasOwnProperty;t.AttachmentManager=function(s){function o(l){var a,u,c;for(l==null&&(l=[]),this.managedAttachments={},u=0,c=l.length;c>u;u++)a=l[u],this.manageAttachment(a)}return n(o,s),o.prototype.getAttachments=function(){var l,a,u,c;u=this.managedAttachments,c=[];for(a in u)l=u[a],c.push(l);return c},o.prototype.manageAttachment=function(l){var a,u;return(a=this.managedAttachments)[u=l.id]!=null?a[u]:a[u]=new t.ManagedAttachment(this,l)},o.prototype.attachmentIsManaged=function(l){return l.id in this.managedAttachments},o.prototype.requestRemovalOfAttachment=function(l){var a;return this.attachmentIsManaged(l)&&(a=this.delegate)!=null&&typeof a.attachmentManagerDidRequestRemovalOfAttachment=="function"?a.attachmentManagerDidRequestRemovalOfAttachment(l):void 0},o.prototype.unmanageAttachment=function(l){var a;return a=this.managedAttachments[l.id],delete this.managedAttachments[l.id],a},o}(t.BasicObject)}).call(this),(function(){var n,r,s,o,l,a,u,c,h,d,f;
383n=t.elementContainsNode,r=t.findChildIndexOfNode,l=t.nodeIsBlockStart,a=t.nodeIsBlockStartComment,o=t.nodeIsBlockContainer,u=t.nodeIsCursorTarget,c=t.nodeIsEmptyTextNode,h=t.nodeIsTextNode,s=t.nodeIsAttachmentElement,d=t.tagName,f=t.walkTree,t.LocationMapper=function(){function p(y){this.element=y}var b,m,v,g;return p.prototype.findLocationFromContainerAndOffset=function(y,w,E){var x,S,_,M,O,D,k;for(D=(E??{strict:!0}).strict,S=0,_=!1,M={index:0,offset:0},(x=this.findAttachmentElementParentForNode(y))&&(y=x.parentNode,w=r(x)),k=f(this.element,{usingFilter:v});k.nextNode();){if(O=k.currentNode,O===y&&h(y)){u(O)||(M.offset+=w);break}if(O.parentNode===y){if(S++===w)break}else if(!n(y,O)&&S>0)break;l(O,{strict:D})?(_&&M.index++,M.offset=0,_=!0):M.offset+=m(O)}return M},p.prototype.findContainerAndOffsetFromLocation=function(y){var w,E,x,S,_;if(y.index===0&&y.offset===0){for(w=this.element,S=0;w.firstChild;)if(w=w.firstChild,o(w)){S=1;break}return[w,S]}if(_=this.findNodeAndOffsetFromLocation(y),E=_[0],x=_[1],E){if(h(E))m(E)===0?(w=E.parentNode.parentNode,S=r(E.parentNode),u(E,{name:"right"})&&S++):(w=E,S=y.offset-x);else{if(w=E.parentNode,!l(E.previousSibling)&&!o(w))for(;E===w.lastChild&&(E=w,w=w.parentNode,!o(w)););S=r(E),y.offset!==0&&S++}return[w,S]}},p.prototype.findNodeAndOffsetFromLocation=function(y){var w,E,x,S,_,M,O,D;for(O=0,D=this.getSignificantNodesForIndex(y.index),E=0,x=D.length;x>E;E++){if(w=D[E],S=m(w),y.offset<=O+S)if(h(w)){if(_=w,M=O,y.offset===M&&u(_))break}else _||(_=w,M=O);if(O+=S,O>y.offset)break}return[_,M]},p.prototype.findAttachmentElementParentForNode=function(y){for(;y&&y!==this.element;){if(s(y))return y;y=y.parentNode}},p.prototype.getSignificantNodesForIndex=function(y){var w,E,x,S,_;for(x=[],_=f(this.element,{usingFilter:b}),S=!1;_.nextNode();)if(E=_.currentNode,a(E)){if(typeof w<"u"&&w!==null?w++:w=0,w===y)S=!0;else if(S)break}else S&&x.push(E);return x},m=function(y){var w;return y.nodeType===Node.TEXT_NODE?u(y)?0:(w=y.textContent,w.length):d(y)==="br"||s(y)?1:0},b=function(y){return g(y)===NodeFilter.FILTER_ACCEPT?v(y):NodeFilter.FILTER_REJECT},g=function(y){return c(y)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},v=function(y){return s(y.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},p}()}).call(this),(function(){var n,r,s=[].slice;n=t.getDOMRange,r=t.setDOMRange,t.PointMapper=function(){function o(){}return o.prototype.createDOMRangeFromPoint=function(l){var a,u,c,h,d,f,p,b;if(p=l.x,b=l.y,document.caretPositionFromPoint)return d=document.caretPositionFromPoint(p,b),c=d.offsetNode,u=d.offset,a=document.createRange(),a.setStart(c,u),a;if(document.caretRangeFromPoint)return document.caretRangeFromPoint(p,b);if(document.body.createTextRange){h=n();try{f=document.body.createTextRange(),f.moveToPoint(p,b),f.select()}catch{}return a=n(),r(h),a}},o.prototype.getClientRectsForDOMRange=function(l){var a,u,c;return u=s.call(l.getClientRects()),c=u[0],a=u[u.length-1],[c,a]},o}()}).call(this),(function(){var n,r=function(a,u){return function(){return a.apply(u,arguments)}},s=function(a,u){function c(){this.constructor=a}for(var h in u)o.call(u,h)&&(a[h]=u[h]);return c.prototype=u.prototype,a.prototype=new c,a.__super__=u.prototype,a},o={}.hasOwnProperty,l=[].indexOf||function(a){for(var u=0,c=this.length;c>u;u++)if(u in this&&this[u]===a)return u;return-1};n=t.getDOMRange,t.SelectionChangeObserver=function(a){function u(){this.run=r(this.run,this),this.update=r(this.update,this),this.selectionManagers=[]}var c;return s(u,a),u.prototype.start=function(){return this.started?void 0:(this.started=!0,"onselectionchange"in document?document.addEventListener("selectionchange",this.update,!0):this.run())},u.prototype.stop=function(){return this.started?(this.started=!1,document.removeEventListener("selectionchange",this.update,!0)):void 0},u.prototype.registerSelectionManager=function(h){return l.call(this.selectionManagers,h)<0?(this.selectionManagers.push(h),this.start()):void 0},u.prototype.unregisterSelectionManager=function(h){var d;return this.selectionManagers=(function(){var f,p,b,m;for(b=this.selectionManagers,m=[],f=0,p=b.length;p>f;f++)d=b[f],d!==h&&m.push(d);return m}).call(this),this.selectionManagers.length===0?this.stop():void 0},u.prototype.notifySelectionManagersOfSelectionChange=function(){var h,d,f,p,b;for(f=this.selectionManagers,p=[],h=0,d=f.length;d>h;h++)b=f[h],p.push(b.selectionDidChange());return p},u.prototype.update=function(){var h;return h=n(),c(h,this.domRange)?void 0:(this.domRange=h,this.notifySelectionManagersOfSelectionChange())},u.prototype.reset=function(){return this.domRange=null,this.update()},u.prototype.run=function(){return this.started?(this.update(),requestAnimationFrame(this.run)):void 0}
383,c=function(h,d){return(h!=null?h.startContainer:void 0)===(d!=null?d.startContainer:void 0)&&(h!=null?h.startOffset:void 0)===(d!=null?d.startOffset:void 0)&&(h!=null?h.endContainer:void 0)===(d!=null?d.endContainer:void 0)&&(h!=null?h.endOffset:void 0)===(d!=null?d.endOffset:void 0)},u}(t.BasicObject),t.selectionChangeObserver==null&&(t.selectionChangeObserver=new t.SelectionChangeObserver)}).call(this),(function(){var n,r,s,o,l,a,u,c,h,d,f=function(m,v){return function(){return m.apply(v,arguments)}},p=function(m,v){function g(){this.constructor=m}for(var y in v)b.call(v,y)&&(m[y]=v[y]);return g.prototype=v.prototype,m.prototype=new g,m.__super__=v.prototype,m},b={}.hasOwnProperty;s=t.getDOMSelection,r=t.getDOMRange,d=t.setDOMRange,n=t.elementContainsNode,a=t.nodeIsCursorTarget,l=t.innerElementIsActive,o=t.handleEvent,u=t.normalizeRange,c=t.rangeIsCollapsed,h=t.rangesAreEqual,t.SelectionManager=function(m){function v(g){this.element=g,this.selectionDidChange=f(this.selectionDidChange,this),this.didMouseDown=f(this.didMouseDown,this),this.locationMapper=new t.LocationMapper(this.element),this.pointMapper=new t.PointMapper,this.lockCount=0,o("mousedown",{onElement:this.element,withCallback:this.didMouseDown})}return p(v,m),v.prototype.getLocationRange=function(g){var y;return g==null&&(g={}),g.strict===!1?this.createLocationRangeFromDOMRange(r(),{strict:!1}):g.ignoreLock?this.currentLocationRange:(y=this.lockedLocationRange)!=null?y:this.currentLocationRange},v.prototype.setLocationRange=function(g){var y;if(!this.lockedLocationRange)return g=u(g),(y=this.createDOMRangeFromLocationRange(g))?(d(y),this.updateCurrentLocationRange(g)):void 0},v.prototype.setLocationRangeFromPointRange=function(g){var y,w;return g=u(g),w=this.getLocationAtPoint(g[0]),y=this.getLocationAtPoint(g[1]),this.setLocationRange([w,y])},v.prototype.getClientRectAtLocationRange=function(g){var y;return(y=this.createDOMRangeFromLocationRange(g))?this.getClientRectsForDOMRange(y)[1]:void 0},v.prototype.locationIsCursorTarget=function(g){var y,w;return w=this.findNodeAndOffsetFromLocation(g),y=w[0],w[1],a(y)},v.prototype.lock=function(){return this.lockCount++===0?(this.updateCurrentLocationRange(),this.lockedLocationRange=this.getLocationRange()):void 0},v.prototype.unlock=function(){var g;return--this.lockCount===0&&(g=this.lockedLocationRange,this.lockedLocationRange=null,g!=null)?this.setLocationRange(g):void 0},v.prototype.clearSelection=function(){var g;return(g=s())!=null?g.removeAllRanges():void 0},v.prototype.selectionIsCollapsed=function(){var g;return((g=r())!=null?g.collapsed:void 0)===!0},v.prototype.selectionIsExpanded=function(){return!this.selectionIsCollapsed()},v.prototype.createLocationRangeFromDOMRange=function(g,y){var w,E;if(g!=null&&this.domRangeWithinElement(g)&&(E=this.findLocationFromContainerAndOffset(g.startContainer,g.startOffset,y)))return g.collapsed||(w=this.findLocationFromContainerAndOffset(g.endContainer,g.endOffset,y)),u([E,w])},v.proxyMethod("locationMapper.findLocationFromContainerAndOffset"),v.proxyMethod("locationMapper.findContainerAndOffsetFromLocation"),v.proxyMethod("locationMapper.findNodeAndOffsetFromLocation"),v.proxyMethod("pointMapper.createDOMRangeFromPoint"),v.proxyMethod("pointMapper.getClientRectsForDOMRange"),v.prototype.didMouseDown=function(){return this.pauseTemporarily()},v.prototype.pauseTemporarily=function(){var g,y,w,E;return this.paused=!0,y=function(x){return function(){var S,_,M;for(x.paused=!1,clearTimeout(E),_=0,M=w.length;M>_;_++)S=w[_],S.destroy();return n(document,x.element)?x.selectionDidChange():void 0}}(this),E=setTimeout(y,200),w=function(){var x,S,_,M;for(_=["mousemove","keydown"],M=[],x=0,S=_.length;S>x;x++)g=_[x],M.push(o(g,{onElement:document,withCallback:y}));return M}()},v.prototype.selectionDidChange=function(){return this.paused||l(this.element)?void 0:this.updateCurrentLocationRange()},v.prototype.updateCurrentLocationRange=function(g){var y;return(g??(g=this.createLocationRangeFromDOMRange(r())))&&!h(g,this.currentLocationRange)?(this.currentLocationRange=g,(y=this.delegate)!=null&&typeof y.locationRangeDidChange=="function"?y.locationRangeDidChange(this.currentLocationRange.slice(0)):void 0):void 0},v.prototype.createDOMRangeFromLocationRange=function(g){var y,w,E,x;return E=this.findContainerAndOffsetFromLocation(g[0]),w=c(g)?E:(x=this.findContainerAndOffsetFromLocation(g[1]))!=null?x:E,E!=null&&w!=null?(y=document.createRange(),y.setStart.apply(y,E),y.setEnd.apply(y,w),y):void 0},v.prototype.getLocationAtPoint=function(g){var y,w;return(y=this.createDOMRangeFromPoint(g))&&(w=this.createLocationRangeFromDOMRange(y))!=null?w[0]:void 0},v.prototype.domRangeWithinElement=function(g){return g.collapsed?n(this.element,g.startContainer):n(this.element,g.startContainer)&&n(this.element,g.endContainer)},v}(t.BasicObject)}).call(this),(function(){var n,r,s,o,l=function(c,h){function d(){this.constructor=c}for(var f in h)a.call(h,f)&&(c[f]=h[f]);return d.prototype=h.prototype,c.prototype=new d,c.__super__=h.prototype,c},a={}.hasOwnProperty,u=[].slice;s=t.rangeIsCollapsed,o=t.rangesAreEqual,r=t.objectsAreEqual,n=t.getBlockConfig,t.EditorController=function(c){function h(f){var p,b;this.editorElement=f.editorElement,p=f.document,b=f.html,this.selectionManager=new t.SelectionManager(this.editorElement),this.selectionManager.delegate=this,this.composition=new t.Composition,this.composition.delegate=this,this.attachmentManager=new t.AttachmentManager(this.composition.getAttachments()),this.attachmentManager.delegate=this,this.inputController=new t["Level"+t.config.input.getLevel()+"InputController"](this.editorElement),this.inputController.delegate=this,this.inputController.responder=this.composition,this.compositionController=new t.CompositionController(this.editorElement,this.composition),this.compositionController.delegate=this,this.toolbarController=new t.ToolbarController(this.editorElement.toolbarElement),this.toolbarController.delegate=this,this.editor=new t.Editor(this.composition,this.selectionManager,this.editorElement),p!=null?this.editor.loadDocument(p):this.editor.loadHTML(b)}var d;return l(h,c),h.prototype.registerSelectionManager=function(){return t.selectionChangeObserver.registerSelectionManager(this.selectionManager)},h.prototype.unregisterSelectionManager=function(){return t.selectionChangeObserver.unregisterSelectionManager(this.selectionManager)},h.prototype.render=function(){return this.compositionController.render()},h.prototype.reparse=function(){return this.composition.replaceHTML(this.editorElement.innerHTML)},h.prototype.compositionDidChangeDocument=function(){return this.notifyEditorElement("document-change"),this.handlingInput?void 0:this.render()},h.prototype.compositionDidChangeCurrentAttributes=function(f){return this.currentAttributes=f,this.toolbarController.updateAttributes(this.currentAttributes),this.updateCurrentActions(),this.notifyEditorElement("attributes-change",{attributes:this.currentAttributes})},h.prototype.compositionDidPerformInsertionAtRange=function(f){return this.pasting?this.pastedRange=f:void 0},h.prototype.compositionShouldAcceptFile=function(f){return this.notifyEditorElement("file-accept",{file:f})},h.prototype.compositionDidAddAttachment=function(f){var p;return p=this.attachmentManager.manageAttachment(f),this.notifyEditorElement("attachment-add",{attachment:p})},h.prototype.compositionDidEditAttachment=function(f){var p;return this.compositionController.rerenderViewForObject(f),p=this.attachmentManager.manageAttachment(f),this.notifyEditorElement("attachment-edit",{attachment:p}),this.notifyEditorElement("change")},h.prototype.compositionDidChangeAttachmentPreviewURL=function(f){return this.compositionController.invalidateViewForObject(f),this.notifyEditorElement("change")},h.prototype.compositionDidRemoveAttachment=function(f){var p;return p=this.attachmentManager.unmanageAttachment(f),this.notifyEditorElement("attachment-remove",{attachment:p})},h.prototype.compositionDidStartEditingAttachment=function(f,p){return this.attachmentLocationRange=this.composition.document.getLocationRangeOfAttachment(f),this.compositionController.installAttachmentEditorForAttachment(f,p),this.selectionManager.setLocationRange(this.attachmentLocationRange)},h.prototype.compositionDidStopEditingAttachment=function(){return this.compositionController.uninstallAttachmentEditor(),this.attachmentLocationRange=null},h.prototype.compositionDidRequestChangingSelectionToLocationRange=function(f){return!this.loadingSnapshot||this.isFocused()?(this.requestedLocationRange=f,this.compositionRevisionWhe
383nLocationRangeRequested=this.composition.revision,this.handlingInput?void 0:this.render()):void 0},h.prototype.compositionWillLoadSnapshot=function(){return this.loadingSnapshot=!0},h.prototype.compositionDidLoadSnapshot=function(){return this.compositionController.refreshViewCache(),this.render(),this.loadingSnapshot=!1},h.prototype.getSelectionManager=function(){return this.selectionManager},h.proxyMethod("getSelectionManager().setLocationRange"),h.proxyMethod("getSelectionManager().getLocationRange"),h.prototype.attachmentManagerDidRequestRemovalOfAttachment=function(f){return this.removeAttachment(f)},h.prototype.compositionControllerWillSyncDocumentView=function(){return this.inputController.editorWillSyncDocumentView(),this.selectionManager.lock(),this.selectionManager.clearSelection()},h.prototype.compositionControllerDidSyncDocumentView=function(){return this.inputController.editorDidSyncDocumentView(),this.selectionManager.unlock(),this.updateCurrentActions(),this.notifyEditorElement("sync")},h.prototype.compositionControllerDidRender=function(){return this.requestedLocationRange!=null&&(this.compositionRevisionWhenLocationRangeRequested===this.composition.revision&&this.selectionManager.setLocationRange(this.requestedLocationRange),this.requestedLocationRange=null,this.compositionRevisionWhenLocationRangeRequested=null),this.renderedCompositionRevision!==this.composition.revision&&(this.runEditorFilters(),this.composition.updateCurrentAttributes(),this.notifyEditorElement("render")),this.renderedCompositionRevision=this.composition.revision},h.prototype.compositionControllerDidFocus=function(){return this.isFocusedInvisibly()&&this.setLocationRange({index:0,offset:0}),this.toolbarController.hideDialog(),this.notifyEditorElement("focus")},h.prototype.compositionControllerDidBlur=function(){return this.notifyEditorElement("blur")},h.prototype.compositionControllerDidSelectAttachment=function(f,p){return this.toolbarController.hideDialog(),this.composition.editAttachment(f,p)},h.prototype.compositionControllerDidRequestDeselectingAttachment=function(f){var p,b;return p=(b=this.attachmentLocationRange)!=null?b:this.composition.document.getLocationRangeOfAttachment(f),this.selectionManager.setLocationRange(p[1])},h.prototype.compositionControllerWillUpdateAttachment=function(f){return this.editor.recordUndoEntry("Edit Attachment",{context:f.id,consolidatable:!0})},h.prototype.compositionControllerDidRequestRemovalOfAttachment=function(f){return this.removeAttachment(f)},h.prototype.inputControllerWillHandleInput=function(){return this.handlingInput=!0,this.requestedRender=!1},h.prototype.inputControllerDidRequestRender=function(){return this.requestedRender=!0},h.prototype.inputControllerDidHandleInput=function(){return this.handlingInput=!1,this.requestedRender?(this.requestedRender=!1,this.render()):void 0},h.prototype.inputControllerDidAllowUnhandledInput=function(){return this.notifyEditorElement("change")},h.prototype.inputControllerDidRequestReparse=function(){return this.reparse()},h.prototype.inputControllerWillPerformTyping=function(){return this.recordTypingUndoEntry()},h.prototype.inputControllerWillPerformFormatting=function(f){return this.recordFormattingUndoEntry(f)},h.prototype.inputControllerWillCutText=function(){return this.editor.recordUndoEntry("Cut")},h.prototype.inputControllerWillPaste=function(f){return this.editor.recordUndoEntry("Paste"),this.pasting=!0,this.notifyEditorElement("before-paste",{paste:f})},h.prototype.inputControllerDidPaste=function(f){return f.range=this.pastedRange,this.pastedRange=null,this.pasting=null,this.notifyEditorElement("paste",{paste:f})},h.prototype.inputControllerWillMoveText=function(){return this.editor.recordUndoEntry("Move")},h.prototype.inputControllerWillAttachFiles=function(){return this.editor.recordUndoEntry("Drop Files")},h.prototype.inputControllerWillPerformUndo=function(){return this.editor.undo()},h.prototype.inputControllerWillPerformRedo=function(){return this.editor.redo()},h.prototype.inputControllerDidReceiveKeyboardCommand=function(f){return this.toolbarController.applyKeyboardCommand(f)},h.prototype.inputControllerDidStartDrag=function(){return this.locationRangeBeforeDrag=this.selectionManager.getLocationRange()},h.prototype.inputControllerDidReceiveDragOverPoint=function(f){return this.selectionManager.setLocationRangeFromPointRange(f)},h.prototype.inputControllerDidCancelDrag=function(){return this.selectionManager.setLocationRange(this.locationRangeBeforeDrag),this.locationRangeBeforeDrag=null},h.prototype.locationRangeDidChange=function(f){return this.composition.updateCurrentAttributes(),this.updateCurrentActions(),this.attachmentLocationRange&&!o(this.attachmentLocationRange,f)&&this.composition.stopEditingAttachment(),this.notifyEditorElement("selection-change")},h.prototype.toolbarDidClickButton=function(){return this.getLocationRange()?void 0:this.setLocationRange({index:0,offset:0})},h.prototype.toolbarDidInvokeAction=function(f){return this.invokeAction(f)},h.prototype.toolbarDidToggleAttribute=function(f){return this.recordFormattingUndoEntry(f),this.composition.toggleCurrentAttribute(f),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},h.prototype.toolbarDidUpdateAttribute=function(f,p){return this.recordFormattingUndoEntry(f),this.composition.setCurrentAttribute(f,p),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},h.prototype.toolbarDidRemoveAttribute=function(f){return this.recordFormattingUndoEntry(f),this.composition.removeCurrentAttribute(f),this.render(),this.selectionFrozen?void 0:this.editorElement.focus()},h.prototype.toolbarWillShowDialog=function(){return this.composition.expandSelectionForEditing(),this.freezeSelection()},h.prototype.toolbarDidShowDialog=function(f){return this.notifyEditorElement("toolbar-dialog-show",{dialogName:f})},h.prototype.toolbarDidHideDialog=function(f){return this.thawSelection(),this.editorElement.focus(),this.notifyEditorElement("toolbar-dialog-hide",{dialogName:f})},h.prototype.freezeSelection=function(){return this.selectionFrozen?void 0:(this.selectionManager.lock(),this.composition.freezeSelection(),this.selectionFrozen=!0,this.render())},h.prototype.thawSelection=function(){return this.selectionFrozen?(this.composition.thawSelection(),this.selectionManager.unlock(),this.selectionFrozen=!1,this.render()):void 0},h.prototype.actions={undo:{test:function(){return this.editor.canUndo()},perform:function(){return this.editor.undo()}},redo:{test:function(){return this.editor.canRedo()},perform:function(){return this.editor.redo()}},link:{test:function(){return this.editor.canActivateAttribute("href")}},increaseNestingLevel:{test:function(){return this.editor.canIncreaseNestingLevel()},perform:function(){return this.editor.increaseNestingLevel()&&this.render()}},decreaseNestingLevel:{test:function(){return this.editor.canDecreaseNestingLevel()},perform:function(){return this.editor.decreaseNestingLevel()&&this.render()}},attachFiles:{test:function(){return!0},perform:function(){return t.config.input.pickFiles(this.editor.insertFiles)}}},h.prototype.canInvokeAction=function(f){var p,b;return this.actionIsExternal(f)?!0:!!((p=this.actions[f])!=null&&(b=p.test)!=null&&b.call(this))},h.prototype.invokeAction=function(f){var p,b;return this.actionIsExternal(f)?this.notifyEditorElement("action-invoke",{actionName:f}):(p=this.actions[f])!=null&&(b=p.perform)!=null?b.call(this):void 0},h.prototype.actionIsExternal=function(f){return/^x-./.test(f)},h.prototype.getCurrentActions=function(){var f,p;p={};for(f in this.actions)p[f]=this.canInvokeAction(f);return p},h.prototype.updateCurrentActions=function(){var f;return f=this.getCurrentActions(),r(f,this.currentActions)?void 0:(this.currentActions=f,this.toolbarController.updateActions(this.currentActions),this.notifyEditorElement("actions-change",{actions:this.currentActions}))},h.prototype.runEditorFilters=function(){var f,p,b,m,v,g,y,w;for(w=this.composition.getSnapshot(),v=this.editor.filters,b=0,m=v.length;m>b;b++)p=v[b],f=w.document,y=w.selectedRange,w=(g=p.call(this.editor,w))!=null?g:{},w.document==null&&(w.document=f),w.selectedRange==null&&(w.selectedRange=y);return d(w,this.composition.getSnapshot())?void 0:this.composition.loadSnapsh
383ot(w)},d=function(f,p){return o(f.selectedRange,p.selectedRange)&&f.document.isEqualTo(p.document)},h.prototype.updateInputElement=function(){var f,p;return f=this.compositionController.getSerializableElement(),p=t.serializeToContentType(f,"text/html"),this.editorElement.setInputElementValue(p)},h.prototype.notifyEditorElement=function(f,p){switch(f){case"document-change":this.documentChangedSinceLastRender=!0;break;case"render":this.documentChangedSinceLastRender&&(this.documentChangedSinceLastRender=!1,this.notifyEditorElement("change"));break;case"change":case"attachment-add":case"attachment-edit":case"attachment-remove":this.updateInputElement()}return this.editorElement.notify(f,p)},h.prototype.removeAttachment=function(f){return this.editor.recordUndoEntry("Delete Attachment"),this.composition.removeAttachment(f),this.render()},h.prototype.recordFormattingUndoEntry=function(f){var p,b;return p=n(f),b=this.selectionManager.getLocationRange(),p||!s(b)?this.editor.recordUndoEntry("Formatting",{context:this.getUndoContext(),consolidatable:!0}):void 0},h.prototype.recordTypingUndoEntry=function(){return this.editor.recordUndoEntry("Typing",{context:this.getUndoContext(this.currentAttributes),consolidatable:!0})},h.prototype.getUndoContext=function(){var f;return f=1<=arguments.length?u.call(arguments,0):[],[this.getLocationContext(),this.getTimeContext()].concat(u.call(f))},h.prototype.getLocationContext=function(){var f;return f=this.selectionManager.getLocationRange(),s(f)?f[0].index:f},h.prototype.getTimeContext=function(){return t.config.undoInterval>0?Math.floor(new Date().getTime()/t.config.undoInterval):0},h.prototype.isFocused=function(){var f;return this.editorElement===((f=this.editorElement.ownerDocument)!=null?f.activeElement:void 0)},h.prototype.isFocusedInvisibly=function(){return this.isFocused()&&!this.getLocationRange()},h}(t.Controller)}).call(this),(function(){var n,r,s,o,l,a,u,c=[].indexOf||function(h){for(var d=0,f=this.length;f>d;d++)if(d in this&&this[d]===h)return d;return-1};r=t.browser,a=t.makeElement,u=t.triggerEvent,o=t.handleEvent,l=t.handleEventOnce,s=t.findClosestElementFromNode,n=t.AttachmentView.attachmentSelector,t.registerElement("trix-editor",function(){var h,d,f,p,b,m,v,g,y;return v=0,d=function(w){return!document.querySelector(":focus")&&w.hasAttribute("autofocus")&&document.querySelector("[autofocus]")===w?w.focus():void 0},g=function(w){return w.hasAttribute("contenteditable")?void 0:(w.setAttribute("contenteditable",""),l("focus",{onElement:w,withCallback:function(){return f(w)}}))},f=function(w){return b(w),y(w)},b=function(w){return typeof document.queryCommandSupported=="function"&&document.queryCommandSupported("enableObjectResizing")?(document.execCommand("enableObjectResizing",!1,!1),o("mscontrolselect",{onElement:w,preventDefault:!0})):void 0},y=function(){var w;return typeof document.queryCommandSupported=="function"&&document.queryCommandSupported("DefaultParagraphSeparator")&&(w=t.config.blockAttributes.default.tagName,w==="div"||w==="p")?document.execCommand("DefaultParagraphSeparator",!1,w):void 0},h=function(w){return w.hasAttribute("role")?void 0:w.setAttribute("role","textbox")},m=function(w){var E;if(!w.hasAttribute("aria-label")&&!w.hasAttribute("aria-labelledby"))return(E=function(){var x,S,_;return _=function(){var M,O,D,k;for(D=w.labels,k=[],M=0,O=D.length;O>M;M++)x=D[M],x.contains(w)||k.push(x.textContent);return k}(),(S=_.join(" "))?w.setAttribute("aria-label",S):w.removeAttribute("aria-label")})(),o("focus",{onElement:w,withCallback:E})},p=function(){return r.forcesObjectResizing?{display:"inline",width:"auto"}:{display:"inline-block",width:"1px"}}(),{defaultCSS:`%t { 384 display: block; 385} 386 387%t:empty:not(:focus)::before { 388 content: attr(placeholder); 389 color: graytext; 390 cursor: text; 391 pointer-events: none; 392} 393 394%t a[contenteditable=false] { 395 cursor: text; 396} 397 398%t img { 399 max-width: 100%; 400 height: auto; 401} 402 403%t `+n+` figcaption textarea { 404 resize: none; 405} 406 407%t `+n+` figcaption textarea.trix-autoresize-clone { 408 position: absolute; 409 left: -9999px; 410 max-height: 0px; 411} 412 413%t `+n+` figcaption[data-trix-placeholder]:empty::before { 414 content: attr(data-trix-placeholder); 415 color: graytext; 416} 417 418%t [data-trix-cursor-target] { 419 display: `+p.display+` !important; 420 width: `+p.width+` !important; 421 padding: 0 !important; 422 margin: 0 !important; 423 border: none !important; 424} 425 426%t [data-trix-cursor-target=left] { 427 vertical-align: top !important; 428 margin-left: -1px !important; 429} 430 431%t [data-trix-cursor-target=right] { 432 vertical-align: bottom !important; 433 margin-right: -1px !important; 434}`,trixId:{get:function(){return this.hasAttribute("trix-id")?this.getAttribute("trix-id"):(this.setAttribute("trix-id",++v),this.trixId)}},labels:{get:function(){var w,E,x;return E=[],this.id&&this.ownerDocument&&E.push.apply(E,this.ownerDocument.querySelectorAll("label[for='"+this.id+"']")),(w=s(this,{matchingSelector:"label"}))&&((x=w.control)===this||x===null)&&E.push(w),E}},toolbarElement:{get:function(){var w,E,x;return this.hasAttribute("toolbar")?(E=this.ownerDocument)!=null?E.getElementById(this.getAttribute("toolbar")):void 0:this.parentNode?(x="trix-toolbar-"+this.trixId,this.setAttribute("toolbar",x),w=a("trix-toolbar",{id:x}),this.parentNode.insertBefore(w,this),w):void 0}},inputElement:{get:function(){var w,E,x;return this.hasAttribute("input")?(x=this.ownerDocument)!=null?x.getElementById(this.getAttribute("input")):void 0:this.parentNode?(E="trix-input-"+this.trixId,this.setAttribute("input",E),w=a("input",{type:"hidden",id:E}),this.parentNode.insertBefore(w,this.nextElementSibling),w):void 0}},editor:{get:function(){var w;return(w=this.editorController)!=null?w.editor:void 0}},name:{get:function(){var w;return(w=this.inputElement)!=null?w.name:void 0}},value:{get:function(){var w;return(w=this.inputElement)!=null?w.value:void 0},set:function(w){var E;return this.defaultValue=w,(E=this.editor)!=null?E.loadHTML(this.defaultValue):void 0}},notify:function(w,E){return this.editorController?u("trix-"+w,{onElement:this,attributes:E}):void 0},setInputElementValue:function(w){var E;return(E=this.inputElement)!=null?E.value=w:void 0},initialize:function(){return this.hasAttribute("data-trix-internal")?void 0:(g(this),h(this),m(this))},connect:function(){return this.hasAttribute("data-trix-internal")?void 0:(this.editorController||(u("trix-before-initialize",{onElement:this}),this.editorController=new t.EditorController({editorElement:this,html:this.defaultValue=this.value}),requestAnimationFrame(function(w){return function(){return u("trix-initialize",{onElement:w})}}(this))),this.editorController.registerSelectionManager(),this.registerResetListener(),this.registerClickListener(),d(this))},disconnect:function(){var w;return(w=this.editorController)!=null&&w.unregisterSelectionManager(),this.unregisterResetListener(),this.unregisterClickListener()},registerResetListener:function(){return this.resetListener=this.resetBubbled.bind(this),window.addEventListener("reset",this.resetListener,!1)},unregisterResetListener:function(){return window.removeEventListener("reset",this.resetListener,!1)},registerClickListener:function(){return this.clickListener=this.clickBubbled.bind(this),window.addEventListener("click",this.clickListener,!1)},unregisterClickListener:function(){return window.removeEventListener("click",this.clickListener,!1)},resetBubbled:function(w){var E;if(!w.defaultPrevented&&w.target===((E=this.inputElement)!=null?E.form:void 0))return this.reset()},clickBubbled:function(w){var E;if(!(w.defaultPrevented||this.contains(w.target)||!(E=s(w.target,{matchingSelector:"label"}))||c.call(this.labels,E)<0))return this.focus()},reset:function(){return this.value=this.defaultValue}}}())}).call(this),(function(){}).call(this)}).call(this),i.exports&&(i.exports=t)}).call(ee)})(OE);var DE=OE.exports;const YP=Go(DE),XP=dv({__proto__:null,default:YP},[DE]);class PE extends U{connect(){const e=this;this.lastCursorPosition=null,this.addTrixToolbar=this.addTrixToolbar.bind(this),this.addTrixToolbars=this.addTrixToolbars.bind(this),this.selectUnit=this.selectUnit.bind(this),this.filterUser=this.filterUser.bind(this),this.trixEditor=this.trixEditorTarget.querySelector("trix-editor"),this.trixInput=document.getElementById("email_body_trix_input_email"),this.plainTextInput=document.getElementById("email_body_input"),this.disablePlainTextEditor(),document.addEventListener("trix-initialize",function(t){const n=t.target;n.addEventListener("paste",function(r){const s=r.clipboardData||window.clipboardData;if(!s)return;const o=s.getData("text/html"),l=s.getData("text/plain");o?(r.preventDefault(),r.stopPropagation(),n.editor.undo(),n.editor.insertHTML(o)):l&&(r.preventDefault(),r.stopPropagation(),n.editor.undo(),n.editor.insertHTML(mm(l)))})}),document.addEventListener("trix-initialize",this.addTrixToolbars,{once:!0}),this.templateTarget.addEventListener("change",function(){turboFetch(e.templateTarget.dataset.templateUrl.replace("__ID__",this.value),function(){})})}filterUser(){const e=document.getElementById("pagination"),t=new FormData(this.formTarget),n=`${e.src.split("?")[0]}?page=1&filter[from_uid]=${t.get("email[from_uid]")}&filter[to_uid]=${t.get("email[to_uid]")}&filter[selected_option]=${t.get("selected_option")||""}`;e.removeAttribute("complete"),e.removeAttribute("loading"),e.src=null,e.src=n,e.reload()}addTrixToolbars(e){const t=this,n=e.target.editor;let r=document.querySelector(".trix-button-group-spacer");r.classList.add("ms-4"),Array.from(["first_name","last_name","company","phone","unsub"]).forEac
434h(s=>this.addTrixToolbar(r,s)),n.element.addEventListener("trix-selection-change",function(s){t.lastCursorPosition=n.getSelectedRange()}),r.addEventListener("click",function(s){if(s.target.getAttribute("data-trix-attribute")==="keytext"){const o=s.target.getAttribute("data-trix-value");if(t.lastCursorPosition!==null)n.setSelectedRange(t.lastCursorPosition),n.insertString(o);else{const l=n.getSelectedRange();n.insertString(o,l[0])}}})}addTrixToolbar(e,t){e.insertAdjacentHTML("beforeend",`<span class="trix-button-group-button text-gray-900 dark:text-gray-400 mx-1.5 text-sm hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 rounded py-1 px-2 inline-flex items-center justify-center bg-white border-gray-200 border" data-trix-attribute="keytext" data-trix-value="[${t}]" title="${t}">[${t}]</span>`)}selectUnit(e){this.unitTarget.innerHTML=e.target.value}disablePlainTextEditor(){this.plainTextTarget.setAttribute("disabled",!0),this.plainTextTarget.classList.add("disabled"),this.plainTextInput.style.disabled=!0}enablePlainTextEditor(){this.plainTextTarget.removeAttribute("disabled"),this.plainTextTarget.classList.remove("disabled"),this.plainTextInput.style.disabled=!1}disableTrixEditor(){this.trixEditor.setAttribute("contenteditable","false"),this.trixEditor.classList.add("disabled"),this.trixInput.style.disabled=!0}enableTrixEditor(){this.trixEditor.setAttribute("contenteditable","true"),this.trixEditor.classList.remove("disabled"),this.trixInput.style.disabled=!1}showPlainText(){console.log("showPlainText",this.plainTextInput,this.trixInput.value),this.plainTextInput.innerHTML=this.trixInput.value,this.enablePlainTextEditor(),this.disableTrixEditor()}showTrix(){console.log("showTrix",this.plainTextInput.value),this.trixInput.value=this.plainTextInput.value,this.trixEditor.editor.loadHTML(this.plainTextInput.value),this.enableTrixEditor(),this.disablePlainTextEditor()}}$(PE,"targets",["body","unit","template","form","plainText","trixEditor"]);const JP=Object.freeze(Object.defineProperty({__proto__:null,default:PE},Symbol.toStringTag,{value:"Module"}));class RE extends U{connect(){if(this.dismissedWithinAWeek())return;const e=navigator.userAgent||navigator.vendor||window.opera,t=/Android/i.test(e),n=/iPhone|iPad|iPod/i.test(e);t?this.showBanner():n&&(this.textTarget.textContent="Get our app on App Store",this.imageTarget.src="https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg",this.imageTarget.alt="Download on the App Store",this.linkTarget.href="https://apps.apple.com/us/app/aeroleads/id6749017331",this.showBanner())}showBanner(){this.imageTarget.onload=()=>{this.bannerTarget.classList.remove("hidden")},this.imageTarget.onerror=()=>{this.bannerTarget.classList.remove("hidden")}}close(){this.bannerTarget.classList.add("hidden"),this.storeDismissedNow()}dismissedWithinAWeek(){const e=localStorage.getItem("mobileAppNoticeDismissedAt");if(!e)return!1;const t=new Date(e);return(new Date-t)/(1e3*60*60*24)<7}storeDismissedNow(){localStorage.setItem("mobileAppNoticeDismissedAt",new Date().toISOString())}}$(RE,"targets",["banner","image","link","text","closeButton"]);const QP=Object.freeze(Object.defineProperty({__proto__:null,default:RE},Symbol.toStringTag,{value:"Module"}));class Sm extends U{initialize(){this.options={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"global-modal-backdrop bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-[140]",closable:!0,onHide:()=>{document.querySelectorAll(".global-modal-backdrop").forEach(e=>{e.remove()})},onShow:()=>{},onToggle:()=>{}},this.instanceOptions={id:"global-modal",override:!0}}connect(){const e=this;this.modalTarget=document.getElementById("global-modal"),this.modal=new Modal(this.modalTarget,this.options,this.instanceOptions),this.hideModal=this.hideModal.bind(this),this.submitEnd=this.submitEnd.bind(this),document.querySelectorAll("[data-modal-hide]").forEach(t=>{t.addEventListener("click",n=>{e.modal.hide()})}),this.modalTarget.addEventListener("click",function(t){t.target.getAttribute("data-modal-hide")=="global-modal"&&e.modal.hide()})}hideModal(){this.modal.show()}submitStart(e){console.log("submitEnd",e)}submitEnd(e){console.log("submitEnd",e),e.detail.success&&this.modal.hide()}}$(Sm,"targets",["header","body","footer"]);const ZP=Object.freeze(Object.defineProperty({__proto__:null,default:Sm},Symbol.toStringTag,{value:"Module"})),ub="aeroleads-nps-dismissed",e6=30,t6=45e3,n6=["/pricing","/checkout","/payment","/subscribe"];class NE extends U{connect(){this.selectedScore=null,this.submitting=!1,!n6.some(e=>window.location.pathname.startsWith(e))&&(this.recentlyDismissed()||(this.delayTimer=setTimeout(()=>this.checkEligibility(),t6)))}disconnect(){this.delayTimer&&clearTimeout(this.delayTimer)}async checkEligibility(){try{const e=await fetch("/user_ratings/eligible",{headers:{Accept:"application/json"},credentials:"same-origin"});if(!e.ok)return;(await e.json()).eligible&&this.show()}catch{}}show(){this.containerTarget.classList.remove("translate-y-full","opacity-0","pointer-events-none"),this.containerTarget.classList.add("translate-y-0","opacity-100")}hide(){this.containerTarget.classList.add("translate-y-full","opacity-0","pointer-events-none"),this.containerTarget.classList.remove("translate-y-0","opacity-100")}selectScore(e){this.selectedScore=parseInt(e.currentTarget.dataset.score),this.scoreButtonsTarget.querySelectorAll("[data-score]").forEach(n=>{const r=parseInt(n.dataset.score);n.classList.remove("bg-red-500","bg-orange-400","bg-yellow-400","bg-green-400","bg-green-500","text-white","ring-2","ring-offset-1","ring-indigo-500"),r<=this.selectedScore&&n.classList.add(this.colorForScore(r),"text-white"),r===this.selectedScore&&n.classList.add("ring-2","ring-offset-1","ring-indigo-500")}),this.scoreStepTarget.classList.add("hidden"),this.feedbackStepTarget.classList.remove("hidden");const t=this.selectedScore>=9?"Awesome! What do you love most about AeroLeads?":this.selectedScore>=7?"Thanks! What can we do better?":"We'd love to do better. What can we improve?";
434this.feedbackStepTarget.querySelector("[data-nps-prompt]").textContent=t,this.feedbackInputTarget.focus()}colorForScore(e){return e<=3?"bg-red-500":e<=5?"bg-orange-400":e<=6?"bg-yellow-400":e<=8?"bg-green-400":"bg-green-500"}feedbackKeydown(e){e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),this.submitFeedback())}async submitFeedback(){var n;if(this.submitting)return;this.submitting=!0,this.hasSubmitBtnTarget&&(this.submitBtnTarget.disabled=!0,this.submitBtnTarget.textContent="Sending...");const e=this.feedbackInputTarget.value.trim(),t=(n=document.querySelector("meta[name='csrf-token']"))==null?void 0:n.content;try{const r=await fetch("/user_ratings/create_user_rating",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-Token":t},body:JSON.stringify({score:this.selectedScore,response:e,source_page:window.location.pathname})});if(this.feedbackStepTarget.classList.add("hidden"),this.thankYouStepTarget.classList.remove("hidden"),r.ok){const s=await r.json(),o={promoter:"We're thrilled you love AeroLeads!",passive:"Thanks for the honest feedback!",detractor:"Thanks â we'll work on improving."};this.thankYouMessageTarget.textContent=o[s.category]||"Thank you!"}
434else this.thankYouMessageTarget.textContent="Thank you for your feedback!"}catch{this.feedbackStepTarget.classList.add("hidden"),this.thankYouStepTarget.classList.remove("hidden"),this.thankYouMessageTarget.textContent="Thank you for your feedback!"}this.persistDismissed(),setTimeout(()=>this.hide(),4e3)}skipFeedback(){this.feedbackInputTarget.value="",this.submitFeedback()}dismiss(){this.persistDismissed(),this.hide()}recentlyDismissed(){try{const e=localStorage.getItem(ub);if(!e)return!1;const t=parseInt(e);return Date.now()-t<e6*864e5}catch{return!1}}persistDismissed(){try{localStorage.setItem(ub,Date.now().toString())}catch{}}}$(NE,"targets",["container","scoreStep","feedbackStep","thankYouStep","scoreButtons","feedbackInput","thankYouMessage","submitBtn"]);const i6=Object.freeze(Object.defineProperty({__proto__:null,default:NE},Symbol.toStringTag,{value:"Module"}));class r6 extends U{visit(e){e.preventDefault();const t=e.currentTarget.getAttribute("href");Turbo.visit(t,{frame:this.element.dataset.turboFrame||"downloaded_lists"})}connect(){document.addEventListener("turbo:before-fetch-request",this.startProgress.bind(this)),document.addEventListener("turbo:before-fetch-response",this.stopProgress.bind(this))}disconnect(){document.removeEventListener("turbo:before-fetch-request",this.startProgress.bind(this)),document.removeEventListener("turbo:before-fetch-response",this.stopProgress.bind(this))}startProgress(e){const t=e.target;t.tagName.toLowerCase()==="turbo-frame"&&t.dataset.turboProgressBar&&Turbo.navigator.delegate.adapter.showProgressBar()}stopProgress(e){const t=e.target;t.tagName.toLowerCase()==="turbo-frame"&&t.dataset.turboProgressBar&&Turbo.navigator.delegate.adapter.progressBar.hide()}}const s6=Object.freeze(Object.defineProperty({__proto__:null,default:r6},Symbol.toStringTag,{value:"Module"}));var Cm={exports:{}};const km=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}],BE=(i,e=km,t="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let n=i||"";e[0].minDiversity=0,e[0].minLength=0;const r=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];t&&r.push({regex:`[${t}]`,message:"symbol"});let s={};s.contains=r.filter(l=>new RegExp(`${l.regex}`).test(n)).map(l=>l.message),s.length=n.length;let o=e.filter(l=>s.contains.length>=l.minDiversity).filter(l=>s.length>=l.minLength).sort((l,a)=>a.id-l.id).map(l=>({id:l.id,value:l.value}));return Object.assign(s,o[0]),s};Cm.exports={passwordStrength:BE,defaultOptions:km};var o6=Cm.exports.passwordStrength=BE;Cm.exports.defaultOptions=km;const Rs=[{level:0,colorClass:"bg-red-500",label:"Very Weak"},{level:1,colorClass:"bg-orange-500",label:"Weak"},{level:2,colorClass:"bg-yellow-500",label:"Moderate"},{level:3,colorClass:"bg-green-500",label:"Strong"}],a6=[{regex:/.{8,}/,label:"At least 8 characters"},{regex:/[A-Z]/,label:"At least one uppercase letter"},{regex:/[a-z]/,label:"At least one lowercase letter"},{regex:/[0-9]/,label:"At least one number"},{regex:/[^A-Za-z0-9]/,label:"At least one special character (!@#$%^&*)"}];class FE extends U{connect(){this.strengthIndicatorTarget.classList.add("hidden")}checkStrength(){const e=this.passwordTarget.value;e.length>0?this.strengthIndicatorTarget.classList.remove("hidden"):this.strengthIndicatorTarget.classList.add("hidden");const t=o6(e).id,n=Rs[t]||Rs[0];this.strengthIndicatorTarget.querySelector(".strength-label").textContent=n.label,this.stepTargets.forEach((r,s)=>{t==0&&r.classList.remove(...Rs.map(o=>o.colorClass)),s<=t?r.classList.add(Rs[s].colorClass):r.classList.remove(...Rs.map(o=>o.colorClass))}),this.requirementTargets.forEach((r,s)=>{a6[s].regex.test(e)?(r.classList.add("text-green-500","is-through"),r.classList.remove("text-gray-500")):(r.classList.add("text-gray-500"),r.classList.remove("text-green-500","is-through"))})}}$(FE,"targets",["password","strengthIndicator","step","requirement"]);const l6=Object.freeze(Object.defineProperty({__proto__:null,default:FE},Symbol.toStringTag,{value:"Module"}));class u6 extends U{connect(){const e=this.element.dataset.goBack;setTimeout(function(){Turbo.visit(e)},4e3)}}const c6=Object.freeze(Object.defineProperty({__proto__:null,default:u6},Symbol.toStringTag,{value:"Module"}));class tf extends U{connect(){this.checkoutProviderValue!=="paypal"||!this.hasPaypalSectionTarget||(this.paypalInitialized=!1,this.paypalLoading=!1,(this.autoLoadPaypalValue||this.paypalSectionTarget.open)&&this.ensurePayPalReady())}togglePayPal(e){e.currentTarget.open&&(this.track("paypal_expanded"),this.ensurePayPalReady())}ensurePayPalReady(){this.paypalInitialized||this.paypalLoading||(this.paypalLoading=!0,this.setPayPalStatus(!0),this.loadPayPalScript().then(()=>this.initializePayPal()).then(()=>{this.paypalInitialized=!0}).catch(e=>{this.showError(e.message||"PayPal checkout is temporarily unavailable")}).finally(()=>{this.paypalLoading=!1,this.setPayPalStatus(!1)}))}setPayPalStatus(e){this.hasPaypalStatusTarget&&(this.paypalStatusTarget.classList.toggle("hidden",!e),this.paypalStatusTarget.classList.toggle("flex",e))}showLoading(e="Processing your payment..."){this.loadingOverlayTarget.classList.remove("hidden");const t=this.loadingOverlayTarget.querySelector("p:first-of-type");t&&(t.textContent=e)}hideLoading(){this.loadingOverlayTarget.classList.add("hidden")}loadPayPalScript(){return new Promise((e,t)=>
434{if(!this.paypalClientIdValue){t(new Error("PayPal checkout is not configured"));return}if(typeof paypal<"u"){e();return}const n=this.paymentTypeValue==="subscription",r=document.createElement("script"),s=new URLSearchParams({"client-id":this.paypalClientIdValue,currency:"USD",components:"buttons","enable-funding":"card",intent:n?"subscription":"capture",vault:n?"true":"false",commit:"true"});r.src=`https://www.paypal.com/sdk/js?${s.toString()}`,r.addEventListener("load",e),r.addEventListener("error",()=>t(new Error("Unable to load PayPal checkout"))),document.head.appendChild(r)})}initializePayPal(){return typeof paypal>"u"?(this.showError("PayPal checkout is temporarily unavailable"),Promise.reject(new Error("PayPal checkout is temporarily unavailable"))):this.paymentTypeValue==="subscription"?this.initializePayPalSubscription():this.initializePayPalInstant()}initializePayPalSubscription(){return paypal.Buttons({createSubscription:()=>(this.showLoading("Creating PayPal subscription..."),ye("/subscriptions/paypal/create",{method:"POST",headers:this.requestHeaders()}).then(e=>this.parseResponse(e,"Failed to create subscription")).then(e=>{if(!e.subscriptionID)throw new Error("No subscription ID received");return e.subscriptionID}).catch(e=>{throw this.hideLoading(),e})),onApprove:e=>(this.showLoading("Finalizing your subscription..."),fetch(`/subscriptions/paypal/approve?subscription_id=${encodeURIComponent(e.subscriptionID)}`,{method:"POST",headers:this.requestHeaders()}).then(t=>this.parseResponse(t,"Subscription approval failed")).then(()=>{window.location.href=this.successUrlValue}).catch(t=>{throw this.hideLoading(),t})),onCancel:e=>this.handleCancel(e),onError:e=>this.handleError(e),onClick:()=>this.showLoading("Connecting to PayPal...")}).render("#paypal-button-container")}initializePayPalInstant(){return paypal.Buttons({createOrder:()=>(this.showLoading("Creating PayPal order..."),ye("/payments/paypal/create",{method:"POST",headers:this.requestHeaders()}).then(e=>this.parseResponse(e,"Failed to create order")).then(e=>{if(!e.id)throw new Error("No order ID received");return e.id}).catch(e=>{throw this.hideLoading(),e})),onApprove:e=>{if(!e.orderID){const t=new Error("No order ID available for capture");return this.handleError(t),Promise.reject(t)}
434return this.showLoading("Processing your payment..."),fetch(`/payments/paypal/${encodeURIComponent(e.orderID)}/capture`,{method:"POST",headers:this.requestHeaders()}).then(t=>this.parseResponse(t,"Capture failed")).then(()=>{window.location.href=this.successUrlValue}).catch(t=>{throw this.hideLoading(),t})},onCancel:e=>this.handleCancel(e),onError:e=>this.handleError(e),onClick:()=>this.showLoading("Connecting to PayPal...")}).render("#paypal-button-container")}requestHeaders(){return{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content}}parseResponse(e,t){return e.json().then(n=>{if(!e.ok)throw new Error(n.error||n.message||t);return n})}handleCancel(e){var n;this.hideLoading();const t=((n=e==null?void 0:e.details)==null?void 0:n.reason)==="PAYER_ACTION_REQUIRED_TIMEOUT";return this.showError(t?"Payment session expired - please try again":"Payment was cancelled - you can try again"),this.track("paypal_cancelled"),this.releasePayPalSubscriptionAttempt()}handleError(e){this.hideLoading();const t=(e==null?void 0:e.message)||"PayPal payment failed";this.showError(t),this.track("paypal_error",{message:t})}releasePayPalSubscriptionAttempt(){var t;if(this.paymentTypeValue!=="subscription")return Promise.resolve();const e=(t=document.querySelector("[name='csrf-token']"))==null?void 0:t.content;return e?fetch("/subscriptions/paypal/cancel",{method:"POST",credentials:"same-origin",keepalive:!0,headers:{Accept:"application/json","Content-Type":"application/json","X-CSRF-Token":e}}).then(n=>{n.ok||console.warn(`Unable to close the PayPal checkout attempt: HTTP ${n.status}`)}).catch(n=>{console.warn("Unable to close the PayPal checkout attempt:",n)}):(console.warn("Unable to close the PayPal checkout attempt: CSRF token is missing"),Promise.resolve())}track(e,t={}){try{window.dataLayer&&typeof window.dataLayer.push=="function"&&window.dataLayer.push({event:e,source:"checkout",...t})}catch{}try{typeof window.gtag=="function"&&window.gtag("event",e,{source:"checkout",...t})}catch{}}showError(e){this.hideLoading();const t=document.getElementById("paypal-errors");t&&(t.innerHTML=` 435 <div class="bg-red-50 border-l-4 border-red-400 p-4"> 436 <p class="text-sm text-red-700"></p> 437 </div> 438 `,t.querySelector("p").textContent=e,t.style.display="block")}}$(tf,"values",{paypalClientId:String,checkoutProvider:String,autoLoadPaypal:Boolean,paymentType:String,successUrl:String}),$(tf,"targets",["paypalSection","paypalStatus","loadingOverlay"]);const d6=Object.freeze(Object.defineProperty({__proto__:null,default:tf},Symbol.toStringTag,{value:"Module"}));class nf extends U{async connect(){this.buttonTarget.disabled=!0;try{await this.loadPaddle(),this.initializePaddle(),this.buttonTarget.disabled=!1}catch(e){this.showError(e.message||"Paddle checkout is temporarily unavailable")}}async open(e){if(e.preventDefault(),this.errorTarget.textContent="",!window.Paddle||!this.priceIdValue){this.showError("Paddle checkout is not ready yet");return}const t={items:[{priceId:this.priceIdValue,quantity:1}],customer:{email:this.emailValue},customData:{checkout_context:this.checkoutContextValue},settings:{displayMode:"overlay",theme:"light",allowLogout:!1,successUrl:this.successUrlValue}};this.countryValue&&(t.customer.address={countryCode:this.countryValue}),window.Paddle.Checkout.open(t)}loadPaddle(){return window.Paddle?Promise.resolve():(window.aeroPaddleLoading||(window.aeroPaddleLoading=new Promise((e,t)=>{const n=document.createElement("script");n.src="https://cdn.paddle.com/paddle/v2/paddle.js",n.addEventListener("load",e),n.addEventListener("error",()=>t(new Error("Unable to load Paddle checkout"))),document.head.appendChild(n)})),window.aeroPaddleLoading)}initializePaddle(){window.aeroPaddleInitialized||(this.environmentValue==="sandbox"&&window.Paddle.Environment.set("sandbox"),window.Paddle.Initialize({token:this.clientTokenValue}),window.aeroPaddleInitialized=!0)}showError(e){this.errorTarget.textContent=e,this.buttonTarget.disabled=!1}}$(nf,"values",{clientToken:String,environment:String,priceId:String,checkoutContext:String,email:String,country:String,successUrl:String}),$(nf,"targets",["button","error"]);const h6=Object.freeze(Object.defineProperty({__proto__:null,default:nf},Symbol.toStringTag,{value:"Module"})),f6=2e3,p6=60;class zE extends U{connect(){this.subscriptionId=null,this.verificationInProgress=!1}start(e){e.preventDefault(),this.clearError(),this.hideRecovery(),this.setBusy(!0,"Creating your secure checkout..."),this.loadCheckoutScript().then(()=>ye("/subscriptions/razorpay/create",{method:"POST",headers:this.requestHeaders()})).then(t=>this.parseResponse(t,"Unable to create Razorpay checkout")).then(t=>{this.subscriptionId=t.subscription_id,this.setBusy(!1),this.openCheckout(t)}).catch(t=>this.handleError(t))}loadCheckoutScript(){return new Promise((e,t)=>
438{if(window.Razorpay){e();return}const n=document.querySelector("script[data-razorpay-checkout]");if(n){n.addEventListener("load",e,{once:!0}),n.addEventListener("error",()=>t(new Error("Unable to load Razorpay checkout")),{once:!0});return}const r=document.createElement("script");r.src="https://checkout.razorpay.com/v1/checkout.js",r.dataset.razorpayCheckout="true",r.addEventListener("load",e,{once:!0}),r.addEventListener("error",()=>t(new Error("Unable to load Razorpay checkout")),{once:!0}),document.head.appendChild(r)})}openCheckout(e){if(!window.Razorpay||!e.key_id||!e.subscription_id){this.handleError(new Error("Razorpay checkout is temporarily unavailable"));return}const t=new window.Razorpay({key:e.key_id,subscription_id:e.subscription_id,name:"AeroLeads",description:"AeroLeads monthly subscription",image:"/assets/logo.png",theme:{color:"#1558d6"},retry:{enabled:!0},modal:{ondismiss:()=>this.handleCancellation()},handler:n=>this.verifyPayment(n)});t.on("payment.failed",n=>this.reportFailure(n==null?void 0:n.error)),t.open(),this.track("razorpay_opened"),this.track("checkout_opened"),this.reportEvent("/subscriptions/razorpay/opened")}verifyPayment(e){return this.verificationInProgress=!0,this.clearError(),this.hideRecovery(),this.setBusy(!0,"Verifying your payment..."),this.track("payment_attempted"),this.submitVerification(e,0).then(t=>{this.track("razorpay_approved"),this.track("payment_succeeded"),this.track("subscription_activated"),window.location.assign(t.redirect_url)}).catch(t=>{if(this.verificationInProgress=!1,t!=null&&t.verificationPending){this.setBusy(!1),this.hasButtonTarget&&(this.buttonTarget.disabled=!0),this.showError(t.message),this.hideRecovery();return}this.handleError(t)})}submitVerification(e,t){return fetch("/subscriptions/razorpay/verify",{method:"POST",headers:this.requestHeaders(),body:JSON.stringify(e)}).then(async n=>{const r=await n.json();if(n.status===503&&r.status==="pending"){if(t>=p6){const s=new Error("Your payment is still being confirmed. Do not retry the payment. Please refresh this page in a minute.");throw s.verificationPending=!0,s}return this.setBusy(!0,"Payment received. Waiting for final confirmation..."),await this.delay(f6),this.submitVerification(e,t+1)}if(!n.ok)throw new Error(r.error||"Razorpay payment could not be verified");return r})}delay(e){return new Promise(t=>window.setTimeout(t,e))}reportFailure(e={}){var n,r;this.verificationInProgress=!1,this.setBusy(!1);const t=this.failureCategory(e);this.showError(this.failureMessage(t)),this.showRecovery(),this.track("razorpay_error",{code:e.code||"unknown",failure_category:t}),this.track("payment_attempted"),this.track("payment_failed",{code:e.code||"unknown",failure_category:t}),this.reportEvent("/subscriptions/razorpay/failure",{razorpay_payment_id:(n=e.metadata)==null?void 0:n.payment_id,payment_method:e.method||((r=e.metadata)==null?void 0:r.method),code:e.code,reason:e.reason,step:e.step,source:e.source})}retryWithAnotherCard(e){this.track("checkout_recovery_selected",{payment_method:"razorpay_card"}),this.start(e)}choosePaypal(){this.track("checkout_recovery_selected",{payment_method:"paypal"})}handleCancellation(){this.verificationInProgress||(this.setBusy(!1),this.hasVisibleError()||this.showError("Checkout was closed. No payment was made. You can retry or use PayPal instead."),this.showRecovery(),this.track("razorpay_cancelled"),this.track("checkout_dismissed"),this.reportEvent("/subscriptions/razorpay/cancel"))}handleError(e){this.setBusy(!1),this.showError((e==null?void 0:e.message)||"Razorpay checkout is temporarily unavailable"),this.showRecovery(),this.track("razorpay_error")}reportEvent(e,t={}){return this.subscriptionId?ye(e,{method:"POST",headers:this.requestHeaders(),body:JSON.stringify({razorpay_subscription_id:this.subscriptionId,...t})}).catch(()=>{}):Promise.resolve()}setBusy(e,t="Processing your payment..."){if(this.hasButtonTarget&&(this.buttonTarget.disabled=e),!this.hasLoadingOverlayTarget)return;this.loadingOverlayTarget.classList.toggle("hidden",!e),this.loadingOverlayTarget.classList.toggle("flex",e);const n=this.loadingOverlayTarget.querySelector("p:first-of-type");n&&(n.textContent=t)}requestHeaders(){return{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content}}parseResponse(e,t){return e.json().then(n=>{var r;if(!e.ok){const s=typeof n.error=="object"?(r=n.error)==null?void 0:r.message:n.error;throw new Error(s||t)}return n})}failureCategory(e={}){const t=String(e.reason||"").toLowerCase(),n=String(e.step||"").toLowerCase();return t==="card_not_enrolled"||t.includes("3dsecure")||n==="card_enrollment_check"?"card_enrollment":t.includes("currency")||t==="currency_not_supported"?"currency":t.includes("technical")||e.source==="bank"?"bank":"other"}failureMessage(e){return e==="card_enrollment"?"This card could not be enrolled for recurring payments. Try another card that supports recurring online payments, or use PayPal instead.":e==="currency"?"This card could not be charged in the selected currency. Try another card, use the INR option for an Indian-issued card, or use PayPal instead.":"Payment failed. Please try another card or use PayPal instead."}clearError(){this.hasErrorTarget&&(this.errorTarget.textContent="",this.errorTarget.classList.add("hidden"))}hasVisibleError(){return this.hasErrorTarget&&!this.errorTarget.classList.contains("hidden")}showError(e){this.hasErrorTarget&&(this.errorTarget.textContent=e,this.errorTarget.classList.remove("hidden"))}showRecovery(){this.hasRecoveryTarget&&this.recoveryTarget.classList.remove("hidden")}hideRecovery(){this.hasRecoveryTarget&&this.recoveryTarget.classList.add("hidden")}track(e,t={}){try{window.dataLayer&&typeof window.dataLayer.push=="function"&&window.dataLayer.push({event:e,source:"razorpay_checkout",...t})}catch{}try{typeof window.gtag=="function"&&window.gtag("event",e,{source:"razorpay_checkout",...t})}catch{}}}
438$(zE,"targets",["button","error","loadingOverlay","recovery"]);const m6=Object.freeze(Object.defineProperty({__proto__:null,default:zE},Symbol.toStringTag,{value:"Module"}));class rf extends U{connect(){this.remainingSeconds=4,this.startCountdown()}startCountdown(){this.updateTimer(),this.interval=setInterval(()=>{this.remainingSeconds-=1,this.remainingSeconds<=0?(this.stopCountdown(),Turbo.visit("/searches/profiles")):this.updateTimer()},1e3)}stopCountdown(){this.alertTarget.innerHTML="Redirecting to search dashboard...",clearInterval(this.interval)}updateTimer(){this.timerTarget.textContent=this.remainingSeconds}}$(rf,"targets",["timer","alert"]),$(rf,"values",{duration:Number});const g6=Object.freeze(Object.defineProperty({__proto__:null,default:rf},Symbol.toStringTag,{value:"Module"}));class VE extends U{connect(){console.log("Phone format connected")}phoneTargetConnected(e){const t=e.textContent,n=jC(t);n&&(e.textContent=n.formatInternational())}}$(VE,"targets",["phone"]);const b6=Object.freeze(Object.defineProperty({__proto__:null,default:VE},Symbol.toStringTag,{value:"Module"}));class sf extends U{connect(){!this.hasModalTarget||!this.storageKeyValue||this.isDismissed()||(this._recommendedClosedHandler=()=>this.showSoon(),document.addEventListener("application:recommended-closed",this._recommendedClosedHandler),this.showSoon())}disconnect(){this._recommendedClosedHandler&&document.removeEventListener("application:recommended-closed",this._recommendedClosedHandler)}showSoon(){this._showScheduled||(this._showScheduled=!0,setTimeout(()=>{if(this.isDismissed())return;const e=document.getElementById("recommended-modal");if(e&&!e.classList.contains("hidden")){this._showScheduled=!1;return}this.modalInstance().show()},900))}dismiss(){this.setDismissed(),this.modalInstance().hide()}async save(){var n;this.clearError();const e=(((n=this.inputTarget)==null?void 0:n.value)||"").trim();if(!e){this.showError("Please enter a phone number or click Not now.");return}const t=this.normalizeIndianInput(e);if(!t){this.showError("Please enter a valid phone number.");return}try{const r=await fetch(this.endpointValue,{method:"PATCH",headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-Token":this.csrfToken()},body:JSON.stringify({phone:t}),credentials:"same-origin"}),s=await r.json().catch(()=>({}));if(!r.ok||s.ok!==!0){this.showError(s.error||"Could not save phone. Please try again.");return}this.setDismissed(),this.modalInstance().hide()}catch{this.showError("Network error. Please try again.")}}modalInstance(){return this._modal?this._modal:(this._modal=new jr(this.modalTarget,{placement:"center",backdrop:"dynamic",closable:!0},{override:!0}),this._modal)}csrfToken(){var e;return(e=document.querySelector('meta[name="csrf-token"]'))==null?void 0:e.content}isDismissed(){try{return localStorage.getItem(this.storageKeyValue)==="1"}catch{return!1}}setDismissed(){try{localStorage.setItem(this.storageKeyValue,"1")}catch{}}normalizeIndianInput(e){const t=e.replace(/[^\d]/g,"");return t.length<8||t.length>16?null:e.trim().startsWith("+")?`+${t}`:t}showError(e){this.hasErrorTarget&&(this.errorTarget.textContent=e,this.errorTarget.classList.remove("hidden"))}clearError(){this.hasErrorTarget&&(this.errorTarget.textContent="",this.errorTarget.classList.add("hidden"))}}$(sf,"targets",["modal","input","error"]),$(sf,"values",{endpoint:String,storageKey:String});const y6=Object.freeze(Object.defineProperty({__proto__:null,default:sf},Symbol.toStringTag,{value:"Module"}));class HE extends U{connect(){this.hideOverlayLoading()}disconnect(){this.hideOverlayLoading()}monthlyTargetConnected(e){e.addEventListener("change",this.onPlanSelected.bind(this))}monthlyTargetDisconnected(e){e.removeEventListener("change",this.onPlanSelected.bind(this))}onPlanSelected(e){this.hasSelectedPlanTarget&&e.target.checked&&(this.selectedPlanTarget.value=e.target.value)}showLoading(){const e=document.getElementById("skeleton"),t=document.getElementById("bottom-banner");t&&t.classList.add("is-loading"),e&&(e.classList.add("animate-pulse"),e.innerHTML=`<div class="flex-1 flex items-center gap-4 divide-x divide-gray-200"></div> 439 <div class="ps-4"> 440 <button disabled type="button" class="inline-flex items-center text-white bg-yellow-400 hover:bg-yellow-500 focus:outline-none focus:ring-4 focus:ring-yellow-300 font-medium rounded-full text-sm px-5 py-2.5 text-center me-2 mb-2 dark:focus:ring-yellow-900"> 441 <svg aria-hidden="true" role="status" class="inline w-4 h-4 me-3 text-white animate-spin" viewB
441ox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"> 442 <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="#E5E7EB"/> 443 <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentColor"/> 444 </svg> 445 Loading... 446 </button> 447 </div>`)}onSubmitLoading(){this.showOverlayLoading()}showOverlayLoading(e="Processing your payment..."){this.loadingOverlayTarget.classList.remove("hidden");const t=this.loadingOverlayTarget.querySelector("p:first-of-type");t&&(t.textContent=e)}hideOverlayLoading(){this.loadingOverlayTarget.classList.add("hidden")}}$(HE,"targets",["monthly","selectedPlan","loadingOverlay"]);const v6=Object.freeze(Object.defineProperty({__proto__:null,default:HE},Symbol.toStringTag,{value:"Module"}));class jE extends U{connect(){this.attempts=0,this.poll=this.poll.bind(this),this.schedule(this.intervalValue)}disconnect(){this.clearTimer()}schedule(e){this.clearTimer(),!(!this.hasUrlValue||this.attempts>=this.maxAttemptsValue)&&(this.timer=window.setTimeout(this.poll,e))}clearTimer(){this.timer&&(window.clearTimeout(this.timer),this.timer=null)}async poll(){this.attempts+=1;try{const e=await fetch(this.urlValue,{credentials:"same-origin",headers:{Accept:"text/html","X-Requested-With":"XMLHttpRequest"}});if(!e.ok){this.schedule(this.intervalValue);return}const t=await e.text(),n=document.createElement("template");n.innerHTML=t.trim();const r=n.content.firstElementChild;r&&r.id===this.element.id?this.shouldContinuePolling(r)?(this.syncElement(r),this.schedule(this.intervalValue)):this.element.replaceWith(r):this.schedule(this.intervalValue)}catch{this.schedule(this.intervalValue)}}shouldContinuePolling(e){var t;return(t=e.dataset.controller)==null?void 0:t.split(/\s+/).includes(this.identifier)}syncElement(e){Array.from(this.element.attributes).forEach(t=>{t.name!=="id"&&this.element.removeAttribute(t.name)}),Array.from(e.attributes).forEach(t=>{t.name!=="id"&&this.element.setAttribute(t.name,t.value)}),this.element.innerHTML=e.innerHTML}}$(jE,"values",{interval:{type:Number,default:5e3},maxAttempts:{type:Number,default:36},url:String});const w6=Object.freeze(Object.defineProperty({__proto__:null,default:jE},Symbol.toStringTag,{value:"Module"}));Ec({focusOnError:!0});class $E extends sa{initialize(){this.index=0,this.showCurrentStep(),this.emailIsTaken=this.emailIsTaken.bind(this),this.next=this.next.bind(this),this.create=this.create.bind(this),this.triggerIsTaken=!1,Yh("emailIsTaken",this.emailIsTaken);const e=this;document.addEventListener("keyup",function(t){t.key==="Enter"&&(e.index==0?e.nextTarget.dispatchEvent(new Event("click")):e.submitTarget.dispatchEvent(new Event("click")))})}next(){const e=this;this.triggerIsTaken=!0;const t=e._form.elements.find(n=>n.raw==e.emailTarget);e.continueTargets[1].setAttribute("hidden",!0),e.continueTargets[0].removeAttribute("hidden"),t.validate().then(function(){document.querySelectorAll(".error-message").forEach(n=>n.remove()),e.index++,e.showCurrentStep(),rl("signup_step_continue",{step:1,source:"signup_form"})}).catch(function(n){e.continueTargets[0].setAttribute("hidden",!0),e.continueTargets[1].removeAttribute("hidden"),e.triggerIsTaken=!1,e._displayFormErrors()})}create(){const e=this;this.loaderTarget.classList.remove("hidden"),this._form.validate().then(function(){e.loadTargets[1].setAttribute("hidden",!0),e.loadTargets[0].removeAttribute("hidden"),rl("signup_submit_attempt",{step:2,source:"signup_form"}),e.formTarget.submit()}).catch(function(t){const n=e._form.elementsWithError[0];n&&(n.raw.focus(),e._displayFormErrors()),this.loaderTarget.classList.add("hidden")})}
447showCurrentStep(){this.stepperTargets.forEach((e,t)=>{e.hidden=t!==this.index})}emailIsTaken(e){const t=this,{value:n}=e;return t.triggerIsTaken?n.trim()===""?new Promise(async(r,s)=>{t.alertTarget.setAttribute("hidden",!0),t.invalidTarget.setAttribute("hidden",!0),t.validTarget.setAttribute("hidden",!0),s("can't be blank")}):sh.isEmail(n)?new Promise(async(r,s)=>{const{fetchWithWafCaptcha:o}=await Lt(async()=>{const{fetchWithWafCaptcha:a}=await import("./stimulus-Beq9IL9f.js").then(u=>u.b);return{fetchWithWafCaptcha:a}},[]),l=await o(`/users/checks/?email=${encodeURIComponent(n)}`);l.status==200?(t.alertTarget.setAttribute("hidden",!0),t.invalidTarget.setAttribute("hidden",!0),t.validTarget.removeAttribute("hidden"),r()):l.status==422?(t.validTarget.setAttribute("hidden",!0),t.invalidTarget.removeAttribute("hidden"),t.alertTarget.removeAttribute("hidden"),s("")):(t.alertTarget.setAttribute("hidden",!0),t.validTarget.setAttribute("hidden",!0),t.invalidTarget.removeAttribute("hidden"),s("Email is taken"))}):new Promise(async(r,s)=>{t.alertTarget.setAttribute("hidden",!0),t.invalidTarget.setAttribute("hidden",!0),t.validTarget.setAttribute("hidden",!0),s("Not a valid email")}):new Promise(async(r,s)=>{r()})}googleAuth(){rl("signup_social_google_click",{source:"signup_form"}),document.getElementById("googleAuth").submit()}}$($E,"targets",["stepper","valid","invalid","load","continue","submit","alert","email","check","form","next","loader"]);const x6=Object.freeze(Object.defineProperty({__proto__:null,default:$E},Symbol.toStringTag,{value:"Module"}));class of extends U{connect(){this.calculate()}calculate(){const e=parseInt(this.sliderTarget.value)||2e3;this.leadsDisplayTarget.textContent=e.toLocaleString();const t=this.competitorTarget.selectedOptions[0],n=parseFloat(t.dataset.costPerLead)||.3,r=t.textContent.split(" (")[0].trim(),s=Math.round(e*n),o=this.bestPlan(e),l=o.price,a=s-l,u=s>0?Math.round(a/s*100):0;this.competitorLabelTarget.textContent=r,this.competitorCostTarget.textContent=`$${s.toLocaleString()}`,this.aeroleadsCostTarget.textContent=`$${l.toLocaleString()}`,a>0?(this.savingsTarget.textContent=`$${a.toLocaleString()}/mo`,this.savingsPercentTarget.textContent=`${u}% less`,this.annualSavingsTarget.innerHTML=`That's <strong class="text-green-700">$${(a*12).toLocaleString()}</strong> saved per year with the <strong>${o.name}</strong> plan.`):(this.savingsTarget.textContent="$0/mo",this.savingsPercentTarget.textContent="â",this.annualSavingsTarget.innerHTML="AeroLeads is already competitively priced.")}bestPlan(e){const t=this.constructor.plans;for(let n=t.length-1;n>=0;n--)if(!(e<=t[n].credits))return n<t.length-1?t[n+1]:t[n];return t.find(n=>n.credits>=e)||t[t.length-1]}}$(of,"targets",["slider","leadsDisplay","competitor","competitorLabel","competitorCost","aeroleadsCost","savings","savingsPercent","annualSavings"]),$(of,"plans",[{name:"Free",price:0,credits:10},{name:"Take Off",price:49,credits:2e3},{name:"Climb",price:149,credits:8e3},{name:"Cruise",price:299,credits:2e4}]);const E6=Object.freeze(Object.defineProperty({__proto__:null,default:of},Symbol.toStringTag,{value:"Module"}));class qE extends Ii{toggle(e){super.toggle(e),this.updateCounter(),this.updateInputHidden()}refresh(){super.refresh(),this.updateCounter(),this.updateInputHidden()}updateInputHidden(){this.hasFormTarget&&(this.checked.length>0?this.checked.forEach(e=>this.handleCheckboxChange(e)):this.formTarget.querySelectorAll(".selected_ids").forEach(e=>e.remove()))}updateCounter(){this.hasCounterTarget&&(this.checked.length>0?(this.counterTarget.dataset.prevHTML=this.counterTarget.innerHTML,this.counterTarget.innerHTML=this.checked.length):this.counterTarget.dataset.prevHTML&&(this.counterTarget.innerHTML=this.counterTarget.dataset.prevHTML))}handleCheckboxChange(e){const t=this.formTarget;if(e.checked){const n=document.createElement("input");n.type="hidden",n.name=e.name,n.value=e.value,n.id=e.value+"_hidden",n.classList.add("selected_ids"),t.appendChild(n)}else{const n=document.getElementById(e.value+"_hidden");n&&t.removeChild(n)}}}$(qE,"targets",["form","counter"]);const T6=Object.freeze(Object.defineProperty({__proto__:null,default:qE},Symbol.toStringTag,{value:"Module"}));class S6 extends U{connect(){console.log("ShowMore connected"),new Qu(this.element,{onMoreLess:(e,t)=>{}})}}const C6=Object.freeze(Object.defineProperty({__proto__:null,default:S6},Symbol.toStringTag,{value:"Module"}));var k6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_6=window.device,W={},af=[];window.device=W;var Po=window.document.documentElement,A6=window.navigator.userAgent.toLowerCase(),cb=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","pov_tv","hbbtv","ce-html"];W.macos=function(){return Ve("mac")};W.ios=function(){return W.iphone()||W.ipod()||W.ipad()};W.iphone=function(){return!W.windows()&&Ve("iphone")};W.ipod=function(){return Ve("ipod")};W.ipad=function(){var i=navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1;return Ve("ipad")||i};W.android=function(){return!W.windows()&&Ve("android")};W.androidPhone=function(){return W.android()&&Ve("mobile")};W.androidTablet=function(){return W.android()&&!Ve("mobile")};W.blackberry=function(){return Ve("blackberry")||Ve("bb10")};W.blackberryPhone=function(){return W.blackberry()&&!Ve("tablet")};W.blackberryTablet=function(){return W.blackberry()&&Ve("tablet")};W.windows=function(){return Ve("windows")};W.windowsPhone=function(){return W.windows()&&Ve("phone")};W.windowsTablet=function(){return W.windows()&&Ve("touch")&&!W.windowsPhone()};W.fxos=function(){return(Ve("(mobile")||Ve("(tablet"))&&Ve(" rv:")};W.fxosPhone=function(){return W.fxos()&&Ve("mobile")};W.fxosTablet=function(){return W.fxos()&&Ve("tablet")};W.meego=function(){return Ve("meego")};W.cordova=function(){return window.cordova&&location.protocol==="file:"};W.nodeWebkit=function(){return k6(window.process)==="object"};W.mobile=function(){return W.androidPhone()||W.iphone()||W.ipod()||W.windowsPhone()||W.blackberryPhone()||W.fxosPhone()||W.meego()};W.tablet=function(){return W.ipad()||W.androidTablet()||W.blackberryTablet()||W.windowsTablet()||W.fxosTablet()};W.desktop=function(){return!W.tablet()&&!W.mobile()};W.television=function(){for(var i=0;i<cb.length;){if(Ve(cb[i]))return!0;
447i++}return!1};W.portrait=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?_m(screen.orientation.type,"portrait"):W.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?Math.abs(window.orientation)!==90:window.innerHeight/window.innerWidth>1};W.landscape=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?_m(screen.orientation.type,"landscape"):W.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?Math.abs(window.orientation)===90:window.innerHeight/window.innerWidth<1};W.noConflict=function(){return window.device=_6,this};function _m(i,e){return i.indexOf(e)!==-1}function Ve(i){return _m(A6,i)}function UE(i){return Po.className.match(new RegExp(i,"i"))}function He(i){var e=null;UE(i)||(e=Po.className.replace(/^\s+|\s+$/g,""),Po.className=e+" "+i)}function db(i){UE(i)&&(Po.className=Po.className.replace(" "+i,""))}W.ios()?W.ipad()?He("ios ipad tablet"):W.iphone()?He("ios iphone mobile"):W.ipod()&&He("ios ipod mobile"):W.macos()?He("macos desktop"):W.android()?W.androidTablet()?He("android tablet"):He("android mobile"):W.blackberry()?W.blackberryTablet()?He("blackberry tablet"):He("blackberry mobile"):W.windows()?W.windowsTablet()?He("windows tablet"):W.windowsPhone()?He("windows mobile"):He("windows desktop"):W.fxos()?W.fxosTablet()?He("fxos tablet"):He("fxos mobile"):W.meego()?He("meego mobile"):W.nodeWebkit()?He("node-webkit"):W.television()?He("television"):W.desktop()&&He("desktop");W.cordova()&&He("cordova");function hl(){W.landscape()?(db("portrait"),He("landscape"),hb("landscape")):(db("landscape"),He("portrait"),hb("portrait")),WE()}function hb(i){for(var e=0;e<af.length;e++)af[e](i)}W.onChangeOrientation=function(i){typeof i=="function"&&af.push(i)};var fl="resize";Object.prototype.hasOwnProperty.call(window,"onorientationchange")&&(fl="orientationchange");window.addEventListener?window.addEventListener(fl,hl,!1):window.attachEvent?window.attachEvent(fl,hl):window[fl]=hl;hl();function Am(i){for(var e=0;e<i.length;e++)if(W[i[e]]())return i[e];return"unknown"}W.type=Am(["mobile","tablet","desktop"]);W.os=Am(["ios","iphone","ipad","ipod","android","blackberry","macos","windows","fxos","meego","television"]);function WE(){W.orientation=Am(["portrait","landscape"])}WE();class GE extends U{initialize(){this.body=document.body,this.toggle=this.toggle.bind(this),this.device=new av(window.navigator.userAgent),this.handleMobileTapInsideMain=this.handleMobileTapInsideMain.bind(this),this.setActiveLink=this.setActiveLink.bind(this)}connect(){W.mobile()&&localStorage.getItem("isSidebarCollapsed"),localStorage.getItem("isSidebarCollapsed")==="true"&&this.toggle(),document.addEventListener("mousedown",this.handleMobileTapInsideMain),this.setActiveLink();const e=document.getElementById("toggleSidebar");e&&e.addEventListener("click",this.toggle.bind(this))}disconnect(){const e=document.getElementById("toggleSidebar");e&&e.removeEventListener("click",this.toggle.bind(this))}toggle(){this.checkboxTarget.checked=!this.checkboxTarget.checked,toggleClass(document.body,"sidebar-collapsed"),localStorage.setItem("isSidebarCollapsed",this.checkboxTarget.checked?"true":"false")}handleMobileTapInsideMain(e){const t=document.querySelector("#main-content"),n=document.querySelector("#main-header"),r=(t==null?void 0:t.contains(e.target))&&!(n!=null&&n.contains(e.target));W.mobile()&&r&&this.toggle()}setActiveLink(){const e=window.location.pathname;this.linkTargets.forEach(t=>{const n=t.getAttribute("href");e===n||e.includes(n)?t.classList.add("bg-primary-50","text-primary-600","dark:bg-gray-700","dark:text-white"):t.classList.remove("bg-primary-50","text-primary-600","dark:bg-gray-700","dark:text-white")})}}$(GE,"targets",["button","aside","checkbox","link"]);const L6=Object.freeze(Object.defineProperty({__proto__:null,default:GE},Symbol.toStringTag,{value:"Module"}));function Qe(i){this.content=i}Qe.prototype={constructor:Qe,find:function(i){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===i)return e;return-1},get:function(i){var e=this.find(i);return e==-1?void 0:this.content[e+1]},update:function(i,e,t){var n=t&&t!=i?this.remove(t):this,r=n.find(i),s=n.content.slice();return r==-1?s.push(t||i,e):(s[r+1]=e,t&&(s[r]=t)),new Qe(s)},remove:function(i){var e=this.find(i);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Qe(t)},addToStart:function(i,e){return new Qe([i,e].concat(this.remove(i).c
vendor: 9,714 bytes, line 447
447ontent))},addToEnd:function(i,e){var t=this.remove(i).content.slice();return t.push(i,e),new Qe(t)},addBefore:function(i,e,t){var n=this.remove(e),r=n.content.slice(),s=n.find(i);return r.splice(s==-1?r.length:s,0,e,t),new Qe(r)},forEach:function(i){for(var e=0;e<this.content.length;e+=2)i(this.content[e],this.content[e+1])},prepend:function(i){return i=Qe.from(i),i.size?new Qe(i.content.concat(this.subtract(i).content)):this},append:function(i){return i=Qe.from(i),i.size?new Qe(this.subtract(i).content.concat(i.content)):this},subtract:function(i){var e=this;i=Qe.from(i);for(var t=0;t<i.content.length;t+=2)e=e.remove(i.content[t]);return e},toObject:function(){var i={};return this.forEach(function(e,t){i[e]=t}),i},get size(){return this.content.length>>1}};Qe.from=function(i){if(i instanceof Qe)return i;var e=[];if(i)for(var t in i)e.push(t,i[t]);return new Qe(e)};function KE(i,e,t){for(let n=0;;n++){if(n==i.childCount||n==e.childCount)return i.childCount==e.childCount?null:t;let r=i.child(n),s=e.child(n);if(r==s){t+=r.nodeSize;continue}if(!r.sameMarkup(s))return t;if(r.isText&&r.text!=s.text){for(let o=0;r.text[o]==s.text[o];o++)t++;return t}if(r.content.size||s.content.size){let o=KE(r.content,s.content,t+1);if(o!=null)return o}t+=r.nodeSize}}function YE(i,e,t,n){for(let r=i.childCount,s=e.childCount;;){if(r==0||s==0)return r==s?null:{a:t,b:n};let o=i.child(--r),l=e.child(--s),a=o.nodeSize;if(o==l){t-=a,n-=a;continue}if(!o.sameMarkup(l))return{a:t,b:n};if(o.isText&&o.text!=l.text){let u=0,c=Math.min(o.text.length,l.text.length);for(;u<c&&o.text[o.text.length-u-1]==l.text[l.text.length-u-1];)u++,t--,n--;return{a:t,b:n}}if(o.content.size||l.content.size){let u=YE(o.content,l.content,t-1,n-1);if(u)return u}t-=a,n-=a}}class H{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,r=0,s){for(let o=0,l=0;l<t;o++){let a=this.content[o],u=l+a.nodeSize;if(u>e&&n(a,r+l,s||null,o)!==!1&&a.content.size){let c=l+1;a.nodesBetween(Math.max(0,e-c),Math.min(a.content.size,t-c),n,r+c)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let u=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?r?typeof r=="function"?r(l):r:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&u||l.isTextblock)&&n&&(o?o=!1:s+=n),s+=u},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),s=1);s<e.content.length;s++)r.push(e.content[s]);return new H(r,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let n=[],r=0;if(t>e)for(let s=0,o=0;o<t;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),n.push(l),r+=l.nodeSize),o=a}return new H(n,r)}cutByIndex(e,t){return e==t?H.empty:e==0&&t==this.content.length?this:new H(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),s=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new H(r,s)}addToStart(e){return new H([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new H(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return KE(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return YE(this,e,t,n)}findIndex(e,t=-1){if(e==0)return za(0,e);if(e==this.size)return za(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let s=this.child(n),o=r+s.nodeSize;if(o>=e)return o==e||t>0?za(n+1,o):za(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return H.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new H(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return H.empty;let t,n=0;for(let r=0;r<e.length;r++){let s=e[r];n+=s.nodeSize,r&&s.isText&&e[r-1].sameMarkup(s)?(t||(t=e.slice(0,r)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new H(t||e,n)}static from(e){if(!e)return H.empty;if(e instanceof H)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new H([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}H.empty=new H([],0);const _d={index:0,offset:0};function za(i,e){return _d.index=i,_d.offset=e,_d}function du(i,e){if(i===e)return!0;if(!(i&&typeof i=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(i);if(Array.isArray(e)!=t)return!1;if(t){if(i.length!=e.length)return!1;for(let n=0;n<i.length;n++)if(!du(i[n],e[n]))return!1}else{for(let n in i)if(!(n in e)||!du(i[n],e[n]))return!1;for(let n in e)if(!(n in i))return!1}return!0}let Se=class lf{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let s=e[r];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,r));else{if(s.type.excludes(this.type))return e;!n&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(s)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&du(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return lf.none;if(e instanceof lf)return[e];let t=e.slice();return t.sort((n,r)=>n.type.rank-r.type.rank),t}};Se.none=[];class hu extends Error{}class K{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=JE(this.content,e+this.openStart,t);return n&&new K(n,this.openStart,this.openEnd)}removeBetween(e,t){return new K(XE(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return K.empty;let n=t.openStart||0,r=t.openEnd||0;if(typeof n!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new K(H.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)n++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)r++;return new K(e,n,r)}}K.empty=new K(H.empty,0,0);function XE(i,e,t){let{index:n,offset:r}=i.findIndex(e),s=i.maybeChild(n),{index:o,offset:l}=i.findIndex(t);if(r==e||s.isText){if(l!=t&&!i.child(o).isText)throw new RangeError("Removing non-flat range");return i.cut(0,e).append(i.cut(t))}if(n!=o)throw new RangeError("Removing non-flat range");return i.replaceChild(n,s.copy(XE(s.content,e-r-1,t-r-1)))}function JE(i,e,t,n){let{index:r,offset:s}=i.findIndex(e),o=i.maybeChild(r);if(s==e||o.isText)return i.cut(0,e).append(t).append(i.cut(e));let l=JE(o.content,e-s-1,t);return l&&i.replaceChild(r,o.copy(l))}function M6(i,e,t){if(t.openStart>i.depth)throw new hu("Inserted content deeper than insertion position");if(i.depth-t.openStart!=e.depth-t.openEnd)throw new hu("Inconsistent open depths");return QE(i,e,t,0)}function QE(i,e,t,n){let r=i.index(n),s=i.node(n);if(r==e.index(n)&&n<i.depth-t.openStart){let o=QE(i,e,t,n+1);return s.copy(s.content.replaceChild(r,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&i.depth==n&&e.depth==n){let o=i.parent,l=o.content;return ir(o,l.cut(0,i.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=I6(t,i);return ir(s,eT(i,o,l,e,n))}else return ir(s,fu(i,e,n))}function ZE(i,e){if(!e.type.compatibleContent(i.type))throw new hu("Cannot join "+e.type.name+" onto "+i.type.name)}function uf(i,e,t){let n=i.node(t);return ZE(n,e.node(t)),n}function nr(i,e){let t=e.length-1;t>=0&&i.isText&&i.sameMarkup(e[t])?e[t]=i.withText(e[t].text+i.text):e.push(i)}function io(i,e,t,n){let r=(e||i).node(t),s=0,o=e?e.index(t):r.childCount;i&&(s=i.index(t),i.depth>
vendor: 9,178 bytes, line 447
447t?s++:i.textOffset&&(nr(i.nodeAfter,n),s++));for(let l=s;l<o;l++)nr(r.child(l),n);e&&e.depth==t&&e.textOffset&&nr(e.nodeBefore,n)}function ir(i,e){return i.type.checkContent(e),i.copy(e)}function eT(i,e,t,n,r){let s=i.depth>r&&uf(i,e,r+1),o=n.depth>r&&uf(t,n,r+1),l=[];return io(null,i,r,l),s&&o&&e.index(r)==t.index(r)?(ZE(s,o),nr(ir(s,eT(i,e,t,n,r+1)),l)):(s&&nr(ir(s,fu(i,e,r+1)),l),io(e,t,r,l),o&&nr(ir(o,fu(t,n,r+1)),l)),io(n,null,r,l),new H(l)}function fu(i,e,t){let n=[];if(io(null,i,t,n),i.depth>t){let r=uf(i,e,t+1);nr(ir(r,fu(i,e,t+1)),n)}return io(e,null,t,n),new H(n)}function I6(i,e){let t=e.depth-i.openStart,r=e.node(t).copy(i.content);for(let s=t-1;s>=0;s--)r=e.node(s).copy(H.from(r));return{start:r.resolveNoCache(i.openStart+t),end:r.resolveNoCache(r.content.size-i.openEnd-t)}}class Ro{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)r+=n.child(s).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Se.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let l=n;n=r,r=l}let s=n.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!r||!s[o].isInSet(r.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var s=0;s<n.length;s++)n[s].type.spec.inclusive===!1&&(!r||!n[s].isInSet(r.marks))&&(n=n[s--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new pu(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),u=s-a;if(n.push(o,l,r+a),!u||(o=o.child(l),o.isText))break;s=u-1,r+=a+1}return new Ro(t,n,s)}static resolveCached(e,t){let n=fb.get(e);if(n)for(let s=0;s<n.elts.length;s++){let o=n.elts[s];if(o.pos==t)return o}else fb.set(e,n=new O6);let r=n.elts[n.i]=Ro.resolve(e,t);return n.i=(n.i+1)%D6,r}}class O6{constructor(){this.elts=[],this.i=0}}const D6=12,fb=new WeakMap;class pu{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const P6=Object.create(null);let Si=class cf{constructor(e,t,n,r=Se.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||H.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&du(this.attrs,t||e.defaultAttrs||P6)&&Se.sameSet(this.marks,n||Se.none)}copy(e=null){return e==this.content?this:new cf(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new cf(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return K.empty;let r=this.resolve(e),s=this.resolve(t),o=n?0:r.sharedDepth(t),l=r.start(o),u=r.node(o).content.cut(r.pos-l,s.pos-l);return new K(u,r.depth-o,s.depth-o)}replace(e,t,n){return M6(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return Ro.resolveCached(this,e)}resolveNoCache(e){return Ro.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,s=>(n.isInSet(s.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),tT(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=H.empty,r=0,s=n.childCount){let o=this.contentMatchAt(e).matchFragment(n,r,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=r;a<s;a++)if(!this.type.allowsMarks(n.child(a).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let s=this.contentMatchAt(e).matchType(n),o=s&&s.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Se.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!Se.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=H.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,r,n);return s.type.checkAttrs(s.attrs),s}};Si.prototype.text=void 0;class mu extends Si{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):tT(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}
vendor: 176,758 bytes, lines 447-456
447mark(e){return e==this.marks?this:new mu(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new mu(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function tT(i,e){for(let t=i.length-1;t>=0;t--)e=i[t].type.name+"("+e+")";return e}class gr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new R6(e,t);if(n.next==null)return gr.empty;let r=nT(n);n.next&&n.err("Unexpected trailing text");let s=j6(H6(r));return $6(s,n),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let s=t;r&&s<n;s++)r=r.matchType(e.child(s).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function s(o,l){let a=o.matchFragment(e,n);if(a&&(!t||a.validEnd))return H.from(l.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:c,next:h}=o.next[u];if(!(c.isText||c.hasRequiredAttrs())&&r.indexOf(h)==-1){r.push(h);let d=s(h,l.concat(c));if(d)return d}}return null}return s(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),s=r.match;if(s.matchType(e)){let o=[];for(let l=r;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!r.type||a.validEnd)&&(n.push({match:l.contentMatch,type:l,via:r}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((n,r)=>{let s=r+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)s+=(o?", ":"")+n.next[o].type.name+"->"+e.indexOf(n.next[o].next);return s}).join(` 448`)}}gr.empty=new gr(!0);class R6{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function nT(i){let e=[];do e.push(N6(i));while(i.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function N6(i){let e=[];do e.push(B6(i));while(i.next&&i.next!=")"&&i.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function B6(i){let e=V6(i);for(;;)if(i.eat("+"))e={type:"plus",expr:e};else if(i.eat("*"))e={type:"star",expr:e};else if(i.eat("?"))e={type:"opt",expr:e};else if(i.eat("{"))e=F6(i,e);else break;return e}function pb(i){/\D/.test(i.next)&&i.err("Expected number, got '"+i.next+"'");let e=Number(i.next);return i.pos++,e}function F6(i,e){let t=pb(i),n=t;return i.eat(",")&&(i.next!="}"?n=pb(i):n=-1),i.eat("}")||i.err("Unclosed braced range"),{type:"range",min:t,max:n,expr:e}}function z6(i,e){let t=i.nodeTypes,n=t[e];if(n)return[n];let r=[];for(let s in t){let o=t[s];o.isInGroup(e)&&r.push(o)}return r.length==0&&i.err("No node type or group '"+e+"' found"),r}function V6(i){if(i.eat("(")){let e=nT(i);return i.eat(")")||i.err("Missing closing paren"),e}else if(/\W/.test(i.next))i.err("Unexpected token '"+i.next+"'");else{let e=z6(i,i.next).map(t=>(i.inline==null?i.inline=t.isInline:i.inline!=t.isInline&&i.err("Mixing inline and block content"),{type:"name",value:t}));return i.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function H6(i){let e=[[]];return r(s(i,0),t()),e;function t(){return e.push([])-1}function n(o,l,a){let u={term:a,to:l};return e[o].push(u),u}function r(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,u)=>a.concat(s(u,l)),[]);if(o.type=="seq")for(let a=0;;a++){let u=s(o.exprs[a],l);if(a==o.exprs.length-1)return u;r(u,l=t())}else if(o.type=="star"){let a=t();return n(l,a),r(s(o.expr,a),a),[n(a)]}else if(o.type=="plus"){let a=t();return r(s(o.expr,l),a),r(s(o.expr,a),a),[n(a)]}else{if(o.type=="opt")return[n(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let u=0;u<o.min;u++){let c=t();r(s(o.expr,a),c),a=c}if(o.max==-1)r(s(o.expr,a),a);else for(let u=o.min;u<o.max;u++){let c=t();n(a,c),r(s(o.expr,a),c),a=c}return[n(a)]}else{if(o.type=="name")return[n(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function iT(i,e){return e-i}function mb(i,e){let t=[];return n(e),t.sort(iT);function n(r){let s=i[r];if(s.length==1&&!s[0].term)return n(s[0].to);t.push(r);for(let o=0;o<s.length;o++){let{term:l,to:a}=s[o];!l&&t.indexOf(a)==-1&&n(a)}}}function j6(i){let e=Object.create(null);return t(mb(i,0));function t(n){let r=[];n.forEach(o=>{i[o].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let c=0;c<r.length;c++)r[c][0]==l&&(u=r[c][1]);mb(i,a).forEach(c=>{u||r.push([l,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=e[n.join(",")]=new gr(n.indexOf(i.length-1)>-1);for(let o=0;o<r.length;o++){let l=r[o][1].sort(iT);s.next.push({type:r[o][0],next:e[l.join(",")]||t(l)})}return s}}function $6(i,e){for(let t=0,n=[i];t<n.length;t++){let r=n[t],s=!r.validEnd,o=[];for(let l=0;l<r.next.length;l++){let{type:a,next:u}=r.next[l];o.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),n.indexOf(u)==-1&&n.push(u)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function rT(i){let e=Object.create(null);for(let t in i){let n=i[t];if(!n.hasDefault)return null;e[t]=n.default}return e}function sT(i,e){let t=Object.create(null);for(let n in i){let r=e&&e[n];if(r===void 0){let s=i[n];if(s.hasDefault)r=s.default;else throw new RangeError("No value supplied for attribute "+n)}t[n]=r}return t}function oT(i,e,t,n){for(let r in e)if(!(r in i))throw new RangeError(`Unsupported attribute ${r} for ${t} of type ${r}`);for(let r in i){let s=i[r];s.validate&&s.validate(e[r])}}function aT(i,e){let t=Object.create(null);if(e)for(let n in e)t[n]=new U6(i,n,e[n]);return t}let gb=class lT{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=aT(e,n.attrs),this.defaultAttrs=rT(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==gr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:sT(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Si(this,this.computeAttrs(e),H.from(t),Se.setFrom(n))}createChecked(e=null,t,n){return t=H.from(t),this.checkContent(t),new Si(this,this.computeAttrs(e),t,Se.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=H.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let r=this.contentMatch.matchFragment(t),s=r&&r.fillBefore(H.empty,!0);return s?new Si(this,e,t.append(s),Se.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){oT(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:Se.none:e}static compile(e,t){let n=Object.create(null);e.forEach((s,o)=>n[s]=new lT(s,t,o));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let s in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}};function q6(i,e,t){let n=t.split("|");return r=>{let s=r===null?"null":typeof r;if(n.indexOf(s)<0)throw new RangeError(`Expected value of type ${n} for attribute ${e} on type ${i}, got ${s}`)}}class U6{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate=typeof n.validate=="string"?q6(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class _c{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=aT(e,r.attrs),this.excluded=null;let s=rT(this.attrs);this.instance=s?new Se(this,s):null}create(e=null){return!e&&this.instance?this.instance:new Se(this,sT(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((s,o)=>n[s]=new _c(s,r++,t,o)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){oT(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class uT{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=Qe.from(e.nodes),t.marks=Qe.from(e.marks||{}),this.nodes=gb.compile(this.spec.nodes,this),this.marks=_c.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let s=this.nodes[r],o=s.spec.content||"",l=s.spec.marks;if(s.contentMatch=n[o]||(n[o]=gr.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=l=="_"?null:l?bb(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let r in this.marks){let s=this.marks[r],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:bb(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof gb){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new mu(n,n.defaultAttrs,e,Se.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Si.fromJSON(this,e)}markFromJSON(e){return Se.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function bb(i,e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],s=i.marks[r],o=s;if(s)t.push(s);else for(let l in i.marks){let a=i.marks[l];(r=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(r)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[n]+"'")}return t}function W6(i){return i.tag!=null}function G6(i){return i.style!=null}let ro=class df{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(r=>{if(W6(r))this.tags.push(r);else if(G6(r)){let s=/[^=]*/.exec(r.style)[0];n.indexOf(s)<0&&n.push(s),this.styles.push(r)}}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let s=e.nodes[r.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let n=new vb(this,t,!1);return n.addAll(e,Se.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new vb(this,t,!0);return n.addAll(e,Se.none,t.from,t.to),K.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let s=this.tags[r];if(X6(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,t,n,r){for(let s=r?this.styles.indexOf(r)+1:0;s<this.styles.length;s++){let o=this.styles[s],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!n.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function n(r){let s=r.priority==null?50:r.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<s)break}t.splice(o,0,r)}for(let r in e.marks){let s=e.marks[r].spec.parseDOM;s&&s.forEach(o=>{n(o=wb(o)),o.mark||o.ignore||o.clearMark||(o.mark=r)})}for(let r in e.nodes){let s=e.nodes[r].spec.parseDOM;s&&s.forEach(o=>{n(o=wb(o)),o.node||o.ignore||o.mark||(o.node=r)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new df(e,df.schemaRules(e)))}};const cT={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},K6={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},dT={ol:!0,ul:!0},No=1,hf=2,so=4;function yb(i,e,t){return e!=null?(e?No:0)|(e==="full"?hf:0):i&&i.whitespace=="pre"?No|hf:t&~so}class Va{constructor(e,t,n,r,s,o){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=o,this.content=[],this.activeMarks=Se.none,this.match=s||(o&so?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(H.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let n=this.type.contentMatch,r;return(r=n.findWrapping(e.type))?(this.match=n,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&No)){let n=this.content[this.content.length-1],r;if(n&&n.isText&&(r=/[ \t\r\n\u000c]+$/.exec(n.text))){let s=n;n.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-r[0].length))}}let t=H.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(H.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!cT.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class vb{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,s,o=yb(null,t.preserveWhitespace,0)|(n?so:0);r?s=new Va(r.type,r.attrs,Se.none,!0,t.topMatch||r.type.contentMatch,o):n?s=new Va(null,null,Se.none,!0,null,o):s=new Va(e.schema.topNodeType,null,Se.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,s=r.options&hf?"full":this.localPreserveWS||(r.options&No)>0;if(s==="full"||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(s)s!=="full"?n=n.replace(/\r?\n|\r/g," "):n=n.replace(/\r\n?/g,` 449`);else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],l=e.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;dT.hasOwnProperty(o)&&this.parser.normalizeLists&&Y6(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,n));e:if(a?a.ignore:K6.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let u,c=this.needsBlock;if(cT.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),u=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let h=a&&a.skip?t:this.readStyles(e,t);h&&this.addAll(e,h),u&&this.sync(s),this.needsBlock=c}else{let u=this.readStyles(e,t);u&&this.addElementByRule(e,a,u,a.consuming===!1?l:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` 450`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let s=this.parser.matchedStyles[r],o=n.getPropertyValue(s);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(s,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(u=>!a.clearMark(u)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,n,r){let s,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),n)||this.leafFallback(e,n);else{let a=this.enter(o,t.attrs||null,n,t.preserveWhitespace);a&&(s=!0,n=a)}else{let a=this.parser.schema.marks[t.mark];n=n.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,n));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,n),this.findAround(e,a,!1)}s&&this.sync(l)&&this.open--}addAll(e,t,n,r){let s=n||0;for(let o=n?e.childNodes[n]:e.firstChild,l=r==null?null:e.childNodes[r];o!=l;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,t);this.findAtPoint(e,s)}findPlace(e,t){let n,r;for(let s=this.open;s>=0;s--){let o=this.nodes[s],l=o.findWrapping(e);if(l&&(!n||n.length>l.length)&&(n=l,r=o,!l.length)||o.solid)break}if(!n)return null;this.sync(r);for(let s=0;s<n.length;s++)t=this.enterInner(n[s],null,t,!1);return t}insertNode(e,t){if(e.isInline&&this.needsBlock&&!this.top.type){let r=this.textblockFromContext();r&&(t=this.enterInner(r,null,t))}let n=this.findPlace(e,t);if(n){this.closeExtra();let r=this.top;r.match&&(r.match=r.match.matchType(e.type));let s=Se.none;for(let o of n.concat(e.marks))(r.type?r.type.allowsMarkType(o.type):xb(o.type,e.type))&&(s=o.addToSet(s));return r.content.push(e.mark(s)),!0}return!1}enter(e,t,n,r){let s=this.findPlace(e.create(t),n);return s&&(s=this.enterInner(e,t,n,!0,r)),s}enterInner(e,t,n,r=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=yb(e,s,o.options);o.options&so&&o.content.length==0&&(l|=so);let a=Se.none;return n=n.filter(u=>(o.type?o.type.allowsMarkType(u.type):xb(u.type,e))?(a=u.addToSet(a),!1):!0),this.nodes.push(new Va(e,t,a,r,null,l)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=No)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),s=-(n?n.depth+1:0)+(r?0:1),o=(l,a)=>{for(;l>=0;l--){let u=t[l];if(u==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let c=a>0||a==0&&r?this.nodes[a].type:n&&a>=s?n.node(a-s).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let n=this.parser.schema.nodes[t];if(n.isTextblock&&n.defaultAttrs)return n}}}function Y6(i){for(let e=i.firstChild,t=null;e;e=e.nextSibling){let n=e.nodeType==1?e.nodeName.toLowerCase():null;n&&dT.hasOwnProperty(n)&&t?(t.appendChild(e),e=t):n=="li"?t=e:n&&(t=null)}}function X6(i,e){return(i.matches||i.msMatchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector).call(i,e)}function wb(i){let e={};for(let t in i)e[t]=i[t];return e}function xb(i,e){let t=e.schema.nodes;for(let n in t){let r=t[n];if(!r.allowsMarkType(i))continue;let s=[],o=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:u,next:c}=l.edge(a);if(u==e||s.indexOf(c)<0&&o(c))return!0}};if(o(r.contentMatch))return!0}}class Ar{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=Ad(t).createDocumentFragment());let r=n,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let l=0,a=0;for(;l<s.length&&a<o.marks.length;){let u=o.marks[a];if(!this.marks[u.type.name]){a++;continue}if(!u.eq(s[l][0])||u.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)r=s.pop()[1];for(;a<o.marks.length;){let u=o.marks[a++],c=this.serializeMark(u,o.isInline,t);c&&(s.push([u,r]),r.appendChild(c.dom),r=c.contentDOM||c.dom)}}r.appendChild(this.serializeNodeInner(o,t))}),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=pl(Ad(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let s=this.serializeMark(e.marks[r],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(n),n=s.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&pl(Ad(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return pl(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ar(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Eb(e.nodes);return t.text||(t.text=n=>n.text),t}static marksFromSchema(e){return Eb(e.marks)}}function Eb(i){let e={};for(let t in i){let n=i[t].spec.toDOM;n&&(e[t]=n)}return e}function Ad(i){return i.document||window.document}const Tb=new WeakMap;function J6(i){let e=Tb.get(i);return e===void 0&&Tb.set(i,e=Q6(i)),e}function Q6(i){let e=null;function t(n){if(n&&typeof n=="object")if(Array.isArray(n))if(typeof n[0]=="string")e||(e=[]),e.push(n);else for(let r=0;r<n.length;r++)t(n[r]);else for(let r in n)t(n[r])}return t(i),e}function pl(i,e,t,n){if(typeof e=="string")return{dom:i.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let r=e[0],s;if(typeof r!="string")throw new RangeError("Invalid array passed to renderSpec");if(n&&(s=J6(n))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=r.indexOf(" ");o>0&&(t=r.slice(0,o),r=r.slice(o+1));let l,a=t?i.createElementNS(t,r):i.createElement(r),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let h in u)if(u[h]!=null){let d=h.indexOf(" ");d>0?a.setAttributeNS(h.slice(0,d),h.slice(d+1),u[h]):a.setAttribute(h,u[h])}}for(let h=c;h<e.length;h++){let d=e[h];if(d===0){if(h<e.length-1||h>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:f,contentDOM:p}=pl(i,d,t,n);if(a.appendChild(f),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const hT=65535,fT=Math.pow(2,16);function Z6(i,e){return i+e*fT}function Sb(i){return i&hT}function e4(i){return(i-(i&hT))/fT}const pT=1,mT=2,ml=4,gT=8;class ff{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&gT)>0}get deletedBefore(){return(this.delInfo&(pT|ml))>0}get deletedAfter(){return(this.delInfo&(mT|ml))>0}get deletedAcross(){return(this.delInfo&ml)>0}}class Ot{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Ot.empty)return Ot.empty}recover(e){let t=0,n=Sb(e);if(!this.inverted)for(let r=0;r<n;r++)t+=this.ranges[r*3+2]-this.ranges[r*3+1];return this.ranges[n*3]+t+e4(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let u=this.ranges[l+s],c=this.ranges[l+o],h=a+u;if(e<=h){let d=u?e==a?-1:e==h?1:t:t,f=a+r+(d<0?0:c);if(n)return f;let p=e==(t<0?a:h)?null:Z6(l/3,e-a),b=e==a?mT:e==h?pT:ml;return(t<0?e!=a:e!=h)&&(b|=gT),new ff(f,b,p)}r+=c-u}return n?e+r:new ff(e+r,0,null)}touches(e,t){let n=0,r=Sb(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?n:0);if(a>e)break;let u=this.ranges[l+s],c=a+u;if(e<=c&&l==r*3)return!0;n+=this.ranges[l+o]-u}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,s=0;r<this.ranges.length;r+=3){let o=this.ranges[r],l=o-(this.inverted?s:0),a=o+(this.inverted?0:s),u=this.ranges[r+t],c=this.ranges[r+n];e(l,l+u,a,a+c),s+=c-u}}invert(){return new Ot(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Ot.empty:new Ot(e<0?[0,-e,0]:[0,0,e])}}Ot.empty=new Ot([]);class Bo{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Bo(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let e=new Bo;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this._maps[a].recover(l.recover);continue}}r|=l.delInfo,e=l.pos}return n?e:new ff(e,r,null)}}const Ld=Object.create(null);class ht{getMap(){return Ot.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Ld[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ld)throw new RangeError("Duplicate use of step JSON ID "+e);return Ld[e]=t,t.prototype.jsonID=e,t}}class je{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new je(e,null)}static fail(e){return new je(null,e)}static fromReplace(e,t,n,r){try{return je.ok(e.replace(t,n,r))}catch(s){if(s instanceof hu)return je.fail(s.message);throw s}}}function Lm(i,e,t){let n=[];for(let r=0;r<i.childCount;r++){let s=i.child(r);s.content.size&&(s=s.copy(Lm(s.content,e,s))),s.isInline&&(s=e(s,t,r)),n.push(s)}return H.fromArray(n)}class yi extends ht{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),s=new K(Lm(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),r),t.openStart,t.openEnd);return je.fromReplace(e,this.from,this.to,s)}invert(){return new xn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new yi(t.pos,n.pos,this.mark)}merge(e){return e instanceof yi&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new yi(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new yi(t.from,t.to,e.markFromJSON(t.mark))}}ht.jsonID("addMark",yi);class xn extends ht{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new K(Lm(t.content,r=>r.mark(this.mark.removeFromSet(r.marks)),e),t.openStart,t.openEnd);return je.fromReplace(e,this.from,this.to,n)}invert(){return new yi(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new xn(t.pos,n.pos,this.mark)}merge(e){return e instanceof xn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new xn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new xn(t.from,t.to,e.markFromJSON(t.mark))}}ht.jsonID("removeMark",xn);class vi extends ht{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return je.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return je.fromReplace(e,this.pos,this.pos+1,new K(H.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let n=this.mark.addToSet(t.marks);if(n.length==t.marks.length){for(let r=0;r<t.marks.length;r++)if(!t.marks[r].isInSet(n))return new vi(this.pos,t.marks[r]);return new vi(this.pos,this.mark)}}return new ls(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new vi(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new vi(t.pos,e.markFromJSON(t.mark))}}ht.jsonID("addNodeMark",vi);class ls extends ht{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return je.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return je.fromReplace(e,this.pos,this.pos+1,new K(H.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new vi(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new ls(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new ls(t.pos,e.markFromJSON(t.mark))}}ht.jsonID("removeNodeMark",ls);class We extends ht{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&pf(e,this.from,this.to)?je.fail("Structure replace would overwrite content"):je.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Ot([this.from,this.to-this.from,this.slice.size])}invert(e){return new We(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new We(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof We)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?K.empty:new K(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new We(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?K.empty:new K(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new We(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new We(t.from,t.to,K.fromJSON(e,t.slice),!!t.structure)}}ht.jsonID("replace",We);class Ge extends ht{constructor(e,t,n,r,s,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=s,this.insert=o,this.structure=l}apply(e){if(this.structure&&(pf(e,this.from,this.gapFrom)||pf(e,this.gapTo,this.to)))return je.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return je.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?je.fromReplace(e,this.from,this.to,n):je.fail("Content does not fit in gap")}getMap(){return new Ot([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Ge(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||s>n.pos?null:new Ge(t.pos,n.pos,r,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ge(t.from,t.to,t.gapFrom,t.gapTo,K.fromJSON(e,t.slice),t.insert,!!t.structure)}}ht.jsonID("replaceAround",Ge);function pf(i,e,t){let n=i.resolve(e),r=t-e,s=n.depth;for(;r>0&&s>0&&n.indexAfter(s)==n.node(s).childCount;)s--,r--;if(r>0){let o=n.node(s).maybeChild(n.indexAfter(s));for(;r>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,r--}}return!1}function t4(i,e,t,n){let r=[],s=[],o,l;i.doc.nodesBetween(e,t,(a,u,c)=>{if(!a.isInline)return;let h=a.marks;if(!n.isInSet(h)&&c.type.allowsMarkType(n.type)){let d=Math.max(u,e),f=Math.min(u+a.nodeSize,t),p=n.addToSet(h);for(let b=0;b<h.length;b++)h[b].isInSet(p)||(o&&o.to==d&&o.mark.eq(h[b])?o.to=f:r.push(o=new xn(d,f,h[b])));l&&l.to==d?l.to=f:s.push(l=new yi(d,f,n))}}),r.forEach(a=>i.step(a)),s.forEach(a=>i.step(a))}function n4(i,e,t,n){let r=[],s=0;i.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(n instanceof _c){let u=o.marks,c;for(;c=n.isInSet(u);)(a||(a=[])).push(c),u=c.removeFromSet(u)}else n?n.isInSet(o.marks)&&(a=[n]):a=o.marks;if(a&&a.length){let u=Math.min(l+o.nodeSize,t);for(let c=0;c<a.length;c++){let h=a[c],d;for(let f=0;f<r.length;f++){let p=r[f];p.step==s-1&&h.eq(r[f].style)&&(d=p)}d?(d.to=u,d.step=s):r.push({style:h,from:Math.max(l,e),to:u,step:s})}}}),r.forEach(o=>i.step(new xn(o.from,o.to,o.style)))}function Mm(i,e,t,n=t.contentMatch,r=!0){let s=i.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<s.childCount;a++){let u=s.child(a),c=l+u.nodeSize,h=n.matchType(u.type);if(!h)o.push(new We(l,c,K.empty));else{n=h;for(let d=0;d<u.marks.length;d++)t.allowsMarkType(u.marks[d].type)||i.step(new xn(l,c,u.marks[d]));if(r&&u.isText&&t.whitespace!="pre"){let d,f=/\r?\n|\r/g,p;for(;d=f.exec(u.text);)p||(p=new K(H.from(t.schema.text(" ",t.allowedMarks(u.marks))),0,0)),o.push(new We(l+d.index,l+d.index+d[0].length,p))}}l=c}if(!n.validEnd){let a=n.fillBefore(H.empty,!0);i.replace(l,l,new K(a,0,0))}for(let a=o.length-1;a>=0;a--)i.step(o[a])}function i4(i,e,t){return(e==0||i.canReplace(e,i.childCount))&&(t==i.childCount||i.canReplace(0,t))}function xs(i){let t=i.parent.content.cutByIndex(i.startIndex,i.endIndex);for(let n=i.depth;;--n){let r=i.$from.node(n),s=i.$from.index(n),o=i.$to.indexAfter(n);if(n<i.depth&&r.canReplace(s,o,t))return n;if(n==0||r.type.spec.isolating||!i4(r,s,o))break}return null}function r4(i,e,t){let{$from:n,$to:r,depth:s}=e,o=n.before(s+1),l=r.after(s+1),a=o,u=l,c=H.empty,h=0;for(let p=s,b=!1;p>t;p--)b||n.index(p)>0?(b=!0,c=H.from(n.node(p).copy(c)),h++):a--;let d=H.empty,f=0;for(let p=s,b=!1;p>t;p--)b||r.after(p+1)<r.end(p)?(b=!0,d=H.from(r.node(p).copy(d)),f++):u++;i.step(new Ge(a,u,o,l,new K(c.append(d),h,f),c.size-h,!0))}function Im(i,e,t=null,n=i){let r=s4(i,e),s=r&&o4(n,e);return s?r.map(Cb).concat({type:e,attrs:t}).concat(s.map(Cb)):null}function Cb(i){return{type:i,attrs:null}}function s4(i,e){let{parent:t,startIndex:n,endIndex:r}=i,s=t.contentMatchAt(n).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return t.canReplaceWith(n,r,o)?s:null}function o4(i,e){let{parent:t,startIndex:n,endIndex:r}=i,s=t.child(n),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let u=n;a&&u<r;u++)a=a.matchType(t.child(u).type);return!a||!a.validEnd?null:o}function a4(i,e,t){let n=H.empty;for(let o=t.length-1;o>=0;o--){if(n.size){let l=t[o].type.contentMatch.matchFragment(n);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}n=H.from(t[o].type.create(t[o].attrs,n))}let r=e.start,s=e.end;i.step(new Ge(r,s,r,s,new K(n,0,0),t.length,!0))}function l4(i,e,t,n,r){if(!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=i.steps.length;i.doc.nodesBetween(e,t,(o,l)=>{let a=typeof r=="function"?r(o):r;if(o.isTextblock&&!o.hasMarkup(n,a)&&u4(i.doc,i.mapping.slice(s).map(l),n)){let u=null;if(n.schema.linebreakReplacement){let f=n.whitespace=="pre",p=!!n.contentMatch.matchType(n.schema.linebreakReplacement);f&&!p?u=!1:!f&&p&&(u=!0)}u===!1&&yT(i,o,l,s),Mm(i,i.mapping.slice(s).map(l,1),n,void 0,u===null);let c=i.mapping.slice(s),h=c.map(l,1),d=c.map(l+o.nodeSize,1);return i.step(new Ge(h,d,h+1,d-1,new K(H.from(n.create(a,null,o.marks)),0,0),1,!0)),u===!0&&bT(i,o,l,s),!1}})}function bT(i,e,t,n){e.forEach((r,s)=>{if(r.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(r.text);){let a=i.mapping.slice(n).map(t+1+s+o.index);i.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function yT(i,e,t,n){e.forEach((r,s)=>{if(r.type==r.type.schema.linebreakReplacement){let o=i.mapping.slice(n).map(t+1+s);i.replaceWith(o,o+1,e.type.schema.text(` 451`))}})}function u4(i,e,t){let n=i.resolve(e),r=n.index();return n.parent.canReplaceWith(r,r+1,t)}function c4(i,e,t,n,r){let s=i.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let o=t.create(n,null,r||s.marks);if(s.isLeaf)return i.replaceWith(e,e+s.nodeSize,o);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);i.step(new Ge(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new K(H.from(o),0,0),1,!0))}function Wr(i,e,t=1,n){let r=i.resolve(e),s=r.depth-t,o=n&&n[n.length-1]||r.parent;if(s<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!o.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let u=r.depth-1,c=t-2;u>s;u--,c--){let h=r.node(u),d=r.index(u);if(h.type.spec.isolating)return!1;let f=h.content.cutByIndex(d,h.childCount),p=n&&n[c+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let b=n&&n[c]||h;if(!h.canReplace(d+1,h.childCount)||!b.type.validContent(f))return!1}let l=r.indexAfter(s),a=n&&n[0];return r.node(s).canReplaceWith(l,l,a?a.type:r.node(s+1).type)}function d4(i,e,t=1,n){let r=i.doc.resolve(e),s=H.empty,o=H.empty;for(let l=r.depth,a=r.depth-t,u=t-1;l>a;l--,u--){s=H.from(r.node(l).copy(s));let c=n&&n[u];o=H.from(c?c.type.create(c.attrs,o):r.node(l).copy(o))}i.step(new We(e,e,new K(s.append(o),t,t),!0))}function Ni(i,e){let t=i.resolve(e),n=t.index();return vT(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(n,n+1)}function h4(i,e){e.content.size||i.type.compatibleContent(e.type);let t=i.contentMatchAt(i.childCount),{linebreakReplacement:n}=i.type.schema;for(let r=0;r<e.childCount;r++){let s=e.child(r),o=s.type==n?i.type.schema.nodes.text:s.type;if(t=t.matchType(o),!t||!i.type.allowsMarks(s.marks))return!1}return t.validEnd}function vT(i,e){return!!(i&&e&&!i.isLeaf&&h4(i,e))}function Ac(i,e,t=-1){let n=i.resolve(e);for(let r=n.depth;;r--){let s,o,l=n.index(r);if(r==n.depth?(s=n.nodeBefore,o=n.nodeAfter):t>0?(s=n.node(r+1),l++,o=n.node(r).maybeChild(l)):(s=n.node(r).maybeChild(l-1),o=n.node(r+1)),s&&!s.isTextblock&&vT(s,o)&&n.node(r).canReplace(l,l+1))return e;if(r==0)break;e=t<0?n.before(r):n.after(r)}}function f4(i,e,t){let n=null,{linebreakReplacement:r}=i.doc.type.schema,s=i.doc.resolve(e-t),o=s.node().type;if(r&&o.inlineContent){let c=o.whitespace=="pre",h=!!o.contentMatch.matchType(r);c&&!h?n=!1:!c&&h&&(n=!0)}let l=i.steps.length;if(n===!1){let c=i.doc.resolve(e+t);yT(i,c.node(),c.before(),l)}o.inlineContent&&Mm(i,e+t-1,o,s.node().contentMatchAt(s.index()),n==null);let a=i.mapping.slice(l),u=a.map(e-t);if(i.step(new We(u,a.map(e+t,-1),K.empty,!0)),n===!0){let c=i.doc.resolve(u);bT(i,c.node(),c.before(),i.steps.length)}return i}function p4(i,e,t){let n=i.resolve(e);if(n.parent.canReplaceWith(n.index(),n.index(),t))return e;if(n.parentOffset==0)for(let r=n.depth-1;r>=0;r--){let s=n.index(r);if(n.node(r).canReplaceWith(s,s,t))return n.before(r+1);if(s>0)return null}if(n.parentOffset==n.parent.content.size)for(let r=n.depth-1;r>=0;r--){let s=n.indexAfter(r);if(n.node(r).canReplaceWith(s,s,t))return n.after(r+1);if(s<n.node(r).childCount)return null}return null}function wT(i,e,t){let n=i.resolve(e);if(!t.content.size)return e;let r=t.content;for(let s=0;s<t.openStart;s++)r=r.firstChild.content;for(let s=1;s<=(t.openStart==0&&t.size?2:1);s++)for(let o=n.depth;o>=0;o--){let l=o==n.depth?0:n.pos<=(n.start(o+1)+n.end(o+1))/2?-1:1,a=n.index(o)+(l>0?1:0),u=n.node(o),c=!1;if(s==1)c=u.canReplace(a,a,r);else{let h=u.contentMatchAt(a).findWrapping(r.firstChild.type);c=h&&u.canReplaceWith(a,a,h[0])}if(c)return l==0?n.pos:l<0?n.before(o+1):n.after(o+1)}return null}function Lc(i,e,t=e,n=K.empty){if(e==t&&!n.size)return null;let r=i.resolve(e),s=i.resolve(t);return xT(r,s,n)?new We(e,t,n):new m4(r,s,n).fit()}function xT(i,e,t){return!t.openStart&&!t.openEnd&&i.start()==e.start()&&i.parent.canReplace(i.index(),e.index(),t.content)}class m4{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=H.empty;for(let r=0;r<=e.depth;r++){let s=e.node(r);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=H.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let s=this.placed,o=n.depth,l=r.depth;for(;o&&l&&s.childCount==1;)s=s.firstChild.content,o--,l--;let a=new K(s,o,l);return e>-1?new Ge(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new We(n.pos,r.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let s=t.firstChild;if(t.childCount>1&&(r=0),s.type.spec.isolating&&r<=n){e=n;break}t=s.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let r,s=null;n?(s=Md(this.unplaced.content,n-1).firstChild,r=s.content):r=this.unplaced.content;let o=r.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],c,h=null;if(t==1&&(o?u.matchType(o.type)||(h=u.fillBefore(H.from(o),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:n,frontierDepth:l,parent:s,inject:h};if(t==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:l,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Md(e,t);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new K(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Md(e,t);if(r.childCount<=1&&t>0){let s=e.size-t<=t+r.size;this.unplaced=new K($s(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new K($s(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let b=0;b<s.length;b++)this.openFrontierNode(s[b]);let o=this.unplaced,l=n?n.content:o.content,a=o.openStart-e,u=0,c=[],{match:h,type:d}=this.frontier[t];if(r){for(let b=0;b<r.childCount;b++)c.push(r.child(b));h=h.matchFragment(r)}let f=l.size+e-(o.content.size-o.openEnd);for(;u<l.childCount;){let b=l.child(u),m=h.matchType(b.type);if(!m)break;u++,(u>1||a==0||b.content.size)&&(h=m,c.push(ET(b.mark(d.allowedMarks(b.marks)),u==1?a:0,u==l.childCount?f:-1)))}let p=u==l.childCount;p||(f=-1),this.placed=qs(this.placed,t,H.from(c)),this.frontier[t].match=h,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let b=0,m=l;b<f;b++){let v=m.lastChild;this.frontier.push({type:v.type,match:v.contentMatchAt(v.childCount)}),m=v.content}this.unplaced=p?e==0?K.empty:new K($s(o.content,e-1,1),e-1,f<0?o.openEnd:e-1):new K($s(o.content,e,u),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Id(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],s=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=Id(e,t,r,n,s);if(o){for(let l=t-1;l>=0;l--){let{match:a,type:u}=this.frontier[l],c=Id(e,l,u,a,!0);if(!c||c.childCount)continue e}return{depth:t,fit:o,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=qs(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let r=e.node(n),s=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,s)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=qs(this.placed,this.depth,H.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(H.empty,!0);t.childCount&&(this.placed=qs(this.placed,this.frontier.length,t))}}function $s(i,e,t){return e==0?i.cutByIndex(t,i.childCount):i.replaceChild(0,i.firstChild.copy($s(i.firstChild.content,e-1,t)))}function qs(i,e,t){return e==0?i.append(t):i.replaceChild(i.childCount-1,i.lastChild.copy(qs(i.lastChild.content,e-1,t)))}function Md(i,e){for(let t=0;t<e;t++)i=i.firstChild.content;return i}function ET(i,e,t){if(e<=0)return i;let n=i.content;return e>1&&(n=n.replaceChild(0,ET(n.firstChild,e-1,n.childCount==1?t-1:0))),e>0&&(n=i.type.contentMatch.fillBefore(n).append(n),t<=0&&(n=n.append(i.type.contentMatch.matchFragment(n).fillBefore(H.empty,!0)))),i.copy(n)}function Id(i,e,t,n,r){let s=i.node(e),o=r?i.indexAfter(e):i.index(e);if(o==s.childCount&&!t.compatibleContent(s.type))return null;let l=n.fillBefore(s.content,!0,o);return l&&!g4(t,s.content,o)?l:null}function g4(i,e,t){for(let n=t;n<e.childCount;n++)if(!i.allowsMarks(e.child(n).marks))return!0;return!1}function b4(i){return i.spec.defining||i.spec.definingForContent}function y4(i,e,t,n){if(!n.size)return i.deleteRange(e,t);let r=i.doc.resolve(e),s=i.doc.resolve(t);if(xT(r,s,n))return i.step(new We(e,t,n));let o=ST(r,i.doc.resolve(t));o[o.length-1]==0&&o.pop();let l=-(r.depth+1);o.unshift(l);for(let d=r.depth,f=r.pos-1;d>0;d--,f--){let p=r.node(d).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(d)>-1?l=d:r.before(d)==f&&o.splice(1,0,-d)}let a=o.indexOf(l),u=[],c=n.openStart;for(let d=n.content,f=0;;f++){let p=d.firstChild;if(u.push(p),f==n.openStart)break;d=p.content}for(let d=c-1;d>=0;d--){let f=u[d],p=b4(f.type);if(p&&!f.sameMarkup(r.node(Math.abs(l)-1)))c=d;else if(p||!f.type.isTextblock)break}for(let d=n.openStart;d>=0;d--){let f=(d+c+1)%(n.openStart+1),p=u[f];if(p)for(let b=0;b<o.length;b++){let m=o[(b+a)%o.length],v=!0;m<0&&(v=!1,m=-m);let g=r.node(m-1),y=r.index(m-1);if(g.canReplaceWith(y,y,p.type,p.marks))return i.replace(r.before(m),v?s.after(m):t,new K(TT(n.content,0,n.openStart,f),f,n.openEnd))}}let h=i.steps.length;for(let d=o.length-1;d>=0&&(i.replace(e,t,n),!(i.steps.length>h));d--){let f=o[d];f<0||(e=r.before(f),t=s.after(f))}}function TT(i,e,t,n,r){if(e<t){let s=i.firstChild;i=i.replaceChild(0,s.copy(TT(s.content,e+1,t,n,s)))}if(e>n){let s=r.contentMatchAt(0),o=s.fillBefore(i).append(i);i=o.append(s.matchFragment(o).fillBefore(H.empty,!0))}return i}function v4(i,e,t,n){if(!n.isInline&&e==t&&i.doc.resolve(e).parent.content.size){let r=p4(i.doc,e,n.type);r!=null&&(e=t=r)}i.replaceRange(e,t,new K(H.from(n),0,0))}function w4(i,e,t){let n=i.doc.resolve(e),r=i.doc.resolve(t),s=ST(n,r);for(let o=0;o<s.length;o++){let l=s[o],a=o==s.length-1;if(a&&l==0||n.node(l).type.contentMatch.validEnd)return i.delete(n.start(l),r.end(l));if(l>0&&(a||n.node(l-1).canReplace(n.index(l-1),r.indexAfter(l-1))))return i.delete(n.before(l),r.after(l))}for(let o=1;o<=n.depth&&o<=r.depth;o++)if(e-n.start(o)==n.depth-o&&t>n.end(o)&&r.end(o)-t!=r.depth-o&&n.start(o-1)==r.start(o-1)&&n.node(o-1).canReplace(n.index(o-1),r.index(o-1)))return i.delete(n.before(o),t);i.delete(e,t)}function ST(i,e){let t=[],n=Math.min(i.depth,e.depth);for(let r=n;r>=0;r--){let s=i.start(r);if(s<i.pos-(i.depth-r)||e.end(r)>e.pos+(e.depth-r)||i.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(s==e.start(r)||r==i.depth&&r==e.depth&&i.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==s-1)&&t.push(r)}return t}class Gr extends ht{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return je.fail("No node at attribute step's position");let n=Object.create(null);for(let s in t.attrs)n[s]=t.attrs[s];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return je.fromReplace(e,this.pos,this.pos+1,new K(H.from(r),0,t.isLeaf?0:1))}getMap(){return Ot.empty}invert(e){return new Gr(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Gr(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Gr(t.pos,t.attr,t.value)}}ht.jsonID("attr",Gr);class Fo extends ht{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return je.ok(n)}getMap(){return Ot.empty}invert(e){return new Fo(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Fo(t.attr,t.value)}}ht.jsonID("docAttr",Fo);let us=class extends Error{};us=function i(e){let t=Error.call(this,e);return t.__proto__=i.prototype,t};us.prototype=Object.create(Error.prototype);us.prototype.constructor=us;us.prototype.name="TransformError";class Om{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Bo}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new us(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=K.empty){let r=Lc(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new K(H.from(n),0,0))}delete(e,t){return this.replace(e,t,K.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return y4(this,e,t,n),this}replaceRangeWith(e,t,n){return v4(this,e,t,n),this}deleteRange(e,t){return w4(this,e,t),this}lift(e,t){return r4(this,e,t),this}join(e,t=1){return f4(this,e,t),this}wrap(e,t){return a4(this,e,t),this}setBlockType(e,t=e,n,r=null){return l4(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return c4(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new Gr(e,t,n)),this}setDocAttribute(e,t){return this.step(new Fo(e,t)),this}addNodeMark(e,t){return this.step(new vi(e,t)),this}removeNodeMark(e,t){if(!(t instanceof Se)){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(t=t.isInSet(n.marks),!t)return this}return this.step(new ls(e,t)),this}split(e,t=1,n){return d4(this,e,t,n),this}addMark(e,t,n){return t4(this,e,t,n),this}removeMark(e,t,n){return n4(this,e,t,n),this}clearIncompatible(e,t,n){return Mm(this,e,t,n),this}}const Od=Object.create(null);class se{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new CT(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=K.empty){let n=t.content.lastChild,r=null;for(let l=0;l<t.openEnd;l++)r=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:a,$to:u}=o[l],c=e.mapping.slice(s);e.replaceRange(c.map(a.pos),c.map(u.pos),l?K.empty:t),l==0&&Ab(e,s,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let s=0;s<r.length;s++){let{$from:o,$to:l}=r[s],a=e.mapping.slice(n),u=a.map(o.pos),c=a.map(l.pos);s?e.deleteRange(u,c):(e.replaceRangeWith(u,c,t),Ab(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new ie(e):Rr(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let s=e.depth-1;s>=0;s--){let o=t<0?Rr(e.node(0),e.node(s),e.before(s+1),e.index(s),t,n):Rr(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Wt(e.node(0))}static atStart(e){return Rr(e,e,0,0,1)||new Wt(e)}static atEnd(e){return Rr(e,e,e.content.size,e.childCount,-1)||new Wt(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Od[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Od)throw new RangeError("Duplicate use of selection JSON ID "+e);return Od[e]=t,t.prototype.jsonID=e,t}getBookmark(){return ie.between(this.$anchor,this.$head).getBookmark()}}se.prototype.visible=!0;class CT{constructor(e,t){this.$from=e,this.$to=t}}let kb=!1;function _b(i){!kb&&!i.parent.inlineContent&&(kb=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+i.parent.type.name+")"))}class ie extends se{constructor(e,t=e){_b(e),_b(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return se.near(n);let r=e.resolve(t.map(this.anchor));return new ie(r.parent.inlineContent?r:n,n)}replace(e,t=K.empty){if(super.replace(e,t),t==K.empty){let n=this.$from.marksAcross(this.$to);n&&e.ensureMarks(n)}}eq(e){return e instanceof ie&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Mc(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new ie(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let s=se.findFrom(t,n,!0)||se.findFrom(t,-n,!0);if(s)t=s.$head;else return se.near(t,n)}return e.parent.inlineContent||(r==0?e=t:(e=(se.findFrom(e,-n,!0)||se.findFrom(e,n,!0)).$anchor,e.pos<t.pos!=r<0&&(e=t))),new ie(e,t)}}se.jsonID("text",ie);class Mc{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Mc(e.map(this.anchor),e.map(this.head))}resolve(e){return ie.between(e.resolve(this.anchor),e.resolve(this.head))}}class ne extends se{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),s=e.resolve(r);return n?se.near(s):new ne(s)}content(){return new K(H.from(this.node),0,0)}eq(e){return e instanceof ne&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Dm(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new ne(e.resolve(t.anchor))}static create(e,t){return new ne(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}ne.prototype.visible=!1;se.jsonID("node",ne);class Dm{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new Mc(n,n):new Dm(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&ne.isSelectable(n)?new ne(t):se.near(t)}}class Wt extends se{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=K.empty){if(t==K.empty){e.delete(0,e.doc.content.size);let n=se.atStart(e.doc);n.eq(e.selection)||e.setSelection(n)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Wt(e)}map(e){return new Wt(e)}eq(e){return e instanceof Wt}getBookmark(){return x4}}se.jsonID("all",Wt);const x4={map(){return this},resolve(i){return new Wt(i)}};function Rr(i,e,t,n,r,s=!1){if(e.inlineContent)return ie.create(i,t);for(let o=n-(r>0?0:1);r>0?o<e.childCount:o>=0;o+=r){let l=e.child(o);if(l.isAtom){if(!s&&ne.isSelectable(l))return ne.create(i,t-(r<0?l.nodeSize:0))}else{let a=Rr(i,l,t+r,r<0?l.childCount:0,r,s);if(a)return a}t+=l.nodeSize*r}return null}function Ab(i,e,t){let n=i.steps.length-1;if(n<e)return;let r=i.steps[n];if(!(r instanceof We||r instanceof Ge))return;let s=i.mapping.maps[n],o;s.forEach((l,a,u,c)=>{o==null&&(o=c)}),i.setSelection(se.near(i.doc.resolve(o),t))}const Lb=1,Ha=2,Mb=4;class E4 extends Om{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Lb)&~Ha,this.storedMarks=null,this}get selectionSet(){return(this.updated&Lb)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Ha,this}ensureMarks(e){return Se.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Ha)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Ha,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Se.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n==null&&(n=t),n=n??t,!e)return this.deleteRange(t,n);let s=this.storedMarks;if(!s){let o=this.doc.resolve(t);s=n==t?o.marks():o.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,s)),this.selection.empty||this.setSelection(se.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Mb,this}get scrolledIntoView(){return(this.updated&Mb)>0}}function Ib(i,e){return!e||!i?i:i.bind(e)}class Us{constructor(e,t,n){this.name=e,this.init=Ib(t.init,n),this.apply=Ib(t.apply,n)}}const T4=[new Us("doc",{init(i){return i.doc||i.schema.topNodeType.createAndFill()},apply(i){return i.doc}}),new Us("selection",{init(i,e){return i.selection||se.atStart(e.doc)},apply(i){return i.selection}}),new Us("storedMarks",{init(i){return i.storedMarks||null},apply(i,e,t,n){return n.selection.$cursor?i.storedMarks:null}}),new Us("scrollToSelection",{init(){return 0},apply(i,e){return i.scrolledIntoView?e+1:e}})];class Dd{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=T4.slice(),t&&t.forEach(n=>{if(this.pluginsByKey[n.key])throw new RangeError("Adding different instances of a keyed plugin ("+n.key+")");this.plugins.push(n),this.pluginsByKey[n.key]=n,n.spec.state&&this.fields.push(new Us(n.key,n.spec.state,n))})}}class Vr{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let r=this.config.plugins[n];if(r.spec.filterTransaction&&!r.spec.filterTransaction.call(r,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let s=!1;for(let o=0;o<this.config.plugins.length;o++){let l=this.config.plugins[o];if(l.spec.appendTransaction){let a=r?r[o].n:0,u=r?r[o].state:this,c=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,u,n);if(c&&n.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let h=0;h<this.config.plugins.length;h++)r.push(h<o?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),s=!0}r&&(r[o]={state:n,n:t.length})}}if(!s)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Vr(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let s=n[r];t[s.name]=s.apply(e,this[s.name],this,t)}return t}get tr(){return new E4(this)}static create(e){let t=new Dd(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new Vr(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new Dd(this.schema,e.plugins),n=t.fields,r=new Vr(t);for(let s=0;s<n.length;s++){let o=n[s].name;r[o]=this.hasOwnProperty(o)?this[o]:n[s].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(n=>n.toJSON())),e&&typeof e=="object")for(let n in e){if(n=="doc"||n=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],s=r.spec.state;s&&s.toJSON&&(t[n]=s.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new Dd(e.schema,e.plugins),s=new Vr(r);return r.fields.forEach(o=>{if(o.name=="doc")s.doc=Si.fromJSON(e.schema,t.doc);else if(o.name=="selection")s.selection=se.fromJSON(s.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let l in n){let a=n[l],u=a.spec.state;if(a.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){s[o.name]=u.fromJSON.call(a,e,t[l],s);return}}s[o.name]=o.init(e,s)}}),s}}function kT(i,e,t){for(let n in i){let r=i[n];r instanceof Function?r=r.bind(e):n=="handleDOMEvents"&&(r=kT(r,e,{})),t[n]=r}return t}class De{constructor(e){this.spec=e,this.props={},e.props&&kT(e.props,this,this.props),this.key=e.key?e.key.key:_T("plugin")}getState(e){return e[this.key]}}const Pd=Object.create(null);function _T(i){return i in Pd?i+"$"+ ++Pd[i]:(Pd[i]=0,i+"$")}class $e{constructor(e="key"){this.key=_T(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ze=function(i){for(var e=0;;e++)if(i=i.previousSibling,!i)return e},cs=function(i){let e=i.assignedSlot||i.parentNode;return e&&e.nodeType==11?e.host:e};let mf=null;const Bn=function(i,e,t){let n=mf||(mf=document.createRange());return n.setEnd(i,t??i.nodeValue.length),n.setStart(i,e||0),n},S4=function(){mf=null},br=function(i,e,t,n){return t&&(Ob(i,e,t,n,-1)||Ob(i,e,t,n,1))},C4=/^(img|br|input|textarea|hr)$/i;function Ob(i,e,t,n,r){for(;;){if(i==t&&e==n)return!0;if(e==(r<0?0:qt(i))){let s=i.parentNode;if(!s||s.nodeType!=1||oa(i)||C4.test(i.nodeName)||i.contentEditable=="false")return!1;e=Ze(i)+(r<0?0:1),i=s}else if(i.nodeType==1){if(i=i.childNodes[e+(r<0?-1:0)],i.contentEditable=="false")return!1;e=r<0?qt(i):0}else return!1}}function qt(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function k4(i,e){for(;;){if(i.nodeType==3&&e)return i;if(i.nodeType==1&&e>0){if(i.contentEditable=="false")return null;i=i.childNodes[e-1],e=qt(i)}else if(i.parentNode&&!oa(i))e=Ze(i),i=i.parentNode;else return null}}function _4(i,e){for(;;){if(i.nodeType==3&&e<i.nodeValue.length)return i;if(i.nodeType==1&&e<i.childNodes.length){if(i.contentEditable=="false")return null;i=i.childNodes[e],e=0}else if(i.parentNode&&!oa(i))e=Ze(i)+1,i=i.parentNode;else return null}}function A4(i,e,t){for(let n=e==0,r=e==qt(i);n||r;){if(i==t)return!0;let s=Ze(i);if(i=i.parentNode,!i)return!1;n=n&&s==0,r=r&&s==qt(i)}}function oa(i){let e;for(let t=i;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==i||e.contentDOM==i)}const Ic=function(i){return i.focusNode&&br(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)};function Ki(i,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=i,t.key=t.code=e,t}function L4(i){let e=i.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function M4(i,e,t){if(i.caretPositionFromPoint)try{let n=i.caretPositionFromPoint(e,t);if(n)return{node:n.offsetNode,offset:Math.min(qt(n.offsetNode),n.offset)}}catch{}if(i.caretRangeFromPoint){let n=i.caretRangeFromPoint(e,t);if(n)return{node:n.startContainer,offset:Math.min(qt(n.startContainer),n.startOffset)}}}const kn=typeof navigator<"u"?navigator:null,Db=typeof document<"u"?document:null,Bi=kn&&kn.userAgent||"",gf=/Edge\/(\d+)/.exec(Bi),AT=/MSIE \d/.exec(Bi),bf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Bi),Ct=!!(AT||bf||gf),Ci=AT?document.documentMode:bf?+bf[1]:gf?+gf[1]:0,nn=!Ct&&/gecko\/(\d+)/i.test(Bi);nn&&+(/Firefox\/(\d+)/.exec(Bi)||[0,0])[1];const yf=!Ct&&/Chrome\/(\d+)/.exec(Bi),lt=!!yf,LT=yf?+yf[1]:0,mt=!Ct&&!!kn&&/Apple Computer/.test(kn.vendor),ds=mt&&(/Mobile\/\w+/.test(Bi)||!!kn&&kn.maxTouchPoints>2),jt=ds||(kn?/Mac/.test(kn.platform):!1),I4=kn?/Win/.test(kn.platform):!1,jn=/Android \d/.test(Bi),aa=!!Db&&"webkitFontSmoothing"in Db.documentElement.style,O4=aa?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function D4(i){let e=i.defaultView&&i.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:i.documentElement.clientWidth,top:0,bottom:i.documentElement.clientHeight}}function In(i,e){return typeof i=="number"?i:i[e]}function P4(i){let e=i.getBoundingClientRect(),t=e.width/i.offsetWidth||1,n=e.height/i.offsetHeight||1;return{left:e.left,right:e.left+i.clientWidth*t,top:e.top,bottom:e.top+i.clientHeight*n}}function Pb(i,e,t){let n=i.someProp("scrollThreshold")||0,r=i.someProp("scrollMargin")||5,s=i.dom.ownerDocument;for(let o=t||i.dom;o;){if(o.nodeType!=1){o=cs(o);continue}let l=o,a=l==s.body,u=a?D4(s):P4(l),c=0,h=0;if(e.top<u.top+In(n,"top")?h=-(u.top-e.top+In(r,"top")):e.bottom>u.bottom-In(n,"bottom")&&(h=e.bottom-e.top>u.bottom-u.top?e.top+In(r,"top")-u.top:e.bottom-u.bottom+In(r,"bottom")),e.left<u.left+In(n,"left")?c=-(u.left-e.left+In(r,"left")):e.right>u.right-In(n,"right")&&(c=e.right-u.right+In(r,"right")),c||h)if(a)s.defaultView.scrollBy(c,h);else{let f=l.scrollLeft,p=l.scrollTop;h&&(l.scrollTop+=h),c&&(l.scrollLeft+=c);let b=l.scrollLeft-f,m=l.scrollTop-p;e={left:e.left-b,top:e.top-m,right:e.right-b,bottom:e.bottom-m}}let d=a?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(d))break;o=d=="absolute"?o.offsetParent:cs(o)}}function R4(i){let e=i.dom.getBoundingClientRect(),t=Math.max(0,e.top),n,r;for(let s=(e.left+e.right)/2,o=t+1;o<Math.min(innerHeight,e.bottom);o+=5){let l=i.root.elementFromPoint(s,o);if(!l||l==i.dom||!i.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){n=l,r=a.top;break}}return{refDOM:n,refTop:r,stack:MT(i.dom)}}function MT(i){let e=[],t=i.ownerDocument;for(let n=i;n&&(e.push({dom:n,top:n.scrollTop,left:n.scrollLeft}),i!=t);n=cs(n));return e}function N4({refDOM:i,refTop:e,stack:t}){let n=i?i.getBoundingClientRect().top:0;IT(t,n==0?0:n-e)}function IT(i,e){for(let t=0;t<i.length;t++){let{dom:n,top:r,left:s}=i[t];n.scrollTop!=r+e&&(n.scrollTop=r+e),n.scrollLeft!=s&&(n.scrollLeft=s)}}let Or=null;function B4(i){if(i.setActive)return i.setActive();if(Or)return i.focus(Or);let e=MT(i);i.focus(Or==null?{get preventScroll(){return Or={preventScroll:!0},!0}}:void 0),Or||(Or=!1,IT(e,0))}function OT(i,e){let t,n=2e8,r,s=0,o=e.top,l=e.top,a,u;for(let c=i.firstChild,h=0;c;c=c.nextSibling,h++){let d;if(c.nodeType==1)d=c.getClientRects();else if(c.nodeType==3)d=Bn(c).getClientRects();else continue;for(let f=0;f<d.length;f++){let p=d[f];if(p.top<=o&&p.bottom>=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let b=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(b<n){t=c,n=b,r=b&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,c.nodeType==1&&b&&(s=h+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=c,u={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=h+1)}}return!t&&a&&(t=a,r=u,n=0),t&&t.nodeType==3?F4(t,r):!t||n&&t.nodeType==1?{node:i,offset:s}:OT(t,r)}function F4(i,e){let t=i.nodeValue.length,n=document.createRange();for(let r=0;r<t;r++){n.setEnd(i,r+1),n.setStart(i,r);let s=ri(n,1);if(s.top!=s.bottom&&Pm(e,s))return{node:i,offset:r+(e.left>=(s.left+s.right)/2?1:0)}}return{node:i,offset:0}}function Pm(i,e){return i.left>=e.left-1&&i.left<=e.right+1&&i.top>=e.top-1&&i.top<=e.bottom+1}function z4(i,e){let t=i.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<i.getBoundingClientRect().left?t:i}function V4(i,e,t){let{node:n,offset:r}=OT(e,t),s=-1;if(n.nodeType==1&&!n.firstChild){let o=n.getBoundingClientRect();s=o.left!=o.right&&t.left>(o.left+o.right)/2?1:-1}return i.docView.posFromDOM(n,r,s)}function H4(i,e,t,n){let r=-1;for(let s=e,o=!1;s!=i.dom;){let l=i.docView.nearestDesc(s,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&(!o&&a.left>n.left||a.top>n.top?r=l.posBefore:(!o&&a.right<n.left||a.bottom<n.top)&&(r=l.posAfter),o=!0),!l.contentDOM&&r<0&&!l.node.isText))return(l.node.isBlock?n.top<(a.top+a.bottom)/2:n.left<(a.left+a.right)/2)?l.posBefore:l.posAfter;s=l.dom.parentNode}return r>-1?r:i.docView.posFromDOM(e,t,-1)}function DT(i,e,t){let n=i.childNodes.length;if(n&&t.top<t.bottom)for(let r=Math.max(0,Math.min(n-1,Math.floor(n*(e.top-t.top)/(t.bottom-t.top))-2)),s=r;;){let o=i.childNodes[s];if(o.nodeType==1){let l=o.getClientRects();for(let a=0;a<l.length;a++){let u=l[a];if(Pm(e,u))return DT(o,e,u)}}if((s=(s+1)%n)==r)break}return i}function j4(i,e){let t=i.dom.ownerDocument,n,r=0,s=M4(t,e.left,e.top);s&&({node:n,offset:r}=s);let o=(i.root.elementFromPoint?i.root:t).elementFromPoint(e.left,e.top),l;if(!o||!i.dom.contains(o.nodeType!=1?o.parentNode:o)){let u=i.dom.getBoundingClientRect();if(!Pm(e,u)||(o=DT(i.dom,e,u),!o))return null}if(mt)for(let u=o;n&&u;u=cs(u))u.draggable&&(n=void 0);if(o=z4(o,e),n){if(nn&&n.nodeType==1&&(r=Math.min(r,n.childNodes.length),r<n.childNodes.length)){let c=n.childNodes[r],h;c.nodeName=="IMG"&&(h=c.getBoundingClientRect()).right<=e.left&&h.bottom>e.top&&r++}let u;aa&&r&&n.nodeType==1&&(u=n.childNodes[r-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&r--,n==i.dom&&r==n.childNodes.length-1&&n.lastChild.nodeType==1&&e.top>n.lastChild.getBoundingClientRect().bottom?l=i.state.doc.content.size:(r==0||n.nodeType!=1||n.childNodes[r-1].nodeName!="BR")&&(l=H4(i,n,r,e))}l==null&&(l=V4(i,o,e));let a=i.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Rb(i){return i.top<i.bottom||i.left<i.right}function ri(i,e){let t=i.getClientRects();if(t.length){let n=t[e<0?0:t.length-1];if(Rb(n))return n}return Array.prototype.find.call(t,Rb)||i.getBoundingClientRect()}const $4=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function PT(i,e,t){let{node:n,offset:r,atom:s}=i.docView.domFromPos(e,t<0?-1:1),o=aa||nn;if(n.nodeType==3)if(o&&($4.test(n.nodeValue)||(t<0?!r:r==n.nodeValue.length))){let a=ri(Bn(n,r,r),t);if(nn&&r&&/\s/.test(n.nodeValue[r-1])&&r<n.nodeValue.length){let u=ri(Bn(n,r-1,r-1),-1);if(u.top==a.top){let c=ri(Bn(n,r,r+1),-1);if(c.top!=a.top)return Ns(c,c.left<u.left)}}return a}else{let a=r,u=r,c=t<0?1:-1;return t<0&&!r?(u++,c=-1):t>=0&&r==n.nodeValue.length?(a--,c=1):t<0?a--:u++,Ns(ri(Bn(n,a,u),c),c<0)}if(!i.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&r&&(t<0||r==qt(n))){let a=n.childNodes[r-1];if(a.nodeType==1)return Rd(a.getBoundingClientRect(),!1)}if(s==null&&r<qt(n)){let a=n.childNodes[r];if(a.nodeType==1)return Rd(a.getBoundingClientRect(),!0)}return Rd(n.getBoundingClientRect(),t>=0)}if(s==null&&r&&(t<0||r==qt(n))){let a=n.childNodes[r-1],u=a.nodeType==3?Bn(a,qt(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return Ns(ri(u,1),!1)}if(s==null&&r<qt(n)){let a=n.childNodes[r];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let u=a?a.nodeType==3?Bn(a,0,o?0:1):a.nodeType==1?a:null:null;if(u)return Ns(ri(u,-1),!0)}return Ns(ri(n.nodeType==3?Bn(n):n,-t),t>=0)}function Ns(i,e){if(i.width==0)return i;let t=e?i.left:i.right;return{top:i.top,bottom:i.bottom,left:t,right:t}}function Rd(i,e){if(i.height==0)return i;let t=e?i.top:i.bottom;return{top:t,bottom:t,left:i.left,right:i.right}}function RT(i,e,t){let n=i.state,r=i.root.activeElement;n!=e&&i.updateState(e),r!=i.dom&&i.focus();try{return t()}finally{n!=e&&i.updateState(n),r!=i.dom&&r&&r.focus()}}function q4(i,e,t){let n=e.selection,r=t=="up"?n.$from:n.$to;return RT(i,e,()=>{let{node:s}=i.docView.domFromPos(r.pos,t=="up"?-1:1);for(;;){let l=i.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let o=PT(i,r.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Bn(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;u<a.length;u++){let c=a[u];if(c.bottom>c.top+1&&(t=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}const U4=/[\u0590-\u08ac]/;function W4(i,e,t){let{$head:n}=e.selection;if(!n.parent.isTextblock)return!1;let r=n.parentOffset,s=!r,o=r==n.parent.content.size,l=i.domSelection();return l?!U4.test(n.parent.textContent)||!l.modify?t=="left"||t=="backward"?s:o:RT(i,e,()=>{let{focusNode:a,focusOffset:u,anchorNode:c,anchorOffset:h}=i.domSelectionRange(),d=l.caretBidiLevel;l.modify("move",t,"character");let f=n.depth?i.docView.domAfterPos(n.before()):i.dom,{focusNode:p,focusOffset:b}=i.domSelectionRange(),m=p&&!f.contains(p.nodeType==1?p:p.parentNode)||a==p&&u==b;try{l.collapse(c,h),a&&(a!=c||u!=h)&&l.extend&&l.extend(a,u)}catch{}return d!=null&&(l.caretBidiLevel=d),m}):n.pos==n.start()||n.pos==n.end()}let Nb=null,Bb=null,Fb=!1;function G4(i,e,t){return Nb==e&&Bb==t?Fb:(Nb=e,Bb=t,Fb=t=="up"||t=="down"?q4(i,e,t):W4(i,e,t))}const Gt=0,zb=1,Ji=2,_n=3;class la{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=Gt,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let s,o;if(e==this.contentDOM)s=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(o)+o.size:this.posAtStart}else{let s,o;if(e==this.contentDOM)s=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(o):this.posAtEnd}let r;if(e==this.dom&&this.contentDOM)r=t>Ze(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){r=!1;break}if(s.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){r=!0;break}if(s.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let s=this.getDesc(r),o;if(s&&(!t||s.node))if(n&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))n=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let s=this.getDesc(r);if(s)return s.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],s=n+r.size;if(n==e&&s!=n){for(;!r.border&&r.children.length;)for(let o=0;o<r.children.length;o++){let l=r.children[o];if(l.size){r=l;break}}return r}if(e<s)return r.descAt(e-n-r.border);n=s}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let s=0;n<this.children.length;n++){let o=this.children[n],l=s+o.size;if(l>e||o instanceof BT){r=e-s;break}s=l}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let s;n&&!(s=this.children[n-1]).size&&s instanceof NT&&s.side>=0;n--);if(t<=0){let s,o=!0;for(;s=n?this.children[n-1]:null,!(!s||s.dom.parentNode==this.contentDOM);n--,o=!1);return s&&t&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?Ze(s.dom)+1:0}}else{let s,o=!0;for(;s=n<this.children.length?this.children[n]:null,!(!s||s.dom.parentNode==this.contentDOM);n++,o=!1);return s&&o&&!s.border&&!s.domAtom?s.domFromPos(0,t):{node:this.contentDOM,offset:s?Ze(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,s=-1;for(let o=n,l=0;;l++){let a=this.children[l],u=o+a.size;if(r==-1&&e<=u){let c=o+a.border;if(e>=c&&t<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,c);e=o;for(let h=l;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){r=Ze(d.dom)+1;break}e-=d.size}r==-1&&(r=0)}if(r>-1&&(u>t||l==this.children.length-1)){t=u;for(let c=l+1;c<this.children.length;c++){let h=this.children[c];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){s=Ze(h.dom);break}t+=h.size}s==-1&&(s=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let s=Math.min(e,t),o=Math.max(e,t);for(let f=0,p=0;f<this.children.length;f++){let b=this.children[f],m=p+b.size;if(s>p&&o<m)return b.setSelection(e-p-b.border,t-p-b.border,n,r);p=m}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),u=n.root.getSelection(),c=n.domSelectionRange(),h=!1;if((nn||mt)&&e==t){let{node:f,offset:p}=l;if(f.nodeType==3){if(h=!!(p&&f.nodeValue[p-1]==` 452`),h&&p==f.nodeValue.length)for(let b=f,m;b;b=b.parentNode){if(m=b.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:Ze(m)+1});break}let v=b.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let b=f.childNodes[p-1];h=b&&(b.nodeName=="BR"||b.contentEditable=="false")}}if(nn&&c.focusNode&&c.focusNode!=a.node&&c.focusNode.nodeType==1){let f=c.focusNode.childNodes[c.focusOffset];f&&f.contentEditable=="false"&&(r=!0)}if(!(r||h&&mt)&&br(l.node,l.offset,c.anchorNode,c.anchorOffset)&&br(a.node,a.offset,c.focusNode,c.focusOffset))return;let d=!1;if((u.extend||e==t)&&!h){u.collapse(l.node,l.offset);try{e!=t&&u.extend(a.node,a.offset),d=!0}catch{}}if(!d){if(e>t){let p=l;l=a,a=p}let f=document.createRange();f.setEnd(a.node,a.offset),f.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(f)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let s=this.children[r],o=n+s.size;if(n==o?e<=o&&t>=n:e<o&&t>n){let l=n+s.border,a=o-s.border;if(e>=l&&t<=a){this.dirty=e==n||t==o?Ji:zb,e==l&&t==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=_n:s.markDirty(e-l,t-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Ji:_n}n=o}this.dirty=Ji}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?Ji:zb;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class NT extends la{constructor(e,t,n,r){let s,o=t.type.toDOM;if(typeof o=="function"&&(o=o(n,()=>{if(!s)return r;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==Gt&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class K4 extends la{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class yr extends la{constructor(e,t,n,r,s){super(e,[],n,r),this.mark=t,this.spec=s}static create(e,t,n,r){let s=r.nodeViews[t.type.name],o=s&&s(t,r,n);return(!o||!o.dom)&&(o=Ar.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new yr(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&_n||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=_n&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Gt){let n=this.parent;for(;!n.node;)n=n.parent;n.dirty<this.dirty&&(n.dirty=this.dirty),this.dirty=Gt}}slice(e,t,n){let r=yr.create(this.parent,this.mark,!0,n),s=this.children,o=this.size;t<o&&(s=wf(s,t,o,n)),e>0&&(s=wf(s,0,e,n));for(let l=0;l<s.length;l++)s[l].parent=r;return r.children=s,r}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class ki extends la{constructor(e,t,n,r,s,o,l,a,u){super(e,[],s,o),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=l}static create(e,t,n,r,s,o){let l=s.nodeViews[t.type.name],a,u=l&&l(t,s,()=>{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)},n,r),c=u&&u.dom,h=u&&u.contentDOM;if(t.isText){if(!c)c=document.createTextNode(t.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:h}=Ar.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!h&&!t.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=VT(c,n,t),u?a=new Y4(e,t,n,r,c,h||null,d,u,s,o+1):t.isText?new Oc(e,t,n,r,c,d,s):new ki(e,t,n,r,c,h||null,d,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>H.empty)}return e}matchesNode(e,t,n){return this.dirty==Gt&&e.eq(this.node)&&gu(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,s=e.composing?this.localCompositionInfo(e,t):null,o=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new J4(this,o&&o.node,e);eR(this.node,this.innerDeco,(u,c,h)=>{u.spec.marks?a.syncToMarks(u.spec.marks,n,e):u.type.side>=0&&!h&&a.syncToMarks(c==this.node.childCount?Se.none:this.node.child(c).marks,n,e),a.placeWidget(u,e,r)},(u,c,h,d)=>{a.syncToMarks(u.marks,n,e);let f;a.findNodeMatch(u,c,h,d)||l&&e.state.selection.from>r&&e.state.selection.to<r+u.nodeSize&&(f=a.findIndexWithChild(s.node))>-1&&a.updateNodeAt(u,c,h,f,e)||a.updateNextNode(u,c,h,e,d,r)||a.addNode(u,c,h,e,r),r+=u.nodeSize}),a.syncToMarks([],n,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Ji)&&(o&&this.protectLocalComposition(e,o),FT(this.contentDOM,this.children,e),ds&&tR(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof ie)||n<t||r>t+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,l=nR(this.node.content,o,n-t,r-t);return l<0?null:{node:s,pos:l,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let s=t;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new K4(this,s,t,r);e.input.compositionNodes.push(o),this.children=wf(this.children,n,n+r.length,e,o)}update(e,t,n,r){return this.dirty==_n||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Gt}updateOuterDeco(e){if(gu(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=zT(this.dom,this.nodeDOM,vf(this.outerDeco,this.node,t),vf(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Vb(i,e,t,n,r){VT(n,e,i);let s=new ki(void 0,i,e,t,n,n,n,r,0);return s.contentDOM&&s.updateChildren(r,0),s}class Oc extends ki{constructor(e,t,n,r,s,o,l){super(e,t,n,r,s,null,o,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==_n||this.dirty!=Gt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=Gt||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=Gt,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,n){let r=this.node.cut(e,t),s=document.createTextNode(r.text);return new Oc(this.parent,r,this.outerDeco,this.innerDeco,s,s,n)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=_n)}get domAtom(){return!1}isText(e){return this.node.text==e}}class BT extends la{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Gt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Y4 extends ki{constructor(e,t,n,r,s,o,l,a,u,c){super(e,t,n,r,s,o,l,u,c),this.spec=a}update(e,t,n,r){if(this.dirty==_n)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,t,n);return s&&this.updateInner(e,t,n,r),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function FT(i,e,t){let n=i.firstChild,r=!1;for(let s=0;s<e.length;s++){let o=e[s],l=o.dom;if(l.parentNode==i){for(;l!=n;)n=Hb(n),r=!0;n=n.nextSibling}else r=!0,i.insertBefore(l,n);if(o instanceof yr){let a=n?n.previousSibling:i.lastChild;FT(o.contentDOM,o.children,t),n=a?a.nextSibling:i.firstChild}}for(;n;)n=Hb(n),r=!0;r&&t.trackWrites==i&&(t.trackWrites=null)}const oo=function(i){i&&(this.nodeName=i)};oo.prototype=Object.create(null);const Qi=[new oo];function vf(i,e,t){if(i.length==0)return Qi;let n=t?Qi[0]:new oo,r=[n];for(let s=0;s<i.length;s++){let o=i[s].type.attrs;if(o){o.nodeName&&r.push(n=new oo(o.nodeName));for(let l in o){let a=o[l];a!=null&&(t&&r.length==1&&r.push(n=new oo(e.isInline?"span":"div")),l=="class"?n.class=(n.class?n.class+" ":"")+a:l=="style"?n.style=(n.style?n.style+";":"")+a:l!="nodeName"&&(n[l]=a))}}}return r}function zT(i,e,t,n){if(t==Qi&&n==Qi)return e;let r=e;for(let s=0;s<n.length;s++){let o=n[s],l=t[s];if(s){let a;l&&l.nodeName==o.nodeName&&r!=i&&(a=r.parentNode)&&a.nodeName.toLowerCase()==o.nodeName||(a=document.createElement(o.nodeName),a.pmIsDeco=!0,a.appendChild(r),l=Qi[0]),r=a}X4(r,l||Qi[0],o)}return r}function X4(i,e,t){for(let n in e)n!="class"&&n!="style"&&n!="nodeName"&&!(n in t)&&i.removeAttribute(n);for(let n in t)n!="class"&&n!="style"&&n!="nodeName"&&t[n]!=e[n]&&i.setAttribute(n,t[n]);if(e.class!=t.class){let n=e.class?e.class.split(" ").filter(Boolean):[],r=t.class?t.class.split(" ").filter(Boolean):[];for(let s=0;s<n.length;s++)r.indexOf(n[s])==-1&&i.classList.remove(n[s]);for(let s=0;s<r.length;s++)n.indexOf(r[s])==-1&&i.classList.add(r[s]);i.classList.length==0&&i.removeAttribute("class")}if(e.style!=t.style){if(e.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(e.style);)i.style.removeProperty(r[1])}t.style&&(i.style.cssText+=t.style)}}function VT(i,e,t){return zT(i,i,Qi,vf(e,t,i.nodeType!=1))}function gu(i,e){if(i.length!=e.length)return!1;for(let t=0;t<i.length;t++)if(!i[t].type.eq(e[t].type))return!1;return!0}function Hb(i){let e=i.nextSibling;return i.parentNode.removeChild(i),e}class J4{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Q4(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,s=this.stack.length>>1,o=Math.min(s,e.length);for(;r<o&&(r==s-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&e[r].type.spec.spanning!==!1;)r++;for(;r<s;)this.destroyRest(),this.top.dirty=Gt,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let u=this.top.children[a];if(u.matchesMark(e[s])&&!this.isLocked(u.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=yr.create(this.top,e[s],t,n);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,s++}}findNodeMatch(e,t,n,r){let s=-1,o;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))s=this.top.children.indexOf(o,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let u=this.top.children[l];if(u.matchesNode(e,t,n)&&!this.preMatch.matched.has(u)){s=l;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,t,n,r,s){let o=this.top.children[r];return o.dirty==_n&&o.dom==o.contentDOM&&(o.dirty=Ji),o.update(e,t,n,s)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let n=e.pmViewDesc;if(n){for(let r=this.index;r<this.top.children.length;r++)if(this.top.children[r]==n)return r}return-1}e=t}}updateNextNode(e,t,n,r,s,o){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof ki){let u=this.preMatch.matched.get(a);if(u!=null&&u!=s)return!1;let c=a.dom,h,d=this.isLocked(c)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=_n&&gu(t,a.outerDeco));if(!d&&a.update(e,t,n,r))return this.destroyBetween(this.index,l),a.dom!=c&&(this.changed=!0),this.index++,!0;if(!d&&(h=this.recreateWrapper(a,e,t,n,r,o)))return this.destroyBetween(this.index,l),this.top.children[this.index]=h,h.contentDOM&&(h.dirty=Ji,h.updateChildren(r,o+1),h.dirty=Gt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,s,o){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!gu(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let l=ki.create(this.top,t,n,r,s,o);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,t,n,r,s){let o=ki.create(this.top,e,t,n,r,s);o.contentDOM&&o.updateChildren(r,s+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let s=new NT(this.top,e,t,n);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof yr;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Oc)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((mt||lt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e=="IMG"&&(n.className="ProseMirror-separator",n.alt=""),e=="BR"&&(n.className="ProseMirror-trailingBreak");let r=new BT(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function Q4(i,e){let t=e,n=t.children.length,r=i.childCount,s=new Map,o=[];e:for(;r>0;){let l;for(;;)if(n){let u=t.children[n-1];if(u instanceof yr)t=u,n=u.children.length;else{l=u,n--;break}}else{if(t==e)break e;n=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=i.child(r-1))break;--r,s.set(l,r),o.push(l)}}return{index:r,matched:s,matches:o.reverse()}}function Z4(i,e){return i.type.side-e.type.side}function eR(i,e,t,n){let r=e.locals(i),s=0;if(r.length==0){for(let u=0;u<i.childCount;u++){let c=i.child(u);n(c,r,e.forChild(s,c),u),s+=c.nodeSize}return}let o=0,l=[],a=null;for(let u=0;;){let c,h;for(;o<r.length&&r[o].to==s;){let m=r[o++];m.widget&&(c?(h||(h=[c])).push(m):c=m)}if(c)if(h){h.sort(Z4);for(let m=0;m<h.length;m++)t(h[m],u,!!a)}else t(c,u,!!a);let d,f;if(a)f=-1,d=a,a=null;else if(u<i.childCount)f=u,d=i.child(u++);else break;for(let m=0;m<l.length;m++)l[m].to<=s&&l.splice(m--,1);for(;o<r.length&&r[o].from<=s&&r[o].to>s;)l.push(r[o++]);let p=s+d.nodeSize;if(d.isText){let m=p;o<r.length&&r[o].from<m&&(m=r[o].from);for(let v=0;v<l.length;v++)l[v].to<m&&(m=l[v].to);m<p&&(a=d.cut(m-s),d=d.cut(0,m-s),p=m,f=-1)}else for(;o<r.length&&r[o].to<p;)o++;let b=d.isInline&&!d.isLeaf?l.filter(m=>!m.inline):l.slice();n(d,b,e.forChild(s,d),f),s=p}}function tR(i){if(i.nodeName=="UL"||i.nodeName=="OL"){let e=i.style.cssText;i.style.cssText=e+"; list-style: square !important",window.getComputedStyle(i).listStyle,i.style.cssText=e}}function nR(i,e,t,n){for(let r=0,s=0;r<i.childCount&&s<=n;){let o=i.child(r++),l=s;if(s+=o.nodeSize,!o.isText)continue;let a=o.text;for(;r<i.childCount;){let u=i.child(r++);if(s+=u.nodeSize,!u.isText)break;a+=u.text}if(s>=t){if(s>=n&&a.slice(n-e.length-l,n-l)==e)return n-e.length;let u=l<n?a.lastIndexOf(e,n-l-1):-1;if(u>=0&&u+e.length+l>=t)return l+u;if(t==n&&a.length>=n+e.length-l&&a.slice(n-l,n-l+e.length)==e)return n}}return-1}function wf(i,e,t,n,r){let s=[];for(let o=0,l=0;o<i.length;o++){let a=i[o],u=l,c=l+=a.size;u>=t||c<=e?s.push(a):(u<e&&s.push(a.slice(0,e-u,n)),r&&(s.push(r),r=void 0),c>t&&s.push(a.slice(t-u,a.size,n)))}return s}function Rm(i,e=null){let t=i.domSelectionRange(),n=i.state.doc;if(!t.focusNode)return null;let r=i.docView.nearestDesc(t.focusNode),s=r&&r.size==0,o=i.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let l=n.resolve(o),a,u;if(Ic(t)){for(a=o;r&&!r.node;)r=r.parent;let h=r.node;if(r&&h.isAtom&&ne.isSelectable(h)&&r.parent&&!(h.isInline&&A4(t.focusNode,t.focusOffset,r.dom))){let d=r.posBefore;u=new ne(o==d?l:n.resolve(d))}}else{if(t instanceof i.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let h=o,d=o;for(let f=0;f<t.rangeCount;f++){let p=t.getRangeAt(f);h=Math.min(h,i.docView.posFromDOM(p.startContainer,p.startOffset,1)),d=Math.max(d,i.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(h<0)return null;[a,o]=d==i.state.selection.anchor?[d,h]:[h,d],l=n.resolve(o)}else a=i.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(a<0)return null}let c=n.resolve(a);if(!u){let h=e=="pointer"||i.state.selection.head<l.pos&&!s?1:-1;u=Nm(i,c,l,h)}return u}function HT(i){return i.editable?i.hasFocus():$T(i)&&document.activeElement&&document.activeElement.contains(i.dom)}function Un(i,e=!1){let t=i.state.selection;if(jT(i,t),!!HT(i)){if(!e&&i.input.mouseDown&&i.input.mouseDown.allowDefault&<){let n=i.domSelectionRange(),r=i.domObserver.currentSelection;if(n.anchorNode&&r.anchorNode&&br(n.anchorNode,n.anchorOffset,r.anchorNode,r.anchorOffset)){i.input.mouseDown.delayedSelectionSync=!0,i.domObserver.setCurSelection();return}}if(i.domObserver.disconnectSelection(),i.cursorWrapper)rR(i);else{let{anchor:n,head:r}=t,s,o;jb&&!(t instanceof ie)&&(t.$from.parent.inlineContent||(s=$b(i,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(o=$b(i,t.to))),i.docView.setSelection(n,r,i,e),jb&&(s&&qb(s),o&&qb(o)),t.visible?i.dom.classList.remove("ProseMirror-hideselection"):(i.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&iR(i))}i.domObserver.setCurSelection(),i.domObserver.connectSelection()}}const jb=mt||lt&<<63;function $b(i,e){let{node:t,offset:n}=i.docView.domFromPos(e,0),r=n<t.childNodes.length?t.childNodes[n]:null,s=n?t.childNodes[n-1]:null;if(mt&&r&&r.contentEditable=="false")return Nd(r);if((!r||r.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(r)return Nd(r);if(s)return Nd(s)}}function Nd(i){return i.contentEditable="true",mt&&i.draggable&&(i.draggable=!1,i.wasDraggable=!0),i}function qb(i){i.contentEditable="false",i.wasDraggable&&(i.draggable=!0,i.wasDraggable=null)}function iR(i){let e=i.dom.ownerDocument;e.removeEventListener("selectionchange",i.input.hideSelectionGuard);let t=i.domSelectionRange(),n=t.anchorNode,r=t.anchorOffset;e.addEventListener("selectionchange",i.input.hideSelectionGuard=()=>{(t.anchorNode!=n||t.anchorOffset!=r)&&(e.removeEventListener("selectionchange",i.input.hideSelectionGuard),setTimeout(()=>{(!HT(i)||i.state.selection.visible)&&i.dom.classList.remove("ProseMirror-hideselection")},20))})}function rR(i){let e=i.domSelection(),t=document.createRange();if(!e)return;let n=i.cursorWrapper.dom,r=n.nodeName=="IMG";r?t.setStart(n.parentNode,Ze(n)+1):t.setStart(n,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!r&&!i.state.selection.visible&&Ct&&Ci<=11&&(n.disabled=!0,n.disabled=!1)}function jT(i,e){if(e instanceof ne){let t=i.docView.descAt(e.from);t!=i.lastSelectedViewDesc&&(Ub(i),t&&t.selectNode(),i.lastSelectedViewDesc=t)}else Ub(i)}function Ub(i){i.lastSelectedViewDesc&&(i.lastSelectedViewDesc.parent&&i.lastSelectedViewDesc.deselectNode(),i.lastSelectedViewDesc=void 0)}function Nm(i,e,t,n){return i.someProp("createSelectionBetween",r=>r(i,e,t))||ie.between(e,t,n)}function Wb(i){return i.editable&&!i.hasFocus()?!1:$T(i)}function $T(i){let e=i.domSelectionRange();if(!e.anchorNode)return!1;try{return i.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(i.editable||i.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function sR(i){let e=i.docView.domFromPos(i.state.selection.anchor,0),t=i.domSelectionRange();return br(e.node,e.offset,t.anchorNode,t.anchorOffset)}function xf(i,e){let{$anchor:t,$head:n}=i.selection,r=e>0?t.max(n):t.min(n),s=r.parent.inlineContent?r.depth?i.doc.resolve(e>0?r.after():r.before()):null:r;return s&&se.findFrom(s,e)}function ui(i,e){return i.dispatch(i.state.tr.setSelection(e).scrollIntoView()),!0}function Gb(i,e,t){let n=i.state.selection;if(n instanceof ie)if(t.indexOf("s")>-1){let{$head:r}=n,s=r.textOffset?null:e<0?r.nodeBefore:r.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=i.state.doc.resolve(r.pos+s.nodeSize*(e<0?-1:1));return ui(i,new ie(n.$anchor,o))}else if(n.empty){if(i.endOfTextblock(e>0?"forward":"backward")){let r=xf(i.state,e);return r&&r instanceof ne?ui(i,r):!1}else if(!(jt&&t.indexOf("m")>-1)){let r=n.$head,s=r.textOffset?null:e<0?r.nodeBefore:r.nodeAfter,o;if(!s||s.isText)return!1;let l=e<0?r.pos-s.nodeSize:r.pos;return s.isAtom||(o=i.docView.descAt(l))&&!o.contentDOM?ne.isSelectable(s)?ui(i,new ne(e<0?i.state.doc.resolve(r.pos-s.nodeSize):r)):aa?ui(i,new ie(i.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(n instanceof ne&&n.node.isInline)return ui(i,new ie(e>0?n.$to:n.$from));{let r=xf(i.state,e);return r?ui(i,r):!1}}}function bu(i){return i.nodeType==3?i.nodeValue.length:i.childNodes.length}function ao(i,e){let t=i.pmViewDesc;return t&&t.size==0&&(e<0||i.nextSibling||i.nodeName!="BR")}function Dr(i,e){return e<0?oR(i):aR(i)}function oR(i){let e=i.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let r,s,o=!1;for(nn&&t.nodeType==1&&n<bu(t)&&ao(t.childNodes[n],-1)&&(o=!0);;)if(n>0){if(t.nodeType!=1)break;{let l=t.childNodes[n-1];if(ao(l,-1))r=t,s=--n;else if(l.nodeType==3)t=l,n=t.nodeValue.length;else break}}else{if(qT(t))break;{let l=t.previousSibling;for(;l&&ao(l,-1);)r=t.parentNode,s=Ze(l),l=l.previousSibling;if(l)t=l,n=bu(t);else{if(t=t.parentNode,t==i.dom)break;n=0}}}o?Ef(i,t,n):r&&Ef(i,r,s)}function aR(i){let e=i.domSelectionRange(),t=e.focusNode,n=e.focusOffset;if(!t)return;let r=bu(t),s,o;for(;;)if(n<r){if(t.nodeType!=1)break;let l=t.childNodes[n];if(ao(l,1))s=t,o=++n;else break}else{if(qT(t))break;{let l=t.nextSibling;for(;l&&ao(l,1);)s=l.parentNode,o=Ze(l)+1,l=l.nextSibling;if(l)t=l,n=0,r=bu(t);else{if(t=t.parentNode,t==i.dom)break;n=r=0}}}s&&Ef(i,s,o)}function qT(i){let e=i.pmViewDesc;return e&&e.node&&e.node.isBlock}function lR(i,e){for(;i&&e==i.childNodes.length&&!oa(i);)e=Ze(i)+1,i=i.parentNode;for(;i&&e<i.childNodes.length;){let t=i.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;i=t,e=0}}function uR(i,e){for(;i&&!e&&!oa(i);)e=Ze(i),i=i.parentNode;for(;i&&e;){let t=i.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;i=t,e=i.childNodes.length}}function Ef(i,e,t){if(e.nodeType!=3){let s,o;(o=lR(e,t))?(e=o,t=0):(s=uR(e,t))&&(e=s,t=s.nodeValue.length)}let n=i.domSelection();if(!n)return;if(Ic(n)){let s=document.createRange();s.setEnd(e,t),s.setStart(e,t),n.removeAllRanges(),n.addRange(s)}else n.extend&&n.extend(e,t);i.domObserver.setCurSelection();let{state:r}=i;setTimeout(()=>{i.state==r&&Un(i)},50)}function Kb(i,e){let t=i.state.doc.resolve(e);if(!(lt||I4)&&t.parent.inlineContent){let r=i.coordsAtPos(e);if(e>t.start()){let s=i.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(s.left-r.left)>1)return s.left<r.left?"ltr":"rtl"}if(e<t.end()){let s=i.coordsAtPos(e+1),o=(s.top+s.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(s.left-r.left)>1)return s.left>r.left?"ltr":"rtl"}}return getComputedStyle(i.dom).direction=="rtl"?"rtl":"ltr"}function Yb(i,e,t){let n=i.state.selection;if(n instanceof ie&&!n.empty||t.indexOf("s")>-1||jt&&t.indexOf("m")>-1)return!1;let{$from:r,$to:s}=n;if(!r.parent.inlineContent||i.endOfTextblock(e<0?"up":"down")){let o=xf(i.state,e);if(o&&o instanceof ne)return ui(i,o)}if(!r.parent.inlineContent){let o=e<0?r:s,l=n instanceof Wt?se.near(o,e):se.findFrom(o,e);return l?ui(i,l):!1}return!1}function Xb(i,e){if(!(i.state.selection instanceof ie))return!0;let{$head:t,$anchor:n,empty:r}=i.state.selection;if(!t.sameParent(n))return!0;if(!r)return!1;if(i.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let o=i.state.tr;return e<0?o.delete(t.pos-s.nodeSize,t.pos):o.delete(t.pos,t.pos+s.nodeSize),i.dispatch(o),!0}return!1}function Jb(i,e,t){i.domObserver.stop(),e.contentEditable=t,i.domObserver.start()}function cR(i){if(!mt||i.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=i.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let n=e.firstChild;Jb(i,n,"true"),setTimeout(()=>Jb(i,n,"false"),20)}return!1}function dR(i){let e="";return i.ctrlKey&&(e+="c"),i.metaKey&&(e+="m"),i.altKey&&(e+="a"),i.shiftKey&&(e+="s"),e}function hR(i,e){let t=e.keyCode,n=dR(e);if(t==8||jt&&t==72&&n=="c")return Xb(i,-1)||Dr(i,-1);if(t==46&&!e.shiftKey||jt&&t==68&&n=="c")return Xb(i,1)||Dr(i,1);if(t==13||t==27)return!0;if(t==37||jt&&t==66&&n=="c"){let r=t==37?Kb(i,i.state.selection.from)=="ltr"?-1:1:-1;return Gb(i,r,n)||Dr(i,r)}else if(t==39||jt&&t==70&&n=="c"){let r=t==39?Kb(i,i.state.selection.from)=="ltr"?1:-1:1;return Gb(i,r,n)||Dr(i,r)}else{if(t==38||jt&&t==80&&n=="c")return Yb(i,-1,n)||Dr(i,-1);if(t==40||jt&&t==78&&n=="c")return cR(i)||Yb(i,1,n)||Dr(i,1);if(n==(jt?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Bm(i,e){i.someProp("transformCopied",f=>{e=f(e,i)});let t=[],{content:n,openStart:r,openEnd:s}=e;for(;r>1&&s>1&&n.childCount==1&&n.firstChild.childCount==1;){r--,s--;let f=n.firstChild;t.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),n=f.content}let o=i.someProp("clipboardSerializer")||Ar.fromSchema(i.state.schema),l=XT(),a=l.createElement("div");a.appendChild(o.serializeFragment(n,{document:l}));let u=a.firstChild,c,h=0;for(;u&&u.nodeType==1&&(c=YT[u.nodeName.toLowerCase()]);){for(let f=c.length-1;f>=0;f--){let p=l.createElement(c[f]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),h++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${r} ${s}${h?` -${h}`:""} ${JSON.stringify(t)}`);let d=i.someProp("clipboardTextSerializer",f=>f(e,i))||e.content.textBetween(0,e.content.size,` 453 454`);return{dom:a,text:d,slice:e}}function UT(i,e,t,n,r){let s=r.parent.type.spec.code,o,l;if(!t&&!e)return null;let a=e&&(n||s||!t);if(a){if(i.someProp("transformPastedText",d=>{e=d(e,s||n,i)}),s)return e?new K(H.from(i.state.schema.text(e.replace(/\r\n?/g,` 455`))),0,0):K.empty;let h=i.someProp("clipboardTextParser",d=>d(e,r,n,i));if(h)l=h;else{let d=r.marks(),{schema:f}=i.state,p=Ar.fromSchema(f);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(b=>{let m=o.appendChild(document.createElement("p"));b&&m.appendChild(p.serializeNode(f.text(b,d)))})}}else i.someProp("transformPastedHTML",h=>{t=h(t,i)}),o=gR(t),aa&&bR(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let h=+c[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(l||(l=(i.someProp("clipboardParser")||i.someProp("domParser")||ro.fromSchema(i.state.schema)).parseSlice(o,{preserveWhitespace:!!(a||c),context:r,ruleFromNode(d){return d.nodeName=="BR"&&!d.nextSibling&&d.parentNode&&!fR.test(d.parentNode.nodeName)?{ignore:!0}:null}})),c)l=yR(Qb(l,+c[1],+c[2]),c[4]);else if(l=K.maxOpen(pR(l.content,r),!0),l.openStart||l.openEnd){let h=0,d=0;for(let f=l.content.firstChild;h<l.openStart&&!f.type.spec.isolating;h++,f=f.firstChild);for(let f=l.content.lastChild;d<l.openEnd&&!f.type.spec.isolating;d++,f=f.lastChild);l=Qb(l,h,d)}return i.someProp("transformPasted",h=>{l=h(l,i)}),l}const fR=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function pR(i,e){if(i.childCount<2)return i;for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.index(t)),s,o=[];if(i.forEach(l=>{if(!o)return;let a=r.findWrapping(l.type),u;if(!a)return o=null;if(u=o.length&&s.length&>(a,s,l,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=KT(o[o.length-1],s.length));let c=WT(l,a);o.push(c),r=r.matchType(c.type),s=a}}),o)return H.from(o)}return i}function WT(i,e,t=0){for(let n=e.length-1;n>=t;n--)i=e[n].create(null,H.from(i));return i}function GT(i,e,t,n,r){if(r<i.length&&r<e.length&&i[r]==e[r]){let s=GT(i,e,t,n.lastChild,r+1);if(s)return n.copy(n.content.replaceChild(n.childCount-1,s));if(n.contentMatchAt(n.childCount).matchType(r==i.length-1?t.type:i[r+1]))return n.copy(n.content.append(H.from(WT(t,i,r+1))))}}function KT(i,e){if(e==0)return i;let t=i.content.replaceChild(i.childCount-1,KT(i.lastChild,e-1)),n=i.contentMatchAt(i.childCount).fillBefore(H.empty,!0);return i.copy(t.append(n))}function Tf(i,e,t,n,r,s){let o=e<0?i.firstChild:i.lastChild,l=o.content;return i.childCount>1&&(s=0),r<n-1&&(l=Tf(l,e,t,n,r+1,s)),r>=t&&(l=e<0?o.contentMatchAt(0).fillBefore(l,s<=r).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(H.empty,!0))),i.replaceChild(e<0?0:i.childCount-1,o.copy(l))}function Qb(i,e,t){return e<i.openStart&&(i=new K(Tf(i.content,-1,e,i.openStart,0,i.openEnd),e,i.openEnd)),t<i.openEnd&&(i=new K(Tf(i.content,1,t,i.openEnd,0,0),i.openStart,t)),i}const YT={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Zb=null;function XT(){return Zb||(Zb=document.implementation.createHTMLDocument("title"))}let Bd=null;function mR(i){let e=window.trustedTypes;return e?(Bd||(Bd=e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),Bd.createHTML(i)):i}function gR(i){let e=/^(\s*<meta [^>]*>)*/.exec(i);e&&(i=i.slice(e[0].length));let t=XT().createElement("div"),n=/<([a-z][^>\s]+)/i.exec(i),r;if((r=n&&YT[n[1].toLowerCase()])&&(i=r.map(s=>"<"+s+">").join("")+i+r.map(s=>"</"+s+">").reverse().join("")),t.innerHTML=mR(i),r)for(let s=0;s<r.length;s++)t=t.querySelector(r[s])||t;return t}function bR(i){let e=i.querySelectorAll(lt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let n=e[t];n.childNodes.length==1&&n.textContent=="Â "&&n.parentNode&&n.parentNode.replaceChild(i.ownerDocument.createTextNode(" "),n)}}function yR(i,e){if(!i.size)return i;let t=i.content.firstChild.type.schema,n;try{n=JSON.parse(e)}catch{return i}let{content:r,openStart:s,openEnd:o}=i;for(let l=n.length-2;l>=0;l-=2){let a=t.nodes[n[l]];if(!a||a.hasRequiredAttrs())break;r=H.from(a.create(n[l+1],r)),s++,o++}return new K(r,s,o)}const gt={},bt={},vR={touchstart:!0,touchmove:!0};class wR{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function xR(i){for(let e in gt){let t=gt[e];i.dom.addEventListener(e,i.input.eventHandlers[e]=n=>{TR(i,n)&&!Fm(i,n)&&(i.editable||!(n.type in bt))&&t(i,n)},vR[e]?{passive:!0}:void 0)}mt&&i.dom.addEventListener("input",()=>null),Sf(i)}function wi(i,e){i.input.lastSelectionOrigin=e,i.input.lastSelectionTime=Date.now()}function ER(i){i.domObserver.stop();for(let e in i.input.eventHandlers)i.dom.removeEventListener(e,i.input.eventHandlers[e]);clearTimeout(i.input.composingTimeout),clearTimeout(i.input.lastIOSEnterFallbackTimeout)}function Sf(i){i.someProp("handleDOMEvents",e=>{for(let t in e)i.input.eventHandlers[t]||i.dom.addEventListener(t,i.input.eventHandlers[t]=n=>Fm(i,n))})}function Fm(i,e){return i.someProp("handleDOMEvents",t=>{let n=t[e.type];return n?n(i,e)||e.defaultPrevented:!1})}function TR(i,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=i.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function SR(i,e){!Fm(i,e)&>[e.type]&&(i.editable||!(e.type in bt))&>[e.type](i,e)}bt.keydown=(i,e)=>{let t=e;if(i.input.shiftKey=t.keyCode==16||t.shiftKey,!QT(i,t)&&(i.input.lastKeyCode=t.keyCode,i.input.lastKeyCodeTime=Date.now(),!(jn&<&&t.keyCode==13)))if(t.keyCode!=229&&i.domObserver.forceFlush(),ds&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let n=Date.now();i.input.lastIOSEnter=n,i.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{i.input.lastIOSEnter==n&&(i.someProp("handleKeyDown",r=>r(i,Ki(13,"Enter"))),i.input.lastIOSEnter=0)},200)}else i.someProp("handleKeyDown",n=>n(i,t))||hR(i,t)?t.preventDefault():wi(i,"key")};bt.keyup=(i,e)=>{e.keyCode==16&&(i.input.shiftKey=!1)};bt.keypress=(i,e)=>{let t=e;if(QT(i,t)||!t.charCode||t.ctrlKey&&!t.altKey||jt&&t.metaKey)return;if(i.someProp("handleKeyPress",r=>r(i,t))){t.preventDefault();return}let n=i.state.selection;if(!(n instanceof ie)||!n.$from.sameParent(n.$to)){let r=String.fromCharCode(t.charCode);!/[\r\n]/.test(r)&&!i.someProp("handleTextInput",s=>s(i,n.$from.pos,n.$to.pos,r))&&i.dispatch(i.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}};function Dc(i){return{left:i.clientX,top:i.clientY}}function CR(i,e){let t=e.x-i.clientX,n=e.y-i.clientY;return t*t+n*n<100}function zm(i,e,t,n,r){if(n==-1)return!1;let s=i.state.doc.resolve(n);for(let o=s.depth+1;o>0;o--)if(i.someProp(e,l=>o>s.depth?l(i,t,s.nodeAfter,s.before(o),r,!0):l(i,t,s.node(o),s.before(o),r,!1)))return!0;return!1}function Kr(i,e,t){if(i.focused||i.focus(),i.state.selection.eq(e))return;let n=i.state.tr.setSelection(e);n.setMeta("pointer",!0),i.dispatch(n)}function kR(i,e){if(e==-1)return!1;let t=i.state.doc.resolve(e),n=t.nodeAfter;return n&&n.isAtom&&ne.isSelectable(n)?(Kr(i,new ne(t)),!0):!1}function _R(i,e){if(e==-1)return!1;let t=i.state.selection,n,r;t instanceof ne&&(n=t.node);let s=i.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let l=o>s.depth?s.nodeAfter:s.node(o);if(ne.isSelectable(l)){n&&t.$from.depth>0&&o>=t.$from.depth&&s.before(t.$from.depth+1)==t.$from.pos?r=s.before(t.$from.depth):r=s.before(o);break}}return r!=null?(Kr(i,ne.create(i.state.doc,r)),!0):!1}function AR(i,e,t,n,r){return zm(i,"handleClickOn",e,t,n)||i.someProp("handleClick",s=>s(i,e,n))||(r?_R(i,t):kR(i,t))}function LR(i,e,t,n){return zm(i,"handleDoubleClickOn",e,t,n)||i.someProp("handleDoubleClick",r=>r(i,e,n))}function MR(i,e,t,n){return zm(i,"handleTripleClickOn",e,t,n)||i.someProp("handleTripleClick",r=>r(i,e,n))||IR(i,t,n)}function IR(i,e,t){if(t.button!=0)return!1;let n=i.state.doc;if(e==-1)return n.inlineContent?(Kr(i,ie.create(n,0,n.content.size)),!0):!1;let r=n.resolve(e);for(let s=r.depth+1;s>0;s--){let o=s>r.depth?r.nodeAfter:r.node(s),l=r.before(s);if(o.inlineContent)Kr(i,ie.create(n,l+1,l+1+o.content.size));else if(ne.isSelectable(o))Kr(i,ne.create(n,l));else continue;return!0}}function Vm(i){return yu(i)}const JT=jt?"metaKey":"ctrlKey";gt.mousedown=(i,e)=>{let t=e;i.input.shiftKey=t.shiftKey;let n=Vm(i),r=Date.now(),s="singleClick";r-i.input.lastClick.time<500&&CR(t,i.input.lastClick)&&!t[JT]&&(i.input.lastClick.type=="singleClick"?s="doubleClick":i.input.lastClick.type=="doubleClick"&&(s="tripleClick")),i.input.lastClick={time:r,x:t.clientX,y:t.clientY,type:s};let o=i.posAtCoords(Dc(t));o&&(s=="singleClick"?(i.input.mouseDown&&i.input.mouseDown.done(),i.input.mouseDown=new OR(i,o,t,!!n)):(s=="doubleClick"?LR:MR)(i,o.pos,o.inside,t)?t.preventDefault():wi(i,"pointer"))};class OR{constructor(e,t,n,r){this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[JT],this.allowDefault=n.shiftKey;let s,o;if(t.inside>-1)s=e.state.doc.nodeAt(t.inside),o=t.inside;else{let c=e.state.doc.resolve(t.pos);s=c.parent,o=c.depth?c.before():0}const l=r?null:n.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:u}=e.state;(n.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof ne&&u.from<=o&&u.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&nn&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),wi(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Un(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Dc(e))),this.updateAllowDefault(e),this.allowDefault||!t?wi(this.view,"pointer"):AR(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||mt&&this.mightDrag&&!this.mightDrag.node.isAtom||lt&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Kr(this.view,se.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):wi(this.view,"pointer")}move(e){this.updateAllowDefault(e),wi(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}gt.touchstart=i=>{i.input.lastTouch=Date.now(),Vm(i),wi(i,"pointer")};gt.touchmove=i=>{i.input.lastTouch=Date.now(),wi(i,"pointer")};gt.contextmenu=i=>Vm(i);function QT(i,e){return i.composing?!0:mt&&Math.abs(e.timeStamp-i.input.compositionEndedAt)<500?(i.input.compositionEndedAt=-2e8,!0):!1}const DR=jn?5e3:-1;bt.compositionstart=bt.compositionupdate=i=>{if(!i.composing){i.domObserver.flush();let{state:e}=i,t=e.selection.$to;if(e.selection instanceof ie&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(n=>n.type.spec.inclusive===!1)))i.markCursor=i.state.storedMarks||t.marks(),yu(i,!0),i.markCursor=null;else if(yu(i,!e.selection.empty),nn&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let n=i.domSelectionRange();for(let r=n.focusNode,s=n.focusOffset;r&&r.nodeType==1&&s!=0;){let o=s<0?r.lastChild:r.childNodes[s-1];if(!o)break;if(o.nodeType==3){let l=i.domSelection();l&&l.collapse(o,o.nodeValue.length);break}else r=o,s=-1}}i.input.composing=!0}ZT(i,DR)};bt.compositionend=(i,e)=>{i.composing&&(i.input.composing=!1,i.input.compositionEndedAt=e.timeStamp,i.input.compositionPendingChanges=i.domObserver.pendingRecords().length?i.input.compositionID:0,i.input.compositionNode=null,i.input.compositionPendingChanges&&Promise.resolve().then(()=>i.domObserver.flush()),i.input.compositionID++,ZT(i,20))};function ZT(i,e){clearTimeout(i.input.composingTimeout),e>-1&&(i.input.composingTimeout=setTimeout(()=>yu(i),e))}function eS(i){for(i.composing&&(i.input.composing=!1,i.input.compositionEndedAt=RR());i.input.compositionNodes.length>0;)i.input.compositionNodes.pop().markParentsDirty()}function PR(i){let e=i.domSelectionRange();if(!e.focusNode)return null;let t=k4(e.focusNode,e.focusOffset),n=_4(e.focusNode,e.focusOffset);if(t&&n&&t!=n){let r=n.pmViewDesc,s=i.domObserver.lastChangedTextNode;if(t==s||n==s)return s;if(!r||!r.isText(n.nodeValue))return n;if(i.input.compositionNode==n){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return n}}return t||n}function RR(){let i=document.createEvent("Event");return i.initEvent("event",!0,!0),i.timeStamp}function yu(i,e=!1){if(!(jn&&i.domObserver.flushingSoon>=0)){if(i.domObserver.forceFlush(),eS(i),e||i.docView&&i.docView.dirty){let t=Rm(i);return t&&!t.eq(i.state.selection)?i.dispatch(i.state.tr.setSelection(t)):(i.markCursor||e)&&!i.state.selection.empty?i.dispatch(i.state.tr.deleteSelection()):i.updateState(i.state),!0}return!1}}function NR(i,e){if(!i.dom.parentNode)return;let t=i.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let n=getSelection(),r=document.createRange();r.selectNodeContents(e),i.dom.blur(),n.removeAllRanges(),n.addRange(r),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),i.focus()},50)}const zo=Ct&&Ci<15||ds&&O4<604;gt.copy=bt.cut=(i,e)=>{let t=e,n=i.state.selection,r=t.type=="cut";if(n.empty)return;let s=zo?null:t.clipboardData,o=n.content(),{dom:l,text:a}=Bm(i,o);s?(t.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):NR(i,l),r&&i.dispatch(i.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function BR(i){return i.openStart==0&&i.openEnd==0&&i.content.childCount==1?i.content.firstChild:null}function FR(i,e){if(!i.dom.parentNode)return;let t=i.input.shiftKey||i.state.selection.$from.parent.type.spec.code,n=i.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(n.contentEditable="true"),n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus();let r=i.input.shiftKey&&i.input.lastKeyCode!=45;setTimeout(()=>{i.focus(),n.parentNode&&n.parentNode.removeChild(n),t?Vo(i,n.value,null,r,e):Vo(i,n.textContent,n.innerHTML,r,e)},50)}function Vo(i,e,t,n,r){let s=UT(i,e,t,n,i.state.selection.$from);if(i.someProp("handlePaste",a=>a(i,r,s||K.empty)))return!0;if(!s)return!1;let o=BR(s),l=o?i.state.tr.replaceSelectionWith(o,n):i.state.tr.replaceSelection(s);return i.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function tS(i){let e=i.getData("text/plain")||i.getData("Text");if(e)return e;let t=i.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}bt.paste=(i,e)=>{let t=e;if(i.composing&&!jn)return;let n=zo?null:t.clipboardData,r=i.input.shiftKey&&i.input.lastKeyCode!=45;n&&Vo(i,tS(n),n.getData("text/html"),r,t)?t.preventDefault():FR(i,t)};class nS{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}const iS=jt?"altKey":"ctrlKey";gt.dragstart=(i,e)=>{let t=e,n=i.input.mouseDown;if(n&&n.done(),!t.dataTransfer)return;let r=i.state.selection,s=r.empty?null:i.posAtCoords(Dc(t)),o;if(!(s&&s.pos>=r.from&&s.pos<=(r instanceof ne?r.to-1:r.to))){if(n&&n.mightDrag)o=ne.create(i.state.doc,n.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let h=i.docView.nearestDesc(t.target,!0);h&&h.node.type.spec.draggable&&h!=i.docView&&(o=ne.create(i.state.doc,h.posBefore))}}let l=(o||i.state.selection).content(),{dom:a,text:u,slice:c}=Bm(i,l);(!t.dataTransfer.files.length||!lt||LT>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(zo?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",zo||t.dataTransfer.setData("text/plain",u),i.dragging=new nS(c,!t[iS],o)};gt.dragend=i=>{let e=i.dragging;window.setTimeout(()=>{i.dragging==e&&(i.dragging=null)},50)};bt.dragover=bt.dragenter=(i,e)=>e.preventDefault();bt.drop=(i,e)=>{let t=e,n=i.dragging;if(i.dragging=null,!t.dataTransfer)return;let r=i.posAtCoords(Dc(t));if(!r)return;let s=i.state.doc.resolve(r.pos),o=n&&n.slice;o?i.someProp("transformPasted",p=>{o=p(o,i)}):o=UT(i,tS(t.dataTransfer),zo?null:t.dataTransfer.getData("text/html"),!1,s);let l=!!(n&&!t[iS]);if(i.someProp("handleDrop",p=>p(i,t,o||K.empty,l))){t.preventDefault();return}if(!o)return;t.preventDefault();let a=o?wT(i.state.doc,s.pos,o):s.pos;a==null&&(a=s.pos);let u=i.state.tr;if(l){let{node:p}=n;p?p.replace(u):u.deleteSelection()}let c=u.mapping.map(a),h=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,d=u.doc;if(h?u.replaceRangeWith(c,c,o.content.firstChild):u.replaceRange(c,c,o),u.doc.eq(d))return;let f=u.doc.resolve(c);if(h&&ne.isSelectable(o.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(o.content.firstChild))u.setSelection(new ne(f));else{let p=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((b,m,v,g)=>p=g),u.setSelection(Nm(i,f,u.doc.resolve(p)))}i.focus(),i.dispatch(u.setMeta("uiEvent","drop"))};gt.focus=i=>{i.input.lastFocus=Date.now(),i.focused||(i.domObserver.stop(),i.dom.classList.add("ProseMirror-focused"),i.domObserver.start(),i.focused=!0,setTimeout(()=>{i.docView&&i.hasFocus()&&!i.domObserver.currentSelection.eq(i.domSelectionRange())&&Un(i)},20))};gt.blur=(i,e)=>{let t=e;i.focused&&(i.domObserver.stop(),i.dom.classList.remove("ProseMirror-focused"),i.domObserver.start(),t.relatedTarget&&i.dom.contains(t.relatedTarget)&&i.domObserver.currentSelection.clear(),i.focused=!1)};gt.beforeinput=(i,e)=>{if(lt&&jn&&e.inputType=="deleteContentBackward"){i.domObserver.flushSoon();let{domChangeCount:n}=i.input;setTimeout(()=>{if(i.input.domChangeCount!=n||(i.dom.blur(),i.focus(),i.someProp("handleKeyDown",s=>s(i,Ki(8,"Backspace")))))return;let{$cursor:r}=i.state.selection;r&&r.pos>0&&i.dispatch(i.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let i in bt)gt[i]=bt[i];function Ho(i,e){if(i==e)return!0;for(let t in i)if(i[t]!==e[t])return!1;for(let t in e)if(!(t in i))return!1;return!0}class vu{constructor(e,t){this.toDOM=e,this.spec=t||rr,this.side=this.spec.side||0}map(e,t,n,r){let{pos:s,deleted:o}=e.mapResult(t.from+r,this.side<0?-1:1);return o?null:new nt(s-n,s-n,this)}valid(){return!0}eq(e){return this==e||e instanceof vu&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Ho(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class _i{constructor(e,t){this.attrs=e,this.spec=t||rr}map(e,t,n,r){let s=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,o=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return s>=o?null:new nt(s,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof _i&&Ho(this.attrs,e.attrs)&&Ho(this.spec,e.spec)}static is(e){return e.type instanceof _i}destroy(){}}class Hm{constructor(e,t){this.attrs=e,this.spec=t||rr}map(e,t,n,r){let s=e.mapResult(t.from+r,1);if(s.deleted)return null;let o=e.mapResult(t.to+r,-1);return o.deleted||o.pos<=s.pos?null:new nt(s.pos-n,o.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),s;return r==t.from&&!(s=e.child(n)).isText&&r+s.nodeSize==t.to}eq(e){return this==e||e instanceof Hm&&Ho(this.attrs,e.attrs)&&Ho(this.spec,e.spec)}destroy(){}}class nt{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new nt(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new nt(e,e,new vu(t,n))}static inline(e,t,n,r){return new nt(e,t,new _i(n,r))}static node(e,t,n,r){return new nt(e,t,new Hm(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof _i}get widget(){return this.type instanceof vu}}const Nr=[],rr={};class Me{constructor(e,t){this.local=e.length?e:Nr,this.children=t.length?t:Nr}static create(e,t){return t.length?wu(t,e,0,rr):ot}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,s){for(let o=0;o<this.local.length;o++){let l=this.local[o];l.from<=t&&l.to>=e&&(!s||s(l.spec))&&n.push(l.copy(l.from+r,l.to+r))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let l=this.children[o]+1;this.children[o+2].findInner(e-l,t-l,n,r+l,s)}}map(e,t,n){return this==ot||e.maps.length==0?this:this.mapInner(e,t,0,0,n||rr)}mapInner(e,t,n,r,s){let o;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,n,r);a&&a.type.valid(t,a)?(o||(o=[])).push(a):s.onRemove&&s.onRemove(this.local[l].spec)}return this.children.length?zR(this.children,o||[],e,t,n,r,s):o?new Me(o.sort(sr),Nr):ot}add(e,t){return t.length?this==ot?Me.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,s=0;e.forEach((l,a)=>{let u=a+n,c;if(c=sS(t,l,u)){for(r||(r=this.children.slice());s<r.length&&r[s]<a;)s+=3;r[s]==a?r[s+2]=r[s+2].addInner(l,c,u+1):r.splice(s,0,a,a+l.nodeSize,wu(c,l,u+1,rr)),s+=3}});let o=rS(s?oS(t):t,-n);for(let l=0;l<o.length;l++)o[l].type.valid(e,o[l])||o.splice(l--,1);return new Me(o.length?this.local.concat(o).sort(sr):this.local,r||this.children)}remove(e){return e.length==0||this==ot?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let s=0;s<n.length;s+=3){let o,l=n[s]+t,a=n[s+1]+t;for(let c=0,h;c<e.length;c++)(h=e[c])&&h.from>l&&h.to<a&&(e[c]=null,(o||(o=[])).push(h));if(!o)continue;n==this.children&&(n=this.children.slice());let u=n[s+2].removeInner(o,l+1);u!=ot?n[s+2]=u:(n.splice(s,3),s-=3)}if(r.length){for(let s=0,o;s<e.length;s++)if(o=e[s])for(let l=0;l<r.length;l++)r[l].eq(o,t)&&(r==this.local&&(r=this.local.slice()),r.splice(l--,1))}return n==this.children&&r==this.local?this:r.length||n.length?new Me(r,n):ot}forChild(e,t){if(this==ot)return this;if(t.isLeaf)return Me.empty;let n,r;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(n=this.children[l+2]);break}let s=e+1,o=s+t.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<o&&a.to>s&&a.type instanceof _i){let u=Math.max(s,a.from)-s,c=Math.min(o,a.to)-s;u<c&&(r||(r=[])).push(a.copy(u,c))}}if(r){let l=new Me(r.sort(sr),Nr);return n?new fi([l,n]):l}return n||ot}eq(e){if(this==e)return!0;if(!(e instanceof Me)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return jm(this.localsInner(e))}localsInner(e){if(this==ot)return Nr;if(e.inlineContent||!this.local.some(_i.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof _i||t.push(this.local[n]);return t}forEachSet(e){e(this)}}Me.empty=new Me([],[]);Me.removeOverlap=jm;const ot=Me.empty;class fi{constructor(e){this.members=e}map(e,t){const n=this.members.map(r=>r.map(e,t,rr));return fi.from(n)}forChild(e,t){if(t.isLeaf)return Me.empty;let n=[];for(let r=0;r<this.members.length;r++){let s=this.members[r].forChild(e,t);s!=ot&&(s instanceof fi?n=n.concat(s.members):n.push(s))}return fi.from(n)}eq(e){if(!(e instanceof fi)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let s=this.members[r].localsInner(e);if(s.length)if(!t)t=s;else{n&&(t=t.slice(),n=!1);for(let o=0;o<s.length;o++)t.push(s[o])}}return t?jm(n?t:t.sort(sr)):Nr}static from(e){switch(e.length){case 0:return ot;case 1:return e[0];default:return new fi(e.every(t=>t instanceof Me)?e:e.reduce((t,n)=>t.concat(n instanceof Me?n:n.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function zR(i,e,t,n,r,s,o){let l=i.slice();for(let u=0,c=s;u<t.maps.length;u++){let h=0;t.maps[u].forEach((d,f,p,b)=>{let m=b-p-(f-d);for(let v=0;v<l.length;v+=3){let g=l[v+1];if(g<0||d>g+c-h)continue;let y=l[v]+c-h;f>=y?l[v+1]=d<=y?-2:-1:d>=c&&m&&(l[v]+=m,l[v+1]+=m)}h+=m}),c=t.maps[u].map(c,-1)}let a=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){a=!0,l[u+1]=-1;continue}let c=t.map(i[u]+s),h=c-r;if(h<0||h>=n.content.size){a=!0;continue}let d=t.map(i[u+1]+s,-1),f=d-r,{index:p,offset:b}=n.content.findIndex(h),m=n.maybeChild(p);if(m&&b==h&&b+m.nodeSize==f){let v=l[u+2].mapInner(t,m,c+1,i[u]+s+1,o);v!=ot?(l[u]=h,l[u+1]=f,l[u+2]=v):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=VR(l,i,e,t,r,s,o),c=wu(u,n,0,o);e=c.local;for(let h=0;h<l.length;h+=3)l[h+1]<0&&(l.splice(h,3),h-=3);for(let h=0,d=0;h<c.children.length;h+=3){let f=c.children[h];for(;d<l.length&&l[d]<f;)d+=3;l.splice(d,0,c.children[h],c.children[h+1],c.children[h+2])}}return new Me(e.sort(sr),l)}function rS(i,e){if(!e||!i.length)return i;let t=[];for(let n=0;n<i.length;n++){let r=i[n];t.push(new nt(r.from+e,r.to+e,r.type))}return t}function VR(i,e,t,n,r,s,o){function l(a,u){for(let c=0;c<a.local.length;c++){let h=a.local[c].map(n,r,u);h?t.push(h):o.onRemove&&o.onRemove(a.local[c].spec)}for(let c=0;c<a.children.length;c+=3)l(a.children[c+2],a.children[c]+u+1)}for(let a=0;a<i.length;a+=3)i[a+1]==-1&&l(i[a+2],e[a]+s+1);return t}function sS(i,e,t){if(e.isLeaf)return null;let n=t+e.nodeSize,r=null;for(let s=0,o;s<i.length;s++)(o=i[s])&&o.from>t&&o.to<n&&((r||(r=[])).push(o),i[s]=null);return r}function oS(i){let e=[];for(let t=0;t<i.length;t++)i[t]!=null&&e.push(i[t]);return e}function wu(i,e,t,n){let r=[],s=!1;e.forEach((l,a)=>{let u=sS(i,l,a+t);if(u){s=!0;let c=wu(u,l,t+a+1,n);c!=ot&&r.push(a,a+l.nodeSize,c)}});let o=rS(s?oS(i):i,-t).sort(sr);for(let l=0;l<o.length;l++)o[l].type.valid(e,o[l])||(n.onRemove&&n.onRemove(o[l].spec),o.splice(l--,1));return o.length||r.length?new Me(o,r):ot}function sr(i,e){return i.from-e.from||i.to-e.to}function jm(i){let e=i;for(let t=0;t<e.length-1;t++){let n=e[t];if(n.from!=n.to)for(let r=t+1;r<e.length;r++){let s=e[r];if(s.from==n.from){s.to!=n.to&&(e==i&&(e=i.slice()),e[r]=s.copy(s.from,n.to),ey(e,r+1,s.copy(n.to,s.to)));continue}else{s.from<n.to&&(e==i&&(e=i.slice()),e[t]=n.copy(n.from,s.from),ey(e,r,n.copy(s.from,n.to)));break}}}return e}function ey(i,e,t){for(;e<i.length&&sr(t,i[e])>0;)e++;i.splice(e,0,t)}function Fd(i){let e=[];return i.someProp("decorations",t=>{let n=t(i.state);n&&n!=ot&&e.push(n)}),i.cursorWrapper&&e.push(Me.create(i.state.doc,[i.cursorWrapper.deco])),fi.from(e)}const HR={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},jR=Ct&&Ci<=11;class $R{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class qR{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new $R,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(n=>{for(let r=0;r<n.length;r++)this.queue.push(n[r]);Ct&&Ci<=11&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),jR&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,HR)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Wb(this.view)){if(this.suppressingSelectionUpdates)return Un(this.view);if(Ct&&Ci<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&br(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let s=e.focusNode;s;s=cs(s))t.add(s);for(let s=e.anchorNode;s;s=cs(s))if(t.has(s)){n=s;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&Wb(e)&&!this.ignoreSelectionChange(n),s=-1,o=-1,l=!1,a=[];if(e.editable)for(let c=0;c<t.length;c++){let h=this.registerMutation(t[c],a);h&&(s=s<0?h.from:Math.min(h.from,s),o=o<0?h.to:Math.max(h.to,o),h.typeOver&&(l=!0))}if(nn&&a.length){let c=a.filter(h=>h.nodeName=="BR");if(c.length==2){let[h,d]=c;h.parentNode&&h.parentNode.parentNode==d.parentNode?d.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let d of c){let f=d.parentNode;f&&f.nodeName=="LI"&&(!h||GR(e,h)!=f)&&d.remove()}}}let u=null;s<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ic(n)&&(u=Rm(e))&&u.eq(se.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Un(e),this.currentSelection.set(n),e.scrollToSelection()):(s>-1||r)&&(s>-1&&(e.docView.markDirty(s,o),UR(e)),this.handleDOMChange(s,o,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||Un(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(n==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!n||n.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;c<e.addedNodes.length;c++){let h=e.addedNodes[c];t.push(h),h.nodeType==3&&(this.lastChangedTextNode=h)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,s=e.nextSibling;if(Ct&&Ci<=11&&e.addedNodes.length)for(let c=0;c<e.addedNodes.length;c++){let{previousSibling:h,nextSibling:d}=e.addedNodes[c];(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(r=h),(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(s=d)}let o=r&&r.parentNode==e.target?Ze(r)+1:0,l=n.localPosFromDOM(e.target,o,-1),a=s&&s.parentNode==e.target?Ze(s):e.target.childNodes.length,u=n.localPosFromDOM(e.target,a,1);return{from:l,to:u}}else return e.type=="attributes"?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let ty=new WeakMap,ny=!1;function UR(i){if(!ty.has(i)&&(ty.set(i,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(i.dom).whiteSpace)!==-1)){if(i.requiresGeckoHackNode=nn,ny)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),ny=!0}}function iy(i,e){let t=e.startContainer,n=e.startOffset,r=e.endContainer,s=e.endOffset,o=i.domAtPos(i.state.selection.anchor);return br(o.node,o.offset,r,s)&&([t,n,r,s]=[r,s,t,n]),{anchorNode:t,anchorOffset:n,focusNode:r,focusOffset:s}}function WR(i,e){if(e.getComposedRanges){let r=e.getComposedRanges(i.root)[0];if(r)return iy(i,r)}let t;function n(r){r.preventDefault(),r.stopImmediatePropagation(),t=r.getTargetRanges()[0]}return i.dom.addEventListener("beforeinput",n,!0),document.execCommand("indent"),i.dom.removeEventListener("beforeinput",n,!0),t?iy(i,t):null}function GR(i,e){for(let t=e.parentNode;t&&t!=i.dom;t=t.parentNode){let n=i.docView.nearestDesc(t,!0);if(n&&n.node.isBlock)return t}return null}function KR(i,e,t){let{node:n,fromOffset:r,toOffset:s,from:o,to:l}=i.docView.parseRange(e,t),a=i.domSelectionRange(),u,c=a.anchorNode;if(c&&i.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:a.anchorOffset}],Ic(a)||u.push({node:a.focusNode,offset:a.focusOffset})),lt&&i.input.lastKeyCode===8)for(let m=s;m>r;m--){let v=n.childNodes[m-1],g=v.pmViewDesc;if(v.nodeName=="BR"&&!g){s=m;break}if(!g||g.size)break}let h=i.state.doc,d=i.someProp("domParser")||ro.fromSchema(i.state.schema),f=h.resolve(o),p=null,b=d.parse(n,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:r,to:s,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:YR,context:f});if(u&&u[0].pos!=null){let m=u[0].pos,v=u[1]&&u[1].pos;v==null&&(v=m),p={anchor:m+o,head:v+o}}return{doc:b,sel:p,from:o,to:l}}function YR(i){let e=i.pmViewDesc;if(e)return e.parseRule();if(i.nodeName=="BR"&&i.parentNode){if(mt&&/^(ul|ol)$/i.test(i.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(i.parentNode.lastChild==i||mt&&/^(tr|table)$/i.test(i.parentNode.nodeName))return{ignore:!0}}else if(i.nodeName=="IMG"&&i.getAttribute("mark-placeholder"))return{ignore:!0};return null}const XR=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function JR(i,e,t,n,r){let s=i.input.compositionPendingChanges||(i.composing?i.input.compositionID:0);if(i.input.compositionPendingChanges=0,e<0){let M=i.input.lastSelectionTime>Date.now()-50?i.input.lastSelectionOrigin:null,O=Rm(i,M);if(O&&!i.state.selection.eq(O)){if(lt&&jn&&i.input.lastKeyCode===13&&Date.now()-100<i.input.lastKeyCodeTime&&i.someProp("handleKeyDown",k=>k(i,Ki(13,"Enter"))))return;let D=i.state.tr.setSelection(O);M=="pointer"?D.setMeta("pointer",!0):M=="key"&&D.scrollIntoView(),s&&D.setMeta("composition",s),i.dispatch(D)}return}let o=i.state.doc.resolve(e),l=o.sharedDepth(t);e=o.before(l+1),t=i.state.doc.resolve(t).after(l+1);let a=i.state.selection,u=KR(i,e,t),c=i.state.doc,h=c.slice(u.from,u.to),d,f;i.input.lastKeyCode===8&&Date.now()-100<i.input.lastKeyCodeTime?(d=i.state.selection.to,f="end"):(d=i.state.selection.from,f="start"),i.input.lastKeyCode=null;let p=eN(h.content,u.doc.content,u.from,d,f);if(p&&i.input.domChangeCount++,(ds&&i.input.lastIOSEnter>Date.now()-225||jn)&&r.some(M=>M.nodeType==1&&!XR.test(M.nodeName))&&(!p||p.endA>=p.endB)&&i.someProp("handleKeyDown",M=>M(i,Ki(13,"Enter")))){i.input.lastIOSEnter=0;return}if(!p)if(n&&a instanceof ie&&!a.empty&&a.$head.sameParent(a.$anchor)&&!i.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let M=ry(i,i.state.doc,u.sel);if(M&&!M.eq(i.state.selection)){let O=i.state.tr.setSelection(M);s&&O.setMeta("composition",s),i.dispatch(O)}}return}i.state.selection.from<i.state.selection.to&&p.start==p.endB&&i.state.selection instanceof ie&&(p.start>i.state.selection.from&&p.start<=i.state.selection.from+2&&i.state.selection.from>=u.from?p.start=i.state.selection.from:p.endA<i.state.selection.to&&p.endA>=i.state.selection.to-2&&i.state.selection.to<=u.to&&(p.endB+=i.state.selection.to-p.endA,p.endA=i.state.selection.to)),Ct&&Ci<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)==" Â "&&(p.start--,p.endA--,p.endB--);let b=u.doc.resolveNoCache(p.start-u.from),m=u.doc.resolveNoCache(p.endB-u.from),v=c.resolve(p.start),g=b.sameParent(m)&&b.parent.inlineContent&&v.end()>=p.endA,y;if((ds&&i.input.lastIOSEnter>Date.now()-225&&(!g||r.some(M=>M.nodeName=="DIV"||M.nodeName=="P"))||!g&&b.pos<u.doc.content.size&&!b.sameParent(m)&&(y=se.findFrom(u.doc.resolve(b.pos+1),1,!0))&&y.head==m.pos)&&i.someProp("handleKeyDown",M=>M(i,Ki(13,"Enter")))){i.input.lastIOSEnter=0;return}if(i.state.selection.anchor>p.start&&ZR(c,p.start,p.endA,b,m)&&i.someProp("handleKeyDown",M=>M(i,Ki(8,"Backspace")))){jn&<&&i.domObserver.suppressSelectionUpdates();return}lt&&p.endB==p.start&&(i.input.lastChromeDelete=Date.now()),jn&&!g&&b.start()!=m.start()&&m.parentOffset==0&&b.depth==m.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,m=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{i.someProp("handleKeyDown",function(M){return M(i,Ki(13,"Enter"))})},20));let w=p.start,E=p.endA,x,S,_;if(g){if(b.pos==m.pos)Ct&&Ci<=11&&b.parentOffset==0&&(i.domObserver.suppressSelectionUpdates(),setTimeout(()=>Un(i),20)),x=i.state.tr.delete(w,E),S=c.resolve(p.start).marksAcross(c.resolve(p.endA));else if(p.endA==p.endB&&(_=QR(b.parent.content.cut(b.parentOffset,m.parentOffset),v.parent.content.cut(v.parentOffset,p.endA-v.start()))))x=i.state.tr,_.type=="add"?x.addMark(w,E,_.mark):x.removeMark(w,E,_.mark);else if(b.parent.child(b.index()).isText&&b.index()==m.index()-(m.textOffset?0:1)){let M=b.parent.textBetween(b.parentOffset,m.parentOffset);if(i.someProp("handleTextInput",O=>O(i,w,E,M)))return;x=i.state.tr.insertText(M,w,E)}}if(x||(x=i.state.tr.replace(w,E,u.doc.slice(p.start-u.from,p.endB-u.from))),u.sel){let M=ry(i,x.doc,u.sel);M&&!(lt&&i.composing&&M.empty&&(p.start!=p.endB||i.input.lastChromeDelete<Date.now()-100)&&(M.head==w||M.head==x.mapping.map(E)-1)||Ct&&M.empty&&M.head==w)&&x.setSelection(M)}S&&x.ensureMarks(S),s&&x.setMeta("composition",s),i.dispatch(x.scrollIntoView())}function ry(i,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Nm(i,e.resolve(t.anchor),e.resolve(t.head))}function QR(i,e){let t=i.firstChild.marks,n=e.firstChild.marks,r=t,s=n,o,l,a;for(let c=0;c<n.length;c++)r=n[c].removeFromSet(r);for(let c=0;c<t.length;c++)s=t[c].removeFromSet(s);if(r.length==1&&s.length==0)l=r[0],o="add",a=c=>c.mark(l.addToSet(c.marks));else if(r.length==0&&s.length==1)l=s[0],o="remove",a=c=>c.mark(l.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<e.childCount;c++)u.push(a(e.child(c)));if(H.from(u).eq(i))return{mark:l,type:o}}function ZR(i,e,t,n,r){if(t-e<=r.pos-n.pos||zd(n,!0,!1)<r.pos)return!1;let s=i.resolve(e);if(!n.parent.isTextblock){let l=s.nodeAfter;return l!=null&&t==e+l.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let o=i.resolve(zd(s,!0,!0));return!o.parent.isTextblock||o.pos>t||zd(o,!0,!1)<t?!1:n.parent.content.cut(n.parentOffset).eq(o.parent.content)}function zd(i,e,t){let n=i.depth,r=e?i.end():i.pos;for(;n>0&&(e||i.indexAfter(n)==i.node(n).childCount);)n--,r++,e=!1;if(t){let s=i.node(n).maybeChild(i.indexAfter(n));for(;s&&!s.isLeaf;)s=s.firstChild,r++}return r}function eN(i,e,t,n,r){let s=i.findDiffStart(e,t);if(s==null)return null;let{a:o,b:l}=i.findDiffEnd(e,t+i.size,t+e.size);if(r=="end"){let a=Math.max(0,s-Math.min(o,l));n-=o+a-s}if(o<s&&i.size<e.size){let a=n<=s&&n>=o?s-n:0;s-=a,s&&s<e.size&&sy(e.textBetween(s-1,s+1))&&(s+=a?1:-1),l=s+(l-o),o=s}else if(l<s){let a=n<=s&&n>=l?s-n:0;s-=a,s&&s<i.size&&sy(i.textBetween(s-1,s+1))&&(s+=a?1:-1),o=s+(o-l),l=s}return{start:s,endA:o,endB:l}}function sy(i){if(i.length!=2)return!1;let e=i.charCodeAt(0),t=i.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class tN{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new wR,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(cy),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=ly(this),ay(this),this.nodeViews=uy(this),this.docView=Vb(this.state.doc,oy(this),Fd(this),this.dom,this),this.domObserver=new qR(this,(n,r,s,o)=>JR(this,n,r,s,o)),this.domObserver.start(),xR(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Sf(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(cy),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let r=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(eS(this),o=!0),this.state=e;let l=r.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let f=uy(this);iN(f,this.nodeViews)&&(this.nodeViews=f,s=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Sf(this),this.editable=ly(this),ay(this);let a=Fd(this),u=oy(this),c=r.plugins!=e.plugins&&!r.doc.eq(e.doc)?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",h=s||!this.docView.matchesNode(e.doc,u,a);(h||!e.selection.eq(r.selection))&&(o=!0);let d=c=="preserve"&&o&&this.dom.style.overflowAnchor==null&&R4(this);if(o){this.domObserver.stop();let f=h&&(Ct||lt)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&nN(r.selection,e.selection);if(h){let p=lt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=PR(this)),(s||!this.docView.update(e.doc,u,a,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=Vb(e.doc,u,a,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&sR(this))?Un(this,f):(jT(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),!((n=this.dragging)===null||n===void 0)&&n.node&&!r.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,r),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():d&&N4(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof ne){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Pb(this,t.getBoundingClientRect(),e)}else Pb(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let n=this.directPlugins[t];n.spec.view&&this.pluginViews.push(n.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let n=this.state.plugins[t];n.spec.view&&this.pluginViews.push(n.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let s=n.from+(this.state.doc.content.size-t.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==n.node&&(r=s)}this.dragging=new nS(e.slice,e.move,r<0?void 0:ne.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let o=0;o<this.directPlugins.length;o++){let l=this.directPlugins[o].props[e];if(l!=null&&(r=t?t(l):l))return r}let s=this.state.plugins;if(s)for(let o=0;o<s.length;o++){let l=s[o].props[e];if(l!=null&&(r=t?t(l):l))return r}}hasFocus(){if(Ct){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&B4(this.dom),Un(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return j4(this,e)}coordsAtPos(e,t=1){return PT(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return G4(this,t||this.state,e)}pasteHTML(e,t){return Vo(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Vo(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return Bm(this,e)}destroy(){this.docView&&(ER(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Fd(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,S4())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return SR(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?mt&&this.root.nodeType===11&&L4(this.dom.ownerDocument)==this.dom&&WR(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function oy(i){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(i.editable),i.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(i.state)),t)for(let n in t)n=="class"?e.class+=" "+t[n]:n=="style"?e.style=(e.style?e.style+";":"")+t[n]:!e[n]&&n!="contenteditable"&&n!="nodeName"&&(e[n]=String(t[n]))}),e.translate||(e.translate="no"),[nt.node(0,i.state.doc.content.size,e)]}function ay(i){if(i.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),i.cursorWrapper={dom:e,deco:nt.widget(i.state.selection.from,e,{raw:!0,marks:i.markCursor})}}else i.cursorWrapper=null}function ly(i){return!i.someProp("editable",e=>e(i.state)===!1)}function nN(i,e){let t=Math.min(i.$anchor.sharedDepth(i.head),e.$anchor.sharedDepth(e.head));return i.$anchor.start(t)!=e.$anchor.start(t)}function uy(i){let e=Object.create(null);function t(n){for(let r in n)Object.prototype.hasOwnProperty.call(e,r)||(e[r]=n[r])}return i.someProp("nodeViews",t),i.someProp("markViews",t),e}function iN(i,e){let t=0,n=0;for(let r in i){if(i[r]!=e[r])return!0;t++}for(let r in e)n++;return t!=n}function cy(i){if(i.spec.state||i.spec.filterTransaction||i.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Mi={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},xu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rN=typeof navigator<"u"&&/Mac/.test(navigator.platform),sN=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var et=0;et<10;et++)Mi[48+et]=Mi[96+et]=String(et);for(var et=1;et<=24;et++)Mi[et+111]="F"+et;for(var et=65;et<=90;et++)Mi[et]=String.fromCharCode(et+32),xu[et]=String.fromCharCode(et);for(var Vd in Mi)xu.hasOwnProperty(Vd)||(xu[Vd]=Mi[Vd]);function oN(i){var e=rN&&i.metaKey&&i.shiftKey&&!i.ctrlKey&&!i.altKey||sN&&i.shiftKey&&i.key&&i.key.length==1||i.key=="Unidentified",t=!e&&i.key||(i.shiftKey?xu:Mi)[i.keyCode]||i.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const aN=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function lN(i){let e=i.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let n,r,s,o;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))n=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else if(/^s(hift)?$/i.test(a))s=!0;else if(/^mod$/i.test(a))aN?o=!0:r=!0;else throw new Error("Unrecognized modifier name: "+a)}return n&&(t="Alt-"+t),r&&(t="Ctrl-"+t),o&&(t="Meta-"+t),s&&(t="Shift-"+t),t}function uN(i){let e=Object.create(null);for(let t in i)e[lN(t)]=i[t];return e}function Hd(i,e,t=!0){return e.altKey&&(i="Alt-"+i),e.ctrlKey&&(i="Ctrl-"+i),e.metaKey&&(i="Meta-"+i),t&&e.shiftKey&&(i="Shift-"+i),i}function cN(i){return new De({props:{handleKeyDown:$m(i)}})}function $m(i){let e=uN(i);return function(t,n){let r=oN(n),s,o=e[Hd(r,n)];if(o&&o(t.state,t.dispatch,t))return!0;if(r.length==1&&r!=" "){if(n.shiftKey){let l=e[Hd(r,n,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((n.shiftKey||n.altKey||n.metaKey||r.charCodeAt(0)>127)&&(s=Mi[n.keyCode])&&s!=r){let l=e[Hd(s,n)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const dN=(i,e)=>i.selection.empty?!1:(e&&e(i.tr.deleteSelection().scrollIntoView()),!0);function aS(i,e){let{$cursor:t}=i.selection;return!t||(e?!e.endOfTextblock("backward",i):t.parentOffset>0)?null:t}const hN=(i,e,t)=>{let n=aS(i,t);if(!n)return!1;let r=qm(n);if(!r){let o=n.blockRange(),l=o&&xs(o);return l==null?!1:(e&&e(i.tr.lift(o,l).scrollIntoView()),!0)}let s=r.nodeBefore;if(dS(i,r,e,-1))return!0;if(n.parent.content.size==0&&(hs(s,"end")||ne.isSelectable(s)))for(let o=n.depth;;o--){let l=Lc(i.doc,n.before(o),n.after(o),K.empty);if(l&&l.slice.size<l.to-l.from){if(e){let a=i.tr.step(l);a.setSelection(hs(s,"end")?se.findFrom(a.doc.resolve(a.mapping.map(r.pos,-1)),-1):ne.create(a.doc,r.pos-s.nodeSize)),e(a.scrollIntoView())}return!0}if(o==1||n.node(o-1).childCount>1)break}return s.isAtom&&r.depth==n.depth-1?(e&&e(i.tr.delete(r.pos-s.nodeSize,r.pos).scrollIntoView()),!0):!1},fN=(i,e,t)=>{let n=aS(i,t);if(!n)return!1;let r=qm(n);return r?lS(i,r,e):!1},pN=(i,e,t)=>{let n=uS(i,t);if(!n)return!1;let r=Um(n);return r?lS(i,r,e):!1};function lS(i,e,t){let n=e.nodeBefore,r=n,s=e.pos-1;for(;!r.isTextblock;s--){if(r.type.spec.isolating)return!1;let c=r.lastChild;if(!c)return!1;r=c}let o=e.nodeAfter,l=o,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let c=l.firstChild;if(!c)return!1;l=c}let u=Lc(i.doc,s,a,K.empty);if(!u||u.from!=s||u instanceof We&&u.slice.size>=a-s)return!1;if(t){let c=i.tr.step(u);c.setSelection(ie.create(c.doc,s)),t(c.scrollIntoView())}return!0}function hs(i,e,t=!1){for(let n=i;n;n=e=="start"?n.firstChild:n.lastChild){if(n.isTextblock)return!0;if(t&&n.childCount!=1)return!1}return!1}const mN=(i,e,t)=>{let{$head:n,empty:r}=i.selection,s=n;if(!r)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("backward",i):n.parentOffset>0)return!1;s=qm(n)}let o=s&&s.nodeBefore;return!o||!ne.isSelectable(o)?!1:(e&&e(i.tr.setSelection(ne.create(i.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function qm(i){if(!i.parent.type.spec.isolating)for(let e=i.depth-1;e>=0;e--){if(i.index(e)>0)return i.doc.resolve(i.before(e+1));if(i.node(e).type.spec.isolating)break}return null}function uS(i,e){let{$cursor:t}=i.selection;return!t||(e?!e.endOfTextblock("forward",i):t.parentOffset<t.parent.content.size)?null:t}const gN=(i,e,t)=>{let n=uS(i,t);if(!n)return!1;let r=Um(n);if(!r)return!1;let s=r.nodeAfter;if(dS(i,r,e,1))return!0;if(n.parent.content.size==0&&(hs(s,"start")||ne.isSelectable(s))){let o=Lc(i.doc,n.before(),n.after(),K.empty);if(o&&o.slice.size<o.to-o.from){if(e){let l=i.tr.step(o);l.setSelection(hs(s,"start")?se.findFrom(l.doc.resolve(l.mapping.map(r.pos)),1):ne.create(l.doc,l.mapping.map(r.pos))),e(l.scrollIntoView())}return!0}}return s.isAtom&&r.depth==n.depth-1?(e&&e(i.tr.delete(r.pos,r.pos+s.nodeSize).scrollIntoView()),!0):!1},bN=(i,e,t)=>{let{$head:n,empty:r}=i.selection,s=n;if(!r)return!1;if(n.parent.isTextblock){if(t?!t.endOfTextblock("forward",i):n.parentOffset<n.parent.content.size)return!1;s=Um(n)}let o=s&&s.nodeAfter;return!o||!ne.isSelectable(o)?!1:(e&&e(i.tr.setSelection(ne.create(i.doc,s.pos)).scrollIntoView()),!0)};function Um(i){if(!i.parent.type.spec.isolating)for(let e=i.depth-1;e>=0;e--){let t=i.node(e);if(i.index(e)+1<t.childCount)return i.doc.resolve(i.after(e+1));if(t.type.spec.isolating)break}return null}const yN=(i,e)=>{let t=i.selection,n=t instanceof ne,r;if(n){if(t.node.isTextblock||!Ni(i.doc,t.from))return!1;r=t.from}else if(r=Ac(i.doc,t.from,-1),r==null)return!1;if(e){let s=i.tr.join(r);n&&s.setSelection(ne.create(s.doc,r-i.doc.resolve(r).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},vN=(i,e)=>{let t=i.selection,n;if(t instanceof ne){if(t.node.isTextblock||!Ni(i.doc,t.to))return!1;n=t.to}else if(n=Ac(i.doc,t.to,1),n==null)return!1;return e&&e(i.tr.join(n).scrollIntoView()),!0},wN=(i,e)=>{let{$from:t,$to:n}=i.selection,r=t.blockRange(n),s=r&&xs(r);return s==null?!1:(e&&e(i.tr.lift(r,s).scrollIntoView()),!0)},xN=(i,e)=>{let{$head:t,$anchor:n}=i.selection;return!t.parent.type.spec.code||!t.sameParent(n)?!1:(e&&e(i.tr.insertText(` 456`).scrollIntoView()),!0)};function cS(i){for(let e=0;e<i.edgeCount;e++){let{type:t}=i.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const EN=(i,e)=>{let{$head:t,$anchor:n}=i.selection;if(!t.parent.type.spec.code||!t.sameParent(n))return!1;let r=t.node(-1),s=t.indexAfter(-1),o=cS(r.contentMatchAt(s));if(!o||!r.canReplaceWith(s,s,o))return!1;if(e){let l=t.after(),a=i.tr.replaceWith(l,l,o.createAndFill());a.setSelection(se.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},TN=(i,e)=>{let t=i.selection,{$from:n,$to:r}=t;if(t instanceof Wt||n.parent.inlineContent||r.parent.inlineContent)return!1;let s=cS(r.parent.contentMatchAt(r.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!n.parentOffset&&r.index()<r.parent.childCount?n:r).pos,l=i.tr.insert(o,s.createAndFill());l.setSelection(ie.create(l.doc,o+1)),e(l.scrollIntoView())}return!0},SN=(i,e)=>{let{$cursor:t}=i.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(Wr(i.doc,s))return e&&e(i.tr.split(s).scrollIntoView()),!0}let n=t.blockRange(),r=n&&xs(n);return r==null?!1:(e&&e(i.tr.lift(n,r).scrollIntoView()),!0)},CN=(i,e)=>{let{$from:t,to:n}=i.selection,r,s=t.sharedDepth(n);return s==0?!1:(r=t.before(s),e&&e(i.tr.setSelection(ne.create(i.doc,r))),!0)};function kN(i,e,t){let n=e.nodeBefore,r=e.nodeAfter,s=e.index();return!n||!r||!n.type.compatibleContent(r.type)?!1:!n.content.size&&e.parent.canReplace(s-1,s)?(t&&t(i.tr.delete(e.pos-n.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(r.isTextblock||Ni(i.doc,e.pos))?!1:(t&&t(i.tr.join(e.pos).scrollIntoView()),!0)}function dS(i,e,t,n){let r=e.nodeBefore,s=e.nodeAfter,o,l,a=r.type.spec.isolating||s.type.spec.isolating;if(!a&&kN(i,e,t))return!0;let u=!a&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(l=r.contentMatchAt(r.childCount)).findWrapping(s.type))&&l.matchType(o[0]||s.type).validEnd){if(t){let f=e.pos+s.nodeSize,p=H.empty;for(let v=o.length-1;v>=0;v--)p=H.from(o[v].create(null,p));p=H.from(r.copy(p));let b=i.tr.step(new Ge(e.pos-1,f,e.pos,f,new K(p,1,0),o.length,!0)),m=b.doc.resolve(f+2*o.length);m.nodeAfter&&m.nodeAfter.type==r.type&&Ni(b.doc,m.pos)&&b.join(m.pos),t(b.scrollIntoView())}return!0}let c=s.type.spec.isolating||n>0&&a?null:se.findFrom(e,1),h=c&&c.$from.blockRange(c.$to),d=h&&xs(h);if(d!=null&&d>=e.depth)return t&&t(i.tr.lift(h,d).scrollIntoView()),!0;if(u&&hs(s,"start",!0)&&hs(r,"end")){let f=r,p=[];for(;p.push(f),!f.isTextblock;)f=f.lastChild;let b=s,m=1;for(;!b.isTextblock;b=b.firstChild)m++;if(f.canReplace(f.childCount,f.childCount,b.content)){if(t){let v=H.empty;for(let y=p.length-1;y>=0;y--)v=H.from(p[y].copy(v));let g=i.tr.step(new Ge(e.pos-p.length,e.pos+s.nodeSize,e.pos+m,e.pos+s.nodeSize-m,new K(v,p.length,0),0,!0));t(g.scrollIntoView())}return!0}}return!1}function hS(i){return function(e,t){let n=e.selection,r=i<0?n.$from:n.$to,s=r.depth;for(;r.node(s).isInline;){if(!s)return!1;s--}return r.node(s).isTextblock?(t&&t(e.tr.setSelection(ie.create(e.doc,i<0?r.start(s):r.end(s)))),!0):!1}}const _N=hS(-1),AN=hS(1);function LN(i,e=null){return function(t,n){let{$from:r,$to:s}=t.selection,o=r.blockRange(s),l=o&&Im(o,i,e);return l?(n&&n(t.tr.wrap(o,l).scrollIntoView()),!0):!1}}function dy(i,e=null){return function(t,n){let r=!1;for(let s=0;s<t.selection.ranges.length&&!r;s++){let{$from:{pos:o},$to:{pos:l}}=t.selection.ranges[s];t.doc.nodesBetween(o,l,(a,u)=>{if(r)return!1;if(!(!a.isTextblock||a.hasMarkup(i,e)))if(a.type==i)r=!0;else{let c=t.doc.resolve(u),h=c.index();r=c.parent.canReplaceWith(h,h+1,i)}})}if(!r)return!1;if(n){let s=t.tr;for(let o=0;o<t.selection.ranges.length;o++){let{$from:{pos:l},$to:{pos:a}}=t.selection.ranges[o];s.setBlockType(l,a,i,e)}n(s.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function MN(i,e=null){return function(t,n){let{$from:r,$to:s}=t.selection,o=r.blockRange(s);if(!o)return!1;let l=n?t.tr:null;return IN(l,o,i,e)?(n&&n(l.scrollIntoView()),!0):!1}}function IN(i,e,t,n=null){let r=!1,s=e,o=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=o.resolve(e.start-2);s=new pu(a,a,e.depth),e.endIndex<e.parent.childCount&&(e=new pu(e.$from,o.resolve(e.$to.end(e.depth)),e.depth)),r=!0}let l=Im(s,t,n,e);return l?(i&&ON(i,e,l,r,t),!0):!1}function ON(i,e,t,n,r){let s=H.empty;for(let c=t.length-1;c>=0;c--)s=H.from(t[c].type.create(t[c].attrs,s));i.step(new Ge(e.start-(n?2:0),e.end,e.start,e.end,new K(s,0,0),t.length,!0));let o=0;for(let c=0;c<t.length;c++)t[c].type==r&&(o=c+1);let l=t.length-o,a=e.start+t.length-(n?2:0),u=e.parent;for(let c=e.startIndex,h=e.endIndex,d=!0;c<h;c++,d=!1)!d&&Wr(i.doc,a,l)&&(i.split(a,l),a+=2*l),a+=u.child(c).nodeSize;return i}function DN(i){return function(e,t){let{$from:n,$to:r}=e.selection,s=n.blockRange(r,o=>o.childCount>0&&o.firstChild.type==i);return s?t?n.node(s.depth-1).type==i?PN(e,t,i,s):RN(e,t,s):!0:!1}}function PN(i,e,t,n){let r=i.tr,s=n.end,o=n.$to.end(n.depth);s<o&&(r.step(new Ge(s-1,o,s,o,new K(H.from(t.create(null,n.parent.copy())),1,0),1,!0)),n=new pu(r.doc.resolve(n.$from.pos),r.doc.resolve(o),n.depth));const l=xs(n);if(l==null)return!1;r.lift(n,l);let a=r.doc.resolve(r.mapping.map(s,-1)-1);return Ni(r.doc,a.pos)&&a.nodeBefore.type==a.nodeAfter.type&&r.join(a.pos),e(r.scrollIntoView()),!0}function RN(i,e,t){let n=i.tr,r=t.parent;for(let f=t.end,p=t.endIndex-1,b=t.startIndex;p>b;p--)f-=r.child(p).nodeSize,n.delete(f-1,f+1);let s=n.doc.resolve(t.start),o=s.nodeAfter;if(n.mapping.map(t.end)!=t.start+s.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==r.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(l?0:1),c+1,o.content.append(a?H.empty:H.from(r))))return!1;let h=s.pos,d=h+o.nodeSize;return n.step(new Ge(h-(l?1:0),d+(a?1:0),h+1,d-1,new K((l?H.empty:H.from(r.copy(H.empty))).append(a?H.empty:H.from(r.copy(H.empty))),l?0:1,a?0:1),l?0:1)),e(n.scrollIntoView()),!0}function NN(i){return function(e,t){let{$from:n,$to:r}=e.selection,s=n.blockRange(r,u=>u.childCount>0&&u.firstChild.type==i);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let l=s.parent,a=l.child(o-1);if(a.type!=i)return!1;if(t){let u=a.lastChild&&a.lastChild.type==l.type,c=H.from(u?i.create():null),h=new K(H.from(i.create(null,H.from(l.type.create(null,c)))),u?3:1,0),d=s.start,f=s.end;t(e.tr.step(new Ge(d-(u?3:1),f,d,f,h,1,!0)).scrollIntoView())}return!0}}function Pc(i){const{state:e,transaction:t}=i;let{selection:n}=t,{doc:r}=t,{storedMarks:s}=t;
vendor: 36,152 bytes, lines 456-459
456return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return n},get doc(){return r},get tr(){return n=t.selection,r=t.doc,s=t.storedMarks,t}}}class Rc{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:s}=n,o=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...c)=>{const h=a(...c)(o);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(s),h}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:s}=this,{view:o}=r,l=[],a=!!e,u=e||s.tr,c=()=>(!a&&t&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(u),l.every(d=>d===!0)),h={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...b)=>{const m=this.buildProps(u,t),v=f(...b)(m);return l.push(v),h}])),run:c};return h}createCan(e){const{rawCommands:t,state:n}=this,r=!1,s=e||n.tr,o=this.buildProps(s,r);return{...Object.fromEntries(Object.entries(t).map(([a,u])=>[a,(...c)=>u(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(s,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:s}=this,{view:o}=r,l={tr:e,editor:r,view:o,state:Pc({state:s,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([a,u])=>[a,(...c)=>u(...c)(l)]))}};return l}}class BN{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){const n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}}function X(i,e,t){return i.config[e]===void 0&&i.parent?X(i.parent,e,t):typeof i.config[e]=="function"?i.config[e].bind({...t,parent:i.parent?X(i.parent,e,t):null}):i.config[e]}function Nc(i){const e=i.filter(r=>r.type==="extension"),t=i.filter(r=>r.type==="node"),n=i.filter(r=>r.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:n}}function fS(i){const e=[],{nodeExtensions:t,markExtensions:n}=Nc(i),r=[...t,...n],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return i.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage,extensions:r},a=X(o,"addGlobalAttributes",l);if(!a)return;a().forEach(c=>{c.types.forEach(h=>{Object.entries(c.attributes).forEach(([d,f])=>{e.push({type:h,name:d,attribute:{...s,...f}})})})})}),r.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage},a=X(o,"addAttributes",l);if(!a)return;const u=a();Object.entries(u).forEach(([c,h])=>{const d={...s,...h};typeof(d==null?void 0:d.default)=="function"&&(d.default=d.default()),d!=null&&d.isRequired&&(d==null?void 0:d.default)===void 0&&delete d.default,e.push({type:o.name,name:c,attribute:d})})}),e}function Ye(i,e){if(typeof i=="string"){if(!e.nodes[i])throw Error(`There is no node type named '${i}'. Maybe you forgot to add the extension?`);return e.nodes[i]}return i}function Ie(...i){return i.filter(e=>!!e).reduce((e,t)=>{const n={...e};return Object.entries(t).forEach(([r,s])=>{if(!n[r]){n[r]=s;return}if(r==="class"){const l=s?String(s).split(" "):[],a=n[r]?n[r].split(" "):[],u=l.filter(c=>!a.includes(c));n[r]=[...a,...u].join(" ")}else if(r==="style"){const l=s?s.split(";").map(c=>c.trim()).filter(Boolean):[],a=n[r]?n[r].split(";").map(c=>c.trim()).filter(Boolean):[],u=new Map;a.forEach(c=>{const[h,d]=c.split(":").map(f=>f.trim());u.set(h,d)}),l.forEach(c=>{const[h,d]=c.split(":").map(f=>f.trim());u.set(h,d)}),n[r]=Array.from(u.entries()).map(([c,h])=>`${c}: ${h}`).join("; ")}else n[r]=s}),n},{})}function Cf(i,e){return e.filter(t=>t.type===i.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(i.attrs)||{}:{[t.name]:i.attrs[t.name]}).reduce((t,n)=>Ie(t,n),{})}function pS(i){return typeof i=="function"}function ce(i,e=void 0,...t){return pS(i)?e?i.bind(e)(...t):i(...t):i}function FN(i={}){return Object.keys(i).length===0&&i.constructor===Object}function zN(i){return typeof i!="string"?i:i.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(i):i==="true"?!0:i==="false"?!1:i}function hy(i,e){return"style"in i?i:{...i,getAttrs:t=>{const n=i.getAttrs?i.getAttrs(t):i.attrs;if(n===!1)return!1;const r=e.reduce((s,o)=>{const l=o.attribute.parseHTML?o.attribute.parseHTML(t):zN(t.getAttribute(o.name));return l==null?s:{...s,[o.name]:l}},{});return{...n,...r}}}}function fy(i){return Object.fromEntries(Object.entries(i).filter(([e,t])=>e==="attrs"&&FN(t)?!1:t!=null))}function VN(i,e){var t;const n=fS(i),{nodeExtensions:r,markExtensions:s}=Nc(i),o=(t=r.find(u=>X(u,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(r.map(u=>{const c=n.filter(v=>v.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},d=i.reduce((v,g)=>{const y=X(g,"extendNodeSchema",h);return{...v,...y?y(u):{}}},{}),f=fy({...d,content:ce(X(u,"content",h)),marks:ce(X(u,"marks",h)),group:ce(X(u,"group",h)),inline:ce(X(u,"inline",h)),atom:ce(X(u,"atom",h)),selectable:ce(X(u,"selectable",h)),draggable:ce(X(u,"draggable",h)),code:ce(X(u,"code",h)),whitespace:ce(X(u,"whitespace",h)),linebreakReplacement:ce(X(u,"linebreakReplacement",h)),defining:ce(X(u,"defining",h)),isolating:ce(X(u,"isolating",h)),attrs:Object.fromEntries(c.map(v=>{var g;return[v.name,{default:(g=v==null?void 0:v.attribute)===null||g===void 0?void 0:g.default}]}))}),p=ce(X(u,"parseHTML",h));p&&(f.parseDOM=p.map(v=>hy(v,c)));const b=X(u,"renderHTML",h);b&&(f.toDOM=v=>b({node:v,HTMLAttributes:Cf(v,c)}));const m=X(u,"renderText",h);return m&&(f.toText=m),[u.name,f]})),a=Object.fromEntries(s.map(u=>{const c=n.filter(m=>m.type===u.name),h={name:u.name,options:u.options,storage:u.storage,editor:e},d=i.reduce((m,v)=>{const g=X(v,"extendMarkSchema",h);return{...m,...g?g(u):{}}},{}),f=fy({...d,inclusive:ce(X(u,"inclusive",h)),excludes:ce(X(u,"excludes",h)),group:ce(X(u,"group",h)),spanning:ce(X(u,"spanning",h)),code:ce(X(u,"code",h)),attrs:Object.fromEntries(c.map(m=>{var v;return[m.name,{default:(v=m==null?void 0:m.attribute)===null||v===void 0?void 0:v.default}]}))}),p=ce(X(u,"parseHTML",h));p&&(f.parseDOM=p.map(m=>hy(m,c)));const b=X(u,"renderHTML",h);return b&&(f.toDOM=m=>b({mark:m,HTMLAttributes:Cf(m,c)})),[u.name,f]}));return new uT({topNode:o,nodes:l,marks:a})}function jd(i,e){return e.nodes[i]||e.marks[i]||null}function py(i,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===i.name):e}function Wm(i,e){const t=Ar.fromSchema(e).serializeFragment(i),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(t),r.innerHTML}const HN=(i,e=500)=>{let t="";const n=i.parentOffset;return i.parent.nodesBetween(Math.max(0,n-e),n,(r,s,o,l)=>{var a,u;const c=((u=(a=r.type.spec).toText)===null||u===void 0?void 0:u.call(a,{node:r,pos:s,parent:o,index:l}))||r.textContent||"%leaf%";t+=r.isAtom&&!r.isText?c:c.slice(0,Math.max(0,n-s))}),t};function Gm(i){return Object.prototype.toString.call(i)==="[object RegExp]"}class Bc{constructor(e){this.find=e.find,this.handler=e.handler}}const jN=(i,e)=>{if(Gm(e))return e.exec(i);const t=e(i);if(!t)return null;const n=[t.text];return n.index=t.index,n.input=i,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),n.push(t.replaceWith)),n};function ja(i){var e;const{editor:t,from:n,to:r,text:s,rules:o,plugin:l}=i,{view:a}=t;if(a.composing)return!1;const u=a.state.doc.resolve(n);if(u.parent.type.spec.code||!((e=u.nodeBefore||u.nodeAfter)===null||e===void 0)&&e.marks.find(d=>d.type.spec.code))return!1;let c=!1;const h=HN(u)+s;return o.forEach(d=>{if(c)return;const f=jN(h,d.find);if(!f)return;const p=a.state.tr,b=Pc({state:a.state,transaction:p}),m={from:n-(f[0].length-s.length),to:r},{commands:v,chain:g,can:y}=new Rc({editor:t,state:b});d.handler({state:b,range:m,match:f,commands:v,chain:g,can:y})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:n,to:r,text:s}),a.dispatch(p),c=!0)}),c}function $N(i){const{editor:e,rules:t}=i,n=new De({state:{init(){return null},apply(r,s,o){const l=r.getMeta(n);if(l)return l;const a=r.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:c}=a;typeof c=="string"?c=c:c=Wm(H.from(c),o.schema);const{from:h}=a,d=h+c.length;ja({editor:e,from:h,to:d,text:c,rules:t,plugin:n})}),r.selectionSet||r.docChanged?null:s}},props:{handleTextInput(r,s,o,l){return ja({editor:e,from:s,to:o,text:l,rules:t,plugin:n})},handleDOMEvents:{compositionend:r=>(setTimeout(()=>{const{$cursor:s}=r.state.selection;s&&ja({editor:e,from:s.pos,to:s.pos,text:"",rules:t,plugin:n})}),!1)},handleKeyDown(r,s){if(s.key!=="Enter")return!1;const{$cursor:o}=r.state.selection;return o?ja({editor:e,from:o.pos,to:o.pos,text:` 457`,rules:t,plugin:n}):!1}},isInputRules:!0});return n}function qN(i){return Object.prototype.toString.call(i).slice(8,-1)}function $a(i){return qN(i)!=="Object"?!1:i.constructor===Object&&Object.getPrototypeOf(i)===Object.prototype}function Fc(i,e){const t={...i};return $a(i)&&$a(e)&&Object.keys(e).forEach(n=>{$a(e[n])&&$a(i[n])?t[n]=Fc(i[n],e[n]):t[n]=e[n]}),t}class An{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ce(X(this,"addOptions",{name:this.name}))),this.storage=ce(X(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new An(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>Fc(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new An(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=ce(X(t,"addOptions",{name:t.name})),t.storage=ce(X(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const o=r.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===t.name))return!1;const a=o.find(u=>(u==null?void 0:u.type.name)===t.name);return a&&n.removeStoredMark(a),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}}function UN(i){return typeof i=="number"}class WN{constructor(e){this.find=e.find,this.handler=e.handler}}const GN=(i,e,t)=>{if(Gm(e))return[...i.matchAll(e)];const n=e(i,t);return n?n.map(r=>{const s=[r.text];return s.index=r.index,s.input=i,s.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(r.replaceWith)),s}):[]};function KN(i){const{editor:e,state:t,from:n,to:r,rule:s,pasteEvent:o,dropEvent:l}=i,{commands:a,chain:u,can:c}=new Rc({editor:e,state:t}),h=[];return t.doc.nodesBetween(n,r,(f,p)=>{if(!f.isTextblock||f.type.spec.code)return;const b=Math.max(n,p),m=Math.min(r,p+f.content.size),v=f.textBetween(b-p,m-p,void 0,"");GN(v,s.find,o).forEach(y=>{if(y.index===void 0)return;const w=b+y.index+1,E=w+y[0].length,x={from:t.tr.mapping.map(w),to:t.tr.mapping.map(E)},S=s.handler({state:t,range:x,match:y,commands:a,chain:u,can:c,pasteEvent:o,dropEvent:l});h.push(S)})}),h.every(f=>f!==null)}let qa=null;const YN=i=>{var e;const t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",i),t};function XN(i){const{editor:e,rules:t}=i;let n=null,r=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const a=({state:c,from:h,to:d,rule:f,pasteEvt:p})=>{const b=c.tr,m=Pc({state:c,transaction:b});if(!(!KN({editor:e,state:m,from:Math.max(h-1,0),to:d.b-1,rule:f,pasteEvent:p,dropEvent:l})||!b.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,b}};return t.map(c=>new De({view(h){const d=p=>{var b;n=!((b=h.dom.parentElement)===null||b===void 0)&&b.contains(p.target)?h.dom.parentElement:null,n&&(qa=e)},f=()=>{qa&&(qa=null)};return window.addEventListener("dragstart",d),window.addEventListener("dragend",f),{destroy(){window.removeEventListener("dragstart",d),window.removeEventListener("dragend",f)}}},props:{handleDOMEvents:{drop:(h,d)=>{if(s=n===h.dom.parentElement,l=d,!s){const f=qa;f&&setTimeout(()=>{const p=f.state.selection;p&&f.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(h,d)=>{var f;const p=(f=d.clipboardData)===null||f===void 0?void 0:f.getData("text/html");return o=d,r=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(h,d,f)=>{const p=h[0],b=p.getMeta("uiEvent")==="paste"&&!r,m=p.getMeta("uiEvent")==="drop"&&!s,v=p.getMeta("applyPasteRules"),g=!!v;if(!b&&!m&&!g)return;if(g){let{text:E}=v;typeof E=="string"?E=E:E=Wm(H.from(E),f.schema);const{from:x}=v,S=x+E.length,_=YN(E);return a({rule:c,state:f,from:x,to:{b:S},pasteEvt:_})}const y=d.doc.content.findDiffStart(f.doc.content),w=d.doc.content.findDiffEnd(f.doc.content);if(!(!UN(y)||!w||y===w.b))return a({rule:c,state:f,from:y,to:w,pasteEvt:o})}}))}function JN(i){const e=i.filter((t,n)=>i.indexOf(t)!==n);return Array.from(new Set(e))}class Hr{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=Hr.resolve(e),this.schema=VN(this.extensions,t),this.setupExtensions()}static resolve(e){const t=Hr.sort(Hr.flatten(e)),n=JN(t.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const n={name:t.name,options:t.options,storage:t.storage},r=X(t,"addExtensions",n);return r?[t,...this.flatten(r())]:t}).flat(10)}static sort(e){return e.sort((n,r)=>{const s=X(n,"priority")||100,o=X(r,"priority")||100;return s>o?-1:s<o?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const n={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:jd(t.name,this.schema)},r=X(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){const{editor:e}=this,t=Hr.sort([...this.extensions].reverse()),n=[],r=[],s=t.map(o=>{const l={name:o.name,options:o.options,storage:o.storage,editor:e,type:jd(o.name,this.schema)},a=[],u=X(o,"addKeyboardShortcuts",l);let c={};if(o.type==="mark"&&X(o,"exitable",l)&&(c.ArrowRight=()=>An.handleExit({editor:e,mark:o})),u){const b=Object.fromEntries(Object.entries(u()).map(([m,v])=>[m,()=>v({editor:e})]));c={...c,...b}}const h=cN(c);a.push(h);const d=X(o,"addInputRules",l);py(o,e.options.enableInputRules)&&d&&n.push(...d());const f=X(o,"addPasteRules",l);py(o,e.options.enablePasteRules)&&f&&r.push(...f());const p=X(o,"addProseMirrorPlugins",l);if(p){const b=p();a.push(...b)}return a}).flat();return[$N({editor:e,rules:n}),...XN({editor:e,rules:r}),...s]}get attributes(){return fS(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Nc(this.extensions);return Object.fromEntries(t.filter(n=>!!X(n,"addNodeView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),s={name:n.name,options:n.options,storage:n.storage,editor:e,type:Ye(n.name,this.schema)},o=X(n,"addNodeView",s);if(!o)return[];const l=(a,u,c,h,d)=>{const f=Cf(a,r);return o()({node:a,view:u,getPos:c,decorations:h,innerDecorations:d,editor:e,extension:n,HTMLAttributes:f})};return[n.name,l]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:jd(e.name,this.schema)};e.type==="mark"&&(!((t=ce(X(e,"keepOnSplit",n)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);const r=X(e,"onBeforeCreate",n),s=X(e,"onCreate",n),o=X(e,"onUpdate",n),l=X(e,"onSelectionUpdate",n),a=X(e,"onTransaction",n),u=X(e,"onFocus",n),c=X(e,"onBlur",n),h=X(e,"onDestroy",n);r&&this.editor.on("beforeCreate",r),s&&this.editor.on("create",s),o&&this.editor.on("update",o),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),h&&this.editor.on("destroy",h)})}}class Oe{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ce(X(this,"addOptions",{name:this.name}))),this.storage=ce(X(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Oe(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>Fc(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Oe({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=ce(X(t,"addOptions",{name:t.name})),t.storage=ce(X(t,"addStorage",{name:t.name,options:t.options})),t}}function mS(i,e,t){const{from:n,to:r}=e,{blockSeparator:s=` 458 459`,textSerializers:o={}}=t||{};let l="";return i.nodesBetween(n,r,(a,u,c,h)=>{var d;a.isBlock&&u>n&&(l+=s);const f=o==null?void 0:o[a.type.name];if(f)return c&&(l+=f({node:a,pos:u,parent:c,index:h,range:e})),!1;a.isText&&(l+=(d=a==null?void 0:a.text)===null||d===void 0?void 0:d.slice(Math.max(n,u)-u,r-u))}),l}function Km(i){return Object.fromEntries(Object.entries(i.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const QN=Oe.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new De({key:new $e("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:i}=this,{state:e,schema:t}=i,{doc:n,selection:r}=e,{ranges:s}=r,o=Math.min(...s.map(c=>c.$from.pos)),l=Math.max(...s.map(c=>c.$to.pos)),a=Km(t);return mS(n,{from:o,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),ZN=()=>({editor:i,view:e})=>(requestAnimationFrame(()=>{var t;i.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),e5=(i=!1)=>({commands:e})=>e.setContent("",i),t5=()=>({state:i,tr:e,dispatch:t})=>{const{selection:n}=e,{ranges:r}=n;return t&&r.forEach(({$from:s,$to:o})=>{i.doc.nodesBetween(s.pos,o.pos,(l,a)=>{if(l.type.isText)return;const{doc:u,mapping:c}=e,h=u.resolve(c.map(a)),d=u.resolve(c.map(a+l.nodeSize)),f=h.blockRange(d);if(!f)return;const p=xs(f);if(l.type.isTextblock){const{defaultType:b}=h.parent.contentMatchAt(h.index());e.setNodeMarkup(f.start,b)}(p||p===0)&&e.lift(f,p)})}),!0},n5=i=>e=>i(e),i5=()=>({state:i,dispatch:e})=>TN(i,e),r5=(i,e)=>({editor:t,tr:n})=>{const{state:r}=t,s=r.doc.slice(i.from,i.to);n.deleteRange(i.from,i.to);const o=n.mapping.map(e);return n.insert(o,s.content),n.setSelection(new ie(n.doc.resolve(o-1))),!0},s5=()=>({tr:i,dispatch:e})=>{const{selection:t}=i,n=t.$anchor.node();if(n.content.size>0)return!1;const r=i.selection.$anchor;for(let s=r.depth;s>0;s-=1)if(r.node(s).type===n.type){if(e){const l=r.before(s),a=r.after(s);i.delete(l,a).scrollIntoView()}return!0}return!1},o5=i=>({tr:e,state:t,dispatch:n})=>{const r=Ye(i,t.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===r){if(n){const a=s.before(o),u=s.after(o);e.delete(a,u).scrollIntoView()}return!0}return!1},a5=i=>({tr:e,dispatch:t})=>{const{from:n,to:r}=i;return t&&e.delete(n,r),!0},l5=()=>({state:i,dispatch:e})=>dN(i,e),u5=()=>({commands:i})=>i.keyboardShortcut("Enter"),c5=()=>({state:i,dispatch:e})=>EN(i,e);function Eu(i,e,t={strict:!0}){const n=Object.keys(e);return n.length?n.every(r=>t.strict?e[r]===i[r]:Gm(e[r])?e[r].test(i[r]):e[r]===i[r]):!0}function gS(i,e,t={}){return i.find(n=>n.type===e&&Eu(Object.fromEntries(Object.keys(t).map(r=>[r,n.attrs[r]])),t))}function my(i,e,t={}){return!!gS(i,e,t)}function Ym(i,e,t){var n;if(!i||!e)return;let r=i.parent.childAfter(i.parentOffset);if((!r.node||!r.node.marks.some(c=>c.type===e))&&(r=i.parent.childBefore(i.parentOffset)),!r.node||!r.node.marks.some(c=>c.type===e)||(t=t||((n=r.node.marks[0])===null||n===void 0?void 0:n.attrs),!gS([...r.node.marks],e,t)))return;let o=r.index,l=i.start()+r.offset,a=o+1,u=l+r.node.nodeSize;for(;o>0&&my([...i.parent.child(o-1).marks],e,t);)o-=1,l-=i.parent.child(o).nodeSize;for(;a<i.parent.childCount&&my([...i.parent.child(a).marks],e,t);)u+=i.parent.child(a).nodeSize,a+=1;return{from:l,to:u}}function Fi(i,e){if(typeof i=="string"){if(!e.marks[i])throw Error(`There is no mark type named '${i}'. Maybe you forgot to add the extension?`);return e.marks[i]}return i}const d5=(i,e={})=>({tr:t,state:n,dispatch:r})=>{const s=Fi(i,n.schema),{doc:o,selection:l}=t,{$from:a,from:u,to:c}=l;if(r){const h=Ym(a,s,e);if(h&&h.from<=u&&h.to>=c){const d=ie.create(o,h.from,h.to);t.setSelection(d)}}return!0},h5=i=>e=>{const t=typeof i=="function"?i(e):i;for(let n=0;n<t.length;n+=1)if(t[n](e))return!0;return!1};function Xm(i){return i instanceof ie}function $n(i=0,e=0,t=0){return Math.min(Math.max(i,e),t)}function bS(i,e=null){if(!e)return null;const t=se.atStart(i),n=se.atEnd(i);if(e==="start"||e===!0)return t;if(e==="end")return n;const r=t.from,s=n.to;return e==="all"?ie.create(i,$n(0,r,s),$n(i.content.size,r,s)):ie.create(i,$n(e,r,s),$n(e,r,s))}function f5(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Jm(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const p5=(i=null,e={})=>({editor:t,view:n,tr:r,dispatch:s})=>{e={scrollIntoView:!0,...e};const o=()=>{(Jm()||f5())&&n.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(n.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(n.hasFocus()&&i===null||i===!1)return!0;if(s&&i===null&&!Xm(t.state.selection))return o(),!0;const l=bS(r.doc,i)||t.state.selection,a=t.state.selection.eq(l);return s&&(a||r.setSelection(l),a&&r.storedMarks&&r.setStoredMarks(r.storedMarks),o()),!0},m5=(i,e)=>t=>i.every((n,r)=>e(n,{...t,index:r})),g5=(i,e)=>({tr:t,commands:n})=>n.insertContentAt({from:t.selection.from,to:t.selection.to},i,e),yS=i=>{const e=i.childNodes;for(let t=e.length-1;t>=0;t-=1){const n=e[t];n.nodeType===3&&n.nodeValue&&/^(\n\s\s|\n)$/.test(n.nodeValue)?i.removeChild(n):n.nodeType===1&&yS(n)}return i};function Ua(i){const e=`<body>${i}</body>`,t=new window.DOMParser().parseFromString(e,"text/html").body;return yS(t)}function Tu(i,e,t){if(i instanceof Si||i instanceof H)return i;t={slice:!0,parseOptions:{},...t};const n=typeof i=="object"&&i!==null,r=typeof i=="string";if(n)try{if(Array.isArray(i)&&i.length>0)return H.fromArray(i.map(l=>e.nodeFromJSON(l)));const o=e.nodeFromJSON(i);return t.errorOnInvalidContent&&o.check(),o}catch(s){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",i,"Error:",s),Tu("",e,t)}if(r){if(t.errorOnInvalidContent){let o=!1,l="";const a=new uT({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,l=typeof u=="string"?u:u.outerHTML,null)}]}})});if(t.slice?ro.fromSchema(a).parseSlice(Ua(i),t.parseOptions):ro.fromSchema(a).parse(Ua(i),t.parseOptions),t.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const s=ro.fromSchema(e);return t.slice?s.parseSlice(Ua(i),t.parseOptions).content:s.parse(Ua(i),t.parseOptions)}return Tu("",e,t)}function b5(i,e,t){const n=i.steps.length-1;if(n<e)return;const r=i.steps[n];if(!(r instanceof We||r instanceof Ge))return;const s=i.mapping.maps[n];let o=0;s.forEach((l,a,u,c)=>{o===0&&(o=c)}),i.setSelection(se.near(i.doc.resolve(o),t))}const y5=i=>!("type"in i),v5=(i,e,t)=>({tr:n,dispatch:r,editor:s})=>{var o;if(r){t={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let l;try{l=Tu(e,s.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions},errorOnInvalidContent:(o=t.errorOnInvalidContent)!==null&&o!==void 0?o:s.options.enableContentCheck})}catch(p){return s.emit("contentError",{editor:s,error:p,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}}),!1}let{from:a,to:u}=typeof i=="number"?{from:i,to:i}:{from:i.from,to:i.to},c=!0,h=!0;if((y5(l)?l:[l]).forEach(p=>{p.check(),c=c?p.isText&&p.marks.length===0:!1,h=h?p.isBlock:!1}),a===u&&h){const{parent:p}=n.doc.resolve(a);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(a-=1,u+=1)}let f;if(c){if(Array.isArray(e))f=e.map(p=>p.text||"").join("");else if(e instanceof H){let p="";e.forEach(b=>{b.text&&(p+=b.text)}),f=p}else typeof e=="object"&&e&&e.text?f=e.text:f=e;n.insertText(f,a,u)}else f=l,n.replaceWith(a,u,f);t.updateSelection&&b5(n,n.steps.length-1,-1),t.applyInputRules&&n.setMeta("applyInputRules",{from:a,text:f}),t.applyPasteRules&&n.setMeta("applyPasteRules",{from:a,text:f})}return!0},w5=()=>({state:i,dispatch:e})=>yN(i,e),x5=()=>({state:i,dispatch:e})=>vN(i,e),E5=()=>({state:i,dispatch:e})=>hN(i,e),T5=()=>({state:i,dispatch:e})=>gN(i,e),S5=()=>({state:i,dispatch:e,tr:t})=>{try{const n=Ac(i.doc,i.selection.$from.pos,-1);return n==null?!1:(t.join(n,2),e&&e(t),!0)}catch{return!1}},C5=()=>({state:i,dispatch:e,tr:t})=>{try{const n=Ac(i.doc,i.selection.$from.pos,1);return n==null?!1:(t.join(n,2),e&&e(t),!0)}catch{return!1}},k5=()=>({state:i,dispatch:e})=>fN(i,e),_5=()=>({state:i,dispatch:e})=>pN(i,e);function vS(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function A5(i){const e=i.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let n,r,s,o;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))n=!0;else if(/^(c|ctrl|control)$/i.test(a))r=!0;else if(/^s(hift)?$/i.test(a))s=!0;else if(/^mod$/i.test(a))Jm()||vS()?o=!0:r=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return n&&(t=`Alt-${t}`),r&&(t=`Ctrl-${t}`),o&&(t=`Meta-${t}`),s&&(t=`Shift-${t}`),t}const L5=i=>({editor:e,view:t,tr:n,dispatch:r})=>{const s=A5(i).split(/-(?!$)/),o=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",u=>u(t,l))});return a==null||a.steps.forEach(u=>{const c=u.map(n.mapping);c&&r&&n.maybeStep(c)}),!0};function jo(i,e,t={}){const{from:n,to:r,empty:s}=i.selection,o=e?Ye(e,i.schema):null,l=[];i.doc.nodesBetween(n,r,(h,d)=>{if(h.isText)return;const f=Math.max(n,d),p=Math.min(r,d+h.nodeSize);l.push({node:h,from:f,to:p})});const a=r-n,u=l.filter(h=>o?o.name===h.node.type.name:!0).filter(h=>Eu(h.node.attrs,t,{strict:!1}));return s?!!u.length:u.reduce((h,d)=>h+d.to-d.from,0)>=a}const M5=(i,e={})=>({state:t,dispatch:n})=>{const r=Ye(i,t.schema);return jo(t,r,e)?wN(t,n):!1},I5=()=>({state:i,dispatch:e})=>SN(i,e),O5=i=>({state:e,dispatch:t})=>{const n=Ye(i,e.schema);return DN(n)(e,t)},D5=()=>({state:i,dispatch:e})=>xN(i,e);function zc(i,e){return e.nodes[i]?"node":e.marks[i]?"mark":null}function gy(i,e){const t=typeof e=="string"?[e]:e;return Object.keys(i).reduce((n,r)=>(t.includes(r)||(n[r]=i[r]),n),{})}const P5=(i,e)=>({tr:t,state:n,dispatch:r})=>{let s=null,o=null;const l=zc(typeof i=="string"?i:i.name,n.schema);return l?(l==="node"&&(s=Ye(i,n.schema)),l==="mark"&&(o=Fi(i,n.schema)),r&&t.selection.ranges.forEach(a=>{n.doc.nodesBetween(a.$from.pos,a.$to.pos,(u,c)=>{s&&s===u.type&&t.setNodeMarkup(c,void 0,gy(u.attrs,e)),o&&u.marks.length&&u.marks.forEach(h=>{o===h.type&&t.addMark(c,c+u.nodeSize,o.create(gy(h.attrs,e)))})})}),!0):!1},R5=()=>({tr:i,dispatch:e})=>(e&&i.scrollIntoView(),!0),N5=()=>({tr:i,dispatch:e})=>{if(e){const t=new Wt(i.doc);i.setSelection(t)}return!0},B5=()=>({state:i,dispatch:e})=>mN(i,e),F5=()=>({state:i,dispatch:e})=>bN(i,e),z5=()=>({state:i,dispatch:e})=>CN(i,e),V5=()=>({state:i,dispatch:e})=>AN(i,e),H5=()=>({state:i,dispatch:e})=>_N(i,e);function kf(i,e,t={},n={}){return Tu(i,e,{slice:!1,parseOptions:t,errorOnInvalidContent:n.errorOnInvalidContent})}const j5=(i,e=!1,t={},n={})=>({editor:r,tr:s,dispatch:o,commands:l})=>{var a,u;const{doc:c}=s;if(t.preserveWhitespace!=="full"){const h=kf(i,r.schema,t,{errorOnInvalidContent:(a=n.errorOnInvalidContent)!==null&&a!==void 0?a:r.options.enableContentCheck});return o&&s.replaceWith(0,c.content.size,h).setMeta("preventUpdate",!e),!0}return o&&s.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:c.content.size},i,{parseOptions:t,errorOnInvalidContent:(u=n.errorOnInvalidContent)!==null&&u!==void 0?u:r.options.enableContentCheck})};function wS(i,e){const t=Fi(e,i.schema),{from:n,to:r,empty:s}=i.selection,o=[];s?(i.storedMarks&&o.push(...i.storedMarks),o.push(...i.selection.$head.marks())):i.doc.nodesBetween(n,r,a=>{o.push(...a.marks)});const l=o.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function $5(i,e){const t=new Om(i);return e.forEach(n=>{n.steps.forEach(r=>{t.step(r)})}),t}function q5(i){for(let e=0;e<i.edgeCount;e+=1){const{type:t}=i.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function U5(i,e,t){const n=[];return i.nodesBetween(e.from,e.to,(r,s)=>{t(r)&&n.push({node:r,pos:s})}),n}function xS(i,e){for(let t=i.depth;t>0;t-=1){const n=i.node(t);if(e(n))return{pos:t>0?i.before(t):0,start:i.start(t),depth:t,node:n}}}function Qm(i){return e=>xS(e.$from,i)}function ES(i,e){const t={from:0,to:i.content.size};return mS(i,t,e)}function W5(i,e){const t=Ye(e,i.schema),{from:n,to:r}=i.selection,s=[];i.doc.nodesBetween(n,r,l=>{s.push(l)});const o=s.reverse().find(l=>l.type.name===t.name);return o?{...o.attrs}:{}}function TS(i,e){const t=zc(typeof e=="string"?e:e.name,i.schema);return t==="node"?W5(i,e):t==="mark"?wS(i,e):{}}function G5(i,e=JSON.stringify){const t={};return i.filter(n=>{const r=e(n);return Object.prototype.hasOwnProperty.call(t,r)?!1:t[r]=!0})}function K5(i){const e=G5(i);return e.length===1?e:e.filter((t,n)=>!e.filter((s,o)=>o!==n).some(s=>t.oldRange.from>=s.oldRange.from&&t.oldRange.to<=s.oldRange.to&&t.newRange.from>=s.newRange.from&&t.newRange.to<=s.newRange.to))}function Y5(i){const{mapping:e,steps:t}=i,n=[];return e.maps.forEach((r,s)=>{const o=[];if(r.ranges.length)r.forEach((l,a)=>{o.push({from:l,to:a})});else{const{from:l,to:a}=t[s];if(l===void 0||a===void 0)return;o.push({from:l,to:a})}o.forEach(({from:l,to:a})=>{const u=e.slice(s).map(l,-1),c=e.slice(s).map(a),h=e.invert().map(u,-1),d=e.invert().map(c);n.push({oldRange:{from:h,to:d},newRange:{from:u,to:c}})})}),K5(n)}function Zm(i,e,t){const n=[];return i===e?t.resolve(i).marks().forEach(r=>{const s=t.resolve(i),o=Ym(s,r.type);o&&n.push({mark:r,...o})}):t.nodesBetween(i,e,(r,s)=>{!r||(r==null?void 0:r.nodeSize)===void 0||n.push(...r.marks.map(o=>({from:s,to:s+r.nodeSize,mark:o})))}),n}function gl(i,e,t){return Object.fromEntries(Object.entries(t).filter(([n])=>{const r=i.find(s=>s.type===e&&s.name===n);return r?r.attribute.keepOnSplit:!1}))}function _f(i,e,t={}){const{empty:n,ranges:r}=i.selection,s=e?Fi(e,i.schema):null;if(n)return!!(i.storedMarks||i.selection.$from.marks()).filter(h=>s?s.name===h.type.name:!0).find(h=>Eu(h.attrs,t,{strict:!1}));let o=0;const l=[];if(r.forEach(({$from:h,$to:d})=>{const f=h.pos,p=d.pos;i.doc.nodesBetween(f,p,(b,m)=>{if(!b.isText&&!b.marks.length)return;const v=Math.max(f,m),g=Math.min(p,m+b.nodeSize),y=g-v;o+=y,l.push(...b.marks.map(w=>({mark:w,from:v,to:g})))})}),o===0)return!1;const a=l.filter(h=>s?s.name===h.mark.type.name:!0).filter(h=>Eu(h.mark.attrs,t,{strict:!1})).reduce((h,d)=>h+d.to-d.from,0),u=l.filter(h=>s?h.mark.type!==s&&h.mark.type.excludes(s):!0).reduce((h,d)=>h+d.to-d.from,0);return(a>0?a+u:a)>=o}function X5(i,e,t={}){if(!e)return jo(i,null,t)||_f(i,null,t);const n=zc(e,i.schema);return n==="node"?jo(i,e,t):n==="mark"?_f(i,e,t):!1}function by(i,e){const{nodeExtensions:t}=Nc(e),n=t.find(o=>o.name===i);if(!n)return!1;const r={name:n.name,options:n.options,storage:n.storage},s=ce(X(n,"group",r));return typeof s!="string"?!1:s.split(" ").includes("list")}function Vc(i,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var n;if(t){if(i.type.name==="hardBreak")return!0;if(i.isText)return/^\s*$/m.test((n=i.text)!==null&&n!==void 0?n:"")}if(i.isText)return!i.text;if(i.isAtom||i.isLeaf)return!1;if(i.content.childCount===0)return!0;if(e){let r=!0;return i.content.forEach(s=>{r!==!1&&(Vc(s,{ignoreWhitespace:t,checkChildren:e})||(r=!1))}),r}return!1}function SS(i){return i instanceof ne}function CS(i,e,t){const r=i.state.doc.content.size,s=$n(e,0,r),o=$n(t,0,r),l=i.coordsAtPos(s),a=i.coordsAtPos(o,-1),u=Math.min(l.top,a.top),c=Math.max(l.bottom,a.bottom),h=Math.min(l.left,a.left),d=Math.max(l.right,a.right),f=d-h,p=c-u,v={top:u,bottom:c,left:h,right:d,width:f,height:p,x:h,y:u};return{...v,toJSON:()=>v}}function J5(i,e,t){var n;const{selection:r}=e;let s=null;if(Xm(r)&&(s=r.$cursor),s){const l=(n=i.storedMarks)!==null&&n!==void 0?n:s.marks();return!!t.isInSet(l)||!l.some(a=>a.type.excludes(t))}const{ranges:o}=r;return o.some(({$from:l,$to:a})=>{let u=l.depth===0?i.doc.inlineContent&&i.doc.type.allowsMarkType(t):!1;return i.doc.nodesBetween(l.pos,a.pos,(c,h,d)=>{if(u)return!1;if(c.isInline){const f=!d||d.type.allowsMarkType(t),p=!!t.isInSet(c.marks)||!c.marks.some(b=>b.type.excludes(t));u=f&&p}return!u}),u})}const Q5=(i,e={})=>({tr:t,state:n,dispatch:r})=>{const{selection:s}=t,{empty:o,ranges:l}=s,a=Fi(i,n.schema);if(r)if(o){const u=wS(n,a);t.addStoredMark(a.create({...u,...e}))}else l.forEach(u=>{const c=u.$from.pos,h=u.$to.pos;n.doc.nodesBetween(c,h,(d,f)=>{const p=Math.max(f,c),b=Math.min(f+d.nodeSize,h);d.marks.find(v=>v.type===a)?d.marks.forEach(v=>{a===v.type&&t.addMark(p,b,a.create({...v.attrs,...e}))}):t.addMark(p,b,a.create(e))})});return J5(n,t,a)},Z5=(i,e)=>({tr:t})=>(t.setMeta(i,e),!0),eB=(i,e={})=>({state:t,dispatch:n,chain:r})=>{const s=Ye(i,t.schema);let o;return t.selection.$anchor.sameParent(t.selection.$head)&&(o=t.selection.$anchor.parent.attrs),s.isTextblock?r().command(({commands:l})=>dy(s,{...o,...e})(t)?!0:l.clearNodes()).command(({state:l})=>dy(s,{...o,...e})(l,n)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},tB=i=>({tr:e,dispatch:t})=>{if(t){const{doc:n}=e,r=$n(i,0,n.content.size),s=ne.create(n,r);e.setSelection(s)}return!0}
vendor: 4,347 bytes, line 459
459,nB=i=>({tr:e,dispatch:t})=>{if(t){const{doc:n}=e,{from:r,to:s}=typeof i=="number"?{from:i,to:i}:i,o=ie.atStart(n).from,l=ie.atEnd(n).to,a=$n(r,o,l),u=$n(s,o,l),c=ie.create(n,a,u);e.setSelection(c)}return!0},iB=i=>({state:e,dispatch:t})=>{const n=Ye(i,e.schema);return NN(n)(e,t)};function yy(i,e){const t=i.storedMarks||i.selection.$to.parentOffset&&i.selection.$from.marks();if(t){const n=t.filter(r=>e==null?void 0:e.includes(r.type.name));i.tr.ensureMarks(n)}}const rB=({keepMarks:i=!0}={})=>({tr:e,state:t,dispatch:n,editor:r})=>{const{selection:s,doc:o}=e,{$from:l,$to:a}=s,u=r.extensionManager.attributes,c=gl(u,l.node().type.name,l.node().attrs);if(s instanceof ne&&s.node.isBlock)return!l.parentOffset||!Wr(o,l.pos)?!1:(n&&(i&&yy(t,r.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const h=a.parentOffset===a.parent.content.size,d=l.depth===0?void 0:q5(l.node(-1).contentMatchAt(l.indexAfter(-1)));let f=h&&d?[{type:d,attrs:c}]:void 0,p=Wr(e.doc,e.mapping.map(l.pos),1,f);if(!f&&!p&&Wr(e.doc,e.mapping.map(l.pos),1,d?[{type:d}]:void 0)&&(p=!0,f=d?[{type:d,attrs:c}]:void 0),n){if(p&&(s instanceof ie&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,f),d&&!h&&!l.parentOffset&&l.parent.type!==d)){const b=e.mapping.map(l.before()),m=e.doc.resolve(b);l.node(-1).canReplaceWith(m.index(),m.index()+1,d)&&e.setNodeMarkup(e.mapping.map(l.before()),d)}i&&yy(t,r.extensionManager.splittableMarks),e.scrollIntoView()}return p},sB=(i,e={})=>({tr:t,state:n,dispatch:r,editor:s})=>{var o;const l=Ye(i,n.schema),{$from:a,$to:u}=n.selection,c=n.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(u))return!1;const h=a.node(-1);if(h.type!==l)return!1;const d=s.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let v=H.empty;const g=a.index(-1)?1:a.index(-2)?2:3;for(let _=a.depth-g;_>=a.depth-3;_-=1)v=H.from(a.node(_).copy(v));const y=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,w={...gl(d,a.node().type.name,a.node().attrs),...e},E=((o=l.contentMatch.defaultType)===null||o===void 0?void 0:o.createAndFill(w))||void 0;v=v.append(H.from(l.createAndFill(null,E)||void 0));const x=a.before(a.depth-(g-1));t.replace(x,a.after(-y),new K(v,4-g,0));let S=-1;t.doc.nodesBetween(x,t.doc.content.size,(_,M)=>{if(S>-1)return!1;_.isTextblock&&_.content.size===0&&(S=M+1)}),S>-1&&t.setSelection(ie.near(t.doc.resolve(S))),t.scrollIntoView()}return!0}const f=u.pos===a.end()?h.contentMatchAt(0).defaultType:null,p={...gl(d,h.type.name,h.attrs),...e},b={...gl(d,a.node().type.name,a.node().attrs),...e};t.delete(a.pos,u.pos);const m=f?[{type:l,attrs:p},{type:f,attrs:b}]:[{type:l,attrs:p}];if(!Wr(t.doc,a.pos,2))return!1;if(r){const{selection:v,storedMarks:g}=n,{splittableMarks:y}=s.extensionManager,w=g||v.$to.parentOffset&&v.$from.marks();if(t.split(a.pos,2,m).scrollIntoView(),!w||!r)return!0;const E=w.filter(x=>y.includes(x.type.name));t.ensureMarks(E)}return!0},$d=(i,e)=>{const t=Qm(o=>o.type===e)(i.selection);if(!t)return!0;const n=i.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(n===void 0)return!0;const r=i.doc.nodeAt(n);return t.node.type===(r==null?void 0:r.type)&&Ni(i.doc,t.pos)&&i.join(t.pos),!0},qd=(i,e)=>{const t=Qm(o=>o.type===e)(i.selection);if(!t)return!0;const n=i.doc.resolve(t.start).after(t.depth);if(n===void 0)return!0;const r=i.doc.nodeAt(n);return t.node.type===(r==null?void 0:r.type)&&Ni(i.doc,n)&&i.join(n),!0},oB=(i,e,t,n={})=>({editor:r,tr:s,state:o,dispatch:l,chain:a,commands:u,can:c})=>{const{extensions:h,splittableMarks:d}=r.extensionManager,f=Ye(i,o.schema),p=Ye(e,o.schema),{selection:b,storedMarks:m}=o,{$from:v,$to:g}=b,y=v.blockRange(g),w=m||b.$to.parentOffset&&b.$from.marks();if(!y)return!1;const E=Qm(x=>by(x.type.name,h))(b);if(y.depth>=1&&E&&y.depth-E.depth<=1){if(E.node.type===f)return u.liftListItem(p);if(by(E.node.type.name,h)&&f.validContent(E.node.content)&&l)return a().command(()=>(s.setNodeMarkup(E.pos,f),!0)).command(()=>$d(s,f)).command(()=>qd(s,f)).run()}return!t||!w||!l?a().command(()=>c().wrapInList(f,n)?!0:u.clearNodes()).wrapInList(f,n).command(()=>$d(s,f)).command(()=>qd(s,f)).run():a().command(()=>{const x=c().wrapInList(f,n),S=w.filter(_=>
vendor: 26,891 bytes, lines 459-537
459d.includes(_.type.name));return s.ensureMarks(S),x?!0:u.clearNodes()}).wrapInList(f,n).command(()=>$d(s,f)).command(()=>qd(s,f)).run()},aB=(i,e={},t={})=>({state:n,commands:r})=>{const{extendEmptyMarkRange:s=!1}=t,o=Fi(i,n.schema);return _f(n,o,e)?r.unsetMark(o,{extendEmptyMarkRange:s}):r.setMark(o,e)},lB=(i,e,t={})=>({state:n,commands:r})=>{const s=Ye(i,n.schema),o=Ye(e,n.schema),l=jo(n,s,t);let a;return n.selection.$anchor.sameParent(n.selection.$head)&&(a=n.selection.$anchor.parent.attrs),l?r.setNode(o,a):r.setNode(s,{...a,...t})},uB=(i,e={})=>({state:t,commands:n})=>{const r=Ye(i,t.schema);return jo(t,r,e)?n.lift(r):n.wrapIn(r,e)},cB=()=>({state:i,dispatch:e})=>{const t=i.plugins;for(let n=0;n<t.length;n+=1){const r=t[n];let s;if(r.spec.isInputRules&&(s=r.getState(i))){if(e){const o=i.tr,l=s.transform;for(let a=l.steps.length-1;a>=0;a-=1)o.step(l.steps[a].invert(l.docs[a]));if(s.text){const a=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,i.schema.text(s.text,a))}else o.delete(s.from,s.to)}return!0}}return!1},dB=()=>({tr:i,dispatch:e})=>{const{selection:t}=i,{empty:n,ranges:r}=t;return n||e&&r.forEach(s=>{i.removeMark(s.$from.pos,s.$to.pos)}),!0},hB=(i,e={})=>({tr:t,state:n,dispatch:r})=>{var s;const{extendEmptyMarkRange:o=!1}=e,{selection:l}=t,a=Fi(i,n.schema),{$from:u,empty:c,ranges:h}=l;if(!r)return!0;if(c&&o){let{from:d,to:f}=l;const p=(s=u.marks().find(m=>m.type===a))===null||s===void 0?void 0:s.attrs,b=Ym(u,a,p);b&&(d=b.from,f=b.to),t.removeMark(d,f,a)}else h.forEach(d=>{t.removeMark(d.$from.pos,d.$to.pos,a)});return t.removeStoredMark(a),!0},fB=(i,e={})=>({tr:t,state:n,dispatch:r})=>{let s=null,o=null;const l=zc(typeof i=="string"?i:i.name,n.schema);return l?(l==="node"&&(s=Ye(i,n.schema)),l==="mark"&&(o=Fi(i,n.schema)),r&&t.selection.ranges.forEach(a=>{const u=a.$from.pos,c=a.$to.pos;let h,d,f,p;t.selection.empty?n.doc.nodesBetween(u,c,(b,m)=>{s&&s===b.type&&(f=Math.max(m,u),p=Math.min(m+b.nodeSize,c),h=m,d=b)}):n.doc.nodesBetween(u,c,(b,m)=>{m<u&&s&&s===b.type&&(f=Math.max(m,u),p=Math.min(m+b.nodeSize,c),h=m,d=b),m>=u&&m<=c&&(s&&s===b.type&&t.setNodeMarkup(m,void 0,{...b.attrs,...e}),o&&b.marks.length&&b.marks.forEach(v=>{if(o===v.type){const g=Math.max(m,u),y=Math.min(m+b.nodeSize,c);t.addMark(g,y,o.create({...v.attrs,...e}))}}))}),d&&(h!==void 0&&t.setNodeMarkup(h,void 0,{...d.attrs,...e}),o&&d.marks.length&&d.marks.forEach(b=>{o===b.type&&t.addMark(f,p,o.create({...b.attrs,...e}))}))}),!0):!1},pB=(i,e={})=>({state:t,dispatch:n})=>{const r=Ye(i,t.schema);return LN(r,e)(t,n)},mB=(i,e={})=>({state:t,dispatch:n})=>{const r=Ye(i,t.schema);return MN(r,e)(t,n)};var gB=Object.freeze({__proto__:null,blur:ZN,clearContent:e5,clearNodes:t5,command:n5,createParagraphNear:i5,cut:r5,deleteCurrentNode:s5,deleteNode:o5,deleteRange:a5,deleteSelection:l5,enter:u5,exitCode:c5,extendMarkRange:d5,first:h5,focus:p5,forEach:m5,insertContent:g5,insertContentAt:v5,joinBackward:E5,joinDown:x5,joinForward:T5,joinItemBackward:S5,joinItemForward:C5,joinTextblockBackward:k5,joinTextblockForward:_5,joinUp:w5,keyboardShortcut:L5,lift:M5,liftEmptyBlock:I5,liftListItem:O5,newlineInCode:D5,resetAttributes:P5,scrollIntoView:R5,selectAll:N5,selectNodeBackward:B5,selectNodeForward:F5,selectParentNode:z5,selectTextblockEnd:V5,selectTextblockStart:H5,setContent:j5,setMark:Q5,setMeta:Z5,setNode:eB,setNodeSelection:tB,setTextSelection:nB,sinkListItem:iB,splitBlock:rB,splitListItem:sB,toggleList:oB,toggleMark:aB,toggleNode:lB,toggleWrap:uB,undoInputRule:cB,unsetAllMarks:dB,unsetMark:hB,updateAttributes:fB,wrapIn:pB,wrapInList:mB});const bB=Oe.create({name:"commands",addCommands(){return{...gB}}}),yB=Oe.create({name:"drop",addProseMirrorPlugins(){return[new De({key:new $e("tiptapDrop"),props:{handleDrop:(i,e,t,n)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:n})}}})]}}),vB=Oe.create({name:"editable",addProseMirrorPlugins(){return[new De({key:new $e("editable"),props:{editable:()=>this.editor.options.editable}})]}}),wB=Oe.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:i}=this;return[new De({key:new $e("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{i.isFocused=!0;const n=i.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(n),!1},blur:(e,t)=>{i.isFocused=!1;const n=i.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(n),!1}}}})]}}),xB=Oe.create({name:"keymap",addKeyboardShortcuts(){const i=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{const{selection:a,doc:u}=l,{empty:c,$anchor:h}=a,{pos:d,parent:f}=h,p=h.parent.isTextblock&&d>0?l.doc.resolve(d-1):h,b=p.parent.type.spec.isolating,m=h.pos-h.parentOffset,v=b&&p.parent.childCount===1?m===h.pos:se.atStart(u).from===d;return!c||!f.type.isTextblock||f.textContent.length||!v||v&&h.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:i,"Mod-Backspace":i,"Shift-Backspace":i,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},s={...n,"Ctrl-h":i,"Alt-Backspace":i,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Jm()||vS()?s:r},addProseMirrorPlugins(){return[new De({key:new $e("clearDocument"),appendTransaction:(i,e,t)=>{if(i.some(b=>b.getMeta("composition")))return;const n=i.some(b=>b.docChanged)&&!e.doc.eq(t.doc),r=i.some(b=>b.getMeta("preventClearDocument"));if(!n||r)return;const{empty:s,from:o,to:l}=e.selection,a=se.atStart(e.doc).from,u=se.atEnd(e.doc).to;if(s||!(o===a&&l===u)||!Vc(t.doc))return;const d=t.tr,f=Pc({state:t,transaction:d}),{commands:p}=new Rc({editor:this.editor,state:f});if(p.clearNodes(),!!d.steps.length)return d}})]}}),EB=Oe.create({name:"paste",addProseMirrorPlugins(){return[new De({key:new $e("tiptapPaste"),props:{handlePaste:(i,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),TB=Oe.create({name:"tabindex",addProseMirrorPlugins(){return[new De({key:new $e("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Yi{get name(){return this.node.type.name}constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You canât set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new Yi(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Yi(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Yi(e,this.editor)}get children(){const e=[];return this.node.content.forEach((t,n)=>{const r=t.isBlock&&!t.isTextblock,s=t.isAtom&&!t.isText,o=this.pos+n+(s?0:1),l=this.resolvedPos.doc.resolve(o);if(!r&&l.depth<=this.depth)return;const a=new Yi(l,this.editor,r,r?t:null);r&&(a.actualDepth=this.depth+1),e.push(new Yi(l,this.editor,r,r?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e)if(Object.keys(t).length>0){const s=r.node.attrs,o=Object.keys(t);for(let l=0;l<o.length;l+=1){const a=o[l];if(s[a]!==t[a])break}}else n=r;r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||this.children.length===0)return r;const s=Object.keys(t);return this.children.forEach(o=>{n&&r.length>0||(o.node.type.name===e&&s.every(a=>t[a]===o.node.attrs[a])&&r.push(o),!(n&&r.length>0)&&(r=r.concat(o.querySelectorAll(e,t,n))))}),r}setAttribute(e){const{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}}const SB=`.ProseMirror { 460 position: relative; 461} 462 463.ProseMirror { 464 word-wrap: break-word; 465 white-space: pre-wrap; 466 white-space: break-spaces; 467 -webkit-font-variant-ligatures: none; 468 font-variant-ligatures: none; 469 font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ 470} 471 472.ProseMirror [contenteditable="false"] { 473 white-space: normal; 474} 475 476.ProseMirror [contenteditable="false"] [contenteditable="true"] { 477 white-space: pre-wrap; 478} 479 480.ProseMirror pre { 481 white-space: pre-wrap; 482} 483 484img.ProseMirror-separator { 485 display: inline !important; 486 border: none !important; 487 margin: 0 !important; 488 width: 0 !important; 489 height: 0 !important; 490} 491 492.ProseMirror-gapcursor { 493 display: none; 494 pointer-events: none; 495 position: absolute; 496 margin: 0; 497} 498 499.ProseMirror-gapcursor:after { 500 content: ""; 501 display: block; 502 position: absolute; 503 top: -2px; 504 width: 20px; 505 border-top: 1px solid black; 506 animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; 507} 508 509@keyframes ProseMirror-cursor-blink { 510 to { 511 visibility: hidden; 512 } 513} 514 515.ProseMirror-hideselection *::selection { 516 background: transparent; 517} 518 519.ProseMirror-hideselection *::-moz-selection { 520 background: transparent; 521} 522 523.ProseMirror-hideselection * { 524 caret-color: transparent; 525} 526 527.ProseMirror-focused .ProseMirror-gapcursor { 528 display: block; 529} 530 531.tippy-box[data-animation=fade][data-state=hidden] { 532 opacity: 0 533}`;function CB(i,e,t){const n=document.querySelector("style[data-tiptap-style]");if(n!==null)return n;const r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.setAttribute("data-tiptap-style",""),r.innerHTML=i,document.getElementsByTagName("head")[0].appendChild(r),r}class kB extends BN{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:t,slice:n,moved:r})=>this.options.onDrop(t,n,r)),this.on("paste",({event:t,slice:n})=>this.options.onPaste(t,n)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=CB(SB,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const n=pS(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let n=t;if([].concat(e).forEach(s=>{const o=typeof s=="string"?`${s}$`:s.key;n=t.filter(l=>!l.key.startsWith(o))}),t.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;const r=[...this.options.enableCoreExtensions?[vB,QN.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),bB,wB,xB,TB,yB,EB].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new Hr(r,this)}createCommandManager(){this.commandManager=new Rc({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=kf(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(l=>l.name!=="collaboration"),this.createExtensionManager()}}),t=kf(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=bS(t,this.options.autofocus);this.view=new tN(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Vr.create({doc:t,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const s=this.view.dom;s.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(o=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(o)});return}const t=this.state.apply(e),n=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),s=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),s&&this.emit("blur",{editor:this,event:s.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return TS(this.state,e)}isActive(e,t){const n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return X5(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Wm(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=` 534 535`,textSerializers:n={}}=e||{};return ES(this.state.doc,{blockSeparator:t,textSerializers:{...Km(this.schema),...n}})}get isEmpty(){return Vc(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)===null||n===void 0?void 0:n.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new Yi(t,this)}get $doc(){return this.$pos(0)}}function fs(i){return new Bc({find:i.find,handler:({state:e,range:t,match:n})=>{const r=ce(i.getAttributes,void 0,n);if(r===!1||r===null)return null;const{tr:s}=e,o=n[n.length-1],l=n[0];if(o){const a=l.search(/\S/),u=t.from+l.indexOf(o),c=u+o.length;if(Zm(t.from,t.to,e.doc).filter(f=>f.mark.type.excluded.find(b=>b===i.type&&b!==f.mark.type)).filter(f=>f.to>u).length)return null;c<t.to&&s.delete(c,t.to),u>t.from&&s.delete(t.from+a,u);const d=t.from+a+o.length;s.addMark(t.from+a,d,i.type.create(r||{})),s.removeStoredMark(i.type)}}})}function kS(i){return new Bc({find:i.find,handler:({state:e,range:t,match:n})=>{const r=ce(i.getAttributes,void 0,n)||{},{tr:s}=e,o=t.from;let l=t.to;const a=i.type.create(r);if(n[1]){const u=n[0].lastIndexOf(n[1]);let c=o+u;c>l?c=l:l=c+n[1].length;const h=n[0][n[0].length-1];s.insertText(h,o+n[0].length-1),s.replaceWith(c,l,a)}else if(n[0]){const u=i.type.isInline?o:o-1;s.insert(u,i.type.create(r)).delete(s.mapping.map(o),s.mapping.map(l))}s.scrollIntoView()}})}function Af(i){return new Bc({find:i.find,handler:({state:e,range:t,match:n})=>{const r=e.doc.resolve(t.from),s=ce(i.getAttributes,void 0,n)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),i.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,i.type,s)}})}function $o(i){return new Bc({find:i.find,handler:({state:e,range:t,match:n,chain:r})=>{const s=ce(i.getAttributes,void 0,n)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),u=a&&Im(a,i.type,s);if(!u)return null;if(o.wrap(a,u),i.keepMarks&&i.editor){const{selection:h,storedMarks:d}=e,{splittableMarks:f}=i.editor.extensionManager,p=d||h.$to.parentOffset&&h.$from.marks();if(p){const b=p.filter(m=>f.includes(m.type.name));o.ensureMarks(b)}}if(i.keepAttributes){const h=i.type.name==="bulletList"||i.type.name==="orderedList"?"listItem":"taskList";r().updateAttributes(h,s).run()}const c=o.doc.resolve(t.from-1).nodeBefore;c&&c.type===i.type&&Ni(o.doc,t.from-1)&&(!i.joinPredicate||i.joinPredicate(n,c))&&o.join(t.from-1)}})}let st=class Lf{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ce(X(this,"addOptions",{name:this.name}))),this.storage=ce(X(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Lf(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>Fc(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Lf(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=ce(X(t,"addOptions",{name:t.name})),t.storage=ce(X(t,"addStorage",{name:t.name,options:t.options})),t}};function vr(i){return new WN({find:i.find,handler:({state:e,range:t,match:n,pasteEvent:r})=>{const s=ce(i.getAttributes,void 0,n,r);if(s===!1||s===null)return null;const{tr:o}=e,l=n[n.length-1],a=n[0];let u=t.to;if(l){const c=a.search(/\S/),h=t.from+a.indexOf(l),d=h+l.length;if(Zm(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(m=>m===i.type&&m!==p.mark.type)).filter(p=>p.to>h).length)return null;d<t.to&&o.delete(d,t.to),h>t.from&&o.delete(t.from+c,h),u=t.from+c+l.length,o.addMark(t.from+c,u,i.type.create(s||{})),o.removeStoredMark(i.type)}}})}const _B=/^\s*>\s$/,AB=st.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:i}){return["blockquote",Ie(this.options.HTMLAttributes,i),0]},addCommands(){return{setBlockquote:()=>({commands:i})=>i.wrapIn(this.name),toggleBlockquote:()=>({commands:i})=>i.toggleWrap(this.name),unsetBlockquote:()=>({commands:i})=>i.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[$o({find:_B,type:this.type})]}}),LB=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,MB=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,IB=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,OB=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,_S=An.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:i=>i.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:i=>i.type.name===this.name},{style:"font-weight",getAttrs:i=>/^(bold(er)?|[5-9]\d{2,})$/.test(i)&&null}]},renderHTML({HTMLAttributes:i}){return["strong",Ie(this.options.HTMLAttributes,i),0]},addCommands(){return{setBold:()=>({commands:i})=>i.setMark(this.name),toggleBold:()=>({commands:i})=>i.toggleMark(this.name),unsetBold:()=>({commands:i})=>i.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[fs({find:LB,type:this.type}),fs({find:IB,type:this.type})]},addPasteRules(){return[vr({find:MB,type:this.type}),vr({find:OB,type:this.type})]}}),DB="listItem",vy="textStyle",wy=/^\s*([-+*])\s$/,PB=st.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:i}){return["ul",Ie(this.options.HTMLAttributes,i),0]},addCommands(){return{toggleBulletList:()=>({commands:i,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(DB,this.editor.getAttributes(vy)).run():i.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let i=$o({find:wy,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(i=$o({find:wy,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(vy),editor:this.editor})),[i]}}),RB=/(^|[^`])`([^`]+)`(?!`)/,NB=/(^|[^`])`([^`]+)`(?!`)/g,BB=An.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:i}){return["code",Ie(this.options.HTMLAttributes,i),0]},addCommands(){return{setCode:()=>({commands:i})=>i.setMark(this.name),toggleCode:()=>({commands:i})=>i.toggleMark(this.name),unsetCode:()=>({commands:i})=>i.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[fs({find:RB,type:this.type})]},addPasteRules(){return[vr({find:NB,type:this.type})]}}),FB=/^```([a-z]+)?[\s\n]$/,zB=/^~~~([a-z]+)?[\s\n]$/,VB=st.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:i=>{var e;const{languageClassPrefix:t}=this.options,s=[...((e=i.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(o=>o.startsWith(t)).map(o=>o.replace(t,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:i,HTMLAttributes:e}){return["pre",Ie(this.options.HTMLAttributes,e),["code",{class:i.attrs.language?this.options.languageClassPrefix+i.attrs.language:null},0]]},addCommands(){return{setCodeBlock:i=>({commands:e})=>e.setNode(this.name,i),toggleCodeBlock:i=>({commands:e})=>e.toggleNode(this.name,"paragraph",i)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:i,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!i||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:i})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=i,{selection:t}=e,{$from:n,empty:r}=t;if(!r||n.parent.type!==this.type)return!1;const s=n.parentOffset===n.parent.nodeSize-2,o=n.parent.textContent.endsWith(` 536 537`);return!s||!o?!1:i.chain().command(({tr:l})=>(l.delete(n.pos-2,n.pos),!0)).exitCode().run()},ArrowDown:({editor:i})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=i,{selection:t,doc:n}=e,{$from:r,empty:s}=t;if(!s||r.parent.type!==this.type||!(r.parentOffset===r.parent.nodeSize-2))return!1;const l=r.after();return l===void 0?!1:n.nodeAt(l)?i.commands.command(({tr:u})=>(u.setSelection(se.near(n.resolve(l))),!0)):i.commands.exitCode()}}}
vendor: 5,981 bytes, lines 537-538
537,addInputRules(){return[Af({find:FB,type:this.type,getAttributes:i=>({language:i[1]})}),Af({find:zB,type:this.type,getAttributes:i=>({language:i[1]})})]},addProseMirrorPlugins(){return[new De({key:new $e("codeBlockVSCodeHandler"),props:{handlePaste:(i,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),n=e.clipboardData.getData("vscode-editor-data"),r=n?JSON.parse(n):void 0,s=r==null?void 0:r.mode;if(!t||!s)return!1;const{tr:o,schema:l}=i.state,a=l.text(t.replace(/\r\n?/g,` 538`));return o.replaceSelectionWith(this.type.create({language:s},a)),o.selection.$from.parent.type!==this.type&&o.setSelection(ie.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),i.dispatch(o),!0}}})]}}),AS=st.create({name:"doc",topNode:!0,content:"block+"});function HB(i={}){return new De({view(e){return new jB(e,i)}})}class jB{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(n=t.width)!==null&&n!==void 0?n:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let s=o=>{this[r](o)};return e.dom.addEventListener(r,s),{name:r,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n;if(t){let l=e.nodeBefore,a=e.nodeAfter;if(l||a){let u=this.editorView.nodeDOM(this.cursorPos-(l?l.nodeSize:0));if(u){let c=u.getBoundingClientRect(),h=l?c.bottom:c.top;l&&a&&(h=(h+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),n={left:c.left,right:c.right,top:h-this.width/2,bottom:h+this.width/2}}}}if(!n){let l=this.editorView.coordsAtPos(this.cursorPos);n={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}let r=this.editorView.dom.offsetParent;this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let s,o;if(!r||r==document.body&&getComputedStyle(r).position=="static")s=-pageXOffset,o=-pageYOffset;else{let l=r.getBoundingClientRect();s=l.left-r.scrollLeft,o=l.top-r.scrollTop}this.element.style.left=n.left-s+"px",this.element.style.top=n.top-o+"px",this.element.style.width=n.right-n.left+"px",this.element.style.height=n.bottom-n.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,s=typeof r=="function"?r(this.editorView,t,e):r;if(t&&!s){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=wT(this.editorView.state.doc,o,this.editorView.dragging.slice);l!=null&&(o=l)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const $B=Oe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[HB(this.options)]}});class Ne extends se{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return Ne.valid(n)?new Ne(n):se.near(n)}content(){return K.empty}eq(e){return e instanceof Ne&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Ne(e.resolve(t.pos))}getBookmark(){return new eg(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!qB(e)||!UB(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&Ne.valid(e))return e;let r=e.pos,s=null;for(let o=e.depth;;o--){let l=e.node(o);if(t>0?e.indexAfter(o)<l.childCount:e.index(o)>0){s=l.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;r+=t;let a=e.doc.resolve(r);if(Ne.valid(a))return a}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!ne.isSelectable(s)){e=e.doc.resolve(r+s.nodeSize*t),n=!1;continue e}break}s=o,r+=t;let l=e.doc.resolve(r);if(Ne.valid(l))return l}return null}}}Ne.prototype.visible=!1;Ne.findFrom=Ne.findGapCursorFrom;se.jsonID("gapcursor",Ne);class eg{constructor(e){this.pos=e}map(e){return new eg(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Ne.valid(t)?new Ne(t):se.near(t)}}function qB(i){for(let e=i.depth;e>=0;e--){let t=i.index(e),n=i.node(e);if(t==0){if(n.type.spec.isolating)return!0;continue}for(let r=n.child(t-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function UB(i){for(let e=i.depth;e>=0;e--){let t=i.indexAfter(e),n=i.node(e);if(t==n.childCount){if(n.type.spec.isolating)return!0;continue}for(let r=n.child(t);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function WB(){return new De({props:{decorations:XB,createSelectionBetween(i,e,t){return e.pos==t.pos&&Ne.valid(t)?new Ne(t):null}
vendor: 3,512 bytes, lines 538-539
538,handleClick:KB,handleKeyDown:GB,handleDOMEvents:{beforeinput:YB}}})}const GB=$m({ArrowLeft:Wa("horiz",-1),ArrowRight:Wa("horiz",1),ArrowUp:Wa("vert",-1),ArrowDown:Wa("vert",1)});function Wa(i,e){const t=i=="vert"?e>0?"down":"up":e>0?"right":"left";return function(n,r,s){let o=n.selection,l=e>0?o.$to:o.$from,a=o.empty;if(o instanceof ie){if(!s.endOfTextblock(t)||l.depth==0)return!1;a=!1,l=n.doc.resolve(e>0?l.after():l.before())}let u=Ne.findGapCursorFrom(l,e,a);return u?(r&&r(n.tr.setSelection(new Ne(u))),!0):!1}}function KB(i,e,t){if(!i||!i.editable)return!1;let n=i.state.doc.resolve(e);if(!Ne.valid(n))return!1;let r=i.posAtCoords({left:t.clientX,top:t.clientY});return r&&r.inside>-1&&ne.isSelectable(i.state.doc.nodeAt(r.inside))?!1:(i.dispatch(i.state.tr.setSelection(new Ne(n))),!0)}function YB(i,e){if(e.inputType!="insertCompositionText"||!(i.state.selection instanceof Ne))return!1;let{$from:t}=i.state.selection,n=t.parent.contentMatchAt(t.index()).findWrapping(i.state.schema.nodes.text);if(!n)return!1;let r=H.empty;for(let o=n.length-1;o>=0;o--)r=H.from(n[o].createAndFill(null,r));let s=i.state.tr.replace(t.pos,t.pos,new K(r,0,0));return s.setSelection(ie.near(s.doc.resolve(t.pos+1))),i.dispatch(s),!1}function XB(i){if(!(i.selection instanceof Ne))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Me.create(i.doc,[nt.widget(i.selection.head,e,{key:"gapcursor"})])}const JB=Oe.create({name:"gapCursor",addProseMirrorPlugins(){return[WB()]},extendNodeSchema(i){var e;const t={name:i.name,options:i.options,storage:i.storage};return{allowGapCursor:(e=ce(X(i,"allowGapCursor",t)))!==null&&e!==void 0?e:null}}}),QB=st.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:i}){return["br",Ie(this.options.HTMLAttributes,i)]},renderText(){return` 539`},addCommands(){return{setHardBreak:()=>({commands:i,chain:e,state:t,editor:n})=>i.first([()=>i.exitCode(),()=>i.command(()=>{const{selection:r,storedMarks:s}=t;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:l}=n.extensionManager,a=s||r.$to.parentOffset&&r.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&a&&o){const h=a.filter(d=>l.includes(d.type.name));u.ensureMarks(h)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),LS=st.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(i=>({tag:`h${i}`,attrs:{level:i}}))},renderHTML({node:i,HTMLAttributes:e}){return[`h${this.options.levels.includes(i.attrs.level)?i.attrs.level:this.options.levels[0]}`,Ie(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:i=>({commands:e})=>this.options.levels.includes(i.level)?e.setNode(this.name,i):!1,toggleHeading:i=>({commands:e})=>this.options.levels.includes(i.level)?e.toggleNode(this.name,"paragraph",i):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((i,e)=>({...i,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(i=>Af({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${i}}
539)\\s$`),type:this.type,getAttributes:{level:i}}))}});var Su=200,Ke=function(){};Ke.prototype.append=function(e){return e.length?(e=Ke.from(e),!this.length&&e||e.length<Su&&this.leafAppend(e)||this.length<Su&&e.leafPrepend(this)||this.appendInner(e)):this};Ke.prototype.prepend=function(e){return e.length?Ke.from(e).append(this):this};Ke.prototype.appendInner=function(e){return new ZB(this,e)};Ke.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Ke.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};Ke.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Ke.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)};Ke.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(s,o){return r.push(e(s,o))},t,n),r};Ke.from=function(e){return e instanceof Ke?e:e&&e.length?new MS(e):Ke.empty};var MS=function(i){function e(n){i.call(this),this.values=n}i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,s){return r==0&&s==this.length?this:new e(this.values.slice(r,s))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,s,o,l){for(var a=s;a<o;a++)if(r(this.values[a],l+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,o,l){for(var a=s-1;a>=o;a--)if(r(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=Su)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=Su)return new e(r.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(Ke);Ke.empty=new MS([]);var ZB=function(i){function e(t,n){i.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return i&&(e.__proto__=i),e.prototype=Object.create(i&&i.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},e.prototype.forEachInner=function(n,r,s,o){var l=this.left.length;if(r<l&&this.left.forEachInner(n,r,Math.min(s,l),o)===!1||s>l&&this.right.forEachInner(n,Math.max(r-l,0),Math.min(this.length,s)-l,o+l)===!1)return!1},e.prototype.forEachInvertedInner=function(n,r,s,o){var l=this.left.length;if(r>l&&this.right.forEachInvertedInner(n,r-l,Math.max(s,l)-l,o+l)===!1||s<l&&this.left.forEachInvertedInner(n,Math.min(r,l),s,o)===!1)return!1},e.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var s=this.left.length;return r<=s?this.left.slice(n,r):n>=s?this.right.slice(n-s,r-s):this.left.slice(n,s).append(this.right.slice(0,r-s))},e.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new e(r,this.right)},e.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new e(this.left,new e(this.right,n)):new e(this,n)},e}(Ke);const e8=500;class en{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let n=this.items.length;for(;;n--)if(this.items.get(n-1).selection){--n;break}let r,s;t&&(r=this.remapping(n,this.items.length),s=r.maps.length);let o=e.tr,l,a,u=[],c=[];return this.items.forEach((h,d)=>{if(!h.step){r||(r=this.remapping(n,d+1),s=r.maps.length),s--,c.push(h);return}if(r){c.push(new hn(h.map));let f=h.step.map(r.slice(s)),p;f&&o.maybeStep(f).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],u.push(new hn(p,void 0,void 0,u.length+c.length))),s--,p&&r.appendMap(p,s)}else o.maybeStep(h.step);if(h.selection)return l=r?h.selection.map(r.slice(s)):h.selection,a=new en(this.items.slice(0,n).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:o,selection:l}}addTransform(e,t,n,r){let s=[],o=this.eventCount,l=this.items,a=!r&&l.length?l.get(l.length-1):null;for(let c=0;c<e.steps.length;c++){let h=e.steps[c].invert(e.docs[c]),d=new hn(e.mapping.maps[c],h,t),f;(f=a&&a.merge(d))&&(d=f,c?s.pop():l=l.slice(0,l.length-1)),s.push(d),t&&(o++,t=void 0),r||(a=d)}let u=o-n.depth;return u>n8&&(l=t8(l,u),o-=u),new en(l.append(s),o)}remapping(e,t){let n=new Bo;
vendor: 8,499 bytes, line 539
539return this.items.forEach((r,s)=>{let o=r.mirrorOffset!=null&&s-r.mirrorOffset>=e?n.maps.length-r.mirrorOffset:void 0;n.appendMap(r.map,o)},e,t),n}addMaps(e){return this.eventCount==0?this:new en(this.items.append(e.map(t=>new hn(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),s=e.mapping,o=e.steps.length,l=this.eventCount;this.items.forEach(d=>{d.selection&&l--},r);let a=t;this.items.forEach(d=>{let f=s.getMirror(--a);if(f==null)return;o=Math.min(o,f);let p=s.maps[f];if(d.step){let b=e.steps[f].invert(e.docs[f]),m=d.selection&&d.selection.map(s.slice(a+1,f));m&&l++,n.push(new hn(p,b,m))}else n.push(new hn(p))},r);let u=[];for(let d=t;d<o;d++)u.push(new hn(s.maps[d]));let c=this.items.slice(0,r).append(u).append(n),h=new en(c,l);return h.emptyItemCount()>e8&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],s=0;return this.items.forEach((o,l)=>{if(l>=e)r.push(o),o.selection&&s++;else if(o.step){let a=o.step.map(t.slice(n)),u=a&&a.getMap();if(n--,u&&t.appendMap(u,n),a){let c=o.selection&&o.selection.map(t.slice(n));c&&s++;let h=new hn(u.invert(),a,c),d,f=r.length-1;(d=r.length&&r[f].merge(h))?r[f]=d:r.push(h)}}else o.map&&n--},this.items.length,0),new en(Ke.from(r.reverse()),s)}}en.empty=new en(Ke.empty,0);function t8(i,e){let t;return i.forEach((n,r)=>{if(n.selection&&e--==0)return t=r,!1}),i.slice(t)}class hn{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new hn(t.getMap().invert(),t,this.selection)}}}class ci{constructor(e,t,n,r,s){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=s}}const n8=20;function i8(i,e,t,n){let r=t.getMeta(or),s;if(r)return r.historyState;t.getMeta(o8)&&(i=new ci(i.done,i.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return i;if(o&&o.getMeta(or))return o.getMeta(or).redo?new ci(i.done.addTransform(t,void 0,n,bl(e)),i.undone,xy(t.mapping.maps),i.prevTime,i.prevComposition):new ci(i.done,i.undone.addTransform(t,void 0,n,bl(e)),null,i.prevTime,i.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),a=i.prevTime==0||!o&&i.prevComposition!=l&&(i.prevTime<(t.time||0)-n.newGroupDelay||!r8(t,i.prevRanges)),u=o?Ud(i.prevRanges,t.mapping):xy(t.mapping.maps);return new ci(i.done.addTransform(t,a?e.selection.getBookmark():void 0,n,bl(e)),en.empty,u,t.time,l??i.prevComposition)}else return(s=t.getMeta("rebased"))?new ci(i.done.rebased(t,s),i.undone.rebased(t,s),Ud(i.prevRanges,t.mapping),i.prevTime,i.prevComposition):new ci(i.done.addMaps(t.mapping.maps),i.undone.addMaps(t.mapping.maps),Ud(i.prevRanges,t.mapping),i.prevTime,i.prevComposition)}function r8(i,e){if(!e)return!1;if(!i.docChanged)return!0;let t=!1;return i.mapping.maps[0].forEach((n,r)=>{for(let s=0;s<e.length;s+=2)n<=e[s+1]&&r>=e[s]&&(t=!0)}),t}function xy(i){let e=[];for(let t=i.length-1;t>=0&&e.length==0;t--)i[t].forEach((n,r,s,o)=>e.push(s,o));return e}function Ud(i,e){if(!i)return null;let t=[];for(let n=0;n<i.length;n+=2){let r=e.map(i[n],1),s=e.map(i[n+1],-1);r<=s&&t.push(r,s)}return t}function s8(i,e,t){let n=bl(e),r=or.get(e).spec.config,s=(t?i.undone:i.done).popEvent(e,n);if(!s)return null;let o=s.selection.resolve(s.transform.doc),l=(t?i.done:i.undone).addTransform(s.transform,e.selection.getBookmark(),r,n),a=new ci(t?l:s.remaining,t?s.remaining:l,null,0,-1);return s.transform.setSelection(o).setMeta(or,{redo:t,historyState:a})}let Wd=!1,Ey=null;function bl(i){let e=i.plugins;if(Ey!=e){Wd=!1,Ey=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){Wd=!0;break}}return Wd}const or=new $e("history"),o8=new $e("closeHistory");function a8(i={}){return i={depth:i.depth||100,newGroupDelay:i.newGroupDelay||500},new De({key:or,state:{init(){return new ci(en.empty,en.empty,null,0,-1)},apply(e,t,n){return i8(t,n,e,i)}},config:i,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n=="historyUndo"?OS:n=="historyRedo"?DS:null;return r?(t.preventDefault(),r(e.state,e.dispatch)):!1}}}})}function IS(i,e){return(t,n)=>{let r=or.getState(t);if(!r||(i?r.undone:r.done).eventCount==0)return!1;if(n){let s=s8(r,t,i);s&&n(e?s.scrollIntoView():s)}return!0}}const OS=IS(!1,!0),DS=IS(!0,!0),l8=Oe.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:i,dispatch:e})=>OS(i,e),redo:()=>({state:i,dispatch:e})=>DS(i,e)}},addProseMirrorPlugins(){return[a8(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}}),u8=st.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:i}){return["hr",Ie(this.options.HTMLAttributes,i)]},addCommands(){return{setHorizontalRule:()=>({chain:i,state:e})=>{const{selection:t}=e,{$from:n,$to:r}=t,s=i();return n.parentOffset===0?s.insertContentAt({from:Math.max(n.pos-1,0),to:r.pos},{type:this.name}):SS(t)?s.insertContentAt(r.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:o,dispatch:l})=>{var a;if(l){const{$to:u}=o.selection,c=u.end();if(u.nodeAfter)u.nodeAfter.isTextblock?o.setSelection(ie.create(o.doc,u.pos+1)):u.nodeAfter.isBlock?o.setSelection(ne.create(o.doc,u.pos)):o.setSelection(ie.create(o.doc,u.pos));else{const h=(a=u.parent.type.contentMatch.defaultType)===null||a===void 0?void 0:a.create();h&&(o.insert(c,h),o.setSelection(ie.create(o.doc,c+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[kS({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.type})]}}),c8=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,d8=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,h8=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,f8=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,p8=An.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:i=>i.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:i=>i.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:i}){return["em",Ie(this.options.HTMLAttributes,i),0]},addCommands(){return{setItalic:()=>({commands:i})=>i.setMark(this.name),toggleItalic:()=>({commands:i})=>i.toggleMark(this.name),unsetItalic:()=>({commands:i})=>i.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[fs({find:c8,type:this.type}),fs({find:h8,type:this.type})]},addPasteRules(){return[vr({find:d8,type:this.type}),vr({find:f8,type:this.type})]}}),m8=st.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:i}){return["li",Ie(this.options.HTMLAttributes,i),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),g8="listItem",Ty="textStyle",Sy=/^(\d+)\.\s$/,b8=st.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:i=>i.hasAttribute("start")?parseInt(i.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:i=>i.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:i}){const{start:e,...t}=i;return e===1?["ol",Ie(this.options.HTMLAttributes,t),0]:["ol",Ie(this.options.HTMLAttributes,i),0]},addCommands(){return{toggleOrderedList:()=>({commands:i,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(g8,this.editor.getAttributes(Ty)).run():i.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}}
vendor: 4,511 bytes, line 539
539,addInputRules(){let i=$o({find:Sy,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(i=$o({find:Sy,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Ty)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[i]}}),PS=st.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:i}){return["p",Ie(this.options.HTMLAttributes,i),0]},addCommands(){return{setParagraph:()=>({commands:i})=>i.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),y8=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,v8=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,w8=An.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:i=>i.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:i}){return["s",Ie(this.options.HTMLAttributes,i),0]},addCommands(){return{setStrike:()=>({commands:i})=>i.setMark(this.name),toggleStrike:()=>({commands:i})=>i.toggleMark(this.name),unsetStrike:()=>({commands:i})=>i.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[fs({find:y8,type:this.type})]},addPasteRules(){return[vr({find:v8,type:this.type})]}}),x8=st.create({name:"text",group:"inline"}),RS=Oe.create({name:"starterKit",addExtensions(){var i,e,t,n,r,s,o,l,a,u,c,h,d,f,p,b,m,v;const g=[];return this.options.bold!==!1&&g.push(_S.configure((i=this.options)===null||i===void 0?void 0:i.bold)),this.options.blockquote!==!1&&g.push(AB.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&g.push(PB.configure((t=this.options)===null||t===void 0?void 0:t.bulletList)),this.options.code!==!1&&g.push(BB.configure((n=this.options)===null||n===void 0?void 0:n.code)),this.options.codeBlock!==!1&&g.push(VB.configure((r=this.options)===null||r===void 0?void 0:r.codeBlock)),this.options.document!==!1&&g.push(AS.configure((s=this.options)===null||s===void 0?void 0:s.document)),this.options.dropcursor!==!1&&g.push($B.configure((o=this.options)===null||o===void 0?void 0:o.dropcursor)),this.options.gapcursor!==!1&&g.push(JB.configure((l=this.options)===null||l===void 0?void 0:l.gapcursor)),this.options.hardBreak!==!1&&g.push(QB.configure((a=this.options)===null||a===void 0?void 0:a.hardBreak)),this.options.heading!==!1&&g.push(LS.configure((u=this.options)===null||u===void 0?void 0:u.heading)),this.options.history!==!1&&g.push(l8.configure((c=this.options)===null||c===void 0?void 0:c.history)),this.options.horizontalRule!==!1&&g.push(u8.configure((h=this.options)===null||h===void 0?void 0:h.horizontalRule)),this.options.italic!==!1&&g.push(p8.configure((d=this.options)===null||d===void 0?void 0:d.italic)),this.options.listItem!==!1&&g.push(m8.configure((f=this.options)===null||f===void 0?void 0:f.listItem)),this.options.orderedList!==!1&&g.push(b8.configure((p=this.options)===null||p===void 0?void 0:p.orderedList)),this.options.paragraph!==!1&&g.push(PS.configure((b=this.options)===null||b===void 0?void 0:b.paragraph)),this.options.strike!==!1&&g.push(w8.configure((m=this.options)===null||m===void 0?void 0:m.strike)),this.options.text!==!1&&g.push(x8.configure((v=this.options)===null||v===void 0?void 0:v.text)),g}}),E8=Oe.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new De({key:new $e("placeholder"),props:{decorations:({doc:i,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:n}=e,r=[];if(!t)return null;const s=this.editor.isEmpty;return i.descendants((o,l)=>{const a=n>=l&&n<=l+o.nodeSize,u=!o.isLeaf&&Vc(o);if((a||!this.options.showOnlyCurrent)&&u){const c=[this.options.emptyNodeClass];s&&c.push(this.options.emptyEditorClass);const h=nt.node(l,l+o.nodeSize,{class:c.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:l,hasAnchor:a}):this.options.placeholder});
539r.push(h)}return this.options.includeChildren}),Me.create(i,r)}}})]}}),T8=Oe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new De({key:new $e("focus"),props:{decorations:({doc:i,selection:e})=>{const{isEditable:t,isFocused:n}=this.editor,{anchor:r}=e,s=[];if(!t||!n)return Me.create(i,[]);let o=0;this.options.mode==="deepest"&&i.descendants((a,u)=>{if(a.isText)return;if(!(r>=u&&r<=u+a.nodeSize-1))return!1;o+=1});let l=0;return i.descendants((a,u)=>{if(a.isText||!(r>=u&&r<=u+a.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&o-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";s.push(nt.node(u,u+a.nodeSize,{class:this.options.className}))}),Me.create(i,s)}}})]}});var Mf,If;if(typeof WeakMap<"u"){let i=new WeakMap;Mf=e=>i.get(e),If=(e,t)=>(i.set(e,t),t)}else{const i=[];let t=0;Mf=n=>{for(let r=0;r<i.length;r+=2)if(i[r]==n)return i[r+1]},If=(n,r)=>(t==10&&(t=0),i[t++]=n,i[t++]=r)}var Be=class{constructor(i,e,t,n){this.width=i,this.height=e,this.map=t,this.problems=n}findCell(i){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=i)continue;const n=e%this.width,r=e/this.width|0;let s=n+1,o=r+1;for(let l=1;s<this.width&&this.map[e+l]==t;l++)s++;for(let l=1;o<this.height&&this.map[e+this.width*l]==t;l++)o++;return{left:n,top:r,right:s,bottom:o}}throw new RangeError(`No cell with offset ${i} found`)}colCount(i){for(let e=0;e<this.map.length;e++)if(this.map[e]==i)return e%this.width;throw new RangeError(`No cell with offset ${i} found`)}nextCell(i,e,t){const{left:n,right:r,top:s,bottom:o}=this.findCell(i);return e=="horiz"?(t<0?n==0:r==this.width)?null:this.map[s*this.width+(t<0?n-1:r)]:(t<0?s==0:o==this.height)?null:this.map[n+this.width*(t<0?s-1:o)]}rectBetween(i,e){const{left:t,right:n,top:r,bottom:s}=this.findCell(i),{left:o,right:l,top:a,bottom:u}=this.findCell(e);return{left:Math.min(t,o),top:Math.min(r,a),right:Math.max(n,l),bottom:Math.max(s,u)}}cellsInRect(i){const e=[],t={};for(let n=i.top;n<i.bottom;n++)for(let r=i.left;r<i.right;r++){const s=n*this.width+r,o=this.map[s];t[o]||(t[o]=!0,!(r==i.left&&r&&this.map[s-1]==o||n==i.top&&n&&this.map[s-this.width]==o)&&e.push(o))}return e}positionAt(i,e,t){for(let n=0,r=0;;n++){const s=r+t.child(n).nodeSize;if(n==i){let o=e+i*this.width;const l=(i+1)*this.width;for(;o<l&&this.map[o]<r;)o++;return o==l?s-1:this.map[o]}r=s}}static get(i){return Mf(i)||If(i,S8(i))}};function S8(i){if(i.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+i.type.name);const e=C8(i),t=i.childCount,n=[];let r=0,s=null;const o=[];for(let u=0,c=e*t;u<c;u++)n[u]=0;for(let u=0,c=0;u<t;u++){const h=i.child(u);c++;for(let p=0;;p++){for(;r<n.length&&n[r]!=0;)r++;if(p==h.childCount)break;const b=h.child(p),{colspan:m,rowspan:v,colwidth:g}=b.attrs;for(let y=0;y<v;y++){if(y+u>=t){(s||(s=[])).push({type:"overlong_rowspan",pos:c,n:v-y});break}const w=r+y*e;for(let E=0;E<m;E++){n[w+E]==0?n[w+E]=c:(s||(s=[])).push({type:"collision",row:u,pos:c,n:m-E});const x=g&&g[E];if(x){const S=(w+E)%e*2,_=o[S];_==null||_!=x&&o[S+1]==1?(o[S]=x,o[S+1]=1):_==x&&o[S+1]++}}}r+=m,c+=b.nodeSize}const d=(u+1)*e;let f=0;for(;r<d;)n[r++]==0&&f++;f&&(s||(s=[])).push({type:"missing",row:u,n:f}),c++}(e===0||t===0)&&(s||(s=[])).push({type:"zero_sized"});const l=new Be(e,t,n,s);let a=!1;for(let u=0;!a&&u<o.length;u+=2)o[u]!=null&&o[u+1]<t&&(a=!0);return a&&k8(l,o,i),l}function C8(i){let e=-1,t=!1;for(let n=0;n<i.childCount;n++){const r=i.child(n);let s=0;if(t)for(let o=0;o<n;o++){const l=i.child(o);for(let a=0;a<l.childCount;a++){const u=l.child(a);o+u.attrs.rowspan>n&&(s+=u.attrs.colspan)}}for(let o=0;o<r.childCount;o++){const l=r.child(o);s+=l.attrs.colspan,l.attrs.rowspan>1&&(t=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function k8(i,e,t){i.problems||(i.problems=[]);const n={};for(let r=0;r<i.map.length;r++){const s=i.map[r];if(n[s])continue;n[s]=!0;const o=t.nodeAt(s);if(!o)throw new RangeError(`No cell with offset ${s} found`);let l=null;const a=o.attrs;for(let u=0;u<a.colspan;u++){const c=(r+u)%i.width,h=e[c*2];h!=null&&(!a.colwidth||a.colwidth[u]!=h)&&((l||(l=_8(a)))[u]=h)}l&&i.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function _8(i){if(i.colwidth)return i.colwidth.slice();const e=[];for(let t=0;t<i.colspan;t++)e.push(0);return e}function dt(i){let e=i.cached.tableNodeTypes;if(!e){e=i.cached.tableNodeTypes={};for(const t in i.nodes){const n=i.nodes[t],r=n.spec.tableRole;r&&(e[r]=n)}}return e}var pi=new $e("selectingCells");function Es(i){for(let e=i.depth-1;e>0;e--)if(i.node(e).type.spec.tableRole=="row")return i.node(0).resolve(i.before(e+1));return null}function A8(i){for(let e=i.depth;e>0;e--){const t=i.node(e).type.spec.tableRole;if(t==="cell"||t==="header_cell")return i.node(e)}return null}function sn(i){const e=i.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function Hc(i){const e=i.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const t=Es(e.$head)||L8(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function L8(i){for(let e=i.nodeAfter,t=i.pos;e;e=e.firstChild,t++){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return i.doc.resolve(t)}for(let e=i.nodeBefore,t=i.pos;e;e=e.lastChild,t--){const n=e.type.spec.tableRole;if(n=="cell"||n=="header_cell")return i.doc.resolve(t-e.nodeSize)}}function Of(i){return i.parent.type.spec.tableRole=="row"&&!!i.nodeAfter}function M8(i){return i.node(0).resolve(i.pos+i.nodeAfter.nodeSize)}function tg(i,e){return i.depth==e.depth&&i.pos>=e.start(-1)&&i.pos<=e.end(-1)}function NS(i,e,t){const n=i.node(-1),r=Be.get(n),s=i.start(-1),o=r.nextCell(i.pos-s,e,t);return o==null?null:i.node(0).resolve(s+o)}function wr(i,e,t=1){const n={...i,colspan:i.colspan-t};return n.colwidth&&(n.colwidth=n.colwidth.slice(),n.colwidth.splice(e,t),n.colwidth.some(r=>r>0)||(n.colwidth=null)),n}function BS(i,e,t=1){const n={...i,colspan:i.colspan+t};
539if(n.colwidth){n.colwidth=n.colwidth.slice();for(let r=0;r<t;r++)n.colwidth.splice(e,0,0)}return n}function I8(i,e,t){const n=dt(e.type.schema).header_cell;for(let r=0;r<i.height;r++)if(e.nodeAt(i.map[t+r*i.width]).type!=n)return!1;return!0}var Ce=class Rn extends se{constructor(e,t=e){const n=e.node(-1),r=Be.get(n),s=e.start(-1),o=r.rectBetween(e.pos-s,t.pos-s),l=e.node(0),a=r.cellsInRect(o).filter(c=>c!=t.pos-s);a.unshift(t.pos-s);const u=a.map(c=>{const h=n.nodeAt(c);if(!h)throw RangeError(`No cell with offset ${c} found`);const d=s+c+1;return new CT(l.resolve(d),l.resolve(d+h.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=t}map(e,t){const n=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(Of(n)&&Of(r)&&tg(n,r)){const s=this.$anchorCell.node(-1)!=n.node(-1);return s&&this.isRowSelection()?Rn.rowSelection(n,r):s&&this.isColSelection()?Rn.colSelection(n,r):new Rn(n,r)}return ie.between(n,r)}content(){const e=this.$anchorCell.node(-1),t=Be.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),s={},o=[];for(let a=r.top;a<r.bottom;a++){const u=[];for(let c=a*t.width+r.left,h=r.left;h<r.right;h++,c++){const d=t.map[c];if(s[d])continue;s[d]=!0;const f=t.findCell(d);let p=e.nodeAt(d);if(!p)throw RangeError(`No cell with offset ${d} found`);const b=r.left-f.left,m=f.right-r.right;if(b>0||m>0){let v=p.attrs;if(b>0&&(v=wr(v,0,b)),m>0&&(v=wr(v,v.colspan-m,m)),f.left<r.left){if(p=p.type.createAndFill(v),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(v)}`)}else p=p.type.create(v,p.content)}if(f.top<r.top||f.bottom>r.bottom){const v={...p.attrs,rowspan:Math.min(f.bottom,r.bottom)-Math.max(f.top,r.top)};f.top<r.top?p=p.type.createAndFill(v):p=p.type.create(v,p.content)}u.push(p)}o.push(e.child(a).copy(H.from(u)))}const l=this.isColSelection()&&this.isRowSelection()?e:o;return new K(H.from(l),1,1)}replace(e,t=K.empty){const n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){const{$from:l,$to:a}=r[o],u=e.mapping.slice(n);e.replace(u.map(l.pos),u.map(a.pos),o?K.empty:t)}const s=se.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,t){this.replace(e,new K(H.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),n=Be.get(t),r=this.$anchorCell.start(-1),s=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let o=0;o<s.length;o++)e(t.nodeAt(s[o]),r+s[o])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const n=e.node(-1),r=Be.get(n),s=e.start(-1),o=r.findCell(e.pos-s),l=r.findCell(t.pos-s),a=e.node(0);return o.top<=l.top?(o.top>0&&(e=a.resolve(s+r.map[o.left])),l.bottom<r.height&&(t=a.resolve(s+r.map[r.width*(r.height-1)+l.right-1]))):(l.top>0&&(t=a.resolve(s+r.map[l.left])),o.bottom<r.height&&(e=a.resolve(s+r.map[r.width*(r.height-1)+o.right-1]))),new Rn(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=Be.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),s=t.colCount(this.$headCell.pos-n);if(Math.min(r,s)>0)return!1;const o=r+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,l)==t.width}eq(e){return e instanceof Rn&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const n=e.node(-1),r=Be.get(n),s=e.start(-1),o=r.findCell(e.pos-s),l=r.findCell(t.pos-s),a=e.node(0);return o.left<=l.left?(o.left>0&&(e=a.resolve(s+r.map[o.top*r.width])),l.right<r.width&&(t=a.resolve(s+r.map[r.width*(l.top+1)-1]))):(l.left>0&&(t=a.resolve(s+r.map[l.top*r.width])),o.right<r.width&&(e=a.resolve(s+r.map[r.width*(o.top+1)-1]))),new Rn(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Rn(e.resolve(t.anchor),e.resolve(t.head)
vendor: 4,456 bytes, line 539
539)}static create(e,t,n=t){return new Rn(e.resolve(t),e.resolve(n))}getBookmark(){return new O8(this.$anchorCell.pos,this.$headCell.pos)}};Ce.prototype.visible=!1;se.jsonID("cell",Ce);var O8=class FS{constructor(e,t){this.anchor=e,this.head=t}map(e){return new FS(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&n.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&tg(t,n)?new Ce(t,n):se.near(n,1)}};function D8(i){if(!(i.selection instanceof Ce))return null;const e=[];return i.selection.forEachCell((t,n)=>{e.push(nt.node(n,n+t.nodeSize,{class:"selectedCell"}))}),Me.create(i.doc,e)}function P8({$from:i,$to:e}){if(i.pos==e.pos||i.pos<e.pos-6)return!1;let t=i.pos,n=e.pos,r=i.depth;for(;r>=0&&!(i.after(r+1)<i.end(r));r--,t++);for(let s=e.depth;s>=0&&!(e.before(s+1)>e.start(s));s--,n--);return t==n&&/row|table/.test(i.node(r).type.spec.tableRole)}function R8({$from:i,$to:e}){let t,n;for(let r=i.depth;r>0;r--){const s=i.node(r);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){t=s;break}}for(let r=e.depth;r>0;r--){const s=e.node(r);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}return t!==n&&e.parentOffset===0}function N8(i,e,t){const n=(e||i).selection,r=(e||i).doc;let s,o;if(n instanceof ne&&(o=n.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")s=Ce.create(r,n.from);else if(o=="row"){const l=r.resolve(n.from+1);s=Ce.rowSelection(l,l)}else if(!t){const l=Be.get(n.node),a=n.from+1,u=a+l.map[l.width*l.height-1];s=Ce.create(r,a+1,u)}}else n instanceof ie&&P8(n)?s=ie.create(r,n.from):n instanceof ie&&R8(n)&&(s=ie.create(r,n.$from.start(),n.$from.end()));return s&&(e||(e=i.tr)).setSelection(s),e}var B8=new $e("fix-tables");function zS(i,e,t,n){const r=i.childCount,s=e.childCount;e:for(let o=0,l=0;o<s;o++){const a=e.child(o);for(let u=l,c=Math.min(r,o+3);u<c;u++)if(i.child(u)==a){l=u+1,t+=a.nodeSize;continue e}n(a,t),l<r&&i.child(l).sameMarkup(a)?zS(i.child(l),a,t+1,n):a.nodesBetween(0,a.content.size,n,t+1),t+=a.nodeSize}}function VS(i,e){let t;const n=(r,s)=>{r.type.spec.tableRole=="table"&&(t=F8(i,r,s,t))};return e?e.doc!=i.doc&&zS(e.doc,i.doc,0,n):i.doc.descendants(n),t}function F8(i,e,t,n){const r=Be.get(e);if(!r.problems)return n;n||(n=i.tr);const s=[];for(let a=0;a<r.height;a++)s.push(0);for(let a=0;a<r.problems.length;a++){const u=r.problems[a];if(u.type=="collision"){const c=e.nodeAt(u.pos);if(!c)continue;const h=c.attrs;for(let d=0;d<h.rowspan;d++)s[u.row+d]+=u.n;n.setNodeMarkup(n.mapping.map(t+1+u.pos),null,wr(h,h.colspan-u.n,u.n))}else if(u.type=="missing")s[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const c=e.nodeAt(u.pos);if(!c)continue;n.setNodeMarkup(n.mapping.map(t+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const c=e.nodeAt(u.pos);if(!c)continue;n.setNodeMarkup(n.mapping.map(t+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){const c=n.mapping.map(t);n.delete(c,c+e.nodeSize)}}let o,l;for(let a=0;a<s.length;a++)s[a]&&(o==null&&(o=a),l=a);for(let a=0,u=t+1;a<r.height;a++){const c=e.child(a),h=u+c.nodeSize,d=s[a];if(d>0){let f="cell";c.firstChild&&(f=c.firstChild.type.spec.tableRole);const p=[];for(let m=0;m<d;m++){const v=dt(i.schema)[f].createAndFill();v&&p.push(v)}const b=(a==0||o==a-1)&&l==a?u+1:h-1;n.insert(n.mapping.map(b),p)}u=h}return n.setMeta(B8,{fixTables:!0})}function Ln(i){const e=i.selection,t=Hc(i),n=t.node(-1),r=t.start(-1),s=Be.get(n);return{...e instanceof Ce?s.rectBetween(e.$anchorCell.pos-r,e.$headCell.pos-r):s.findCell(t.pos-r),tableStart:r,map:s,table:n}}function HS(i,{map:e,tableStart:t,table:n},r){let s=r>0?-1:0;I8(e,n,r+s)&&(s=r==0||r==e.width?null:0);for(let o=0;o<e.height;o++){const l=o*e.width+r;if(r>0&&r<e.width&&e.map[l-1]==e.map[l]){const a=e.map[l],u=n.nodeAt(a);i.setNodeMarkup(i.mapping.map(t+a),null,BS(u.attrs,r-e.colCount(a))),o+=u.attrs.rowspan-1}else{const a=s==null?dt(n.type.schema).cell:n.nodeAt(e.map[l+s]).type,u=e.positionAt(o,r,n);i.insert(i.mapping.map(t+u),a.createAndFill())}}return i}function z8(i,e){if(!sn(i))return!1;if(e){const t=Ln(i);e(HS(i.tr,t,t.left))}return!0}function V8(i,e){if(!sn(i))return!1;if(e){const t=Ln(i);e(HS(i.tr,t,t.right))}return!0}function H8(i,{map:e,table:t,tableStart:n},r){const s=i.mapping.maps.length;for(let o=0;
539o<e.height;){const l=o*e.width+r,a=e.map[l],u=t.nodeAt(a),c=u.attrs;if(r>0&&e.map[l-1]==a||r<e.width-1&&e.map[l+1]==a)i.setNodeMarkup(i.mapping.slice(s).map(n+a),null,wr(c,r-e.colCount(a)));else{const h=i.mapping.slice(s).map(n+a);i.delete(h,h+u.nodeSize)}o+=c.rowspan}}function j8(i,e){if(!sn(i))return!1;if(e){const t=Ln(i),n=i.tr;if(t.left==0&&t.right==t.map.width)return!1;for(let r=t.right-1;H8(n,t,r),r!=t.left;r--){const s=t.tableStart?n.doc.nodeAt(t.tableStart-1):n.doc;if(!s)throw RangeError("No table found");t.table=s,t.map=Be.get(s)}e(n)}return!0}function $8(i,e,t){var n;const r=dt(e.type.schema).header_cell;for(let s=0;s<i.width;s++)if(((n=e.nodeAt(i.map[s+t*i.width]))==null?void 0:n.type)!=r)return!1;return!0}function jS(i,{map:e,tableStart:t,table:n},r){var s;let o=t;for(let u=0;u<r;u++)o+=n.child(u).nodeSize;const l=[];let a=r>0?-1:0;$8(e,n,r+a)&&(a=r==0||r==e.height?null:0);for(let u=0,c=e.width*r;u<e.width;u++,c++)if(r>0&&r<e.height&&e.map[c]==e.map[c-e.width]){const h=e.map[c],d=n.nodeAt(h).attrs;i.setNodeMarkup(t+h,null,{...d,rowspan:d.rowspan+1}),u+=d.colspan-1}else{const h=a==null?dt(n.type.schema).cell:(s=n.nodeAt(e.map[c+a*e.width]))==null?void 0:s.type,d=h==null?void 0:h.createAndFill();d&&l.push(d)}return i.insert(o,dt(n.type.schema).row.create(null,l)),i}function q8(i,e){if(!sn(i))return!1;if(e){const t=Ln(i);e(jS(i.tr,t,t.top))}return!0}function U8(i,e){if(!sn(i))return!1;if(e){const t=Ln(i);e(jS(i.tr,t,t.bottom))}return!0}function W8(i,{map:e,table:t,tableStart:n},r){let s=0;for(let u=0;u<r;u++)s+=t.child(u).nodeSize;const o=s+t.child(r).nodeSize,l=i.mapping.maps.length;i.delete(s+n,o+n);const a=new Set;for(let u=0,c=r*e.width;u<e.width;u++,c++){const h=e.map[c];if(!a.has(h)){if(a.add(h),r>0&&h==e.map[c-e.width]){const d=t.nodeAt(h).attrs;i.setNodeMarkup(i.mapping.slice(l).map(h+n),null,{...d,rowspan:d.rowspan-1}),u+=d.colspan-1}else if(r<e.height&&h==e.map[c+e.width]){const d=t.nodeAt(h),f=d.attrs,p=d.type.create({...f,rowspan:d.attrs.rowspan-1},d.content),b=e.positionAt(r+1,u,t);i.insert(i.mapping.slice(l).map(n+b),p),u+=f.colspan-1}}}}function G8(i,e){if(!sn(i))return!1;if(e){const t=Ln(i),n=i.tr;if(t.top==0&&t.bottom==t.map.height)return!1;for(let r=t.bottom-1;W8(n,t,r),r!=t.top;r--){const s=t.tableStart?n.doc.nodeAt(t.tableStart-1):n.doc;if(!s)throw RangeError("No table found");t.table=s,t.map=Be.get(t.table)}e(n)}return!0}function Cy(i){const e=i.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function K8({width:i,height:e,map:t},n){let r=n.top*i+n.left,s=r,o=(n.bottom-1)*i+n.left,l=r+(n.right-n.left-1);for(let a=n.top;a<n.bottom;a++){if(n.left>0&&t[s]==t[s-1]||n.right<i&&t[l]==t[l+1])return!0;s+=i,l+=i}for(let a=n.left;a<n.right;a++){if(n.top>0&&t[r]==t[r-i]||n.bottom<e&&t[o]==t[o+i])return!0;r++,o++}return!1}function ky(i,e){const t=i.selection;if(!(t instanceof Ce)||t.$anchorCell.pos==t.$headCell.pos)return!1;const n=Ln(i),{map:r}=n;if(K8(r,n))return!1;if(e){const s=i.tr,o={};let l=H.empty,a,u;for(let c=n.top;c<n.bottom;c++)for(let h=n.left;h<n.right;h++){const d=r.map[c*r.width+h],f=n.table.nodeAt(d);if(!(o[d]||!f))if(o[d]=!0,a==null)a=d,u=f;else{Cy(f)||(l=l.append(f.content));const p=s.mapping.map(d+n.tableStart);s.delete(p,p+f.nodeSize)}}if(a==null||u==null)return!0;if(s.setNodeMarkup(a+n.tableStart,null,{...BS(u.attrs,u.attrs.colspan,n.right-n.left-u.attrs.colspan),rowspan:n.bottom-n.top}),l.size){const c=a+1+u.content.size,h=Cy(u)?a+1:c;s.replaceWith(h+n.tableStart,c+n.tableStart,l)}s.setSelection(new Ce(s.doc.resolve(a+n.tableStart))),e(s)}return!0}function _y(i,e){const t=dt(i.schema);return Y8(({node:n})=>t[n.type.spec.tableRole])(i,e)}function Y8(i){return(e,t)=>{var n;const r=e.selection;let s,o;if(r instanceof Ce){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;s=r.$anchorCell.nodeAfter,o=r.$anchorCell.pos}else{if(s=A8(r.$from),!s)return!1;o=(n=Es(r.$from))==null?void 0:n.pos}if(s==null||o==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(t){let l=s.attrs;const a=[],u=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const c=Ln(e),h=e.tr;for(let f=0;f<c.right-c.left;f++)a.push(u?{...l,colwidth:u&&u[f]?[u[f]]:null}:l);let d;for(let f=c.top;f<c.bottom;f++){let p=c.map.positionAt(f,c.left,c.table);f==c.top&&(p+=s.nodeSize);for(let b=c.left,m=0;b<c.right;b++,m++)b==c.left&&f==c.top||h.insert(d=h.mapping.map(p+c.tableStart,1),i({node:s,row:f,col:b}).createAndFill(a[m]))}h.setNodeMarkup(o,i({node:s,row:c.top,col:c.left}),a[0]),r instanceof Ce&&h.setSelection(new Ce(h.doc.resolve(r.$anchorCell.pos),d?h.doc.resolve(d):void 0)),t(h)}return!0}}function X8(i,e){return function(t,n){if(!sn(t))return!1;const r=Hc(t);if(r.nodeAfter.attrs[i]===e)return!1;if(n){const s=t.tr;t.selection instanceof Ce?t.selection.forEachCell((o,l)=>{o.attrs[i]!==e&&s.setNodeMarkup(l,null,{...o.attrs,[i]:e})}):s.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[i]:e}),n(s)}return!0}}function J8(i){return function(e,t){if(!sn(e))return!1;if(t){const n=dt(e.schema),r=Ln(e),s=e.tr,o=r.map.cellsInRect(i=="column"?{left:r.left,top:0,right:r.right,bottom:r.map.height}:i=="row"?{left:0,top:r.top,right:r.map.width,bottom:r.bottom}:r),l=o.map(a=>r.table.nodeAt(a));for(let a=0;a<o.length;a++)l[a].type==n.header_cell&&s.setNodeMarkup(r.tableStart+o[a],n.cell,l[a].attrs);if(s.steps.length==0)for(let a=0;a<o.length;a++)s.setNodeMarkup(r.tableStart+o[a],n.header_cell,l[a].attrs);t(s)}return!0}}function Ay(i,e,t){const n=e.map.cellsInRect({left:0,top:0,right:i=="row"?e.map.width:1,bottom:i=="column"?e.map.height:1});for(let r=0;r<n.length;r++){const s=e.table.nodeAt(n[r]);if(s&&s.type!==t.header_cell)return!1}return!0}function qo(i,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?J8(i):function(t,n){if(!sn(t))return!1;if(n){const r=dt(t.schema),s=Ln(t),o=t.tr,l=Ay("row",s,r),a=Ay("column",s,r),c=(i==="column"?l:i==="row"?a:!1)?1:0,h=i=="column"?{left:0,top:c,right:1,bottom:s.map.height}:i=="row"?{left:c,top:0,right:s.map.width,bottom:1}:s,d=i=="column"?a?r.cell:r.header_cell:i=="row"?l?r.cell:r.header_cell:r.cell;
539s.map.cellsInRect(h).forEach(f=>{const p=f+s.tableStart,b=o.doc.nodeAt(p);b&&o.setNodeMarkup(p,d,b.attrs)}),n(o)}return!0}}qo("row",{useDeprecatedLogic:!0});qo("column",{useDeprecatedLogic:!0});var Q8=qo("cell",{useDeprecatedLogic:!0});function Z8(i,e){if(e<0){const t=i.nodeBefore;if(t)return i.pos-t.nodeSize;for(let n=i.index(-1)-1,r=i.before();n>=0;n--){const s=i.node(-1).child(n),o=s.lastChild;if(o)return r-1-o.nodeSize;r-=s.nodeSize}}else{if(i.index()<i.parent.childCount-1)return i.pos+i.nodeAfter.nodeSize;const t=i.node(-1);for(let n=i.indexAfter(-1),r=i.after();n<t.childCount;n++){const s=t.child(n);if(s.childCount)return r+1;r+=s.nodeSize}}return null}function Ly(i){return function(e,t){if(!sn(e))return!1;const n=Z8(Hc(e),i);if(n==null)return!1;if(t){const r=e.doc.resolve(n);t(e.tr.setSelection(ie.between(r,M8(r))).scrollIntoView())}return!0}}function eF(i,e){const t=i.selection.$anchor;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="table")return e&&e(i.tr.delete(t.before(n),t.after(n)).scrollIntoView()),!0;return!1}function Ga(i,e){const t=i.selection;if(!(t instanceof Ce))return!1;if(e){const n=i.tr,r=dt(i.schema).cell.createAndFill().content;t.forEachCell((s,o)=>{s.content.eq(r)||n.replace(n.mapping.map(o+1),n.mapping.map(o+s.nodeSize-1),new K(r,0,0))}),n.docChanged&&e(n)}return!0}function tF(i){if(!i.size)return null;let{content:e,openStart:t,openEnd:n}=i;for(;e.childCount==1&&(t>0&&n>0||e.child(0).type.spec.tableRole=="table");)t--,n--,e=e.child(0).content;const r=e.child(0),s=r.type.spec.tableRole,o=r.type.schema,l=[];if(s=="row")for(let a=0;a<e.childCount;a++){let u=e.child(a).content;const c=a?0:Math.max(0,t-1),h=a<e.childCount-1?0:Math.max(0,n-1);(c||h)&&(u=Df(dt(o).row,new K(u,c,h)).content),l.push(u)}else if(s=="cell"||s=="header_cell")l.push(t||n?Df(dt(o).row,new K(e,t,n)).content:e);else return null;return nF(o,l)}function nF(i,e){const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(let o=s.childCount-1;o>=0;o--){const{rowspan:l,colspan:a}=s.child(o).attrs;for(let u=r;u<r+l;u++)t[u]=(t[u]||0)+a}}let n=0;for(let r=0;r<t.length;r++)n=Math.max(n,t[r]);for(let r=0;r<t.length;r++)if(r>=e.length&&e.push(H.empty),t[r]<n){const s=dt(i).cell.createAndFill(),o=[];for(let l=t[r];l<n;l++)o.push(s);e[r]=e[r].append(H.from(o))}return{height:e.length,width:n,rows:e}}function Df(i,e){const t=i.createAndFill();return new Om(t).replace(0,t.content.size,e).doc}function iF({width:i,height:e,rows:t},n,r){if(i!=n){const s=[],o=[];for(let l=0;l<t.length;l++){const a=t[l],u=[];for(let c=s[l]||0,h=0;c<n;h++){let d=a.child(h%a.childCount);c+d.attrs.colspan>n&&(d=d.type.createChecked(wr(d.attrs,d.attrs.colspan,c+d.attrs.colspan-n),d.content)),u.push(d),c+=d.attrs.colspan;for(let f=1;f<d.attrs.rowspan;f++)s[l+f]=(s[l+f]||0)+d.attrs.colspan}o.push(H.from(u))}t=o,i=n}if(e!=r){const s=[];for(let o=0,l=0;o<r;o++,l++){const a=[],u=t[l%e];for(let c=0;c<u.childCount;c++){let h=u.child(c);o+h.attrs.rowspan>r&&(h=h.type.create({...h.attrs,rowspan:Math.max(1,r-h.attrs.rowspan)},h.content)),a.push(h)}s.push(H.from(a))}t=s,e=r}return{width:i,height:e,rows:t}}function rF(i,e,t,n,r,s,o){const l=i.doc.type.schema,a=dt(l);let u,c;if(r>e.width)for(let h=0,d=0;h<e.height;h++){const f=t.child(h);d+=f.nodeSize;const p=[];let b;f.lastChild==null||f.lastChild.type==a.cell?b=u||(u=a.cell.createAndFill()):b=c||(c=a.header_cell.createAndFill());for(let m=e.width;m<r;m++)p.push(b);i.insert(i.mapping.slice(o).map(d-1+n),p)}if(s>e.height){const h=[];for(let p=0,b=(e.height-1)*e.width;p<Math.max(e.width,r);p++){const m=p>=e.width?!1:t.nodeAt(e.map[b+p]).type==a.header_cell;h.push(m?c||(c=a.header_cell.createAndFill()):u||(u=a.cell.createAndFill()))}const d=a.row.create(null,H.from(h)),f=[];for(let p=e.height;p<s;p++)f.push(d);i.insert(i.mapping.slice(o).map(n+t.nodeSize-2),f)}return!!(u||c)}function My(i,e,t,n,r,s,o,l){if(o==0||o==e.height)return!1;let a=!1;for(let u=r;u<s;u++){const c=o*e.width+u,h=e.map[c];if(e.map[c-e.width]==h){a=!0;const d=t.nodeAt(h),{top:f,left:p}=e.findCell(h);i.setNodeMarkup(i.mapping.slice(l).map(h+n),null,{...d.attrs,rowspan:o-f}),i.insert(i.mapping.slice(l).map(e.positionAt(o,p,t)),d.type.createAndFill({...d.attrs,rowspan:f+d.attrs.rowspan-o})),u+=d.attrs.colspan-1}}return a}function Iy(i,e,t,n,r,s,o,l){if(o==0||o==e.width)return!1;let a=!1;for(let u=r;u<s;u++){const c=u*e.width+o,h=e.map[c];if(e.map[c-1]==h){a=!0;const d=t.nodeAt(h),f=e.colCount(h),p=i.mapping.slice(l).map(h+n);i.setNodeMarkup(p,null,wr(d.attrs,o-f,d.attrs.colspan-(o-f))),i.insert(p+d.nodeSize,d.t
539ype.createAndFill(wr(d.attrs,0,o-f))),u+=d.attrs.rowspan-1}}return a}function Oy(i,e,t,n,r){let s=t?i.doc.nodeAt(t-1):i.doc;if(!s)throw new Error("No table found");let o=Be.get(s);const{top:l,left:a}=n,u=a+r.width,c=l+r.height,h=i.tr;let d=0;function f(){if(s=t?h.doc.nodeAt(t-1):h.doc,!s)throw new Error("No table found");o=Be.get(s),d=h.mapping.maps.length}rF(h,o,s,t,u,c,d)&&f(),My(h,o,s,t,a,u,l,d)&&f(),My(h,o,s,t,a,u,c,d)&&f(),Iy(h,o,s,t,l,c,a,d)&&f(),Iy(h,o,s,t,l,c,u,d)&&f();for(let p=l;p<c;p++){const b=o.positionAt(p,a,s),m=o.positionAt(p,u,s);h.replace(h.mapping.slice(d).map(b+t),h.mapping.slice(d).map(m+t),new K(r.rows[p-l],0,0))}f(),h.setSelection(new Ce(h.doc.resolve(t+o.positionAt(l,a,s)),h.doc.resolve(t+o.positionAt(c-1,u-1,s)))),e(h)}var sF=$m({ArrowLeft:Ka("horiz",-1),ArrowRight:Ka("horiz",1),ArrowUp:Ka("vert",-1),ArrowDown:Ka("vert",1),"Shift-ArrowLeft":Ya("horiz",-1),"Shift-ArrowRight":Ya("horiz",1),"Shift-ArrowUp":Ya("vert",-1),"Shift-ArrowDown":Ya("vert",1),Backspace:Ga,"Mod-Backspace":Ga,Delete:Ga,"Mod-Delete":Ga});function yl(i,e,t){return t.eq(i.selection)?!1:(e&&e(i.tr.setSelection(t).scrollIntoView()),!0)}function Ka(i,e){return(t,n,r)=>{if(!r)return!1;const s=t.selection;if(s instanceof Ce)return yl(t,n,se.near(s.$headCell,e));if(i!="horiz"&&!s.empty)return!1;const o=$S(r,i,e);if(o==null)return!1;if(i=="horiz")return yl(t,n,se.near(t.doc.resolve(s.head+e),e));{const l=t.doc.resolve(o),a=NS(l,i,e);let u;return a?u=se.near(a,1):e<0?u=se.near(t.doc.resolve(l.before(-1)),-1):u=se.near(t.doc.resolve(l.after(-1)),1),yl(t,n,u)}}}function Ya(i,e){return(t,n,r)=>{if(!r)return!1;const s=t.selection;let o;if(s instanceof Ce)o=s;else{const a=$S(r,i,e);if(a==null)return!1;o=new Ce(t.doc.resolve(a))}const l=NS(o.$headCell,i,e);return l?yl(t,n,new Ce(o.$anchorCell,l)):!1}}function oF(i,e){const t=i.state.doc,n=Es(t.resolve(e));return n?(i.dispatch(i.state.tr.setSelection(new Ce(n))),!0):!1}function aF(i,e,t){if(!sn(i.state))return!1;let n=tF(t);const r=i.state.selection;if(r instanceof Ce){n||(n={width:1,height:1,rows:[H.from(Df(dt(i.state.schema).cell,t))]});const s=r.$anchorCell.node(-1),o=r.$anchorCell.start(-1),l=Be.get(s).rectBetween(r.$anchorCell.pos-o,r.$headCell.pos-o);return n=iF(n,l.right-l.left,l.bottom-l.top),Oy(i.state,i.dispatch,o,l,n),!0}else if(n){const s=Hc(i.state),o=s.start(-1);return Oy(i.state,i.dispatch,o,Be.get(s.node(-1)).findCell(s.pos-o),n),!0}else return!1}function lF(i,e){var t;if(e.ctrlKey||e.metaKey)return;const n=Dy(i,e.target);let r;if(e.shiftKey&&i.state.selection instanceof Ce)s(i.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&n&&(r=Es(i.state.selection.$anchor))!=null&&((t=Gd(i,e))==null?void 0:t.pos)!=r.pos)s(r,e),e.preventDefault();else if(!n)return;function s(a,u){let c=Gd(i,u);const h=pi.getState(i.state)==null;if(!c||!tg(a,c))if(h)c=a;else return;const d=new Ce(a,c);if(h||!i.state.selection.eq(d)){const f=i.state.tr.setSelection(d);h&&f.setMeta(pi,a.pos),i.dispatch(f)}}function o(){i.root.removeEventListener("mouseup",o),i.root.removeEventListener("dragstart",o),i.root.removeEventListener("mousemove",l),pi.getState(i.state)!=null&&i.dispatch(i.state.tr.setMeta(pi,-1))}function l(a){const u=a,c=pi.getState(i.state);let h;if(c!=null)h=i.state.doc.resolve(c);else if(Dy(i,u.target)!=n&&(h=Gd(i,e),!h))return o();h&&s(h,u)}i.root.addEventListener("mouseup",o),i.root.addEventListener("dragstart",o),i.root.addEventListener("mousemove",l)}function $S(i,e,t){if(!(i.state.selection instanceof ie))return null;const{$head:n}=i.state.selection;for(let r=n.depth-1;r>=0;r--){const s=n.node(r);if((t<0?n.index(r):n.indexAfter(r))!=(t<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=n.before(r),a=e=="vert"?t>0?"down":"up":t>0?"right":"left";return i.endOfTextblock(a)?l:null}}return null}function Dy(i,e){for(;e&&e!=i.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Gd(i,e){const t=i.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?Es(i.state.doc.resolve(t.pos)):null}var uF=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Pf(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Pf(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};
539function Pf(i,e,t,n,r,s){var o;let l=0,a=!0,u=e.firstChild;const c=i.firstChild;if(c){for(let h=0,d=0;h<c.childCount;h++){const{colspan:f,colwidth:p}=c.child(h).attrs;for(let b=0;b<f;b++,d++){const m=r==d?s:p&&p[b],v=m?m+"px":"";if(l+=m||n,m||(a=!1),u)u.style.width!=v&&(u.style.width=v),u=u.nextSibling;else{const g=document.createElement("col");g.style.width=v,e.appendChild(g)}}}for(;u;){const h=u.nextSibling;(o=u.parentNode)==null||o.removeChild(u),u=h}a?(t.style.width=l+"px",t.style.minWidth=""):(t.style.width="",t.style.minWidth=l+"px")}}var Dt=new $e("tableColumnResizing");function cF({handleWidth:i=5,cellMinWidth:e=25,defaultCellMinWidth:t=100,View:n=uF,lastColumnResizable:r=!0}={}){const s=new De({key:Dt,state:{init(o,l){var a,u;const c=(u=(a=s.spec)==null?void 0:a.props)==null?void 0:u.nodeViews,h=dt(l.schema).table.name;return n&&c&&(c[h]=(d,f)=>new n(d,t,f)),new dF(-1,!1)},apply(o,l){return l.apply(o)}},props:{attributes:o=>{const l=Dt.getState(o);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,l)=>{hF(o,l,i,r)},mouseleave:o=>{fF(o)},mousedown:(o,l)=>{pF(o,l,e,t)}},decorations:o=>{const l=Dt.getState(o);if(l&&l.activeHandle>-1)return vF(o,l.activeHandle)},nodeViews:{}}});return s}var dF=class vl{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,n=e.getMeta(Dt);if(n&&n.setHandle!=null)return new vl(n.setHandle,!1);if(n&&n.setDragging!==void 0)return new vl(t.activeHandle,n.setDragging);if(t.activeHandle>-1&&e.docChanged){let r=e.mapping.map(t.activeHandle,-1);return Of(e.doc.resolve(r))||(r=-1),new vl(r,t.dragging)}return t}};function hF(i,e,t,n){if(!i.editable)return;const r=Dt.getState(i.state);if(r&&!r.dragging){const s=gF(e.target);let o=-1;if(s){const{left:l,right:a}=s.getBoundingClientRect();e.clientX-l<=t?o=Py(i,e,"left",t):a-e.clientX<=t&&(o=Py(i,e,"right",t))}if(o!=r.activeHandle){if(!n&&o!==-1){const l=i.state.doc.resolve(o),a=l.node(-1),u=Be.get(a),c=l.start(-1);if(u.colCount(l.pos-c)+l.nodeAfter.attrs.colspan-1==u.width-1)return}qS(i,o)}}}function fF(i){if(!i.editable)return;const e=Dt.getState(i.state);e&&e.activeHandle>-1&&!e.dragging&&qS(i,-1)}function pF(i,e,t,n){var r;if(!i.editable)return!1;const s=(r=i.dom.ownerDocument.defaultView)!=null?r:window,o=Dt.getState(i.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const l=i.state.doc.nodeAt(o.activeHandle),a=mF(i,o.activeHandle,l.attrs);i.dispatch(i.state.tr.setMeta(Dt,{setDragging:{startX:e.clientX,startWidth:a}}));function u(h){s.removeEventListener("mouseup",u),s.removeEventListener("mousemove",c);const d=Dt.getState(i.state);d!=null&&d.dragging&&(bF(i,d.activeHandle,Ry(d.dragging,h,t)),i.dispatch(i.state.tr.setMeta(Dt,{setDragging:null})))}function c(h){if(!h.which)return u(h);const d=Dt.getState(i.state);if(d&&d.dragging){const f=Ry(d.dragging,h,t);Ny(i,d.activeHandle,f,n)}}return Ny(i,o.activeHandle,a,n),s.addEventListener("mouseup",u),s.addEventListener("mousemove",c),e.preventDefault(),!0}function mF(i,e,{colspan:t,colwidth:n}){const r=n&&n[n.length-1];if(r)return r;const s=i.domAtPos(e);let l=s.node.childNodes[s.offset].offsetWidth,a=t;if(n)for(let u=0;u<t;u++)n[u]&&(l-=n[u],a--);return l/a}function gF(i){for(;i&&i.nodeName!="TD"&&i.nodeName!="TH";)i=i.classList&&i.classList.contains("ProseMirror")?null:i.parentNode;return i}function Py(i,e,t,n){const r=t=="right"?-n:n,s=i.posAtCoords({left:e.clientX+r,top:e.clientY});if(!s)return-1;const{pos:o}=s,l=Es(i.state.doc.resolve(o));if(!l)return-1;if(t=="right")return l.pos;const a=Be.get(l.node(-1)),u=l.start(-1),c=a.map.indexOf(l.pos-u);return c%a.width==0?-1:u+a.map[c-1]}function Ry(i,e,t){const n=e.clientX-i.startX;return Math.max(t,i.startWidth+n)}function qS(i,e){i.dispatch(i.state.tr.setMeta(Dt,{setHandle:e}))}function bF(i,e,t){const n=i.state.doc.resolve(e),r=n.node(-1),s=Be.get(r),o=n.start(-1),l=s.colCount(n.pos-o)+n.nodeAfter.attrs.colspan-1,a=i.state.tr;for(let u=0;u<s.height;u++){const c=u*s.width+l;if(u&&s.map[c]==s.map[c-s.width])continue;const h=s.map[c],d=r.nodeAt(h).attrs,f=d.colspan==1?0:l-s.colCount(h);if(d.colwidth&&d.colwidth[f]==t)continue;const p=d.colwidth?d.colwidth.slice():yF(d.colspan);p[f]=t,a.setNodeMarkup(o+h,null,{...d,colwidth:p})}a.docChanged&&i.dispatch(a)}
539function Ny(i,e,t,n){const r=i.state.doc.resolve(e),s=r.node(-1),o=r.start(-1),l=Be.get(s).colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;let a=i.domAtPos(r.start(-1)).node;for(;a&&a.nodeName!="TABLE";)a=a.parentNode;a&&Pf(s,a.firstChild,a,n,l,t)}function yF(i){return Array(i).fill(0)}function vF(i,e){var t;const n=[],r=i.doc.resolve(e),s=r.node(-1);if(!s)return Me.empty;const o=Be.get(s),l=r.start(-1),a=o.colCount(r.pos-l)+r.nodeAfter.attrs.colspan-1;for(let u=0;u<o.height;u++){const c=a+u*o.width;if((a==o.width-1||o.map[c]!=o.map[c+1])&&(u==0||o.map[c]!=o.map[c-o.width])){const h=o.map[c],d=l+h+s.nodeAt(h).nodeSize-1,f=document.createElement("div");f.className="column-resize-handle",(t=Dt.getState(i))!=null&&t.dragging&&n.push(nt.node(l+h,l+h+s.nodeAt(h).nodeSize,{class:"column-resize-dragging"})),n.push(nt.widget(d,f))}}return Me.create(i.doc,n)}function wF({allowTableNodeSelection:i=!1}={}){return new De({key:pi,state:{init(){return null},apply(e,t){const n=e.getMeta(pi);if(n!=null)return n==-1?null:n;if(t==null||!e.docChanged)return t;const{deleted:r,pos:s}=e.mapping.mapResult(t);return r?null:s}},props:{decorations:D8,handleDOMEvents:{mousedown:lF},createSelectionBetween(e){return pi.getState(e.state)!=null?e.state.selection:null},handleTripleClick:oF,handleKeyDown:sF,handlePaste:aF},appendTransaction(e,t,n){return N8(n,VS(n,t),i)}})}function Rf(i,e){return e?["width",`${Math.max(e,i)}px`]:["min-width",`${i}px`]}function By(i,e,t,n,r,s){var o;let l=0,a=!0,u=e.firstChild;const c=i.firstChild;if(c!==null)for(let h=0,d=0;h<c.childCount;h+=1){const{colspan:f,colwidth:p}=c.child(h).attrs;for(let b=0;b<f;b+=1,d+=1){const m=r===d?s:p&&p[b],v=m?`${m}px`:"";if(l+=m||n,m||(a=!1),u){if(u.style.width!==v){const[g,y]=Rf(n,m);u.style.setProperty(g,y)}u=u.nextSibling}else{const g=document.createElement("col"),[y,w]=Rf(n,m);g.style.setProperty(y,w),e.appendChild(g)}}}for(;u;){const h=u.nextSibling;(o=u.parentNode)===null||o===void 0||o.removeChild(u),u=h}a?(t.style.width=`${l}px`,t.style.minWidth=""):(t.style.width="",t.style.minWidth=`${l}px`)}class xF{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),By(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,By(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function EF(i,e,t,n){let r=0,s=!0;const o=[],l=i.firstChild;if(!l)return{};for(let h=0,d=0;h<l.childCount;h+=1){const{colspan:f,colwidth:p}=l.child(h).attrs;for(let b=0;b<f;b+=1,d+=1){const m=t===d?n:p&&p[b];r+=m||e,m||(s=!1);const[v,g]=Rf(e,m);o.push(["col",{style:`${v}: ${g}`}])}}const a=s?`${r}px`:"",u=s?"":`${r}px`;return{colgroup:["colgroup",{},...o],tableWidth:a,tableMinWidth:u}}function Fy(i,e){return i.createAndFill()}function TF(i){if(i.cached.tableNodeTypes)return i.cached.tableNodeTypes;const e={};return Object.keys(i.nodes).forEach(t=>{const n=i.nodes[t];n.spec.tableRole&&(e[n.spec.tableRole]=n)}),i.cached.tableNodeTypes=e,e}function SF(i,e,t,n,r){const s=TF(i),o=[],l=[];for(let u=0;u<t;u+=1){const c=Fy(s.cell);if(c&&l.push(c),n){const h=Fy(s.header_cell);h&&o.push(h)}}const a=[];for(let u=0;u<e;u+=1)a.push(s.row.createChecked(null,n&&u===0?o:l));return s.table.createChecked(null,a)}function CF(i){return i instanceof Ce}const Xa=({editor:i})=>{const{selection:e}=i.state;if(!CF(e))return!1;let t=0;const n=xS(e.ranges[0].$from,s=>s.type.name==="table");return n==null||n.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(t+=1)}),t===e.ranges.length?(i.commands.deleteTable(),!0):!1},kF=st.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:xF,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:i,HTMLAttributes:e}){const{colgroup:t,tableWidth:n,tableMinWidth:r}=EF(i,this.options.cellMinWidth);return["table",Ie(this.options.HTMLAttributes,e,{style:n?`width: ${n}`:`min-width: ${r}`}),t,["tbody",0]]},addCommands(){return{insertTable:({rows:i=3,cols:e=3,withHeaderRow:t=!0}={})=>({tr:n,dispatch:r,editor:s})=>{const o=SF(s.schema,i,e,t);if(r){const l=n.selection.from+1;n.replaceSelectionWith(o).scrollIntoView().setSelection(ie.near(n.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:i,dispatch:e})=>z8(i,e),addColumnAfter:()=>({state:i,dispatch:e})=>V8(i,e),deleteColumn:()=>({state:i,dispatch:e})=>j8(i,e),addRowBefore:()=>({state:i,dispatch:e})=>q8(i,e),addRowAfter:()=>({state:i,dispatch:e})=>U8(i,e),deleteRow:()=>({state:i,dispatch:e})=>G8(i,e),deleteTable:()=>({state:i,dispatch:e})=>eF(i,e),mergeCells:()=>({state:i,dispatch:e})=>ky(i,e),splitCell:()=>({state:i,dispatch:e})=>_y(i,e),toggleHeaderColumn:()=>({state:i,dispatch:e})=>qo("column")(i,e),toggleHeaderRow:()=>({state:i,dispatch:e})=>qo("row")(i,e),toggleHeaderCell:()=>({state:i,dispatch:e})=>Q8(i,e),mergeOrSplit:()=>({state:i,dispatch:e})=>ky(i,e)?!0:_y(i,e),setCellAttribute:(i,e)=>({state:t,dispatch:n})=>X8(i,e)(t,n),goToNextCell:()=>({state:i,dispatch:e})=>Ly(1)(i,e),goToPreviousCell:()=>({state:i,dispatch:e})=>Ly(-1)(i,e),fixTables:()=>({state:i,dispatch:e})=>(e&&VS(i),!0),setCellSelection:i=>({tr:e,dispatch:t})=>{if(t){const n=Ce.create(e.doc,i.anchorCell,i.headCell);e.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Xa,"Mod-Backspace":Xa,Delete:Xa,"Mod-Delete":Xa}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[cF({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],wF({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(i){const e={name:i.name,options:i.options,storage:i.storage};return{tableRole:ce(X(i,"tableRole",e))}}}),_F=st.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:i}){return["tr",Ie(this.options.HTMLAttributes,i),0]}}),AF=st.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:i=>{const e=i.getAttribute("colwidth");return e?e.split(",").map(n=>parseInt(n,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:i}){return["td",Ie(this.options.HTMLAttributes,i),0]}}),LF=st.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:i=>{const e=i.getAttribute("colwidth");return e?e.split(",").map(n=>parseInt(n,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:i}){return["th",Ie(this.options.HTMLAttributes,i),0]}}),MF=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,US=st.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:i}){return["img",Ie(this.options.HTMLAttributes,i)]},addCommands(){return{setImage:i=>({commands:e})=>e.insertContent({type:this.name,attrs:i})}}
539,addInputRules(){return[kS({find:MF,type:this.type,getAttributes:i=>{const[,,e,t,n]=i;return{src:t,alt:e,title:n}}})]}}),IF="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yac
539hts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",OF="ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мкд2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5راÙ
ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5Ù
غرب5Ù
ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2Ù
اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ
3Ù
صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4ÙÙ
راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å
«å¦2å
¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é
åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ
å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å
2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2",ps=(i,e)=>{for(const t in e)i[t]=e[t];return i},Nf="numeric",Bf="ascii",Ff="alpha",lo="asciinumeric",Ws="alphanumeric",zf="domain",WS="emoji",DF="scheme",PF="slashscheme",Kd="whitespace";function RF(i,e){return i in e||(e[i]=[]),e[i]}function Zi(i,e,t){e[Nf]&&(e[lo]=!0,e[Ws]=!0),e[Bf]&&(e[lo]=!0,e[Ff]=!0),e[lo]&&(e[Ws]=!0),e[Ff]&&(e[Ws]=!0),e[Ws]&&(e[zf]=!0),e[WS]&&(e[zf]=!0);for(const n in e){const r=RF(n,t);r.indexOf(i)<0&&r.push(i)}}function NF(i,e){const t={};for(const n in e)e[n].indexOf(i)>=0&&(t[n]=!0);return t}function wt(i=null){this.j={},this.jr=[],this.jd=null,this.t=i}wt.groups={};wt.prototype={accepts(){return!!this.t},go(i){const e=this,t=e.j[i];if(t)return t;for(let n=0;n<e.jr.length;n++){const r=e.jr[n][0],s=e.jr[n][1];if(s&&r.test(i))return s}return e.jd},has(i,e=!1){return e?i in this.j:!!this.go(i)},ta(i,e,t,n){for(let r=0;r<i.length;r++)this.tt(i[r],e,t,n)}
vendor: 13,688 bytes, lines 539-543
539,tr(i,e,t,n){n=n||wt.groups;let r;return e&&e.j?r=e:(r=new wt(e),t&&n&&Zi(e,t,n)),this.jr.push([i,r]),r},ts(i,e,t,n){let r=this;const s=i.length;if(!s)return r;for(let o=0;o<s-1;o++)r=r.tt(i[o]);return r.tt(i[s-1],e,t,n)},tt(i,e,t,n){n=n||wt.groups;const r=this;if(e&&e.j)return r.j[i]=e,e;const s=e;let o,l=r.go(i);if(l?(o=new wt,ps(o.j,l.j),o.jr.push.apply(o.jr,l.jr),o.jd=l.jd,o.t=l.t):o=new wt,s){if(n)if(o.t&&typeof o.t=="string"){const a=ps(NF(o.t,n),t);Zi(s,a,n)}else t&&Zi(s,t,n);o.t=s}return r.j[i]=o,o}};const ue=(i,e,t,n,r)=>i.ta(e,t,n,r),Re=(i,e,t,n,r)=>i.tr(e,t,n,r),zy=(i,e,t,n,r)=>i.ts(e,t,n,r),q=(i,e,t,n,r)=>i.tt(e,t,n,r),Nn="WORD",Vf="UWORD",GS="ASCIINUMERICAL",KS="ALPHANUMERICAL",Uo="LOCALHOST",Hf="TLD",jf="UTLD",wl="SCHEME",Br="SLASH_SCHEME",ng="NUM",$f="WS",ig="NL",uo="OPENBRACE",co="CLOSEBRACE",Cu="OPENBRACKET",ku="CLOSEBRACKET",_u="OPENPAREN",Au="CLOSEPAREN",Lu="OPENANGLEBRACKET",Mu="CLOSEANGLEBRACKET",Iu="FULLWIDTHLEFTPAREN",Ou="FULLWIDTHRIGHTPAREN",Du="LEFTCORNERBRACKET",Pu="RIGHTCORNERBRACKET",Ru="LEFTWHITECORNERBRACKET",Nu="RIGHTWHITECORNERBRACKET",Bu="FULLWIDTHLESSTHAN",Fu="FULLWIDTHGREATERTHAN",zu="AMPERSAND",rg="APOSTROPHE",Vu="ASTERISK",di="AT",Hu="BACKSLASH",ju="BACKTICK",$u="CARET",mi="COLON",sg="COMMA",qu="DOLLAR",fn="DOT",Uu="EQUALS",og="EXCLAMATION",Ht="HYPHEN",ho="PERCENT",Wu="PIPE",Gu="PLUS",Ku="POUND",fo="QUERY",ag="QUOTE",YS="FULLWIDTHMIDDLEDOT",lg="SEMI",pn="SLASH",po="TILDE",Yu="UNDERSCORE",XS="EMOJI",Xu="SYM";var JS=Object.freeze({__proto__:null,WORD:Nn,UWORD:Vf,ASCIINUMERICAL:GS,ALPHANUMERICAL:KS,LOCALHOST:Uo,TLD:Hf,UTLD:jf,SCHEME:wl,SLASH_SCHEME:Br,NUM:ng,WS:$f,NL:ig,OPENBRACE:uo,CLOSEBRACE:co,OPENBRACKET:Cu,CLOSEBRACKET:ku,OPENPAREN:_u,CLOSEPAREN:Au,OPENANGLEBRACKET:Lu,CLOSEANGLEBRACKET:Mu,FULLWIDTHLEFTPAREN:Iu,FULLWIDTHRIGHTPAREN:Ou,LEFTCORNERBRACKET:Du,RIGHTCORNERBRACKET:Pu,LEFTWHITECORNERBRACKET:Ru,RIGHTWHITECORNERBRACKET:Nu,FULLWIDTHLESSTHAN:Bu,FULLWIDTHGREATERTHAN:Fu,AMPERSAND:zu,APOSTROPHE:rg,ASTERISK:Vu,AT:di,BACKSLASH:Hu,BACKTICK:ju,CARET:$u,COLON:mi,COMMA:sg,DOLLAR:qu,DOT:fn,EQUALS:Uu,EXCLAMATION:og,HYPHEN:Ht,PERCENT:ho,PIPE:Wu,PLUS:Gu,POUND:Ku,QUERY:fo,QUOTE:ag,FULLWIDTHMIDDLEDOT:YS,SEMI:lg,SLASH:pn,TILDE:po,UNDERSCORE:Yu,EMOJI:XS,SYM:Xu});const On=/[a-z]/,Bs=new RegExp("\\p{L}","u"),Yd=new RegExp("\\p{Emoji}","u"),Dn=/\d/,Xd=/\s/,Vy="\r",Jd=` 540`,BF="ï¸",FF="â",Qd="";let Ja=null,Qa=null;function zF(i=[]){const e={};wt.groups=e;const t=new wt;Ja==null&&(Ja=Hy(IF)),Qa==null&&(Qa=Hy(OF)),q(t,"'",rg),q(t,"{",uo),q(t,"}",co),q(t,"[",Cu),q(t,"]",ku),q(t,"(",_u),q(t,")",Au),q(t,"<",Lu),q(t,">",Mu),q(t,"ï¼",Iu),q(t,"ï¼",Ou),q(t,"ã",Du),q(t,"ã",Pu),q(t,"ã",Ru),q(t,"ã",Nu),q(t,"ï¼",Bu),q(t,"ï¼",Fu),q(t,"&",zu),q(t,"*",Vu),q(t,"@",di),q(t,"`",ju),q(t,"^",$u),q(t,":",mi),q(t,",",sg),q(t,"$",qu),q(t,".",fn),q(t,"=",Uu),q(t,"!",og),q(t,"-",Ht),q(t,"%",ho),q(t,"|",Wu),q(t,"+",Gu),q(t,"#",Ku),q(t,"?",fo),q(t,'"',ag),q(t,"/",pn),q(t,";",lg),q(t,"~",po),q(t,"_",Yu),q(t,"\\",Hu),q(t,"ã»",YS);const n=Re(t,Dn,ng,{[Nf]:!0});Re(n,Dn,n);const r=Re(n,On,GS,{[lo]:!0}),s=Re(n,Bs,KS,{[Ws]:!0}),o=Re(t,On,Nn,{[Bf]:!0});Re(o,Dn,r),Re(o,On,o),Re(r,Dn,r),Re(r,On,r);const l=Re(t,Bs,Vf,{[Ff]:!0});Re(l,On),Re(l,Dn,s),Re(l,Bs,l),Re(s,Dn,s),Re(s,On),Re(s,Bs,s);const a=q(t,Jd,ig,{[Kd]:!0}),u=q(t,Vy,$f,{[Kd]:!0}),c=Re(t,Xd,$f,{[Kd]:!0});q(t,Qd,c),q(u,Jd,a),q(u,Qd,c),Re(u,Xd,c),q(c,Vy),q(c,Jd),Re(c,Xd,c),q(c,Qd,c);const h=Re(t,Yd,XS,{[WS]:!0});q(h,"#"),Re(h,Yd,h),q(h,BF,h);const d=q(h,FF);q(d,"#"),Re(d,Yd,h);const f=[[On,o],[Dn,r]],p=[[On,null],[Bs,l],[Dn,s]];for(let b=0;b<Ja.length;b++)ni(t,Ja[b],Hf,Nn,f);for(let b=0;b<Qa.length;b++)ni(t,Qa[b],jf,Vf,p);Zi(Hf,{tld:!0,ascii:!0},e),Zi(jf,{utld:!0,alpha:!0},e),ni(t,"file",wl,Nn,f),ni(t,"mailto",wl,Nn,f),ni(t,"http",Br,Nn,f),ni(t,"https",Br,Nn,f),ni(t,"ftp",Br,Nn,f),ni(t,"ftps",Br,Nn,f),Zi(wl,{scheme:!0,ascii:!0},e),Zi(Br,{slashscheme:!0,ascii:!0},e),i=i.sort((b,m)=>b[0]>m[0]?1:-1);for(let b=0;b<i.length;b++){const m=i[b][0],g=i[b][1]?{[DF]:!0}:{[PF]:!0};m.indexOf("-")>=0?g[zf]=!0:On.test(m)?Dn.test(m)?g[lo]=!0:g[Bf]=!0:g[Nf]=!0,zy(t,m,m,g)}return zy(t,"localhost",Uo,{ascii:!0}),t.jd=new wt(Xu),{start:t,tokens:ps({groups:e},JS)}}function QS(i,e){const t=VF(e.replace(/[A-Z]/g,l=>l.toLowerCase())),n=t.length,r=[];let s=0,o=0;for(;o<n;){let l=i,a=null,u=0,c=null,h=-1,d=-1;for(;o<n&&(a=l.go(t[o]));)l=a,l.accepts()?(h=0,d=0,c=l):h>=0&&(h+=t[o].length,d++),u+=t[o].length,s+=t[o].length,o++;s-=h,o-=d,u-=h,r.push({t:c.t,v:e.slice(s-u,s),s:s-u,e:s})}return r}function VF(i){const e=[],t=i.length;let n=0;for(;n<t;){let r=i.charCodeAt(n),s,o=r<55296||r>56319||n+1===t||(s=i.charCodeAt(n+1))<56320||s>57343?i[n]:i.slice(n,n+2);e.push(o),n+=o.length}return e}function ni(i,e,t,n,r){let s;const o=e.length;for(let l=0;l<o-1;l++){const a=e[l];i.j[a]?s=i.j[a]:(s=new wt(n),s.jr=r.slice(),i.j[a]=s),i=s}return s=new wt(t),s.jr=r.slice(),i.j[e[o-1]]=s,s}function Hy(i){const e=[],t=[];let n=0,r="0123456789";for(;n<i.length;){let s=0;for(;r.indexOf(i[n+s])>=0;)s++;if(s>0){e.push(t.join(""));for(let o=parseInt(i.substring(n,n+s),10);o>0;o--)t.pop();n+=s}else t.push(i[n]),n++}return e}const Wo={defaultProtocol:"http",events:null,format:jy,formatHref:jy,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ug(i,e=null){let t=ps({},Wo);i&&(t=ps(t,i instanceof ug?i.o:i));const n=t.ignoreTags,r=[];for(let s=0;s<n.length;s++)r.push(n[s].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=r}ug.prototype={o:Wo,ignoreTags:[],defaultRender(i){return i},check(i){return this.get("validate",i.toString(),i)},get(i,e,t){const n=e!=null;let r=this.o[i];return r&&(typeof r=="object"?(r=t.t in r?r[t.t]:Wo[i],typeof r=="function"&&n&&(r=r(e,t))):typeof r=="function"&&n&&(r=r(e,t.t,t)),r)},getObj(i,e,t){let n=this.o[i];return typeof n=="function"&&e!=null&&(n=n(e,t.t,t)),n},render(i){const e=i.render(this);return(this.get("render",null,i)||this.defaultRender)(e,i.t,i)}};function jy(i){return i}function ZS(i,e){this.t="token",this.v=i,this.tk=e}ZS.prototype={isLink:!1,toString(){return this.v},toHref(i){return this.toString()},toFormattedString(i){const e=this.toString(),t=i.get("truncate",e,this),n=i.get("format",e,this);return t&&n.length>t?n.substring(0,t)+"â¦":n},toFormattedHref(i){return i.get("formatHref",this.toHref(i.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(i=Wo.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(i),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(i){return{type:this.t,value:this.toFormattedString(i),isLink:this.isLink,href:this.toFormattedHref(i),start:this.startIndex(),end:this.endIndex()}},validate(i){return i.get("validate",this.toString(),this)},render(i){const e=this,t=this.toHref(i.get("defaultProtocol")),n=i.get("formatHref",t,this),r=i.get("tagName",t,e),s=this.toFormattedString(i),o={},l=i.get("className",t,e),a=i.get("target",t,e),u=i.get("rel",t,e),c=i.getObj("attributes",t,e),h=i.getObj("events",t,e);return o.href=n,l&&(o.class=l),a&&(o.target=a),u&&(o.rel=u),c&&ps(o,c),{tagName:r,attributes:o,content:s,eventListeners:h}}};function jc(i,e){class t extends ZS{constructor(r,s){super(r,s),this.t=i}}for(const n in e)t.prototype[n]=e[n];return t.t=i,t}const $y=jc("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),qy=jc("text"),HF=jc("nl"),Za=jc("url",{isLink:!0,toHref(i=Wo.defaultProtocol){return this.hasProtocol()?this.v:`${i}://${this.v}`},hasProtocol(){const i=this.tk;return i.length>=2&&i[0].t!==Uo&&i[1].t===mi}}),zt=i=>new wt(i);function jF({groups:i}){const e=i.domain.concat([zu,Vu,di,Hu,ju,$u,qu,Uu,Ht,ng,ho,Wu,Gu,Ku,pn,Xu,po,Yu]),t=[mi,sg,fn,og,ho,fo,ag,lg,Lu,Mu,uo,co,ku,Cu,_u,Au,Iu,Ou,Du,Pu,Ru,Nu,Bu,Fu],n=[zu,rg,Vu,Hu,ju,$u,qu,Uu,Ht,uo,co,ho,Wu,Gu,Ku,fo,pn,Xu,po,Yu],r=zt(),s=q(r,po);ue(s,n,s),ue(s,i.domain,s);const o=zt(),l=zt(),a=zt();ue(r,i.domain,o),ue(r,i.scheme,l),ue(r,i.slashscheme,a),ue(o,n,s),ue(o,i.domain,o);const u=q(o,di);q(s,di,u),q(l,di,u),q(a,di,u);const c=q(s,fn);ue(c,n,s),ue(c,i.domain,s);const h=zt();ue(u,i.domain,h),ue(h,i.domain,h);const d=q(h,fn);ue(d,i.domain,h);const f=zt($y);ue(d,i.tld,f),ue(d,i.utld,f),q(u,Uo,f);const p=q(h,Ht);q(p,Ht,p),ue(p,i.domain,h),ue(f,i.domain,h),q(f,fn,d),q(f,Ht,p);const b=q(f,mi);ue(b,i.numeric,$y);const m=q(o,Ht),v=q(o,fn);q(m,Ht,m),ue(m,i.domain,o),ue(v,n,s),ue(v,i.domain,o);const g=zt(Za);ue(v,i.tld,g),ue(v,i.utld,g),ue(g,i.domain,o),ue(g,n,s),q(g,fn,v),q(g,Ht,m),q(g,di,u);const y=q(g,mi),w=zt(Za);ue(y,i.numeric,w);const E=zt(Za),x=zt();ue(E,e,E),ue(E,t,x),ue(x,e,E),ue(x,t,x),q(g,pn,E),q(w,pn,E);const S=q(l,mi),_=q(a,mi),M=q(_,pn),O=q(M,pn);ue(l,i.domain,o),q(l,fn,v),q(l,Ht,m),ue(a,i.domain,o),q(a,fn,v),q(a,Ht,m),ue(S,i.domain,E),q(S,pn,E),q(S,fo,E),ue(O,i.domain,E),ue(O,e,E),q(O,pn,E);const D=[[uo,co],[Cu,ku],[_u,Au],[Lu,Mu],[Iu,Ou],[Du,Pu],[Ru,Nu],[Bu,Fu]];for(let k=0;k<D.length;k++){const[A,C]=D[k],T=q(E,A);q(x,A,T),q(T,C,E);const L=zt(Za);ue(T,e,L);const I=zt();ue(T,t),ue(L,e,L),ue(L,t,I),ue(I,e,L),ue(I,t,I),q(L,C,E),q(I,C,E)}return q(r,Uo,g),q(r,ig,HF),{start:r,tokens:JS}}function $F(i,e,t){let n=t.length,r=0,s=[],o=[];for(;r<n;){let l=i,a=null,u=null,c=0,h=null,d=-1;for(;r<n&&!(a=l.go(t[r].t));)o.push(t[r++]);for(;r<n&&(u=a||l.go(t[r].t));)a=null,l=u,l.accepts()?(d=0,h=l):d>=0&&d++,r++,c++;if(d<0)r-=c,r<n&&(o.push(t[r]),r++);else{o.length>0&&(s.push(Zd(qy,e,o)),o=[]),r-=d,c-=d;const f=h.t,p=t.slice(r-c,r);s.push(Zd(f,e,p))}}return o.length>0&&s.push(Zd(qy,e,o)),s}function Zd(i,e,t){const n=t[0].s,r=t[t.length-1].e,s=e.slice(n,r);return new i(s,t)}const qF=typeof console<"u"&&console&&console.warn||(()=>{}),UF="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Ae={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function WF(){return wt.groups={},Ae.scanner=null,Ae.parser=null,Ae.tokenQueue=[],Ae.pluginQueue=[],Ae.customSchemes=[],Ae.initialized=!1,Ae}function Uy(i,e=!1){if(Ae.initialized&&qF(`linkifyjs: already initialized - will not register custom scheme "${i}" ${UF}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(i))throw new Error(`linkifyjs: incorrect scheme format. 5411. Must only contain digits, lowercase ASCII letters or "-" 5422. Cannot start or end with "-" 5433. "-" cannot repeat`);Ae.customSchemes.push([i,e])}function GF(){Ae.scanner=zF(Ae.customSchemes);for(let i=0;i<Ae.tokenQueue.length;i++)Ae.tokenQueue[i][1]({scanner:Ae.scanner});Ae.parser=jF(Ae.scanner.tokens);for(let i=0;i<Ae.pluginQueue.length;i++)Ae.pluginQueue[i][1]({scanner:Ae.scanner,parser:Ae.parser});return Ae.initialized=!0,Ae}function cg(i){return Ae.initialized||GF(),$F(Ae.parser.start,i,QS(Ae.scanner.start,i))}cg.scan=QS;function eC(i,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const n=new ug(t),r=cg(i),s=[];for(let o=0;o<r.length;o++){const l=r[o];l.isLink&&(!e||l.t===e)&&n.check(l)&&s.push(l.toFormattedObject(n))}return s}function KF(i){return i.length===1?i[0].isLink:i.length===3&&i[1].isLink?["()","[]"].includes(i[0].value+i[2].value):!1}function YF(i){return new De({key:new $e("autolink"),appendTransaction:(e,t,n)=>{const r=e.some(u=>u.docChanged)&&!t.doc.eq(n.doc),s=e.some(u=>u.getMeta("preventAutolink"));if(!r||s)return;const{tr:o}=n,l=$5(t.doc,[...e]);if(Y5(l).forEach(({newRange:u})=>{const c=U5(n.doc,u,f=>f.isTextblock);let h,d;if(c.length>1?(h=c[0],d=n.doc.textBetween(h.pos,h.pos+h.node.nodeSize,void 0," ")):c.length&&n.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(h=c[0],d=n.doc.textBetween(h.pos,u.to,void 0," ")),h&&d){const f=d.split(" ").filter(v=>v!=="");if(f.length<=0)return!1;const p=f[f.length-1],b=h.pos+d.lastIndexOf(p);if(!p)return!1;const m=cg(p).map(v=>v.toObject(i.defaultProtocol));if(!KF(m))return!1;m.filter(v=>v.isLink).map(v=>({...v,from:b+v.start+1,to:b+v.end+1})).filter(v=>n.schema.marks.code?!n.doc.rangeHasMark(v.from,v.to,n.schema.marks.code):!0).filter(v=>i.validate(v.value)).filter(v=>i.shouldAutoLink(v.value)).forEach(v=>{Zm(v.from,v.to,n.doc).some(g=>g.mark.type===i.type)||o.addMark(v.from,v.to,i.type.create({href:v.href}))})}}),!!o.steps.length)return o}})}function XF(i){return new De({key:new $e("handleClickLink"),props:{handleClick:(e,t,n)=>{var r,s;if(n.button!==0||!e.editable)return!1;let o=n.target;const l=[];for(;o.nodeName!=="DIV";)l.push(o),o=o.parentNode;if(!l.find(d=>d.nodeName==="A"))return!1;const a=TS(e.state,i.type.name),u=n.target,c=(r=u==null?void 0:u.href)!==null&&r!==void 0?r:a.href,h=(s=u==null?void 0:u.target)!==null&&s!==void 0?s:a.target;return u&&c?(window.open(c,h),!0):!1}}})}function JF(i){return new De({key:new $e("handlePasteLink"),props:{handlePaste:(e,t,n)=>{const{state:r}=e,{selection:s}=r,{empty:o}=s;if(o)return!1;let l="";n.content.forEach(u=>{l+=u.textContent});const a=eC(l,{defaultProtocol:i.defaultProtocol}).find(u=>u.isLink&&u.value===l);return!l||!a?!1:i.editor.commands.setMark(i.type,{href:a.href})}}})}const QF=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function ji(i,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(n=>{const r=typeof n=="string"?n:n.scheme;r&&t.push(r)}),!i||i.replace(QF,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const ZF=An.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `val
543idate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(i=>{if(typeof i=="string"){Uy(i);return}Uy(i.scheme,i.optionalSlashes)})},onDestroy(){WF()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(i,e)=>!!ji(i,e.protocols),validate:i=>!!i,shouldAutoLink:i=>!!i}},addAttributes(){return{href:{default:null,parseHTML(i){return i.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:i=>{const e=i.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!ji(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:i}
vendor: 1,301 bytes, line 543
543){return this.options.isAllowedUri(i.href,{defaultValidate:e=>!!ji(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Ie(this.options.HTMLAttributes,i),0]:["a",Ie(this.options.HTMLAttributes,{...i,href:""}),0]},addCommands(){return{setLink:i=>({chain:e})=>{const{href:t}=i;return this.options.isAllowedUri(t,{defaultValidate:n=>!!ji(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,i).setMeta("preventAutolink",!0).run():!1},toggleLink:i=>({chain:e})=>{const{href:t}=i;return this.options.isAllowedUri(t,{defaultValidate:n=>!!ji(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,i,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:i})=>i().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[vr({find:i=>{const e=[];if(i){const{protocols:t,defaultProtocol:n}=this.options,r=eC(i).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:o=>!!ji(o,t),protocols:t,defaultProtocol:n}));r.length&&r.forEach(s=>e.push({text:s.value,data:{href:s.href},index:s.start}))}return e}
vendor: 13,192 bytes, line 543
543,type:this.type,getAttributes:i=>{var e;return{href:(e=i.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const i=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&i.push(YF({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:n=>this.options.isAllowedUri(n,{defaultValidate:r=>!!ji(r,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&i.push(XF({type:this.type})),this.options.linkOnPaste&&i.push(JF({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),i}});var e9="tippy-box",tC="tippy-content",t9="tippy-backdrop",nC="tippy-arrow",iC="tippy-svg-arrow",qi={passive:!0,capture:!0},rC=function(){return document.body};function eh(i,e,t){if(Array.isArray(i)){var n=i[e];return n??(Array.isArray(t)?t[e]:t)}return i}function dg(i,e){var t={}.toString.call(i);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function sC(i,e){return typeof i=="function"?i.apply(void 0,e):i}function Wy(i,e){if(e===0)return i;var t;return function(n){clearTimeout(t),t=setTimeout(function(){i(n)},e)}}function n9(i){return i.split(/\s+/).filter(Boolean)}function Fr(i){return[].concat(i)}function Gy(i,e){i.indexOf(e)===-1&&i.push(e)}function i9(i){return i.filter(function(e,t){return i.indexOf(e)===t})}function r9(i){return i.split("-")[0]}function Ju(i){return[].slice.call(i)}function Ky(i){return Object.keys(i).reduce(function(e,t){return i[t]!==void 0&&(e[t]=i[t]),e},{})}function mo(){return document.createElement("div")}function $c(i){return["Element","Fragment"].some(function(e){return dg(i,e)})}function s9(i){return dg(i,"NodeList")}function o9(i){return dg(i,"MouseEvent")}function a9(i){return!!(i&&i._tippy&&i._tippy.reference===i)}function l9(i){return $c(i)?[i]:s9(i)?Ju(i):Array.isArray(i)?i:Ju(document.querySelectorAll(i))}function th(i,e){i.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Yy(i,e){i.forEach(function(t){t&&t.setAttribute("data-state",e)})}function u9(i){var e,t=Fr(i),n=t[0];return n!=null&&(e=n.ownerDocument)!=null&&e.body?n.ownerDocument:document}function c9(i,e){var t=e.clientX,n=e.clientY;return i.every(function(r){var s=r.popperRect,o=r.popperState,l=r.props,a=l.interactiveBorder,u=r9(o.placement),c=o.modifiersData.offset;if(!c)return!0;var h=u==="bottom"?c.top.y:0,d=u==="top"?c.bottom.y:0,f=u==="right"?c.left.x:0,p=u==="left"?c.right.x:0,b=s.top-n+h>a,m=n-s.bottom-d>a,v=s.left-t+f>a,g=t-s.right-p>a;return b||m||v||g})}function nh(i,e,t){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){i[n](r,t)})}function Xy(i,e){for(var t=e;t;){var n;if(i.contains(t))return!0;t=t.getRootNode==null||(n=t.getRootNode())==null?void 0:n.host}return!1}var gn={isTouch:!1},Jy=0;function d9(){gn.isTouch||(gn.isTouch=!0,window.performance&&document.addEventListener("mousemove",oC))}function oC(){var i=performance.now();i-Jy<20&&(gn.isTouch=!1,document.removeEventListener("mousemove",oC)),Jy=i}function h9(){var i=document.activeElement;if(a9(i)){var e=i._tippy;i.blur&&!e.state.isVisible&&i.blur()}}function f9(){document.addEventListener("touchstart",d9,qi),window.addEventListener("blur",h9)}var p9=typeof window<"u"&&typeof document<"u",m9=p9?!!window.msCrypto:!1,g9={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},b9={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},tn=Object.assign({appendTo:rC,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},g9,b9),y9=Object.keys(tn),v9=function(e){var t=Object.keys(e);t.forEach(function(n){tn[n]=e[n]})};function aC(i){var e=i.plugins||[],t=e.reduce(function(n,r){var s=r.name,o=r.defaultValue;if(s){var l;n[s]=i[s]!==void 0?i[s]:(l=tn[s])!=null?l:o}return n},{});return Object.assign({},i,t)}function w9(i,e){var t=e?Object.keys(aC(Object.assign({},tn,{plugins:e}))):y9,n=t.reduce(function(r,s){var o=(i.getAttribute("data-tippy-"+s)||"").trim();if(!o)return r;if(s==="content")r[s]=o;else try{r[s]=JSON.parse(o)}catch{r[s]=o}return r},{});return n}function Qy(i,e){var t=Object.assign({},e,{content:sC(e.content,[i])},e.ignoreAttributes?{}:w9(i,e.plugins));return t.aria=Object.assign({},tn.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var x9=function(){return"innerHTML"};function qf(i,e){i[x9()]=e}function Zy(i){var e=mo();return i===!0?e.className=nC:(e.className=iC,$c(i)?e.appendChild(i):qf(e,i)),e}function ev(i,e){$c(e.content)?(qf(i,""),i.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?qf(i,e.content):i.textContent=e.content)}function Uf(i){var e=i.firstElementChild,t=Ju(e.children);return{box:e,content:t.find(function(n){return n.classList.contains(tC)}),arrow:t.find(function(n){return n.classList.contains(nC)||n.classList.contains(iC)}),backdrop:t.find(function(n){return n.classList.contains(t9)})}}function lC(i){var e=mo(),t=mo();t.className=e9,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var n=mo();n.className=tC,n.setAttribute("data-state","hidden"),ev(n,i.props),e.appendChild(t),t.appendChild(n),r(i.props,i.props);function r(s,o){var l=Uf(e),a=l.box,u=l.content,c=l.arrow;o.theme?a.setAttribute("data-theme",o.theme):a.removeAttribute("data-theme"),typeof o.animation=="string"?a.setAttribute("data-animation",o.animation):a.removeAttribute("data-animation"),o.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?a.setAttribute("role",o.role):a.removeAttribute("role"),(s.content!==o.content||s.allowHTML!==o.allowHTML)&&ev(u,i.props),o.arrow?c?s.arrow!==o.arrow&&(a.removeChild(c),a.appendChild(Zy(o.arrow))):a.appendChild(Zy(o.arrow)):c&&a.removeChild(c)}return{popper:e,onUpdate:r}}lC.$$tippy=!0;var E9=1,el=[],ih=[];function T9(i,e){var t=Qy(i,Object.assign({},tn,aC(Ky(e)))),n,r,s,o=!1,l=!1,a=!1,u=!1,c,h,d,f=[],p=Wy(zi,t.interactiveDebounce),b,m=E9++,v=null,g=i9(t.plugins),y={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},w={id:m,reference:i,popper:mo(),popperInstance:v,props:t,state:y,plugins:g,clearDelayTimeouts:da,setProps:ha,setContent:fa,show:LC,hide:MC,hideWithInteractivity:IC,enable:Qt,disable:ca,unmount:OC,destroy:DC};if(!t.render)return w;var E=t.render(w),x=E.popper,S=E.onUpdate;x.setAttribute("data-tippy-root",""),x.id="tippy-"+w.id,w.popper=x,i._tippy=w,x._tippy=w;var _=g.map(function(F){return F.fn(w)}),M=i.hasAttribute("aria-expanded");return Xe(),z(),I(),P("onCreate",[w]),t.showOnCreate&&Jt(),x.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),x.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&C().addEventListener("mousemove",p)}),w;function O(){var F=w.props.touch;return Array.isArray(F)?F:[F,0]}function D(){return O()[0]==="hold"}function k(){var F;return!!((F=w.props.render)!=null&&F.$$tippy)}function A(){return b||i}function C(){var F=A().parentNode;return F?u9(F):document}function T(){return Uf(x)}function L(F){return w.state.isMounted&&!w.state.isVisible||gn.isTouch||c&&c.type==="focus"?0:eh(w.props.delay,F?0:1,tn.delay)}function I(F){F===void 0&&(F=!1),x.style.pointerEvents=w.props.interactive&&!F?"":"none",x.style.zIndex=""+w.props.zIndex}function P(F,J,oe){if(oe===void 0&&(oe=!0),_.forEach(function(ge){ge[F]&&ge[F].apply(ge,J)}),oe){var ve;(ve=w.props)[F].apply(ve,J)}}function R(){var F=w.props.aria;if(F.content){var J="aria-"+F.content,oe=x.id,ve=Fr(w.props.triggerTarget||i);ve.forEach(function(ge){var ft=ge.getAttribute(J);if(w.state.isVisible)ge.setAttribute(J,ft?ft+" "+oe:oe);else{var Ft=ft&&ft.replace(oe,"").trim();Ft?ge.setAttribute(J,Ft):ge.removeAttribute(J)}})}}function z(){if(!(M||!w.props.aria.expanded)){var F=Fr(w.props.triggerTarget||i);F.forEach(function(J){w.props.interactive?J.setAttribute("aria-expanded",w.state.isVisible&&J===A()?"true":"false"):J.removeAttribute("aria-expanded")})}}function N(){C().removeEventListener("mousemove",p),el=el.filter(function(F){return F!==p})}function B(F){if(!(gn.isTouch&&(a||F.type==="mousedown"))){var J=F.composedPath&&F.composedPath()[0]||F.target;if(!(w.props.interactive&&Xy(x,J))){if(Fr(w.props.triggerTarget||i).some(function(oe){return Xy(oe,J)})){if(gn.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else P("onClickOutside",[w,F]);w.props.hideOnClick===!0&&(w.clearDelayTimeouts(),w.hide(),l=!0,setTimeout(function(){l=!1}),w.state.isMounted||Q())}}}function j(){a=!0}function Y(){a=!1}function V(){var F=C();F.addEventListener("mousedown",B,!0),F.addEventListener("touchend",B,qi),F.addEventListener("touchstart",Y,qi),F.addEventListener("touchmove",j,qi)}function Q(){var F=C();F.removeEventListener("mousedown",B,!0),F.removeEventListener("touchend",B,qi),F.removeEventListener("touchstart",Y,qi),F.removeEventListener("touchmove",j,qi)}function le(F,J){qe(F,function(){!w.state.isVisible&&x.parentNode&&x.parentNode.contains(x)&&J()})}function be(F,J){qe(F,J)}function qe(F,J){var oe=T().box;function ve(ge){ge.target===oe&&(nh(oe,"remove",ve),J())}if(F===0)return J();nh(oe,"remove",h),nh(oe,"add",ve),h=ve}function Pe(F,J,oe){oe===void 0&&(oe=!1);var ve=Fr(w.props.triggerTarget||i);ve.forEach(function(ge){ge.addEventListener(F,J,oe),f.push({node:ge,eventType:F,handler:J,options:oe})})}function Xe(){D()&&(Pe("touchstart",Xt,{passive:!0}),Pe("touchend",Vi,{passive:!0})),n9(w.props.trigger).forEach(function(F){if(F!=="manual")switch(Pe(F,Xt),F){case"mouseenter":Pe("mouseleave",Vi);break;case"focus":Pe(m9?"focusout":"blur",an);break;case"focusin":Pe("focusout",an);break}})}function on(){f.forEach(function(F){var J=F.node,oe=F.eventType,ve=F.handler,ge=F.options;J.removeEventListener(oe,ve,ge)}),f=[]}function Xt(F){var J,oe=!1;if(!(!w.state.isEnabled||ln(F)||l)){var ve=((J=c)==null?void 0:J.type)==="focus";c=F,b=F.currentTarget,z(),!w.state.isVisible&&o9(F)&&el.forEach(function(ge){return ge(F)}),F.type==="click"&&(w.props.trigger.indexOf("mouseenter")<0||o)&&w.props.hideOnClick!==!1&&w.state.isVisible?oe=!0:Jt(F),F.type==="click"&&(o=!oe),oe&&!ve&&un(F)}}function zi(F){var J=F.target,oe=A().contains(J)||x.contains(J);if(!(F.type==="mousemove"&&oe)){var ve=Bt().concat(x).map(function(ge){var ft,Ft=ge._tippy,Lr=(ft=Ft.popperInstance)==null?void 0:ft.state;return Lr?{popperRect:ge.getBoundingClientRect(),popperState:Lr,props:t}:null}).filter(Boolean);c9(ve,F)&&(N(),un(F))}}function Vi(F){var J=ln(F)||w.props.trigger.indexOf("click")>=0&&o;if(!J){if(w.props.interactive){w.hideWithInteractivity(F);return}un(F)}}function an(F){w.props.trigger.indexOf("focusin")<0&&F.target!==A()||w.props.interactive&&F.relatedTarget&&x.contains(F.relatedTarget)||un(F)}function ln(F){return gn.isTouch?D()!==F.type.indexOf("touch")>=0:!1}function Zn(){ei();var F=w.props,J=F.popperOptions,oe=F.placement,ve=F.offset,ge=F.getReferenceClientRect,ft=F.moveTransition,Ft=k()?Uf(x).arrow:null,Lr=ge?{getBoundingClientRect:ge,contextElement:ge.contextElement||A()}:i,fg={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(pa){var Mr=pa.state;if(k()){var PC=T(),Wc=PC.box;["placement","reference-hidden","escaped"].forEach(function(ma){ma==="placement"?Wc.setAttribute("data-placement",Mr.placement):Mr.attributes.popper["data-popper-"+ma]?Wc.setAttribute("data-"+ma,""):Wc.removeAttribute("data-"+ma)}),Mr.attributes.popper={}}}},Hi=[{name:"offset",options:{offset:ve}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ft}},fg];k()&&Ft&&Hi.push({name:"arrow",options:{element:Ft,padding:3}}),Hi.push.apply(Hi,(J==null?void 0:J.modifiers)||[]),w.popperInstance=ec(Lr,x,Object.assign({},J,{placement:oe,onFirstUpdate:d,modifiers:Hi}))}function ei(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function kt(){var F=w.props.appendTo,J,oe=A();w.props.interactive&&F===rC||F==="parent"?J=oe.parentNode:J=sC(F,[oe]),J.contains(x)||J.appendChild(x),w.state.isMounted=!0,Zn()}function Bt(){return Ju(x.querySelectorAll("[data-tippy-root]"))}function Jt(F){w.clearDelayTimeouts(),F&&P("onTrigger",[w,F]),V();var J=L(!0),oe=O(),ve=oe[0],ge=oe[1];gn.isTouch&&ve==="hold"&&ge&&(J=ge),J?n=setTimeout(function(){w.show()},J):w.show()}function un(F){if(w.clearDelayTimeouts(),P("onUntrigger",[w,F]),!w.state.isVisible){Q();return}
543if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(F.type)>=0&&o)){var J=L(!1);J?r=setTimeout(function(){w.state.isVisible&&w.hide()},J):s=requestAnimationFrame(function(){w.hide()})}}function Qt(){w.state.isEnabled=!0}function ca(){w.hide(),w.state.isEnabled=!1}function da(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(s)}function ha(F){if(!w.state.isDestroyed){P("onBeforeUpdate",[w,F]),on();var J=w.props,oe=Qy(i,Object.assign({},J,Ky(F),{ignoreAttributes:!0}));w.props=oe,Xe(),J.interactiveDebounce!==oe.interactiveDebounce&&(N(),p=Wy(zi,oe.interactiveDebounce)),J.triggerTarget&&!oe.triggerTarget?Fr(J.triggerTarget).forEach(function(ve){ve.removeAttribute("aria-expanded")}):oe.triggerTarget&&i.removeAttribute("aria-expanded"),z(),I(),S&&S(J,oe),w.popperInstance&&(Zn(),Bt().forEach(function(ve){requestAnimationFrame(ve._tippy.popperInstance.forceUpdate)})),P("onAfterUpdate",[w,F])}}function fa(F){w.setProps({content:F})}function LC(){var F=w.state.isVisible,J=w.state.isDestroyed,oe=!w.state.isEnabled,ve=gn.isTouch&&!w.props.touch,ge=eh(w.props.duration,0,tn.duration);if(!(F||J||oe||ve)&&!A().hasAttribute("disabled")&&(P("onShow",[w],!1),w.props.onShow(w)!==!1)){if(w.state.isVisible=!0,k()&&(x.style.visibility="visible"),I(),V(),w.state.isMounted||(x.style.transition="none"),k()){var ft=T(),Ft=ft.box,Lr=ft.content;th([Ft,Lr],0)}d=function(){var Hi;if(!(!w.state.isVisible||u)){if(u=!0,x.offsetHeight,x.style.transition=w.props.moveTransition,k()&&w.props.animation){var Uc=T(),pa=Uc.box,Mr=Uc.content;th([pa,Mr],ge),Yy([pa,Mr],"visible")}R(),z(),Gy(ih,w),(Hi=w.popperInstance)==null||Hi.forceUpdate(),P("onMount",[w]),w.props.animation&&k()&&be(ge,function(){w.state.isShown=!0,P("onShown",[w])})}},kt()}}function MC(){var F=!w.state.isVisible,J=w.state.isDestroyed,oe=!w.state.isEnabled,ve=eh(w.props.duration,1,tn.duration);if(!(F||J||oe)&&(P("onHide",[w],!1),w.props.onHide(w)!==!1)){if(w.state.isVisible=!1,w.state.isShown=!1,u=!1,o=!1,k()&&(x.style.visibility="hidden"),N(),Q(),I(!0),k()){var ge=T(),ft=ge.box,Ft=ge.content;w.props.animation&&(th([ft,Ft],ve),Yy([ft,Ft],"hidden"))}R(),z(),w.props.animation?k()&&le(ve,w.unmount):w.unmount()}}function IC(F){C().addEventListener("mousemove",p),Gy(el,p),p(F)}function OC(){w.state.isVisible&&w.hide(),w.state.isMounted&&(ei(),Bt().forEach(function(F){F._tippy.unmount()}),x.parentNode&&x.parentNode.removeChild(x),ih=ih.filter(function(F){return F!==w}),w.state.isMounted=!1,P("onHidden",[w]))}function DC(){w.state.isDestroyed||(w.clearDelayTimeouts(),w.unmount(),on(),delete i._tippy,w.state.isDestroyed=!0,P("onDestroy",[w]))}}function Ts(i,e){e===void 0&&(e={});var t=tn.plugins.concat(e.plugins||[]);f9();var n=Object.assign({},e,{plugins:t}),r=l9(i),s=r.reduce(function(o,l){var a=l&&T9(l,n);return a&&o.push(a),o},[]);return $c(i)?s[0]:s}Ts.defaultProps=tn;Ts.setDefaultProps=v9;Ts.currentInput=gn;Object.assign({},bv,{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)}});Ts.setDefaultProps({render:lC});class S9{getTextContent(e){return ES(e,{textSerializers:Km(this.editor.schema)})}constructor({editor:e,element:t,view:n,tippyOptions:r={},shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:o,state:l})=>{const{selection:a}=l,{$anchor:u,empty:c}=a,h=u.depth===1,d=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent&&u.parent.childCount===0&&!this.getTextContent(u.parent);return!(!o.hasFocus()||!c||!h||!d||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var l;if(this.preventHide){this.preventHide=!1;return}o!=null&&o.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(o.relatedTarget))||(o==null?void 0:o.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=o=>{this.blurHandler({event:o})},this.editor=e,this.element=t,this.view=n,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Ts(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var n,r,s;const{state:o}=e,{doc:l,selection:a}=o,{from:u,to:c}=a;if(t&&t.doc.eq(l)&&t.selection.eq(a))return;if(this.createTooltip(),!((n=this.shouldShow)===null||n===void 0?void 0:n.call(this,{editor:this.editor,view:e,state:o,oldState:t}))){this.hide();return}(r=this.tippy)===null||r===void 0||r.setProps({getReferenceClientRect:((s=this.tippyOptions)===null||s===void 0?void 0:s.getReferenceClientRect)||(()=>CS(e,u,c))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const C9=i=>new De({key:typeof i.pluginKey=="string"?new $e(i.pluginKey):i.pluginKey,view:e=>
543new S9({view:e,...i})}),k9=Oe.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[C9({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});class _9{constructor({editor:e,element:t,view:n,tippyOptions:r={},updateDelay:s=250,shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:l,state:a,from:u,to:c})=>{const{doc:h,selection:d}=a,{empty:f}=d,p=!h.textBetween(u,c).length&&Xm(a.selection),b=this.element.contains(document.activeElement);return!(!(l.hasFocus()||b)||f||p||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var a;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(l.relatedTarget))||(l==null?void 0:l.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,a)=>{const u=!(a!=null&&a.selection.eq(l.state.selection)),c=!(a!=null&&a.doc.eq(l.state.doc));!u&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,u,c,a)},this.updateDelay))},this.updateHandler=(l,a,u,c)=>{var h,d,f;const{state:p,composing:b}=l,{selection:m}=p;if(b||!a&&!u)return;this.createTooltip();const{ranges:g}=m,y=Math.min(...g.map(x=>x.$from.pos)),w=Math.max(...g.map(x=>x.$to.pos));if(!((h=this.shouldShow)===null||h===void 0?void 0:h.call(this,{editor:this.editor,element:this.element,view:l,state:p,oldState:c,from:y,to:w}))){this.hide();return}(d=this.tippy)===null||d===void 0||d.setProps({getReferenceClientRect:((f=this.tippyOptions)===null||f===void 0?void 0:f.getReferenceClientRect)||(()=>{if(SS(p.selection)){let x=l.nodeDOM(y);if(x){const S=x.dataset.nodeViewWrapper?x:x.querySelector("[data-node-view-wrapper]");if(S&&(x=S.firstChild),x)return x.getBoundingClientRect()}}return CS(l,y,w)})}),this.show()},this.editor=e,this.element=t,this.view=n,this.updateDelay=s,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Ts(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}const s=!(t!=null&&t.selection.eq(e.state.selection)),o=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,s,o,t)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const A9=i=>new De({key:typeof i.pluginKey=="string"?new $e(i.pluginKey):i.pluginKey,view:e=>new _9({view:e,...i})}),L9=Oe.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[A9({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}}),M9=i=>{if(!i.children.length)return;const e=i.querySelectorAll("span");e&&e.forEach(t=>{var n,r;const s=t.getAttribute("style"),o=(r=(n=t.parentElement)===null||n===void 0?void 0:n.closest("span"))===null||r===void 0?void 0:r.getAttribute("style");t.setAttribute("style",`${o};${s}`)})},I9=An.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:i=>i.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&M9(i),{}):!1}]},renderHTML({HTMLAttributes:i}){return["span",Ie(this.options.HTMLAttributes,i),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:i})=>{const{selection:e}=i;return i.doc.nodesBetween(e.from,e.to,(t,n)=>{if(t.isTextblock)return!0;t.marks.filter(r=>r.type===this.type).some(r=>Object.values(r.attrs).some(s=>!!s))||i.removeMark(n,n+t.nodeSize,this.type)}),!0}}}}),O9=Oe.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:i=>{var e;return(e=i.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:i=>i.color?{style:`color: ${i.color}`}:{}}}}]},addCommands(){return{setColor:i=>({chain:e})=>e().setMark("textStyle",{color:i}).run(),unsetColor:()=>({chain:i})=>i().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),D9=Oe.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:i=>i.style.fontFamily,renderHTML:i=>i.fontFamily?{style:`font-family: ${i.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:i=>({chain:e})=>e().setMark("textStyle",{fontFamily:i}).run(),unsetFontFamily:()=>({chain:i})=>i().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}});var P9=Oe.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:i=>i.style.fontSize,renderHTML:i=>i.fontSize?{style:`font-size: ${i.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:i=>({chain:e})=>e().setMark("textStyle",{fontSize:i}).run(),unsetFontSize:()=>({chain:i})=>i().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),R9=P9;const N9=US.extend({addAttributes(){return{src:{default:null},alt:{default:null},style:{default:"width: 100%; height: auto; cursor: pointer;",parseHTML:i=>{const e=i.getAttribute("width");return e?`width: ${e}px; height: auto; cursor: pointer;`:`${i.style.cssText}`}},title:{default:null},loading:{default:null},srcset:{default:null},sizes:{default:null},crossorigin:{default:null},usemap:{default:null},ismap:{default:null},width:{default:null},height:{default:null},referrerpolicy:{default:null},longdesc:{default:null},decoding:{default:null},class:{default:null},id:{default:null},name:{default:null},draggable:{default:!0},tabindex:{default:null},"aria-label":{default:null},"aria-labelledby":{default:null},"aria-describedby":{default:null}}},addNodeView(){return({node:i,editor:e,getPos:t})=>{const{view:n,options:{editable:r}}=e,{style:s}=i.attrs,o=document.createElement("div"),l=document.createElement("div"),a=document.createElement("img"),u="width: 24px; height: 24px; cursor: pointer;",c=()=>
543{if(typeof t=="function"){const g=Object.assign(Object.assign({},i.attrs),{style:`${a.style.cssText}`});n.dispatch(n.state.tr.setNodeMarkup(t(),null,g))}},h=()=>{const g=document.createElement("div"),y=document.createElement("img"),w=document.createElement("img"),E=document.createElement("img"),x=_=>{_.target.style.opacity=.3},S=_=>{_.target.style.opacity=1};g.setAttribute("style","position: absolute; top: 0%; left: 50%; width: 100px; height: 25px; z-index: 999; background-color: rgba(255, 255, 255, 0.7); border-radius: 4px; border: 2px solid #6C6C6C; cursor: pointer; transform: translate(-50%, -50%); display: flex; justify-content: space-between; align-items: center; padding: 0 10px;"),y.setAttribute("src","https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/format_align_left/default/20px.svg"),y.setAttribute("style",u),y.addEventListener("mouseover",x),y.addEventListener("mouseout",S),w.setAttribute("src","https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/format_align_center/default/20px.svg"),w.setAttribute("style",u),w.addEventListener("mouseover",x),w.addEventListener("mouseout",S),E.setAttribute("src","https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/format_align_right/default/20px.svg"),E.setAttribute("style",u),E.addEventListener("mouseover",x),E.addEventListener("mouseout",S),y.addEventListener("click",()=>{a.setAttribute("style",`${a.style.cssText} margin: 0 auto 0 0;`),c()}),w.addEventListener("click",()=>{a.setAttribute("style",`${a.style.cssText} margin: 0 auto;`),c()}),E.addEventListener("click",()=>{a.setAttribute("style",`${a.style.cssText} margin: 0 0 0 auto;`),c()}),g.appendChild(y),g.appendChild(w),g.appendChild(E),l.appendChild(g)};if(o.setAttribute("style","display: flex;"),o.appendChild(l),l.setAttribute("style",`${s}`),l.appendChild(a),Object.entries(i.attrs).forEach(([g,y])=>{y!=null&&a.setAttribute(g,y)}),!r)return{dom:a};const f=document.documentElement.clientWidth<768?"-8px":"-4px",p=[`top: ${f}; left: ${f}; cursor: nwse-resize;`,`top: ${f}; right: ${f}; cursor: nesw-resize;`,`bottom: ${f}; left: ${f}; cursor: nesw-resize;`,`bottom: ${f}; right: ${f}; cursor: nwse-resize;`];let b=!1,m,v;return l.addEventListener("click",g=>{var y;const w=document.documentElement.clientWidth<768;if(w&&((y=document.querySelector(".ProseMirror-focused"))===null||y===void 0||y.blur()),l.childElementCount>3)for(let E=0;E<5;E++)l.removeChild(l.lastChild);h(),l.setAttribute("style",`position: relative; border: 1px dashed #6C6C6C; ${s} cursor: pointer;`),Array.from({length:4},(E,x)=>{const S=document.createElement("div");S.setAttribute("style",`position: absolute; width: ${w?16:9}px; height: ${w?16:9}px; border: 1.5px solid #6C6C6C; border-radius: 50%; ${p[x]}`),S.addEventListener("mousedown",_=>{_.preventDefault(),b=!0,m=_.clientX,v=l.offsetWidth;const M=D=>{if(!b)return;const k=x%2===0?-(D.clientX-m):D.clientX-m,A=v+k;l.style.width=A+"px",a.style.width=A+"px"},O=()=>{b&&(b=!1),c(),document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",O)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",O)}),S.addEventListener("touchstart",_=>{_.cancelable&&_.preventDefault(),b=!0,m=_.touches[0].clientX,v=l.offsetWidth;const M=D=>{if(!b)return;const k=x%2===0?-(D.touches[0].clientX-m):D.touches[0].clientX-m,A=v+k;l.style.width=A+"px",a.style.width=A+"px"},O=()=>{b&&(b=!1),c(),document.removeEventListener("touchmove",M),document.removeEventListener("touchend",O)};document.addEventListener("touchmove",M),document.addEventListener("touchend",O)},{passive:!1}),l.appendChild(S)})}),document.addEventListener("click",g=>{const y=g.target;if(!(l.contains(y)||y.style.cssText===u)){const E=l.getAttribute("style"),x=E==null?void 0:E.replace("border: 1px dashed #6C6C6C;","");if(l.setAttribute("style",x),l.childElementCount>3)for(let S=0;S<5;S++)l.removeChild(l.lastChild)}}),{dom:o}}}}),B9=Oe.create({name:"preserveAllAttributes",addGlobalAttributes(){return[{types:["paragraph","heading","div","span","strong","p"],attributes:{preservedAttrs:{default:{},parseHTML:i=>{const e={};
543return Array.from(i.attributes).forEach(t=>{t.name.startsWith("data-node-")||(e[t.name]=t.value)}),e},renderHTML:i=>i.preservedAttrs?Object.fromEntries(Object.entries(i.preservedAttrs)):{}}}}]},addNodeView(){return({node:i,HTMLAttributes:e})=>{const t=document.createElement(i.type.name);return Object.entries(e.preservedAttrs||{}).forEach(([n,r])=>{t.setAttribute(n,r)}),t}}}),uC=st.create({name:"variable",group:"inline",inline:!0,atom:!0,addAttributes(){return{name:{default:"",parseHTML:i=>i.getAttribute("data-name"),renderHTML:i=>({"data-name":i.name})}}},parseHTML(){return[{tag:"span[data-variable]"}]},renderHTML({node:i,HTMLAttributes:e}){return["span",Ie(e,{"data-variable":i.attrs.name,contenteditable:"false",style:"background: yellow; padding: 2px 4px; border-radius: 4px;"}),`{${i.attrs.name}}`]}});RS.configure({HTMLAttributes:{allow:"style"},preserveWhitespace:!0});const F9=kF.extend({addAttributes(){return{cellpadding:{default:null},cellspacing:{default:null},border:{default:null},width:{default:null},style:{default:null}}},parseHTML(){return[{tag:"table",getAttrs:i=>{if(typeof i=="string")return{};const e=i;return{cellpadding:e.getAttribute("cellpadding"),cellspacing:e.getAttribute("cellspacing"),border:e.getAttribute("border"),width:e.getAttribute("width"),style:e.getAttribute("style")}}}]},renderHTML({HTMLAttributes:i}){return["table",i,0]}}),z9=_F.extend({addAttributes(){return{cellpadding:{default:null},cellspacing:{default:null},border:{default:null},width:{default:null},style:{default:null}}},parseHTML(){return[{tag:"tr",getAttrs:i=>{if(typeof i=="string")return{};const e=i;return{cellpadding:e.getAttribute("cellpadding"),cellspacing:e.getAttribute("cellspacing"),border:e.getAttribute("border"),width:e.getAttribute("width"),style:e.getAttribute("style")}}}]},renderHTML({HTMLAttributes:i}){return["tr",i,0]}}),V9=AF.extend({addAttributes(){return{cellpadding:{default:null},cellspacing:{default:null},border:{default:null},width:{default:null},style:{default:null}}},parseHTML(){return[{tag:"td",getAttrs:i=>{if(typeof i=="string")return{};const e=i;return{cellpadding:e.getAttribute("cellpadding"),cellspacing:e.getAttribute("cellspacing"),border:e.getAttribute("border"),width:e.getAttribute("width"),style:e.getAttribute("style")}}}]},renderHTML({HTMLAttributes:i}){return["td",i,0]}}),H9=LF.extend({addAttributes(){return{cellpadding:{default:null},cellspacing:{default:null},border:{default:null},width:{default:null},style:{default:null}}},parseHTML(){return[{tag:"td",getAttrs:i=>{if(typeof i=="string")return{};const e=i;return{cellpadding:e.getAttribute("cellpadding"),cellspacing:e.getAttribute("cellspacing"),border:e.getAttribute("border"),width:e.getAttribute("width"),style:e.getAttribute("style")}}}]},renderHTML({HTMLAttributes:i}){return["td",i,0]}}),j9=ZF.extend({addAttributes(){var i;return{...(i=this.parent)==null?void 0:i.call(this),style:{default:null},target:{default:null},rel:{default:null}}}}),$9=US.extend({addAttributes(){var i;return{...(i=this.parent)==null?void 0:i.call(this),style:{default:null},target:{default:null},rel:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:"img",getAttrs:i=>{if(typeof i=="string")return{};const e=i;return{src:e.getAttribute("src"),alt:e.getAttribute("alt"),style:e.getAttribute("style"),target:e.getAttribute("target"),rel:e.getAttribute("rel"),width:e.getAttribute("width"),height:e.getAttribute("height")}}}]},renderHTML({HTMLAttributes:i}){return["img",i]}}),tv={first_name:"John",last_name:"Smith",job_title:"Marketer",title:"He / Him",website:"www.aeroleads.com",department:"Marketing",company:"Aeroleads",address:"hourse number, city, state",office_phone_number:"111 222 3333",mobile_phone_number:"111 222 3333",email:"[email protected]"};class cC extends U{inputTargetConnected(e){e.addEventListener("input",this.inputChange.bind(this)),this.inputChange({target:e})}inputTargetDisconnected(e){e.removeEventListener("input",this.inputChange.bind(this))}inputChange(e){const n=e.target.name.match(/\[([^\]]+)]$/),r=n?n[1]:null;r&&e.target.value&&(this.dataProfile[r]=e.target.value,this.reloadEditorContent())}initialize(){this.dataProfile=$C.merge(this.element.dataset.profile||{},tv)}connect(){const e=this.templateTarget.innerHTML;this.createBubbleMenu=this.createBubbleMenu.bind(this),this.updateBubbleMenu=this.updateBubbleMenu.bind(this),this.reloadEditorContent=this.reloadEditorContent.bind(this),this.bubbleMenu=null,this.editor=new kB({element:this.editorTarget,extensions:[RS.configure({codeBlock:!1}),uC,B9,I9,O9,AS,PS,_S,D9.configure({types:["textStyle"]}),R9.configure({types:["textStyle"]}),LS.configure({levels:[1,2,3,4,5,6]}),N9,$9,j9.configure({openOnClick:!1}),E8.configure({placeholder:({node:n})=>n.attrs["data-placeholder"]==="first-name"?"First Name":n.attrs["data-placeholder"]==="last-name"?"Last Name":"Type here..."}),T8.configure({className:"has-focus"}
543),k9.configure({pluginKey:"floatingMenu",shouldShow:({state:n})=>{const{$anchor:r}=n.selection;return r.parent.isTextblock&&!r.parent.textContent}}),L9.configure({pluginKey:"bubbleMenu",element:this.createBubbleMenu()}),F9,z9,V9,H9],content:e,onFocus:()=>this.updateBubbleMenu(),onSelectionUpdate:()=>this.updateBubbleMenu(),onUpdate:()=>this.updateBubbleMenu()});const t=this.dataProfile;this.editor.commands.setContent(this.editor.getHTML().replace(/\{(\w+)\}/g,(n,r)=>t[r]||`{${r}}`))}reloadEditorContent(){if(this.editor){const e=this.dataProfile;this.editor.commands.setContent(this.templateTarget.innerHTML),this.editor.commands.setContent(this.editor.getHTML().replace(/\{(\w+)\}/g,(t,n)=>e[n]||`{${n}}`)),setTimeout(()=>{this.signatureTarget.value=this.editor.getHTML()},50)}}disconnect(){this.editor&&this.editor.destroy()}updateBubbleMenu(){var t,n;((t=this.editor)==null?void 0:t.isActive("resizeImage"))||((n=this.editor)==null?void 0:n.isActive("image"))?this.bubbleMenu&&this.bubbleMenu.classList.add("hidden"):this.bubbleMenu?this.bubbleMenu.classList.remove("hidden"):this.createBubbleMenu()}createBubbleMenu(){var n,r,s,o;let e=document.getElementById("bubble-menu");if(e||(e=document.createElement("div"),e.id="bubble-menu",e.className="bubble-menu inline-flex items-center rounded-md shadow p-1.5 bg-white"),this.bubbleMenu=e,((n=this.editor)==null?void 0:n.isActive("resizeImage"))||((r=this.editor)==null?void 0:r.isActive("image"))){const l=this.editor.getAttributes("resizeImage"),a=l.width||"",u=l.height||"",c=document.createElement("input");c.type="number",c.placeholder="Width",c.value=a,c.className="p-1 me-2 text-sm border border-gray-300 rounded",c.onchange=()=>{const b=parseInt(c.value,10)||null;b&&this.editor.chain().focus().updateAttributes("resizeImage",{width:`${b}px`}).run()},e.appendChild(c);const h=document.createElement("input");h.type="number",h.placeholder="Height",h.value=u,h.className="p-1 me-2 text-sm border border-gray-300 rounded",h.onchange=()=>{const b=parseInt(h.value,10)||null;b&&this.editor.chain().focus().updateAttributes("resizeImage",{height:`${b}px`}).run()},e.appendChild(h);const d=document.createElement("input");d.type="checkbox",d.id="aspect-ratio-checkbox",d.className="me-2";const f=document.createElement("label");f.htmlFor="aspect-ratio-checkbox",f.textContent="Lock Ratio",f.className="text-sm me-3",e.appendChild(d),e.appendChild(f),c.oninput=()=>{if(d.checked){const b=l.width/l.height;h.value=Math.round(parseInt(c.value,10)/b).toString()}},h.oninput=()=>{if(d.checked){const b=l.height/l.width;c.value=Math.round(parseInt(h.value,10)/b).toString()}};const p=document.createElement("button");p.textContent="Remove Image",p.className="px-2 py-1 text-sm text-white bg-red-500 rounded hover:bg-red-600",p.onclick=()=>{this.editor.chain().focus().deleteSelection().run()},e.appendChild(p)}else{const l=document.createElement("button");l.className="px-2 py-1 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-s-lg hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white",l.textContent="B",l.onclick=()=>this.editor.chain().focus().toggleBold().run(),e.appendChild(l);const a=document.createElement("button");a.textContent="I",a.className="px-2 py-1 text-sm font-medium text-gray-900 bg-white border-t border-b border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white",a.onclick=()=>this.editor.chain().focus().toggleItalic().run(),e.appendChild(a);const u=document.createElement("button");u.className="px-2 py-1 me-3 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-e-lg hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:border-gray-700 dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:ring-blue-500 dark:focus:text-white",u.textContent="ð",u.onclick=()=>{const p=prompt("Enter URL:",this.editor.getAttributes("link").href||"https://");p?this.editor.chain().focus().setLink({href:p}).run():this.editor.chain().focus().unsetLink().run()},e.appendChild(u);const c=document.createElement("select");c.className="px-2 py-1 me-3 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",["12px","14px","16px","18px","20px","24px"].forEach(p=>{const b=document.createElement("option");b.value=p,b.textContent=p,c.appendChild(b)}),c.onchange=()=>{this.editor.chain().focus().setFontSize(c.value).run()},e.appendChild(c);const h=document.createElement("input");h.id="bubble-color-input";let d="#000000";(s=this.editor)!=null&&s.getAttributes("textStyle")&&(d=(o=this.editor)==null?void 0:o.getAttributes("textStyle").color),h.value=d,h.className="rounded-lg me-3 border border-gray-300",h.type="color",h.onchange=()=>{this.editor.chain().focus().setColor(h.value).run()},e.appendChild(h);const f=document.createElement("select");f.className="px-2 py-1 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",[["Normal",""],["H1","h1"],["H2","h2"],["H3","h3"]].forEac
543h(([p,b])=>{const m=document.createElement("option");m.value=b,m.textContent=p,f.appendChild(m)}),f.onchange=()=>{const p=f.value;p?this.editor.chain().focus().toggleHeading({level:parseInt(p.replace("h",""))}).run():this.editor.chain().focus().setParagraph().run()},e.appendChild(f)}return document.body.appendChild(e),e}save(){const e=this.editor.getHTML();ye("/signatures",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("[name='csrf-token']").content},body:JSON.stringify({signature:{content:e}})}).then(t=>t.json()).then(t=>{alert("Signature saved successfully!")}).catch(t=>console.error("Error saving signature:",t))}clearInput(){this.hasInputTarget&&(Array.from(this.inputTargets).forEach(e=>{e.value=""}),this.dataProfile=tv,this.reloadEditorContent())}}$(cC,"targets",["editor","template","input","signature"]);const q9=Object.freeze(Object.defineProperty({__proto__:null,Variable:uC,default:cC},Symbol.toStringTag,{value:"Module"}));class Wf extends U{initialize(){this.runAllTest="",this.runTest=null,this.testCases=this.testsValue||{},this.pendingCases=[]}connect(){this.toggleGroupTest=this.toggleGroupTest.bind(this),this.runTesting=this.runTesting.bind(this),document.addEventListener("turbo:frame-missing",this.frameMissing.bind(this))}disconnect(){document.removeEventListener("turbo:frame-missing",this.frameMissing.bind(this))}frameMissing(e){const{detail:{response:t,visit:n}}=e;e.preventDefault(),console.log("frame-missing:",e,t,n)}runTesting(e){e.target.checked?(this.runAllTest="all",this.toggleGroupTest(),this.pendingCases.length>0?(console.log("Start test:",this.triggerTargets.length),this.runTest=this.pendingCases[0],console.log("Current test:",this.runTest.dataset.key),this.runTest.click()):(this.stopTest(),console.log("Stop test:",this.resultTargets.length))):(this.stopTest(),console.log("Stop test:",this.resultTargets.length))}toggleGroupTest(){this.playTargets.length>0&&Array.from(this.playTargets).forEach(e=>{e.disabled=this.runAllTest!=""})}runGroupTest(e){this.runAllTest=e.target.dataset.group,this.pendingCases=this.getPendingCases(e.target),this.runAllTest!=""?(this.toggleSubmitButton(e.target),this.pendingCases.length>0?(console.log("Start test:",this.triggerTargets.length),this.runTest=this.pendingCases[0],console.log("Current test:",this.runTest.dataset.key),this.runTest.click()):(this.stopTest(),console.log("Stop test:",this.resultTargets.length))):(this.stopTest(),console.log("Stop test: ",this.runAllTest))}stopTest(){const e=document.getElementById("test_trigger");e&&(e.checked=!1);const t=document.querySelector(`button[data-group="${this.runAllTest}"]`);t&&this.toggleSubmitButton(t),this.runAllTest="",this.runTest=null,this.toggleGroupTest()}getPendingCases(e){const t=e.dataset.group;return Array.from(this.triggerTargets).filter(n=>n.dataset.group==t)}groupTargetConnected(e){e.dataset.testUrl&&!e.dataset.loaded&&console.log("Group connect: ",e.dataset)}caseTargetConnected(e){if(e){const t=document.getElementById("total_counter");t&&(t.innerHTML=this.caseTargets.length)}}caseTargetDisconnect(e){if(e){const t=document.getElementById("total_counter");t&&(t.innerHTML=this.caseTargets.length)}}triggerTargetConnected(e){this.pendingCases||(this.pendingCases=[]),this.pendingCases.includes(e)||this.pendingCases.push(e)}triggerTargetDisconnect(e){if(!this.pendingCases){this.pendingCases=[];return}this.pendingCases=this.pendingCases.filter(t=>t!==e)}resultTargetConnected(e){const t=e.dataset.id,n=e.dataset.status;if(!t||!n){console.log("Missing id or status in dataset:",e.dataset);return}this.testCases[t]={...this.testCases[t],status:n,lastUpdated:new Date().toISOString()},e.closest(".case").classList.remove("text-green-600","text-red-600");const r=document.getElementById(`${t}_message`);if(r&&(r.innerHTML=""),e.classList.contains("success")){e.closest(".case").classList.add("text-green-600");const s=document.getElementById("test_counter");s&&(s.innerHTML=this.resultTargets.length)}else e.closest(".case").classList.add("text-red-600"),e.classList.contains("timeout")&&this.retryTest({target:e});this.runAllTest!=""?(this.pendingCases=this.runAllTest=="all"?this.triggerTargets:this.getPendingCases(this.runTest),console.log("Current test:",this.runTest.dataset.key),this.pendingCases.length>
5430?(this.runTest=this.pendingCases[0],console.log("Next test:",this.runTest.dataset.key),this.runTest.click()):(this.stopTest(),console.log("Stop test:",this.resultTargets.length)),(this.triggerTargets.length==0||this.resultTargets.length==this.caseTargets.length)&&this.stopTest()):this.stopTest()}resultTargetDisconnect(e){e.closest(".case").classList.remove("text-green-600"),e.closest(".case").classList.remove("text-red-600");const t=document.getElementById("test_counter");t&&(t.innerHTML=this.resultTargets.length)}retryTest(e){const t=e.target,n=t.dataset.id;t.dataset.status,t.closest(".case").classList.remove("text-green-600"),t.closest(".case").classList.remove("text-red-600"),t.remove(),document.getElementById(`${n}_message`).innerHTML="",document.getElementById(n).innerHTML=`<svg aria-hidden="true" role="status" class="inline w-4 h-4 animate-spin text-gray-200 dark:text-gray-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"> 544 <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/> 545 <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="#1C64F2"/> 546 </svg>`,turboReloadFrame(`${n}_frame`)}reset(){const e=document.getElementById("test_counter");e&&(e.innerHTML=this.resultTargets.length);const t=document.getElementById("total_counter");t&&(t.innerHTML=this.caseTargets.length)}toggleSubmitButton(e){try{const t=e.innerHTML,n=e.getAttribute("data-turbo-submits-with");e.setAttribute("data-turbo-submits-with",t),e.innerHTML=n,e.disabled=!e.disabled}catch(t){console.error("Error in toggleSubmitButton method:",t)}}}$(Wf,"targets",["group","case","result","trigger","reset","play"]),$(Wf,"values",{tests:Object});const U9=Object.freeze(Object.defineProperty({__proto__:null,default:Wf},Symbol.toStringTag,{value:"Module"})),Gf=class extends U{add(e){e.preventDefault();const t=this.templateTarget.innerHTML.replace(/NEW_RECORD/g,new Date().getTime().toString());this.targetTarget.insertAdjacentHTML("beforebegin",t);const n=new CustomEvent("rails-nested-form:add",{bubbles:!0});this.element.dispatchEvent(n)}remove(e){e.preventDefault();const t=e.target.closest(this.wrapperSelectorValue);if(t.dataset.newRecord==="true")t.remove();else{t.style.display="none";const r=t.querySelector("input[name*='_destroy']");r.value="1"}const n=new CustomEvent("rails-nested-form:remove",{bubbles:!0});this.element.dispatchEvent(n)}};Gf.targets=["target","template"],Gf.values={wrapperSelector:{type:String,default:".nested-form-wrapper"}};let dC=Gf;class hC extends dC{connect(){super.connect()}inputTargetConnected(e){e.addEventListener("change",this.onChange.bind(this)),e.addEventListener("keydown",this.onKeyDown.bind(this)),e.addEventListener("paste",this.onPaste.bind(this))}inputTargetDisconnected(e){e.removeEventListener("change",this.onChange.bind(this)),e.removeEventListener("keydown",this.onKeyDown.bind(this)),e.removeEventListener("paste",this.onPaste.bind(this))}onPaste(e){e.preventDefault();const n=(e.clipboardData||window.clipboardData).getData("text").split(` 547`).map(r=>r.trim()).filter(Boolean);n.forEach((r,s)=>{if(s===0)e.target.value=r;else{this.add(e);const o=this.lastInput();o.value=r}}),n.length>1&&this.add(e)}add(e){e&&e.preventDefault();const t=this.templateTarget.innerHTML.replace(/NEW_RECORD/g,new Date().getTime().toString());this.targetTarget.insertAdjacentHTML("beforeend",t);const n=new CustomEvent("rails-nested-form:add",{bubbles:!0});this.element.dispatchEvent(n),this.lastInput().focus()}onKeyDown(e){e.key==="Enter"?(e.preventDefault(),this.onChange(e)):e.target!==this.lastInput()&&e.target.value===""&&this.remove(e)}onChange(e){const t=this.lastInput();t&&sh.isURL(t.value)&&this.add()}lastInput(){return this.inputTargets[this.inputTargets.length-1]}openAll(){const e=this.openMode();e==="open_separate_window"?this.openNewWindow():e==="open_group_by_host"?this.openGroupByHost():this.openNewTab()}
547openNewWindow(){const e=this.opeDelay();this.urlList().forEach((t,n)=>{setTimeout(()=>{window.open(t,"_blank",this.windowFeatures())},n*e)})}openNewTab(){const e=this.opeDelay();this.urlList().forEach((t,n)=>{setTimeout(()=>{window.open(t,"_blank")},n*e)})}openGroupByHost(){const e=this.opeDelay(),t=this.groupedUrls();for(const n in t){const r=t[n];if(r.length>0){const s=window.open(r[0],"_blank",this.windowFeatures());s?(s.focus(),r.slice(1).forEach((o,l)=>{setTimeout(()=>{const a=s.open(o,s.name);a&&a.focus()},(l+1)*e)})):alert("Popup blocked! Please allow pop-ups for this site.")}}}opeDelay(){const e=parseInt(this.delayTarget.value,10);return isNaN(e)?1e3:e*1e3}openMode(){var e;return((e=this.optionTargets.find(t=>t.checked))==null?void 0:e.value)||"open_new_tab"}urlList(){return this.inputTargets.map(e=>sh.isURL(e.value)?this.ensureHttps(e.value):null).filter(Boolean)}groupedUrls(){return this.urlList().reduce((e,t)=>{const n=new URL(t).hostname;return e[n]=e[n]||[],e[n].push(t),e},{})}windowFeatures(){const e=window.screen.availWidth,t=window.screen.availHeight;return`width=${e},height=${t},scrollbars=yes,resizable=yes,toolbar=yes,location=yes,menubar=yes,status=yes,noopener,noreferrer`}ensureHttps(e){return/^https?:\/\//i.test(e)?e:`https://${e}`}copyUrls(){const e=this.urlList().join(` 548`);navigator.clipboard.writeText(e).then(()=>alert("URLs copied to clipboard!")).catch(()=>alert("Failed to copy URLs to clipboard."))}exportUrlsToCSV(){let t=`URL 549`+this.urlList().join(` 550`);const n=new Blob([t],{type:"text/csv;charset=utf-8;"}),r=document.createElement("a"),s=URL.createObjectURL(n);r.setAttribute("href",s),r.setAttribute("download","urls.csv"),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)}clearAll(e){this.itemTargets.forEach(t=>t.remove()),this.add(e)}}$(hC,"targets",["input","item","delay","option","template","target"]);const W9=Object.freeze(Object.defineProperty({__proto__:null,default:hC},Symbol.toStringTag,{value:"Module"}));class fC extends U{connect(){const e=this;this.lastCursorPosition=null,this.addTrixToolbar=this.addTrixToolbar.bind(this),this.addTrixToolbars=this.addTrixToolbars.bind(this),this.trixEditor=this.element.querySelector("trix-editor"),this.trixInput=this.trixEditorInputTarget,this.element.addEventListener("trix-initialize",function(t){const n=t.target;e.editor=n.editor,n.addEventListener("paste",function(r){const s=r.clipboardData||window.clipboardData;if(!s)return;const o=s.getData("text/html"),l=s.getData("text/plain");o?(r.preventDefault(),r.stopPropagation(),n.editor.undo(),n.editor.insertHTML(o)):l&&(r.preventDefault(),r.stopPropagation(),n.editor.undo(),n.editor.insertHTML(mm(l)))})},{once:!0}),this.element.addEventListener("trix-initialize",this.addTrixToolbars,{once:!0})}addTrixToolbars(e){const t=this,n=e.target.editor;let r=this.element.querySelector(".trix-button-group-spacer");r.classList.add("ms-4"),this.addAttributeButton(r,"insert_attribute"),n.element.addEventListener("trix-selection-change",function(s){t.lastCursorPosition=n.getSelectedRange()}),r.addEventListener("click",function(s){if(s.target.getAttribute("data-trix-attribute")==="keytext"){const o=s.target.getAttribute("data-trix-value");if(t.lastCursorPosition!==null)n.setSelectedRange(t.lastCursorPosition),n.insertString(o);else{const l=n.getSelectedRange();n.insertString(o,l[0])}}s.target.getAttribute("data-trix-attribute")==="insertattribute"&&(t.editor=n,t.attributeModal.show())})}initModalInsertAttribute(e){const n=`modal-insert-attribute-${this.element.dataset.id||e.id}`,r=document.getElementById(n),s={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},o={id:n,override:!0};this.attributeModal=new Modal(r,s,o)}insertAttribute(e){if(this.editor){const t=this.attributeTarget.value,n=`[${t}]`;if(this.lastCursorPosition!==null)this.editor.setSelectedRange(this.lastCursorPosition),this.editor.insertString(n);else{const r=this.editor.getSelectedRange();this.editor.insertString(n,r[0])}if(this.fallbackTarget.value){const r=`fallbacks_${t}_${this.element.dataset.id}`,s=this.fallbackTarget.value;let o=this.element.querySelector(`#${r}`);o||(o=document.createElement("input")),o.type="hidden",o.name=`campaign[metadata][fallbacks][${t}]`,o.value=s,o.id=r,this.element.appendChild(o)}}this.attributeModal.hide()}closeAttributeModal(){this.attributeModal&&this.attributeModal.hide()}addAttributeButton(e,t){const r=`modal-insert-attribute-${this.element.dataset.id||e.id}`;e.insertAdjacentHTML("beforeend",`<button type="button" class="trix-button-group-button gap-1 text-gray-900 dark:text-gray-400 cursor-pointer hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 rounded py-0.5 px-2 inline-flex items-center justify-center bg-white border-gray-200 border" data-trix-attribute="insertattribute" data-trix-value="[${t}]" title="${t}"> 551 <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 256 256" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"></path></svg> 552 Insert attribute 553 </button>`),e.insertAdjacentHTML("beforeend",` 554 <div id="${r}" tabindex="-1" aria-hidden="true" class="hidden overflow-y-auto overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full"> 555 <div class="relative p-4 w-full max-w-md max-h-full"> 556 <div class="relative bg-white rounded-lg shadow-sm dark:bg-gray-700"> 557 <div class="flex items-center justify-between p-3 border-b roun
557ded-t dark:border-gray-600 border-gray-200"> 558 <h3 class="text-lg font-semibold text-gray-900 dark:text-white"> 559 Insert Attribute 560 </h3> 561 <button data-action="click->trix-editor#closeAttributeModal" type="button" class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"> 562 <svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14"> 563 <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"/> 564 </svg> 565 <span class="sr-only">Close modal</span> 566 </button> 567 </div> 568 <div class="p-4 md:p-5"> 569 <div class="grid gap-4 mb-4 grid-cols-2"> 570 <div class="col-span-2"> 571 <label for="attribute" class="block mb-1 text-sm font-medium text-gray-900 dark:text-white">Attribute</label> 572 <select id="attribute" required data-trix-editor-target="attribute" class="w-full bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"> 573 <option value="first_name" selected="">First name</option> 574 <option value="last_name">Last name</option> 575 <option value="company">Company</option> 576 <option value="phome">Phone</option> 577 <option value="unsub">Unsubcription</option> 578 </select> 579 </div> 580 <div class="col-span-2"> 581 <label for="fallback" class="block mb-1 text-sm font-medium text-gray-900 dark:text-white">Fallback</label> 582 <input type="text" data-trix-editor-target="fallback" name="fallback" id="fallback" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"/> 583 <p class="mt-1 text-sm text-gray-500 dark:text-gray-400">Value if the attribute is empty</p> 584 </div> 585 </div> 586 <div class="flex items-center w-full justify-center border-gray-200 rounded-b dark:border-gray-600"> 587 <button data-action="click->trix-editor#insertAttribute" type="button" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Insert</button> 588 <button data-action="click->trix-editor#closeAttributeModal" type="button" class="py-2.5 px-5 ms-3 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">Cancel</button> 589 </div> 590 </div> 591 </div> 592 </div> 593 </div> 594 `),this.initModalInsertAttribute(e)}addTrixToolbar(e,t){e.insertAdjacentHTML("beforeend",`<span class="trix-button-group-button text-gray-900 dark:text-gray-400 mx-1.5 text-sm hover:bg-gray-100 dark:bg-gray-800 dark:border-gray-600 dark:hover:bg-gray-700 rounded py-1 px-2 inline-flex items-center justify-center bg-white border-gray-200 border" data-trix-attribute="keytext" data-trix-value="[${t}]" title="${t}">[${t}]</span>`)}disablePlainTextEditor(){this.plainTextTarget.setAttribute("disabled",!0),this.plainTextTarget.classList.add("disabled"),this.plainTextInput.style.disabled=!0,this.plainTextInput.setAttribute("disabled",!0)}enablePlainTextEditor(){this.plainTextTarget.removeAttribute("disabled"),this.plainTextTarget.classList.remove("disabled"),this.plainTextInput.style.disabled=!1,this.plainTextInput.removeAttribute("disabled")}disableTrixEditor(){this.trixEditor.setAttribute("contenteditable","false"),this.trixEditor.classList.add("disabled"),this.trixInput.style.disabled=!0}enableTrixEditor(){this.trixEditor.setAttribute("contenteditable","true"),this.trixEditor.classList.remove("disabled"),this.trixInput.style.disabled=!1}showPlainText(){this.plainTextInput.innerHTML=this.trixInput.value,this.enablePlainTextEditor(),this.disableTrixEditor()}showTrix(){this.trixInput.value=this.plainTextInput.value,this.trixEditor.editor.loadHTML(this.plainTextInput.value),this.enableTrixEditor(),this.disablePlainTextEditor()}}$(fC,"targets",["body","template","fallback","attribute","plainText","trixEditor","plainTextInput","trixEditorInput"]);const G9=Object.freeze(Object.defineProperty({__proto__:null,default:fC},Symbol.toStringTag,{value:"Module"}));class K9 extends Sm{connect(){super.connect();const e=this;this.initModal=this.initModal.bind(this),this.element.addEventListener("click",function(t){t.preventDefault(),e.initModal()})}initModal(){const e=this;turboFetch(this.element.href||this.element.dataset.url,function(){e.modal.show()})}}const Y9=Object.freeze(Object.defineProperty({__proto__:null,default:K9},Symbol.toStringTag,{value:"Module"}));class pC extends U{connect(){this.submitEnd=this.submitEnd.bind(this),this.galleryTarget=this.element.querySelector("#previews"),this.toggleButtonSubmit=this.toggleButtonSubmit.bind(this)}resetForm(){this.galleryTarget.innerHTML=""}inputTargetConnected(e){e.addEventListener("change",this.toggleButtonSubmit.bind(this)),e.addEventListener("input",this.toggleButtonSubmit.bind(this))}toggleButtonSubmit(){const e=this;e.inputTarget.value.trim()!==""&&e.inputTarget.value.trim().length>e.inputTarget.getAttribute("minlength")?(e.submitTarget.disabled=!1,e.submitTarget.classList.remove(...e.submitTarget.dataset.inactiveClass.split(" ")),e.submitTarget.classList.add(...e.submitTarget.dataset.activeClass.split(" "))):(e.submitTarget.disabled=!0,e.submitTarget.classList.remove(...e.submitTarget.dataset.activeClass.split(" ")),e.submitTarget.classList.add(...e.submitTarget.dataset.inactiveClass.split(" ")))}submitEnd(){this.inputTarget.value="",this.galleryTarget.innerHTML="",this.toggleAttachmentContainer(),this.toggleButtonSubmit()}}$(pC,"targets",["input","submit"]);const X9=Object.freeze(Object.defineProperty({__proto__:null,default:pC},Symbol.toStringTag,{value:"Module"}));class J9{constructor(e,t,n){this.thumbnail=n,this.file=e,this.url=t,this.directUpload=new VC(this.file,this.url,this),this.directUploadDidProgress=this.directUploadDidProgress.bind(this)}upload(){return new Promise((e,t)=>
594{this.directUpload.create((n,r)=>{n?t(n):e(r)})})}directUploadWillStoreFileWithXHR(e){e.upload.addEventListener("progress",this.directUploadDidProgress.bind(this))}directUploadDidProgress(e){if(e.lengthComputable){const t=this.thumbnail.querySelector(".progress-bar"),n=e.loaded/e.total*100;t.style.width=`${n}%`}}addHiddenField(e){const t=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name","ticket[images][]"),t.setAttribute("value",e.signed_id),this.element.appendChild(t)}}class mC extends U{connect(){this.uploadedFiles=[],this.deleteAttachment=this.deleteAttachment.bind(this)}upload(e){const t=Array.from(e.target.files),n=e.target.dataset.max||3,r=e.target.dataset.fileSize||10*1024*1024;if(this.uploadedFiles.length+t.length>n){alert("You can only upload up to 1 images.");return}t.forEach(s=>{s.size>r?alert(`The file ${s.name} exceeds the 10MB size limit.`):this.uploadFile(s,this.createThumbnail(s))}),this.inputTarget.value=""}createThumbnail(e){const t=new FileReader,n=document.createElement("div");return t.onload=r=>{n.classList.add("thumbnail-container","relative","mb-2","opacity-85"),n.innerHTML=` 595 <img src="${r.target.result}" alt="Preview" class="thumbnail h-auto max-h-32 rounded-lg max-w-full" /> 596 <div class="progress-container absolute bottom-0 w-full bg-gray-200 h-1.5 dark:bg-gray-700"> 597 <div class="progress-bar bg-blue-600 h-1.5 dark:bg-blue-500" style="width: 0%;"></div> 598 </div> 599 `,this.previewsTarget.appendChild(n)},t.readAsDataURL(e),n}uploadFile(e,t){const n=this;new J9(e,this.inputTarget.dataset.directUploadUrl,t).upload().then(r=>{n.showDeleteButton(r,t),n.addHiddenField(r),t.querySelector(".progress-container").remove(),t.classList.remove("opacity-85"),n.uploadedFiles.push(r.signed_id)})}addHiddenField(e){const t=document.createElement("input");t.setAttribute("type","hidden"),t.setAttribute("name",this.inputTarget.name),t.setAttribute("value",e.signed_id),t.setAttribute("data-signed-id",e.signed_id),this.element.appendChild(t)}showDeleteButton(e,t){if(t){const n=document.createElement("button");n.type="button",n.innerHTML='<svg class="w-4 h-4 text-red-500 hover:text-white" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0V0z"></path><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg>',n.classList.add("delete-button","absolute","inline-flex","items-center","justify-center","bg-white","w-6","h-6","border-2","border-white","rounded-full","-top-2","-end-2","hover:bg-red-500"),n.dataset.signedId=e.signed_id,n.addEventListener("click",this.deleteAttachment.bind(this)),t.appendChild(n)}}deleteAttachment(e){const t=e.currentTarget.dataset.signedId;this.uploadedFiles=this.uploadedFiles.filter(s=>s!==t);const n=this.element.querySelector(`input[type="hidden"][data-signed-id="${t}"]`);n&&n.remove();const r=e.currentTarget.closest(".thumbnail-container");r&&r.remove()}}$(mC,"targets",["previews","input"]);const Q9=Object.freeze(Object.defineProperty({__proto__:null,default:mC},Symbol.toStringTag,{value:"Module"}));class gC extends U{initialize(){this.options={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"download-modal-backdrop bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{document.querySelectorAll(".download-modal-backdrop").forEach(e=>{e.remove()})},onShow:()=>{},onToggle:()=>{}}}connect(){this.modal=new Modal(this.modalTarget,this.options,this.instanceOptions),this.defaultHistoryPollIntervalMs=5e3,this.historyRefreshInFlight=!1,this.resetHistoryRefreshInFlight=()=>{this.historyRefreshInFlight=!1},this.hasHistoryFrameTarget&&this.historyFrameTarget.addEventListener("turbo:frame-load",this.resetHistoryRefreshInFlight),this.startHistoryPolling()}disconnect(){this.hasHistoryFrameTarget&&this.resetHistoryRefreshInFlight&&this.historyFrameTarget.removeEventListener("turbo:frame-load",this.resetHistoryRefreshInFlight),this.historyPollBoostTimeout&&(clearTimeout(this.historyPollBoostTimeout),this.historyPollBoostTimeout=null),this.stopHistoryPolling()}buttonTargetConnected(e){e.addEventListener("click",this.openModal.bind(this))}buttonTargetDisconnected(e){e.removeEventListener("click",this.openModal.bind(this))}openModal(e){console.log(e.target.dataset.listId),this.inputTarget.value=e.target.dataset.listId??"",this.modal.show()}loadDownloadOptions(e){e.detail.success&&this.modal.show()}closeModal(){this.modal.hide()}submitEnd(e){e.detail.success&&(this.modal.hide(),this.refreshHistoryNow(),this.boostHistoryPolling())}changedTab(e){e.detail.success&&(this.tabTarget.classList.toggle("is-company"),this.tabTarget.classList.toggle("is-prospect"))}startHistoryPolling(){this.stopHistoryPolling(),this.historyPoller=setInterval(()=>this.refreshHistoryIfPending(),this.defaultHistoryPollIntervalMs)}stopHistoryPolling(){this.historyPoller&&(clearInterval(this.historyPoller),this.historyPoller=null)}refreshHistoryIfPending(){!this.hasHistoryFrameTarget||this.historyRefreshInFlight||!this.element.querySelector('[data-download-status="pending"]')||this.refreshHistoryNow()}refreshHistoryNow(){!this.hasHistoryFrameTarget||this.historyRefreshInFlight||(this.historyRefreshInFlight=!0,this.historyFrameTarget.reload(),setTimeout(()=>{this.historyRefreshInFlight=!1},3e3))}boostHistoryPolling(){this.historyPollBoostTimeout&&clearTimeout(this.historyPollBoostTimeout),this.stopHistoryPolling(),this.historyPoller=setInterval(()=>this.refreshHistoryIfPending(),1500),this.historyPollBoostTimeout=setTimeout(()=>{this.startHistoryPolling(),this.historyPollBoostTimeout=null},2e4)}}$(gC,"targets",["input","modal","button","submit","tab","historyFrame"]);const Z9=Object.freeze(Object.defineProperty({__proto__:null,default:gC},Symbol.toStringTag,{value:"Module"}));class bC extends Ii{connect(){super.connect(),this.toggleCheckedHidenInput=this.toggleCheckedHidenInput.bind(this),this.addListModal=this.initListModal(),this.mergeListModal=this.initMergeListModal(),this.updateSelectedRequiredState()}initListModal(){const e=document.getElementById("addListModal"),t={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"backdrop-list-modal bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},n={id:"addListModal",override:!0};return new Modal(e,t,n)}openListModal(){this.addListModal.show()}closeListModal(){this.addListModal.hide()}initMergeListModal(){const e=document.getElementById("mergeListModal"),t={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"backdrop-list-modal bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},n={id:"mergeListModal",override:!0};return new Modal(e,t,n)}openMergeListModal(){this.mergeListModal.show()}closeMergeListModal(){this.mergeListModal.hide()}toggle(e){super.toggle(e),e.target==this.checkboxAllTarget&&(this.checked.forEach(t=>this.toggleCheckedHidenInput(t)),this.unchecked.forEach(t=>this.toggleCheckedHidenInput(t)),this.toggleCheckedHidenInput(e.target))}refresh(e){super.refresh(),this.updateSelectedRequiredState(),e&&this.toggleCheckedHidenInput(e.currentTarget)}updateSelectedRequiredState(){if(!this.hasSelectedRequiredTarget)return;const e=this.checked.length>0;
599this.selectedRequiredTargets.forEach(t=>{t.disabled=!e,t.classList.toggle("opacity-65",!e),t.classList.toggle("cursor-not-allowed",!e)})}added(e){e.detail.success&&this.addListModal.hide()}updated(e){if(e.detail.success){const t=e.detail.formSubmission.submitter;t&&(t.value=="delete"&&(this.checkboxAllTarget.checked=!1,this.refresh()),this.toggleCheckedHidenInput(this.checkboxAllTarget))}}changeList(e){const t=e.target.closest("form");t&&(t.setAttribute("action",e.target.dataset.callbackUrl.replace(/__ID__/,e.target.value)),t.requestSubmit())}loaded(e){e.detail.success&&history.pushState({},null,e.target.action)}merged(e){e.detail.success&&this.mergeListModal.hide()}toListTargetConnected(e){e.addEventListener("change",this.cascaded.bind(this))}fromListTargetConnected(e){e.addEventListener("change",this.cascaded.bind(this))}cascaded(e){const t=e.target.id=="from_list_id"?this.toListTarget:this.fromListTarget;if(t){const n=t.querySelector("option[disabled]");n&&(n.disabled=!1);const r=t.querySelector(`option[value="${e.target.value}"]`);r&&(r.disabled=!0)}}toggleCheckedHidenInput(e){const n=(e.dataset.formTarget||"").split(",").map(s=>s.trim()).filter(s=>s.length>0).map(s=>document.querySelector(s)).filter(s=>s),r=document.querySelector(e.dataset.toggleTarget);if(n.length>0){const s=e.value;if(this.updateSelectedRequiredState(),e.checked){if(!s)return;n.forEach(o=>{if(o.querySelector(`input[type="hidden"][data-selected-id="${s}"]`))return;const a=document.createElement("input");a.setAttribute("type","hidden"),a.setAttribute("name",e.name),a.setAttribute("value",s),a.setAttribute("data-selected-id",s),o.appendChild(a)})}else n.forEach(o=>{const l=o.querySelectorAll(`input[type="hidden"][data-selected-id="${s}"]`);l&&l.forEach(a=>a.remove())})}if(r){const s=this;setTimeout(function(){s.checked.length>0?r.classList.remove("hidden"):r.classList.add("hidden")},100)}}}$(bC,"targets",["checkbox","checkboxAll","fromList","toList","selectedRequired"]);const ez=Object.freeze(Object.defineProperty({__proto__:null,default:bC},Symbol.toStringTag,{value:"Module"}));class Kf extends U{connect(){try{setTimeout(this.initTab.bind(this),100),this.modal=this.initModal(),this.pauseModal=this.initPauseModal(),this.cancel_reason=""}catch(e){console.error("Error in connect:",e)}}initTab(){const e=window.location.hash.slice(1);e?this.showTab(`#${e}`):this.currentTabValue&&this.showTab(this.currentTabValue)}reasonRadioTargetConnected(e){e.addEventListener("change",this.onReasonRadioChanged.bind(this))}reasonRadioTargetDisconnected(e){e.removeEventListener("change",this.onReasonRadioChanged.bind(this))}reasonInputTargetConnected(e){e.addEventListener("change",this.onReasonInputChanged.bind(this))}reasonInputTargetDisconnected(e){e.removeEventListener("change",this.onReasonInputChanged.bind(this))}onReasonInputChanged(e){this.reasonMessageTarget.value=e.target.value}onReasonRadioChanged(e){e.target.checked&&(this.cancel_reason=e.target.value,this.reasonTypeTarget.value=e.target.value)}tabTargetConnected(e){try{e.addEventListener("click",this.selectTab.bind(this))}catch(t){console.error("Error in tabTargetConnected:",t)}}tabTargetDisconnected(e){try{e.removeEventListener("click",this.selectTab.bind(this))}catch(t){console.error("Error in tabTargetDisconnect:",t)}}selectTab(e){try{this.currentTabValue=e.currentTarget.dataset.tabsTarget,this.updateHash(this.currentTabValue)}catch(t){console.error("Error in select:",t)}}selectTab(e){e.preventDefault();const t=e.currentTarget.dataset.tabsTarget;this.showTab(t),this.updateHash(t)}showTab(e){document.querySelector(`[data-tabs-target="${e}"]`).click();const t=this.tabTargets.find(n=>n.dataset.tabsTarget===e);t&&t.click()}updateHash(e){window.history.pushState?window.history.pushState(null,null,`${e}`):window.location.hash=e}resended(e){e.detail.success&&e.target.replaceWith(document.createRange().createContextualFragment(` 600 <div class="inline-flex items-center gap-1 bg-green-100 text-green-800 text-xs font-medium me-2 px-2.5 py-0.5 rounded-full dark:bg-green-900 dark:text-green-300"> 601 <svg class="text-green-400" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"> 602 <path d="M22 13.3414C21.3744 13.1203 20.7013 13 20 13C16.6863 13 14 15.6863 14 19C14 19.7013 14.1203 20.3744 14.3414 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H21C21.5523 3 22 3.44772 22 4V13.3414ZM12.0606 11.6829L5.64722 6.2377L4.35278 7.7623L12.0731 14.3171L19.6544 7.75616L18.3456 6.24384L12.0606 11.6829ZM19 22L15.4645 18.4645L16.8787 17.0503L19 19.1716L22.5355 15.636L23.9497 17.0503L19 22Z"></path> 603 </svg> 604 Sent 605 </div> 606 `))}requested(e){if(e.detail.success){const t=e.target.closest("#cancel-subscription-modal");t&&(t.querySelector("#reason_to_cancel").value="",this.modal.hide());const n=document.getElementById("cancel-subscription-button");
606n&&(n.disabled=!0)}}initModal(){const e=document.getElementById("cancel-subscription-modal");if(!e)return;const t={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"cancel-subscription-modal bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},n={id:"cancel-subscription-modal",override:!0};return new Modal(e,t,n)}openModal(){this.modal.show()}closeModal(){this.modal.hide()}initPauseModal(){const e=document.getElementById("pause-subscription-modal");if(!e)return;const t={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"pause-subscription-modal bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-50",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},n={id:"pause-subscription-modal",override:!0};return new Modal(e,t,n)}openPauseModal(){this.pauseModal.show()}closePauseModal(){this.pauseModal.hide()}pausedSubscription(){this.pauseModal.hide()}appliedCoupon(){this.modal.hide();const e=document.getElementById("apply_coupon");e&&(e.disabled=!0)}validateCancellationForm(e){if(!document.querySelector('input[name="cancellation_reason"]:checked'))return e.preventDefault(),alert("Please select a cancellation reason."),!1;if(this.hasReasonTextareaTarget){const n=this.reasonTextareaTarget.value.trim();if(n.length<5)return e.preventDefault(),this.reasonTextareaTarget.classList.add("border-red-500"),this.hasReasonErrorTarget&&this.reasonErrorTarget.classList.remove("hidden"),this.reasonTextareaTarget.focus(),!1;this.hasReasonErrorTarget&&this.reasonErrorTarget.classList.add("hidden"),this.reasonTextareaTarget.classList.remove("border-red-500"),this.reasonMessageTarget.value=n}return!0}cancelledSubscription(e){if(!this.validateCancellationForm(e))return;if(e.target.dataset.stripe){const n=document.getElementById("cancel_stripe");n&&n.click(),this.modal.hide()}else this.modal.hide();const t=document.getElementById("cancel-subscription-button");t&&(t.disabled=!0)}reloadTransferCredits(){turboReloadFrame("team_frame"),turboReloadFrame("transferred_credit_frame")}}$(Kf,"targets",["tab","reasonRadio","reasonInput","reasonType","reasonMessage","reasonTextarea","reasonError"]),$(Kf,"values",{currentTab:String});const tz=Object.freeze(Object.defineProperty({__proto__:null,default:Kf},Symbol.toStringTag,{value:"Module"})),nz={containerOuter:"choices",containerInner:"choices__inner",input:"choices__input",inputCloned:"choices__input--cloned",list:"choices__list",listItems:"choices__list--multiple",listSingle:"choices__list--single",listDropdown:"choices__list--dropdown",item:"choices__item",itemSelectable:"choices__item--selectable",itemDisabled:"choices__item--disabled",itemChoice:"choices__item--choice",placeholder:"choices__placeholder",group:"choices__group",groupHeading:"choices__heading",button:"choices__button",activeState:"is-active",focusState:"is-focused",openState:"is-open",disabledState:"is-disabled",highlightedState:"is-highlighted",selectedState:"is-selected",flippedState:"is-flipped",loadingState:"is-loading",noResults:"has-no-results",noChoices:"has-no-choices"};class yC extends U{initialize(){this.element.choices=this,this.refresh=this.refresh.bind(this),this.async=this.async.bind(this),this.add=this.add.bind(this),this.clear=this.clear.bind(this),this.remove=this.remove.bind(this),this.search=this.search.bind(this),this.update=this.update.bind(this),this.filter=this.filter.bind(this),this.options=this.options.bind(this),this.setChoicesValue=this.setChoicesValue.bind(this),this.addItemOnCustomKeyPress=this.addItemOnCustomKeyPress.bind(this),this.optionsReducer=this.optionsReducer.bind(this),this.updateActiveSearch=this.updateActiveSearch.bind(this),this.searchPath=this.element.dataset.searchPath,this.asyncPath=this.element.dataset.asyncPath,this.forceOption=this.element.dataset.forceOption||!0,this.key=this.selectTarget.dataset.key}connect(){setTimeout(this.setup.bind(this),5)}modeTargetConnected(e){var t=this;e.addEventListener("change",function(){t.dispatch("change",{detail:{field_name:"mode",field_value:this.checked}})})}setup(){const e=this;let t={...this.options(),valueComparer:(n,r)=>((n==null?void 0:n.toString().trim())||"")===((r==null?void 0:r.toString().trim())||""),fuseOptions:{threshold:.1},addItemFilter:n=>(e.addItemOnCustomKeyPress(n),!0),noResultsText:()=>`Press Enter to add <b>"${e.choices.input.value}"</b>`};this.choices=new Zf(this.selectTarget,t),this.input=this.element.querySelector("input"),this.refresh(),this.async(),this.updateActiveSearch(!0),this.searchPath?(this.refresh(),this.input.addEventListener("input",this.search),this.selectTarget.addEventListener("change",this.refresh),this.selectTarget.addEventListener("addItem",this.add),this.selectTarget.addEventListener("removeItem",this.remove)):(this.selectTarget.addEventListener("change",function(){e.updateActiveSearch()}),this.choices.input.element.addEventListener("keydown",function(n){n.key==="Enter"&&e.setChoicesValue(e.choices.input.value)}))}disconnect(){this.searchPath&&(this.input.removeEventListener("input",this.search),this.selectTarget.removeEventListener("change",this.refresh),this.selectTarget.removeEventListener("addItem",this.add),this.selectTarget.removeEventListener("removeItem",this.remove));try{this.choices.destroy()}catch{}this.choices=void 0}refresh(){this.choices.setChoices([],"value","label",!0),this.hasOptionsTarget&&[...this.optionsTarget.children].forEac
606h(this.append.bind(this))}async(){const e=this;this.asyncPath&&this.choices.setChoices(async()=>{try{return(await ye(e.asyncPath)).json()}catch(t){console.error(t)}},"value","label",!1)}clear(){this.choices.removeActiveItems()}append(e){[...this.selectTarget.options].some(t=>t.label===e.label)||this.choices.setChoices([e],"value","label",!1)}add(e){if(this.hasOptionsTarget){const t=[...this.optionsTarget.children].find(n=>n.label===e.detail.label);if(t)t.setAttribute("selected","");else{const n=document.createElement("option");n.setAttribute("label",e.detail.label),n.setAttribute("value",e.detail.value),n.setAttribute("selected",""),this.optionsTarget.appendChild(n)}}}remove(e){if(this.hasOptionsTarget){const t=[...this.optionsTarget.children].find(n=>n.label===e.detail.label);t&&(this.searchPath?t.remove():t.removeAttribute("selected"))}this.forceOption&&!this.selectTarget.options.length&&this.selectTarget.add(document.createElement("option"))}search(e){e.target.value?ye(this.searchPath+e.target.value,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(t=>t.json()).then(this.update):this.refresh()}update(e){this.choices.setChoices(e.filter(this.filter),"value","label",!0)}filter(e){return![...this.selectTarget.options].some(t=>t.label===e.label)}options(){return"silent renderChoiceLimit maxItemCount addItems removeItems removeItemButton editItems duplicateItemsAllowed delimiter paste searchEnabled searchChoices searchFloor searchResultLimit position resetScrollPosition addItemFilter shouldSort shouldSortItems placeholder placeholderValue prependValue appendValue renderSelectedChoices loadingText noResultsText noChoicesText itemSelectText addItemText maxItemText".split(" ").reduce(this.optionsReducer,{classNames:nz})}optionsReducer(e,t){if(t in this.element.dataset||this.element.dataset.hasOwnProperty(t)){let n=this.element.dataset[t];e[t]=["true","false"].includes(n)?JSON.parse(n):n}return e}setChoicesValue(e){e&&(this.choices.setValue([e]),this.choices.clearInput(),this.choices.hideDropdown(!0),this.updateActiveSearch())}addItemOnCustomKeyPress(e){if(this.choices&&e&&",; ".includes(e.slice(-1))){let n=e.slice(0,-1);localStorage.setItem(this.key,JSON.stringify(n)),this.setChoicesValue(n),this.updateActiveSearch()}else localStorage.setItem(this.key,JSON.stringify([])),this.updateActiveSearch()}updateActiveSearch(e=!1){const t=document.getElementById(`accordion-flush-${this.key}`),n=document.getElementById(`accordion-flush-body-${this.key}`),r=this.choices.getValue(!0);if(t){const s=t.querySelector(`.badge-${this.key}`);r.length>0?(t.classList.add("filled-search"),n.classList.add("filled-search"),s.innerHTML=r.length):(t.classList.remove("filled-search"),n.classList.remove("filled-search"),s.innerHTML=r.length)}e||this.dispatch("change",{detail:{field_name:this.key,field_value:r}})}}$(yC,"targets",["select","options"]);const iz=Object.freeze(Object.defineProperty({__proto__:null,default:yC},Symbol.toStringTag,{value:"Module"}));class vC extends U{connect(){this.submitEnd=this.submitEnd.bind(this),this.toggleButtonSubmit=this.toggleButtonSubmit.bind(this),this.toggleButtonSubmit()}resetForm(){this.galleryTarget.innerHTML=""}inputTargetConnected(e){e.addEventListener("change",this.toggleButtonSubmit.bind(this)),e.addEventListener("input",this.toggleButtonSubmit.bind(this))}toggleButtonSubmit(){const e=this;e.inputTarget.value.trim()!==""&&e.inputTarget.value.trim().length>e.inputTarget.getAttribute("minlength")?(e.submitTarget.disabled=!1,e.submitTarget.classList.remove(...e.submitTarget.dataset.inactiveClass.split(" ")),e.submitTarget.classList.add(...e.submitTarget.dataset.activeClass.split(" "))):(e.submitTarget.disabled=!0,e.submitTarget.classList.remove(...e.submitTarget.dataset.activeClass.split(" ")),e.submitTarget.classList.add(...e.submitTarget.dataset.inactiveClass.split(" ")))}submitEnd(){this.inputTarget.value="",this.toggleButtonSubmit()}}$(vC,"targets",["input","submit"]);const rz=Object.freeze(Object.defineProperty({__proto__:null,default:vC},Symbol.toStringTag,{value:"Module"}));class wC extends U{connect(){this.toggle=this.toggle.bind(this),this.modal=this.loadModal(),this.cleanRadioCheckedAfterModalClose()}cleanRadioCheckedAfterModalClose(){document.querySelector("#dropdownHelperButton").addEventListener("click",()=>
606{this.radioTargets.forEach(e=>{e.checked=!1})})}radioTargetConnected(e){e.addEventListener("change",this.toggle.bind(this))}radioTargetDisconnected(e){e.removeEventListener("change",()=>{console.log("123123"),this.toggle.bind(this)})}toggle(e){if(e.target.checked){if(this.modal=this.loadModal(e.target.dataset.modalId),!this.modal){alert("We are integrating with this platform.");return}this.modal.show()}e.target.checked?(this.buttonTarget.classList.remove("opacity-65","cursor-not-allowed"),this.buttonTarget.disabled=!1):(this.buttonTarget.classList.add("opacity-65","cursor-not-allowed"),this.buttonTarget.disabled=!0)}loadModal(e="salesforceModal"){const t=document.getElementById(e);if(!t)return null;const n={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{},onShow:()=>{},onToggle:()=>{}},r={id:e,override:!0};return new Modal(t,n,r)}close(){this.modal.hide(),this.radioTargets.forEach(e=>{e.checked=!1})}}$(wC,"targets",["radio","button"]);const sz=Object.freeze(Object.defineProperty({__proto__:null,default:wC},Symbol.toStringTag,{value:"Module"})),xl=5e3,rh={csv:{title:"Upload CSV"},manually:{title:"Enter Prospect Details"},url:{title:"Upload LinkedIn Profiles"}},nv={empty:"Please check, the input is empty",max:`You have only an upload limit of ${xl} lines per time`,verify:"Your email is unverified. Please check your inbox or spam folder and click the verification link. Only verified accounts can add prospects.",credit:"You have exhausted all the credits. Buy more to continue adding records.",error:"",warning:""};class Yf extends U{connect(){try{this.selectedItem=rh[this.uploadTypeValue||"csv"],this.initModal=this.initModal.bind(this),this.modal=this.initModal(),this.alert=this.initAlertModal(),this.listModal=this.initListModal(),this.alertType=null,this.totalRows=0,this.savedStatus=!1,this.initializeDropzone(),this.checkValidation(),this.observeMutations(),this.openUpload()}catch(e){console.error("Error in connect:",e)}}openUpload(){const t=new URLSearchParams(window.location.search).get("source");this.uploadTypeValue=t||this.defaultTypeValue||"csv",this.selectedItem=rh[this.uploadTypeValue||"csv"],this.showActiveSection(),this.radioTargets.forEach(n=>n.checked=n.value==this.uploadTypeValue),this.modal.show()}updateSourceParam(e){const t=new URL(window.location);t.searchParams.set("source",e),window.history.replaceState({},"",t)}radioTargetConnected(e){try{e.addEventListener("click",this.select.bind(this))}catch(t){console.error("Error in radioTargetConnected:",t)}}radioTargetDisconnected(e){try{e.removeEventListener("click",this.select.bind(this))}catch(t){console.error("Error in radioTargetDisconnected:",t)}}inputTargetConnected(e){try{e.addEventListener("input",this.checkValidation.bind(this))}catch(t){console.error("Error in radioTargetDisconnected:",t)}}inputTargetDisconnected(e){try{e.removeEventListener("input",this.checkValidation.bind(this))}catch(t){console.error("Error in radioTargetDisconnected:",t)}}urlTargetConnected(e){try{e.addEventListener("input",this.checkValidation.bind(this))}catch(t){console.error("Error in radioTargetDisconnected:",t)}}urlTargetDisconnected(e){try{e.removeEventListener("input",this.checkValidation.bind(this))}catch(t){console.error("Error in radioTargetDisconnected:",t)}}submitButtonTargetConnected(e){try{e.addEventListener("click",this.upload.bind(this))}catch(t){console.error("Error in submitButtonTargetConnected:",t)}}submitButtonTargetDisconnected(e){try{e.removeEventListener("click",this.upload.bind(this))}catch(t){console.error("Error in submitButtonTargetDisconnected:",t)}}upload(e){try{this.availableCreditsValue==0?this.alertType="error":this.availableCreditsValue<this.totalRows&&(this.alertType="warning"),this.alertType&&(e.preventDefault(),this.alert.show())}catch(t){console.error("Error in upload:",t)}}uploadDone(e){try{this.savedStatus&&(this.dropzone.removeAllFiles(!0),this.resetTable())}catch(t){console.error("Error in uploadDone:",t)}}observeMutations(){const e=this;this.mutationObserver=new MutationObserver(t=>{e.savedStatus=!1,t.forEach(n=>
606{n.addedNodes.forEach(r=>{if(r.nodeType===Node.ELEMENT_NODE&&r.id==="alertError"){e.savedStatus=!1;return}if(r.nodeType===Node.ELEMENT_NODE&&r.classList.contains("upload-completed")){e.savedStatus=!0;return}})}),e.savedStatus&&(this.resetTable(),this.dropzone.removeAllFiles(!0),this.modal.hide())}),this.mutationObserver.observe(this.element,{childList:!0,subtree:!0})}select(e){try{this.uploadTypeValue=e.target.value,this.showActiveSection(),e.target.checked&&(this.selectedItem=rh[this.uploadTypeValue||"csv"],this.updateSourceParam(this.uploadTypeValue),this.isVerifiedValue?this.availableCreditsValue<=0&&(this.alertType="credit"):this.alertType="verify",this.alertType?this.alert.show():this.modal.show())}catch(t){console.error("Error in select:",t)}}openList(){try{this.listModal.show()}catch(e){console.error("Error in select:",e)}}closeList(e){try{this.listModal.hide()}catch(t){console.error("Error in select:",t)}}checkValidation(){try{let e=!1;this.uploadTypeValue==="csv"?e=this.dropzone.files.length>0:this.uploadTypeValue==="manually"?e=this.inputTarget.value.trim().length>0:this.uploadTypeValue==="url"&&(e=this.urlTarget.value.trim().length>0),this.submitButtonTarget.disabled=!e}catch(e){console.error("Error in checkValidation:",e)}}showActiveSection(){try{switch(this.csvSectionTarget.classList.add("hidden"),this.manuallySectionTarget.classList.add("hidden"),this.urlSectionTarget.classList.add("hidden"),this.sourceTarget.value=this.uploadTypeValue,this.uploadTypeValue){case"csv":this.csvSectionTarget.classList.remove("hidden"),this.inputTarget.disabled=!1,this.urlTarget.disabled=!0;break;case"manually":this.manuallySectionTarget.classList.remove("hidden"),this.inputTarget.disabled=!1,this.urlTarget.disabled=!0;break;case"url":this.urlSectionTarget.classList.remove("hidden"),this.previewTarget.classList.add("hidden"),this.inputTarget.disabled=!0,this.urlTarget.disabled=!1;break;default:console.warn("Unknown upload type selected")}}catch(e){console.error("Error in showActiveSection:",e)}}showAlertSection(){try{switch(this.alertTarget.classList.add("hidden"),this.warningTarget.classList.add("hidden"),this.errorTarget.classList.add("hidden"),this.alertType){case"error":this.errorTarget.classList.remove("hidden");break;case"warning":Array.from(document.querySelectorAll(".credits")).forEach(e=>e.textContent=this.availableCreditsValue),this.totalTarget.textContent=this.availableCreditsValue,this.creditTarget.textContent=this.totalRows,this.progressTarget.style.width=`${this.availableCreditsValue/this.totalRows*100}%`,this.warningTarget.classList.remove("hidden");break;default:this.alertTarget.classList.remove("hidden")}}catch(e){console.error("Error in showActiveSection:",e)}}close(e){try{this.resetTable(),this.dropzone.removeAllFiles(!0),this.modal.hide()}catch(t){console.error("Error in close:",t)}}closeAlert(e){try{this.alert.hide()}catch(t){console.error("Error in close:",t)}}initModal(){try{const e=document.getElementById("uploadModal"),t={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"upload-modal-backdrop bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{document.querySelectorAll(".upload-modal-backdrop").forEach(n=>{n.remove()}),this.previewTarget.classList.add("hidden")},onShow:()=>{this.modalTarget.querySelector("h3").textContent=this.selectedItem.title}};return new jr(e,t,{id:"uploadModal",override:!0})}catch(e){console.error("Error in initModal:",e)}}initAlertModal(){try{const e=this,t=document.getElementById("alertModal"),n={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"alert-modal-backdrop bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{document.querySelectorAll(".alert-modal-backdrop").forEach(r=>{r.remove()}),this.modalTarget&&(this.modalTarget.classList.add("z-50"),this.modalTarget.classList.remove("z-30"))},onShow:()=>{e.showAlertSection(),e.alertMessageTarget.innerHTML=nv[e.alertType],this.modalTarget&&(this.modalTarget.classList.remove("z-50"),this.modalTarget.classList.add("z-30"))}};return new jr(t,n,{id:"alertModal",override:!0})}catch(e){console.error("Error in initModal:",e)}}initListModal(){try{const e=this,t=document.getElementById("addListModal"),n={placement:"bottom-right",backdrop:"dynamic",backdropClasses:"add-list-modal-backdrop bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40",closable:!0,onHide:()=>{document.querySelectorAll(".add-list-modal-backdrop").forEach(r=>{r.remove()}),this.modalTarget&&(this.modalTarget.classList.add("z-50"),this.modalTarget.classList.remove("z-30"))},onShow:()=>{e.showAlertSection(),e.alertMessageTarget.innerHTML=nv[e.alertType],this.modalTarget&&(this.modalTarget.classList.remove("z-50"),this.modalTarget.classList.add("z-30"))}};return new jr(t,n,{id:"addListModal",override:!0})}catch(e){console.error("Error in initModal:",e)}}initializeDropzone(){try{const e=this;this.dropzone=new G(this.dropzoneTarget,{url:"/",autoProcessQueue:!1,acceptedFiles:".csv",maxFiles:1,previewTemplate:document.getElementById("file-preview-template").innerHTML,clickable:!0,dictDefaultMessage:"",init:function(){const t=e.dropzoneTarget.querySelector(".dz-message");t&&(t.querySelector("button").textContent="Drag & drop a CSV file here or click to upload"),this.on("addedfile",n=>e.handleFileAdded(n)),this.on("removedfile",()=>{e.resetTable(),e.checkValidation()})}})}catch(e){console.error("Error in initializeDropzone:",e)}}async handleFileAdded(e){if(e.type!=="text/csv"&&!e.name.endsWith(".csv")){alert("Only CSV files are allowed."),this.dropzone.removeFile(e);return}const t=e.previewElement.querySelector("[data-dz-uploadprogress]"),n=e.previewElement.querySelector("[data-dz-uploadprogresspercent]");t.style.width="0%",n.textContent="0%";const r=new FileReader;r.onload=async s=>{const o=s.target.result,l=o.trim().split(` 607`).slice(1).map(c=>c.split(",")),a=l.length;this.updateLineCounter(a),this.inputTarget.value=o.trim().split(` 608`).slice(1).join(` 609`);const u=l.length;for(let c=1;c<=u;c++){await this.simulateProcessing(10);const h=c/u*100;t.style.width=`${h}%`,n.textContent=`${h.toFixed(2)}%`}if(a>xl)this.showErrorMessage(),this.dropzone.removeFile(e);else{this.hideErrorMessage();const c=l.map(h=>this.parseRow(h));this.renderTable(c)}this.checkValidation()},r.readAsText(e)}simulateProcessing(e){return new Promise(t=>setTimeout(t,e))}resetTable(){this.tableBodyTarget.innerHTML="",this.totalRows=0,this.updateLineCounter(0),this.inputTarget.value="",this.urlTarget.value="",this.previewTarget.classList.add("hidden")}parseUrls(){try{const e=this.urlTarget.value.trim();if(!e)return;const n=e.split(` 610`).map(r=>r.split(",")).length;this.updateLineCounter(n),this.totalRows=n}catch(e){console.error("Error in parseCsv:",e)}}parseCsv(){try{const e=this.inputTarget.value.trim();if(!e)return;const t=e.split(` 611`).map(r=>r.split(",")),n=t.length;if(this.updateLineCounter(n),console.log(n,xl),n>xl)this.showErrorMessage();else{this.hideErrorMessage();const r=t.map(s=>this.parseRow(s));this.renderTable(r)}}catch(e){console.error("Error in parseCsv:",e)}}parseRow(e){try{const[t="",n="",r="",s=""]=e.map(o=>o.trim());
611return{firstName:t,lastName:n,company:r,title:s}}catch(t){console.error("Error in parseRow:",t)}}renderTable(e){try{this.totalRows=e.length,e.length>0?this.previewTarget.classList.remove("hidden"):this.previewTarget.classList.add("hidden"),this.tableBodyTarget.innerHTML="",e.forEach(({firstName:t,lastName:n,company:r,title:s})=>{const o=document.createElement("tr");o.innerHTML=` 612 <td class="p-2 border-b text-gray-600">${t}</td> 613 <td class="p-2 border-b text-gray-600">${n}</td> 614 <td class="p-2 border-b text-gray-600">${r}</td> 615 <td class="p-2 border-b text-gray-600">${s}</td> 616 `,this.tableBodyTarget.appendChild(o)})}catch(t){console.error("Error in renderTable:",t)}}updateLineCounter(e){try{this.lineCountTarget.textContent=e}catch(t){console.error("Error in updateLineCounter:",t)}}showErrorMessage(){try{this.messageTarget.classList.remove("hidden"),this.lineCounterTarget.classList.add("text-red-500")}catch(e){console.error("Error in showErrorMessage:",e)}}hideErrorMessage(){try{this.messageTarget.classList.add("hidden"),this.lineCounterTarget.classList.remove("text-red-500")}catch(e){console.error("Error in hideErrorMessage:",e)}}toggleSubmitButton(e){try{const t=e.innerHTML,n=e.getAttribute("data-turbo-submits-with");n&&(e.setAttribute("data-turbo-submits-with",t),e.innerHTML=n),e.disabled=!e.disabled}catch(t){console.error("Error in toggleSubmitButton:",t)}}}$(Yf,"targets",["radio","button","modal","input","url","dropzone","tableHeader","tableBody","preview","manuallySection","csvSection","urlSection","message","lineCounter","lineCount","submitButton","alertMessage","error","warning","alert","total","credit","progress","source"]),$(Yf,"values",{uploadType:String,defaultType:String,availableCredits:Number,isPaid:Boolean,isVerified:Boolean});const oz=Object.freeze(Object.defineProperty({__proto__:null,default:Yf},Symbol.toStringTag,{value:"Module"})),Xf=class extends U{connect(){this.hidden=this.inputTarget.type==="password",this.class=this.hasHiddenClass?this.hiddenClass:"hidden"}toggle(e){e.preventDefault(),this.inputTarget.type=this.hidden?"text":"password",this.hidden=!this.hidden,this.iconTargets.forEach(t=>t.classList.toggle(this.class))}};Xf.targets=["input","icon"],Xf.classes=["hidden"];let az=Xf;const xC=class extends U{initialize(){this.scroll=this.scroll.bind(this)}connect(){this.element.addEventListener("click",this.scroll)}disconnect(){this.element.removeEventListener("click",this.scroll)}scroll(e){e.preventDefault();const t=this.element.hash.replace(/^#/,""),n=document.getElementById(t);if(!n){console.warn(`[stimulus-scroll-to] The element with the id: "${t}" does not exist on the page.`);return}const r=n.getBoundingClientRect().top+window.pageYOffset-this.offset;window.scrollTo({top:r,behavior:this.behavior})}get offset(){return this.hasOffsetValue?this.offsetValue:this.defaultOptions.offset!==void 0?this.defaultOptions.offset:10}get behavior(){return this.behaviorValue||this.defaultOptions.behavior||"smooth"}get defaultOptions(){return{}}};xC.values={offset:Number,behavior:String};let lz=xC;function uz(i){let{swiper:e,extendParams:t,on:n,emit:r}=i;t({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}});let s;const o=it();e.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]};const l=o.createElement("div");function a(p,b){const m=e.params.virtual;if(m.cache&&e.virtual.cache[b])return e.virtual.cache[b];let v;return m.renderSlide?(v=m.renderSlide.call(e,p,b),typeof v=="string"&&(l.innerHTML=v,v=l.children[0])):e.isElement?v=Pt("swiper-slide"):v=Pt("div",e.params.slideClass),v.setAttribute("data-swiper-slide-index",b),m.renderSlide||(v.innerHTML=p),m.cache&&(e.virtual.cache[b]=v),v}function u(p,b){const{slidesPerView:m,slidesPerGroup:v,centeredSlides:g,loop:y,initialSlide:w}=e.params;if(b&&!y&&w>0)return;const{addSlidesBefore:E,addSlidesAfter:x}=e.params.virtual,{from:S,to:_,slides:M,slidesGrid:O,offset:D}=e.virtual;e.params.cssMode||e.updateActiveIndex();const k=e.activeIndex||0;let A;e.rtlTranslate?A="right":A=e.isHorizontal()?"left":"top";let C,T;g?(C=Math.floor(m/2)+v+x,T=Math.floor(m/2)+v+E):(C=m+(v-1)+x,T=(y?m:v)+E);let L=k-T,I=k+C;y||(L=Math.max(L,0),I=Math.min(I,M.length-1));let P=(e.slidesGrid[L]||0)-(e.slidesGrid[0]||0);y&&k>=T?(L-=T,g||(P+=e.slidesGrid[0])):y&&k<T&&(L=-T,g&&(P+=e.slidesGrid[0])),Object.assign(e.virtual,{from:L,to:I,offset:P,slidesGrid:e.slidesGrid,slidesBefore:T,slidesAfter:C});function R(){e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),r("virtualUpdate")}
vendor: 13,301 bytes, line 616
616if(S===L&&_===I&&!p){e.slidesGrid!==O&&P!==D&&e.slides.forEach(V=>{V.style[A]=`${P-Math.abs(e.cssOverflowAdjustment())}px`}),e.updateProgress(),r("virtualUpdate");return}if(e.params.virtual.renderExternal){e.params.virtual.renderExternal.call(e,{offset:P,from:L,to:I,slides:function(){const Q=[];for(let le=L;le<=I;le+=1)Q.push(M[le]);return Q}()}),e.params.virtual.renderExternalUpdate?R():r("virtualUpdate");return}const z=[],N=[],B=V=>{let Q=V;return V<0?Q=M.length+V:Q>=M.length&&(Q=Q-M.length),Q};if(p)e.slides.filter(V=>V.matches(`.${e.params.slideClass}, swiper-slide`)).forEach(V=>{V.remove()});else for(let V=S;V<=_;V+=1)if(V<L||V>I){const Q=B(V);e.slides.filter(le=>le.matches(`.${e.params.slideClass}[data-swiper-slide-index="${Q}"], swiper-slide[data-swiper-slide-index="${Q}"]`)).forEach(le=>{le.remove()})}const j=y?-M.length:0,Y=y?M.length*2:M.length;for(let V=j;V<Y;V+=1)if(V>=L&&V<=I){const Q=B(V);typeof _>"u"||p?N.push(Q):(V>_&&N.push(Q),V<S&&z.push(Q))}if(N.forEach(V=>{e.slidesEl.append(a(M[V],V))}),y)for(let V=z.length-1;V>=0;V-=1){const Q=z[V];e.slidesEl.prepend(a(M[Q],Q))}else z.sort((V,Q)=>Q-V),z.forEach(V=>{e.slidesEl.prepend(a(M[V],V))});tt(e.slidesEl,".swiper-slide, swiper-slide").forEach(V=>{V.style[A]=`${P-Math.abs(e.cssOverflowAdjustment())}px`}),R()}function c(p){if(typeof p=="object"&&"length"in p)for(let b=0;b<p.length;b+=1)p[b]&&e.virtual.slides.push(p[b]);else e.virtual.slides.push(p);u(!0)}function h(p){const b=e.activeIndex;let m=b+1,v=1;if(Array.isArray(p)){for(let g=0;g<p.length;g+=1)p[g]&&e.virtual.slides.unshift(p[g]);m=b+p.length,v=p.length}else e.virtual.slides.unshift(p);if(e.params.virtual.cache){const g=e.virtual.cache,y={};Object.keys(g).forEach(w=>{const E=g[w],x=E.getAttribute("data-swiper-slide-index");x&&E.setAttribute("data-swiper-slide-index",parseInt(x,10)+v),y[parseInt(w,10)+v]=E}),e.virtual.cache=y}u(!0),e.slideTo(m,0)}function d(p){if(typeof p>"u"||p===null)return;let b=e.activeIndex;if(Array.isArray(p))for(let m=p.length-1;m>=0;m-=1)e.params.virtual.cache&&(delete e.virtual.cache[p[m]],Object.keys(e.virtual.cache).forEach(v=>{v>p&&(e.virtual.cache[v-1]=e.virtual.cache[v],e.virtual.cache[v-1].setAttribute("data-swiper-slide-index",v-1),delete e.virtual.cache[v])})),e.virtual.slides.splice(p[m],1),p[m]<b&&(b-=1),b=Math.max(b,0);else e.params.virtual.cache&&(delete e.virtual.cache[p],Object.keys(e.virtual.cache).forEach(m=>{m>p&&(e.virtual.cache[m-1]=e.virtual.cache[m],e.virtual.cache[m-1].setAttribute("data-swiper-slide-index",m-1),delete e.virtual.cache[m])})),e.virtual.slides.splice(p,1),p<b&&(b-=1),b=Math.max(b,0);u(!0),e.slideTo(b,0)}function f(){e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),u(!0),e.slideTo(0,0)}n("beforeInit",()=>{if(!e.params.virtual.enabled)return;let p;if(typeof e.passedParams.virtual.slides>"u"){const b=[...e.slidesEl.children].filter(m=>m.matches(`.${e.params.slideClass}, swiper-slide`));b&&b.length&&(e.virtual.slides=[...b],p=!0,b.forEach((m,v)=>{m.setAttribute("data-swiper-slide-index",v),e.virtual.cache[v]=m,m.remove()}))}p||(e.virtual.slides=e.params.virtual.slides),e.classNames.push(`${e.params.containerModifierClass}virtual`),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0,u(!1,!0)}),n("setTranslate",()=>{e.params.virtual.enabled&&(e.params.cssMode&&!e._immediateVirtual?(clearTimeout(s),s=setTimeout(()=>{u()},100)):u())}),n("init update resize",()=>{e.params.virtual.enabled&&e.params.cssMode&&Hs(e.wrapperEl,"--swiper-virtual-size",`${e.virtualSize}px`)}),Object.assign(e.virtual,{appendSlide:c,prependSlide:h,removeSlide:d,removeAllSlides:f,update:u})}function cz(i){let{swiper:e,extendParams:t,on:n,emit:r}=i;const s=it(),o=Fe();e.keyboard={enabled:!1},t({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}});function l(c){if(!e.enabled)return;const{rtlTranslate:h}=e;let d=c;d.originalEvent&&(d=d.originalEvent);const f=d.keyCode||d.charCode,p=e.params.keyboard.pageUpDown,b=p&&f===33,m=p&&f===34,v=f===37,g=f===39,y=f===38,w=f===40;if(!e.allowSlideNext&&(e.isHorizontal()&&g||e.isVertical()&&w||m)||!e.allowSlidePrev&&(e.isHorizontal()&&v||e.isVertical()&&y||b))return!1;if(!(d.shiftKey||d.altKey||d.ctrlKey||d.metaKey)&&!(s.activeElement&&s.activeElement.nodeName&&(s.activeElement.nodeName.toLowerCase()==="input"||s.activeElement.nodeName.toLowerCase()==="textarea"))){if(e.params.keyboard.onlyInViewport&&(b||m||v||g||y||w)){let E=!1;if(tr(e.el,`.${e.params.slideClass}, swiper-slide`).length>0&&tr(e.el,`.${e.params.slideActiveClass}`).length===0)return;const x=e.el,S=x.clientWidth,_=x.clientHeight,M=o.innerWidth,O=o.innerHeight,D=ou(x);h&&(D.left-=x.scrollLeft);const k=[[D.left,D.top],[D.left+S,D.top],[D.left,D.top+_],[D.left+S,D.top+_]];for(let A=0;A<k.length;A+=1){const C=k[A];if(C[0]>=0&&C[0]<=M&&C[1]>=0&&C[1]<=O){if(C[0]===0&&C[1]===0)continue;E=!0}}if(!E)return}e.isHorizontal()?((b||m||v||g)&&(d.preventDefault?d.preventDefault():d.returnValue=!1),((m||g)&&!h||(b||v)&&h)&&e.slideNext(),((b||v)&&!h||(m||g)&&h)&&e.slidePrev()):((b||m||y||w)&&(d.preventDefault?d.preventDefault():d.returnValue=!1),(m||w)&&e.slideNext(),(b||y)&&e.slidePrev()),r("keyPress",f)}}function a(){e.keyboard.enabled||(s.addEventListener("keydown",l),e.keyboard.enabled=!0)}function u(){e.keyboard.enabled&&(s.removeEventListener("keydown",l),e.keyboard.enabled=!1)}n("init",()=>{e.params.keyboard.enabled&&a()}),n("destroy",()=>{e.keyboard.enabled&&u()}),Object.assign(e.keyboard,{enable:a,disable:u})}function dz(i){let{swiper:e,extendParams:t,on:n,emit:r}=i;const s=Fe();t({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),e.mousewheel={enabled:!1};let o,l=$t(),a;const u=[];function c(y){let S=0,_=0,M=0,O=0;return"detail"in y&&(_=y.detail),"wheelDelta"in y&&(_=-y.wheelDelta/120),"wheelDeltaY"in y&&(_=-y.wheelDeltaY/120),"wheelDeltaX"in y&&(S=-y.wheelDeltaX/120),"axis"in y&&y.axis===y.HORIZONTAL_AXIS&&(S=_,_=0),M=S*10,O=_*10,"deltaY"in y&&(O=y.deltaY),"deltaX"in y&&(M=y.deltaX),y.shiftKey&&!M&&(M=O,O=0),(M||O)&&y.deltaMode&&(y.deltaMode===1?(M*=40,O*=40):(M*=800,O*=800)),M&&!S&&(S=M<1?-1:1),O&&!_&&(_=O<1?-1:1),{spinX:S,spinY:_,pixelX:M,pixelY:O}}function h(){e.enabled&&(e.mouseEntered=!0)}function d(){e.enabled&&(e.mouseEntered=!1)}function f(y){return e.params.mousewheel.thresholdDelta&&y.delta<e.params.mousewheel.thresholdDelta||e.params.mousewheel.thresholdTime&&$t()-l<e.params.mousewheel.thresholdTime?!1:y.delta>=6&&$t()-l<60?!0:(y.direction<0?(!e.isEnd||e.params.loop)&&!e.animating&&(e.slideNext(),r("scroll",y.raw)):(!e.isBeginning||e.params.loop)&&!e.animating&&(e.slidePrev(),r("scroll",y.raw)),l=new s.Date().getTime(),!1)}function p(y){const w=e.params.mousewheel;if(y.direction<0){if(e.isEnd&&!e.params.loop&&w.releaseOnEdges)return!0}else if(e.isBeginning&&!e.params.loop&&w.releaseOnEdges)return!0;return!1}function b(y){let w=y,E=!0;if(!e.enabled||y.target.closest(`.${e.params.mousewheel.noMousewheelClass}`))return;const x=e.params.mousewheel;e.params.cssMode&&w.preventDefault();let S=e.el;e.params.mousewheel.eventsTarget!=="container"&&(S=document.querySelector(e.params.mousewheel.eventsTarget));const _=S&&S.contains(w.target);if(!e.mouseEntered&&!_&&!x.releaseOnEdges)return!0;w.originalEvent&&(w=w.originalEvent);let M=0;const O=e.rtlTranslate?-1:1,D=c(w);if(x.forceToAxis)if(e.isHorizontal())if(Math.abs(D.pixelX)>Math.abs(D.pixelY))M=-D.pixelX*O;else return!0;else if(Math.abs(D.pixelY)>Math.abs(D.pixelX))M=-D.pixelY;else return!0;else M=Math.abs(D.pixelX)>Math.abs(D.pixelY)?-D.pixelX*O:-D.pixelY;if(M===0)return!0;x.invert&&(M=-M);let k=e.getTranslate()+M*x.sensitivity;if(k>=e.minTranslate()&&(k=e.minTranslate()),k<=e.maxTranslate()&&(k=e.maxTranslate()),E=e.params.loop?!0:!(k===e.minTranslate()||k===e.maxTranslate()),E&&e.params.nested&&w.stopPropagation(),!e.params.freeMode||!e.params.freeMode.enabled){const A={time:$t(),delta:Math.abs(M),direction:Math.sign(M),raw:y};u.length>=2&&u.shift();const C=u.length?u[u.length-1]:void 0;if(u.push(A),C?(A.direction!==C.direction||A.delta>C.delta||A.time>C.time+150)&&f(A):f(A),p(A))return!0}else{const A={time:$t(),delta:Math.abs(M),direction:Math.sign(M)},C=a&&A.time<a.time+500&&A.delta<=a.delta&&A.direction===a.direction;if(!C){a=void 0;let T=e.getTranslate()+M*x.sensitivity;const L=e.isBeginning,I=e.isEnd;if(T>=e.minTranslate()&&(T=e.minTranslate()),T<=e.maxTranslate()&&(T=e.maxTranslate()),e.setTransition(0),e.setTranslate(T),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses(),(!L&&e.isBeginning||!I&&e.isEnd)&&e.updateSlidesClasses(),e.params.loop&&e.loopFix({direction:A.direction<0?"next":"prev",byMousewheel:!0}),e.params.freeMode.sticky){clearTimeout(o),o=void 0,u.length>=15&&u.shift();const P=u.length?u[u.length-1]:void 0,R=u[0];if(u.push(A),P&&(A.delta>P.delta||A.direction!==P.direction))u.splice(0);else if(u.length>=15&&A.time-R.time<500&&R.delta-A.delta>=1&&A.delta<=6){const z=M>0?.8:.2;a=A,u.splice(0),o=fr(()=>{e.slideToClosest(e.params.speed,!0,void 0,z)},0)}o||(o=fr(()=>{a=A,u.splice(0),e.slideToClosest(e.params.speed,!0,void 0,.5)},500))}if(C||r("scroll",w),e.params.autoplay&&e.params.autoplayDisableOnInteraction&&e.autoplay.stop(),x.releaseOnEdges&&(T===e.minTranslate()||T===e.maxTranslate()))return!0}}return w.preventDefault?w.preventDefault():w.returnValue=!1,!1}function m(y){let w=e.el;e.params.mousewheel.eventsTarget!=="container"&&(w=document.querySelector(e.params.mousewheel.eventsTarget)),w[y]("mouseenter",h),w[y]("mouseleave",d),w[y]("wheel",b)}function v(){return e.params.cssMode?(e.wrapperEl.removeEventListener("wheel",b),!0):e.mousewheel.enabled?!1:(m("addEventListener"),e.mousewheel.enabled=!0,!0)}function g(){return e.params.cssMode?(e.wrapperEl.addEventListener(event,b),!0):e.mousewheel.enabled?(m("removeEventListener"),e.mousewheel.enabled=!1,!0):!1}n("init",()=>{!e.params.mousewheel.enabled&&e.params.cssMode&&g(),e.params.mousewheel.enabled&&v()}),n("destroy",()=>{e.params.cssMode&&v(),e.mousewheel.enabled&&g()}),Object.assign(e.mousewheel,{enable:v,disable:g})}function hg(i,e,t,n){return i.params.createElements&&Object.keys(n).forEach(r=>{if(!t[r]&&t.auto===!0){let s=tt(i.el,`.${n[r]}`)[0];s||(s=Pt("div",n[r]),s.className=n[r],i.el.append(s)),t[r]=s,e[r]=s}}),t}function hz(i){let{swiper:e,extendParams:t,on:n,emit:r}=i;t({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null};function s(p){let b;return p&&typeof p=="string"&&e.isElement&&(b=e.el.querySelector(p),b)?b:(p&&(typeof p=="string"&&(b=[...document.querySelectorAll(p)]),e.params.uniqueNavElements&&typeof p=="string"&&b&&b.length>1&&e.el.querySelectorAll(p).length===1?b=e.el.querySelector(p):b&&b.length===1&&(b=b[0])),p&&!b?p:b)}function o(p,b){const m=e.params.navigation;p=fe(p),p.forEach(v=>{v&&(v.classList[b?"add":"remove"](...m.disabledClass.split(" ")),v.tagName==="BUTTON"&&(v.disabled=b),e.params.watchOverflow&&e.enabled&&v.classList[e.isLocked?"add":"remove"](m.lockClass))})}function l(){const{nextEl:p,prevEl:b}=e.navigation;if(e.params.loop){o(b,!1),o(p,!1);return}o(b,e.isBeginning&&!e.params.rewind),o(p,e.isEnd&&!e.params.rewind)}function a(p){p.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),r("navigationPrev"))}function u(p){p.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),r("navigationNext"))}function c(){const p=e.params.navigation;if(e.params.navigation=hg(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(p.nextEl||p.prevEl))return;let b=s(p.nextEl),m=s(p.prevEl);Object.assign(e.navigation,{nextEl:b,prevEl:m}),b=fe(b),m=fe(m);const v=(g,y)=>{g&&g.addEventListener("click",y==="next"?u:a),!e.enabled&&g&&g.classList.add(...p.lockClass.split(" "))};b.forEach(g=>v(g,"next")),m.forEach(g=>v(g,"prev"))}function h(){let{nextEl:p,prevEl:b}=e.navigation;p=fe(p),b=fe(b);const m=(v,g)=>{v.removeEventListener("click",g==="next"?u:a),v.classList.remove(...e.params.navigation.disabledClass.split(" "))};p.forEach(v=>m(v,"next")),b.forEach(v=>m(v,"prev"))}n("init",()=>{e.params.navigation.enabled===!1?f():(c(),l())}),n("toEdge fromEdge lock unlock",()=>{l()}),n("destroy",()=>{h()}),n("enable disable",()=>{let{nextEl:p,prevEl:b}=e.navigation;if(p=fe(p),b=fe(b),e.enabled){l();return}[...p,...b].filter(m=>!!m).forEach(m=>m.classList.add(e.params.navigation.lockClass))}),n("click",(p,b)=>{let{nextEl:m,prevEl:v}=e.navigation;m=fe(m),v=fe(v);const g=b.target;let y=v.includes(g)||m.includes(g);if(e.isElement&&!y){const w=b.path||b.composedPath&&b.composedPath();w&&(y=w.find(E=>m.includes(E)||v.includes(E)))}if(e.params.navigation.hideOnClick&&!y){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===g||e.pagination.el.contains(g)))return;let w;m.length?w=m[0].classList.contains(e.params.navigation.hiddenClass):v.length&&(w=v[0].classList.contains(e.params.navigation.hiddenClass)),r(w===!0?"navigationShow":"navigationHide"),[...m,...v].filter(E=>
616!!E).forEach(E=>E.classList.toggle(e.params.navigation.hiddenClass))}});const d=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),c(),l()},f=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),h()};Object.assign(e.navigation,{enable:d,disable:f,update:l,init:c,destroy:h})}function Hn(i){return i===void 0&&(i=""),`.${i.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function fz(i){let{swiper:e,extendParams:t,on:n,emit:r}=i;const s="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:v=>v,formatFractionTotal:v=>v,bulletClass:`${s}-bullet`,bulletActiveClass:`${s}-bullet-active`,modifierClass:`${s}-`,currentClass:`${s}-current`,totalClass:`${s}-total`,hiddenClass:`${s}-hidden`,progressbarFillClass:`${s}-progressbar-fill`,progressbarOppositeClass:`${s}-progressbar-opposite`,clickableClass:`${s}-clickable`,lockClass:`${s}-lock`,horizontalClass:`${s}-horizontal`,verticalClass:`${s}-vertical`,paginationDisabledClass:`${s}-disabled`}}),e.pagination={el:null,bullets:[]};let o,l=0;function a(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function u(v,g){const{bulletActiveClass:y}=e.params.pagination;v&&(v=v[`${g==="prev"?"previous":"next"}ElementSibling`],v&&(v.classList.add(`${y}-${g}`),v=v[`${g==="prev"?"previous":"next"}ElementSibling`],v&&v.classList.add(`${y}-${g}-${g}`)))}function c(v){const g=v.target.closest(Hn(e.params.pagination.bulletClass));if(!g)return;v.preventDefault();const y=Mo(g)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===y)return;e.slideToLoop(y)}else e.slideTo(y)}function h(){const v=e.rtl,g=e.params.pagination;if(a())return;let y=e.pagination.el;y=fe(y);let w,E;const x=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,S=e.params.loop?Math.ceil(x/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(E=e.previousRealIndex||0,w=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(w=e.snapIndex,E=e.previousSnapIndex):(E=e.previousIndex||0,w=e.activeIndex||0),g.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const _=e.pagination.bullets;let M,O,D;if(g.dynamicBullets&&(o=Wh(_[0],e.isHorizontal()?"width":"height"),y.forEach(k=>{k.style[e.isHorizontal()?"width":"height"]=`${o*(g.dynamicMainBullets+4)}px`}),g.dynamicMainBullets>1&&E!==void 0&&(l+=w-(E||0),l>g.dynamicMainBullets-1?l=g.dynamicMainBullets-1:l<0&&(l=0)),M=Math.max(w-l,0),O=M+(Math.min(_.length,g.dynamicMainBullets)-1),D=(O+M)/2),_.forEach(k=>{const A=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(C=>`${g.bulletActiveClass}${C}`)].map(C=>typeof C=="string"&&C.includes(" ")?C.split(" "):C).flat();k.classList.remove(...A)}),y.length>1)_.forEach(k=>{const A=Mo(k);A===w?k.classList.add(...g.bulletActiveClass.split(" ")):e.isElement&&k.setAttribute("part","bullet"),g.dynamicBullets&&(A>=M&&A<=O&&k.classList.add(...`${g.bulletActiveClass}-main`.split(" ")),A===M&&u(k,"prev"),A===O&&u(k,"next"))});
vendor: 5,080 bytes, line 616
616else{const k=_[w];if(k&&k.classList.add(...g.bulletActiveClass.split(" ")),e.isElement&&_.forEach((A,C)=>{A.setAttribute("part",C===w?"bullet-active":"bullet")}),g.dynamicBullets){const A=_[M],C=_[O];for(let T=M;T<=O;T+=1)_[T]&&_[T].classList.add(...`${g.bulletActiveClass}-main`.split(" "));u(A,"prev"),u(C,"next")}}if(g.dynamicBullets){const k=Math.min(_.length,g.dynamicMainBullets+4),A=(o*k-o)/2-D*o,C=v?"right":"left";_.forEach(T=>{T.style[e.isHorizontal()?C:"top"]=`${A}px`})}}y.forEach((_,M)=>{if(g.type==="fraction"&&(_.querySelectorAll(Hn(g.currentClass)).forEach(O=>{O.textContent=g.formatFractionCurrent(w+1)}),_.querySelectorAll(Hn(g.totalClass)).forEach(O=>{O.textContent=g.formatFractionTotal(S)})),g.type==="progressbar"){let O;g.progressbarOpposite?O=e.isHorizontal()?"vertical":"horizontal":O=e.isHorizontal()?"horizontal":"vertical";const D=(w+1)/S;let k=1,A=1;O==="horizontal"?k=D:A=D,_.querySelectorAll(Hn(g.progressbarFillClass)).forEach(C=>{C.style.transform=`translate3d(0,0,0) scaleX(${k}) scaleY(${A})`,C.style.transitionDuration=`${e.params.speed}ms`})}g.type==="custom"&&g.renderCustom?(_.innerHTML=g.renderCustom(e,w+1,S),M===0&&r("paginationRender",_)):(M===0&&r("paginationRender",_),r("paginationUpdate",_)),e.params.watchOverflow&&e.enabled&&_.classList[e.isLocked?"add":"remove"](g.lockClass)})}function d(){const v=e.params.pagination;if(a())return;const g=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let y=e.pagination.el;y=fe(y);let w="";if(v.type==="bullets"){let E=e.params.loop?Math.ceil(g/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&E>g&&(E=g);for(let x=0;x<E;x+=1)v.renderBullet?w+=v.renderBullet.call(e,x,v.bulletClass):w+=`<${v.bulletElement} ${e.isElement?'part="bullet"':""} class="${v.bulletClass}"></${v.bulletElement}>`}v.type==="fraction"&&(v.renderFraction?w=v.renderFraction.call(e,v.currentClass,v.totalClass):w=`<span class="${v.currentClass}"></span> / <span class="${v.totalClass}"></span>`),v.type==="progressbar"&&(v.renderProgressbar?w=v.renderProgressbar.call(e,v.progressbarFillClass):w=`<span class="${v.progressbarFillClass}"></span>`),e.pagination.bullets=[],y.forEach(E=>{v.type!=="custom"&&(E.innerHTML=w||""),v.type==="bullets"&&e.pagination.bullets.push(...E.querySelectorAll(Hn(v.bulletClass)))}),v.type!=="custom"&&r("paginationRender",y[0])}function f(){e.params.pagination=hg(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const v=e.params.pagination;if(!v.el)return;let g;typeof v.el=="string"&&e.isElement&&(g=e.el.querySelector(v.el)),!g&&typeof v.el=="string"&&(g=[...document.querySelectorAll(v.el)]),g||(g=v.el),!(!g||g.length===0)&&(e.params.uniqueNavElements&&typeof v.el=="string"&&Array.isArray(g)&&g.length>1&&(g=[...e.el.querySelectorAll(v.el)],g.length>1&&(g=g.filter(y=>tr(y,".swiper")[0]===e.el)[0])),Array.isArray(g)&&g.length===1&&(g=g[0]),Object.assign(e.pagination,{el:g}),g=fe(g),g.forEach(y=>{v.type==="bullets"&&v.clickable&&y.classList.add(...(v.clickableClass||"").split(" ")),y.classList.add(v.modifierClass+v.type),y.classList.add(e.isHorizontal()?v.horizontalClass:v.verticalClass),v.type==="bullets"&&v.dynamicBullets&&(y.classList.add(`${v.modifierClass}${v.type}-dynamic`),l=0,v.dynamicMainBullets<1&&(v.dynamicMainBullets=1)),v.type==="progressbar"&&v.progressbarOpposite&&y.classList.add(v.progressbarOppositeClass),v.clickable&&y.addEventListener("click",c),e.enabled||y.classList.add(v.lockClass)}))}function p(){const v=e.params.pagination;if(a())return;let g=e.pagination.el;g&&(g=fe(g),g.forEach(y=>{y.classList.remove(v.hiddenClass),y.classList.remove(v.modifierClass+v.type),y.classList.remove(e.isHorizontal()?v.horizontalClass:v.verticalClass),v.clickable&&(y.classList.remove(...(v.clickableClass||"").split(" ")),y.removeEventListener("click",c))})),e.pagination.bullets&&e.pagination.bullets.forEach(y=>y.classList.remove(...v.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const v=e.params.pagination;let{el:g}=e.pagination;g=fe(g),g.forEach(y=>{y.classList.remove(v.horizontalClass,v.verticalClass),y.classList.add(e.isHorizontal()?v.horizontalClass:v.verticalClass)})}),n("init",()=>{e.params.pagination.enabled===!1?m():(f(),d(),h())}),n("activeIndexChange",()=>{typeof e.snapIndex>"u"&&h()}),n("snapIndexChange",()=>{h()}),n("snapGridLengthChange",()=>{d(),h()}),n("destroy",()=>{p()}),n("enable disable",()=>{let{el:v}=e.pagination;v&&(v=fe(v),v.forEach(g=>g.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),n("lock unlock",()=>{h()}),n("click",(v,g)=>{const y=g.target,w=fe(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&w&&w.length>0&&!y.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&y===e.navigation.nextEl||e.navigation.prevEl&&y===e.navigation.prevEl))return;const E=w[0].classList.contains(e.params.pagination.hiddenClass);
616r(E===!0?"paginationShow":"paginationHide"),w.forEach(x=>x.classList.toggle(e.params.pagination.hiddenClass))}});const b=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:v}=e.pagination;v&&(v=fe(v),v.forEach(g=>g.classList.remove(e.params.pagination.paginationDisabledClass))),f(),d(),h()},m=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:v}=e.pagination;v&&(v=fe(v),v.forEach(g=>g.classList.add(e.params.pagination.paginationDisabledClass))),p()};Object.assign(e.pagination,{enable:b,disable:m,render:d,update:h,init:f,destroy:p})}function pz(i){let{swiper:e,extendParams:t,on:n,emit:r}=i;const s=it();let o=!1,l=null,a=null,u,c,h,d;t({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),e.scrollbar={el:null,dragEl:null};function f(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:k,rtlTranslate:A}=e,{dragEl:C,el:T}=k,L=e.params.scrollbar,I=e.params.loop?e.progressLoop:e.progress;let P=c,R=(h-c)*I;A?(R=-R,R>0?(P=c-R,R=0):-R+c>h&&(P=h+R)):R<0?(P=c+R,R=0):R+c>
vendor: 1,156 bytes, line 616
616h&&(P=h-R),e.isHorizontal()?(C.style.transform=`translate3d(${R}px, 0, 0)`,C.style.width=`${P}px`):(C.style.transform=`translate3d(0px, ${R}px, 0)`,C.style.height=`${P}px`),L.hide&&(clearTimeout(l),T.style.opacity=1,l=setTimeout(()=>{T.style.opacity=0,T.style.transitionDuration="400ms"},1e3))}function p(k){!e.params.scrollbar.el||!e.scrollbar.el||(e.scrollbar.dragEl.style.transitionDuration=`${k}ms`)}function b(){if(!e.params.scrollbar.el||!e.scrollbar.el)return;const{scrollbar:k}=e,{dragEl:A,el:C}=k;A.style.width="",A.style.height="",h=e.isHorizontal()?C.offsetWidth:C.offsetHeight,d=e.size/(e.virtualSize+e.params.slidesOffsetBefore-(e.params.centeredSlides?e.snapGrid[0]:0)),e.params.scrollbar.dragSize==="auto"?c=h*d:c=parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?A.style.width=`${c}px`:A.style.height=`${c}px`,d>=1?C.style.display="none":C.style.display="",e.params.scrollbar.hide&&(C.style.opacity=0),e.params.watchOverflow&&e.enabled&&k.el.classList[e.isLocked?"add":"remove"](e.params.scrollbar.lockClass)}function m(k){return e.isHorizontal()?k.clientX:k.clientY}function v(k){const{scrollbar:A,rtlTranslate:C}=e,{el:T}=A;let L;
vendor: 16,884 bytes, line 616
616L=(m(k)-ou(T)[e.isHorizontal()?"left":"top"]-(u!==null?u:c/2))/(h-c),L=Math.max(Math.min(L,1),0),C&&(L=1-L);const I=e.minTranslate()+(e.maxTranslate()-e.minTranslate())*L;e.updateProgress(I),e.setTranslate(I),e.updateActiveIndex(),e.updateSlidesClasses()}function g(k){const A=e.params.scrollbar,{scrollbar:C,wrapperEl:T}=e,{el:L,dragEl:I}=C;o=!0,u=k.target===I?m(k)-k.target.getBoundingClientRect()[e.isHorizontal()?"left":"top"]:null,k.preventDefault(),k.stopPropagation(),T.style.transitionDuration="100ms",I.style.transitionDuration="100ms",v(k),clearTimeout(a),L.style.transitionDuration="0ms",A.hide&&(L.style.opacity=1),e.params.cssMode&&(e.wrapperEl.style["scroll-snap-type"]="none"),r("scrollbarDragStart",k)}function y(k){const{scrollbar:A,wrapperEl:C}=e,{el:T,dragEl:L}=A;o&&(k.preventDefault&&k.cancelable?k.preventDefault():k.returnValue=!1,v(k),C.style.transitionDuration="0ms",T.style.transitionDuration="0ms",L.style.transitionDuration="0ms",r("scrollbarDragMove",k))}function w(k){const A=e.params.scrollbar,{scrollbar:C,wrapperEl:T}=e,{el:L}=C;o&&(o=!1,e.params.cssMode&&(e.wrapperEl.style["scroll-snap-type"]="",T.style.transitionDuration=""),A.hide&&(clearTimeout(a),a=fr(()=>{L.style.opacity=0,L.style.transitionDuration="400ms"},1e3)),r("scrollbarDragEnd",k),A.snapOnRelease&&e.slideToClosest())}function E(k){const{scrollbar:A,params:C}=e,T=A.el;if(!T)return;const L=T,I=C.passiveListeners?{passive:!1,capture:!1}:!1,P=C.passiveListeners?{passive:!0,capture:!1}:!1;if(!L)return;const R=k==="on"?"addEventListener":"removeEventListener";L[R]("pointerdown",g,I),s[R]("pointermove",y,I),s[R]("pointerup",w,P)}function x(){!e.params.scrollbar.el||!e.scrollbar.el||E("on")}function S(){!e.params.scrollbar.el||!e.scrollbar.el||E("off")}function _(){const{scrollbar:k,el:A}=e;e.params.scrollbar=hg(e,e.originalParams.scrollbar,e.params.scrollbar,{el:"swiper-scrollbar"});const C=e.params.scrollbar;if(!C.el)return;let T;if(typeof C.el=="string"&&e.isElement&&(T=e.el.querySelector(C.el)),!T&&typeof C.el=="string"){if(T=s.querySelectorAll(C.el),!T.length)return}else T||(T=C.el);e.params.uniqueNavElements&&typeof C.el=="string"&&T.length>1&&A.querySelectorAll(C.el).length===1&&(T=A.querySelector(C.el)),T.length>0&&(T=T[0]),T.classList.add(e.isHorizontal()?C.horizontalClass:C.verticalClass);let L;T&&(L=T.querySelector(Hn(e.params.scrollbar.dragClass)),L||(L=Pt("div",e.params.scrollbar.dragClass),T.append(L))),Object.assign(k,{el:T,dragEl:L}),C.draggable&&x(),T&&T.classList[e.enabled?"remove":"add"](...ii(e.params.scrollbar.lockClass))}function M(){const k=e.params.scrollbar,A=e.scrollbar.el;A&&A.classList.remove(...ii(e.isHorizontal()?k.horizontalClass:k.verticalClass)),S()}n("changeDirection",()=>{if(!e.scrollbar||!e.scrollbar.el)return;const k=e.params.scrollbar;let{el:A}=e.scrollbar;A=fe(A),A.forEach(C=>{C.classList.remove(k.horizontalClass,k.verticalClass),C.classList.add(e.isHorizontal()?k.horizontalClass:k.verticalClass)})}),n("init",()=>{e.params.scrollbar.enabled===!1?D():(_(),b(),f())}),n("update resize observerUpdate lock unlock changeDirection",()=>{b()}),n("setTranslate",()=>{f()}),n("setTransition",(k,A)=>{p(A)}),n("enable disable",()=>{const{el:k}=e.scrollbar;k&&k.classList[e.enabled?"remove":"add"](...ii(e.params.scrollbar.lockClass))}),n("destroy",()=>{M()});const O=()=>{e.el.classList.remove(...ii(e.params.scrollbar.scrollbarDisabledClass)),e.scrollbar.el&&e.scrollbar.el.classList.remove(...ii(e.params.scrollbar.scrollbarDisabledClass)),_(),b(),f()},D=()=>{e.el.classList.add(...ii(e.params.scrollbar.scrollbarDisabledClass)),e.scrollbar.el&&e.scrollbar.el.classList.add(...ii(e.params.scrollbar.scrollbarDisabledClass)),M()};Object.assign(e.scrollbar,{enable:O,disable:D,updateSize:b,setTranslate:f,init:_,destroy:M})}function mz(i){let{swiper:e,extendParams:t,on:n}=i;t({parallax:{enabled:!1}});const r="[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]",s=(a,u)=>{const{rtl:c}=e,h=c?-1:1,d=a.getAttribute("data-swiper-parallax")||"0";let f=a.getAttribute("data-swiper-parallax-x"),p=a.getAttribute("data-swiper-parallax-y");const b=a.getAttribute("data-swiper-parallax-scale"),m=a.getAttribute("data-swiper-parallax-opacity"),v=a.getAttribute("data-swiper-parallax-rotate");if(f||p?(f=f||"0",p=p||"0"):e.isHorizontal()?(f=d,p="0"):(p=d,f="0"),f.indexOf("%")>=0?f=`${parseInt(f,10)*u*h}%`:f=`${f*u*h}px`,p.indexOf("%")>=0?p=`${parseInt(p,10)*u}%`:p=`${p*u}px`,typeof m<"u"&&m!==null){const y=m-(m-1)*(1-Math.abs(u));a.style.opacity=y}let g=`translate3d(${f}, ${p}, 0px)`;if(typeof b<"u"&&b!==null){const y=b-(b-1)*(1-Math.abs(u));g+=` scale(${y})`}if(v&&typeof v<"u"&&v!==null){const y=v*u*-1;g+=` rotate(${y}deg)`}a.style.transform=g},o=()=>{const{el:a,slides:u,progress:c,snapGrid:h,isElement:d}=e,f=tt(a,r);e.isElement&&f.push(...tt(e.hostEl,r)),f.forEach(p=>{s(p,c)}),u.forEach((p,b)=>{let m=p.progress;e.params.slidesPerGroup>1&&e.params.slidesPerView!=="auto"&&(m+=Math.ceil(b/2)-c*(h.length-1)),m=Math.min(Math.max(m,-1),1),p.querySelectorAll(`${r}, [data-swiper-parallax-rotate]`).forEach(v=>{s(v,m)})})},l=function(a){a===void 0&&(a=e.params.speed);const{el:u,hostEl:c}=e,h=[...u.querySelectorAll(r)];e.isElement&&h.push(...c.querySelectorAll(r)),h.forEach(d=>{let f=parseInt(d.getAttribute("data-swiper-parallax-duration"),10)||a;a===0&&(f=0),d.style.transitionDuration=`${f}ms`})};n("beforeInit",()=>{e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)}),n("init",()=>{e.params.parallax.enabled&&o()}),n("setTranslate",()=>{e.params.parallax.enabled&&o()}),n("setTransition",(a,u)=>{e.params.parallax.enabled&&l(u)})}function gz(i){let{swiper:e,extendParams:t,on:n,emit:r}=i;const s=Fe();t({zoom:{enabled:!1,limitToOriginalSize:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),e.zoom={enabled:!1};let o=1,l=!1,a,u;const c=[],h={originX:0,originY:0,slideEl:void 0,slideWidth:void 0,slideHeight:void 0,imageEl:void 0,imageWrapEl:void 0,maxRatio:3},d={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},f={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let p=1;Object.defineProperty(e.zoom,"scale",{get(){return p},set(N){if(p!==N){const B=h.imageEl,j=h.slideEl;r("zoomChange",N,B,j)}p=N}});function b(){if(c.length<2)return 1;const N=c[0].pageX,B=c[0].pageY,j=c[1].pageX,Y=c[1].pageY;return Math.sqrt((j-N)**2+(Y-B)**2)}function m(){const N=e.params.zoom,B=h.imageWrapEl.getAttribute("data-swiper-zoom")||N.maxRatio;if(N.limitToOriginalSize&&h.imageEl&&h.imageEl.naturalWidth){const j=h.imageEl.naturalWidth/h.imageEl.offsetWidth;return Math.min(j,B)}return B}function v(){if(c.length<2)return{x:null,y:null};const N=h.imageEl.getBoundingClientRect();return[(c[0].pageX+(c[1].pageX-c[0].pageX)/2-N.x-s.scrollX)/o,(c[0].pageY+(c[1].pageY-c[0].pageY)/2-N.y-s.scrollY)/o]}function g(){return e.isElement?"swiper-slide":`.${e.params.slideClass}`}function y(N){const B=g();return!!(N.target.matches(B)||e.slides.filter(j=>j.contains(N.target)).length>0)}function w(N){const B=`.${e.params.zoom.containerClass}`;return!!(N.target.matches(B)||[...e.hostEl.querySelectorAll(B)].filter(j=>j.contains(N.target)).length>0)}function E(N){if(N.pointerType==="mouse"&&c.splice(0,c.length),!y(N))return;const B=e.params.zoom;if(a=!1,u=!1,c.push(N),!(c.length<2)){if(a=!0,h.scaleStart=b(),!h.slideEl){h.slideEl=N.target.closest(`.${e.params.slideClass}, swiper-slide`),h.slideEl||(h.slideEl=e.slides[e.activeIndex]);let j=h.slideEl.querySelector(`.${B.containerClass}`);if(j&&(j=j.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),h.imageEl=j,j?h.imageWrapEl=tr(h.imageEl,`.${B.containerClass}`)[0]:h.imageWrapEl=void 0,!h.imageWrapEl){h.imageEl=void 0;return}h.maxRatio=m()}if(h.imageEl){const[j,Y]=v();h.originX=j,h.originY=Y,h.imageEl.style.transitionDuration="0ms"}l=!0}}function x(N){if(!y(N))return;const B=e.params.zoom,j=e.zoom,Y=c.findIndex(V=>V.pointerId===N.pointerId);Y>=0&&(c[Y]=N),!(c.length<2)&&(u=!0,h.scaleMove=b(),h.imageEl&&(j.scale=h.scaleMove/h.scaleStart*o,j.scale>h.maxRatio&&(j.scale=h.maxRatio-1+(j.scale-h.maxRatio+1)**.5),j.scale<B.minRatio&&(j.scale=B.minRatio+1-(B.minRatio-j.scale+1)**.5),h.imageEl.style.transform=`translate3d(0,0,0) scale(${j.scale})`))}function S(N){if(!y(N)||N.pointerType==="mouse"&&N.type==="pointerout")return;const B=e.params.zoom,j=e.zoom,Y=c.findIndex(V=>V.pointerId===N.pointerId);Y>=0&&c.splice(Y,1),!(!a||!u)&&(a=!1,u=!1,h.imageEl&&(j.scale=Math.max(Math.min(j.scale,h.maxRatio),B.minRatio),h.imageEl.style.transitionDuration=`${e.params.speed}ms`,h.imageEl.style.transform=`translate3d(0,0,0) scale(${j.scale})`,o=j.scale,l=!1,j.scale>1&&h.slideEl?h.slideEl.classList.add(`${B.zoomedSlideClass}`):j.scale<=1&&h.slideEl&&h.slideEl.classList.remove(`${B.zoomedSlideClass}`),j.scale===1&&(h.originX=0,h.originY=0,h.slideEl=void 0)))}let _;function M(){e.touchEventsData.preventTouchMoveFromPointerMove=!1}function O(){clearTimeout(_),e.touchEventsData.preventTouchMoveFromPointerMove=!0,_=setTimeout(()=>{M()})}function D(N){const B=e.device;if(!h.imageEl||d.isTouched)return;B.android&&N.cancelable&&N.preventDefault(),d.isTouched=!0;const j=c.length>0?c[0]:N;d.touchesStart.x=j.pageX,d.touchesStart.y=j.pageY}function k(N){if(!y(N)||!w(N))return;const B=e.zoom;if(!h.imageEl||!d.isTouched||!h.slideEl)return;d.isMoved||(d.width=h.imageEl.offsetWidth||h.imageEl.clientWidth,d.height=h.imageEl.offsetHeight||h.imageEl.clientHeight,d.startX=Uh(h.imageWrapEl,"x")||0,d.startY=Uh(h.imageWrapEl,"y")||0,h.slideWidth=h.slideEl.offsetWidth,h.slideHeight=h.slideEl.offsetHeight,h.imageWrapEl.style.transitionDuration="0ms");const j=d.width*B.scale,Y=d.height*B.scale;if(d.minX=Math.min(h.slideWidth/2-j/2,0),d.maxX=-d.minX,d.minY=Math.min(h.slideHeight/2-Y/2,0),d.maxY=-d.minY,d.touchesCurrent.x=c.length>0?c[0].pageX:N.pageX,d.touchesCurrent.y=c.length>0?c[0].pageY:N.pageY,Math.max(Math.abs(d.touchesCurrent.x-d.touchesStart.x),Math.abs(d.touchesCurrent.y-d.touchesStart.y))>5&&(e.allowClick=!1),!d.isMoved&&!l){if(e.isHorizontal()&&(Math.floor(d.minX)===Math.floor(d.startX)&&d.touchesCurrent.x<d.touchesStart.x||Math.floor(d.maxX)===Math.floor(d.startX)&&d.touchesCurrent.x>d.touchesStart.x)){d.isTouched=!1,M();return}if(!e.isHorizontal()&&(Math.floor(d.minY)===Math.floor(d.startY)&&d.touchesCurrent.y<d.touchesStart.y||Math.floor(d.maxY)===Math.floor(d.startY)&&d.touchesCurrent.y>d.touchesStart.y)){d.isTouched=!1,M();return}}N.cancelable&&N.preventDefault(),N.stopPropagation(),O(),d.isMoved=!0;const Q=(B.scale-o)/(h.maxRatio-e.params.zoom.minRatio),{originX:le,originY:be}=h;d.currentX=d.touchesCurrent.x-d.touchesStart.x+d.startX+Q*(d.width-le*2),d.currentY=d.touchesCurrent.y-d.touchesStart.y+d.startY+Q*(d.height-be*2),d.currentX<d.minX&&(d.currentX=d.minX+1-(d.minX-d.currentX+1)**.8),d.currentX>d.maxX&&(d.currentX=d.maxX-1+(d.currentX-d.maxX+1)**.8),d.currentY<d.minY&&(d.currentY=d.minY+1-(d.minY-d.currentY+1)**.8),d.currentY>d.maxY&&(d.currentY=d.maxY-1+(d.currentY-d.maxY+1)**.8),f.prevPositionX||(f.prevPositionX=d.touchesCurrent.x),f.prevPositionY||(f.prevPositionY=d.touchesCurrent.y),f.prevTime||(f.prevTime=Date.now()),f.x=(d.touchesCurrent.x-f.prevPositionX)/(Date.now()-f.prevTime)/2,f.y=(d.touchesCurrent.y-f.prevPositionY)/(Date.now()-f.prevTime)/2,Math.abs(d.touchesCurrent.x-f.prevPositionX)<2&&(f.x=0),Math.abs(d.touchesCurrent.y-f.prevPositionY)<2&&(f.y=0),f.prevPositionX=d.touchesCurrent.x,f.prevPositionY=d.touchesCurrent.y,f.prevTime=Date.now(),h.imageWrapEl.style.transform=`translate3d(${d.currentX}px, ${d.currentY}px,0)`}function A(){const N=e.zoom;if(!h.imageEl)return;if(!d.isTouched||!d.isMoved){d.isTouched=!1,d.isMoved=!1;return}d.isTouched=!1,d.isMoved=!1;let B=300,j=300;const Y=f.x*B,V=d.currentX+Y,Q=f.y*j,le=d.currentY+Q;f.x!==0&&(B=Math.abs((V-d.currentX)/f.x)),f.y!==0&&(j=Math.abs((le-d.currentY)/f.y));const be=Math.max(B,j);d.currentX=V,d.currentY=le;const qe=d.width*N.scale,Pe=d.height*N.scale;d.minX=Math.min(h.slideWidth/2-qe/2,0),d.maxX=-d.minX,d.minY=Math.min(h.slideHeight/2-Pe/2,0),d.maxY=-d.minY,d.currentX=Math.max(Math.min(d.currentX,d.maxX),d.minX),d.currentY=Math.max(Math.min(d.currentY,d.maxY),d.minY),h.imageWrapEl.style.transitionDuration=`${be}ms`,h.imageWrapEl.style.transform=`translate3d(${d.currentX}px, ${d.currentY}px,0)`}function C(){const N=e.zoom;h.slideEl&&e.activeIndex!==e.slides.indexOf(h.slideEl)&&(h.imageEl&&(h.imageEl.style.transform="translate3d(0,0,0) scale(1)"),h.imageWrapEl&&(h.imageWrapEl.style.transform="translate3d(0,0,0)"),h.slideEl.classList.remove(`${e.params.zoom.zoomedSlideClass}`),N.scale=1,o=1,h.slideEl=void 0,h.imageEl=void 0,h.imageWrapEl=void 0,h.originX=0,h.originY=0)}function T(N){const B=e.zoom,j=e.params.zoom;if(!h.slideEl){N&&N.target&&(h.slideEl=N.target.closest(`.${e.params.slideClass}, swiper-slide`)),h.slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?h.slideEl=tt(e.slidesEl,`.${e.params.slideActiveClass}`)[0]:h.slideEl=e.slides[e.activeIndex]);let Qt=h.slideEl.querySelector(`.${j.containerClass}`);Qt&&(Qt=Qt.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),h.imageEl=Qt,Qt?h.imageWrapEl=tr(h.imageEl,`.${j.containerClass}`)[0]:h.imageWrapEl=void 0}if(!h.imageEl||!h.imageWrapEl)return;e.params.cssMode&&(e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.touchAction="none"),h.slideEl.classList.add(`${j.zoomedSlideClass}`);let Y,V,Q,le,be,qe,Pe,Xe,on,Xt,zi,Vi,an,ln,Zn,ei,kt,Bt;typeof d.touchesStart.x>"u"&&N?(Y=N.pageX,V=N.pageY):(Y=d.touchesStart.x,V=d.touchesStart.y);const Jt=typeof N=="number"?N:null;o===1&&Jt&&(Y=void 0,V=void 0);const un=m();B.scale=Jt||un,o=Jt||un,N&&!(o===1&&Jt)?(kt=h.slideEl.offsetWidth,Bt=h.slideEl.offsetHeight,Q=ou(h.slideEl).left+s.scrollX,le=ou(h.slideEl).top+s.scrollY,be=Q+kt/2-Y,qe=le+Bt/2-V,on=h.imageEl.offsetWidth||h.imageEl.clientWidth,Xt=h.imageEl.offsetHeight||h.imageEl.clientHeight,zi=on*B.scale,Vi=Xt*B.scale,an=Math.min(kt/2-zi/2,0),ln=Math.min(Bt/2-Vi/2,0),Zn=-an,ei=-ln,Pe=be*B.scale,Xe=qe*B.scale,Pe<an&&(Pe=an),Pe>Zn&&(Pe=Zn),Xe<ln&&(Xe=ln),Xe>ei&&(Xe=ei)):(Pe=0,Xe=0),Jt&&B.scale===1&&(h.originX=0,h.originY=0),h.imageWrapEl.style.transitionDuration="300ms",h.imageWrapEl.style.transform=`translate3d(${Pe}px, ${Xe}px,0)`,h.imageEl.style.transitionDuration="300ms",h.imageEl.style.transform=`translate3d(0,0,0) scale(${B.scale})`}function L(){const N=e.zoom,B=e.params.zoom;if(!h.slideEl){e.params.virtual&&e.params.virtual.enabled&&e.virtual?h.slideEl=tt(e.slidesEl,`.${e.params.slideActiveClass}`)[0]:h.slideEl=e.slides[e.activeIndex];let j=h.slideEl.querySelector(`.${B.containerClass}`);j&&(j=j.querySelectorAll("picture, img, svg, canvas, .swiper-zoom-target")[0]),h.imageEl=j,j?h.imageWrapEl=tr(h.imageEl,`.${B.containerClass}`)[0]:h.imageWrapEl=void 0}!h.imageEl||!h.imageWrapEl||(e.params.cssMode&&(e.wrapperEl.style.overflow="",e.wrapperEl.style.touchAction=""),N.scale=1,o=1,h.imageWrapEl.style.transitionDuration="300ms",h.imageWrapEl.style.transform="translate3d(0,0,0)",h.imageEl.style.transitionDuration="300ms",h.imageEl.style.transform="translate3d(0,0,0) scale(1)",h.slideEl.classList.remove(`${B.zoomedSlideClass}`),h.slideEl=void 0,h.originX=0,h.originY=0)}function I(N){const B=e.zoom;B.scale&&B.scale!==1?L():T(N)}function P(){const N=e.params.passiveListeners?{passive:!0,capture:!1}:!1,B=e.params.passiveListeners?{passive:!1,capture:!0}:!0;return{passiveListener:N,activeListenerWithCapture:B}}function R(){const N=e.zoom;if(N.enabled)return;N.enabled=!0;const{passiveListener:B,activeListenerWithCapture:j}=P();e.wrapperEl.addEventListener("pointerdown",E,B),e.wrapperEl.addEventListener("pointermove",x,j),["pointerup","pointercancel","pointerout"].forEach(Y=>{e.wrapperEl.addEventListener(Y,S,B)}),e.wrapperEl.addEventListener("pointermove",k,j)}function z(){const N=e.zoom;if(!N.enabled)return;N.enabled=!1;const{passiveListener:B,activeListenerWithCapture:j}=P();e.wrapperEl.removeEventListener("pointerdown",E,B),e.wrapperEl.removeEventListener("pointermove",x,j),["pointerup","pointercancel","pointerout"].forEach(Y=>{e.wrapperEl.removeEventListener(Y,S,B)}),e.wrapperEl.removeEventListener("pointermove",k,j)}n("init",()=>{e.params.zoom.enabled&&R()}),n("destroy",()=>{z()}),n("touchStart",(N,B)=>{e.zoom.enabled&&D(B)}),n("touchEnd",(N,B)=>{e.zoom.enabled&&A()}),n("doubleTap",(N,B)=>{!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&I(B)}),n("transitionEnd",()=>{e.zoom.enabled&&e.params.zoom.enabled&&C()}),n("slideChange",()=>{e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&C()}
616),Object.assign(e.zoom,{enable:R,disable:z,in:T,out:L,toggle:I})}function bz(i){let{swiper:e,extendParams:t,on:n}=i;t({controller:{control:void 0,inverse:!1,by:"slide"}}),e.controller={control:void 0};function r(u,c){const h=function(){let b,m,v;return(g,y)=>{for(m=-1,b=g.length;b-m>1;)v=b+m>>1,g[v]<=y?m=v:b=v;return b}}();this.x=u,this.y=c,this.lastIndex=u.length-1;let d,f;return this.interpolate=function(b){return b?(f=h(this.x,b),d=f-1,(b-this.x[d])*(this.y[f]-this.y[d])/(this.x[f]-this.x[d])+this.y[d]):0},this}function s(u){e.controller.spline=e.params.loop?new r(e.slidesGrid,u.slidesGrid):new r(e.snapGrid,u.snapGrid)}function o(u,c){const h=e.controller.control;let d,f;const p=e.constructor;function b(m){if(m.destroyed)return;const v=e.rtlTranslate?-e.translate:e.translate;e.params.controller.by==="slide"&&(s(m),f=-e.controller.spline.interpolate(-v)),(!f||e.params.controller.by==="container")&&(d=(m.maxTranslate()-m.minTranslate())/(e.maxTranslate()-e.minTranslate()),(Number.isNaN(d)||!Number.isFinite(d))&&(d=1),f=(v-e.minTranslate())*d+m.minTranslate()),e.params.controller.inverse&&(f=m.maxTranslate()-f),m.updateProgress(f),m.setTranslate(f,e),m.updateActiveIndex(),m.updateSlidesClasses()}if(Array.isArray(h))for(let m=0;m<h.length;m+=1)h[m]!==c&&h[m]instanceof p&&b(h[m]);else h instanceof p&&c!==h&&b(h)}function l(u,c){const h=e.constructor,d=e.controller.control;let f;function p(b){b.destroyed||(b.setTransition(u,e),u!==0&&(b.transitionStart(),b.params.autoHeight&&fr(()=>{b.updateAutoHeight()}),to(b.wrapperEl,()=>{d&&b.transitionEnd()})))}if(Array.isArray(d))for(f=0;f<d.length;f+=1)d[f]!==c&&d[f]instanceof h&&p(d[f]);else d instanceof h&&c!==d&&p(d)}function a(){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)}n("beforeInit",()=>{if(typeof window<"u"&&(typeof e.params.controller.control=="string"||e.params.controller.control instanceof HTMLElement)){const u=document.querySelector(e.params.controller.control);if(u&&u.swiper)e.controller.control=u.swiper;else if(u){const c=h=>{e.controller.control=h.detail[0],e.update(),u.removeEventListener("init",c)};u.addEventListener("init",c)}return}e.controller.control=e.params.controller.control}),n("update",()=>{a()}),n("resize",()=>{a()}),n("observerUpdate",()=>{a()}),n("setTranslate",(u,c,h)=>{!e.controller.control||e.controller.control.destroyed||e.controller.setTranslate(c,h)}),n("setTransition",(u,c,h)=>{!e.controller.control||e.controller.control.destroyed||e.controller.setTransition(c,h)}),Object.assign(e.controller,{setTranslate:o,setTransition:l})}function yz(i){let{swiper:e,extendParams:t,on:n}=i;t({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),e.a11y={clicked:!1};let r=null,s,o,l=new Date().getTime();function a(I){const P=r;P.length!==0&&(P.innerHTML="",P.innerHTML=I)}function u(I){const P=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(I).replace(/x/g,P)}function c(I){I=fe(I),I.forEach(P=>{P.setAttribute("tabIndex","0")})}function h(I){I=fe(I),I.forEach(P=>{P.setAttribute("tabIndex","-1")})}function d(I,P){I=fe(I),I.forEach(R=>{R.setAttribute("role",P)})}function f(I,P){I=fe(I),I.forEach(R=>{R.setAttribute("aria-roledescription",P)})}function p(I,P){I=fe(I),I.forEach(R=>{R.setAttribute("aria-controls",P)})}function b(I,P){I=fe(I),I.forEach(R=>{R.setAttribute("aria-label",P)})}function m(I,P){I=fe(I),I.forEach(R=>{R.setAttribute("id",P)})}function v(I,P){I=fe(I),I.forEach(R=>{R.setAttribute("aria-live",P)})}function g(I){I=fe(I),I.forEach(P=>{P.setAttribute("aria-disabled",!0)})}function y(I){I=fe(I),I.forEach(P=>{P.setAttribute("aria-disabled",!1)})}function w(I){if(I.keyCode!==13&&I.keyCode!==32)return;const P=e.params.a11y,R=I.target;if(!(e.pagination&&e.pagination.el&&(R===e.pagination.el||e.pagination.el.contains(I.target))&&!I.target.matches(Hn(e.params.pagination.bulletClass)))){if(e.navigation&&e.navigation.prevEl&&e.navigation.nextEl){const z=fe(e.navigation.prevEl);fe(e.navigation.nextEl).includes(R)&&(e.isEnd&&!e.params.loop||e.slideNext(),e.isEnd?a(P.lastSlideMessage):a(P.nextSlideMessage)),z.includes(R)&&(e.isBeginning&&!e.params.loop||e.slidePrev(),e.isBeginning?a(P.firstSlideMessage):a(P.prevSlideMessage))}e.pagination&&R.matches(Hn(e.params.pagination.bulletClass))&&R.click()}}
616function E(){if(e.params.loop||e.params.rewind||!e.navigation)return;const{nextEl:I,prevEl:P}=e.navigation;P&&(e.isBeginning?(g(P),h(P)):(y(P),c(P))),I&&(e.isEnd?(g(I),h(I)):(y(I),c(I)))}function x(){return e.pagination&&e.pagination.bullets&&e.pagination.bullets.length}function S(){return x()&&e.params.pagination.clickable}function _(){const I=e.params.a11y;x()&&e.pagination.bullets.forEach(P=>{e.params.pagination.clickable&&(c(P),e.params.pagination.renderBullet||(d(P,"button"),b(P,I.paginationBulletMessage.replace(/\{\{index\}\}/,Mo(P)+1)))),P.matches(Hn(e.params.pagination.bulletActiveClass))?P.setAttribute("aria-current","true"):P.removeAttribute("aria-current")})}const M=(I,P,R)=>{c(I),I.tagName!=="BUTTON"&&(d(I,"button"),I.addEventListener("keydown",w)),b(I,R),p(I,P)},O=I=>{o&&o!==I.target&&!o.contains(I.target)&&(s=!0),e.a11y.clicked=!0},D=()=>{s=!1,requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.destroyed||(e.a11y.clicked=!1)})})},k=I=>{l=new Date().getTime()},A=I=>{if(e.a11y.clicked||new Date().getTime()-l<100)return;const P=I.target.closest(`.${e.params.slideClass}, swiper-slide`);if(!P||!e.slides.includes(P))return;o=P;const R=e.slides.indexOf(P)===e.activeIndex,z=e.params.watchSlidesProgress&&e.visibleSlides&&e.visibleSlides.includes(P);R||z||I.sourceCapabilities&&I.sourceCapabilities.firesTouchEvents||(e.isHorizontal()?e.el.scrollLeft=0:e.el.scrollTop=0,requestAnimationFrame(()=>{s||(e.params.loop?e.slideToLoop(parseInt(P.getAttribute("data-swiper-slide-index")),0):e.slideTo(e.slides.indexOf(P),0),s=!1)}))},C=()=>{const I=e.params.a11y;I.itemRoleDescriptionMessage&&f(e.slides,I.itemRoleDescriptionMessage),I.slideRole&&d(e.slides,I.slideRole);const P=e.slides.length;I.slideLabelMessage&&e.slides.forEach((R,z)=>{const N=e.params.loop?parseInt(R.getAttribute("data-swiper-slide-index"),10):z,B=I.slideLabelMessage.replace(/\{\{index\}\}/,N+1).replace(/\{\{slidesLength\}\}/,P);b(R,B)})},T=()=>{const I=e.params.a11y;e.el.append(r);const P=e.el;I.containerRoleDescriptionMessage&&f(P,I.containerRoleDescriptionMessage),I.containerMessage&&b(P,I.containerMessage);const R=e.wrapperEl,z=I.id||R.getAttribute("id")||`swiper-wrapper-${u(16)}`,N=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";m(R,z),v(R,N),C();let{nextEl:B,prevEl:j}=e.navigation?e.navigation:{};B=fe(B),j=fe(j),B&&B.forEach(V=>M(V,z,I.nextSlideMessage)),j&&j.forEach(V=>M(V,z,I.prevSlideMessage)),S()&&fe(e.pagination.el).forEach(Q=>{Q.addEventListener("keydown",w)}),it().addEventListener("visibilitychange",k),e.el.addEventListener("focus",A,!0),e.el.addEventListener("focus",A,!0),e.el.addEventListener("pointerdown",O,!0),e.el.addEventListener("pointerup",D,!0)};function L(){r&&r.remove();let{nextEl:I,prevEl:P}=e.navigation?e.navigation:{};I=fe(I),P=fe(P),I&&I.forEach(z=>z.removeEventListener("keydown",w)),P&&P.forEach(z=>z.removeEventListener("keydown",w)),S()&&fe(e.pagination.el).forEach(N=>{N.removeEventListener("keydown",w)}),it().removeEventListener("visibilitychange",k),e.el&&typeof e.el!="string"&&(e.el.removeEventListener("focus",A,!0),e.el.removeEventListener("pointerdown",O,!0),e.el.removeEventListener("pointerup",D,!0))}n("beforeInit",()=>{r=Pt("span",e.params.a11y.notificationClass),r.setAttribute("aria-live","assertive"),r.setAttribute("aria-atomic","true")}),n("afterInit",()=>{e.params.a11y.enabled&&T()}),n("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{e.params.a11y.enabled&&C()}),n("fromEdge toEdge afterInit lock unlock",()=>{e.params.a11y.enabled&&E()}),n("paginationUpdate",()=>{e.params.a11y.enabled&&_()}),n("destroy",()=>{e.params.a11y.enabled&&L()})}function vz(i){let{swiper:e,extendParams:t,on:n}=i;t({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let r=!1,s={};const o=f=>f.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),l=f=>{const p=Fe();let b;f?b=new URL(f):b=p.location;const m=b.pathname.slice(1).split("/").filter(w=>w!==""),v=m.length,g=m[v-2],y=m[v-1];return{key:g,value:y}},a=(f,p)=>{const b=Fe();if(!r||!e.params.history.enabled)return;let m;e.params.url?m=new URL(e.params.url):m=b.location;const v=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${p}"]`):e.slides[p];let g=o(v.getAttribute("data-history"));if(e.params.history.root.length>0){let w=e.params.history.root;w[w.length-1]==="/"&&(w=w.slice(0,w.length-1)),g=`${w}/${f?`${f}/`:""}${g}`}else m.pathname.includes(f)||(g=`${f?`${f}/`:""}${g}`);e.params.history.keepQuery&&(g+=m.search);const y=b.history.state;y&&y.value===g||(e.params.history.replaceState?b.history.replaceState({value:g},null,g):b.history.pushState({value:g},null,g))},u=(f,p,b)=>{if(p)for(let m=0,v=e.slides.length;m<v;m+=1){const g=e.slides[m];if(o(g.getAttribute("data-history"))===p){const w=e.getSlideIndex(g);
vendor: 4,567 bytes, line 616
616e.slideTo(w,f,b)}}else e.slideTo(0,f,b)},c=()=>{s=l(e.params.url),u(e.params.speed,s.value,!1)},h=()=>{const f=Fe();if(e.params.history){if(!f.history||!f.history.pushState){e.params.history.enabled=!1,e.params.hashNavigation.enabled=!0;return}if(r=!0,s=l(e.params.url),!s.key&&!s.value){e.params.history.replaceState||f.addEventListener("popstate",c);return}u(0,s.value,e.params.runCallbacksOnInit),e.params.history.replaceState||f.addEventListener("popstate",c)}},d=()=>{const f=Fe();e.params.history.replaceState||f.removeEventListener("popstate",c)};n("init",()=>{e.params.history.enabled&&h()}),n("destroy",()=>{e.params.history.enabled&&d()}),n("transitionEnd _freeModeNoMomentumRelease",()=>{r&&a(e.params.history.key,e.activeIndex)}),n("slideChange",()=>{r&&e.params.cssMode&&a(e.params.history.key,e.activeIndex)})}function wz(i){let{swiper:e,extendParams:t,emit:n,on:r}=i,s=!1;const o=it(),l=Fe();t({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(d,f){if(e.virtual&&e.params.virtual.enabled){const p=e.slides.filter(m=>m.getAttribute("data-hash")===f)[0];return p?parseInt(p.getAttribute("data-swiper-slide-index"),10):0}return e.getSlideIndex(tt(e.slidesEl,`.${e.params.slideClass}[data-hash="${f}"], swiper-slide[data-hash="${f}"]`)[0])}}});const a=()=>{n("hashChange");const d=o.location.hash.replace("#",""),f=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],p=f?f.getAttribute("data-hash"):"";if(d!==p){const b=e.params.hashNavigation.getSlideIndex(e,d);if(typeof b>"u"||Number.isNaN(b))return;e.slideTo(b)}},u=()=>{if(!s||!e.params.hashNavigation.enabled)return;const d=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${e.activeIndex}"]`):e.slides[e.activeIndex],f=d?d.getAttribute("data-hash")||d.getAttribute("data-history"):"";e.params.hashNavigation.replaceState&&l.history&&l.history.replaceState?(l.history.replaceState(null,null,`#${f}`||""),n("hashSet")):(o.location.hash=f||"",n("hashSet"))},c=()=>{if(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)return;s=!0;const d=o.location.hash.replace("#","");if(d){const p=e.params.hashNavigation.getSlideIndex(e,d);e.slideTo(p||0,0,e.params.runCallbacksOnInit,!0)}e.params.hashNavigation.watchState&&l.addEventListener("hashchange",a)},h=()=>{e.params.hashNavigation.watchState&&l.removeEventListener("hashchange",a)};r("init",()=>{e.params.hashNavigation.enabled&&c()}),r("destroy",()=>{e.params.hashNavigation.enabled&&h()}),r("transitionEnd _freeModeNoMomentumRelease",()=>{s&&u()}),r("slideChange",()=>{s&&e.params.cssMode&&u()})}function xz(i){let{swiper:e,extendParams:t,on:n,emit:r,params:s}=i;e.autoplay={running:!1,paused:!1,timeLeft:0},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let o,l,a=s&&s.autoplay?s.autoplay.delay:3e3,u=s&&s.autoplay?s.autoplay.delay:3e3,c,h=new Date().getTime(),d,f,p,b,m,v,g;function y(P){!e||e.destroyed||!e.wrapperEl||P.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",y),!(g||P.detail&&P.detail.bySwiperTouchMove)&&O())}const w=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?d=!0:d&&(u=c,d=!1);const P=e.autoplay.paused?c:h+u-new Date().getTime();e.autoplay.timeLeft=P,r("autoplayTimeLeft",P,P/a),l=requestAnimationFrame(()=>{w()})},E=()=>{let P;return e.virtual&&e.params.virtual.enabled?P=e.slides.filter(z=>z.classList.contains("swiper-slide-active"))[0]:P=e.slides[e.activeIndex],P?parseInt(P.getAttribute("data-swiper-autoplay"),10):void 0},x=P=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(l),w();let R=typeof P>"u"?e.params.autoplay.delay:P;a=e.params.autoplay.delay,u=e.params.autoplay.delay;const z=E();!Number.isNaN(z)&&z>0&&typeof P>"u"&&(R=z,a=z,u=z),c=R;const N=e.params.speed,B=()=>{!e||e.destroyed||(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(N,!0,!0),r("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,N,!0,!0),r("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(N,!0,!0),r("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,N,!0,!0),r("autoplay")),e.params.cssMode&&(h=new Date().getTime(),requestAnimationFrame(()=>{x()})))};return R>0?(clearTimeout(o),o=setTimeout(()=>{B()},R)):requestAnimationFrame(()=>{B()}),R},S=()=>{h=new Date().getTime(),e.autoplay.running=!0,x(),r("autoplayStart")},_=()=>
vendor: 4,900 bytes, line 616
616{e.autoplay.running=!1,clearTimeout(o),cancelAnimationFrame(l),r("autoplayStop")},M=(P,R)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(o),P||(v=!0);const z=()=>{r("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",y):O()};if(e.autoplay.paused=!0,R){m&&(c=e.params.autoplay.delay),m=!1,z();return}c=(c||e.params.autoplay.delay)-(new Date().getTime()-h),!(e.isEnd&&c<0&&!e.params.loop)&&(c<0&&(c=0),z())},O=()=>{e.isEnd&&c<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(h=new Date().getTime(),v?(v=!1,x(c)):x(),e.autoplay.paused=!1,r("autoplayResume"))},D=()=>{if(e.destroyed||!e.autoplay.running)return;const P=it();P.visibilityState==="hidden"&&(v=!0,M(!0)),P.visibilityState==="visible"&&O()},k=P=>{P.pointerType==="mouse"&&(v=!0,g=!0,!(e.animating||e.autoplay.paused)&&M(!0))},A=P=>{P.pointerType==="mouse"&&(g=!1,e.autoplay.paused&&O())},C=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",k),e.el.addEventListener("pointerleave",A))},T=()=>{e.el&&typeof e.el!="string"&&(e.el.removeEventListener("pointerenter",k),e.el.removeEventListener("pointerleave",A))},L=()=>{it().addEventListener("visibilitychange",D)},I=()=>{it().removeEventListener("visibilitychange",D)};n("init",()=>{e.params.autoplay.enabled&&(C(),L(),S())}),n("destroy",()=>{T(),I(),e.autoplay.running&&_()}),n("_freeModeStaticRelease",()=>{(p||v)&&O()}),n("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?_():M(!0,!0)}),n("beforeTransitionStart",(P,R,z)=>{e.destroyed||!e.autoplay.running||(z||!e.params.autoplay.disableOnInteraction?M(!0,!0):_())}),n("sliderFirstMove",()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){_();return}f=!0,p=!1,v=!1,b=setTimeout(()=>{v=!0,p=!0,M(!0)},200)}}),n("touchEnd",()=>{if(!(e.destroyed||!e.autoplay.running||!f)){if(clearTimeout(b),clearTimeout(o),e.params.autoplay.disableOnInteraction){p=!1,f=!1;return}p&&e.params.cssMode&&O(),p=!1,f=!1}}),n("slideChange",()=>{e.destroyed||!e.autoplay.running||(m=!0)}),Object.assign(e.autoplay,{start:S,stop:_,pause:M,resume:O})}function Ez(i){let{swiper:e,extendParams:t,on:n}=i;t({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let r=!1,s=!1;e.thumbs={swiper:null};function o(){const u=e.thumbs.swiper;if(!u||u.destroyed)return;const c=u.clickedIndex,h=u.clickedSlide;if(h&&h.classList.contains(e.params.thumbs.slideThumbActiveClass)||typeof c>"u"||c===null)return;let d;u.params.loop?d=parseInt(u.clickedSlide.getAttribute("data-swiper-slide-index"),10):d=c,e.params.loop?e.slideToLoop(d):e.slideTo(d)}function l(){const{thumbs:u}=e.params;if(r)return!1;r=!0;const c=e.constructor;if(u.swiper instanceof c)e.thumbs.swiper=u.swiper,Object.assign(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper.update();else if(Vs(u.swiper)){const h=Object.assign({},u.swiper);Object.assign(h,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper=new c(h),s=!0}return e.thumbs.swiper.el.classList.add(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",o),!0}function a(u){const c=e.thumbs.swiper;if(!c||c.destroyed)return;const h=c.params.slidesPerView==="auto"?c.slidesPerViewDynamic():c.params.slidesPerView;let d=1;const f=e.params.thumbs.slideThumbActiveClass;if(e.params.slidesPerView>1&&!e.params.centeredSlides&&(d=e.params.slidesPerView),e.params.thumbs.multipleActiveThumbs||(d=1),d=Math.floor(d),c.slides.forEach(m=>m.classList.remove(f)),c.params.loop||c.params.virtual&&c.params.virtual.enabled)for(let m=0;m<d;m+=1)tt(c.slidesEl,`[data-swiper-slide-index="${e.realIndex+m}"]`).forEach(v=>{v.classList.add(f)});else for(let m=0;m<d;m+=1)c.slides[e.realIndex+m]&&c.slides[e.realIndex+m].classList.add(f);const p=e.params.thumbs.autoScrollOffset,b=p&&!c.params.loop;if(e.realIndex!==c.realIndex||b){const m=c.activeIndex;let v,g;if(c.params.loop){const y=c.slides.filter(w=>w.getAttribute("data-swiper-slide-index")===`${e.realIndex}`)[0];v=c.slides.indexOf(y),g=e.activeIndex>e.previousIndex?"next":"prev"}else v=e.realIndex,g=v>e.previousIndex?"next":"prev";b&&(v+=g==="next"?p:-1*p),c.visibleSlidesIndexes&&c.visibleSlidesIndexes.indexOf(v)<0&&(c.params.centeredSlides?v>m?v=v-Math.floor(h/2)+1:v=v+Math.floor(h/2)-1:v>m&&c.params.slidesPerGroup,c.slideTo(v,u?0:void 0))}}n("beforeInit",()=>{const{thumbs:u}=e.params;if(!(!u||!u.swiper))if(typeof u.swiper=="string"||u.swiper instanceof HTMLElement){const c=it(),h=()=>{const f=typeof u.swiper=="string"?c.querySelector(u.swiper):u.swiper;if(f&&f.swiper)u.swiper=f.swiper,l(),a(!0);else if(f){const p=b=>{u.swiper=b.detail[0],f.removeEventListener("init",p),l(),a(!0),u.swiper.update(
vendor: 4,307 bytes, line 616
616),e.update()};f.addEventListener("init",p)}return f},d=()=>{if(e.destroyed)return;h()||requestAnimationFrame(d)};requestAnimationFrame(d)}else l(),a(!0)}),n("slideChange update resize observerUpdate",()=>{a()}),n("setTransition",(u,c)=>{const h=e.thumbs.swiper;!h||h.destroyed||h.setTransition(c)}),n("beforeDestroy",()=>{const u=e.thumbs.swiper;!u||u.destroyed||s&&u.destroy()}),Object.assign(e.thumbs,{init:l,update:a})}function Tz(i){let{swiper:e,extendParams:t,emit:n,once:r}=i;t({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}});function s(){if(e.params.cssMode)return;const a=e.getTranslate();e.setTranslate(a),e.setTransition(0),e.touchEventsData.velocities.length=0,e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function o(){if(e.params.cssMode)return;const{touchEventsData:a,touches:u}=e;a.velocities.length===0&&a.velocities.push({position:u[e.isHorizontal()?"startX":"startY"],time:a.touchStartTime}),a.velocities.push({position:u[e.isHorizontal()?"currentX":"currentY"],time:$t()})}function l(a){let{currentPos:u}=a;if(e.params.cssMode)return;const{params:c,wrapperEl:h,rtlTranslate:d,snapGrid:f,touchEventsData:p}=e,m=$t()-p.touchStartTime;if(u<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(u>-e.maxTranslate()){e.slides.length<f.length?e.slideTo(f.length-1):e.slideTo(e.slides.length-1);return}if(c.freeMode.momentum){if(p.velocities.length>1){const _=p.velocities.pop(),M=p.velocities.pop(),O=_.position-M.position,D=_.time-M.time;e.velocity=O/D,e.velocity/=2,Math.abs(e.velocity)<c.freeMode.minimumVelocity&&(e.velocity=0),(D>150||$t()-_.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=c.freeMode.momentumVelocityRatio,p.velocities.length=0;let v=1e3*c.freeMode.momentumRatio;const g=e.velocity*v;let y=e.translate+g;d&&(y=-y);let w=!1,E;const x=Math.abs(e.velocity)*20*c.freeMode.momentumBounceRatio;let S;if(y<e.maxTranslate())c.freeMode.momentumBounce?(y+e.maxTranslate()<-x&&(y=e.maxTranslate()-x),E=e.maxTranslate(),w=!0,p.allowMomentumBounce=!0):y=e.maxTranslate(),c.loop&&c.centeredSlides&&(S=!0);else if(y>e.minTranslate())c.freeMode.momentumBounce?(y-e.minTranslate()>x&&(y=e.minTranslate()+x),E=e.minTranslate(),w=!0,p.allowMomentumBounce=!0):y=e.minTranslate(),c.loop&&c.centeredSlides&&(S=!0);else if(c.freeMode.sticky){let _;for(let M=0;M<f.length;M+=1)if(f[M]>-y){_=M;break}Math.abs(f[_]-y)<Math.abs(f[_-1]-y)||e.swipeDirection==="next"?y=f[_]:y=f[_-1],y=-y}if(S&&r("transitionEnd",()=>{e.loopFix()}),e.velocity!==0){if(d?v=Math.abs((-y-e.translate)/e.velocity):v=Math.abs((y-e.translate)/e.velocity),c.freeMode.sticky){const _=Math.abs((d?-y:y)-e.translate),M=e.slidesSizesGrid[e.activeIndex];_<M?v=c.speed:_<2*M?v=c.speed*1.5:v=c.speed*2.5}}else if(c.freeMode.sticky){e.slideToClosest();return}c.freeMode.momentumBounce&&w?(e.updateProgress(E),e.setTransition(v),e.setTranslate(y),e.transitionStart(!0,e.swipeDirection),e.animating=!0,to(h,()=>{!e||e.destroyed||!p.allowMomentumBounce||(n("momentumBounce"),e.setTransition(c.speed),setTimeout(()=>{e.setTranslate(E),to(h,()=>{!e||e.destroyed||e.transitionEnd()})},0))})):e.velocity?(n("_freeModeNoMomentumRelease"),e.updateProgress(y),e.setTransition(v),e.setTranslate(y),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,to(h,()=>{!e||e.destroyed||e.transitionEnd()}))):e.updateProgress(y),e.updateActiveIndex(),e.updateSlidesClasses()}else if(c.freeMode.sticky){e.slideToClosest();return}else c.freeMode&&n("_freeModeNoMomentumRelease");(!c.freeMode.momentum||m>=c.longSwipesMs)&&(n("_freeModeStaticRelease"),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}Object.assign(e,{freeMode:{onTouchStart:s,onTouchMove:o,onTouchEnd:l}})}function Sz(i){let{swiper:e,extendParams:t,on:n}=i;t({grid:{rows:1,fill:"column"}});let r,s,o,l;const a=()=>{let b=e.params.spaceBetween;return typeof b=="string"&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*e.size:typeof b=="string"&&(b=parseFloat(b)),b},u=b=>{const{slidesPerView:m}=e.params,{rows:v,fill:g}=e.params.grid,y=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:b.length;o=Math.floor(y/v),Math.floor(y/v)===y/v?r=y:r=Math.ceil(y/v)*v,m!=="auto"&&g==="row"&&(r=Math.max(r,m*v)),s=r/v},c=()=>
616{e.slides&&e.slides.forEach(b=>{b.swiperSlideGridSet&&(b.style.height="",b.style[e.getDirectionLabel("margin-top")]="")})},h=(b,m,v)=>{const{slidesPerGroup:g}=e.params,y=a(),{rows:w,fill:E}=e.params.grid,x=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:v.length;let S,_,M;if(E==="row"&&g>1){const O=Math.floor(b/(g*w)),D=b-w*g*O,k=O===0?g:Math.min(Math.ceil((x-O*w*g)/w),g);M=Math.floor(D/k),_=D-M*k+O*g,S=_+M*r/w,m.style.order=S}else E==="column"?(_=Math.floor(b/w),M=b-_*w,(_>o||_===o&&M===w-1)&&(M+=1,M>=w&&(M=0,_+=1))):(M=Math.floor(b/s),_=b-M*s);m.row=M,m.column=_,m.style.height=`calc((100% - ${(w-1)*y}px) / ${w})`,m.style[e.getDirectionLabel("margin-top")]=M!==0?y&&`${y}px`:"",m.swiperSlideGridSet=!0},d=(b,m)=>{const{centeredSlides:v,roundLengths:g}=e.params,y=a(),{rows:w}=e.params.grid;if(e.virtualSize=(b+y)*r,e.virtualSize=Math.ceil(e.virtualSize/w)-y,e.params.cssMode||(e.wrapperEl.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),v){const E=[];for(let x=0;x<m.length;x+=1){let S=m[x];g&&(S=Math.floor(S)),m[x]<e.virtualSize+m[0]&&E.push(S)}m.splice(0,m.length),m.push(...E)}},f=()=>{l=e.params.grid&&e.params.grid.rows>1},p=()=>{const{params:b,el:m}=e,v=b.grid&&b.grid.rows>1;l&&!v?(m.classList.remove(`${b.containerModifierClass}grid`,`${b.containerModifierClass}grid-column`),o=1,e.emitContainerClasses()):!l&&v&&(m.classList.add(`${b.containerModifierClass}grid`),b.grid.fill==="column"&&m.classList.add(`${b.containerModifierClass}grid-column`),e.emitContainerClasses()),l=v};n("init",f),n("update",p),e.grid={initSlides:u,unsetSlides:c,updateSlide:h,updateWrapperSize:d}}function Cz(i){const e=this,{params:t,slidesEl:n}=e;t.loop&&e.loopDestroy();const r=s=>{if(typeof s=="string"){const o=document.createElement("div");o.innerHTML=s,n.append(o.children[0]),o.innerHTML=""}else n.append(s)};if(typeof i=="object"&&"length"in i)for(let s=0;s<i.length;s+=1)i[s]&&r(i[s]);else r(i);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update()}function kz(i){const e=this,{params:t,activeIndex:n,slidesEl:r}=e;t.loop&&e.loopDestroy();let s=n+1;const o=l=>{if(typeof l=="string"){const a=document.createElement("div");a.innerHTML=l,r.prepend(a.children[0]),a.innerHTML=""}else r.prepend(l)};if(typeof i=="object"&&"length"in i){for(let l=0;l<i.length;l+=1)i[l]&&o(i[l]);s=n+i.length}else o(i);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),e.slideTo(s,0,!1)}function _z(i,e){const t=this,{params:n,activeIndex:r,slidesEl:s}=t;let o=r;n.loop&&(o-=t.loopedSlides,t.loopDestroy(),t.recalcSlides());const l=t.slides.length;if(i<=0){t.prependSlide(e);return}if(i>=l){t.appendSlide(e);return}let a=o>i?o+1:o;const u=[];for(let c=l-1;c>=i;c-=1){const h=t.slides[c];h.remove(),u.unshift(h)}if(typeof e=="object"&&"length"in e){for(let c=0;c<e.length;c+=1)e[c]&&s.append(e[c]);a=o>i?o+e.length:o}else s.append(e);for(let c=0;c<u.length;c+=1)s.append(u[c]);t.recalcSlides(),n.loop&&t.loopCreate(),(!n.observer||t.isElement)&&t.update(),n.loop?t.slideTo(a+t.loopedSlides,0,!1):t.slideTo(a,0,!1)}function Az(i){const e=this,{params:t,activeIndex:n}=e;let r=n;t.loop&&(r-=e.loopedSlides,e.loopDestroy());let s=r,o;if(typeof i=="object"&&"length"in i){for(let l=0;l<i.length;l+=1)o=i[l],e.slides[o]&&e.slides[o].remove(),o<s&&(s-=1);s=Math.max(s,0)}else o=i,e.slides[o]&&e.slides[o].remove(),o<s&&(s-=1),s=Math.max(s,0);e.recalcSlides(),t.loop&&e.loopCreate(),(!t.observer||e.isElement)&&e.update(),t.loop?e.slideTo(s+e.loopedSlides,0,!1):e.slideTo(s,0,!1)}function Lz(){const i=this,e=[];for(let t=0;t<i.slides.length;t+=1)e.push(t);i.removeSlide(e)}function Mz(i){let{swiper:e}=i;Object.assign(e,{appendSlide:Cz.bind(e),prependSlide:kz.bind(e),addSlide:_z.bind(e),removeSlide:Az.bind(e),removeAllSlides:Lz.bind(e)})}function Ss(i){const{effect:e,swiper:t,on:n,setTranslate:r,setTransition:s,overwriteParams:o,perspective:l,recreateShadows:a,getEffectParams:u}=i;n("beforeInit",()=>{if(t.params.effect!==e)return;t.classNames.push(`${t.params.containerModifierClass}${e}`),l&&l()&&t.classNames.push(`${t.params.containerModifierClass}3d`);const h=o?o():{};Object.assign(t.params,h),Object.assign(t.originalParams,h)}),n("setTranslate",()=>{t.params.effect===e&&r()}),n("setTransition",(h,d)=>{t.params.effect===e&&s(d)}),n("transitionEnd",()=>{if(t.params.effect===e&&a){if(!u||!u().slideShadows)return;
616t.slides.forEach(h=>{h.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>d.remove())}),a()}});let c;n("virtualUpdate",()=>{t.params.effect===e&&(t.slides.length||(c=!0),requestAnimationFrame(()=>{c&&t.slides&&t.slides.length&&(r(),c=!1)}))})}function ua(i,e){const t=kr(e);return t!==e&&(t.style.backfaceVisibility="hidden",t.style["-webkit-backface-visibility"]="hidden"),t}function qc(i){let{swiper:e,duration:t,transformElements:n,allSlides:r}=i;const{activeIndex:s}=e,o=l=>l.parentElement?l.parentElement:e.slides.filter(u=>u.shadowRoot&&u.shadowRoot===l.parentNode)[0];if(e.params.virtualTranslate&&t!==0){let l=!1,a;r?a=n:a=n.filter(u=>{const c=u.classList.contains("swiper-slide-transform")?o(u):u;return e.getSlideIndex(c)===s}),a.forEach(u=>{to(u,()=>{if(l||!e||e.destroyed)return;l=!0,e.animating=!1;const c=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});e.wrapperEl.dispatchEvent(c)})})}}function Iz(i){let{swiper:e,extendParams:t,on:n}=i;t({fadeEffect:{crossFade:!1}}),Ss({effect:"fade",swiper:e,on:n,setTranslate:()=>{const{slides:o}=e,l=e.params.fadeEffect;for(let a=0;a<o.length;a+=1){const u=e.slides[a];let h=-u.swiperSlideOffset;e.params.virtualTranslate||(h-=e.translate);let d=0;e.isHorizontal()||(d=h,h=0);const f=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(u.progress),0):1+Math.min(Math.max(u.progress,-1),0),p=ua(l,u);p.style.opacity=f,p.style.transform=`translate3d(${h}px, ${d}px, 0px)`}},setTransition:o=>{const l=e.slides.map(a=>kr(a));l.forEach(a=>{a.style.transitionDuration=`${o}ms`}),qc({swiper:e,duration:o,transformElements:l,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function Oz(i){let{swiper:e,extendParams:t,on:n}=i;t({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const r=(a,u,c)=>{let h=c?a.querySelector(".swiper-slide-shadow-left"):a.querySelector(".swiper-slide-shadow-top"),d=c?a.querySelector(".swiper-slide-shadow-right"):a.querySelector(".swiper-slide-shadow-bottom");h||(h=Pt("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"left":"top"}`.split(" ")),a.append(h)),d||(d=Pt("div",`swiper-slide-shadow-cube swiper-slide-shadow-${c?"right":"bottom"}`.split(" ")),a.append(d)),h&&(h.style.opacity=Math.max(-u,0)),d&&(d.style.opacity=Math.max(u,0))};Ss({effect:"cube",swiper:e,on:n,setTranslate:()=>{const{el:a,wrapperEl:u,slides:c,width:h,height:d,rtlTranslate:f,size:p,browser:b}=e,m=e.params.cubeEffect,v=e.isHorizontal(),g=e.virtual&&e.params.virtual.enabled;let y=0,w;m.shadow&&(v?(w=e.wrapperEl.querySelector(".swiper-cube-shadow"),w||(w=Pt("div","swiper-cube-shadow"),e.wrapperEl.append(w)),w.style.height=`${h}px`):(w=a.querySelector(".swiper-cube-shadow"),w||(w=Pt("div","swiper-cube-shadow"),a.append(w))));for(let x=0;x<c.length;x+=1){const S=c[x];let _=x;g&&(_=parseInt(S.getAttribute("data-swiper-slide-index"),10));let M=_*90,O=Math.floor(M/360);f&&(M=-M,O=Math.floor(-M/360));const D=Math.max(Math.min(S.progress,1),-1);let k=0,A=0,C=0;_%4===0?(k=-O*4*p,C=0):(_-1)%4===0?(k=0,C=-O*4*p):(_-2)%4===0?(k=p+O*4*p,C=p):(_-3)%4===0&&(k=-p,C=3*p+p*4*O),f&&(k=-k),v||(A=k,k=0);const T=`rotateX(${v?0:-M}deg) rotateY(${v?M:0}deg) translate3d(${k}px, ${A}px, ${C}px)`;D<=1&&D>-1&&(y=_*90+D*90,f&&(y=-_*90-D*90),e.browser&&e.browser.need3dFix&&Math.abs(y)/90%2===1&&(y+=.001)),S.style.transform=T,m.slideShadows&&r(S,D,v)}if(u.style.transformOrigin=`50% 50% -${p/2}px`,u.style["-webkit-transform-origin"]=`50% 50% -${p/2}px`,m.shadow)if(v)w.style.transform=`translate3d(0px, ${h/2+m.shadowOffset}px, ${-h/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${m.shadowScale})`;else{const x=Math.abs(y)-Math.floor(Math.abs(y)/90)*90,S=1.5-(Math.sin(x*2*Math.PI/360)/2+Math.cos(x*2*Math.PI/360)/2),_=m.shadowScale,M=m.shadowScale/S,O=m.shadowOffset;w.style.transform=`scale3d(${_}, 1, ${M}) translate3d(0px, ${d/2+O}px, ${-d/2/M}px) rotateX(-89.99deg)`}const E=(b.isSafari||b.isWebView)&&b.needPerspectiveFix?-p/2:0;u.style.transform=`translate3d(0px,0,${E}px) rotateX(${e.isHorizontal()?0:y}deg) rotateY(${e.isHorizontal()?-y:0}deg)`,u.style.setProperty("--swiper-cube-translate-z",`${E}px`)},setTransition:a=>{const{el:u,slides:c}=e;if(c.forEach(h=>{h.style.transitionDuration=`${a}ms`,h.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(d=>{d.style.transitionDuration=`${a}ms`})}),e.params.cubeEffect.shadow&&!e.isHorizontal()){const h=u.querySelector(".swiper-cube-shadow");h&&(h.style.transitionDuration=`${a}ms`)}},recreateShadows:()=>{const a=e.isHorizontal();
616e.slides.forEach(u=>{const c=Math.max(Math.min(u.progress,1),-1);r(u,c,a)})},getEffectParams:()=>e.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}function ms(i,e,t){const n=`swiper-slide-shadow${t?`-${t}`:""}${i?` swiper-slide-shadow-${i}`:""}`,r=kr(e);let s=r.querySelector(`.${n.split(" ").join(".")}`);return s||(s=Pt("div",n.split(" ")),r.append(s)),s}function Dz(i){let{swiper:e,extendParams:t,on:n}=i;t({flipEffect:{slideShadows:!0,limitRotation:!0}});const r=(a,u)=>{let c=e.isHorizontal()?a.querySelector(".swiper-slide-shadow-left"):a.querySelector(".swiper-slide-shadow-top"),h=e.isHorizontal()?a.querySelector(".swiper-slide-shadow-right"):a.querySelector(".swiper-slide-shadow-bottom");c||(c=ms("flip",a,e.isHorizontal()?"left":"top")),h||(h=ms("flip",a,e.isHorizontal()?"right":"bottom")),c&&(c.style.opacity=Math.max(-u,0)),h&&(h.style.opacity=Math.max(u,0))};Ss({effect:"flip",swiper:e,on:n,setTranslate:()=>{const{slides:a,rtlTranslate:u}=e,c=e.params.flipEffect;for(let h=0;h<a.length;h+=1){const d=a[h];let f=d.progress;e.params.flipEffect.limitRotation&&(f=Math.max(Math.min(d.progress,1),-1));const p=d.swiperSlideOffset;let m=-180*f,v=0,g=e.params.cssMode?-p-e.translate:-p,y=0;e.isHorizontal()?u&&(m=-m):(y=g,g=0,v=-m,m=0),e.browser&&e.browser.need3dFix&&(Math.abs(m)/90%2===1&&(m+=.001),Math.abs(v)/90%2===1&&(v+=.001)),d.style.zIndex=-Math.abs(Math.round(f))+a.length,c.slideShadows&&r(d,f);const w=`translate3d(${g}px, ${y}px, 0px) rotateX(${v}deg) rotateY(${m}deg)`,E=ua(c,d);E.style.transform=w}},setTransition:a=>{const u=e.slides.map(c=>kr(c));u.forEach(c=>{c.style.transitionDuration=`${a}ms`,c.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(h=>{h.style.transitionDuration=`${a}ms`})}),qc({swiper:e,duration:a,transformElements:u})},recreateShadows:()=>{e.params.flipEffect,e.slides.forEach(a=>{let u=a.progress;e.params.flipEffect.limitRotation&&(u=Math.max(Math.min(a.progress,1),-1)),r(a,u)})},getEffectParams:()=>e.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}function Pz(i){let{swiper:e,extendParams:t,on:n}=i;t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}}),Ss({effect:"coverflow",swiper:e,on:n,setTranslate:()=>{const{width:o,height:l,slides:a,slidesSizesGrid:u}=e,c=e.params.coverflowEffect,h=e.isHorizontal(),d=e.translate,f=h?-d+o/2:-d+l/2,p=h?c.rotate:-c.rotate,b
616=c.depth;for(let m=0,v=a.length;m<v;m+=1){const g=a[m],y=u[m],w=g.swiperSlideOffset,E=(f-w-y/2)/y,x=typeof c.modifier=="function"?c.modifier(E):E*c.modifier;let S=h?p*x:0,_=h?0:p*x,M=-b*Math.abs(x),O=c.stretch;typeof O=="string"&&O.indexOf("%")!==-1&&(O=parseFloat(c.stretch)/100*y);let D=h?0:O*x,k=h?O*x:0,A=1-(1-c.scale)*Math.abs(x);Math.abs(k)<.001&&(k=0),Math.abs(D)<.001&&(D=0),Math.abs(M)<.001&&(M=0),Math.abs(S)<.001&&(S=0),Math.abs(_)<.001&&(_=0),Math.abs(A)<.001&&(A=0),e.browser&&e.browser.need3dFix&&(Math.abs(S)/90%2===1&&(S+=.001),Math.abs(_)/90%2===1&&(_+=.001));const C=`translate3d(${k}px,${D}px,${M}px) rotateX(${_}deg) rotateY(${S}deg) scale(${A})`,T=ua(c,g);if(T.style.transform=C,g.style.zIndex=-Math.abs(Math.round(x))+1,c.slideShadows){let L=h?g.querySelector(".swiper-slide-shadow-left"):g.querySelector(".swiper-slide-shadow-top"),I=h?g.querySelector(".swiper-slide-shadow-right"):g.querySelector(".swiper-slide-shadow-bottom");L||(L=ms("coverflow",g,h?"left":"top")),I||(I=ms("coverflow",g,h?"right":"bottom")),L&&(L.style.opacity=x>0?x:0),I&&(I.style.opacity=-x>0?-x:0)}}},setTransition:o=>{e.slides.map(a=>kr(a)).forEach(a=>{a.style.transitionDuration=`${o}ms`,a.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(u=>{u.style.transitionDuration=`${o}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}function Rz(i){let{swiper:e,extendParams:t,on:n}=i;t({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const r=l=>typeof l=="string"?l:`${l}px`;Ss({effect:"creative",swiper:e,on:n,setTranslate:()=>{const{slides:l,wrapperEl:a,slidesSizesGrid:u}=e,c=e.params.creativeEffect,{progressMultiplier:h}=c,d=e.params.centeredSlides;if(d){const f=u[0]/2-e.params.slidesOffsetBefore||0;a.style.transform=`translateX(calc(50% - ${f}px))`}for(let f=0;f<l.length;f+=1){const p=l[f],b=p.progress,m=Math.min(Math.max(p.progress,-c.limitProgress),c.limitProgress);let v=m;d||(v=Math.min(Math.max(p.originalProgress,-c.limitProgress),c.limitProgress));const g=p.swiperSlideOffset,y=[e.params.cssMode?-g-e.translate:-g,0,0],w=[0,0,0];let E=!1;e.isHorizontal()||(y[1]=y[0],y[0]=0);let x={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};m<0?(x=c.next,E=!0):m>0&&(x=c.prev,E=!0),y.forEach((A,C)=>{y[C]=`calc(${A}px + (${r(x.translate[C])} * ${Math.abs(m*h)}))`}),w.forEach((A,C)=>{let T=x.rotate[C]*Math.abs(m*h);e.browser&&e.browser.need3dFix&&Math.abs(T)/90%2===1&&(T+=.001),w[C]=T}),p.style.zIndex=-Math.abs(Math.round(b))+l.length;const S=y.join(", "),_=`rotateX(${w[0]}deg) rotateY(${w[1]}deg) rotateZ(${w[2]}deg)`,M=v<0?`scale(${1+(1-x.scale)*v*h})`:`scale(${1-(1-x.scale)*v*h})`,O=v<0?1+(1-x.opacity)*v*h:1-(1-x.opacity)*v*h,D=`translate3d(${S}) ${_} ${M}`;if(E&&x.shadow||!E){let A=p.querySelector(".swiper-slide-shadow");if(!A&&x.shadow&&(A=ms("creative",p)),A){const C=c.shadowPerProgress?m*(1/c.limitProgress):m;A.style.opacity=Math.min(Math.max(Math.abs(C),0),1)}}const k=ua(c,p);k.style.transform=D,k.style.opacity=O,x.origin&&(k.style.transformOrigin=x.origin)}},setTransition:l=>{const a=e.slides.map(u=>kr(u));a.forEach(u=>{u.style.transitionDuration=`${l}ms`,u.querySelectorAll(".swiper-slide-shadow").forEach(c=>{c.style.transitionDuration=`${l}ms`})}),qc({swiper:e,duration:l,transformElements:a,allSlides:!0})},perspective:()=>e.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!e.params.cssMode})})}function Nz(i){let{swiper:e,extendParams:t,on:n}=i;t({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}}),Ss({effect:"cards",swiper:e,on:n,setTranslate:()=>{const{slides:o,activeIndex:l,rtlTranslate:a}=e,u=e.params.cardsEffect,{startTranslate:c,isTouched:h}=e.touchEventsData,d=a?-e.translate:e.translate;for(let f=0;f<o.length;f+=1){const p=o[f],b=p.progress,m=Math.min(Math.max(b,-4),4);let v=p.swiperSlideOffset;e.params.centeredSlides&&!e.params.cssMode&&(e.wrapperEl.style.transform=`translateX(${e.minTranslate()}px)`),e.params.centeredSlides&&e.params.cssMode&&(v-=o[0].swiperSlideOffset);let g=e.params.cssMode?-v-e.translate:-v,y=0;const w=-100*Math.abs(m);let E=1,x=-u.perSlideRotate*m,S=u.perSlideOffset-Math.abs(m)*.75;const _=e.virtual&&e.params.virtual.enabled?e.virtual.from+f:f,M=(_===l||_===l-1)&&m>0&&m<1&&(h||e.params.cssMode)&&d<c,O=(_===l||_===l+1)&&m<0&&m>-1&&(h||e.params.cssMode)&&d>c;if(M||O){const C=(1-Math.abs((Math.abs(m)-.5)/.5))**.5;x+=-28*m*C,E+=-.5*C,S+=96*C,y=`${-25*C*Math.abs(m)}%`}if(m<0?g=`calc(${g}px ${a?"-":"+"} (${S*Math.abs(m)}%))`:m>0?g=`calc(${g}px ${a?"-":"+"} (-${S*Math.abs(m)}%))`:g=`${g}px`,!e.isHorizontal()){const C=y;y=g,g=C}const D=m<0?`${1+(1-E)*m}`:`${1-(1-E)*m}`,k=` 617 translate3d(${g}, ${y}, ${w}px) 618 rotateZ(${u.rotate?a?-x:x:0}deg) 619 scale(${D}) 620 `;if(u.slideShadows){let C=p.querySelector(".swiper-slide-shadow");
620C||(C=ms("cards",p)),C&&(C.style.opacity=Math.min(Math.max((Math.abs(m)-.5)/.5,0),1))}p.style.zIndex=-Math.abs(Math.round(b))+o.length;const A=ua(u,p);A.style.transform=k}},setTransition:o=>{const l=e.slides.map(a=>kr(a));l.forEach(a=>{a.style.transitionDuration=`${o}ms`,a.querySelectorAll(".swiper-slide-shadow").forEach(u=>{u.style.transitionDuration=`${o}ms`})}),qc({swiper:e,duration:o,transformElements:l})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!e.params.cssMode})})}const Bz=[uz,cz,dz,hz,fz,pz,mz,gz,bz,yz,vz,wz,xz,Ez,Tz,Sz,Mz,Iz,Oz,Dz,Pz,Rz,Nz];at.use(Bz);const EC=class extends U{connect(){this.swiper=new at(this.element,{...this.defaultOptions,...this.optionsValue})}disconnect(){this.swiper.destroy(),this.swiper=void 0}get defaultOptions(){return{}}};EC.values={options:Object};let Fz=EC;const Jf=class extends U{initialize(){this.update=this.update.bind(this)}connect(){this.update(),this.inputTarget.addEventListener("input",this.update)}disconnect(){this.inputTarget.removeEventListener("input",this.update)}update(){this.counterTarget.innerHTML=this.count.toString()}get count(){let e=this.inputTarget.value.length;return this.hasCountdownValue&&(this.maxLength<0&&console.error(`[stimulus-character-counter] You need to add a maxlength attribute on the input to use countdown mode. The current value is: ${this.maxLength}.`),e=Math.max(this.maxLength-e,0)),e}get maxLength(){return this.inputTarget.maxLength}};Jf.targets=["input","counter"],Jf.values={countdown:Boolean};let zz=Jf;const TC=class extends U{initialize(){this.hide=this.hide.bind(this)}connect(){lE(this),this.hiddenValue===!1&&this.show()}show(){this.enter(),this.timeout=setTimeout(this.hide,this.delayValue)}async hide(){this.timeout&&clearTimeout(this.timeout),await this.leave(),this.element.remove()}};TC.values={delay:{type:Number,default:3e3},hidden:{type:Boolean,default:!1}};let Vz=TC;const SC=class extends U{connect(){if(!this.hasUrlValue){console.error("[stimulus-content-loader] You need to pass an url to fetch the remote content.");return}this.hasLazyLoadingValue?this.lazyLoad():this.load()}disconnect(){this.stopRefreshing()}load(){this.fetch(),this.hasRefreshIntervalValue&&this.startRefreshing()}lazyLoad(){const e={threshold:this.lazyLoadingThresholdValue,rootMargin:this.lazyLoadingRootMarginValue};new IntersectionObserver((t,n)=>{t.forEach(r=>{r.isIntersecting&&(this.load(),n.unobserve(r.target))})},e).observe(this.element)}fetch(){fetch(this.urlValue).then(e=>{if(!e.ok)throw new Error(e.statusText);return e.text()}).then(e=>{this.element.innerHTML=e,this.loadScriptsValue&&this.loadScripts(),this.dispatch("success")}).catch(e=>{this.dispatch("error",{detail:{error:e}})})}startRefreshing(){this.refreshTimer=setInterval(()=>{this.fetch()},this.refreshIntervalValue)}stopRefreshing(){this.refreshTimer&&clearInterval(this.refreshTimer)}loadScripts(){this.element.querySelectorAll("script").forEach(e=>{const t=document.createElement("script");t.innerHTML=e.innerHTML,document.head.appendChild(t).parentNode.removeChild(t)})}};SC.values={url:String,lazyLoading:Boolean,lazyLoadingThreshold:Number,lazyLoadingRootMargin:{type:String,default:"0px"},refreshInterval:Number,loadScripts:Boolean};let Hz=SC;/*! 621 * lightgallery | 2.7.2 | September 20th 2023 622 * http://www.lightgalleryjs.com/ 623 * Copyright (c) 2020 Sachin Neravath; 624 * @license GPLv3 625 *//*! ***************************************************************************** 626Copyright (c) Microsoft Corporation. 627 628Permission to use, copy, modify, and/or distribute this software for any 629purpose with or without fee is hereby granted. 630 631THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 632REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 633AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 634INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 635LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 636OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 637PERFORMANCE OF THIS SOFTWARE. 638***************************************************************************** */var hi=function(){return hi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},hi.apply(this,arguments)};function jz(){for(var i=0,e=0,t=arguments.length;e<t;e++)i+=arguments[e].length;for(var n=Array(i),r=0,e=0;e<t;e++)for(var s=arguments[e],o=0,l=s.length;o<l;o++,r++)n[r]=s[o];return n}var _e={afterAppendSlide:"lgAfterAppendSlide",init:"lgInit",hasVideo:"lgHasVideo",containerResize:"lgContainerResize",updateSlides:"lgUpdateSlides",afterAppendSubHtml:"lgAfterAppendSubHtml",beforeOpen:"lgBeforeOpen",afterOpen:"lgAfterOpen",slideItemLoad:"lgSlideItemLoad",beforeSlide:"lgBeforeSlide",afterSlide:"lgAfterSlide",posterClick:"lgPosterClick",dragStart:"lgDragStart",dragMove:"lgDragMove",dragEnd:"lgDragEnd",beforeNextSlide:"lgBeforeNextSlide",beforePrevSlide:"lgBeforePrevSlide",beforeClose:"lgBeforeClose",afterClose:"lgAfterClose",rotateLeft:"lgRotateLeft",rotateRight:"lgRotateRight",flipHorizontal:"lgFlipHorizontal",flipVertical:"lgFlipVertical",autoplay:"lgAutoplay",auto
vendor: 10,094 bytes, lines 638-642
638playStart:"lgAutoplayStart",autoplayStop:"lgAutoplayStop"},$z={mode:"lg-slide",easing:"ease",speed:400,licenseKey:"0000-0000-000-0000",height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:300,container:"",startAnimationDuration:400,zoomFromOrigin:!0,hideBarsDelay:0,showBarsAfter:1e4,slideDelay:0,supportLegacyBrowser:!0,allowMediaOverlap:!1,videoMaxSize:"1280-720",loadYouTubePoster:!0,defaultCaptionHeight:0,ariaLabelledby:"",ariaDescribedby:"",resetScrollPosition:!0,hideScrollbar:!1,closable:!0,swipeToClose:!0,closeOnTap:!0,showCloseIcon:!0,showMaximizeIcon:!1,loop:!0,escKey:!0,keyPress:!0,trapFocus:!0,controls:!0,slideEndAnimation:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:2,numberOfSlideItemsInDom:10,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:0,iframeWidth:"100%",iframeHeight:"100%",iframeMaxWidth:"100%",iframeMaxHeight:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],extraProps:[],exThumbImage:"",isMobile:void 0,mobileSettings:{controls:!1,showCloseIcon:!1,download:!1},plugins:[],strings:{closeGallery:"Close gallery",toggleMaximize:"Toggle maximize",previousSlide:"Previous slide",nextSlide:"Next slide",download:"Download",playVideo:"Play video",mediaLoadingFailed:"Oops... Failed to load content..."}};function qz(){(function(){if(typeof window.CustomEvent=="function")return!1;function i(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}window.CustomEvent=i})(),function(){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector)}()}var CC=function(){function i(e){return this.cssVenderPrefixes=["TransitionDuration","TransitionTimingFunction","Transform","Transition"],this.selector=this._getSelector(e),this.firstElement=this._getFirstEl(),this}return i.generateUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)})},i.prototype._getSelector=function(e,t){if(t===void 0&&(t=document),typeof e!="string")return e;t=t||document;var n=e.substring(0,1);return n==="#"?t.querySelector(e):t.querySelectorAll(e)},i.prototype._each=function(e){return this.selector?(this.selector.length!==void 0?[].forEach.call(this.selector,e):e(this.selector,0),this):this},i.prototype._setCssVendorPrefix=function(e,t,n){var r=t.replace(/-([a-z])/gi,function(s,o){return o.toUpperCase()});this.cssVenderPrefixes.indexOf(r)!==-1?(e.style[r.charAt(0).toLowerCase()+r.slice(1)]=n,e.style["webkit"+r]=n,e.style["moz"+r]=n,e.style["ms"+r]=n,e.style["o"+r]=n):e.style[r]=n},i.prototype._getFirstEl=function(){return this.selector&&this.selector.length!==void 0?this.selector[0]:this.selector},i.prototype.isEventMatched=function(e,t){var n=t.split(".");return e.split(".").filter(function(r){return r}).every(function(r){return n.indexOf(r)!==-1})},i.prototype.attr=function(e,t){return t===void 0?this.firstElement?this.firstElement.getAttribute(e):"":(this._each(function(n){n.setAttribute(e,t)}),this)},i.prototype.find=function(e){return re(this._getSelector(e,this.selector))},i.prototype.first=function(){return this.selector&&this.selector.length!==void 0?re(this.selector[0]):re(this.selector)},i.prototype.eq=function(e){return re(this.selector[e])},i.prototype.parent=function(){return re(this.selector.parentElement)},i.prototype.get=function(){return this._getFirstEl()},i.prototype.removeAttr=function(e){var t=e.split(" ");return this._each(function(n){t.forEach(function(r){return n.removeAttribute(r)})}),this},i.prototype.wrap=function(e){if(!this.firstElement)return this;var t=document.createElement("div");return t.className=e,this.firstElement.parentNode.insertBefore(t,this.firstElement),this.firstElement.parentNode.removeChild(this.firstElement),t.appendChild(this.firstElement),this},i.prototype.addClass=function(e){return e===void 0&&(e=""),this._each(function(t){e.split(" ").forEach(function(n){n&&t.classList.add(n)})}),this},i.prototype.removeClass=function(e){return this._each(function(t){e.split(" ").forEach(function(n){n&&t.classList.remove(n)})}),this},i.prototype.hasClass=function(e){return this.firstElement?this.firstElement.classList.contains(e):!1},i.prototype.hasAttribute=function(e){return this.firstElement?this.firstElement.hasAttribute(e):!1},i.prototype.toggleClass=function(e){return this.firstElement?(this.hasClass(e)?this.removeClass(e):this.addClass(e),this):this},i.prototype.css=function(e,t){var n=this;return this._each(function(r){n._setCssVendorPrefix(r,e,t)}),this},i.prototype.on=function(e,t){var n=this;return this.selector?(e.split(" ").forEach(function(r){Array.isArray(i.eventListeners[r])||(i.eventListeners[r]=[]),i.eventListeners[r].push(t),n.selector.addEventListener(r.split(".")[0],t)}),this):this},i.prototype.once=function(e,t){var n=this;return this.on(e,function(){n.off(e),t(e)}),this},i.prototype.off=function(e){var t=this;return this.selector?(Object.keys(i.eventListeners).forEach(function(n){t.isEventMatched(e,n)&&(i.eventListeners[n].forEach(function(r){t.selector.removeEventListener(n.split(".")[0],r)}),i.eventListeners[n]=[])}),this):this},i.prototype.trigger=function(e,t){if(!this.firstElement)return this;var n=new CustomEvent(e.split(".")[0],{detail:t||null});return this.firstElement.dispatchEvent(n),this},i.prototype.load=function(e){var t=this;return fetch(e).then(function(n){return n.text()}).then(function(n){t.selector.innerHTML=n}),this},i.prototype.html=function(e){return e===void 0?this.firstElement?this.firstElement.innerHTML:"":(this._each(function(t){t.innerHTML=e}),this)},i.prototype.append=function(e){return this._each(function(t){typeof e=="string"?t.insertAdjacentHTML("beforeend",e):t.appendChild(e)}),this},i.prototype.prepend=function(e){return this._each(function(t){t.insertAdjacentHTML("afterbegin",e)}),this},i.prototype.remove=function(){return this._each(function(e){e.parentNode.removeChild(e)}),this},i.prototype.empty=function(){return this._each(function(e){e.innerHTML=""}),this},i.prototype.scrollTop=function(e){return e!==void 0?(document.body.scrollTop=e,document.documentElement.scrollTop=e,this):window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},i.prototype.scrollLeft=function(e){return e!==void 0?(document.body.scrollLeft=e,document.documentElement.scrollLeft=e,this):window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},i.prototype.offset=function(){if(!this.firstElement)return{left:0,top:0};var e=this.firstElement.getBoundingClientRect(),t=re("body").style().marginLeft;return{left:e.left-parseFloat(t)+this.scrollLeft(),top:e.top+this.scrollTop()}},i.prototype.style=function(){return this.firstElement?this.firstElement.currentStyle||window.getComputedStyle(this.firstElement):{}},i.prototype.width=function(){var e=this.style();return this.firstElement.clientWidth-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)},i.prototype.height=function(){var e=this.style();return this.firstElement.clientHeight-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)},i.eventListeners={},i}();function re(i){return qz(),new CC(i)}var Uz=["src","sources","subHtml","subHtmlUrl","html","video","poster","slideName","responsive","srcset","sizes","iframe","downloadUrl","download","width","facebookShareUrl","tweetText","iframeTitle","twitterShareUrl","pinterestShareUrl","pinterestText","fbHtml","disqusIdentifier","disqusUrl"];function Wz(i){return i==="href"?"src":(i=i.replace("data-",""),i=i.charAt(0).toLowerCase()+i.slice(1),i=i.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()}),i)}var Je={getSize:function(i,e,t,n){t===void 0&&(t=0);var r=re(i),s=r.attr("data-lg-size")||n;if(s){var o=s.split(",");if(o[1])for(var l=window.innerWidth,a=0;a<o.length;a++){var u=o[a],c=parseInt(u.split("-")[2],10);if(c>l){s=u;break}a===o.length-1&&(s=u)}var h=s.split("-"),d=parseInt(h[0],10),f=parseInt(h[1],10),p=e.width(),b=e.height()-t,m=Math.min(p,d),v=Math.min(b,f),g=Math.min(m/d,v/f);return{width:d*g,height:f*g}}},getTransform:function(i,e,t,n,r){if(r){var s=re(i).find("img").first();if(s.get()){var o=e.get().getBoundingClientRect(),l=o.width,a=e.height()-(t+n),u=s.width(),c=s.height(),h=s.style(),d=(l-u)/2-s.offset().left+(parseFloat(h.paddingLeft)||0)+(parseFloat(h.borderLeft)||0)+re(window).scrollLeft()+o.left,f=(a-c)/2-s.offset().top+(parseFloat(h.paddingTop)||0)+(parseFloat(h.borderTop)||0)+re(window).scrollTop()+t,p=u/r.width,b=c/r.height,m="translate3d("+(d*=-1)+"px, "+(f*=-1)+"px, 0) scale3d("+p+", "+b+", 1)";return m}}},getIframeMarkup:function(i,e,t,n,r,s){var o=s?'title="'+s+'"':"";return'<div class="lg-video-cont lg-has-iframe" style="width:'+i+"; max-width:"+t+"; height: "+e+"; max-height:"+n+`"> 639 <iframe class="lg-object" frameborder="0" `+o+' src="'+r+`" allowfullscreen="true"></iframe> 640 </div>`},getImgMarkup:function(i,e,t,n,r,s){var o=n?'srcset="'+n+'"':"",l=r?'sizes="'+r+'"':"",a="<img "+t+" "+o+" "+l+' class="lg-object lg-image" data-index="'+i+'" src="'+e+'" />',u="";if(s){var c=typeof s=="string"?JSON.parse(s):s;u=c.map(function(h){var d="";return Object.keys(h).forEach(function(f){d+=" "+f+'="'+h[f]+'"'}),"<source "+d+"></source>"})}return""+u+a},getResponsiveSrc:function(i){for(var e=[],t=[],n="",r=0;r<i.length;r++){var s=i[r].split(" ");s[0]===""&&s.splice(0,1),t.push(s[0]),e.push(s[1])}for(var o=window.innerWidth,l=0;l<e.length;l++)if(parseInt(e[l],10)>o){n=t[l];break}return n},isImageLoaded:function(i){return!(!i||!i.complete||i.naturalWidth===0)},getVideoPosterMarkup:function(i,e,t,n,r){var s="";return r&&r.youtube?s="lg-has-youtube":r&&r.vimeo?s="lg-has-vimeo":s="lg-has-html5",'<div class="lg-video-cont '+s+'" style="'+t+`"> 641 <div class="lg-video-play-button"> 642 <svg
643 viewBox="0 0 20 20" 644 preserveAspectRatio="xMidYMid" 645 focusable="false" 646 aria-labelledby="`+n+`" 647 role="img" 648 class="lg-video-play-icon" 649 > 650 <title>`+n+`</title> 651 <polygon class="lg-video-play-icon-inner" points="1,0 20,10 1,20"></polygon> 652 </svg> 653 <svg class="lg-video-play-icon-bg" viewBox="0 0 50 50" focusable="false"> 654 <circle cx="50%" cy="50%" r="20"></circle></svg> 655 <svg class="lg-video-play-icon-circle" viewBox="0 0 50 50" focusable="false"> 656 <circle cx="50%" cy="50%" r="20"></circle> 657 </svg> 658 </div> 659 `+(e||"")+` 660 <img class="lg-object lg-video-poster" src="`+i+`" /> 661 </div>`},getFocusableElements:function(i){var e=i.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'),t=[].filter.call(e,function(n){var r=window.getComputedStyle(n);return r.display!=="none"&&r.visibility!=="hidden"});return t},getDynamicOptions:function(i,e,t,n){var r=[],s=jz(Uz,e);return[].forEach.call(i,function(o){for(var l={},a=0;a<o.attributes.length;a++){var u=o.attributes[a];if(u.specified){var c=Wz(u.name),h="";s.indexOf(c)>-1&&(h=c),h&&(l[h]=u.value)}}var d=re(o),f=d.find("img").first().attr("alt"),p=d.attr("title"),b=n?d.attr(n):d.find("img").first().attr("src");l.thumb=b,t&&!l.subHtml&&(l.subHtml=p||f||""),l.alt=f||p||"",r.push(l)}),r},isMobile:function(){return/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)},isVideo:function(i,e,t){if(!i){if(e)return{html5:!0};console.error("lightGallery :- data-src is not provided on slide item "+(t+1)+". Please make sure the selector property is properly configured. More info - https://www.lightgalleryjs.com/demos/html-markup/");return}var n=i.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)([\&|?][\S]*)*/i),r=i.match(/\/\/(?:www\.)?(?:player\.)?vimeo.com\/(?:video\/)?([0-9a-z\-_]+)(.*)?/i),s=i.match(/https?:\/\/(.+)?(wistia\.com|wi\.st)\/(medias|embed)\/([0-9a-z\-_]+)(.*)/);if(n)return{youtube:n};if(r)return{vimeo:r};if(s)return{wistia:s}}},iv=0,Gz=function(){function i(e,t){if(this.lgOpened=!1,this.index=0,this.plugins=[],this.lGalleryOn=!1,this.lgBusy=!1,this.currentItemsInDom=[],this.prevScrollTop=0,this.bodyPaddingRight=0,this.isDummyImageRemoved=!1,this.dragOrSwipeEnabled=!1,this.mediaContainerPosition={top:0,bottom:0},!e)return this;if(iv++,this.lgId=iv,this.el=e,this.LGel=re(e),this.generateSettings(t),this.buildModules(),this.settings.dynamic&&this.settings.dynamicEl!==void 0&&!Array.isArray(this.settings.dynamicEl))throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.galleryItems=this.getItems(),this.normalizeSettings(),this.init(),this.validateLicense(),this}return i.prototype.generateSettings=function(e){if(this.settings=hi(hi({},$z),e),this.settings.isMobile&&typeof this.settings.isMobile=="function"?this.settings.isMobile():Je.isMobile()){var t=hi(hi({},this.settings.mobileSettings),this.settings.mobileSettings);this.settings=hi(hi({},this.settings),t)}},i.prototype.normalizeSettings=function(){this.settings.slideEndAnimation&&(this.settings.hideControlOnEnd=!1),this.settings.closable||(this.settings.swipeToClose=!1),this.zoomFromOrigin=this.settings.zoomFromOrigin,this.settings.dynamic&&(this.zoomFromOrigin=!1),this.settings.container||(this.settings.container=document.body),this.settings.preload=Math.min(this.settings.preload,this.galleryItems.length)},i.prototype.init=function(){var e=this;this.addSlideVideoInfo(this.galleryItems),this.buildStructure(),this.LGel.trigger(_e.init,{instance:this}),this.settings.keyPress&&this.keyPress(),setTimeout(function(){e.enableDrag(),e.enableSwipe(),e.triggerPosterClick()},50),this.arrow(),this.settings.mousewheel&&this.mousewheel(),this.settings.dynamic||this.openGalleryOnItemClick()},i.prototype.openGalleryOnItemClick=function(){for(var e=this,t=function(s){var o=n.items[s],l=re(o),a=CC.generateUUID();l.attr("data-lg-id",a).on("click.lgcustom-item-"+a,function(u){u.preventDefault();var c=e.settings.index||s;e.openGallery(c,o)})},n=this,r=0;r<this.items.length;r++)t(r)},i.prototype.buildModules=function(){var e=this;this.settings.plugins.forEach(function(t){e.plugins.push(new t(e,re))})},i.prototype.validateLicense=function(){this.settings.licenseKey?this.settings.licenseKey==="0000-0000-000-0000"&&console.warn("lightGallery: "+this.settings.licenseKey+" license key is not val
661id for production use"):console.error("Please provide a valid license key")},i.prototype.getSlideItem=function(e){return re(this.getSlideItemId(e))},i.prototype.getSlideItemId=function(e){return"#lg-item-"+this.lgId+"-"+e},i.prototype.getIdName=function(e){return e+"-"+this.lgId},i.prototype.getElementById=function(e){return re("#"+this.getIdName(e))},i.prototype.manageSingleSlideClassName=function(){this.galleryItems.length<2?this.outer.addClass("lg-single-item"):this.outer.removeClass("lg-single-item")},i.prototype.buildStructure=function(){var e=this,t=this.$container&&this.$container.get();if(!t){var n="",r="";this.settings.controls&&(n='<button type="button" id="'+this.getIdName("lg-prev")+'" aria-label="'+this.settings.strings.previousSlide+'" class="lg-prev lg-icon"> '+this.settings.prevHtml+` </button> 662 <button type="button" id="`+this.getIdName("lg-next")+'" aria-label="'+this.settings.strings.nextSlide+'" class="lg-next lg-icon"> '+this.settings.nextHtml+" </button>"),this.settings.appendSubHtmlTo!==".lg-item"&&(r='<div class="lg-sub-html" role="status" aria-live="polite"></div>');var s="";this.settings.allowMediaOverlap&&(s+="lg-media-overlap ");var o=this.settings.ariaLabelledby?'aria-labelledby="'+this.settings.ariaLabelledby+'"':"",l=this.settings.ariaDescribedby?'aria-describedby="'+this.settings.ariaDescribedby+'"':"",a="lg-container "+this.settings.addClass+" "+(document.body!==this.settings.container?"lg-inline":""),u=this.settings.closable&&this.settings.showCloseIcon?'<button type="button" aria-label="'+this.settings.strings.closeGallery+'" id="'+this.getIdName("lg-close")+'" class="lg-close lg-icon"></button>':"",c=this.settings.showMaximizeIcon?'<button type="button" aria-label="'+this.settings.strings.toggleMaximize+'" id="'+this.getIdName("lg-maximize")+'" class="lg-maximize lg-icon"></button>':"",h=` 663 <div class="`+a+'" id="'+this.getIdName("lg-container")+'" tabindex="-1" aria-modal="true" '+o+" "+l+` role="dialog" 664 > 665 <div id="`+this.getIdName("lg-backdrop")+`" class="lg-backdrop"></div> 666 667 <div id="`+this.getIdName("lg-outer")+'" class="lg-outer lg-use-css3 lg-css3 lg-hide-items '+s+` "> 668 669 <div id="`+this.getIdName("lg-content")+`" class="lg-content"> 670 <div id="`+this.getIdName("lg-inner")+`" class="lg-inner"> 671 </div> 672 `+n+` 673 </div> 674 <div id="`+this.getIdName("lg-toolbar")+`" class="lg-toolbar lg-group"> 675 `+c+` 676 `+u+` 677 </div> 678 `+(this.settings.appendSubHtmlTo===".lg-outer"?r:"")+` 679 <div id="`+this.getIdName("lg-components")+`" class="lg-components"> 680 `+(this.settings.appendSubHtmlTo===".lg-sub-html"?r:"")+` 681 </div> 682 </div> 683 </div> 684 `;re(this.settings.container).append(h),document.body!==this.settings.container&&re(this.settings.container).css("position","relative"),this.outer=this.getElementById("lg-outer"),this.$lgComponents=this.getElementById("lg-components"),this.$backdrop=this.getElementById("lg-backdrop"),this.$container=this.getElementById("lg-container"),this.$inner=this.getElementById("lg-inner"),this.$content=this.getElementById("lg-content"),this.$toolbar=this.getElementById("lg-toolbar"),this.$backdrop.css("transition-duration",this.settings.backdropDuration+"ms");var d=this.settings.mode+" ";this.manageSingleSlideClassName(),this.settings.enableDrag&&(d+="lg-grab "),this.outer.addClass(d),this.$inner.css("transition-timing-function",this.settings.easing),this.$inner.css("transition-duration",this.settings.speed+"ms"),this.settings.download&&this.$toolbar.append('<a id="'+this.getIdName("lg-download")+'" target="_blank" rel="noopener" aria-label="'+this.settings.strings.download+'" download class="lg-download lg-icon"></a>'),this.counter(),re(window).on("resize.lg.global"+this.lgId+" orientationchange.lg.global"+this.lgId,function(){e.refreshOnResize()}),this.hideBars(),this.manageCloseGallery(),this.toggleMaximize(),this.initModules()}},i.prototype.refreshOnResize=function(){if(this.lgOpened){var e=this.galleryItems[this.index],t=e.__slideVideoInfo;this.mediaContainerPosition=this.getMediaContainerPosition();var n=this.mediaContainerPosition,r=n.top,s=n.bottom;if(this.currentImageSize=Je.getSize(this.items[this.index],this.outer,r+s,t&&this.settings.videoMaxSize),t&&this.resizeVideoSlide(this.index,this.currentImageSize),this.zoomFromOrigin&&!this.isDummyImageRemoved){var o=this.getDummyImgStyles(this.currentImageSize);this.outer.find(".lg-current .lg-dummy-img").first().attr("style",o)}this.LGel.trigger(_e.containerResize)}},i.prototype.resizeVideoSlide=function(e,t){var n=this.getVideoContStyle(t),r=this.getSlideItem(e);r.find(".lg-video-cont").attr("style",n)},i.prototype.updateSlides=function(e,t){if(this.index>e.length-1&&(this.index=e.length-1),e.length===1&&(this.index=0),!e.length){this.closeGallery();return}var n=this.galleryItems[t].src;this.galleryItems=e,this.updateControls(),this.$inner.empty(),this.currentItemsInDom=[];var r=0;this.galleryItems.some(function(s,o){return s.src===n?(r=o,!0):!1}),this.currentItemsInDom=this.organizeSlideItems(r,-1),this.loadContent(r,!0),this.get
vendor: 4,703 bytes, line 684
684SlideItem(r).addClass("lg-current"),this.index=r,this.updateCurrentCounter(r),this.LGel.trigger(_e.updateSlides)},i.prototype.getItems=function(){if(this.items=[],this.settings.dynamic)return this.settings.dynamicEl||[];if(this.settings.selector==="this")this.items.push(this.el);else if(this.settings.selector)if(typeof this.settings.selector=="string")if(this.settings.selectWithin){var e=re(this.settings.selectWithin);this.items=e.find(this.settings.selector).get()}else this.items=this.el.querySelectorAll(this.settings.selector);else this.items=this.settings.selector;else this.items=this.el.children;return Je.getDynamicOptions(this.items,this.settings.extraProps,this.settings.getCaptionFromTitleOrAlt,this.settings.exThumbImage)},i.prototype.shouldHideScrollbar=function(){return this.settings.hideScrollbar&&document.body===this.settings.container},i.prototype.hideScrollbar=function(){if(this.shouldHideScrollbar()){this.bodyPaddingRight=parseFloat(re("body").style().paddingRight);var e=document.documentElement.getBoundingClientRect(),t=window.innerWidth-e.width;re(document.body).css("padding-right",t+this.bodyPaddingRight+"px"),re(document.body).addClass("lg-overlay-open")}},i.prototype.resetScrollBar=function(){this.shouldHideScrollbar()&&(re(document.body).css("padding-right",this.bodyPaddingRight+"px"),re(document.body).removeClass("lg-overlay-open"))},i.prototype.openGallery=function(e,t){var n=this;if(e===void 0&&(e=this.settings.index),!this.lgOpened){this.lgOpened=!0,this.outer.removeClass("lg-hide-items"),this.hideScrollbar(),this.$container.addClass("lg-show");var r=this.getItemsToBeInsertedToDom(e,e);this.currentItemsInDom=r;var s="";r.forEach(function(d){s=s+('<div id="'+d+'" class="lg-item"></div>')}),this.$inner.append(s),this.addHtml(e);var o="";this.mediaContainerPosition=this.getMediaContainerPosition();var l=this.mediaContainerPosition,a=l.top,u=l.bottom;this.settings.allowMediaOverlap||this.setMediaContainerPosition(a,u);var c=this.galleryItems[e].__slideVideoInfo;this.zoomFromOrigin&&t&&(this.currentImageSize=Je.getSize(t,this.outer,a+u,c&&this.settings.videoMaxSize),o=Je.getTransform(t,this.outer,a,u,this.currentImageSize)),(!this.zoomFromOrigin||!o)&&(this.outer.addClass(this.settings.startClass),this.getSlideItem(e).removeClass("lg-complete"));var h=this.settings.zoomFromOrigin?100:this.settings.backdropDuration;setTimeout(function(){n.outer.addClass("lg-components-open")},h),this.index=e,this.LGel.trigger(_e.beforeOpen),this.getSlideItem(e).addClass("lg-current"),this.lGalleryOn=!1,this.prevScrollTop=re(window).scrollTop(),setTimeout(function(){if(n.zoomFromOrigin&&o){var d=n.getSlideItem(e);d.css("transform",o),setTimeout(function(){d.addClass("lg-start-progress lg-start-end-progress").css("transition-duration",n.settings.startAnimationDuration+"ms"),n.outer.addClass("lg-zoom-from-image")}),setTimeout(function(){d.css("transform","translate3d(0, 0, 0)")},100)}setTimeout(function(){n.$backdrop.addClass("in"),n.$container.addClass("lg-show-in")},10),setTimeout(function(){n.settings.trapFocus&&document.body===n.settings.container&&n.trapFocus()},n.settings.backdropDuration+50),(!n.zoomFromOrigin||!o)&&setTimeout(function(){n.outer.addClass("lg-visible")},n.settings.backdropDuration),n.slide(e,!1,!1,!1),n.LGel.trigger(_e.afterOpen)}),document.body===this.settings.container&&re("html").addClass("lg-on")}},i.prototype.getMediaContainerPosition=function(){if(this.settings.allowMediaOverlap)return{top:0,bottom:0};var e=this.$toolbar.get().clientHeight||0,t=this.outer.find(".lg-components .lg-sub-html").get(),n=this.settings.defaultCaptionHeight||t&&t.clientHeight||0,r=this.outer.find(".lg-thumb-outer").get(),s=r?r.clientHeight:0,o=s+n;return{top:e,bottom:o}},i.prototype.setMediaContainerPosition=function(e,t){e===void 0&&(e=0),t===void 0&&(t=0),this.$content.css("top",e+"px").css("bottom",t+"px")},i.prototype.hideBars=function(){var e=this;setTimeout(function(){e.outer.removeClass("lg-hide-items"),e.settings.hideBarsDelay>0&&(e.outer.on("mousemove.lg click.lg touchstart.lg",function(){e.outer.removeClass("lg-hide-items"),clearTimeout(e.hideBarTimeout),e.hideBarTimeout=setTimeout(function(){e.outer.addClass("lg-hide-items")},e.settings.hideBarsDelay)}),e.outer.trigger("mousemove.lg"))},this.settings.showBarsAfter)},i.prototype.initPictureFill=function(e){if(this.settings.supportLegacyBrowser)try{picturefill({elements:[e.get()]})}catch{console.warn("lightGallery :- If you want srcset or picture tag to be supported for older browser please include picturefil javascript library in your document.")}},i.prototype.counter=function(){if(this.settings.counter){var e=`<div class="lg-counter" role="status" aria-l
684ive="polite"> 685 <span id="`+this.getIdName("lg-counter-current")+'" class="lg-counter-current">'+(this.index+1)+` </span> / 686 <span id="`+this.getIdName("lg-counter-all")+'" class="lg-counter-all">'+this.galleryItems.length+" </span></div>";this.outer.find(this.settings.appendCounterTo).append(e)}},i.prototype.addHtml=function(e){var t,n;if(this.galleryItems[e].subHtmlUrl?n=this.galleryItems[e].subHtmlUrl:t=this.galleryItems[e].subHtml,!n)if(t){var r=t.substring(0,1);(r==="."||r==="#")&&(this.settings.subHtmlSelectorRelative&&!this.settings.dynamic?t=re(this.items).eq(e).find(t).first().html():t=re(t).first().html())}else t="";if(this.settings.appendSubHtmlTo!==".lg-item")n?this.outer.find(".lg-sub-html").load(n):this.outer.find(".lg-sub-html").html(t);else{var s=re(this.getSlideItemId(e));n?s.load(n):s.append('<div class="lg-sub-html">'+t+"</div>")}typeof t<"u"&&t!==null&&(t===""?this.outer.find(this.settings.appendSubHtmlTo).addClass("lg-empty-html"):this.outer.find(this.settings.appendSubHtmlTo).removeClass("lg-empty-html")),this.LGel.trigger(_e.afterAppendSubHtml,{index:e})},i.prototype.preload=function(e){for(var t=1;t<=this.settings.preload&&!(t>=this.galleryItems.length-e);t++)this.loadContent(e+t,!1);for(var n=1;n<=this.settings.preload&&!(e-n<0);n++)this.loadContent(e-n,!1)},i.prototype.getDummyImgStyles=function(e){return e?"width:"+e.width+`px; 687 margin-left: -`+e.width/2+`px; 688 margin-top: -`+e.height/2+`px; 689 height:`+e.height+"px":""},i.prototype.getVideoContStyle=function(e){return e?"width:"+e.width+`px; 690 height:`+e.height+"px":""},i.prototype.getDummyImageContent=function(e,t,n){var r;if(this.settings.dynamic||(r=re(this.items).eq(t)),r){var s=void 0;if(this.settings.exThumbImage?s=r.attr(this.settings.exThumbImage):s=r.find("img").first().attr("src"),!s)return"";var o=this.getDummyImgStyles(this.currentImageSize),l="<img "+n+' style="'+o+'" class="lg-dummy-img" src="'+s+'" />';return e.addClass("lg-first-slide"),this.outer.addClass("lg-first-slide-loading"),l}return""},i.prototype.setImgMarkup=function(e,t,n){var r=this.galleryItems[n],s=r.alt,o=r.srcset,l=r.sizes,a=r.sources,u="",c=s?'alt="'+s+'"':"";this.isFirstSlideWithZoomAnimation()?u=this.getDummyImageContent(t,n,c):u=Je.getImgMarkup(n,e,c,o,l,a);var h='<picture class="lg-img-wrap"> '+u+"</picture>";t.prepend(h)},i.prototype.onSlideObjectLoad=function(e,t,n,r){var s=e.find(".lg-object").first();Je.isImageLoaded(s.get())||t?n():(s.on("load.lg error.lg",function(){n&&n()}),s.on("error.lg",function(){r&&r()}))},i.prototype.onLgObjectLoad=function(e,t,n,r,s,o){var l=this;this.onSlideObjectLoad(e,o,function(){l.triggerSlideItemLoad(e,t,n,r,s)},function(){e.addClass("lg-complete lg-complete_"),e.html('<span class="lg-error-msg">'+l.settings.strings.mediaLoadingFailed+"</span>")})},i.prototype.triggerSlideItemLoad=function(e,t,n,r,s){var o=this,l=this.galleryItems[t],a=s&&this.getSlideType(l)==="video"&&!l.poster?r:0;setTimeout(function(){e.addClass("lg-complete lg-complete_"),o.LGel.trigger(_e.slideItemLoad,{index:t,delay:n||0,isFirstSlide:s})},a)},i.prototype.isFirstSlideWithZoomAnimation=function(){return!!(!this.lGalleryOn&&this.zoomFromOrigin&&this.currentImageSize)},i.prototype.addSlideVideoInfo=function(e){var t=this;e.forEach(function(n,r){n.__slideVideoInfo=Je.isVideo(n.src,!!n.video,r),n.__slideVideoInfo&&t.settings.loadYouTubePoster&&!n.poster&&n.__slideVideoInfo.youtube&&(n.poster="//img.youtube.com/vi/"+n.__slideVideoInfo.youtube[1]+"/maxresdefault.jpg")})},i.prototype.loadContent=function(e,t){var n=this,r=this.galleryItems[e],s=re(this.getSlideItemId(e)),o=r.poster,l=r.srcset,a=r.sizes,u=r.sources,c=r.src,h=r.video,d=h&&typeof h=="string"?JSON.parse(h):h;if(r.responsive){var f=r.responsive.split(",");c=Je.getResponsiveSrc(f)||c}var p=r.__slideVideoInfo,b="",m=!!r.iframe,v=!this.lGalleryOn,g=0;if(v&&(this.zoomFromOrigin&&this.currentImageSize?g=this.settings.startAnimationDuration+10:g=this.settings.backdropDuration+10),!s.hasClass("lg-loaded")){if(p){var y=this.mediaContainerPosition,w=y.top,E=y.bottom,x=Je.getSize(this.items[e],this.outer,w+E,p&&this.settings.videoMaxSize);
vendor: 15,393 bytes, line 690
690b=this.getVideoContStyle(x)}if(m){var S=Je.getIframeMarkup(this.settings.iframeWidth,this.settings.iframeHeight,this.settings.iframeMaxWidth,this.settings.iframeMaxHeight,c,r.iframeTitle);s.prepend(S)}else if(o){var _="",M=v&&this.zoomFromOrigin&&this.currentImageSize;M&&(_=this.getDummyImageContent(s,e,""));var S=Je.getVideoPosterMarkup(o,_||"",b,this.settings.strings.playVideo,p);s.prepend(S)}else if(p){var S='<div class="lg-video-cont " style="'+b+'"></div>';s.prepend(S)}else if(this.setImgMarkup(c,s,e),l||u){var O=s.find(".lg-object");this.initPictureFill(O)}(o||p)&&this.LGel.trigger(_e.hasVideo,{index:e,src:c,html5Video:d,hasPoster:!!o}),this.LGel.trigger(_e.afterAppendSlide,{index:e}),this.lGalleryOn&&this.settings.appendSubHtmlTo===".lg-item"&&this.addHtml(e)}var D=0;g&&!re(document.body).hasClass("lg-from-hash")&&(D=g),this.isFirstSlideWithZoomAnimation()&&(setTimeout(function(){s.removeClass("lg-start-end-progress lg-start-progress").removeAttr("style")},this.settings.startAnimationDuration+100),s.hasClass("lg-loaded")||setTimeout(function(){if(n.getSlideType(r)==="image"){var k=r.alt,A=k?'alt="'+k+'"':"";if(s.find(".lg-img-wrap").append(Je.getImgMarkup(e,c,A,l,a,r.sources)),l||u){var C=s.find(".lg-object");n.initPictureFill(C)}}(n.getSlideType(r)==="image"||n.getSlideType(r)==="video"&&o)&&(n.onLgObjectLoad(s,e,g,D,!0,!1),n.onSlideObjectLoad(s,!!(p&&p.html5&&!o),function(){n.loadContentOnFirstSlideLoad(e,s,D)},function(){n.loadContentOnFirstSlideLoad(e,s,D)}))},this.settings.startAnimationDuration+100)),s.addClass("lg-loaded"),(!this.isFirstSlideWithZoomAnimation()||this.getSlideType(r)==="video"&&!o)&&this.onLgObjectLoad(s,e,g,D,v,!!(p&&p.html5&&!o)),(!this.zoomFromOrigin||!this.currentImageSize)&&s.hasClass("lg-complete_")&&!this.lGalleryOn&&setTimeout(function(){s.addClass("lg-complete")},this.settings.backdropDuration),this.lGalleryOn=!0,t===!0&&(s.hasClass("lg-complete_")?this.preload(e):s.find(".lg-object").first().on("load.lg error.lg",function(){n.preload(e)}))},i.prototype.loadContentOnFirstSlideLoad=function(e,t,n){var r=this;setTimeout(function(){t.find(".lg-dummy-img").remove(),t.removeClass("lg-first-slide"),r.outer.removeClass("lg-first-slide-loading"),r.isDummyImageRemoved=!0,r.preload(e)},n+300)},i.prototype.getItemsToBeInsertedToDom=function(e,t,n){var r=this;n===void 0&&(n=0);var s=[],o=Math.max(n,3);o=Math.min(o,this.galleryItems.length);var l="lg-item-"+this.lgId+"-"+t;if(this.galleryItems.length<=3)return this.galleryItems.forEach(function(c,h){s.push("lg-item-"+r.lgId+"-"+h)}),s;if(e<(this.galleryItems.length-1)/2){for(var a=e;a>e-o/2&&a>=0;a--)s.push("lg-item-"+this.lgId+"-"+a);for(var u=s.length,a=0;a<o-u;a++)s.push("lg-item-"+this.lgId+"-"+(e+a+1))}else{for(var a=e;a<=this.galleryItems.length-1&&a<e+o/2;a++)s.push("lg-item-"+this.lgId+"-"+a);for(var u=s.length,a=0;a<o-u;a++)s.push("lg-item-"+this.lgId+"-"+(e-a-1))}return this.settings.loop&&(e===this.galleryItems.length-1?s.push("lg-item-"+this.lgId+"-0"):e===0&&s.push("lg-item-"+this.lgId+"-"+(this.galleryItems.length-1))),s.indexOf(l)===-1&&s.push("lg-item-"+this.lgId+"-"+t),s},i.prototype.organizeSlideItems=function(e,t){var n=this,r=this.getItemsToBeInsertedToDom(e,t,this.settings.numberOfSlideItemsInDom);return r.forEach(function(s){n.currentItemsInDom.indexOf(s)===-1&&n.$inner.append('<div id="'+s+'" class="lg-item"></div>')}),this.currentItemsInDom.forEach(function(s){r.indexOf(s)===-1&&re("#"+s).remove()}),r},i.prototype.getPreviousSlideIndex=function(){var e=0;try{var t=this.outer.find(".lg-current").first().attr("id");e=parseInt(t.split("-")[3])||0}catch{e=0}return e},i.prototype.setDownloadValue=function(e){if(this.settings.download){var t=this.galleryItems[e],n=t.downloadUrl===!1||t.downloadUrl==="false";if(n)this.outer.addClass("lg-hide-download");else{var r=this.getElementById("lg-download");this.outer.removeClass("lg-hide-download"),r.attr("href",t.downloadUrl||t.src),t.download&&r.attr("download",t.download)}}},i.prototype.makeSlideAnimation=function(e,t,n){var r=this;this.lGalleryOn&&n.addClass("lg-slide-progress"),setTimeout(function(){r.outer.addClass("lg-no-trans"),r.outer.find(".lg-item").removeClass("lg-prev-slide lg-next-slide"),e==="prev"?(t.addClass("lg-prev-slide"),n.addClass("lg-next-slide")):(t.addClass("lg-next-slide"),n.addClass("lg-prev-slide")),setTimeout(function(){r.outer.find(".lg-item").removeClass("lg-current"),t.addClass("lg-current"),r.outer.removeClass("lg-no-trans")},50)},this.lGalleryOn?this.settings.slideDelay:0)},i.prototype.slide=function(e,t,n,r){var s=this,o=this.getPreviousSlideIndex();if(this.currentItemsInDom=this.organizeSlideItems(e,o),!(this.lGalleryOn&&o===e)){var l=this.galleryItems.length;if(!this.lgBusy){this.settings.counter&&this.updateCurrentCounter(e);var a=this.getSlideItem(e),u=this.getSlideItem(o),c=this.galleryItems[e],h=c.__slideVideoInfo;if(this.outer.attr("data-lg-slide-type",this.getSlideType(c)),this.setDownloadValue(e),h){var d=this.mediaContainerPosition,f=d.top,p=d.bottom,b=Je.getSize(this.items[e],this.outer,f+p,h&&this.settings.videoMaxSize);this.resizeVideoSlide(e,b)}if(this.LGel.trigger(_e.beforeSlide,{prevIndex:o,index:e,fromTouch:!!t,fromThumb:!!n}),this.lgBusy=!0,clearTimeout(this.hideBarTimeout),this.arrowDisable(e),r||(e<o?r="prev":e>o&&(r="next")),!t)this.makeSlideAnimation(r,a,u);else{this.outer.find(".lg-item").removeClass("lg-prev-slide lg-current lg-next-slide");var m=void 0,v=void 0;l>2?(m=e-1,v=e+1,(e===0&&o===l-1||e===l-1&&o===0)&&(v=0,m=l-1)):(m=0,v=1),r==="prev"?this.getSlideItem(v).addClass("lg-next-slide"):this.getSlideItem(m).addClass("lg-prev-slide"),a.addClass("lg-current")}this.lGalleryOn?setTimeout(function(){s.loadContent(e,!0),s.settings.appendSubHtmlTo!==".lg-item"&&s.addHtml(e)},this.settings.speed+50+(t?0:this.settings.slideDelay)):this.loadContent(e,!0),setTimeout(function(){s.lgBusy=!1,u.removeClass("lg-slide-progress"),s.LGel.trigger(_e.afterSlide,{prevIndex:o,index:e,fromTouch:t,fromThumb:n})},(this.lGalleryOn?this.settings.speed+100:100)+(t?0:this.settings.slideDelay))}this.index=e}},i.prototype.updateCurrentCounter=function(e){this.getElementById("lg-counter-current").html(e+1+"")},i.prototype.updateCounterTotal=function(){this.getElementById("lg-counter-all").html(this.galleryItems.length+"")},i.prototype.getSlideType=function(e){return e.__slideVideoInfo?"video":e.iframe?"iframe":"image"},i.prototype.touchMove=function(e,t,n){var r=t.pageX-e.pageX,s=t.pageY-e.pageY,o=!1;if(this.swipeDirection?o=!0:Math.abs(r)>15?(this.swipeDirection="horizontal",o=!0):Math.abs(s)>15&&(this.swipeDirection="vertical",o=!0),!!o){var l=this.getSlideItem(this.index);if(this.swipeDirection==="horizontal"){n==null||n.preventDefault(),this.outer.addClass("lg-dragging"),this.setTranslate(l,r,0);var a=l.get().offsetWidth,u=a*15/100,c=u-Math.abs(r*10/100);this.setTranslate(this.outer.find(".lg-prev-slide").first(),-a+r-c,0),this.setTranslate(this.outer.find(".lg-next-slide").first(),a+r+c,0)}else if(this.swipeDirection==="vertical"&&this.settings.swipeToClose){n==null||n.preventDefault(),this.$container.addClass("lg-dragging-vertical");var h=1-Math.abs(s)/window.innerHeight;this.$backdrop.css("opacity",h);var d=1-Math.abs(s)/(window.innerWidth*2);this.setTranslate(l,0,s,d,d),Math.abs(s)>100&&this.outer.addClass("lg-hide-items").removeClass("lg-components-open")}}},i.prototype.touchEnd=function(e,t,n){var r=this,s;this.settings.mode!=="lg-slide"&&this.outer.addClass("lg-slide"),setTimeout(function(){r.$container.removeClass("lg-dragging-vertical"),r.outer.removeClass("lg-dragging lg-hide-items").addClass("lg-components-open");var o=!0;if(r.swipeDirection==="horizontal"){s=e.pageX-t.pageX;var l=Math.abs(e.pageX-t.pageX);s<0&&l>r.settings.swipeThreshold?(r.goToNextSlide(!0),o=!1):s>0&&l>r.settings.swipeThreshold&&(r.goToPrevSlide(!0),o=!1)}else if(r.swipeDirection==="vertical")if(s=Math.abs(e.pageY-t.pageY),r.settings.closable&&r.settings.swipeToClose&&s>100){r.closeGallery();return}else r.$backdrop.css("opacity",1);if(r.outer.find(".lg-item").removeAttr("style"),o&&Math.abs(e.pageX-t.pageX)<5){var a=re(n.target);r.isPosterElement(a)&&r.LGel.trigger(_e.posterClick)}r.swipeDirection=void 0}),setTimeout(function(){!r.outer.hasClass("lg-dragging")&&r.settings.mode!=="lg-slide"&&r.outer.removeClass("lg-slide")},this.settings.speed+100)},i.prototype.enableSwipe=function(){var e=this,t={},n={},r=!1,s=!1;this.settings.enableSwipe&&(this.$inner.on("touchstart.lg",function(o){e.dragOrSwipeEnabled=!0;var l=e.getSlideItem(e.index);(re(o.target).hasClass("lg-item")||l.get().contains(o.target))&&!e.outer.hasClass("lg-zoomed")&&!e.lgBusy&&o.touches.length===1&&(s=!0,e.touchAction="swipe",e.manageSwipeClass(),t={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY})}),this.$inner.on("touchmove.lg",function(o){s&&e.touchAction==="swipe"&&o.touches.length===1&&(n={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY},e.touchMove(t,n,o),r=!0)}),this.$inner.on("touchend.lg",function(o){if(e.touchAction==="swipe"){if(r)r=!1,e.touchEnd(n,t,o);else if(s){var l=re(o.target);e.isPosterElement(l)&&e.LGel.trigger(_e.posterClick)}e.touchAction=void 0,s=!1}}))},i.prototype.enableDrag=function(){var e=this,t={},n={},r=!1,s=!1;this.settings.enableDrag&&(this.outer.on("mousedown.lg",function(o){e.dragOrSwipeEnabled=!0;var l=e.getSlideItem(e.index);(re(o.target).hasClass("lg-item")||l.get().contains(o.target))&&!e.outer.hasClass("lg-zoomed")&&!e.lgBusy&&(o.preventDefault(),e.lgBusy||(e.manageSwipeClass(),t={pageX:o.pageX,pageY:o.pageY},r=!0,e.outer.get().scrollLeft+=1,e.outer.get().scrollLeft-=1,e.outer.removeClass("lg-grab").addClass("lg-grabbing"),e.LGel.trigger(_e.dragStart)))}),re(window).on("mousemove.lg.global"+this.lgId,function(o){r&&e.lgOpened&&(s=!0,n={pageX:o.pageX,pageY:o.pageY},e.touchMove(t,n),e.LGel.trigger(_e.dragMove))}),re(window).on("mouseup.lg.global"+this.lgId,function(o){if(e.lgOpened){var l=re(o.target);s?(s=!1,e.touchEnd(n,t,o),e.LGel.trigger(_e.dragEnd)):e.isPosterElement(l)&&e.LGel.trigger(_e.posterClick),r&&(r=!1,e.outer.removeClass("lg-grabbing").addClass("lg-grab"))}}))},i.prototype.triggerPosterClick=function(){var e=this;this.$inner.on("click.lg",function(t){!e.dragOrSwipeEnabled&&e.isPosterElement(re(t.target))&&e.LGel.trigger(_e.posterClick)})},i.prototype.manageSwipeClass=function(){var e=this.index+1,t=this.index-1;this.settings.loop&&this.galleryItems.length>2&&(this.index===0?t=this.galleryItems.length-1:this.index===this.galleryItems.length-1&&(e=0)),this.outer.find(".lg-item").removeClass("lg-next-slide lg-prev-slide"),t>-1&&this.getSlideItem(t).addClass("lg-prev-slide"),this.getSlideItem(e).addClass("lg-next-slide")},i.prototype.goToNextSlide=function(e){var t=this,n=this.settings.loop;e&&this.galleryItems.length<3&&(n=!1),this.lgBusy||(this.index+1<this.galleryItems.length?(this.index++,this.LGel.trigger(_e.beforeNextSlide,{index:this.index}),this.slide(this.index,!!e,!1,"next")):n?(this.index=0,this.LGel.trigger(_e.beforeNextSlide,{index:this.index}),this.slide(this.index,!!e,!1,"next")):this.settings.slideEndAnimation&&!e&&(this.outer.addClass("lg-right-end"),setTimeout(function(){t.outer.removeClass("lg-right-end")},400)))},i.prototype.goToPrevSlide=function(e){var t=this,n=this.settings.loop;e&&this.galleryItems.length<3&&(n=!1),this.lgBusy||(this.index>0?(this.index--,this.LGel.trigger(_e.beforePrevSlide,{index:this.index,fromTouch:e}),this.slide(this.index,!!e,!1,"prev")):n?(this.index=this.galleryItems.length-1,this.LGel.trigger(_e.beforePrevSlide,{index:this.index,fromTouch:e}),this.slide(this.index,!!e,!1,"prev")):this.settings.slideEndAnimation&&!e&&(this.outer.addClass("lg-left-end"),setTimeout(function(){t.outer.removeClass("lg-left-end")},400)))},i.prototype.keyPress=function(){var e=this;re(window).on("keydown.lg.global"+this.lgId,function(t){e.lgOpened&&e.settings.escKey===!0&&t.keyCode===27&&(t.preventDefault(),e.settings.allowMediaOverlap&&e.outer.hasClass("lg-can-toggle")&&e.outer.hasClass("lg-components-open")?e.outer.removeClass("lg-components-open"):e.closeGallery()),e.lgOpened&&e.galleryItems.length>1&&(t.keyCode===37&&(t.preventDefault(),e.goToPrevSlide()),t.keyCode===39&&(t.preventDefault(),e.goToNextSlide()))})},i.prototype.arrow=function(){var e=this;this.getElementById("lg-prev").on("click.lg",function(){e.goToPrevSlide()}),this.getElementById("lg-next").on("click.lg",function(){e.goToNextSlide()})},i.prototype.arrowDisable=function(e){if(!this.settings.loop&&this.settings.hideControlOnEnd){var t=this.getElementById("lg-prev"),n=this.getElementById("lg-next");e+1===this.galleryItems.length?n.attr("disabled","disabled").addClass("disabled"):n.removeAttr("disabled").removeClass("disabled"),e===0?t.attr("disabled","disabled").addClass("disabled"):t.removeAttr("disabled").removeClass("disabled")}},i.prototype.setTranslate=function(e,t,n,r,s){r===void 0&&(r=1),s===void 0&&(s=1),e.css("transform","translate3d("+t+"px, "+n+"px, 0px) scale3d("+r+", "+s+", 1)")},i.prototype.mousewheel=function(){var e=this,t=0;this.outer.on("wheel.lg",function(n){if(!(!n.deltaY||e.galleryItems.length<2)){n.preventDefault();var r=new Date().getTime();r-t<1e3||(t=r,n.deltaY>0?e.goToNextSlide():n.deltaY<0&&e.goToPrevSlide())}})},i.prototype.isSlideElement=function(e){return e.hasClass("lg-outer")||e.hasClass("lg-item")||e.hasClass("lg-img-wrap")},i.prototype.isPosterElement=function(e){var t=this.getSlideItem(this.index).find(".lg-video-play-button").get();return e.hasClass("lg-video-poster")||e.hasClass("lg-video-play-button")||t&&t.contains(e.get())},i.prototype.toggleMaximize=function(){var e=this;this.getElementById("lg-maximize").on("click.lg",function(){e.$container.toggleClass("lg-inline"),e.refreshOnResize()})},i.prototype.invalidateItems=function(){for(var e=0;e<this.items.length;e++){var t=this.items[e],n=re(t);n.off("click.lgcustom-item-"+n.attr("data-lg-id"))}},i.prototype.trapFocus=function(){var e=this;this.$container.get().focus({preventScroll:!0}),re(window).on("keydown.lg.global"+this.lgId,function(t){if(e.lgOpened){var n=t.key==="Tab"||t.keyCode===9;if(n){var r=Je.getFocusableElements(e.$container.get()),s=r[0],o=r[r.length-1];t.shiftKey?document.activeElement===s&&(o.focus(),t.preventDefault()):document.activeElement===o&&(s.focus(),t.preventDefault())}}})},i.prototype.manageCloseGallery=function(){var e=this;if(this.settings.closable){var t=!1;this.getElementById("lg-close").on("click.lg",function(){e.closeGallery()}),this.settings.closeOnTap&&(this.outer.on("mousedown.lg",function(n){var r=re(n.target);e.isSlideElement(r)?t=!0:t=!1}),this.outer.on("mousemove.lg",function(){t=!1}),this.outer.on("mouseup.lg",function(n){var r=re(n.target);e.isSlideElement(r)&&t&&(e.outer.hasClass("lg-dragging")||e.closeGallery())}))}},i.prototype.closeGallery=function(e){var t=this;if(!this.lgOpened||!this.settings.closable&&!e)return 0;this.LGel.trigger(_e.beforeClose),this.settings.resetScrollPosition&&!this.settings.hideScrollbar&&re(window).scrollTop(this.prevScrollTop);var n=this.items[this.index],r;if(this.zoomFromOrigin&&n){var s=this.mediaContainerPosition,o=s.top,l=s.bottom,a=this.galleryItems[this.index],u=a.__slideVideoInfo,c=a.poster,h=Je.getSize(n,this.outer,o+l,u&&c&&this.settings.videoMaxSize);r=Je.getTransform(n,this.outer,o,l,h)}this.zoomFromOrigin&&r?(this.outer.addClass("lg-closing lg-zoom-from-image"),this.get
690SlideItem(this.index).addClass("lg-start-end-progress").css("transition-duration",this.settings.startAnimationDuration+"ms").css("transform",r)):(this.outer.addClass("lg-hide-items"),this.outer.removeClass("lg-zoom-from-image")),this.destroyModules(),this.lGalleryOn=!1,this.isDummyImageRemoved=!1,this.zoomFromOrigin=this.settings.zoomFromOrigin,clearTimeout(this.hideBarTimeout),this.hideBarTimeout=!1,re("html").removeClass("lg-on"),this.outer.removeClass("lg-visible lg-components-open"),this.$backdrop.removeClass("in").css("opacity",0);var d=this.zoomFromOrigin&&r?Math.max(this.settings.startAnimationDuration,this.settings.backdropDuration):this.settings.backdropDuration;return this.$container.removeClass("lg-show-in"),setTimeout(function(){t.zoomFromOrigin&&r&&t.outer.removeClass("lg-zoom-from-image"),t.$container.removeClass("lg-show"),t.resetScrollBar(),t.$backdrop.removeAttr("style").css("transition-duration",t.settings.backdropDuration+"ms"),t.outer.removeClass("lg-closing "+t.settings.startClass),t.getSlideItem(t.index).removeClass("lg-start-end-progress"),t.$inner.empty(),t.lgOpened&&t.LGel.trigger(_e.afterClose,{instance:t}),t.$container.get()&&t.$container.get().blur(),t.lgOpened=!1},d+100),d+100},i.prototype.initModules=function(){this.plugins.forEach(function(e){try{e.init()}catch{console.warn("lightGallery:- make sure lightGallery module is properly initiated")}})},i.prototype.destroyModules=function(e){this.plugins.forEach(function(t){try{e?t.destroy():t.closeGallery&&t.closeGallery()}catch{console.warn("lightGallery:- make sure lightGallery module is properly destroyed")}})},i.prototype.refresh=function(e){this.settings.dynamic||this.invalidateItems(),e?this.galleryItems=e:this.galleryItems=this.getItems(),this.updateControls(),this.openGalleryOnItemClick(),this.LGel.trigger(_e.updateSlides)},i.prototype.updateControls=function(){this.addSlideVideoInfo(this.galleryItems),this.updateCounterTotal(),this.manageSingleSlideClassName()},i.prototype.destroyGallery=function(){this.destroyModules(!0),this.settings.dynamic||this.invalidateItems(),re(window).off(".lg.global"+this.lgId),this.LGel.off(".lg"),this.$container.remove()},i.prototype.destroy=function(){var e=this.closeGallery(!0);return e?setTimeout(this.destroyGallery.bind(this),e):this.destroyGallery(),e},i}();function Kz(i,e){return new Gz(i,e)}class kC extends U{connect(){this.lightGallery=Kz(this.element,{...this.defaultOptions,...this.optionsValue})}disconnect(){this.lightGallery.destroy()}get defaultOptions(){return{}}}kC.values={options:Object};const Qf=class extends U{connect(){this.class=this.hasHiddenClass?this.hiddenClass:"hidden"}toggle(){this.itemTargets.forEach(e=>{e.classList.toggle(this.class)})}show(){this.itemTargets.forEach(e=>{e.classList.remove(this.class)})}hide(){this.itemTargets.forEach(e=>{e.classList.add(this.class)})}};Qf.targets=["item"],Qf.classes=["hidden"];let Yz=Qf;function Xz(i,e){let t;return(...n)=>{clearTimeout(t),t=setTimeout(()=>{i.apply(this,n)},e)}}const _C=class extends U{initialize(){this.submit=this.submit.bind(this)}connect(){this.delayValue>0&&(this.submit=Xz(this.submit,this.delayValue))}submit(){this.element.requestSubmit()}};_C.values={delay:{type:Number,default:150}};let Jz=_C;const Qz=Object.assign({"./admin/application_controller.js":tA,"./admin/online_controller.js":nA,"./admin/proxy_controller.js":rA,"./ai/filter_generator_controller.js":sA,"./ai/payment_controller.js":bA,"./ai/prospect_search_controller.js":yA,"./ai/public_prospect_search_controller.js":vA,"./ai_chat_controller.js":EA,"./ai_conversation_controller.js":TA,"./ai_hero_search_controller.js":SA,"./ai_modal_controller.js":CA,"./alert_controller.js":kA,"./analytics_controller.js":_A,"./anime/lazyload_controller.js":A2,"./anime/recent_controller.js":L2,"./anime/redirect_controller.js":M2,"./anime/slogan_controller.js":I2,"./anime/switch_text_controller.js":aL,"./application_controller.js":lL,"./ask_controller.js":uL,"./campaign/audience_controller.js":xL,"./campaign/dashboard_controller.js":EL,"./campaign/engagement_controller.js":TL,"./campaign/review_controller.js":SL,"./campaign/schedule_controller.js":CL,"./campaign/sett
690ing_controller.js":kL,"./campaign/template_controller.js":WO,"./campaign/tour_controller.js":t3,"./campaign_controller.js":n3,"./choices_controller.js":r3,"./choices_search_controller.js":o3,"./chrome_controller.js":TD,"./code_mirror_controller.js":SD,"./contact_controller.js":BD,"./conversational_ai_controller.js":UC,"./copy_clipboard_controller.js":FD,"./credit_card_controller.js":XD,"./crisp_controller.js":JD,"./document_controller.js":rP,"./download_countdown_controller.js":sP,"./dropdown_checkbox_controller.js":PP,"./ds/credit_calculator_controller.js":RP,"./ds/hero_search_controller.js":NP,"./ds/menu_controller.js":BP,"./email_finder_controller.js":FP,"./email_verifier_controller.js":zP,"./google_one_tap_controller.js":VP,"./home_controller.js":HP,"./infinite_scroll_controller.js":jP,"./inline_edit_controller.js":$P,"./intro_controller.js":qP,"./lets_talk_controller.js":WP,"./lists_controller.js":GP,"./login_controller.js":KP,"./mail_controller.js":JP,"./mobile_app_notice_controller.js":QP,"./modal_controller.js":ZP,"./nps_controller.js":i6,"./pagy_controller.js":s6,"./password_checker_controller.js":l6,"./payment/cancel_controller.js":c6,"./payment/checkout_controller.js":d6,"./payment/paddle_controller.js":h6,"./payment/razorpay_controller.js":m6,"./payment/success_controller.js":g6,"./phone_format_controller.js":b6,"./phone_prompt_controller.js":y6,"./pricing_controller.js":v6,"./prospect_email_refresh_controller.js":w6,"./register_controller.js":x6,"./roi_calculator_controller.js":E6,"./selector_controller.js":T6,"./show_more_controller.js":C6,"./sidebar_controller.js":L6,"./signature_editor_controller.js":q9,"./test_case_controller.js":U9,"./tool_controller.js":W9,"./trix_editor_controller.js":G9,"./turbo_modal_controller.js":Y9,"./user/comment_controller.js":X9,"./user/direct_upload_controller.js":Q9,"./user/download_controller.js":Z9,"./user/list_controller.js":ez,"./user/setting_controller.js":tz,"./user/tags_controller.js":iz,"./user/ticket_controller.js":rz,"./user/transfer_controller.js":sz,"./user/upload_controller.js":oz});sv(rt,Qz);rt.register("application",Xp);rt.register("search--choices",qC);rt.register("password-visibility",az);rt.register("scroll-to",lz);rt.register("checkbox-select-all",Ii);rt.register("validation",sa);rt.register("clipboard",HC);rt.register("carousel",Fz);rt.register("character-counter",zz);rt.register("notification",Vz);rt.register("content-loader",Hz);rt.register("lightbox",kC);rt.register("reveal",Yz);rt.register("auto-submit",Jz);rt.register("nested-form",dC);let rv=!1;function AC(){if(rv)return;const i=window.location.pathname||"",e=document.querySelector("[data-search-bundle]");!i.startsWith("/search")&&!i.startsWith("/searches")&&!e||(rv=!0,Lt(()=>import("./search_bundle-DeX0LBRv.js"),__vite__mapDeps([10,2,11,1,8])))}function Zz(){const i=window.location.pathname||"";document.querySelector("trix-editor, [data-trix-editor], [data-rich-editor]")&&(Lt(()=>Promise.resolve().then(()=>XP),void 0),Lt(()=>import("./index-BQ0u-y-U.js"),__vite__mapDeps([12,1,2]))),document.querySelector("lottie-player")&&Lt(()=>import("./lottie-player.esm-SLjauTDT.js"),[]),document.querySelector("[data-intro], .introjs-tooltipReferenceLayer, .introjs-showElement")&&Lt(()=>Promise.resolve({}),__vite__mapDeps([13])),(i.startsWith("/campaign")||document.querySelector("[data-swiper], .swiper"))&&Lt(()=>Promise.resolve({}),__vite__mapDeps([14])),document.querySelector("[data-sticky], .js-sticky")&&Lt(()=>Promise.resolve().then(()=>nP),void 0)}AC();document.addEventListener("turbo:load",AC);const e7=["ds","profiles-search-interface"];document.addEventListener("turbo:before-cache",()=>{document.body.dataset.htmlClass=document.documentElement.className});document.addEventListener("turbo:before-render",i=>{var o;const e=i.detail.newBody,t=document.documentElement,n=(o=e==null?void 0:e.ownerDocument)==null?void 0:o.documentElement,r=(e==null?void 0:e.dataset.htmlClass)??(n&&n!==t?n.className:null);if(typeof r!="string")return;const s=r.split(/\s+/);e7.forEach(l=>t.classList.toggle(l,s.includes(l)))});Zz();FC.redirect=function(){zC(this.target)};export{Mi as b,oN as k,xu as s}; 691//# sourceMappingURL=application-cRczcqO5.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.