-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathgallery-block.js
More file actions
2 lines (2 loc) · 79.6 KB
/
gallery-block.js
File metadata and controls
2 lines (2 loc) · 79.6 KB
1
2
(()=>{var e={1780(e){"use strict";function t(e,t){var r,n;if("function"==typeof t)void 0!==(n=t(e))&&(e=n);else if(Array.isArray(t))for(r=0;r<t.length;r++)void 0!==(n=t[r](e))&&(e=n);return e}function r(e,t){return"-"===e[0]&&Array.isArray(t)&&/^-\d+$/.test(e)?t.length+parseInt(e,10):e}function n(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(e){return Object(e)===e}function i(e){return 0===Object.keys(e).length}var a=["__proto__","prototype","constructor"],s=function(e){return-1===a.indexOf(e)};function l(e,t){e.indexOf("[")>=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var r=e.split(t);if(r.filter(s).length!==r.length)throw Error("Refusing to update blacklisted property "+e);return r}var c=Object.prototype.hasOwnProperty;function u(e,t,r,n){if(!(this instanceof u))return new u(e,t,r,n);void 0===t&&(t=!1),void 0===r&&(r=!0),void 0===n&&(n=!0),this.separator=e||".",this.override=t,this.useArray=r,this.useBrackets=n,this.keepArray=!1,this.cleanup=[]}var p=new u(".",!1,!0,!0);function d(e){return function(){return p[e].apply(p,arguments)}}u.prototype._fill=function(e,r,n,a){var s=e.shift();if(e.length>0){if(r[s]=r[s]||(this.useArray&&function(e){return/^\d+$/.test(e)}(e[0])?[]:{}),!o(r[s])){if(!this.override){if(!o(n)||!i(n))throw new Error("Trying to redefine `"+s+"` which is a "+typeof r[s]);return}r[s]={}}this._fill(e,r[s],n,a)}else{if(!this.override&&o(r[s])&&!i(r[s])){if(!o(n)||!i(n))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}r[s]=t(n,a)}},u.prototype.object=function(e,r){var n=this;return Object.keys(e).forEach(function(o){var i=void 0===r?null:r[o],a=l(o,n.separator).join(n.separator);-1!==a.indexOf(n.separator)?(n._fill(a.split(n.separator),e,e[o],i),delete e[o]):e[o]=t(e[o],i)}),e},u.prototype.str=function(e,r,n,o){var i=l(e,this.separator).join(this.separator);return-1!==e.indexOf(this.separator)?this._fill(i.split(this.separator),n,r,o):n[e]=t(r,o),n},u.prototype.pick=function(e,t,n,o){var i,a,s,c,u;for(a=l(e,this.separator),i=0;i<a.length;i++){if(c=r(a[i],t),!t||"object"!=typeof t||!(c in t))return;if(i===a.length-1)return n?(s=t[c],o&&Array.isArray(t)?t.splice(c,1):delete t[c],Array.isArray(t)&&(u=a.slice(0,-1).join("."),-1===this.cleanup.indexOf(u)&&this.cleanup.push(u)),s):t[c];t=t[c]}return n&&Array.isArray(t)&&(t=t.filter(function(e){return void 0!==e})),t},u.prototype.delete=function(e,t){return this.remove(e,t,!0)},u.prototype.remove=function(e,t,r){var n;if(this.cleanup=[],Array.isArray(e)){for(n=0;n<e.length;n++)this.pick(e[n],t,!0,r);return r||this._cleanup(t),t}return this.pick(e,t,!0,r)},u.prototype._cleanup=function(e){var t,r,n,o;if(this.cleanup.length){for(r=0;r<this.cleanup.length;r++)t=(t=(o=(n=this.cleanup[r].split(".")).splice(0,-1).join("."))?this.pick(o,e):e)[n[0]].filter(function(e){return void 0!==e}),this.set(this.cleanup[r],t,e);this.cleanup=[]}},u.prototype.del=u.prototype.remove,u.prototype.move=function(e,r,n,o,i){return"function"==typeof o||Array.isArray(o)?this.set(r,t(this.pick(e,n,!0),o),n,i):(i=o,this.set(r,this.pick(e,n,!0),n,i)),n},u.prototype.transfer=function(e,r,n,o,i,a){return"function"==typeof i||Array.isArray(i)?this.set(r,t(this.pick(e,n,!0),i),o,a):(a=i,this.set(r,this.pick(e,n,!0),o,a)),o},u.prototype.copy=function(e,r,n,o,i,a){return"function"==typeof i||Array.isArray(i)?this.set(r,t(JSON.parse(JSON.stringify(this.pick(e,n,!1))),i),o,a):(a=i,this.set(r,this.pick(e,n,!1),o,a)),o},u.prototype.set=function(e,t,r,o){var i,a,s,u;if(void 0===t)return r;for(s=l(e,this.separator),i=0;i<s.length;i++){if(u=s[i],i===s.length-1)if(o&&n(t)&&n(r[u]))for(a in t)c.call(t,a)&&(r[u][a]=t[a]);else if(o&&Array.isArray(r[u])&&Array.isArray(t))for(var p=0;p<t.length;p++)r[s[i]].push(t[p]);else r[u]=t;else c.call(r,u)&&(n(r[u])||Array.isArray(r[u]))||(/^\d+$/.test(s[i+1])?r[u]=[]:r[u]={});r=r[u]}return r},u.prototype.transform=function(e,t,r){return t=t||{},r=r||{},Object.keys(e).forEach(function(n){this.set(e[n],this.pick(n,t),r)}.bind(this)),r},u.prototype.dot=function(e,t,r){t=t||{},r=r||[];var a=Array.isArray(e);return Object.keys(e).forEach(function(s){var l=a&&this.useBrackets?"["+s+"]":s;if(o(e[s])&&(n(e[s])&&!i(e[s])||Array.isArray(e[s])&&!this.keepArray&&0!==e[s].length)){if(a&&this.useBrackets){var c=r[r.length-1]||"";return this.dot(e[s],t,r.slice(0,-1).concat(c+l))}return this.dot(e[s],t,r.concat(l))}a&&this.useBrackets?t[r.join(this.separator).concat("["+s+"]")]=e[s]:t[r.concat(l).join(this.separator)]=e[s]}.bind(this)),t},u.pick=d("pick"),u.move=d("move"),u.transfer=d("transfer"),u.transform=d("transform"),u.copy=d("copy"),u.object=d("object"),u.str=d("str"),u.set=d("set"),u.delete=d("delete"),u.del=u.remove=d("remove"),u.dot=d("dot"),["override","overwrite"].forEach(function(e){Object.defineProperty(u,e,{get:function(){return p.override},set:function(e){p.override=!!e}})}),["useArray","keepArray","useBrackets"].forEach(function(e){Object.defineProperty(u,e,{get:function(){return p[e]},set:function(t){p[e]=t}})}),u._process=t,e.exports=u},5580(e,t,r){var n=r(6110)(r(9325),"DataView");e.exports=n},1549(e,t,r){var n=r(2032),o=r(3862),i=r(6721),a=r(2749),s=r(5749);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,e.exports=l},79(e,t,r){var n=r(3702),o=r(80),i=r(4739),a=r(8655),s=r(1175);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,e.exports=l},8223(e,t,r){var n=r(6110)(r(9325),"Map");e.exports=n},3661(e,t,r){var n=r(3040),o=r(7670),i=r(289),a=r(4509),s=r(2949);function l(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}l.prototype.clear=n,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,e.exports=l},2804(e,t,r){var n=r(6110)(r(9325),"Promise");e.exports=n},6545(e,t,r){var n=r(6110)(r(9325),"Set");e.exports=n},7217(e,t,r){var n=r(79),o=r(1420),i=r(938),a=r(3605),s=r(9817),l=r(945);function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},1873(e,t,r){var n=r(9325).Symbol;e.exports=n},7828(e,t,r){var n=r(9325).Uint8Array;e.exports=n},8303(e,t,r){var n=r(6110)(r(9325),"WeakMap");e.exports=n},3729(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},9770(e){e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}},695(e,t,r){var n=r(8096),o=r(2428),i=r(6449),a=r(3656),s=r(361),l=r(7167),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),u=!r&&o(e),p=!r&&!u&&a(e),d=!r&&!u&&!p&&l(e),f=r||u||p||d,h=f?n(e.length,String):[],v=h.length;for(var y in e)!t&&!c.call(e,y)||f&&("length"==y||p&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,v))||h.push(y);return h}},4528(e){e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},6547(e,t,r){var n=r(3360),o=r(5288),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},6025(e,t,r){var n=r(5288);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},4733(e,t,r){var n=r(1791),o=r(5950);e.exports=function(e,t){return e&&n(t,o(t),e)}},3838(e,t,r){var n=r(1791),o=r(7241);e.exports=function(e,t){return e&&n(t,o(t),e)}},3360(e,t,r){var n=r(3243);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},9999(e,t,r){var n=r(7217),o=r(3729),i=r(6547),a=r(4733),s=r(3838),l=r(3290),c=r(3007),u=r(2271),p=r(8948),d=r(2),f=r(3349),h=r(5861),v=r(6189),y=r(7199),m=r(5529),g=r(6449),b=r(3656),x=r(7730),_=r(3805),w=r(8440),j=r(5950),L=r(7241),O="[object Arguments]",A="[object Function]",P="[object Object]",k={};k[O]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[P]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[A]=k["[object WeakMap]"]=!1,e.exports=function e(t,r,S,C,M,E){var T,B=1&r,D=2&r,N=4&r;if(S&&(T=M?S(t,C,M,E):S(t)),void 0!==T)return T;if(!_(t))return t;var R=g(t);if(R){if(T=v(t),!B)return c(t,T)}else{var Z=h(t),z=Z==A||"[object GeneratorFunction]"==Z;if(b(t))return l(t,B);if(Z==P||Z==O||z&&!M){if(T=D||z?{}:m(t),!B)return D?p(t,s(T,t)):u(t,a(T,t))}else{if(!k[Z])return M?t:{};T=y(t,Z,B)}}E||(E=new n);var F=E.get(t);if(F)return F;E.set(t,T),w(t)?t.forEach(function(n){T.add(e(n,r,S,n,t,E))}):x(t)&&t.forEach(function(n,o){T.set(o,e(n,r,S,o,t,E))});var I=R?void 0:(N?D?f:d:D?L:j)(t);return o(I||t,function(n,o){I&&(n=t[o=n]),i(T,o,e(n,r,S,o,t,E))}),T}},9344(e,t,r){var n=r(3805),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},2199(e,t,r){var n=r(4528),o=r(6449);e.exports=function(e,t,r){var i=t(e);return o(e)?i:n(i,r(e))}},2552(e,t,r){var n=r(1873),o=r(659),i=r(9350),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},7534(e,t,r){var n=r(2552),o=r(346);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},9172(e,t,r){var n=r(5861),o=r(346);e.exports=function(e){return o(e)&&"[object Map]"==n(e)}},5083(e,t,r){var n=r(1882),o=r(7296),i=r(3805),a=r(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,p=c.hasOwnProperty,d=RegExp("^"+u.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?d:s).test(a(e))}},6038(e,t,r){var n=r(5861),o=r(346);e.exports=function(e){return o(e)&&"[object Set]"==n(e)}},4901(e,t,r){var n=r(2552),o=r(294),i=r(346),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},8984(e,t,r){var n=r(5527),o=r(3650),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return o(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}},2903(e,t,r){var n=r(3805),o=r(5527),i=r(181),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},8096(e){e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},7301(e){e.exports=function(e){return function(t){return e(t)}}},9653(e,t,r){var n=r(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},3290(e,t,r){e=r.nmd(e);var n=r(9325),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},6169(e,t,r){var n=r(9653);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}},3201(e){var t=/\w*$/;e.exports=function(e){var r=new e.constructor(e.source,t.exec(e));return r.lastIndex=e.lastIndex,r}},3736(e,t,r){var n=r(1873),o=n?n.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},1961(e,t,r){var n=r(9653);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},3007(e){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},1791(e,t,r){var n=r(6547),o=r(3360);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=i?i(r[c],e[c],c,r,e):void 0;void 0===u&&(u=e[c]),a?o(r,c,u):n(r,c,u)}return r}},2271(e,t,r){var n=r(1791),o=r(4664);e.exports=function(e,t){return n(e,o(e),t)}},8948(e,t,r){var n=r(1791),o=r(6375);e.exports=function(e,t){return n(e,o(e),t)}},5481(e,t,r){var n=r(9325)["__core-js_shared__"];e.exports=n},3243(e,t,r){var n=r(6110),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},4840(e){var t="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;e.exports=t},2(e,t,r){var n=r(2199),o=r(4664),i=r(5950);e.exports=function(e){return n(e,i,o)}},3349(e,t,r){var n=r(2199),o=r(6375),i=r(7241);e.exports=function(e){return n(e,i,o)}},2651(e,t,r){var n=r(4218);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},6110(e,t,r){var n=r(5083),o=r(392);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},8879(e,t,r){var n=r(4335)(Object.getPrototypeOf,Object);e.exports=n},659(e,t,r){var n=r(1873),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},4664(e,t,r){var n=r(9770),o=r(3345),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:o;e.exports=s},6375(e,t,r){var n=r(4528),o=r(8879),i=r(4664),a=r(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=o(e);return t}:a;e.exports=s},5861(e,t,r){var n=r(5580),o=r(8223),i=r(2804),a=r(6545),s=r(8303),l=r(2552),c=r(7473),u="[object Map]",p="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",v=c(n),y=c(o),m=c(i),g=c(a),b=c(s),x=l;(n&&x(new n(new ArrayBuffer(1)))!=h||o&&x(new o)!=u||i&&x(i.resolve())!=p||a&&x(new a)!=d||s&&x(new s)!=f)&&(x=function(e){var t=l(e),r="[object Object]"==t?e.constructor:void 0,n=r?c(r):"";if(n)switch(n){case v:return h;case y:return u;case m:return p;case g:return d;case b:return f}return t}),e.exports=x},392(e){e.exports=function(e,t){return null==e?void 0:e[t]}},2032(e,t,r){var n=r(1042);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},3862(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721(e,t,r){var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},2749(e,t,r){var n=r(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},5749(e,t,r){var n=r(1042);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},6189(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var r=e.length,n=new e.constructor(r);return r&&"string"==typeof e[0]&&t.call(e,"index")&&(n.index=e.index,n.input=e.input),n}},7199(e,t,r){var n=r(9653),o=r(6169),i=r(3201),a=r(3736),s=r(1961);e.exports=function(e,t,r){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return n(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,r);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Symbol]":return a(e)}}},5529(e,t,r){var n=r(9344),o=r(8879),i=r(5527);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},361(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},4218(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296(e,t,r){var n,o=r(5481),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},5527(e){var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},3702(e){e.exports=function(){this.__data__=[],this.size=0}},80(e,t,r){var n=r(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0)&&(r==t.length-1?t.pop():o.call(t,r,1),--this.size,!0)}},4739(e,t,r){var n=r(6025);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},8655(e,t,r){var n=r(6025);e.exports=function(e){return n(this.__data__,e)>-1}},1175(e,t,r){var n=r(6025);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},3040(e,t,r){var n=r(1549),o=r(79),i=r(8223);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},7670(e,t,r){var n=r(2651);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},289(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).get(e)}},4509(e,t,r){var n=r(2651);e.exports=function(e){return n(this,e).has(e)}},2949(e,t,r){var n=r(2651);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},1042(e,t,r){var n=r(6110)(Object,"create");e.exports=n},3650(e,t,r){var n=r(4335)(Object.keys,Object);e.exports=n},181(e){e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},6009(e,t,r){e=r.nmd(e);var n=r(4840),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},9350(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335(e){e.exports=function(e,t){return function(r){return e(t(r))}}},9325(e,t,r){var n=r(4840),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},1420(e,t,r){var n=r(79);e.exports=function(){this.__data__=new n,this.size=0}},938(e){e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},3605(e){e.exports=function(e){return this.__data__.get(e)}},9817(e){e.exports=function(e){return this.__data__.has(e)}},945(e,t,r){var n=r(79),o=r(8223),i=r(3661);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},7473(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},8055(e,t,r){var n=r(9999);e.exports=function(e){return n(e,5)}},5288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},2428(e,t,r){var n=r(7534),o=r(346),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},6449(e){var t=Array.isArray;e.exports=t},4894(e,t,r){var n=r(1882),o=r(294);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},3656(e,t,r){e=r.nmd(e);var n=r(9325),o=r(9935),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},1882(e,t,r){var n=r(2552),o=r(3805);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7730(e,t,r){var n=r(9172),o=r(7301),i=r(6009),a=i&&i.isMap,s=a?o(a):n;e.exports=s},3805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},8440(e,t,r){var n=r(6038),o=r(7301),i=r(6009),a=i&&i.isSet,s=a?o(a):n;e.exports=s},7167(e,t,r){var n=r(4901),o=r(7301),i=r(6009),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},5950(e,t,r){var n=r(695),o=r(8984),i=r(4894);e.exports=function(e){return i(e)?n(e):o(e)}},7241(e,t,r){var n=r(695),o=r(2903),i=r(4894);e.exports=function(e){return i(e)?n(e,!0):o(e)}},3345(e){e.exports=function(){return[]}},9935(e){e.exports=function(){return!1}},6942(e,t){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=a(e,i(r)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=a(t,r));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks;var n=r(1780),o=r.n(n);const i=window.wp.apiFetch;var a=r.n(i);const s=window.wp.components,l=(window.wp["components/buildStyle/style.css"],window.wp.element),c=window.wp.blockEditor;var u=r(8055),p=r.n(u);const d=window.ReactJSXRuntime,f=()=>(0,d.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,d.jsx)("title",{children:"shape-round"}),(0,d.jsx)("desc",{children:"Created with Sketch."}),(0,d.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,d.jsx)("g",{id:"widgets/shape-round",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,d.jsx)("path",{d:"M12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 Z M12,5 C8.13400675,5 5,8.13400675 5,12 C5,15.8659932 8.13400675,19 12,19 C15.8659932,19 19,15.8659932 19,12 C19,8.13400675 15.8659932,5 12,5 Z",id:"Combined-Shape"})})})]}),h=()=>(0,d.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,d.jsx)("title",{children:"ratio-square"}),(0,d.jsx)("desc",{children:"Created with Sketch."}),(0,d.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,d.jsx)("g",{id:"widgets/shape-square",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,d.jsx)("path",{d:"M3,3 L3,21 L21,21 L21,3 L3,3 Z M5,5 L5,19 L19,19 L19,5 L5,5 Z",id:"shape"})})})]}),v=()=>(0,d.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,d.jsx)("title",{children:"shape-radius"}),(0,d.jsx)("desc",{children:"Created with Sketch."}),(0,d.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,d.jsx)("g",{id:"widgets/shape-radius",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,d.jsx)("path",{d:"M17,3 C19.209139,3 21,4.790861 21,7 L21,17 C21,19.209139 19.209139,21 17,21 L7,21 C4.790861,21 3,19.209139 3,17 L3,7 C3,4.790861 4.790861,3 7,3 L17,3 Z M17,5 L7,5 C5.9456382,5 5.08183488,5.81587779 5.00548574,6.85073766 L5,7 L5,17 C5,18.0543618 5.81587779,18.9181651 6.85073766,18.9945143 L7,19 L17,19 C18.0543618,19 18.9181651,18.1841222 18.9945143,17.1492623 L19,17 L19,7 C19,5.9456382 18.1841222,5.08183488 17.1492623,5.00548574 L17,5 Z",id:"Rectangle"})})})]}),y=()=>(0,d.jsxs)("svg",{width:"18px",height:"18px",viewBox:"0 0 18 18",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,d.jsx)("title",{children:"shape-none"}),(0,d.jsx)("desc",{children:"Created with Sketch."}),(0,d.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,d.jsx)("g",{id:"widgets/shape-none",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,d.jsx)("path",{d:"M5,19 L5,21 L3,21 L3,19 L5,19 Z M21,19 L21,21 L19,21 L19,19 L21,19 Z M13,19 L13,21 L11,21 L11,19 L13,19 Z M9,19 L9,21 L7,21 L7,19 L9,19 Z M17,19 L17,21 L15,21 L15,19 L17,19 Z M21,15 L21,17 L19,17 L19,15 L21,15 Z M21,11 L21,13 L19,13 L19,11 L21,11 Z M5,11 L5,13 L3,13 L3,11 L5,11 Z M21,7 L21,9 L19,9 L19,7 L21,7 Z M5,7 L5,9 L3,9 L3,7 L5,7 Z M13,3 L13,5 L11,5 L11,3 L13,3 Z M9,3 L9,5 L7,5 L7,3 L9,3 Z M17,3 L17,5 L15,5 L15,3 L17,3 Z M21,3 L21,5 L19,5 L19,3 L21,3 Z M5,3 L5,5 L3,5 L3,3 L5,3 Z M3,15 L5,15 L5,17 L3,17 L3,15 Z",id:"Shape"})})})]}),m=[{value:{type:"expanded",columns:1},icon:()=>(0,d.jsxs)("svg",{width:"17px",height:"20px",viewBox:"0 0 17 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,d.jsx)("title",{children:"layout-modern"}),(0,d.jsx)("desc",{children:"Created with Sketch."}),(0,d.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,d.jsx)("g",{id:"widgets/layout-modern",transform:"translate(-2.000000, -3.000000)",fill:"#000000",children:(0,d.jsx)("path",{d:"M2,10 L5,10 L5,7 L2,7 L2,10 Z M2,14 L5,14 L5,11 L2,11 L2,14 Z M2,6 L5,6 L5,3 L2,3 L2,6 Z M6,3 L6,17 L19,17 L19,3 L6,3 Z M8,5 L8,15 L17,15 L17,5 L8,5 Z M6,18 L6,23 L19,23 L19,18 L6,18 Z M8,20 L8,23 L17,23 L17,20 L8,20 Z",id:"shape"})})})]}),label:(0,e.__)("Expanded - 1 Column","cloudinary")},{value:{type:"expanded",columns:2},icon:()=>(0,d.jsxs)("svg",{width:"18px",height:"17px",viewBox:"0 0 18 17",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,d.jsx)("title",{children:"layout-grid-2-column"}),(0,d.jsx)("desc",{children:"Created with Sketch."}),(0,d.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,d.jsx)("g",{id:"widgets/layout-gird-2-col",transform:"translate(-3.000000, -3.000000)",fill:"#000000",children:(0,d.jsx)("path",{d:"M11,12 L11,20 L3,20 L3,12 L11,12 Z M21,12 L21,20 L13,20 L13,12 L21,12 Z M9,14 L5,14 L5,18 L9,18 L9,14 Z M19,14 L15,14 L15,18 L19,18 L19,14 Z M11,3 L11,11 L3,11 L3,3 L11,3 Z M21,3 L21,11 L13,11 L13,3 L21,3 Z M9,5 L5,5 L5,9 L9,9 L9,5 Z M19,5 L15,5 L15,9 L19,9 L19,5 Z",id:"Shape"})})})]}),label:(0,e.__)("Expanded - 2 Column","cloudinary")},{value:{type:"expanded",columns:3},icon:()=>(0,d.jsxs)("svg",{width:"20px",height:"13px",viewBox:"0 0 20 13",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,d.jsx)("title",{children:"layout-grid-3-column"}),(0,d.jsx)("desc",{children:"Created with Sketch."}),(0,d.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,d.jsx)("g",{id:"widgets/layout-gird-3-col",transform:"translate(-2.000000, -5.000000)",fill:"#000000",children:(0,d.jsx)("path",{d:"M8,12 L8,18 L2,18 L2,12 L8,12 Z M15,12 L15,18 L9,18 L9,12 L15,12 Z M22,12 L22,18 L16,18 L16,12 L22,12 Z M6,14 L4,14 L4,16 L6,16 L6,14 Z M13,14 L11,14 L11,16 L13,16 L13,14 Z M20,14 L18,14 L18,16 L20,16 L20,14 Z M8,5 L8,11 L2,11 L2,5 L8,5 Z M15,5 L15,11 L9,11 L9,5 L15,5 Z M22,5 L22,11 L16,11 L16,5 L22,5 Z M6,7 L4,7 L4,9 L6,9 L6,7 Z M13,7 L11,7 L11,9 L13,9 L13,7 Z M20,7 L18,7 L18,9 L20,9 L20,7 Z",id:"Combined-Shape"})})})]}),label:(0,e.__)("Expanded - 3 Column","cloudinary")},{value:{type:"classic",columns:1},icon:()=>(0,d.jsxs)("svg",{width:"17px",height:"14px",viewBox:"0 0 17 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,d.jsx)("title",{children:"layout-classic"}),(0,d.jsx)("desc",{children:"Created with Sketch."}),(0,d.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,d.jsx)("g",{id:"widgets/layout-classic",transform:"translate(-3.000000, -5.000000)",fill:"#000000",children:(0,d.jsx)("path",{d:"M3,12 L6,12 L6,9 L3,9 L3,12 Z M3,16 L6,16 L6,13 L3,13 L3,16 Z M3,8 L6,8 L6,5 L3,5 L3,8 Z M7,5 L7,19 L20,19 L20,5 L7,5 Z M9,7 L9,17 L18,17 L18,7 L9,7 Z",id:"shape"})})})]}),label:(0,e.__)("Classic","cloudinary")}],g=["image"],b=[{label:(0,e.__)("1:1","cloudinary"),value:"1:1"},{label:(0,e.__)("3:4","cloudinary"),value:"3:4"},{label:(0,e.__)("4:3","cloudinary"),value:"4:3"},{label:(0,e.__)("4:6","cloudinary"),value:"4:6"},{label:(0,e.__)("6:4","cloudinary"),value:"6:4"},{label:(0,e.__)("5:7","cloudinary"),value:"5:7"},{label:(0,e.__)("7:5","cloudinary"),value:"7:5"},{label:(0,e.__)("8:5","cloudinary"),value:"8:5"},{label:(0,e.__)("5:8","cloudinary"),value:"5:8"},{label:(0,e.__)("9:16","cloudinary"),value:"9:16"},{label:(0,e.__)("16:9","cloudinary"),value:"16:9"}],x=[{label:(0,e.__)("None","cloudinary"),value:"none"},{label:(0,e.__)("Fade","cloudinary"),value:"fade"},{label:(0,e.__)("Slide","cloudinary"),value:"slide"}],_=[{label:(0,e.__)("Always","cloudinary"),value:"always"},{label:(0,e.__)("None","cloudinary"),value:"none"},{label:(0,e.__)("MouseOver","cloudinary"),value:"mouseover"}],w=[{label:(0,e.__)("Inline","cloudinary"),value:"inline"},{label:(0,e.__)("Flyout","cloudinary"),value:"flyout"},{label:(0,e.__)("Popup","cloudinary"),value:"popup"}],j=[{label:(0,e.__)("Top","cloudinary"),value:"top"},{label:(0,e.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,e.__)("Left","cloudinary"),value:"left"},{label:(0,e.__)("Right","cloudinary"),value:"right"}],L=[{label:(0,e.__)("Click","cloudinary"),value:"click"},{label:(0,e.__)("Hover","cloudinary"),value:"hover"}],O=[{label:(0,e.__)("Left","cloudinary"),value:"left"},{label:(0,e.__)("Right","cloudinary"),value:"right"},{label:(0,e.__)("Top","cloudinary"),value:"top"},{label:(0,e.__)("Bottom","cloudinary"),value:"bottom"}],A=[{label:(0,e.__)("Thumbnails","cloudinary"),value:"thumbnails"},{label:(0,e.__)("Indicators","cloudinary"),value:"indicators"},{label:(0,e.__)("None","cloudinary"),value:"none"}],P=[{value:"round",icon:f,label:(0,e.__)("Round","cloudinary")},{value:"radius",icon:v,label:(0,e.__)("Radius","cloudinary")},{value:"none",icon:y,label:(0,e.__)("None","cloudinary")},{value:"square",icon:h,label:(0,e.__)("Square","cloudinary")},{value:"rectangle",icon:()=>(0,d.jsxs)("svg",{width:"14px",height:"20px",viewBox:"0 0 14 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[(0,d.jsx)("title",{children:"ratio-9-16"}),(0,d.jsx)("desc",{children:"Created with Sketch."}),(0,d.jsx)("g",{id:"Desktop-0.4",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:(0,d.jsx)("g",{id:"ratio/9-16",transform:"translate(-5.000000, -2.000000)",fill:"#000000",children:(0,d.jsx)("path",{d:"M22,5.5 L22,18.5 L2,18.5 L2,5.5 L22,5.5 Z M20,7.5 L4,7.5 L4,16.5 L20,16.5 L20,7.5 Z",id:"Combined-Shape",transform:"translate(12.000000, 12.000000) rotate(-90.000000) translate(-12.000000, -12.000000) "})})})]}),label:(0,e.__)("Rectangle","cloudinary")}],k=[{value:"round",icon:f,label:(0,e.__)("Round","cloudinary")},{value:"radius",icon:v,label:(0,e.__)("Radius","cloudinary")},{value:"square",icon:h,label:(0,e.__)("Square","cloudinary")}],S=[{label:(0,e.__)("All","cloudinary"),value:"all"},{label:(0,e.__)("Border","cloudinary"),value:"border"},{label:(0,e.__)("Gradient","cloudinary"),value:"gradient"}],C=[{label:(0,e.__)("All","cloudinary"),value:"all"},{label:(0,e.__)("Top","cloudinary"),value:"top"},{label:(0,e.__)("Top-Bottom","cloudinary"),value:"top-bottom"},{label:(0,e.__)("Left-Right","cloudinary"),value:"left-right"},{label:(0,e.__)("Bottom","cloudinary"),value:"bottom"},{label:(0,e.__)("Left","cloudinary"),value:"left"},{label:(0,e.__)("Right","cloudinary"),value:"right"}],M=[{value:"round",icon:f,label:(0,e.__)("Round","cloudinary")},{value:"radius",icon:v,label:(0,e.__)("Radius","cloudinary")},{value:"none",icon:y,label:(0,e.__)("None","cloudinary")},{value:"square",icon:h,label:(0,e.__)("Square","cloudinary")}],E=[{label:(0,e.__)("Pad","cloudinary"),value:"pad"},{label:(0,e.__)("Fill","cloudinary"),value:"fill"}],T=[{label:(0,e.__)("White padding","cloudinary"),value:"rgb:FFFFFF"},{label:(0,e.__)("Border color padding","cloudinary"),value:"auto"},{label:(0,e.__)("Predominant color padding","cloudinary"),value:"auto:predominant"},{label:(0,e.__)("Gradient fade padding","cloudinary"),value:"auto:predominant_gradient"}];var B=r(6942),D=r.n(B);const N=({value:e,children:t,icon:r,onChange:n,current:o})=>{const i="object"==typeof e?JSON.stringify(e)===JSON.stringify(o):o===e;return(0,d.jsxs)("button",{type:"button",onClick:()=>n(e),className:D()("radio-select",{"radio-select--active":i}),children:[(0,d.jsx)(r,{}),(0,d.jsx)("div",{className:"radio-select__label",children:t})]})},R=window.wp.data,Z=e=>e<10?"0"+String(e):e.toString(16),z=e=>{const t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,Z).join("")},F=e=>{const t=/var\((.*)\)/g.exec(e);return t?getComputedStyle(document.documentElement).getPropertyValue(t[1]):e};function I(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function W(e){return e instanceof I(e).Element||e instanceof Element}function H(e){return e instanceof I(e).HTMLElement||e instanceof HTMLElement}function V(e){return"undefined"!=typeof ShadowRoot&&(e instanceof I(e).ShadowRoot||e instanceof ShadowRoot)}var U=Math.max,q=Math.min,$=Math.round;function G(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function X(){return!/^((?!chrome|android).)*safari/i.test(G())}function J(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.getBoundingClientRect(),o=1,i=1;t&&H(e)&&(o=e.offsetWidth>0&&$(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&$(n.height)/e.offsetHeight||1);var a=(W(e)?I(e):window).visualViewport,s=!X()&&r,l=(n.left+(s&&a?a.offsetLeft:0))/o,c=(n.top+(s&&a?a.offsetTop:0))/i,u=n.width/o,p=n.height/i;return{width:u,height:p,top:c,right:l+u,bottom:c+p,left:l,x:l,y:c}}function Y(e){var t=I(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function K(e){return e?(e.nodeName||"").toLowerCase():null}function Q(e){return((W(e)?e.ownerDocument:e.document)||window.document).documentElement}function ee(e){return J(Q(e)).left+Y(e).scrollLeft}function te(e){return I(e).getComputedStyle(e)}function re(e){var t=te(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function ne(e,t,r){void 0===r&&(r=!1);var n,o,i=H(t),a=H(t)&&function(e){var t=e.getBoundingClientRect(),r=$(t.width)/e.offsetWidth||1,n=$(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),s=Q(t),l=J(e,a,r),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!r)&&(("body"!==K(t)||re(s))&&(c=(n=t)!==I(n)&&H(n)?{scrollLeft:(o=n).scrollLeft,scrollTop:o.scrollTop}:Y(n)),H(t)?((u=J(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=ee(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function oe(e){var t=J(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function ie(e){return"html"===K(e)?e:e.assignedSlot||e.parentNode||(V(e)?e.host:null)||Q(e)}function ae(e){return["html","body","#document"].indexOf(K(e))>=0?e.ownerDocument.body:H(e)&&re(e)?e:ae(ie(e))}function se(e,t){var r;void 0===t&&(t=[]);var n=ae(e),o=n===(null==(r=e.ownerDocument)?void 0:r.body),i=I(n),a=o?[i].concat(i.visualViewport||[],re(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(se(ie(a)))}function le(e){return["table","td","th"].indexOf(K(e))>=0}function ce(e){return H(e)&&"fixed"!==te(e).position?e.offsetParent:null}function ue(e){for(var t=I(e),r=ce(e);r&&le(r)&&"static"===te(r).position;)r=ce(r);return r&&("html"===K(r)||"body"===K(r)&&"static"===te(r).position)?t:r||function(e){var t=/firefox/i.test(G());if(/Trident/i.test(G())&&H(e)&&"fixed"===te(e).position)return null;var r=ie(e);for(V(r)&&(r=r.host);H(r)&&["html","body"].indexOf(K(r))<0;){var n=te(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}var pe="top",de="bottom",fe="right",he="left",ve="auto",ye=[pe,de,fe,he],me="start",ge="end",be="viewport",xe="popper",_e=ye.reduce(function(e,t){return e.concat([t+"-"+me,t+"-"+ge])},[]),we=[].concat(ye,[ve]).reduce(function(e,t){return e.concat([t,t+"-"+me,t+"-"+ge])},[]),je=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Le(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||o(e)}),n}var Oe={placement:"bottom",modifiers:[],strategy:"absolute"};function Ae(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function Pe(e){void 0===e&&(e={});var t=e,r=t.defaultModifiers,n=void 0===r?[]:r,o=t.defaultOptions,i=void 0===o?Oe:o;return function(e,t,r){void 0===r&&(r=i);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Oe,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(r){var o="function"==typeof r?r(s.options):r;p(),s.options=Object.assign({},i,s.options,o),s.scrollParents={reference:W(e)?se(e):e.contextElement?se(e.contextElement):[],popper:se(t)};var a,c,d=function(e){var t=Le(e);return je.reduce(function(e,r){return e.concat(t.filter(function(e){return e.phase===r}))},[])}((a=[].concat(n,s.options.modifiers),c=a.reduce(function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,t,{options:Object.assign({},r.options,t.options),data:Object.assign({},r.data,t.data)}):t,e},{}),Object.keys(c).map(function(e){return c[e]})));return s.orderedModifiers=d.filter(function(e){return e.enabled}),s.orderedModifiers.forEach(function(e){var t=e.name,r=e.options,n=void 0===r?{}:r,o=e.effect;if("function"==typeof o){var i=o({state:s,name:t,instance:u,options:n}),a=function(){};l.push(i||a)}}),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,r=e.popper;if(Ae(t,r)){s.rects={reference:ne(t,ue(r),"fixed"===s.options.strategy),popper:oe(r)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach(function(e){return s.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var o=s.orderedModifiers[n],i=o.fn,a=o.options,l=void 0===a?{}:a,p=o.name;"function"==typeof i&&(s=i({state:s,options:l,name:p,instance:u})||s)}else s.reset=!1,n=-1}}},update:(o=function(){return new Promise(function(e){u.forceUpdate(),e(s)})},function(){return a||(a=new Promise(function(e){Promise.resolve().then(function(){a=void 0,e(o())})})),a}),destroy:function(){p(),c=!0}};if(!Ae(e,t))return u;function p(){l.forEach(function(e){return e()}),l=[]}return u.setOptions(r).then(function(e){!c&&r.onFirstUpdate&&r.onFirstUpdate(e)}),u}}var ke={passive:!0};function Se(e){return e.split("-")[0]}function Ce(e){return e.split("-")[1]}function Me(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ee(e){var t,r=e.reference,n=e.element,o=e.placement,i=o?Se(o):null,a=o?Ce(o):null,s=r.x+r.width/2-n.width/2,l=r.y+r.height/2-n.height/2;switch(i){case pe:t={x:s,y:r.y-n.height};break;case de:t={x:s,y:r.y+r.height};break;case fe:t={x:r.x+r.width,y:l};break;case he:t={x:r.x-n.width,y:l};break;default:t={x:r.x,y:r.y}}var c=i?Me(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case me:t[c]=t[c]-(r[u]/2-n[u]/2);break;case ge:t[c]=t[c]+(r[u]/2-n[u]/2)}}return t}var Te={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Be(e){var t,r=e.popper,n=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,p=e.isFixed,d=a.x,f=void 0===d?0:d,h=a.y,v=void 0===h?0:h,y="function"==typeof u?u({x:f,y:v}):{x:f,y:v};f=y.x,v=y.y;var m=a.hasOwnProperty("x"),g=a.hasOwnProperty("y"),b=he,x=pe,_=window;if(c){var w=ue(r),j="clientHeight",L="clientWidth";if(w===I(r)&&"static"!==te(w=Q(r)).position&&"absolute"===s&&(j="scrollHeight",L="scrollWidth"),o===pe||(o===he||o===fe)&&i===ge)x=de,v-=(p&&w===_&&_.visualViewport?_.visualViewport.height:w[j])-n.height,v*=l?1:-1;if(o===he||(o===pe||o===de)&&i===ge)b=fe,f-=(p&&w===_&&_.visualViewport?_.visualViewport.width:w[L])-n.width,f*=l?1:-1}var O,A=Object.assign({position:s},c&&Te),P=!0===u?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:$(r*o)/o||0,y:$(n*o)/o||0}}({x:f,y:v},I(r)):{x:f,y:v};return f=P.x,v=P.y,l?Object.assign({},A,((O={})[x]=g?"0":"",O[b]=m?"0":"",O.transform=(_.devicePixelRatio||1)<=1?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",O)):Object.assign({},A,((t={})[x]=g?v+"px":"",t[b]=m?f+"px":"",t.transform="",t))}const De={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];H(o)&&K(o)&&(Object.assign(o.style,r),Object.keys(n).forEach(function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce(function(e,t){return e[t]="",e},{});H(n)&&K(n)&&(Object.assign(n.style,i),Object.keys(o).forEach(function(e){n.removeAttribute(e)}))})}},requires:["computeStyles"]};const Ne={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.offset,i=void 0===o?[0,0]:o,a=we.reduce(function(e,r){return e[r]=function(e,t,r){var n=Se(e),o=[he,pe].indexOf(n)>=0?-1:1,i="function"==typeof r?r(Object.assign({},t,{placement:e})):r,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[he,fe].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}(r,t.rects,i),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=a}};var Re={left:"right",right:"left",bottom:"top",top:"bottom"};function Ze(e){return e.replace(/left|right|bottom|top/g,function(e){return Re[e]})}var ze={start:"end",end:"start"};function Fe(e){return e.replace(/start|end/g,function(e){return ze[e]})}function Ie(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&V(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function We(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function He(e,t,r){return t===be?We(function(e,t){var r=I(e),n=Q(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=X();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+ee(e),y:l}}(e,r)):W(t)?function(e,t){var r=J(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):We(function(e){var t,r=Q(e),n=Y(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=U(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=U(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+ee(e),l=-n.scrollTop;return"rtl"===te(o||r).direction&&(s+=U(r.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(Q(e)))}function Ve(e,t,r,n){var o="clippingParents"===t?function(e){var t=se(ie(e)),r=["absolute","fixed"].indexOf(te(e).position)>=0&&H(e)?ue(e):e;return W(r)?t.filter(function(e){return W(e)&&Ie(e,r)&&"body"!==K(e)}):[]}(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce(function(t,r){var o=He(e,r,n);return t.top=U(o.top,t.top),t.right=q(o.right,t.right),t.bottom=q(o.bottom,t.bottom),t.left=U(o.left,t.left),t},He(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ue(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function qe(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}function $e(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=void 0===n?e.placement:n,i=r.strategy,a=void 0===i?e.strategy:i,s=r.boundary,l=void 0===s?"clippingParents":s,c=r.rootBoundary,u=void 0===c?be:c,p=r.elementContext,d=void 0===p?xe:p,f=r.altBoundary,h=void 0!==f&&f,v=r.padding,y=void 0===v?0:v,m=Ue("number"!=typeof y?y:qe(y,ye)),g=d===xe?"reference":xe,b=e.rects.popper,x=e.elements[h?g:d],_=Ve(W(x)?x:x.contextElement||Q(e.elements.popper),l,u,a),w=J(e.elements.reference),j=Ee({reference:w,element:b,strategy:"absolute",placement:o}),L=We(Object.assign({},b,j)),O=d===xe?L:w,A={top:_.top-O.top+m.top,bottom:O.bottom-_.bottom+m.bottom,left:_.left-O.left+m.left,right:O.right-_.right+m.right},P=e.modifiersData.offset;if(d===xe&&P){var k=P[o];Object.keys(A).forEach(function(e){var t=[fe,de].indexOf(e)>=0?1:-1,r=[pe,de].indexOf(e)>=0?"y":"x";A[e]+=k[r]*t})}return A}function Ge(e,t,r){return U(e,q(t,r))}const Xe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0!==a&&a,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,p=r.padding,d=r.tether,f=void 0===d||d,h=r.tetherOffset,v=void 0===h?0:h,y=$e(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:u}),m=Se(t.placement),g=Ce(t.placement),b=!g,x=Me(m),_="x"===x?"y":"x",w=t.modifiersData.popperOffsets,j=t.rects.reference,L=t.rects.popper,O="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,A="number"==typeof O?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(w){if(i){var S,C="y"===x?pe:he,M="y"===x?de:fe,E="y"===x?"height":"width",T=w[x],B=T+y[C],D=T-y[M],N=f?-L[E]/2:0,R=g===me?j[E]:L[E],Z=g===me?-L[E]:-j[E],z=t.elements.arrow,F=f&&z?oe(z):{width:0,height:0},I=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=I[C],H=I[M],V=Ge(0,j[E],F[E]),$=b?j[E]/2-N-V-W-A.mainAxis:R-V-W-A.mainAxis,G=b?-j[E]/2+N+V+H+A.mainAxis:Z+V+H+A.mainAxis,X=t.elements.arrow&&ue(t.elements.arrow),J=X?"y"===x?X.clientTop||0:X.clientLeft||0:0,Y=null!=(S=null==P?void 0:P[x])?S:0,K=T+G-Y,Q=Ge(f?q(B,T+$-Y-J):B,T,f?U(D,K):D);w[x]=Q,k[x]=Q-T}if(s){var ee,te="x"===x?pe:he,re="x"===x?de:fe,ne=w[_],ie="y"===_?"height":"width",ae=ne+y[te],se=ne-y[re],le=-1!==[pe,he].indexOf(m),ce=null!=(ee=null==P?void 0:P[_])?ee:0,ve=le?ae:ne-j[ie]-L[ie]-ce+A.altAxis,ye=le?ne+j[ie]+L[ie]-ce-A.altAxis:se,ge=f&&le?function(e,t,r){var n=Ge(e,t,r);return n>r?r:n}(ve,ne,ye):Ge(f?ve:ae,ne,f?ye:se);w[_]=ge,k[_]=ge-ne}t.modifiersData[n]=k}},requiresIfExists:["offset"]};const Je={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,n=e.name,o=e.options,i=r.elements.arrow,a=r.modifiersData.popperOffsets,s=Se(r.placement),l=Me(s),c=[he,fe].indexOf(s)>=0?"height":"width";if(i&&a){var u=function(e,t){return Ue("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:qe(e,ye))}(o.padding,r),p=oe(i),d="y"===l?pe:he,f="y"===l?de:fe,h=r.rects.reference[c]+r.rects.reference[l]-a[l]-r.rects.popper[c],v=a[l]-r.rects.reference[l],y=ue(i),m=y?"y"===l?y.clientHeight||0:y.clientWidth||0:0,g=h/2-v/2,b=u[d],x=m-p[c]-u[f],_=m/2-p[c]/2+g,w=Ge(b,_,x),j=l;r.modifiersData[n]=((t={})[j]=w,t.centerOffset=w-_,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&Ie(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ye(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Ke(e){return[pe,fe,de,he].some(function(t){return e[t]>=0})}var Qe=Pe({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,n=e.options,o=n.scroll,i=void 0===o||o,a=n.resize,s=void 0===a||a,l=I(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",r.update,ke)}),s&&l.addEventListener("resize",r.update,ke),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",r.update,ke)}),s&&l.removeEventListener("resize",r.update,ke)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=Ee({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,a=void 0===i||i,s=r.roundOffsets,l=void 0===s||s,c={placement:Se(t.placement),variation:Ce(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Be(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Be(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},De,Ne,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,i=void 0===o||o,a=r.altAxis,s=void 0===a||a,l=r.fallbackPlacements,c=r.padding,u=r.boundary,p=r.rootBoundary,d=r.altBoundary,f=r.flipVariations,h=void 0===f||f,v=r.allowedAutoPlacements,y=t.options.placement,m=Se(y),g=l||(m===y||!h?[Ze(y)]:function(e){if(Se(e)===ve)return[];var t=Ze(e);return[Fe(e),t,Fe(t)]}(y)),b=[y].concat(g).reduce(function(e,r){return e.concat(Se(r)===ve?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,i=r.rootBoundary,a=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=void 0===l?we:l,u=Ce(n),p=u?s?_e:_e.filter(function(e){return Ce(e)===u}):ye,d=p.filter(function(e){return c.indexOf(e)>=0});0===d.length&&(d=p);var f=d.reduce(function(t,r){return t[r]=$e(e,{placement:r,boundary:o,rootBoundary:i,padding:a})[Se(r)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}(t,{placement:r,boundary:u,rootBoundary:p,padding:c,flipVariations:h,allowedAutoPlacements:v}):r)},[]),x=t.rects.reference,_=t.rects.popper,w=new Map,j=!0,L=b[0],O=0;O<b.length;O++){var A=b[O],P=Se(A),k=Ce(A)===me,S=[pe,de].indexOf(P)>=0,C=S?"width":"height",M=$e(t,{placement:A,boundary:u,rootBoundary:p,altBoundary:d,padding:c}),E=S?k?fe:he:k?de:pe;x[C]>_[C]&&(E=Ze(E));var T=Ze(E),B=[];if(i&&B.push(M[P]<=0),s&&B.push(M[E]<=0,M[T]<=0),B.every(function(e){return e})){L=A,j=!1;break}w.set(A,B)}if(j)for(var D=function(e){var t=b.find(function(t){var r=w.get(t);if(r)return r.slice(0,e).every(function(e){return e})});if(t)return L=t,"break"},N=h?3:1;N>0;N--){if("break"===D(N))break}t.placement!==L&&(t.modifiersData[n]._skip=!0,t.placement=L,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Xe,Je,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=$e(t,{elementContext:"reference"}),s=$e(t,{altBoundary:!0}),l=Ye(a,n),c=Ye(s,o,i),u=Ke(l),p=Ke(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}}]}),et="tippy-content",tt="tippy-backdrop",rt="tippy-arrow",nt="tippy-svg-arrow",ot={passive:!0,capture:!0},it=function(){return document.body};function at(e,t,r){if(Array.isArray(e)){var n=e[t];return null==n?Array.isArray(r)?r[t]:r:n}return e}function st(e,t){var r={}.toString.call(e);return 0===r.indexOf("[object")&&r.indexOf(t+"]")>-1}function lt(e,t){return"function"==typeof e?e.apply(void 0,t):e}function ct(e,t){return 0===t?e:function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)};var r}function ut(e){return[].concat(e)}function pt(e,t){-1===e.indexOf(t)&&e.push(t)}function dt(e){return e.split("-")[0]}function ft(e){return[].slice.call(e)}function ht(e){return Object.keys(e).reduce(function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t},{})}function vt(){return document.createElement("div")}function yt(e){return["Element","Fragment"].some(function(t){return st(e,t)})}function mt(e){return st(e,"MouseEvent")}function gt(e){return!(!e||!e._tippy||e._tippy.reference!==e)}function bt(e){return yt(e)?[e]:function(e){return st(e,"NodeList")}(e)?ft(e):Array.isArray(e)?e:ft(document.querySelectorAll(e))}function xt(e,t){e.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function _t(e,t){e.forEach(function(e){e&&e.setAttribute("data-state",t)})}function wt(e){var t,r=ut(e)[0];return null!=r&&null!=(t=r.ownerDocument)&&t.body?r.ownerDocument:document}function jt(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(t){e[n](t,r)})}function Lt(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=null==r.getRootNode||null==(n=r.getRootNode())?void 0:n.host}return!1}var Ot={isTouch:!1},At=0;function Pt(){Ot.isTouch||(Ot.isTouch=!0,window.performance&&document.addEventListener("mousemove",kt))}function kt(){var e=performance.now();e-At<20&&(Ot.isTouch=!1,document.removeEventListener("mousemove",kt)),At=e}function St(){var e=document.activeElement;if(gt(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}var Ct=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var Mt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Et=Object.assign({appendTo:it,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},Mt,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Tt=Object.keys(Et);function Bt(e){var t=(e.plugins||[]).reduce(function(t,r){var n,o=r.name,i=r.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(n=Et[o])?n:i);return t},{});return Object.assign({},e,t)}function Dt(e,t){var r=Object.assign({},t,{content:lt(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Bt(Object.assign({},Et,{plugins:t}))):Tt).reduce(function(t,r){var n=(e.getAttribute("data-tippy-"+r)||"").trim();if(!n)return t;if("content"===r)t[r]=n;else try{t[r]=JSON.parse(n)}catch(e){t[r]=n}return t},{})}(e,t.plugins));return r.aria=Object.assign({},Et.aria,r.aria),r.aria={expanded:"auto"===r.aria.expanded?t.interactive:r.aria.expanded,content:"auto"===r.aria.content?t.interactive?null:"describedby":r.aria.content},r}function Nt(e,t){e.innerHTML=t}function Rt(e){var t=vt();return!0===e?t.className=rt:(t.className=nt,yt(e)?t.appendChild(e):Nt(t,e)),t}function Zt(e,t){yt(t.content)?(Nt(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Nt(e,t.content):e.textContent=t.content)}function zt(e){var t=e.firstElementChild,r=ft(t.children);return{box:t,content:r.find(function(e){return e.classList.contains(et)}),arrow:r.find(function(e){return e.classList.contains(rt)||e.classList.contains(nt)}),backdrop:r.find(function(e){return e.classList.contains(tt)})}}function Ft(e){var t=vt(),r=vt();r.className="tippy-box",r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=vt();function o(r,n){var o=zt(t),i=o.box,a=o.content,s=o.arrow;n.theme?i.setAttribute("data-theme",n.theme):i.removeAttribute("data-theme"),"string"==typeof n.animation?i.setAttribute("data-animation",n.animation):i.removeAttribute("data-animation"),n.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?i.setAttribute("role",n.role):i.removeAttribute("role"),r.content===n.content&&r.allowHTML===n.allowHTML||Zt(a,e.props),n.arrow?s?r.arrow!==n.arrow&&(i.removeChild(s),i.appendChild(Rt(n.arrow))):i.appendChild(Rt(n.arrow)):s&&i.removeChild(s)}return n.className=et,n.setAttribute("data-state","hidden"),Zt(n,e.props),t.appendChild(r),r.appendChild(n),o(e.props,e.props),{popper:t,onUpdate:o}}Ft.$$tippy=!0;var It=1,Wt=[],Ht=[];function Vt(e,t){var r,n,o,i,a,s,l,c,u=Dt(e,Object.assign({},Et,Bt(ht(t)))),p=!1,d=!1,f=!1,h=!1,v=[],y=ct($,u.interactiveDebounce),m=It++,g=(c=u.plugins).filter(function(e,t){return c.indexOf(e)===t}),b={id:m,reference:e,popper:vt(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:g,clearDelayTimeouts:function(){clearTimeout(r),clearTimeout(n),cancelAnimationFrame(o)},setProps:function(t){0;if(b.state.isDestroyed)return;T("onBeforeUpdate",[b,t]),U();var r=b.props,n=Dt(e,Object.assign({},r,ht(t),{ignoreAttributes:!0}));b.props=n,V(),r.interactiveDebounce!==n.interactiveDebounce&&(N(),y=ct($,n.interactiveDebounce));r.triggerTarget&&!n.triggerTarget?ut(r.triggerTarget).forEach(function(e){e.removeAttribute("aria-expanded")}):n.triggerTarget&&e.removeAttribute("aria-expanded");D(),E(),w&&w(r,n);b.popperInstance&&(Y(),Q().forEach(function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)}));T("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){0;var e=b.state.isVisible,t=b.state.isDestroyed,r=!b.state.isEnabled,n=Ot.isTouch&&!b.props.touch,o=at(b.props.duration,0,Et.duration);if(e||t||r||n)return;if(k().hasAttribute("disabled"))return;if(T("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,P()&&(_.style.visibility="visible");E(),F(),b.state.isMounted||(_.style.transition="none");if(P()){var i=C();xt([i.box,i.content],0)}s=function(){var e;if(b.state.isVisible&&!h){if(h=!0,_.offsetHeight,_.style.transition=b.props.moveTransition,P()&&b.props.animation){var t=C(),r=t.box,n=t.content;xt([r,n],o),_t([r,n],"visible")}B(),D(),pt(Ht,b),null==(e=b.popperInstance)||e.forceUpdate(),T("onMount",[b]),b.props.animation&&P()&&function(e,t){W(e,t)}(o,function(){b.state.isShown=!0,T("onShown",[b])})}},function(){var e,t=b.props.appendTo,r=k();e=b.props.interactive&&t===it||"parent"===t?r.parentNode:lt(t,[r]);e.contains(_)||e.appendChild(_);b.state.isMounted=!0,Y(),!1}()},hide:function(){0;var e=!b.state.isVisible,t=b.state.isDestroyed,r=!b.state.isEnabled,n=at(b.props.duration,1,Et.duration);if(e||t||r)return;if(T("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,h=!1,p=!1,P()&&(_.style.visibility="hidden");if(N(),I(),E(!0),P()){var o=C(),i=o.box,a=o.content;b.props.animation&&(xt([i,a],n),_t([i,a],"hidden"))}B(),D(),b.props.animation?P()&&function(e,t){W(e,function(){!b.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&t()})}(n,b.unmount):b.unmount()},hideWithInteractivity:function(e){0;S().addEventListener("mousemove",y),pt(Wt,y),y(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){0;b.state.isVisible&&b.hide();if(!b.state.isMounted)return;K(),Q().forEach(function(e){e._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_);Ht=Ht.filter(function(e){return e!==b}),b.state.isMounted=!1,T("onHidden",[b])},destroy:function(){0;if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),U(),delete e._tippy,b.state.isDestroyed=!0,T("onDestroy",[b])}};if(!u.render)return b;var x=u.render(b),_=x.popper,w=x.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+b.id,b.popper=_,e._tippy=b,_._tippy=b;var j=g.map(function(e){return e.fn(b)}),L=e.hasAttribute("aria-expanded");return V(),D(),E(),T("onCreate",[b]),u.showOnCreate&&ee(),_.addEventListener("mouseenter",function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&S().addEventListener("mousemove",y)}),b;function O(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function A(){return"hold"===O()[0]}function P(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function k(){return l||e}function S(){var e=k().parentNode;return e?wt(e):document}function C(){return zt(_)}function M(e){return b.state.isMounted&&!b.state.isVisible||Ot.isTouch||i&&"focus"===i.type?0:at(b.props.delay,e?0:1,Et.delay)}function E(e){void 0===e&&(e=!1),_.style.pointerEvents=b.props.interactive&&!e?"":"none",_.style.zIndex=""+b.props.zIndex}function T(e,t,r){var n;(void 0===r&&(r=!0),j.forEach(function(r){r[e]&&r[e].apply(r,t)}),r)&&(n=b.props)[e].apply(n,t)}function B(){var t=b.props.aria;if(t.content){var r="aria-"+t.content,n=_.id;ut(b.props.triggerTarget||e).forEach(function(e){var t=e.getAttribute(r);if(b.state.isVisible)e.setAttribute(r,t?t+" "+n:n);else{var o=t&&t.replace(n,"").trim();o?e.setAttribute(r,o):e.removeAttribute(r)}})}}function D(){!L&&b.props.aria.expanded&&ut(b.props.triggerTarget||e).forEach(function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===k()?"true":"false"):e.removeAttribute("aria-expanded")})}function N(){S().removeEventListener("mousemove",y),Wt=Wt.filter(function(e){return e!==y})}function R(t){if(!Ot.isTouch||!f&&"mousedown"!==t.type){var r=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!Lt(_,r)){if(ut(b.props.triggerTarget||e).some(function(e){return Lt(e,r)})){if(Ot.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else T("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout(function(){d=!1}),b.state.isMounted||I())}}}function Z(){f=!0}function z(){f=!1}function F(){var e=S();e.addEventListener("mousedown",R,!0),e.addEventListener("touchend",R,ot),e.addEventListener("touchstart",z,ot),e.addEventListener("touchmove",Z,ot)}function I(){var e=S();e.removeEventListener("mousedown",R,!0),e.removeEventListener("touchend",R,ot),e.removeEventListener("touchstart",z,ot),e.removeEventListener("touchmove",Z,ot)}function W(e,t){var r=C().box;function n(e){e.target===r&&(jt(r,"remove",n),t())}if(0===e)return t();jt(r,"remove",a),jt(r,"add",n),a=n}function H(t,r,n){void 0===n&&(n=!1),ut(b.props.triggerTarget||e).forEach(function(e){e.addEventListener(t,r,n),v.push({node:e,eventType:t,handler:r,options:n})})}function V(){var e;A()&&(H("touchstart",q,{passive:!0}),H("touchend",G,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach(function(e){if("manual"!==e)switch(H(e,q),e){case"mouseenter":H("mouseleave",G);break;case"focus":H(Ct?"focusout":"blur",X);break;case"focusin":H("focusout",X)}})}function U(){v.forEach(function(e){var t=e.node,r=e.eventType,n=e.handler,o=e.options;t.removeEventListener(r,n,o)}),v=[]}function q(e){var t,r=!1;if(b.state.isEnabled&&!J(e)&&!d){var n="focus"===(null==(t=i)?void 0:t.type);i=e,l=e.currentTarget,D(),!b.state.isVisible&&mt(e)&&Wt.forEach(function(t){return t(e)}),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||p)&&!1!==b.props.hideOnClick&&b.state.isVisible?r=!0:ee(e),"click"===e.type&&(p=!r),r&&!n&&te(e)}}function $(e){var t=e.target,r=k().contains(t)||_.contains(t);if("mousemove"!==e.type||!r){var n=Q().concat(_).map(function(e){var t,r=null==(t=e._tippy.popperInstance)?void 0:t.state;return r?{popperRect:e.getBoundingClientRect(),popperState:r,props:u}:null}).filter(Boolean);(function(e,t){var r=t.clientX,n=t.clientY;return e.every(function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,a=dt(o.placement),s=o.modifiersData.offset;if(!s)return!0;var l="bottom"===a?s.top.y:0,c="top"===a?s.bottom.y:0,u="right"===a?s.left.x:0,p="left"===a?s.right.x:0,d=t.top-n+l>i,f=n-t.bottom-c>i,h=t.left-r+u>i,v=r-t.right-p>i;return d||f||h||v})})(n,e)&&(N(),te(e))}}function G(e){J(e)||b.props.trigger.indexOf("click")>=0&&p||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function X(e){b.props.trigger.indexOf("focusin")<0&&e.target!==k()||b.props.interactive&&e.relatedTarget&&_.contains(e.relatedTarget)||te(e)}function J(e){return!!Ot.isTouch&&A()!==e.type.indexOf("touch")>=0}function Y(){K();var t=b.props,r=t.popperOptions,n=t.placement,o=t.offset,i=t.getReferenceClientRect,a=t.moveTransition,l=P()?zt(_).arrow:null,c=i?{getBoundingClientRect:i,contextElement:i.contextElement||k()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(P()){var r=C().box;["placement","reference-hidden","escaped"].forEach(function(e){"placement"===e?r.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?r.setAttribute("data-"+e,""):r.removeAttribute("data-"+e)}),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!a}},u];P()&&l&&p.push({name:"arrow",options:{element:l,padding:3}}),p.push.apply(p,(null==r?void 0:r.modifiers)||[]),b.popperInstance=Qe(c,_,Object.assign({},r,{placement:n,onFirstUpdate:s,modifiers:p}))}function K(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Q(){return ft(_.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&T("onTrigger",[b,e]),F();var t=M(!0),n=O(),o=n[0],i=n[1];Ot.isTouch&&"hold"===o&&i&&(t=i),t?r=setTimeout(function(){b.show()},t):b.show()}function te(e){if(b.clearDelayTimeouts(),T("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=M(!1);t?n=setTimeout(function(){b.state.isVisible&&b.hide()},t):o=requestAnimationFrame(function(){b.hide()})}}else I()}}function Ut(e,t){void 0===t&&(t={});var r=Et.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",Pt,ot),window.addEventListener("blur",St);var n=Object.assign({},t,{plugins:r}),o=bt(e).reduce(function(e,t){var r=t&&Vt(t,n);return r&&e.push(r),e},[]);return yt(e)?o[0]:o}Ut.defaultProps=Et,Ut.setDefaultProps=function(e){Object.keys(e).forEach(function(t){Et[t]=e[t]})},Ut.currentInput=Ot;Object.assign({},De,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}});Ut.setDefaultProps({render:Ft});const qt=Ut,$t=({children:e,value:t})=>(0,d.jsxs)("div",{className:"colorpalette-color-label",children:[(0,d.jsx)("span",{children:e}),(0,d.jsx)("span",{className:"component-color-indicator","aria-label":`Color: ${t}`,style:{background:t}})]}),Gt=new(o())("_"),Xt=({attributes:t,setAttributes:r,colors:n})=>{const o=p()(t),i=Gt.object(o),[a,u]=(0,l.useState)(i.customSettings);t.transformation_crop||(t.transformation_crop="pad",t.transformation_background="rgb:FFFFFF"),"fill"===t.transformation_crop&&delete t.transformation_background;const f=(e,t)=>{const n={[t]:F(e)};r(n)},h=(e=>{const[t,r]=(0,l.useState)(null),n=(0,l.useCallback)(e=>r(e),[]);return(0,l.useEffect)(()=>{if(!t)return;const r=qt(t,{content:e});return()=>{r?.destroy()}},[t,e]),n})((0,e.__)("How to resize or crop images to fit the gallery. Pad adds padding around the image using the specified padding style. Fill crops the image from the center so it fills as much of the available space as possible.","cloudinary"));return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.PanelBody,{title:(0,e.__)("Layout","cloudinary"),children:m.map(e=>(0,d.jsx)(N,{value:e.value,onChange:e=>{r({displayProps_mode:e.type,displayProps_columns:e.columns||1})},icon:e.icon,current:{type:t.displayProps_mode,columns:t.displayProps_columns||1},children:e.label},`${e.value.type}-${e.value.columns}-layout`))}),(0,d.jsxs)(s.PanelBody,{title:(0,e.__)("Color Palette","cloudinary"),initialOpen:!1,children:[(0,d.jsx)($t,{value:t.themeProps_primary,children:(0,e.__)("Primary","cloudinary")}),(0,d.jsx)(c.ColorPalette,{value:t.themeProps_primary,colors:n,disableCustomColors:!1,onChange:e=>f(e,"themeProps_primary")}),(0,d.jsx)($t,{value:t.themeProps_onPrimary,children:(0,e.__)("On Primary","cloudinary")}),(0,d.jsx)(c.ColorPalette,{value:t.themeProps_onPrimary,colors:n,disableCustomColors:!1,onChange:e=>f(e,"themeProps_onPrimary")}),(0,d.jsx)($t,{value:t.themeProps_active,children:(0,e.__)("Active","cloudinary")}),(0,d.jsx)(c.ColorPalette,{value:t.themeProps_active,colors:n,disableCustomColors:!1,onChange:e=>f(e,"themeProps_active")})]}),"classic"===t.displayProps_mode&&(0,d.jsx)(s.PanelBody,{title:(0,e.__)("Fade Transition","cloudinary"),initialOpen:!1,children:(0,d.jsx)(s.SelectControl,{value:t.transition,options:x,onChange:e=>r({transition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0})}),(0,d.jsxs)(s.PanelBody,{title:(0,e.__)("Main Viewer Parameters","cloudinary"),initialOpen:!1,children:[(0,d.jsx)(s.SelectControl,{label:(0,e.__)("Aspect Ratio","cloudinary"),value:t.aspectRatio,options:b,onChange:e=>r({aspectRatio:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,d.jsxs)("p",{children:[(0,d.jsxs)("div",{className:"cld-ui-title",children:[(0,e.__)("Resize/Crop Mode","cloudinary"),(0,d.jsx)("span",{className:"dashicons dashicons-info cld-tooltip",ref:h})]}),(0,d.jsx)(s.ButtonGroup,{children:E.map(e=>(0,d.jsx)(s.Button,{variant:"secondary",isPressed:e.value===t.transformation_crop,onClick:()=>r({transformation_crop:e.value,transformation_background:null}),children:e.label},e.value+"-look-and-feel"))})]}),"pad"===t.transformation_crop&&(0,d.jsx)(s.SelectControl,{label:(0,e.__)("Pad style","cloudinary"),value:t.transformation_background,options:T,onChange:e=>{r({transformation_background:e})},__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,d.jsx)("p",{children:(0,e.__)("Navigation","cloudinary")}),(0,d.jsx)("p",{children:(0,d.jsx)(s.ButtonGroup,{children:_.map(e=>(0,d.jsx)(s.Button,{variant:"secondary",isPressed:e.value===t.navigation,onClick:()=>r({navigation:e.value}),children:e.label},e.value+"-navigation"))})}),(0,d.jsxs)("div",{style:{marginTop:"30px"},children:[(0,d.jsx)(s.ToggleControl,{label:(0,e.__)("Show Zoom","cloudinary"),checked:t.zoom,onChange:()=>r({zoom:!t.zoom}),__nextHasNoMarginBottom:!0}),t.zoom&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{children:(0,e.__)("Zoom Type","cloudinary")}),(0,d.jsx)("p",{children:(0,d.jsx)(s.ButtonGroup,{children:w.map(e=>(0,d.jsx)(s.Button,{variant:"secondary",isPressed:e.value===t.zoomProps_type,onClick:()=>r({zoomProps_type:e.value}),children:e.label},e.value+"-zoom-type"))})}),"flyout"===t.zoomProps_type&&(0,d.jsx)(s.SelectControl,{label:(0,e.__)("Zoom Viewer Position","cloudinary"),value:t.zoomProps_viewerPosition,options:j,onChange:e=>r({zoomProps_viewerPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),"popup"!==t.zoomProps_type&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{children:(0,e.__)("Zoom Trigger","cloudinary")}),(0,d.jsx)("p",{children:(0,d.jsx)(s.ButtonGroup,{children:L.map(e=>(0,d.jsx)(s.Button,{variant:"secondary",isPressed:e.value===t.zoomProps_trigger,onClick:()=>r({zoomProps_trigger:e.value}),children:e.label},e.value+"-zoom-trigger"))})})]})]})]})]}),(0,d.jsxs)(s.PanelBody,{title:(0,e.__)("Carousel Parameters","cloudinary"),initialOpen:!1,children:[(0,d.jsx)("p",{children:(0,e.__)("Carousel Location","cloudinary")}),(0,d.jsx)("p",{children:(0,d.jsx)(s.ButtonGroup,{children:O.map(e=>(0,d.jsx)(s.Button,{variant:"secondary",isPressed:e.value===t.carouselLocation,onClick:()=>r({carouselLocation:e.value}),children:e.label},e.value+"-carousel-location"))})}),(0,d.jsx)(s.RangeControl,{label:(0,e.__)("Carousel Offset","cloudinary"),value:t.carouselOffset,onChange:e=>r({carouselOffset:e}),min:0,max:100,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,d.jsx)("p",{children:(0,e.__)("Carousel Style","cloudinary")}),(0,d.jsx)("p",{children:(0,d.jsx)(s.ButtonGroup,{children:A.map(e=>(0,d.jsx)(s.Button,{variant:"secondary",isPressed:e.value===t.carouselStyle,onClick:()=>r({carouselStyle:e.value}),children:e.label},e.value+"-carousel-style"))})}),"thumbnails"===t.carouselStyle&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.RangeControl,{label:(0,e.__)("Width","cloudinary"),value:t.thumbnailProps_width,onChange:e=>r({thumbnailProps_width:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,d.jsx)(s.RangeControl,{label:(0,e.__)("Height","cloudinary"),value:t.thumbnailProps_height,onChange:e=>r({thumbnailProps_height:e}),min:5,max:300,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,d.jsx)("p",{children:(0,e.__)("Navigation Button Shape","cloudinary")}),P.map(e=>(0,d.jsx)(N,{value:e.value,onChange:e=>r({thumbnailProps_navigationShape:e}),icon:e.icon,current:t.thumbnailProps_navigationShape,children:e.label},e.value+"-navigation-button-shape")),(0,d.jsx)("p",{children:(0,e.__)("Selected Style","cloudinary")}),(0,d.jsx)("p",{children:(0,d.jsx)(s.ButtonGroup,{children:S.map(e=>(0,d.jsx)(s.Button,{variant:"secondary",isPressed:e.value===t.thumbnailProps_selectedStyle,onClick:()=>r({thumbnailProps_selectedStyle:e.value}),children:e.label},e.value+"-selected-style"))})}),(0,d.jsx)(s.SelectControl,{label:(0,e.__)("Selected Border Position","cloudinary"),value:t.thumbnailProps_selectedBorderPosition,options:C,onChange:e=>r({thumbnailProps_selectedBorderPosition:e}),__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,d.jsx)(s.RangeControl,{label:(0,e.__)("Selected Border Width","cloudinary"),value:t.thumbnailProps_selectedBorderWidth,onChange:e=>r({thumbnailProps_selectedBorderWidth:e}),min:0,max:10,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0}),(0,d.jsx)("p",{children:(0,e.__)("Media Shape Icon","cloudinary")}),M.map(e=>(0,d.jsx)(N,{value:e.value,onChange:e=>r({thumbnailProps_mediaSymbolShape:e}),icon:e.icon,current:t.thumbnailProps_mediaSymbolShape,children:e.label},e.value+"-media"))]}),"indicators"===t.carouselStyle&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{children:(0,e.__)("Indicators Shape","cloudinary")}),k.map(e=>(0,d.jsx)(N,{value:e.value,onChange:e=>r({indicatorProps_shape:e}),icon:e.icon,current:t.indicatorProps_shape,children:e.label},e.value+"-indicator"))]})]}),(0,d.jsx)(s.PanelBody,{title:(0,e.__)("Additional Settings","cloudinary"),initialOpen:!1,children:(0,d.jsx)(s.TextareaControl,{label:(0,e.__)("Custom Settings","cloudinary"),help:(0,e.__)("Provide a JSON string of the settings you want to add and/or override.","cloudinary"),value:a,onChange:e=>{let t={};u(e);try{t=JSON.parse(e)}catch(e){}if("object"==typeof t){const e={...i};e.customSettings=t,r({...i,...e})}},__nextHasNoMarginBottom:!0})})]})},Jt=new(o())("_"),Yt=(0,e.__)("Drag images, upload new ones or select files from your library.","cloudinary"),Kt=(e,t)=>({...e,container:"."+t,zoom:!1}),Qt=({setAttributes:t,attributes:r,className:n,isSelected:i})=>{const[u,f]=(0,l.useState)(null),[h,v]=(0,l.useState)(!1),y=(0,l.useMemo)(()=>{if(0!==r.selectedImages.length)return r;const e={},{container:t,...n}=Jt.dot(CLD_GALLERY_CONFIG);return Object.keys(n).forEach(t=>{r[t]||(e[t]=n[t])}),{...r,...e}},[r]),m=(0,l.useMemo)(()=>r.selectedImages.length?r.selectedImages.map(({attachmentId:e})=>({id:e})):[],[r]);(0,l.useEffect)(()=>{if(u&&((({status:e,message:t,options:r={}})=>{(0,R.dispatch)("core/notices").createNotice(e,t,{isDismissible:!0,...r})})({status:"error",message:u}),f(null)),r.selectedImages.length){let e;const{customSettings:t,...n}=(e=>{const t=new(o())("_"),r=p()(e),{selectedImages:n,...i}=t.object(r,{});return i.mediaAssets=n,"classic"!==i?.displayProps?.mode?delete i.transition:delete i.displayProps.columns,"pad"!==i?.transformation_crop&&delete i.transformation_background,"pad"!==i?.transformation?.crop&&delete i.transformation.background,i?.themeProps?.primary&&(i.themeProps.primary=F(i?.themeProps?.primary)),i?.themeProps?.onPrimary&&(i.themeProps.onPrimary=F(i?.themeProps?.onPrimary)),i?.themeProps?.active&&(i.themeProps.active=F(i?.themeProps?.active)),i})(r);try{e=cloudinary.galleryWidget(Kt({...n,...t},r.container))}catch{e=cloudinary.galleryWidget(Kt(n,r.container))}return e.render(),v(!1),()=>e.destroy()}},[u,r,t,n]);const b=!!r.selectedImages.length;return r.container||t({container:`${n}${z(15)}`}),t(y),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:r.container||n}),(0,d.jsx)("div",{className:"wp-block-cloudinary-gallery",children:(0,d.jsx)(c.MediaPlaceholder,{labels:{title:!b&&(0,e.__)("Cloudinary Gallery","cloudinary"),instructions:!b&&Yt},icon:"format-gallery",disableMediaButtons:b&&!i,allowedTypes:g,addToGallery:b,isAppender:b,onSelect:r=>(async r=>{v(!0);try{const e=await a()({path:CLD_REST_ENDPOINT+"/image_data",method:"POST",data:{images:r}});t({selectedImages:e})}catch{v(!1),f((0,e.__)("Could not load selected images. Please try again.","cloudinary"))}})(r),value:m,multiple:!0,children:h&&(0,d.jsx)("div",{className:"loading-spinner-container",children:(0,d.jsx)(s.Spinner,{})})})})]}),(0,d.jsx)(c.InspectorControls,{children:(0,d.jsx)(Xt,{attributes:r,setAttributes:t})})]})},er=({attributes:e})=>(0,d.jsx)("div",{className:e.container}),tr=JSON.parse('{"aspectRatio":{"type":"string"},"navigation":{"type":"string"},"zoom":{"type":"boolean"},"carouselLocation":{"type":"string"},"carouselOffset":{"type":"number"},"carouselStyle":{"type":"string"},"displayProps_mode":{"type":"string"},"displayProps_columns":{"type":"number"},"indicatorProps_shape":{"type":"string"},"themeProps_primary":{"type":"string"},"themeProps_onPrimary":{"type":"string"},"themeProps_active":{"type":"string"},"zoomProps_type":{"type":"string"},"zoomProps_viewerPosition":{"type":"string"},"zoomProps_trigger":{"type":"string"},"thumbnailProps_width":{"type":"number"},"thumbnailProps_height":{"type":"number"},"thumbnailProps_navigationShape":{"type":"string"},"thumbnailProps_selectedStyle":{"type":"string"},"thumbnailProps_selectedBorderPosition":{"type":"string"},"thumbnailProps_selectedBorderWidth":{"type":"number"},"thumbnailProps_mediaSymbolShape":{"type":"string"},"cloudName":{"type":"string"},"container":{"type":"string"},"selectedImages":{"type":"array","default":[]},"transformation_crop":{"type":"string","default":"pad"},"transformation_background":{"type":"string"},"customSettings":{"type":"string"}}');(0,t.registerBlockType)("cloudinary/gallery",{apiVersion:2,title:(0,e.__)("Cloudinary Gallery","cloudinary"),description:(0,e.__)("Add a gallery powered by the Cloudinary Gallery Widget to your post.","cloudinary"),category:"widgets",icon:"format-gallery",attributes:tr,edit:Qt,save:er})})()})();
//# sourceMappingURL=gallery-block.js.map