/**
* @package DPCalendar
* @copyright Digital Peak GmbH. <https://www.digital-peak.com>
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*/
import{x as e,h as t,K as i,z as n}from"../../auto-console-group/dist/index.min.js?43859213";const o="5.4.1",r="[iFrameSizer]",a=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),s=(e,t,i,n)=>e.addEventListener(t,i,n||!1),l=(e,t,i)=>e.removeEventListener(t,i,!1),c=e=>{if(!e)return"";let t=-559038744,i=1103547984;for(let n,o=0;o<e.length;o++)n=e.codePointAt(o),t=Math.imul(t^n,2246822519),i=Math.imul(i^n,3266489917);return t^=Math.imul(t^i>>>15,1935289751),i^=Math.imul(i^t>>>15,3405138345),t^=i>>>16,i^=t>>>16,(2097152*(i>>>0)+(t>>>11)).toString(36)},u=e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))),d=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja [email protected]."],f=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],p=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)]))),h=e=>u(d[e]),m=e=>{const t=e[u("spjluzl")];if(!t)return-1;const i=t.split("-");let n=function(e=""){let t=-2;const i=c(u(e));return i in p&&(t=p[i]),t}(i[0]);return 0===n||(e=>e[2]===c(e[0]+e[1]))(i)||(n=-2),n},y=e=>e,g=(b=e,b?.__esModule?b.default:b);var b;let w={},v=!1;const z=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`,j=e=>(t,...i)=>w[t]?.console[e](...i),$=(e,...t)=>!0===(e=>w[e]?w[e].log:v)(e)?j("info")(e,...t):null;const k=j("warn"),T=j("event"),M=(e,...t)=>w[e]?w[e].console.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e((e=>e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,""))(t)))(y)(...t)):queueMicrotask((()=>{})),x=(O=M,(e,t="renamed to")=>(i,n,o="",r="")=>O(r,`<rb>Deprecated ${e}(${i.replace("()","")})</>\n\nThe <b>${i}</> ${e.toLowerCase()} has been ${t} <b>${n}</>. ${o}Use of the old ${e.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`)),S=x("Option"),I={},R=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:"vertical",inPageLinks:!1,heightCalculationMethod:"auto",id:"iFrameResizer",log:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,waitForLoad:!1,warningTimeout:5e3,widthCalculationMethod:"auto",onClose:()=>!0,onClosed(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{"function"==typeof I[e.id].onInit&&(S("init()","onReady()","",e.id),I[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),E={position:null,version:o};var O;function W(e){function t(){P(O),B(W),S("onResized",O)}function a(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function c(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}const u=e=>R.slice(R.indexOf(":")+7+e),d=(e,t)=>(i,n)=>{const o={};var r,a;r=function(){D(`${i} (${e})`,`${e}:${t()}`,n)},o[a=n]||(r(),o[a]=requestAnimationFrame((()=>{o[a]=null})))},f=(e,t)=>()=>{let i=!1;const n=t=>()=>{I[u]?i&&i!==t||(e(t,u),i=t,requestAnimationFrame((()=>{i=!1}))):c()},o=n("scroll"),r=n("resize window");function a(e,t){t(window,"scroll",o),t(window,"resize",r)}function c(){a(0,l),d.disconnect(),f.disconnect()}const u=W,d=new ResizeObserver(n("pageObserver")),f=new ResizeObserver(n("iframeObserver"));a(0,s),d.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),f.observe(I[u].iframe,{attributes:!0,childList:!1,subtree:!1}),I[u]&&(I[u][`stop${t}`]=c)},p=e=>()=>{e in I[W]&&(I[W][e](),delete I[W][e])},h=d("pageInfo",(function(){const e=document.body.getBoundingClientRect(),t=O.iframe.getBoundingClientRect(),{scrollY:i,scrollX:n,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:i,scrollLeft:n,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})})),m=d("parentInfo",(function(){const{iframe:e}=O,{scrollWidth:t,scrollHeight:i}=document.documentElement,{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:i},viewport:{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})})),y=f(h,"PageInfo"),g=f(m,"ParentInfo"),b=p("stopPageInfo"),w=p("stopParentInfo");function v(e){const t=e.getBoundingClientRect();return A(),{x:Number(t.left)+Number(E.position.x),y:Number(t.top)+Number(E.position.y)}}function z(e){const t=e?v(O.iframe):{x:0,y:0};$(W,`Reposition requested (offset x:%c${t.x}%c y:%c${t.y})`,i,n,i);const o=((e,t)=>({x:e.width+t.x,y:e.height+t.y}))(O,t),r=window.parentIframe||window.parentIFrame;r?function(t,i){t["scrollTo"+(e?"Offset":"")](i.x,i.y)}(r,o):function(e){E.position=e,j(W)}(o)}function j(e){const{x:t,y:i}=E.position,n=I[e]?.iframe;!1!==S("onScroll",{iframe:n,top:i,left:t,x:t,y:i})?B(e):F()}function x(e){let t={};if(0===O.width&&0===O.height){const e=u(9).split(":");t={x:e[1],y:e[0]}}else t={x:O.width,y:O.height};S(e,{iframe:O.iframe,screenX:Number(t.x),screenY:Number(t.y),type:O.type})}const S=(e,t)=>L(W,e,t);let R=e.data,O={},W=null;"[iFrameResizerChild]Ready"!==R?r===`${R}`.slice(0,13)&&R.slice(13).split(":")[0]in I&&(O=function(){const e=R.slice(13).split(":"),t=e[1]?Number(e[1]):0,i=I[e[0]]?.iframe,n=getComputedStyle(i);return{iframe:i,id:e[0],height:t+a(n)+c(n),width:Number(e[2]),type:e[3],msg:e[4]}}(),W=O.id,W?(T(W,O.type),I[W].errorBoundary((function(){!function(e){if(!I[e])throw new Error(`${O.type} No settings for ${e}. Message was: ${R}`)}(W),O.type in{true:1,false:1,undefined:1}||(I[W].loaded=!0,(null!==O.iframe||(k(W,`The iframe (${O.id}) was not found.`),0))&&function(){const{origin:t,sameDomain:i}=e;if(i)return!0;let n=I[W]?.checkOrigin;if(n&&"null"!=`${t}`&&!(n.constructor===Array?function(){let e=0,i=!1;for(;e<n.length;e++)if(n[e]===t){i=!0;break}return i}():function(){const e=I[W]?.remoteHost;return t===e}()))throw new Error(`Unexpected message received from: ${t} for ${O.iframe.id}. Message was: ${e.data}. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.`);return!0}()&&function(){switch(I[W]?.firstRun&&I[W]&&(I[W].firstRun=!1),O.type){case"close":C(O.iframe);break;case"message":r=u(6),S("onMessage",{iframe:O.iframe,message:JSON.parse(r)});break;case"mouseenter":x("onMouseEnter");break;case"mouseleave":x("onMouseLeave");break;case"autoResize":I[W].autoResize=JSON.parse(u(9));break;case"scrollBy":!function(){const e=O.width,t=O.height,o=window.parentIframe||window.parentIFrame||window;$(W,`scrollBy: x: %c${e}%c y: %c${t}`,i,n,i),o.scrollBy(e,t)}();break;case"scrollTo":z(!1);break;case"scrollToOffset":z(!0);break;case"pageInfo":h("start",W),y();break;case"parentInfo":m("start",W),g();break;case"pageInfoStop":b();break;case"parentInfoStop":w();break;case"inPageLink":!function(e){const t=e.split("#")[1]||"",n=decodeURIComponent(t);let o=document.getElementById(n)||document.getElementsByName(n)[0];o?function(){const e=v(o);$(W,`Moving to in page link: %c#${t}`,i),E.position={x:e.x,y:e.y},j(W),window.location.hash=t}():window.top!==window.self&&function(){const e=window.parentIframe||window.parentIFrame;e&&e.moveToAnchor(t)}()}(u(9));break;case"title":!function(e,t){I[t]?.syncTitle&&(I[t].iframe.title=e,$(t,`Set iframe title attribute: %c${e}`,i))}(O.msg,W);break;case"reset":H(O);break;case"init":t(),function(e){try{I[e].sameDomain=!!I[e]?.iframe?.contentWindow?.iframeChildListener}catch(t){I[e].sameDomain=!1}}(W),(e=O.msg)!==o&&(void 0!==e||M(W,"<rb>Legacy version detected in iframe</>\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use <b>@iframe-resizer/child</>.\n\nSee <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.\n")),U=!0,S("onReady",O.iframe);break;default:if(0===O.width&&0===O.height)return void k(W,`Unsupported message received (${O.type}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===O.width||0===O.height)return;if(document.hidden)return;t()}var e,r}())}))()):k("","iframeResizer received messageData without id, message was: ",R)):Object.keys(I).forEach((e=>{I[e].mode>=0&&D("iFrame requested init",q(e),e)}))}function L(e,t,i){let n=null,o=null;if(I[e]){if(n=I[e][t],"function"!=typeof n)throw new TypeError(`${t} on iFrame[${e}] is not a function`);if("onClose"===t||"onScroll"===t)try{o=n(i)}catch(i){k(e,`Error in ${t} callback`)}else setTimeout((()=>n(i)))}return o}function N(e){const{id:t}=e;delete I[t]}function C(e){const{id:t}=e;if(!1!==L(t,"onClose",t)){try{e.parentNode&&e.remove()}catch(e){k(t,e)}L(t,"onClosed",t),N(e)}}function A(e){null===E.position&&(E.position={x:window.scrollX,y:window.scrollY})}function F(){E.position=null}function B(e){null!==E.position&&(window.scrollTo(E.position.x,E.position.y),$(e,`Set page position: %c${E.position.x}%c, %c${E.position.y}`,i,n,i),F())}function H(e){A(e.id),P(e),D("reset","reset",e.id)}function P(e){function t(t){const o=`${e[t]}px`;e.iframe.style[t]=o,$(n,`Set ${t}: %c${o}`,i)}const{id:n}=e,{sizeHeight:o,sizeWidth:r}=I[n];o&&t("height"),r&&t("width")}function D(e,t,i,n){T(i,e),I[i]&&(I[i]?.postMessageTarget?function(){const{iframe:e,postMessageTarget:n,sameDomain:o,targetOrigin:a}=I[i];if(o)try{return void e.contentWindow.iframeChildListener(r+t)}catch(e){}n.postMessage(r+t,a)}():k(i,`Iframe(${i}) not found`),n&&I[i]?.warningTimeout&&(I[i].msgTimeout=setTimeout((function(){if(void 0===I[i])return;const{iframe:e,loaded:t,loadErrorShown:n,waitForLoad:o}=I[i],{sandbox:r}=e;t||n||(I[i].loadErrorShown=!0,M(i,`<rb>No response from iFrame</>\n \nThe iframe (<i>${i}</>) has not responded within ${I[i].warningTimeout/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${o?"\nThe <b>waitForLoad</> option is currently set to <i>'true'</>. If the iframe loads before the JavaScript runs, this option will prevent <i>iframe-resizer</> from initialising. To disable this, set the <b>waitForLoad</> option to <i>'false'</>. \n":""}${!(r?.length>0)||r.contains("allow-scripts")&&r.contains("allow-same-origin")?"":"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <i>'allow-same-origin'</> and <i>'allow-scripts'</> values.\n"} \n${!(r?.length>0)||r.contains("allow-scripts")&&r.contains("allow-same-origin")?"":"The iframe has the <b>sandbox</> attribute, please ensure it contains both the <i>'allow-same-origin'</> and <i>'allow-scripts'</> values.\n"}This message can be ignored if everything is working, or you can set the <b>warningTimeout</> option to a higher value or zero to suppress this warning.\n`))}),I[i].warningTimeout)))}function q(e){const t=I[e];return[e,"8",t.sizeWidth,t.log,"32",!0,t.autoResize,t.bodyMargin,t.heightCalculationMethod,t.bodyBackground,t.bodyPadding,t.tolerance,t.inPageLinks,"child",t.widthCalculationMethod,t.mouseEvents,t.offsetHeight,t.offsetWidth,t.sizeHeight,t.license,E.version,t.mode].join(":")}w=I;let J=0,U=!1,Z=!1;const V=e=>t=>{function i(e){return e?(("sizeWidth"in e||"sizeHeight"in e||"autoResize"in e)&&M(l,'<rb>Deprecated Option</>\n\nThe <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <i>"vertical"</>, <i>"horizontal"</> or <i>"horizontal"</>.\n'),e):{}}function n(){const{mode:t}=I[l];Z||t>0&&e.vInfoDisable||(Z=!0,(e=>{u(f[e])})(t),queueMicrotask((()=>{}))),t<0?M("Parent",`${h(t+2)}${h(2)}`):t<1&&M("Parent",h(3))}function o(e){const t=I[e]?.iframe?.title;return""===t||void 0===t}const r=e=>Object.hasOwn(e,"onMouseEnter")||Object.hasOwn(e,"onMouseLeave");const l=function(i){if(i&&"string"!=typeof i)throw new TypeError("Invalid id for iFrame. Expected String");return""!==i&&i||(i=function(){let t=e?.id||R.id+J++;return null!==document.getElementById(t)&&(t+=J++),t}(),t.id=i),i}(t.id);if("object"!=typeof e)throw new TypeError("Options is not an object");return function(e){-1===e?.log&&(e.log=!1,e.vInfoDisable=!0)}(e),function({enabled:e,iframeId:t}){const i=g({label:z(t)});v=e,w[t]||(w[t]={console:i,errorBoundary:i.errorBoundary})}({enabled:Object.hasOwn(e,"log")?e.log:R.log,iframeId:l}),I[l].errorBoundary((function(e){"iframeResizer"in t?k(l,`Ignored iframe (${l}), already setup.`):(function(e){var n,a;I[l]={...I[l],iframe:t,firstRun:!0,remoteHost:t?.src.split("/").slice(0,3).join("/"),...R,...i(e),mouseEvents:r(e),mode:m(e),syncTitle:o(l)},T(l,"setup"),function(){const{direction:e}=I[l];if("horizontal"===e)return I[l].sizeWidth=!0,void(I[l].sizeHeight=!1);if("none"===e)return I[l].sizeWidth=!1,I[l].sizeHeight=!1,void(I[l].autoResize=!1);if("vertical"!==e)throw new TypeError(l,`Direction value of "${e}" is not valid`)}(),(n=e?.offsetSize||e?.offset)&&("vertical"===I[l].direction?I[l].offsetHeight=n:I[l].offsetWidth=n),e?.offset&&M(l,"<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),null===I[l].postMessageTarget&&(I[l].postMessageTarget=t.contentWindow),I[l].targetOrigin=!0===I[l].checkOrigin?""===(a=I[l].remoteHost)||null!==a.match(/^(about:blank|javascript:|file:\/\/)/)?"*":a:"*"}(e),n(),Y(),function(){switch(t.style.overflow=!1===I[l]?.scrolling?"hidden":"auto",I[l]?.scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=I[l]?I[l].scrolling:"no"}}(),function(){const{bodyMargin:e}=I[l];"number"!=typeof e&&"0"!==e||(I[l].bodyMargin=`${e}px`)}(),function(e){const{id:i}=t,{mode:n,waitForLoad:o}=I[i];-1!==n&&-2!==n&&(s(t,"load",(function(){D("iFrame.onload",`${e}:${U}`,i,!0),function(){const e=I[l]?.firstRun,i=I[l]?.heightCalculationMethod in a;!e&&i&&H({iframe:t,height:0,width:0,type:"init"})}()})),!1===o&&D("init",`${e}:${U}`,i,!0))}(q(l)),function(){if(I[l]){const{iframe:e}=I[l],t={close:C.bind(null,e),disconnect:N.bind(null,e),removeListeners(){M(l,"\n<rb>Deprecated Method Name</>\n\nThe [removeListeners()</> method has been renamed to [disconnect()</>.\n"),this.disconnect()},resize:D.bind(null,"Window resize","resize",l),moveToAnchor(e){D("Move to anchor",`moveToAnchor:${e}`,l)},sendMessage(e){D("message",`message:${e=JSON.stringify(e)}`,l)}};e.iframeResizer=t,e.iFrameResizer=t}}())}))(e),t?.iFrameResizer};function X(){!1===document.hidden&&Object.keys(I).forEach((function(e){(e=>I[e]?.autoResize&&!I[e]?.firstRun)(e)&&D("Tab Visible","resize",e)}))}const Y=(e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}})((()=>{s(window,"message",W),s(document,"visibilitychange",X),window.iframeParentListener=e=>setTimeout((()=>W({data:e,sameDomain:!0})))})),_="[iframeResizer] ";const G=function(){function e(e){switch(!0){case!e:throw new TypeError(`${_}iframe is not defined`);case!e.tagName:throw new TypeError(`${_}Not a valid DOM element`);case"IFRAME"!==e.tagName.toUpperCase():throw new TypeError(`${_}Expected <IFRAME> tag, found <${e.tagName}>`);default:t(e),i.push(e)}}let t,i;return function(n,o){if("undefined"==typeof window)return[];switch(t=V(n),i=[],typeof o){case"undefined":case"string":document.querySelectorAll(o||"iframe").forEach(e);break;case"object":e(o);break;default:throw new TypeError(`${_}Unexpected data type (${typeof o})`)}return Object.freeze(i)}}();export{G as default};