File: /home/j2d7uhbqfejh/public_html/zorgosso.nl/wp-content/plugins/responsive-lightbox/js/admin-theme.js
var e=Object.defineProperty,t=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,n=(t,o,r)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r,s=(e,s)=>{for(var a in s||(s={}))o.call(s,a)&&n(e,a,s[a]);if(t)for(var a of t(s))r.call(s,a)&&n(e,a,s[a]);return e};!function(){const e=(e,t=0,o=1)=>e>o?o:e<t?t:e,t=(e,t=0,o=Math.pow(10,t))=>Math.round(o*e)/o,o=e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?t(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?t(parseInt(e.substring(6,8),16)/255,2):1}),r=e=>{const{h:o,s:r,l:n}=(({h:e,s:o,v:r,a:n})=>{const s=(200-o)*r/100;return{h:t(e),s:t(s>0&&s<200?o*r/100/(s<=100?s:200-s)*100:0),l:t(s/2),a:t(n,2)}})(e);return`hsl(${o}, ${r}%, ${n}%)`},n=({h:e,s:o,v:r,a:n})=>{e=e/360*6,o/=100,r/=100;const s=Math.floor(e),a=r*(1-o),i=r*(1-(e-s)*o),l=r*(1-(1-e+s)*o),c=s%6;return{r:t(255*[r,i,a,a,l,r][c]),g:t(255*[l,r,r,i,a,a][c]),b:t(255*[a,a,l,r,r,i][c]),a:t(n,2)}},a=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},i=({r:e,g:o,b:r,a:n})=>{const s=n<1?a(t(255*n)):"";return"#"+a(e)+a(o)+a(r)+s},l=({r:e,g:o,b:r,a:n})=>{const s=Math.max(e,o,r),a=s-Math.min(e,o,r),i=a?s===e?(o-r)/a:s===o?2+(r-e)/a:4+(e-o)/a:0;return{h:t(60*(i<0?i+6:i)),s:t(s?a/s*100:0),v:t(s/255*100),a:n}},c=(e,t)=>{if(e===t)return!0;for(const o in e)if(e[o]!==t[o])return!1;return!0},d={},u=e=>{let t=d[e];return t||(t=document.createElement("template"),t.innerHTML=e,d[e]=t),t},h=(e,t,o)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))};let p=!1;const f=e=>"touches"in e,v=(t,o)=>{const r=f(o)?o.touches[0]:o,n=t.el.getBoundingClientRect();h(t.el,"move",t.getMove({x:e((r.pageX-(n.left+window.pageXOffset))/n.width),y:e((r.pageY-(n.top+window.pageYOffset))/n.height)}))};class b{constructor(e,t,o,r){const n=u(`<div role="slider" tabindex="0" part="${t}" ${o}><div part="${t}-pointer"></div></div>`);e.appendChild(n.content.cloneNode(!0));const s=e.querySelector(`[part=${t}]`);s.addEventListener("mousedown",this),s.addEventListener("touchstart",this),s.addEventListener("keydown",this),this.el=s,this.xy=r,this.nodes=[s.firstChild,s]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(p?"touchmove":"mousemove",this),t(p?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(p&&!f(e)||(p||(p=f(e)),0)))(e)||!p&&0!=e.button)return;this.el.focus(),v(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),v(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const o=t.keyCode;o>40||e.xy&&o<37||o<33||(t.preventDefault(),h(e.el,"move",e.getMove({x:39===o?.01:37===o?-.01:34===o?.05:33===o?-.05:35===o?1:36===o?-1:0,y:40===o?.01:38===o?-.01:0},!0)))})(this,e)}}style(e){e.forEach((e,t)=>{for(const o in e)this.nodes[t].style.setProperty(o,e[o])})}}class g extends b{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:r({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${t(e)}`)}getMove(t,o){return{h:o?e(this.h+360*t.x,0,360):360*t.x}}}class m extends b{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:r(e)},{"background-color":r({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${t(e.s)}%, Brightness ${t(e.v)}%`)}getMove(t,o){return{s:o?e(this.hsva.s+100*t.x,0,100):100*t.x,v:o?e(this.hsva.v-100*t.y,0,100):Math.round(100-100*t.y)}}}const y=Symbol("same"),E=Symbol("color"),x=Symbol("hsva"),w=Symbol("update"),L=Symbol("parts"),A=Symbol("css"),k=Symbol("sliders");class $ extends HTMLElement{static get observedAttributes(){return["color"]}get[A](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[k](){return[m,g]}get color(){return this[E]}set color(e){if(!this[y](e)){const t=this.colorModel.toHsva(e);this[w](t),this[E]=e}}constructor(){super();const e=u(`<style>${this[A].join("")}</style>`),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[L]=this[k].map(e=>new e(t))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,o){const r=this.colorModel.fromAttr(o);this[y](r)||(this.color=r)}handleEvent(e){const t=this[x],o=s(s({},t),e.detail);let r;this[w](o),c(o,t)||this[y](r=this.colorModel.fromHsva(o))||(this[E]=r,h(this,"color-changed",{value:r}))}[y](e){return this.color&&this.colorModel.equal(e,this.color)}[w](e){this[x]=e,this[L].forEach(t=>t.update(e))}}const S={defaultColor:"#000",toHsva:e=>l(o(e)),fromHsva:({h:e,s:t,v:o})=>i(n({h:e,s:t,v:o,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||c(o(e),o(t)),fromAttr:e=>e};class q extends ${get colorModel(){return S}}customElements.define("hex-color-picker",class extends q{});const C=/^[0-9a-f]{3}([0-9a-f]{3})?$/i,M=e=>{if(!e)return"";const t=e.trim();if(!t)return"";const o=t.startsWith("#")?t.slice(1):t;return C.test(o)?`#${o.toLowerCase()}`:""};function I(){const e=document.querySelector("[data-settings-prefix]"),t=e?e.dataset.settingsPrefix:"";if(!t)return;const o=`.${t}-hex-color-picker`,r=`.${t}-field-type-color`,n=`.${t}-color-input`,s=`.${t}-color-swatch`,a=`.${t}-color-popover`,i=`.${t}-color-control`,l=`${t}ColorInitialized`;document.querySelectorAll(r).forEach(e=>{if("true"===e.dataset[l])return;const t=e.querySelector(n),r=e.querySelector(s),c=e.querySelector(a),d=e.querySelector(o),u=e.querySelector(i);if(!(t&&r&&c&&d&&u))return;d.addEventListener("mousedown",e=>e.stopPropagation()),e.dataset[l]="true";let h=M(t.value)||"#000000";const p=(e,{setInput:o=!0,dispatch:n=!0,setPicker:s=!0}={})=>{const a=M(e);return!!a&&(h=a,o&&(t.value=a),r.style.backgroundColor=a,s&&d.color!==a&&(d.color=a),n&&t.dispatchEvent(new Event("input",{bubbles:!0})),!0)},f=()=>{e.classList.contains("is-open")||(e.classList.add("is-open"),c.removeAttribute("aria-hidden"),r.setAttribute("aria-expanded","true"),document.addEventListener("mousedown",b,!0),document.addEventListener("keydown",g))},v=()=>{e.classList.contains("is-open")&&(e.classList.remove("is-open"),c.setAttribute("aria-hidden","true"),r.setAttribute("aria-expanded","false"),document.removeEventListener("mousedown",b,!0),document.removeEventListener("keydown",g))},b=e=>{const t="function"==typeof e.composedPath?e.composedPath():[];u.contains(e.target)||t.includes(u)||t.includes(c)||t.includes(d)||v()},g=e=>{"Escape"===e.key&&v()};p(h,{setInput:!0,dispatch:!1}),r.addEventListener("click",t=>{t.preventDefault(),e.classList.contains("is-open")?v():f()}),t.addEventListener("click",f),t.addEventListener("input",()=>{const e=M(t.value);e&&(t.value!==e&&(t.value=e),h=e,r.style.backgroundColor=e,d.color!==e&&(d.color=e))}),t.addEventListener("blur",()=>{p(t.value,{setInput:!0,dispatch:!1})||p(h,{setInput:!0,dispatch:!1})}),d.addEventListener("color-changed",e=>{p(e.detail.value,{setPicker:!1})})})}function P(){document.querySelectorAll('input[type="range"][data-range-output]').forEach(e=>{const t=e.getAttribute("data-range-output"),o=document.getElementById(t);o&&e.addEventListener("input",()=>{o.textContent=e.value})})}function O(){const e=document.querySelector("[data-settings-prefix]"),t=e?e.dataset.settingsPrefix:"";if(!t)return;const o=`data-${t}-logic`,r=`data-${t}-fallback-option`,n=`${t}-hidden`,s=`${t}CondDisabled`,a=`_${t}AnimHandler`,i=[],l=new Map;document.querySelectorAll(`[${o}]`).forEach(e=>{var n,s;const a=(e=>{const t=e.getAttribute(o);if(!t)return[];try{const e=JSON.parse(t);if(Array.isArray(e))return e;if(e&&"object"==typeof e)return[e]}catch(r){return[]}return[]})(e);if(!a.length)return;const c=a.map(e=>({field:e.field,operator:e.operator,value:e.value,scope:e.scope||"field",action:e.action||"",target:e.target||"",container:e.container||""})),d=(null===(n=c.find(e=>e.container))||void 0===n?void 0:n.container)||"";let u=null;"self"===d?u=e:d&&(u=e.querySelector(d)||document.querySelector(d)),u||(u=e.closest("tr")||e);const h=e.getAttribute(`data-${t}-animation`),p=(null===(s=c.find(e=>e.action))||void 0===s?void 0:s.action)||"show",f=e.getAttribute(r)||"",v={el:e,row:u,logic:c,animation:h,defaultAction:p,fallbackOption:f};i.push(v),c.forEach(e=>{l.has(e.field)||l.set(e.field,[]);const t=l.get(e.field);t.includes(v)||t.push(v)})});const c=e=>{const t=(e=>{const t=document.getElementById(e);if(t)return"checkbox"===t.type||"radio"===t.type?t.checked?t.value:"":t.value;const o=document.querySelectorAll(`input[type="radio"][id^="${e}-"]`);if(o.length>0){for(const e of o)if(e.checked)return e.value;return null}const r=document.querySelectorAll(`input[type="checkbox"][id^="${e}-"]`);if(r.length>0){const e=[];return r.forEach(t=>{t.checked&&e.push(t.value)}),e}return null})(e.field);if(null===t)return!1;switch(e.operator){case"is":return t===e.value;case"isnot":return t!==e.value;case"contains":return("string"==typeof t||Array.isArray(t))&&t.includes(e.value);case"containsnot":return("string"==typeof t||Array.isArray(t))&&!t.includes(e.value);default:return!1}},d=(e,o,r=!0)=>{const{row:s,animation:i}=e,l=s.classList.contains(n);if(o===!l)return Promise.resolve();if(!r||!i||!["fade","slide"].includes(i))return s.classList.toggle(n,!o),Promise.resolve();const c=`${t}-anim-in`,d=`${t}-anim-out`,u=`${t}-anim-${i}`;return new Promise(e=>{s[a]&&(s.removeEventListener("animationend",s[a]),s[a]=null);const t=()=>{s.classList.remove(c,d,u),o?s.classList.remove(n):s.classList.add(n),s.removeEventListener("animationend",t),s[a]=null,e()};s.classList.remove(c,d,u),o?(s.classList.remove(n),s.classList.add(c,u)):s.classList.add(d,u),s[a]=t,s.addEventListener("animationend",t,{once:!0})})},u=(e,o)=>{const r=e.el.querySelectorAll("input, select, textarea, button"),n=`${t}-disabled`;r.forEach(e=>{o?e.disabled||(e.dataset[s]="true",e.disabled=!0):"true"===e.dataset[s]&&(e.disabled=!1,delete e.dataset[s])}),e.el.classList.toggle(n,o)},h=(e,t,o,r)=>{const a=e.action||r;if(!a)return;const i=((e,t)=>{if(e.target)return Array.from(document.querySelectorAll(e.target));const o=t.el.querySelectorAll('input[type="radio"]');if(o.length)return Array.from(o).filter(t=>t.value===e.value);const r=t.el.querySelectorAll('input[type="checkbox"]');if(r.length)return Array.from(r).filter(t=>t.value===e.value);const n=t.el.querySelector("select");return n?Array.from(n.options).filter(t=>t.value===e.value):[]})(e,t);i.length&&i.forEach(e=>{if("disable"===a||"enable"===a){((e,t)=>{t?e.disabled||(e.dataset[s]="true",e.disabled=!0):"true"===e.dataset[s]&&(e.disabled=!1,delete e.dataset[s])})(e,"disable"===a?o:!o)}else if("show"===a||"hide"===a){const t="show"===a?o:!o;e.classList.toggle(n,!t)}})},p=e=>{if(!e.fallbackOption)return;const t=e.el.querySelectorAll('input[type="radio"]');if(t.length){const o=Array.from(t).find(e=>e.checked);if(!o||o.disabled){let o=Array.from(t).find(t=>t.value===e.fallbackOption&&!t.disabled);o||(o=Array.from(t).find(e=>!e.disabled)||null),o&&!o.checked&&(o.checked=!0,o.dispatchEvent(new Event("change",{bubbles:!0})))}return}const o=e.el.querySelector("select");if(o){const t=o.options[o.selectedIndex];if(t&&!t.disabled)return;let r=Array.from(o.options).find(t=>t.value===e.fallbackOption&&!t.disabled);r||(r=Array.from(o.options).find(e=>!e.disabled)),r&&(o.value=r.value,o.dispatchEvent(new Event("change",{bubbles:!0})))}},f=new Set,v=new Map;l.forEach((e,t)=>{if(f.has(t))return;v.has(t)||v.set(t,{seq:0});((e,t)=>{const o=document.getElementById(e);if(o)return o.addEventListener("change",t),void o.addEventListener("input",t);document.querySelectorAll(`input[type="radio"][id^="${e}-"]`).forEach(e=>{e.addEventListener("change",t)}),document.querySelectorAll(`input[type="checkbox"][id^="${e}-"]`).forEach(e=>{e.addEventListener("change",t)})})(t,()=>{const o=v.get(t),r=++o.seq,s=[],a=[];if(e.forEach(e=>{var t;const o=e.logic.filter(e=>"option"===e.scope),r=e.logic.filter(e=>"option"!==e.scope);if(o.forEach(t=>{const o=c(t);h(t,e,o,e.defaultAction)}),p(e),!r.length)return;const i=(null===(t=r.find(e=>e.action))||void 0===t?void 0:t.action)||e.defaultAction,l=r.every(e=>c(e));if("enable"===i||"disable"===i){return void u(e,"disable"===i?l:!l)}const d=e.row.classList.contains(n),f="show"===i?l:!l;f&&d?a.push(e):f||d||s.push(e)}),s.length>0){const e=s.map(e=>d(e,!1,!0));Promise.all(e).then(()=>{o.seq===r&&a.forEach(e=>d(e,!0,!0))})}else a.forEach(e=>d(e,!0,!0))}),f.add(t)}),i.forEach(e=>{var t;const o=e.logic.filter(e=>"option"===e.scope),r=e.logic.filter(e=>"option"!==e.scope);if(o.forEach(t=>{const o=c(t);h(t,e,o,e.defaultAction)}),p(e),!r.length)return;const n=(null===(t=r.find(e=>e.action))||void 0===t?void 0:t.action)||e.defaultAction,s=r.every(e=>c(e));if("enable"===n||"disable"===n){return void u(e,"disable"===n?s:!s)}d(e,"show"===n?s:!s,!1)})}document.addEventListener("DOMContentLoaded",()=>{I(),P(),O()}),document.addEventListener("wpAjaxContentLoaded",()=>{I(),P(),O()})}();