PluginProbe
Depicter — Popup & Slider Builder / 1.9.2
Depicter — Popup & Slider Builder v1.9.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
← All changes | app/src/Modules/Gutenberg/build/index.js +1 -1 1.5.2 → 1.9.2 View file →
@@ -1 +1 @@
1 -!function(){"use strict";var e,t={86:function(){var e=window.wp.blocks,t=window.wp.element,i=window.wp.blockEditor,n=window.wp.components;window.React,(0,e.registerBlockType)("depicter/slider",{edit:function(e){let{attributes:r,setAttributes:l}=e;const d=(0,i.useBlockProps)();function c(e){window.fetch(window.depicterSliders.ajax_url+"?action=depicter/document/status&ID="+e,{method:"GET",headers:{"Content-Type":"text/html","X-DEPICTER-CSRF":window.depicterSliders.token}}).then((e=>e.json())).then((function(e){let t=document.getElementById("dep-publish-slider-btn");void 0===e.status||"publish"!=e.status?t.removeAttribute("disabled"):t.setAttribute("disabled",!0)})).catch((function(){}))}return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(i.InspectorControls,{key:"setting"},(0,t.createElement)(n.Panel,{header:"Depicter"},(0,t.createElement)(n.PanelBody,{title:"Depicter Settings",initialOpen:!0},(0,t.createElement)(n.PanelRow,null,(0,t.createElement)(n.SelectControl,{id:"dep-slider-list",label:"Slider",value:r.id,options:depicterSliders.list,onChange:function(e){l({id:Number(e)}),c(e)}})),(0,t.createElement)(n.PanelRow,{className:"sliderBtns"},(0,t.createElement)(n.Button,{variant:"primary",id:"dep-publish-slider-btn",onClick:function(){let e=document.getElementById("dep-slider-list").value,t=document.getElementById("dep-publish-slider-btn");t.setAttribute("disabled",!0),t.classList.add("is-busy");var i=new FormData;i.append("ID",e),i.append("status","published"),window.fetch(window.depicterSliders.ajax_url+"?action=depicter/document/store",{method:"post",body:i,headers:{"X-DEPICTER-CSRF":window.depicterSliders.token}}).then((e=>e.json())).then((i=>{if(i.hits){c(e);var n=document.querySelector(".depicter-notice-wrapper");n&&n.remove(),t.classList.remove("is-busy")}})).catch((e=>{console.error(e)}))}},depicterSliders.publish_text),(0,t.createElement)(n.Button,{variant:"secondary",onClick:function(){let e=document.getElementById("dep-slider-list").value,t=window.depicterSliders.editor_url.replace("document=1","document="+e);window.open(t)}},depicterSliders.edit_text))))),(0,t.createElement)("div",d,(0,t.createElement)("div",{className:"dep-widget-wrapper"},(0,t.createElement)("img",{src:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNS40LjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAzNTAgMzUwIiBzdHlsZT0iIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+DQoJLnN0MXtmaWxsOiMyNjVGRkY7fQ0KCS5zdDJ7ZmlsbDojRkZEMzAwO30NCgkuc3Qze2ZpbGw6I0ZGRTk4MDt9DQo8L3N0eWxlPg0KPGcgaWQ9ImRlcGljdGVyX2xvZ290eXBlIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTY1IC0zODYuOTk0KSI+DQoJPHBhdGggaWQ9IlJlY3RhbmdsZV83NzkiIGNsYXNzPSJzdDEiIGQ9Ik0yMzkuNSw1NDcuN2wxMTQuMi0xMTQuMmwwLDBsMTQ0LjgsMTQ0LjhsMCwwTDM1My4xLDcyMy41bDAsMEwyMzkuNSw2MDkuOQ0KCQlDMjIyLjMsNTkyLjcsMjIyLjMsNTY0LjksMjM5LjUsNTQ3Ljd6Ii8+DQoJPHBhdGggaWQ9IlJlY3RhbmdsZV83ODAiIGNsYXNzPSJzdDIiIGQ9Ik0yMDcuMiw0NzdsNDMuNS00My41bDAsMGwxNDQuOCwxNDQuOGwwLDBMMjUwLjEsNzIzLjVsMCwwbC00Mi45LTQyLjkNCgkJQzE1MC45LDYyNC40LDE1MC45LDUzMy4yLDIwNy4yLDQ3N3oiLz4NCgk8cGF0aCBpZD0iSW50ZXJzZWN0aW9uXzIyIiBjbGFzcz0ic3QzIiBkPSJNMjY3LjgsNjM4LjJjLTMyLjgtMzIuOC0zMi44LTg2LDAtMTE4LjhjMCwwLDAsMCwwLDBsMzQuNC0zNC40bDkzLjMsOTMuM0wzMDEuNiw2NzINCgkJTDI2Ny44LDYzOC4yeiIvPg0KPC9nPg0KPC9zdmc+DQo=",alt:"logo"}),(0,t.createElement)("span",null," ",function(e){let t=null;return e&&(t=depicterSliders.list.map((function(t){return t.value==e?t.label:null}))),t||"Select slider from list"}(r.id)," "))))}})}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=function(t,i,r,l){if(!i){var d=1/0;for(u=0;u<e.length;u++){i=e[u][0],r=e[u][1],l=e[u][2];for(var c=!0,s=0;s<i.length;s++)(!1&l||d>=l)&&Object.keys(n.O).every((function(e){return n.O[e](i[s])}))?i.splice(s--,1):(c=!1,l<d&&(d=l));if(c){e.splice(u--,1);var o=r();void 0!==o&&(t=o)}}return t}l=l||0;for(var u=e.length;u>0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[i,r,l]},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};n.O.j=function(t){return 0===e[t]};var t=function(t,i){var r,l,d=i[0],c=i[1],s=i[2],o=0;if(d.some((function(t){return 0!==e[t]}))){for(r in c)n.o(c,r)&&(n.m[r]=c[r]);if(s)var u=s(n)}for(t&&t(i);o<d.length;o++)l=d[o],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(u)},i=self.webpackChunkdepicter=self.webpackChunkdepicter||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))}();var r=n.O(void 0,[431],(function(){return n(86)}));r=n.O(r)}();
1 +!function(){var e,n={266:function(e,n,t){"use strict";var i=window.wp.blocks,o=window.wp.element,r=window.wp.blockEditor,a=window.wp.components,s=t(697),c=t.n(s),d=window.React,u=t.n(d);function l(){return l=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},l.apply(this,arguments)}function f(e,n){if(null==e)return{};var t,i,o={},r=Object.keys(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||(o[t]=e[t]);return o}var m,p,g=(m=function(e){!function(n){if("undefined"!=typeof window){var t,i=0,o=!1,r=!1,a="message".length,s="[iFrameSizer]",c=s.length,d=null,u=window.requestAnimationFrame,l={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},f={},m=null,p={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){x("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},g={};window.jQuery&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){H(t,e)})).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")),e.exports=A(),window.iFrameResize=window.iFrameResize||A()}function h(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,n,t){e.addEventListener(n,t,!1)}function b(e,n,t){e.removeEventListener(n,t,!1)}function y(e){return f[e]?f[e].log:o}function v(e,n){O("log",e,n,y(e))}function k(e,n){O("info",e,n,y(e))}function x(e,n){O("warn",e,n,!0)}function O(e,n,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return s+"["+function(e){var n="Host page: "+e;return window.top!==window.self&&(n=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),n}(e)+"]"}(n),t)}function E(e){function n(){t("Height"),t("Width"),P((function(){S(B),F(L),p("onResized",B)}),B,"init")}function t(e){var n=Number(f[L]["max"+e]),t=Number(f[L]["min"+e]),i=e.toLowerCase(),o=Number(B[i]);v(L,"Checking "+i+" is in range "+t+"-"+n),o<t&&(o=t,v(L,"Set "+i+" to min value")),o>n&&(o=n,v(L,"Set "+i+" to max value")),B[i]=""+o}function i(e){return N.substr(N.indexOf(":")+a+e)}function o(e,n){var t,i;t=function(){var t,i;W("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=B.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,n)},g[i=n]||(g[i]=setTimeout((function(){g[i]=null,t()}),32))}function r(e){var n=e.getBoundingClientRect();return z(L),{x:Math.floor(Number(n.left)+Number(d.x)),y:Math.floor(Number(n.top)+Number(d.y))}}function u(e){var n=e?r(B.iframe):{x:0,y:0},t={x:Number(B.width)+n.x,y:Number(B.height)+n.y};v(L,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):x(L,"Unable to scroll to requested position, window.parentIFrame not found"):(d=t,l(),v(L,"--"))}function l(){!1!==p("onScroll",d)?F(L):T()}function m(e){p(e,{iframe:B.iframe,screenX:B.width,screenY:B.height,type:B.type})}function p(e,n){return I(L,e,n)}var h,y,O,E,M,H,N=e.data,B={},L=null;"[iFrameResizerChild]Ready"===N?function(){for(var e in f)W("iFrame requested init",j(e),f[e].iframe,e)}():s===(""+N).substr(0,c)&&N.substr(c).split(":")[0]in f?(E=(O=N.substr(c).split(":"))[1]?parseInt(O[1],10):0,M=f[O[0]]&&f[O[0]].iframe,H=getComputedStyle(M),B={iframe:M,id:O[0],height:E+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(H)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(H),width:O[2],type:O[3]},L=B.id,f[L]&&(f[L].loaded=!0),(y=B.type in{true:1,false:1,undefined:1})&&v(L,"Ignoring init message from meta parent page"),!y&&function(e){var n=!0;return f[e]||(n=!1,x(B.type+" No settings for "+e+". Message was: "+N)),n}(L)&&(v(L,"Received: "+N),h=!0,null===B.iframe&&(x(L,"IFrame ("+B.id+") not found"),h=!1),h&&function(){var n,t=e.origin,i=f[L]&&f[L].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,n=!1;for(v(L,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():(n=f[L]&&f[L].remoteHost,v(L,"Checking connection is from: "+n),t===n)))throw new Error("Unexpected message received from: "+t+" for "+B.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(f[L]&&f[L].firstRun&&f[L]&&(f[L].firstRun=!1),B.type){case"close":R(B.iframe);break;case"message":c=i(6),v(L,"onMessage passed: {iframe: "+B.iframe.id+", message: "+c+"}"),p("onMessage",{iframe:B.iframe,message:JSON.parse(c)}),v(L,"--");break;case"mouseenter":m("onMouseEnter");break;case"mouseleave":m("onMouseLeave");break;case"autoResize":f[L].autoResize=JSON.parse(i(9));break;case"scrollTo":u(!1);break;case"scrollToOffset":u(!0);break;case"pageInfo":o(f[L]&&f[L].iframe,L),function(){function e(e,i){function r(){f[t]?o(f[t].iframe,t):n()}["scroll","resize"].forEach((function(n){v(t,e+n+" listener for sendPageInfo"),i(window,n,r)}))}function n(){e("Remove ",b)}var t=L;e("Add ",w),f[t]&&(f[t].stopPageInfo=n)}();break;case"pageInfoStop":f[L]&&f[L].stopPageInfo&&(f[L].stopPageInfo(),delete f[L].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(s=document.getElementById(a)||document.getElementsByName(a)[0])?(e=r(s),v(L,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),d={x:e.x,y:e.y},l(),v(L,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(t):v(L,"In page link #"+t+" not found and window.parentIFrame not found"):v(L,"In page link #"+t+" not found");break;case"reset":C(B);break;case"init":n(),p("onInit",B.iframe);break;default:n()}var e,t,a,s,c}())):k(L,"Ignored: "+N)}function I(e,n,t){var i=null,o=null;if(f[e]){if("function"!=typeof(i=f[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=i(t)}return o}function M(e){var n=e.id;delete f[n]}function R(e){var n=e.id;if(!1!==I(n,"onClose",n)){v(n,"Removing iFrame: "+n);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){x(e)}I(n,"onClosed",n),v(n,"--"),M(e)}else v(n,"Close iframe cancelled by onClose event")}function z(e){null===d&&v(e,"Get page position: "+(d={x:window.pageXOffset!==n?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==n?window.pageYOffset:document.documentElement.scrollTop}).x+","+d.y)}function F(e){null!==d&&(window.scrollTo(d.x,d.y),v(e,"Set page position: "+d.x+","+d.y),T())}function T(){d=null}function C(e){v(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),z(e.id),P((function(){S(e),W("reset","reset",e.iframe,e.id)}),e,"reset")}function S(e){function n(n){r||"0"!==e[n]||(r=!0,v(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(f).forEach((function(e){!function(e){function n(n){return"0px"===(f[e]&&f[e].iframe.style[n])}f[e]&&null!==f[e].iframe.offsetParent&&(n("height")||n("width"))&&W("Visibility change","resize",f[e].iframe,e)}(e)}))}function n(n){v("window","Mutation observed: "+n[0].target+" "+n[0].type),N(e,16)}var t,i=h();i&&(t=document.querySelector("body"),new i(n).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(n){e.id?(e.iframe.style[n]=e[n]+"px",v(e.id,"IFrame ("+i+") "+n+" set to "+e[n]+"px")):v("undefined","messageData id not set")}(t),n(t)}var i=e.iframe.id;f[i]&&(f[i].sizeHeight&&t("height"),f[i].sizeWidth&&t("width"))}function P(e,n,t){t!==n.type&&u&&!window.jasmine?(v(n.id,"Requesting animation frame"),u(e)):e()}function W(e,n,t,i,o){var r,a=!1;i=i||t.id,f[i]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(r=f[i]&&f[i].targetOrigin,v(i,"["+e+"] Sending msg to iframe["+i+"] ("+n+") targetOrigin: "+r),t.contentWindow.postMessage(s+n,r)):x(i,"["+e+"] IFrame("+i+") not found"),o&&f[i]&&f[i].warningTimeout&&(f[i].msgTimeout=setTimeout((function(){!f[i]||f[i].loaded||a||(a=!0,x(i,"IFrame has not responded within "+f[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),f[i].warningTimeout)))}function j(e){return e+":"+f[e].bodyMarginV1+":"+f[e].sizeWidth+":"+f[e].log+":"+f[e].interval+":"+f[e].enablePublicMethods+":"+f[e].autoResize+":"+f[e].bodyMargin+":"+f[e].heightCalculationMethod+":"+f[e].bodyBackground+":"+f[e].bodyPadding+":"+f[e].tolerance+":"+f[e].inPageLinks+":"+f[e].resizeFrom+":"+f[e].widthCalculationMethod}function H(e,t){function r(e){var n=e.split("Callback");if(2===n.length){var t="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1);this[t]=this[e],delete this[e],x(c,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var a,s,c=function(n){var r;return""===n&&(e.id=(r=t&&t.id||p.id+i++,null!==document.getElementById(r)&&(r+=i++),n=r),o=(t||{}).log,v(n,"Added missing iframe ID: "+n+" ("+e.src+")")),n}(e.id);c in f&&"iFrameResizer"in e?x(c,"Ignored iFrame, already setup."):(function(n){var t;n=n||{},f[c]={firstRun:!0,iframe:e,remoteHost:e.src&&e.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(n),Object.keys(n).forEach(r,n),function(e){for(var n in p)Object.prototype.hasOwnProperty.call(p,n)&&(f[c][n]=Object.prototype.hasOwnProperty.call(e,n)?e[n]:p[n])}(n),f[c]&&(f[c].targetOrigin=!0===f[c].checkOrigin?""===(t=f[c].remoteHost)||null!==t.match(/^(about:blank|javascript:|file:\/\/)/)?"*":t:"*")}(t),function(){switch(v(c,"IFrame scrolling "+(f[c]&&f[c].scrolling?"enabled":"disabled")+" for "+c),e.style.overflow=!1===(f[c]&&f[c].scrolling)?"hidden":"auto",f[c]&&f[c].scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=f[c]?f[c].scrolling:"no"}}(),function(){function n(n){1/0!==f[c][n]&&0!==f[c][n]&&(e.style[n]=f[c][n]+"px",v(c,"Set "+n+" = "+f[c][n]+"px"))}function t(e){if(f[c]["min"+e]>f[c]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}t("Height"),t("Width"),n("maxHeight"),n("minHeight"),n("maxWidth"),n("minWidth")}(),"number"!=typeof(f[c]&&f[c].bodyMargin)&&"0"!==(f[c]&&f[c].bodyMargin)||(f[c].bodyMarginV1=f[c].bodyMargin,f[c].bodyMargin=f[c].bodyMargin+"px"),a=j(c),(s=h())&&function(n){e.parentNode&&new n((function(n){n.forEach((function(n){Array.prototype.slice.call(n.removedNodes).forEach((function(n){n===e&&R(e)}))}))})).observe(e.parentNode,{childList:!0})}(s),w(e,"load",(function(){var t,i;W("iFrame.onload",a,e,n,!0),t=f[c]&&f[c].firstRun,i=f[c]&&f[c].heightCalculationMethod in l,!t&&i&&C({iframe:e,height:0,width:0,type:"init"})})),W("init",a,e,n,!0),f[c]&&(f[c].iframe.iFrameResizer={close:R.bind(null,f[c].iframe),removeListeners:M.bind(null,f[c].iframe),resize:W.bind(null,"Window resize","resize",f[c].iframe),moveToAnchor:function(e){W("Move to anchor","moveToAnchor:"+e,f[c].iframe,c)},sendMessage:function(e){W("Send Message","message:"+(e=JSON.stringify(e)),f[c].iframe,c)}}))}function N(e,n){null===m&&(m=setTimeout((function(){m=null,e()}),n))}function B(){"hidden"!==document.visibilityState&&(v("document","Trigger event: Visiblity change"),N((function(){L("Tab Visable","resize")}),16))}function L(e,n){Object.keys(f).forEach((function(t){(function(e){return f[e]&&"parent"===f[e].resizeFrom&&f[e].autoResize&&!f[e].firstRun})(t)&&W(e,n,f[t].iframe,t)}))}function A(){function e(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),H(n,e),t.push(n))}var t;return function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!u;e+=1)u=window[n[e]+"RequestAnimationFrame"];u?u=u.bind(window):v("setup","RequestAnimationFrame not supported")}(),w(window,"message",E),w(window,"resize",(function(){v("window","Trigger event: resize"),N((function(){L("Window resize","resize")}),16)})),w(document,"visibilitychange",B),w(document,"-webkit-visibilitychange",B),function(i,o){switch(t=[],function(e){e&&e.enablePublicMethods&&x("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),e.bind(n,i));break;case"object":e(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return t}}}()},m(p={exports:{}}),p.exports),h=function(){},w=function(e){var n=e.title,t=e.forwardRef,i=f(e,["title","forwardRef"]),o=function(e){return e.autoResize,e.bodyBackground,e.bodyMargin,e.bodyPadding,e.checkOrigin,e.inPageLinks,e.heightCalculationMethod,e.interval,e.log,e.maxHeight,e.maxWidth,e.minHeight,e.minWidth,e.resizeFrom,e.scrolling,e.sizeHeight,e.sizeWidth,e.warningTimeout,e.tolerance,e.widthCalculationMethod,e.onClosed,e.onInit,e.onMessage,e.onMouseEnter,e.onMouseLeave,e.onResized,f(e,["autoResize","bodyBackground","bodyMargin","bodyPadding","checkOrigin","inPageLinks","heightCalculationMethod","interval","log","maxHeight","maxWidth","minHeight","minWidth","resizeFrom","scrolling","sizeHeight","sizeWidth","warningTimeout","tolerance","widthCalculationMethod","onClosed","onInit","onMessage","onMouseEnter","onMouseLeave","onResized"])}(i),r=(0,d.useRef)(null),a=function(){return h(!r.current,"[iframeSizerReact]["+(r&&r.current&&r.current.id)+"] Close event ignored, to remove the iframe update your React component"),!r.current};return(0,d.useEffect)((function(){var e=r.current;return g(l({},i,{onClose:a}),e),function(){return e.iFrameResizer&&e.iFrameResizer.removeListeners()}}),[]),(0,d.useImperativeHandle)(t,(function(){return{resize:function(){return r.current.iFrameResizer.resize()},moveToAnchor:function(e){return r.current.iFrameResizer.moveToAnchor(e)},sendMessage:function(e,n){r.current.iFrameResizer.sendMessage(e,n)}}})),u().createElement("iframe",l({title:n},o,{ref:r}))};w.defaultProps={title:"iframe"},w.propTypes={title:c().string};var b=w;(0,i.registerBlockType)("depicter/slider",{edit:function(e){let{attributes:n,setAttributes:t}=e;const i=(0,r.useBlockProps)();function s(e){window.fetch(window.depicterSliders.ajax_url+"?action=depicter/document/status&ID="+e,{method:"GET",headers:{"Content-Type":"text/html","X-DEPICTER-CSRF":window.depicterSliders.token}}).then((e=>e.json())).then((function(e){let n=document.getElementById("dep-publish-slider-btn");void 0===e.status||"publish"!=e.status?n.removeAttribute("disabled"):n.setAttribute("disabled",!0)})).catch((function(){}))}return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(r.InspectorControls,{key:"setting"},(0,o.createElement)(a.Panel,{header:"Depicter"},(0,o.createElement)(a.PanelBody,{title:"Depicter Settings",initialOpen:!0},(0,o.createElement)(a.PanelRow,null,(0,o.createElement)(a.SelectControl,{id:"dep-slider-list",label:"Slider",value:n.id,options:depicterSliders.list,onChange:function(e){t({id:Number(e)}),s(e)}})),(0,o.createElement)(a.PanelRow,{className:"sliderBtns"},(0,o.createElement)(a.Button,{variant:"primary",id:"dep-publish-slider-btn",onClick:function(){let e=document.getElementById("dep-slider-list").value,n=document.getElementById("dep-publish-slider-btn");n.setAttribute("disabled",!0),n.classList.add("is-busy");var t=new FormData;t.append("ID",e),t.append("status","published"),window.fetch(window.depicterSliders.ajax_url+"?action=depicter/document/store",{method:"post",body:t,headers:{"X-DEPICTER-CSRF":window.depicterSliders.token}}).then((e=>e.json())).then((t=>{if(t.hits){s(e);var i=document.querySelector(".depicter-notice-wrapper");i&&i.remove(),n.classList.remove("is-busy")}})).catch((e=>{console.error(e)}))}},depicterSliders.publish_text),(0,o.createElement)(a.Button,{variant:"secondary",onClick:function(){let e=document.getElementById("dep-slider-list").value,n=window.depicterSliders.editor_url.replace("document=1","document="+e);window.open(n)}},depicterSliders.edit_text))))),(0,o.createElement)("div",i,(0,o.createElement)(b,{src:`${window.depicterSliders.ajax_url}?action=depicter/document/preview&depicter-csrf=${window.depicterSliders.token}&ID=${n.id}&status=draft|publish&gutenberg=true`,style:{width:"1px",minWidth:"100%"}})))}})},703:function(e,n,t){"use strict";var i=t(414);function o(){}function r(){}r.resetWarningCache=o,e.exports=function(){function e(e,n,t,o,r,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function n(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:o};return t.PropTypes=t,t}},697:function(e,n,t){e.exports=t(703)()},414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},t={};function i(e){var o=t[e];if(void 0!==o)return o.exports;var r=t[e]={exports:{}};return n[e](r,r.exports,i),r.exports}i.m=n,e=[],i.O=function(n,t,o,r){if(!t){var a=1/0;for(u=0;u<e.length;u++){t=e[u][0],o=e[u][1],r=e[u][2];for(var s=!0,c=0;c<t.length;c++)(!1&r||a>=r)&&Object.keys(i.O).every((function(e){return i.O[e](t[c])}))?t.splice(c--,1):(s=!1,r<a&&(a=r));if(s){e.splice(u--,1);var d=o();void 0!==d&&(n=d)}}return n}r=r||0;for(var u=e.length;u>0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[t,o,r]},i.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(n,{a:n}),n},i.d=function(e,n){for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},function(){var e={826:0,431:0};i.O.j=function(n){return 0===e[n]};var n=function(n,t){var o,r,a=t[0],s=t[1],c=t[2],d=0;if(a.some((function(n){return 0!==e[n]}))){for(o in s)i.o(s,o)&&(i.m[o]=s[o]);if(c)var u=c(i)}for(n&&n(t);d<a.length;d++)r=a[d],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return i.O(u)},t=self.webpackChunkdepicter=self.webpackChunkdepicter||[];t.forEach(n.bind(null,0)),t.push=n.bind(null,t.push.bind(t))}();var o=i.O(void 0,[431],(function(){return i(266)}));o=i.O(o)}();